docs: 仓库链接指向本镜像仓库
Dev Build / cleanup (push) Waiting to run
Dev Build / typecheck (push) Waiting to run

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":"bot-off.js","sources":["../../../src/icons/bot-off.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name BotOff\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMTMuNjcgOEgxOGEyIDIgMCAwIDEgMiAydjQuMzMiIC8+CiAgPHBhdGggZD0iTTIgMTRoMiIgLz4KICA8cGF0aCBkPSJNMjAgMTRoMiIgLz4KICA8cGF0aCBkPSJNMjIgMjIgMiAyIiAvPgogIDxwYXRoIGQ9Ik04IDhINmEyIDIgMCAwIDAtMiAydjhhMiAyIDAgMCAwIDIgMmgxMmEyIDIgMCAwIDAgMS40MTQtLjU4NiIgLz4KICA8cGF0aCBkPSJNOSAxM3YyIiAvPgogIDxwYXRoIGQ9Ik05LjY3IDRIMTJ2Mi4zMyIgLz4KPC9zdmc+) - https://lucide.dev/icons/bot-off\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 BotOff = createLucideIcon('BotOff', [\n ['path', { d: 'M13.67 8H18a2 2 0 0 1 2 2v4.33', key: '7az073' }],\n ['path', { d: 'M2 14h2', key: 'vft8re' }],\n ['path', { d: 'M20 14h2', key: '4cs60a' }],\n ['path', { d: 'M22 22 2 2', key: '1r8tn9' }],\n ['path', { d: 'M8 8H6a2 2 0 0 0-2 2v8a2 2 0 0 0 2 2h12a2 2 0 0 0 1.414-.586', key: 's09a7a' }],\n ['path', { d: 'M9 13v2', key: 'rq6x2g' }],\n ['path', { d: 'M9.67 4H12v2.33', key: '110xot' }],\n]);\n\nexport default BotOff;\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,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAkC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,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,CAC/D,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,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AAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AAClD,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1 @@
{"version":3,"file":"clock-arrow-down.js","sources":["../../../src/icons/clock-arrow-down.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name ClockArrowDown\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMTIuMzM4IDIxLjk5NEExMCAxMCAwIDEgMSAyMS45MjUgMTMuMjI3IiAvPgogIDxwYXRoIGQ9Ik0xMiA2djZsMiAxIiAvPgogIDxwYXRoIGQ9Im0xNCAxOCA0IDQgNC00IiAvPgogIDxwYXRoIGQ9Ik0xOCAxNHY4IiAvPgo8L3N2Zz4K) - https://lucide.dev/icons/clock-arrow-down\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 ClockArrowDown = createLucideIcon('ClockArrowDown', [\n ['path', { d: 'M12.338 21.994A10 10 0 1 1 21.925 13.227', key: '1i7shu' }],\n ['path', { d: 'M12 6v6l2 1', key: '19cm8n' }],\n ['path', { d: 'm14 18 4 4 4-4', key: '1waygx' }],\n ['path', { d: 'M18 14v8', key: 'irew45' }],\n]);\n\nexport default ClockArr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,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AAC3C,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 './alarm-clock-plus.js';
//# sourceMappingURL=alarm-plus.js.map
@@ -0,0 +1 @@
export { _lt as lt, _lte as lte, _gt as gt, _gte as gte, _positive as positive, _negative as negative, _nonpositive as nonpositive, _nonnegative as nonnegative, _multipleOf as multipleOf, _maxSize as maxSize, _minSize as minSize, _size as size, _maxLength as maxLength, _minLength as minLength, _length as length, _regex as regex, _lowercase as lowercase, _uppercase as uppercase, _includes as includes, _startsWith as startsWith, _endsWith as endsWith, _property as property, _properties as properties, _mime as mime, _overwrite as overwrite, _normalize as normalize, _trim as trim, _toLowerCase as toLowerCase, _toUpperCase as toUpperCase, _slugify as slugify, type $RefinementCtx as RefinementCtx, } from "../core/index.js";
@@ -0,0 +1 @@
{"version":3,"file":"otpauth.bare.esm.min.js","sources":["../src/internal/encoding/uint.js","../src/internal/global-scope.js","../src/internal/crypto/hmac-digest.js","../src/internal/encoding/base32.js","../src/internal/encoding/hex.js","../src/internal/encoding/latin1.js","../src/internal/encoding/utf8.js","../src/secret.js","../src/internal/crypto/random-bytes.js","../src/hotp.js","../src/internal/crypto/timing-safe-equal.js","../src/totp.js","../src/uri.js","../src/version.js"],"sourcesContent":["/**\n * Converts an integer to an Uint8Array.\n * @param {number} num Integer.\n * @returns {Uint8Array} Uint8Array.\n */\nconst uintDecode = (num) => {\n const buf = new ArrayBuffer(8);\n const arr = new Uint8Array(buf);\n let acc = num;\n\n for (let i = 7; i >= 0; i--) {\n if (acc === 0) break;\n arr[i] = acc & 255;\n acc -= arr[i];\n acc /= 256;\n }\n\n return arr;\n};\n\n/**\n * Converts an Uint8Array to an integer.\n * @param {Uint8Array} arr Uint8Array.\n * @returns {number} Integer.\n */\nconst uintEncode = (arr) => {\n let num = 0;\n\n for (let i = 0; i < arr.length; i++) {\n num *= 256;\n num += arr[i];\n }\n\n return num;\n};\n\nexport { uintDecode, uintEncode };\n","/**\n * \"globalThis\" ponyfill.\n * @see [A horrifying globalThis polyfill in universal JavaScript](https://mathiasbynens.be/notes/globalthis)\n * @type {Object.<string, *>}\n */\nconst globalScope = (() => {\n if (typeof globalThis === \"object\") return globalThis;\n else {\n Object.defineProperty(Object.prototype, \"__GLOBALTHIS__\", {\n get() {\n return this;\n },\n configurable: true,\n });\n try {\n // @ts-expect-error\n // eslint-disable-next-line no-undef\n if (typeof __GLOBALTHIS__ !== \"undefined\") return __GLOBALTHIS__;\n } finally {\n // @ts-expect-error\n delete Object.prototype.__GLOBALTHIS__;\n }\n }\n\n // Still unable to determine \"globalThis\", fall back to a naive method.\n if (typeof self !== \"undefined\") return self;\n else if (typeof window !== \"undefined\") return window;\n else if (typeof global !== \"undefined\") return global;\n\n return undefined;\n})();\n\nexport { globalScope };\n","import * as crypto from \"node:crypto\";\nimport { hmac } from \"@noble/hashes/hmac.js\";\nimport { sha1 } from \"@noble/hashes/legacy.js\";\nimport { sha224, sha256, sha384, sha512 } from \"@noble/hashes/sha2.js\";\nimport { sha3_224, sha3_256, sha3_384, sha3_512 } from \"@noble/hashes/sha3.js\";\nimport { globalScope } from \"../global-scope.js\";\n\n/**\n * @noble/hashes hash functions.\n * @type {Object.<string, sha1|sha224|sha256|sha384|sha512|sha3_224|sha3_256|sha3_384|sha3_512>}\n */\nconst nobleHashes = {\n SHA1: sha1,\n SHA224: sha224,\n SHA256: sha256,\n SHA384: sha384,\n SHA512: sha512,\n \"SHA3-224\": sha3_224,\n \"SHA3-256\": sha3_256,\n \"SHA3-384\": sha3_384,\n \"SHA3-512\": sha3_512,\n};\n\n/**\n * Canonicalizes a hash algorithm name.\n * @param {string} algorithm Hash algorithm name.\n * @returns {\"SHA1\"|\"SHA224\"|\"SHA256\"|\"SHA384\"|\"SHA512\"|\"SHA3-224\"|\"SHA3-256\"|\"SHA3-384\"|\"SHA3-512\"} Canonicalized hash algorithm name.\n */\nconst canonicalizeAlgorithm = (algorithm) => {\n switch (true) {\n case /^(?:SHA-?1|SSL3-SHA1)$/i.test(algorithm):\n return \"SHA1\";\n case /^SHA(?:2?-)?224$/i.test(algorithm):\n return \"SHA224\";\n case /^SHA(?:2?-)?256$/i.test(algorithm):\n return \"SHA256\";\n case /^SHA(?:2?-)?384$/i.test(algorithm):\n return \"SHA384\";\n case /^SHA(?:2?-)?512$/i.test(algorithm):\n return \"SHA512\";\n case /^SHA3-224$/i.test(algorithm):\n return \"SHA3-224\";\n case /^SHA3-256$/i.test(algorithm):\n return \"SHA3-256\";\n case /^SHA3-384$/i.test(algorithm):\n return \"SHA3-384\";\n case /^SHA3-512$/i.test(algorithm):\n return \"SHA3-512\";\n default:\n throw new TypeError(`Unknown hash algorithm: ${algorithm}`);\n }\n};\n\n/**\n * Calculates an HMAC digest.\n * @param {string} algorithm Algorithm.\n * @param {Uint8Array} key Key.\n * @param {Uint8Array} message Message.\n * @returns {Uint8Array} Digest.\n */\nconst hmacDigest = (algorithm, key, message) => {\n if (crypto?.createHmac) {\n const hmac = crypto.createHmac(algorithm, globalScope.Buffer.from(key));\n hmac.update(globalScope.Buffer.from(message));\n return hmac.digest();\n } else if (hmac) {\n const hash = nobleHashes[algorithm] ?? nobleHashes[canonicalizeAlgorithm(algorithm)];\n return hmac(hash, key, message);\n } else {\n throw new Error(\"Missing HMAC function\");\n }\n};\n\nexport { canonicalizeAlgorithm, hmacDigest };\n","/**\n * RFC 4648 base32 alphabet without pad.\n * @type {string}\n */\nconst ALPHABET = \"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567\";\n\n/**\n * Converts a base32 string to an Uint8Array (RFC 4648).\n * @see [LinusU/base32-decode](https://github.com/LinusU/base32-decode)\n * @param {string} str BaseLine truncated
@@ -0,0 +1,3 @@
# `react-use-previous`
This is an internal utility, not intended for public usage.
@@ -0,0 +1,6 @@
"use strict";
const isAfter = require("./isAfter.js");
function isSameOrBefore(date, input, unit) {
return !isAfter(date, input, unit);
}
module.exports = isSameOrBefore;
@@ -0,0 +1,2 @@
// Development/test mode - returns undefined so fallback to router.isServer is used
export const isServer: boolean | undefined = undefined
@@ -0,0 +1,25 @@
/**
* @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 Handshake = createLucideIcon("Handshake", [
["path", { d: "m11 17 2 2a1 1 0 1 0 3-3", key: "efffak" }],
[
"path",
{
d: "m14 14 2.5 2.5a1 1 0 1 0 3-3l-3.88-3.88a3 3 0 0 0-4.24 0l-.88.88a1 1 0 1 1-3-3l2.81-2.81a5.79 5.79 0 0 1 7.06-.87l.47.28a2 2 0 0 0 1.42.25L21 4",
key: "9pr0kb"
}
],
["path", { d: "m21 3 1 11h-2", key: "1tisrp" }],
["path", { d: "M3 3 2 14l6.5 6.5a1 1 0 1 0 3-3", key: "1uvwmv" }],
["path", { d: "M3 4h8", key: "1ep09j" }]
]);
export { Handshake as default };
//# sourceMappingURL=handshake.js.map
@@ -0,0 +1,2 @@
export {};
//# sourceMappingURL=ssePollingClient.d.ts.map
@@ -0,0 +1,4 @@
import type * as errors from "../core/errors.js";
export default function (): {
localeError: errors.$ZodErrorMap;
};
@@ -0,0 +1,733 @@
flf2a$ 7 7 18 -1 18
smisome1.flf
Downsized version of isometric1.flf - M. Lindsey (mglindse@nyx.cs.du.edu)
February 24, 1996
---
isometric1.flf
Figlet conversion by Kent Nassen (kentn@cyberspace.org), 8-10-94, based
on the fonts posted by Lennert Stock:
From: stock@fwi.uva.nl (Lennert Stock)
Date: 15 Jul 1994 00:04:25 GMT
Here are some fonts. Non-figlet I'm afraid, if you wanna convert them, be
my guest. I posted the isometric fonts before.
------------------------------------------------------------------------------
--------- L e n n e r t S t o c k
stock@fwi.uva.nl --------
$ $@
$ $@
$ $@
$ $@
$ $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\ @
/:/ _/_ @
/::-"\__\@
\;:;-",-"@
|:| | @
\|__| @@
___ @
/\__\ @
/:/ / @
/:/__/ @
\:\ \ @
\:\__\ @
\/__/ @@
___ @
/\__\ @
/::L_L_ @
/:/L:\__\@
\/_/:/ /@
/:/ / @
\/__/ @@
___ @
/\__\ @
/:| _|_ @
/::|/\__\@
\/|::/ /@
|:/ / @
\/__/ @@
___ @
/\ \ @
/::\ \ @
/:/\:\__\@
\:\/:/ /@
\::/ / @
\/__/ @@
___ @
/\ \ @
/::\ \ @
/::\:\__\@
\/\::/ /@
\/__/ @
@@
___ @
/\ \ @
/::\ \ @
\:\:\__\@
\::/ /@
/:/ / @
\/__/ @@
___ @
/\ \ @
/::\ \ @
/::\:\__\@
\;:::/ /@
|:\/__/ @
\|__| @@
___ @
/\ \ @
/::\ \ @
/\:\:\__\@
\:\:\/__/@
\::/ / @
\/__/ @@
___ @
/\ \ @
\:\ \ @
/::\__\@
/:/\/__/@
\/__/ @
@@
___ @
/\__\ @
/:/ _/_ @
/:/_/\__\@
\:\/:/ /@
\::/ / @
\/__/ @@
___ @
/\__\ @
/:/ _/_ @
|::L/\__\@
|::::/ /@
L;;/__/ @
@@
___ @
/\__\ @
/:/\__\ @
/:/:/\__\@
\::/:/ /@
\::/ / @
\/__/ @@
___ @
/\__\ @
|::L__L @
/::::\__\@
\;::;/__/@
|::|__| @
\/__/ @@
___ @
/\__\ @
|::L__L @
|:::\__\@
/:;;/__/@
\/__/ @
@@
___ @
/\ \ @
_\:\ \ @
/::::\__\@
\::;;/__/@
\:\__\ @
\/__/ @@
___ @
/\ \ @
/::\ \ @
/:LS:\__\@
\1994/ /@
\::/ / @
\/__/ @@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
___ @
/\ \ @
/::\ \ @
/::\:\__\@
\/\::/ /@
/:/ / @
\/__/ @@
___ @
/\ \ @
/::\ \ @
/::\:\__\@
\:\::/ /@
\::/ / @
\/__/ @@
___ @
/\ \ @
/::\ \ @
/:/\:\__\@
\:\ \/__/@
\:\__\ @
\/__/ @@
___ @
/\ \ @
/::\ \ @
/:/\:\__\@
\:\/:/ /@
\::/ / @
\/__/ @@
___ @
/\ \ @
/::\ \ @
/::\:\__\@
\:\:\/ /@
\:\/ / @
\/__/ @@
___ @
/\ \ @
/::\ \ @
/::\:\__\@
\/\:\/__/@
\/__/ @
@@
___ @
/\ \ @
/::\ \ @
/:/\:\__\@
\:\:\/__/@
\::/ / @
\/__/ @@
___ @
/\__\ @
/:/__/_ @
/::\/\__\@
\/\::/ /@
/:/ / @
\/__/ @@
___ @
/\ \ @
_\:\ \ @
/\/::\__\@
\::/\/__/@
\:\__\ @
\/__/ @@
___ @
/\ \ @
_\:\ \ @
/\/::\__\@
\::/\/__/@
\/__/ @
@@
___ @
/\__\ @
/:/ _/_ @
/::-"\__\@
\;:;-",-"@
|:| | @
\|__| @@
___ @
/\__\ @
/:/ / @
/:/__/ @
\:\ \ @
\:\__\ @
\/__/ @@
___ @
/\__\ @
/::L_L_ @
/:/L:\__\@
\/_/:/ /@
/:/ / @
\/__/ @@
___ @
/\__\ @
/:| _|_ @
/::|/\__\@
\/|::/ /@
|:/ / @
\/__/ @@
___ @
/\ \ @
/::\ \ @
/:/\:\__\@
\:\/:/ /@
\::/ / @
\/__/ @@
___ @
/\ \ @
/::\ \ @
/::\:\__\@
\/\::/ /@
\/__/ @
@@
___ @
/\ \ @
/::\ \ @
\:\:\__\@
\::/ /@
/:/ / @
\/__/ @@
___ @
/\ \ @
/::\ \ @
/::\:\__\@
\;:::/ /@
|:\/__/ @
\|__| @@
___ @
/\ \ @
/::\ \ @
/\:\:\__\@
\:\:\/__/@
\::/ / @
\/__/ @@
___ @
/\ \ @
\:\ \ @
/::\__\@
/:/\/__/@
\/__/ @
@@
___ @
/\__\ @
/:/ _/_ @
/:/_/\__\@
\:\/:/ /@
\::/ / @
\/__/ @@
___ @
/\__\ @
/:/ _/_ @
|::L/\__\@
|::::/ /@
L;;/__/ @
@@
___ @
/\__\ @
/:/\__\ @
/:/:/\__\@
\::/:/ /@
\::/ / @
\/__/ @@
___ @
/\__\ @
|::L__L @
/::::\__\@
\;::;/__/@
|::|__| @
\/__/ @@
___ @
/\__\ @
|::L__L @
|:::\__\@
/:;;/__/@
\/__/ @
@@
___ @
/\ \ @
_\:\ \ @
/::::\__\@
\::;;/__/@
\:\__\ @
\/__/ @@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
@@ -0,0 +1 @@
module.exports={A:{A:{"2":"_E"},B:{"1":"_4D","2":"_KB"},C:{"1":"_QI","2":"_HF"},D:{"1":"_bG _GC","2":"J","36":"_DJ _cH"},E:{"1":"_dB","2":"_u"},F:{"1":"_3G","2":"_YI"},G:{"2":"_YC","516":"_AD"},H:{"2":"1D"},I:{"2":"_W","36":"_X"},J:{"1":"A","2":"D"},K:{"2":"_D","36":"H"},L:{"257":"I"},M:{"1":"YC"},N:{"2":"_A"},O:{"1":"bC"},P:{"36":"J","130":"_U"},Q:{"2":"JE"},R:{"130":"KE"},S:{"1":"_C"}},B:1,C:"Web Notifications",D:true};
@@ -0,0 +1,53 @@
import { GLOBAL_TSR } from "../constants.js";
import { createPlugin } from "seroval";
//#region src/ssr/serializer/transformer.ts
/**
* Create a strongly-typed serialization adapter for SSR hydration.
* Use to register custom types with the router serializer.
*/
function createSerializationAdapter(opts) {
return opts;
}
/** Create a Seroval plugin for server-side serialization only. */
/* @__NO_SIDE_EFFECTS__ */
function makeSsrSerovalPlugin(serializationAdapter, options) {
return /* @__PURE__ */ createPlugin({
tag: "$TSR/t/" + serializationAdapter.key,
test: serializationAdapter.test,
parse: { stream(value, ctx, _data) {
return { v: ctx.parse(serializationAdapter.toSerializable(value)) };
} },
serialize(node, ctx, _data) {
options.didRun = true;
return GLOBAL_TSR + ".t.get(\"" + serializationAdapter.key + "\")(" + ctx.serialize(node.v) + ")";
},
deserialize: void 0
});
}
/** Create a Seroval plugin for client/server symmetric (de)serialization. */
/* @__NO_SIDE_EFFECTS__ */
function makeSerovalPlugin(serializationAdapter) {
return /* @__PURE__ */ createPlugin({
tag: "$TSR/t/" + serializationAdapter.key,
test: serializationAdapter.test,
parse: {
sync(value, ctx, _data) {
return { v: ctx.parse(serializationAdapter.toSerializable(value)) };
},
async async(value, ctx, _data) {
return { v: await ctx.parse(serializationAdapter.toSerializable(value)) };
},
stream(value, ctx, _data) {
return { v: ctx.parse(serializationAdapter.toSerializable(value)) };
}
},
serialize: void 0,
deserialize(node, ctx, _data) {
return serializationAdapter.fromSerializable(ctx.deserialize(node.v));
}
});
}
//#endregion
export { createSerializationAdapter, makeSerovalPlugin, makeSsrSerovalPlugin };
//# sourceMappingURL=transformer.js.map
@@ -0,0 +1 @@
{"version":3,"file":"in-memory.js","sourceRoot":"","sources":["../../../../../src/experimental/tasks/stores/in-memory.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAGH,oDAA6G;AAC7G,6CAA0C;AAU1C;;;;;;;;;;;;;;;GAeG;AACH,MAAa,iBAAiB;IAA9B;QACY,UAAK,GAAG,IAAI,GAAG,EAAsB,CAAC;QACtC,kBAAa,GAAG,IAAI,GAAG,EAAyC,CAAC;IAmM7E,CAAC;IAjMG;;;OAGG;IACK,cAAc;QAClB,OAAO,IAAA,yBAAW,EAAC,EAAE,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;IAC3C,CAAC;IAED;;OAEG;IACK,MAAM,CAAC,MAAc,EAAE,SAAkB;QAC7C,MAAM,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;QACtC,IAAI,MAAM,IAAI,SAAS,KAAK,SAAS,IAA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BACnB,UAAU,GAAG,WAAW,GAAG,CAAC,CAAC;YACjC,CAAC;iBAAM,CAAC;gBACJ,+BAA+B;gBAC/B,MAAM,IAAI,KAAK,CAAC,mBAAmB,MAAM,EAAE,CAAC,CAAC;YACjD,CAAC;QACL,CAAC;QAED,MAAM,WAAW,GAAG,UAAU,CAAC,KAAK,CAAC,UAAU,EAAE,UAAU,GAAG,SAAS,CAAC,CAAC;QACzE,MAAM,KAAK,GAAG,WAAW,CAAC,GAALine truncated
@@ -0,0 +1 @@
module.exports={A:{A:{"1":"_A","2":"_Z"},B:{"1":"_J"},C:{"1":"_oQ _XC","2":"_f","132":"_5","292":"_3E"},D:{"1":"_QG _sL","132":"_Y","260":"G"},E:{"1":"_7C","2":"_k","132":"_UQ","260":"L OD"},F:{"1":"_yF","2":"_qC","132":"_6 _jK"},G:{"1":"_8C","2":"_sC","132":"ED eD"},H:{"2":"1D"},I:{"1":"_X","2":"_W"},J:{"1":"A","129":"D"},K:{"1":"_ZB","2":"A","132":"_6 _tB"},L:{"1":"I"},M:{"1":"YC"},N:{"1":"_A"},O:{"1":"bC"},P:{"1":"_F"},Q:{"1":"JE"},R:{"1":"KE"},S:{"1":"_C"}},B:1,C:"Web Sockets",D:true};
@@ -0,0 +1,74 @@
"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 () {
var ownKeys = function(o) {
ownKeys = Object.getOwnPropertyNames || function (o) {
var ar = [];
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
return ar;
};
return ownKeys(o);
};
return function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
__setModuleDefault(result, mod);
return result;
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
exports.getModifiers = getModifiers;
exports.getDecorators = getDecorators;
const ts = __importStar(require("typescript"));
const version_check_1 = require("./version-check");
const isAtLeast48 = version_check_1.typescriptVersionIsAtLeast['4.8'];
function getModifiers(node, includeIllegalModifiers = false) {
if (node == null) {
return undefined;
}
if (isAtLeast48) {
// eslint-disable-next-line @typescript-eslint/no-deprecated -- this is safe as it's guarded
if (includeIllegalModifiers || ts.canHaveModifiers(node)) {
// eslint-disable-next-line @typescript-eslint/no-deprecated -- this is safe as it's guarded
const modifiers = ts.getModifiers(node);
return modifiers ? [...modifiers] : undefined;
}
return undefined;
}
return (
// @ts-expect-error intentional fallback for older TS versions
node.modifiers?.filter((m) => !ts.isDecorator(m)));
}
function getDecorators(node, includeIllegalDecorators = false) {
if (node == null) {
return undefined;
}
if (isAtLeast48) {
// eslint-disable-next-line @typescript-eslint/no-deprecated -- this is safe as it's guarded
if (includeIllegalDecorators || ts.canHaveDecorators(node)) {
// eslint-disable-next-line @typescript-eslint/no-deprecated -- this is safe as it's guarded
const decorators = ts.getDecorators(node);
return decorators ? [...decorators] : undefined;
}
return undefined;
}
return (
// @ts-expect-error intentional fallback for older TS versions
node.decorators?.filter(ts.isDecorator));
}
@@ -0,0 +1,6 @@
"use strict";
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
function isObject(value) {
return value !== null && typeof value === "object";
}
exports.isObject = isObject;
@@ -0,0 +1,37 @@
// @ts-ignore TS6133
import { expect, test } from "vitest";
import * as z from "zod/v3";
import { util } from "../helpers/util.js";
test("instanceof", async () => {
class Test {}
class Subtest extends Test {}
abstract class AbstractBar {
constructor(public val: string) {}
}
class Bar extends AbstractBar {}
const TestSchema = z.instanceof(Test);
const SubtestSchema = z.instanceof(Subtest);
const AbstractSchema = z.instanceof(AbstractBar);
const BarSchema = z.instanceof(Bar);
TestSchema.parse(new Test());
TestSchema.parse(new Subtest());
SubtestSchema.parse(new Subtest());
AbstractSchema.parse(new Bar("asdf"));
const bar = BarSchema.parse(new Bar("asdf"));
expect(bar.val).toEqual("asdf");
await expect(() => SubtestSchema.parse(new Test())).toThrow(/Input not instance of Subtest/);
await expect(() => TestSchema.parse(12)).toThrow(/Input not instance of Test/);
util.assertEqual<Test, z.infer<typeof TestSchema>>(true);
});
test("instanceof fatal", () => {
const schema = z.instanceof(Date).refine((d) => d.toString());
const res = schema.safeParse(null);
expect(res.success).toBe(false);
});
@@ -0,0 +1,8 @@
import { createMotionComponent } from '../../../motion/index.mjs';
function createMinimalMotionComponent(Component, options) {
return createMotionComponent(Component, options);
}
export { createMinimalMotionComponent };
//# sourceMappingURL=create.mjs.map
@@ -0,0 +1,44 @@
{
"name": "detect-libc",
"version": "2.1.2",
"description": "Node.js module to detect the C standard library (libc) implementation family and version",
"main": "lib/detect-libc.js",
"files": [
"lib/",
"index.d.ts"
],
"scripts": {
"test": "semistandard && nyc --reporter=text --check-coverage --branches=100 ava test/unit.js",
"changelog": "conventional-changelog -i CHANGELOG.md -s",
"bench": "node benchmark/detect-libc",
"bench:calls": "node benchmark/call-familySync.js && sleep 1 && node benchmark/call-isNonGlibcLinuxSync.js && sleep 1 && node benchmark/call-versionSync.js"
},
"repository": {
"type": "git",
"url": "git://github.com/lovell/detect-libc.git"
},
"keywords": [
"libc",
"glibc",
"musl"
],
"author": "Lovell Fuller <npm@lovell.info>",
"contributors": [
"Niklas Salmoukas <niklas@salmoukas.com>",
"Vinícius Lourenço <vinyygamerlol@gmail.com>"
],
"license": "Apache-2.0",
"devDependencies": {
"ava": "^2.4.0",
"benchmark": "^2.1.4",
"conventional-changelog-cli": "^5.0.0",
"eslint-config-standard": "^13.0.1",
"nyc": "^15.1.0",
"proxyquire": "^2.1.3",
"semistandard": "^14.2.3"
},
"engines": {
"node": ">=8"
},
"types": "index.d.ts"
}
@@ -0,0 +1,13 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = _regeneratorAsyncGen;
var _regenerator = require("./regenerator.js");
var _regeneratorAsyncIterator = require("./regeneratorAsyncIterator.js");
function _regeneratorAsyncGen(innerFn, outerFn, self, tryLocsList, PromiseImpl) {
return new _regeneratorAsyncIterator.default((0, _regenerator.default)().w(innerFn, outerFn, self, tryLocsList), PromiseImpl || Promise);
}
//# sourceMappingURL=regeneratorAsyncGen.js.map
@@ -0,0 +1 @@
{"version":3,"file":"zxcvbn-ts.js","sources":["../src/utils/helper.ts","../src/data/dateSplits.ts","../src/data/const.ts","../src/types.ts","../src/matcher/date/matching.ts","../../../../node_modules/fastest-levenshtein/esm/mod.js","../src/utils/levenshtein.ts","../src/utils/mergeUserInputDictionary.ts","../src/matcher/dictionary/matching.ts","../src/matcher/dictionary/variants/matching/unmunger/getCleanPasswords.ts","../src/matcher/dictionary/variants/matching/l33t.ts","../src/matcher/dictionary/variants/matching/reverse.ts","../src/matcher/regex/matching.ts","../src/scoring/utils.ts","../src/matcher/bruteforce/scoring.ts","../src/matcher/date/scoring.ts","../src/matcher/dictionary/variants/scoring/uppercase.ts","../src/matcher/dictionary/variants/scoring/l33t.ts","../src/matcher/dictionary/scoring.ts","../src/matcher/regex/scoring.ts","../src/matcher/repeat/scoring.ts","../src/matcher/sequence/scoring.ts","../src/matcher/spatial/scoring.ts","../src/matcher/separator/scoring.ts","../src/matcher/wordSequence/scoring.ts","../src/scoring/estimate.ts","../src/scoring/index.ts","../src/matcher/repeat/matching.ts","../src/matcher/sequence/matching.ts","../src/matcher/spatial/matching.ts","../src/matcher/separator/matching.ts","../src/matcher/wordSequence/matching.ts","../src/Matching.ts","../src/TimeEstimates.ts","../src/matcher/bruteforce/feedback.ts","../src/matcher/date/feedback.ts","../src/matcher/dictionary/feedback.ts","../src/matcher/regex/feedback.ts","../src/matcher/repeat/feedback.ts","../src/matcher/sequence/feedback.ts","../src/matcher/spatial/feedback.ts","../src/matcher/separator/feedback.ts","../src/matcher/wordSequence/feedback.ts","../src/Feedback.ts","../src/data/l33tTable.ts","../src/data/translationKeys.ts","../src/matcher/dictionary/variants/matching/unmunger/TrieNode.ts","../src/matcher/dictionary/variants/matching/unmunger/l33tTableToTrieNode.ts","../src/Options.ts","../src/utils/debounce.ts","../src/index.ts"],"sourcesContent":[null,null,null,null,null,"const peq = new Uint32Array(0x10000);\nconst myers_32 = (a, b) => {\n const n = a.length;\n const m = b.length;\n const lst = 1 << (n - 1);\n let pv = -1;\n let mv = 0;\n let sc = n;\n let i = n;\n while (i--) {\n peq[a.charCodeAt(i)] |= 1 << i;\n }\n for (i = 0; i < m; i++) {\n let eq = peq[b.charCodeAt(i)];\n const xv = eq | mv;\n eq |= ((eq & pv) + pv) ^ pv;\n mv |= ~(eq | pv);\n pv &= eq;\n if (mv & lst) {\n sc++;\n }\n if (pv & lst) {\n sc--;\n }\n mv = (mv << 1) | 1;\n pv = (pv << 1) | ~(xv | mv);\n mv &= xv;\n }\n i = n;\n while (i--) {\n peq[a.charCodeAt(i)] = 0;\n }\n return sc;\n};\nconst myers_x = (b, a) => {\n const n = a.length;\n const m = b.length;\n const mhc = [];\n const phc = [];\n const hsize = Math.ceil(n / 32);\n const vsize = Math.ceil(m / 32);\n for (let i = 0; i < hsize; i++) {\n phc[i] = -1;\n mhc[i] = 0;\n }\n let j = 0;\n for (; j < vsize - 1; j++) {\n let mv = 0;\n let pv = -1;\n const start = j * 32;\n const vlen = Math.min(32, m) + start;\n for (let k = start; k < vlen; k++) {\n peq[b.charCodeAt(k)] |= 1 << k;\n }\n for (let i = 0; i < n; i++) {\n const eq = peq[a.charCodeAt(i)];\n const pb = (phc[(i / 32) | 0] >>> i) & 1;\n const mb = (mhc[(i / 32) | 0] >>> i) & 1;\n const xv = eq | mv;\n const xh = ((((eq | mb) & pv) + pv) ^ pv) | eq | mb;\n let ph = mv | ~(xh | pv);\n let mh = pv & xh;\n if ((ph >>> 31) ^ pb) {\n phc[(i / 32) | 0] ^= 1 << i;\n }\n if ((mh >>> 31) ^ mb) {\n mhc[(i / 32) | 0] ^= 1 << i;\n }\n ph = (ph << 1) | pb;\n mh = (mh << 1) | mb;\n pv = mh | ~(xv | ph);\n mv = ph & xv;\n }\n for (let k = start; k < vlen; k++) {\n peq[b.charCodeAt(k)] = 0;\n }\n }\n let mv = 0;\n let pv = -1;\n const start = j * 32;\n const vlen = Math.min(32, m - start) + start;\n for (let k = start; k < vlen; k++) {\n peq[b.charCodeAt(k)] |= 1 << k;\n }\n let score = m;\n for (let i = 0; i < n; i++) {\n const eq = peq[a.charCodeAt(i)];\n const pb = (phc[(i / 32) | 0] >>> i) & 1;\n const mb = (mhc[(i / 32) | 0] >>> i) & 1;\n const xv = eq | mv;\n const xh = ((((eq | mb) & pv) + pv) ^ pv) | eq | mb;\n let ph = mv | ~(xh | pv);\n let mh = pv & xh;\n score += (ph >>> (m - 1)) & 1;\n score -= (mh >>> (m - 1)) & 1;\n if ((ph >>> 31) ^ pb) {\n phc[(i / 32) | 0] ^= 1 << i;\n }\n if ((mh >>> 31) ^ mb) {\n mhc[(i / 32) | 0] ^= 1 << i;\n }\n ph = (ph << 1) | pb;\n mh = (mh << 1) | mbLine truncated
@@ -0,0 +1 @@
{"version":3,"file":"plug-zap-2.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;"}
@@ -0,0 +1,106 @@
import { expectTypeOf, test } from "vitest";
import * as z from "zod/v4";
test("branded types", () => {
const mySchema = z
.object({
name: z.string(),
})
.brand<"superschema">();
// simple branding
type MySchema = z.infer<typeof mySchema>;
expectTypeOf<MySchema>().toEqualTypeOf<{ name: string } & z.$brand<"superschema">>();
const doStuff = (arg: MySchema) => arg;
doStuff(mySchema.parse({ name: "hello there" }));
// inheritance
const extendedSchema = mySchema.brand<"subschema">();
type ExtendedSchema = z.infer<typeof extendedSchema>;
expectTypeOf<ExtendedSchema>().toEqualTypeOf<{ name: string } & z.BRAND<"superschema"> & z.BRAND<"subschema">>();
doStuff(extendedSchema.parse({ name: "hello again" }));
// number branding
const numberSchema = z.number().brand<42>();
type NumberSchema = z.infer<typeof numberSchema>;
expectTypeOf<NumberSchema>().toEqualTypeOf<number & { [z.$brand]: { 42: true } }>();
// symbol branding
const MyBrand: unique symbol = Symbol("hello");
type MyBrand = typeof MyBrand;
const symbolBrand = z.number().brand<"sup">().brand<typeof MyBrand>();
type SymbolBrand = z.infer<typeof symbolBrand>;
// number & { [z.BRAND]: { sup: true, [MyBrand]: true } }
expectTypeOf<SymbolBrand>().toEqualTypeOf<number & z.BRAND<"sup"> & z.BRAND<MyBrand>>();
// keeping brands out of input types
const age = z.number().brand<"age">();
type Age = z.infer<typeof age>;
type AgeInput = z.input<typeof age>;
expectTypeOf<AgeInput>().not.toEqualTypeOf<Age>();
expectTypeOf<number>().toEqualTypeOf<AgeInput>();
expectTypeOf<number & z.BRAND<"age">>().toEqualTypeOf<Age>();
// @ts-expect-error
doStuff({ name: "hello there!" });
});
test("$branded", () => {
const a = z.string().brand<"a">();
expectTypeOf<typeof a>().toEqualTypeOf<z.core.$ZodBranded<z.ZodString, "a">>();
});
test("branded record", () => {
const recordWithBrandedNumberKeys = z.record(z.string().brand("SomeBrand"), z.number());
type recordWithBrandedNumberKeys = z.infer<typeof recordWithBrandedNumberKeys>;
expectTypeOf<recordWithBrandedNumberKeys>().toEqualTypeOf<Record<string & z.core.$brand<"SomeBrand">, number>>();
});
test("brand direction: out (default)", () => {
const schema = z.string().brand<"A">();
type Input = z.input<typeof schema>;
type Output = z.output<typeof schema>;
// output is branded
expectTypeOf<Output>().toEqualTypeOf<string & z.$brand<"A">>();
// input is NOT branded (default behavior)
expectTypeOf<Input>().toEqualTypeOf<string>();
});
test("brand direction: out (explicit)", () => {
const schema = z.string().brand<"A", "out">();
type Input = z.input<typeof schema>;
type Output = z.output<typeof schema>;
// output is branded
expectTypeOf<Output>().toEqualTypeOf<string & z.$brand<"A">>();
// input is NOT branded
expectTypeOf<Input>().toEqualTypeOf<string>();
});
test("brand direction: in", () => {
const schema = z.string().brand<"A", "in">();
type Input = z.input<typeof schema>;
type Output = z.output<typeof schema>;
// input is branded
expectTypeOf<Input>().toEqualTypeOf<string & z.$brand<"A">>();
// output is NOT branded
expectTypeOf<Output>().toEqualTypeOf<string>();
});
test("brand direction: inout", () => {
const schema = z.string().brand<"A", "inout">();
type Input = z.input<typeof schema>;
type Output = z.output<typeof schema>;
// both are branded
expectTypeOf<Input>().toEqualTypeOf<string & z.$brand<"A">>();
expectTypeOf<Output>().toEqualTypeOf<string & z.$brand<"A">>();
});
@@ -0,0 +1,342 @@
import { createLRUCache } from './lru-cache'
import { arraysEqual, functionalUpdate } from './utils'
import type { AnyRoute } from './route'
import type { RouterState } from './router'
import type { FullSearchSchema } from './routeInfo'
import type { ParsedLocation } from './location'
import type { AnyRedirect } from './redirect'
import type { AnyRouteMatch } from './Matches'
export interface RouterReadableStore<TValue> {
get: () => TValue
}
export interface RouterWritableStore<
TValue,
> extends RouterReadableStore<TValue> {
set: ((updater: (prev: TValue) => TValue) => void) & ((value: TValue) => void)
}
export type RouterBatchFn = (fn: () => void) => void
export type MutableStoreFactory = <TValue>(
initialValue: TValue,
) => RouterWritableStore<TValue>
export type ReadonlyStoreFactory = <TValue>(
read: () => TValue,
) => RouterReadableStore<TValue>
export type GetStoreConfig = (opts: { isServer?: boolean }) => StoreConfig
export type StoreConfig = {
createMutableStore: MutableStoreFactory
createReadonlyStore: ReadonlyStoreFactory
batch: RouterBatchFn
init?: (stores: RouterStores<AnyRoute>) => void
}
type MatchStore = RouterWritableStore<AnyRouteMatch> & {
routeId?: string
}
type ReadableStore<TValue> = RouterReadableStore<TValue>
/** SSR non-reactive createMutableStore */
export function createNonReactiveMutableStore<TValue>(
initialValue: TValue,
): RouterWritableStore<TValue> {
let value = initialValue
return {
get() {
return value
},
set(nextOrUpdater: TValue | ((prev: TValue) => TValue)) {
value = functionalUpdate(nextOrUpdater, value)
},
}
}
/** SSR non-reactive createReadonlyStore */
export function createNonReactiveReadonlyStore<TValue>(
read: () => TValue,
): RouterReadableStore<TValue> {
return {
get() {
return read()
},
}
}
export interface RouterStores<in out TRouteTree extends AnyRoute> {
status: RouterWritableStore<RouterState<TRouteTree>['status']>
loadedAt: RouterWritableStore<number>
isLoading: RouterWritableStore<boolean>
isTransitioning: RouterWritableStore<boolean>
location: RouterWritableStore<ParsedLocation<FullSearchSchema<TRouteTree>>>
resolvedLocation: RouterWritableStore<
ParsedLocation<FullSearchSchema<TRouteTree>> | undefined
>
statusCode: RouterWritableStore<number>
redirect: RouterWritableStore<AnyRedirect | undefined>
matchesId: RouterWritableStore<Array<string>>
pendingIds: RouterWritableStore<Array<string>>
/** @internal */
cachedIds: RouterWritableStore<Array<string>>
matches: ReadableStore<Array<AnyRouteMatch>>
pendingMatches: ReadableStore<Array<AnyRouteMatch>>
cachedMatches: ReadableStore<Array<AnyRouteMatch>>
firstId: ReadableStore<string | undefined>
hasPending: ReadableStore<boolean>
matchRouteDeps: ReadableStore<{
locationHref: string
resolvedLocationHref: string | undefined
status: RouterState<TRouteTree>['status']
}>
__store: RouterReadableStore<RouterState<TRouteTree>>
matchStores: Map<string, MatchStore>
pendingMatchStores: Map<string, MatchStore>
cachedMatchStores: Map<string, MatchStore>
/**
* Get a computed store that resolves a routeId to its current match state.
* Returns the same cached store instance for repeated calls with the same key.
* The computed depends on matchesId + the individual match store, so
* subscribers are only notified when the resolved match state changes.
*/
getRouteMatchStore: (
routeId: string,
) => RouterReadableStore<AnyRouteMatch | undefined>
setMatches: (nextMatches: Array<AnyRouteMatch>) => void
setPending: (nextMatches: Array<AnyRouteMatch>) => void
setCached: (nextMatches: Array<AnyRouteMatch>) => void
}
export function createRouterStores<TRouteTree extends AnyRoute>(
initialState: RouterState<TRouteTree>,
config: StoreConfig,
): RouterStores<TRouteTree> {
const { createMutableStore, createReadonlyStore, batch, init } = config
// non reactive utilities
const matchStores = new Map<string, MatchStore>()
const pendingMatchStores = new Map<string, MatchStore>()
const cachedMatchStores = new Map<string, MatchStore>()
// atoms
const status = createMutableStore(initialState.status)
const loadedAt = createMutableStore(initialState.loadedAt)
const isLoading = createMutableStore(initialState.isLoading)
const isTransitioning = createMutableStore(initialState.isTransitioning)
const location = createMutableStore(initialState.location)
const resolvedLocation = createMutableStore(initialState.resolvedLocation)
const statusCode = createMutableStore(initialState.statusCode)
const redirect = createMutableStore(initialState.redirect)
const matchesId = createMutableStore<Array<string>>([])
const pendingIds = createMutableStore<Array<string>>([])
const cachedIds = createMutableStore<Array<string>>([])
// 1st order derived stores
const matches = createReadonlyStore(() =>
readPoolMatches(matchStores, matchesId.get()),
)
const pendingMatches = createReadonlyStore(() =>
readPoolMatches(pendingMatchStores, pendingIds.get()),
)
const cachedMatches = createReadonlyStore(() =>
readPoolMatches(cachedMatchStores, cachedIds.get()),
)
const firstId = createReadonlyStore(() => matchesId.get()[0])
const hasPending = createReadonlyStore(() =>
matchesId.get().some((matchId) => {
const store = matchStores.get(matchId)
return store?.get().status === 'pending'
}),
)
const matchRouteDeps = createReadonlyStore(() => ({
locationHref: location.get().href,
resolvedLocationHref: resolvedLocation.get()?.href,
status: status.get(),
}))
// compatibility "big" state store
const __store = createReadonlyStore(() => ({
status: status.get(),
loadedAt: loadedAt.get(),
isLoading: isLoading.get(),
isTransitioning: isTransitioning.get(),
matches: matches.get(),
location: location.get(),
resolvedLocation: resolvedLocation.get(),
statusCode: statusCode.get(),
redirect: redirect.get(),
}))
// Per-routeId computed store cache.
// Each entry resolves routeId → match state through the signal graph,
// giving consumers a single store to subscribe to instead of the
// two-level byRouteId → matchStore pattern.
//
// 64 max size is arbitrary, this is only for active matches anyway so
// it should be plenty. And we already have a 32 limit due to route
// matching bitmask anyway.
const matchStoreByRouteIdCache = createLRUCache<
string,
RouterReadableStore<AnyRouteMatch | undefined>
>(64)
function getRouteMatchStore(
routeId: string,
): RouterReadableStore<AnyRouteMatch | undefined> {
let cached = matchStoreByRouteIdCache.get(routeId)
if (!cached) {
cached = createReadonlyStore(() => {
// Reading matchesId.get() tracks it as a dependency.
// When matchesId changes (navigation), this computed re-evaluates.
const ids = matchesId.get()
for (const id of ids) {
const matchStore = matchStores.get(id)
if (matchStore && matchStore.routeId === routeId) {
// Reading matchStore.get() tracks it as a dependency.
// When the match store's state changes, this re-evaluates.
return matchStore.get()
}
}
return undefined
})
matchStoreByRouteIdCache.set(routeId, cached)
}
return cached
}
const store = {
// atoms
status,
loadedAt,
isLoading,
isTransitioning,
location,
resolvedLocation,
statusCode,
redirect,
matchesId,
pendingIds,
cachedIds,
// derived
matches,
pendingMatches,
cachedMatches,
firstId,
hasPending,
matchRouteDeps,
// non-reactive state
matchStores,
pendingMatchStores,
cachedMatchStores,
// compatibility "big" state
__store,
// per-key computed stores
getRouteMatchStore,
// methods
setMatches,
setPending,
setCached,
}
// initialize the active matches
setMatches(initialState.matches as Array<AnyRouteMatch>)
init?.(store)
// setters to update non-reactive utilities in sync with the reactive stores
function setMatches(nextMatches: Array<AnyRouteMatch>) {
reconcileMatchPool(
nextMatches,
matchStores,
matchesId,
createMutableStore,
batch,
)
}
function setPending(nextMatches: Array<AnyRouteMatch>) {
reconcileMatchPool(
nextMatches,
pendingMatchStores,
pendingIds,
createMutableStore,
batch,
)
}
function setCached(nextMatches: Array<AnyRouteMatch>) {
reconcileMatchPool(
nextMatches,
cachedMatchStores,
cachedIds,
createMutableStore,
batch,
)
}
return store
}
function readPoolMatches(
pool: Map<string, MatchStore>,
ids: Array<string>,
): Array<AnyRouteMatch> {
const matches: Array<AnyRouteMatch> = []
for (const id of ids) {
const matchStore = pool.get(id)
if (matchStore) {
matches.push(matchStore.get())
}
}
return matches
}
function reconcileMatchPool(
nextMatches: Array<AnyRouteMatch>,
pool: Map<string, MatchStore>,
idStore: RouterWritableStore<Array<string>>,
createMutableStore: MutableStoreFactory,
batch: RouterBatchFn,
): void {
const nextIds = nextMatches.map((d) => d.id)
const nextIdSet = new Set(nextIds)
batch(() => {
for (const id of pool.keys()) {
if (!nextIdSet.has(id)) {
pool.delete(id)
}
}
for (const nextMatch of nextMatches) {
const existing = pool.get(nextMatch.id)
if (!existing) {
const matchStore = createMutableStore(nextMatch) as MatchStore
matchStore.routeId = nextMatch.routeId
pool.set(nextMatch.id, matchStore)
continue
}
existing.routeId = nextMatch.routeId
if (existing.get() !== nextMatch) {
existing.set(nextMatch)
}
}
if (!arraysEqual(idStore.get(), nextIds)) {
idStore.set(nextIds)
}
})
}
@@ -0,0 +1 @@
{"version":3,"names":["_buffer","require","_index","_nodes","_t","_tokenMap","_types2","isExpression","isFunction","isStatement","isClassBody","isTSInterfaceBody","isTSEnumMember","SCIENTIFIC_NOTATION","ZERO_DECIMAL_INTEGER","HAS_NEWLINE","HAS_NEWLINE_OR_BlOCK_COMMENT_END","commentIsNewline","c","type","test","value","Printer","constructor","format","map","tokens","originalCode","tokenContext","TokenContext","normal","_tokens","_originalCode","_currentNode","_currentTypeId","_indent","_indentRepeat","_insideAux","_noLineTerminator","_noLineTerminatorAfterNode","_printAuxAfterOnNextUserNode","_printedComments","Set","_lastCommentLine","_innerCommentsState","_flags","tokenMap","_boundGetRawIdentifier","_printSemicolonBeforeNextNode","_printSemicolonBeforeNextToken","indent","style","length","_inputMap","_buf","Buffer","preserveFormat","compact","concise","retainLines","retainFunctionParens","auxiliaryCommentBefore","auxiliaryCommentAfter","enterDelimited","oldNoLineTerminatorAfterNode","generate","ast","TokenMap","_getRawIdentifier","bind","print","_maybeAddAuxComment","get","flags","dedent","semicolon","force","node","start","end","endMatches","getCurrentLine","indexes","getIndexes","_catchUpTo","loc","_appendChar","_queue","rightBrace","minified","removeLastSemicolon","sourceWithOffset","token","rightParens","space","_space","lastCp","getLastChar","word","str","noLineTerminatorAfter","forInOrInitHeadAccumulatePassThroughMask","_maybePrintInnerComments","_catchUpToCurrentToken","lastChar","charCodeAt","_append","setLastChar","number","isNonDecimalLiteral","secondChar","Number","isInteger","maybeNewline","occurrenceCount","mayNeedSpace","strFirst","tokenChar","char","newline","i","getNewlineCount","j","_newline","endsWith","checkQueue","_last","exactSource","cb","_catchUp","source","prop","columnOffset","sourceIdentifierName","identifierName","pos","_canMarkIdName","sourcePosition","_sourcePosition","identifierNamePos","_queuedChar","findMatching","_maybeIndent","append","noIndent","appendChar","queue","_shouldIndent","catchUp","line","count","column","index","spacesCount","getCurrentColumn","spaces","slice","replace","repeat","setSourcePosition","printTerminatorless","resetTokenContext","trailingCommentsLineOffset","_node$leadingComments","_node$leadingComments2","extra","changedFlags","_compact","nodeInfo","generatorInfosMap","undefined","ReferenceError","JSON","stringify","name","printMethod","nodeId","needsParens","parent","parentId","oldInAux","oldTokenContext","forInOrInitHeadAccumulate","parenthesized","shouldPrintParens","parentNeedsParens","leadingComments","callee","indentParenthesized","some","isLastChild","_node$trailingComment","trailingComments","_printLeadingComments","_printTrailingComments","enteredPositionlessNode","_printAuxBeforeComment","_printAuxAfterComment","comment","_printComment","getPossibleRaw","raw","rawValue","printJoin","nodes","statement","separator","printTrailingSeparator","_nodes$0$loc","startLine","len","hasContent","call","lastCommentLine","_nodes$loc","offset","printAndIndentOnComments","printBlock","body","lineOffset","innerComments","_printComments","comments","nextTokenStr","nextTokenOccurrenceCount","_this$tokenMap","state","printInnerComments","nextToken","hasSpace","noIndentInnerCommentsHere","printSequence","printList","items","commaSeparator","shouldPrintTrailingComma","listEnd","listEndIndex","findLastIndex","matchesOriginal","String","fromCharCode","_shouldPrintComment","ignore","has","commentTok","find","add","shouldPrintComment","skipNewLines","noLineTerminator","isBlockComment","printNewLines","val","adjustMultilineComment","_comment$loc","newlineRegex","RegExp","indentSize","nodeLoc","hasLoc","nodeStartLine","nodeEndLine","lastLine","leadingCommentNewline","shouldPrint","commentStartLine","commentEndLine","Math","max","min","singleLine","shouldSkipNewline","properties","_default","exports","default","last"],"sources":["../src/printer.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-unsafe-enum-comparison */\n\nimport Buffer from \"./buffer.ts\";\nimport type { Loc, Pos } from \"./buffer.ts\";\nimport { isLastChild, parentNeedsParens } from \"./node/index.ts\";\nimport { generatorInfosMap } from \"./nodes.ts\";\nimport type * as t from \"@babel/types\";\nimport {\n isExpression,\n isFunction,\n isStatement,\n isClassBody,\n isTSInterfaceBody,\n isTSEnumMember,\n} from \"@babel/types\";\nimport type { Opts as jsescOptions } from \"jsesc\";\n\nimport { TokenMap } from \"./token-map.ts\";\n\nimport type { GeneratorOptions } from \"./index.ts\";\nimport type SourceMap from \"./source-map.ts\";\nimport type { TraceMap } from \"@jridgewell/trace-mapping\";\nimport type { Token } from \"@babel/parser\";\n\n// We inline this package\n// eslint-disable-next-line import/no-extraneous-dependencies\nimport * as charCodes from \"charcodes\";\n\nconst SCIENTIFIC_NOTATION = /e/i;\nconst ZERO_DECIMAL_INTEGER = /\\.0+$/;\nconst HAS_NEWLINE = /[\\n\\r\\uLine truncated
@@ -0,0 +1,626 @@
flf2a$ 6 4 20 0 13
Based on cursive(6) by Jan Wolter <janc@crim.eecs.umich.edu> on 24 Jul 1985
Figlet-ized and by Wendell Hicken <whicken@parasoft.com> on 5 Mar 1994
Added missing punctuation and numbers
Ammended by Jerrad Pierce <jpierce@cpan.org> on 8 Aug 2002
Underscore and dash have been updated to more closely match cursive(6)
The '_' character is treated in a special way. It may be
inserted in the text anywhere you wish to lengthen a con-
necting line between two letters.
Changed 2004-02-18: Bugfix in '-' character by Markus Gebhard
Changed 2012-05-21: Update to '-' character by patorjk
$$@
$$@
$$@
$$@
$$@
$$@@
@
/@
/ @
' @
o @
@@
@
o o@
' '@
@
@
@@
/ /@
-/-/-@
-/-/- @
/ / @
@
@@
,-/-@
(_/ @
/ ) @
-/-' @
@
@@
() /@
/ @
/ @
/ ()@
@
@@
() @
/\ @
( X @
\/ \@
@
@@
@
o@
'@
@
@
@@
_/@
/ @
/ @
/ @
@
@@
/@
/@
_/ @
/ @
@
@@
@
\ / @
--X--@
/ \ @
@
@@
@
/ @
--/--@
/ @
@
@@
@
@
@
o@
'@
@@
$$$@
$$$@
---@
$$$@
$$$@
$$$@@
@
@
@
o@
@
@@
/@
/ @
/ @
/ @
@
@@
__ @
/ )@
/ / @
(__/ @
@
@@
_@
/@
/ @
/ @
@
@@
__ @
)@
.--' @
(__ @
@
@@
__ @
)@
-/ @
___/ @
@
@@
@
/ /@
'--/ @
/ @
@
@@
___@
/ @
'--. @
___) @
@
@@
@
/ @
/_ @
(__)@
@
@@
___@
/@
-/-@
/ @
@
@@
__ @
( )@
./' @
(__) @
@
@@
__ @
(__)@
/ @
/ @
@
@@
@
@
o@
@
o @
@@
@
@
o@
@
o @
' @@
/@
/ @
\ @
\@
@
@@
@
@
---@
---@
@
@@
\ @
\@
/@
/ @
@
@@
__ @
__)@
/ @
o @
@
@@
@
_ @
/o\ @
(____@
@
@@
__ @
/ )@
/--/ @
/ (_ @
@
@@
__ @
/ )@
/--< @
/___/_@
@
@@
__ @
/ )@
/ @
(__/ @
@
@@
__ @
/ )@
/ / @
/__/_ @
@
@@
__ @
/ `@
/-- @
(___, @
@
@@
_____@
/ '@
,-/-, @
(_/ @
@
@@
() ,@
/`-'|@
/ / @
/__-<_ @
@
@@
_ ,@
' ) / @
/--/ @
/ (_ @
@
@@
_ @
| )@
,---|/ @
\_/ \_@
@
@@
___ @
( >@
__/_@
/ / @
<_/ @
@@
_ ,@
' ) / @
/-< @
/ ) @
@
@@
_@
_//@
/ @
/___@
@
@@
_ _ _ @
' ) ) )@
/ / / @
/ ' (_ @
@
@@
_ __ @
' ) )@
/ / @
/ (_ @
@
@@
__ @
/ ')@
/ / @
(__/ @
@
@@
_ __ @
' ) )@
/--' @
/ @
@
@@
__ @
/ )@
/ / @
(_\/ @
` @
@@
_ __ @
' ) )@
/--' @
/ \_ @
@
@@
() @
/\ @
/ ) @
/__/__@
@
@@
______@
/ @
--/ @
(_/ @
@
@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
@@
__ @
/ )@
/--< @
_/___/_@
/ @
@@
@@ -0,0 +1 @@
{"version":3,"names":["_parser","data","require","_codeFrame","_missingPluginHelper","parser","pluginPasses","parserOpts","highlightCode","filename","code","results","plugins","plugin","parserOverride","ast","parse","undefined","push","length","then","Error","err","message","startLine","startColumn","repeat","loc","missingPlugin","codeFrame","codeFrameColumns","start","line","column","generateMissingPluginMessage"],"sources":["../../src/parser/index.ts"],"sourcesContent":["import type { Handler } from \"gensync\";\nimport { parse, type ParseResult } from \"@babel/parser\";\nimport { codeFrameColumns } from \"@babel/code-frame\";\nimport generateMissingPluginMessage from \"./util/missing-plugin-helper.ts\";\nimport type { PluginPasses } from \"../config/index.ts\";\nimport type { ResolvedOptions } from \"../config/validation/options.ts\";\n\nexport type { ParseResult };\n\nexport default function* parser(\n pluginPasses: PluginPasses,\n { parserOpts, highlightCode = true, filename = \"unknown\" }: ResolvedOptions,\n code: string,\n): Handler<ParseResult> {\n try {\n const results = [];\n for (const plugins of pluginPasses) {\n for (const plugin of plugins) {\n const { parserOverride } = plugin;\n if (parserOverride) {\n const ast = parserOverride(code, parserOpts, parse);\n\n if (ast !== undefined) results.push(ast);\n }\n }\n }\n\n if (results.length === 0) {\n return parse(code, parserOpts);\n } else if (results.length === 1) {\n // If we want to allow async parsers\n yield* [];\n if (typeof (results[0] as any).then === \"function\") {\n throw new Error(\n `You appear to be using an async parser plugin, ` +\n `which your current version of Babel does not support. ` +\n `If you're using a published plugin, you may need to upgrade ` +\n `your @babel/core version.`,\n );\n }\n return results[0];\n }\n // TODO: Add an error code\n throw new Error(\"More than one plugin attempted to override parsing.\");\n } catch (err) {\n if (err.code === \"BABEL_PARSER_SOURCETYPE_MODULE_REQUIRED\") {\n err.message +=\n \"\\nConsider renaming the file to '.mjs', or setting sourceType:module \" +\n \"or sourceType:unambiguous in your Babel config for this file.\";\n // err.code will be changed to BABEL_PARSE_ERROR later.\n }\n\n const startLine = parserOpts?.startLine;\n const startColumn = parserOpts?.startColumn;\n\n if (startColumn != null) {\n code = \" \".repeat(startColumn) + code;\n }\n\n const { loc, missingPlugin } = err;\n if (loc) {\n const codeFrame = codeFrameColumns(\n code,\n {\n start: {\n line: loc.line,\n column: loc.column + 1,\n },\n },\n {\n highlightCode,\n startLine,\n },\n );\n if (missingPlugin) {\n err.message =\n `${filename}: ` +\n generateMissingPluginMessage(\n missingPlugin[0],\n loc,\n codeFrame,\n filename,\n );\n } else {\n err.message = `${filename}: ${err.message}\\n\\n` + codeFrame;\n }\n err.code = \"BABEL_PARSE_ERROR\";\n }\n throw err;\n }\n}\n"],"mappings":";;;;;;AACA,SAAAA,QAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,OAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAE,WAAA;EAAA,MAAAF,IAAA,GAAAC,OAAA;EAAAC,UAAA,YAAAA,CAAA;IAAA,OAAAF,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,IAAAG,oBAAA,GAAAF,OAAA;AAMe,UAAUG,MAAMA,CAC7BC,YAA0B,EAC1B;EAAEC,UAAU;EAAEC,aAAa,GAAG,IAAI;EAAEC,QAAQ,GAAG;AAA2B,CAAC,EAC3EC,IAAY,EACU;EACtB,IAAI;IACF,MAAMC,OAAO,GAAG,EAAE;IAClB,KAAK,MAAMC,OAAO,IAAIN,YAAY,EAAE;MAClC,KAAK,MAAMO,MAAM,IAAID,OAAO,EAAE;QAC5B,MAAM;UAAEE;QAAe,CAAC,GAAGD,MAAM;QACjC,IAAIC,cAAc,EAAE;UAClB,MAAMC,GAAG,GAAGD,cAAc,CAACJ,IAAI,EAAEH,UAAU,EAAES,eAAK,CAAC;UAEnD,IAAID,GAAG,KAAKE,SAAS,EAAEN,OAAO,CAACO,IAAI,CAACH,GAAG,CAAC;QAC1C;MACF;IACF;IAEA,IAAIJ,OAAO,CAACQ,MAAM,KAAK,CAAC,EAAE;MACxB,OAAO,IAAAH,eAAK,EAACN,IAAI,EAAEH,UAAU,CAAC;IAChC,CAAC,MAAM,IAAII,OAAO,CAACQ,MAAM,KAAK,CAAC,EAAE;MAE/B,OAAO,EAAE;MACT,IAAI,OAAQR,OAAO,CAAC,CAAC,CAAC,CAASS,IAAI,KAAK,UAAU,EAAE;QAClD,MAAM,IAAIC,KAAK,CACb,iDAAiD,GAC/C,wDAAwD,GACxD,8DAA8D,GAC9D,2BACJ,CAAC;MACH;MACA,OAAOV,OAAO,CAAC,CAAC,CAAC;IACnB;IAEA,MAAM,IAAIU,KAAK,CAAC,qDAAqD,CAAC;EACxE,CAAC,CAAC,OAAOC,GAAG,EAAE;IACZ,IAAIA,GAAG,CAACZ,IAAI,KAAK,yCAAyC,EAAE;MAC1DY,GAAG,CAACC,OAAO,IACT,uEAAuE,GACvE,+DAA+D;IAEnE;IAEA,MAAMC,SAAS,GAAGjB,UAAU,oBAAVA,UAAU,CAAEiB,SAAS;IACvC,MAAMC,WAAW,GAAGlB,UAAU,oBAAVA,UAAU,CAAEkB,WAAW;IAE3C,IAAIA,WAAW,IAAI,IAAI,EAAE;MACvBf,IAAI,GAAG,GAAG,CAACgB,MAAM,CAACD,WAAW,CAAC,GAAGf,IAAI;IACvC;IAEA,MAAM;MAAEiB,GAAG;MAAEC;IAAc,CAAC,GAAGN,GAAG;IAClC,IAAIK,GAAG,EAAE;MACP,MAAME,SAAS,GAAG,IAAAC,6BAAgB,EAChCpB,IAAI,EACJ;QACEqB,KAAK,EAAE;UACLC,IAAI,EAAEL,GAAG,CAACK,IAAI;UACdC,MAAM,EAAEN,GAAG,CAACM,MAAM,GAAG;QACvB;MACF,CAAC,EACD;QACEzB,aAALine truncated
@@ -0,0 +1,44 @@
import { McpUiTheme } from "../types.js";
/**
* React hook that provides the current document theme reactively.
*
* Uses a `MutationObserver` to watch for changes to the `data-theme` attribute
* or `class` on `document.documentElement`. When the theme changes (e.g., from
* host context updates), the hook automatically re-renders your component with
* the new theme value.
*
* The `MutationObserver` is automatically disconnected when the component unmounts.
*
* @returns The current theme ("light" or "dark")
*
* @example Conditionally render based on theme
* ```tsx source="./useDocumentTheme.examples.tsx#useDocumentTheme_conditionalRender"
* function MyApp() {
* const theme = useDocumentTheme();
*
* return <div>{theme === "dark" ? <DarkIcon /> : <LightIcon />}</div>;
* }
* ```
*
* @example Use with theme-aware styling
* ```tsx source="./useDocumentTheme.examples.tsx#useDocumentTheme_themedButton"
* function ThemedButton() {
* const theme = useDocumentTheme();
*
* return (
* <button
* style={{
* background: theme === "dark" ? "#333" : "#fff",
* color: theme === "dark" ? "#fff" : "#333",
* }}
* >
* Click me
* </button>
* );
* }
* ```
*
* @see {@link getDocumentTheme `getDocumentTheme`} for the underlying function
* @see {@link applyDocumentTheme `applyDocumentTheme`} to set the theme
*/
export declare function useDocumentTheme(): McpUiTheme;
@@ -0,0 +1,12 @@
"use strict";
// THIS CODE WAS AUTOMATICALLY GENERATED
// DO NOT EDIT THIS CODE BY HAND
// RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE:
// npx nx generate-lib repo
Object.defineProperty(exports, "__esModule", { value: true });
exports.es2024_collection = void 0;
const base_config_1 = require("./base-config");
exports.es2024_collection = {
libs: [],
variables: [['MapConstructor', base_config_1.TYPE]],
};
@@ -0,0 +1,40 @@
'use strict'
// In case of breaking changes, increase the version
// number to avoid conflicts.
const globalOrigin = Symbol.for('undici.globalOrigin.1')
function getGlobalOrigin () {
return globalThis[globalOrigin]
}
function setGlobalOrigin (newOrigin) {
if (newOrigin === undefined) {
Object.defineProperty(globalThis, globalOrigin, {
value: undefined,
writable: true,
enumerable: false,
configurable: false
})
return
}
const parsedURL = new URL(newOrigin)
if (parsedURL.protocol !== 'http:' && parsedURL.protocol !== 'https:') {
throw new TypeError(`Only http & https urls are allowed, received ${parsedURL.protocol}`)
}
Object.defineProperty(globalThis, globalOrigin, {
value: parsedURL,
writable: true,
enumerable: false,
configurable: false
})
}
module.exports = {
getGlobalOrigin,
setGlobalOrigin
}
@@ -0,0 +1,7 @@
import type * as ts from 'typescript';
export declare enum Awaitable {
Always = 0,
Never = 1,
May = 2
}
export declare function needsToBeAwaited(checker: ts.TypeChecker, node: ts.Node, type: ts.Type): Awaitable;
@@ -0,0 +1 @@
module.exports={A:{A:{"1":"_IB","2":"_LC"},B:{"1":"_J"},C:{"1":"_S"},D:{"1":"_Q"},E:{"1":"_vG","16":"MD"},F:{"1":"_oB","16":"F"},G:{"1":"_t","16":"_d"},H:{"1":"1D"},I:{"1":"_SB","16":"_m"},J:{"1":"_B"},K:{"1":"_CB","2":"A"},L:{"1":"I"},M:{"1":"YC"},N:{"2":"_A"},O:{"1":"bC"},P:{"1":"_F"},Q:{"1":"JE"},R:{"1":"KE"},S:{"1":"_C"}},B:1,C:"wbr (word break opportunity) element",D:true};
@@ -0,0 +1 @@
module.exports={A:{A:{"2":"_E"},B:{"1":"_K","2":"_KB","132":"_fN"},C:{"1":"_yL","2":"_qL","132":"_4N"},D:{"1":"_bN _kC","2":"_8E","132":"_zI _JF"},E:{"1":"_PD","2":"_5C","132":"_vC PD"},F:{"1":"_H _7I","2":"_GP","132":"_EC _VO"},G:{"1":"_s","2":"_EB","16":"E","132":"hD"},H:{"2":"1D"},I:{"1":"I","2":"_G"},J:{"1":"A","2":"D"},K:{"1":"H","2":"_D"},L:{"1":"I"},M:{"1":"YC"},N:{"2":"_A"},O:{"1":"bC"},P:{"1":"_DF","132":"_OD"},Q:{"1":"JE"},R:{"1":"KE"},S:{"1":"_C"}},B:1,C:"Path2D",D:true};
@@ -0,0 +1 @@
{"version":3,"file":"file-warning.js","sources":["../../../src/icons/file-warning.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name FileWarning\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMTUgMkg2YTIgMiAwIDAgMC0yIDJ2MTZhMiAyIDAgMCAwIDIgMmgxMmEyIDIgMCAwIDAgMi0yVjdaIiAvPgogIDxwYXRoIGQ9Ik0xMiA5djQiIC8+CiAgPHBhdGggZD0iTTEyIDE3aC4wMSIgLz4KPC9zdmc+Cg==) - https://lucide.dev/icons/file-warning\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 FileWarning = createLucideIcon('FileWarning', [\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 ['path', { d: 'M12 9v4', key: 'juzpu7' }],\n ['path', { d: 'M12 17h.01', key: 'p32p05' }],\n]);\n\nexport default FileWarning;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAc,iBAAiB,aAAe,CAAA,CAAA,CAAA;AAAA,CAAA,CAClD,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,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,CAAc,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AAC7C,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1,7 @@
{
"version": 3,
"sources": ["../src/index.ts", "../src/dialog.tsx"],
"sourcesContent": ["'use client';\nexport {\n createDialogScope,\n //\n Dialog,\n DialogTrigger,\n DialogPortal,\n DialogOverlay,\n DialogContent,\n DialogTitle,\n DialogDescription,\n DialogClose,\n //\n Root,\n Trigger,\n Portal,\n Overlay,\n Content,\n Title,\n Description,\n Close,\n //\n WarningProvider,\n} from './dialog';\nexport type {\n DialogProps,\n DialogTriggerProps,\n DialogPortalProps,\n DialogOverlayProps,\n DialogContentProps,\n DialogTitleProps,\n DialogDescriptionProps,\n DialogCloseProps,\n} from './dialog';\n", "import * as React from 'react';\nimport { composeEventHandlers } from '@radix-ui/primitive';\nimport { useComposedRefs } from '@radix-ui/react-compose-refs';\nimport { createContext, createContextScope } from '@radix-ui/react-context';\nimport { useId } from '@radix-ui/react-id';\nimport { useControllableState } from '@radix-ui/react-use-controllable-state';\nimport { DismissableLayer } from '@radix-ui/react-dismissable-layer';\nimport { FocusScope } from '@radix-ui/react-focus-scope';\nimport { Portal as PortalPrimitive } from '@radix-ui/react-portal';\nimport { Presence } from '@radix-ui/react-presence';\nimport { Primitive } from '@radix-ui/react-primitive';\nimport { useFocusGuards } from '@radix-ui/react-focus-guards';\nimport { RemoveScroll } from 'react-remove-scroll';\nimport { hideOthers } from 'aria-hidden';\nimport { createSlot } from '@radix-ui/react-slot';\n\nimport type { Scope } from '@radix-ui/react-context';\n\n/* -------------------------------------------------------------------------------------------------\n * Dialog\n * -----------------------------------------------------------------------------------------------*/\n\nconst DIALOG_NAME = 'Dialog';\n\ntype ScopedProps<P> = P & { __scopeDialog?: Scope };\nconst [createDialogContext, createDialogScope] = createContextScope(DIALOG_NAME);\n\ntype DialogContextValue = {\n triggerRef: React.RefObject<HTMLButtonElement | null>;\n contentRef: React.RefObject<DialogContentElement | null>;\n contentId: string;\n titleId: string;\n descriptionId: string;\n open: boolean;\n onOpenChange(open: boolean): void;\n onOpenToggle(): void;\n modal: boolean;\n};\n\nconst [DialogProvider, useDialogContext] = createDialogContext<DialogContextValue>(DIALOG_NAME);\n\ninterface DialogProps {\n children?: React.ReactNode;\n open?: boolean;\n defaultOpen?: boolean;\n onOpenChange?(open: boolean): void;\n modal?: boolean;\n}\n\nconst Dialog: React.FC<DialogProps> = (props: ScopedProps<DialogProps>) => {\n const {\n __scopeDialog,\n children,\n open: openProp,\n defaultOpen,\n onOpenChange,\n modal = true,\n } = props;\n const triggerRef = React.useRef<HTMLButtonElement>(null);\n const contentRef = React.useRef<DialogContentElement>(null);\n const [open, setOpen] = useControllableState({\n prop: openProp,\n defaultProp: defaultOpen ?? false,\n onChange: onOpenChange,\n caller: DIALOG_NAME,\n });\n\n return (\n <DialogProvider\n scope={__scopeDialog}\n triggerRef={triggerRef}\n contentRef={contentRef}\n contentId={useId()}\n titleId={useId()}\n descriptionId={useId()}\n open={open}\n onOpenChange={setOpen}\n onOpenToggle={React.useCallback(() => setOpen((prevOpen) => !prevOpen), [setOpen])}\n modal={modal}\n >\n {children}\n </DialogProvider>\n );\n};\n\nDialog.displayName = DIALOG_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * DialogTrigger\n * -----------------------------------------------------------------------------------------------*/\n\nconst TRIGGER_NAME = 'DialogTrigger';\n\ntype DialogTriggerElement = React.ComponentRef<typeof Primitive.button>;\ntype PrimitiveButtonProps = React.ComponentPropsWithoutRef<typeof Primitive.button>;\ninterface DialogTriggerProps extends PrimitiveButtonProps {}\n\nconst DialogTrigger = React.forwardRef<DialogTriggerElement, DialogTriggerProps>(\n (props: ScopedProps<DialogTriggerProps>, forwardedRef) => {\n const { __scopeDialog, ...triggerProps } = props;\n const context = useDialogContext(TRIGGER_NAME, __scopeDialog);\n const composedTriggerRef = useComposedRefs(forwardedRef, context.triggerRef);\n return (\n <Primitive.button\n type=\"button\"\n aria-haspopup=\"dialog\"\n aria-expanded={context.open}\n aria-controls={context.contentId}\n data-state={getState(context.open)}\n {...triggerProps}\n ref={composedTriggerRef}\n onClick={composeEventHandlers(props.onClick, context.onOpenToggle)}\n />\n );\n }\n);\n\nDialogTrigger.displayName = TRIGGER_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * DialogPortal\n * -----------------------------------------------------------------------------------------------*/\n\nconst PORTAL_NAME = 'DialogPortLine truncated
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,YAAuB;AACvB,uBAAqC;AACrC,gCAAgC;AAChC,2BAAkD;AAClD,sBAAsB;AACtB,0CAAqC;AACrC,qCAAiC;AACjC,+BAA2B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kBAAM,eAAe;AAAA,UACvB;AAAA,QACF;AAAA;AAAA,IACF;AAAA,EAEJ;AACF;AA4BA,IAAM,oBAA0B;AAAA,EAC9B,CAAC,OAA4C,iBAAiB;AAC5D,UAAM,EAAE,eAAe,WAAW,iBAAiB,kBAAkB,GAAG,aAAa,IAAI;AACzF,UAAM,UAAU,iBAAiB,cAAc,aAAa;AAC5D,UAAM,aAAmB,aAAuB,IAAI;AACpD,UAAM,mBAAe,2CAAgB,cAAc,UAAU;AAI7D,kDAAe;AAEf,WACE,4EACE;AAAA;AAAA,QAAC;AAAA;AAAA,UACC,SAAO;AAAA,UACP,MAAI;AAAA,UACJ,SAAS;AAAA,UACT,kBAAkB;AAAA,UAClB,oBAAoB;AAAA,UAEpB;AAAA,YAAC;AAAA;AAAA,cACC,MAAK;AAAA,cACL,IAAI,QAAQ;AAAA,cACZ,oBAAkB,QAAQ;AAAA,cAC1B,mBAAiB,QAAQ;AAAA,cACzB,cAAY,SAAS,QAAQ,IAAI;AAAA,cAChC,GAAG;AAAA,cACJ,KAAK;AAAA,cACL,WAAW,Line truncated
"names": ["PortalPrimitive"]
}
@@ -0,0 +1,130 @@
// Generated by LiveScript 1.6.0
var max, min, negate, abs, signum, quot, rem, div, mod, recip, pi, tau, exp, sqrt, ln, pow, sin, tan, cos, asin, acos, atan, atan2, truncate, round, ceiling, floor, isItNaN, even, odd, gcd, lcm;
max = curry$(function(x$, y$){
return x$ > y$ ? x$ : y$;
});
min = curry$(function(x$, y$){
return x$ < y$ ? x$ : y$;
});
negate = function(x){
return -x;
};
abs = Math.abs;
signum = function(x){
if (x < 0) {
return -1;
} else if (x > 0) {
return 1;
} else {
return 0;
}
};
quot = curry$(function(x, y){
return ~~(x / y);
});
rem = curry$(function(x$, y$){
return x$ % y$;
});
div = curry$(function(x, y){
return Math.floor(x / y);
});
mod = curry$(function(x$, y$){
var ref$;
return ((x$) % (ref$ = y$) + ref$) % ref$;
});
recip = (function(it){
return 1 / it;
});
pi = Math.PI;
tau = pi * 2;
exp = Math.exp;
sqrt = Math.sqrt;
ln = Math.log;
pow = curry$(function(x$, y$){
return Math.pow(x$, y$);
});
sin = Math.sin;
tan = Math.tan;
cos = Math.cos;
asin = Math.asin;
acos = Math.acos;
atan = Math.atan;
atan2 = curry$(function(x, y){
return Math.atan2(x, y);
});
truncate = function(x){
return ~~x;
};
round = Math.round;
ceiling = Math.ceil;
floor = Math.floor;
isItNaN = function(x){
return x !== x;
};
even = function(x){
return x % 2 === 0;
};
odd = function(x){
return x % 2 !== 0;
};
gcd = curry$(function(x, y){
var z;
x = Math.abs(x);
y = Math.abs(y);
while (y !== 0) {
z = x % y;
x = y;
y = z;
}
return x;
});
lcm = curry$(function(x, y){
return Math.abs(Math.floor(x / gcd(x, y) * y));
});
module.exports = {
max: max,
min: min,
negate: negate,
abs: abs,
signum: signum,
quot: quot,
rem: rem,
div: div,
mod: mod,
recip: recip,
pi: pi,
tau: tau,
exp: exp,
sqrt: sqrt,
ln: ln,
pow: pow,
sin: sin,
tan: tan,
cos: cos,
acos: acos,
asin: asin,
atan: atan,
atan2: atan2,
truncate: truncate,
round: round,
ceiling: ceiling,
floor: floor,
isItNaN: isItNaN,
even: even,
odd: odd,
gcd: gcd,
lcm: lcm
};
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,24 @@
import { GetConnInfo } from "../../helper/conninfo/types.js";
//#region src/adapter/netlify/conninfo.d.ts
/**
* Get connection information from Netlify
* @param c - Context
* @returns Connection information including remote address
* @example
* ```ts
* import { Hono } from 'hono'
* import { handle, getConnInfo } from 'hono/netlify'
*
* const app = new Hono()
*
* app.get('/', (c) => {
* const info = getConnInfo(c)
* return c.text(`Your IP: ${info.remote.address}`)
* })
*
* export default handle(app)
* ```
* @deprecated `hono/netlify` will be removed in v5. Install `@hono/netlify` and import from there instead.
*/
export declare const getConnInfo: GetConnInfo;
//#endregion
@@ -0,0 +1,13 @@
function isError(value) {
if (value == null) {
return false;
}
if (value instanceof Error) {
return true;
}
const { name } = value;
return typeof name === "string" && name.endsWith("Error");
}
export {
isError
};
@@ -0,0 +1,2 @@
import type { OperatorPrecedence } from './getOperatorPrecedence';
export declare function getWrappedCode(text: string, nodePrecedence: OperatorPrecedence, parentPrecedence: OperatorPrecedence): string;
@@ -0,0 +1,19 @@
'use strict';
var test = require('tape');
var E = require('../');
var R = require('../range');
var Ref = require('../ref');
var S = require('../syntax');
var T = require('../type');
test('errors', function (t) {
t.equal(E, Error);
t.equal(R, RangeError);
t.equal(Ref, ReferenceError);
t.equal(S, SyntaxError);
t.equal(T, TypeError);
t.end();
});
@@ -0,0 +1 @@
{"version":3,"file":"square-mouse-pointer.js","sources":["../../../src/icons/square-mouse-pointer.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name SquareMousePointer\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMTIuMDM0IDEyLjY4MWEuNDk4LjQ5OCAwIDAgMSAuNjQ3LS42NDdsOSAzLjVhLjUuNSAwIDAgMS0uMDMzLjk0M2wtMy40NDQgMS4wNjhhMSAxIDAgMCAwLS42Ni42NmwtMS4wNjcgMy40NDNhLjUuNSAwIDAgMS0uOTQzLjAzM3oiIC8+CiAgPHBhdGggZD0iTTIxIDExVjVhMiAyIDAgMCAwLTItMkg1YTIgMiAwIDAgMC0yIDJ2MTRhMiAyIDAgMCAwIDIgMmg2IiAvPgo8L3N2Zz4K) - https://lucide.dev/icons/square-mouse-pointer\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 SquareMousePointer = createLucideIcon('SquareMousePointer', [\n [\n 'path',\n {\n d: 'M12.034 12.681a.498.498 0 0 1 .647-.647l9 3.5a.5.5 0 0 1-.033.943l-3.444 1.068a1 1 0 0 0-.66.66l-1.067 3.443a.5.5 0 0 1-.943.033z',\n key: 'xwnzip',\n },\n ],\n ['path', { d: 'M21 11V5a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h6', key: '14rsvq' }],\n]);\n\nexport default SquareMousePointer;\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,CAAA,CAAA,CAAA,CAAA,CAAqB,iBAAiB,oBAAsB,CAAA,CAAA,CAAA;AAAA,CAChE,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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CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AAC5F,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1,20 @@
/**
* @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 GitBranchPlus = createLucideIcon("GitBranchPlus", [
["path", { d: "M6 3v12", key: "qpgusn" }],
["path", { d: "M18 9a3 3 0 1 0 0-6 3 3 0 0 0 0 6z", key: "1d02ji" }],
["path", { d: "M6 21a3 3 0 1 0 0-6 3 3 0 0 0 0 6z", key: "chk6ph" }],
["path", { d: "M15 6a9 9 0 0 0-9 9", key: "or332x" }],
["path", { d: "M18 15v6", key: "9wciyi" }],
["path", { d: "M21 18h-6", key: "139f0c" }]
]);
export { GitBranchPlus as default };
//# sourceMappingURL=git-branch-plus.js.map
@@ -0,0 +1,103 @@
import { useStore } from '@tanstack/react-store'
import { deepEqual } from '@tanstack/router-core'
import { isServer } from '@tanstack/router-core/isServer'
import { Asset } from './Asset'
import { useRouter } from './useRouter'
import type { RouterManagedTag } from '@tanstack/router-core'
/**
* Render body script tags collected from route matches and SSR manifests.
* Should be placed near the end of the document body.
*/
export const Scripts = () => {
const router = useRouter()
const nonce = router.options.ssr?.nonce
const getAssetScripts = (matches: Array<any>) => {
const assetScripts: Array<RouterManagedTag> = []
const manifest = router.ssr?.manifest
if (!manifest) {
return []
}
matches
.map((match) => router.looseRoutesById[match.routeId]!)
.forEach((route) =>
manifest.routes[route.id]?.assets
?.filter((d) => d.tag === 'script')
.forEach((asset) => {
assetScripts.push({
tag: 'script',
attrs: { ...asset.attrs, nonce },
children: asset.children,
} as any)
}),
)
return assetScripts
}
const getScripts = (matches: Array<any>): Array<RouterManagedTag> =>
(
matches
.map((match) => match.scripts!)
.flat(1)
.filter(Boolean) as Array<RouterManagedTag>
).map(
({ children, ...script }) =>
({
tag: 'script',
attrs: {
...script,
suppressHydrationWarning: true,
nonce,
},
children,
}) satisfies RouterManagedTag,
)
if (isServer ?? router.isServer) {
const activeMatches = router.stores.matches.get()
const assetScripts = getAssetScripts(activeMatches)
const scripts = getScripts(activeMatches)
return renderScripts(router, scripts, assetScripts)
}
// eslint-disable-next-line react-hooks/rules-of-hooks -- condition is static
const assetScripts = useStore(
router.stores.matches,
getAssetScripts,
deepEqual,
)
// eslint-disable-next-line react-hooks/rules-of-hooks -- condition is static
const scripts = useStore(router.stores.matches, getScripts, deepEqual)
return renderScripts(router, scripts, assetScripts)
}
function renderScripts(
router: ReturnType<typeof useRouter>,
scripts: Array<RouterManagedTag>,
assetScripts: Array<RouterManagedTag>,
) {
let serverBufferedScript: RouterManagedTag | undefined = undefined
if (router.serverSsr) {
serverBufferedScript = router.serverSsr.takeBufferedScripts()
}
const allScripts = [...scripts, ...assetScripts] as Array<RouterManagedTag>
if (serverBufferedScript) {
allScripts.unshift(serverBufferedScript)
}
return (
<>
{allScripts.map((asset, i) => (
<Asset {...asset} key={`tsr-scripts-${asset.tag}-${i}`} />
))}
</>
)
}
@@ -0,0 +1,194 @@
<div align="center">
<h1>cross-env 🔀</h1>
<p>Run scripts that set and use environment variables across platforms</p>
</div>
**🎉 NOTICE: cross-env is "done" as in it does what it does and there's no need
for new features.
[Learn more](https://github.com/kentcdodds/cross-env/issues/257)**
---
<!-- prettier-ignore-start -->
[![Build Status][build-badge]][build]
[![Code Coverage][coverage-badge]][coverage]
[![version][version-badge]][package]
[![downloads][downloads-badge]][npmtrends]
[![MIT License][license-badge]][license]
<!-- prettier-ignore-end -->
## The problem
Most Windows command prompts will choke when you set environment variables with
`NODE_ENV=production` like that. (The exception is [Bash on Windows][win-bash],
which uses native Bash.) Similarly, there's a difference in how windows and
POSIX commands utilize environment variables. With POSIX, you use: `$ENV_VAR`
and on windows you use `%ENV_VAR%`.
## This solution
`cross-env` makes it so you can have a single command without worrying about
setting or using the environment variable properly for the platform. Just set it
like you would if it's running on a POSIX system, and `cross-env` will take care
of setting it properly.
## Installation
This module is distributed via [npm][npm] which is bundled with [node][node] and
should be installed as one of your project's `devDependencies`:
```
npm install --save-dev cross-env
```
> WARNING! Make sure that when you're installing packages that you spell things
> correctly to avoid [mistakenly installing malware][malware]
> NOTE : Version 8 of cross-env only supports Node.js 20 and higher, to use it
> on Node.js 18 or lower install version 7 `npm install --save-dev cross-env@7`
## Usage
I use this in my npm scripts:
```json
{
"scripts": {
"build": "cross-env NODE_ENV=production node ./start.js --enable-turbo-mode"
}
}
```
Ultimately, the command that is executed (using [`cross-spawn`][cross-spawn])
is:
```
node ./start.js --enable-turbo-mode
```
The `NODE_ENV` environment variable will be set by `cross-env`
You can set multiple environment variables at a time:
```json
{
"scripts": {
"build": "cross-env FIRST_ENV=one SECOND_ENV=two node ./my-program"
}
}
```
You can also split a command into several ones, or separate the environment
variables declaration from the actual command execution. You can do it this way:
```json
{
"scripts": {
"parentScript": "cross-env GREET=\"Joe\" npm run childScript",
"childScript": "cross-env-shell \"echo Hello $GREET\""
}
}
```
Where `childScript` holds the actual command to execute and `parentScript` sets
the environment variables to use. Then instead of run the childScript you run
the parent. This is quite useful for launching the same command with different
env variables or when the environment variables are too long to have everything
in one line. It also means that you can use `$GREET` env var syntax even on
Windows which would usually require it to be `%GREET%`.
If you precede a dollar sign with an odd number of backslashes the expression
statement will not be replaced. Note that this means backslashes after the JSON
string escaping took place. `"FOO=\\$BAR"` will not be replaced.
`"FOO=\\\\$BAR"` will be replaced though.
Lastly, if you want to pass a JSON string (e.g., when using [ts-loader]), you
can do as follows:
```json
{
"scripts": {
"test": "cross-env TS_NODE_COMPILER_OPTIONS={\\\"module\\\":\\\"commonjs\\\"} node some_file.test.ts"
}
}
```
Pay special attention to the **triple backslash** `(\\\)` **before** the
**double quotes** `(")` and the **absence** of **single quotes** `(')`. Both of
these conditions have to be met in order to work both on Windows and UNIX.
## `cross-env` vs `cross-env-shell`
The `cross-env` module exposes two bins: `cross-env` and `cross-env-shell`. The
first one executes commands using [`cross-spawn`][cross-spawn], while the second
one uses the `shell` option from Node's `spawn`.
The main use case for `cross-env-shell` is when you need an environment variable
to be set across an entire inline shell script, rather than just one command.
For example, if you want to have the environment variable apply to several
commands in series then you will need to wrap those in quotes and use
`cross-env-shell` instead of `cross-env`.
```json
{
"scripts": {
"greet": "cross-env-shell GREETING=Hi NAME=Joe \"echo $GREETING && echo $NAME\""
}
}
```
The rule of thumb is: if you want to pass to `cross-env` a command that contains
special shell characters _that you want interpreted_, then use
`cross-env-shell`. Otherwise stick to `cross-env`.
On Windows you need to use `cross-env-shell`, if you want to handle
[signal events](https://nodejs.org/api/process.html#process_signal_events)
inside of your program. A common case for that is when you want to capture a
`SIGINT` event invoked by pressing `Ctrl + C` on the command-line interface.
## Windows Issues
Please note that `npm` uses `cmd` by default and that doesn't support command
substitution, so if you want to leverage that, then you need to update your
`.npmrc` to set the `script-shell` to powershell.
[Learn more here](https://github.com/kentcdodds/cross-env/issues/192#issuecomment-513341729).
## Inspiration
I originally created this to solve a problem I was having with my npm scripts in
[angular-formly][angular-formly]. This made contributing to the project much
easier for Windows users.
## Other Solutions
- [`env-cmd`](https://github.com/toddbluhm/env-cmd) - Reads environment
variables from a file instead
- [`@naholyr/cross-env`](https://www.npmjs.com/package/@naholyr/cross-env) -
`cross-env` with support for setting default values
## LICENSE
MIT
<!-- prettier-ignore-start -->
[npm]: https://npmjs.com
[node]: https://nodejs.org
[build-badge]: https://img.shields.io/github/actions/workflow/status/kentcdodds/cross-env/validate.yml?branch=main&logo=github&style=flat-square
[build]: https://github.com/kentcdodds/cross-env/actions?query=workflow%3Avalidate
[coverage-badge]: https://img.shields.io/codecov/c/github/kentcdodds/cross-env.svg?style=flat-square
[coverage]: https://codecov.io/github/kentcdodds/cross-env
[version-badge]: https://img.shields.io/npm/v/cross-env.svg?style=flat-square
[package]: https://www.npmjs.com/package/cross-env
[downloads-badge]: https://img.shields.io/npm/dm/cross-env.svg?style=flat-square
[npmtrends]: http://www.npmtrends.com/cross-env
[license-badge]: https://img.shields.io/npm/l/cross-env.svg?style=flat-square
[license]: https://github.com/kentcdodds/cross-env/blob/main/LICENSE
[angular-formly]: https://github.com/formly-js/angular-formly
[cross-spawn]: https://www.npmjs.com/package/cross-spawn
[malware]: http://blog.npmjs.org/post/163723642530/crossenv-malware-on-the-npm-registry
[ts-loader]: https://www.npmjs.com/package/ts-loader
[win-bash]: https://msdn.microsoft.com/en-us/commandline/wsl/about
<!-- prettier-ignore-end -->
@@ -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 Album = createLucideIcon("Album", [
["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", ry: "2", key: "1m3agn" }],
["polyline", { points: "11 3 11 11 14 8 17 11 17 3", key: "1wcwz3" }]
]);
export { Album as default };
//# sourceMappingURL=album.js.map
@@ -0,0 +1,57 @@
import ljharbConfig from '@ljharb/eslint-config/flat';
export default [
{
ignores: ['dist/'],
},
...ljharbConfig,
{
rules: {
complexity: 'off',
'consistent-return': 'warn',
eqeqeq: ['error', 'allow-null'],
'func-name-matching': 'off',
'id-length': [
'error',
{
max: 25,
min: 1,
properties: 'never',
},
],
indent: ['error', 4],
'max-lines': 'off',
'max-lines-per-function': [
'error',
{ max: 150 },
],
'max-params': ['error', 20],
'max-statements': ['error', 100],
'multiline-comment-style': 'off',
'no-continue': 'warn',
'no-magic-numbers': 'off',
'no-restricted-syntax': [
'error',
'BreakStatement',
'DebuggerStatement',
'ForInStatement',
'LabeledStatement',
'WithStatement',
],
},
},
{
files: ['test/**'],
rules: {
'function-paren-newline': 'off',
'max-lines-per-function': 'off',
'max-statements': 'off',
'no-buffer-constructor': 'off',
'no-extend-native': 'off',
'no-throw-literal': 'off',
},
},
];
@@ -0,0 +1,27 @@
"use strict";
// Note: This file is replaced with "read-wasm-browser.js" when this module is
// bundled with a packager that takes package.json#browser fields into account.
const fs = require("fs");
const path = require("path");
module.exports = function readWasm() {
return new Promise((resolve, reject) => {
const wasmPath = path.join(__dirname, "mappings.wasm");
fs.readFile(wasmPath, null, (error, data) => {
if (error) {
reject(error);
return;
}
resolve(data.buffer);
});
});
};
module.exports.initialize = _ => {
console.debug(
"SourceMapConsumer.initialize is a no-op when running in node.js"
);
};
@@ -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 Share = createLucideIcon("Share", [
["path", { d: "M4 12v8a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8", key: "1b2hhj" }],
["polyline", { points: "16 6 12 2 8 6", key: "m901s6" }],
["line", { x1: "12", x2: "12", y1: "2", y2: "15", key: "1p0rca" }]
]);
export { Share as default };
//# sourceMappingURL=share.js.map
@@ -0,0 +1,476 @@
/**
* @fileoverview Rule to flag missing semicolons.
* @author Nicholas C. Zakas
* @deprecated in ESLint v8.53.0
*/
"use strict";
//------------------------------------------------------------------------------
// Requirements
//------------------------------------------------------------------------------
const FixTracker = require("./utils/fix-tracker");
const astUtils = require("./utils/ast-utils");
//------------------------------------------------------------------------------
// Rule Definition
//------------------------------------------------------------------------------
/** @type {import('../types').Rule.RuleModule} */
module.exports = {
meta: {
deprecated: {
message: "Formatting rules are being moved out of ESLint core.",
url: "https://eslint.org/blog/2023/10/deprecating-formatting-rules/",
deprecatedSince: "8.53.0",
availableUntil: "11.0.0",
replacedBy: [
{
message:
"ESLint Stylistic now maintains deprecated stylistic core rules.",
url: "https://eslint.style/guide/migration",
plugin: {
name: "@stylistic/eslint-plugin",
url: "https://eslint.style",
},
rule: {
name: "semi",
url: "https://eslint.style/rules/semi",
},
},
],
},
type: "layout",
docs: {
description: "Require or disallow semicolons instead of ASI",
recommended: false,
url: "https://eslint.org/docs/latest/rules/semi",
},
fixable: "code",
schema: {
anyOf: [
{
type: "array",
items: [
{
enum: ["never"],
},
{
type: "object",
properties: {
beforeStatementContinuationChars: {
enum: ["always", "any", "never"],
},
},
additionalProperties: false,
},
],
minItems: 0,
maxItems: 2,
},
{
type: "array",
items: [
{
enum: ["always"],
},
{
type: "object",
properties: {
omitLastInOneLineBlock: { type: "boolean" },
omitLastInOneLineClassBody: { type: "boolean" },
},
additionalProperties: false,
},
],
minItems: 0,
maxItems: 2,
},
],
},
messages: {
missingSemi: "Missing semicolon.",
extraSemi: "Extra semicolon.",
},
},
create(context) {
const OPT_OUT_PATTERN = /^[-[(/+`]/u; // One of [(/+-`
const unsafeClassFieldNames = new Set(["get", "set", "static"]);
const unsafeClassFieldFollowers = new Set(["*", "in", "instanceof"]);
const options = context.options[1];
const never = context.options[0] === "never";
const exceptOneLine = Boolean(
options && options.omitLastInOneLineBlock,
);
const exceptOneLineClassBody = Boolean(
options && options.omitLastInOneLineClassBody,
);
const beforeStatementContinuationChars =
(options && options.beforeStatementContinuationChars) || "any";
const sourceCode = context.sourceCode;
//--------------------------------------------------------------------------
// Helpers
//--------------------------------------------------------------------------
/**
* Reports a semicolon error with appropriate location and message.
* @param {ASTNode} node The node with an extra or missing semicolon.
* @param {boolean} missing True if the semicolon is missing.
* @returns {void}
*/
function report(node, missing) {
const lastToken = sourceCode.getLastToken(node);
let messageId, fix, loc;
if (!missing) {
messageId = "missingSemi";
loc = {
start: lastToken.loc.end,
end: astUtils.getNextLocation(
sourceCode,
lastToken.loc.end,
),
};
fix = function (fixer) {
return fixer.insertTextAfter(lastToken, ";");
};
} else {
messageId = "extraSemi";
loc = lastToken.loc;
fix = function (fixer) {
/*
* Expand the replacement range to include the surrounding
* tokens to avoid conflicting with no-extra-semi.
* https://github.com/eslint/eslint/issues/7928
*/
return new FixTracker(fixer, sourceCode)
.retainSurroundingTokens(lastToken)
.remove(lastToken);
};
}
context.report({
node,
loc,
messageId,
fix,
});
}
/**
* Check whether a given semicolon token is redundant.
* @param {Token} semiToken A semicolon token to check.
* @returns {boolean} `true` if the next token is `;` or `}`.
*/
function isRedundantSemi(semiToken) {
const nextToken = sourceCode.getTokenAfter(semiToken);
return (
!nextToken ||
astUtils.isClosingBraceToken(nextToken) ||
astUtils.isSemicolonToken(nextToken)
);
}
/**
* Check whether a given token is the closing brace of an arrow function.
* @param {Token} lastToken A token to check.
* @returns {boolean} `true` if the token is the closing brace of an arrow function.
*/
function isEndOfArrowBlock(lastToken) {
if (!astUtils.isClosingBraceToken(lastToken)) {
return false;
}
const node = sourceCode.getNodeByRangeIndex(lastToken.range[0]);
return (
node.type === "BlockStatement" &&
node.parent.type === "ArrowFunctionExpression"
);
}
/**
* Checks if a given PropertyDefinition node followed by a semicolon
* can safely remove that semicolon. It is not to safe to remove if
* the class field name is "get", "set", or "static", or if
* followed by a generator method.
* @param {ASTNode} node The node to check.
* @returns {boolean} `true` if the node cannot have the semicolon
* removed.
*/
function maybeClassFieldAsiHazard(node) {
if (node.type !== "PropertyDefinition") {
return false;
}
/*
* Computed property names and non-identifiers are always safe
* as they can be distinguished from keywords easily.
*/
const needsNameCheck =
!node.computed && node.key.type === "Identifier";
/*
* Certain names are problematic unless they also have a
* a way to distinguish between keywords and property
* names.
*/
if (needsNameCheck && unsafeClassFieldNames.has(node.key.name)) {
/*
* Special case: If the field name is `static`,
* it is only valid if the field is marked as static,
* so "static static" is okay but "static" is not.
*/
const isStaticStatic =
node.static && node.key.name === "static";
/*
* For other unsafe names, we only care if there is no
* initializer. No initializer = hazard.
*/
if (!isStaticStatic && !node.value) {
return true;
}
}
const followingToken = sourceCode.getTokenAfter(node);
return unsafeClassFieldFollowers.has(followingToken.value);
}
/**
* Check whether a given node is on the same line with the next token.
* @param {Node} node A statement node to check.
* @returns {boolean} `true` if the node is on the same line with the next token.
*/
function isOnSameLineWithNextToken(node) {
const prevToken = sourceCode.getLastToken(node, 1);
const nextToken = sourceCode.getTokenAfter(node);
return (
!!nextToken && astUtils.isTokenOnSameLine(prevToken, nextToken)
);
}
/**
* Check whether a given node can connect the next line if the next line is unreliable.
* @param {Node} node A statement node to check.
* @returns {boolean} `true` if the node can connect the next line.
*/
function maybeAsiHazardAfter(node) {
const t = node.type;
if (
t === "DoWhileStatement" ||
t === "BreakStatement" ||
t === "ContinueStatement" ||
t === "DebuggerStatement" ||
t === "ImportDeclaration" ||
t === "ExportAllDeclaration"
) {
return false;
}
if (t === "ReturnStatement") {
return Boolean(node.argument);
}
if (t === "ExportNamedDeclaration") {
return Boolean(node.declaration);
}
if (isEndOfArrowBlock(sourceCode.getLastToken(node, 1))) {
return false;
}
return true;
}
/**
* Check whether a given token can connect the previous statement.
* @param {Token} token A token to check.
* @returns {boolean} `true` if the token is one of `[`, `(`, `/`, `+`, `-`, ```, `++`, and `--`.
*/
function maybeAsiHazardBefore(token) {
return (
Boolean(token) &&
OPT_OUT_PATTERN.test(token.value) &&
token.value !== "++" &&
token.value !== "--"
);
}
/**
* Check if the semicolon of a given node is unnecessary, only true if:
* - next token is a valid statement divider (`;` or `}`).
* - next token is on a new line and the node is not connectable to the new line.
* @param {Node} node A statement node to check.
* @returns {boolean} whether the semicolon is unnecessary.
*/
function canRemoveSemicolon(node) {
if (isRedundantSemi(sourceCode.getLastToken(node))) {
return true; // `;;` or `;}`
}
if (maybeClassFieldAsiHazard(node)) {
return false;
}
if (isOnSameLineWithNextToken(node)) {
return false; // One liner.
}
// continuation characters should not apply to class fields
if (
node.type !== "PropertyDefinition" &&
beforeStatementContinuationChars === "never" &&
!maybeAsiHazardAfter(node)
) {
return true; // ASI works. This statement doesn't connect to the next.
}
if (!maybeAsiHazardBefore(sourceCode.getTokenAfter(node))) {
return true; // ASI works. The next token doesn't connect to this statement.
}
return false;
}
/**
* Checks a node to see if it's the last item in a one-liner block.
* Block is any `BlockStatement` or `StaticBlock` node. Block is a one-liner if its
* braces (and consequently everything between them) are on the same line.
* @param {ASTNode} node The node to check.
* @returns {boolean} whether the node is the last item in a one-liner block.
*/
function isLastInOneLinerBlock(node) {
const parent = node.parent;
const nextToken = sourceCode.getTokenAfter(node);
if (!nextToken || nextToken.value !== "}") {
return false;
}
if (parent.type === "BlockStatement") {
return parent.loc.start.line === parent.loc.end.line;
}
if (parent.type === "StaticBlock") {
const openingBrace = sourceCode.getFirstToken(parent, {
skip: 1,
}); // skip the `static` token
return openingBrace.loc.start.line === parent.loc.end.line;
}
return false;
}
/**
* Checks a node to see if it's the last item in a one-liner `ClassBody` node.
* ClassBody is a one-liner if its braces (and consequently everything between them) are on the same line.
* @param {ASTNode} node The node to check.
* @returns {boolean} whether the node is the last item in a one-liner ClassBody.
*/
function isLastInOneLinerClassBody(node) {
const parent = node.parent;
const nextToken = sourceCode.getTokenAfter(node);
if (!nextToken || nextToken.value !== "}") {
return false;
}
if (parent.type === "ClassBody") {
return parent.loc.start.line === parent.loc.end.line;
}
return false;
}
/**
* Checks a node to see if it's followed by a semicolon.
* @param {ASTNode} node The node to check.
* @returns {void}
*/
function checkForSemicolon(node) {
const isSemi = astUtils.isSemicolonToken(
sourceCode.getLastToken(node),
);
if (never) {
if (isSemi && canRemoveSemicolon(node)) {
report(node, true);
} else if (
!isSemi &&
beforeStatementContinuationChars === "always" &&
node.type !== "PropertyDefinition" &&
maybeAsiHazardBefore(sourceCode.getTokenAfter(node))
) {
report(node);
}
} else {
const oneLinerBlock =
exceptOneLine && isLastInOneLinerBlock(node);
const oneLinerClassBody =
exceptOneLineClassBody && isLastInOneLinerClassBody(node);
const oneLinerBlockOrClassBody =
oneLinerBlock || oneLinerClassBody;
if (isSemi && oneLinerBlockOrClassBody) {
report(node, true);
} else if (!isSemi && !oneLinerBlockOrClassBody) {
report(node);
}
}
}
/**
* Checks to see if there's a semicolon after a variable declaration.
* @param {ASTNode} node The node to check.
* @returns {void}
*/
function checkForSemicolonForVariableDeclaration(node) {
const parent = node.parent;
if (
(parent.type !== "ForStatement" || parent.init !== node) &&
(!/^For(?:In|Of)Statement/u.test(parent.type) ||
parent.left !== node)
) {
checkForSemicolon(node);
}
}
//--------------------------------------------------------------------------
// Public API
//--------------------------------------------------------------------------
return {
VariableDeclaration: checkForSemicolonForVariableDeclaration,
ExpressionStatement: checkForSemicolon,
ReturnStatement: checkForSemicolon,
ThrowStatement: checkForSemicolon,
DoWhileStatement: checkForSemicolon,
DebuggerStatement: checkForSemicolon,
BreakStatement: checkForSemicolon,
ContinueStatement: checkForSemicolon,
ImportDeclaration: checkForSemicolon,
ExportAllDeclaration: checkForSemicolon,
ExportNamedDeclaration(node) {
if (!node.declaration) {
checkForSemicolon(node);
}
},
ExportDefaultDeclaration(node) {
if (
!/(?:Class|Function)Declaration/u.test(
node.declaration.type,
)
) {
checkForSemicolon(node);
}
},
PropertyDefinition: checkForSemicolon,
};
},
};
@@ -0,0 +1 @@
{"version":3,"file":"chevrons-left.js","sources":["../../../src/icons/chevrons-left.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name ChevronsLeft\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJtMTEgMTctNS01IDUtNSIgLz4KICA8cGF0aCBkPSJtMTggMTctNS01IDUtNSIgLz4KPC9zdmc+Cg==) - https://lucide.dev/icons/chevrons-left\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 ChevronsLeft = createLucideIcon('ChevronsLeft', [\n ['path', { d: 'm11 17-5-5 5-5', key: '13zhaf' }],\n ['path', { d: 'm18 17-5-5 5-5', key: 'h8a8et' }],\n]);\n\nexport default ChevronsLeft;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAe,iBAAiB,cAAgB,CAAA,CAAA,CAAA;AAAA,CAAA,CACpD,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAkB,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,CAC/C,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAkB,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AACjD,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1,42 @@
import buildSourceMapTree from './build-source-map-tree';
import { traceMappings } from './source-map-tree';
import SourceMap from './source-map';
import type { SourceMapInput, SourceMapLoader, Options } from './types';
export type {
SourceMapSegment,
EncodedSourceMap,
EncodedSourceMap as RawSourceMap,
DecodedSourceMap,
SourceMapInput,
SourceMapLoader,
LoaderContext,
Options,
} from './types';
export type { SourceMap };
/**
* Traces through all the mappings in the root sourcemap, through the sources
* (and their sourcemaps), all the way back to the original source location.
*
* `loader` will be called every time we encounter a source file. If it returns
* a sourcemap, we will recurse into that sourcemap to continue the trace. If
* it returns a falsey value, that source file is treated as an original,
* unmodified source file.
*
* Pass `excludeContent` to exclude any self-containing source file content
* from the output sourcemap.
*
* Pass `decodedMappings` to receive a SourceMap with decoded (instead of
* VLQ encoded) mappings.
*/
export default function remapping(
input: SourceMapInput | SourceMapInput[],
loader: SourceMapLoader,
options?: boolean | Options,
): SourceMap {
const opts =
typeof options === 'object' ? options : { excludeContent: !!options, decodedMappings: false };
const tree = buildSourceMapTree(input, loader);
return new SourceMap(traceMappings(tree), opts);
}
@@ -0,0 +1,71 @@
"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;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.string = string;
exports.number = number;
exports.boolean = boolean;
exports.bigint = bigint;
exports.date = date;
const core = __importStar(require("../core/index.cjs"));
const schemas = __importStar(require("./schemas.cjs"));
// @__NO_SIDE_EFFECTS__
function string(params) {
return core._coercedString(schemas.ZodMiniString, params);
}
// @__NO_SIDE_EFFECTS__
function number(params) {
return core._coercedNumber(schemas.ZodMiniNumber, params);
}
// @__NO_SIDE_EFFECTS__
function boolean(params) {
return core._coercedBoolean(schemas.ZodMiniBoolean, params);
}
// @__NO_SIDE_EFFECTS__
function bigint(params) {
return core._coercedBigint(schemas.ZodMiniBigInt, params);
}
// @__NO_SIDE_EFFECTS__
function date(params) {
return core._coercedDate(schemas.ZodMiniDate, params);
}
// 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,142 @@
/*! *****************************************************************************
Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of the
License at http://www.apache.org/licenses/LICENSE-2.0
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
MERCHANTABILITY OR NON-INFRINGEMENT.
See the Apache Version 2.0 License for specific language governing permissions
and limitations under the License.
***************************************************************************** */
declare namespace Reflect {
/**
* Calls the function with the specified object as the this value
* and the elements of specified array as the arguments.
* @param target The function to call.
* @param thisArgument The object to be used as the this object.
* @param argumentsList An array of argument values to be passed to the function.
*/
function apply<T, A extends readonly any[], R>(
target: (this: T, ...args: A) => R,
thisArgument: T,
argumentsList: Readonly<A>,
): R;
function apply(target: Function, thisArgument: any, argumentsList: ArrayLike<any>): any;
/**
* Constructs the target with the elements of specified array as the arguments
* and the specified constructor as the `new.target` value.
* @param target The constructor to invoke.
* @param argumentsList An array of argument values to be passed to the constructor.
* @param newTarget The constructor to be used as the `new.target` object.
*/
function construct<A extends readonly any[], R>(
target: new (...args: A) => R,
argumentsList: Readonly<A>,
newTarget?: new (...args: any) => any,
): R;
function construct(target: Function, argumentsList: ArrayLike<any>, newTarget?: Function): any;
/**
* Adds a property to an object, or modifies attributes of an existing property.
* @param target Object on which to add or modify the property. This can be a native JavaScript object
* (that is, a user-defined object or a built in object) or a DOM object.
* @param propertyKey The property name.
* @param attributes Descriptor for the property. It can be for a data property or an accessor property.
*/
function defineProperty(target: object, propertyKey: PropertyKey, attributes: PropertyDescriptor & ThisType<any>): boolean;
/**
* Removes a property from an object, equivalent to `delete target[propertyKey]`,
* except it won't throw if `target[propertyKey]` is non-configurable.
* @param target Object from which to remove the own property.
* @param propertyKey The property name.
*/
function deleteProperty(target: object, propertyKey: PropertyKey): boolean;
/**
* Gets the property of target, equivalent to `target[propertyKey]` when `receiver === target`.
* @param target Object that contains the property on itself or in its prototype chain.
* @param propertyKey The property name.
* @param receiver The reference to use as the `this` value in the getter function,
* if `target[propertyKey]` is an accessor property.
*/
function get<T extends object, P extends PropertyKey>(
target: T,
propertyKey: P,
receiver?: unknown,
): P extends keyof T ? T[P] : any;
/**
* Gets the own property descriptor of the specified object.
* An own property descriptor is one that is defined directly on the object and is not inherited from the object's prototype.
* @param target Object that contains the property.
* @param propertyKey The property name.
*/
function getOwnPropertyDescriptor<T extends object, P extends PropertyKey>(
target: T,
propertyKey: P,
): TypedPropertyDescriptor<P extends keyof T ? T[P] : any> | undefined;
/**
* Returns the prototype of an object.
* @param target The object that references the prototype.
*/
function getPrototypeOf(target: object): object | null;
/**
* Equivalent to `propertyKey in target`.
* @param target Object that contains the property on itself or in its prototype chain.
* @param propertyKey Name of the property.
*/
function has(target: object, propertyKey: PropertyKey): boolean;
/**
* Returns a value that indicates whether new properties can be added to an object.
* @param target Object to test.
*/
function isExtensible(target: object): boolean;
/**
* Returns the string and symbol keys of the own properties of an object. The own properties of an object
* are those that are defined directly on that object, and are not inherited from the object's prototype.
* @param target Object that contains the own properties.
*/
function ownKeys(target: object): (string | symbol)[];
/**
* Prevents the addition of new properties to an object.
* @param target Object to make non-extensible.
* @return Whether the object has been made non-extensible.
*/
function preventExtensions(target: object): boolean;
/**
* Sets the property of target, equivalent to `target[propertyKey] = value` when `receiver === target`.
* @param target Object that contains the property on itself or in its prototype chain.
* @param propertyKey Name of the property.
* @param receiver The reference to use as the `this` value in the setter function,
* if `target[propertyKey]` is an accessor property.
*/
function set<T extends object, P extends PropertyKey>(
target: T,
propertyKey: P,
value: P extends keyof T ? T[P] : any,
receiver?: any,
): boolean;
function set(target: object, propertyKey: PropertyKey, value: any, receiver?: any): boolean;
/**
* Sets the prototype of a specified object o to object proto or null.
* @param target The object to change its prototype.
* @param proto The value of the new prototype or null.
* @return Whether setting the prototype was successful.
*/
function setPrototypeOf(target: object, proto: object | null): boolean;
}
@@ -0,0 +1,3 @@
# `react-primitive`
This is an internal utility, not intended for public usage.
@@ -0,0 +1 @@
{"version":3,"file":"align-start-vertical.js","sources":["../../../src/icons/align-start-vertical.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name AlignStartVertical\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cmVjdCB3aWR0aD0iOSIgaGVpZ2h0PSI2IiB4PSI2IiB5PSIxNCIgcng9IjIiIC8+CiAgPHJlY3Qgd2lkdGg9IjE2IiBoZWlnaHQ9IjYiIHg9IjYiIHk9IjQiIHJ4PSIyIiAvPgogIDxwYXRoIGQ9Ik0yIDJ2MjAiIC8+Cjwvc3ZnPgo=) - https://lucide.dev/icons/align-start-vertical\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 AlignStartVertical = createLucideIcon('AlignStartVertical', [\n ['rect', { width: '9', height: '6', x: '6', y: '14', rx: '2', key: 'lpm2y7' }],\n ['rect', { width: '16', height: '6', x: '6', y: '4', rx: '2', key: 'rdj6ps' }],\n ['path', { d: 'M2 2v20', key: '1ivd8o' }],\n]);\n\nexport default AlignStartVertical;\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,CAAA,CAAA,CAAA,CAAA,CAAqB,iBAAiB,oBAAsB,CAAA,CAAA,CAAA;AAAA,CAAA,CAChE,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,CAAA,CAAQ,CAAA,CAAA,CAAE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAO,MAAM,CAAQ,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,CAAG,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,GAAG,CAAK,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,CAAW,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AAC1C,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1 @@
{"version":3,"file":"manipulation.d.ts","sourceRoot":"https://raw.githubusercontent.com/fb55/domutils/0ab8bcf1ecfc70dfc93291a4cb2496578ac25e9c/src/","sources":["manipulation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAExD;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,SAAS,GAAG,IAAI,CAcnD;AAED;;;;;;GAMG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,SAAS,EAAE,WAAW,EAAE,SAAS,GAAG,IAAI,CAiB5E;AAED;;;;;;GAMG;AACH,wBAAgB,WAAW,CAAC,MAAM,EAAE,UAAU,EAAE,KAAK,EAAE,SAAS,GAAG,IAAI,CAatE;AAED;;;;;;GAMG;AACH,wBAAgB,MAAM,CAAC,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,SAAS,GAAG,IAAI,CAoB7D;AAED;;;;;;GAMG;AACH,wBAAgB,YAAY,CAAC,MAAM,EAAE,UAAU,EAAE,KAAK,EAAE,SAAS,GAAG,IAAI,CAavE;AAED;;;;;;GAMG;AACH,wBAAgB,OAAO,CAAC,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,SAAS,GAAG,IAAI,CAiB9D"}
@@ -0,0 +1 @@
module.exports={A:{A:{"2":"_E"},B:{"1":"_K","2":"_I"},C:{"1":"_qR","2":"_o _sB _L"},D:{"1":"_H _UJ _uH","2":"_ER"},E:{"1":"_dE","2":"_LI"},F:{"1":"_OM","2":"_1F"},G:{"1":"_cE","2":"_3F"},H:{"2":"1D"},I:{"1":"I","2":"_G"},J:{"2":"_B"},K:{"1":"H","2":"_D"},L:{"1":"I"},M:{"1":"YC"},N:{"2":"_A"},O:{"1":"bC"},P:{"1":"_9F","2":"_nF"},Q:{"16":"JE"},R:{"16":"KE"},S:{"2":"LE","16":"ME"}},B:5,C:"WebAssembly Non-trapping float-to-int Conversion",D:true};
@@ -0,0 +1,28 @@
import * as React from 'react';
import { useState, useCallback, useEffect, useLayoutEffect } from 'react';
export function renderCar(WrappedComponent, defaults) {
function State({ stateRef, props }) {
const renderTarget = useCallback(function SideTarget(...args) {
useLayoutEffect(() => {
stateRef.current(args);
});
return null;
}, []);
// @ts-ignore
return React.createElement(WrappedComponent, { ...props, children: renderTarget });
}
const Children = React.memo(({ stateRef, defaultState, children }) => {
const [state, setState] = useState(defaultState.current);
useEffect(() => {
stateRef.current = setState;
}, []);
return children(...state);
}, () => true);
return function Combiner(props) {
const defaultState = React.useRef(defaults(props));
const ref = React.useRef((state) => (defaultState.current = state));
return (React.createElement(React.Fragment, null,
React.createElement(State, { stateRef: ref, props: props }),
React.createElement(Children, { stateRef: ref, defaultState: defaultState, children: props.children })));
};
}
@@ -0,0 +1,135 @@
"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 () {
var ownKeys = function(o) {
ownKeys = Object.getOwnPropertyNames || function (o) {
var ar = [];
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
return ar;
};
return ownKeys(o);
};
return function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
__setModuleDefault(result, mod);
return result;
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
const tsutils = __importStar(require("ts-api-utils"));
const ts = __importStar(require("typescript"));
const util_1 = require("../util");
const getESLintCoreRule_1 = require("../util/getESLintCoreRule");
const baseRule = (0, getESLintCoreRule_1.getESLintCoreRule)('consistent-return');
const defaultOptions = [{ treatUndefinedAsUnspecified: false }];
exports.default = (0, util_1.createRule)({
name: 'consistent-return',
meta: {
type: 'suggestion',
defaultOptions,
docs: {
description: 'Require `return` statements to either always or never specify values',
extendsBaseRule: true,
requiresTypeChecking: true,
},
hasSuggestions: baseRule.meta.hasSuggestions,
messages: baseRule.meta.messages,
schema: baseRule.meta.schema,
},
defaultOptions,
create(context, [options]) {
const services = (0, util_1.getParserServices)(context);
const checker = services.program.getTypeChecker();
const rules = baseRule.create(context);
const functions = [];
const treatUndefinedAsUnspecified = options?.treatUndefinedAsUnspecified === true;
function enterFunction(node) {
functions.push(node);
}
function exitFunction() {
functions.pop();
}
function getCurrentFunction() {
return functions[functions.length - 1] ?? null;
}
function isPromiseVoid(node, type) {
if (tsutils.isThenableType(checker, node, type) &&
tsutils.isTypeReference(type)) {
const awaitedType = type.typeArguments?.[0];
if (awaitedType) {
if ((0, util_1.isTypeFlagSet)(awaitedType, ts.TypeFlags.Void)) {
return true;
}
return isPromiseVoid(node, awaitedType);
}
}
return false;
}
function isReturnVoidOrThenableVoid(node) {
const functionType = services.getTypeAtLocation(node);
const tsNode = services.esTreeNodeToTSNodeMap.get(node);
const callSignatures = functionType.getCallSignatures();
return callSignatures.some(signature => {
const returnType = signature.getReturnType();
if (node.async) {
return isPromiseVoid(tsNode, returnType);
}
return (0, util_1.isTypeFlagSet)(returnType, ts.TypeFlags.Void);
});
}
return {
...rules,
ArrowFunctionExpression: enterFunction,
'ArrowFunctionExpression:exit'(node) {
exitFunction();
rules['ArrowFunctionExpression:exit'](node);
},
FunctionDeclaration: enterFunction,
'FunctionDeclaration:exit'(node) {
exitFunction();
rules['FunctionDeclaration:exit'](node);
},
FunctionExpression: enterFunction,
'FunctionExpression:exit'(node) {
exitFunction();
rules['FunctionExpression:exit'](node);
},
ReturnStatement(node) {
const functionNode = getCurrentFunction();
if (!node.argument &&
functionNode &&
isReturnVoidOrThenableVoid(functionNode)) {
return;
}
if (treatUndefinedAsUnspecified && node.argument) {
const returnValueType = services.getTypeAtLocation(node.argument);
if (returnValueType.flags === ts.TypeFlags.Undefined) {
rules.ReturnStatement({
...node,
argument: null,
});
return;
}
}
rules.ReturnStatement(node);
},
};
},
});
@@ -0,0 +1,107 @@
"use client";
import { jsx } from 'react/jsx-runtime';
import { isHTMLElement } from 'motion-dom';
import * as React from 'react';
import { useId, useRef, useContext, useInsertionEffect } from 'react';
import { MotionConfigContext } from '../../context/MotionConfigContext.mjs';
import { useComposedRefs } from '../../utils/use-composed-ref.mjs';
/**
* Measurement functionality has to be within a separate component
* to leverage snapshot lifecycle.
*/
class PopChildMeasure extends React.Component {
getSnapshotBeforeUpdate(prevProps) {
const element = this.props.childRef.current;
if (isHTMLElement(element) && prevProps.isPresent && !this.props.isPresent && this.props.pop !== false) {
const parent = element.offsetParent;
const parentWidth = isHTMLElement(parent)
? parent.offsetWidth || 0
: 0;
const parentHeight = isHTMLElement(parent)
? parent.offsetHeight || 0
: 0;
const computedStyle = getComputedStyle(element);
const size = this.props.sizeRef.current;
size.height = parseFloat(computedStyle.height);
size.width = parseFloat(computedStyle.width);
size.top = element.offsetTop;
size.left = element.offsetLeft;
size.right = parentWidth - size.width - size.left;
size.bottom = parentHeight - size.height - size.top;
}
return null;
}
/**
* Required with getSnapshotBeforeUpdate to stop React complaining.
*/
componentDidUpdate() { }
render() {
return this.props.children;
}
}
function PopChild({ children, isPresent, anchorX, anchorY, root, pop }) {
const id = useId();
const ref = useRef(null);
const size = useRef({
width: 0,
height: 0,
top: 0,
left: 0,
right: 0,
bottom: 0,
});
const { nonce } = useContext(MotionConfigContext);
/**
* In React 19, refs are passed via props.ref instead of element.ref.
* We check props.ref first (React 19) and fall back to element.ref (React 18).
*/
const childRef = children.props?.ref ??
children?.ref;
const composedRef = useComposedRefs(ref, childRef);
/**
* We create and inject a style block so we can apply this explicit
* sizing in a non-destructive manner by just deleting the style block.
*
* We can't apply size via render as the measurement happens
* in getSnapshotBeforeUpdate (post-render), likewise if we apply the
* styles directly on the DOM node, we might be overwriting
* styles set via the style prop.
*/
useInsertionEffect(() => {
const { width, height, top, left, right, bottom } = size.current;
if (isPresent || pop === false || !ref.current || !width || !height)
return;
const x = anchorX === "left" ? `left: ${left}` : `right: ${right}`;
const y = anchorY === "bottom" ? `bottom: ${bottom}` : `top: ${top}`;
ref.current.dataset.motionPopId = id;
const style = document.createElement("style");
if (nonce)
style.nonce = nonce;
const parent = root ?? document.head;
parent.appendChild(style);
if (style.sheet) {
style.sheet.insertRule(`
[data-motion-pop-id="${id}"] {
position: absolute !important;
width: ${width}px !important;
height: ${height}px !important;
${x}px !important;
${y}px !important;
}
`);
}
return () => {
ref.current?.removeAttribute("data-motion-pop-id");
if (parent.contains(style)) {
parent.removeChild(style);
}
};
}, [isPresent]);
return (jsx(PopChildMeasure, { isPresent: isPresent, childRef: ref, sizeRef: size, pop: pop, children: pop === false
? children
: React.cloneElement(children, { ref: composedRef }) }));
}
export { PopChild };
//# sourceMappingURL=PopChild.mjs.map
@@ -0,0 +1 @@
{"version":3,"file":"zod-compat.js","sourceRoot":"","sources":["../../../src/server/zod-compat.ts"],"names":[],"mappings":"AAAA,gBAAgB;AA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BAA8B;QAC9B,IAAI,SAAS,IAAI,KAAK,IAAI,OAAO,KAAK,CAAC,OAAO,KAAK,QAAQ,EAAE,CAAC;YAC1D,OAAO,KAAK,CAAC,OAAO,CAAC;QACzB,CAAC;QACD,uCAAuC;QACvC,IAAI,CAAC;YACD,OAAO,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;QACjC,CAAC;QAAC,MAAM,CAAC;YACL,OAAO,MAAM,CAAC,KAAK,CAAC,CAAC;QACzB,CAAC;IACL,CAAC;IACD,OAAO,MAAM,CAAC,KAAK,CAAC,CAAC;AACzB,CAAC;AAED,iCAAiC;AACjC;;;;;;GAMG;AACH,MAAM,UAAU,oBAAoB,CAAC,MAAiB;IAClD,OAAQ,MAAmC,CAAC,WAAW,CAAC;AAC5D,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,gBAAgB,CAAC,MAAiB;IAC9C,IAAI,UAAU,CAAC,MAAM,CAAC,EAAE,CAAC;QACrB,MAAM,QAAQ,GAAG,MAAkC,CAAC;QACpD,OAAO,QAAQ,CAAC,IAAI,EAAE,GAAG,EAAE,IAAI,KAAK,UAAU,CAAC;IACnD,CAAC;IACD,MAAM,QAAQ,GAAG,MAAkC,CAAC;IACpD,6BAA6B;IAC7B,IAAI,OAAQ,MAAyC,CAAC,UAALine truncated
@@ -0,0 +1,5 @@
import { FullSearchSchema, RouteById } from './routeInfo.js';
import { AnyRouter } from './router.js';
import { Expand } from './utils.js';
export type UseSearchResult<TRouter extends AnyRouter, TFrom, TStrict extends boolean, TSelected> = unknown extends TSelected ? ResolveUseSearch<TRouter, TFrom, TStrict> : TSelected;
export type ResolveUseSearch<TRouter extends AnyRouter, TFrom, TStrict extends boolean> = TStrict extends false ? FullSearchSchema<TRouter['routeTree']> : Expand<RouteById<TRouter['routeTree'], TFrom>['types']['fullSearchSchema']>;
@@ -0,0 +1,257 @@
/**
* @fileoverview Enforce newlines between operands of ternary expressions
* @author Kai Cataldo
* @deprecated in ESLint v8.53.0
*/
"use strict";
const astUtils = require("./utils/ast-utils");
//------------------------------------------------------------------------------
// Rule Definition
//------------------------------------------------------------------------------
/** @type {import('../types').Rule.RuleModule} */
module.exports = {
meta: {
deprecated: {
message: "Formatting rules are being moved out of ESLint core.",
url: "https://eslint.org/blog/2023/10/deprecating-formatting-rules/",
deprecatedSince: "8.53.0",
availableUntil: "11.0.0",
replacedBy: [
{
message:
"ESLint Stylistic now maintains deprecated stylistic core rules.",
url: "https://eslint.style/guide/migration",
plugin: {
name: "@stylistic/eslint-plugin",
url: "https://eslint.style",
},
rule: {
name: "multiline-ternary",
url: "https://eslint.style/rules/multiline-ternary",
},
},
],
},
type: "layout",
docs: {
description:
"Enforce newlines between operands of ternary expressions",
recommended: false,
url: "https://eslint.org/docs/latest/rules/multiline-ternary",
},
schema: [
{
enum: ["always", "always-multiline", "never"],
},
],
messages: {
expectedTestCons:
"Expected newline between test and consequent of ternary expression.",
expectedConsAlt:
"Expected newline between consequent and alternate of ternary expression.",
unexpectedTestCons:
"Unexpected newline between test and consequent of ternary expression.",
unexpectedConsAlt:
"Unexpected newline between consequent and alternate of ternary expression.",
},
fixable: "whitespace",
},
create(context) {
const sourceCode = context.sourceCode;
const option = context.options[0];
const multiline = option !== "never";
const allowSingleLine = option === "always-multiline";
//--------------------------------------------------------------------------
// Public
//--------------------------------------------------------------------------
return {
ConditionalExpression(node) {
const questionToken = sourceCode.getTokenAfter(
node.test,
astUtils.isNotClosingParenToken,
);
const colonToken = sourceCode.getTokenAfter(
node.consequent,
astUtils.isNotClosingParenToken,
);
const firstTokenOfTest = sourceCode.getFirstToken(node);
const lastTokenOfTest =
sourceCode.getTokenBefore(questionToken);
const firstTokenOfConsequent =
sourceCode.getTokenAfter(questionToken);
const lastTokenOfConsequent =
sourceCode.getTokenBefore(colonToken);
const firstTokenOfAlternate =
sourceCode.getTokenAfter(colonToken);
const areTestAndConsequentOnSameLine =
astUtils.isTokenOnSameLine(
lastTokenOfTest,
firstTokenOfConsequent,
);
const areConsequentAndAlternateOnSameLine =
astUtils.isTokenOnSameLine(
lastTokenOfConsequent,
firstTokenOfAlternate,
);
const hasComments = !!sourceCode.getCommentsInside(node).length;
if (!multiline) {
if (!areTestAndConsequentOnSameLine) {
context.report({
node: node.test,
loc: {
start: firstTokenOfTest.loc.start,
end: lastTokenOfTest.loc.end,
},
messageId: "unexpectedTestCons",
fix(fixer) {
if (hasComments) {
return null;
}
const fixers = [];
const areTestAndQuestionOnSameLine =
astUtils.isTokenOnSameLine(
lastTokenOfTest,
questionToken,
);
const areQuestionAndConsOnSameLine =
astUtils.isTokenOnSameLine(
questionToken,
firstTokenOfConsequent,
);
if (!areTestAndQuestionOnSameLine) {
fixers.push(
fixer.removeRange([
lastTokenOfTest.range[1],
questionToken.range[0],
]),
);
}
if (!areQuestionAndConsOnSameLine) {
fixers.push(
fixer.removeRange([
questionToken.range[1],
firstTokenOfConsequent.range[0],
]),
);
}
return fixers;
},
});
}
if (!areConsequentAndAlternateOnSameLine) {
context.report({
node: node.consequent,
loc: {
start: firstTokenOfConsequent.loc.start,
end: lastTokenOfConsequent.loc.end,
},
messageId: "unexpectedConsAlt",
fix(fixer) {
if (hasComments) {
return null;
}
const fixers = [];
const areConsAndColonOnSameLine =
astUtils.isTokenOnSameLine(
lastTokenOfConsequent,
colonToken,
);
const areColonAndAltOnSameLine =
astUtils.isTokenOnSameLine(
colonToken,
firstTokenOfAlternate,
);
if (!areConsAndColonOnSameLine) {
fixers.push(
fixer.removeRange([
lastTokenOfConsequent.range[1],
colonToken.range[0],
]),
);
}
if (!areColonAndAltOnSameLine) {
fixers.push(
fixer.removeRange([
colonToken.range[1],
firstTokenOfAlternate.range[0],
]),
);
}
return fixers;
},
});
}
} else {
if (
allowSingleLine &&
node.loc.start.line === node.loc.end.line
) {
return;
}
if (areTestAndConsequentOnSameLine) {
context.report({
node: node.test,
loc: {
start: firstTokenOfTest.loc.start,
end: lastTokenOfTest.loc.end,
},
messageId: "expectedTestCons",
fix: fixer =>
hasComments
? null
: fixer.replaceTextRange(
[
lastTokenOfTest.range[1],
questionToken.range[0],
],
"\n",
),
});
}
if (areConsequentAndAlternateOnSameLine) {
context.report({
node: node.consequent,
loc: {
start: firstTokenOfConsequent.loc.start,
end: lastTokenOfConsequent.loc.end,
},
messageId: "expectedConsAlt",
fix: fixer =>
hasComments
? null
: fixer.replaceTextRange(
[
lastTokenOfConsequent.range[1],
colonToken.range[0],
],
"\n",
),
});
}
}
},
};
},
};
@@ -0,0 +1 @@
{"version":3,"file":"paintbrush-2.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;"}
@@ -0,0 +1,158 @@
const META = Symbol('proc-log.meta')
module.exports = {
META: META,
output: {
LEVELS: [
'standard',
'error',
'buffer',
'flush',
],
KEYS: {
standard: 'standard',
error: 'error',
buffer: 'buffer',
flush: 'flush',
},
standard: function (...args) {
return process.emit('output', 'standard', ...args)
},
error: function (...args) {
return process.emit('output', 'error', ...args)
},
buffer: function (...args) {
return process.emit('output', 'buffer', ...args)
},
flush: function (...args) {
return process.emit('output', 'flush', ...args)
},
},
log: {
LEVELS: [
'notice',
'error',
'warn',
'info',
'verbose',
'http',
'silly',
'timing',
'pause',
'resume',
],
KEYS: {
notice: 'notice',
error: 'error',
warn: 'warn',
info: 'info',
verbose: 'verbose',
http: 'http',
silly: 'silly',
timing: 'timing',
pause: 'pause',
resume: 'resume',
},
error: function (...args) {
return process.emit('log', 'error', ...args)
},
notice: function (...args) {
return process.emit('log', 'notice', ...args)
},
warn: function (...args) {
return process.emit('log', 'warn', ...args)
},
info: function (...args) {
return process.emit('log', 'info', ...args)
},
verbose: function (...args) {
return process.emit('log', 'verbose', ...args)
},
http: function (...args) {
return process.emit('log', 'http', ...args)
},
silly: function (...args) {
return process.emit('log', 'silly', ...args)
},
timing: function (...args) {
return process.emit('log', 'timing', ...args)
},
pause: function () {
return process.emit('log', 'pause')
},
resume: function () {
return process.emit('log', 'resume')
},
},
time: {
LEVELS: [
'start',
'end',
],
KEYS: {
start: 'start',
end: 'end',
},
start: function (name, fn) {
process.emit('time', 'start', name)
function end () {
return process.emit('time', 'end', name)
}
if (typeof fn === 'function') {
const res = fn()
if (res && res.finally) {
return res.finally(end)
}
end()
return res
}
return end
},
end: function (name) {
return process.emit('time', 'end', name)
},
},
input: {
LEVELS: [
'start',
'end',
'read',
],
KEYS: {
start: 'start',
end: 'end',
read: 'read',
},
start: function (...args) {
// Support callback for backwards compatibility and pass additional args to event
let fn
if (typeof args[0] === 'function') {
fn = args.shift()
}
process.emit('input', 'start', ...args)
function end () {
return process.emit('input', 'end', ...args)
}
if (typeof fn === 'function') {
const res = fn()
if (res && res.finally) {
return res.finally(end)
}
end()
return res
}
return end
},
end: function (...args) {
return process.emit('input', 'end', ...args)
},
read: function (...args) {
let resolve, reject
const promise = new Promise((_resolve, _reject) => {
resolve = _resolve
reject = _reject
})
process.emit('input', 'read', resolve, reject, ...args)
return promise
},
},
}
@@ -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 Shield = createLucideIcon("Shield", [
[
"path",
{
d: "M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",
key: "oel41y"
}
]
]);
export { Shield as default };
//# sourceMappingURL=shield.js.map
@@ -0,0 +1,111 @@
import Dispatcher from './dispatcher'
declare namespace MockCallHistoryLog {
/** request's configuration properties */
export type MockCallHistoryLogProperties = 'protocol' | 'host' | 'port' | 'origin' | 'path' | 'hash' | 'fullUrl' | 'method' | 'searchParams' | 'body' | 'headers'
}
/** a log reflecting request configuration */
declare class MockCallHistoryLog {
constructor (requestInit: Dispatcher.DispatchOptions)
/** protocol used. ie. 'https:' or 'http:' etc... */
protocol: string
/** request's host. */
host: string
/** request's port. */
port: string
/** request's origin. ie. https://localhost:3000. */
origin: string
/** path. never contains searchParams. */
path: string
/** request's hash. */
hash: string
/** the full url requested. */
fullUrl: string
/** request's method. */
method: string
/** search params. */
searchParams: Record<string, string>
/** request's body */
body: string | null | undefined
/** request's headers */
headers: Record<string, string | string[]> | null | undefined
/** returns an Map of property / value pair */
toMap (): Map<MockCallHistoryLog.MockCallHistoryLogProperties, string | Record<string, string | string[]> | null | undefined>
/** returns a string computed with all key value pair */
toString (): string
}
declare namespace MockCallHistory {
export type FilterCallsOperator = 'AND' | 'OR'
/** modify the filtering behavior */
export interface FilterCallsOptions {
/** the operator to apply when filtering. 'OR' will adds any MockCallHistoryLog matching any criteria given. 'AND' will adds only MockCallHistoryLog matching every criteria given. (default 'OR') */
operator?: FilterCallsOperator | Lowercase<FilterCallsOperator>
}
/** a function to be executed for filtering MockCallHistoryLog */
export type FilterCallsFunctionCriteria = (log: MockCallHistoryLog) => boolean
/** parameter to filter MockCallHistoryLog */
export type FilterCallsParameter = string | RegExp | undefined | null
/** an object to execute multiple filtering at once */
export interface FilterCallsObjectCriteria extends Record<string, FilterCallsParameter> {
/** filter by request protocol. ie https: */
protocol?: FilterCallsParameter;
/** filter by request host. */
host?: FilterCallsParameter;
/** filter by request port. */
port?: FilterCallsParameter;
/** filter by request origin. */
origin?: FilterCallsParameter;
/** filter by request path. */
path?: FilterCallsParameter;
/** filter by request hash. */
hash?: FilterCallsParameter;
/** filter by request fullUrl. */
fullUrl?: FilterCallsParameter;
/** filter by request method. */
method?: FilterCallsParameter;
}
}
/** a call history to track requests configuration */
declare class MockCallHistory {
constructor (name: string)
/** returns an array of MockCallHistoryLog. */
calls (): Array<MockCallHistoryLog>
/** returns the first MockCallHistoryLog */
firstCall (): MockCallHistoryLog | undefined
/** returns the last MockCallHistoryLog. */
lastCall (): MockCallHistoryLog | undefined
/** returns the nth MockCallHistoryLog. */
nthCall (position: number): MockCallHistoryLog | undefined
/** return all MockCallHistoryLog matching any of criteria given. if an object is used with multiple properties, you can change the operator to apply during filtering on options */
filterCalls (criteria: MockCallHistory.FilterCallsFunctionCriteria | MockCallHistory.FilterCallsObjectCriteria | RegExp, options?: MockCallHistory.FilterCallsOptions): Array<MockCallHistoryLog>
/** return all MockCallHistoryLog matching the given protocol. if a string is given, it is matched with includes */
filterCallsByProtocol (protocol: MockCallHistory.FilterCallsParameter): Array<MockCallHistoryLog>
/** return all MockCallHistoryLog matching the given host. if a string is given, it is matched with includes */
filterCallsByHost (host: MockCallHistory.FilterCallsParameter): Array<MockCallHistoryLog>
/** return all MockCallHistoryLog matching the given port. if a string is given, it is matched with includes */
filterCallsByPort (port: MockCallHistory.FilterCallsParameter): Array<MockCallHistoryLog>
/** return all MockCallHistoryLog matching the given origin. if a string is given, it is matched with includes */
filterCallsByOrigin (origin: MockCallHistory.FilterCallsParameter): Array<MockCallHistoryLog>
/** return all MockCallHistoryLog matching the given path. if a string is given, it is matched with includes */
filterCallsByPath (path: MockCallHistory.FilterCallsParameter): Array<MockCallHistoryLog>
/** return all MockCallHistoryLog matching the given hash. if a string is given, it is matched with includes */
filterCallsByHash (hash: MockCallHistory.FilterCallsParameter): Array<MockCallHistoryLog>
/** return all MockCallHistoryLog matching the given fullUrl. if a string is given, it is matched with includes */
filterCallsByFullUrl (fullUrl: MockCallHistory.FilterCallsParameter): Array<MockCallHistoryLog>
/** return all MockCallHistoryLog matching the given method. if a string is given, it is matched with includes */
filterCallsByMethod (method: MockCallHistory.FilterCallsParameter): Array<MockCallHistoryLog>
/** clear all MockCallHistoryLog on this MockCallHistory. */
clear (): void
/** use it with for..of loop or spread operator */
[Symbol.iterator]: () => Generator<MockCallHistoryLog>
}
export { MockCallHistoryLog, MockCallHistory }
@@ -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 './indent-increase.js';
//# sourceMappingURL=indent.js.map
@@ -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 ClockArrowDown = createLucideIcon("ClockArrowDown", [
["path", { d: "M12.338 21.994A10 10 0 1 1 21.925 13.227", key: "1i7shu" }],
["path", { d: "M12 6v6l2 1", key: "19cm8n" }],
["path", { d: "m14 18 4 4 4-4", key: "1waygx" }],
["path", { d: "M18 14v8", key: "irew45" }]
]);
export { ClockArrowDown as default };
//# sourceMappingURL=clock-arrow-down.js.map