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,337 @@
'use strict';
const object = {};
const hasOwnProperty = object.hasOwnProperty;
const forOwn = (object, callback) => {
for (const key in object) {
if (hasOwnProperty.call(object, key)) {
callback(key, object[key]);
}
}
};
const extend = (destination, source) => {
if (!source) {
return destination;
}
forOwn(source, (key, value) => {
destination[key] = value;
});
return destination;
};
const forEach = (array, callback) => {
const length = array.length;
let index = -1;
while (++index < length) {
callback(array[index]);
}
};
const fourHexEscape = (hex) => {
return '\\u' + ('0000' + hex).slice(-4);
}
const hexadecimal = (code, lowercase) => {
let hexadecimal = code.toString(16);
if (lowercase) return hexadecimal;
return hexadecimal.toUpperCase();
};
const toString = object.toString;
const isArray = Array.isArray;
const isBuffer = (value) => {
return typeof Buffer === 'function' && Buffer.isBuffer(value);
};
const isObject = (value) => {
// This is a very simple check, but it’s good enough for what we need.
return toString.call(value) == '[object Object]';
};
const isString = (value) => {
return typeof value == 'string' ||
toString.call(value) == '[object String]';
};
const isNumber = (value) => {
return typeof value == 'number' ||
toString.call(value) == '[object Number]';
};
const isBigInt = (value) => {
return typeof value == 'bigint';
};
const isFunction = (value) => {
return typeof value == 'function';
};
const isMap = (value) => {
return toString.call(value) == '[object Map]';
};
const isSet = (value) => {
return toString.call(value) == '[object Set]';
};
/*--------------------------------------------------------------------------*/
// https://mathiasbynens.be/notes/javascript-escapes#single
const singleEscapes = {
'\\': '\\\\',
'\b': '\\b',
'\f': '\\f',
'\n': '\\n',
'\r': '\\r',
'\t': '\\t'
// `\v` is omitted intentionally, because in IE < 9, '\v' == 'v'.
// '\v': '\\x0B'
};
const regexSingleEscape = /[\\\b\f\n\r\t]/;
const regexDigit = /[0-9]/;
const regexWhitespace = /[\xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/;
const escapeEverythingRegex = /([\uD800-\uDBFF][\uDC00-\uDFFF])|([\uD800-\uDFFF])|(['"`])|[^]/g;
const escapeNonAsciiRegex = /([\uD800-\uDBFF][\uDC00-\uDFFF])|([\uD800-\uDFFF])|(['"`])|[^ !#-&\(-\[\]-_a-~]/g;
const jsesc = (argument, options) => {
const increaseIndentation = () => {
oldIndent = indent;
++options.indentLevel;
indent = options.indent.repeat(options.indentLevel)
};
// Handle options
const defaults = {
'escapeEverything': false,
'minimal': false,
'isScriptContext': false,
'quotes': 'single',
'wrap': false,
'es6': false,
'json': false,
'compact': true,
'lowercaseHex': false,
'numbers': 'decimal',
'indent': '\t',
'indentLevel': 0,
'__inline1__': false,
'__inline2__': false
};
const json = options && options.json;
if (json) {
defaults.quotes = 'double';
defaults.wrap = true;
}
options = extend(defaults, options);
if (
options.quotes != 'single' &&
options.quotes != 'double' &&
options.quotes != 'backtick'
) {
options.quotes = 'single';
}
const quote = options.quotes == 'double' ?
'"' :
(options.quotes == 'backtick' ?
'`' :
'\''
);
const compact = options.compact;
const lowercaseHex = options.lowercaseHex;
let indent = options.indent.repeat(options.indentLevel);
let oldIndent = '';
const inline1 = options.__inline1__;
const inline2 = options.__inline2__;
const newLine = compact ? '' : '\n';
let result;
let isEmpty = true;
const useBinNumbers = options.numbers == 'binary';
const useOctNumbers = options.numbers == 'octal';
const useDecNumbers = options.numbers == 'decimal';
const useHexNumbers = options.numbers == 'hexadecimal';
if (json && argument && isFunction(argument.toJSON)) {
argument = argument.toJSON();
}
if (!isString(argument)) {
if (isMap(argument)) {
if (argument.size == 0) {
return 'new Map()';
}
if (!compact) {
options.__inline1__ = true;
options.__inline2__ = false;
}
return 'new Map(' + jsesc(Array.from(argument), options) + ')';
}
if (isSet(argument)) {
if (argument.size == 0) {
return 'new Set()';
}
return 'new Set(' + jsesc(Array.from(argument), options) + ')';
}
if (isBuffer(argument)) {
if (argument.length == 0) {
return 'Buffer.from([])';
}
return 'Buffer.from(' + jsesc(Array.from(argument), options) + ')';
}
if (isArray(argument)) {
result = [];
options.wrap = true;
if (inline1) {
options.__inline1__ = false;
options.__inline2__ = true;
}
if (!inline2) {
increaseIndentation();
}
forEach(argument, (value) => {
isEmpty = false;
if (inline2) {
options.__inline2__ = false;
}
result.push(
(compact || inline2 ? '' : indent) +
jsesc(value, options)
);
});
if (isEmpty) {
return '[]';
}
if (inline2) {
return '[' + result.join(', ') + ']';
}
return '[' + newLine + result.join(',' + newLine) + newLine +
(compact ? '' : oldIndent) + ']';
} else if (isNumber(argument) || isBigInt(argument)) {
if (json) {
// Some number values (e.g. `Infinity`) cannot be represented in JSON.
// `BigInt` values less than `-Number.MAX_VALUE` or greater than
// `Number.MAX_VALUE` cannot be represented in JSON so they will become
// `-Infinity` or `Infinity`, respectively, and then become `null` when
// stringified.
return JSON.stringify(Number(argument));
}
let result;
if (useDecNumbers) {
result = String(argument);
} else if (useHexNumbers) {
let hexadecimal = argument.toString(16);
if (!lowercaseHex) {
hexadecimal = hexadecimal.toUpperCase();
}
result = '0x' + hexadecimal;
} else if (useBinNumbers) {
result = '0b' + argument.toString(2);
} else if (useOctNumbers) {
result = '0o' + argument.toString(8);
}
if (isBigInt(argument)) {
return result + 'n';
}
return result;
} else if (isBigInt(argument)) {
if (json) {
// `BigInt` values less than `-Number.MAX_VALUE` or greater than
// `Number.MAX_VALUE` will become `-Infinity` or `Infinity`,
// respectively, and cannot be represented in JSON.
return JSON.stringify(Number(argument));
}
return argument + 'n';
} else if (!isObject(argument)) {
if (json) {
// For some values (e.g. `undefined`, `function` objects),
// `JSON.stringify(value)` returns `undefined` (which isn’t valid
// JSON) instead of `'null'`.
return JSON.stringify(argument) || 'null';
}
return String(argument);
} else { // it’s an object
result = [];
options.wrap = true;
increaseIndentation();
forOwn(argument, (key, value) => {
isEmpty = false;
result.push(
(compact ? '' : indent) +
jsesc(key, options) + ':' +
(compact ? '' : ' ') +
jsesc(value, options)
);
});
if (isEmpty) {
return '{}';
}
return '{' + newLine + result.join(',' + newLine) + newLine +
(compact ? '' : oldIndent) + '}';
}
}
const regex = options.escapeEverything ? escapeEverythingRegex : escapeNonAsciiRegex;
result = argument.replace(regex, (char, pair, lone, quoteChar, index, string) => {
if (pair) {
if (options.minimal) return pair;
const first = pair.charCodeAt(0);
const second = pair.charCodeAt(1);
if (options.es6) {
// https://mathiasbynens.be/notes/javascript-encoding#surrogate-formulae
const codePoint = (first - 0xD800) * 0x400 + second - 0xDC00 + 0x10000;
const hex = hexadecimal(codePoint, lowercaseHex);
return '\\u{' + hex + '}';
}
return fourHexEscape(hexadecimal(first, lowercaseHex)) + fourHexEscape(hexadecimal(second, lowercaseHex));
}
if (lone) {
return fourHexEscape(hexadecimal(lone.charCodeAt(0), lowercaseHex));
}
if (
char == '\0' &&
!json &&
!regexDigit.test(string.charAt(index + 1))
) {
return '\\0';
}
if (quoteChar) {
if (quoteChar == quote || options.escapeEverything) {
return '\\' + quoteChar;
}
return quoteChar;
}
if (regexSingleEscape.test(char)) {
// no need for a `hasOwnProperty` check here
return singleEscapes[char];
}
if (options.minimal && !regexWhitespace.test(char)) {
return char;
}
const hex = hexadecimal(char.charCodeAt(0), lowercaseHex);
if (json || hex.length > 2) {
return fourHexEscape(hex);
}
return '\\x' + ('00' + hex).slice(-2);
});
if (quote == '`') {
result = result.replace(/\$\{/g, '\\${');
}
if (options.isScriptContext) {
// https://mathiasbynens.be/notes/etago
result = result
.replace(/<\/(script|style)/gi, '<\\/$1')
.replace(/<!--/g, json ? '\\u003C!--' : '\\x3C!--');
}
if (options.wrap) {
result = quote + result + quote;
}
return result;
};
jsesc.version = '3.0.2';
module.exports = jsesc;
@@ -0,0 +1 @@
{"version":3,"file":"heading-3.js","sources":["../../../src/icons/heading-3.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name Heading3\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNNCAxMmg4IiAvPgogIDxwYXRoIGQ9Ik00IDE4VjYiIC8+CiAgPHBhdGggZD0iTTEyIDE4VjYiIC8+CiAgPHBhdGggZD0iTTE3LjUgMTAuNWMxLjctMSAzLjUgMCAzLjUgMS41YTIgMiAwIDAgMS0yIDIiIC8+CiAgPHBhdGggZD0iTTE3IDE3LjVjMiAxLjUgNCAuMyA0LTEuNWEyIDIgMCAwIDAtMi0yIiAvPgo8L3N2Zz4K) - https://lucide.dev/icons/heading-3\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 Heading3 = createLucideIcon('Heading3', [\n ['path', { d: 'M4 12h8', key: '17cfdx' }],\n ['path', { d: 'M4 18V6', key: '1rz3zl' }],\n ['path', { d: 'M12 18V6', key: 'zqpxq5' }],\n ['path', { d: 'M17.5 10.5c1.7-1 3.5 0 3.5 1.5a2 2 0 0 1-2 2', key: '68ncm8' }],\n ['path', { d: 'M17 17.5c2 1.5 4 .3 4-1.5a2 2 0 0 0-2-2', key: '1ejuhz' }],\n]);\n\nexport default Heading3;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAW,iBAAiB,UAAY,CA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AA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,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;AAC1E,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1,17 @@
/**
* @license lucide-react v0.469.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const PaintRoller = createLucideIcon("PaintRoller", [
["rect", { width: "16", height: "6", x: "2", y: "2", rx: "2", key: "jcyz7m" }],
["path", { d: "M10 16v-2a2 2 0 0 1 2-2h8a2 2 0 0 0 2-2V7a2 2 0 0 0-2-2h-2", key: "1b9h7c" }],
["rect", { width: "4", height: "6", x: "8", y: "16", rx: "1", key: "d6e7yl" }]
]);
export { PaintRoller as default };
//# sourceMappingURL=paint-roller.js.map
@@ -0,0 +1,14 @@
import type { TSESTree } from '@typescript-eslint/utils';
import type { InferMessageIdsTypeFromRule, InferOptionsTypeFromRule } from '../util';
declare const baseRule: import("@typescript-eslint/utils/ts-eslint").RuleModule<"unexpected", [], unknown, {
'ClassBody:exit'(): void;
'MethodDefinition, PropertyDefinition'(node: TSESTree.MethodDefinition | TSESTree.PropertyDefinition): void;
ClassBody(): void;
Program(): void;
}>;
export type Options = InferOptionsTypeFromRule<typeof baseRule>;
export type MessageIds = InferMessageIdsTypeFromRule<typeof baseRule>;
declare const _default: import("@typescript-eslint/utils/ts-eslint").RuleModule<"unexpected", [], import("../../rules").ESLintPluginDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener> & {
name: string;
};
export default _default;
@@ -0,0 +1,31 @@
/**
* @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 NutOff = createLucideIcon("NutOff", [
["path", { d: "M12 4V2", key: "1k5q1u" }],
[
"path",
{
d: "M5 10v4a7.004 7.004 0 0 0 5.277 6.787c.412.104.802.292 1.102.592L12 22l.621-.621c.3-.3.69-.488 1.102-.592a7.01 7.01 0 0 0 4.125-2.939",
key: "1xcvy9"
}
],
["path", { d: "M19 10v3.343", key: "163tfc" }],
[
"path",
{
d: "M12 12c-1.349-.573-1.905-1.005-2.5-2-.546.902-1.048 1.353-2.5 2-1.018-.644-1.46-1.08-2-2-1.028.71-1.69.918-3 1 1.081-1.048 1.757-2.03 2-3 .194-.776.84-1.551 1.79-2.21m11.654 5.997c.887-.457 1.28-.891 1.556-1.787 1.032.916 1.683 1.157 3 1-1.297-1.036-1.758-2.03-2-3-.5-2-4-4-8-4-.74 0-1.461.068-2.15.192",
key: "17914v"
}
],
["line", { x1: "2", x2: "22", y1: "2", y2: "22", key: "a6p6uj" }]
]);
export { NutOff as default };
//# sourceMappingURL=nut-off.js.map
@@ -0,0 +1,61 @@
import { DateInput, Unit } from './types';
/**
* Checks if a date is the same as or after another date or a specified time unit.
* 检查一个日期是否与另一个日期或指定的时间单位相同或在其之后。
*
* @param date - The date to compare. (要比较的日期。)
* @param input - The date or time unit to compare against. (要比较的日期或时间单位。)
* @param unit - The unit of time to compare (e.g., 'year', 'month', 'day', 'hour', 'minute', 'second', 'millisecond').
* (要比较的时间单位,例如 'year'、'month'、'day'、'hour'、'minute'、'second'、'millisecond'。)
* @returns A boolean indicating whether the first date is the same as or after the second date or time unit.
* (布尔值,表示第一个日期是否与第二个日期或时间单位相同或在其之后。)
* @example
* ```ts
* // Checking if a date is the same as or after another date (检查一个日期是否与另一个日期相同或在其之后)
* const date1 = new Date('2023-10-01');
* const date2 = new Date('2023-10-01');
* const isSameOrAfterDate = isSameOrAfter(date1, date2, 'day');
* console.log(isSameOrAfterDate); // Outputs: true (输出: true)
*
* // Checking if a date is after another date (检查一个日期是否在另一个日期之后)
* const date3 = new Date('2023-10-02');
* const isSameOrAfterDate2 = isSameOrAfter(date3, date2, 'day');
* console.log(isSameOrAfterDate2); // Outputs: true (输出: true)
*
* // Checking if a date is the same as or after a specific year (检查一个日期是否与特定年份相同或在其之后)
* const date4 = new Date('2023-01-01');
* const isSameOrAfterYear = isSameOrAfter(date4, 2023, 'year');
* console.log(isSameOrAfterYear); // Outputs: true (输出: true)
*
* // Checking if a date is the same as or after a specific month (检查一个日期是否与特定月份相同或在其之后)
* const date5 = new Date('2023-10-01');
* const isSameOrAfterMonth = isSameOrAfter(date5, '2023-10', 'month');
* console.log(isSameOrAfterMonth); // Outputs: true (输出: true)
*
* // Checking if a date is the same as or after a specific day (检查一个日期是否与特定天数相同或在其之后)
* const date6 = new Date('2023-10-01');
* const isSameOrAfterDay = isSameOrAfter(date6, '2023-10-01', 'day');
* console.log(isSameOrAfterDay); // Outputs: true (输出: true)
*
* // Checking if a date is the same as or after a specific hour (检查一个日期是否与特定小时相同或在其之后)
* const date7 = new Date('2023-10-01T12:00:00');
* const isSameOrAfterHour = isSameOrAfter(date7, '2023-10-01T12:00:00', 'hour');
* console.log(isSameOrAfterHour); // Outputs: true (输出: true)
*
* // Checking if a date is the same as or after a specific minute (检查一个日期是否与特定分钟相同或在其之后)
* const date8 = new Date('2023-10-01T12:00:00');
* const isSameOrAfterMinute = isSameOrAfter(date8, '2023-10-01T12:00:00', 'minute');
* console.log(isSameOrAfterMinute); // Outputs: true (输出: true)
*
* // Checking if a date is the same as or after a specific second (检查一个日期是否与特定秒数相同或在其之后)
* const date9 = new Date('2023-10-01T12:00:00');
* const isSameOrAfterSecond = isSameOrAfter(date9, '2023-10-01T12:00:00', 'second');
* console.log(isSameOrAfterSecond); // Outputs: true (输出: true)
*
* // Checking if a date is the same as or after a specific millisecond (检查一个日期是否与特定毫秒数相同或在其之后)
* const date10 = new Date('2023-10-01T12:00:00.000');
* const isSameOrAfterMillisecond = isSameOrAfter(date10, '2023-10-01T12:00:00.000', 'millisecond');
* console.log(isSameOrAfterMillisecond); // Outputs: true (输出: true)
* ```
*/
export default function isSameOrAfter(date: Date, input: DateInput, unit?: Unit): boolean;
@@ -0,0 +1,17 @@
{
"root": true,
"extends": "@ljharb",
"rules": {
"func-name-matching": 0,
"id-length": 0,
"new-cap": [2, {
"capIsNewExceptions": [
"GetIntrinsic",
],
}],
"no-extra-parens": 0,
"no-magic-numbers": 0,
},
}
@@ -0,0 +1 @@
{"version":3,"file":"phone-missed.js","sources":["../../../src/icons/phone-missed.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name PhoneMissed\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8bGluZSB4MT0iMjIiIHgyPSIxNiIgeTE9IjIiIHkyPSI4IiAvPgogIDxsaW5lIHgxPSIxNiIgeDI9IjIyIiB5MT0iMiIgeTI9IjgiIC8+CiAgPHBhdGggZD0iTTIyIDE2LjkydjNhMiAyIDAgMCAxLTIuMTggMiAxOS43OSAxOS43OSAwIDAgMS04LjYzLTMuMDcgMTkuNSAxOS41IDAgMCAxLTYtNiAxOS43OSAxOS43OSAwIDAgMS0zLjA3LTguNjdBMiAyIDAgMCAxIDQuMTEgMmgzYTIgMiAwIDAgMSAyIDEuNzIgMTIuODQgMTIuODQgMCAwIDAgLjcgMi44MSAyIDIgMCAwIDEtLjQ1IDIuMTFMOC4wOSA5LjkxYTE2IDE2IDAgMCAwIDYgNmwxLjI3LTEuMjdhMiAyIDAgMCAxIDIuMTEtLjQ1IDEyLjg0IDEyLjg0IDAgMCAwIDIuODEuN0EyIDIgMCAwIDEgMjIgMTYuOTJ6IiAvPgo8L3N2Zz4K) - https://lucide.dev/icons/phone-missed\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 PhoneMissed = createLucideIcon('PhoneMissed', [\n ['line', { x1: '22', x2: '16', y1: '2', y2: '8', key: '1xzwqn' }],\n ['line', { x1: '16', x2: '22', y1: '2', y2: '8', key: '13zxdn' }],\n [\n 'path',\n {\n d: 'M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z',\n key: 'foiqr5',\n },\n ],\n]);\n\nexport default PhoneMissed;\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,CAClD,CAAA,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAE,CAAA,CAAA,CAAA,EAAI,CAAM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAI,CAAM,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAI,CAAA,CAAA,CAAA,CAAK,CAAA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CAAA,CAAA;AAAA,CACP,CAAA,CAAA,CAAA,CAAA;AAAA,CACF,CAAA,CAAA;AACF,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1,34 @@
# escape-string-regexp [![Build Status](https://travis-ci.org/sindresorhus/escape-string-regexp.svg?branch=master)](https://travis-ci.org/sindresorhus/escape-string-regexp)
> Escape RegExp special characters
## Install
```
$ npm install escape-string-regexp
```
## Usage
```js
const escapeStringRegexp = require('escape-string-regexp');
const escapedString = escapeStringRegexp('How much $ for a 🦄?');
//=> 'How much \\$ for a 🦄\\?'
new RegExp(escapedString);
```
You can also use this to escape a string that is inserted into the middle of a regex, for example, into a character class.
---
<div align="center">
<b>
<a href="https://tidelift.com/subscription/pkg/npm-escape-string-regexp?utm_source=npm-escape-string-regexp&utm_medium=referral&utm_campaign=readme">Get professional support for this package with a Tidelift subscription</a>
</b>
<br>
<sub>
Tidelift helps make open source sustainable for maintainers while giving companies<br>assurances about security, maintenance, and licensing for their dependencies.
</sub>
</div>
@@ -0,0 +1,176 @@
/**
* @fileoverview Rule to disallow `\8` and `\9` escape sequences in string literals.
* @author Milos Djermanovic
*/
"use strict";
//------------------------------------------------------------------------------
// Typedefs
//------------------------------------------------------------------------------
/**
* @import { SourceRange } from "@eslint/core";
*/
//------------------------------------------------------------------------------
// Helpers
//------------------------------------------------------------------------------
const QUICK_TEST_REGEX = /\\[89]/u;
/**
* Returns unicode escape sequence that represents the given character.
* @param {string} character A single code unit.
* @returns {string} "\uXXXX" sequence.
*/
function getUnicodeEscape(character) {
return `\\u${character.charCodeAt(0).toString(16).padStart(4, "0")}`;
}
//------------------------------------------------------------------------------
// Rule Definition
//------------------------------------------------------------------------------
/** @type {import('../types').Rule.RuleModule} */
module.exports = {
meta: {
type: "suggestion",
docs: {
description:
"Disallow `\\8` and `\\9` escape sequences in string literals",
recommended: true,
url: "https://eslint.org/docs/latest/rules/no-nonoctal-decimal-escape",
},
hasSuggestions: true,
schema: [],
messages: {
decimalEscape: "Don't use '{{decimalEscape}}' escape sequence.",
// suggestions
refactor:
"Replace '{{original}}' with '{{replacement}}'. This maintains the current functionality.",
escapeBackslash:
"Replace '{{original}}' with '{{replacement}}' to include the actual backslash character.",
},
},
create(context) {
const sourceCode = context.sourceCode;
/**
* Creates a new Suggestion object.
* @param {string} messageId "refactor" or "escapeBackslash".
* @param {SourceRange} range The range to replace.
* @param {string} replacement New text for the range.
* @returns {Object} Suggestion
*/
function createSuggestion(messageId, range, replacement) {
return {
messageId,
data: {
original: sourceCode.getText().slice(...range),
replacement,
},
fix(fixer) {
return fixer.replaceTextRange(range, replacement);
},
};
}
return {
Literal(node) {
if (typeof node.value !== "string") {
return;
}
if (!QUICK_TEST_REGEX.test(node.raw)) {
return;
}
const regex =
/(?:[^\\]|(?<previousEscape>\\.))*?(?<decimalEscape>\\[89])/suy;
let match;
while ((match = regex.exec(node.raw))) {
const { previousEscape, decimalEscape } = match.groups;
const decimalEscapeRangeEnd =
node.range[0] + match.index + match[0].length;
const decimalEscapeRangeStart =
decimalEscapeRangeEnd - decimalEscape.length;
const decimalEscapeRange = [
decimalEscapeRangeStart,
decimalEscapeRangeEnd,
];
const suggest = [];
// When `regex` is matched, `previousEscape` can only capture characters adjacent to `decimalEscape`
if (previousEscape === "\\0") {
/*
* Now we have a NULL escape "\0" immediately followed by a decimal escape, e.g.: "\0\8".
* Fixing this to "\08" would turn "\0" into a legacy octal escape. To avoid producing
* an octal escape while fixing a decimal escape, we provide different suggestions.
*/
suggest.push(
createSuggestion(
// "\0\8" -> "\u00008"
"refactor",
[
decimalEscapeRangeStart -
previousEscape.length,
decimalEscapeRangeEnd,
],
`${getUnicodeEscape("\0")}${decimalEscape[1]}`,
),
createSuggestion(
// "\8" -> "\u0038"
"refactor",
decimalEscapeRange,
getUnicodeEscape(decimalEscape[1]),
),
);
} else {
suggest.push(
createSuggestion(
// "\8" -> "8"
"refactor",
decimalEscapeRange,
decimalEscape[1],
),
);
}
suggest.push(
createSuggestion(
// "\8" -> "\\8"
"escapeBackslash",
decimalEscapeRange,
`\\${decimalEscape}`,
),
);
context.report({
node,
loc: {
start: sourceCode.getLocFromIndex(
decimalEscapeRangeStart,
),
end: sourceCode.getLocFromIndex(
decimalEscapeRangeEnd,
),
},
messageId: "decimalEscape",
data: {
decimalEscape,
},
suggest,
});
}
},
};
},
};
@@ -0,0 +1,2 @@
import { endTime, setMetric, startTime, timing, wrapTime } from "./timing.js";
export { endTime, setMetric, startTime, timing, wrapTime };
@@ -0,0 +1 @@
{"version":3,"file":"arrow-up-right-from-square.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;"}
@@ -0,0 +1 @@
{"version":3,"file":"use-animate-style.mjs","sources":["../../../../src/animation/hooks/use-animate-style.ts"],"sourcesContent":["\"use client\"\n\nimport { useConstant } from \"../../utils/use-constant\"\nimport { useUnmountEffect } from \"../../utils/use-unmount-effect\"\nimport { createScopedWaapiAnimate } from \"../animators/waapi/animate-style\"\nimport { AnimationScope } from \"motion-dom\"\n\nexport function useAnimateMini<T extends Element = any>() {\n const scope: AnimationScope<T> = useConstant(() => ({\n current: null!, // Will be hydrated by React\n animations: [],\n }))\n\n const animate = useConstant(() => createScopedWaapiAnimate(scope))\n\n useUnmountEffect(() => {\n scope.animations.forEach((animation) => animation.stop())\n })\n\n return [scope, animate] as [AnimationScope<T>, typeof animate]\n}\n"],"names":[],"mappings":";;;;;;AAQI;;AAEI;AACH;AAED;;AAGI;AACJ;AAEA;AACJ;;"}
@@ -0,0 +1 @@
{"version":3,"file":"keyboard-music.js","sources":["../../../src/icons/keyboard-music.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name KeyboardMusic\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cmVjdCB3aWR0aD0iMjAiIGhlaWdodD0iMTYiIHg9IjIiIHk9IjQiIHJ4PSIyIiAvPgogIDxwYXRoIGQ9Ik02IDhoNCIgLz4KICA8cGF0aCBkPSJNMTQgOGguMDEiIC8+CiAgPHBhdGggZD0iTTE4IDhoLjAxIiAvPgogIDxwYXRoIGQ9Ik0yIDEyaDIwIiAvPgogIDxwYXRoIGQ9Ik02IDEydjQiIC8+CiAgPHBhdGggZD0iTTEwIDEydjQiIC8+CiAgPHBhdGggZD0iTTE0IDEydjQiIC8+CiAgPHBhdGggZD0iTTE4IDEydjQiIC8+Cjwvc3ZnPgo=) - https://lucide.dev/icons/keyboard-music\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 KeyboardMusic = createLucideIcon('KeyboardMusic', [\n ['rect', { width: '20', height: '16', x: '2', y: '4', rx: '2', key: '18n3k1' }],\n ['path', { d: 'M6 8h4', key: 'utf9t1' }],\n ['path', { d: 'M14 8h.01', key: '1primd' }],\n ['path', { d: 'M18 8h.01', key: 'emo2bl' }],\n ['path', { d: 'M2 12h20', key: '9i4pu4' }],\n ['path', { d: 'M6 12v4', key: 'dy92yo' }],\n ['path', { d: 'M10 12v4', key: '1fxnav' }],\n ['path', { d: 'M14 12v4', key: '1hft58' }],\n ['path', { d: 'M18 12v4', key: 'tjjnbz' }],\n]);\n\nexport default KeyboardMusic;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CA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A,CAAA,CAAA,CAAE,GAAG,CAAY,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACzC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAW,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACxC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAY,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACzC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAY,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACzC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAY,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AAC3C,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1,7 @@
/**
* Check if the value is a zero value string like "0px" or "0%"
*/
const isZeroValueString = (v) => /^0[^.\s]+$/u.test(v);
export { isZeroValueString };
//# sourceMappingURL=is-zero-value-string.mjs.map
@@ -0,0 +1,16 @@
import { MutableRefObject } from 'react';
import { ReactRef } from './types';
/**
* Merges two or more refs together providing a single interface to set their value
* @param {RefObject|Ref} refs
* @returns {MutableRefObject} - a new ref, which translates all changes to {refs}
*
* @see {@link useMergeRefs} to be used in ReactComponents
* @example
* const Component = React.forwardRef((props, ref) => {
* const ownRef = useRef();
* const domRef = mergeRefs([ref, ownRef]); // 👈 merge together
* return <div ref={domRef}>...</div>
* }
*/
export declare function mergeRefs<T>(refs: ReactRef<T>[]): MutableRefObject<T | null>;
@@ -0,0 +1 @@
{"version":3,"file":"sunset.js","sources":["../../../src/icons/sunset.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name Sunset\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMTIgMTBWMiIgLz4KICA8cGF0aCBkPSJtNC45MyAxMC45MyAxLjQxIDEuNDEiIC8+CiAgPHBhdGggZD0iTTIgMThoMiIgLz4KICA8cGF0aCBkPSJNMjAgMThoMiIgLz4KICA8cGF0aCBkPSJtMTkuMDcgMTAuOTMtMS40MSAxLjQxIiAvPgogIDxwYXRoIGQ9Ik0yMiAyMkgyIiAvPgogIDxwYXRoIGQ9Im0xNiA2LTQgNC00LTQiIC8+CiAgPHBhdGggZD0iTTE2IDE4YTQgNCAwIDAgMC04IDAiIC8+Cjwvc3ZnPgo=) - https://lucide.dev/icons/sunset\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 Sunset = createLucideIcon('Sunset', [\n ['path', { d: 'M12 10V2', key: '16sf7g' }],\n ['path', { d: 'm4.93 10.93 1.41 1.41', key: '2a7f42' }],\n ['path', { d: 'M2 18h2', key: 'j10viu' }],\n ['path', { d: 'M20 18h2', key: 'wocana' }],\n ['path', { d: 'm19.07 10.93-1.41 1.41', key: '15zs5n' }],\n ['path', { d: 'M22 22H2', key: '19qnx5' }],\n ['path', { d: 'm16 6-4 4-4-4', key: '6wukr' }],\n ['path', { d: 'M16 18a4 4 0 0 0-8 0', key: '1lzouq' }],\n]);\n\nexport default Sunset;\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,CAAY,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACzC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAyB,CAAA,CAAA,CAAA,CAAA,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,CACtD,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAW,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,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CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AACvD,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1 @@
module.exports={C:{"4":0.01444,"115":0.07699,"120":0.26466,"121":0.51007,"122":0.00481,"123":0.01444,"124":0.01925,"125":0.00962,"128":0.00481,"130":0.00481,"131":0.00481,"132":0.00481,"133":0.00481,"135":0.00481,"136":0.01444,"137":0.00481,"140":0.01925,"141":0.00481,"142":0.00481,"143":0.00481,"146":0.00481,"147":0.00481,"148":0.00481,"150":0.01444,"151":0.00481,"152":0.00962,"153":0.00962,"154":0.07699,"155":0.39458,"156":0.29834,"157":0.01444,_:"2 3 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 116 117 118 119 126 127 129 134 138 139 144 145 149 158 159 160 3.5 3.6"},D:{"34":0.00481,"38":0.00962,"49":0.01925,"65":0.00481,"79":0.05774,"87":0.03368,"93":0.00481,"97":0.01925,"103":0.12992,"104":0.1203,"105":0.1203,"106":0.12511,"107":0.1203,"108":0.1203,"109":0.71218,"110":0.1203,"111":0.19729,"112":0.12992,"114":0.01444,"116":0.27428,"117":0.1203,"118":0.39458,"119":0.53413,"120":0.6833,"121":0.02406,"122":0.06256,"123":0.02406,"124":0.13955,"125":0.00962,"126":0.01444,"127":0.01925,"128":0.02406,"129":0.00962,"130":0.01444,"131":0.28391,"132":0.01925,"133":0.45714,"134":0.24541,"135":0.23579,"136":0.25504,"137":0.25985,"138":0.30797,"139":0.25504,"140":0.28872,"141":0.28391,"142":0.88541,"143":0.02887,"144":0.05293,"145":0.18286,"146":0.14436,"147":0.04812,"148":0.20692,"149":0.26947,"150":0.4427,"151":1.83818,"152":12.36684,"153":10.25918,"154":2.23758,"155":0.04331,_:"4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 35 36 37 39 40 41 42 43 44 45 46 47 48 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 66 67 68 69 70 71 72 73 74 75 76 77 78 80 81 83 84 85 86 88 89 90 91 92 94 95 96 98 99 100 101 102 113 115 156 157"},F:{"91":0.00481,"95":0.01444,"101":0.00481,"105":0.00962,"106":0.01925,"107":0.00962,"114":0.00481,"115":0.00481,"116":0.00481,"119":0.00481,"120":0.00481,"121":0.00481,"122":0.00481,"126":0.00481,"133":0.00481,"134":0.21173,"135":0.88541,_:"9 11 12 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 60 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 92 93 94 96 97 98 99 100 102 103 104 108 109 110 111 112 113 117 118 123 124 125 127 131 132 9.5-9.6 10.0-10.1 10.5 10.6 11.1 11.5 11.6 12.1"},B:{"18":0.00481,"92":0.00962,"109":0.01444,"119":0.25504,"120":0.25985,"122":0.02406,"123":0.00481,"124":0.00481,"125":0.00481,"131":0.00481,"132":0.00481,"133":0.00481,"136":0.00481,"138":0.00481,"139":0.00481,"140":0.00962,"141":0.00481,"142":0.00481,"143":0.00962,"144":0.00962,"145":0.01444,"146":0.01444,"147":0.02406,"148":0.02406,"149":0.02406,"150":0.04812,"151":0.17323,"152":1.70826,"153":2.00179,"154":0.51488,_:"12 13 14 15 16 17 79 80 81 83 84 85 86 87 88 89 90 91 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 110 111 112 113 114 115 116 117 118 121 126 127 128 129 130 134 135 137"},E:{"27":0.0385,_:"4 5 6 7 8 9 10 11 12 13 14 15 3.1 3.2 5.1 6.1 7.1 9.1 10.1 11.1 12.1 13.1 15.1 15.2-15.3 15.4 15.5 16.0 16.1 16.2 16.3 16.4 16.5 17.0 18.0 18.1 27.1 27.2 TP","14.1":0.00481,"15.6":0.00481,"16.6":0.01925,"17.1":0.01444,"17.2":0.00481,"17.3":0.00481,"17.4":0.00481,"17.5":0.00481,"17.6":0.01444,"18.2":0.00481,"18.3":0.00481,"18.4":0.00481,"18.5-18.7":0.00481,"26.0":0.00481,"26.1":0.00481,"26.2":0.00962,"26.3":0.01925,"26.4":0.02406,"26.5":0.09624,"26.6":0.29353},G:{"8":0,"3.2":0,"4.0-4.1":0,"4.2-4.3":0.00051,"5.0-5.1":0.00051,"6.0-6.1":0,"7.0-7.1":0.00103,"8.1-8.4":0,"9.0-9.2":0,"9.3":0,"10.0-10.2":0,"10.3":0.00514,"11.0-11.2":0.00051,"11.3-11.4":0.00103,"12.0-12.1":0,"12.2-12.5":0.01335,"13.0-13.1":0,"13.2":0.00257,"13.3":0,"13.4-13.7":0.00051,"14.0-14.4":0.00205,"14.5-14.8":0.00308,"15.0-15.1":0.00308,"15.2-15.3":0.00205,"15.4":0.00257,"15.5":0.00308,"15.6-15.8":0.06677,"16.0":0.00514,"16.1":0.00925,"16.2":0.00514,"16.3":0.0113,"16.4":0.00257,"16.5":0.00411,"16.6-16.7":0.09296,"17.0":0.0036,"17.1":0.00514,"17.2":0.00514,"17.3":0.0077,"17.4":0.01079,"17.5":0.02106,"17.6-17.7":0.05444,"18.0":0.0113,"18.1":0.0226,"18.2":0.03082,"18.3":0.05342,"18.4":0.03338,"18.5-18.7":0.68978,"26.0":0.03338,"26.1":0.0339,"26.2":0.08834,"26.3":0.09553,"26.4":0.06985,"26.5":0.4679,"26.6":2.88701,"27.0":0.22137,"27.1":0,"27.2":0.00565},P:{"4":0.02715,"22":0.00905,"23":0.00905,"25":0.00905,"26":0.0181,"27":0.0181,"28":0.03621,"29":0.04526,"30":0.64265,_:"20 21 24 5.0-5.4 6.2-6.4 9.2 10.1 11.1-11.2 12.0 13.0 14.0 15.0 16.0 17.0 18.0 19.0","7.2-7.4":0.0181,"8.2":0.0181},I:{"0":0.05184,"3":0,"4":0,"2.1":0,"2.2":0,"2.3":0,"4.1":0,"4.2-4.3":0,"4.4":0,"4.4.3-4.4.4":0.00002},K:{"0":0.20233,_:"10 11 12 11.1 11.5 12.1"},A:{_:"6 7 8 9 10 11 5.5"},S:{_:"2.5 3.0-3.1"},J:{_:"7 10"},N:{_:"Line truncated
@@ -0,0 +1 @@
{"version":3,"file":"arrow-down-to-line.js","sources":["../../../src/icons/arrow-down-to-line.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name ArrowDownToLine\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMTIgMTdWMyIgLz4KICA8cGF0aCBkPSJtNiAxMSA2IDYgNi02IiAvPgogIDxwYXRoIGQ9Ik0xOSAyMUg1IiAvPgo8L3N2Zz4K) - https://lucide.dev/icons/arrow-down-to-line\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 ArrowDownToLine = createLucideIcon('ArrowDownToLine', [\n ['path', { d: 'M12 17V3', key: '1cwfxf' }],\n ['path', { d: 'm6 11 6 6 6-6', key: '12ii2o' }],\n ['path', { d: 'M19 21H5', key: '150jfl' }],\n]);\n\nexport default ArrowDownToLine;\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,CAAkB,iBAAiB,iBAAmB,CAAA,CAAA,CAAA;AAAA,CAAA,CAC1D,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAY,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACzC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAiB,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,CAC9C,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAY,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AAC3C,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1,171 @@
export interface DateAddingObject {
year?: number;
month?: number;
day?: number;
hour?: number;
minute?: number;
second?: number;
millisecond?: number;
years?: number;
months?: number;
days?: number;
hours?: number;
minutes?: number;
seconds?: number;
milliseconds?: number;
Y?: number;
y?: number;
M?: number;
d?: number;
h?: number;
m?: number;
s?: number;
ms?: number;
}
export interface InnerDateParsingObject {
year?: number;
month?: number;
date?: number;
hour?: number;
minute?: number;
second?: number;
millisecond?: number;
utcOffset?: number;
}
export interface DateParsingObject extends DateAddingObject {
utcOffset?: number;
}
/**
* Date input type
* 日期输入类型
*/
export type DateInput = string | number | Date | number[] | DateParsingObject;
/**
* Internal date unit
* 内部日期单位
*/
export type InnerUnit = 'year' | 'month' | 'date' | 'day' | 'hour' | 'minute' | 'second' | 'millisecond';
export interface InnerUnits {
/**
* Time unit (时间单位)
*/
TIME: 'time';
/**
* Year unit (年单位)
*/
YEAR: 'year';
/**
* Month unit (月单位)
*/
MONTH: 'month';
/**
* Date unit (日单位)
*/
DATE: 'date';
/**
* Day unit (日单位)
*/
DAY: 'day';
/**
* Hour unit (时单位)
*/
HOUR: 'hour';
/**
* Minute unit (分单位)
*/
MINUTE: 'minute';
/**
* Second unit (秒单位)
*/
SECOND: 'second';
/**
* Millisecond unit (毫秒单位)
*/
MILLISECOND: 'millisecond';
/**
* UTC offset unit (时区单位)
*/
UTC_OFFSET: 'utcOffset';
}
/**
* Date unit
* 日期单位
*/
export type Unit = 'Y' | 'y' | 'M' | 'D' | 'd' | 'h' | 'm' | 's' | 'ms' | InnerUnit | 'years' | 'months' | 'dates' | 'days' | 'hours' | 'minutes' | 'seconds' | 'milliseconds';
export type ChainInput = DateInput | IDateChain;
export interface IDateChain {
add(input: DateAddingObject): this;
add(num: number, unit: Unit): this;
addDays(days: number): this;
addHours(hours: number): this;
addMilliseconds(ms: number): this;
addMinutes(minutes: number): this;
addMonths(months: number): this;
addYears(years: number): this;
dayOfYear(): number;
dayOfYear(val: number): this;
daysInMonth(): number;
diff(input: ChainInput, unit: Unit, asFloat?: boolean): number;
diffInDays(input: ChainInput, asFloat?: boolean): number;
diffInHours(input: ChainInput, asFloat?: boolean): number;
diffInMilliseconds(input: ChainInput, asFloat?: boolean): number;
diffInMinutes(input: ChainInput, asFloat?: boolean): number;
diffInMonths(input: ChainInput, asFloat?: boolean): number;
diffInSeconds(input: ChainInput, asFloat?: boolean): number;
diffInYears(input: ChainInput, asFloat?: boolean): number;
endOf(unit: Unit): this;
format(formatString?: string): string;
get(unit: Unit): number;
isAfter(input: ChainInput, unit: Unit): boolean;
isBefore(input: ChainInput, unit: Unit): boolean;
isBetween(from: ChainInput, to: ChainInput, unit: Unit, inclusivity?: string): boolean;
isLeapYear(): boolean;
isSame(input: ChainInput, unit: Unit): boolean;
isSameOrAfter(input: ChainInput, unit: Unit): boolean;
isSameOrBefore(input: ChainInput, unit: Unit): boolean;
isValid(): boolean;
set(unit: Unit, val: number): this;
startOf(unit: Unit): this;
subDays(days: number): this;
subHours(hours: number): this;
subMilliseconds(time: number): this;
subMinutes(minutes: number): this;
subMonths(months: number): this;
subSeconds(seconds: number): this;
subtract(input: number | DateAddingObject): this;
subtract(num: number, unit: Unit): this;
subYears(years: number): this;
year(year: number): this;
year(): number;
month(month: number): this;
month(): number;
date(date: number): this;
date(): number;
day(day: number): this;
day(): number;
hour(hour: number): this;
hour(): number;
minute(minute: number): this;
minute(): number;
second(second: number): this;
second(): number;
millisecond(millisecond: number): this;
millisecond(): number;
time(time: number): this;
time(): number;
hours(hours: number): this;
hours(): number;
minutes(minutes: number): this;
minutes(): number;
seconds(seconds: number): this;
seconds(): number;
milliseconds(milliseconds: number): this;
milliseconds(): number;
clone(): IDateChain;
toArray(): number[];
toDate(): Date;
toISOString(): string;
toJSON(): string;
toString(): string;
valueOf(): number;
}
@@ -0,0 +1,186 @@
// @ts-ignore TS6133
import { expect, test } from "vitest";
import * as z from "zod/v3";
import { util } from "../helpers/util.js";
test("preprocess", () => {
const schema = z.preprocess((data) => [data], z.string().array());
const value = schema.parse("asdf");
expect(value).toEqual(["asdf"]);
util.assertEqual<(typeof schema)["_input"], unknown>(true);
});
test("async preprocess", async () => {
const schema = z.preprocess(async (data) => [data], z.string().array());
const value = await schema.parseAsync("asdf");
expect(value).toEqual(["asdf"]);
});
test("preprocess ctx.addIssue with parse", () => {
expect(() => {
z.preprocess((data, ctx) => {
ctx.addIssue({
code: "custom",
message: `${data} is not one of our allowed strings`,
});
return data;
}, z.string()).parse("asdf");
}).toThrow(
JSON.stringify(
[
{
code: "custom",
message: "asdf is not one of our allowed strings",
path: [],
},
],
null,
2
)
);
});
test("preprocess ctx.addIssue non-fatal by default", () => {
try {
z.preprocess((data, ctx) => {
ctx.addIssue({
code: "custom",
message: `custom error`,
});
return data;
}, z.string()).parse(1234);
} catch (err) {
z.ZodError.assert(err);
expect(err.issues.length).toEqual(2);
}
});
test("preprocess ctx.addIssue fatal true", () => {
try {
z.preprocess((data, ctx) => {
ctx.addIssue({
code: "custom",
message: `custom error`,
fatal: true,
});
return data;
}, z.string()).parse(1234);
} catch (err) {
z.ZodError.assert(err);
expect(err.issues.length).toEqual(1);
}
});
test("async preprocess ctx.addIssue with parse", async () => {
const schema = z.preprocess(async (data, ctx) => {
ctx.addIssue({
code: "custom",
message: `custom error`,
});
return data;
}, z.string());
expect(await schema.safeParseAsync("asdf")).toMatchInlineSnapshot(`
{
"error": [ZodError: [
{
"code": "custom",
"message": "custom error",
"path": []
}
]],
"success": false,
}
`);
});
test("preprocess ctx.addIssue with parseAsync", async () => {
const result = await z
.preprocess(async (data, ctx) => {
ctx.addIssue({
code: "custom",
message: `${data} is not one of our allowed strings`,
});
return data;
}, z.string())
.safeParseAsync("asdf");
expect(JSON.parse(JSON.stringify(result))).toEqual({
success: false,
error: {
issues: [
{
code: "custom",
message: "asdf is not one of our allowed strings",
path: [],
},
],
name: "ZodError",
},
});
});
test("z.NEVER in preprocess", () => {
const foo = z.preprocess((val, ctx) => {
if (!val) {
ctx.addIssue({ code: z.ZodIssueCode.custom, message: "bad" });
return z.NEVER;
}
return val;
}, z.number());
type foo = z.infer<typeof foo>;
util.assertEqual<foo, number>(true);
const arg = foo.safeParse(undefined);
expect(arg.error!.issues).toHaveLength(2);
expect(arg.error!.issues[0].message).toEqual("bad");
});
test("preprocess as the second property of object", () => {
const schema = z.object({
nonEmptyStr: z.string().min(1),
positiveNum: z.preprocess((v) => Number(v), z.number().positive()),
});
const result = schema.safeParse({
nonEmptyStr: "",
positiveNum: "",
});
expect(result.success).toEqual(false);
if (!result.success) {
expect(result.error.issues.length).toEqual(2);
expect(result.error.issues[0].code).toEqual(z.ZodIssueCode.too_small);
expect(result.error.issues[1].code).toEqual(z.ZodIssueCode.too_small);
}
});
test("preprocess validates with sibling errors", () => {
expect(() => {
z.object({
// Must be first
missing: z.string().refine(() => false),
preprocess: z.preprocess((data: any) => data?.trim(), z.string().regex(/ asdf/)),
}).parse({ preprocess: " asdf" });
}).toThrow(
JSON.stringify(
[
{
code: "invalid_type",
expected: "string",
received: "undefined",
path: ["missing"],
message: "Required",
},
{
validation: "regex",
code: "invalid_string",
message: "Invalid",
path: ["preprocess"],
},
],
null,
2
)
);
});
@@ -0,0 +1 @@
{"version":3,"file":"filter-props.mjs","sources":["../../../../../src/render/dom/utils/filter-props.ts"],"sourcesContent":["import { isMotionValue } from \"motion-dom\"\nimport type { MotionProps } from \"../../../motion/types\"\nimport { isValidMotionProp } from \"../../../motion/utils/valid-prop\"\n\nlet shouldForward = (key: string) => !isValidMotionProp(key)\n\nexport type IsValidProp = (key: string) => boolean\n\nexport function loadExternalIsValidProp(isValidProp?: IsValidProp) {\n if (typeof isValidProp !== \"function\") return\n\n // Explicitly filter our events\n shouldForward = (key: string) =>\n key.startsWith(\"on\") ? !isValidMotionProp(key) : isValidProp(key)\n}\n\n/**\n * Emotion and Styled Components both allow users to pass through arbitrary props to their components\n * to dynamically generate CSS. They both use the `@emotion/is-prop-valid` package to determine which\n * of these should be passed to the underlying DOM node.\n *\n * However, when styling a Motion component `styled(motion.div)`, both packages pass through *all* props\n * as it's seen as an arbitrary component rather than a DOM node. Motion only allows arbitrary props\n * passed through the `custom` prop so it doesn't *need* the payload or computational overhead of\n * `@emotion/is-prop-valid`, however to fix this problem we need to use it.\n *\n * By making it an optionalDependency we can offer this functionality only in the situations where it's\n * actually required.\n */\ntry {\n /**\n * We attempt to import this package but require won't be defined in esm environments, in that case\n * isPropValid will have to be provided via `MotionContext`. In a 6.0.0 this should probably be removed\n * in favour of explicit injection.\n *\n * String concatenation prevents bundlers like webpack (e.g. Storybook)\n * from statically resolving this optional dependency at build time.\n */\n const emotionPkg = \"@emotion/is-prop-\" + \"valid\"\n loadExternalIsValidProp(require(emotionPkg).default)\n} catch {\n // We don't need to actually do anything here - the fallback is the existing `isPropValid`.\n}\n\nexport function filterProps(\n props: MotionProps,\n isDom: boolean,\n forwardMotionProps: boolean\n) {\n const filteredProps: MotionProps = {}\n\n for (const key in props) {\n /**\n * values is considered a valid prop by Emotion, so if it's present\n * this will be rendered out to the DOM unless explicitly filtered.\n *\n * We check the type as it could be used with the `feColorMatrix`\n * element, which we support.\n */\n if (key === \"values\" && typeof props.values === \"object\") continue\n\n if (isMotionValue(props[key as keyof typeof props])) continue\n\n if (\n shouldForward(key) ||\n (forwardMotionProps === true && isValidMotionProp(key)) ||\n (!isDom && !isValidMotionProp(key)) ||\n // If trying to use native HTML drag events, forward drag listeners\n (props[\"draggable\" as keyof MotionProps] &&\n key.startsWith(\"onDrag\"))\n ) {\n filteredProps[key as keyof MotionProps] =\n props[key as keyof MotionProps]\n }\n }\n\n return filteredProps\n}\n"],"names":[],"mappings":";;;AAIA,IAAI,aAAa,GAAG,CAAC,GAAW,KAAK,CAAC,iBAAiB,CAAC,GAAG,CAAC;AAItD,SAAU,uBAAuB,CAAC,WAAyB,EAAA;IAC7D,IAAI,OAAO,WAAW,KAAK,UAAU;QAAE;;IAGvC,aAAa,GAAG,CAAC,GAAW,KACxB,GAAG,CAAC,UAAU,CAAC,IAAI,CAAC,GAAG,CAAC,iBAAiB,CAAC,GAAG,CAAC,GAAG,WAAW,CAAC,GAAG,CAAC;AACzE;AAEA;;;;;;;;;;;;AAYG;AACH,IAAI;AACA;;;;;;;AAOG;AACH,IAAA,MAAM,UAAU,GAAG,mBAAmB,GAAG,OAAO;IAChD,uBAAuB,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC,OAAO,CAAC;AACxD;AAAE,MAAM;;AAER;SAEgB,WAAW,CACvB,KAAkB,EAClB,KAAc,EACd,kBAA2B,EAAA;IAE3B,MAAM,aAAa,GAAgB,EAAE;AAErC,IAAA,KAAK,MAAM,GAAG,IAAI,KAAK,EAAE;AACrB;;;;;;AAMG;QACH,IAAI,GAAG,KAAK,QAAQ,IAAI,OAAO,KAAK,CAAC,MAAM,KAAK,QAAQ;YAAE;AAE1D,QAAA,IAAI,aAAa,CAAC,KAAK,CAAC,GAAyB,CAAC,CAAC;YAAE;QAErD,IACI,aAAa,CAAC,GAAG,CAAC;aACjB,kBAAkB,KAAK,IAAI,IAAI,iBAAiB,CAAC,GAAG,CAAC,CAAC;aACtD,CAAC,KAAK,IAAI,CAAC,iBAAiB,CAAC,GAAG,CAAC,CAAC;;aAElC,KAAK,CAAC,WAAgC,CAAC;AACpC,gBAAA,GAAG,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC,EAC/B;YACE,aAAa,CAAC,GAAwB,CAAC;gBACnC,KAAK,CAAC,GAAwB,CAAC;QACvC;IACJ;AAEA,IAAA,OAAO,aAAa;AACxB;;;;"}
@@ -0,0 +1,95 @@
import { ConfigUtils } from './config-utils'
import { IMPORTANT_MODIFIER } from './parse-class-name'
const SPLIT_CLASSES_REGEX = /\s+/
export const mergeClassList = (classList: string, configUtils: ConfigUtils) => {
const { parseClassName, getClassGroupId, getConflictingClassGroupIds, sortModifiers } =
configUtils
/**
* Set of classGroupIds in following format:
* `{importantModifier}{variantModifiers}{classGroupId}`
* @example 'float'
* @example 'hover:focus:bg-color'
* @example 'md:!pr'
*/
const classGroupsInConflict: string[] = []
const classNames = classList.trim().split(SPLIT_CLASSES_REGEX)
let result = ''
for (let index = classNames.length - 1; index >= 0; index -= 1) {
const originalClassName = classNames[index]!
const {
isExternal,
modifiers,
hasImportantModifier,
baseClassName,
maybePostfixModifierPosition,
} = parseClassName(originalClassName)
if (isExternal) {
result = originalClassName + (result.length > 0 ? ' ' + result : result)
continue
}
let hasPostfixModifier = !!maybePostfixModifierPosition
let classGroupId = getClassGroupId(
hasPostfixModifier
? baseClassName.substring(0, maybePostfixModifierPosition)
: baseClassName,
)
if (!classGroupId) {
if (!hasPostfixModifier) {
// Not a Tailwind class
result = originalClassName + (result.length > 0 ? ' ' + result : result)
continue
}
classGroupId = getClassGroupId(baseClassName)
if (!classGroupId) {
// Not a Tailwind class
result = originalClassName + (result.length > 0 ? ' ' + result : result)
continue
}
hasPostfixModifier = false
}
// Fast path: skip sorting for empty or single modifier
const variantModifier =
modifiers.length === 0
? ''
: modifiers.length === 1
? modifiers[0]!
: sortModifiers(modifiers).join(':')
const modifierId = hasImportantModifier
? variantModifier + IMPORTANT_MODIFIER
: variantModifier
const classId = modifierId + classGroupId
if (classGroupsInConflict.indexOf(classId) > -1) {
// Tailwind class omitted due to conflict
continue
}
classGroupsInConflict.push(classId)
const conflictGroups = getConflictingClassGroupIds(classGroupId, hasPostfixModifier)
for (let i = 0; i < conflictGroups.length; ++i) {
const group = conflictGroups[i]!
classGroupsInConflict.push(modifierId + group)
}
// Tailwind class not in conflict
result = originalClassName + (result.length > 0 ? ' ' + result : result)
}
return result
}
@@ -0,0 +1,10 @@
import type {CodeKeywordDefinition} from "../../types"
import {dynamicRef} from "./dynamicRef"
const def: CodeKeywordDefinition = {
keyword: "$recursiveRef",
schemaType: "string",
code: (cxt) => dynamicRef(cxt, cxt.schema),
}
export default def
@@ -0,0 +1,484 @@
/******************************************************************************
Copyright (c) Microsoft Corporation.
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */
/* global global, define, Symbol, Reflect, Promise, SuppressedError, Iterator */
var __extends;
var __assign;
var __rest;
var __decorate;
var __param;
var __esDecorate;
var __runInitializers;
var __propKey;
var __setFunctionName;
var __metadata;
var __awaiter;
var __generator;
var __exportStar;
var __values;
var __read;
var __spread;
var __spreadArrays;
var __spreadArray;
var __await;
var __asyncGenerator;
var __asyncDelegator;
var __asyncValues;
var __makeTemplateObject;
var __importStar;
var __importDefault;
var __classPrivateFieldGet;
var __classPrivateFieldSet;
var __classPrivateFieldIn;
var __createBinding;
var __addDisposableResource;
var __disposeResources;
var __rewriteRelativeImportExtension;
(function (factory) {
var root = typeof global === "object" ? global : typeof self === "object" ? self : typeof this === "object" ? this : {};
if (typeof define === "function" && define.amd) {
define("tslib", ["exports"], function (exports) { factory(createExporter(root, createExporter(exports))); });
}
else if (typeof module === "object" && typeof module.exports === "object") {
factory(createExporter(root, createExporter(module.exports)));
}
else {
factory(createExporter(root));
}
function createExporter(exports, previous) {
if (exports !== root) {
if (typeof Object.create === "function") {
Object.defineProperty(exports, "__esModule", { value: true });
}
else {
exports.__esModule = true;
}
}
return function (id, v) { return exports[id] = previous ? previous(id, v) : v; };
}
})
(function (exporter) {
var extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
__extends = function (d, b) {
if (typeof b !== "function" && b !== null)
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
__assign = Object.assign || function (t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
}
return t;
};
__rest = function (s, e) {
var t = {};
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
t[p] = s[p];
if (s != null && typeof Object.getOwnPropertySymbols === "function")
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
t[p[i]] = s[p[i]];
}
return t;
};
__decorate = function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
__param = function (paramIndex, decorator) {
return function (target, key) { decorator(target, key, paramIndex); }
};
__esDecorate = function (ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {
function accept(f) { if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected"); return f; }
var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value";
var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null;
var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});
var _, done = false;
for (var i = decorators.length - 1; i >= 0; i--) {
var context = {};
for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p];
for (var p in contextIn.access) context.access[p] = contextIn.access[p];
context.addInitializer = function (f) { if (done) throw new TypeError("Cannot add initializers after decoration has completed"); extraInitializers.push(accept(f || null)); };
var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);
if (kind === "accessor") {
if (result === void 0) continue;
if (result === null || typeof result !== "object") throw new TypeError("Object expected");
if (_ = accept(result.get)) descriptor.get = _;
if (_ = accept(result.set)) descriptor.set = _;
if (_ = accept(result.init)) initializers.unshift(_);
}
else if (_ = accept(result)) {
if (kind === "field") initializers.unshift(_);
else descriptor[key] = _;
}
}
if (target) Object.defineProperty(target, contextIn.name, descriptor);
done = true;
};
__runInitializers = function (thisArg, initializers, value) {
var useValue = arguments.length > 2;
for (var i = 0; i < initializers.length; i++) {
value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);
}
return useValue ? value : void 0;
};
__propKey = function (x) {
return typeof x === "symbol" ? x : "".concat(x);
};
__setFunctionName = function (f, name, prefix) {
if (typeof name === "symbol") name = name.description ? "[".concat(name.description, "]") : "";
return Object.defineProperty(f, "name", { configurable: true, value: prefix ? "".concat(prefix, " ", name) : name });
};
__metadata = function (metadataKey, metadataValue) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue);
};
__awaiter = function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
__generator = function (thisArg, body) {
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
function verb(n) { return function (v) { return step([n, v]); }; }
function step(op) {
if (f) throw new TypeError("Generator is already executing.");
while (g && (g = 0, op[0] && (_ = 0)), _) try {
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
if (y = 0, t) op = [op[0] & 2, t.value];
switch (op[0]) {
case 0: case 1: t = op; break;
case 4: _.label++; return { value: op[1], done: false };
case 5: _.label++; y = op[1]; op = [0]; continue;
case 7: op = _.ops.pop(); _.trys.pop(); continue;
default:
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
if (t[2]) _.ops.pop();
_.trys.pop(); continue;
}
op = body.call(thisArg, _);
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
}
};
__exportStar = function(m, o) {
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);
};
__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];
});
__values = function (o) {
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
if (m) return m.call(o);
if (o && typeof o.length === "number") return {
next: function () {
if (o && i >= o.length) o = void 0;
return { value: o && o[i++], done: !o };
}
};
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
};
__read = function (o, n) {
var m = typeof Symbol === "function" && o[Symbol.iterator];
if (!m) return o;
var i = m.call(o), r, ar = [], e;
try {
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
}
catch (error) { e = { error: error }; }
finally {
try {
if (r && !r.done && (m = i["return"])) m.call(i);
}
finally { if (e) throw e.error; }
}
return ar;
};
/** @deprecated */
__spread = function () {
for (var ar = [], i = 0; i < arguments.length; i++)
ar = ar.concat(__read(arguments[i]));
return ar;
};
/** @deprecated */
__spreadArrays = function () {
for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
for (var r = Array(s), k = 0, i = 0; i < il; i++)
for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
r[k] = a[j];
return r;
};
__spreadArray = function (to, from, pack) {
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
if (ar || !(i in from)) {
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
ar[i] = from[i];
}
}
return to.concat(ar || Array.prototype.slice.call(from));
};
__await = function (v) {
return this instanceof __await ? (this.v = v, this) : new __await(v);
};
__asyncGenerator = function (thisArg, _arguments, generator) {
if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
var g = generator.apply(thisArg, _arguments || []), i, q = [];
return i = Object.create((typeof AsyncIterator === "function" ? AsyncIterator : Object).prototype), verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i;
function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; }
function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } }
function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }
function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
function fulfill(value) { resume("next", value); }
function reject(value) { resume("throw", value); }
function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }
};
__asyncDelegator = function (o) {
var i, p;
return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; }
};
__asyncValues = function (o) {
if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
var m = o[Symbol.asyncIterator], i;
return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);
function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }
};
__makeTemplateObject = function (cooked, raw) {
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
return cooked;
};
var __setModuleDefault = Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
};
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);
};
__importStar = 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;
};
__importDefault = function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
__classPrivateFieldGet = function (receiver, state, kind, f) {
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
};
__classPrivateFieldSet = function (receiver, state, value, kind, f) {
if (kind === "m") throw new TypeError("Private method is not writable");
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
};
__classPrivateFieldIn = function (state, receiver) {
if (receiver === null || (typeof receiver !== "object" && typeof receiver !== "function")) throw new TypeError("Cannot use 'in' operator on non-object");
return typeof state === "function" ? receiver === state : state.has(receiver);
};
__addDisposableResource = function (env, value, async) {
if (value !== null && value !== void 0) {
if (typeof value !== "object" && typeof value !== "function") throw new TypeError("Object expected.");
var dispose, inner;
if (async) {
if (!Symbol.asyncDispose) throw new TypeError("Symbol.asyncDispose is not defined.");
dispose = value[Symbol.asyncDispose];
}
if (dispose === void 0) {
if (!Symbol.dispose) throw new TypeError("Symbol.dispose is not defined.");
dispose = value[Symbol.dispose];
if (async) inner = dispose;
}
if (typeof dispose !== "function") throw new TypeError("Object not disposable.");
if (inner) dispose = function() { try { inner.call(this); } catch (e) { return Promise.reject(e); } };
env.stack.push({ value: value, dispose: dispose, async: async });
}
else if (async) {
env.stack.push({ async: true });
}
return value;
};
var _SuppressedError = typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
var e = new Error(message);
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
};
__disposeResources = function (env) {
function fail(e) {
env.error = env.hasError ? new _SuppressedError(e, env.error, "An error was suppressed during disposal.") : e;
env.hasError = true;
}
var r, s = 0;
function next() {
while (r = env.stack.pop()) {
try {
if (!r.async && s === 1) return s = 0, env.stack.push(r), Promise.resolve().then(next);
if (r.dispose) {
var result = r.dispose.call(r.value);
if (r.async) return s |= 2, Promise.resolve(result).then(next, function(e) { fail(e); return next(); });
}
else s |= 1;
}
catch (e) {
fail(e);
}
}
if (s === 1) return env.hasError ? Promise.reject(env.error) : Promise.resolve();
if (env.hasError) throw env.error;
}
return next();
};
__rewriteRelativeImportExtension = function (path, preserveJsx) {
if (typeof path === "string" && /^\.\.?\//.test(path)) {
return path.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i, function (m, tsx, d, ext, cm) {
return tsx ? preserveJsx ? ".jsx" : ".js" : d && (!ext || !cm) ? m : (d + ext + "." + cm.toLowerCase() + "js");
});
}
return path;
};
exporter("__extends", __extends);
exporter("__assign", __assign);
exporter("__rest", __rest);
exporter("__decorate", __decorate);
exporter("__param", __param);
exporter("__esDecorate", __esDecorate);
exporter("__runInitializers", __runInitializers);
exporter("__propKey", __propKey);
exporter("__setFunctionName", __setFunctionName);
exporter("__metadata", __metadata);
exporter("__awaiter", __awaiter);
exporter("__generator", __generator);
exporter("__exportStar", __exportStar);
exporter("__createBinding", __createBinding);
exporter("__values", __values);
exporter("__read", __read);
exporter("__spread", __spread);
exporter("__spreadArrays", __spreadArrays);
exporter("__spreadArray", __spreadArray);
exporter("__await", __await);
exporter("__asyncGenerator", __asyncGenerator);
exporter("__asyncDelegator", __asyncDelegator);
exporter("__asyncValues", __asyncValues);
exporter("__makeTemplateObject", __makeTemplateObject);
exporter("__importStar", __importStar);
exporter("__importDefault", __importDefault);
exporter("__classPrivateFieldGet", __classPrivateFieldGet);
exporter("__classPrivateFieldSet", __classPrivateFieldSet);
exporter("__classPrivateFieldIn", __classPrivateFieldIn);
exporter("__addDisposableResource", __addDisposableResource);
exporter("__disposeResources", __disposeResources);
exporter("__rewriteRelativeImportExtension", __rewriteRelativeImportExtension);
});
0 && (module.exports = {
__extends: __extends,
__assign: __assign,
__rest: __rest,
__decorate: __decorate,
__param: __param,
__esDecorate: __esDecorate,
__runInitializers: __runInitializers,
__propKey: __propKey,
__setFunctionName: __setFunctionName,
__metadata: __metadata,
__awaiter: __awaiter,
__generator: __generator,
__exportStar: __exportStar,
__createBinding: __createBinding,
__values: __values,
__read: __read,
__spread: __spread,
__spreadArrays: __spreadArrays,
__spreadArray: __spreadArray,
__await: __await,
__asyncGenerator: __asyncGenerator,
__asyncDelegator: __asyncDelegator,
__asyncValues: __asyncValues,
__makeTemplateObject: __makeTemplateObject,
__importStar: __importStar,
__importDefault: __importDefault,
__classPrivateFieldGet: __classPrivateFieldGet,
__classPrivateFieldSet: __classPrivateFieldSet,
__classPrivateFieldIn: __classPrivateFieldIn,
__addDisposableResource: __addDisposableResource,
__disposeResources: __disposeResources,
__rewriteRelativeImportExtension: __rewriteRelativeImportExtension,
});
@@ -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 TabletSmartphone = createLucideIcon("TabletSmartphone", [
["rect", { width: "10", height: "14", x: "3", y: "8", rx: "2", key: "1vrsiq" }],
["path", { d: "M5 4a2 2 0 0 1 2-2h12a2 2 0 0 1 2 2v16a2 2 0 0 1-2 2h-2.4", key: "1j4zmg" }],
["path", { d: "M8 18h.01", key: "lrp35t" }]
]);
export { TabletSmartphone as default };
//# sourceMappingURL=tablet-smartphone.js.map
@@ -0,0 +1,81 @@
import process from 'node:process';
import { ReadBuffer, serializeMessage } from '../shared/stdio.js';
/**
* Server transport for stdio: this communicates with an MCP client by reading from the current process' stdin and writing to stdout.
*
* This transport is only available in Node.js environments.
*/
export class StdioServerTransport {
constructor(_stdin = process.stdin, _stdout = process.stdout, options) {
this._stdin = _stdin;
this._stdout = _stdout;
this._started = false;
// Arrow functions to bind `this` properly, while maintaining function identity.
this._ondata = (chunk) => {
try {
this._readBuffer.append(chunk);
this.processReadBuffer();
}
catch (error) {
this.onerror?.(error);
this.close().catch(() => { });
}
};
this._onerror = (error) => {
this.onerror?.(error);
};
this._readBuffer = new ReadBuffer({ maxBufferSize: options?.maxBufferSize });
}
/**
* Starts listening for messages on stdin.
*/
async start() {
if (this._started) {
throw new Error('StdioServerTransport already started! If using Server class, note that connect() calls start() automatically.');
}
this._started = true;
this._stdin.on('data', this._ondata);
this._stdin.on('error', this._onerror);
}
processReadBuffer() {
while (true) {
try {
const message = this._readBuffer.readMessage();
if (message === null) {
break;
}
this.onmessage?.(message);
}
catch (error) {
this.onerror?.(error);
}
}
}
async close() {
// Remove our event listeners first
this._stdin.off('data', this._ondata);
this._stdin.off('error', this._onerror);
// Check if we were the only data listener
const remainingDataListeners = this._stdin.listenerCount('data');
if (remainingDataListeners === 0) {
// Only pause stdin if we were the only listener
// This prevents interfering with other parts of the application that might be using stdin
this._stdin.pause();
}
// Clear the buffer and notify closure
this._readBuffer.clear();
this.onclose?.();
}
send(message) {
return new Promise(resolve => {
const json = serializeMessage(message);
if (this._stdout.write(json)) {
resolve();
}
else {
this._stdout.once('drain', resolve);
}
});
}
}
//# sourceMappingURL=stdio.js.map
@@ -0,0 +1,19 @@
export async function toArrayAsync(it) {
const arr = [];
for await (const o of it) {
arr.push(o);
}
return arr;
}
export async function takeResult(it) {
for await (const o of it) {
if (o.type === 'result') {
return o.result;
}
else if (o.type === 'error') {
throw o.error;
}
}
throw new Error('No result in stream.');
}
//# sourceMappingURL=responseMessage.js.map
@@ -0,0 +1 @@
{"version":3,"file":"ethernet-port.js","sources":["../../../src/icons/ethernet-port.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name EthernetPort\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJtMTUgMjAgMy0zaDJhMiAyIDAgMCAwIDItMlY2YTIgMiAwIDAgMC0yLTJINGEyIDIgMCAwIDAtMiAydjlhMiAyIDAgMCAwIDIgMmgybDMgM3oiIC8+CiAgPHBhdGggZD0iTTYgOHYxIiAvPgogIDxwYXRoIGQ9Ik0xMCA4djEiIC8+CiAgPHBhdGggZD0iTTE0IDh2MSIgLz4KICA8cGF0aCBkPSJNMTggOHYxIiAvPgo8L3N2Zz4K) - https://lucide.dev/icons/ethernet-port\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 EthernetPort = createLucideIcon('EthernetPort', [\n [\n 'path',\n {\n d: 'm15 20 3-3h2a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2v9a2 2 0 0 0 2 2h2l3 3z',\n key: 'rbahqx',\n },\n ],\n ['path', { d: 'M6 8v1', key: '1636ez' }],\n ['path', { d: 'M10 8v1', key: '1talb4' }],\n ['path', { d: 'M14 8v1', key: '1rsfgr' }],\n ['path', { d: 'M18 8v1', key: 'gnkwox' }],\n]);\n\nexport default EthernetPort;\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,CACpD,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,CAA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C,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,244 @@
/**
* @fileoverview Validate strings passed to the RegExp constructor
* @author Michael Ficarra
*/
"use strict";
//------------------------------------------------------------------------------
// Requirements
//------------------------------------------------------------------------------
const RegExpValidator = require("@eslint-community/regexpp").RegExpValidator;
const validator = new RegExpValidator();
const validFlags = "dgimsuvy";
const undefined1 = void 0;
//------------------------------------------------------------------------------
// Rule Definition
//------------------------------------------------------------------------------
/** @type {import('../types').Rule.RuleModule} */
module.exports = {
meta: {
type: "problem",
defaultOptions: [{}],
docs: {
description:
"Disallow invalid regular expression strings in `RegExp` constructors",
recommended: true,
url: "https://eslint.org/docs/latest/rules/no-invalid-regexp",
},
schema: [
{
type: "object",
properties: {
allowConstructorFlags: {
type: "array",
items: {
type: "string",
},
uniqueItems: true,
},
},
additionalProperties: false,
},
],
messages: {
regexMessage: "{{message}}.",
},
},
create(context) {
const [{ allowConstructorFlags }] = context.options;
let allowedFlags = [];
if (allowConstructorFlags) {
const temp = allowConstructorFlags
.join("")
.replace(new RegExp(`[${validFlags}]`, "gu"), "");
if (temp) {
allowedFlags = [...new Set(temp)];
}
}
/**
* Reports error with the provided message.
* @param {ASTNode} node The node holding the invalid RegExp
* @param {string} message The message to report.
* @returns {void}
*/
function report(node, message) {
context.report({
node,
messageId: "regexMessage",
data: { message },
});
}
/**
* Check if node is a string
* @param {ASTNode} node node to evaluate
* @returns {boolean} True if its a string
* @private
*/
function isString(node) {
return (
node &&
node.type === "Literal" &&
typeof node.value === "string"
);
}
/**
* Gets flags of a regular expression created by the given `RegExp()` or `new RegExp()` call
* Examples:
* new RegExp(".") // => ""
* new RegExp(".", "gu") // => "gu"
* new RegExp(".", flags) // => null
* @param {ASTNode} node `CallExpression` or `NewExpression` node
* @returns {string|null} flags if they can be determined, `null` otherwise
* @private
*/
function getFlags(node) {
if (node.arguments.length < 2) {
return "";
}
if (isString(node.arguments[1])) {
return node.arguments[1].value;
}
return null;
}
/**
* Check syntax error in a given pattern.
* @param {string} pattern The RegExp pattern to validate.
* @param {Object} flags The RegExp flags to validate.
* @param {boolean} [flags.unicode] The Unicode flag.
* @param {boolean} [flags.unicodeSets] The UnicodeSets flag.
* @returns {string|null} The syntax error.
*/
function validateRegExpPattern(pattern, flags) {
try {
validator.validatePattern(
pattern,
undefined1,
undefined1,
flags,
);
return null;
} catch (err) {
return err.message;
}
}
/**
* Check syntax error in a given flags.
* @param {string|null} flags The RegExp flags to validate.
* @param {string|null} flagsToCheck The RegExp invalid flags.
* @param {string} allFlags all valid and allowed flags.
* @returns {string|null} The syntax error.
*/
function validateRegExpFlags(flags, flagsToCheck, allFlags) {
const duplicateFlags = [];
if (typeof flagsToCheck === "string") {
for (const flag of flagsToCheck) {
if (allFlags.includes(flag)) {
duplicateFlags.push(flag);
}
}
}
/*
* `regexpp` checks the combination of `u` and `v` flags when parsing `Pattern` according to `ecma262`,
* but this rule may check only the flag when the pattern is unidentifiable, so check it here.
* https://tc39.es/ecma262/multipage/text-processing.html#sec-parsepattern
*/
if (flags && flags.includes("u") && flags.includes("v")) {
return "Regex 'u' and 'v' flags cannot be used together";
}
if (duplicateFlags.length > 0) {
return `Duplicate flags ('${duplicateFlags.join("")}') supplied to RegExp constructor`;
}
if (!flagsToCheck) {
return null;
}
return `Invalid flags supplied to RegExp constructor '${flagsToCheck}'`;
}
return {
"CallExpression, NewExpression"(node) {
if (
node.callee.type !== "Identifier" ||
node.callee.name !== "RegExp"
) {
return;
}
const flags = getFlags(node);
let flagsToCheck = flags;
const allFlags =
allowedFlags.length > 0
? validFlags.split("").concat(allowedFlags)
: validFlags.split("");
if (flags) {
allFlags.forEach(flag => {
flagsToCheck = flagsToCheck.replace(flag, "");
});
}
let message = validateRegExpFlags(
flags,
flagsToCheck,
allFlags,
);
if (message) {
report(node, message);
return;
}
if (!isString(node.arguments[0])) {
return;
}
const pattern = node.arguments[0].value;
message =
// If flags are unknown, report the regex only if its pattern is invalid both with and without the "u" flag
flags === null
? validateRegExpPattern(pattern, {
unicode: true,
unicodeSets: false,
}) &&
validateRegExpPattern(pattern, {
unicode: false,
unicodeSets: true,
}) &&
validateRegExpPattern(pattern, {
unicode: false,
unicodeSets: false,
})
: validateRegExpPattern(pattern, {
unicode: flags.includes("u"),
unicodeSets: flags.includes("v"),
});
if (message) {
report(node, message);
}
},
};
},
};
@@ -0,0 +1,12 @@
# These are supported funding model platforms
github: [ljharb]
patreon: # Replace with a single Patreon username
open_collective: # Replace with a single Open Collective username
ko_fi: # Replace with a single Ko-fi username
tidelift: npm/side-channel
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
liberapay: # Replace with a single Liberapay username
issuehunt: # Replace with a single IssueHunt username
otechie: # Replace with a single Otechie username
custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
@@ -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 Receipt = createLucideIcon("Receipt", [
[
"path",
{ d: "M4 2v20l2-1 2 1 2-1 2 1 2-1 2 1 2-1 2 1V2l-2 1-2-1-2 1-2-1-2 1-2-1-2 1Z", key: "q3az6g" }
],
["path", { d: "M16 8h-6a2 2 0 1 0 0 4h4a2 2 0 1 1 0 4H8", key: "1h4pet" }],
["path", { d: "M12 17.5v-11", key: "1jc1ny" }]
]);
export { Receipt as default };
//# sourceMappingURL=receipt.js.map
@@ -0,0 +1,46 @@
{
"name": "levn",
"version": "0.4.1",
"author": "George Zahariev <z@georgezahariev.com>",
"description": "Light ECMAScript (JavaScript) Value Notation - human written, concise, typed, flexible",
"homepage": "https://github.com/gkz/levn",
"keywords": [
"levn",
"light",
"ecmascript",
"value",
"notation",
"json",
"typed",
"human",
"concise",
"typed",
"flexible"
],
"files": [
"lib",
"README.md",
"LICENSE"
],
"main": "./lib/",
"bugs": "https://github.com/gkz/levn/issues",
"license": "MIT",
"engines": {
"node": ">= 0.8.0"
},
"repository": {
"type": "git",
"url": "git://github.com/gkz/levn.git"
},
"scripts": {
"test": "make test"
},
"dependencies": {
"prelude-ls": "^1.2.1",
"type-check": "~0.4.0"
},
"devDependencies": {
"livescript": "^1.6.0",
"mocha": "^7.1.1"
}
}
@@ -0,0 +1,5 @@
import { Context } from "../context.js";
//#region src/jsx/dom/context.d.ts
export declare const createContextProviderFunction: <T>(values: T[]) => Function;
export declare const createContext: <T>(defaultValue: T) => Context<T>;
//#endregion
@@ -0,0 +1,40 @@
import type { SerovalNode } from 'seroval';
import { createPlugin } from 'seroval';
const URLSearchParamsPlugin = /* @__PURE__ */ createPlugin<
URLSearchParams,
{ value: SerovalNode }
>({
tag: 'seroval-plugins/web/URLSearchParams',
test(value) {
if (typeof URLSearchParams === 'undefined') {
return false;
}
return value instanceof URLSearchParams;
},
parse: {
sync(value, ctx) {
return {
value: ctx.parse(value.toString()),
};
},
async async(value, ctx) {
return {
value: await ctx.parse(value.toString()),
};
},
stream(value, ctx) {
return {
value: ctx.parse(value.toString()),
};
},
},
serialize(node, ctx) {
return 'new URLSearchParams(' + ctx.serialize(node.value) + ')';
},
deserialize(node, ctx) {
return new URLSearchParams(ctx.deserialize(node.value) as string);
},
});
export default URLSearchParamsPlugin;
@@ -0,0 +1,13 @@
import { ShallowErrorPlugin } from "./ShallowErrorPlugin.js";
import { RawStreamSSRPlugin } from "./RawStream.js";
import { ReadableStreamPlugin } from "seroval-plugins/web";
//#region src/ssr/serializer/seroval-plugins.ts
const defaultSerovalPlugins = [
ShallowErrorPlugin,
RawStreamSSRPlugin,
ReadableStreamPlugin
];
//#endregion
export { defaultSerovalPlugins };
//# sourceMappingURL=seroval-plugins.js.map
@@ -0,0 +1,874 @@
flf2a$ 8 7 19 -1 20
Jacky font by Meph.'99
======================
-> Defined: ASCII code 32-126
-> Uppercase characters only.
O=============================================O
,,,,,,,, I __ __ ___ ___ _ _ _,,,_ I
.,,, __ \_ I |M \/ M| |E__| |P_ \ | || | ASCII / o o \ I
( ( o) \_ I | |\/| | | _| | _/ | HH | & more > P < I
`\ o)I |_| |_| |E__| |_P |_||_| ~~~~~~ \_\_/_/ I
\ \____/ I I
\ ____/ I ASCII-, ANSI-, HTML-art, programs, ... I
) ) O=============================================O
\__/ \ Index page:
\\_ ) http://studenten.freepage.de/meph/ascii/ascii.htm
\___ __ / English "fast-link" page:
_// \\_ http://studenten.freepage.de/meph/ascii/eng/eng.htm
$@
$@
$@
$@
$@
$@
$@
$@@
_______ @
\ / @
\ / @
) ( @
\_/ @
_ @
(_) @
@@
_ _ @
(( (( @
)) )) @
@
@
@
@
@@
_ _ @
_| |_| |_ @
(_ _ _) @
| | | | @
_| |_| |_ @
(_ _ _) @
|_| |_| @
@@
_ @
_| |____ @
/ | |___/ @
(_(| |___ @
___| |_) ) @
/___| |__/ @
|_| @
@@
__ _ @
(__) / ) @
/ / @
/ / @
/ / @
/ / __ @
(_/ (__) @
@@
___ @
/ _ \ @
( (_) ) @
\/ / @
/ _/\ @
( (_)_\__ @
\_______) @
\_\ @@
__ @
( ) @
\/ @
@
@
@
@
@@
___ @
/ _( @
/ / @
( ( @
( ( @
\ \__ @
\__( @
@@
___ @
)_ \ @
\ \ @
) ) @
) ) @
__/ / @
)__/ @
@@
@
(\/\/) @
<(())> @
(/\/\) @
@
@
@
@@
_ @
| | @
___| |___ @
(___ ___) @
| | @
|_| @
@
@@
@
@
@
@
@
__ @
( ) @
/_/ @@
@
@
________ @
(________) @
@
@
@
@@
@
@
@
@
@
__ @
(__) @
@@
_ @
/ ) @
/ / @
/ / @
/ / @
/ / @
(_/ @
@@
____ @
/ __ \ @
( ( ) ) @
( ( ) ) @
( ( ) ) @
( (__) ) @
\____/ @
@@
____ @
/ / @
/ /) ) @
/_/( ( @
) ) @
( ( @
/__\ @
@@
______ @
(____ \ @
) / @
__ / / @
/ \/ / __ @
( () \__/ / @
\__\____( @
@@
_____ @
)__ \ @
__) / @
(__ ( @
\ \ @
___/ ) @
)____/ @
@@
_ _ @
/ / / \ @
( (__) (___ @
\___ __( @
) ( @
) ( @
/___\ @
@@
______ @
| ___( @
| |__ @
|___ \ @
\ \ @
_____) ) @
)_____/ @
@@
______ @
/ ____( @
/ / @
( (_____ @
( ___ \ @
\ (___) )@
\_____/ @
@@
_________ @
)____ / @
___) / @
)__ ( @
) ) @
( ( @
/__\ @
@@
_____ @
/ _ \ @
( (_) ) @
\ _ / @
/ / \ \ @
( (___) ) @
\_____/ @
@@
_____ @
/ __ \ @
( (__) \ @
\_____ ) @
) ) @
____/ / @
)_____/ @
@@
@
__ @
(__) @
@
@
__ @
(__) @
@@
@
__ @
(__) @
@
@
__ @
) ) @
/_/ @@
_ @
/ ) @
/ / @
/ / @
\ \ @
\ \ @
\_) @
@@
@
_______ @
(_______) @
_______ @
(_______) @
@
@
@@
_ @
( \ @
\ \ @
\ \ @
/ / @
/ / @
(_/ @
@@
______ @
(_____ \ @
___) ) @
( __/ @
)_) @
__ @
(__) @
@@
_______ @
// _\\ @
// ___)|\\ @
( / _ | )) @
\\( (_) |// @
\\\___/\/ @
\____ @
@@
____ @
( ) @
/ /\ \ @
( (__) ) @
) ( @
/ /\ \ @
/__( )__\ @
@@
______ @
(_ _ \ @
) (_) ) @
\ _/ @
/ _ \ @
_) (_) ) @
(______/ @
@@
____ @
/ ___) @
/ / @
( ( @
( ( @
\ \___ @
\____) @
@@
______ @
(_ __ \ @
) ) \ \ @
( ( ) ) @
) ) ) ) @
/ /__/ / @
(______/ @
@@
_____ @
/ ___/ @
( (__ @
) __) @
( ( @
\ \___ @
\____\ @
@@
_________ @
(_ _____) @
) (___ @
( ___) @
) ( @
( ) @
\_/ @
@@
_____ @
/ ___ \ @
/ / \_) @
( ( ____ @
( ( (__ ) @
\ \__/ / @
\____/ @
@@
__ __ @
( \ / ) @
\ (__) / @
) __ ( @
( ( ) ) @
) )( ( @
/_/ \_\ @
@@
_____ @
(_ _) @
| | @
| | @
| | @
_| |__ @
/_____( @
@@
________ @
(___ ___) @
) ) @
( ( @
__ ) ) @
( (_/ / @
\___/ @
@@
__ ___ @
() ) / __) @
( (_/ / @
() ( @
() /\ \ @
( ( \ \ @
()_) \_\ @
@@
_____ @
(_ _) @
| | @
| | @
| | __ @
__| |___) ) @
\________/ @
@@
__ __ @
\ \ / / @
() \/ () @
/ _ _ \ @
/ / \/ \ \ @
/_/ \_\ @
(/ \) @
@@
__ _ @
/ \ / ) @
/ /\ \ / / @
) ) ) ) ) ) @
( ( ( ( ( ( @
/ / \ \/ / @
(_/ \__/ @
@@
____ @
/ __ \ @
/ / \ \ @
( () () ) @
( () () ) @
\ \__/ / @
\____/ @
@@
_____ @
( __ \ @
) )_) ) @
( ___/ @
) ) @
( ( @
/__\ @
@@
____ @
/ __ \ @
/ / \ \ @
( ( ) ) @
( ( /\) ) @
\ \_\ \/ @
\___\ \_ @
\__) @@
______ @
( __ \ @
) (__) ) @
( __/ @
) \ \ _ @
( ( \ \_)) @
)_) \__/ @
@@
_____ @
/ ____\ @
( (___ @
\___ \ @
) ) @
___/ / @
/____/ @
@@
________ @
(___ ___) @
) ) @
( ( @
) ) @
( ( @
/__\ @
@@
__ __ @
) ) ( ( @
( ( ) ) @
) ) ( ( @
( ( ) ) @
) \__/ ( @
\______/ @
@@
__ __ @
) ) ( ( @
( ( ) ) @
\ \ / / @
\ \/ / @
\ / @
\/ @
@@
___ ___ @
( ( ) ) @
\ \ _ / / @
\ \/ \/ / @
) _ ( @
\ ( ) / @
\_/ \_/ @
@@
__ __ @
(_ \ / _) @
\ \_/ / @
\ / @
/ _ \ @
_/ / \ \_ @
(__/ \__) @
@@
__ __ @
) \ / ( @
\ \ / / @
\ \/ / @
\ / @
)( @
/__\ @
@@
______ @
(____ ) @
/ / @
___/ /_ @
/__ ___) @
/ /____ @
(_______) @
@@
_______ @
( ____( @
( ( @
( ( @
( ( @
( (____ @
(______( @
@@
_ @
( \ @
\ \ @
\ \ @
\ \ @
\ \ @
\_) @
@@
_______ @
)____ ) @
) ) @
) ) @
) ) @
_____) ) @
)______) @
@@
@
/\ @
/ \ @
/_/\_\ @
@
@
@
@@
@
@
@
@
@
___________ @
|___________| @
@@
_ @
\\ @
\) @
@
@
@
@
@@
____ @
( ) @
/ /\ \ @
( (__) ) @
) ( @
/ /\ \ @
/__( )__\ @
@@
______ @
(_ _ \ @
) (_) ) @
\ _/ @
/ _ \ @
_) (_) ) @
(______/ @
@@
____ @
/ ___) @
/ / @
( ( @
( ( @
\ \___ @
\____) @
@@
______ @
(_ __ \ @
) ) \ \ @
( ( ) ) @
) ) ) ) @
/ /__/ / @
(______/ @
@@
_____ @
/ ___/ @
( (__ @
) __) @
( ( @
\ \___ @
\____\ @
@@
_________ @
(_ _____) @
) (___ @
( ___) @
) ( @
( ) @
\_/ @
@@
_____ @
/ ___ \ @
/ / \_) @
( ( ____ @
( ( (__ ) @
\ \__/ / @
\____/ @
@@
__ __ @
( \ / ) @
\ (__) / @
) __ ( @
( ( ) ) @
) )( ( @
/_/ \_\ @
@@
_____ @
(_ _) @
| | @
| | @
| | @
_| |__ @
/_____( @
@@
________ @
(___ ___) @
) ) @
( ( @
__ ) ) @
( (_/ / @
\___/ @
@@
__ ___ @
() ) / __) @
( (_/ / @
() ( @
() /\ \ @
( ( \ \ @
()_) \_\ @
@@
_____ @
(_ _) @
| | @
| | @
| | __ @
__| |___) ) @
\________/ @
@@
__ __ @
\ \ / / @
() \/ () @
/ _ _ \ @
/ / \/ \ \ @
/_/ \_\ @
(/ \) @
@@
__ _ @
/ \ / ) @
/ /\ \ / / @
) ) ) ) ) ) @
( ( ( ( ( ( @
/ / \ \/ / @
(_/ \__/ @
@@
____ @
/ __ \ @
/ / \ \ @
( () () ) @
( () () ) @
\ \__/ / @
\____/ @
@@
_____ @
( __ \ @
) )_) ) @
( ___/ @
) ) @
( ( @
/__\ @
@@
____ @
/ __ \ @
/ / \ \ @
( ( ) ) @
( ( /\) ) @
\ \_\ \/ @
\___\ \_ @
\__) @@
______ @
( __ \ @
) (__) ) @
( __/ @
) \ \ _ @
( ( \ \_)) @
)_) \__/ @
@@
_____ @
/ ____\ @
( (___ @
\___ \ @
) ) @
___/ / @
/____/ @
@@
________ @
(___ ___) @
) ) @
( ( @
) ) @
( ( @
/__\ @
@@
__ __ @
) ) ( ( @
( ( ) ) @
) ) ( ( @
( ( ) ) @
) \__/ ( @
\______/ @
@@
__ __ @
) ) ( ( @
( ( ) ) @
\ \ / / @
\ \/ / @
\ / @
\/ @
@@
___ ___ @
( ( ) ) @
\ \ _ / / @
\ \/ \/ / @
) _ ( @
\ ( ) / @
\_/ \_/ @
@@
__ __ @
(_ \ / _) @
\ \_/ / @
\ / @
/ _ \ @
_/ / \ \_ @
(__/ \__) @
@@
__ __ @
) \ / ( @
\ \ / / @
\ \/ / @
\ / @
)( @
/__\ @
@@
______ @
(____ ) @
/ / @
___/ /_ @
/__ ___) @
/ /____ @
(_______) @
@@
_____ @
/ ___( @
) ) @
/ / @
\ \ @
) )___ @
(_____( @
@@
_ @
( ) @
( ) @
( ) @
( ) @
( ) @
(_) @
@@
______ @
)____ \ @
( ( @
\ \ @
/ / @
____( ( @
)______) @
@@
@
___ _ @
/ _ \_/ ) @
(_/ \___/ @
@
@
@
@@
O __ O @
/ \ @
/ /\ \ @
( (__) ) @
) ( @
/ /\ \ @
/__( )__\ @
@@
O ____ O @
/ __ \ @
/ / \ \ @
( () () ) @
( () () ) @
\ \__/ / @
\____/ @
@@
O O @
__ __ @
( ( ) ) @
) ) ( ( @
( ( ) ) @
) \__/ ( @
\______/ @
@@
O __ O @
/ \ @
/ /\ \ @
( (__) ) @
) ( @
/ /\ \ @
/__( )__\ @
@@
O ____ O @
/ __ \ @
/ / \ \ @
( () () ) @
( () () ) @
\ \__/ / @
\____/ @
@@
O O @
__ __ @
( ( ) ) @
) ) ( ( @
( ( ) ) @
) \__/ ( @
\______/ @
@@
_____ @
/ ___ \ @
( ( ) ) @
) ) / / @
( ( \ \ @
) ) /__) @
( ( @
)_) @@
167 Meph.
_ _ @
/\/\ |_ |_)|_| @
/ \|_ | | |.@
-==============-@
(\o---o/) @
\ J / @
_/\_-_/\_ @
@@
178 :-)
______ @
/ ____ \ @
/ / \ \ @
/ / O O \ \ @
( ( () ) ) @
\ \ \__/ / / @
\ \____/ / @
\______/ @@
179 :-(
______ @
/ ____ \ @
/ / \ \ @
/ / O O \ \ @
( ( () ) ) @
\ \ __ / / @
\ \/__\/ / @
\______/ @@
180 BTS
BTS 1999 @
/\ @
____/__\____ @
\__/ \__/ @
/\____/\ @
/ __/\__ \ @
/_/ \_\ @
@@
@@ -0,0 +1 @@
{"version":3,"file":"square-pilcrow.js","sources":["../../../src/icons/square-pilcrow.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name SquarePilcrow\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cmVjdCB3aWR0aD0iMTgiIGhlaWdodD0iMTgiIHg9IjMiIHk9IjMiIHJ4PSIyIiAvPgogIDxwYXRoIGQ9Ik0xMiAxMkg5LjVhMi41IDIuNSAwIDAgMSAwLTVIMTciIC8+CiAgPHBhdGggZD0iTTEyIDd2MTAiIC8+CiAgPHBhdGggZD0iTTE2IDd2MTAiIC8+Cjwvc3ZnPgo=) - https://lucide.dev/icons/square-pilcrow\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 SquarePilcrow = createLucideIcon('SquarePilcrow', [\n ['rect', { width: '18', height: '18', x: '3', y: '3', rx: '2', key: 'afitv7' }],\n ['path', { d: 'M12 12H9.5a2.5 2.5 0 0 1 0-5H17', key: '1l9586' }],\n ['path', { d: 'M12 7v10', key: 'jspqdw' }],\n ['path', { d: 'M16 7v10', key: 'lavkr4' }],\n]);\n\nexport default SquarePilcrow;\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,CAAgB,iBAAiB,eAAiB,CAAA,CAAA,CAAA;AAAA,CAAA,CACtD,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,CAAA,CAAM,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,CAC9E,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAmC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,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,CAChE,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAY,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACzC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAY,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AAC3C,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1 @@
{"version":3,"file":"recycle.js","sources":["../../../src/icons/recycle.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name Recycle\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNNyAxOUg0LjgxNWExLjgzIDEuODMgMCAwIDEtMS41Ny0uODgxIDEuNzg1IDEuNzg1IDAgMCAxLS4wMDQtMS43ODRMNy4xOTYgOS41IiAvPgogIDxwYXRoIGQ9Ik0xMSAxOWg4LjIwM2ExLjgzIDEuODMgMCAwIDAgMS41NTYtLjg5IDEuNzg0IDEuNzg0IDAgMCAwIDAtMS43NzVsLTEuMjI2LTIuMTIiIC8+CiAgPHBhdGggZD0ibTE0IDE2LTMgMyAzIDMiIC8+CiAgPHBhdGggZD0iTTguMjkzIDEzLjU5NiA3LjE5NiA5LjUgMy4xIDEwLjU5OCIgLz4KICA8cGF0aCBkPSJtOS4zNDQgNS44MTEgMS4wOTMtMS44OTJBMS44MyAxLjgzIDAgMCAxIDExLjk4NSAzYTEuNzg0IDEuNzg0IDAgMCAxIDEuNTQ2Ljg4OGwzLjk0MyA2Ljg0MyIgLz4KICA8cGF0aCBkPSJtMTMuMzc4IDkuNjMzIDQuMDk2IDEuMDk4IDEuMDk3LTQuMDk2IiAvPgo8L3N2Zz4K) - https://lucide.dev/icons/recycle\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 Recycle = createLucideIcon('Recycle', [\n [\n 'path',\n {\n d: 'M7 19H4.815a1.83 1.83 0 0 1-1.57-.881 1.785 1.785 0 0 1-.004-1.784L7.196 9.5',\n key: 'x6z5xu',\n },\n ],\n [\n 'path',\n {\n d: 'M11 19h8.203a1.83 1.83 0 0 0 1.556-.89 1.784 1.784 0 0 0 0-1.775l-1.226-2.12',\n key: '1x4zh5',\n },\n ],\n ['path', { d: 'm14 16-3 3 3 3', key: 'f6jyew' }],\n ['path', { d: 'M8.293 13.596 7.196 9.5 3.1 10.598', key: 'wf1obh' }],\n [\n 'path',\n {\n d: 'm9.344 5.811 1.093-1.892A1.83 1.83 0 0 1 11.985 3a1.784 1.784 0 0 1 1.546.888l3.943 6.843',\n key: '9tzpgr',\n },\n ],\n ['path', { d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AAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CACnE,CAAA,CAAA;AAAA,CAAA,CAAA,CAAA,CACE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACA,CAAA,CAAA,CAAA,CAAA;AAAA,CACE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAG,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACH,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACP,CAAA,CAAA,CAAA,CAAA;AAAALine truncated
@@ -0,0 +1,9 @@
{
"extends": "@ljharb/tsconfig",
"compilerOptions": {
//"target": "es2021",
},
"exclude": [
"coverage",
],
}
@@ -0,0 +1,9 @@
/**
* @license lucide-react v0.469.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
export { default } from './circle-alert.js';
//# sourceMappingURL=alert-circle.js.map
@@ -0,0 +1 @@
{"version":3,"file":"gen-mapping.d.ts","sourceRoot":"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E,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI,CAS9F;AAED,wBAAgB,SAAS,CAAC,GAAG,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,UAAO,QAYvE;AAED;;;GAGG;AACH,wBAAgB,YAAY,CAAC,GAAG,EAAE,UAAU,GAAG,gBAAgB,CAwB9D;AAED;;;GAGG;AACH,wBAAgB,YAAY,CAAC,GAAG,EAAE,UAAU,GAAG,gBAAgB,CAO9D;AAED;;GAEG;AACH,wBAAgB,OAAO,CAAC,KAAK,EAAE,cAAc,GAAG,UAAU,CAYzD;AAED;;;GAGG;AACH,wBAAgB,WAAW,CAAC,GAAG,EAAE,UAAU,GAAG,OAAO,EAAE,CA0BtD"}
@@ -0,0 +1,2 @@
import type { LibDefinition } from '../variable';
export declare const es2020_number: LibDefinition;
@@ -0,0 +1,136 @@
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.tokenHandler = tokenHandler;
const z = __importStar(require("zod/v4"));
const express_1 = __importDefault(require("express"));
const cors_1 = __importDefault(require("cors"));
const pkce_challenge_1 = require("pkce-challenge");
const clientAuth_js_1 = require("../middleware/clientAuth.js");
const express_rate_limit_1 = require("express-rate-limit");
const allowedMethods_js_1 = require("../middleware/allowedMethods.js");
const errors_js_1 = require("../errors.js");
const TokenRequestSchema = z.object({
grant_type: z.string()
});
const AuthorizationCodeGrantSchema = z.object({
code: z.string(),
code_verifier: z.string(),
redirect_uri: z.string().optional(),
resource: z.string().url().optional()
});
const RefreshTokenGrantSchema = z.object({
refresh_token: z.string(),
scope: z.string().optional(),
resource: z.string().url().optional()
});
function tokenHandler({ provider, rateLimit: rateLimitConfig }) {
// Nested router so we can configure middleware and restrict HTTP method
const router = express_1.default.Router();
// Configure CORS to allow any origin, to make accessible to web-based MCP clients
router.use((0, cors_1.default)());
router.use((0, allowedMethods_js_1.allowedMethods)(['POST']));
router.use(express_1.default.urlencoded({ extended: false }));
// Apply rate limiting unless explicitly disabled
if (rateLimitConfig !== false) {
router.use((0, express_rate_limit_1.rateLimit)({
windowMs: 15 * 60 * 1000, // 15 minutes
max: 50, // 50 requests per windowMs
standardHeaders: true,
legacyHeaders: false,
message: new errors_js_1.TooManyRequestsError('You have exceeded the rate limit for token requests').toResponseObject(),
...rateLimitConfig
}));
}
// Authenticate and extract client details
router.use((0, clientAuth_js_1.authenticateClient)({ clientsStore: provider.clientsStore }));
router.post('/', async (req, res) => {
res.setHeader('Cache-Control', 'no-store');
try {
const parseResult = TokenRequestSchema.safeParse(req.body);
if (!parseResult.success) {
throw new errors_js_1.InvalidRequestError(parseResult.error.message);
}
const { grant_type } = parseResult.data;
const client = req.client;
if (!client) {
// This should never happen
throw new errors_js_1.ServerError('Internal Server Error');
}
switch (grant_type) {
case 'authorization_code': {
const parseResult = AuthorizationCodeGrantSchema.safeParse(req.body);
if (!parseResult.success) {
throw new errors_js_1.InvalidRequestError(parseResult.error.message);
}
const { code, code_verifier, redirect_uri, resource } = parseResult.data;
const skipLocalPkceValidation = provider.skipLocalPkceValidation;
// Perform local PKCE validation unless explicitly skipped
// (e.g. to validate code_verifier in upstream server)
if (!skipLocalPkceValidation) {
const codeChallenge = await provider.challengeForAuthorizationCode(client, code);
if (!(await (0, pkce_challenge_1.verifyChallenge)(code_verifier, codeChallenge))) {
throw new errors_js_1.InvalidGrantError('code_verifier does not match the challenge');
}
}
// Passes the code_verifier to the provider if PKCE validation didn't occur locally
const tokens = await provider.exchangeAuthorizationCode(client, code, skipLocalPkceValidation ? code_verifier : undefined, redirect_uri, resource ? new URL(resource) : undefined);
res.status(200).json(tokens);
break;
}
case 'refresh_token': {
const parseResult = RefreshTokenGrantSchema.safeParse(req.body);
if (!parseResult.success) {
throw new errors_js_1.InvalidRequestError(parseResult.error.message);
}
const { refresh_token, scope, resource } = parseResult.data;
const scopes = scope?.split(' ');
const tokens = await provider.exchangeRefreshToken(client, refresh_token, scopes, resource ? new URL(resource) : undefined);
res.status(200).json(tokens);
break;
}
// Additional auth methods will not be added on the server side of the SDK.
case 'client_credentials':
default:
throw new errors_js_1.UnsupportedGrantTypeError('The grant type is not supported by this authorization server.');
}
}
catch (error) {
if (error instanceof errors_js_1.OAuthError) {
const status = error instanceof errors_js_1.ServerError ? 500 : 400;
res.status(status).json(error.toResponseObject());
}
else {
const serverError = new errors_js_1.ServerError('Internal Server Error');
res.status(500).json(serverError.toResponseObject());
}
}
});
return router;
}
//# sourceMappingURL=token.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 Plug = createLucideIcon("Plug", [
["path", { d: "M12 22v-5", key: "1ega77" }],
["path", { d: "M9 8V2", key: "14iosj" }],
["path", { d: "M15 8V2", key: "18g5xt" }],
["path", { d: "M18 8v5a4 4 0 0 1-4 4h-4a4 4 0 0 1-4-4V8Z", key: "osxo6l" }]
]);
export { Plug as default };
//# sourceMappingURL=plug.js.map
@@ -0,0 +1 @@
{"version":3,"file":"edit.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;"}
@@ -0,0 +1 @@
{"version":3,"file":"multipleClientsParallel.js","sourceRoot":"","sources":["../../../../src/examples/client/multipleClientsParallel.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAC/C,OAAO,EAAE,6BAA6B,EAAE,MAAM,gCAAgC,CAAC;AAC/E,OAAO,EAAmB,oBAAoB,EAAE,gCAAgC,EAAkB,MAAM,gBAAgB,CAAC;AAEzH;;;;;;;GAOG;AAEH,+BAA+B;AAC/B,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;AACnC,MAAM,SAAS,GAAG,IAAI,CAAC,CAAC,CAAC,IAAI,2BAA2B,CAAC;AASzD,KAAK,UAAU,kBAAkB,CAAC,MAAoB;IAClD,OAAO,CAAC,GAAG,CAAC,IAAI,MAAM,CAAC,EAAE,sBAAsB,MAAM,CAAC,IAAI,EAAE,CAAC,CAAC;IAE9D,MAAM,MAAM,GAAG,IAAI,MAAM,CAAC;QACtB,IAAI,EAAE,MAAM,CAAC,IAAI;QACjB,OAAO,EAAE,OAAO;KACnB,CAAC,CAAC;IAEH,MAAM,SAAS,GAAG,IAAI,6BAA6B,CAAC,IAAI,GAAG,CAAC,SAAS,CAAC,CAAC,CAAC;IAExE,uCAAuC;IACvC,MAAM,CAAC,OAAO,GAAG,KAAK,CAAC,EAAE;QACrB,OAAO,CAAC,KAAK,CAAC,IAAI,MAAM,CAAC,EAAE,iBAAiB,EAAE,KAAK,CAAC,CAAC;IACzD,CAAC,CAAC;IAEF,8CAA8C;IAC9C,MAAM,CAAC,sBAAsB,CAAC,gCAAgC,EAAE,YAAY,CAAC,EAAE;QAC3E,OAAO,CAAC,GAAG,CAAC,IAAI,MAAM,CAAC,EAAE,mBAAmB,YAAY,CAAC,MAAM,CAAC,IAAI,EAAE,CA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s';
/*
*-------------------------------------------------------------------------------
* repeats (aaa, abcabcabc) ------------------------------
*-------------------------------------------------------------------------------
*/
class MatchRepeat extends MatcherBaseClass {
constructor(options) {
super(options);
this.scoring = new Scoring(options);
}
// eslint-disable-next-line max-statements
match({
password,
omniMatch
}) {
const matches = [];
let lastIndex = 0;
while (lastIndex < password.length) {
const greedyMatch = this.getGreedyMatch(password, lastIndex);
const lazyMatch = this.getLazyMatch(password, lastIndex);
if (greedyMatch == null) {
break;
}
const {
match,
baseToken
} = this.setMatchToken(greedyMatch, lazyMatch);
if (match) {
const j = match.index + match[0].length - 1;
const baseGuesses = this.getBaseGuesses(baseToken, omniMatch);
matches.push(this.normalizeMatch(baseToken, j, match, baseGuesses));
lastIndex = j + 1;
}
}
const hasPromises = matches.some(match => {
return match instanceof Promise;
});
if (hasPromises) {
// eslint-disable-next-line @typescript-eslint/await-thenable
return Promise.all(matches);
}
return matches;
}
// eslint-disable-next-line max-params
normalizeMatch(baseToken, j, match, baseGuesses) {
const baseMatch = {
pattern: 'repeat',
i: match.index,
j,
token: match[0],
baseToken,
baseGuesses: 0,
repeatCount: match[0].length / baseToken.length
};
if (baseGuesses instanceof Promise) {
return baseGuesses.then(resolvedBaseGuesses => {
return {
...baseMatch,
baseGuesses: resolvedBaseGuesses
};
});
}
return {
...baseMatch,
baseGuesses
};
}
getGreedyMatch(password, lastIndex) {
const greedy = /(.+)\1+/g;
greedy.lastIndex = lastIndex;
return greedy.exec(password);
}
getLazyMatch(password, lastIndex) {
const lazy = /(.+?)\1+/g;
lazy.lastIndex = lastIndex;
return lazy.exec(password);
}
setMatchToken(greedyMatch, lazyMatch) {
const lazyAnchored = /^(.+?)\1+$/;
let match;
let baseToken = '';
if (lazyMatch && greedyMatch[0].length > lazyMatch[0].length) {
// greedy beats lazy for 'aabaab'
// greedy: [aabaab, aab]
// lazy: [aa, a]
match = greedyMatch;
// greedy's repeated string might itself be repeated, eg.
// aabaab in aabaabaabaab.
// run an anchored lazy match on greedy's repeated string
// to find the shortest repeated string
const temp = lazyAnchored.exec(match[0]);
if (temp) {
baseToken = temp[1];
}
} else {
// lazy beats greedy for 'aaaaa'
// greedy: [aaaa, aa]
// lazy: [aaaaa, a]
match = lazyMatch;
if (match) {
baseToken = match[1];
}
}
return {
match,
baseToken
};
}
getBaseGuesses(baseToken, omniMatch) {
const matches = omniMatch.match(baseToken);
if (matches instanceof Promise) {
return matches.then(resolvedMatches => {
const baseAnalysis = this.scoring.mostGuessableMatchSequence(baseToken, resolvedMatches);
return baseAnalysis.guesses;
});
}
const baseAnalysis = this.scoring.mostGuessableMatchSequence(baseToken, matches);
return baseAnalysis.guesses;
}
}
export { MatchRepeat as default };
//# sourceMappingURL=matching.mjs.map
@@ -0,0 +1,8 @@
import { AnyRouter } from '@tanstack/router-core';
import { ReactNode } from 'react';
export declare const renderRouterToStream: ({ request, router, responseHeaders, children, }: {
request: Request;
router: AnyRouter;
responseHeaders: Headers;
children: ReactNode;
}) => Promise<Response>;
@@ -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 Maximize = createLucideIcon("Maximize", [
["path", { d: "M8 3H5a2 2 0 0 0-2 2v3", key: "1dcmit" }],
["path", { d: "M21 8V5a2 2 0 0 0-2-2h-3", key: "1e4gt3" }],
["path", { d: "M3 16v3a2 2 0 0 0 2 2h3", key: "wsl5sc" }],
["path", { d: "M16 21h3a2 2 0 0 0 2-2v-3", key: "18trek" }]
]);
export { Maximize as default };
//# sourceMappingURL=maximize.js.map
@@ -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 AlarmClock = createLucideIcon("AlarmClock", [
["circle", { cx: "12", cy: "13", r: "8", key: "3y4lt7" }],
["path", { d: "M12 9v4l2 2", key: "1c63tq" }],
["path", { d: "M5 3 2 6", key: "18tl5t" }],
["path", { d: "m22 6-3-3", key: "1opdir" }],
["path", { d: "M6.38 18.7 4 21", key: "17xu3x" }],
["path", { d: "M17.64 18.67 20 21", key: "kv2oe2" }]
]);
export { AlarmClock as default };
//# sourceMappingURL=alarm-clock.js.map
@@ -0,0 +1,2 @@
import type { LibDefinition } from '../variable';
export declare const webworker_asynciterable: LibDefinition;
@@ -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 FileChartLine = createLucideIcon("FileChartLine", [
["path", { d: "M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z", key: "1rqfz7" }],
["path", { d: "M14 2v4a2 2 0 0 0 2 2h4", key: "tnqrlb" }],
["path", { d: "m16 13-3.5 3.5-2-2L8 17", key: "zz7yod" }]
]);
export { FileChartLine as default };
//# sourceMappingURL=file-chart-line.js.map
@@ -0,0 +1 @@
["abacus","abdomen","abdominal","abide","abiding","ability","ablaze","able","abnormal","abrasion","abrasive","abreast","abridge","abroad","abruptly","absence","absentee","absently","absinthe","absolute","absolve","abstain","abstract","absurd","accent","acclaim","acclimate","accompany","account","accuracy","accurate","accustom","acetone","achiness","aching","acid","acorn","acquaint","acquire","acre","acrobat","acronym","acting","action","activate","activator","active","activism","activist","activity","actress","acts","acutely","acuteness","aeration","aerobics","aerosol","aerospace","afar","affair","affected","affecting","affection","affidavit","affiliate","affirm","affix","afflicted","affluent","afford","affront","aflame","afloat","aflutter","afoot","afraid","afterglow","afterlife","aftermath","aftermost","afternoon","aged","ageless","agency","agenda","agent","aggregate","aghast","agile","agility","aging","agnostic","agonize","agonizing","agony","agreeable","agreeably","agreed","agreeing","agreement","aground","ahead","ahoy","aide","aids","aim","ajar","alabaster","alarm","albatross","album","alfalfa","algebra","algorithm","alias","alibi","alienable","alienate","aliens","alike","alive","alkaline","alkalize","almanac","almighty","almost","aloe","aloft","aloha","alone","alongside","aloof","alphabet","alright","although","altitude","alto","aluminum","alumni","always","amaretto","amaze","amazingly","amber","ambiance","ambiguity","ambiguous","ambition","ambitious","ambulance","ambush","amendable","amendment","amends","amenity","amiable","amicably","amid","amigo","amino","amiss","ammonia","ammonium","amnesty","amniotic","among","amount","amperage","ample","amplifier","amplify","amply","amuck","amulet","amusable","amused","amusement","amuser","amusing","anaconda","anaerobic","anagram","anatomist","anatomy","anchor","anchovy","ancient","android","anemia","anemic","aneurism","anew","angelfish","angelic","anger","angled","angler","angles","angling","angrily","angriness","anguished","angular","animal","animate","animating","animation","animator","anime","animosity","ankle","annex","annotate","announcer","annoying","annually","annuity","anointer","another","answering","antacid","antarctic","anteater","antelope","antennae","anthem","anthill","anthology","antibody","antics","antidote","antihero","antiquely","antiques","antiquity","antirust","antitoxic","antitrust","antiviral","antivirus","antler","antonym","antsy","anvil","anybody","anyhow","anymore","anyone","anyplace","anything","anytime","anyway","anywhere","aorta","apache","apostle","appealing","appear","appease","appeasing","appendage","appendix","appetite","appetizer","applaud","applause","apple","appliance","applicant","applied","apply","appointee","appraisal","appraiser","apprehend","approach","approval","approve","apricot","april","apron","aptitude","aptly","aqua","aqueduct","arbitrary","arbitrate","ardently","area","arena","arguable","arguably","argue","arise","armadillo","armband","armchair","armed","armful","armhole","arming","armless","armoire","armored","armory","armrest","army","aroma","arose","around","arousal","arrange","array","arrest","arrival","arrive","arrogance","arrogant","arson","art","ascend","ascension","ascent","ascertain","ashamed","ashen","ashes","ashy","aside","askew","asleep","asparagus","aspect","aspirate","aspire","aspirin","astonish","astound","astride","astrology","astronaut","astronomy","astute","atlantic","atlas","atom","atonable","atop","atrium","atrocious","atrophy","attach","attain","attempt","attendant","attendee","attention","attentive","attest","attic","attire","attitude","attractor","attribute","atypical","auction","audacious","audacity","audible","audibly","audience","audio","audition","augmented","august","authentic","author","autism","autistic","autograph","automaker","automated","automatic","autopilot","available","avalanche","avatar","avenge","avenging","avenue","average","aversion","avert","aviation","aviator","avid","avoid","await","awaken","award","aware","awhile","awkward","awning","awoke","awry","axis","babble","babbling","babied","baboon","backache","backboard","backboned","backdrop","backed","backer","backfield","backfire","backhand","backing","backlands","backlash","backless","backlight","backlit","backlog","backpack","backpedal","backrest","backroom","backshift","backside","backslid","backspace","backspin","backstab","backstage","backtalk","backtrack","backup","backward","backwash","backwater","backyard","bacon","bacteria","bacterium","badass","badge","badland","badly","badness","baffle","baffling","bagel","bagful","baggage","bagged","baggie","bagginess","bagging","baggy","bagpipe","baguette","baked","bakery","bakeshop","baking","balance","balancing","balcony","balmy","balsamic","bamboo","banana","banish","banister","banjo","bankable","bankbook","banked","banker","banking","banknote","bankroll","banner","bannister","banshee","banter","barbecue","barbed","barbell","barber","barcode","barge","bargraph","barista","barLine truncated
@@ -0,0 +1,11 @@
import { a as Debugger, i as DebugOptions, n as enabled, o as Formatters, r as namespaces, s as InspectOptions, t as disable } from "./core.js";
//#region src/node.d.ts
declare function createDebug(namespace: string, options?: DebugOptions): Debugger;
/**
* Enables a debug mode by namespaces. This can include modes
* separated by a colon and wildcards.
*/
declare function enable(namespaces: string): void;
//#endregion
export { DebugOptions, Debugger, Formatters, InspectOptions, createDebug, disable, enable, enabled, namespaces };
@@ -0,0 +1,37 @@
import { renderChildren } from "../base.js";
import { renderToReadableStream as renderToReadableStream$1 } from "../streaming.js";
import dom_default from "./index.js";
//#region src/jsx/dom/server.ts
const prepareRoot = (element) => typeof element === "string" || Array.isArray(element) ? renderChildren([element]) : element;
/**
* Render JSX element to string.
* @param element JSX element to render.
* @param options Options for rendering.
* @returns Rendered string.
*/
const renderToString = (element, options = {}) => {
if (Object.keys(options).length > 0) console.warn("options are not supported yet");
element = prepareRoot(element);
const res = element instanceof Promise ? element : element?.toString() ?? "";
if (typeof res !== "string") throw new Error("Async component is not supported in renderToString");
return res;
};
/**
* Render JSX element to readable stream.
* @param element JSX element to render.
* @param options Options for rendering.
* @returns Rendered readable stream.
*/
const renderToReadableStream = async (element, options = {}) => {
if (Object.keys(options).some((key) => key !== "onError")) console.warn("options are not supported yet, except onError");
element = prepareRoot(element);
if (!element || typeof element !== "object") element = element?.toString() ?? "";
return renderToReadableStream$1(element, options.onError);
};
var server_default = {
renderToString,
renderToReadableStream,
version: dom_default
};
//#endregion
export { server_default as default, renderToReadableStream, renderToString, dom_default as version };
@@ -0,0 +1 @@
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;AAwEA,wBAYC;AASD,oCASC;AAwBD,wBA8BC;AA5JD,2CAAkE;AAClE,2CAA6D;AAC7D,2CAKqB;AAErB,wCAAwC;AACxC,IAAY,WAKX;AALD,WAAY,WAAW;IACnB,iCAAiC;IACjC,2CAAO,CAAA;IACP,mEAAmE;IACnE,6CAAQ,CAAA;AACZ,CAAC,EALW,WAAW,2BAAX,WAAW,QAKtB;AAED,IAAY,YA2BX;AA3BD,WAAY,YAAY;IACpB;;;OAGG;IACH,+CAAI,CAAA;IACJ;;;;OAIG;IACH,iDAAK,CAAA;IACL;;;OAGG;IACH,yDAAS,CAAA;IACT;;;OAGG;IACH,yDAAS,CAAA;IACT;;;OAGG;IACH,+CAAI,CAAA;AACR,CAAC,EA3BW,YAAY,4BAAZ,YAAY,QA2BvB;AAsBD;;;;;GAKG;AACH,SAAgB,MAAM,CAClB,KAAa,EACb,UAAyC,WAAW,CAAC,GAAG;IAExD,MAAM,KAAK,GAAG,OAAO,OAAO,KAAK,QAAQ,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC;IAEpE,IAAI,KAAK,KAAK,WAAW,CAAC,IAAI,EAAE,CAAC;QAC7B,MAAM,IAAI,GAAG,OAAO,OAAO,KAAK,QAAQ,CAAC,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC;QACpE,OAAO,IAAA,sBAAU,EAAC,KAAK,EAAE,IAAI,CAAC,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C;gBAC3B,CAAC,CAAC,IAAA,qBAAS,EAAC,KAAK,CAAC,CAAC;QAC3B,CAAC;QACD,0DAA0D;QAC1D,KAAK,YAAY,CAAC,SAAS,CAAC;QAC5B,OAAO,CAAC,CAAC,CAAC;YACN,OAAO,KAAK,KAAK,WAAW,CAAC,IAAI;gBAC7B,CAAC,CAAC,IAAA,sBAAU,EAAC,KAAK,CAAC;gBACnB,CAAC,CAAC,IAAA,qBAAS,EAAC,KAAK,CAAC,CAAC;QAC3B,CAAC;IACL,CAAC;AACL,CAAC;AAED,yCAMqB;AALjB,sGAAA,SAAS,OAAA;AACT,mGAAA,MAAM,OAAA;AACN,uGAAA,UAAU,OAAA;AACV,4GAAA,eAAe,OAAA;AACf,uGAAA,UAAU,OAAA;AAGd,yCAMqB;AALjB,uGAAA,UAAU,OAAA;AACV,+GAAA,kBAAkB,OAAA;AAClB,8BAA8B;AAC9B,wGAAA,UAAU,OAAe;AACzB,wGAAA,UAAU,OAAe;AAG7B,yCAaqB;AAZjB,0GAAA,aAAa,OAAA;AACb,yGAAA,YAAY,OAAA;AACZ,sGAAA,SAAS,OAAA;AACT,uGAAA,UAAU,OAAA;AACV,6GAAA,gBAAgB,OAAA;AAChB,gHAAA,mBAAmB,OAAA;AACnB,8BAA8B;AAC9B,wGAAA,UAAU,OAAe;AACzB,wGAAA,UAAU,OAAe;AACzB,8GAAA,gBAAgB,OAAqB;AACrC,8GAAA,gBAAgB,OAAqB;AACrC,4GAAA,SAAS,OAAmB"}
@@ -0,0 +1,545 @@
"use client";
// src/collection-legacy.tsx
import React from "react";
import { createContextScope } from "@radix-ui/react-context";
import { useComposedRefs } from "@radix-ui/react-compose-refs";
import { createSlot } from "@radix-ui/react-slot";
import { jsx } from "react/jsx-runtime";
function createCollection(name) {
const PROVIDER_NAME = name + "CollectionProvider";
const [createCollectionContext, createCollectionScope] = createContextScope(PROVIDER_NAME);
const [CollectionProviderImpl, useCollectionContext] = createCollectionContext(
PROVIDER_NAME,
{ collectionRef: { current: null }, itemMap: /* @__PURE__ */ new Map() }
);
const CollectionProvider = (props) => {
const { scope, children } = props;
const ref = React.useRef(null);
const itemMap = React.useRef(/* @__PURE__ */ new Map()).current;
return /* @__PURE__ */ jsx(CollectionProviderImpl, { scope, itemMap, collectionRef: ref, children });
};
CollectionProvider.displayName = PROVIDER_NAME;
const COLLECTION_SLOT_NAME = name + "CollectionSlot";
const CollectionSlotImpl = createSlot(COLLECTION_SLOT_NAME);
const CollectionSlot = React.forwardRef(
(props, forwardedRef) => {
const { scope, children } = props;
const context = useCollectionContext(COLLECTION_SLOT_NAME, scope);
const composedRefs = useComposedRefs(forwardedRef, context.collectionRef);
return /* @__PURE__ */ jsx(CollectionSlotImpl, { ref: composedRefs, children });
}
);
CollectionSlot.displayName = COLLECTION_SLOT_NAME;
const ITEM_SLOT_NAME = name + "CollectionItemSlot";
const ITEM_DATA_ATTR = "data-radix-collection-item";
const CollectionItemSlotImpl = createSlot(ITEM_SLOT_NAME);
const CollectionItemSlot = React.forwardRef(
(props, forwardedRef) => {
const { scope, children, ...itemData } = props;
const ref = React.useRef(null);
const composedRefs = useComposedRefs(forwardedRef, ref);
const context = useCollectionContext(ITEM_SLOT_NAME, scope);
React.useEffect(() => {
context.itemMap.set(ref, { ref, ...itemData });
return () => void context.itemMap.delete(ref);
});
return /* @__PURE__ */ jsx(CollectionItemSlotImpl, { ...{ [ITEM_DATA_ATTR]: "" }, ref: composedRefs, children });
}
);
CollectionItemSlot.displayName = ITEM_SLOT_NAME;
function useCollection(scope) {
const context = useCollectionContext(name + "CollectionConsumer", scope);
const getItems = React.useCallback(() => {
const collectionNode = context.collectionRef.current;
if (!collectionNode) return [];
const orderedNodes = Array.from(collectionNode.querySelectorAll(`[${ITEM_DATA_ATTR}]`));
const items = Array.from(context.itemMap.values());
const orderedItems = items.sort(
(a, b) => orderedNodes.indexOf(a.ref.current) - orderedNodes.indexOf(b.ref.current)
);
return orderedItems;
}, [context.collectionRef, context.itemMap]);
return getItems;
}
return [
{ Provider: CollectionProvider, Slot: CollectionSlot, ItemSlot: CollectionItemSlot },
useCollection,
createCollectionScope
];
}
// src/collection.tsx
import React2 from "react";
import { createContextScope as createContextScope2 } from "@radix-ui/react-context";
import { useComposedRefs as useComposedRefs2 } from "@radix-ui/react-compose-refs";
import { createSlot as createSlot2 } from "@radix-ui/react-slot";
// src/ordered-dictionary.ts
var __instanciated = /* @__PURE__ */ new WeakMap();
var OrderedDict = class _OrderedDict extends Map {
#keys;
constructor(entries) {
super(entries);
this.#keys = [...super.keys()];
__instanciated.set(this, true);
}
set(key, value) {
if (__instanciated.get(this)) {
if (this.has(key)) {
this.#keys[this.#keys.indexOf(key)] = key;
} else {
this.#keys.push(key);
}
}
super.set(key, value);
return this;
}
insert(index, key, value) {
const has = this.has(key);
const length = this.#keys.length;
const relativeIndex = toSafeInteger(index);
let actualIndex = relativeIndex >= 0 ? relativeIndex : length + relativeIndex;
const safeIndex = actualIndex < 0 || actualIndex >= length ? -1 : actualIndex;
if (safeIndex === this.size || has && safeIndex === this.size - 1 || safeIndex === -1) {
this.set(key, value);
return this;
}
const size = this.size + (has ? 0 : 1);
if (relativeIndex < 0) {
actualIndex++;
}
const keys = [...this.#keys];
let nextValue;
let shouldSkip = false;
for (let i = actualIndex; i < size; i++) {
if (actualIndex === i) {
let nextKey = keys[i];
if (keys[i] === key) {
nextKey = keys[i + 1];
}
if (has) {
this.delete(key);
}
nextValue = this.get(nextKey);
this.set(key, value);
} else {
if (!shouldSkip && keys[i - 1] === key) {
shouldSkip = true;
}
const currentKey = keys[shouldSkip ? i : i - 1];
const currentValue = nextValue;
nextValue = this.get(currentKey);
this.delete(currentKey);
this.set(currentKey, currentValue);
}
}
return this;
}
with(index, key, value) {
const copy = new _OrderedDict(this);
copy.insert(index, key, value);
return copy;
}
before(key) {
const index = this.#keys.indexOf(key) - 1;
if (index < 0) {
return void 0;
}
return this.entryAt(index);
}
/**
* Sets a new key-value pair at the position before the given key.
*/
setBefore(key, newKey, value) {
const index = this.#keys.indexOf(key);
if (index === -1) {
return this;
}
return this.insert(index, newKey, value);
}
after(key) {
let index = this.#keys.indexOf(key);
index = index === -1 || index === this.size - 1 ? -1 : index + 1;
if (index === -1) {
return void 0;
}
return this.entryAt(index);
}
/**
* Sets a new key-value pair at the position after the given key.
*/
setAfter(key, newKey, value) {
const index = this.#keys.indexOf(key);
if (index === -1) {
return this;
}
return this.insert(index + 1, newKey, value);
}
first() {
return this.entryAt(0);
}
last() {
return this.entryAt(-1);
}
clear() {
this.#keys = [];
return super.clear();
}
delete(key) {
const deleted = super.delete(key);
if (deleted) {
this.#keys.splice(this.#keys.indexOf(key), 1);
}
return deleted;
}
deleteAt(index) {
const key = this.keyAt(index);
if (key !== void 0) {
return this.delete(key);
}
return false;
}
at(index) {
const key = at(this.#keys, index);
if (key !== void 0) {
return this.get(key);
}
}
entryAt(index) {
const key = at(this.#keys, index);
if (key !== void 0) {
return [key, this.get(key)];
}
}
indexOf(key) {
return this.#keys.indexOf(key);
}
keyAt(index) {
return at(this.#keys, index);
}
from(key, offset) {
const index = this.indexOf(key);
if (index === -1) {
return void 0;
}
let dest = index + offset;
if (dest < 0) dest = 0;
if (dest >= this.size) dest = this.size - 1;
return this.at(dest);
}
keyFrom(key, offset) {
const index = this.indexOf(key);
if (index === -1) {
return void 0;
}
let dest = index + offset;
if (dest < 0) dest = 0;
if (dest >= this.size) dest = this.size - 1;
return this.keyAt(dest);
}
find(predicate, thisArg) {
let index = 0;
for (const entry of this) {
if (Reflect.apply(predicate, thisArg, [entry, index, this])) {
return entry;
}
index++;
}
return void 0;
}
findIndex(predicate, thisArg) {
let index = 0;
for (const entry of this) {
if (Reflect.apply(predicate, thisArg, [entry, index, this])) {
return index;
}
index++;
}
return -1;
}
filter(predicate, thisArg) {
const entries = [];
let index = 0;
for (const entry of this) {
if (Reflect.apply(predicate, thisArg, [entry, index, this])) {
entries.push(entry);
}
index++;
}
return new _OrderedDict(entries);
}
map(callbackfn, thisArg) {
const entries = [];
let index = 0;
for (const entry of this) {
entries.push([entry[0], Reflect.apply(callbackfn, thisArg, [entry, index, this])]);
index++;
}
return new _OrderedDict(entries);
}
reduce(...args) {
const [callbackfn, initialValue] = args;
let index = 0;
let accumulator = initialValue ?? this.at(0);
for (const entry of this) {
if (index === 0 && args.length === 1) {
accumulator = entry;
} else {
accumulator = Reflect.apply(callbackfn, this, [accumulator, entry, index, this]);
}
index++;
}
return accumulator;
}
reduceRight(...args) {
const [callbackfn, initialValue] = args;
let accumulator = initialValue ?? this.at(-1);
for (let index = this.size - 1; index >= 0; index--) {
const entry = this.at(index);
if (index === this.size - 1 && args.length === 1) {
accumulator = entry;
} else {
accumulator = Reflect.apply(callbackfn, this, [accumulator, entry, index, this]);
}
}
return accumulator;
}
toSorted(compareFn) {
const entries = [...this.entries()].sort(compareFn);
return new _OrderedDict(entries);
}
toReversed() {
const reversed = new _OrderedDict();
for (let index = this.size - 1; index >= 0; index--) {
const key = this.keyAt(index);
const element = this.get(key);
reversed.set(key, element);
}
return reversed;
}
toSpliced(...args) {
const entries = [...this.entries()];
entries.splice(...args);
return new _OrderedDict(entries);
}
slice(start, end) {
const result = new _OrderedDict();
let stop = this.size - 1;
if (start === void 0) {
return result;
}
if (start < 0) {
start = start + this.size;
}
if (end !== void 0 && end > 0) {
stop = end - 1;
}
for (let index = start; index <= stop; index++) {
const key = this.keyAt(index);
const element = this.get(key);
result.set(key, element);
}
return result;
}
every(predicate, thisArg) {
let index = 0;
for (const entry of this) {
if (!Reflect.apply(predicate, thisArg, [entry, index, this])) {
return false;
}
index++;
}
return true;
}
some(predicate, thisArg) {
let index = 0;
for (const entry of this) {
if (Reflect.apply(predicate, thisArg, [entry, index, this])) {
return true;
}
index++;
}
return false;
}
};
function at(array, index) {
if ("at" in Array.prototype) {
return Array.prototype.at.call(array, index);
}
const actualIndex = toSafeIndex(array, index);
return actualIndex === -1 ? void 0 : array[actualIndex];
}
function toSafeIndex(array, index) {
const length = array.length;
const relativeIndex = toSafeInteger(index);
const actualIndex = relativeIndex >= 0 ? relativeIndex : length + relativeIndex;
return actualIndex < 0 || actualIndex >= length ? -1 : actualIndex;
}
function toSafeInteger(number) {
return number !== number || number === 0 ? 0 : Math.trunc(number);
}
// src/collection.tsx
import { jsx as jsx2 } from "react/jsx-runtime";
function createCollection2(name) {
const PROVIDER_NAME = name + "CollectionProvider";
const [createCollectionContext, createCollectionScope] = createContextScope2(PROVIDER_NAME);
const [CollectionContextProvider, useCollectionContext] = createCollectionContext(
PROVIDER_NAME,
{
collectionElement: null,
collectionRef: { current: null },
collectionRefObject: { current: null },
itemMap: new OrderedDict(),
setItemMap: () => void 0
}
);
const CollectionProvider = ({ state, ...props }) => {
return state ? /* @__PURE__ */ jsx2(CollectionProviderImpl, { ...props, state }) : /* @__PURE__ */ jsx2(CollectionInit, { ...props });
};
CollectionProvider.displayName = PROVIDER_NAME;
const CollectionInit = (props) => {
const state = useInitCollection();
return /* @__PURE__ */ jsx2(CollectionProviderImpl, { ...props, state });
};
CollectionInit.displayName = PROVIDER_NAME + "Init";
const CollectionProviderImpl = (props) => {
const { scope, children, state } = props;
const ref = React2.useRef(null);
const [collectionElement, setCollectionElement] = React2.useState(
null
);
const composeRefs = useComposedRefs2(ref, setCollectionElement);
const [itemMap, setItemMap] = state;
React2.useEffect(() => {
if (!collectionElement) return;
const observer = getChildListObserver(() => {
});
observer.observe(collectionElement, {
childList: true,
subtree: true
});
return () => {
observer.disconnect();
};
}, [collectionElement]);
return /* @__PURE__ */ jsx2(
CollectionContextProvider,
{
scope,
itemMap,
setItemMap,
collectionRef: composeRefs,
collectionRefObject: ref,
collectionElement,
children
}
);
};
CollectionProviderImpl.displayName = PROVIDER_NAME + "Impl";
const COLLECTION_SLOT_NAME = name + "CollectionSlot";
const CollectionSlotImpl = createSlot2(COLLECTION_SLOT_NAME);
const CollectionSlot = React2.forwardRef(
(props, forwardedRef) => {
const { scope, children } = props;
const context = useCollectionContext(COLLECTION_SLOT_NAME, scope);
const composedRefs = useComposedRefs2(forwardedRef, context.collectionRef);
return /* @__PURE__ */ jsx2(CollectionSlotImpl, { ref: composedRefs, children });
}
);
CollectionSlot.displayName = COLLECTION_SLOT_NAME;
const ITEM_SLOT_NAME = name + "CollectionItemSlot";
const ITEM_DATA_ATTR = "data-radix-collection-item";
const CollectionItemSlotImpl = createSlot2(ITEM_SLOT_NAME);
const CollectionItemSlot = React2.forwardRef(
(props, forwardedRef) => {
const { scope, children, ...itemData } = props;
const ref = React2.useRef(null);
const [element, setElement] = React2.useState(null);
const composedRefs = useComposedRefs2(forwardedRef, ref, setElement);
const context = useCollectionContext(ITEM_SLOT_NAME, scope);
const { setItemMap } = context;
const itemDataRef = React2.useRef(itemData);
if (!shallowEqual(itemDataRef.current, itemData)) {
itemDataRef.current = itemData;
}
const memoizedItemData = itemDataRef.current;
React2.useEffect(() => {
const itemData2 = memoizedItemData;
setItemMap((map) => {
if (!element) {
return map;
}
if (!map.has(element)) {
map.set(element, { ...itemData2, element });
return map.toSorted(sortByDocumentPosition);
}
return map.set(element, { ...itemData2, element }).toSorted(sortByDocumentPosition);
});
return () => {
setItemMap((map) => {
if (!element || !map.has(element)) {
return map;
}
map.delete(element);
return new OrderedDict(map);
});
};
}, [element, memoizedItemData, setItemMap]);
return /* @__PURE__ */ jsx2(CollectionItemSlotImpl, { ...{ [ITEM_DATA_ATTR]: "" }, ref: composedRefs, children });
}
);
CollectionItemSlot.displayName = ITEM_SLOT_NAME;
function useInitCollection() {
return React2.useState(new OrderedDict());
}
function useCollection(scope) {
const { itemMap } = useCollectionContext(name + "CollectionConsumer", scope);
return itemMap;
}
const functions = {
createCollectionScope,
useCollection,
useInitCollection
};
return [
{ Provider: CollectionProvider, Slot: CollectionSlot, ItemSlot: CollectionItemSlot },
functions
];
}
function shallowEqual(a, b) {
if (a === b) return true;
if (typeof a !== "object" || typeof b !== "object") return false;
if (a == null || b == null) return false;
const keysA = Object.keys(a);
const keysB = Object.keys(b);
if (keysA.length !== keysB.length) return false;
for (const key of keysA) {
if (!Object.prototype.hasOwnProperty.call(b, key)) return false;
if (a[key] !== b[key]) return false;
}
return true;
}
function isElementPreceding(a, b) {
return !!(b.compareDocumentPosition(a) & Node.DOCUMENT_POSITION_PRECEDING);
}
function sortByDocumentPosition(a, b) {
return !a[1].element || !b[1].element ? 0 : isElementPreceding(a[1].element, b[1].element) ? -1 : 1;
}
function getChildListObserver(callback) {
const observer = new MutationObserver((mutationsList) => {
for (const mutation of mutationsList) {
if (mutation.type === "childList") {
callback();
return;
}
}
});
return observer;
}
export {
createCollection,
createCollection2 as unstable_createCollection
};
//# sourceMappingURL=index.mjs.map
@@ -0,0 +1,2 @@
import type { LibDefinition } from '../variable';
export declare const esnext_bigint: LibDefinition;
@@ -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 StarHalf = createLucideIcon("StarHalf", [
[
"path",
{
d: "M12 18.338a2.1 2.1 0 0 0-.987.244L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.12 2.12 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.12 2.12 0 0 0 1.597-1.16l2.309-4.679A.53.53 0 0 1 12 2",
key: "2ksp49"
}
]
]);
export { StarHalf as default };
//# sourceMappingURL=star-half.js.map
@@ -0,0 +1,17 @@
"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_sharedmemory = void 0;
const base_config_1 = require("./base-config");
const es2020_bigint_1 = require("./es2020.bigint");
exports.es2024_sharedmemory = {
libs: [es2020_bigint_1.es2020_bigint],
variables: [
['Atomics', base_config_1.TYPE],
['SharedArrayBuffer', base_config_1.TYPE],
['SharedArrayBufferConstructor', base_config_1.TYPE],
],
};
@@ -0,0 +1,37 @@
import units from "./units.mjs";
const { YEAR, MONTH, DATE, HOUR, MINUTE, SECOND, MILLISECOND, UTC_OFFSET } = units;
function escapeRegex(str) {
return str.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
}
const TOKEN_MAP = {
YYYY: { pattern: "(\\d{1,4})", key: YEAR },
// 年份
// YY: { pattern: '(\\d{1,2})', key: YEAR }, // 年份
MM: { pattern: "(\\d{1,2})", key: MONTH },
// 月份
DD: { pattern: "(\\d{1,2})", key: DATE },
// 日期
HH: { pattern: "(\\d{1,2})", key: HOUR },
// 小时
mm: { pattern: "(\\d{1,2})", key: MINUTE },
// 分钟
ss: { pattern: "(\\d{1,2})", key: SECOND },
// 秒
SSS: { pattern: "(\\d{1,3})", key: MILLISECOND },
// 毫秒
Z: { pattern: "(Z|[+-]\\d{2}(?::?\\d{2})?)", key: UTC_OFFSET }
// 时区
};
const TOKEN_KEYS = Object.keys(TOKEN_MAP).sort((a, b) => b.length - a.length);
const TOKEN_PATTERN = new RegExp(`(${TOKEN_KEYS.join("|")})`, "g");
function compile(formatString) {
const matchedTokens = [];
const pattern = escapeRegex(formatString).replace(TOKEN_PATTERN, (m) => {
matchedTokens.push(m);
return TOKEN_MAP[m].pattern;
});
return { pattern, tokens: matchedTokens };
}
export {
compile as default
};
@@ -0,0 +1,46 @@
//#region src/utils/url.d.ts
/**
* @module
* URL utility.
*/
export type Pattern = readonly [string, string, RegExp | true] | '*';
export declare const splitPath: (path: string) => string[];
export declare const splitRoutingPath: (routePath: string) => string[];
export declare const getPattern: (label: string, next?: string) => Pattern | null;
type Decoder = (str: string) => string;
export declare const tryDecode: (str: string, decoder: Decoder) => string;
/**
* Try to apply decodeURI() to given string.
* If it fails, skip invalid percent encoding or invalid UTF-8 sequences, and apply decodeURI() to the rest as much as possible.
* @param str The string to decode.
* @returns The decoded string that sometimes contains undecodable percent encoding.
* @example
* tryDecodeURI('Hello%20World') // 'Hello World'
* tryDecodeURI('Hello%20World/%A4%A2') // 'Hello World/%A4%A2'
*/
export declare const tryDecodeURI: (str: string) => string;
export declare const getPath: (request: Request) => string;
/**
* @deprecated
* Use the `URL` API instead.
*/
export declare const getQueryStrings: (url: string) => string;
export declare const getPathNoStrict: (request: Request) => string;
/**
* Merge paths.
* @param {string[]} ...paths - The paths to merge.
* @returns {string} The merged path.
* @example
* mergePath('/api', '/users') // '/api/users'
* mergePath('/api/', '/users') // '/api/users'
* mergePath('/api', '/') // '/api'
* mergePath('/api/', '/') // '/api/'
*/
export declare const mergePath: (...paths: string[]) => string;
export declare const checkOptionalParameter: (path: string) => string[] | null;
export declare const tryDecodeURIComponent: (str: string) => string;
export declare const getQueryParam: (url: string, key?: string) => string | undefined | Record<string, string>;
export declare const getQueryParams: (url: string, key?: string) => string[] | undefined | Record<string, string[]>;
export declare const decodeURIComponent_: typeof decodeURIComponent;
//#endregion
export {};
@@ -0,0 +1,19 @@
/**
* @license lucide-react v0.469.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const CalendarCheck2 = createLucideIcon("CalendarCheck2", [
["path", { d: "M8 2v4", key: "1cmpym" }],
["path", { d: "M16 2v4", key: "4m81vk" }],
["path", { d: "M21 14V6a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h8", key: "bce9hv" }],
["path", { d: "M3 10h18", key: "8toen8" }],
["path", { d: "m16 20 2 2 4-4", key: "13tcca" }]
]);
export { CalendarCheck2 as default };
//# sourceMappingURL=calendar-check-2.js.map
@@ -0,0 +1,12 @@
const path = require('path');
const includeDir = path.relative('.', __dirname);
module.exports = {
include: `"${__dirname}"`, // deprecated, can be removed as part of 4.0.0
include_dir: includeDir,
gyp: path.join(includeDir, 'node_api.gyp:nothing'), // deprecated.
targets: path.join(includeDir, 'node_addon_api.gyp'),
isNodeApiBuiltin: true,
needsFlag: false
};
@@ -0,0 +1,66 @@
import { MiddlewareHandler } from "../../types.js";
import { Context } from "../../context.js";
import { AddressType, GetConnInfo } from "../../helper/conninfo/types.js";
//#region src/middleware/ip-restriction/index.d.ts
/**
* Function to get IP Address
*/
type GetIPAddr = GetConnInfo | ((c: Context) => string);
export type IPRestrictionRule = string | ((addr: {
addr: string;
type: AddressType;
}) => boolean);
/**
* Rules for IP Restriction Middleware
*/
export interface IPRestrictionRules {
denyList?: IPRestrictionRule[];
allowList?: IPRestrictionRule[];
}
/**
* IP Restriction Middleware for Hono.
*
* @see {@link https://hono.dev/docs/middleware/builtin/ip-restriction}
*
* @param {GetConnInfo | ((c: Context) => string)} getIP - A function to retrieve the client IP address. Use `getConnInfo` from the appropriate runtime adapter.
* @param {IPRestrictionRules} rules - An object with optional `denyList` and `allowList` arrays of IP rules. Each rule can be a static IP, a CIDR range, or a custom function.
* @param {(remote: { addr: string; type: AddressType }, c: Context) => Response | Promise<Response>} [onError] - Optional custom handler invoked when a request is blocked. Defaults to returning a 403 Forbidden response.
* @returns {MiddlewareHandler} The middleware handler function.
*
* @example
* ```ts
* import { Hono } from 'hono'
* import { ipRestriction } from 'hono/ip-restriction'
* import { getConnInfo } from 'hono/cloudflare-workers'
*
* const app = new Hono()
*
* app.use(
* '*',
* ipRestriction(getConnInfo, {
* // Block a specific IP and an entire subnet
* denyList: ['192.168.0.5', '10.0.0.0/8'],
* // Only allow requests from localhost and a private range
* allowList: ['127.0.0.1', '::1', '192.168.1.0/24'],
* })
* )
*
* // With a custom error handler
* app.use(
* '/admin/*',
* ipRestriction(
* getConnInfo,
* { allowList: ['203.0.113.0/24'] },
* (remote, c) => c.text(`Access denied for ${remote.addr}`, 403)
* )
* )
*
* app.get('/', (c) => c.text('Hello!'))
* ```
*/
export declare const ipRestriction: (getIP: GetIPAddr, { denyList, allowList }: IPRestrictionRules, onError?: (remote: {
addr: string;
type: AddressType;
}, c: Context) => Response | Promise<Response>) => MiddlewareHandler;
//#endregion
export {};
@@ -0,0 +1,39 @@
{
"$schema": "https://json-schema.org/draft/2019-09/schema",
"$id": "https://json-schema.org/draft/2019-09/schema",
"$vocabulary": {
"https://json-schema.org/draft/2019-09/vocab/core": true,
"https://json-schema.org/draft/2019-09/vocab/applicator": true,
"https://json-schema.org/draft/2019-09/vocab/validation": true,
"https://json-schema.org/draft/2019-09/vocab/meta-data": true,
"https://json-schema.org/draft/2019-09/vocab/format": false,
"https://json-schema.org/draft/2019-09/vocab/content": true
},
"$recursiveAnchor": true,
"title": "Core and Validation specifications meta-schema",
"allOf": [
{"$ref": "meta/core"},
{"$ref": "meta/applicator"},
{"$ref": "meta/validation"},
{"$ref": "meta/meta-data"},
{"$ref": "meta/format"},
{"$ref": "meta/content"}
],
"type": ["object", "boolean"],
"properties": {
"definitions": {
"$comment": "While no longer an official keyword as it is replaced by $defs, this keyword is retained in the meta-schema to prevent incompatible extensions as it remains in common use.",
"type": "object",
"additionalProperties": {"$recursiveRef": "#"},
"default": {}
},
"dependencies": {
"$comment": "\"dependencies\" is no longer a keyword, but schema authors should avoid redefining it to facilitate a smooth transition to \"dependentSchemas\" and \"dependentRequired\"",
"type": "object",
"additionalProperties": {
"anyOf": [{"$recursiveRef": "#"}, {"$ref": "meta/validation#/$defs/stringArray"}]
}
}
}
}
@@ -0,0 +1 @@
export declare const defaultStreamHandler: import('@tanstack/router-core/ssr/server').HandlerCallback<import('@tanstack/router-core').AnyRouter>;
@@ -0,0 +1,9 @@
import { transformProps } from 'motion-dom';
const appearStoreId = (elementId, valueName) => {
const key = transformProps.has(valueName) ? "transform" : valueName;
return `${elementId}: ${key}`;
};
export { appearStoreId };
//# sourceMappingURL=store-id.mjs.map