docs: 仓库链接指向本镜像仓库
Dev Build / cleanup (push) Canceled after 0s
Dev Build / typecheck (push) Canceled after 0s
Dev Build / build (linux-arm64, ubuntu-24.04-arm, linux-arm64) (push) Canceled after 0s
Dev Build / build (linux-x64, ubuntu-latest, linux-x64) (push) Canceled after 0s
Dev Build / build (win-x64, windows-latest, win32-x64) (push) Canceled after 0s
Dev Build / dispatch-dev-docker (push) Skipped

This commit is contained in:
TanTan committed 2026-11-13 09:27:07 +08:00
1 parent fa9c73363d
commit 2a69b23b47
18210 files changed
+5101211 -16

No files matched your search

@@ -0,0 +1 @@
{"version":3,"file":"text-select.js","sources":["../../../src/icons/text-select.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name TextSelect\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNNSAzYTIgMiAwIDAgMC0yIDIiIC8+CiAgPHBhdGggZD0iTTE5IDNhMiAyIDAgMCAxIDIgMiIgLz4KICA8cGF0aCBkPSJNMjEgMTlhMiAyIDAgMCAxLTIgMiIgLz4KICA8cGF0aCBkPSJNNSAyMWEyIDIgMCAwIDEtMi0yIiAvPgogIDxwYXRoIGQ9Ik05IDNoMSIgLz4KICA8cGF0aCBkPSJNOSAyMWgxIiAvPgogIDxwYXRoIGQ9Ik0xNCAzaDEiIC8+CiAgPHBhdGggZD0iTTE0IDIxaDEiIC8+CiAgPHBhdGggZD0iTTMgOXYxIiAvPgogIDxwYXRoIGQ9Ik0yMSA5djEiIC8+CiAgPHBhdGggZD0iTTMgMTR2MSIgLz4KICA8cGF0aCBkPSJNMjEgMTR2MSIgLz4KICA8bGluZSB4MT0iNyIgeDI9IjE1IiB5MT0iOCIgeTI9IjgiIC8+CiAgPGxpbmUgeDE9IjciIHgyPSIxNyIgeTE9IjEyIiB5Mj0iMTIiIC8+CiAgPGxpbmUgeDE9IjciIHgyPSIxMyIgeTE9IjE2IiB5Mj0iMTYiIC8+Cjwvc3ZnPgo=) - https://lucide.dev/icons/text-select\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst TextSelect = createLucideIcon('TextSelect', [\n ['path', { d: 'M5 3a2 2 0 0 0-2 2', key: 'y57alp' }],\n ['path', { d: 'M19 3a2 2 0 0 1 2 2', key: '18rm91' }],\n ['path', { d: 'M21 19a2 2 0 0 1-2 2', key: '1j7049' }],\n ['path', { d: 'M5 21a2 2 0 0 1-2-2', key: 'sbafld' }],\n ['path', { d: 'M9 3h1', key: '1yesri' }],\n ['path', { d: 'M9 21h1', key: '15o7lz' }],\n ['path', { d: 'M14 3h1', key: '1ec4yj' }],\n ['path', { d: 'M14 21h1', key: 'v9vybs' }],\n ['path', { d: 'M3 9v1', key: '1r0deq' }],\n ['path', { d: 'M21 9v1', key: 'mxsmne' }],\n ['path', { d: 'M3 14v1', key: 'vnatye' }],\n ['path', { d: 'M21 14v1', key: '169vum' }],\n ['line', { x1: '7', x2: '15', y1: '8', y2: '8', key: '1758g8' }],\n ['line', { x1: '7', x2: '17', y1: '12', y2: '12', key: '197423' }],\n ['line', { x1: '7', x2: '13', y1: '16', y2: '16', key: '37cgm6' }],\n]);\n\nexport default TextSelect;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAa,iBAAiB,YAAc,CAAA,CAAA,CAAA;AAAA,CAAA,CAChD,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAsB,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACnD,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAuB,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACpD,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAwB,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACrD,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAuB,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACpD,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAU,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACvC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAW,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACxC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAW,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACxC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAY,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACzC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAU,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACvC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAW,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACxC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAW,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACxC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAY,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CACzC,CAAA,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAE,CAAA,CAAA,CAAA,EAAI,CAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAI,CAAM,CAAA,CAAALine truncated
@@ -0,0 +1 @@
{"version":3,"file":"calc-repeat-duration.mjs","sources":["../../../../../src/animation/sequence/utils/calc-repeat-duration.ts"],"sourcesContent":["export function calculateRepeatDuration(\n duration: number,\n repeat: number,\n _repeatDelay: number\n): number {\n return duration * (repeat + 1)\n}\n"],"names":[],"mappings":"SAAgB,uBAAuB,CACnC,QAAgB,EAChB,MAAc,EACd,YAAoB,EAAA;AAEpB,IAAA,OAAO,QAAQ,IAAI,MAAM,GAAG,CAAC,CAAC;AAClC;;;;"}
@@ -0,0 +1,11 @@
import { parseAnyDef } from "./any.js";
export function parseNeverDef(refs) {
return refs.target === "openAi"
? undefined
: {
not: parseAnyDef({
...refs,
currentPath: [...refs.currentPath, "not"],
}),
};
}
@@ -0,0 +1,4 @@
//#region src/router/utils.ts
const createNullObject = () => Object.create(null);
//#endregion
export { createNullObject };
@@ -0,0 +1,43 @@
"use client";
import { useRouter } from "./useRouter.js";
import { replaceEqualDeep } from "@tanstack/router-core";
import { useRef } from "react";
import { useStore } from "@tanstack/react-store";
import { isServer } from "@tanstack/router-core/isServer";
//#region src/useRouterState.tsx
/**
* Subscribe to the router's state store with optional selection and
* structural sharing for render optimization.
*
* Options:
* - `select`: Project the full router state to a derived slice
* - `structuralSharing`: Replace-equal semantics for stable references
* - `router`: Read state from a specific router instance instead of context
*
* @returns The selected router state (or the full state by default).
* @link https://tanstack.com/router/latest/docs/framework/react/api/router/useRouterStateHook
*/
function useRouterState(opts) {
const contextRouter = useRouter({ warn: opts?.router === void 0 });
const router = opts?.router || contextRouter;
if (isServer ?? router.isServer) {
const state = router.stores.__store.get();
return opts?.select ? opts.select(state) : state;
}
const previousResult = useRef(void 0);
return useStore(router.stores.__store, (state) => {
if (opts?.select) {
if (opts.structuralSharing ?? router.options.defaultStructuralSharing) {
const newSlice = replaceEqualDeep(previousResult.current, opts.select(state));
previousResult.current = newSlice;
return newSlice;
}
return opts.select(state);
}
return state;
});
}
//#endregion
export { useRouterState };
//# sourceMappingURL=useRouterState.js.map
@@ -0,0 +1,7 @@
import type { FlatConfig } from '@typescript-eslint/utils/ts-eslint';
/**
* A version of `stylistic` that only contains type-checked rules and disables of any corresponding core ESLint rules.
* @see {@link https://typescript-eslint.io/users/configs#stylistic-type-checked-only}
*/
declare const _default: (plugin: FlatConfig.Plugin, parser: FlatConfig.Parser) => FlatConfig.ConfigArray;
export default _default;
@@ -0,0 +1 @@
{"version":3,"file":"commonWords.json.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;"}
@@ -0,0 +1,19 @@
/**
* @license lucide-react v0.469.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const Satellite = createLucideIcon("Satellite", [
["path", { d: "M13 7 9 3 5 7l4 4", key: "vyckw6" }],
["path", { d: "m17 11 4 4-4 4-4-4", key: "rchckc" }],
["path", { d: "m8 12 4 4 6-6-4-4Z", key: "1sshf7" }],
["path", { d: "m16 8 3-3", key: "x428zp" }],
["path", { d: "M9 21a6 6 0 0 0-6-6", key: "1iajcf" }]
]);
export { Satellite as default };
//# sourceMappingURL=satellite.js.map
@@ -0,0 +1 @@
{"version":3,"file":"progressExample.d.ts","sourceRoot":"","sources":["../../../../src/examples/server/progressExample.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG"}
@@ -0,0 +1 @@
module.exports={C:{"82":0.01923,"88":0.00385,"107":0.00769,"112":0.01154,"113":0.00385,"115":0.1192,"116":0.00769,"120":0.01923,"121":0.03845,"127":0.01923,"128":0.00385,"138":0.00385,"140":0.03845,"141":0.03461,"146":0.00385,"147":0.00769,"148":0.00385,"149":0.01154,"151":0.24224,"152":0.02307,"153":0.13073,"154":0.21532,"155":0.47294,"156":0.62289,"157":0.00769,_:"2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 83 84 85 86 87 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 108 109 110 111 114 117 118 119 122 123 124 125 126 129 130 131 132 133 134 135 136 137 139 142 143 144 145 150 158 159 160 3.5 3.6"},D:{"49":0.00385,"54":0.01923,"55":0.02307,"56":0.01538,"59":0.00769,"60":0.01923,"63":0.00769,"64":0.03845,"70":0.02692,"71":0.00385,"75":0.05768,"77":0.00769,"78":0.03076,"79":0.00385,"80":0.05768,"81":0.00385,"88":0.03461,"90":0.02307,"92":0.00385,"93":0.03076,"96":0.00385,"97":0.00769,"99":0.00385,"101":0.03461,"102":0.01154,"103":0.03461,"104":0.00385,"105":0.01923,"106":0.0769,"108":0.00769,"109":0.58444,"110":0.00385,"111":0.01923,"112":0.02307,"113":0.01538,"114":0.00769,"116":0.03461,"117":0.00385,"118":0.28838,"119":0.04999,"120":0.04614,"124":0.01538,"126":0.01538,"127":0.06921,"128":0.15765,"131":0.05383,"132":0.01538,"133":0.04999,"134":0.05383,"135":0.06537,"136":0.06921,"137":0.08459,"138":0.08075,"139":0.0769,"140":0.18072,"141":0.06921,"142":0.19994,"143":0.01923,"144":0.10382,"145":0.04999,"146":0.16149,"147":0.02692,"148":0.22686,"149":0.14996,"150":0.30376,"151":1.71103,"152":6.59033,"153":6.84795,"154":1.73025,_:"4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 50 51 52 53 57 58 61 62 65 66 67 68 69 72 73 74 76 83 84 85 86 87 89 91 94 95 98 100 107 115 121 122 123 125 129 130 155 156 157"},F:{"91":0.00769,"100":0.02692,"101":0.01154,"115":0.00769,"117":0.00385,"118":0.00385,"119":0.02307,"134":0.13458,"135":1.97249,_:"9 11 12 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 60 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 92 93 94 95 96 97 98 99 102 103 104 105 106 107 108 109 110 111 112 113 114 116 120 121 122 123 124 125 126 127 131 132 133 9.5-9.6 10.0-10.1 10.5 10.6 11.1 11.5 11.6 12.1"},B:{"16":0.00385,"17":0.00385,"18":0.03076,"89":0.00769,"90":0.01538,"92":0.09228,"109":0.01923,"119":0.02692,"120":0.03076,"122":0.00769,"125":0.00385,"134":0.00385,"136":0.00385,"140":0.00385,"142":0.00385,"143":0.00385,"144":0.01923,"145":0.04614,"146":0.00385,"147":0.00385,"148":0.00769,"149":0.03076,"150":0.03076,"151":0.18841,"152":1.3073,"153":1.83022,"154":0.22301,_:"12 13 14 15 79 80 81 83 84 85 86 87 88 91 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 110 111 112 113 114 115 116 117 118 121 123 124 126 127 128 129 130 131 132 133 135 137 138 139 141"},E:{"13":0.00385,"27":0.01154,_:"4 5 6 7 8 9 10 11 12 14 15 3.1 3.2 5.1 6.1 7.1 9.1 10.1 11.1 12.1 13.1 14.1 15.1 15.4 15.5 16.0 16.1 16.2 16.3 16.4 16.5 17.0 17.3 17.4 18.0 18.2 18.3 18.5-18.7 26.1 26.2 26.3 26.4 27.1 TP","15.2-15.3":0.00769,"15.6":0.05383,"16.6":0.06537,"17.1":0.00385,"17.2":0.00769,"17.5":0.01154,"17.6":0.16534,"18.1":0.00385,"18.4":0.00385,"26.0":0.00385,"26.5":0.01154,"26.6":0.23455,"27.2":0.00385},G:{"8":0,"3.2":0,"4.0-4.1":0,"4.2-4.3":0.00027,"5.0-5.1":0.00027,"6.0-6.1":0,"7.0-7.1":0.00055,"8.1-8.4":0,"9.0-9.2":0,"9.3":0,"10.0-10.2":0,"10.3":0.00273,"11.0-11.2":0.00027,"11.3-11.4":0.00055,"12.0-12.1":0,"12.2-12.5":0.00711,"13.0-13.1":0,"13.2":0.00137,"13.3":0,"13.4-13.7":0.00027,"14.0-14.4":0.00109,"14.5-14.8":0.00164,"15.0-15.1":0.00164,"15.2-15.3":0.00109,"15.4":0.00137,"15.5":0.00164,"15.6-15.8":0.03553,"16.0":0.00273,"16.1":0.00492,"16.2":0.00273,"16.3":0.00601,"16.4":0.00137,"16.5":0.00219,"16.6-16.7":0.04946,"17.0":0.00191,"17.1":0.00273,"17.2":0.00273,"17.3":0.0041,"17.4":0.00574,"17.5":0.0112,"17.6-17.7":0.02897,"18.0":0.00601,"18.1":0.01202,"18.2":0.0164,"18.3":0.02842,"18.4":0.01776,"18.5-18.7":0.36702,"26.0":0.01776,"26.1":0.01804,"26.2":0.047,"26.3":0.05083,"26.4":0.03717,"26.5":0.24896,"26.6":1.53612,"27.0":0.11778,"27.1":0,"27.2":0.00301},P:{"24":0.12114,"25":0.00865,"26":0.00865,"27":0.03461,"28":0.03461,"29":0.07787,"30":0.83066,_:"4 20 21 22 23 5.0-5.4 6.2-6.4 8.2 9.2 10.1 11.1-11.2 13.0 14.0 15.0 16.0 17.0 18.0","7.2-7.4":0.05192,"12.0":0.01731,"19.0":0.00865},I:{"0":0.01845,"3":0,"4":0,"2.1":0,"2.2":0,"2.3":0,"4.1":0,"4.2-4.3":0,"4.4":0,"4.4.3-4.4.4":0.00001},K:{"0":5.14789,_:"10 11 12 11.1 11.5 12.1"},A:{"7":0.00385,_:"6 8 9 10 11 5.5"},S:{"2.5":0.01231,_:"3.0-3.1"},J:{_:"7 10"},N:{_:"10 11"},L:{"0":59.90115},R:{_:"0"},M:{"0":0.01847},Q:{_:"14.9"},O:{"0":0.19081},H:{all:0.01}};
@@ -0,0 +1 @@
{"version":3,"file":"percent-diamond.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;"}
@@ -0,0 +1,5 @@
import { ApplyGlobalResponse, ClientRequest, ClientRequestOptions, ClientResponse, Fetch, InferRequestType, InferResponseType, PickResponseByStatusCode } from "./types.js";
import { hc } from "./client.js";
import { DetailedError } from "./fetch-result-please.js";
import { parseResponse } from "./utils.js";
export { type ApplyGlobalResponse, type ClientRequest, type ClientRequestOptions, type ClientResponse, DetailedError, type Fetch, type InferRequestType, type InferResponseType, type PickResponseByStatusCode, hc, parseResponse };
@@ -0,0 +1,19 @@
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
const require_hono_base = require("../hono-base.js");
const require_router_smart_router_router = require("../router/smart-router/router.js");
const require_router_trie_router_router = require("../router/trie-router/router.js");
require("../router/trie-router/index.js");
const require_router_linear_router_router = require("../router/linear-router/router.js");
//#region src/preset/quick.ts
/**
* @module
* The preset that uses `LinearRouter`.
*/
var Hono = class extends require_hono_base.HonoBase {
constructor(options = {}) {
super(options);
this.router = new require_router_smart_router_router.SmartRouter({ routers: [new require_router_linear_router_router.LinearRouter(), new require_router_trie_router_router.TrieRouter()] });
}
};
//#endregion
exports.Hono = Hono;
@@ -0,0 +1,10 @@
import { C as ProxifiedObject, D as CodeFormatOptions, E as ProxyType, O as detectCodeFormat, S as ProxifiedNewExpression, T as ProxyBase, _ as ProxifiedImportItem, a as Token, b as ProxifiedMemberExpression, c as Proxified, d as ProxifiedAwaitExpression, f as ProxifiedBinaryExpression, g as ProxifiedIdentifier, h as ProxifiedFunctionExpression, i as ParsedFileNode, k as Options, l as ProxifiedArray, m as ProxifiedFunctionCall, n as GenerateOptions, o as BinaryOperator, p as ProxifiedBlockStatement, r as Loc, s as ImportItemInput, t as ASTNode, u as ProxifiedArrowFunctionExpression, v as ProxifiedImportsMap, w as ProxifiedValue, x as ProxifiedModule, y as ProxifiedLogicalExpression } from "./types-D5FmR3uJ.js";
import { MagicastError, MagicastErrorOptions, builders, generateCode, parseExpression, parseModule } from "./core.js";
//#region src/file.d.ts
declare function loadFile<Exports extends object = any>(filename: string, options?: Options): Promise<ProxifiedModule<Exports>>;
declare function writeFile(node: {
$ast: ASTNode;
} | ASTNode, filename: string, options?: Options): Promise<void>;
//#endregion
export { ASTNode, BinaryOperator, CodeFormatOptions, GenerateOptions, ImportItemInput, Loc, MagicastError, MagicastErrorOptions, ParsedFileNode, Proxified, ProxifiedArray, ProxifiedArrowFunctionExpression, ProxifiedAwaitExpression, ProxifiedBinaryExpression, ProxifiedBlockStatement, ProxifiedFunctionCall, ProxifiedFunctionExpression, ProxifiedIdentifier, ProxifiedImportItem, ProxifiedImportsMap, ProxifiedLogicalExpression, ProxifiedMemberExpression, ProxifiedModule, ProxifiedNewExpression, ProxifiedObject, ProxifiedValue, ProxyBase, ProxyType, Token, builders, detectCodeFormat, generateCode, loadFile, parseExpression, parseModule, writeFile };
@@ -0,0 +1,22 @@
/**
* @license lucide-react v0.469.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const BadgeCheck = createLucideIcon("BadgeCheck", [
[
"path",
{
d: "M3.85 8.62a4 4 0 0 1 4.78-4.77 4 4 0 0 1 6.74 0 4 4 0 0 1 4.78 4.78 4 4 0 0 1 0 6.74 4 4 0 0 1-4.77 4.78 4 4 0 0 1-6.75 0 4 4 0 0 1-4.78-4.77 4 4 0 0 1 0-6.76Z",
key: "3c2336"
}
],
["path", { d: "m9 12 2 2 4-4", key: "dzmm74" }]
]);
export { BadgeCheck as default };
//# sourceMappingURL=badge-check.js.map
@@ -0,0 +1,77 @@
/* eslint-disable node/no-deprecated-api */
'use strict'
var buffer = require('buffer')
var Buffer = buffer.Buffer
var safer = {}
var key
for (key in buffer) {
if (!buffer.hasOwnProperty(key)) continue
if (key === 'SlowBuffer' || key === 'Buffer') continue
safer[key] = buffer[key]
}
var Safer = safer.Buffer = {}
for (key in Buffer) {
if (!Buffer.hasOwnProperty(key)) continue
if (key === 'allocUnsafe' || key === 'allocUnsafeSlow') continue
Safer[key] = Buffer[key]
}
safer.Buffer.prototype = Buffer.prototype
if (!Safer.from || Safer.from === Uint8Array.from) {
Safer.from = function (value, encodingOrOffset, length) {
if (typeof value === 'number') {
throw new TypeError('The "value" argument must not be of type number. Received type ' + typeof value)
}
if (value && typeof value.length === 'undefined') {
throw new TypeError('The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type ' + typeof value)
}
return Buffer(value, encodingOrOffset, length)
}
}
if (!Safer.alloc) {
Safer.alloc = function (size, fill, encoding) {
if (typeof size !== 'number') {
throw new TypeError('The "size" argument must be of type number. Received type ' + typeof size)
}
if (size < 0 || size >= 2 * (1 << 30)) {
throw new RangeError('The value "' + size + '" is invalid for option "size"')
}
var buf = Buffer(size)
if (!fill || fill.length === 0) {
buf.fill(0)
} else if (typeof encoding === 'string') {
buf.fill(fill, encoding)
} else {
buf.fill(fill)
}
return buf
}
}
if (!safer.kStringMaxLength) {
try {
safer.kStringMaxLength = process.binding('buffer').kStringMaxLength
} catch (e) {
// we can't determine kStringMaxLength in environments where process.binding
// is unsupported, so let's not set it
}
}
if (!safer.constants) {
safer.constants = {
MAX_LENGTH: safer.kMaxLength
}
if (safer.kStringMaxLength) {
safer.constants.MAX_STRING_LENGTH = safer.kStringMaxLength
}
}
module.exports = safer
@@ -0,0 +1,422 @@
flf2a$ 4 3 10 -1 13 1
mshebrew210.flf by Michael 'msh210' Hamm 2-5 Nov 2000 for FIGWin.
Copyright (c) 2000 Michael Hamm. Note: uses Gedaliah Friedenberg's
Jerusalem font's keyboard map. www.crosswinds.net/~msh210/ has
msh210 contact info. Okay to modify this font iff modifier's name
is on a comment line. msh210's first font: have heart, suggestions
Keyboard map (see note above):
alef = t | vav = u | chaf = f | nun = b | fe = p | kuf = e
ves = c | zayin = z | `final = l | `final = i | `final = ; | resh = r
gimel = d | ches = j | lamed = k | samach = x | tzadi = m | shin = a
daled = s | tes = y | mem = n | ayin = g | `final = . | saf = ,
he = v | yud = h | `final = o | period = /
$@
$@
$@
$@@
@
@
@
@@
@
@
@
@@
@
@
@
@@
@
@
@
@@
@
@
@
@@
@
@
@
@@
@
@
@
@@
@
@
@
@@
@
@
@
@@
@
@
@
@@
@
@
@
@@
@
|""|@
_| |@
@@
@
@
@
@@
@
\ |@
\/ @
$\ @@
@
@
o@
@@
@
@
@
@@
@
@
@
@@
@
@
@
@@
@
@
@
@@
@
@
@
@@
@
@
@
@@
@
@
@
@@
@
@
@
@@
@
@
@
@@
@
@
@
@@
@
@
@
@@
@
["|@
|@
|@@
@
@
@
@@
@
@
@
@@
@
@
@
@@
@
@
@
@@
@
@
@
@@
@
@
@
@@
@
@
@
@@
@
@
@
@@
@
@
@
@@
@
@
@
@@
@
@
@
@@
@
@
@
@@
@
@
@
@@
@
@
@
@@
@
@
@
@@
@
@
@
@@
@
@
@
@@
@
@
@
@@
@
@
@
@@
@
@
@
@@
@
@
@
@@
@
@
@
@@
@
@
@
@@
@
@
@
@@
@
@
@
@@
@
@
@
@@
@
@
@
@@
@
@
@
@@
@
@
@
@@
@
@
@
@@
@
@
@
@@
@
@
@
@@
@
@
@
@@
@
@
@
@@
@
@
@
@@
@
@
@
@@
@
@
@
@@
@
|/ |@
|_/ @
@@
@
$|@
_|@
@@
@
""| @
__|_@
@@
@
\ @
/\@
@@
@
""|@
| '@
|$ @@
@
""|@
__|@
@@
@
\ |@
\/ @
-'$ @@
@
|@
$@
@@
@
|@
|@
|@@
@
|""|@
| |@
@@
|$ @
""|@
/ @
@@
@
""|@
|@
|@@
@
\/@
_\@
@@
@
Y"\ @
| _|@
@@
@
|""|@
|__|@
@@
@
["|@
__|@
@@
@
@
@
@@
@
""|@
|@
$@@
@
""|'@
| @
$ @@
@
\>@
L\@
@@
@
|@
|@
$@@
@
""|@
| |@
$@@
@
@
@
@@
@
|""|@
\/ @
@@
@
| /|@
|__|@
@@
@
`(`@
)@
@@
@
@
@
@@
@
@
@
@@
@
@
@
@@
@
@
@
@@
@
@
@
@@
@
@
@
@@
@
@
@
@@
@
@
@
@@
@
@
@
@@
@
@
@
@@
@
@
@
@@
@@ -0,0 +1,122 @@
import type { $ZodStringFormats } from "../core/checks.js";
import type * as errors from "../core/errors.js";
import * as util from "../core/util.js";
const error: () => errors.$ZodErrorMap = () => {
const Sizable: Record<string, { unit: string; verb: string }> = {
string: { unit: "символів", verb: "матиме" },
file: { unit: "байтів", verb: "матиме" },
array: { unit: "елементів", verb: "матиме" },
set: { unit: "елементів", verb: "матиме" },
map: { unit: "елементів", verb: "матиме" },
};
function getSizing(origin: string): { unit: string; verb: string } | null {
return Sizable[origin] ?? null;
}
const FormatDictionary: {
[k in $ZodStringFormats | (string & {})]?: string;
} = {
regex: "вхідні дані",
email: "адреса електронної пошти",
url: "URL",
emoji: "емодзі",
uuid: "UUID",
uuidv4: "UUIDv4",
uuidv6: "UUIDv6",
nanoid: "nanoid",
guid: "GUID",
cuid: "cuid",
cuid2: "cuid2",
ulid: "ULID",
xid: "XID",
ksuid: "KSUID",
datetime: "дата та час ISO",
date: "дата ISO",
time: "час ISO",
duration: "тривалість ISO",
ipv4: "адреса IPv4",
ipv6: "адреса IPv6",
mac: "адреса MAC",
cidrv4: "діапазон IPv4",
cidrv6: "діапазон IPv6",
base64: "рядок у кодуванні base64",
base64url: "рядок у кодуванні base64url",
json_string: "рядок JSON",
e164: "номер E.164",
credit_card: "номер кредитної картки",
currency_code: "код валюти",
iban: "IBAN",
jwt: "JWT",
template_literal: "вхідні дані",
};
const TypeDictionary: {
[k in errors.$ZodInvalidTypeExpected | (string & {})]?: string;
} = {
nan: "NaN",
number: "число",
array: "масив",
};
return (issue) => {
switch (issue.code) {
case "invalid_type": {
const expected = TypeDictionary[issue.expected] ?? issue.expected;
const receivedType = util.parsedType(issue.input);
const received = TypeDictionary[receivedType] ?? receivedType;
if (/^[A-Z]/.test(issue.expected)) {
return `Неправильні вхідні дані: очікується instanceof ${issue.expected}, отримано ${received}`;
}
return `Неправильні вхідні дані: очікується ${expected}, отримано ${received}`;
}
case "invalid_value":
if (issue.values.length === 1)
return `Неправильні вхідні дані: очікується ${util.stringifyPrimitive(issue.values[0])}`;
return `Неправильна опція: очікується одне з ${util.joinValues(issue.values, "|")}`;
case "too_big": {
const adj = issue.inclusive ? "<=" : "<";
const sizing = getSizing(issue.origin);
if (sizing)
return `Занадто велике: очікується, що ${issue.origin ?? "значення"} ${sizing.verb} ${adj}${issue.maximum.toString()} ${sizing.unit ?? "елементів"}`;
return `Занадто велике: очікується, що ${issue.origin ?? "значення"} буде ${adj}${issue.maximum.toString()}`;
}
case "too_small": {
const adj = issue.inclusive ? ">=" : ">";
const sizing = getSizing(issue.origin);
if (sizing) {
return `Занадто мале: очікується, що ${issue.origin} ${sizing.verb} ${adj}${issue.minimum.toString()} ${sizing.unit}`;
}
return `Занадто мале: очікується, що ${issue.origin} буде ${adj}${issue.minimum.toString()}`;
}
case "invalid_format": {
const _issue = issue as errors.$ZodStringFormatIssues;
if (_issue.format === "starts_with") return `Неправильний рядок: повинен починатися з "${_issue.prefix}"`;
if (_issue.format === "ends_with") return `Неправильний рядок: повинен закінчуватися на "${_issue.suffix}"`;
if (_issue.format === "includes") return `Неправильний рядок: повинен містити "${_issue.includes}"`;
if (_issue.format === "regex") return `Неправильний рядок: повинен відповідати шаблону ${_issue.pattern}`;
return `Неправильний ${FormatDictionary[_issue.format] ?? issue.format}`;
}
case "not_multiple_of":
return `Неправильне число: повинно бути кратним ${issue.divisor}`;
case "unrecognized_keys":
return `Нерозпізнаний ключ${issue.keys.length > 1 ? "і" : ""}: ${util.joinValues(issue.keys, ", ")}`;
case "invalid_key":
return `Неправильний ключ у ${issue.origin}`;
case "invalid_union":
return "Неправильні вхідні дані";
case "invalid_element":
return `Неправильне значення у ${issue.origin}`;
default:
return `Неправильні вхідні дані`;
}
};
};
export default function (): { localeError: errors.$ZodErrorMap } {
return {
localeError: error(),
};
}
@@ -0,0 +1,6 @@
export { createRequestHandler } from './createRequestHandler.js';
export type { RequestHandler } from './createRequestHandler.js';
export { defineHandlerCallback } from './handlerCallback.js';
export type { HandlerCallback } from './handlerCallback.js';
export { transformPipeableStreamWithRouter, transformStreamWithRouter, transformReadableStreamWithRouter, } from './transformStreamWithRouter.js';
export { attachRouterServerSsrUtils, getNormalizedURL, getOrigin, } from './ssr-server.js';
@@ -0,0 +1,96 @@
/**
* @license React
* use-sync-external-store-with-selector.development.js
*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
"use strict";
"production" !== process.env.NODE_ENV &&
(function () {
function is(x, y) {
return (x === y && (0 !== x || 1 / x === 1 / y)) || (x !== x && y !== y);
}
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
"function" ===
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart &&
__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
var React = require("react"),
objectIs = "function" === typeof Object.is ? Object.is : is,
useSyncExternalStore = React.useSyncExternalStore,
useRef = React.useRef,
useEffect = React.useEffect,
useMemo = React.useMemo,
useDebugValue = React.useDebugValue;
exports.useSyncExternalStoreWithSelector = function (
subscribe,
getSnapshot,
getServerSnapshot,
selector,
isEqual
) {
var instRef = useRef(null);
if (null === instRef.current) {
var inst = { hasValue: !1, value: null };
instRef.current = inst;
} else inst = instRef.current;
instRef = useMemo(
function () {
function memoizedSelector(nextSnapshot) {
if (!hasMemo) {
hasMemo = !0;
memoizedSnapshot = nextSnapshot;
nextSnapshot = selector(nextSnapshot);
if (void 0 !== isEqual && inst.hasValue) {
var currentSelection = inst.value;
if (isEqual(currentSelection, nextSnapshot))
return (memoizedSelection = currentSelection);
}
return (memoizedSelection = nextSnapshot);
}
currentSelection = memoizedSelection;
if (objectIs(memoizedSnapshot, nextSnapshot))
return currentSelection;
var nextSelection = selector(nextSnapshot);
if (void 0 !== isEqual && isEqual(currentSelection, nextSelection))
return (memoizedSnapshot = nextSnapshot), currentSelection;
memoizedSnapshot = nextSnapshot;
return (memoizedSelection = nextSelection);
}
var hasMemo = !1,
memoizedSnapshot,
memoizedSelection,
maybeGetServerSnapshot =
void 0 === getServerSnapshot ? null : getServerSnapshot;
return [
function () {
return memoizedSelector(getSnapshot());
},
null === maybeGetServerSnapshot
? void 0
: function () {
return memoizedSelector(maybeGetServerSnapshot());
}
];
},
[getSnapshot, getServerSnapshot, selector, isEqual]
);
var value = useSyncExternalStore(subscribe, instRef[0], instRef[1]);
useEffect(
function () {
inst.hasValue = !0;
inst.value = value;
},
[value]
);
useDebugValue(value);
return value;
};
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
"function" ===
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&
__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
})();
@@ -0,0 +1 @@
{"version":3,"file":"shimsWorkerd.d.cts","names":[],"sources":["../src/shimsWorkerd.ts"],"sourcesContent":[],"mappings":";;;;;;AAqBA;;;cAAa,gBAAA"}
@@ -0,0 +1,178 @@
// Generated by LiveScript 1.6.0
var Func, List, Obj, Str, Num, id, isType, replicate, prelude, toString$ = {}.toString;
Func = require('./Func.js');
List = require('./List.js');
Obj = require('./Obj.js');
Str = require('./Str.js');
Num = require('./Num.js');
id = function(x){
return x;
};
isType = curry$(function(type, x){
return toString$.call(x).slice(8, -1) === type;
});
replicate = curry$(function(n, x){
var i$, results$ = [];
for (i$ = 0; i$ < n; ++i$) {
results$.push(x);
}
return results$;
});
Str.empty = List.empty;
Str.slice = List.slice;
Str.take = List.take;
Str.drop = List.drop;
Str.splitAt = List.splitAt;
Str.takeWhile = List.takeWhile;
Str.dropWhile = List.dropWhile;
Str.span = List.span;
Str.breakStr = List.breakList;
prelude = {
Func: Func,
List: List,
Obj: Obj,
Str: Str,
Num: Num,
id: id,
isType: isType,
replicate: replicate
};
prelude.each = List.each;
prelude.map = List.map;
prelude.filter = List.filter;
prelude.compact = List.compact;
prelude.reject = List.reject;
prelude.partition = List.partition;
prelude.find = List.find;
prelude.head = List.head;
prelude.first = List.first;
prelude.tail = List.tail;
prelude.last = List.last;
prelude.initial = List.initial;
prelude.empty = List.empty;
prelude.reverse = List.reverse;
prelude.difference = List.difference;
prelude.intersection = List.intersection;
prelude.union = List.union;
prelude.countBy = List.countBy;
prelude.groupBy = List.groupBy;
prelude.fold = List.fold;
prelude.foldl = List.foldl;
prelude.fold1 = List.fold1;
prelude.foldl1 = List.foldl1;
prelude.foldr = List.foldr;
prelude.foldr1 = List.foldr1;
prelude.unfoldr = List.unfoldr;
prelude.andList = List.andList;
prelude.orList = List.orList;
prelude.any = List.any;
prelude.all = List.all;
prelude.unique = List.unique;
prelude.uniqueBy = List.uniqueBy;
prelude.sort = List.sort;
prelude.sortWith = List.sortWith;
prelude.sortBy = List.sortBy;
prelude.sum = List.sum;
prelude.product = List.product;
prelude.mean = List.mean;
prelude.average = List.average;
prelude.concat = List.concat;
prelude.concatMap = List.concatMap;
prelude.flatten = List.flatten;
prelude.maximum = List.maximum;
prelude.minimum = List.minimum;
prelude.maximumBy = List.maximumBy;
prelude.minimumBy = List.minimumBy;
prelude.scan = List.scan;
prelude.scanl = List.scanl;
prelude.scan1 = List.scan1;
prelude.scanl1 = List.scanl1;
prelude.scanr = List.scanr;
prelude.scanr1 = List.scanr1;
prelude.slice = List.slice;
prelude.take = List.take;
prelude.drop = List.drop;
prelude.splitAt = List.splitAt;
prelude.takeWhile = List.takeWhile;
prelude.dropWhile = List.dropWhile;
prelude.span = List.span;
prelude.breakList = List.breakList;
prelude.zip = List.zip;
prelude.zipWith = List.zipWith;
prelude.zipAll = List.zipAll;
prelude.zipAllWith = List.zipAllWith;
prelude.at = List.at;
prelude.elemIndex = List.elemIndex;
prelude.elemIndices = List.elemIndices;
prelude.findIndex = List.findIndex;
prelude.findIndices = List.findIndices;
prelude.apply = Func.apply;
prelude.curry = Func.curry;
prelude.flip = Func.flip;
prelude.fix = Func.fix;
prelude.over = Func.over;
prelude.split = Str.split;
prelude.join = Str.join;
prelude.lines = Str.lines;
prelude.unlines = Str.unlines;
prelude.words = Str.words;
prelude.unwords = Str.unwords;
prelude.chars = Str.chars;
prelude.unchars = Str.unchars;
prelude.repeat = Str.repeat;
prelude.capitalize = Str.capitalize;
prelude.camelize = Str.camelize;
prelude.dasherize = Str.dasherize;
prelude.values = Obj.values;
prelude.keys = Obj.keys;
prelude.pairsToObj = Obj.pairsToObj;
prelude.objToPairs = Obj.objToPairs;
prelude.listsToObj = Obj.listsToObj;
prelude.objToLists = Obj.objToLists;
prelude.max = Num.max;
prelude.min = Num.min;
prelude.negate = Num.negate;
prelude.abs = Num.abs;
prelude.signum = Num.signum;
prelude.quot = Num.quot;
prelude.rem = Num.rem;
prelude.div = Num.div;
prelude.mod = Num.mod;
prelude.recip = Num.recip;
prelude.pi = Num.pi;
prelude.tau = Num.tau;
prelude.exp = Num.exp;
prelude.sqrt = Num.sqrt;
prelude.ln = Num.ln;
prelude.pow = Num.pow;
prelude.sin = Num.sin;
prelude.tan = Num.tan;
prelude.cos = Num.cos;
prelude.acos = Num.acos;
prelude.asin = Num.asin;
prelude.atan = Num.atan;
prelude.atan2 = Num.atan2;
prelude.truncate = Num.truncate;
prelude.round = Num.round;
prelude.ceiling = Num.ceiling;
prelude.floor = Num.floor;
prelude.isItNaN = Num.isItNaN;
prelude.even = Num.even;
prelude.odd = Num.odd;
prelude.gcd = Num.gcd;
prelude.lcm = Num.lcm;
prelude.VERSION = '1.2.1';
module.exports = prelude;
function curry$(f, bound){
var context,
_curry = function(args) {
return f.length > 1 ? function(){
var params = args ? args.concat() : [];
context = bound ? context || this : this;
return params.push.apply(params, arguments) <
f.length && arguments.length ?
_curry.call(context, params) : f.apply(context, params);
} : f;
};
return _curry();
}
@@ -0,0 +1,97 @@
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
var __exportStar = (this && this.__exportStar) || function(m, exports) {
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.coerce = exports.iso = exports.ZodISODuration = exports.ZodISOTime = exports.ZodISODate = exports.ZodISODateTime = exports.locales = exports.output = exports.input = exports.deepPartial = exports.fromJSONSchema = exports.toJSONSchema = exports.getDiscriminatedOption = exports.ZodCompileUnsupportedError = exports.ZodCompileAsyncError = exports.withParser = exports.compile = exports.toZod = exports.INVALID = exports.NEVER = exports.util = exports.TimePrecision = exports.flattenError = exports.formatError = exports.prettifyError = exports.treeifyError = exports.regexes = exports.clone = exports.$brand = exports.$input = exports.$output = exports.memoizer = exports.config = exports.registry = exports.globalRegistry = exports.core = void 0;
exports.core = __importStar(require("../core/index.cjs"));
__exportStar(require("./schemas.cjs"), exports);
__exportStar(require("./checks.cjs"), exports);
__exportStar(require("./errors.cjs"), exports);
__exportStar(require("./parse.cjs"), exports);
__exportStar(require("./compat.cjs"), exports);
var index_js_1 = require("../core/index.cjs");
Object.defineProperty(exports, "globalRegistry", { enumerable: true, get: function () { return index_js_1.globalRegistry; } });
Object.defineProperty(exports, "registry", { enumerable: true, get: function () { return index_js_1.registry; } });
Object.defineProperty(exports, "config", { enumerable: true, get: function () { return index_js_1.config; } });
Object.defineProperty(exports, "memoizer", { enumerable: true, get: function () { return index_js_1.memoizer; } });
Object.defineProperty(exports, "$output", { enumerable: true, get: function () { return index_js_1.$output; } });
Object.defineProperty(exports, "$input", { enumerable: true, get: function () { return index_js_1.$input; } });
Object.defineProperty(exports, "$brand", { enumerable: true, get: function () { return index_js_1.$brand; } });
Object.defineProperty(exports, "clone", { enumerable: true, get: function () { return index_js_1.clone; } });
Object.defineProperty(exports, "regexes", { enumerable: true, get: function () { return index_js_1.regexes; } });
Object.defineProperty(exports, "treeifyError", { enumerable: true, get: function () { return index_js_1.treeifyError; } });
Object.defineProperty(exports, "prettifyError", { enumerable: true, get: function () { return index_js_1.prettifyError; } });
Object.defineProperty(exports, "formatError", { enumerable: true, get: function () { return index_js_1.formatError; } });
Object.defineProperty(exports, "flattenError", { enumerable: true, get: function () { return index_js_1.flattenError; } });
Object.defineProperty(exports, "TimePrecision", { enumerable: true, get: function () { return index_js_1.TimePrecision; } });
Object.defineProperty(exports, "util", { enumerable: true, get: function () { return index_js_1.util; } });
Object.defineProperty(exports, "NEVER", { enumerable: true, get: function () { return index_js_1.NEVER; } });
Object.defineProperty(exports, "INVALID", { enumerable: true, get: function () { return index_js_1.INVALID; } });
Object.defineProperty(exports, "toZod", { enumerable: true, get: function () { return index_js_1.toZod; } });
Object.defineProperty(exports, "compile", { enumerable: true, get: function () { return index_js_1.compile; } });
Object.defineProperty(exports, "withParser", { enumerable: true, get: function () { return index_js_1.withParser; } });
Object.defineProperty(exports, "ZodCompileAsyncError", { enumerable: true, get: function () { return index_js_1.ZodCompileAsyncError; } });
Object.defineProperty(exports, "ZodCompileUnsupportedError", { enumerable: true, get: function () { return index_js_1.ZodCompileUnsupportedError; } });
Object.defineProperty(exports, "getDiscriminatedOption", { enumerable: true, get: function () { return index_js_1.getDiscriminatedOption; } });
var json_schema_processors_js_1 = require("../core/json-schema-processors.cjs");
Object.defineProperty(exports, "toJSONSchema", { enumerable: true, get: function () { return json_schema_processors_js_1.toJSONSchema; } });
var from_json_schema_js_1 = require("./from-json-schema.cjs");
Object.defineProperty(exports, "fromJSONSchema", { enumerable: true, get: function () { return from_json_schema_js_1.fromJSONSchema; } });
var deep_partial_js_1 = require("./deep-partial.cjs");
Object.defineProperty(exports, "deepPartial", { enumerable: true, get: function () { return deep_partial_js_1.deepPartial; } });
// Types and values both, from one module — re-exporting the types from core would collide.
var in_out_js_1 = require("./in-out.cjs");
Object.defineProperty(exports, "input", { enumerable: true, get: function () { return in_out_js_1.input; } });
Object.defineProperty(exports, "output", { enumerable: true, get: function () { return in_out_js_1.output; } });
exports.locales = __importStar(require("../locales/index.cjs"));
// iso must be exported from top-level https://github.com/colinhacks/zod/issues/4491
var iso_js_1 = require("./iso.cjs");
Object.defineProperty(exports, "ZodISODateTime", { enumerable: true, get: function () { return iso_js_1.ZodISODateTime; } });
Object.defineProperty(exports, "ZodISODate", { enumerable: true, get: function () { return iso_js_1.ZodISODate; } });
Object.defineProperty(exports, "ZodISOTime", { enumerable: true, get: function () { return iso_js_1.ZodISOTime; } });
Object.defineProperty(exports, "ZodISODuration", { enumerable: true, get: function () { return iso_js_1.ZodISODuration; } });
exports.iso = __importStar(require("./iso.cjs"));
exports.coerce = __importStar(require("./coerce.cjs"));
// seal-cjs-exports
(function () {
var keys = Object.getOwnPropertyNames(exports);
for (var i = 0; i < keys.length; i++) {
var desc = Object.getOwnPropertyDescriptor(exports, keys[i]);
if (!desc || !desc.get || !desc.configurable) continue;
var value;
try {
value = desc.get();
} catch (e) {
continue;
}
// a circular require may not have settled this one yet, so leave it live
if (value === undefined) continue;
Object.defineProperty(exports, keys[i], { value: value, writable: false, enumerable: desc.enumerable, configurable: false });
}
Object.freeze(exports);
})();
@@ -0,0 +1,15 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = appendToMemberExpression;
var _index = require("../builders/generated/index.js");
function appendToMemberExpression(member, append, computed = false) {
member.object = (0, _index.memberExpression)(member.object, member.property, member.computed);
member.property = append;
member.computed = !!computed;
return member;
}
//# sourceMappingURL=appendToMemberExpression.js.map
@@ -0,0 +1,2 @@
declare const _default: () => null;
export default _default;
@@ -0,0 +1,828 @@
/**
* @fileoverview A class of the code path analyzer.
* @author Toru Nagashima
*/
"use strict";
//------------------------------------------------------------------------------
// Requirements
//------------------------------------------------------------------------------
const assert = require("../../shared/assert"),
{ breakableTypePattern } = require("../../shared/ast-utils"),
CodePath = require("./code-path"),
CodePathSegment = require("./code-path-segment"),
IdGenerator = require("./id-generator"),
debug = require("./debug-helpers");
//------------------------------------------------------------------------------
// Helpers
//------------------------------------------------------------------------------
/**
* Checks whether or not a given node is a `case` node (not `default` node).
* @param {ASTNode} node A `SwitchCase` node to check.
* @returns {boolean} `true` if the node is a `case` node (not `default` node).
*/
function isCaseNode(node) {
return Boolean(node.test);
}
/**
* Checks if a given node appears as the value of a PropertyDefinition node.
* @param {ASTNode} node THe node to check.
* @returns {boolean} `true` if the node is a PropertyDefinition value,
* false if not.
*/
function isPropertyDefinitionValue(node) {
const parent = node.parent;
return (
parent && parent.type === "PropertyDefinition" && parent.value === node
);
}
/**
* Checks whether the given logical operator is taken into account for the code
* path analysis.
* @param {string} operator The operator found in the LogicalExpression node
* @returns {boolean} `true` if the operator is "&&" or "||" or "??"
*/
function isHandledLogicalOperator(operator) {
return operator === "&&" || operator === "||" || operator === "??";
}
/**
* Checks whether the given assignment operator is a logical assignment operator.
* Logical assignments are taken into account for the code path analysis
* because of their short-circuiting semantics.
* @param {string} operator The operator found in the AssignmentExpression node
* @returns {boolean} `true` if the operator is "&&=" or "||=" or "??="
*/
function isLogicalAssignmentOperator(operator) {
return operator === "&&=" || operator === "||=" || operator === "??=";
}
/**
* Gets the label if the parent node of a given node is a LabeledStatement.
* @param {ASTNode} node A node to get.
* @returns {string|null} The label or `null`.
*/
function getLabel(node) {
if (node.parent.type === "LabeledStatement") {
return node.parent.label.name;
}
return null;
}
/**
* Checks whether or not a given logical expression node goes different path
* between the `true` case and the `false` case.
* @param {ASTNode} node A node to check.
* @returns {boolean} `true` if the node is a test of a choice statement.
*/
function isForkingByTrueOrFalse(node) {
const parent = node.parent;
switch (parent.type) {
case "ConditionalExpression":
case "IfStatement":
case "WhileStatement":
case "DoWhileStatement":
case "ForStatement":
return parent.test === node;
case "LogicalExpression":
return isHandledLogicalOperator(parent.operator);
case "AssignmentExpression":
return isLogicalAssignmentOperator(parent.operator);
default:
return false;
}
}
/**
* Gets the boolean value of a given literal node.
*
* This is used to detect infinity loops (e.g. `while (true) {}`).
* Statements preceded by an infinity loop are unreachable if the loop didn't
* have any `break` statement.
* @param {ASTNode} node A node to get.
* @returns {boolean|undefined} a boolean value if the node is a Literal node,
* otherwise `undefined`.
*/
function getBooleanValueIfSimpleConstant(node) {
if (node.type === "Literal") {
return Boolean(node.value);
}
return void 0;
}
/**
* Checks that a given identifier node is a reference or not.
*
* This is used to detect the first throwable node in a `try` block.
* @param {ASTNode} node An Identifier node to check.
* @returns {boolean} `true` if the node is a reference.
*/
function isIdentifierReference(node) {
const parent = node.parent;
switch (parent.type) {
case "LabeledStatement":
case "BreakStatement":
case "ContinueStatement":
case "ArrayPattern":
case "RestElement":
case "ImportSpecifier":
case "ImportDefaultSpecifier":
case "ImportNamespaceSpecifier":
case "CatchClause":
return false;
case "FunctionDeclaration":
case "FunctionExpression":
case "ArrowFunctionExpression":
case "ClassDeclaration":
case "ClassExpression":
case "VariableDeclarator":
return parent.id !== node;
case "Property":
case "PropertyDefinition":
case "MethodDefinition":
return parent.key !== node || parent.computed || parent.shorthand;
case "AssignmentPattern":
return parent.key !== node;
default:
return true;
}
}
/**
* Updates the current segment with the head segment.
* This is similar to local branches and tracking branches of git.
*
* To separate the current and the head is in order to not make useless segments.
*
* In this process, both "onCodePathSegmentStart" and "onCodePathSegmentEnd"
* events are fired.
* @param {CodePathAnalyzer} analyzer The instance.
* @param {ASTNode} node The current AST node.
* @returns {void}
*/
function forwardCurrentToHead(analyzer, node) {
const codePath = analyzer.codePath;
const state = CodePath.getState(codePath);
const currentSegments = state.currentSegments;
const headSegments = state.headSegments;
const end = Math.max(currentSegments.length, headSegments.length);
let i, currentSegment, headSegment;
// Fires leaving events.
for (i = 0; i < end; ++i) {
currentSegment = currentSegments[i];
headSegment = headSegments[i];
if (currentSegment !== headSegment && currentSegment) {
const eventName = currentSegment.reachable
? "onCodePathSegmentEnd"
: "onUnreachableCodePathSegmentEnd";
debug.dump(`${eventName} ${currentSegment.id}`);
analyzer.emit(eventName, [currentSegment, node]);
}
}
// Update state.
state.currentSegments = headSegments;
// Fires entering events.
for (i = 0; i < end; ++i) {
currentSegment = currentSegments[i];
headSegment = headSegments[i];
if (currentSegment !== headSegment && headSegment) {
const eventName = headSegment.reachable
? "onCodePathSegmentStart"
: "onUnreachableCodePathSegmentStart";
debug.dump(`${eventName} ${headSegment.id}`);
CodePathSegment.markUsed(headSegment);
analyzer.emit(eventName, [headSegment, node]);
}
}
}
/**
* Updates the current segment with empty.
* This is called at the last of functions or the program.
* @param {CodePathAnalyzer} analyzer The instance.
* @param {ASTNode} node The current AST node.
* @returns {void}
*/
function leaveFromCurrentSegment(analyzer, node) {
const state = CodePath.getState(analyzer.codePath);
const currentSegments = state.currentSegments;
for (let i = 0; i < currentSegments.length; ++i) {
const currentSegment = currentSegments[i];
const eventName = currentSegment.reachable
? "onCodePathSegmentEnd"
: "onUnreachableCodePathSegmentEnd";
debug.dump(`${eventName} ${currentSegment.id}`);
analyzer.emit(eventName, [currentSegment, node]);
}
state.currentSegments = [];
}
/**
* Updates the code path due to the position of a given node in the parent node
* thereof.
*
* For example, if the node is `parent.consequent`, this creates a fork from the
* current path.
* @param {CodePathAnalyzer} analyzer The instance.
* @param {ASTNode} node The current AST node.
* @returns {void}
*/
function preprocess(analyzer, node) {
const codePath = analyzer.codePath;
const state = CodePath.getState(codePath);
const parent = node.parent;
switch (parent.type) {
// The `arguments.length == 0` case is in `postprocess` function.
case "CallExpression":
if (
parent.optional === true &&
parent.arguments.length >= 1 &&
parent.arguments[0] === node
) {
state.makeOptionalRight();
}
break;
case "MemberExpression":
if (parent.optional === true && parent.property === node) {
state.makeOptionalRight();
}
break;
case "LogicalExpression":
if (
parent.right === node &&
isHandledLogicalOperator(parent.operator)
) {
state.makeLogicalRight();
}
break;
case "AssignmentExpression":
if (
parent.right === node &&
isLogicalAssignmentOperator(parent.operator)
) {
state.makeLogicalRight();
}
break;
case "ConditionalExpression":
case "IfStatement":
/*
* Fork if this node is at `consequent`/`alternate`.
* `popForkContext()` exists at `IfStatement:exit` and
* `ConditionalExpression:exit`.
*/
if (parent.consequent === node) {
state.makeIfConsequent();
} else if (parent.alternate === node) {
state.makeIfAlternate();
}
break;
case "SwitchCase":
if (parent.consequent[0] === node) {
state.makeSwitchCaseBody(false, !parent.test);
}
break;
case "TryStatement":
if (parent.handler === node) {
state.makeCatchBlock();
} else if (parent.finalizer === node) {
state.makeFinallyBlock();
}
break;
case "WhileStatement":
if (parent.test === node) {
state.makeWhileTest(getBooleanValueIfSimpleConstant(node));
} else {
assert(parent.body === node);
state.makeWhileBody();
}
break;
case "DoWhileStatement":
if (parent.body === node) {
state.makeDoWhileBody();
} else {
assert(parent.test === node);
state.makeDoWhileTest(getBooleanValueIfSimpleConstant(node));
}
break;
case "ForStatement":
if (parent.test === node) {
state.makeForTest(getBooleanValueIfSimpleConstant(node));
} else if (parent.update === node) {
state.makeForUpdate();
} else if (parent.body === node) {
state.makeForBody();
}
break;
case "ForInStatement":
case "ForOfStatement":
if (parent.left === node) {
state.makeForInOfLeft();
} else if (parent.right === node) {
state.makeForInOfRight();
} else {
assert(parent.body === node);
state.makeForInOfBody();
}
break;
case "AssignmentPattern":
/*
* Fork if this node is at `right`.
* `left` is executed always, so it uses the current path.
* `popForkContext()` exists at `AssignmentPattern:exit`.
*/
if (parent.right === node) {
state.pushForkContext();
state.forkBypassPath();
state.forkPath();
}
break;
default:
break;
}
}
/**
* Updates the code path due to the type of a given node in entering.
* @param {CodePathAnalyzer} analyzer The instance.
* @param {ASTNode} node The current AST node.
* @returns {void}
*/
function processCodePathToEnter(analyzer, node) {
let codePath = analyzer.codePath;
let state = codePath && CodePath.getState(codePath);
const parent = node.parent;
/**
* Creates a new code path and trigger the onCodePathStart event
* based on the currently selected node.
* @param {string} origin The reason the code path was started.
* @returns {void}
*/
function startCodePath(origin) {
if (codePath) {
// Emits onCodePathSegmentStart events if updated.
forwardCurrentToHead(analyzer, node);
debug.dumpState(node, state, false);
}
// Create the code path of this scope.
codePath = analyzer.codePath = new CodePath({
id: analyzer.idGenerator.next(),
origin,
upper: codePath,
onLooped: analyzer.onLooped,
});
state = CodePath.getState(codePath);
// Emits onCodePathStart events.
debug.dump(`onCodePathStart ${codePath.id}`);
analyzer.emit("onCodePathStart", [codePath, node]);
}
/*
* Special case: The right side of class field initializer is considered
* to be its own function, so we need to start a new code path in this
* case.
*/
if (isPropertyDefinitionValue(node)) {
startCodePath("class-field-initializer");
/*
* Intentional fall through because `node` needs to also be
* processed by the code below. For example, if we have:
*
* class Foo {
* a = () => {}
* }
*
* In this case, we also need start a second code path.
*/
}
switch (node.type) {
case "Program":
startCodePath("program");
break;
case "FunctionDeclaration":
case "FunctionExpression":
case "ArrowFunctionExpression":
startCodePath("function");
break;
case "StaticBlock":
startCodePath("class-static-block");
break;
case "ChainExpression":
state.pushChainContext();
break;
case "CallExpression":
if (node.optional === true) {
state.makeOptionalNode();
}
break;
case "MemberExpression":
if (node.optional === true) {
state.makeOptionalNode();
}
break;
case "LogicalExpression":
if (isHandledLogicalOperator(node.operator)) {
state.pushChoiceContext(
node.operator,
isForkingByTrueOrFalse(node),
);
}
break;
case "AssignmentExpression":
if (isLogicalAssignmentOperator(node.operator)) {
state.pushChoiceContext(
node.operator.slice(0, -1), // removes `=` from the end
isForkingByTrueOrFalse(node),
);
}
break;
case "ConditionalExpression":
case "IfStatement":
state.pushChoiceContext("test", false);
break;
case "SwitchStatement":
state.pushSwitchContext(
node.cases.some(isCaseNode),
getLabel(node),
);
break;
case "TryStatement":
state.pushTryContext(Boolean(node.finalizer));
break;
case "SwitchCase":
/*
* Fork if this node is after the 2st node in `cases`.
* It's similar to `else` blocks.
* The next `test` node is processed in this path.
*/
if (parent.discriminant !== node && parent.cases[0] !== node) {
state.forkPath();
}
break;
case "WhileStatement":
case "DoWhileStatement":
case "ForStatement":
case "ForInStatement":
case "ForOfStatement":
state.pushLoopContext(node.type, getLabel(node));
break;
case "LabeledStatement":
if (!breakableTypePattern.test(node.body.type)) {
state.pushBreakContext(false, node.label.name);
}
break;
default:
break;
}
// Emits onCodePathSegmentStart events if updated.
forwardCurrentToHead(analyzer, node);
debug.dumpState(node, state, false);
}
/**
* Updates the code path due to the type of a given node in leaving.
* @param {CodePathAnalyzer} analyzer The instance.
* @param {ASTNode} node The current AST node.
* @returns {void}
*/
function processCodePathToExit(analyzer, node) {
const codePath = analyzer.codePath;
const state = CodePath.getState(codePath);
let dontForward = false;
switch (node.type) {
case "ChainExpression":
state.popChainContext();
break;
case "IfStatement":
case "ConditionalExpression":
state.popChoiceContext();
break;
case "LogicalExpression":
if (isHandledLogicalOperator(node.operator)) {
state.popChoiceContext();
}
break;
case "AssignmentExpression":
if (isLogicalAssignmentOperator(node.operator)) {
state.popChoiceContext();
}
break;
case "SwitchStatement":
state.popSwitchContext();
break;
case "SwitchCase":
/*
* This is the same as the process at the 1st `consequent` node in
* `preprocess` function.
* Must do if this `consequent` is empty.
*/
if (node.consequent.length === 0) {
state.makeSwitchCaseBody(true, !node.test);
}
if (state.forkContext.reachable) {
dontForward = true;
}
break;
case "TryStatement":
state.popTryContext();
break;
case "BreakStatement":
forwardCurrentToHead(analyzer, node);
state.makeBreak(node.label && node.label.name);
dontForward = true;
break;
case "ContinueStatement":
forwardCurrentToHead(analyzer, node);
state.makeContinue(node.label && node.label.name);
dontForward = true;
break;
case "ReturnStatement":
forwardCurrentToHead(analyzer, node);
state.makeReturn();
dontForward = true;
break;
case "ThrowStatement":
forwardCurrentToHead(analyzer, node);
state.makeThrow();
dontForward = true;
break;
case "Identifier":
if (isIdentifierReference(node)) {
state.makeFirstThrowablePathInTryBlock();
dontForward = true;
}
break;
case "CallExpression":
case "ImportExpression":
case "MemberExpression":
case "NewExpression":
case "YieldExpression":
state.makeFirstThrowablePathInTryBlock();
break;
case "WhileStatement":
case "DoWhileStatement":
case "ForStatement":
case "ForInStatement":
case "ForOfStatement":
state.popLoopContext();
break;
case "AssignmentPattern":
state.popForkContext();
break;
case "LabeledStatement":
if (!breakableTypePattern.test(node.body.type)) {
state.popBreakContext();
}
break;
default:
break;
}
// Emits onCodePathSegmentStart events if updated.
if (!dontForward) {
forwardCurrentToHead(analyzer, node);
}
debug.dumpState(node, state, true);
}
/**
* Updates the code path to finalize the current code path.
* @param {CodePathAnalyzer} analyzer The instance.
* @param {ASTNode} node The current AST node.
* @returns {void}
*/
function postprocess(analyzer, node) {
/**
* Ends the code path for the current node.
* @returns {void}
*/
function endCodePath() {
let codePath = analyzer.codePath;
// Mark the current path as the final node.
CodePath.getState(codePath).makeFinal();
// Emits onCodePathSegmentEnd event of the current segments.
leaveFromCurrentSegment(analyzer, node);
// Emits onCodePathEnd event of this code path.
debug.dump(`onCodePathEnd ${codePath.id}`);
analyzer.emit("onCodePathEnd", [codePath, node]);
debug.dumpDot(codePath);
codePath = analyzer.codePath = analyzer.codePath.upper;
if (codePath) {
debug.dumpState(node, CodePath.getState(codePath), true);
}
}
switch (node.type) {
case "Program":
case "FunctionDeclaration":
case "FunctionExpression":
case "ArrowFunctionExpression":
case "StaticBlock": {
endCodePath();
break;
}
// The `arguments.length >= 1` case is in `preprocess` function.
case "CallExpression":
if (node.optional === true && node.arguments.length === 0) {
CodePath.getState(analyzer.codePath).makeOptionalRight();
}
break;
default:
break;
}
/*
* Special case: The right side of class field initializer is considered
* to be its own function, so we need to end a code path in this
* case.
*
* We need to check after the other checks in order to close the
* code paths in the correct order for code like this:
*
*
* class Foo {
* a = () => {}
* }
*
* In this case, The ArrowFunctionExpression code path is closed first
* and then we need to close the code path for the PropertyDefinition
* value.
*/
if (isPropertyDefinitionValue(node)) {
endCodePath();
}
}
//------------------------------------------------------------------------------
// Public Interface
//------------------------------------------------------------------------------
/**
* The class to analyze code paths.
* This class implements the EventGenerator interface.
*/
class CodePathAnalyzer {
/**
* @param {EventGenerator} eventGenerator An event generator to wrap.
*/
constructor(eventGenerator) {
this.original = eventGenerator;
this.emit = eventGenerator.emit;
this.codePath = null;
this.idGenerator = new IdGenerator("s");
this.currentNode = null;
this.onLooped = this.onLooped.bind(this);
}
/**
* Does the process to enter a given AST node.
* This updates state of analysis and calls `enterNode` of the wrapped.
* @param {ASTNode} node A node which is entering.
* @returns {void}
*/
enterNode(node) {
this.currentNode = node;
// Updates the code path due to node's position in its parent node.
if (node.parent) {
preprocess(this, node);
}
/*
* Updates the code path.
* And emits onCodePathStart/onCodePathSegmentStart events.
*/
processCodePathToEnter(this, node);
// Emits node events.
this.original.enterNode(node);
this.currentNode = null;
}
/**
* Does the process to leave a given AST node.
* This updates state of analysis and calls `leaveNode` of the wrapped.
* @param {ASTNode} node A node which is leaving.
* @returns {void}
*/
leaveNode(node) {
this.currentNode = node;
/*
* Updates the code path.
* And emits onCodePathStart/onCodePathSegmentStart events.
*/
processCodePathToExit(this, node);
// Emits node events.
this.original.leaveNode(node);
// Emits the last onCodePathStart/onCodePathSegmentStart events.
postprocess(this, node);
this.currentNode = null;
}
/**
* This is called on a code path looped.
* Then this raises a looped event.
* @param {CodePathSegment} fromSegment A segment of prev.
* @param {CodePathSegment} toSegment A segment of next.
* @returns {void}
*/
onLooped(fromSegment, toSegment) {
if (fromSegment.reachable && toSegment.reachable) {
debug.dump(
`onCodePathSegmentLoop ${fromSegment.id} -> ${toSegment.id}`,
);
this.emit("onCodePathSegmentLoop", [
fromSegment,
toSegment,
this.currentNode,
]);
}
}
}
module.exports = CodePathAnalyzer;
@@ -0,0 +1 @@
{"version":3,"file":"file-lock.js","sources":["../../../src/icons/file-lock.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name FileLock\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMTUgMkg2YTIgMiAwIDAgMC0yIDJ2MTZhMiAyIDAgMCAwIDIgMmgxMmEyIDIgMCAwIDAgMi0yVjdaIiAvPgogIDxyZWN0IHdpZHRoPSI4IiBoZWlnaHQ9IjYiIHg9IjgiIHk9IjEyIiByeD0iMSIgLz4KICA8cGF0aCBkPSJNMTAgMTJ2LTJhMiAyIDAgMSAxIDQgMHYyIiAvPgo8L3N2Zz4K) - https://lucide.dev/icons/file-lock\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst FileLock = createLucideIcon('FileLock', [\n ['path', { d: 'M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z', key: '1rqfz7' }],\n ['rect', { width: '8', height: '6', x: '8', y: '12', rx: '1', key: '3yr8at' }],\n ['path', { d: 'M10 12v-2a2 2 0 1 1 4 0v2', key: 'j4i8d' }],\n]);\n\nexport default FileLock;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAW,iBAAiB,UAAY,CAAA,CAAA,CAAA;AAAA,CAAA,CAC5C,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAA8D,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CAC3F,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAO,KAAK,CAAQ,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,CAAG,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,GAAG,CAAM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAI,CAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CAC7E,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAA6B,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,SAAS,CAAA;AAC3D,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1,704 @@
import { describe, expect, expectTypeOf, test } from "vitest";
import * as z from "zod/v4";
const isoDateCodec = z.codec(
z.iso.datetime(), // Input: ISO string (validates to string)
z.date(), // Output: Date object
{
decode: (isoString) => new Date(isoString), // Forward: ISO string → Date
encode: (date) => date.toISOString(), // Backward: Date → ISO string
}
);
test("instanceof", () => {
expect(isoDateCodec instanceof z.ZodCodec).toBe(true);
expect(isoDateCodec instanceof z.ZodPipe).toBe(true);
expect(isoDateCodec instanceof z.ZodType).toBe(true);
expect(isoDateCodec instanceof z.core.$ZodCodec).toBe(true);
expect(isoDateCodec instanceof z.core.$ZodPipe).toBe(true);
expect(isoDateCodec instanceof z.core.$ZodType).toBe(true);
expectTypeOf(isoDateCodec.def).toEqualTypeOf<z.core.$ZodCodecDef<z.ZodISODateTime, z.ZodDate>>();
});
test("codec basic functionality", () => {
// ISO string -> Date codec using z.iso.datetime() for input validation
const testIsoString = "2024-01-15T10:30:00.000Z";
const testDate = new Date("2024-01-15T10:30:00.000Z");
// Forward decoding (ISO string -> Date)
const decodedResult = z.decode(isoDateCodec, testIsoString);
expect(decodedResult).toBeInstanceOf(Date);
expect(decodedResult.toISOString()).toMatchInlineSnapshot(`"2024-01-15T10:30:00.000Z"`);
// Backward encoding (Date -> ISO string)
const encodedResult = z.encode(isoDateCodec, testDate);
expect(typeof encodedResult).toBe("string");
expect(encodedResult).toMatchInlineSnapshot(`"2024-01-15T10:30:00.000Z"`);
});
test("codec round trip", () => {
const isoDateCodec = z.codec(z.iso.datetime(), z.date(), {
decode: (isoString) => new Date(isoString),
encode: (date) => date.toISOString(),
});
const original = "2024-12-25T15:45:30.123Z";
const toDate = z.decode(isoDateCodec, original);
const backToString = z.encode(isoDateCodec, toDate);
expect(backToString).toMatchInlineSnapshot(`"2024-12-25T15:45:30.123Z"`);
expect(toDate).toBeInstanceOf(Date);
expect(toDate.getTime()).toMatchInlineSnapshot(`1735141530123`);
});
test("codec with refinement", () => {
const isoDateCodec = z
.codec(z.iso.datetime(), z.date(), {
decode: (isoString) => new Date(isoString),
encode: (date) => date.toISOString(),
})
.refine((val) => val.getFullYear() === 2024, { error: "Year must be 2024" });
// Valid 2024 date
const validDate = z.decode(isoDateCodec, "2024-01-15T10:30:00.000Z");
expect(validDate.getFullYear()).toMatchInlineSnapshot(`2024`);
expect(validDate.getTime()).toMatchInlineSnapshot(`1705314600000`);
// Invalid year should fail safely
const invalidYearResult = z.safeDecode(isoDateCodec, "2023-01-15T10:30:00.000Z");
expect(invalidYearResult.success).toBe(false);
if (!invalidYearResult.success) {
expect(invalidYearResult.error.issues).toMatchInlineSnapshot(`
[
{
"code": "custom",
"message": "Year must be 2024",
"path": [],
},
]
`);
}
});
test("safe codec operations", () => {
const isoDateCodec = z.codec(z.iso.datetime(), z.date(), {
decode: (isoString) => new Date(isoString),
encode: (date) => date.toISOString(),
});
// Safe decode with invalid input
const safeDecodeResult = z.safeDecode(isoDateCodec, "invalid-date");
expect(safeDecodeResult.success).toBe(false);
if (!safeDecodeResult.success) {
expect(safeDecodeResult.error.issues).toMatchInlineSnapshot(`
[
{
"code": "invalid_format",
"format": "datetime",
"message": "Invalid ISO datetime",
"origin": "string",
"path": [],
"pattern": "/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$/",
},
]
`);
}
// Safe decode with valid input
const safeDecodeValid = z.safeDecode(isoDateCodec, "2024-01-15T10:30:00.000Z");
expect(safeDecodeValid.success).toBe(true);
if (safeDecodeValid.success) {
expect(safeDecodeValid.data).toBeInstanceOf(Date);
expect(safeDecodeValid.data.getTime()).toMatchInlineSnapshot(`1705314600000`);
}
// Safe encode with valid input
const safeEncodeResult = z.safeEncode(isoDateCodec, new Date("2024-01-01"));
expect(safeEncodeResult.success).toBe(true);
if (safeEncodeResult.success) {
expect(safeEncodeResult.data).toMatchInlineSnapshot(`"2024-01-01T00:00:00.000Z"`);
}
});
test("codec with different types", () => {
// String -> Number codec
const stringNumberCodec = z.codec(z.string(), z.number(), {
decode: (str) => Number.parseFloat(str),
encode: (num) => num.toString(),
});
const decodedNumber = z.decode(stringNumberCodec, "42.5");
expect(decodedNumber).toMatchInlineSnapshot(`42.5`);
expect(typeof decodedNumber).toBe("number");
const encodedString = z.encode(stringNumberCodec, 42.5);
expect(encodedString).toMatchInlineSnapshot(`"42.5"`);
expect(typeof encodedString).toBe("string");
});
test("async codec operations", async () => {
const isoDateCodec = z.codec(z.iso.datetime(), z.date(), {
decode: (isoString) => new Date(isoString),
encode: (date) => date.toISOString(),
});
// Async decode
const decodedResult = await z.decodeAsync(isoDateCodec, "2024-01-15T10:30:00.000Z");
expect(decodedResult).toBeInstanceOf(Date);
expect(decodedResult.getTime()).toMatchInlineSnapshot(`1705314600000`);
// Async encode
const encodedResult = await z.encodeAsync(isoDateCodec, new Date("2024-01-15T10:30:00.000Z"));
expect(typeof encodedResult).toBe("string");
expect(encodedResult).toMatchInlineSnapshot(`"2024-01-15T10:30:00.000Z"`);
// Safe async operations
const safeDecodeResult = await z.safeDecodeAsync(isoDateCodec, "2024-01-15T10:30:00.000Z");
expect(safeDecodeResult.success).toBe(true);
if (safeDecodeResult.success) {
expect(safeDecodeResult.data.getTime()).toMatchInlineSnapshot(`1705314600000`);
}
const safeEncodeResult = await z.safeEncodeAsync(isoDateCodec, new Date("2024-01-15T10:30:00.000Z"));
expect(safeEncodeResult.success).toBe(true);
if (safeEncodeResult.success) {
expect(safeEncodeResult.data).toMatchInlineSnapshot(`"2024-01-15T10:30:00.000Z"`);
}
});
test("codec type inference", () => {
const codec = z.codec(z.string(), z.number(), {
decode: (str) => Number.parseInt(str),
encode: (num) => num.toString(),
});
// These should compile without type errors
const decoded: number = z.decode(codec, "123");
const encoded: string = z.encode(codec, 123);
expect(decoded).toMatchInlineSnapshot(`123`);
expect(encoded).toMatchInlineSnapshot(`"123"`);
});
test("nested codec with object containing codec property", () => {
// Nested schema: object containing a codec as one of its properties, with refinements at all levels
const waypointSchema = z
.object({
name: z.string().min(1, "Waypoint name required"),
difficulty: z.enum(["easy", "medium", "hard"]),
coordinate: z
.codec(
z
.string()
.regex(/^-?\d+,-?\d+$/, "Must be 'x,y' format"), // Input: coordinate string
z
.object({ x: z.number(), y: z.number() })
.refine((coord) => coord.x >= 0 && coord.y >= 0, { error: "Coordinates must be non-negative" }), // Output: coordinate object
{
decode: (coordString: string) => {
const [x, y] = coordString.split(",").map(Number);
return { x, y };
},
encode: (coord: { x: number; y: number }) => `${coord.x},${coord.y}`,
}
)
.refine((coord) => coord.x <= 1000 && coord.y <= 1000, { error: "Coordinates must be within bounds" }),
})
.refine((waypoint) => waypoint.difficulty !== "hard" || waypoint.coordinate.x >= 100, {
error: "Hard waypoints must be at least 100 units from origin",
});
// Test data
const inputWaypoint = {
name: "Summit Point",
difficulty: "medium" as const,
coordinate: "150,200",
};
// Forward decoding (object with string coordinate -> object with coordinate object)
const decodedWaypoint = z.decode(waypointSchema, inputWaypoint);
expect(decodedWaypoint).toMatchInlineSnapshot(`
{
"coordinate": {
"x": 150,
"y": 200,
},
"difficulty": "medium",
"name": "Summit Point",
}
`);
// Backward encoding (object with coordinate object -> object with string coordinate)
const encodedWaypoint = z.encode(waypointSchema, decodedWaypoint);
expect(encodedWaypoint).toMatchInlineSnapshot(`
{
"coordinate": "150,200",
"difficulty": "medium",
"name": "Summit Point",
}
`);
// Test refinements at all levels
// String validation (empty waypoint name)
const emptyNameResult = z.safeDecode(waypointSchema, {
name: "",
difficulty: "easy",
coordinate: "10,20",
});
expect(emptyNameResult.success).toBe(false);
if (!emptyNameResult.success) {
expect(emptyNameResult.error.issues).toMatchInlineSnapshot(`
[
{
"code": "too_small",
"inclusive": true,
"message": "Waypoint name required",
"minimum": 1,
"origin": "string",
"path": [
"name",
],
},
]
`);
}
// Enum validation (invalid difficulty)
const invalidDifficultyResult = z.safeDecode(waypointSchema, {
name: "Test Point",
difficulty: "impossible" as any,
coordinate: "10,20",
});
expect(invalidDifficultyResult.success).toBe(false);
if (!invalidDifficultyResult.success) {
expect(invalidDifficultyResult.error.issues).toMatchInlineSnapshot(`
[
{
"code": "invalid_value",
"message": "Invalid option: expected one of "easy"|"medium"|"hard"",
"path": [
"difficulty",
],
"values": [
"easy",
"medium",
"hard",
],
},
]
`);
}
// Codec string format validation (invalid coordinate format)
const invalidFormatResult = z.safeDecode(waypointSchema, {
name: "Test Point",
difficulty: "easy",
coordinate: "invalid",
});
expect(invalidFormatResult.success).toBe(false);
if (!invalidFormatResult.success) {
expect(invalidFormatResult.error.issues).toMatchInlineSnapshot(`
[
{
"code": "invalid_format",
"format": "regex",
"message": "Must be 'x,y' format",
"origin": "string",
"path": [
"coordinate",
],
"pattern": "/^-?\\d+,-?\\d+$/",
},
]
`);
}
// Codec object refinement (negative coordinates)
const negativeCoordResult = z.safeDecode(waypointSchema, {
name: "Test Point",
difficulty: "easy",
coordinate: "-5,10",
});
expect(negativeCoordResult.success).toBe(false);
if (!negativeCoordResult.success) {
expect(negativeCoordResult.error.issues).toMatchInlineSnapshot(`
[
{
"code": "custom",
"message": "Coordinates must be non-negative",
"path": [
"coordinate",
],
},
]
`);
}
// Codec-level refinement (coordinates out of bounds)
const outOfBoundsResult = z.safeDecode(waypointSchema, {
name: "Test Point",
difficulty: "easy",
coordinate: "1500,2000",
});
expect(outOfBoundsResult.success).toBe(false);
if (!outOfBoundsResult.success) {
expect(outOfBoundsResult.error.issues).toMatchInlineSnapshot(`
[
{
"code": "custom",
"message": "Coordinates must be within bounds",
"path": [
"coordinate",
],
},
]
`);
}
// Object-level refinement (hard waypoint too close to origin)
const hardWaypointResult = z.safeDecode(waypointSchema, {
name: "Expert Point",
difficulty: "hard",
coordinate: "50,60", // x < 100, but hard waypoints need x >= 100
});
expect(hardWaypointResult.success).toBe(false);
if (!hardWaypointResult.success) {
expect(hardWaypointResult.error.issues).toMatchInlineSnapshot(`
[
{
"code": "custom",
"message": "Hard waypoints must be at least 100 units from origin",
"path": [],
},
]
`);
}
// Round trip test
const roundTripResult = z.encode(waypointSchema, z.decode(waypointSchema, inputWaypoint));
expect(roundTripResult).toMatchInlineSnapshot(`
{
"coordinate": "150,200",
"difficulty": "medium",
"name": "Summit Point",
}
`);
});
test("mutating refinements", () => {
const A = z.codec(z.string(), z.string().trim(), {
decode: (val) => val,
encode: (val) => val,
});
expect(z.decode(A, " asdf ")).toMatchInlineSnapshot(`"asdf"`);
expect(z.encode(A, " asdf ")).toMatchInlineSnapshot(`"asdf"`);
const B = z
.codec(z.string(), z.string(), {
decode: (val) => val,
encode: (val) => val,
})
.check(z.trim(), z.maxLength(4));
expect(z.decode(B, " asdf ")).toMatchInlineSnapshot(`"asdf"`);
expect(z.encode(B, " asdf ")).toMatchInlineSnapshot(`"asdf"`);
});
test("codec type enforcement - correct encode/decode signatures", () => {
// Test that codec functions have correct type signatures
const stringToNumberCodec = z.codec(z.string(), z.number(), {
decode: (value: string) => Number(value), // core.output<A> -> core.input<B>
encode: (value: number) => String(value), // core.input<B> -> core.output<A>
});
// These should compile without errors - correct types (async support)
expectTypeOf<(value: string, payload: z.core.ParsePayload<string>) => z.core.util.MaybeAsync<number>>(
stringToNumberCodec.def.transform
).toBeFunction();
expectTypeOf<(value: number, payload: z.core.ParsePayload<number>) => z.core.util.MaybeAsync<string>>(
stringToNumberCodec.def.reverseTransform
).toBeFunction();
// Test that decode parameter type is core.output<A> (string)
const validDecode = (value: string) => Number(value);
expectTypeOf(validDecode).toMatchTypeOf<(value: string) => number>();
// Test that encode parameter type is core.input<B> (number)
const validEncode = (value: number) => String(value);
expectTypeOf(validEncode).toMatchTypeOf<(value: number) => string>();
z.codec(z.string(), z.number(), {
// @ts-expect-error - decode should NOT accept core.input<A> as parameter
decode: (value: never, _payload) => Number(value), // Wrong: should be string, not unknown
encode: (value: number, _payload) => String(value),
});
z.codec(z.string(), z.number(), {
decode: (value: string) => Number(value),
// @ts-expect-error - encode should NOT accept core.output<B> as parameter
encode: (value: never) => String(value), // Wrong: should be number, not unknown
});
z.codec(z.string(), z.number(), {
// @ts-expect-error - decode return type should be core.input<B>
decode: (value: string) => String(value), // Wrong: should return number, not string
encode: (value: number) => String(value),
});
z.codec(z.string(), z.number(), {
decode: (value: string) => Number(value),
// @ts-expect-error - encode return type should be core.output<A>
encode: (value: number) => Number(value), // Wrong: should return string, not number
});
});
test("codec type enforcement - complex types", () => {
type User = { id: number; name: string };
type UserInput = { id: string; name: string };
const userCodec = z.codec(
z.object({ id: z.string(), name: z.string() }),
z.object({ id: z.number(), name: z.string() }),
{
decode: (input: UserInput) => ({ id: Number(input.id), name: input.name }),
encode: (user: User) => ({ id: String(user.id), name: user.name }),
}
);
// Verify correct types are inferred (async support)
expectTypeOf<(input: UserInput, payload: z.core.ParsePayload<UserInput>) => z.core.util.MaybeAsync<User>>(
userCodec.def.transform
).toBeFunction();
expectTypeOf<(user: User, payload: z.core.ParsePayload<User>) => z.core.util.MaybeAsync<UserInput>>(
userCodec.def.reverseTransform
).toBeFunction();
z.codec(
z.object({
id: z.string(),
name: z.string(),
}),
z.object({ id: z.number(), name: z.string() }),
{
// @ts-expect-error - decode parameter should be UserInput, not User
decode: (input: User) => ({ id: Number(input.id), name: input.name }), // Wrong type
encode: (user: User) => ({ id: String(user.id), name: user.name }),
}
);
z.codec(
z.object({
id: z.string(),
name: z.string(),
}),
z.object({ id: z.number(), name: z.string() }),
{
decode: (input: UserInput) => ({ id: Number(input.id), name: input.name }),
// @ts-expect-error - encode parameter should be User, not UserInput
encode: (user: UserInput) => ({ id: String(user.id), name: user.name }), // Wrong type
}
);
});
test("codec with overwrites", () => {
const stringPlusA = z.string().overwrite((val) => val + "a");
const A = z
.codec(stringPlusA, stringPlusA, {
decode: (val) => val,
encode: (val) => val,
})
.overwrite((val) => val + "a");
expect(z.decode(A, "")).toEqual("aaa");
expect(z.encode(A, "")).toEqual("aaa");
// @ts-expect-error
expect(z.safeEncode(A, Symbol("a"))).toMatchInlineSnapshot(`
{
"error": [ZodError: [
{
"expected": "string",
"code": "invalid_type",
"path": [],
"message": "Invalid input: expected string, received symbol"
}
]],
"success": false,
}
`);
});
test("async codec functionality", async () => {
// Test that async encode/decode functions work properly
const asyncCodec = z.codec(z.string(), z.number(), {
decode: async (str) => {
await new Promise((resolve) => setTimeout(resolve, 1)); // Simulate async work
return Number.parseFloat(str);
},
encode: async (num) => {
await new Promise((resolve) => setTimeout(resolve, 1)); // Simulate async work
return num.toString();
},
});
// Test async decode/encode
const decoded = await z.decodeAsync(asyncCodec, "42.5");
expect(decoded).toBe(42.5);
const encoded = await z.encodeAsync(asyncCodec, 42.5);
expect(encoded).toBe("42.5");
// Test that both sync and async work
const mixedCodec = z.codec(z.string(), z.number(), {
decode: async (str) => Number.parseFloat(str),
encode: (num) => num.toString(), // sync encode
});
const mixedResult = await z.decodeAsync(mixedCodec, "123");
expect(mixedResult).toBe(123);
});
test("invertCodec basic", () => {
const inverted = z.invertCodec(isoDateCodec);
const testDate = new Date("2024-01-15T10:30:00.000Z");
const decoded = z.decode(inverted, testDate);
expect(typeof decoded).toBe("string");
expect(decoded).toBe("2024-01-15T10:30:00.000Z");
const encoded = z.encode(inverted, "2024-01-15T10:30:00.000Z");
expect(encoded).toBeInstanceOf(Date);
expect(encoded.toISOString()).toBe("2024-01-15T10:30:00.000Z");
});
test("invertCodec round trip", () => {
const inverted = z.invertCodec(isoDateCodec);
const testDate = new Date("2024-06-01T12:00:00.000Z");
const toStr = z.decode(inverted, testDate);
const backToDate = z.encode(inverted, toStr);
expect(backToDate.toISOString()).toBe(testDate.toISOString());
});
test("invertCodec types", () => {
const inverted = z.invertCodec(isoDateCodec);
type InvIn = z.input<typeof inverted>;
type InvOut = z.output<typeof inverted>;
expectTypeOf<InvIn>().toEqualTypeOf<Date>();
expectTypeOf<InvOut>().toEqualTypeOf<string>();
});
test("invertCodec is its own inverse", () => {
const doubleInverted = z.invertCodec(z.invertCodec(isoDateCodec));
const testIsoString = "2024-03-10T08:00:00.000Z";
const decoded = z.decode(doubleInverted, testIsoString);
expect(decoded).toBeInstanceOf(Date);
expect(decoded.toISOString()).toBe(testIsoString);
const encoded = z.encode(doubleInverted, decoded);
expect(encoded).toBe(testIsoString);
});
test("invertCodec with custom codec", () => {
const intToString = z.codec(z.int(), z.string().regex(/^\d+$/), {
decode: (num) => num.toString(),
encode: (str) => Number.parseInt(str, 10),
});
const stringToInt = z.invertCodec(intToString);
const result = z.decode(stringToInt, "42");
expect(result).toBe(42);
const back = z.encode(stringToInt, 42);
expect(back).toBe("42");
});
describe("context immutability", () => {
test("decode/encode", () => {
const stringToDateCodec = z.codec(z.iso.datetime(), z.date(), {
decode: (isoString) => new Date(isoString),
encode: (date) => date.toISOString(),
});
const ctx = { reportInput: true } as const;
const result1 = z.decode(stringToDateCodec, "2024-01-15T10:30:00.000Z", ctx);
expect(result1).toBeInstanceOf(Date);
expect(ctx).toEqual({ reportInput: true });
expect("async" in ctx).toBe(false);
expect("direction" in ctx).toBe(false);
const result2 = z.decode(stringToDateCodec, "2024-12-25T15:45:30.123Z", ctx);
expect(result2).toBeInstanceOf(Date);
expect(ctx).toEqual({ reportInput: true });
expect("async" in ctx).toBe(false);
expect("direction" in ctx).toBe(false);
z.encode(stringToDateCodec, new Date("2024-01-01T00:00:00.000Z"), ctx);
expect(ctx).toEqual({ reportInput: true });
expect("direction" in ctx).toBe(false);
z.safeEncode(stringToDateCodec, new Date("2024-01-01T00:00:00.000Z"), ctx);
expect(ctx).toEqual({ reportInput: true });
expect("direction" in ctx).toBe(false);
});
test("parse functions", () => {
const schema = z.string().min(1);
const ctx = { reportInput: true } as const;
z.parse(schema, "asdf", ctx);
expect(ctx).toEqual({ reportInput: true });
expect("async" in ctx).toBe(false);
z.safeParse(schema, "asdf", ctx);
expect(ctx).toEqual({ reportInput: true });
expect("async" in ctx).toBe(false);
});
test("async functions", async () => {
const stringToDateCodec = z.codec(z.iso.datetime(), z.date(), {
decode: (isoString) => new Date(isoString),
encode: (date) => date.toISOString(),
});
const ctx = { reportInput: true } as const;
const schema = z.string();
await z.parseAsync(schema, "asdf", ctx);
expect(ctx).toEqual({ reportInput: true });
expect("async" in ctx).toBe(false);
await z.safeParseAsync(schema, "asdf", ctx);
expect(ctx).toEqual({ reportInput: true });
expect("async" in ctx).toBe(false);
await z.decodeAsync(stringToDateCodec, "2024-01-15T10:30:00.000Z", ctx);
expect(ctx).toEqual({ reportInput: true });
expect("async" in ctx).toBe(false);
expect("direction" in ctx).toBe(false);
await z.encodeAsync(stringToDateCodec, new Date("2024-01-01T00:00:00.000Z"), ctx);
expect(ctx).toEqual({ reportInput: true });
expect("async" in ctx).toBe(false);
expect("direction" in ctx).toBe(false);
await z.safeDecodeAsync(stringToDateCodec, "2024-01-15T10:30:00.000Z", ctx);
expect(ctx).toEqual({ reportInput: true });
expect("async" in ctx).toBe(false);
expect("direction" in ctx).toBe(false);
await z.safeEncodeAsync(stringToDateCodec, new Date("2024-01-01T00:00:00.000Z"), ctx);
expect(ctx).toEqual({ reportInput: true });
expect("async" in ctx).toBe(false);
expect("direction" in ctx).toBe(false);
});
});
@@ -0,0 +1,21 @@
'use strict';
const extend = (listToExtend, list) =>
// eslint-disable-next-line prefer-spread
listToExtend.push.apply(listToExtend, list);
// sort on i primary, j secondary
const sorted = matches => matches.sort((m1, m2) => m1.i - m2.i || m1.j - m2.j);
const buildRankedDictionary = orderedList => {
const result = {};
let counter = 1; // rank starts at 1, not 0
orderedList.forEach(word => {
result[word] = counter;
counter += 1;
});
return result;
};
exports.buildRankedDictionary = buildRankedDictionary;
exports.extend = extend;
exports.sorted = sorted;
//# sourceMappingURL=helper.cjs.map
@@ -0,0 +1,558 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.Referencer = void 0;
const types_1 = require("@typescript-eslint/types");
const assert_1 = require("../assert");
const definition_1 = require("../definition");
const lib_1 = require("../lib");
const ClassVisitor_1 = require("./ClassVisitor");
const ExportVisitor_1 = require("./ExportVisitor");
const ImportVisitor_1 = require("./ImportVisitor");
const PatternVisitor_1 = require("./PatternVisitor");
const Reference_1 = require("./Reference");
const TypeVisitor_1 = require("./TypeVisitor");
const Visitor_1 = require("./Visitor");
// Referencing variables and creating bindings.
class Referencer extends Visitor_1.Visitor {
#hasReferencedJsxFactory = false;
#hasReferencedJsxFragmentFactory = false;
#jsxFragmentName;
#jsxPragma;
#lib;
scopeManager;
constructor(options, scopeManager) {
super(options);
this.scopeManager = scopeManager;
this.#jsxPragma = options.jsxPragma;
this.#jsxFragmentName = options.jsxFragmentName;
this.#lib = options.lib;
}
populateGlobalsFromLib(globalScope) {
const libs = this.resolveLibDefinitions();
for (const lib of libs) {
for (const [name, variable] of lib.variables) {
globalScope.defineImplicitVariable(name, variable);
}
}
// Special implicit global for const assertions (`{} as const`, `<const>{}`)
globalScope.defineImplicitVariable('const', {
eslintImplicitGlobalSetting: 'readonly',
isTypeVariable: true,
isValueVariable: false,
});
}
/**
* Resolves lib names into a deduplicated set of LibDefinitions,
* including all transitive dependencies.
*/
resolveLibDefinitions() {
const resolvedLibs = new Set();
// Resolve the top-level lib names into LibDefinition objects
for (const lib of this.#lib) {
const definition = lib_1.lib.get(lib);
if (!definition) {
throw new Error(`Invalid value for lib provided: ${lib}`);
}
resolvedLibs.add(definition);
}
// Expand transitive lib dependencies.
// New entries added to the Set during iteration will be visited exactly once.
for (const lib of resolvedLibs) {
for (const dependency of lib.libs) {
resolvedLibs.add(dependency);
}
}
return resolvedLibs;
}
close(node) {
while (this.currentScope(true) && node === this.currentScope().block) {
this.scopeManager.currentScope = this.currentScope().close(this.scopeManager);
}
}
currentScope(dontThrowOnNull) {
if (!dontThrowOnNull) {
(0, assert_1.assert)(this.scopeManager.currentScope, 'Expected currentScope to exist. This usually happens when analyze() is called with an incomplete AST node instead of a complete Program node.');
}
return this.scopeManager.currentScope;
}
referencingDefaultValue(pattern, assignments, maybeImplicitGlobal, init) {
assignments.forEach(assignment => {
this.currentScope().referenceValue(pattern, Reference_1.ReferenceFlag.Write, assignment.right, maybeImplicitGlobal, init);
});
}
/**
* Searches for a variable named "name" in the upper scopes and adds a pseudo-reference from itself to itself
*/
referenceInSomeUpperScope(name) {
let scope = this.scopeManager.currentScope;
while (scope) {
const variable = scope.set.get(name);
if (!variable) {
scope = scope.upper;
continue;
}
scope.referenceValue(variable.identifiers[0]);
return true;
}
return false;
}
referenceJsxFragment() {
if (this.#jsxFragmentName == null ||
this.#hasReferencedJsxFragmentFactory) {
return;
}
this.#hasReferencedJsxFragmentFactory = this.referenceInSomeUpperScope(this.#jsxFragmentName);
}
referenceJsxPragma() {
if (this.#jsxPragma == null || this.#hasReferencedJsxFactory) {
return;
}
this.#hasReferencedJsxFactory = this.referenceInSomeUpperScope(this.#jsxPragma);
}
///////////////////
// Visit helpers //
///////////////////
visitClass(node) {
ClassVisitor_1.ClassVisitor.visit(this, node);
}
visitForIn(node) {
if (node.left.type === types_1.AST_NODE_TYPES.VariableDeclaration &&
node.left.kind !== 'var') {
this.scopeManager.nestForScope(node);
}
if (node.left.type === types_1.AST_NODE_TYPES.VariableDeclaration) {
this.visit(node.left);
this.visitPattern(node.left.declarations[0].id, pattern => {
this.currentScope().referenceValue(pattern, Reference_1.ReferenceFlag.Write, node.right, null, true);
});
}
else {
this.visitPattern(node.left, (pattern, info) => {
const maybeImplicitGlobal = !this.currentScope().isStrict
? {
node,
pattern,
}
: null;
this.referencingDefaultValue(pattern, info.assignments, maybeImplicitGlobal, false);
this.currentScope().referenceValue(pattern, Reference_1.ReferenceFlag.Write, node.right, maybeImplicitGlobal, false);
}, { processRightHandNodes: true });
}
this.visit(node.right);
this.visit(node.body);
this.close(node);
}
visitFunction(node) {
// FunctionDeclaration name is defined in upper scope
// NOTE: Not referring variableScope. It is intended.
// Since
// in ES5, FunctionDeclaration should be in FunctionBody.
// in ES6, FunctionDeclaration should be block scoped.
if (node.type === types_1.AST_NODE_TYPES.FunctionExpression) {
if (node.id) {
// FunctionExpression with name creates its special scope;
// FunctionExpressionNameScope.
this.scopeManager.nestFunctionExpressionNameScope(node);
}
}
else if (node.id) {
// id is defined in upper scope
this.currentScope().defineIdentifier(node.id, new definition_1.FunctionNameDefinition(node.id, node));
}
// Consider this function is in the MethodDefinition.
this.scopeManager.nestFunctionScope(node, false);
// Process parameter declarations.
for (const param of node.params) {
this.visitPattern(param, (pattern, info) => {
this.currentScope().defineIdentifier(pattern, new definition_1.ParameterDefinition(pattern, node, info.rest));
this.referencingDefaultValue(pattern, info.assignments, null, true);
}, { processRightHandNodes: true });
this.visitFunctionParameterTypeAnnotation(param);
param.decorators.forEach(d => this.visit(d));
}
this.visitType(node.returnType);
this.visitType(node.typeParameters);
// In TypeScript there are a number of function-like constructs which have no body,
// so check it exists before traversing
if (node.body) {
// Skip BlockStatement to prevent creating BlockStatement scope.
if (node.body.type === types_1.AST_NODE_TYPES.BlockStatement) {
this.visitChildren(node.body);
}
else {
this.visit(node.body);
}
}
this.close(node);
}
visitFunctionParameterTypeAnnotation(node) {
switch (node.type) {
case types_1.AST_NODE_TYPES.AssignmentPattern:
this.visitType(node.left.typeAnnotation);
break;
case types_1.AST_NODE_TYPES.TSParameterProperty:
this.visitFunctionParameterTypeAnnotation(node.parameter);
break;
default:
this.visitType(node.typeAnnotation);
break;
}
}
visitJSXElement(node) {
if (node.name.type === types_1.AST_NODE_TYPES.JSXIdentifier) {
if (node.name.name[0].toUpperCase() === node.name.name[0] ||
node.name.name === 'this') {
// lower cased component names are always treated as "intrinsic" names, and are converted to a string,
// not a variable by JSX transforms:
// <div /> => React.createElement("div", null)
// the only case we want to visit a lower-cased component has its name as "this",
this.visit(node.name);
}
}
else {
this.visit(node.name);
}
}
visitProperty(node) {
if (node.computed) {
this.visit(node.key);
}
this.visit(node.value);
}
visitType(node) {
if (!node) {
return;
}
TypeVisitor_1.TypeVisitor.visit(this, node);
}
visitTypeAssertion(node) {
this.visit(node.expression);
this.visitType(node.typeAnnotation);
}
/////////////////////
// Visit selectors //
/////////////////////
ArrowFunctionExpression(node) {
this.visitFunction(node);
}
AssignmentExpression(node) {
const left = this.visitExpressionTarget(node.left);
if (PatternVisitor_1.PatternVisitor.isPattern(left)) {
if (node.operator === '=') {
this.visitPattern(left, (pattern, info) => {
const maybeImplicitGlobal = !this.currentScope().isStrict
? {
node,
pattern,
}
: null;
this.referencingDefaultValue(pattern, info.assignments, maybeImplicitGlobal, false);
this.currentScope().referenceValue(pattern, Reference_1.ReferenceFlag.Write, node.right, maybeImplicitGlobal, false);
}, { processRightHandNodes: true });
}
else if (left.type === types_1.AST_NODE_TYPES.Identifier) {
this.currentScope().referenceValue(left, Reference_1.ReferenceFlag.ReadWrite, node.right);
}
}
else {
this.visit(left);
}
this.visit(node.right);
}
BlockStatement(node) {
this.scopeManager.nestBlockScope(node);
this.visitChildren(node);
this.close(node);
}
BreakStatement() {
// don't reference the break statement's label
}
CallExpression(node) {
this.visitChildren(node, ['typeArguments']);
this.visitType(node.typeArguments);
}
CatchClause(node) {
this.scopeManager.nestCatchScope(node);
if (node.param) {
this.visitPattern(node.param, (pattern, info) => {
this.currentScope().defineIdentifier(pattern, new definition_1.CatchClauseDefinition(pattern, node));
this.referencingDefaultValue(pattern, info.assignments, null, true);
}, { processRightHandNodes: true });
}
this.visit(node.body);
this.close(node);
}
ClassDeclaration(node) {
this.visitClass(node);
}
ClassExpression(node) {
this.visitClass(node);
}
ContinueStatement() {
// don't reference the continue statement's label
}
ExportAllDeclaration() {
// this defines no local variables
}
ExportDefaultDeclaration(node) {
if (node.declaration.type === types_1.AST_NODE_TYPES.Identifier) {
ExportVisitor_1.ExportVisitor.visit(this, node);
}
else {
this.visit(node.declaration);
}
}
ExportNamedDeclaration(node) {
if (node.declaration) {
this.visit(node.declaration);
}
else {
ExportVisitor_1.ExportVisitor.visit(this, node);
}
}
ForInStatement(node) {
this.visitForIn(node);
}
ForOfStatement(node) {
this.visitForIn(node);
}
ForStatement(node) {
// Create ForStatement declaration.
// NOTE: In ES6, ForStatement dynamically generates per iteration environment. However, this is
// a static analyzer, we only generate one scope for ForStatement.
if (node.init?.type === types_1.AST_NODE_TYPES.VariableDeclaration &&
node.init.kind !== 'var') {
this.scopeManager.nestForScope(node);
}
this.visitChildren(node);
this.close(node);
}
FunctionDeclaration(node) {
this.visitFunction(node);
}
FunctionExpression(node) {
this.visitFunction(node);
}
Identifier(node) {
this.currentScope().referenceValue(node);
this.visitType(node.typeAnnotation);
}
ImportAttribute() {
// import assertions are module metadata and thus have no variables to reference
}
ImportDeclaration(node) {
(0, assert_1.assert)(this.scopeManager.isModule(), 'ImportDeclaration should appear when the mode is ES6 and in the module context.');
ImportVisitor_1.ImportVisitor.visit(this, node);
}
JSXAttribute(node) {
this.visit(node.value);
}
JSXClosingElement(node) {
this.visitJSXElement(node);
}
JSXFragment(node) {
this.referenceJsxPragma();
this.referenceJsxFragment();
this.visitChildren(node);
}
JSXIdentifier(node) {
this.currentScope().referenceValue(node);
}
JSXMemberExpression(node) {
if (node.object.type !== types_1.AST_NODE_TYPES.JSXIdentifier ||
node.object.name !== 'this') {
this.visit(node.object);
}
// we don't ever reference the property as it's always going to be a property on the thing
}
JSXOpeningElement(node) {
this.referenceJsxPragma();
this.visitJSXElement(node);
this.visitType(node.typeArguments);
for (const attr of node.attributes) {
this.visit(attr);
}
}
LabeledStatement(node) {
this.visit(node.body);
}
MemberExpression(node) {
this.visit(node.object);
if (node.computed) {
this.visit(node.property);
}
}
MetaProperty() {
// meta properties all builtin globals
}
NewExpression(node) {
this.visitChildren(node, ['typeArguments']);
this.visitType(node.typeArguments);
}
PrivateIdentifier() {
// private identifiers are members on classes and thus have no variables to reference
}
Program(node) {
const globalScope = this.scopeManager.nestGlobalScope(node);
this.populateGlobalsFromLib(globalScope);
if (this.scopeManager.isGlobalReturn()) {
// Force strictness of GlobalScope to false when using node.js scope.
this.currentScope().isStrict = false;
this.scopeManager.nestFunctionScope(node, false);
}
if (this.scopeManager.isModule()) {
this.scopeManager.nestModuleScope(node);
}
if (this.scopeManager.isImpliedStrict()) {
this.currentScope().isStrict = true;
}
this.visitChildren(node);
this.close(node);
}
Property(node) {
this.visitProperty(node);
}
SwitchStatement(node) {
this.visit(node.discriminant);
this.scopeManager.nestSwitchScope(node);
for (const switchCase of node.cases) {
this.visit(switchCase);
}
this.close(node);
}
TaggedTemplateExpression(node) {
this.visit(node.tag);
this.visit(node.quasi);
this.visitType(node.typeArguments);
}
TSAsExpression(node) {
this.visitTypeAssertion(node);
}
TSDeclareFunction(node) {
this.visitFunction(node);
}
TSEmptyBodyFunctionExpression(node) {
this.visitFunction(node);
}
TSEnumDeclaration(node) {
this.currentScope().defineIdentifier(node.id, new definition_1.TSEnumNameDefinition(node.id, node));
// enum members can be referenced within the enum body
this.scopeManager.nestTSEnumScope(node);
for (const member of node.body.members) {
// TS resolves literal named members to be actual names
// enum Foo {
// 'a' = 1,
// b = a, // this references the 'a' member
// }
if (member.id.type === types_1.AST_NODE_TYPES.Literal &&
typeof member.id.value === 'string') {
const name = member.id;
this.currentScope().defineLiteralIdentifier(name, new definition_1.TSEnumMemberDefinition(name, member));
}
else if (member.id.type === types_1.AST_NODE_TYPES.Identifier) {
this.currentScope().defineIdentifier(member.id, new definition_1.TSEnumMemberDefinition(member.id, member));
}
this.visit(member.initializer);
}
this.close(node);
}
TSExportAssignment(node) {
if (node.expression.type === types_1.AST_NODE_TYPES.Identifier) {
// this is a special case - you can `export = T` where `T` is a type OR a
// value however `T[U]` is illegal when `T` is a type and `T.U` is illegal
// when `T.U` is a type
// i.e. if the expression is JUST an Identifier - it could be either ref
// kind; otherwise the standard rules apply
this.currentScope().referenceDualValueType(node.expression);
}
else {
this.visit(node.expression);
}
}
TSImportEqualsDeclaration(node) {
this.currentScope().defineIdentifier(node.id, new definition_1.ImportBindingDefinition(node.id, node, node));
if (node.moduleReference.type === types_1.AST_NODE_TYPES.TSQualifiedName) {
let moduleIdentifier = node.moduleReference.left;
while (moduleIdentifier.type === types_1.AST_NODE_TYPES.TSQualifiedName) {
moduleIdentifier = moduleIdentifier.left;
}
this.visit(moduleIdentifier);
}
else {
this.visit(node.moduleReference);
}
}
TSInstantiationExpression(node) {
this.visitChildren(node, ['typeArguments']);
this.visitType(node.typeArguments);
}
TSInterfaceDeclaration(node) {
this.visitType(node);
}
TSModuleDeclaration(node) {
if (node.id.type === types_1.AST_NODE_TYPES.Identifier && node.kind !== 'global') {
this.currentScope().defineIdentifier(node.id, new definition_1.TSModuleNameDefinition(node.id, node));
}
this.scopeManager.nestTSModuleScope(node);
this.visit(node.body);
this.close(node);
}
TSSatisfiesExpression(node) {
this.visitTypeAssertion(node);
}
TSTypeAliasDeclaration(node) {
this.visitType(node);
}
TSTypeAssertion(node) {
this.visitTypeAssertion(node);
}
UpdateExpression(node) {
const argument = this.visitExpressionTarget(node.argument);
if (PatternVisitor_1.PatternVisitor.isPattern(argument)) {
this.visitPattern(argument, pattern => {
this.currentScope().referenceValue(pattern, Reference_1.ReferenceFlag.ReadWrite, null);
});
}
else {
this.visitChildren(node);
}
}
VariableDeclaration(node) {
const variableTargetScope = node.kind === 'var'
? this.currentScope().variableScope
: this.currentScope();
for (const decl of node.declarations) {
const init = decl.init;
this.visitPattern(decl.id, (pattern, info) => {
variableTargetScope.defineIdentifier(pattern, new definition_1.VariableDefinition(pattern, decl, node));
this.referencingDefaultValue(pattern, info.assignments, null, true);
if (init) {
this.currentScope().referenceValue(pattern, Reference_1.ReferenceFlag.Write, init, null, true);
}
}, { processRightHandNodes: true });
this.visit(decl.init);
this.visitType(decl.id.typeAnnotation);
}
}
WithStatement(node) {
this.visit(node.object);
// Then nest scope for WithStatement.
this.scopeManager.nestWithScope(node);
this.visit(node.body);
this.close(node);
}
visitExpressionTarget(left) {
switch (left.type) {
case types_1.AST_NODE_TYPES.TSAsExpression:
case types_1.AST_NODE_TYPES.TSTypeAssertion:
// explicitly visit the type annotation
this.visitType(left.typeAnnotation);
// intentional fallthrough
case types_1.AST_NODE_TYPES.TSNonNullExpression:
// unwrap the expression
left = left.expression;
}
return left;
}
}
exports.Referencer = Referencer;
@@ -0,0 +1,27 @@
{
"name": "scheduler",
"version": "0.27.0",
"description": "Cooperative scheduler for the browser environment.",
"repository": {
"type": "git",
"url": "https://github.com/facebook/react.git",
"directory": "packages/scheduler"
},
"license": "MIT",
"keywords": [
"react"
],
"bugs": {
"url": "https://github.com/facebook/react/issues"
},
"homepage": "https://react.dev/",
"files": [
"LICENSE",
"README.md",
"index.js",
"index.native.js",
"unstable_mock.js",
"unstable_post_task.js",
"cjs/"
]
}
@@ -0,0 +1,624 @@
flf2a$ 6 5 12 -1 11 0 7999 0
Author : LG Beard
Date : 2006/7/3 23:58:25
Version: 1.0
-------------------------------------------------
-------------------------------------------------
This font has been created using JavE's FIGlet font export assistant.
Have a look at: http://www.jave.de
Permission is hereby given to modify this font, as long as the
modifier's name is placed on a comment line.
$ #
$ #
$ #
$ #
$ #
$ ##
_ #
| | #
| | #
| | #
(_) #
##
"#
#
#
#
#
##
_ _ #
\ \\ \ _ #
[\ \\ \_] #
[_\ \\ \] #
\_\\_\ #
##
_ #
_.-./ \ #
[/ _ \ |] #
|_\`._/ #
#
##
_ #
_ / / #
(_)/ /_ #
/ /(_) #
/_/ #
##
&#
#
#
#
#
##
_ #
|_| #
#
#
#
##
__ #
/ _| #
/ / #
\ \_ #
\__| #
##
__ #
|_ \ #
\ \ #
_/ / #
|__/ #
##
*#
#
#
#
#
##
_ #
_| |_ #
|_ _| #
|_| #
#
##
#
#
#
_ #
)_/ #
##
#
____ #
[____] #
#
#
##
#
#
_ #
(_) #
#
##
_ #
/ / #
/ / #
/ / #
/_/ #
##
_____ #
.' ___ '. #
| (___) | #
'._____.' #
#
##
_ _ #
| /___\ | #
\______ | #
/_| #
#
##
_ __ #
| /_.`_ | #
\ .'| | #
`-` |_| #
#
##
_ _ #
/ \ \ \ #
| //\_| | #
\_______/ #
#
##
__ #
/_ | #
//_||__ #
/__ __| #
|_| #
##
__ _ #
| `._\ | #
| |`. / #
|_| '-' #
#
##
_______ #
|__ ___ \ #
| \_/ | #
`,___,` #
#
##
_ #
/ \ #
| /_____ #
\ ______/ #
#
##
__ __ #
.' '' '.#
| () () |#
'.__..__.'#
#
##
__ #
.` _`. #
| /_\|__ #
\_______| #
#
##
_ #
(_) #
#
_ #
(_) #
##
_ #
(_) #
#
_ #
)_/ #
##
<#
#
#
#
#
##
____ #
[____] #
____ #
[____] #
#
##
>#
#
#
#
#
##
__ #
.`__/ #
/_'-. #
|_| #
(_) #
##
@#
#
#
#
#
##
______ #
.` _ ._| #
\ \_||_ #
`._____| #
#
##
_______ #
| | #
| o v o | #
'._.'._.' #
#
##
_______ #
/ _____ \ #
| \ / | #
\_/ \_/ #
#
##
_______ #
| ___ | #
| '._.' | #
'._____.' #
#
##
_______ #
| ._ _. | #
| \ v / | #
|_/ \_| #
#
##
_______ #
| _ ___| #
| ||_\ #
|_/ #
#
##
_______ #
/ .---. \ #
| \ .-`_/ #
\_/ |.` #
#
##
_______ #
\__ __\ #
__| |__ #
\_______\ #
#
##
_ _ #
| |___| | #
| ___ | #
|_| |_| #
#
##
_ __ #
| /___\ \ #
| ______/ #
|_\ #
#
##
_______ #
|_ _| #
.` _ `. #
|_.` `._| #
#
##
_______ #
/______ \ #
/ | #
\_| #
#
##
_______ #
`._ __| #
_< <__ #
/_______| #
#
##
_______ #
`._ __| #
_`. `._ #
|_______| #
#
##
_______ #
/ ____ \ #
| /___/ | #
\_______/ #
#
##
_______ #
/ ___ __| #
| \_/ | #
`.___.` #
#
##
_______ #
/ ____ \#
| \___\ |#
\_____\_(#
#
##
_______ #
/ ___ _| #
| \_/ \ #
`.__.`\_| #
#
##
__ #
.-. \ \ #
/ _ \_\ | #
|_\`.___/ #
#
##
_ #
| /_____ #
| ______/ #
|_\ #
#
##
______ #
/_____ `. #
_____\ | #
\______.` #
#
##
_____ #
`-.___ \ #
____.` | #
/______/ #
#
##
_______ #
`._ __| #
_> >__ #
.`______| #
#
##
_ _ #
\_'._.'_/ #
_> _ <_ #
/_.' '._\ #
#
##
_ #
|_`.____ #
.` .___| #
|_.` #
#
##
_ _ #
| | .` | #
| |.`_. | #
|__.` |_| #
#
##
___ #
| _| #
| | #
| |_ #
|___| #
##
_ #
\ \ #
\ \ #
\ \ #
\_\ #
##
___ #
|_ | #
| | #
_| | #
|___| #
##
__ #
/ \ #
/_/\_\ #
#
#
##
#
#
#
#
________ #
[________]##
__ #
\_\ #
#
#
#
##
______ #
.` _ ._| #
\ \_||_ #
`._____| #
#
##
_______ #
| | #
| o v o | #
'._.'._.' #
#
##
_______ #
/ _____ \ #
| \ / | #
\_/ \_/ #
#
##
_______ #
| ___ | #
| '._.' | #
'._____.' #
#
##
_______ #
| ._ _. | #
| \ v / | #
|_/ \_| #
#
##
_______ #
| _ ___| #
| ||_\ #
|_/ #
#
##
_______ #
/ .---. \ #
| \ .-`_/ #
\_/ |.` #
#
##
_______ #
\__ __\ #
__| |__ #
\_______\ #
#
##
_ _ #
| |___| | #
| ___ | #
|_| |_| #
#
##
_ __ #
| /___\ \ #
| ______/ #
|_\ #
#
##
_______ #
|_ _| #
.` _ `. #
|_.` `._| #
#
##
_______ #
/______ \ #
/ | #
\_| #
#
##
_______ #
`._ __| #
_< <__ #
/_______| #
#
##
_______ #
`._ __| #
_`. `._ #
|_______| #
#
##
_______ #
/ ____ \ #
| /___/ | #
\_______/ #
#
##
_______ #
/ ___ __| #
| \_/ | #
`.___.` #
#
##
_______ #
/ ____ \#
| \___\ |#
\_____\_(#
#
##
_______ #
/ ___ _| #
| \_/ \ #
`.__.`\_| #
#
##
__ #
.-. \ \ #
/ _ \_\ | #
|_\`.___/ #
#
##
_ #
| /_____ #
| ______/ #
|_\ #
#
##
______ #
/_____ `. #
_____\ | #
\______.` #
#
##
_____ #
`-.___ \ #
____.` | #
/______/ #
#
##
_______ #
`._ __| #
_> >__ #
.`______| #
#
##
_ _ #
\_'._.'_/ #
_> _ <_ #
/_.' '._\ #
#
##
_ #
|_`.____ #
.` .___| #
|_.` #
#
##
_ _ #
| | .` | #
| |.`_. | #
|__.` |_| #
#
##
___ #
| _| #
/ | #
\ |_ #
|___| #
##
_ #
| | #
| | #
| | #
|_| #
##
___ #
|_ | #
| \ #
_| / #
|___| #
##
~#
#
#
#
#
##
______ #
.` _ ._| #
\ \_||_ #
`._____| #
#
##
_______ #
/ ____ \ #
| /___/ | #
\_______/ #
#
##
______ #
/_____ `. #
_____\ | #
\______.` #
#
##
______ #
.` _ ._| #
\ \_||_ #
`._____| #
#
##
_______ #
/ ____ \ #
| /___/ | #
\_______/ #
#
##
______ #
/_____ `. #
_____\ | #
\______.` #
#
##
ß#
#
#
#
#
##
@@ -0,0 +1,3 @@
import type { TSESTree } from '@typescript-eslint/utils';
import type { SourceCode } from '@typescript-eslint/utils/ts-eslint';
export declare function getTextWithParentheses(sourceCode: Readonly<SourceCode>, node: TSESTree.Node): string;
@@ -0,0 +1,99 @@
{
"name": "tsup",
"version": "8.5.1",
"description": "Bundle your TypeScript library with no config, powered by esbuild",
"license": "MIT",
"homepage": "https://tsup.egoist.dev/",
"repository": {
"type": "git",
"url": "https://github.com/egoist/tsup.git"
},
"author": "EGOIST",
"files": [
"/assets",
"/dist",
"/schema.json"
],
"main": "dist/index.js",
"types": "dist/index.d.ts",
"bin": {
"tsup": "dist/cli-default.js",
"tsup-node": "dist/cli-node.js"
},
"peerDependencies": {
"@microsoft/api-extractor": "^7.36.0",
"@swc/core": "^1",
"postcss": "^8.4.12",
"typescript": ">=4.5.0"
},
"peerDependenciesMeta": {
"@microsoft/api-extractor": {
"optional": true
},
"@swc/core": {
"optional": true
},
"postcss": {
"optional": true
},
"typescript": {
"optional": true
}
},
"dependencies": {
"bundle-require": "^5.1.0",
"cac": "^6.7.14",
"chokidar": "^4.0.3",
"consola": "^3.4.0",
"debug": "^4.4.0",
"esbuild": "^0.27.0",
"fix-dts-default-cjs-exports": "^1.0.0",
"joycon": "^3.1.1",
"picocolors": "^1.1.1",
"postcss-load-config": "^6.0.1",
"resolve-from": "^5.0.0",
"rollup": "^4.34.8",
"source-map": "^0.7.6",
"sucrase": "^3.35.0",
"tinyexec": "^0.3.2",
"tinyglobby": "^0.2.11",
"tree-kill": "^1.2.2"
},
"devDependencies": {
"@microsoft/api-extractor": "^7.50.0",
"@rollup/plugin-json": "6.1.0",
"@swc/core": "1.10.18",
"@types/debug": "4.1.12",
"@types/node": "22.13.4",
"@types/resolve": "1.20.6",
"bumpp": "^10.0.3",
"flat": "6.0.1",
"postcss": "8.5.2",
"postcss-simple-vars": "7.0.1",
"prettier": "3.5.1",
"resolve": "1.22.10",
"rollup-plugin-dts": "6.1.1",
"sass": "1.85.0",
"strip-json-comments": "5.0.1",
"svelte": "5.19.9",
"svelte-preprocess": "6.0.3",
"terser": "^5.39.0",
"ts-essentials": "10.0.4",
"tsup": "8.3.6",
"typescript": "5.7.3",
"vitest": "3.0.6",
"wait-for-expect": "3.0.2"
},
"engines": {
"node": ">=18"
},
"scripts": {
"dev": "pnpm run build-fast --watch",
"build": "tsup src/cli-*.ts src/index.ts src/rollup.ts --clean --splitting",
"test": "pnpm run build && pnpm run test-only",
"format": "prettier --write .",
"test-only": "vitest run",
"build-fast": "pnpm run build --no-dts",
"release": "bumpp"
}
}
@@ -0,0 +1 @@
{"version":3,"file":"client.js","sources":["../../src/render/components/motion/create.ts","../../src/render/components/motion/elements.ts"],"sourcesContent":["import { createMotionComponent, MotionComponentOptions } from \"../../../motion\"\nimport { createDomVisualElement } from \"../../dom/create-visual-element\"\nimport { DOMMotionComponents } from \"../../dom/types\"\nimport { CreateVisualElement } from \"../../types\"\nimport { featureBundle } from \"./feature-bundle\"\n\nexport function createMotionComponentWithFeatures<\n Props,\n TagName extends keyof DOMMotionComponents | string = \"div\"\n>(\n Component: TagName | string | React.ComponentType<Props>,\n options?: MotionComponentOptions\n) {\n return createMotionComponent(\n Component,\n options,\n featureBundle,\n createDomVisualElement as CreateVisualElement<Props, TagName>\n )\n}\n","\"use client\"\n\nimport { createMotionComponentWithFeatures as createMotionComponent } from \"./create\"\n\n/**\n * HTML components\n */\nexport const MotionA = /*@__PURE__*/ createMotionComponent(\"a\")\nexport const MotionAbbr = /*@__PURE__*/ createMotionComponent(\"abbr\")\nexport const MotionAddress = /*@__PURE__*/ createMotionComponent(\"address\")\nexport const MotionArea = /*@__PURE__*/ createMotionComponent(\"area\")\nexport const MotionArticle = /*@__PURE__*/ createMotionComponent(\"article\")\nexport const MotionAside = /*@__PURE__*/ createMotionComponent(\"aside\")\nexport const MotionAudio = /*@__PURE__*/ createMotionComponent(\"audio\")\nexport const MotionB = /*@__PURE__*/ createMotionComponent(\"b\")\nexport const MotionBase = /*@__PURE__*/ createMotionComponent(\"base\")\nexport const MotionBdi = /*@__PURE__*/ createMotionComponent(\"bdi\")\nexport const MotionBdo = /*@__PURE__*/ createMotionComponent(\"bdo\")\nexport const MotionBig = /*@__PURE__*/ createMotionComponent(\"big\")\nexport const MotionBlockquote =\n /*@__PURE__*/ createMotionComponent(\"blockquote\")\nexport const MotionBody = /*@__PURE__*/ createMotionComponent(\"body\")\nexport const MotionButton = /*@__PURE__*/ createMotionComponent(\"button\")\nexport const MotionCanvas = /*@__PURE__*/ createMotionComponent(\"canvas\")\nexport const MotionCaption = /*@__PURE__*/ createMotionComponent(\"caption\")\nexport const MotionCite = /*@__PURE__*/ createMotionComponent(\"cite\")\nexport const MotionCode = /*@__PURE__*/ createMotionComponent(\"code\")\nexport const MotionCol = /*@__PURE__*/ createMotionComponent(\"col\")\nexport const MotionColgroup = /*@__PURE__*/ createMotionComponent(\"colgroup\")\nexport const MotionData = /*@__PURE__*/ createMotionComponent(\"data\")\nexport const MotionDatalist = /*@__PURE__*/ createMotionComponent(\"datalist\")\nexport const MotionDd = /*@__PURE__*/ createMotionComponent(\"dd\")\nexport const MotionDel = /*@__PURE__*/ createMotionComponent(\"del\")\nexport const MotionDetails = /*@__PURE__*/ createMotionComponent(\"details\")\nexport const MotionDfn = /*@__PURE__*/ createMotionComponent(\"dfn\")\nexport const MotionDialog = /*@__PURE__*/ createMotionComponent(\"dialog\")\nexport const MotionDiv = /*@__PURE__*/ createMotionComponent(\"div\")\nexport const MotionDl = /*@__PURE__*/ createMotionComponent(\"dl\")\nexport const MotionDt = /*@__PURE__*/ createMotionComponent(\"dt\")\nexport const MotionEm = /*@__PURE__*/ createMotionComponent(\"em\")\nexport const MotionEmbed = /*@__PURE__*/ createMotionComponent(\"embed\")\nexport const MotionFieldset = /*@__PURE__*/ createMotionComponent(\"fieldset\")\nexport const MotionFigcaption =\n /*@__PURE__*/ createMotionComponent(\"figcaption\")\nexport const MotionFigure = /*@__PURE__*/ createMotionComponent(\"figure\")\nexport const MotionFooter = /*@__PURE__*/ createMotionComponent(\"footer\")\nexport const MotionForm = /*@__PURE__*/ createMotionComponent(\"form\")\nexport const MotionH1 = /*@__PURE__*/ createMotionComponent(\"h1\")\nexport const MotionH2 = /*@__PURE__*/ createMotionComponent(\"h2\")\nexport const MotionH3 = /*@__PURE__*/ createMotionComponent(\"h3\")\nexport const MotionH4 = /*@__PURE__*/ createMotionComponent(\"h4\")\nexport const MotionH5 = /*@__PURE__*/ createMotionComponent(\"h5\")\nexport const MotionH6 = /*@__PURE__*/ createMotionComponent(\"h6\")\nexport const MotionHead = /*@__PURE__*/ createMotionComponent(\"head\")\nexport const MotionHeader = /*@__PURE__*/ createMotionComponent(\"header\")\nexport const MotionHgroup = /*@__PURE__*/ createMotionComponent(\"hgroup\")\nexport const MotionHr = /*@__PURE__*/ createMotionComponent(\"hr\")\nexport const MotionHtml = /*@__PURE__*/ createMotionComponent(\"html\")\nexport const MotionI = /*@__PURE__*/ createMotionComponent(\"i\")\nexport const MotionIframe = /*@__PURE__*/ createMotionComponent(\"iframe\")\nexport const MotionImg = /*@__PURE__*/ createMotionComponent(\"img\")\nexport const MotionInput = /*@__PURE__*/ createMotionComponent(\"input\")\nexport const MotionIns = /*@__PURE__*/ creatLine truncated
@@ -0,0 +1,28 @@
Copyright (c) 2009-2011, Mozilla Foundation and contributors
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
* Neither the names of the Mozilla Foundation nor the names of project
contributors may be used to endorse or promote products derived from this
software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
@@ -0,0 +1,31 @@
const rxEscapable =
// eslint-disable-next-line no-control-regex, no-misleading-character-class
/[\\"\u0000-\u001f\u007f-\u009f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g
const escaped: {[K in string]?: string} = {
"\b": "\\b",
"\t": "\\t",
"\n": "\\n",
"\f": "\\f",
"\r": "\\r",
'"': '\\"',
"\\": "\\\\",
}
export default function quote(s: string): string {
rxEscapable.lastIndex = 0
return (
'"' +
(rxEscapable.test(s)
? s.replace(rxEscapable, (a) => {
const c = escaped[a]
return typeof c === "string"
? c
: "\\u" + ("0000" + a.charCodeAt(0).toString(16)).slice(-4)
})
: s) +
'"'
)
}
quote.code = 'require("ajv/dist/runtime/quote").default'
@@ -0,0 +1,68 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const utils_1 = require("@typescript-eslint/utils");
const util_1 = require("../util");
exports.default = (0, util_1.createRule)({
name: 'default-param-last',
meta: {
type: 'suggestion',
docs: {
description: 'Enforce default parameters to be last',
extendsBaseRule: true,
frozen: true,
},
messages: {
shouldBeLast: 'Default parameters should be last.',
},
schema: [],
},
defaultOptions: [],
create(context) {
/**
* checks if node is optional parameter
* @param node the node to be evaluated
* @private
*/
function isOptionalParam(node) {
return ((node.type === utils_1.AST_NODE_TYPES.ArrayPattern ||
node.type === utils_1.AST_NODE_TYPES.AssignmentPattern ||
node.type === utils_1.AST_NODE_TYPES.Identifier ||
node.type === utils_1.AST_NODE_TYPES.ObjectPattern ||
node.type === utils_1.AST_NODE_TYPES.RestElement) &&
node.optional);
}
/**
* checks if node is plain parameter
* @param node the node to be evaluated
* @private
*/
function isPlainParam(node) {
return !(node.type === utils_1.AST_NODE_TYPES.AssignmentPattern ||
node.type === utils_1.AST_NODE_TYPES.RestElement ||
isOptionalParam(node));
}
function checkDefaultParamLast(node) {
let hasSeenPlainParam = false;
for (let i = node.params.length - 1; i >= 0; i--) {
const current = node.params[i];
const param = current.type === utils_1.AST_NODE_TYPES.TSParameterProperty
? current.parameter
: current;
if (isPlainParam(param)) {
hasSeenPlainParam = true;
continue;
}
if (hasSeenPlainParam &&
(isOptionalParam(param) ||
param.type === utils_1.AST_NODE_TYPES.AssignmentPattern)) {
context.report({ node: current, messageId: 'shouldBeLast' });
}
}
}
return {
ArrowFunctionExpression: checkDefaultParamLast,
FunctionDeclaration: checkDefaultParamLast,
FunctionExpression: checkDefaultParamLast,
};
},
});
@@ -0,0 +1 @@
{"version":3,"file":"cloud.js","sources":["../../../src/icons/cloud.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name Cloud\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMTcuNSAxOUg5YTcgNyAwIDEgMSA2LjcxLTloMS43OWE0LjUgNC41IDAgMSAxIDAgOVoiIC8+Cjwvc3ZnPgo=) - https://lucide.dev/icons/cloud\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst Cloud = createLucideIcon('Cloud', [\n ['path', { d: 'M17.5 19H9a7 7 0 1 1 6.71-9h1.79a4.5 4.5 0 1 1 0 9Z', key: 'p7xjir' }],\n]);\n\nexport default Cloud;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,iBAAiB,OAAS,CAAA,CAAA,CAAA;AAAA,CAAA,CACtC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAuD,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AACtF,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1,3 @@
export * from './estree-to-ts-node-types';
export * from './ts-nodes';
export { AST_NODE_TYPES, AST_TOKEN_TYPES, TSESTree, } from '@typescript-eslint/types';
@@ -0,0 +1,5 @@
export { e as builtinEnvironments, p as populateGlobal } from './chunks/index.DC7d2Pf8.js';
import 'node:url';
import 'node:console';
console.warn("Importing from \"vitest/environments\" is deprecated since Vitest 4.1. Please use \"vitest/runtime\" instead.");
@@ -0,0 +1,53 @@
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __exportStar = (this && this.__exportStar) || function(m, exports) {
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.NullThrowsReasons = exports.nullThrows = exports.isObjectNotArray = exports.getParserServices = exports.deepMerge = exports.applyDefault = void 0;
const utils_1 = require("@typescript-eslint/utils");
__exportStar(require("./astUtils"), exports);
__exportStar(require("./baseTypeUtils"), exports);
__exportStar(require("./collectUnusedVariables"), exports);
__exportStar(require("./createRule"), exports);
__exportStar(require("./getBaseTypesOfClassMember"), exports);
__exportStar(require("./getFixOrSuggest"), exports);
__exportStar(require("./getFunctionHeadLoc"), exports);
__exportStar(require("./getOperatorPrecedence"), exports);
__exportStar(require("./getStaticStringValue"), exports);
__exportStar(require("./getStringLength"), exports);
__exportStar(require("./getTextWithParentheses"), exports);
__exportStar(require("./getThisExpression"), exports);
__exportStar(require("./getWrappingFixer"), exports);
__exportStar(require("./hasOverloadSignatures"), exports);
__exportStar(require("./isArrayMethodCallWithPredicate"), exports);
__exportStar(require("./isAssignee"), exports);
__exportStar(require("./isNodeEqual"), exports);
__exportStar(require("./isNullLiteral"), exports);
__exportStar(require("./isStartOfExpressionStatement"), exports);
__exportStar(require("./isUndefinedIdentifier"), exports);
__exportStar(require("./misc"), exports);
__exportStar(require("./needsPrecedingSemiColon"), exports);
__exportStar(require("./objectIterators"), exports);
__exportStar(require("./needsToBeAwaited"), exports);
__exportStar(require("./scopeUtils"), exports);
__exportStar(require("./types"), exports);
__exportStar(require("./getConstraintInfo"), exports);
__exportStar(require("./getValueOfLiteralType"), exports);
__exportStar(require("./isHigherPrecedenceThanAwait"), exports);
__exportStar(require("./skipChainExpression"), exports);
__exportStar(require("./truthinessUtils"), exports);
__exportStar(require("./walkStatements"), exports);
// this is done for convenience - saves migrating all of the old rules
__exportStar(require("@typescript-eslint/type-utils"), exports);
exports.applyDefault = utils_1.ESLintUtils.applyDefault, exports.deepMerge = utils_1.ESLintUtils.deepMerge, exports.getParserServices = utils_1.ESLintUtils.getParserServices, exports.isObjectNotArray = utils_1.ESLintUtils.isObjectNotArray, exports.nullThrows = utils_1.ESLintUtils.nullThrows, exports.NullThrowsReasons = utils_1.ESLintUtils.NullThrowsReasons;
@@ -0,0 +1,6 @@
function calculateRepeatDuration(duration, repeat, _repeatDelay) {
return duration * (repeat + 1);
}
export { calculateRepeatDuration };
//# sourceMappingURL=calc-repeat-duration.mjs.map
@@ -0,0 +1,186 @@
/**
* @fileoverview Rule to disallow assignments where both sides are exactly the same
* @author Toru Nagashima
*/
"use strict";
//------------------------------------------------------------------------------
// Requirements
//------------------------------------------------------------------------------
const astUtils = require("./utils/ast-utils");
//------------------------------------------------------------------------------
// Helpers
//------------------------------------------------------------------------------
const SPACES = /\s+/gu;
/**
* Traverses 2 Pattern nodes in parallel, then reports self-assignments.
* @param {ASTNode|null} left A left node to traverse. This is a Pattern or
* a Property.
* @param {ASTNode|null} right A right node to traverse. This is a Pattern or
* a Property.
* @param {boolean} props The flag to check member expressions as well.
* @param {Function} report A callback function to report.
* @returns {void}
*/
function eachSelfAssignment(left, right, props, report) {
if (!left || !right) {
// do nothing
} else if (
left.type === "Identifier" &&
right.type === "Identifier" &&
left.name === right.name
) {
report(right);
} else if (
left.type === "ArrayPattern" &&
right.type === "ArrayExpression"
) {
const end = Math.min(left.elements.length, right.elements.length);
for (let i = 0; i < end; ++i) {
const leftElement = left.elements[i];
const rightElement = right.elements[i];
// Avoid cases such as [...a] = [...a, 1]
if (
leftElement &&
leftElement.type === "RestElement" &&
i < right.elements.length - 1
) {
break;
}
eachSelfAssignment(leftElement, rightElement, props, report);
// After a spread element, those indices are unknown.
if (rightElement && rightElement.type === "SpreadElement") {
break;
}
}
} else if (left.type === "RestElement" && right.type === "SpreadElement") {
eachSelfAssignment(left.argument, right.argument, props, report);
} else if (
left.type === "ObjectPattern" &&
right.type === "ObjectExpression" &&
right.properties.length >= 1
) {
/*
* Gets the index of the last spread property.
* It's possible to overwrite properties followed by it.
*/
let startJ = 0;
for (let i = right.properties.length - 1; i >= 0; --i) {
const propType = right.properties[i].type;
if (
propType === "SpreadElement" ||
propType === "ExperimentalSpreadProperty"
) {
startJ = i + 1;
break;
}
}
for (let i = 0; i < left.properties.length; ++i) {
for (let j = startJ; j < right.properties.length; ++j) {
eachSelfAssignment(
left.properties[i],
right.properties[j],
props,
report,
);
}
}
} else if (
left.type === "Property" &&
right.type === "Property" &&
right.kind === "init" &&
!right.method
) {
const leftName = astUtils.getStaticPropertyName(left);
if (
leftName !== null &&
leftName === astUtils.getStaticPropertyName(right)
) {
eachSelfAssignment(left.value, right.value, props, report);
}
} else if (
props &&
astUtils.skipChainExpression(left).type === "MemberExpression" &&
astUtils.skipChainExpression(right).type === "MemberExpression" &&
astUtils.isSameReference(left, right)
) {
report(right);
}
}
//------------------------------------------------------------------------------
// Rule Definition
//------------------------------------------------------------------------------
/** @type {import('../types').Rule.RuleModule} */
module.exports = {
meta: {
type: "problem",
defaultOptions: [{ props: true }],
docs: {
description:
"Disallow assignments where both sides are exactly the same",
recommended: true,
url: "https://eslint.org/docs/latest/rules/no-self-assign",
},
schema: [
{
type: "object",
properties: {
props: {
type: "boolean",
},
},
additionalProperties: false,
},
],
messages: {
selfAssignment: "'{{name}}' is assigned to itself.",
},
},
create(context) {
const sourceCode = context.sourceCode;
const [{ props }] = context.options;
/**
* Reports a given node as self assignments.
* @param {ASTNode} node A node to report. This is an Identifier node.
* @returns {void}
*/
function report(node) {
context.report({
node,
messageId: "selfAssignment",
data: {
name: sourceCode.getText(node).replace(SPACES, ""),
},
});
}
return {
AssignmentExpression(node) {
if (["=", "&&=", "||=", "??="].includes(node.operator)) {
eachSelfAssignment(node.left, node.right, props, report);
}
},
};
},
};
@@ -0,0 +1,121 @@
import type { $ZodStringFormats } from "../core/checks.js";
import type * as errors from "../core/errors.js";
import * as util from "../core/util.js";
const error: () => errors.$ZodErrorMap = () => {
const Sizable: Record<string, { unit: string; verb: string }> = {
string: { unit: "caractères", verb: "avoir" },
file: { unit: "octets", verb: "avoir" },
array: { unit: "éléments", verb: "avoir" },
set: { unit: "éléments", verb: "avoir" },
map: { unit: "éléments", verb: "avoir" },
};
function getSizing(origin: string): { unit: string; verb: string } | null {
return Sizable[origin] ?? null;
}
const FormatDictionary: {
[k in $ZodStringFormats | (string & {})]?: string;
} = {
regex: "entrée",
email: "adresse courriel",
url: "URL",
emoji: "emoji",
uuid: "UUID",
uuidv4: "UUIDv4",
uuidv6: "UUIDv6",
nanoid: "nanoid",
guid: "GUID",
cuid: "cuid",
cuid2: "cuid2",
ulid: "ULID",
xid: "XID",
ksuid: "KSUID",
datetime: "date-heure ISO",
date: "date ISO",
time: "heure ISO",
duration: "durée ISO",
ipv4: "adresse IPv4",
ipv6: "adresse IPv6",
mac: "adresse MAC",
cidrv4: "plage IPv4",
cidrv6: "plage IPv6",
base64: "chaîne encodée en base64",
base64url: "chaîne encodée en base64url",
json_string: "chaîne JSON",
e164: "numéro E.164",
credit_card: "numéro de carte de crédit",
currency_code: "code de devise",
iban: "IBAN",
jwt: "JWT",
template_literal: "entrée",
};
const TypeDictionary: {
[k in errors.$ZodInvalidTypeExpected | (string & {})]?: string;
} = {
nan: "NaN",
};
return (issue) => {
switch (issue.code) {
case "invalid_type": {
const expected = TypeDictionary[issue.expected] ?? issue.expected;
const receivedType = util.parsedType(issue.input);
const received = TypeDictionary[receivedType] ?? receivedType;
if (/^[A-Z]/.test(issue.expected)) {
return `Entrée invalide : attendu instanceof ${issue.expected}, reçu ${received}`;
}
return `Entrée invalide : attendu ${expected}, reçu ${received}`;
}
case "invalid_value":
if (issue.values.length === 1) return `Entrée invalide : attendu ${util.stringifyPrimitive(issue.values[0])}`;
return `Option invalide : attendu l'une des valeurs suivantes ${util.joinValues(issue.values, "|")}`;
case "too_big": {
const adj = issue.inclusive ? "≤" : "<";
const sizing = getSizing(issue.origin);
if (sizing)
return `Trop grand : attendu que ${issue.origin ?? "la valeur"} ait ${adj}${issue.maximum.toString()} ${sizing.unit}`;
return `Trop grand : attendu que ${issue.origin ?? "la valeur"} soit ${adj}${issue.maximum.toString()}`;
}
case "too_small": {
const adj = issue.inclusive ? "≥" : ">";
const sizing = getSizing(issue.origin);
if (sizing) {
return `Trop petit : attendu que ${issue.origin} ait ${adj}${issue.minimum.toString()} ${sizing.unit}`;
}
return `Trop petit : attendu que ${issue.origin} soit ${adj}${issue.minimum.toString()}`;
}
case "invalid_format": {
const _issue = issue as errors.$ZodStringFormatIssues;
if (_issue.format === "starts_with") {
return `Chaîne invalide : doit commencer par "${_issue.prefix}"`;
}
if (_issue.format === "ends_with") return `Chaîne invalide : doit se terminer par "${_issue.suffix}"`;
if (_issue.format === "includes") return `Chaîne invalide : doit inclure "${_issue.includes}"`;
if (_issue.format === "regex") return `Chaîne invalide : doit correspondre au motif ${_issue.pattern}`;
return `${FormatDictionary[_issue.format] ?? issue.format} invalide`;
}
case "not_multiple_of":
return `Nombre invalide : doit être un multiple de ${issue.divisor}`;
case "unrecognized_keys":
return `Clé${issue.keys.length > 1 ? "s" : ""} non reconnue${issue.keys.length > 1 ? "s" : ""} : ${util.joinValues(issue.keys, ", ")}`;
case "invalid_key":
return `Clé invalide dans ${issue.origin}`;
case "invalid_union":
return "Entrée invalide";
case "invalid_element":
return `Valeur invalide dans ${issue.origin}`;
default:
return `Entrée invalide`;
}
};
};
export default function (): { localeError: errors.$ZodErrorMap } {
return {
localeError: error(),
};
}
@@ -0,0 +1,37 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = mergeSourceMap;
function _remapping() {
const data = require("@jridgewell/remapping");
_remapping = function () {
return data;
};
return data;
}
function mergeSourceMap(inputMap, map, sourceFileName) {
const source = sourceFileName.replace(/\\/g, "/");
let found = false;
const result = _remapping()(rootless(map), (s, ctx) => {
if (s === source && !found) {
found = true;
ctx.source = "";
return rootless(inputMap);
}
return null;
});
if (typeof inputMap.sourceRoot === "string") {
result.sourceRoot = inputMap.sourceRoot;
}
return Object.assign({}, result);
}
function rootless(map) {
return Object.assign({}, map, {
sourceRoot: null
});
}
0 && 0;
//# sourceMappingURL=merge-map.js.map
@@ -0,0 +1 @@
{"version":3,"file":"blocks.js","sources":["../../../src/icons/blocks.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name Blocks\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cmVjdCB3aWR0aD0iNyIgaGVpZ2h0PSI3IiB4PSIxNCIgeT0iMyIgcng9IjEiIC8+CiAgPHBhdGggZD0iTTEwIDIxVjhhMSAxIDAgMCAwLTEtMUg0YTEgMSAwIDAgMC0xIDF2MTJhMSAxIDAgMCAwIDEgMWgxMmExIDEgMCAwIDAgMS0xdi01YTEgMSAwIDAgMC0xLTFIMyIgLz4KPC9zdmc+Cg==) - https://lucide.dev/icons/blocks\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst Blocks = createLucideIcon('Blocks', [\n ['rect', { width: '7', height: '7', x: '14', y: '3', rx: '1', key: '6d4xhi' }],\n [\n 'path',\n {\n d: 'M10 21V8a1 1 0 0 0-1-1H4a1 1 0 0 0-1 1v12a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-5a1 1 0 0 0-1-1H3',\n key: '1fpvtg',\n },\n ],\n]);\n\nexport default Blocks;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAS,iBAAiB,QAAU,CAAA,CAAA,CAAA;AAAA,CAAA,CACxC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAO,KAAK,CAAQ,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,CAAG,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAM,GAAG,CAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAI,CAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAC7E,CAAA,CAAA;AAAA,CAAA,CAAA,CAAA,CACE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACA,CAAA,CAAA,CAAA,CAAA;AAAA,CACE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAG,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACH,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACP,CAAA,CAAA,CAAA,CAAA;AAAA,CACF,CAAA,CAAA;AACF,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1,46 @@
{
"name": "proc-log",
"version": "7.0.0",
"files": [
"bin/",
"lib/"
],
"main": "lib/index.js",
"description": "just emit 'log' events on the process object",
"repository": {
"type": "git",
"url": "git+https://github.com/npm/proc-log.git"
},
"author": "GitHub Inc.",
"license": "ISC",
"scripts": {
"test": "tap",
"snap": "tap",
"posttest": "npm run lint",
"postsnap": "eslint index.js test/*.js --fix",
"lint": "npm run eslint",
"postlint": "template-oss-check",
"lintfix": "npm run eslint -- --fix",
"template-oss-apply": "template-oss-apply --force",
"eslint": "eslint \"**/*.{js,cjs,ts,mjs,jsx,tsx}\""
},
"devDependencies": {
"@npmcli/eslint-config": "^6.0.0",
"@npmcli/template-oss": "5.0.0",
"tap": "^16.0.1"
},
"engines": {
"node": "^22.22.2 || ^24.15.0 || >=26.0.0"
},
"templateOSS": {
"//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.",
"version": "5.0.0",
"publish": true
},
"tap": {
"nyc-arg": [
"--exclude",
"tap-snapshots/**"
]
}
}
@@ -0,0 +1,69 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.parseOptions = parseOptions;
const util_1 = require("../../util");
const enums_1 = require("./enums");
const shared_1 = require("./shared");
const validator_1 = require("./validator");
function normalizeOption(option) {
let weight = 0;
option.modifiers?.forEach(mod => {
weight |= enums_1.Modifiers[mod];
});
option.types?.forEach(mod => {
weight |= enums_1.TypeModifiers[mod];
});
// give selectors with a filter the _highest_ priority
if (option.filter) {
weight |= 1 << 30;
}
const normalizedOption = {
// format options
custom: option.custom
? {
match: option.custom.match,
regex: new RegExp(option.custom.regex, 'u'),
}
: null,
filter: option.filter != null
? typeof option.filter === 'string'
? {
match: true,
regex: new RegExp(option.filter, 'u'),
}
: {
match: option.filter.match,
regex: new RegExp(option.filter.regex, 'u'),
}
: null,
format: option.format ? option.format.map(f => enums_1.PredefinedFormats[f]) : null,
leadingUnderscore: option.leadingUnderscore != null
? enums_1.UnderscoreOptions[option.leadingUnderscore]
: null,
modifiers: option.modifiers?.map(m => enums_1.Modifiers[m]) ?? null,
prefix: option.prefix && option.prefix.length > 0 ? option.prefix : null,
suffix: option.suffix && option.suffix.length > 0 ? option.suffix : null,
trailingUnderscore: option.trailingUnderscore != null
? enums_1.UnderscoreOptions[option.trailingUnderscore]
: null,
types: option.types?.map(m => enums_1.TypeModifiers[m]) ?? null,
// calculated ordering weight based on modifiers
modifierWeight: weight,
};
const selectors = Array.isArray(option.selector)
? option.selector
: [option.selector];
return selectors.map(selector => ({
selector: (0, shared_1.isMetaSelector)(selector)
? enums_1.MetaSelectors[selector]
: enums_1.Selectors[selector],
...normalizedOption,
}));
}
function parseOptions(context) {
const normalizedOptions = context.options.flatMap(normalizeOption);
return Object.fromEntries((0, util_1.getEnumNames)(enums_1.Selectors).map(k => [
k,
(0, validator_1.createValidator)(k, context, normalizedOptions),
]));
}
@@ -0,0 +1,21 @@
/**
* @license lucide-react v0.469.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const ChartNetwork = createLucideIcon("ChartNetwork", [
["path", { d: "m13.11 7.664 1.78 2.672", key: "go2gg9" }],
["path", { d: "m14.162 12.788-3.324 1.424", key: "11x848" }],
["path", { d: "m20 4-6.06 1.515", key: "1wxxh7" }],
["path", { d: "M3 3v16a2 2 0 0 0 2 2h16", key: "c24i48" }],
["circle", { cx: "12", cy: "6", r: "2", key: "1jj5th" }],
["circle", { cx: "16", cy: "12", r: "2", key: "4ma0v8" }],
["circle", { cx: "9", cy: "15", r: "2", key: "lf2ghp" }]
]);
export { ChartNetwork as default };
//# sourceMappingURL=chart-network.js.map
@@ -0,0 +1,14 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.assertValidPattern = void 0;
const MAX_PATTERN_LENGTH = 1024 * 64;
const assertValidPattern = (pattern) => {
if (typeof pattern !== 'string') {
throw new TypeError('invalid pattern');
}
if (pattern.length > MAX_PATTERN_LENGTH) {
throw new TypeError('pattern is too long');
}
};
exports.assertValidPattern = assertValidPattern;
//# sourceMappingURL=assert-valid-pattern.js.map
@@ -0,0 +1,5 @@
import type { TSESLint } from '@typescript-eslint/utils';
declare const _default: TSESLint.RuleModule<"interfaceOverType" | "typeOverInterface", [string], import("../../rules").ESLintPluginDocs, TSESLint.RuleListener> & {
name: string;
};
export default _default;
@@ -0,0 +1,16 @@
/**
* @license lucide-react v0.469.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const CircleDot = createLucideIcon("CircleDot", [
["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
["circle", { cx: "12", cy: "12", r: "1", key: "41hilf" }]
]);
export { CircleDot as default };
//# sourceMappingURL=circle-dot.js.map
@@ -0,0 +1 @@
module.exports={C:{"72":0.02296,"113":0.00574,"115":0.40173,"120":0.06313,"121":0.12052,"123":0.01722,"124":0.00574,"125":0.00574,"127":0.00574,"128":0.01148,"132":0.00574,"133":0.00574,"134":0.00574,"135":0.00574,"136":0.02296,"137":0.01148,"139":0.00574,"140":0.132,"142":0.00574,"143":0.01148,"145":0.00574,"146":0.00574,"147":0.0287,"148":0.02296,"149":0.01148,"150":0.01722,"151":0.0287,"152":0.06313,"153":0.1033,"154":0.51651,"155":1.66431,"156":1.74466,"157":0.03443,_:"2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 114 116 117 118 119 122 126 129 130 131 138 141 144 158 159 160 3.5 3.6"},D:{"49":0.00574,"79":0.00574,"91":0.00574,"92":0.00574,"93":0.01148,"101":0.00574,"103":0.0287,"104":0.02296,"105":0.02296,"106":0.04017,"107":0.02296,"108":0.0287,"109":2.0603,"110":0.02296,"111":0.03443,"112":0.09756,"113":0.00574,"114":0.00574,"115":0.00574,"116":0.12626,"117":0.02296,"118":0.132,"119":0.13774,"120":0.18365,"121":0.00574,"122":0.06887,"123":0.01722,"124":0.03443,"125":0.00574,"126":0.15495,"127":0.01148,"128":0.08609,"129":0.01148,"130":0.04017,"131":0.06887,"132":0.00574,"133":0.10904,"134":0.18365,"135":0.07461,"136":0.08035,"137":0.08609,"138":0.132,"139":0.09182,"140":0.1033,"141":0.13774,"142":0.26973,"143":0.05165,"144":0.06887,"145":0.10904,"146":0.09182,"147":0.09182,"148":0.22382,"149":0.2066,"150":0.43043,"151":1.87091,"152":12.90127,"153":10.6975,"154":2.43908,"155":0.11478,"156":0.11478,"157":0.00574,_:"4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 80 81 83 84 85 86 87 88 89 90 94 95 96 97 98 99 100 102"},F:{"79":0.0287,"85":0.00574,"89":0.00574,"95":0.35008,"99":0.01722,"100":0.00574,"101":0.02296,"102":0.01148,"106":0.00574,"110":0.00574,"114":0.00574,"116":0.00574,"117":0.00574,"124":0.00574,"131":0.00574,"132":0.01148,"133":0.04591,"134":0.30991,"135":2.65716,_:"9 11 12 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 60 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 80 81 82 83 84 86 87 88 90 91 92 93 94 96 97 98 103 104 105 107 108 109 111 112 113 115 118 119 120 121 122 123 125 126 127 9.5-9.6 10.0-10.1 10.5 10.6 11.1 11.5 11.6 12.1"},B:{"92":0.00574,"109":0.07461,"119":0.05739,"120":0.05739,"121":0.02296,"122":0.00574,"128":0.00574,"131":0.00574,"133":0.05165,"135":0.01722,"140":0.00574,"141":0.00574,"142":0.00574,"143":0.01722,"144":0.00574,"145":0.01148,"146":0.00574,"147":0.01148,"148":0.0287,"149":0.01148,"150":0.13774,"151":0.17791,"152":1.87091,"153":2.04308,"154":0.53373,_:"12 13 14 15 16 17 18 79 80 81 83 84 85 86 87 88 89 90 91 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 110 111 112 113 114 115 116 117 118 123 124 125 126 127 129 130 132 134 136 137 138 139"},E:{"14":0.00574,"27":0.16643,_:"4 5 6 7 8 9 10 11 12 13 15 3.1 3.2 5.1 6.1 7.1 9.1 10.1 11.1 12.1 14.1 15.1 15.2-15.3 15.4 15.5 16.0 16.2 16.3 16.4 17.0 27.1 TP","13.1":0.00574,"15.6":0.05165,"16.1":0.00574,"16.5":0.00574,"16.6":0.05165,"17.1":0.02296,"17.2":0.00574,"17.3":0.00574,"17.4":0.00574,"17.5":0.01148,"17.6":0.06887,"18.0":0.00574,"18.1":0.00574,"18.2":0.01148,"18.3":0.00574,"18.4":0.00574,"18.5-18.7":0.02296,"26.0":0.01148,"26.1":0.01722,"26.2":0.06887,"26.3":0.08035,"26.4":0.0287,"26.5":0.22382,"26.6":0.79198,"27.2":0.00574},G:{"8":0,"3.2":0,"4.0-4.1":0,"4.2-4.3":0.0009,"5.0-5.1":0.0009,"6.0-6.1":0,"7.0-7.1":0.0018,"8.1-8.4":0,"9.0-9.2":0,"9.3":0,"10.0-10.2":0,"10.3":0.00901,"11.0-11.2":0.0009,"11.3-11.4":0.0018,"12.0-12.1":0,"12.2-12.5":0.02342,"13.0-13.1":0,"13.2":0.0045,"13.3":0,"13.4-13.7":0.0009,"14.0-14.4":0.0036,"14.5-14.8":0.0054,"15.0-15.1":0.0054,"15.2-15.3":0.0036,"15.4":0.0045,"15.5":0.0054,"15.6-15.8":0.1171,"16.0":0.00901,"16.1":0.01621,"16.2":0.00901,"16.3":0.01982,"16.4":0.0045,"16.5":0.00721,"16.6-16.7":0.16304,"17.0":0.00631,"17.1":0.00901,"17.2":0.00901,"17.3":0.01351,"17.4":0.01892,"17.5":0.03693,"17.6-17.7":0.09548,"18.0":0.01982,"18.1":0.03963,"18.2":0.05405,"18.3":0.09368,"18.4":0.05855,"18.5-18.7":1.20974,"26.0":0.05855,"26.1":0.05945,"26.2":0.15493,"26.3":0.16754,"26.4":0.12251,"26.5":0.82061,"26.6":5.06326,"27.0":0.38823,"27.1":0,"27.2":0.00991},P:{"22":0.01819,"23":0.00909,"25":0.00909,"26":0.02728,"27":0.01819,"28":0.02728,"29":0.07276,"30":2.11905,_:"4 20 21 24 5.0-5.4 6.2-6.4 7.2-7.4 8.2 9.2 10.1 11.1-11.2 12.0 13.0 14.0 15.0 16.0 17.0 18.0 19.0"},I:{"0":0.03406,"3":0,"4":0,"2.1":0,"2.2":0,"2.3":0,"4.1":0,"4.2-4.3":0,"4.4":0,"4.4.3-4.4.4":0.00001},K:{"0":0.46019,_:"10 11 12 11.1 11.5 12.1"},A:{"8":0.00574,"11":0.01148,_:"6 7 9 1Line truncated
@@ -0,0 +1,9 @@
# Contributing
Hey, thanks for wanting to contribute.
Before you open a PR, make sure to open an issue and discuss the problem you want to solve. I will not consider PRs without issues.
I use [gitmoji](https://gitmoji.dev/) for my commit messages because I think it's fun. I encourage you to do the same, but won't enforce it.
I check PRs and issues very rarely so please be patient.
@@ -0,0 +1,18 @@
/**
* @license lucide-react v0.469.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const UmbrellaOff = createLucideIcon("UmbrellaOff", [
["path", { d: "M12 2v1", key: "11qlp1" }],
["path", { d: "M15.5 21a1.85 1.85 0 0 1-3.5-1v-8H2a10 10 0 0 1 3.428-6.575", key: "eki10q" }],
["path", { d: "M17.5 12H22A10 10 0 0 0 9.004 3.455", key: "n2ayka" }],
["path", { d: "m2 2 20 20", key: "1ooewy" }]
]);
export { UmbrellaOff as default };
//# sourceMappingURL=umbrella-off.js.map
@@ -0,0 +1,82 @@
"use strict";
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
var __generator = (this && this.__generator) || function (thisArg, body) {
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
function verb(n) { return function (v) { return step([n, v]); }; }
function step(op) {
if (f) throw new TypeError("Generator is already executing.");
while (_) try {
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
if (y = 0, t) op = [op[0] & 2, t.value];
switch (op[0]) {
case 0: case 1: t = op; break;
case 4: _.label++; return { value: op[1], done: false };
case 5: _.label++; y = op[1]; op = [0]; continue;
case 7: op = _.ops.pop(); _.trys.pop(); continue;
default:
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
if (t[2]) _.ops.pop();
_.trys.pop(); continue;
}
op = body.call(thisArg, _);
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
}
};
Object.defineProperty(exports, "__esModule", { value: true });
var delay_base_1 = require("../delay.base");
var SkipFirstDelay = /** @class */ (function (_super) {
__extends(SkipFirstDelay, _super);
function SkipFirstDelay() {
return _super !== null && _super.apply(this, arguments) || this;
}
SkipFirstDelay.prototype.apply = function () {
return __awaiter(this, void 0, void 0, function () {
return __generator(this, function (_a) {
return [2 /*return*/, this.isFirstAttempt ? true : _super.prototype.apply.call(this)];
});
});
};
Object.defineProperty(SkipFirstDelay.prototype, "isFirstAttempt", {
get: function () {
return this.attempt === 0;
},
enumerable: true,
configurable: true
});
Object.defineProperty(SkipFirstDelay.prototype, "numOfDelayedAttempts", {
get: function () {
return this.attempt - 1;
},
enumerable: true,
configurable: true
});
return SkipFirstDelay;
}(delay_base_1.Delay));
exports.SkipFirstDelay = SkipFirstDelay;
//# sourceMappingURL=skip-first.delay.js.map
@@ -0,0 +1,19 @@
export type Options = [
{
allowAny?: boolean;
allowNullableBoolean?: boolean;
allowNullableEnum?: boolean;
allowNullableNumber?: boolean;
allowNullableObject?: boolean;
allowNullableString?: boolean;
allowNumber?: boolean;
allowRuleToRunWithoutStrictNullChecksIKnowWhatIAmDoing?: boolean;
allowString?: boolean;
}
];
type ConditionErrorMessageId = 'conditionErrorAny' | 'conditionErrorNullableBoolean' | 'conditionErrorNullableEnum' | 'conditionErrorNullableNumber' | 'conditionErrorNullableObject' | 'conditionErrorNullableString' | 'conditionErrorNullish' | 'conditionErrorNumber' | 'conditionErrorObject' | 'conditionErrorOther' | 'conditionErrorString';
export type MessageId = 'conditionFixCastBoolean' | 'conditionFixCompareArrayLengthNonzero' | 'conditionFixCompareArrayLengthZero' | 'conditionFixCompareEmptyString' | 'conditionFixCompareFalse' | 'conditionFixCompareNaN' | 'conditionFixCompareNullish' | 'conditionFixCompareStringLength' | 'conditionFixCompareTrue' | 'conditionFixCompareZero' | 'conditionFixDefaultEmptyString' | 'conditionFixDefaultFalse' | 'conditionFixDefaultZero' | 'explicitBooleanReturnType' | 'noStrictNullCheck' | 'predicateCannotBeAsync' | ConditionErrorMessageId;
declare const _default: import("@typescript-eslint/utils/ts-eslint").RuleModule<MessageId, Options, import("../../rules").ESLintPluginDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener> & {
name: string;
};
export default _default;
@@ -0,0 +1 @@
{"version":3,"file":"pen-tool.js","sources":["../../../src/icons/pen-tool.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name PenTool\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMTUuNzA3IDIxLjI5M2ExIDEgMCAwIDEtMS40MTQgMGwtMS41ODYtMS41ODZhMSAxIDAgMCAxIDAtMS40MTRsNS41ODYtNS41ODZhMSAxIDAgMCAxIDEuNDE0IDBsMS41ODYgMS41ODZhMSAxIDAgMCAxIDAgMS40MTR6IiAvPgogIDxwYXRoIGQ9Im0xOCAxMy0xLjM3NS02Ljg3NGExIDEgMCAwIDAtLjc0Ni0uNzc2TDMuMjM1IDIuMDI4YTEgMSAwIDAgMC0xLjIwNyAxLjIwN0w1LjM1IDE1Ljg3OWExIDEgMCAwIDAgLjc3Ni43NDZMMTMgMTgiIC8+CiAgPHBhdGggZD0ibTIuMyAyLjMgNy4yODYgNy4yODYiIC8+CiAgPGNpcmNsZSBjeD0iMTEiIGN5PSIxMSIgcj0iMiIgLz4KPC9zdmc+Cg==) - https://lucide.dev/icons/pen-tool\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst PenTool = createLucideIcon('PenTool', [\n [\n 'path',\n {\n d: 'M15.707 21.293a1 1 0 0 1-1.414 0l-1.586-1.586a1 1 0 0 1 0-1.414l5.586-5.586a1 1 0 0 1 1.414 0l1.586 1.586a1 1 0 0 1 0 1.414z',\n key: 'nt11vn',\n },\n ],\n [\n 'path',\n {\n d: 'm18 13-1.375-6.874a1 1 0 0 0-.746-.776L3.235 2.028a1 1 0 0 0-1.207 1.207L5.35 15.879a1 1 0 0 0 .776.746L13 18',\n key: '15qc1e',\n },\n ],\n ['path', { d: 'm2.3 2.3 7.286 7.286', key: '1wuzzi' }],\n ['circle', { cx: '11', cy: '11', r: '2', key: 'xmgehs' }],\n]);\n\nexport default PenTool;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAU,iBAAiB,SAAW,CAAA,CAAA,CAAA;AAAA,CAC1C,CAAA,CAAA;AAAA,CAAA,CAAA,CAAA,CACE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACA,CAAA,CAAA,CAAA,CAAA;AAAA,CACE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAG,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACH,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACP,CAAA,CAAA,CAAA,CAAA;AAAA,CACF,CAAA,CAAA,CAAA;AAAA,CACA,CAAA,CAAA;AAAA,CAAA,CAAA,CAAA,CACE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACA,CAAA,CAAA,CAAA,CAAA;AAAA,CACE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAG,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACH,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACP,CAAA,CAAA,CAAA,CAAA;AAAA,CACF,CAAA,CAAA,CAAA;AAAA,CAAA,CACA,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAwB,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CACrD,CAAA,CAAC,QAAU,CAAA,CAAA,CAAA,CAAE,EAAI,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAM,CAAI,CAAA,CAAA,CAAA,IAAA,CAAM,CAAA,CAAG,EAAA,CAAA,CAAA,CAAA,CAAA,CAAK,GAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAU,CAAA;AAC1D,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1,220 @@
/**
* @fileoverview Utility for caching lint results.
* @author Kevin Partington
*/
"use strict";
//-----------------------------------------------------------------------------
// Requirements
//-----------------------------------------------------------------------------
const fs = require("node:fs");
const fileEntryCache = require("file-entry-cache");
const stringify = require("json-stable-stringify-without-jsonify");
const pkg = require("../../package.json");
const assert = require("../shared/assert");
const hash = require("./hash");
const debug = require("debug")("eslint:lint-result-cache");
//------------------------------------------------------------------------------
// Typedefs
//------------------------------------------------------------------------------
/** @typedef {import("../types").Linter.Config} Config */
//-----------------------------------------------------------------------------
// Helpers
//-----------------------------------------------------------------------------
const configHashCache = new WeakMap();
const nodeVersion = process && process.version;
const validCacheStrategies = ["metadata", "content"];
const invalidCacheStrategyErrorMessage = `Cache strategy must be one of: ${validCacheStrategies
.map(strategy => `"${strategy}"`)
.join(", ")}`;
/**
* Tests whether a provided cacheStrategy is valid
* @param {string} cacheStrategy The cache strategy to use
* @returns {boolean} true if `cacheStrategy` is one of `validCacheStrategies`; false otherwise
*/
function isValidCacheStrategy(cacheStrategy) {
return validCacheStrategies.includes(cacheStrategy);
}
/**
* Calculates the hash of the config
* @param {Config} config The config.
* @returns {string} The hash of the config
*/
function hashOfConfigFor(config) {
if (!configHashCache.has(config)) {
configHashCache.set(
config,
hash(`${pkg.version}_${nodeVersion}_${stringify(config)}`),
);
}
return configHashCache.get(config);
}
//-----------------------------------------------------------------------------
// Public Interface
//-----------------------------------------------------------------------------
/**
* Lint result cache. This wraps around the file-entry-cache module,
* transparently removing properties that are difficult or expensive to
* serialize and adding them back in on retrieval.
*/
class LintResultCache {
/**
* Creates a new LintResultCache instance.
* @param {string} cacheFileLocation The cache file location.
* @param {"metadata" | "content"} cacheStrategy The cache strategy to use.
*/
constructor(cacheFileLocation, cacheStrategy) {
assert(cacheFileLocation, "Cache file location is required");
assert(cacheStrategy, "Cache strategy is required");
assert(
isValidCacheStrategy(cacheStrategy),
invalidCacheStrategyErrorMessage,
);
debug(`Caching results to ${cacheFileLocation}`);
const useChecksum = cacheStrategy === "content";
debug(`Using "${cacheStrategy}" strategy to detect changes`);
this.fileEntryCache = fileEntryCache.create(
cacheFileLocation,
void 0,
useChecksum,
);
this.cacheFileLocation = cacheFileLocation;
}
/**
* Retrieve cached lint results for a given file path, if present in the
* cache. If the file is present and has not been changed, rebuild any
* missing result information.
* @param {string} filePath The file for which to retrieve lint results.
* @param {Config} config The config of the file.
* @returns {Object|null} The rebuilt lint results, or null if the file is
* changed or not in the filesystem.
*/
getCachedLintResults(filePath, config) {
const cachedResults = this.getValidCachedLintResults(filePath, config);
if (!cachedResults) {
return cachedResults;
}
/*
* Shallow clone the object to ensure that any properties added or modified afterwards
* will not be accidentally stored in the cache file when `reconcile()` is called.
* https://github.com/eslint/eslint/issues/13507
* All intentional changes to the cache file must be done through `setCachedLintResults()`.
*/
const results = { ...cachedResults };
// If source is present but null, need to reread the file from the filesystem.
if (results.source === null) {
debug(
`Rereading cached result source from filesystem: ${filePath}`,
);
results.source = fs.readFileSync(filePath, "utf-8");
}
return results;
}
/**
* Retrieve cached lint results for a given file path, if present in the
* cache and still valid.
* @param {string} filePath The file for which to retrieve lint results.
* @param {Config} config The config of the file.
* @returns {Object|null} The cached lint results if present in the cache
* and still valid; null otherwise.
*/
getValidCachedLintResults(filePath, config) {
/*
* Cached lint results are valid if and only if:
* 1. The file is present in the filesystem
* 2. The file has not changed since the time it was previously linted
* 3. The ESLint configuration has not changed since the time the file
* was previously linted
* If any of these are not true, we will not reuse the lint results.
*/
const fileDescriptor = this.fileEntryCache.getFileDescriptor(filePath);
if (fileDescriptor.notFound) {
debug(`File not found on the file system: ${filePath}`);
return null;
}
const hashOfConfig = hashOfConfigFor(config);
const changed =
fileDescriptor.changed ||
fileDescriptor.meta.hashOfConfig !== hashOfConfig;
if (changed) {
debug(`Cache entry not found or no longer valid: ${filePath}`);
return null;
}
return fileDescriptor.meta.results;
}
/**
* Set the cached lint results for a given file path, after removing any
* information that will be both unnecessary and difficult to serialize.
* Avoids caching results with an "output" property (meaning fixes were
* applied), to prevent potentially incorrect results if fixes are not
* written to disk.
* @param {string} filePath The file for which to set lint results.
* @param {Config} config The config of the file.
* @param {Object} result The lint result to be set for the file.
* @returns {void}
*/
setCachedLintResults(filePath, config, result) {
if (result && Object.hasOwn(result, "output")) {
return;
}
const fileDescriptor = this.fileEntryCache.getFileDescriptor(filePath);
if (fileDescriptor && !fileDescriptor.notFound) {
debug(`Updating cached result: ${filePath}`);
// Serialize the result, except that we want to remove the file source if present.
const resultToSerialize = Object.assign({}, result);
/*
* Set result.source to null.
* In `getCachedLintResults`, if source is explicitly null, we will
* read the file from the filesystem to set the value again.
*/
if (Object.hasOwn(resultToSerialize, "source")) {
resultToSerialize.source = null;
}
fileDescriptor.meta.results = resultToSerialize;
fileDescriptor.meta.hashOfConfig = hashOfConfigFor(config);
}
}
/**
* Persists the in-memory cache to disk.
* @returns {void}
*/
reconcile() {
debug(`Persisting cached results: ${this.cacheFileLocation}`);
this.fileEntryCache.reconcile();
}
}
module.exports = LintResultCache;
@@ -0,0 +1,3 @@
import { getConnInfo } from "./conninfo.js";
import { handle, handleMiddleware, serveStatic } from "./handler.js";
export { getConnInfo, handle, handleMiddleware, serveStatic };
@@ -0,0 +1,33 @@
const ds = (ab) => (ab[0] <= 0 && ab[1] >= 0) || (ab[0] >= 0 && ab[1] <= 0);
const sign = (x) => (x < 0 ? -1 : 1);
export const pinchOrZoom = (event, cache) => {
if (!event.changedTouches) {
return false;
}
if (event.touches.length === 2) {
const oldPoints = [cache[event.touches[0].identifier], cache[event.touches[1].identifier]];
const newPoints = [event.touches[0], event.touches[1]];
if (oldPoints[0] && oldPoints[1]) {
// Calculate the difference between the start and move coordinates
const diffx = [oldPoints[0].clientX - newPoints[0].clientX, oldPoints[1].clientX - newPoints[1].clientX];
const diffy = [oldPoints[0].clientY - newPoints[0].clientY, oldPoints[1].clientY - newPoints[1].clientY];
console.log(diffx, diffy);
if (ds(diffx) || ds(diffy)) {
return {
action: 'zoom',
};
}
const mx = Math.max(Math.abs(diffx[0]), Math.abs(diffx[1]));
const my = Math.max(Math.abs(diffy[0]), Math.abs(diffy[1]));
return {
action: 'pinch',
coords: [mx * sign(diffx[0]), my * sign(diffx[1])],
};
}
}
Array.from(event.changedTouches).forEach((touch) => (cache[touch.identifier] = touch));
return {
action: 'move',
coords: [event.changedTouches[0].clientX, event.changedTouches[0].clientY],
};
};
@@ -0,0 +1,68 @@
{
"name": "@radix-ui/react-arrow",
"version": "1.1.7",
"license": "MIT",
"source": "./src/index.ts",
"main": "./dist/index.js",
"module": "./dist/index.mjs",
"files": [
"dist",
"README.md"
],
"sideEffects": false,
"dependencies": {
"@radix-ui/react-primitive": "2.1.3"
},
"devDependencies": {
"@types/react": "^19.0.7",
"@types/react-dom": "^19.0.3",
"eslint": "^9.18.0",
"react": "^19.1.0",
"react-dom": "^19.1.0",
"typescript": "^5.7.3",
"@repo/builder": "0.0.0",
"@repo/typescript-config": "0.0.0",
"@repo/eslint-config": "0.0.0"
},
"peerDependencies": {
"@types/react": "*",
"@types/react-dom": "*",
"react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc",
"react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"
},
"peerDependenciesMeta": {
"@types/react": {
"optional": true
},
"@types/react-dom": {
"optional": true
}
},
"homepage": "https://radix-ui.com/primitives",
"repository": {
"type": "git",
"url": "git+https://github.com/radix-ui/primitives.git"
},
"bugs": {
"url": "https://github.com/radix-ui/primitives/issues"
},
"scripts": {
"lint": "eslint --max-warnings 0 src",
"clean": "rm -rf dist",
"typecheck": "tsc --noEmit",
"build": "radix-build"
},
"types": "./dist/index.d.ts",
"exports": {
".": {
"import": {
"types": "./dist/index.d.mts",
"default": "./dist/index.mjs"
},
"require": {
"types": "./dist/index.d.ts",
"default": "./dist/index.js"
}
}
}
}
@@ -0,0 +1,231 @@
{
"name": "eslint",
"version": "10.2.0",
"author": "Nicholas C. Zakas <nicholas+npm@nczconsulting.com>",
"description": "An AST-based pattern checker for JavaScript.",
"type": "commonjs",
"bin": {
"eslint": "./bin/eslint.js"
},
"main": "./lib/api.js",
"types": "./lib/types/index.d.ts",
"exports": {
".": {
"types": "./lib/types/index.d.ts",
"default": "./lib/api.js"
},
"./config": {
"types": "./lib/types/config-api.d.ts",
"default": "./lib/config-api.js"
},
"./package.json": "./package.json",
"./use-at-your-own-risk": {
"types": "./lib/types/use-at-your-own-risk.d.ts",
"default": "./lib/unsupported-api.js"
},
"./rules": {
"types": "./lib/types/rules.d.ts"
},
"./universal": {
"types": "./lib/types/universal.d.ts",
"default": "./lib/universal.js"
}
},
"typesVersions": {
"*": {
"use-at-your-own-risk": [
"./lib/types/use-at-your-own-risk.d.ts"
],
"rules": [
"./lib/types/rules.d.ts"
],
"universal": [
"./lib/types/universal.d.ts"
],
"config": [
"./lib/types/config-api.d.ts"
]
}
},
"scripts": {
"build:docs:update-links": "node tools/fetch-docs-links.js",
"build:site": "node Makefile.js gensite",
"build:webpack": "node Makefile.js webpack",
"build:readme": "node tools/update-readme.js",
"build:rules-index": "node Makefile.js generateRuleIndexPage",
"fmt": "prettier --write .",
"fmt:check": "prettier --check .",
"lint": "node Makefile.js lint",
"lint:docs:js": "node Makefile.js lintDocsJS",
"lint:docs:rule-examples": "node Makefile.js checkRuleExamples",
"lint:unused": "knip",
"lint:fix": "node Makefile.js lint -- fix",
"lint:fix:docs:js": "node Makefile.js lintDocsJS -- fix",
"lint:rule-types": "node tools/update-rule-type-headers.js --check",
"lint:types": "attw --pack",
"release:generate:alpha": "node Makefile.js generatePrerelease -- alpha",
"release:generate:beta": "node Makefile.js generatePrerelease -- beta",
"release:generate:latest": "node Makefile.js generateRelease -- latest",
"release:generate:maintenance": "node Makefile.js generateRelease -- maintenance",
"release:generate:rc": "node Makefile.js generatePrerelease -- rc",
"release:publish": "node Makefile.js publishRelease",
"test": "node Makefile.js test",
"test:browser": "node Makefile.js cypress",
"test:cli": "mocha",
"test:emfile": "node tools/check-emfile-handling.js",
"test:fuzz": "node Makefile.js fuzz",
"test:performance": "node Makefile.js perf",
"test:pnpm": "cd tests/pnpm && node check.js && pnpm install && pnpm exec tsc",
"test:types": "tsc -p tests/lib/types/tsconfig.json"
},
"gitHooks": {
"pre-commit": "lint-staged"
},
"lint-staged": {
"*.{js,json,jsonc,json5,yml,yaml}": [
"eslint --fix",
"prettier --write"
],
"docs/src/**/*.md": [
"markdownlint-cli2 --fix",
"prettier --write"
],
"!({{*.,**/*.}{js,json,jsonc,json5,yml,yaml},docs/src/**/*.md})": "prettier --write --ignore-unknown",
"lib/rules/*.js": [
"node tools/update-eslint-all.js",
"node tools/update-eslint-recommended.js",
"node tools/update-rule-type-headers.js",
"git add packages/js/src/configs/*.js lib/types/rules.d.ts"
],
"docs/src/rules/*.md": [
"node tools/check-rule-examples.js",
"node tools/fetch-docs-links.js",
"git add docs/src/_data/further_reading_links.json"
],
"docs/**/*.svg": "npx -y svgo -r --multipass"
},
"files": [
"LICENSE",
"README.md",
"bin",
"conf",
"lib",
"messages"
],
"repository": "eslint/eslint",
"funding": "https://eslint.org/donate",
"homepage": "https://eslint.org",
"bugs": "https://github.com/eslint/eslint/issues/",
"dependencies": {
"@eslint-community/eslint-utils": "^4.8.0",
"@eslint-community/regexpp": "^4.12.2",
"@eslint/config-array": "^0.23.4",
"@eslint/config-helpers": "^0.5.4",
"@eslint/core": "^1.2.0",
"@eslint/plugin-kit": "^0.7.0",
"@humanfs/node": "^0.16.6",
"@humanwhocodes/module-importer": "^1.0.1",
"@humanwhocodes/retry": "^0.4.2",
"@types/estree": "^1.0.6",
"ajv": "^6.14.0",
"cross-spawn": "^7.0.6",
"debug": "^4.3.2",
"escape-string-regexp": "^4.0.0",
"eslint-scope": "^9.1.2",
"eslint-visitor-keys": "^5.0.1",
"espree": "^11.2.0",
"esquery": "^1.7.0",
"esutils": "^2.0.2",
"fast-deep-equal": "^3.1.3",
"file-entry-cache": "^8.0.0",
"find-up": "^5.0.0",
"glob-parent": "^6.0.2",
"ignore": "^5.2.0",
"imurmurhash": "^0.1.4",
"is-glob": "^4.0.0",
"json-stable-stringify-without-jsonify": "^1.0.1",
"minimatch": "^10.2.4",
"natural-compare": "^1.4.0",
"optionator": "^0.9.3"
},
"devDependencies": {
"@arethetypeswrong/cli": "^0.18.0",
"@babel/core": "^7.4.3",
"@babel/preset-env": "^7.4.3",
"@cypress/webpack-preprocessor": "^6.0.2",
"@eslint/eslintrc": "^3.3.5",
"@eslint/json": "^1.2.0",
"@types/esquery": "^1.5.4",
"@types/node": "^22.13.14",
"@typescript-eslint/parser": "^8.56.0",
"babel-loader": "^8.0.5",
"c8": "^11.0.0",
"chai": "^4.0.1",
"cheerio": "^0.22.0",
"common-tags": "^1.8.0",
"core-js": "^3.1.3",
"cypress": "^14.1.0",
"ejs": "^3.0.2",
"eslint": "file:.",
"eslint-config-eslint": "file:packages/eslint-config-eslint",
"eslint-plugin-eslint-plugin": "^7.3.2",
"eslint-plugin-expect-type": "^0.6.0",
"eslint-plugin-yml": "^1.14.0",
"eslint-release": "^3.3.0",
"eslint-rule-extender": "^0.0.1",
"eslump": "^3.0.0",
"esprima": "^4.0.1",
"fs-teardown": "^0.1.3",
"glob": "^10.0.0",
"globals": "^16.2.0",
"got": "^11.8.3",
"gray-matter": "^4.0.3",
"jiti": "^2.6.1",
"knip": "^5.60.2",
"lint-staged": "^11.0.0",
"markdown-it": "^12.2.0",
"markdown-it-container": "^3.0.0",
"markdownlint-cli2": "^0.22.0",
"marked": "^4.0.8",
"metascraper": "^5.25.7",
"metascraper-description": "^5.25.7",
"metascraper-image": "^5.29.3",
"metascraper-logo": "^5.25.7",
"metascraper-logo-favicon": "^5.25.7",
"metascraper-title": "^5.25.7",
"mocha": "^11.7.1",
"node-polyfill-webpack-plugin": "^1.0.3",
"npm-license": "^0.3.3",
"prettier": "3.8.1",
"progress": "^2.0.3",
"proxyquire": "^2.0.1",
"recast": "^0.23.0",
"regenerator-runtime": "^0.14.0",
"semver": "^7.5.3",
"shelljs": "^0.10.0",
"sinon": "^11.0.0",
"typescript": "^5.9.3",
"webpack": "^5.23.0",
"webpack-cli": "^4.5.0",
"yorkie": "^2.0.0"
},
"peerDependencies": {
"jiti": "*"
},
"peerDependenciesMeta": {
"jiti": {
"optional": true
}
},
"keywords": [
"ast",
"lint",
"javascript",
"ecmascript",
"espree"
],
"license": "MIT",
"engines": {
"node": "^20.19.0 || ^22.13.0 || >=24"
}
}
@@ -0,0 +1,32 @@
{{# def.definitions }}
{{# def.errors }}
{{# def.setupKeyword }}
{{# def.setupNextLevel }}
{{
var $currentBaseId = $it.baseId
, $allSchemasEmpty = true;
}}
{{~ $schema:$sch:$i }}
{{? {{# def.nonEmptySchema:$sch }} }}
{{
$allSchemasEmpty = false;
$it.schema = $sch;
$it.schemaPath = $schemaPath + '[' + $i + ']';
$it.errSchemaPath = $errSchemaPath + '/' + $i;
}}
{{# def.insertSubschemaCode }}
{{# def.ifResultValid }}
{{?}}
{{~}}
{{? $breakOnError }}
{{? $allSchemasEmpty }}
if (true) {
{{??}}
{{= $closingBraces.slice(0,-1) }}
{{?}}
{{?}}
@@ -0,0 +1,50 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.useMergeRefs = void 0;
var tslib_1 = require("tslib");
var React = tslib_1.__importStar(require("react"));
var assignRef_1 = require("./assignRef");
var useRef_1 = require("./useRef");
var useIsomorphicLayoutEffect = typeof window !== 'undefined' ? React.useLayoutEffect : React.useEffect;
var currentValues = new WeakMap();
/**
* Merges two or more refs together providing a single interface to set their value
* @param {RefObject|Ref} refs
* @returns {MutableRefObject} - a new ref, which translates all changes to {refs}
*
* @see {@link mergeRefs} a version without buit-in memoization
* @see https://github.com/theKashey/use-callback-ref#usemergerefs
* @example
* const Component = React.forwardRef((props, ref) => {
* const ownRef = useRef();
* const domRef = useMergeRefs([ref, ownRef]); // 👈 merge together
* return <div ref={domRef}>...</div>
* }
*/
function useMergeRefs(refs, defaultValue) {
var callbackRef = (0, useRef_1.useCallbackRef)(defaultValue || null, function (newValue) {
return refs.forEach(function (ref) { return (0, assignRef_1.assignRef)(ref, newValue); });
});
// handle refs changes - added or removed
useIsomorphicLayoutEffect(function () {
var oldValue = currentValues.get(callbackRef);
if (oldValue) {
var prevRefs_1 = new Set(oldValue);
var nextRefs_1 = new Set(refs);
var current_1 = callbackRef.current;
prevRefs_1.forEach(function (ref) {
if (!nextRefs_1.has(ref)) {
(0, assignRef_1.assignRef)(ref, null);
}
});
nextRefs_1.forEach(function (ref) {
if (!prevRefs_1.has(ref)) {
(0, assignRef_1.assignRef)(ref, current_1);
}
});
}
currentValues.set(callbackRef, refs);
}, [refs]);
return callbackRef;
}
exports.useMergeRefs = useMergeRefs;
@@ -0,0 +1,9 @@
/**
* @license lucide-react v0.469.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
export { default } from './grid-2x2.js';
//# sourceMappingURL=grid-2-x-2.js.map
@@ -0,0 +1,62 @@
# side-channel-list <sup>[![Version Badge][npm-version-svg]][package-url]</sup>
[![github actions][actions-image]][actions-url]
[![coverage][codecov-image]][codecov-url]
[![License][license-image]][license-url]
[![Downloads][downloads-image]][downloads-url]
[![npm badge][npm-badge-png]][package-url]
Store information about any JS value in a side channel, using a linked list.
Warning: this implementation will leak memory until you `delete` the `key`.
Use [`side-channel`](https://npmjs.com/side-channel) for the best available strategy.
## Getting started
```sh
npm install --save side-channel-list
```
## Usage/Examples
```js
const assert = require('assert');
const getSideChannelList = require('side-channel-list');
const channel = getSideChannelList();
const key = {};
assert.equal(channel.has(key), false);
assert.throws(() => channel.assert(key), TypeError);
channel.set(key, 42);
channel.assert(key); // does not throw
assert.equal(channel.has(key), true);
assert.equal(channel.get(key), 42);
channel.delete(key);
assert.equal(channel.has(key), false);
assert.throws(() => channel.assert(key), TypeError);
```
## Tests
Clone the repo, `npm install`, and run `npm test`
[package-url]: https://npmjs.org/package/side-channel-list
[npm-version-svg]: https://versionbadg.es/ljharb/side-channel-list.svg
[deps-svg]: https://david-dm.org/ljharb/side-channel-list.svg
[deps-url]: https://david-dm.org/ljharb/side-channel-list
[dev-deps-svg]: https://david-dm.org/ljharb/side-channel-list/dev-status.svg
[dev-deps-url]: https://david-dm.org/ljharb/side-channel-list#info=devDependencies
[npm-badge-png]: https://nodei.co/npm/side-channel-list.png?downloads=true&stars=true
[license-image]: https://img.shields.io/npm/l/side-channel-list.svg
[license-url]: LICENSE
[downloads-image]: https://img.shields.io/npm/dm/side-channel-list.svg
[downloads-url]: https://npm-stat.com/charts.html?package=side-channel-list
[codecov-image]: https://codecov.io/gh/ljharb/side-channel-list/branch/main/graphs/badge.svg
[codecov-url]: https://app.codecov.io/gh/ljharb/side-channel-list/
[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/ljharb/side-channel-list
[actions-url]: https://github.com/ljharb/side-channel-list/actions
@@ -0,0 +1 @@
{"version":3,"file":"git-pull-request.js","sources":["../../../src/icons/git-pull-request.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name GitPullRequest\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8Y2lyY2xlIGN4PSIxOCIgY3k9IjE4IiByPSIzIiAvPgogIDxjaXJjbGUgY3g9IjYiIGN5PSI2IiByPSIzIiAvPgogIDxwYXRoIGQ9Ik0xMyA2aDNhMiAyIDAgMCAxIDIgMnY3IiAvPgogIDxsaW5lIHgxPSI2IiB4Mj0iNiIgeTE9IjkiIHkyPSIyMSIgLz4KPC9zdmc+Cg==) - https://lucide.dev/icons/git-pull-request\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst GitPullRequest = createLucideIcon('GitPullRequest', [\n ['circle', { cx: '18', cy: '18', r: '3', key: '1xkwt0' }],\n ['circle', { cx: '6', cy: '6', r: '3', key: '1lh9wr' }],\n ['path', { d: 'M13 6h3a2 2 0 0 1 2 2v7', key: '1yeb86' }],\n ['line', { x1: '6', x2: '6', y1: '9', y2: '21', key: 'rroup' }],\n]);\n\nexport default GitPullRequest;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAiB,iBAAiB,gBAAkB,CAAA,CAAA,CAAA;AAAA,CACxD,CAAA,CAAC,QAAU,CAAA,CAAA,CAAA,CAAE,EAAI,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAM,CAAI,CAAA,CAAA,CAAA,IAAA,CAAM,CAAA,CAAG,EAAA,CAAA,CAAA,CAAA,CAAA,CAAK,GAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAU,CAAA,CAAA;AAAA,CACxD,CAAA,CAAC,QAAU,CAAA,CAAA,CAAA,CAAE,EAAI,CAAA,CAAA,CAAA,CAAA,CAAA,EAAK,CAAI,CAAA,CAAA,CAAA,GAAA,CAAK,CAAA,CAAG,EAAA,CAAA,CAAA,CAAA,CAAA,CAAK,GAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAU,CAAA,CAAA;AAAA,CAAA,CACtD,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAA2B,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CACxD,CAAA,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAE,CAAA,CAAA,CAAA,EAAI,CAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAI,CAAK,CAAA,CAAA,CAAA,CAAA,EAAA,CAAI,CAAA,CAAA,CAAA,CAAK,CAAA,CAAA,CAAA,CAAA,CAAI,CAAA,CAAA,CAAA,CAAA,CAAM,EAAA,CAAA,CAAA,CAAA,CAAA,CAAK,SAAS,CAAA;AAChE,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1,17 @@
/**
* @license lucide-react v0.469.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const Mails = createLucideIcon("Mails", [
["rect", { width: "16", height: "13", x: "6", y: "4", rx: "2", key: "1drq3f" }],
["path", { d: "m22 7-7.1 3.78c-.57.3-1.23.3-1.8 0L6 7", key: "xn252p" }],
["path", { d: "M2 8v11c0 1.1.9 2 2 2h14", key: "n13cji" }]
]);
export { Mails as default };
//# sourceMappingURL=mails.js.map
@@ -0,0 +1 @@
{"version":3,"file":"dribbble.js","sources":["../../../src/icons/dribbble.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name Dribbble\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8Y2lyY2xlIGN4PSIxMiIgY3k9IjEyIiByPSIxMCIgLz4KICA8cGF0aCBkPSJNMTkuMTMgNS4wOUMxNS4yMiA5LjE0IDEwIDEwLjQ0IDIuMjUgMTAuOTQiIC8+CiAgPHBhdGggZD0iTTIxLjc1IDEyLjg0Yy02LjYyLTEuNDEtMTIuMTQgMS0xNi4zOCA2LjMyIiAvPgogIDxwYXRoIGQ9Ik04LjU2IDIuNzVjNC4zNyA2IDYgOS40MiA4IDE3LjcyIiAvPgo8L3N2Zz4K) - https://lucide.dev/icons/dribbble\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n * @deprecated Brand icons have been deprecated and are due to be removed, please refer to https://github.com/lucide-icons/lucide/issues/670. We recommend using https://simpleicons.org/?q=dribbble instead. This icon will be removed in v1.0\n */\nconst Dribbble = createLucideIcon('Dribbble', [\n ['circle', { cx: '12', cy: '12', r: '10', key: '1mglay' }],\n ['path', { d: 'M19.13 5.09C15.22 9.14 10 10.44 2.25 10.94', key: 'hpej1' }],\n ['path', { d: 'M21.75 12.84c-6.62-1.41-12.14 1-16.38 6.32', key: '1tr44o' }],\n ['path', { d: 'M8.56 2.75c4.37 6 6 9.42 8 17.72', key: 'kbh691' }],\n]);\n\nexport default Dribbble;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAW,iBAAiB,UAAY,CAAA,CAAA,CAAA;AAAA,CAC5C,CAAA,CAAC,QAAU,CAAA,CAAA,CAAA,CAAE,EAAI,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAM,CAAI,CAAA,CAAA,CAAA,IAAA,CAAM,CAAA,CAAG,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAM,GAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAU,CAAA,CAAA;AAAA,CAAA,CACzD,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAA8C,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,SAAS,CAAA,CAAA;AAAA,CAAA,CAC1E,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAA8C,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CAC3E,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAoC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AACnE,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1,9 @@
/**
* @license lucide-react v0.469.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
export { default } from './circle-arrow-up.js';
//# sourceMappingURL=arrow-up-circle.js.map