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

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

No files matched your search

@@ -0,0 +1 @@
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../../../src/experimental/tasks/client.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AACvE,OAAO,KAAK,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAChF,OAAO,KAAK,EAAE,eAAe,EAAE,aAAa,EAAE,YAAY,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AACpG,OAAO,EAAE,oBAAoB,EAAE,KAAK,iCAAiC,EAAuB,MAAM,gBAAgB,CAAC;AAEnH,OAAO,KAAK,EAAE,aAAa,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAgBnF;;;;;;;;;;GAUG;AACH,qBAAa,uBAAuB,CAChC,QAAQ,SAAS,OAAO,GAAG,OAAO,EAClC,aAAa,SAAS,YAAY,GAAG,YAAY,EACjD,OAAO,SAAS,MAAM,GAAG,MAAM;IAEnB,OAAO,CAAC,QAAQ,CAAC,OAAO;gBAAP,OAAO,EAAE,MAAM,CAAC,QAAQ,EAAE,aAAa,EAAE,OAAO,CAAC;IAE9E;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAmCG;IACI,cAAc,CAAC,CAAC,SAAS,OAAO,oBAAoB,GAAG,OAAO,iCAAiC,EAClG,MAAM,EAAE,eAAe,CAAC,QAAQ,CAAC,EACjC,YAAY,GAAE,CAA6B,EAC3C,OAAO,CAAC,EAAE,cAAc,GACzB,cAAc,CAAC,eAAe,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC;IAyE/D;;;;;;;;OAQG;IACG,OAAO,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,OAAO,CAAC,aAAa,CAAC;IAM/E;;;;;;;;;OASG;IACG,aAAa,CAAC,CAAC,SAAS,eAAe,EAAE,MAAM,EAAE,MAAM,EAAE,YAAY,CAAC,EAAE,CAAC,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,OAAO,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC;IAapI;;;;;;;;OAQG;IACG,SAAS,CAAC,MAAM,CAAC,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,OAAO,CAAC,eAAe,CAAC;IASpF;;;;;;;OAOG;IACG,UAAU,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,OAAO,CAAC,gBAAgB,CAAC;IASrF;;;;;;;;;;;;;OAaG;IACH,aAAa,CAAC,CAAC,SAAS,eAAe,EACnC,OAAO,EAAE,aAAa,GAAG,QAAQ,EACjC,YAAY,EAAE,CAAC,EACf,OAAO,CAAC,EAAE,cAAc,GACzB,cAAc,CAAC,eAAe,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC;CAWlE"}
@@ -0,0 +1,121 @@
import type { $ZodStringFormats } from "../core/checks.js";
import type * as errors from "../core/errors.js";
import * as util from "../core/util.js";
const error: () => errors.$ZodErrorMap = () => {
const Sizable: Record<string, { unit: string; verb: string }> = {
string: { unit: "caràcters", verb: "contenir" },
file: { unit: "bytes", verb: "contenir" },
array: { unit: "elements", verb: "contenir" },
set: { unit: "elements", verb: "contenir" },
map: { unit: "elements", verb: "contenir" },
};
function getSizing(origin: string): { unit: string; verb: string } | null {
return Sizable[origin] ?? null;
}
const FormatDictionary: {
[k in $ZodStringFormats | (string & {})]?: string;
} = {
regex: "entrada",
email: "adreça electrònica",
url: "URL",
emoji: "emoji",
uuid: "UUID",
uuidv4: "UUIDv4",
uuidv6: "UUIDv6",
nanoid: "nanoid",
guid: "GUID",
cuid: "cuid",
cuid2: "cuid2",
ulid: "ULID",
xid: "XID",
ksuid: "KSUID",
datetime: "data i hora ISO",
date: "data ISO",
time: "hora ISO",
duration: "durada ISO",
ipv4: "adreça IPv4",
ipv6: "adreça IPv6",
mac: "adreça MAC",
cidrv4: "rang IPv4",
cidrv6: "rang IPv6",
base64: "cadena codificada en base64",
base64url: "cadena codificada en base64url",
json_string: "cadena JSON",
e164: "número E.164",
credit_card: "número de targeta de crèdit",
currency_code: "codi de moneda",
iban: "IBAN",
jwt: "JWT",
template_literal: "entrada",
};
const TypeDictionary: {
[k in errors.$ZodInvalidTypeExpected | (string & {})]?: string;
} = {
nan: "NaN",
};
return (issue) => {
switch (issue.code) {
case "invalid_type": {
const expected = TypeDictionary[issue.expected] ?? issue.expected;
const receivedType = util.parsedType(issue.input);
const received = TypeDictionary[receivedType] ?? receivedType;
if (/^[A-Z]/.test(issue.expected)) {
return `Tipus invàlid: s'esperava instanceof ${issue.expected}, s'ha rebut ${received}`;
}
return `Tipus invàlid: s'esperava ${expected}, s'ha rebut ${received}`;
}
case "invalid_value":
if (issue.values.length === 1) return `Valor invàlid: s'esperava ${util.stringifyPrimitive(issue.values[0])}`;
return `Opció invàlida: s'esperava una de ${util.joinValues(issue.values, " o ")}`;
case "too_big": {
const adj = issue.inclusive ? "com a màxim" : "menys de";
const sizing = getSizing(issue.origin);
if (sizing)
return `Massa gran: s'esperava que ${issue.origin ?? "el valor"} contingués ${adj} ${issue.maximum.toString()} ${sizing.unit ?? "elements"}`;
return `Massa gran: s'esperava que ${issue.origin ?? "el valor"} fos ${adj} ${issue.maximum.toString()}`;
}
case "too_small": {
const adj = issue.inclusive ? "com a mínim" : "més de";
const sizing = getSizing(issue.origin);
if (sizing) {
return `Massa petit: s'esperava que ${issue.origin} contingués ${adj} ${issue.minimum.toString()} ${sizing.unit}`;
}
return `Massa petit: s'esperava que ${issue.origin} fos ${adj} ${issue.minimum.toString()}`;
}
case "invalid_format": {
const _issue = issue as errors.$ZodStringFormatIssues;
if (_issue.format === "starts_with") {
return `Format invàlid: ha de començar amb "${_issue.prefix}"`;
}
if (_issue.format === "ends_with") return `Format invàlid: ha d'acabar amb "${_issue.suffix}"`;
if (_issue.format === "includes") return `Format invàlid: ha d'incloure "${_issue.includes}"`;
if (_issue.format === "regex") return `Format invàlid: ha de coincidir amb el patró ${_issue.pattern}`;
return `Format invàlid per a ${FormatDictionary[_issue.format] ?? issue.format}`;
}
case "not_multiple_of":
return `Número invàlid: ha de ser múltiple de ${issue.divisor}`;
case "unrecognized_keys":
return `Clau${issue.keys.length > 1 ? "s" : ""} no reconeguda${issue.keys.length > 1 ? "s" : ""}: ${util.joinValues(issue.keys, ", ")}`;
case "invalid_key":
return `Clau invàlida a ${issue.origin}`;
case "invalid_union":
return "Entrada invàlida"; // Could also be "Tipus d'unió invàlid" but "Entrada invàlida" is more general
case "invalid_element":
return `Element invàlid a ${issue.origin}`;
default:
return `Entrada invàlida`;
}
};
};
export default function (): { localeError: errors.$ZodErrorMap } {
return {
localeError: error(),
};
}
@@ -0,0 +1,179 @@
import { invariant, millisecondsToSeconds, secondsToMilliseconds, noop } from 'motion-utils';
import { setStyle } from '../render/dom/style-set.mjs';
import { supportsScrollTimeline } from '../utils/supports/scroll-timeline.mjs';
import { getFinalKeyframe } from './keyframes/get-final.mjs';
import { WithPromise } from './utils/WithPromise.mjs';
import { startWaapiAnimation } from './waapi/start-waapi-animation.mjs';
import { applyGeneratorOptions } from './waapi/utils/apply-generator.mjs';
/**
* NativeAnimation implements AnimationPlaybackControls for the browser's Web Animations API.
*/
class NativeAnimation extends WithPromise {
constructor(options) {
super();
this.finishedTime = null;
this.isStopped = false;
/**
* Tracks a manually-set start time that takes precedence over WAAPI's
* dynamic startTime. This is cleared when play() or time setter is called,
* allowing WAAPI to take over timing.
*/
this.manualStartTime = null;
if (!options)
return;
const { element, name, keyframes, pseudoElement, allowFlatten = false, finalKeyframe, onComplete, } = options;
this.isPseudoElement = Boolean(pseudoElement);
this.allowFlatten = allowFlatten;
this.options = options;
invariant(typeof options.type !== "string", `Mini animate() doesn't support "type" as a string.`, "mini-spring");
const transition = applyGeneratorOptions(options);
this.animation = startWaapiAnimation(element, name, keyframes, transition, pseudoElement);
if (transition.autoplay === false) {
this.animation.pause();
}
this.animation.onfinish = () => {
this.finishedTime = this.time;
if (!pseudoElement) {
const keyframe = getFinalKeyframe(keyframes, this.options, finalKeyframe, this.speed);
if (this.updateMotionValue) {
this.updateMotionValue(keyframe);
}
/**
* If we can, we want to commit the final style as set by the user,
* rather than the computed keyframe value supplied by the animation.
* We always do this, even when a motion value is present, to prevent
* a visual flash in Firefox where the WAAPI animation's fill is removed
* during cancel() before the scheduled render can apply the correct value.
*/
setStyle(element, name, keyframe);
this.animation.cancel();
}
onComplete?.();
this.notifyFinished();
};
}
play() {
if (this.isStopped)
return;
this.manualStartTime = null;
this.animation.play();
if (this.state === "finished") {
this.updateFinished();
}
}
pause() {
this.animation.pause();
}
complete() {
this.animation.finish?.();
}
cancel() {
try {
this.animation.cancel();
}
catch (e) { }
}
stop() {
if (this.isStopped)
return;
this.isStopped = true;
const { state } = this;
if (state === "idle" || state === "finished") {
return;
}
if (this.updateMotionValue) {
this.updateMotionValue();
}
else {
this.commitStyles();
}
if (!this.isPseudoElement)
this.cancel();
}
/**
* WAAPI doesn't natively have any interruption capabilities.
*
* In this method, we commit styles back to the DOM before cancelling
* the animation.
*
* This is designed to be overridden by NativeAnimationExtended, which
* will create a renderless JS animation and sample it twice to calculate
* its current value, "previous" value, and therefore allow
* Motion to also correctly calculate velocity for any subsequent animation
* while deferring the commit until the next animation frame.
*/
commitStyles() {
const element = this.options?.element;
if (!this.isPseudoElement && element?.isConnected) {
this.animation.commitStyles?.();
}
}
get duration() {
const duration = this.animation.effect?.getComputedTiming?.().duration || 0;
return millisecondsToSeconds(Number(duration));
}
get iterationDuration() {
const { delay = 0 } = this.options || {};
return this.duration + millisecondsToSeconds(delay);
}
get time() {
return millisecondsToSeconds(Number(this.animation.currentTime) || 0);
}
set time(newTime) {
const wasFinished = this.finishedTime !== null;
this.manualStartTime = null;
this.finishedTime = null;
this.animation.currentTime = secondsToMilliseconds(newTime);
if (wasFinished) {
this.animation.pause();
}
}
/**
* The playback speed of the animation.
* 1 = normal speed, 2 = double speed, 0.5 = half speed.
*/
get speed() {
return this.animation.playbackRate;
}
set speed(newSpeed) {
// Allow backwards playback after finishing
if (newSpeed < 0)
this.finishedTime = null;
this.animation.playbackRate = newSpeed;
}
get state() {
return this.finishedTime !== null
? "finished"
: this.animation.playState;
}
get startTime() {
return this.manualStartTime ?? Number(this.animation.startTime);
}
set startTime(newStartTime) {
this.manualStartTime = this.animation.startTime = newStartTime;
}
/**
* Attaches a timeline to the animation, for instance the `ScrollTimeline`.
*/
attachTimeline({ timeline, rangeStart, rangeEnd, observe, }) {
if (this.allowFlatten) {
this.animation.effect?.updateTiming({ easing: "linear" });
}
this.animation.onfinish = null;
if (timeline && supportsScrollTimeline()) {
this.animation.timeline = timeline;
if (rangeStart)
this.animation.rangeStart = rangeStart;
if (rangeEnd)
this.animation.rangeEnd = rangeEnd;
return noop;
}
else {
return observe(this);
}
}
}
export { NativeAnimation };
//# sourceMappingURL=NativeAnimation.mjs.map
@@ -0,0 +1,12 @@
import type * as ts from 'typescript';
interface DirectoryStructureHost {
readDirectory?(path: string, extensions?: readonly string[], exclude?: readonly string[], include?: readonly string[], depth?: number): string[];
}
interface CachedDirectoryStructureHost extends DirectoryStructureHost {
readDirectory(path: string, extensions?: readonly string[], exclude?: readonly string[], include?: readonly string[], depth?: number): string[];
}
export interface WatchCompilerHostOfConfigFile<T extends ts.BuilderProgram> extends ts.WatchCompilerHostOfConfigFile<T> {
extraFileExtensions?: readonly ts.FileExtensionInfo[];
onCachedDirectoryStructureHostCreate(host: CachedDirectoryStructureHost): void;
}
export {};
@@ -0,0 +1,334 @@
'use strict'
// A linked list to keep track of recently-used-ness
const Yallist = require('yallist')
const MAX = Symbol('max')
const LENGTH = Symbol('length')
const LENGTH_CALCULATOR = Symbol('lengthCalculator')
const ALLOW_STALE = Symbol('allowStale')
const MAX_AGE = Symbol('maxAge')
const DISPOSE = Symbol('dispose')
const NO_DISPOSE_ON_SET = Symbol('noDisposeOnSet')
const LRU_LIST = Symbol('lruList')
const CACHE = Symbol('cache')
const UPDATE_AGE_ON_GET = Symbol('updateAgeOnGet')
const naiveLength = () => 1
// lruList is a yallist where the head is the youngest
// item, and the tail is the oldest. the list contains the Hit
// objects as the entries.
// Each Hit object has a reference to its Yallist.Node. This
// never changes.
//
// cache is a Map (or PseudoMap) that matches the keys to
// the Yallist.Node object.
class LRUCache {
constructor (options) {
if (typeof options === 'number')
options = { max: options }
if (!options)
options = {}
if (options.max && (typeof options.max !== 'number' || options.max < 0))
throw new TypeError('max must be a non-negative number')
// Kind of weird to have a default max of Infinity, but oh well.
const max = this[MAX] = options.max || Infinity
const lc = options.length || naiveLength
this[LENGTH_CALCULATOR] = (typeof lc !== 'function') ? naiveLength : lc
this[ALLOW_STALE] = options.stale || false
if (options.maxAge && typeof options.maxAge !== 'number')
throw new TypeError('maxAge must be a number')
this[MAX_AGE] = options.maxAge || 0
this[DISPOSE] = options.dispose
this[NO_DISPOSE_ON_SET] = options.noDisposeOnSet || false
this[UPDATE_AGE_ON_GET] = options.updateAgeOnGet || false
this.reset()
}
// resize the cache when the max changes.
set max (mL) {
if (typeof mL !== 'number' || mL < 0)
throw new TypeError('max must be a non-negative number')
this[MAX] = mL || Infinity
trim(this)
}
get max () {
return this[MAX]
}
set allowStale (allowStale) {
this[ALLOW_STALE] = !!allowStale
}
get allowStale () {
return this[ALLOW_STALE]
}
set maxAge (mA) {
if (typeof mA !== 'number')
throw new TypeError('maxAge must be a non-negative number')
this[MAX_AGE] = mA
trim(this)
}
get maxAge () {
return this[MAX_AGE]
}
// resize the cache when the lengthCalculator changes.
set lengthCalculator (lC) {
if (typeof lC !== 'function')
lC = naiveLength
if (lC !== this[LENGTH_CALCULATOR]) {
this[LENGTH_CALCULATOR] = lC
this[LENGTH] = 0
this[LRU_LIST].forEach(hit => {
hit.length = this[LENGTH_CALCULATOR](hit.value, hit.key)
this[LENGTH] += hit.length
})
}
trim(this)
}
get lengthCalculator () { return this[LENGTH_CALCULATOR] }
get length () { return this[LENGTH] }
get itemCount () { return this[LRU_LIST].length }
rforEach (fn, thisp) {
thisp = thisp || this
for (let walker = this[LRU_LIST].tail; walker !== null;) {
const prev = walker.prev
forEachStep(this, fn, walker, thisp)
walker = prev
}
}
forEach (fn, thisp) {
thisp = thisp || this
for (let walker = this[LRU_LIST].head; walker !== null;) {
const next = walker.next
forEachStep(this, fn, walker, thisp)
walker = next
}
}
keys () {
return this[LRU_LIST].toArray().map(k => k.key)
}
values () {
return this[LRU_LIST].toArray().map(k => k.value)
}
reset () {
if (this[DISPOSE] &&
this[LRU_LIST] &&
this[LRU_LIST].length) {
this[LRU_LIST].forEach(hit => this[DISPOSE](hit.key, hit.value))
}
this[CACHE] = new Map() // hash of items by key
this[LRU_LIST] = new Yallist() // list of items in order of use recency
this[LENGTH] = 0 // length of items in the list
}
dump () {
return this[LRU_LIST].map(hit =>
isStale(this, hit) ? false : {
k: hit.key,
v: hit.value,
e: hit.now + (hit.maxAge || 0)
}).toArray().filter(h => h)
}
dumpLru () {
return this[LRU_LIST]
}
set (key, value, maxAge) {
maxAge = maxAge || this[MAX_AGE]
if (maxAge && typeof maxAge !== 'number')
throw new TypeError('maxAge must be a number')
const now = maxAge ? Date.now() : 0
const len = this[LENGTH_CALCULATOR](value, key)
if (this[CACHE].has(key)) {
if (len > this[MAX]) {
del(this, this[CACHE].get(key))
return false
}
const node = this[CACHE].get(key)
const item = node.value
// dispose of the old one before overwriting
// split out into 2 ifs for better coverage tracking
if (this[DISPOSE]) {
if (!this[NO_DISPOSE_ON_SET])
this[DISPOSE](key, item.value)
}
item.now = now
item.maxAge = maxAge
item.value = value
this[LENGTH] += len - item.length
item.length = len
this.get(key)
trim(this)
return true
}
const hit = new Entry(key, value, len, now, maxAge)
// oversized objects fall out of cache automatically.
if (hit.length > this[MAX]) {
if (this[DISPOSE])
this[DISPOSE](key, value)
return false
}
this[LENGTH] += hit.length
this[LRU_LIST].unshift(hit)
this[CACHE].set(key, this[LRU_LIST].head)
trim(this)
return true
}
has (key) {
if (!this[CACHE].has(key)) return false
const hit = this[CACHE].get(key).value
return !isStale(this, hit)
}
get (key) {
return get(this, key, true)
}
peek (key) {
return get(this, key, false)
}
pop () {
const node = this[LRU_LIST].tail
if (!node)
return null
del(this, node)
return node.value
}
del (key) {
del(this, this[CACHE].get(key))
}
load (arr) {
// reset the cache
this.reset()
const now = Date.now()
// A previous serialized cache has the most recent items first
for (let l = arr.length - 1; l >= 0; l--) {
const hit = arr[l]
const expiresAt = hit.e || 0
if (expiresAt === 0)
// the item was created without expiration in a non aged cache
this.set(hit.k, hit.v)
else {
const maxAge = expiresAt - now
// dont add already expired items
if (maxAge > 0) {
this.set(hit.k, hit.v, maxAge)
}
}
}
}
prune () {
this[CACHE].forEach((value, key) => get(this, key, false))
}
}
const get = (self, key, doUse) => {
const node = self[CACHE].get(key)
if (node) {
const hit = node.value
if (isStale(self, hit)) {
del(self, node)
if (!self[ALLOW_STALE])
return undefined
} else {
if (doUse) {
if (self[UPDATE_AGE_ON_GET])
node.value.now = Date.now()
self[LRU_LIST].unshiftNode(node)
}
}
return hit.value
}
}
const isStale = (self, hit) => {
if (!hit || (!hit.maxAge && !self[MAX_AGE]))
return false
const diff = Date.now() - hit.now
return hit.maxAge ? diff > hit.maxAge
: self[MAX_AGE] && (diff > self[MAX_AGE])
}
const trim = self => {
if (self[LENGTH] > self[MAX]) {
for (let walker = self[LRU_LIST].tail;
self[LENGTH] > self[MAX] && walker !== null;) {
// We know that we're about to delete this one, and also
// what the next least recently used key will be, so just
// go ahead and set it now.
const prev = walker.prev
del(self, walker)
walker = prev
}
}
}
const del = (self, node) => {
if (node) {
const hit = node.value
if (self[DISPOSE])
self[DISPOSE](hit.key, hit.value)
self[LENGTH] -= hit.length
self[CACHE].delete(hit.key)
self[LRU_LIST].removeNode(node)
}
}
class Entry {
constructor (key, value, length, now, maxAge) {
this.key = key
this.value = value
this.length = length
this.now = now
this.maxAge = maxAge || 0
}
}
const forEachStep = (self, fn, node, thisp) => {
let hit = node.value
if (isStale(self, hit)) {
del(self, node)
if (!self[ALLOW_STALE])
hit = undefined
}
if (hit)
fn.call(thisp, hit.value, hit.key, self)
}
module.exports = LRUCache
@@ -0,0 +1 @@
{"version":3,"file":"scan-search.js","sources":["../../../src/icons/scan-search.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name ScanSearch\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMyA3VjVhMiAyIDAgMCAxIDItMmgyIiAvPgogIDxwYXRoIGQ9Ik0xNyAzaDJhMiAyIDAgMCAxIDIgMnYyIiAvPgogIDxwYXRoIGQ9Ik0yMSAxN3YyYTIgMiAwIDAgMS0yIDJoLTIiIC8+CiAgPHBhdGggZD0iTTcgMjFINWEyIDIgMCAwIDEtMi0ydi0yIiAvPgogIDxjaXJjbGUgY3g9IjEyIiBjeT0iMTIiIHI9IjMiIC8+CiAgPHBhdGggZD0ibTE2IDE2LTEuOS0xLjkiIC8+Cjwvc3ZnPgo=) - https://lucide.dev/icons/scan-search\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 ScanSearch = createLucideIcon('ScanSearch', [\n ['path', { d: 'M3 7V5a2 2 0 0 1 2-2h2', key: 'aa7l1z' }],\n ['path', { d: 'M17 3h2a2 2 0 0 1 2 2v2', key: '4qcy5o' }],\n ['path', { d: 'M21 17v2a2 2 0 0 1-2 2h-2', key: '6vwrx8' }],\n ['path', { d: 'M7 21H5a2 2 0 0 1-2-2v-2', key: 'ioqczr' }],\n ['circle', { cx: '12', cy: '12', r: '3', key: '1v7zrd' }],\n ['path', { d: 'm16 16-1.9-1.9', key: '1dq9hf' }],\n]);\n\nexport default ScanSearch;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAa,iBAAiB,YAAc,CAAA,CAAA,CAAA;AAAA,CAAA,CAChD,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAA0B,CAAA,CAAA,CAAA,CAAA,CAAA,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,CACvD,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAA2B,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACxD,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAA6B,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CAC1D,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAA4B,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,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,CACzD,CAAA,CAAC,QAAU,CAAA,CAAA,CAAA,CAAE,EAAI,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAM,CAAI,CAAA,CAAA,CAAA,IAAA,CAAM,CAAA,CAAG,EAAA,CAAA,CAAA,CAAA,CAAA,CAAK,GAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAU,CAAA,CAAA;AAAA,CAAA,CACxD,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAkB,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AACjD,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1,153 @@
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = default_1;
const util = __importStar(require("../core/util.cjs"));
const error = () => {
const Sizable = {
string: { unit: "znakova", verb: "imati" },
file: { unit: "bajtova", verb: "imati" },
array: { unit: "stavki", verb: "imati" },
set: { unit: "stavki", verb: "imati" },
};
function getSizing(origin) {
return Sizable[origin] ?? null;
}
const FormatDictionary = {
regex: "unos",
email: "email adresa",
url: "URL",
emoji: "emoji",
uuid: "UUID",
uuidv4: "UUIDv4",
uuidv6: "UUIDv6",
nanoid: "nanoid",
guid: "GUID",
cuid: "cuid",
cuid2: "cuid2",
ulid: "ULID",
xid: "XID",
ksuid: "KSUID",
datetime: "ISO datum i vrijeme",
date: "ISO datum",
time: "ISO vrijeme",
duration: "ISO trajanje",
ipv4: "IPv4 adresa",
ipv6: "IPv6 adresa",
mac: "MAC adresa",
cidrv4: "IPv4 raspon",
cidrv6: "IPv6 raspon",
base64: "base64 kodirani tekst",
base64url: "base64url kodirani tekst",
json_string: "JSON tekst",
e164: "E.164 broj",
credit_card: "broj kreditne kartice",
currency_code: "kod valute",
iban: "IBAN",
jwt: "JWT",
template_literal: "unos",
};
const TypeDictionary = {
nan: "NaN",
string: "tekst",
number: "broj",
boolean: "boolean",
array: "niz",
object: "objekt",
set: "skup",
file: "datoteka",
date: "datum",
bigint: "bigint",
symbol: "simbol",
undefined: "undefined",
null: "null",
function: "funkcija",
map: "mapa",
};
return (issue) => {
switch (issue.code) {
case "invalid_type": {
const expected = TypeDictionary[issue.expected] ?? issue.expected;
const receivedType = util.parsedType(issue.input);
const received = TypeDictionary[receivedType] ?? receivedType;
if (/^[A-Z]/.test(issue.expected)) {
return `Neispravan unos: očekuje se instanceof ${issue.expected}, a primljeno je ${received}`;
}
return `Neispravan unos: očekuje se ${expected}, a primljeno je ${received}`;
}
case "invalid_value":
if (issue.values.length === 1)
return `Neispravna vrijednost: očekivano ${util.stringifyPrimitive(issue.values[0])}`;
return `Neispravna opcija: očekivano jedno od ${util.joinValues(issue.values, "|")}`;
case "too_big": {
const adj = issue.inclusive ? "<=" : "<";
const sizing = getSizing(issue.origin);
const origin = TypeDictionary[issue.origin] ?? issue.origin;
if (sizing)
return `Preveliko: očekivano da ${origin ?? "vrijednost"} ima ${adj}${issue.maximum.toString()} ${sizing.unit ?? "elemenata"}`;
return `Preveliko: očekivano da ${origin ?? "vrijednost"} bude ${adj}${issue.maximum.toString()}`;
}
case "too_small": {
const adj = issue.inclusive ? ">=" : ">";
const sizing = getSizing(issue.origin);
const origin = TypeDictionary[issue.origin] ?? issue.origin;
if (sizing) {
return `Premalo: očekivano da ${origin} ima ${adj}${issue.minimum.toString()} ${sizing.unit}`;
}
return `Premalo: očekivano da ${origin} bude ${adj}${issue.minimum.toString()}`;
}
case "invalid_format": {
const _issue = issue;
if (_issue.format === "starts_with")
return `Neispravan tekst: mora započinjati s "${_issue.prefix}"`;
if (_issue.format === "ends_with")
return `Neispravan tekst: mora završavati s "${_issue.suffix}"`;
if (_issue.format === "includes")
return `Neispravan tekst: mora sadržavati "${_issue.includes}"`;
if (_issue.format === "regex")
return `Neispravan tekst: mora odgovarati uzorku ${_issue.pattern}`;
return `Neispravna ${FormatDictionary[_issue.format] ?? issue.format}`;
}
case "not_multiple_of":
return `Neispravan broj: mora biti višekratnik od ${issue.divisor}`;
case "unrecognized_keys":
return `Neprepoznat${issue.keys.length > 1 ? "i ključevi" : " ključ"}: ${util.joinValues(issue.keys, ", ")}`;
case "invalid_key":
return `Neispravan ključ u ${TypeDictionary[issue.origin] ?? issue.origin}`;
case "invalid_union":
return "Neispravan unos";
case "invalid_element":
return `Neispravna vrijednost u ${TypeDictionary[issue.origin] ?? issue.origin}`;
default:
return `Neispravan unos`;
}
};
};
function default_1() {
return {
localeError: error(),
};
}
module.exports = exports.default;
@@ -0,0 +1,107 @@
"use client";
const require_runtime = require("./_virtual/_rolldown/runtime.cjs");
const require_utils = require("./utils.cjs");
const require_useRouter = require("./useRouter.cjs");
let _tanstack_router_core = require("@tanstack/router-core");
let react = require("react");
react = require_runtime.__toESM(react);
let _tanstack_react_store = require("@tanstack/react-store");
//#region src/Transitioner.tsx
function Transitioner() {
const router = require_useRouter.useRouter();
const mountLoadForRouter = react.useRef({
router,
mounted: false
});
const [isTransitioning, setIsTransitioning] = react.useState(false);
const isLoading = (0, _tanstack_react_store.useStore)(router.stores.isLoading, (value) => value);
const hasPending = (0, _tanstack_react_store.useStore)(router.stores.hasPending, (value) => value);
const previousIsLoading = require_utils.usePrevious(isLoading);
const isAnyPending = isLoading || isTransitioning || hasPending;
const previousIsAnyPending = require_utils.usePrevious(isAnyPending);
const isPagePending = isLoading || hasPending;
const previousIsPagePending = require_utils.usePrevious(isPagePending);
router.startTransition = (fn) => {
setIsTransitioning(true);
react.startTransition(() => {
fn();
setIsTransitioning(false);
});
};
react.useEffect(() => {
const unsub = router.history.subscribe(router.load);
const nextLocation = router.buildLocation({
to: router.latestLocation.pathname,
search: true,
params: true,
hash: true,
state: true,
_includeValidateSearch: true
});
if ((0, _tanstack_router_core.trimPathRight)(router.latestLocation.publicHref) !== (0, _tanstack_router_core.trimPathRight)(nextLocation.publicHref)) router.commitLocation({
...nextLocation,
replace: true
});
return () => {
unsub();
};
}, [router, router.history]);
require_utils.useLayoutEffect(() => {
if (typeof window !== "undefined" && router.ssr || mountLoadForRouter.current.router === router && mountLoadForRouter.current.mounted) return;
mountLoadForRouter.current = {
router,
mounted: true
};
const tryLoad = async () => {
try {
await router.load();
} catch (err) {
console.error(err);
}
};
tryLoad();
}, [router]);
require_utils.useLayoutEffect(() => {
if (previousIsLoading && !isLoading) router.emit({
type: "onLoad",
...(0, _tanstack_router_core.getLocationChangeInfo)(router.stores.location.get(), router.stores.resolvedLocation.get())
});
}, [
previousIsLoading,
router,
isLoading
]);
require_utils.useLayoutEffect(() => {
if (previousIsPagePending && !isPagePending) router.emit({
type: "onBeforeRouteMount",
...(0, _tanstack_router_core.getLocationChangeInfo)(router.stores.location.get(), router.stores.resolvedLocation.get())
});
}, [
isPagePending,
previousIsPagePending,
router
]);
require_utils.useLayoutEffect(() => {
if (previousIsAnyPending && !isAnyPending) {
const changeInfo = (0, _tanstack_router_core.getLocationChangeInfo)(router.stores.location.get(), router.stores.resolvedLocation.get());
router.emit({
type: "onResolved",
...changeInfo
});
(0, _tanstack_react_store.batch)(() => {
router.stores.status.set("idle");
router.stores.resolvedLocation.set(router.stores.location.get());
});
if (changeInfo.hrefChanged) (0, _tanstack_router_core.handleHashScroll)(router);
}
}, [
isAnyPending,
previousIsAnyPending,
router
]);
return null;
}
//#endregion
exports.Transitioner = Transitioner;
//# sourceMappingURL=Transitioner.cjs.map
@@ -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 './square-m.js';
//# sourceMappingURL=m-square.js.map
@@ -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 './paintbrush-vertical.js';
//# sourceMappingURL=paintbrush-2.js.map
@@ -0,0 +1,211 @@
# escalade [![CI](https://github.com/lukeed/escalade/workflows/CI/badge.svg)](https://github.com/lukeed/escalade/actions) [![licenses](https://licenses.dev/b/npm/escalade)](https://licenses.dev/npm/escalade) [![codecov](https://badgen.now.sh/codecov/c/github/lukeed/escalade)](https://codecov.io/gh/lukeed/escalade)
> A tiny (183B to 210B) and [fast](#benchmarks) utility to ascend parent directories
With [escalade](https://en.wikipedia.org/wiki/Escalade), you can scale parent directories until you've found what you're looking for.<br>Given an input file or directory, `escalade` will continue executing your callback function until either:
1) the callback returns a truthy value
2) `escalade` has reached the system root directory (eg, `/`)
> **Important:**<br>Please note that `escalade` only deals with direct ancestry – it will not dive into parents' sibling directories.
---
**Notice:** As of v3.1.0, `escalade` now includes [Deno support](http://deno.land/x/escalade)! Please see [Deno Usage](#deno) below.
---
## Install
```
$ npm install --save escalade
```
## Modes
There are two "versions" of `escalade` available:
#### "async"
> **Node.js:** >= 8.x<br>
> **Size (gzip):** 210 bytes<br>
> **Availability:** [CommonJS](https://unpkg.com/escalade/dist/index.js), [ES Module](https://unpkg.com/escalade/dist/index.mjs)
This is the primary/default mode. It makes use of `async`/`await` and [`util.promisify`](https://nodejs.org/api/util.html#util_util_promisify_original).
#### "sync"
> **Node.js:** >= 6.x<br>
> **Size (gzip):** 183 bytes<br>
> **Availability:** [CommonJS](https://unpkg.com/escalade/sync/index.js), [ES Module](https://unpkg.com/escalade/sync/index.mjs)
This is the opt-in mode, ideal for scenarios where `async` usage cannot be supported.
## Usage
***Example Structure***
```
/Users/lukeed
└── oss
├── license
└── escalade
├── package.json
└── test
└── fixtures
├── index.js
└── foobar
└── demo.js
```
***Example Usage***
```js
//~> demo.js
import { join } from 'path';
import escalade from 'escalade';
const input = join(__dirname, 'demo.js');
// or: const input = __dirname;
const pkg = await escalade(input, (dir, names) => {
console.log('~> dir:', dir);
console.log('~> names:', names);
console.log('---');
if (names.includes('package.json')) {
// will be resolved into absolute
return 'package.json';
}
});
//~> dir: /Users/lukeed/oss/escalade/test/fixtures/foobar
//~> names: ['demo.js']
//---
//~> dir: /Users/lukeed/oss/escalade/test/fixtures
//~> names: ['index.js', 'foobar']
//---
//~> dir: /Users/lukeed/oss/escalade/test
//~> names: ['fixtures']
//---
//~> dir: /Users/lukeed/oss/escalade
//~> names: ['package.json', 'test']
//---
console.log(pkg);
//=> /Users/lukeed/oss/escalade/package.json
// Now search for "missing123.txt"
// (Assume it doesn't exist anywhere!)
const missing = await escalade(input, (dir, names) => {
console.log('~> dir:', dir);
return names.includes('missing123.txt') && 'missing123.txt';
});
//~> dir: /Users/lukeed/oss/escalade/test/fixtures/foobar
//~> dir: /Users/lukeed/oss/escalade/test/fixtures
//~> dir: /Users/lukeed/oss/escalade/test
//~> dir: /Users/lukeed/oss/escalade
//~> dir: /Users/lukeed/oss
//~> dir: /Users/lukeed
//~> dir: /Users
//~> dir: /
console.log(missing);
//=> undefined
```
> **Note:** To run the above example with "sync" mode, import from `escalade/sync` and remove the `await` keyword.
## API
### escalade(input, callback)
Returns: `string|void` or `Promise<string|void>`
When your `callback` locates a file, `escalade` will resolve/return with an absolute path.<br>
If your `callback` was never satisfied, then `escalade` will resolve/return with nothing (undefined).
> **Important:**<br>The `sync` and `async` versions share the same API.<br>The **only** difference is that `sync` is not Promise-based.
#### input
Type: `string`
The path from which to start ascending.
This may be a file or a directory path.<br>However, when `input` is a file, `escalade` will begin with its parent directory.
> **Important:** Unless given an absolute path, `input` will be resolved from `process.cwd()` location.
#### callback
Type: `Function`
The callback to execute for each ancestry level. It always is given two arguments:
1) `dir` - an absolute path of the current parent directory
2) `names` - a list (`string[]`) of contents _relative to_ the `dir` parent
> **Note:** The `names` list can contain names of files _and_ directories.
When your callback returns a _falsey_ value, then `escalade` will continue with `dir`'s parent directory, re-invoking your callback with new argument values.
When your callback returns a string, then `escalade` stops iteration immediately.<br>
If the string is an absolute path, then it's left as is. Otherwise, the string is resolved into an absolute path _from_ the `dir` that housed the satisfying condition.
> **Important:** Your `callback` can be a `Promise/AsyncFunction` when using the "async" version of `escalade`.
## Benchmarks
> Running on Node.js v10.13.0
```
# Load Time
find-up 3.891ms
escalade 0.485ms
escalade/sync 0.309ms
# Levels: 6 (target = "foo.txt"):
find-up x 24,856 ops/sec ±6.46% (55 runs sampled)
escalade x 73,084 ops/sec ±4.23% (73 runs sampled)
find-up.sync x 3,663 ops/sec ±1.12% (83 runs sampled)
escalade/sync x 9,360 ops/sec ±0.62% (88 runs sampled)
# Levels: 12 (target = "package.json"):
find-up x 29,300 ops/sec ±10.68% (70 runs sampled)
escalade x 73,685 ops/sec ± 5.66% (66 runs sampled)
find-up.sync x 1,707 ops/sec ± 0.58% (91 runs sampled)
escalade/sync x 4,667 ops/sec ± 0.68% (94 runs sampled)
# Levels: 18 (target = "missing123.txt"):
find-up x 21,818 ops/sec ±17.37% (14 runs sampled)
escalade x 67,101 ops/sec ±21.60% (20 runs sampled)
find-up.sync x 1,037 ops/sec ± 2.86% (88 runs sampled)
escalade/sync x 1,248 ops/sec ± 0.50% (93 runs sampled)
```
## Deno
As of v3.1.0, `escalade` is available on the Deno registry.
Please note that the [API](#api) is identical and that there are still [two modes](#modes) from which to choose:
```ts
// Choose "async" mode
import escalade from 'https://deno.land/escalade/async.ts';
// Choose "sync" mode
import escalade from 'https://deno.land/escalade/sync.ts';
```
> **Important:** The `allow-read` permission is required!
## Related
- [premove](https://github.com/lukeed/premove) - A tiny (247B) utility to remove items recursively
- [totalist](https://github.com/lukeed/totalist) - A tiny (195B to 224B) utility to recursively list all (total) files in a directory
- [mk-dirs](https://github.com/lukeed/mk-dirs) - A tiny (420B) utility to make a directory and its parents, recursively
## License
MIT © [Luke Edwards](https://lukeed.com)
@@ -0,0 +1,17 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",
"description": "Meta-schema for $data reference (JSON Schema extension proposal)",
"type": "object",
"required": [ "$data" ],
"properties": {
"$data": {
"type": "string",
"anyOf": [
{ "format": "relative-json-pointer" },
{ "format": "json-pointer" }
]
}
},
"additionalProperties": false
}
@@ -0,0 +1,7 @@
"use strict";var Be=Object.defineProperty;var r=(e,t)=>Be(e,"name",{value:t,configurable:!0});var d=require("node:path"),ce=require("node:fs"),xe=require("node:module"),Ie=require("resolve-pkg-maps"),$e=require("fs"),Ue=require("os"),Re=require("path");function h(e){return e.startsWith("\\\\?\\")?e:e.replace(/\\/g,"/")}r(h,"slash");const K=r(e=>{const t=ce[e];return(s,...n)=>{const i=`${e}:${n.join(":")}`;let l=s==null?void 0:s.get(i);return l===void 0&&(l=Reflect.apply(t,ce,n),s==null||s.set(i,l)),l}},"cacheFs"),B=K("existsSync"),Se=K("readFileSync"),q=K("statSync"),O=r((e,t,s)=>{for(;;){const n=d.posix.join(e,t);if(B(s,n))return n;const i=d.dirname(e);if(i===e)return;e=i}},"findUp"),C=/^\.{1,2}(\/.*)?$/,Q=r(e=>{const t=h(e);return C.test(t)?t:`./${t}`},"normalizeRelativePath");function Ne(e,t=!1){const s=e.length;let n=0,i="",l=0,o=16,f=0,u=0,g=0,m=0,w=0;function _(c,j){let y=0,T=0;for(;y<c;){let k=e.charCodeAt(n);if(k>=48&&k<=57)T=T*16+k-48;else if(k>=65&&k<=70)T=T*16+k-65+10;else if(k>=97&&k<=102)T=T*16+k-97+10;else break;n++,y++}return y<c&&(T=-1),T}r(_,"scanHexDigits");function b(c){n=c,i="",l=0,o=16,w=0}r(b,"setPosition");function p(){let c=n;if(e.charCodeAt(n)===48)n++;else for(n++;n<e.length&&R(e.charCodeAt(n));)n++;if(n<e.length&&e.charCodeAt(n)===46)if(n++,n<e.length&&R(e.charCodeAt(n)))for(n++;n<e.length&&R(e.charCodeAt(n));)n++;else return w=3,e.substring(c,n);let j=n;if(n<e.length&&(e.charCodeAt(n)===69||e.charCodeAt(n)===101))if(n++,(n<e.length&&e.charCodeAt(n)===43||e.charCodeAt(n)===45)&&n++,n<e.length&&R(e.charCodeAt(n))){for(n++;n<e.length&&R(e.charCodeAt(n));)n++;j=n}else w=3;return e.substring(c,j)}r(p,"scanNumber");function L(){let c="",j=n;for(;;){if(n>=s){c+=e.substring(j,n),w=2;break}const y=e.charCodeAt(n);if(y===34){c+=e.substring(j,n),n++;break}if(y===92){if(c+=e.substring(j,n),n++,n>=s){w=2;break}switch(e.charCodeAt(n++)){case 34:c+='"';break;case 92:c+="\\";break;case 47:c+="/";break;case 98:c+="\b";break;case 102:c+="\f";break;case 110:c+=`
`;break;case 114:c+="\r";break;case 116:c+=" ";break;case 117:const k=_(4);k>=0?c+=String.fromCharCode(k):w=4;break;default:w=5}j=n;continue}if(y>=0&&y<=31)if(M(y)){c+=e.substring(j,n),w=2;break}else w=6;n++}return c}r(L,"scanString");function A(){if(i="",w=0,l=n,u=f,m=g,n>=s)return l=s,o=17;let c=e.charCodeAt(n);if(ee(c)){do n++,i+=String.fromCharCode(c),c=e.charCodeAt(n);while(ee(c));return o=15}if(M(c))return n++,i+=String.fromCharCode(c),c===13&&e.charCodeAt(n)===10&&(n++,i+=`
`),f++,g=n,o=14;switch(c){case 123:return n++,o=1;case 125:return n++,o=2;case 91:return n++,o=3;case 93:return n++,o=4;case 58:return n++,o=6;case 44:return n++,o=5;case 34:return n++,i=L(),o=10;case 47:const j=n-1;if(e.charCodeAt(n+1)===47){for(n+=2;n<s&&!M(e.charCodeAt(n));)n++;return i=e.substring(j,n),o=12}if(e.charCodeAt(n+1)===42){n+=2;const y=s-1;let T=!1;for(;n<y;){const k=e.charCodeAt(n);if(k===42&&e.charCodeAt(n+1)===47){n+=2,T=!0;break}n++,M(k)&&(k===13&&e.charCodeAt(n)===10&&n++,f++,g=n)}return T||(n++,w=1),i=e.substring(j,n),o=13}return i+=String.fromCharCode(c),n++,o=16;case 45:if(i+=String.fromCharCode(c),n++,n===s||!R(e.charCodeAt(n)))return o=16;case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return i+=p(),o=11;default:for(;n<s&&D(c);)n++,c=e.charCodeAt(n);if(l!==n){switch(i=e.substring(l,n),i){case"true":return o=8;case"false":return o=9;case"null":return o=7}return o=16}return i+=String.fromCharCode(c),n++,o=16}}r(A,"scanNext");function D(c){if(ee(c)||M(c))return!1;switch(c){case 125:case 93:case 123:case 91:case 34:case 58:case 44:case 47:return!1}return!0}r(D,"isUnknownContentCharacter");function x(){let c;do c=A();while(c>=12&&c<=15);return c}return r(x,"scanNextNonTrivia"),{setPosition:b,getPosition:r(()=>n,"getPosition"),scan:t?x:A,getToken:r(()=>o,"getToken"),getTokenValue:r(()=>i,"getTokenValue"),getTokenOffset:r(()=>l,"getTokenOffset"),getTokenLength:r(()=>n-l,"getTokenLength"),getTokenStartLine:r(()=>u,"getTokenStartLine"),getTokenStartCharacter:r(()=>l-m,"getTokenStartCharacter"),getTokenError:r(()=>w,"getTokenError")}}r(Ne,"createScanner");function ee(e){return e===32||e===9}r(ee,"isWhiteSpace");function M(e){return e===10||e===13}r(M,"isLineBreak");function R(e){return e>=48&&e<=57}r(R,"isDigit");var ge;(function(e){e[e.lineFeed=10]="lineFeed",e[e.carriageReturn=13]="carriageReturn",e[e.space=32]="space",e[e._0=48]="_0",e[e._1=49]="_1",e[e._2=50]="_2",e[e._3=51]="_3",e[e._4=52]="_4",e[e._5=53]="_5",e[e._6=54]="_6",e[e._7=55]="_7",e[e._8=56]="_8",e[e._9=57]="_9",e[e.a=97]="a",e[e.b=98]="b",e[e.c=99]="c",e[e.d=100]="d",e[e.e=101]="e",e[e.f=102]="f",e[e.g=103]="g",e[e.h=104]="h",e[e.i=105]="i",e[e.j=106]="j",e[e.k=107]="k",e[e.l=108]="l",e[e.m=109]="m",e[e.n=110]="n",e[e.o=111]="o",e[e.p=112]="p",e[e.q=113]="q",e[e.r=114]="r",e[e.s=115]="s",e[e.t=116]="t",e[e.u=117]="u",e[e.v=118]="v",e[e.w=119]="w",e[e.x=120]="x",e[e.y=121]="y",e[e.z=122]="z",e[e.A=65]="A",e[e.B=66]="B",e[e.C=67]="C",e[e.D=68]="D",e[e.E=69]="E",e[e.F=70]="F",e[e.G=71]="G",e[e.H=72]="H",e[e.I=73]="I",e[e.J=74]="J",e[e.K=75]="K",e[e.L=76]="L",e[e.M=77]="M",e[e.N=78]="N",e[e.O=79]="O",e[e.P=80]="P",e[e.Q=81]="Q",e[e.R=82]="R",e[e.S=83]="S",e[e.T=84]="T",e[e.U=85]="U",e[e.V=86]="V",e[e.W=87]="W",e[e.X=88]="X",e[e.Y=89]="Y",e[e.Z=90]="Z",e[e.asterisk=42]="asterisk",e[e.backslash=92]="backslash",e[e.closeBrace=125]="closeBrace",e[e.closeBracket=93]="closeBracket",e[e.colon=58]="colon",e[e.comma=44]="comma",e[e.dot=46]="dot",e[e.doubleQuote=34]="doubleQuote",e[e.minus=45]="minus",e[e.openBrace=123]="openBrace",e[e.openBracket=91]="openBracket",e[e.plus=43]="plus",e[e.slash=47]="slash",e[e.formFeed=12]="formFeed",e[e.tab=9]="tab"})(ge||(ge={})),new Array(20).fill(0).map((e,t)=>" ".repeat(t));const S=200;new Array(S).fill(0).map((e,t)=>`
`+" ".repeat(t)),new Array(S).fill(0).map((e,t)=>"\r"+" ".repeat(t)),new Array(S).fill(0).map((e,t)=>`\r
`+" ".repeat(t)),new Array(S).fill(0).map((e,t)=>`
`+" ".repeat(t)),new Array(S).fill(0).map((e,t)=>"\r"+" ".repeat(t)),new Array(S).fill(0).map((e,t)=>`\r
`+" ".repeat(t));var H;(function(e){e.DEFAULT={allowTrailingComma:!1}})(H||(H={}));function Pe(e,t=[],s=H.DEFAULT){let n=null,i=[];const l=[];function o(u){Array.isArray(i)?i.push(u):n!==null&&(i[n]=u)}return r(o,"onValue"),We(e,{onObjectBegin:r(()=>{const u={};o(u),l.push(i),i=u,n=null},"onObjectBegin"),onObjectProperty:r(u=>{n=u},"onObjectProperty"),onObjectEnd:r(()=>{i=l.pop()},"onObjectEnd"),onArrayBegin:r(()=>{const u=[];o(u),l.push(i),i=u,n=null},"onArrayBegin"),onArrayEnd:r(()=>{i=l.pop()},"onArrayEnd"),onLiteralValue:o,onError:r((u,g,m)=>{t.push({error:u,offset:g,length:m})},"onError")},s),i[0]}r(Pe,"parse$1");function We(e,t,s=H.DEFAULT){const n=Ne(e,!1),i=[];let l=0;function o(v){return v?()=>l===0&&v(n.getTokenOffset(),n.getTokenLength(),n.getTokenStartLine(),n.getTokenStartCharacter()):()=>!0}r(o,"toNoArgVisit");function f(v){return v?F=>l===0&&v(F,n.getTokenOffset(),n.getTokenLength(),n.getTokenStartLine(),n.getTokenStartCharacter()):()=>!0}r(f,"toOneArgVisit");function u(v){return v?F=>l===0&&v(F,n.getTokenOffset(),n.getTokenLength(),n.getTokenStartLine(),n.getTokenStartCharacter(),()=>i.slice()):()=>!0}r(u,"toOneArgVisitWithPath");function g(v){return v?()=>{l>0?l++:v(n.getTokenOffset(),n.getTokenLength(),n.getTokenStartLine(),n.getTokenStartCharacter(),()=>i.slice())===!1&&(l=1)}:()=>!0}r(g,"toBeginVisit");function m(v){return v?()=>{l>0&&l--,l===0&&v(n.getTokenOffset(),n.getTokenLength(),n.getTokenStartLine(),n.getTokenStartCharacter())}:()=>!0}r(m,"toEndVisit");const w=g(t.onObjectBegin),_=u(t.onObjectProperty),b=m(t.onObjectEnd),p=g(t.onArrayBegin),L=m(t.onArrayEnd),A=u(t.onLiteralValue),D=f(t.onSeparator),x=o(t.onComment),c=f(t.onError),j=s&&s.disallowComments,y=s&&s.allowTrailingComma;function T(){for(;;){const v=n.scan();switch(n.getTokenError()){case 4:k(14);break;case 5:k(15);break;case 3:k(13);break;case 1:j||k(11);break;case 2:k(12);break;case 6:k(16);break}switch(v){case 12:case 13:j?k(10):x();break;case 16:k(1);break;case 15:case 14:break;default:return v}}}r(T,"scanNext");function k(v,F=[],W=[]){if(c(v),F.length+W.length>0){let $=n.getToken();for(;$!==17;){if(F.indexOf($)!==-1){T();break}else if(W.indexOf($)!==-1)break;$=T()}}}r(k,"handleError");function P(v){const F=n.getTokenValue();return v?A(F):(_(F),i.push(F)),T(),!0}r(P,"parseString");function J(){switch(n.getToken()){case 11:const v=n.getTokenValue();let F=Number(v);isNaN(F)&&(k(2),F=0),A(F);break;case 7:A(null);break;case 8:A(!0);break;case 9:A(!1);break;default:return!1}return T(),!0}r(J,"parseLiteral");function V(){return n.getToken()!==10?(k(3,[],[2,5]),!1):(P(!1),n.getToken()===6?(D(":"),T(),U()||k(4,[],[2,5])):k(5,[],[2,5]),i.pop(),!0)}r(V,"parseProperty");function z(){w(),T();let v=!1;for(;n.getToken()!==2&&n.getToken()!==17;){if(n.getToken()===5){if(v||k(4,[],[]),D(","),T(),n.getToken()===2&&y)break}else v&&k(6,[],[]);V()||k(4,[],[2,5]),v=!0}return b(),n.getToken()!==2?k(7,[2],[]):T(),!0}r(z,"parseObject");function G(){p(),T();let v=!0,F=!1;for(;n.getToken()!==4&&n.getToken()!==17;){if(n.getToken()===5){if(F||k(4,[],[]),D(","),T(),n.getToken()===4&&y)break}else F&&k(6,[],[]);v?(i.push(0),v=!1):i[i.length-1]++,U()||k(4,[],[4,5]),F=!0}return L(),v||i.pop(),n.getToken()!==4?k(8,[4],[]):T(),!0}r(G,"parseArray");function U(){switch(n.getToken()){case 3:return G();case 1:return z();case 10:return P(!0);default:return J()}}return r(U,"parseValue"),T(),n.getToken()===17?s.allowEmptyContent?!0:(k(4,[],[]),!1):U()?(n.getToken()!==17&&k(9,[],[]),!0):(k(4,[],[]),!1)}r(We,"visit");var ke;(function(e){e[e.None=0]="None",e[e.UnexpectedEndOfComment=1]="UnexpectedEndOfComment",e[e.UnexpectedEndOfString=2]="UnexpectedEndOfString",e[e.UnexpectedEndOfNumber=3]="UnexpectedEndOfNumber",e[e.InvalidUnicode=4]="InvalidUnicode",e[e.InvalidEscapeCharacter=5]="InvalidEscapeCharacter",e[e.InvalidCharacter=6]="InvalidCharacter"})(ke||(ke={}));var de;(function(e){e[e.OpenBraceToken=1]="OpenBraceToken",e[e.CloseBraceToken=2]="CloseBraceToken",e[e.OpenBracketToken=3]="OpenBracketToken",e[e.CloseBracketToken=4]="CloseBracketToken",e[e.CommaToken=5]="CommaToken",e[e.ColonToken=6]="ColonToken",e[e.NullKeyword=7]="NullKeyword",e[e.TrueKeyword=8]="TrueKeyword",e[e.FalseKeyword=9]="FalseKeyword",e[e.StringLiteral=10]="StringLiteral",e[e.NumericLiteral=11]="NumericLiteral",e[e.LineCommentTrivia=12]="LineCommentTrivia",e[e.BlockCommentTrivia=13]="BlockCommentTrivia",e[e.LineBreakTrivia=14]="LineBreakTrivia",e[e.Trivia=15]="Trivia",e[e.Unknown=16]="Unknown",e[e.EOF=17]="EOF"})(de||(de={}));const Me=Pe;var we;(function(e){e[e.InvalidSymbol=1]="InvalidSymbol",e[e.InvalidNumberFormat=2]="InvalidNumberFormat",e[e.PropertyNameExpected=3]="PropertyNameExpected",e[e.ValueExpected=4]="ValueExpected",e[e.ColonExpected=5]="ColonExpected",e[e.CommaExpected=6]="CommaExpected",e[e.CloseBraceExpected=7]="CloseBraceExpected",e[e.CloseBracketExpected=8]="CloseBracketExpected",e[e.EndOfFileExpected=9]="EndOfFileExpected",e[e.InvalidCommentToken=10]="InvalidCommentToken",Line truncated
@@ -0,0 +1,21 @@
MIT License
Copyright (c) 2026 Ari Perkkiö
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
@@ -0,0 +1,80 @@
import { ClassNameSlug, CssClassName, CssVariableType, OnInvalidSlug, rawCssString } from "../../helper/css/common.js";
import { PropsWithChildren } from "../types.js";
import { FC } from "../base.js";
//#region src/jsx/dom/css.d.ts
interface CreateCssJsxDomObjectsType {
(args: {
id: Readonly<string>;
}): readonly [{
toString(this: CssClassName): string;
}, FC<PropsWithChildren<void>>];
}
export declare const createCssJsxDomObjects: CreateCssJsxDomObjectsType;
interface CssType {
(strings: TemplateStringsArray, ...values: CssVariableType[]): string;
}
interface CxType {
(...args: (string | boolean | null | undefined)[]): string;
}
interface KeyframesType {
(strings: TemplateStringsArray, ...values: CssVariableType[]): CssClassName;
}
interface ViewTransitionType {
(strings: TemplateStringsArray, ...values: CssVariableType[]): string;
(content: string): string;
(): string;
}
interface DefaultContextType {
css: CssType;
cx: CxType;
keyframes: KeyframesType;
viewTransition: ViewTransitionType;
Style: FC<PropsWithChildren<void>>;
}
/**
* @experimental
* `createCssContext` is an experimental feature.
* The API might be changed.
*
* @param options.id - The ID for the style element
* @param options.classNameSlug - Optional function to customize generated CSS class names
* @param options.onInvalidSlug - Optional callback function called when an invalid slug is returned from ClassNameSlug
*/
export declare const createCssContext: ({ id, classNameSlug, onInvalidSlug }: {
id: Readonly<string>;
classNameSlug?: ClassNameSlug;
onInvalidSlug?: OnInvalidSlug;
}) => DefaultContextType;
/**
* @experimental
* `css` is an experimental feature.
* The API might be changed.
*/
export declare const css: CssType;
/**
* @experimental
* `cx` is an experimental feature.
* The API might be changed.
*/
export declare const cx: CxType;
/**
* @experimental
* `keyframes` is an experimental feature.
* The API might be changed.
*/
export declare const keyframes: KeyframesType;
/**
* @experimental
* `viewTransition` is an experimental feature.
* The API might be changed.
*/
export declare const viewTransition: ViewTransitionType;
/**
* @experimental
* `Style` is an experimental feature.
* The API might be changed.
*/
export declare const Style: FC<PropsWithChildren<void>>;
//#endregion
export { rawCssString };
export {};
@@ -0,0 +1,111 @@
// @ts-ignore TS6133
import { expect, test } from "vitest";
import * as z from "zod/v3";
import { util } from "../helpers/util.js";
const fish = z.object({
name: z.string(),
age: z.number(),
nested: z.object({}),
});
test("pick type inference", () => {
const nameonlyFish = fish.pick({ name: true });
type nameonlyFish = z.infer<typeof nameonlyFish>;
util.assertEqual<nameonlyFish, { name: string }>(true);
});
test("pick parse - success", () => {
const nameonlyFish = fish.pick({ name: true });
nameonlyFish.parse({ name: "bob" });
// @ts-expect-error checking runtime picks `name` only.
const anotherNameonlyFish = fish.pick({ name: true, age: false });
anotherNameonlyFish.parse({ name: "bob" });
});
test("pick parse - fail", () => {
fish.pick({ name: true }).parse({ name: "12" } as any);
fish.pick({ name: true }).parse({ name: "bob", age: 12 } as any);
fish.pick({ age: true }).parse({ age: 12 } as any);
const nameonlyFish = fish.pick({ name: true }).strict();
const bad1 = () => nameonlyFish.parse({ name: 12 } as any);
const bad2 = () => nameonlyFish.parse({ name: "bob", age: 12 } as any);
const bad3 = () => nameonlyFish.parse({ age: 12 } as any);
// @ts-expect-error checking runtime picks `name` only.
const anotherNameonlyFish = fish.pick({ name: true, age: false }).strict();
const bad4 = () => anotherNameonlyFish.parse({ name: "bob", age: 12 } as any);
expect(bad1).toThrow();
expect(bad2).toThrow();
expect(bad3).toThrow();
expect(bad4).toThrow();
});
test("omit type inference", () => {
const nonameFish = fish.omit({ name: true });
type nonameFish = z.infer<typeof nonameFish>;
util.assertEqual<nonameFish, { age: number; nested: {} }>(true);
});
test("omit parse - success", () => {
const nonameFish = fish.omit({ name: true });
nonameFish.parse({ age: 12, nested: {} });
// @ts-expect-error checking runtime omits `name` only.
const anotherNonameFish = fish.omit({ name: true, age: false });
anotherNonameFish.parse({ age: 12, nested: {} });
});
test("omit parse - fail", () => {
const nonameFish = fish.omit({ name: true });
const bad1 = () => nonameFish.parse({ name: 12 } as any);
const bad2 = () => nonameFish.parse({ age: 12 } as any);
const bad3 = () => nonameFish.parse({} as any);
// @ts-expect-error checking runtime omits `name` only.
const anotherNonameFish = fish.omit({ name: true, age: false });
const bad4 = () => anotherNonameFish.parse({ nested: {} } as any);
expect(bad1).toThrow();
expect(bad2).toThrow();
expect(bad3).toThrow();
expect(bad4).toThrow();
});
test("nonstrict inference", () => {
const laxfish = fish.pick({ name: true }).catchall(z.any());
type laxfish = z.infer<typeof laxfish>;
util.assertEqual<laxfish, { name: string } & { [k: string]: any }>(true);
});
test("nonstrict parsing - pass", () => {
const laxfish = fish.passthrough().pick({ name: true });
laxfish.parse({ name: "asdf", whatever: "asdf" });
laxfish.parse({ name: "asdf", age: 12, nested: {} });
});
test("nonstrict parsing - fail", () => {
const laxfish = fish.passthrough().pick({ name: true });
const bad = () => laxfish.parse({ whatever: "asdf" } as any);
expect(bad).toThrow();
});
test("pick/omit/required/partial - do not allow unknown keys", () => {
const schema = z.object({
name: z.string(),
age: z.number(),
});
// @ts-expect-error
schema.pick({ $unknown: true });
// @ts-expect-error
schema.omit({ $unknown: true });
// @ts-expect-error
schema.required({ $unknown: true });
// @ts-expect-error
schema.partial({ $unknown: true });
});
@@ -0,0 +1 @@
export declare function ScrollRestoration(): import("react/jsx-runtime").JSX.Element | null;
@@ -0,0 +1,2 @@
export {};
//# sourceMappingURL=jsonResponseStreamableHttp.d.ts.map
@@ -0,0 +1,8 @@
//#region src/scroll-restoration-script/client.ts
function getScrollRestorationScriptForRouter(_router) {
return null;
}
//#endregion
export { getScrollRestorationScriptForRouter };
//# sourceMappingURL=client.js.map
@@ -0,0 +1,4 @@
var x=String;
var create=function() {return {isColorSupported:false,reset:x,bold:x,dim:x,italic:x,underline:x,inverse:x,hidden:x,strikethrough:x,black:x,red:x,green:x,yellow:x,blue:x,magenta:x,cyan:x,white:x,gray:x,bgBlack:x,bgRed:x,bgGreen:x,bgYellow:x,bgBlue:x,bgMagenta:x,bgCyan:x,bgWhite:x,blackBright:x,redBright:x,greenBright:x,yellowBright:x,blueBright:x,magentaBright:x,cyanBright:x,whiteBright:x,bgBlackBright:x,bgRedBright:x,bgGreenBright:x,bgYellowBright:x,bgBlueBright:x,bgMagentaBright:x,bgCyanBright:x,bgWhiteBright:x}};
module.exports=create();
module.exports.createColors = create;
@@ -0,0 +1,25 @@
import type { TSESTree } from '@typescript-eslint/utils';
import type { InferMessageIdsTypeFromRule, InferOptionsTypeFromRule } from '../util';
declare const baseRule: import("@typescript-eslint/utils/ts-eslint").RuleModule<"exceed", ({
countVoidThis?: boolean;
max: number;
} | {
countVoidThis?: boolean;
maximum: number;
})[], unknown, {
ArrowFunctionExpression(node: TSESTree.ArrowFunctionExpression): void;
FunctionDeclaration(node: TSESTree.FunctionDeclaration | TSESTree.TSDeclareFunction | TSESTree.TSFunctionType): void;
FunctionExpression(node: TSESTree.FunctionExpression): void;
}>;
export type Options = InferOptionsTypeFromRule<typeof baseRule>;
export type MessageIds = InferMessageIdsTypeFromRule<typeof baseRule>;
declare const _default: import("@typescript-eslint/utils/ts-eslint").RuleModule<"exceed", ({
countVoidThis?: boolean;
max: number;
} | {
countVoidThis?: boolean;
maximum: number;
})[], import("../../rules").ESLintPluginDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener> & {
name: string;
};
export default _default;
@@ -0,0 +1 @@
{"version":3,"file":"squirrel.js","sources":["../../../src/icons/squirrel.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name Squirrel\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMTUuMjM2IDIyYTMgMyAwIDAgMC0yLjItNSIgLz4KICA8cGF0aCBkPSJNMTYgMjBhMyAzIDAgMCAxIDMtM2gxYTIgMiAwIDAgMCAyLTJ2LTJhNCA0IDAgMCAwLTQtNFY0IiAvPgogIDxwYXRoIGQ9Ik0xOCAxM2guMDEiIC8+CiAgPHBhdGggZD0iTTE4IDZhNCA0IDAgMCAwLTQgNCA3IDcgMCAwIDAtNyA3YzAtNSA0LTUgNC0xMC41YTQuNSA0LjUgMCAxIDAtOSAwIDIuNSAyLjUgMCAwIDAgNSAwQzcgMTAgMyAxMSAzIDE3YzAgMi44IDIuMiA1IDUgNWgxMCIgLz4KPC9zdmc+Cg==) - https://lucide.dev/icons/squirrel\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 Squirrel = createLucideIcon('Squirrel', [\n ['path', { d: 'M15.236 22a3 3 0 0 0-2.2-5', key: '21bitc' }],\n ['path', { d: 'M16 20a3 3 0 0 1 3-3h1a2 2 0 0 0 2-2v-2a4 4 0 0 0-4-4V4', key: 'oh0fg0' }],\n ['path', { d: 'M18 13h.01', key: '9veqaj' }],\n [\n 'path',\n {\n d: 'M18 6a4 4 0 0 0-4 4 7 7 0 0 0-7 7c0-5 4-5 4-10.5a4.5 4.5 0 1 0-9 0 2.5 2.5 0 0 0 5 0C7 10 3 11 3 17c0 2.8 2.2 5 5 5h10',\n key: '980v8a',\n },\n ],\n]);\n\nexport default Squirrel;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAW,iBAAiB,UAAY,CAAA,CAAA,CAAA;AAAA,CAAA,CAC5C,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAA8B,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,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,CAC3D,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAA2D,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,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,CACxF,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAc,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAC3C,CAAA,CAAA;AAAA,CAAA,CAAA,CAAA,CACE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACA,CAAA,CAAA,CAAA,CAAA;AAAA,CACE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAG,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACH,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACP,CAAA,CAAA,CAAA,CAAA;AAAA,CACF,CAAA,CAAA;AACF,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1,3 @@
"use strict";var c=Object.defineProperty;var s=(e,r)=>c(e,"name",{value:r,configurable:!0});var l=require("node:repl"),u=require("./package-Dxt5kIHw.cjs"),q=require("./index-gckBtVBf.cjs");require("node:url"),require("esbuild"),require("node:crypto"),require("node:fs"),require("node:path"),require("node:os"),require("./temporary-directory-B83uKxJF.cjs"),console.log(`Welcome to tsx v${u.version} (Node.js ${process.version}).
Type ".help" for more information.`);const t=l.start(),{eval:p}=t,v=s(async function(e,r,o,i){const a=await q.transform(e,o,{loader:"ts",tsconfigRaw:{compilerOptions:{preserveValueImports:!0}},define:{require:"global.require"}}).catch(n=>(console.log(n.message),{code:`
`}));return p.call(this,a.code,r,o,i)},"preEval");t.eval=v;
@@ -0,0 +1 @@
{"version":3,"file":"simpleClientCredentials.js","sourceRoot":"","sources":["../../../../src/examples/client/simpleClientCredentials.ts"],"names":[],"mappings":";AAEA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAC/C,OAAO,EAAE,6BAA6B,EAAE,MAAM,gCAAgC,CAAC;AAC/E,OAAO,EAAE,yBAAyB,EAAE,qBAAqB,EAAE,MAAM,iCAAiC,CAAC;AAGnG,MAAM,kBAAkB,GAAG,OAAO,CAAC,GAAG,CAAC,cAAc,IAAI,2BAA2B,CAAC;AAErF,SAAS,cAAc;IACnB,MAAM,QAAQ,GAAG,OAAO,CAAC,GAAG,CAAC,aAAa,CAAC;IAC3C,IAAI,CAAC,QAAQ,EAAE,CAAC;QACZ,OAAO,CAAC,KAAK,CAAC,gDAAgD,CAAC,CAAC;QAChE,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IACpB,CAAC;IAED,kEAAkE;IAClE,MAAM,cAAc,GAAG,OAAO,CAAC,GAAG,CAAC,mBAAmB,CAAC;IACvD,IAAI,CAAC,cAAc,EAAE,CAAC;QAClB,OAAO,CAAC,KAAK,CAAC,sDAAsD,CAAC,CAAC;QACtE,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IACpB,CAAC;IAED,iEAAiE;IACjE,MAAM,aAAa,GAAG,OAAO,CAAC,GAAG,CAAC,0BAA0B,CAAC;IAC7D,IAAI,aAAa,EAAE,CAAC;QAChB,MAAM,SAAS,GAAG,OAAO,CAAC,GAAG,CAAC,oBAAoB,IAAI,OAAO,CAAC;QAC9D,OAAO,CAAC,GAAG,CAAC,sCAAsC,CAAC,CAAC;QACpD,OAAO,IAAI,qBAAqB,CAAC;YAC7B,QAAQ;YACR,UAAU,EAAE,aAAa;YACzB,SAAS;YACT,cAAc;SACjB,CAAC,CAAC;IACP,CAAC;IAED,oDAAoD;IACpD,MAAM,YAAY,GAAG,OAAO,CAAC,GAAG,CAAC,iBAAiB,CAAC;IACnD,IAAI,CAAC,YAAY,EAAE,CAAC;QAChB,OAAO,CAAC,KAAK,CAAC,kFAAkF,CAAC,CAAC;QAClG,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IACpB,CAAC;IAED,OAAO,CAAC,GAAG,CAAC,0CAA0C,CAAC,CAAC;IACxD,OAAO,IAAI,yBAAyB,CAAC;QACjC,QAAQ;QACR,YAAY;QACZ,cAAc;KACjB,CAAC,CAAC;AACP,CAAC;AAED,KAAK,UAAU,IAAI;IACf,MAAM,QAAQ,GAAG,cAAc,EAAE,CAAC;IAElC,MAAM,MAAM,GAAG,IAAI,MAAM,CAAC,EAAE,IAAI,EAAE,4BAA4B,EAAE,OAAO,EAAE,OAAO,EAAE,EAAE,EAAE,YAAY,EAAE,EAAE,EAAE,CAAC,CAAC;IAE1G,MAAM,SAAS,GAAG,IAAI,6BAA6B,CAAC,IAAI,GAAG,CAAC,kBAAkB,CAAC,EAAE;QAC7E,YAAY,EAAE,QAAQ;KACzB,CAAC,CAAC;IAEH,MAAM,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;IAChC,OAAO,CAAC,GAAG,CAAC,yBAAyB,CAAC,CAAC;IAEvC,MAAM,KAAK,GAAG,MAAM,MAAM,CAAC,SAAS,EAAE,CAAC;IACvC,OAAO,CAAC,GAAG,CAAC,kBAAkB,EAAE,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,QAAQ,CAAC,CAAC;IAErF,MAAM,SAAS,CAAC,KAAK,EAAE,CAAC;AAC5B,CAAC;AAED,IAAI,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,EAAE;IACf,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IACnB,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AACpB,CAAC,CAAC,CAAC"}
@@ -0,0 +1,32 @@
'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
const core = require('./core.cjs');
const basic = require('./shared/consola.DCGIlDNP.cjs');
require('node:util');
require('node:path');
function createConsola(options = {}) {
let level = core.LogLevels.info;
if (process.env.CONSOLA_LEVEL) {
level = Number.parseInt(process.env.CONSOLA_LEVEL) ?? level;
}
const consola2 = core.createConsola({
level,
defaults: { level },
stdout: process.stdout,
stderr: process.stderr,
reporters: options.reporters || [new basic.BasicReporter()],
...options
});
return consola2;
}
const consola = createConsola();
exports.Consola = core.Consola;
exports.LogLevels = core.LogLevels;
exports.LogTypes = core.LogTypes;
exports.consola = consola;
exports.createConsola = createConsola;
exports.default = consola;
@@ -0,0 +1,49 @@
declare type FilePath = string;
declare type GlobPattern = string;
declare namespace ParcelWatcher {
export type BackendType =
| 'fs-events'
| 'watchman'
| 'inotify'
| 'windows'
| 'brute-force';
export type EventType = 'create' | 'update' | 'delete';
export interface Options {
ignore?: (FilePath|GlobPattern)[];
backend?: BackendType;
}
export type SubscribeCallback = (
err: Error | null,
events: Event[]
) => unknown;
export interface AsyncSubscription {
unsubscribe(): Promise<void>;
}
export interface Event {
path: FilePath;
type: EventType;
}
export function getEventsSince(
dir: FilePath,
snapshot: FilePath,
opts?: Options
): Promise<Event[]>;
export function subscribe(
dir: FilePath,
fn: SubscribeCallback,
opts?: Options
): Promise<AsyncSubscription>;
export function unsubscribe(
dir: FilePath,
fn: SubscribeCallback,
opts?: Options
): Promise<void>;
export function writeSnapshot(
dir: FilePath,
snapshot: FilePath,
opts?: Options
): Promise<FilePath>;
}
export = ParcelWatcher;
@@ -0,0 +1,11 @@
import { isCSSVar } from './is-css-var.mjs';
function getComputedStyle(element, name) {
const computedStyle = window.getComputedStyle(element);
return isCSSVar(name)
? computedStyle.getPropertyValue(name)
: computedStyle[name];
}
export { getComputedStyle };
//# sourceMappingURL=style-computed.mjs.map
@@ -0,0 +1,457 @@
flf2a$ 4 4 17 -1 48 0 0 0
Author : LG Beard
Date : 2003/9/10 10:37:00
Version: 1.3
-------------------------------------------------
-------------------------------------------------
This font has been created using JavE's FIGlet font export assistant.
Have a look at: http://www.jave.de
Permission is hereby given to modify this font, as long as the
modifier's name is placed on a comment line.
Ran upon a few sig`s created by sanne jabs awhile ago. Five sig`s
all that were found. One articile stating that there was a hieroglyphic
font, never found it. From those an some reading about how to use an
write with hieroglyphs this file came about. Hopefully these are read-
able, tried to keep them as close as possible to the real thing. If
they are not then i blew it real bad.
Thanks sanne for the spark.
Some upper case keys used for some alt symbols
C = ch
G = fancy jar
H = alt h
M = alt m
P = fancy door
T = alt T
X = sh
Y = alt y
The symbol below stands for writing or scribe to my understanding
2 ink spots on pallette, a jar for ink or water, his writing implement,
and a string or rope that is slung over the shoulder to carry the
tools of the trade.
,-~.
| \ \|/
_|_ |=-|)
| o |(_) |
|_o_| |
This file is simply just for fun, write your name, wrap in a cartouche.
_____ .
(_____)| a tiny one
'
but most of all, enjoy.
$ #
$ #
$ #
$ ##
!#
#
#
##
"#
#
#
##
##
#
#
##
$#
#
#
##
%#
#
#
##
&#
#
#
##
'#
#
#
##
(#
#
#
##
)#
#
#
##
*#
#
#
##
+#
#
#
##
,#
#
#
##
-#
#
#
##
.#
#
#
##
/#
#
#
##
0#
#
#
##
1#
#
#
##
2#
#
#
##
3#
#
#
##
4#
#
#
##
5#
#
#
##
6#
#
#
##
7#
#
#
##
8#
#
#
##
9#
#
#
##
:#
#
#
##
;#
#
#
##
<#
#
#
##
=#
#
#
##
>#
#
#
##
?#
#
#
##
@#
#
#
##
,-~~\ #
( \ #
|\. \ #
_]_]`\\ ##
|| #
|| #
|| #
.-'_| ##
.-===-., #
`.___.' #
_______ #
|_______| ##
_ #
__,(: `,_,. #
(.-_- __ | #
`----' -' ##
#
|| #
.... || #
`=.`''===.' ##
#
\/ #
`-'_ #
`---. ##
______ #
'-.--.-' #
/::::\ #
)_/\_( ##
() #
() #
() #
/\ ##
;. #
; | #
`.| #
| ##
_ #
`-) #
_/,' #
(___) ##
#
#
.-===-., #
`.___.' ##
,-. ,-.#
<,- \_____/ `#
/ ___. \ #
,_(__/ ,_(__\ ##
#
#
_____ #
/_____ ##
#
#
#
^^^^^^^ ##
#
.-. #
_|_ \ #
(_) ##
|||[]||| #
|_|[]|_| #
|=|[]|=| #
|||[]||| ##
#
#
.'| #
/__| ##
#
#
.---. #
'.___.' ##
,-. #
| | #
| ' #
| ##
#
#
()----. #
()----' ##
<~)_ #
( v~\ #
\_/' #
/\ ##
<~)_ #
( v~\ #
\_/' #
/\ ##
.''. #
'.' ) #
/ #
.' ##
#
... #
( X-==== #
''' ##
;. ;. #
; | ; | #
`.| `.| #
| | ##
#
#
#
---<|>--- ##
[#
#
#
##
\#
#
#
##
]#
#
#
##
^#
#
#
##
_#
#
#
##
`#
#
#
##
,-~~\ #
( \ #
|\. \ #
_]_]`\\ ##
|| #
|| #
|| #
.-'_| ##
#
#
.-===-., #
`.___.' ##
_ #
__,(: `,_,. #
(.-_- __ | #
`----' -' ##
#
|| #
.... || #
`=.`''===.' ##
#
\/ #
`-'_ #
`---. ##
#
____ #
/ \ #
/_/\_\ ##
#
___ #
| | #
| |_| ##
;. #
; | #
`.| #
| ##
_ #
`-) #
_/,' #
(___) ##
#
#
.-===-., #
`.___.' ##
,-. ,-.#
<,- \_____/ `#
/ ___. \ #
,_(__/ ,_(__\ ##
,-==. #
( (\ #
|\.\\ #
_]_]`\\ ##
#
#
#
^^^^^^^ ##
#
.-. #
_|_ \ #
(_) ##
#
#
__ #
|__| ##
#
#
.'| #
/__| ##
#
#
.---. #
'.___.' ##
,-. #
| | #
| ' #
| ##
#
#
.-==-. #
/______\ ##
<~)_ #
( v~\ #
\_/' #
/\ ##
<~)_ #
( v~\ #
\_/' #
/\ ##
.''. #
'.' ) #
/ #
.' ##
.-===-., #
`.___.' #
#
---<|>--- ##
\\ \\ #
\\ \\ #
\\ \\ #
\\ \\ ##
#
#
#
---<|>--- ##
{#
#
#
##
|#
#
#
##
}#
#
#
##
~#
#
#
##
,-~~\ #
( \ #
|\. \ #
_]_]`\\ ##
#
.-. #
_|_ \ #
(_) ##
<~)_ #
( v~\ #
\_/' #
/\ ##
,-~~\ #
( \ #
|\. \ #
_]_]`\\ ##
#
.-. #
_|_ \ #
(_) ##
<~)_ #
( v~\ #
\_/' #
/\ ##
ß#
#
#
##
@@ -0,0 +1 @@
module.exports={A:{A:{"2":"_E"},B:{"1":"_3H","2":"_I","66":"_wH"},C:{"1":"_gI _uD","2":"_LS _L"},D:{"1":"_2H","2":"_7 _CL","66":"XC _wH"},E:{"2":"_R"},F:{"1":"_aJ","2":"_4B _vD _O","66":"_IJ _DG"},G:{"2":"_M"},H:{"2":"1D"},I:{"2":"_P"},J:{"2":"_B"},K:{"2":"_N"},L:{"129":"I"},M:{"2":"YC"},N:{"2":"_A"},O:{"2":"bC"},P:{"2":"_F"},Q:{"2":"JE"},R:{"2":"KE"},S:{"2":"_C"}},B:7,C:"Web Serial API",D:true};
@@ -0,0 +1 @@
{"version":3,"file":"circle-chevron-down.js","sources":["../../../src/icons/circle-chevron-down.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name CircleChevronDown\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8Y2lyY2xlIGN4PSIxMiIgY3k9IjEyIiByPSIxMCIgLz4KICA8cGF0aCBkPSJtMTYgMTAtNCA0LTQtNCIgLz4KPC9zdmc+Cg==) - https://lucide.dev/icons/circle-chevron-down\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst CircleChevronDown = createLucideIcon('CircleChevronDown', [\n ['circle', { cx: '12', cy: '12', r: '10', key: '1mglay' }],\n ['path', { d: 'm16 10-4 4-4-4', key: '894hmk' }],\n]);\n\nexport default CircleChevronDown;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAoB,iBAAiB,mBAAqB,CAAA,CAAA,CAAA;AAAA,CAC9D,CAAA,CAAC,QAAU,CAAA,CAAA,CAAA,CAAE,EAAI,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAM,CAAI,CAAA,CAAA,CAAA,IAAA,CAAM,CAAA,CAAG,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAM,GAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAU,CAAA,CAAA;AAAA,CAAA,CACzD,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAkB,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AACjD,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1,5 @@
import type { TSESLint } from '@typescript-eslint/utils';
declare const _default: TSESLint.RuleModule<"preferConstAssertion" | "variableConstAssertion" | "variableSuggest", [], import("../../rules").ESLintPluginDocs, TSESLint.RuleListener> & {
name: string;
};
export default _default;
@@ -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 MailCheck = createLucideIcon("MailCheck", [
["path", { d: "M22 13V6a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2v12c0 1.1.9 2 2 2h8", key: "12jkf8" }],
["path", { d: "m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7", key: "1ocrg3" }],
["path", { d: "m16 19 2 2 4-4", key: "1b14m6" }]
]);
export { MailCheck as default };
//# sourceMappingURL=mail-check.js.map
@@ -0,0 +1,87 @@
{
"name": "@vitejs/plugin-react",
"version": "6.0.1",
"description": "The default Vite plugin for React projects",
"keywords": [
"fast refresh",
"react",
"react-refresh",
"vite",
"vite-plugin"
],
"homepage": "https://github.com/vitejs/vite-plugin-react/tree/main/packages/plugin-react#readme",
"bugs": {
"url": "https://github.com/vitejs/vite-plugin-react/issues"
},
"license": "MIT",
"author": "Evan You",
"contributors": [
"Alec Larson",
"Arnaud Barré"
],
"repository": {
"type": "git",
"url": "git+https://github.com/vitejs/vite-plugin-react.git",
"directory": "packages/plugin-react"
},
"files": [
"dist",
"types"
],
"type": "module",
"imports": {
"#optionalTypes": "./types/optionalTypes.d.ts"
},
"exports": {
".": "./dist/index.js",
"./preamble": "./types/preamble.d.ts"
},
"scripts": {
"dev": "tsdown --watch ./src --watch ../common",
"build": "tsdown",
"prepublishOnly": "npm run build",
"test-unit": "vitest run"
},
"dependencies": {
"@rolldown/pluginutils": "1.0.0-rc.7"
},
"devDependencies": {
"@babel/core": "8.0.0-rc.2",
"@rolldown/plugin-babel": "^0.2.0",
"@vitejs/react-common": "workspace:*",
"babel-plugin-react-compiler": "^1.0.0",
"react": "^19.2.4",
"react-dom": "^19.2.4",
"rolldown": "1.0.0-rc.7",
"tsdown": "^0.21.0",
"vite": "^8.0.0-beta.16"
},
"peerDependencies": {
"@rolldown/plugin-babel": "^0.1.7 || ^0.2.0",
"babel-plugin-react-compiler": "^1.0.0",
"vite": "^8.0.0"
},
"peerDependenciesMeta": {
"@rolldown/plugin-babel": {
"optional": true
},
"babel-plugin-react-compiler": {
"optional": true
}
},
"engines": {
"node": "^20.19.0 || >=22.12.0"
},
"compatiblePackages": {
"schemaVersion": 1,
"rolldown": {
"type": "compatible",
"versions": "^1.0.0-beta.44",
"note": "You can use Rolldown's built-in feature directly."
},
"rollup": {
"type": "incompatible",
"reason": "Uses Rolldown-specific APIs or Vite-specific APIs"
}
}
}
@@ -0,0 +1,5 @@
import type { IndividualAndMetaSelectorsString, MetaSelectorsString, Selectors, SelectorsString } from './enums';
import { MetaSelectors } from './enums';
export declare function selectorTypeToMessageString(selectorType: SelectorsString): string;
export declare function isMetaSelector(selector: IndividualAndMetaSelectorsString | MetaSelectors | Selectors): selector is MetaSelectorsString;
export declare function isMethodOrPropertySelector(selector: IndividualAndMetaSelectorsString | MetaSelectors | Selectors): boolean;
@@ -0,0 +1,359 @@
"""Handwritten parser of dependency specifiers.
The docstring for each __parse_* function contains ENBF-inspired grammar representing
the implementation.
"""
import ast
from typing import Any, List, NamedTuple, Optional, Tuple, Union
from ._tokenizer import DEFAULT_RULES, Tokenizer
class Node:
def __init__(self, value: str) -> None:
self.value = value
def __str__(self) -> str:
return self.value
def __repr__(self) -> str:
return f"<{self.__class__.__name__}('{self}')>"
def serialize(self) -> str:
raise NotImplementedError
class Variable(Node):
def serialize(self) -> str:
return str(self)
class Value(Node):
def serialize(self) -> str:
return f'"{self}"'
class Op(Node):
def serialize(self) -> str:
return str(self)
MarkerVar = Union[Variable, Value]
MarkerItem = Tuple[MarkerVar, Op, MarkerVar]
# MarkerAtom = Union[MarkerItem, List["MarkerAtom"]]
# MarkerList = List[Union["MarkerList", MarkerAtom, str]]
# mypy does not support recursive type definition
# https://github.com/python/mypy/issues/731
MarkerAtom = Any
MarkerList = List[Any]
class ParsedRequirement(NamedTuple):
name: str
url: str
extras: List[str]
specifier: str
marker: Optional[MarkerList]
# --------------------------------------------------------------------------------------
# Recursive descent parser for dependency specifier
# --------------------------------------------------------------------------------------
def parse_requirement(source: str) -> ParsedRequirement:
return _parse_requirement(Tokenizer(source, rules=DEFAULT_RULES))
def _parse_requirement(tokenizer: Tokenizer) -> ParsedRequirement:
"""
requirement = WS? IDENTIFIER WS? extras WS? requirement_details
"""
tokenizer.consume("WS")
name_token = tokenizer.expect(
"IDENTIFIER", expected="package name at the start of dependency specifier"
)
name = name_token.text
tokenizer.consume("WS")
extras = _parse_extras(tokenizer)
tokenizer.consume("WS")
url, specifier, marker = _parse_requirement_details(tokenizer)
tokenizer.expect("END", expected="end of dependency specifier")
return ParsedRequirement(name, url, extras, specifier, marker)
def _parse_requirement_details(
tokenizer: Tokenizer,
) -> Tuple[str, str, Optional[MarkerList]]:
"""
requirement_details = AT URL (WS requirement_marker?)?
| specifier WS? (requirement_marker)?
"""
specifier = ""
url = ""
marker = None
if tokenizer.check("AT"):
tokenizer.read()
tokenizer.consume("WS")
url_start = tokenizer.position
url = tokenizer.expect("URL", expected="URL after @").text
if tokenizer.check("END", peek=True):
return (url, specifier, marker)
tokenizer.expect("WS", expected="whitespace after URL")
# The input might end after whitespace.
if tokenizer.check("END", peek=True):
return (url, specifier, marker)
marker = _parse_requirement_marker(
tokenizer, span_start=url_start, after="URL and whitespace"
)
else:
specifier_start = tokenizer.position
specifier = _parse_specifier(tokenizer)
tokenizer.consume("WS")
if tokenizer.check("END", peek=True):
return (url, specifier, marker)
marker = _parse_requirement_marker(
tokenizer,
span_start=specifier_start,
after=(
"version specifier"
if specifier
else "name and no valid version specifier"
),
)
return (url, specifier, marker)
def _parse_requirement_marker(
tokenizer: Tokenizer, *, span_start: int, after: str
) -> MarkerList:
"""
requirement_marker = SEMICOLON marker WS?
"""
if not tokenizer.check("SEMICOLON"):
tokenizer.raise_syntax_error(
f"Expected end or semicolon (after {after})",
span_start=span_start,
)
tokenizer.read()
marker = _parse_marker(tokenizer)
tokenizer.consume("WS")
return marker
def _parse_extras(tokenizer: Tokenizer) -> List[str]:
"""
extras = (LEFT_BRACKET wsp* extras_list? wsp* RIGHT_BRACKET)?
"""
if not tokenizer.check("LEFT_BRACKET", peek=True):
return []
with tokenizer.enclosing_tokens(
"LEFT_BRACKET",
"RIGHT_BRACKET",
around="extras",
):
tokenizer.consume("WS")
extras = _parse_extras_list(tokenizer)
tokenizer.consume("WS")
return extras
def _parse_extras_list(tokenizer: Tokenizer) -> List[str]:
"""
extras_list = identifier (wsp* ',' wsp* identifier)*
"""
extras: List[str] = []
if not tokenizer.check("IDENTIFIER"):
return extras
extras.append(tokenizer.read().text)
while True:
tokenizer.consume("WS")
if tokenizer.check("IDENTIFIER", peek=True):
tokenizer.raise_syntax_error("Expected comma between extra names")
elif not tokenizer.check("COMMA"):
break
tokenizer.read()
tokenizer.consume("WS")
extra_token = tokenizer.expect("IDENTIFIER", expected="extra name after comma")
extras.append(extra_token.text)
return extras
def _parse_specifier(tokenizer: Tokenizer) -> str:
"""
specifier = LEFT_PARENTHESIS WS? version_many WS? RIGHT_PARENTHESIS
| WS? version_many WS?
"""
with tokenizer.enclosing_tokens(
"LEFT_PARENTHESIS",
"RIGHT_PARENTHESIS",
around="version specifier",
):
tokenizer.consume("WS")
parsed_specifiers = _parse_version_many(tokenizer)
tokenizer.consume("WS")
return parsed_specifiers
def _parse_version_many(tokenizer: Tokenizer) -> str:
"""
version_many = (SPECIFIER (WS? COMMA WS? SPECIFIER)*)?
"""
parsed_specifiers = ""
while tokenizer.check("SPECIFIER"):
span_start = tokenizer.position
parsed_specifiers += tokenizer.read().text
if tokenizer.check("VERSION_PREFIX_TRAIL", peek=True):
tokenizer.raise_syntax_error(
".* suffix can only be used with `==` or `!=` operators",
span_start=span_start,
span_end=tokenizer.position + 1,
)
if tokenizer.check("VERSION_LOCAL_LABEL_TRAIL", peek=True):
tokenizer.raise_syntax_error(
"Local version label can only be used with `==` or `!=` operators",
span_start=span_start,
span_end=tokenizer.position,
)
tokenizer.consume("WS")
if not tokenizer.check("COMMA"):
break
parsed_specifiers += tokenizer.read().text
tokenizer.consume("WS")
return parsed_specifiers
# --------------------------------------------------------------------------------------
# Recursive descent parser for marker expression
# --------------------------------------------------------------------------------------
def parse_marker(source: str) -> MarkerList:
return _parse_full_marker(Tokenizer(source, rules=DEFAULT_RULES))
def _parse_full_marker(tokenizer: Tokenizer) -> MarkerList:
retval = _parse_marker(tokenizer)
tokenizer.expect("END", expected="end of marker expression")
return retval
def _parse_marker(tokenizer: Tokenizer) -> MarkerList:
"""
marker = marker_atom (BOOLOP marker_atom)+
"""
expression = [_parse_marker_atom(tokenizer)]
while tokenizer.check("BOOLOP"):
token = tokenizer.read()
expr_right = _parse_marker_atom(tokenizer)
expression.extend((token.text, expr_right))
return expression
def _parse_marker_atom(tokenizer: Tokenizer) -> MarkerAtom:
"""
marker_atom = WS? LEFT_PARENTHESIS WS? marker WS? RIGHT_PARENTHESIS WS?
| WS? marker_item WS?
"""
tokenizer.consume("WS")
if tokenizer.check("LEFT_PARENTHESIS", peek=True):
with tokenizer.enclosing_tokens(
"LEFT_PARENTHESIS",
"RIGHT_PARENTHESIS",
around="marker expression",
):
tokenizer.consume("WS")
marker: MarkerAtom = _parse_marker(tokenizer)
tokenizer.consume("WS")
else:
marker = _parse_marker_item(tokenizer)
tokenizer.consume("WS")
return marker
def _parse_marker_item(tokenizer: Tokenizer) -> MarkerItem:
"""
marker_item = WS? marker_var WS? marker_op WS? marker_var WS?
"""
tokenizer.consume("WS")
marker_var_left = _parse_marker_var(tokenizer)
tokenizer.consume("WS")
marker_op = _parse_marker_op(tokenizer)
tokenizer.consume("WS")
marker_var_right = _parse_marker_var(tokenizer)
tokenizer.consume("WS")
return (marker_var_left, marker_op, marker_var_right)
def _parse_marker_var(tokenizer: Tokenizer) -> MarkerVar:
"""
marker_var = VARIABLE | QUOTED_STRING
"""
if tokenizer.check("VARIABLE"):
return process_env_var(tokenizer.read().text.replace(".", "_"))
elif tokenizer.check("QUOTED_STRING"):
return process_python_str(tokenizer.read().text)
else:
tokenizer.raise_syntax_error(
message="Expected a marker variable or quoted string"
)
def process_env_var(env_var: str) -> Variable:
if (
env_var == "platform_python_implementation"
or env_var == "python_implementation"
):
return Variable("platform_python_implementation")
else:
return Variable(env_var)
def process_python_str(python_str: str) -> Value:
value = ast.literal_eval(python_str)
return Value(str(value))
def _parse_marker_op(tokenizer: Tokenizer) -> Op:
"""
marker_op = IN | NOT IN | OP
"""
if tokenizer.check("IN"):
tokenizer.read()
return Op("in")
elif tokenizer.check("NOT"):
tokenizer.read()
tokenizer.expect("WS", expected="whitespace after 'not'")
tokenizer.expect("IN", expected="'in' after 'not'")
return Op("not in")
elif tokenizer.check("OP"):
return Op(tokenizer.read().text)
else:
return tokenizer.raise_syntax_error(
"Expected marker operator, one of "
"<=, <, !=, ==, >=, >, ~=, ===, in, not in"
)
@@ -0,0 +1 @@
module.exports={C:{"47":0.00911,"56":0.00455,"57":0.00455,"58":0.00455,"60":0.00455,"66":0.00455,"72":0.00455,"112":0.00455,"115":0.08195,"120":1.1337,"121":2.29927,"123":0.00911,"124":0.00911,"125":0.00455,"127":0.00455,"130":0.00455,"132":0.00911,"140":0.03187,"142":0.00455,"143":0.00455,"144":0.00455,"146":0.00455,"147":0.00455,"149":0.00455,"150":0.01821,"151":0.00455,"152":0.18667,"153":0.02732,"154":0.1457,"155":0.40066,"156":0.35969,"157":0.01366,_:"2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 48 49 50 51 52 53 54 55 59 61 62 63 64 65 67 68 69 70 71 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 113 114 116 117 118 119 122 126 128 129 131 133 134 135 136 137 138 139 141 145 148 158 159 160 3.5 3.6"},D:{"51":0.02732,"56":0.00455,"60":0.00455,"61":0.00455,"62":0.00455,"63":0.00455,"64":0.00455,"65":0.00455,"66":0.00911,"67":0.00455,"68":0.00455,"69":0.00911,"70":0.00455,"71":0.00455,"72":0.00911,"73":0.01821,"74":0.00455,"75":0.00455,"79":0.00455,"83":0.02732,"87":0.02277,"91":0.00455,"92":0.02277,"93":0.00455,"95":0.00455,"98":0.01366,"101":0.01366,"103":0.21854,"104":0.20033,"105":0.19578,"106":0.20033,"107":0.20033,"108":0.20033,"109":0.62376,"110":0.19578,"111":0.2231,"112":0.20033,"113":0.02277,"114":0.01821,"116":0.41888,"117":0.20033,"118":1.44785,"119":2.20821,"120":2.50415,"121":0.01366,"122":0.02732,"123":0.00911,"124":0.20489,"125":0.00455,"126":0.01821,"127":0.00911,"128":0.01821,"129":0.00455,"130":0.01821,"131":0.41888,"132":0.01366,"133":0.48717,"134":0.09561,"135":0.09561,"136":0.10472,"137":0.10927,"138":0.15936,"139":0.10017,"140":0.10927,"141":0.11383,"142":0.33692,"143":0.01366,"144":0.25497,"145":0.05464,"146":0.72848,"147":0.02277,"148":0.13204,"149":0.36424,"150":0.36879,"151":4.02485,"152":5.58198,"153":4.38454,"154":0.92426,"155":0.01821,_:"4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 52 53 54 55 57 58 59 76 77 78 80 81 84 85 86 88 89 90 94 96 97 99 100 102 115 156 157"},F:{"46":0.00455,"51":0.00455,"52":0.00455,"53":0.00455,"54":0.00455,"55":0.00455,"56":0.00911,"57":0.00455,"89":0.00455,"90":0.00455,"92":0.00455,"95":0.02277,"96":0.00455,"98":0.01366,"99":0.00911,"100":0.02277,"101":0.02732,"102":0.00455,"105":0.00455,"106":0.00455,"107":0.00455,"116":0.00455,"133":0.00911,"134":0.03642,"135":0.3005,_:"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 47 48 49 50 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 91 93 94 97 103 104 108 109 110 111 112 113 114 115 117 118 119 120 121 122 123 124 125 126 127 131 132 9.5-9.6 10.0-10.1 10.5 10.6 11.1 11.5 11.6 12.1"},B:{"15":0.00455,"18":0.00911,"90":0.00455,"92":0.01366,"100":0.00455,"109":0.00455,"111":0.00455,"114":0.00911,"119":1.12459,"120":1.12914,"122":0.00911,"133":0.00455,"139":0.00455,"140":0.00911,"141":0.00455,"142":0.00455,"143":0.00455,"144":0.00455,"145":0.00911,"146":0.00455,"147":0.00911,"148":0.01366,"149":0.01821,"150":0.04553,"151":0.2231,"152":1.49794,"153":1.4342,"154":0.24586,_:"12 13 14 16 17 79 80 81 83 84 85 86 87 88 89 91 93 94 95 96 97 98 99 101 102 103 104 105 106 107 108 110 112 113 115 116 117 118 121 123 124 125 126 127 128 129 130 131 132 134 135 136 137 138"},E:{"27":0.01821,_:"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 17.2 17.3 17.5 18.1 18.2 18.4 26.0 27.1 27.2 TP","14.1":0.00455,"15.6":0.02732,"16.6":0.07285,"17.1":0.00455,"17.4":0.00455,"17.6":0.03187,"18.0":0.00455,"18.3":0.00911,"18.5-18.7":0.00455,"26.1":0.00455,"26.2":0.00455,"26.3":0.00911,"26.4":0.01821,"26.5":0.03642,"26.6":0.10472},G:{"8":0,"3.2":0,"4.0-4.1":0,"4.2-4.3":0.00017,"5.0-5.1":0.00017,"6.0-6.1":0,"7.0-7.1":0.00034,"8.1-8.4":0,"9.0-9.2":0,"9.3":0,"10.0-10.2":0,"10.3":0.00171,"11.0-11.2":0.00017,"11.3-11.4":0.00034,"12.0-12.1":0,"12.2-12.5":0.00445,"13.0-13.1":0,"13.2":0.00086,"13.3":0,"13.4-13.7":0.00017,"14.0-14.4":0.00068,"14.5-14.8":0.00103,"15.0-15.1":0.00103,"15.2-15.3":0.00068,"15.4":0.00086,"15.5":0.00103,"15.6-15.8":0.02223,"16.0":0.00171,"16.1":0.00308,"16.2":0.00171,"16.3":0.00376,"16.4":0.00086,"16.5":0.00137,"16.6-16.7":0.03096,"17.0":0.0012,"17.1":0.00171,"17.2":0.00171,"17.3":0.00257,"17.4":0.00359,"17.5":0.00701,"17.6-17.7":0.01813,"18.0":0.00376,"18.1":0.00753,"18.2":0.01026,"18.3":0.01779,"18.4":0.01112,"18.5-18.7":0.2297,"26.0":0.01112,"26.1":0.01129,"26.2":0.02942,"26.3":0.03181,"26.4":0.02326,"26.5":0.15581,"26.6":0.96139,"27.0":0.07372,"27.1":0,"27.2":0.00188},P:{"22":0.00945,"24":0.01889,"25":0.00945,"26":0.00945,"27":0.00945,"28":0.08501,"29":0.05668,"30":0.51953,_:"4 20 21 23 5.0-5.4 6.2-6.4 8.2 9.2 10.1 11.1-11.2 12.0 13.0 14.0 15.0 16.0 17.0 18.0 19.0","7.2-7.4":0.02834},ILine truncated
@@ -0,0 +1,462 @@
/**
* gridstack.component.ts 12.6.0
* Copyright (c) 2022-2024 Alain Dumesny - see GridStack root license
*/
import {
AfterContentInit, Component, ContentChildren, ElementRef, EventEmitter, Input,
OnDestroy, OnInit, Output, QueryList, Type, ViewChild, ViewContainerRef, reflectComponentType, ComponentRef
} from '@angular/core';
import { NgIf } from '@angular/common';
import { Subscription } from 'rxjs';
import { GridHTMLElement, GridItemHTMLElement, GridStack, GridStackNode, GridStackOptions, GridStackWidget } from 'gridstack';
import { NgGridStackNode, NgGridStackWidget } from './types';
import { BaseWidget } from './base-widget';
import { GridItemCompHTMLElement, GridstackItemComponent } from './gridstack-item.component';
/**
* Event handler callback signatures for different GridStack events.
* These types define the structure of data passed to Angular event emitters.
*/
/** Callback for general events (enable, disable, etc.) */
export type eventCB = {event: Event};
/** Callback for element-specific events (resize, drag, etc.) */
export type elementCB = {event: Event, el: GridItemHTMLElement};
/** Callback for events affecting multiple nodes (change, etc.) */
export type nodesCB = {event: Event, nodes: GridStackNode[]};
/** Callback for drop events with before/after node state */
export type droppedCB = {event: Event, previousNode: GridStackNode, newNode: GridStackNode};
/**
* Extended HTMLElement interface for the grid container.
* Stores a back-reference to the Angular component for integration purposes.
*/
export interface GridCompHTMLElement extends GridHTMLElement {
/** Back-reference to the Angular GridStack component */
_gridComp?: GridstackComponent;
}
/**
* Mapping of selector strings to Angular component types.
* Used for dynamic component creation based on widget selectors.
*/
export type SelectorToType = {[key: string]: Type<object>};
/**
* Angular component wrapper for GridStack.
*
* This component provides Angular integration for GridStack grids, handling:
* - Grid initialization and lifecycle
* - Dynamic component creation and management
* - Event binding and emission
* - Integration with Angular change detection
*
* Use in combination with GridstackItemComponent for individual grid items.
*
* @example
* ```html
* <gridstack [options]="gridOptions" (change)="onGridChange($event)">
* <div empty-content>Drag widgets here</div>
* </gridstack>
* ```
*/
@Component({
selector: 'gridstack',
template: `
<!-- content to show when when grid is empty, like instructions on how to add widgets -->
<ng-content select="[empty-content]" *ngIf="isEmpty"></ng-content>
<!-- where dynamic items go -->
<ng-template #container></ng-template>
<!-- where template items go -->
<ng-content></ng-content>
`,
styles: [`
:host { display: block; }
`],
standalone: true,
imports: [NgIf]
// changeDetection: ChangeDetectionStrategy.OnPush, // IFF you want to optimize and control when ChangeDetection needs to happen...
})
export class GridstackComponent implements OnInit, AfterContentInit, OnDestroy {
/**
* List of template-based grid items (not recommended approach).
* Used to sync between DOM and GridStack internals when items are defined in templates.
* Prefer dynamic component creation instead.
*/
@ContentChildren(GridstackItemComponent) public gridstackItems?: QueryList<GridstackItemComponent>;
/**
* Container for dynamic component creation (recommended approach).
* Used to append grid items programmatically at runtime.
*/
@ViewChild('container', { read: ViewContainerRef, static: true}) public container?: ViewContainerRef;
/**
* Grid configuration options.
* Can be set before grid initialization or updated after grid is created.
*
* @example
* ```typescript
* gridOptions: GridStackOptions = {
* column: 12,
* cellHeight: 'auto',
* animate: true
* };
* ```
*/
@Input() public set options(o: GridStackOptions) {
if (this._grid) {
this._grid.updateOptions(o);
} else {
this._options = o;
}
}
/** Get the current running grid options */
public get options(): GridStackOptions { return this._grid?.opts || this._options || {}; }
/**
* Controls whether empty content should be displayed.
* Set to true to show ng-content with 'empty-content' selector when grid has no items.
*
* @example
* ```html
* <gridstack [isEmpty]="gridItems.length === 0">
* <div empty-content>Drag widgets here to get started</div>
* </gridstack>
* ```
*/
@Input() public isEmpty?: boolean;
/**
* GridStack event emitters for Angular integration.
*
* These provide Angular-style event handling for GridStack events.
* Alternatively, use `this.grid.on('event1 event2', callback)` for multiple events.
*
* Note: 'CB' suffix prevents conflicts with native DOM events.
*
* @example
* ```html
* <gridstack (changeCB)="onGridChange($event)" (droppedCB)="onItemDropped($event)">
* </gridstack>
* ```
*/
/** Emitted when widgets are added to the grid */
@Output() public addedCB = new EventEmitter<nodesCB>();
/** Emitted when grid layout changes */
@Output() public changeCB = new EventEmitter<nodesCB>();
/** Emitted when grid is disabled */
@Output() public disableCB = new EventEmitter<eventCB>();
/** Emitted during widget drag operations */
@Output() public dragCB = new EventEmitter<elementCB>();
/** Emitted when widget drag starts */
@Output() public dragStartCB = new EventEmitter<elementCB>();
/** Emitted when widget drag stops */
@Output() public dragStopCB = new EventEmitter<elementCB>();
/** Emitted when widget is dropped */
@Output() public droppedCB = new EventEmitter<droppedCB>();
/** Emitted when grid is enabled */
@Output() public enableCB = new EventEmitter<eventCB>();
/** Emitted when widgets are removed from the grid */
@Output() public removedCB = new EventEmitter<nodesCB>();
/** Emitted during widget resize operations */
@Output() public resizeCB = new EventEmitter<elementCB>();
/** Emitted when widget resize starts */
@Output() public resizeStartCB = new EventEmitter<elementCB>();
/** Emitted when widget resize stops */
@Output() public resizeStopCB = new EventEmitter<elementCB>();
/**
* Get the native DOM element that contains grid-specific fields.
* This element has GridStack properties attached to it.
*/
public get el(): GridCompHTMLElement { return this.elementRef.nativeElement; }
/**
* Get the underlying GridStack instance.
* Use this to access GridStack API methods directly.
*
* @example
* ```typescript
* this.gridComponent.grid.addWidget({x: 0, y: 0, w: 2, h: 1});
* ```
*/
public get grid(): GridStack | undefined { return this._grid; }
/**
* Component reference for dynamic component removal.
* Used internally when this component is created dynamically.
*/
public ref: ComponentRef<GridstackComponent> | undefined;
/**
* Mapping of component selectors to their types for dynamic creation.
*
* This enables dynamic component instantiation from string selectors.
* Angular doesn't provide public access to this mapping, so we maintain our own.
*
* @example
* ```typescript
* GridstackComponent.addComponentToSelectorType([MyWidgetComponent]);
* ```
*/
public static selectorToType: SelectorToType = {};
/**
* Register a list of Angular components for dynamic creation.
*
* @param typeList Array of component types to register
*
* @example
* ```typescript
* GridstackComponent.addComponentToSelectorType([
* MyWidgetComponent,
* AnotherWidgetComponent
* ]);
* ```
*/
public static addComponentToSelectorType(typeList: Array<Type<object>>) {
typeList.forEach(type => GridstackComponent.selectorToType[ GridstackComponent.getSelector(type) ] = type);
}
/**
* Extract the selector string from an Angular component type.
*
* @param type The component type to get selector from
* @returns The component's selector string
*/
public static getSelector(type: Type<object>): string {
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
return reflectComponentType(type)!.selector;
}
protected _options?: GridStackOptions;
protected _grid?: GridStack;
protected _sub: Subscription | undefined;
protected loaded?: boolean;
constructor(protected readonly elementRef: ElementRef<GridCompHTMLElement>) {
// set globally our method to create the right widget type
if (!GridStack.addRemoveCB) {
GridStack.addRemoveCB = gsCreateNgComponents;
}
if (!GridStack.saveCB) {
GridStack.saveCB = gsSaveAdditionalNgInfo;
}
if (!GridStack.updateCB) {
GridStack.updateCB = gsUpdateNgComponents;
}
this.el._gridComp = this;
}
public ngOnInit(): void {
// init ourself before any template children are created since we track them below anyway - no need to double create+update widgets
this.loaded = !!this.options?.children?.length;
this._grid = GridStack.init(this._options, this.el);
delete this._options; // GS has it now
this.checkEmpty();
}
/** wait until after all DOM is ready to init gridstack children (after angular ngFor and sub-components run first) */
public ngAfterContentInit(): void {
// track whenever the children list changes and update the layout...
this._sub = this.gridstackItems?.changes.subscribe(() => this.updateAll());
// ...and do this once at least unless we loaded children already
if (!this.loaded) this.updateAll();
this.hookEvents(this.grid);
}
public ngOnDestroy(): void {
this.unhookEvents(this._grid);
this._sub?.unsubscribe();
this._grid?.destroy();
delete this._grid;
delete this.el._gridComp;
delete this.container;
delete this.ref;
}
/**
* called when the TEMPLATE (not recommended) list of items changes - get a list of nodes and
* update the layout accordingly (which will take care of adding/removing items changed by Angular)
*/
public updateAll() {
if (!this.grid) return;
const layout: GridStackWidget[] = [];
this.gridstackItems?.forEach(item => {
layout.push(item.options);
item.clearOptions();
});
this.grid.load(layout); // efficient that does diffs only
}
/** check if the grid is empty, if so show alternative content */
public checkEmpty() {
if (!this.grid) return;
this.isEmpty = !this.grid.engine.nodes.length;
}
/** get all known events as easy to use Outputs for convenience */
protected hookEvents(grid?: GridStack) {
if (!grid) return;
// nested grids don't have events in v12.1+ so skip
if (grid.parentGridNode) return;
grid
.on('added', (event: Event, nodes: GridStackNode[]) => {
const gridComp = (nodes[0].grid?.el as GridCompHTMLElement)._gridComp || this;
gridComp.checkEmpty();
this.addedCB.emit({event, nodes});
})
.on('change', (event: Event, nodes: GridStackNode[]) => this.changeCB.emit({event, nodes}))
.on('disable', (event: Event) => this.disableCB.emit({event}))
.on('drag', (event: Event, el: GridItemHTMLElement) => this.dragCB.emit({event, el}))
.on('dragstart', (event: Event, el: GridItemHTMLElement) => this.dragStartCB.emit({event, el}))
.on('dragstop', (event: Event, el: GridItemHTMLElement) => this.dragStopCB.emit({event, el}))
.on('dropped', (event: Event, previousNode: GridStackNode, newNode: GridStackNode) => this.droppedCB.emit({event, previousNode, newNode}))
.on('enable', (event: Event) => this.enableCB.emit({event}))
.on('removed', (event: Event, nodes: GridStackNode[]) => {
const gridComp = (nodes[0].grid?.el as GridCompHTMLElement)._gridComp || this;
gridComp.checkEmpty();
this.removedCB.emit({event, nodes});
})
.on('resize', (event: Event, el: GridItemHTMLElement) => this.resizeCB.emit({event, el}))
.on('resizestart', (event: Event, el: GridItemHTMLElement) => this.resizeStartCB.emit({event, el}))
.on('resizestop', (event: Event, el: GridItemHTMLElement) => this.resizeStopCB.emit({event, el}))
}
protected unhookEvents(grid?: GridStack) {
if (!grid) return;
// nested grids don't have events in v12.1+ so skip
if (grid.parentGridNode) return;
grid.off('added change disable drag dragstart dragstop dropped enable removed resize resizestart resizestop');
}
}
/**
* can be used when a new item needs to be created, which we do as a Angular component, or deleted (skip)
**/
export function gsCreateNgComponents(host: GridCompHTMLElement | HTMLElement, n: NgGridStackNode, add: boolean, isGrid: boolean): HTMLElement | undefined {
if (add) {
//
// create the component dynamically - see https://angular.io/docs/ts/latest/cookbook/dynamic-component-loader.html
//
if (!host) return;
if (isGrid) {
// TODO: figure out how to create ng component inside regular Div. need to access app injectors...
// if (!container) {
// const hostElement: Element = host;
// const environmentInjector: EnvironmentInjector;
// grid = createComponent(GridstackComponent, {environmentInjector, hostElement})?.instance;
// }
const gridItemComp = (host.parentElement as GridItemCompHTMLElement)?._gridItemComp;
if (!gridItemComp) return;
// check if gridItem has a child component with 'container' exposed to create under..
// eslint-disable-next-line @typescript-eslint/no-explicit-any
const container = (gridItemComp.childWidget as any)?.container || gridItemComp.container;
const gridRef = container?.createComponent(GridstackComponent);
const grid = gridRef?.instance;
if (!grid) return;
grid.ref = gridRef;
grid.options = n;
return grid.el;
} else {
const gridComp = (host as GridCompHTMLElement)._gridComp;
const gridItemRef = gridComp?.container?.createComponent(GridstackItemComponent);
const gridItem = gridItemRef?.instance;
if (!gridItem) return;
gridItem.ref = gridItemRef
// define what type of component to create as child, OR you can do it GridstackItemComponent template, but this is more generic
const selector = n.selector;
const type = selector ? GridstackComponent.selectorToType[selector] : undefined;
if (type) {
// shared code to create our selector component
const createComp = () => {
const childWidget = gridItem.container?.createComponent(type)?.instance as BaseWidget;
// if proper BaseWidget subclass, save it and load additional data
if (childWidget && typeof childWidget.serialize === 'function' && typeof childWidget.deserialize === 'function') {
gridItem.childWidget = childWidget;
childWidget.deserialize(n);
}
}
const lazyLoad = n.lazyLoad || n.grid?.opts?.lazyLoad && n.lazyLoad !== false;
if (lazyLoad) {
if (!n.visibleObservable) {
n.visibleObservable = new IntersectionObserver(([entry]) => { if (entry.isIntersecting) {
n.visibleObservable?.disconnect();
delete n.visibleObservable;
createComp();
}});
window.setTimeout(() => n.visibleObservable?.observe(gridItem.el)); // wait until callee sets position attributes
}
} else createComp();
}
return gridItem.el;
}
} else {
//
// REMOVE - have to call ComponentRef:destroy() for dynamic objects to correctly remove themselves
// Note: this will destroy all children dynamic components as well: gridItem -> childWidget
//
if (isGrid) {
const grid = (n.el as GridCompHTMLElement)?._gridComp;
if (grid?.ref) grid.ref.destroy();
else grid?.ngOnDestroy();
} else {
const gridItem = (n.el as GridItemCompHTMLElement)?._gridItemComp;
if (gridItem?.ref) gridItem.ref.destroy();
else gridItem?.ngOnDestroy();
}
}
return;
}
/**
* called for each item in the grid - check if additional information needs to be saved.
* Note: since this is options minus gridstack protected members using Utils.removeInternalForSave(),
* this typically doesn't need to do anything. However your custom Component @Input() are now supported
* using BaseWidget.serialize()
*/
export function gsSaveAdditionalNgInfo(n: NgGridStackNode, w: NgGridStackWidget) {
const gridItem = (n.el as GridItemCompHTMLElement)?._gridItemComp;
if (gridItem) {
const input = gridItem.childWidget?.serialize();
if (input) {
w.input = input;
}
return;
}
// else check if Grid
const grid = (n.el as GridCompHTMLElement)?._gridComp;
if (grid) {
//.... save any custom data
}
}
/**
* track when widgeta re updated (rather than created) to make sure we de-serialize them as well
*/
export function gsUpdateNgComponents(n: NgGridStackNode) {
const w: NgGridStackWidget = n;
const gridItem = (n.el as GridItemCompHTMLElement)?._gridItemComp;
if (gridItem?.childWidget && w.input) gridItem.childWidget.deserialize(w);
}
@@ -0,0 +1,15 @@
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
//#region src/jsx/constants.ts
const DOM_RENDERER = Symbol("RENDERER");
const DOM_ERROR_HANDLER = Symbol("ERROR_HANDLER");
const DOM_STASH = Symbol("STASH");
const DOM_INTERNAL_TAG = Symbol("INTERNAL");
const DOM_MEMO = Symbol("MEMO");
const PERMALINK = Symbol("PERMALINK");
//#endregion
exports.DOM_ERROR_HANDLER = DOM_ERROR_HANDLER;
exports.DOM_INTERNAL_TAG = DOM_INTERNAL_TAG;
exports.DOM_MEMO = DOM_MEMO;
exports.DOM_RENDERER = DOM_RENDERER;
exports.DOM_STASH = DOM_STASH;
exports.PERMALINK = PERMALINK;
@@ -0,0 +1 @@
{"version":3,"file":"debug.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -0,0 +1,193 @@
/**
* @fileoverview The main file for the hfs package.
* @author Nicholas C. Zakas
*/
/** @typedef{import("@humanfs/types").HfsImpl} HfsImpl */
/** @typedef{import("@humanfs/types").HfsDirectoryEntry} HfsDirectoryEntry */
/**
* Error to represent when a method is missing on an impl.
*/
export class NoSuchMethodError extends Error {
/**
* Creates a new instance.
* @param {string} methodName The name of the method that was missing.
*/
constructor(methodName: string);
}
/**
* Error to represent when an impl is already set.
*/
export class ImplAlreadySetError extends Error {
/**
* Creates a new instance.
*/
constructor();
}
/**
* A class representing a log entry.
*/
export class LogEntry {
/**
* Creates a new instance.
* @param {string} type The type of log entry.
* @param {any} [data] The data associated with the log entry.
*/
constructor(type: string, data?: any);
/**
* The time at which the log entry was created.
* @type {number}
*/
timestamp: number;
methodName: string;
data: any;
#private;
}
/**
* A class representing a file system utility library.
* @implements {HfsImpl}
*/
export class Hfs implements HfsImpl {
/**
* Creates a new instance.
* @param {object} options The options for the instance.
* @param {HfsImpl} options.impl The implementation to use.
*/
constructor({ impl }: {
impl: HfsImpl;
});
/**
* Starts a new log with the given name.
* @param {string} name The name of the log to start;
* @returns {void}
* @throws {Error} When the log already exists.
* @throws {TypeError} When the name is not a non-empty string.
*/
logStart(name: string): void;
/**
* Ends a log with the given name and returns the entries.
* @param {string} name The name of the log to end.
* @returns {Array<LogEntry>} The entries in the log.
* @throws {Error} When the log does not exist.
*/
logEnd(name: string): Array<LogEntry>;
/**
* Determines if the current implementation is the base implementation.
* @returns {boolean} True if the current implementation is the base implementation.
*/
isBaseImpl(): boolean;
/**
* Sets the implementation for this instance.
* @param {object} impl The implementation to use.
* @returns {void}
*/
setImpl(impl: object): void;
/**
* Resets the implementation for this instance back to its original.
* @returns {void}
*/
resetImpl(): void;
/**
* Reads the given file and returns the contents as text. Assumes UTF-8 encoding.
* @param {string} filePath The file to read.
* @returns {Promise<string|undefined>} The contents of the file.
* @throws {NoSuchMethodError} When the method does not exist on the current implementation.
* @throws {TypeError} When the file path is not a non-empty string.
*/
text(filePath: string): Promise<string | undefined>;
/**
* Reads the given file and returns the contents as JSON. Assumes UTF-8 encoding.
* @param {string} filePath The file to read.
* @returns {Promise<any|undefined>} The contents of the file as JSON.
* @throws {NoSuchMethodError} When the method does not exist on the current implementation.
* @throws {SyntaxError} When the file contents are not valid JSON.
* @throws {TypeError} When the file path is not a non-empty string.
*/
json(filePath: string): Promise<any | undefined>;
/**
* Reads the given file and returns the contents as an ArrayBuffer.
* @param {string} filePath The file to read.
* @returns {Promise<ArrayBuffer|undefined>} The contents of the file as an ArrayBuffer.
* @throws {NoSuchMethodError} When the method does not exist on the current implementation.
* @throws {TypeError} When the file path is not a non-empty string.
* @deprecated Use bytes() instead.
*/
arrayBuffer(filePath: string): Promise<ArrayBuffer | undefined>;
/**
* Reads the given file and returns the contents as an Uint8Array.
* @param {string} filePath The file to read.
* @returns {Promise<Uint8Array|undefined>} The contents of the file as an Uint8Array.
* @throws {NoSuchMethodError} When the method does not exist on the current implementation.
* @throws {TypeError} When the file path is not a non-empty string.
*/
bytes(filePath: string): Promise<Uint8Array | undefined>;
/**
* Writes the given data to the given file. Creates any necessary directories along the way.
* If the data is a string, UTF-8 encoding is used.
* @param {string} filePath The file to write.
* @param {any} contents The data to write.
* @returns {Promise<void>} A promise that resolves when the file is written.
* @throws {NoSuchMethodError} When the method does not exist on the current implementation.
* @throws {TypeError} When the file path is not a non-empty string.
*/
write(filePath: string, contents: any): Promise<void>;
/**
* Determines if the given file exists.
* @param {string} filePath The file to check.
* @returns {Promise<boolean>} True if the file exists.
* @throws {NoSuchMethodError} When the method does not exist on the current implementation.
* @throws {TypeError} When the file path is not a non-empty string.
*/
isFile(filePath: string): Promise<boolean>;
/**
* Determines if the given directory exists.
* @param {string} dirPath The directory to check.
* @returns {Promise<boolean>} True if the directory exists.
* @throws {NoSuchMethodError} When the method does not exist on the current implementation.
* @throws {TypeError} When the directory path is not a non-empty string.
*/
isDirectory(dirPath: string): Promise<boolean>;
/**
* Creates the given directory.
* @param {string} dirPath The directory to create.
* @returns {Promise<void>} A promise that resolves when the directory is created.
* @throws {NoSuchMethodError} When the method does not exist on the current implementation.
* @throws {TypeError} When the directory path is not a non-empty string.
*/
createDirectory(dirPath: string): Promise<void>;
/**
* Deletes the given file.
* @param {string} filePath The file to delete.
* @returns {Promise<void>} A promise that resolves when the file is deleted.
* @throws {NoSuchMethodError} When the method does not exist on the current implementation.
* @throws {TypeError} When the file path is not a non-empty string.
*/
delete(filePath: string): Promise<void>;
/**
* Deletes the given directory.
* @param {string} dirPath The directory to delete.
* @returns {Promise<void>} A promise that resolves when the directory is deleted.
* @throws {NoSuchMethodError} When the method does not exist on the current implementation.
* @throws {TypeError} When the directory path is not a non-empty string.
*/
deleteAll(dirPath: string): Promise<void>;
/**
* Returns a list of directory entries for the given path.
* @param {string} dirPath The path to the directory to read.
* @returns {AsyncIterable<HfsDirectoryEntry>} A promise that resolves with the
* directory entries.
* @throws {TypeError} If the directory path is not a string.
* @throws {Error} If the directory cannot be read.
*/
list(dirPath: string): AsyncIterable<HfsDirectoryEntry>;
/**
* Returns the size of the given file.
* @param {string} filePath The path to the file to read.
* @returns {Promise<number>} A promise that resolves with the size of the file.
* @throws {TypeError} If the file path is not a string.
* @throws {Error} If the file cannot be read.
*/
size(filePath: string): Promise<number>;
#private;
}
export type HfsImpl = import("@humanfs/types").HfsImpl;
export type HfsDirectoryEntry = import("@humanfs/types").HfsDirectoryEntry;
@@ -0,0 +1,8 @@
"use strict";
/* eslint-disable @typescript-eslint/no-namespace, no-restricted-syntax */
Object.defineProperty(exports, "__esModule", { value: true });
exports.SourceCode = void 0;
const eslint_1 = require("eslint");
class SourceCode extends eslint_1.SourceCode {
}
exports.SourceCode = SourceCode;
@@ -0,0 +1 @@
module.exports={A:{A:{"2":"_E"},B:{"1":"_K","2":"_I"},C:{"2":"_US","194":"_aO"},D:{"1":"_HS","2":"_LO","322":"_zQ"},E:{"2":"_FO","516":"XD"},F:{"1":"_ZJ _RD","2":"_EP","322":"_3I _zD"},G:{"2":"_M"},H:{"2":"1D"},I:{"1":"I","2":"_G"},J:{"2":"_B"},K:{"1":"H","2":"_D"},L:{"1":"I"},M:{"2":"YC"},N:{"2":"_A"},O:{"1":"bC"},P:{"1":"_U","2":"J"},Q:{"1":"JE"},R:{"1":"KE"},S:{"194":"_C"}},B:5,C:"ImageCapture API",D:true};
@@ -0,0 +1 @@
{"version":3,"file":"calc-time.mjs","sources":["../../../../../src/animation/sequence/utils/calc-time.ts"],"sourcesContent":["import { SequenceTime } from \"../types\"\n\n/**\n * Given a absolute or relative time definition and current/prev time state of the sequence,\n * calculate an absolute time for the next keyframes.\n */\nexport function calcNextTime(\n current: number,\n next: SequenceTime,\n prev: number,\n labels: Map<string, number>\n): number {\n if (typeof next === \"number\") {\n return next\n } else if (next.startsWith(\"-\") || next.startsWith(\"+\")) {\n return Math.max(0, current + parseFloat(next))\n } else if (next === \"<\") {\n return prev\n } else if (next.startsWith(\"<\")) {\n return Math.max(0, prev + parseFloat(next.slice(1)))\n } else {\n return labels.get(next) ?? current\n }\n}\n"],"names":[],"mappings":"AAEA;;;AAGG;AACG,SAAU,YAAY,CACxB,OAAe,EACf,IAAkB,EAClB,IAAY,EACZ,MAA2B,EAAA;AAE3B,IAAA,IAAI,OAAO,IAAI,KAAK,QAAQ,EAAE;AAC1B,QAAA,OAAO,IAAI;IACf;AAAO,SAAA,IAAI,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,IAAI,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,EAAE;AACrD,QAAA,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,OAAO,GAAG,UAAU,CAAC,IAAI,CAAC,CAAC;IAClD;AAAO,SAAA,IAAI,IAAI,KAAK,GAAG,EAAE;AACrB,QAAA,OAAO,IAAI;IACf;AAAO,SAAA,IAAI,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,EAAE;AAC7B,QAAA,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,GAAG,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;IACxD;SAAO;QACH,OAAO,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,OAAO;IACtC;AACJ;;;;"}
@@ -0,0 +1 @@
{"version":3,"names":["_index","require","_default","exports","default","createTypeAnnotationBasedOnTypeof","type","stringTypeAnnotation","numberTypeAnnotation","voidTypeAnnotation","booleanTypeAnnotation","genericTypeAnnotation","identifier","anyTypeAnnotation","Error"],"sources":["../../../src/builders/flow/createTypeAnnotationBasedOnTypeof.ts"],"sourcesContent":["import {\n anyTypeAnnotation,\n stringTypeAnnotation,\n numberTypeAnnotation,\n voidTypeAnnotation,\n booleanTypeAnnotation,\n genericTypeAnnotation,\n identifier,\n} from \"../generated/index.ts\";\nimport type * as t from \"../../index.ts\";\n\nexport default createTypeAnnotationBasedOnTypeof as {\n (type: \"string\"): t.StringTypeAnnotation;\n (type: \"number\"): t.NumberTypeAnnotation;\n (type: \"undefined\"): t.VoidTypeAnnotation;\n (type: \"boolean\"): t.BooleanTypeAnnotation;\n (type: \"function\"): t.GenericTypeAnnotation;\n (type: \"object\"): t.GenericTypeAnnotation;\n (type: \"symbol\"): t.GenericTypeAnnotation;\n (type: \"bigint\"): t.AnyTypeAnnotation;\n};\n\n/**\n * Create a type annotation based on typeof expression.\n */\nfunction createTypeAnnotationBasedOnTypeof(type: string): t.FlowType {\n switch (type) {\n case \"string\":\n return stringTypeAnnotation();\n case \"number\":\n return numberTypeAnnotation();\n case \"undefined\":\n return voidTypeAnnotation();\n case \"boolean\":\n return booleanTypeAnnotation();\n case \"function\":\n return genericTypeAnnotation(identifier(\"Function\"));\n case \"object\":\n return genericTypeAnnotation(identifier(\"Object\"));\n case \"symbol\":\n return genericTypeAnnotation(identifier(\"Symbol\"));\n case \"bigint\":\n // todo: use BigInt annotation when Flow supports BigInt\n // https://github.com/facebook/flow/issues/6639\n return anyTypeAnnotation();\n }\n throw new Error(\"Invalid typeof value: \" + type);\n}\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAQ+B,IAAAC,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAGhBC,iCAAiC;AAchD,SAASA,iCAAiCA,CAACC,IAAY,EAAc;EACnE,QAAQA,IAAI;IACV,KAAK,QAAQ;MACX,OAAO,IAAAC,2BAAoB,EAAC,CAAC;IAC/B,KAAK,QAAQ;MACX,OAAO,IAAAC,2BAAoB,EAAC,CAAC;IAC/B,KAAK,WAAW;MACd,OAAO,IAAAC,yBAAkB,EAAC,CAAC;IAC7B,KAAK,SAAS;MACZ,OAAO,IAAAC,4BAAqB,EAAC,CAAC;IAChC,KAAK,UAAU;MACb,OAAO,IAAAC,4BAAqB,EAAC,IAAAC,iBAAU,EAAC,UAAU,CAAC,CAAC;IACtD,KAAK,QAAQ;MACX,OAAO,IAAAD,4BAAqB,EAAC,IAAAC,iBAAU,EAAC,QAAQ,CAAC,CAAC;IACpD,KAAK,QAAQ;MACX,OAAO,IAAAD,4BAAqB,EAAC,IAAAC,iBAAU,EAAC,QAAQ,CAAC,CAAC;IACpD,KAAK,QAAQ;MAGX,OAAO,IAAAC,wBAAiB,EAAC,CAAC;EAC9B;EACA,MAAM,IAAIC,KAAK,CAAC,wBAAwB,GAAGR,IAAI,CAAC;AAClD","ignoreList":[]}
@@ -0,0 +1,8 @@
export declare const zeroRightClassName = "right-scroll-bar-position";
export declare const fullWidthClassName = "width-before-scroll-bar";
export declare const noScrollbarsClassName = "with-scroll-bars-hidden";
/**
* Name of a CSS variable containing the amount of "hidden" scrollbar
* ! might be undefined ! use will fallback!
*/
export declare const removedBarSizeVariable = "--removed-body-scroll-bar-size";
@@ -0,0 +1,73 @@
# 🛣️ pathe
> Universal filesystem path utils
[![version][npm-v-src]][npm-v-href]
[![downloads][npm-d-src]][npm-d-href]
[![size][size-src]][size-href]
## ❓ Why
For [historical reasons](https://docs.microsoft.com/en-us/archive/blogs/larryosterman/why-is-the-dos-path-character), windows followed MS-DOS and used backslash for separating paths rather than slash used for macOS, Linux, and other Posix operating systems. Nowadays, [Windows](https://docs.microsoft.com/en-us/windows/win32/fileio/naming-a-file?redirectedfrom=MSDN) supports both Slash and Backslash for paths. [Node.js's built-in `path` module](https://nodejs.org/api/path.html) in the default operation of the path module varies based on the operating system on which a Node.js application is running. Specifically, when running on a Windows operating system, the path module will assume that Windows-style paths are being used. **This makes inconsistent code behavior between Windows and POSIX.**
Compared to popular [upath](https://github.com/anodynos/upath), pathe provides **identical exports** of Node.js with normalization on **all operations** and is written in modern **ESM/TypeScript** and has **no dependency on Node.js**!
This package is a drop-in replacement of the Node.js's [path module](https://nodejs.org/api/path.html) module and ensures paths are normalized with slash `/` and work in environments including Node.js.
## 💿 Usage
Install using npm or yarn:
```bash
# npm
npm i pathe
# yarn
yarn add pathe
# pnpm
pnpm i pathe
```
Import:
```js
// ESM / Typescript
import { resolve, matchesGlob } from "pathe";
// CommonJS
const { resolve, matchesGlob } = require("pathe");
```
Read more about path utils from [Node.js documentation](https://nodejs.org/api/path.html) and rest assured behavior is consistently like POSIX regardless of your input paths format and running platform (the only exception is `delimiter` constant export, it will be set to `;` on windows platform).
### Extra utilities
Pathe exports some extra utilities that do not exist in standard Node.js [path module](https://nodejs.org/api/path.html).
In order to use them, you can import from `pathe/utils` subpath:
```js
import {
filename,
normalizeAliases,
resolveAlias,
reverseResolveAlias,
} from "pathe/utils";
```
## License
Made with 💛 Published under the [MIT](./LICENSE) license.
Some code was used from the Node.js project. Glob supported is powered by [zeptomatch](https://github.com/fabiospampinato/zeptomatch).
<!-- Refs -->
[npm-v-src]: https://img.shields.io/npm/v/pathe?style=flat-square
[npm-v-href]: https://npmjs.com/package/pathe
[npm-d-src]: https://img.shields.io/npm/dm/pathe?style=flat-square
[npm-d-href]: https://npmjs.com/package/pathe
[github-actions-src]: https://img.shields.io/github/workflow/status/unjs/pathe/ci/main?style=flat-square
[github-actions-href]: https://github.com/unjs/pathe/actions?query=workflow%3Aci
[size-src]: https://packagephobia.now.sh/badge?p=pathe
[size-href]: https://packagephobia.now.sh/result?p=pathe
@@ -0,0 +1,216 @@
The MCP project is undergoing a licensing transition from the MIT License to the Apache License, Version 2.0 ("Apache-2.0"). All new code and specification contributions to the project are licensed under Apache-2.0. Documentation contributions (excluding specifications) are licensed under CC-BY-4.0.
Contributions for which relicensing consent has been obtained are licensed under Apache-2.0. Contributions made by authors who originally licensed their work under the MIT License and who have not yet granted explicit permission to relicense remain licensed under the MIT License.
No rights beyond those granted by the applicable original license are conveyed for such contributions.
---
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to the Licensor for inclusion in the Work by the copyright
owner or by an individual or Legal Entity authorized to submit on behalf
of the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
---
MIT License
Copyright (c) 2024-2025 Model Context Protocol a Series of LF Projects, LLC.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
---
Creative Commons Attribution 4.0 International (CC-BY-4.0)
Documentation in this project (excluding specifications) is licensed under
CC-BY-4.0. See https://creativecommons.org/licenses/by/4.0/legalcode for
the full license text.
@@ -0,0 +1,70 @@
{
"name": "tinyglobby",
"version": "0.2.17",
"description": "A fast and minimal alternative to globby and fast-glob",
"type": "module",
"main": "./dist/index.cjs",
"module": "./dist/index.mjs",
"types": "./dist/index.d.cts",
"exports": {
".": {
"import": "./dist/index.mjs",
"require": "./dist/index.cjs"
},
"./package.json": "./package.json"
},
"sideEffects": false,
"files": [
"dist"
],
"author": "Superchupu",
"license": "MIT",
"keywords": [
"glob",
"patterns",
"tiny",
"fast"
],
"repository": {
"type": "git",
"url": "git+https://github.com/SuperchupuDev/tinyglobby.git"
},
"bugs": {
"url": "https://github.com/SuperchupuDev/tinyglobby/issues"
},
"homepage": "https://superchupu.dev/tinyglobby",
"funding": {
"url": "https://github.com/sponsors/SuperchupuDev"
},
"dependencies": {
"fdir": "^6.5.0",
"picomatch": "^4.0.4"
},
"devDependencies": {
"@biomejs/biome": "^2.4.16",
"@types/node": "^25.9.1",
"@types/picomatch": "^4.0.3",
"fast-glob": "^3.3.3",
"fs-fixture": "^2.14.0",
"glob": "^13.0.6",
"tinybench": "^6.0.2",
"tsdown": "^0.22.1",
"typescript": "^6.0.3"
},
"engines": {
"node": ">=12.0.0"
},
"scripts": {
"bench": "node benchmark/bench.ts",
"bench:setup": "node benchmark/setup.ts",
"build": "tsdown",
"check": "biome check",
"check:fix": "biome check --write --unsafe",
"format": "biome format --write",
"lint": "biome lint",
"test": "node --test \"test/**/*.ts\"",
"test:coverage": "node --test --experimental-test-coverage \"test/**/*.ts\"",
"test:only": "node --test --test-only \"test/**/*.ts\"",
"typecheck": "tsc --noEmit"
}
}
@@ -0,0 +1,108 @@
# 1.2.1
- fix version
# 1.2.0
- add `List.remove`
- build with LiveScript 1.6.0
- update dependencies
- remove coverage calculation
# 1.1.2
- add `Func.memoize`
- fix `zip-all` and `zip-with-all` corner case (no input)
- build with LiveScript 1.4.0
# 1.1.1
- curry `unique-by`, `minimum-by`
# 1.1.0
- added `List` functions: `maximum-by`, `minimum-by`, `unique-by`
- added `List` functions: `at`, `elem-index`, `elem-indices`, `find-index`, `find-indices`
- added `Str` functions: `capitalize`, `camelize`, `dasherize`
- added `Func` function: `over` - eg. ``same-length = (==) `over` (.length)``
- exported `Str.repeat` through main `prelude` object
- fixed definition of `foldr` and `foldr1`, the new correct definition is backwards incompatible with the old, incorrect one
- fixed issue with `fix`
- improved code coverage
# 1.0.3
- build browser versions
# 1.0.2
- bug fix for `flatten` - slight change with bug fix, flattens arrays only, not array-like objects
# 1.0.1
- bug fixes for `drop-while` and `take-while`
# 1.0.0
* massive update - separated functions into separate modules
* functions do not accept multiple types anymore - use different versions in their respective modules in some cases (eg. `Obj.map`), or use `chars` or `values` in other cases to transform into a list
* objects are no longer transformed into functions, simply use `(obj.)` in LiveScript to do that
* browser version now using browserify - use `prelude = require('prelude-ls')`
* added `compact`, `split`, `flatten`, `difference`, `intersection`, `union`, `count-by`, `group-by`, `chars`, `unchars`, `apply`
* added `lists-to-obj` which takes a list of keys and list of values and zips them up into an object, and the converse `obj-to-lists`
* added `pairs-to-obj` which takes a list of pairs (2 element lists) and creates an object, and the converse `obj-to-pairs`
* removed `cons`, `append` - use the concat operator
* removed `compose` - use the compose operator
* removed `obj-to-func` - use partially applied access (eg. `(obj.)`)
* removed `length` - use `(.length)`
* `sort-by` renamed to `sort-with`
* added new `sort-by`
* removed `compare` - just use the new `sort-by`
* `break-it` renamed `break-list`, (`Str.break-str` for the string version)
* added `Str.repeat` which creates a new string by repeating the input n times
* `unfold` as alias to `unfoldr` is no longer used
* fixed up style and compiled with LiveScript 1.1.1
* use Make instead of Slake
* greatly improved tests
# 0.6.0
* fixed various bugs
* added `fix`, a fixpoint (Y combinator) for anonymous recursive functions
* added `unfoldr` (alias `unfold`)
* calling `replicate` with a string now returns a list of strings
* removed `partial`, just use native partial application in LiveScript using the `_` placeholder, or currying
* added `sort`, `sortBy`, and `compare`
# 0.5.0
* removed `lookup` - use (.prop)
* removed `call` - use (.func arg1, arg2)
* removed `pluck` - use map (.prop), xs
* fixed buys wtih `head` and `last`
* added non-minifed browser version, as `prelude-browser.js`
* renamed `prelude-min.js` to `prelude-browser-min.js`
* renamed `zip` to `zipAll`
* renamed `zipWith` to `zipAllWith`
* added `zip`, a curried zip that takes only two arguments
* added `zipWith`, a curried zipWith that takes only two arguments
# 0.4.0
* added `parition` function
* added `curry` function
* removed `elem` function (use `in`)
* removed `notElem` function (use `not in`)
# 0.3.0
* added `listToObject`
* added `unique`
* added `objToFunc`
* added support for using strings in map and the like
* added support for using objects in map and the like
* added ability to use objects instead of functions in certain cases
* removed `error` (just use throw)
* added `tau` constant
* added `join`
* added `values`
* added `keys`
* added `partial`
* renamed `log` to `ln`
* added alias to `head`: `first`
* added `installPrelude` helper
# 0.2.0
* removed functions that simply warp operators as you can now use operators as functions in LiveScript
* `min/max` are now curried and take only 2 arguments
* added `call`
# 0.1.0
* initial public release
@@ -0,0 +1,56 @@
"use client";
const require_runtime = require("./_virtual/_rolldown/runtime.cjs");
let react = require("react");
react = require_runtime.__toESM(react);
let react_jsx_runtime = require("react/jsx-runtime");
//#region src/ClientOnly.tsx
/**
* Render the children only after the JS has loaded client-side. Use an optional
* fallback component if the JS is not yet loaded.
*
* @example
* Render a Chart component if JS loads, renders a simple FakeChart
* component server-side or if there is no JS. The FakeChart can have only the
* UI without the behavior or be a loading spinner or skeleton.
*
* ```tsx
* return (
* <ClientOnly fallback={<FakeChart />}>
* <Chart />
* </ClientOnly>
* )
* ```
*/
function ClientOnly({ children, fallback = null }) {
return useHydrated() ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react.default.Fragment, { children }) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react.default.Fragment, { children: fallback });
}
/**
* Return a boolean indicating if the JS has been hydrated already.
* When doing Server-Side Rendering, the result will always be false.
* When doing Client-Side Rendering, the result will always be false on the
* first render and true from then on. Even if a new component renders it will
* always start with true.
*
* @example
* ```tsx
* // Disable a button that needs JS to work.
* let hydrated = useHydrated()
* return (
* <button type="button" disabled={!hydrated} onClick={doSomethingCustom}>
* Click me
* </button>
* )
* ```
* @returns True if the JS has been hydrated already, false otherwise.
*/
function useHydrated() {
return react.default.useSyncExternalStore(subscribe, () => true, () => false);
}
function subscribe() {
return () => {};
}
//#endregion
exports.ClientOnly = ClientOnly;
exports.useHydrated = useHydrated;
//# sourceMappingURL=ClientOnly.cjs.map
@@ -0,0 +1,32 @@
export { JSON5ParseOptions, JSON5StringifyOptions, parseJSON5, stringifyJSON5 } from './json5.mjs';
export { JSONCParseError, JSONCParseOptions, parseJSONC, stringifyJSONC } from './jsonc.mjs';
export { YAMLParseOptions, YAMLStringifyOptions, parseYAML, stringifyYAML } from './yaml.mjs';
import { F as FormatOptions } from './shared/confbox.9745c98f.mjs';
export { parseTOML, stringifyTOML } from './toml.mjs';
/**
* Converts a [JSON](https://www.json.org/json-en.html) string into an object.
*
* Indentation status is auto-detected and preserved when stringifying back using `stringifyJSON`
*/
declare function parseJSON<T = unknown>(text: string, options?: JSONParseOptions): T;
/**
* Converts a JavaScript value to a [JSON](https://www.json.org/json-en.html) string.
*
* Indentation status is auto detected and preserved when using value from parseJSON.
*/
declare function stringifyJSON(value: any, options?: JSONStringifyOptions): string;
interface JSONParseOptions extends FormatOptions {
/**
* A function that transforms the results. This function is called for each member of the object.
*/
reviver?: (this: any, key: string, value: any) => any;
}
interface JSONStringifyOptions extends FormatOptions {
/**
* A function that transforms the results. This function is called for each member of the object.
*/
replacer?: (this: any, key: string, value: any) => any;
}
export { type JSONParseOptions, type JSONStringifyOptions, parseJSON, stringifyJSON };
@@ -0,0 +1,13 @@
import { ReadableStreamPlugin } from 'seroval-plugins/web'
import { ShallowErrorPlugin } from './ShallowErrorPlugin'
import { RawStreamSSRPlugin } from './RawStream'
import type { RawStream } from './RawStream'
import type { Plugin } from 'seroval'
export const defaultSerovalPlugins = [
ShallowErrorPlugin as Plugin<Error, any>,
// RawStreamSSRPlugin must come before ReadableStreamPlugin to match first
RawStreamSSRPlugin as Plugin<RawStream, any>,
// ReadableStreamNode is not exported by seroval
ReadableStreamPlugin as Plugin<ReadableStream, any>,
]
@@ -0,0 +1,218 @@
/**
* Experimental KDF for AES.
* @module
*/
import { hkdf } from "./hkdf.js";
import { pbkdf2 as _pbkdf2 } from "./pbkdf2.js";
import { scrypt as _scrypt } from "./scrypt.js";
import { sha256 } from "./sha2.js";
import { abytes, bytesToHex, clean, createView, hexToBytes, kdfInputToBytes, } from "./utils.js";
// A tiny KDF for various applications like AES key-gen.
// Uses HKDF in a non-standard way, so it's not "KDF-secure", only "PRF-secure".
// Which is good enough: assume sha2-256 retained preimage resistance.
// Fixed ESKDF scrypt work factor: interactive-latency target with about 512 MiB RAM per derivation.
const SCRYPT_FACTOR = /* @__PURE__ */ (() => 2 ** 19)();
// Fixed ESKDF PBKDF2 work factor: CPU-only companion branch in the same rough
// interactive-latency range.
const PBKDF2_FACTOR = /* @__PURE__ */ (() => 2 ** 17)();
/**
* Scrypt KDF with the fixed ESKDF policy tuple `{ N: 2^19, r: 8, p: 1, dkLen: 32 }`.
* @param password - user password string, UTF-8 encoded before entering RFC 7914
* @param salt - unique salt string, UTF-8 encoded before entering RFC 7914
* @returns Derived 32-byte key.
* @example
* Derive the 32-byte scrypt key used by ESKDF.
* ```ts
* scrypt('password123', 'user@example.com');
* ```
*/
export function scrypt(password, salt) {
return _scrypt(password, salt, { N: SCRYPT_FACTOR, r: 8, p: 1, dkLen: 32 });
}
/**
* PBKDF2-HMAC-SHA256 with the fixed ESKDF policy tuple `{ sha256, c: 2^17, dkLen: 32 }`.
* @param password - user password string, UTF-8 encoded before entering PBKDF2-HMAC-SHA-256
* @param salt - unique salt string, UTF-8 encoded before entering PBKDF2-HMAC-SHA-256
* @returns Derived 32-byte key.
* @example
* Derive the 32-byte PBKDF2 key used by ESKDF.
* ```ts
* pbkdf2('password123', 'user@example.com');
* ```
*/
export function pbkdf2(password, salt) {
return _pbkdf2(sha256, password, salt, { c: PBKDF2_FACTOR, dkLen: 32 });
}
// Combines two 32-byte byte arrays into a fresh 32-byte result without aliasing either input.
function xor32(a, b) {
abytes(a, 32);
abytes(b, 32);
const arr = new Uint8Array(32);
for (let i = 0; i < 32; i++) {
arr[i] = a[i] ^ b[i];
}
return arr;
}
// All local string length checks are in JS UTF-16 code units, not UTF-8 bytes.
function strHasLength(str, min, max) {
return typeof str === 'string' && str.length >= min && str.length <= max;
}
/**
* Derives main seed. Takes a lot of time; prefer the higher-level `eskdf(...)`
* flow unless you specifically need the raw main seed.
* Derives the main seed by xor'ing two branches:
* the scrypt branch uses a `0x01` separator byte on username/password,
* and the PBKDF2 branch uses `0x02`.
* Username and password strings are encoded by the underlying KDFs after the
* local separator bytes are appended.
* @param username - account identifier used as public salt
* @param password - user password string
* @returns Main 32-byte seed for the account.
* @throws If the username or password length is invalid. {@link Error}
* @example
* Derive the main ESKDF seed from username and password.
* ```ts
* deriveMainSeed('example-user', 'example-password');
* ```
*/
export function deriveMainSeed(username, password) {
if (!strHasLength(username, 8, 255))
throw new Error('invalid username');
if (!strHasLength(password, 8, 255))
throw new Error('invalid password');
// Keep the protocol separators as the literal bytes 0x01 / 0x02 even after minification.
// Embedding them as non-printable characters directly can be awkward across
// JS tooling and environments.
const codes = { _1: 1, _2: 2 };
const sep = { s: String.fromCharCode(codes._1), p: String.fromCharCode(codes._2) };
const scr = scrypt(password + sep.s, username + sep.s);
const pbk = pbkdf2(password + sep.p, username + sep.p);
const res = xor32(scr, pbk);
clean(scr, pbk);
return res;
}
/**
* Converts protocol & accountId pair to HKDF params:
* `info` is UTF-8 protocol bytes, numeric ids become 4-byte BE `salt`,
* and string ids become UTF-8 `salt` bytes.
*/
function getSaltInfo(protocol, accountId = 0) {
// Note that length here also repeats two lines below
// We do an additional length check here to reduce the scope of DoS attacks
if (!(strHasLength(protocol, 3, 15) && /^[a-z0-9]{3,15}$/.test(protocol))) {
throw new Error('invalid protocol');
}
// Exact-match only: substring matches like `assh` / `mentor` must not widen the public whitelist.
const allowsStr = /^(password\d{0,3}|ssh|tor|file)$/.test(protocol);
let salt; // Assigned below: either 4-byte BE account bytes or UTF-8 account bytes.
if (typeof accountId === 'string') {
if (!allowsStr)
throw new Error('accountId must be a number');
if (!strHasLength(accountId, 1, 255))
throw new Error('accountId must be string of length 1..255');
salt = kdfInputToBytes(accountId);
}
else if (Number.isSafeInteger(accountId)) {
if (accountId < 0 || accountId > Math.pow(2, 32) - 1)
throw new Error('invalid accountId');
// Convert to Big Endian Uint32
salt = new Uint8Array(4);
createView(salt).setUint32(0, accountId, false);
}
else {
throw new Error('accountId must be a number' + (allowsStr ? ' or string' : ''));
}
const info = kdfInputToBytes(protocol);
return { salt, info };
}
// Local modulus-size helper, not a general bigint-byte-length primitive:
// `<= 128n` is rejected by ESKDF policy.
function countBytes(num) {
if (typeof num !== 'bigint' || num <= BigInt(128))
throw new Error('invalid number');
return Math.ceil(num.toString(2).length / 8);
}
/**
* Parses keyLength and modulus options to extract length of result key.
* If modulus is used, adds 64 bits to it per the FIPS 186-5 Appendix A.3.1 /
* A.4.1 extra-bits guidance.
*/
function getKeyLength(options) {
if (!options || typeof options !== 'object')
return 32;
const hasLen = 'keyLength' in options;
const hasMod = 'modulus' in options;
if (hasLen && hasMod)
throw new Error('cannot combine keyLength and modulus options');
if (!hasLen && !hasMod)
throw new Error('must have either keyLength or modulus option');
// FIPS 186-5 Appendix A.3.1 / A.4.1 calls for at least 64 extra bits.
const l = hasMod ? countBytes(options.modulus) + 8 : options.keyLength;
if (!(typeof l === 'number' && l >= 16 && l <= 8192))
throw new Error('invalid keyLength');
return l;
}
/**
* Converts key to bigint and divides it by modulus. Big Endian.
* Adapts FIPS 186-5 Appendix A.4.1: `getKeyLength()` already requested the
* extra 64-bit margin, and this step maps the result into `1..modulus-1`.
*/
function modReduceKey(key, modulus) {
const _1 = BigInt(1);
const num = BigInt('0x' + bytesToHex(key)); // check for ui8a, then bytesToNumber()
const res = (num % (modulus - _1)) + _1; // Remove 0 from output
if (res < _1)
throw new Error('expected positive number'); // Guard against bad values
// Strip the extra 64-bit margin that `getKeyLength()` requested
// for bias reduction.
const len = key.length - 8;
const hex = res.toString(16).padStart(len * 2, '0'); // numberToHex()
const bytes = hexToBytes(hex);
if (bytes.length !== len)
throw new Error('invalid length of result key');
return bytes;
}
/**
* ESKDF
* @param username - username, email, or identifier, min: 8 characters, should have enough entropy
* @param password - password, min: 8 characters, should have enough entropy
* @returns Frozen API that derives child keys and exposes the account fingerprint.
* @throws If the username or password length is invalid. {@link Error}
* @example
* Derive account-specific child keys from the main ESKDF seed.
* ```ts
* const kdf = await eskdf('example-university', 'beginning-new-example');
* const key = kdf.deriveChildKey('aes', 0);
* const fingerprint = kdf.fingerprint;
* kdf.expire();
* ```
*/
export async function eskdf(username, password) {
// We are using closure + object instead of class because
// we want to make `seed` non-accessible for any external function.
let seed = deriveMainSeed(username, password);
function deriveCK(protocol, accountId = 0, options) {
// Reject expired instances before deriving any HKDF inputs from the closure-held seed.
abytes(seed, 32);
const { salt, info } = getSaltInfo(protocol, accountId); // validate protocol & accountId
// Validate option shape and coarse length bounds;
// `hkdf()` still rejects non-integer lengths.
const keyLength = getKeyLength(options);
const key = hkdf(sha256, seed, salt, info, keyLength);
// Modulus has already been validated
return options && 'modulus' in options ? modReduceKey(key, options.modulus) : key;
}
function expire() {
// Overwrite the closure-held seed before dropping the reference.
if (seed)
seed.fill(1);
seed = undefined;
}
// prettier-ignore
const fingerprint = Array.from(deriveCK('fingerprint', 0))
.slice(0, 6)
.map((char) => char.toString(16).padStart(2, '0').toUpperCase())
.join(':');
return Object.freeze({ deriveChildKey: deriveCK, expire, fingerprint });
}
//# sourceMappingURL=eskdf.js.map
@@ -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 SquareArrowUp = createLucideIcon("SquareArrowUp", [
["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", key: "afitv7" }],
["path", { d: "m16 12-4-4-4 4", key: "177agl" }],
["path", { d: "M12 16V8", key: "1sbj14" }]
]);
export { SquareArrowUp as default };
//# sourceMappingURL=square-arrow-up.js.map
@@ -0,0 +1,3 @@
import * as React from 'react';
import { Importer, SideCarHOC } from './types';
export declare function sidecar<T>(importer: Importer<T>, errorComponent?: React.ReactNode): React.FunctionComponent<Omit<T, 'sideCar'> & SideCarHOC<Omit<T, 'sideCar'>>>;
@@ -0,0 +1,55 @@
const require_constants = require("../constants.cjs");
let seroval = require("seroval");
//#region src/ssr/serializer/transformer.ts
/**
* Create a strongly-typed serialization adapter for SSR hydration.
* Use to register custom types with the router serializer.
*/
function createSerializationAdapter(opts) {
return opts;
}
/** Create a Seroval plugin for server-side serialization only. */
/* @__NO_SIDE_EFFECTS__ */
function makeSsrSerovalPlugin(serializationAdapter, options) {
return /* @__PURE__ */ (0, seroval.createPlugin)({
tag: "$TSR/t/" + serializationAdapter.key,
test: serializationAdapter.test,
parse: { stream(value, ctx, _data) {
return { v: ctx.parse(serializationAdapter.toSerializable(value)) };
} },
serialize(node, ctx, _data) {
options.didRun = true;
return require_constants.GLOBAL_TSR + ".t.get(\"" + serializationAdapter.key + "\")(" + ctx.serialize(node.v) + ")";
},
deserialize: void 0
});
}
/** Create a Seroval plugin for client/server symmetric (de)serialization. */
/* @__NO_SIDE_EFFECTS__ */
function makeSerovalPlugin(serializationAdapter) {
return /* @__PURE__ */ (0, seroval.createPlugin)({
tag: "$TSR/t/" + serializationAdapter.key,
test: serializationAdapter.test,
parse: {
sync(value, ctx, _data) {
return { v: ctx.parse(serializationAdapter.toSerializable(value)) };
},
async async(value, ctx, _data) {
return { v: await ctx.parse(serializationAdapter.toSerializable(value)) };
},
stream(value, ctx, _data) {
return { v: ctx.parse(serializationAdapter.toSerializable(value)) };
}
},
serialize: void 0,
deserialize(node, ctx, _data) {
return serializationAdapter.fromSerializable(ctx.deserialize(node.v));
}
});
}
//#endregion
exports.createSerializationAdapter = createSerializationAdapter;
exports.makeSerovalPlugin = makeSerovalPlugin;
exports.makeSsrSerovalPlugin = makeSsrSerovalPlugin;
//# sourceMappingURL=transformer.cjs.map
@@ -0,0 +1,20 @@
import { HonoBase as Hono$1, HonoOptions } from "./hono-base.js";
import { BlankEnv, BlankSchema, Env, Schema } from "./types.js";
//#region src/hono.d.ts
/**
* The Hono class extends the functionality of the HonoBase class.
* It sets up routing and allows for custom options to be passed.
*
* @template E - The environment type.
* @template S - The schema type.
* @template BasePath - The base path type.
*/
export declare class Hono<E extends Env = BlankEnv, S extends Schema = BlankSchema, BasePath extends string = '/'> extends Hono$1<E, S, BasePath> {
/**
* Creates an instance of the Hono class.
*
* @param options - Optional configuration options for the Hono instance.
*/
constructor(options?: HonoOptions<E>);
}
//#endregion
@@ -0,0 +1 @@
{"version":3,"names":["_classApplyDescriptorDestructureSet","receiver","descriptor","set","__destrObj","value","v","call","writable","TypeError"],"sources":["../../src/helpers/classApplyDescriptorDestructureSet.js"],"sourcesContent":["/* @minVersion 7.13.10 */\n/* @onlyBabel7 */\n\nexport default function _classApplyDescriptorDestructureSet(\n receiver,\n descriptor,\n) {\n if (descriptor.set) {\n if (!(\"__destrObj\" in descriptor)) {\n descriptor.__destrObj = {\n set value(v) {\n descriptor.set.call(receiver, v);\n },\n };\n }\n return descriptor.__destrObj;\n } else {\n if (!descriptor.writable) {\n // This should only throw in strict mode, but class bodies are\n // always strict and private fields can only be used inside\n // class bodies.\n throw new TypeError(\"attempted to set read only private field\");\n }\n\n return descriptor;\n }\n}\n"],"mappings":";;;;;;AAGe,SAASA,mCAAmCA,CACzDC,QAAQ,EACRC,UAAU,EACV;EACA,IAAIA,UAAU,CAACC,GAAG,EAAE;IAClB,IAAI,EAAE,YAAY,IAAID,UAAU,CAAC,EAAE;MACjCA,UAAU,CAACE,UAAU,GAAG;QACtB,IAAIC,KAAKA,CAACC,CAAC,EAAE;UACXJ,UAAU,CAACC,GAAG,CAACI,IAAI,CAACN,QAAQ,EAAEK,CAAC,CAAC;QAClC;MACF,CAAC;IACH;IACA,OAAOJ,UAAU,CAACE,UAAU;EAC9B,CAAC,MAAM;IACL,IAAI,CAACF,UAAU,CAACM,QAAQ,EAAE;MAIxB,MAAM,IAAIC,SAAS,CAAC,0CAA0C,CAAC;IACjE;IAEA,OAAOP,UAAU;EACnB;AACF","ignoreList":[]}
@@ -0,0 +1 @@
{"version":3,"file":"matching.cjs","sources":["../../../src/matcher/sequence/matching.ts"],"sourcesContent":[null],"names":["MatchSequence","MatcherBaseClass","constructor","MAX_DELTA","match","password","result","length","i","lastDelta","passwordLength","k","delta","charCodeAt","j","update","Math","abs","absoluteDelta","token","slice","sequenceName","sequenceSpace","getSequence","push","pattern","ascending","ALL_LOWER","test","ALL_UPPER","ALL_DIGIT"],"mappings":";;;;;AAYA;;;;AAIG;AACH,MAAMA,aAAc,SAAQC,sBAAgB,CAAA;AAA5CC,EAAAA,WAAAA,GAAA;;IACE,IAAA,CAAAC,SAAS,GAAG,CAAC;AA8Ff,EAAA;AA5FE;AACAC,EAAAA,KAAKA,CAAC;AAAEC,IAAAA;AAAQ,GAAwB,EAAA;AACtC;;;;;;;;;;;;;AAaG;IACH,MAAMC,MAAM,GAAoB,EAAE;AAClC,IAAA,IAAID,QAAQ,CAACE,MAAM,KAAK,CAAC,EAAE;AACzB,MAAA,OAAO,EAAE;AACX,IAAA;IACA,IAAIC,CAAC,GAAG,CAAC;IACT,IAAIC,SAAS,GAAkB,IAAI;AACnC,IAAA,MAAMC,cAAc,GAAGL,QAAQ,CAACE,MAAM;AACtC,IAAA,KAAK,IAAII,CAAC,GAAG,CAAC,EAAEA,CAAC,GAAGD,cAAc,EAAEC,CAAC,IAAI,CAAC,EAAE;AAC1C,MAAA,MAAMC,KAAK,GAAGP,QAAQ,CAACQ,UAAU,CAACF,CAAC,CAAC,GAAGN,QAAQ,CAACQ,UAAU,CAACF,CAAC,GAAG,CAAC,CAAC;MACjE,IAAIF,SAAS,KAAK,IAAI,EAAE;AACtBA,QAAAA,SAAS,GAAGG,KAAK;AACnB,MAAA;MACA,IAAIA,KAAK,KAAKH,SAAS,EAAE;AACvB,QAAA,MAAMK,CAAC,GAAGH,CAAC,GAAG,CAAC;QACf,IAAI,CAACI,MAAM,CAAC;UACVP,CAAC;UACDM,CAAC;AACDF,UAAAA,KAAK,EAAEH,SAAS;UAChBJ,QAAQ;AACRC,UAAAA;AACD,SAAA,CAAC;AACFE,QAAAA,CAAC,GAAGM,CAAC;AACLL,QAAAA,SAAS,GAAGG,KAAK;AACnB,MAAA;AACF,IAAA;IACA,IAAI,CAACG,MAAM,CAAC;MACVP,CAAC;MACDM,CAAC,EAAEJ,cAAc,GAAG,CAAC;AACrBE,MAAAA,KAAK,EAAEH,SAAU;MACjBJ,QAAQ;AACRC,MAAAA;AACD,KAAA,CAAC;AACF,IAAA,OAAOA,MAAM;AACf,EAAA;AAEAS,EAAAA,MAAMA,CAAC;IAAEP,CAAC;IAAEM,CAAC;IAAEF,KAAK;IAAEP,QAAQ;AAAEC,IAAAA;AAAM,GAAgB,EAAA;AACpD,IAAA,IAAIQ,CAAC,GAAGN,CAAC,GAAG,CAAC,IAAIQ,IAAI,CAACC,GAAG,CAACL,KAAK,CAAC,KAAK,CAAC,EAAE;AACtC,MAAA,MAAMM,aAAa,GAAGF,IAAI,CAACC,GAAG,CAACL,KAAK,CAAC;MACrC,IAAIM,aAAa,GAAG,CAAC,IAAIA,aAAa,IAAI,IAAI,CAACf,SAAS,EAAE;AACxD,QAAA,MAAMgB,KAAK,GAAGd,QAAQ,CAACe,KAAK,CAACZ,CAAC,EAAEM,CAAC,GAAG,CAAC,IAAI,GAAG,CAAC;QAC7C,MAAM;UAAEO,YAAY;AAAEC,UAAAA;AAAa,SAAE,GAAG,IAAI,CAACC,WAAW,CAACJ,KAAK,CAAC;QAC/D,OAAOb,MAAM,CAACkB,IAAI,CAAC;AACjBC,UAAAA,OAAO,EAAE,UAAU;UACnBjB,CAAC;UACDM,CAAC;AACDK,UAAAA,KAAK,EAAEd,QAAQ,CAACe,KAAK,CAACZ,CAAC,EAAEM,CAAC,GAAG,CAAC,IAAI,GAAG,CAAC;UACtCO,YAAY;UACZC,aAAa;UACbI,SAAS,EAAEd,KAAK,GAAG;AACpB,SAAA,CAAC;AACJ,MAAA;AACF,IAAA;AACA,IAAA,OAAO,IAAI;AACb,EAAA;EAEAW,WAAWA,CAACJ,KAAa,EAAA;AACvB;AACA;IACA,IAAIE,YAAY,GAAG,SAAS;IAC5B,IAAIC,aAAa,GAAG,EAAE;AAEtB,IAAA,IAAIK,gBAAS,CAACC,IAAI,CAACT,KAAK,CAAC,EAAE;AACzBE,MAAAA,YAAY,GAAG,OAAO;AACtBC,MAAAA,aAAa,GAAG,EAAE;IACpB,CAAC,MAAM,IAAIO,gBAAS,CAACD,IAAI,CAACT,KAAK,CAAC,EAAE;AAChCE,MAAAA,YAAY,GAAG,OAAO;AACtBC,MAAAA,aAAa,GAAG,EAAE;IACpB,CAAC,MAAM,IAAIQ,gBAAS,CAACF,IAAI,CAACT,KAAK,CAAC,EAAE;AAChCE,MAAAA,YAAY,GAAG,QAAQ;AACvBC,MAAAA,aAAa,GAAG,EAAE;AACpB,IAAA;IACA,OAAO;MACLD,YAAY;AACZC,MAAAA;KACD;AACH,EAAA;AACD;;;;"}
@@ -0,0 +1 @@
module.exports={C:{"64":0.00364,"72":0.00364,"79":0.00364,"88":0.00364,"102":0.00727,"112":0.00364,"115":0.18175,"120":0.05453,"121":0.12359,"122":0.00364,"124":0.01818,"125":0.01454,"130":0.00364,"131":0.00364,"135":0.00364,"136":0.00727,"138":0.00364,"140":0.02545,"142":0.01454,"143":0.00364,"144":0.00364,"145":0.00364,"149":0.00364,"150":0.02181,"151":0.01454,"152":0.00727,"153":0.01818,"154":0.17812,"155":0.57797,"156":0.60705,"157":0.03272,_:"2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 65 66 67 68 69 70 71 73 74 75 76 77 78 80 81 82 83 84 85 86 87 89 90 91 92 93 94 95 96 97 98 99 100 101 103 104 105 106 107 108 109 110 111 113 114 116 117 118 119 123 126 127 128 129 132 133 134 137 139 141 146 147 148 158 159 160 3.5 3.6"},D:{"49":0.01454,"56":0.00364,"66":0.00727,"69":0.01091,"70":0.00364,"74":0.03272,"77":0.00364,"78":0.02545,"81":0.07997,"86":0.00727,"87":0.00727,"89":0.00364,"93":0.00727,"96":0.00727,"98":0.00364,"101":0.00364,"103":0.01454,"104":0.01091,"105":0.01454,"106":0.01454,"107":0.01091,"108":0.02181,"109":0.27263,"110":0.01454,"111":0.0618,"112":0.01818,"114":0.01091,"116":0.05816,"117":0.01818,"118":0.40349,"119":0.12359,"120":0.17448,"121":0.00364,"122":0.01454,"123":0.00727,"124":0.02908,"125":0.00364,"126":0.00364,"127":0.00364,"128":0.04362,"129":0.00364,"130":0.02545,"131":0.04726,"132":0.01091,"133":0.1345,"134":0.13086,"135":0.11632,"136":0.11996,"137":0.13086,"138":0.14904,"139":0.11632,"140":0.1345,"141":0.14904,"142":0.45801,"143":0.00727,"144":0.01454,"145":0.01454,"146":0.10905,"147":0.04362,"148":0.08724,"149":0.0618,"150":0.22901,"151":1.23954,"152":6.92831,"153":5.7324,"154":1.06869,"155":0.00727,_:"4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 50 51 52 53 54 55 57 58 59 60 61 62 63 64 65 67 68 71 72 73 75 76 79 80 83 84 85 88 90 91 92 94 95 97 99 100 102 113 115 156 157"},F:{"45":0.00364,"67":0.00364,"79":0.00364,"80":0.00364,"95":0.00727,"99":0.00364,"100":0.00364,"101":0.01091,"105":0.00727,"106":0.00727,"113":0.00364,"114":0.03635,"116":0.00364,"119":0.00364,"121":0.00364,"133":0.01454,"134":0.06907,"135":0.70883,_:"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 46 47 48 49 50 51 52 53 54 55 56 57 58 60 62 63 64 65 66 68 69 70 71 72 73 74 75 76 77 78 81 82 83 84 85 86 87 88 89 90 91 92 93 94 96 97 98 102 103 104 107 108 109 110 111 112 115 117 118 120 122 123 124 125 126 127 131 132 9.5-9.6 10.0-10.1 10.5 10.6 11.1 11.5 11.6 12.1"},B:{"14":0.00364,"16":0.00364,"18":0.00727,"83":0.00727,"90":0.00364,"92":0.02545,"100":0.01091,"109":0.00727,"119":0.05453,"120":0.05816,"122":0.01818,"123":0.01454,"124":0.01818,"127":0.00364,"128":0.00727,"132":0.00364,"133":0.00727,"135":0.00364,"136":0.00727,"137":0.00364,"138":0.00364,"139":0.00727,"140":0.00727,"141":0.00727,"142":0.00364,"143":0.00727,"144":0.03999,"145":0.01091,"146":0.00727,"147":0.02908,"148":0.01818,"149":0.03635,"150":0.0727,"151":0.37077,"152":2.23189,"153":2.70808,"154":0.64703,_:"12 13 15 17 79 80 81 84 85 86 87 88 89 91 93 94 95 96 97 98 99 101 102 103 104 105 106 107 108 110 111 112 113 114 115 116 117 118 121 125 126 129 130 131 134"},E:{"11":0.00364,"27":0.12723,_:"4 5 6 7 8 9 10 12 13 14 15 3.1 3.2 5.1 6.1 7.1 9.1 10.1 11.1 12.1 15.1 15.2-15.3 15.4 15.5 16.0 16.2 16.3 16.4 16.5 17.2 17.3 17.4 18.1 18.4 27.1 TP","13.1":0.00727,"14.1":0.01091,"15.6":0.05453,"16.1":0.02545,"16.6":0.0618,"17.0":0.00727,"17.1":0.01091,"17.5":0.01091,"17.6":0.05816,"18.0":0.00364,"18.2":0.00364,"18.3":0.03635,"18.5-18.7":0.00727,"26.0":0.02545,"26.1":0.00364,"26.2":0.02908,"26.3":0.04726,"26.4":0.15267,"26.5":0.13813,"26.6":0.60705,"27.2":0.00364},G:{"8":0,"3.2":0,"4.0-4.1":0,"4.2-4.3":0.00082,"5.0-5.1":0.00082,"6.0-6.1":0,"7.0-7.1":0.00163,"8.1-8.4":0,"9.0-9.2":0,"9.3":0,"10.0-10.2":0,"10.3":0.00817,"11.0-11.2":0.00082,"11.3-11.4":0.00163,"12.0-12.1":0,"12.2-12.5":0.02124,"13.0-13.1":0,"13.2":0.00408,"13.3":0,"13.4-13.7":0.00082,"14.0-14.4":0.00327,"14.5-14.8":0.0049,"15.0-15.1":0.0049,"15.2-15.3":0.00327,"15.4":0.00408,"15.5":0.0049,"15.6-15.8":0.10618,"16.0":0.00817,"16.1":0.0147,"16.2":0.00817,"16.3":0.01797,"16.4":0.00408,"16.5":0.00653,"16.6-16.7":0.14783,"17.0":0.00572,"17.1":0.00817,"17.2":0.00817,"17.3":0.01225,"17.4":0.01715,"17.5":0.03349,"17.6-17.7":0.08658,"18.0":0.01797,"18.1":0.03594,"18.2":0.04901,"18.3":0.08494,"18.4":0.05309,"18.5-18.7":1.09691,"26.0":0.05309,"26.1":0.05391,"26.2":0.14048,"26.3":0.15192,"26.4":0.11108,"26.5":0.74407,"26.6":4.591,"27.0":0.35202,"27.1":0,"27.2":0.00898},P:{"4":0.02848,"21":0.00949,"24":0.00949,"25":0.01898,"26":0.01898,"27":0.18984,"28":0.05695,"29":0.16136,"30":3.62591,_:"20 22 23 5.0-5.4 6.2-6.4 8.2 9.2 10.1 11.1-11.2 12.0 13.0 15.0 16.0 17.0 18.0 19.0","7.2-7.4":0.09492,"14.0":0.01898},I:{"0":0.00636,"3":0,"4":0Line truncated
@@ -0,0 +1,111 @@
import * as util from "../core/util.js";
const error = () => {
const Sizable = {
string: { unit: "अक्षर", verb: "रखने के लिए" },
file: { unit: "बाइट्स", verb: "रखने के लिए" },
array: { unit: "तत्व", verb: "रखने के लिए" },
set: { unit: "तत्व", verb: "रखने के लिए" },
map: { unit: "प्रविष्टियाँ", verb: "रखने के लिए" },
};
function getSizing(origin) {
return Sizable[origin] ?? null;
}
const FormatDictionary = {
regex: "इनपुट",
email: "ईमेल पता",
url: "URL",
emoji: "इमोजी",
uuid: "UUID",
uuidv4: "UUIDv4",
uuidv6: "UUIDv6",
nanoid: "nanoid",
guid: "GUID",
cuid: "cuid",
cuid2: "cuid2",
ulid: "ULID",
xid: "XID",
ksuid: "KSUID",
datetime: "ISO तिथि और समय",
date: "ISO तिथि",
time: "ISO समय",
duration: "ISO अवधि",
ipv4: "IPv4 पता",
ipv6: "IPv6 पता",
mac: "MAC पता",
cidrv4: "IPv4 श्रेणी",
cidrv6: "IPv6 श्रेणी",
base64: "Base64-एन्कोडेड स्ट्रिंग",
base64url: "Base64URL-एन्कोडेड स्ट्रिंग",
json_string: "JSON स्ट्रिंग",
e164: "E.164 संख्या",
credit_card: "क्रेडिट कार्ड संख्या",
currency_code: "मुद्रा कोड",
iban: "IBAN",
jwt: "JWT",
template_literal: "इनपुट",
};
const TypeDictionary = {
nan: "NaN",
};
return (issue) => {
switch (issue.code) {
case "invalid_type": {
const expected = TypeDictionary[issue.expected] ?? issue.expected;
const receivedType = util.parsedType(issue.input);
const received = TypeDictionary[receivedType] ?? receivedType;
return `अमान्य इनपुट: अपेक्षित ${expected}, प्राप्त ${received}`;
}
case "invalid_value":
if (issue.values.length === 1)
return `अमान्य इनपुट: अपेक्षित ${util.stringifyPrimitive(issue.values[0])}`;
return `अमान्य विकल्प: अपेक्षित मानों में से एक ${util.joinValues(issue.values, "|")}`;
case "too_big": {
const adj = issue.inclusive ? "<=" : "<";
const sizing = getSizing(issue.origin);
if (sizing)
return `बहुत बड़ा: अपेक्षित था कि ${issue.origin ?? "मान"} में ${adj}${issue.maximum} ${sizing.unit} हों`;
return `बहुत बड़ा: अपेक्षित था कि ${issue.origin ?? "मान"} ${adj}${issue.maximum} हो`;
}
case "too_small": {
const adj = issue.inclusive ? ">=" : ">";
const sizing = getSizing(issue.origin);
if (sizing)
return `बहुत छोटा: अपेक्षित था कि ${issue.origin} में ${adj}${issue.minimum} ${sizing.unit} हों`;
return `बहुत छोटा: अपेक्षित था कि ${issue.origin} ${adj}${issue.minimum} हो`;
}
case "invalid_format": {
const _issue = issue;
if (_issue.format === "starts_with")
return `अमान्य स्ट्रिंग: "${_issue.prefix}" से शुरू होना चाहिए`;
if (_issue.format === "ends_with")
return `अमान्य स्ट्रिंग: "${_issue.suffix}" पर समाप्त होना चाहिए`;
if (_issue.format === "includes")
return `अमान्य स्ट्रिंग: इसमें "${_issue.includes}" शामिल होना चाहिए`;
if (_issue.format === "regex")
return `अमान्य स्ट्रिंग: पैटर्न ${_issue.pattern} से मेल खाना चाहिए`;
return `अमान्य ${FormatDictionary[_issue.format] ?? issue.format}`;
}
case "not_multiple_of":
return `अमान्य संख्या: यह ${issue.divisor} का गुणज होना चाहिए`;
case "unrecognized_keys":
return `अपरिचित कुंजी${issue.keys.length > 1 ? "याँ" : ""}: ${util.joinValues(issue.keys, ", ")}`;
case "invalid_key":
return `अमान्य कुंजी: ${issue.origin} में`;
case "invalid_union":
if (issue.options && Array.isArray(issue.options) && issue.options.length > 0) {
const opts = issue.options.map((o) => `'${o}'`).join(" | ");
return `अमान्य डिस्क्रिमिनेटर मान: अपेक्षित ${opts}`;
}
return "अमान्य इनपुट";
case "invalid_element":
return `अमान्य मान: ${issue.origin} में`;
default:
return `अमान्य इनपुट`;
}
};
};
export default function () {
return {
localeError: error(),
};
}
@@ -0,0 +1,163 @@
# detect-libc
Node.js module to detect details of the C standard library (libc)
implementation provided by a given Linux system.
Currently supports detection of GNU glibc and MUSL libc.
Provides asychronous and synchronous functions for the
family (e.g. `glibc`, `musl`) and version (e.g. `1.23`, `1.2.3`).
The version numbers of libc implementations
are not guaranteed to be semver-compliant.
For previous v1.x releases, please see the
[v1](https://github.com/lovell/detect-libc/tree/v1) branch.
## Install
```sh
npm install detect-libc
```
## API
### GLIBC
```ts
const GLIBC: string = 'glibc';
```
A String constant containing the value `glibc`.
### MUSL
```ts
const MUSL: string = 'musl';
```
A String constant containing the value `musl`.
### family
```ts
function family(): Promise<string | null>;
```
Resolves asychronously with:
* `glibc` or `musl` when the libc family can be determined
* `null` when the libc family cannot be determined
* `null` when run on a non-Linux platform
```js
const { family, GLIBC, MUSL } = require('detect-libc');
switch (await family()) {
case GLIBC: ...
case MUSL: ...
case null: ...
}
```
### familySync
```ts
function familySync(): string | null;
```
Synchronous version of `family()`.
```js
const { familySync, GLIBC, MUSL } = require('detect-libc');
switch (familySync()) {
case GLIBC: ...
case MUSL: ...
case null: ...
}
```
### version
```ts
function version(): Promise<string | null>;
```
Resolves asychronously with:
* The version when it can be determined
* `null` when the libc family cannot be determined
* `null` when run on a non-Linux platform
```js
const { version } = require('detect-libc');
const v = await version();
if (v) {
const [major, minor, patch] = v.split('.');
}
```
### versionSync
```ts
function versionSync(): string | null;
```
Synchronous version of `version()`.
```js
const { versionSync } = require('detect-libc');
const v = versionSync();
if (v) {
const [major, minor, patch] = v.split('.');
}
```
### isNonGlibcLinux
```ts
function isNonGlibcLinux(): Promise<boolean>;
```
Resolves asychronously with:
* `false` when the libc family is `glibc`
* `true` when the libc family is not `glibc`
* `false` when run on a non-Linux platform
```js
const { isNonGlibcLinux } = require('detect-libc');
if (await isNonGlibcLinux()) { ... }
```
### isNonGlibcLinuxSync
```ts
function isNonGlibcLinuxSync(): boolean;
```
Synchronous version of `isNonGlibcLinux()`.
```js
const { isNonGlibcLinuxSync } = require('detect-libc');
if (isNonGlibcLinuxSync()) { ... }
```
## Licensing
Copyright 2017 Lovell Fuller and others.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at [http://www.apache.org/licenses/LICENSE-2.0](http://www.apache.org/licenses/LICENSE-2.0.html)
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
@@ -0,0 +1,464 @@
export default `tlf2a 3 3 8 -1 28 0 0 0
===============================================================================
This is "Future Smooth" (Future Smooth.flf), based on "Future" (future.tlf) by Sam Hocevar. This variant uses arcs instead of sharp corners to smooth out the font. Because heavy arc characters don't exist, the font uses light box drawings instead of heavy ones for consistency.
2006/10/01 -- Sam Hocevar <sam@hocevar.net>
font creation
still missing: # % ( ) * / < > \\ ^ ~
2006/10/02 -- Sam Hocevar <sam@hocevar.net>
added Unicode block and line glyphs
added: % ( ) * / \\ ~
fixed: & 2 5 X
2026/02/19 -- John Goodliff <johng.io>
replaced ┏ with ╭
replaced ┓ with ╮
replaced ┗ with ╰
replaced ┛ with ╯
replaced heavy box drawings with light box drawings
This font is free software. It comes without any warranty, to the extent
permitted by applicable law. You can redistribute it and/or modify it under
the terms of the Do What The Fuck You Want To Public License, Version 2,
as published by Sam Hocevar. See http://sam.zoy.org/wtfpl/COPYING for more
details.
Missing characters: # < > ^
This font is part of TOIlet’s official distribution. More information
on the TOIlet website at http://caca.zoy.org/wiki/toilet
===============================================================================
@
@
@@
╷!
╵!
╵!!
╷╷"
"
""
@
@
#@@
╭┬╮$
╰┼╮$
╰┴╯$$
╭╮╷%
╭─╯%
╵╰╯%%
╭╮ &
│╶┼╴&
╰─╯ &&
╷'
'
''
╭╴(
│ (
╰╴((
╶╮)
│)
╶╯))
╷ ╷*
╶┼╴*
╵ ╵**
╷ +
╶┼╴+
╵ ++
,
,
╯,,
-
╶─╴-
--
.
.
╵..
╷/
╭╯/
╵ //
╭─╮0
│││0
╰─╯00
╶╮ 1
│ 1
╶┴╴11
╭─╮2
╭─╯2
╰─╴22
╭─╮3
╶─┤3
╰─╯33
╷ ╷4
╰─┤4
╵44
╭─╴5
╰─╮5
╰─╯55
╭─╮6
├─╮6
╰─╯66
╭─╮7
│7
╵77
╭─╮8
├─┤8
╰─╯88
╭─╮9
╰─┤9
╰─╯99
:
╵:
╵::
;
╵;
╯;;
@
@
<@@
=
╶─╴=
╶─╴==
@
@
>@@
╭─╮?
╶╯?
╵ ??
╭─╮@
│├╯@
╰─╴@@
╭─╮A
├─┤A
╵ ╵AA
╭╮ B
├┴╮B
╰─╯BB
╭─╴C
│ C
╰─╴CC
╶┬╮D
││D
╶┴╯DD
╭─╴E
├╴ E
╰─╴EE
╭─╴F
├╴ F
╵ FF
╭─╴G
│╶╮G
╰─╯GG
╷ ╷H
├─┤H
╵ ╵HH
╷I
│I
╵II
╭╮J
│J
╰─╯JJ
╷╭ K
├┴╮K
╵ ╵KK
╷ L
│ L
╰─╴LL
╭┬╮M
│││M
╵ ╵MM
╭╮╷N
│╰┤N
╵ ╵NN
╭─╮O
│ │O
╰─╯OO
╭─╮P
├─╯P
╵ PP
╭─╮Q
│╮│Q
╰┴╯QQ
╭─╮R
├┬╯R
╵╰╴RR
╭─╮S
╰─╮S
╰─╯SS
╶┬╴T
│ T
╵ TT
╷ ╷U
│ │U
╰─╯UU
╷ ╷V
│╭╯V
╰╯ VV
╷ ╷W
│╷│W
╰┴╯WW
╷ ╷X
╭┼╯X
╵ ╵XX
╷ ╷Y
╰┬╯Y
╵ YY
╶─╮Z
╭─╯Z
╰─╴ZZ
╭─ [
│ [
╰─ [[
╷ \\
╰╮\\
╵\\\\
─╮]
│]
─╯]]
@
@
^@@
_
_
╶─╴__
╮\`
\`
\`\`
╭─╮a
├─┤a
╵ ╵aa
╭╮ b
├┴╮b
╰─╯bb
╭─╴c
│ c
╰─╴cc
╶┬╮d
││d
╶┴╯dd
╭─╴e
├╴ e
╰─╴ee
╭─╴f
├╴ f
╵ ff
╭─╴g
│╶╮g
╰─╯gg
╷ ╷h
├─┤h
╵ ╵hh
╷i
│i
╵ii
╭╮j
│j
╰─╯jj
╷╭ k
├┴╮k
╵ ╵kk
╷ l
│ l
╰─╴ll
╭┬╮m
│││m
╵ ╵mm
╭╮╷n
│╰┤n
╵ ╵nn
╭─╮o
│ │o
╰─╯oo
╭─╮p
├─╯p
╵ pp
╭─╮q
│╮│q
╰┴╯qq
╭─╮r
├┬╯r
╵╰╴rr
╭─╮s
╰─╮s
╰─╯ss
╶┬╴t
│ t
╵ tt
╷ ╷u
│ │u
╰─╯uu
╷ ╷v
│╭╯v
╰╯ vv
╷ ╷w
│╷│w
╰┴╯ww
╷ ╷x
╭┼╯x
╵ ╵xx
╷ ╷y
╰┬╯y
╵ yy
╶─╮z
╭─╯z
╰─╴zz
╭╴{
╶┤ {
╰╴{{
╷|
│|
╵||
╶╮ }
├╴}
╶╯ }}
~
╭─╯~
~~
╭─╮╭─╴Ä
├─┤├╴ Ä
╵ ╵╰─╴ÄÄ
╭─╮╭─╴Ö
│ │├╴ Ö
╰─╯╰─╴ÖÖ
╷ ╷╭─╴Ü
│ │├╴ Ü
╰─╯╰─╴ÜÜ
╭─╮╭─╴ä
├─┤├╴ ä
╵ ╵╰─╴ää
╭─╮╭─╴ö
│ │├╴ ö
╰─╯╰─╴öö
╷ ╷╭─╴ü
│ │├╴ ü
╰─╯╰─╴üü
╭─╮╭─╮ß
╰─╮╰─╮ß
╰─╯╰─╯ßß
0x2500 ─ BOX DRAWINGS LIGHT HORIZONTAL
@
───@
@@
0x2501 ━ BOX DRAWINGS HEAVY HORIZONTAL
@
■■■@
@@
0x2502 │ BOX DRAWINGS LIGHT VERTICAL
│ @
│ @
│@@
0x2503 ┃ BOX DRAWINGS HEAVY VERTICAL
█ @
█ @
█@@
0x250C ┌ BOX DRAWINGS LIGHT DOWN AND RIGHT
@
╭─@
│ @@
0x250F ┏ BOX DRAWINGS HEAVY DOWN AND RIGHT
@
▄■@
█ @@
0x2510 ┐ BOX DRAWINGS LIGHT DOWN AND LEFT
@
─╮ @
│@@
0x2513 ┓ BOX DRAWINGS HEAVY DOWN AND LEFT
@
■▄ @
█@@
0x2514 └ BOX DRAWINGS LIGHT UP AND RIGHT
│ @
╰─@
@@
0x2517 ┗ BOX DRAWINGS HEAVY UP AND RIGHT
█ @
▀■@
@@
0x2518 ┘ BOX DRAWINGS LIGHT UP AND LEFT
│ @
─╯ @
@@
0x251B ┛ BOX DRAWINGS HEAVY UP AND LEFT
█ @
■▀ @
@@
0x251c ├ BOX DRAWINGS LIGHT VERTICAL AND RIGHT
│ @
├─@
│ @@
0x2523 ┣ BOX DRAWINGS HEAVY VERTICAL AND RIGHT
█ @
█■@
█ @@
0x2524 ┤ BOX DRAWINGS LIGHT VERTICAL AND LEFT
│ @
─┤ @
│@@
0x252B ┫ BOX DRAWINGS HEAVY VERTICAL AND LEFT
█ @
■█ @
█@@
0x252c ┬ BOX DRAWINGS LIGHT DOWN AND HORIZONTAL
@
─┬─@
│ @@
0x2533 ┳ BOX DRAWINGS HEAVY DOWN AND HORIZONTAL
@
■▄■@
█ @@
0x2534 ┴ BOX DRAWINGS LIGHT UP AND HORIZONTAL
│ @
─┴─@
@@
0x253B ┻ BOX DRAWINGS HEAVY UP AND HORIZONTAL
█ @
■▀■@
@@
0x253c ┼ BOX DRAWINGS LIGHT VERTICAL AND HORIZONTAL
│ @
─┼─@
│ @@
0x254B ╋ BOX DRAWINGS HEAVY VERTICAL AND HORIZONTAL
█ @
■█■@
█ @@
0x2578 ╸ BOX DRAWINGS HEAVY LEFT
@
■■ @
@@
0x2579 ╹ BOX DRAWINGS HEAVY UP
█ @
▀ @
@@
0x257A ╺ BOX DRAWINGS HEAVY RIGHT
@
■■@
@@
0x257B ╻ BOX DRAWINGS HEAVY DOWN
@
▄ @
█@@
0x2580 ▀ UPPER HALF BLOCK
███@
▀▀▀@
@@
0x2584 ▄ LOWER HALF BLOCK
@
▄▄▄@
███@
0x2588 █ FULL BLOCK
███@
███@
███@@
0x25A0 ■ BLACK SQUARE
▄▄▄@
███@
▀▀▀@@
0x5350 卐 CJK UNIFIED IDEOGRAPH-5350
╷╭╴@
╰┼╮@
╶╯╵@@
0x534D 卍 CJK UNIFIED IDEOGRAPH-534D
╶╮╷@
╭┼╯@
╵╰╴@@
`
@@ -0,0 +1,148 @@
import { OAuthErrorResponse } from '../../shared/auth.js';
/**
* Base class for all OAuth errors
*/
export declare class OAuthError extends Error {
readonly errorUri?: string | undefined;
static errorCode: string;
constructor(message: string, errorUri?: string | undefined);
/**
* Converts the error to a standard OAuth error response object
*/
toResponseObject(): OAuthErrorResponse;
get errorCode(): string;
}
/**
* Invalid request error - The request is missing a required parameter,
* includes an invalid parameter value, includes a parameter more than once,
* or is otherwise malformed.
*/
export declare class InvalidRequestError extends OAuthError {
static errorCode: string;
}
/**
* Invalid client error - Client authentication failed (e.g., unknown client, no client
* authentication included, or unsupported authentication method).
*/
export declare class InvalidClientError extends OAuthError {
static errorCode: string;
}
/**
* Invalid grant error - The provided authorization grant or refresh token is
* invalid, expired, revoked, does not match the redirection URI used in the
* authorization request, or was issued to another client.
*/
export declare class InvalidGrantError extends OAuthError {
static errorCode: string;
}
/**
* Unauthorized client error - The authenticated client is not authorized to use
* this authorization grant type.
*/
export declare class UnauthorizedClientError extends OAuthError {
static errorCode: string;
}
/**
* Unsupported grant type error - The authorization grant type is not supported
* by the authorization server.
*/
export declare class UnsupportedGrantTypeError extends OAuthError {
static errorCode: string;
}
/**
* Invalid scope error - The requested scope is invalid, unknown, malformed, or
* exceeds the scope granted by the resource owner.
*/
export declare class InvalidScopeError extends OAuthError {
static errorCode: string;
}
/**
* Access denied error - The resource owner or authorization server denied the request.
*/
export declare class AccessDeniedError extends OAuthError {
static errorCode: string;
}
/**
* Server error - The authorization server encountered an unexpected condition
* that prevented it from fulfilling the request.
*/
export declare class ServerError extends OAuthError {
static errorCode: string;
}
/**
* Temporarily unavailable error - The authorization server is currently unable to
* handle the request due to a temporary overloading or maintenance of the server.
*/
export declare class TemporarilyUnavailableError extends OAuthError {
static errorCode: string;
}
/**
* Unsupported response type error - The authorization server does not support
* obtaining an authorization code using this method.
*/
export declare class UnsupportedResponseTypeError extends OAuthError {
static errorCode: string;
}
/**
* Unsupported token type error - The authorization server does not support
* the requested token type.
*/
export declare class UnsupportedTokenTypeError extends OAuthError {
static errorCode: string;
}
/**
* Invalid token error - The access token provided is expired, revoked, malformed,
* or invalid for other reasons.
*/
export declare class InvalidTokenError extends OAuthError {
static errorCode: string;
}
/**
* Method not allowed error - The HTTP method used is not allowed for this endpoint.
* (Custom, non-standard error)
*/
export declare class MethodNotAllowedError extends OAuthError {
static errorCode: string;
}
/**
* Too many requests error - Rate limit exceeded.
* (Custom, non-standard error based on RFC 6585)
*/
export declare class TooManyRequestsError extends OAuthError {
static errorCode: string;
}
/**
* Invalid client metadata error - The client metadata is invalid.
* (Custom error for dynamic client registration - RFC 7591)
*/
export declare class InvalidClientMetadataError extends OAuthError {
static errorCode: string;
}
/**
* Insufficient scope error - The request requires higher privileges than provided by the access token.
*/
export declare class InsufficientScopeError extends OAuthError {
static errorCode: string;
}
/**
* Invalid target error - The requested resource is invalid, missing, unknown, or malformed.
* (Custom error for resource indicators - RFC 8707)
*/
export declare class InvalidTargetError extends OAuthError {
static errorCode: string;
}
/**
* A utility class for defining one-off error codes
*/
export declare class CustomOAuthError extends OAuthError {
private readonly customErrorCode;
constructor(customErrorCode: string, message: string, errorUri?: string);
get errorCode(): string;
}
/**
* A full list of all OAuthErrors, enabling parsing from error responses
*/
export declare const OAUTH_ERRORS: {
readonly [x: string]: typeof InvalidRequestError;
};
//# sourceMappingURL=errors.d.ts.map
@@ -0,0 +1 @@
module.exports={C:{"52":0.00784,"78":0.00392,"115":0.13727,"120":0.12943,"121":0.25493,"123":0.00784,"124":0.01177,"125":0.00392,"128":0.00392,"133":0.00784,"135":0.00392,"136":0.00784,"140":0.08628,"142":0.00392,"143":0.00392,"146":0.00392,"147":0.00784,"148":0.00784,"149":0.00784,"150":0.01569,"151":0.01177,"152":0.02745,"153":0.04706,"154":0.20002,"155":0.64321,"156":0.63536,"157":0.02353,_:"2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 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 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 122 126 127 129 130 131 132 134 137 138 139 141 144 145 158 159 160 3.5 3.6"},D:{"48":0.00784,"49":0.00784,"53":0.00392,"70":0.01177,"74":0.00784,"79":0.00392,"86":0.00392,"87":0.00784,"91":0.00392,"92":0.00392,"93":0.00784,"97":0.00392,"98":0.01569,"101":0.01177,"102":0.00784,"103":0.13727,"104":0.07452,"105":0.07844,"106":0.07844,"107":0.07452,"108":0.07844,"109":0.60007,"110":0.07452,"111":0.08236,"112":0.07844,"114":0.01177,"115":0.00784,"116":0.18433,"117":0.07452,"118":0.21963,"119":0.2667,"120":0.35298,"121":0.01961,"122":0.03138,"123":0.01961,"124":0.09805,"125":0.08236,"126":0.0353,"127":0.01569,"128":0.04706,"129":0.00784,"130":0.02353,"131":0.20002,"132":0.01961,"133":0.19218,"134":0.06667,"135":0.0706,"136":0.21571,"137":0.07844,"138":0.17257,"139":0.0706,"140":0.09021,"141":0.08628,"142":0.28631,"143":0.04706,"144":0.24316,"145":0.0706,"146":0.30199,"147":0.1608,"148":0.23532,"149":0.2314,"150":0.56477,"151":2.2826,"152":7.38905,"153":6.29481,"154":1.43937,"155":0.02353,_:"4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 50 51 52 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 71 72 73 75 76 77 78 80 81 83 84 85 88 89 90 94 95 96 99 100 113 156 157"},F:{"46":0.00392,"95":0.02745,"100":0.00392,"101":0.01961,"105":0.00392,"106":0.00784,"107":0.00392,"133":0.00784,"134":0.09021,"135":0.58438,_:"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 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 91 92 93 94 96 97 98 99 102 103 104 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 131 132 9.5-9.6 10.0-10.1 10.5 10.6 11.1 11.5 11.6 12.1"},B:{"92":0.00784,"109":0.03138,"114":0.00392,"119":0.1255,"120":0.13335,"122":0.01177,"123":0.00392,"131":0.00784,"132":0.00392,"133":0.00392,"134":0.00392,"135":0.00392,"136":0.00392,"137":0.00392,"138":0.00784,"139":0.00784,"140":0.01177,"141":0.00784,"142":0.01177,"143":0.01177,"144":0.00784,"145":0.01177,"146":0.01569,"147":0.01569,"148":0.01961,"149":0.02745,"150":0.09021,"151":0.23532,"152":1.90609,"153":2.36497,"154":0.60791,_:"12 13 14 15 16 17 18 79 80 81 83 84 85 86 87 88 89 90 91 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 110 111 112 113 115 116 117 118 121 124 125 126 127 128 129 130"},E:{"14":0.00784,"27":0.12158,_:"4 5 6 7 8 9 10 11 12 13 15 3.1 3.2 5.1 6.1 7.1 9.1 10.1 11.1 12.1 15.1 15.2-15.3 15.4 16.0 27.1 27.2 TP","13.1":0.01569,"14.1":0.01569,"15.5":0.00392,"15.6":0.0706,"16.1":0.00784,"16.2":0.00392,"16.3":0.01177,"16.4":0.00392,"16.5":0.00784,"16.6":0.1255,"17.0":0.00784,"17.1":0.10589,"17.2":0.01177,"17.3":0.01569,"17.4":0.05099,"17.5":0.04314,"17.6":0.17649,"18.0":0.00784,"18.1":0.0353,"18.2":0.00784,"18.3":0.03138,"18.4":0.01177,"18.5-18.7":0.03138,"26.0":0.01569,"26.1":0.01569,"26.2":0.05099,"26.3":0.06667,"26.4":0.06275,"26.5":0.27062,"26.6":1.41192},G:{"8":0,"3.2":0,"4.0-4.1":0,"4.2-4.3":0.00149,"5.0-5.1":0.00149,"6.0-6.1":0,"7.0-7.1":0.00299,"8.1-8.4":0,"9.0-9.2":0,"9.3":0,"10.0-10.2":0,"10.3":0.01495,"11.0-11.2":0.00149,"11.3-11.4":0.00299,"12.0-12.1":0,"12.2-12.5":0.03886,"13.0-13.1":0,"13.2":0.00747,"13.3":0,"13.4-13.7":0.00149,"14.0-14.4":0.00598,"14.5-14.8":0.00897,"15.0-15.1":0.00897,"15.2-15.3":0.00598,"15.4":0.00747,"15.5":0.00897,"15.6-15.8":0.1943,"16.0":0.01495,"16.1":0.0269,"16.2":0.01495,"16.3":0.03288,"16.4":0.00747,"16.5":0.01196,"16.6-16.7":0.27052,"17.0":0.01046,"17.1":0.01495,"17.2":0.01495,"17.3":0.02242,"17.4":0.03139,"17.5":0.06128,"17.6-17.7":0.15843,"18.0":0.03288,"18.1":0.06576,"18.2":0.08967,"18.3":0.15544,"18.4":0.09715,"18.5-18.7":2.00722,"26.0":0.09715,"26.1":0.09864,"26.2":0.25707,"26.3":0.27799,"26.4":0.20326,"26.5":1.36156,"26.6":8.40104,"27.0":0.64416,"27.1":0,"27.2":0.01644},P:{"21":0.00947,"22":0.00947,"23":0.00947,"24":0.01894,"25":0.01894,"26":0.03788,"27":0.02841,"28":0.07576,"29":0.11364,"30":1.78978,_:"4 20 5.0-5.4 6.2-6.4 8.2 9.2 10.1 11.1-11.2 12.0 13.0 14.0 15.0 16.0 17.0 18.0 19.0","7.2-7.4":0.00947},I:{"0":0.03037,"3":0,"4":0,"2.1":0,"2.2":0,"2.3":0,"4.1":0,"4.2-4.3":0,"4.4":0,"4.4.3-4.4.4":0.00001},K:{"0":0.85092,Line truncated
@@ -0,0 +1,8 @@
'use strict';
module.exports = function () {
throw new Error(
'ws does not work in the browser. Browser clients must use the native ' +
'WebSocket object'
);
};
@@ -0,0 +1,40 @@
import { MiddlewareHandler } from "../../types.js";
//#region src/middleware/pretty-json/index.d.ts
interface PrettyOptions {
/**
* Number of spaces for indentation.
* @default 2
*/
space?: number;
/**
* Query conditions for when to Pretty.
* @default 'pretty'
*/
query?: string;
/**
* Force prettification of JSON responses regardless of query parameters.
* @default false
*/
force?: boolean;
}
/**
* Pretty JSON Middleware for Hono.
*
* @see {@link https://hono.dev/docs/middleware/builtin/pretty-json}
*
* @param options - The options for the pretty JSON middleware.
* @returns {MiddlewareHandler} The middleware handler function.
*
* @example
* ```ts
* const app = new Hono()
*
* app.use(prettyJSON()) // With options: prettyJSON({ space: 4 })
* app.get('/', (c) => {
* return c.json({ message: 'Hono!' })
* })
* ```
*/
export declare const prettyJSON: (options?: PrettyOptions) => MiddlewareHandler;
//#endregion
export {};
@@ -0,0 +1,7 @@
{
"version": 3,
"sources": ["../src/arrow.tsx"],
"sourcesContent": ["import * as React from 'react';\nimport { Primitive } from '@radix-ui/react-primitive';\n\n/* -------------------------------------------------------------------------------------------------\n * Arrow\n * -----------------------------------------------------------------------------------------------*/\n\nconst NAME = 'Arrow';\n\ntype ArrowElement = React.ComponentRef<typeof Primitive.svg>;\ntype PrimitiveSvgProps = React.ComponentPropsWithoutRef<typeof Primitive.svg>;\ninterface ArrowProps extends PrimitiveSvgProps {}\n\nconst Arrow = React.forwardRef<ArrowElement, ArrowProps>((props, forwardedRef) => {\n const { children, width = 10, height = 5, ...arrowProps } = props;\n return (\n <Primitive.svg\n {...arrowProps}\n ref={forwardedRef}\n width={width}\n height={height}\n viewBox=\"0 0 30 10\"\n preserveAspectRatio=\"none\"\n >\n {/* We use their children if they're slotting to replace the whole svg */}\n {props.asChild ? children : <polygon points=\"0,0 30,0 15,10\" />}\n </Primitive.svg>\n );\n});\n\nArrow.displayName = NAME;\n\n/* -----------------------------------------------------------------------------------------------*/\n\nconst Root = Arrow;\n\nexport {\n Arrow,\n //\n Root,\n};\nexport type { ArrowProps };\n"],
"mappings": ";AAAA,YAAY,WAAW;AACvB,SAAS,iBAAiB;AAwBQ;AAlBlC,IAAM,OAAO;AAMb,IAAM,QAAc,iBAAqC,CAAC,OAAO,iBAAiB;AAChF,QAAM,EAAE,UAAU,QAAQ,IAAI,SAAS,GAAG,GAAG,WAAW,IAAI;AAC5D,SACE;AAAA,IAAC,UAAU;AAAA,IAAV;AAAA,MACE,GAAG;AAAA,MACJ,KAAK;AAAA,MACL;AAAA,MACA;AAAA,MACA,SAAQ;AAAA,MACR,qBAAoB;AAAA,MAGnB,gBAAM,UAAU,WAAW,oBAAC,aAAQ,QAAO,kBAAiB;AAAA;AAAA,EAC/D;AAEJ,CAAC;AAED,MAAM,cAAc;AAIpB,IAAM,OAAO;",
"names": []
}
@@ -0,0 +1,158 @@
// translate the various posix character classes into unicode properties
// this works across all unicode locales
// { <posix class>: [<translation>, negated]
const posixClasses: { [k: string]: [e: string, n?: boolean] } = {
'[:alnum:]': ['\\p{L}\\p{Nl}\\p{Nd}'],
'[:alpha:]': ['\\p{L}\\p{Nl}'],
'[:ascii:]': ['\\x' + '00-\\x' + '7f'],
'[:blank:]': ['\\p{Zs}\\t'],
'[:cntrl:]': ['\\p{Cc}'],
'[:digit:]': ['\\p{Nd}'],
'[:graph:]': ['\\p{Z}\\p{C}', true],
'[:lower:]': ['\\p{Ll}'],
'[:print:]': ['\\p{C}', true],
'[:punct:]': ['\\p{P}\\p{S}'],
'[:space:]': ['\\p{Z}\\t\\r\\n\\v\\f'],
'[:upper:]': ['\\p{Lu}'],
'[:word:]': ['\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}'],
'[:xdigit:]': ['A-Fa-f0-9'],
}
// only need to escape a few things inside of brace expressions
// escapes: [ \ ] -
const braceEscape = (s: string) => s.replace(/[[\]\\-]/g, '\\$&')
export type ParseClassResult = [re: RegExp, consumed: number]
export type Form = 'NFC' | 'NFD' | 'NFKC' | 'NFKD'
const noMatch = /$./
// Takes a glob string at a posix brace expression. Returns a RegExp
// that tests one character, and the number of glob chars consumed.
// If the class is not closed, consumed is 0, and the `[` must be
// treated as a literal character.
// Out of order ranges are removed. If nothing is left, the RegExp
// is `/$./`, and the rest of the glob is consumed, so that the
// whole glob cannot match.
export const parseClass = (
glob: string,
position: number,
nocase: boolean = false,
form?: Form,
): ParseClassResult => {
// normalize one class member, if it stays one code point
const norm = (c: string) => {
const n = form ? c.normalize(form) : c
return [...n].length === 1 ? n : c
}
const pos = position
/* c8 ignore start */
if (glob.charAt(pos) !== '[') {
throw new Error('not in a brace expression')
}
/* c8 ignore stop */
const ranges: string[] = []
const negs: string[] = []
let i = pos + 1
let sawStart = false
let escaping = false
let negate = false
let endPos = pos
let rangeStart = ''
WHILE: while (i < glob.length) {
const c = String.fromCodePoint(glob.codePointAt(i)!)
if ((c === '!' || c === '^') && i === pos + 1) {
negate = true
i++
continue
}
if (c === ']' && sawStart && !escaping) {
endPos = i + 1
break
}
sawStart = true
if (c === '\\') {
if (!escaping) {
escaping = true
i++
continue
}
// escaped \ char, fall through and treat like normal char
}
if (c === '[' && !escaping) {
// either a posix class, a collation equivalent, or just a [
for (const [cls, [unip, neg]] of Object.entries(posixClasses)) {
if (glob.startsWith(cls, i)) {
// invalid, [a-[] is fine, but not [a-[:alpha]]
if (rangeStart) {
return [noMatch, glob.length - pos]
}
i += cls.length
if (neg) negs.push(unip)
else ranges.push(unip)
continue WHILE
}
}
}
// now it's just a normal character, effectively
escaping = false
const n = norm(c)
if (rangeStart) {
// throw this range away if it's not valid, but others
// can still match.
if (n.codePointAt(0)! > rangeStart.codePointAt(0)!) {
ranges.push(braceEscape(rangeStart) + '-' + braceEscape(n))
} else if (n === rangeStart) {
ranges.push(braceEscape(n))
}
rangeStart = ''
i += c.length
continue
}
// now might be the start of a range.
// can be either c-d or c-] or c<more...>] or c] at this point
if (glob.startsWith('-]', i + c.length)) {
ranges.push(braceEscape(n + '-'))
i += c.length + 1
continue
}
if (glob.startsWith('-', i + c.length)) {
rangeStart = n
i += c.length + 1
continue
}
// not the start of a range, just a single character
ranges.push(braceEscape(n))
i += c.length
}
if (endPos < i) {
// didn't see the end of the class, not a valid class,
// but might still be valid as a literal match.
return [noMatch, 0]
}
// if we got no ranges and no negates, then we have a range that
// cannot possibly match anything, and that poisons the whole glob
if (!ranges.length && !negs.length) {
return [noMatch, glob.length - pos]
}
const sranges = '[' + (negate ? '^' : '') + ranges.join('') + ']'
const snegs = '[' + (negate ? '' : '^') + negs.join('') + ']'
const comb =
'^' +
(ranges.length && negs.length ? '(' + sranges + '|' + snegs + ')'
: ranges.length ? sranges
: snegs)
return [new RegExp(comb, nocase ? 'iu' : 'u'), endPos - pos]
}
@@ -0,0 +1,33 @@
# lines-and-columns
Maps lines and columns to character offsets and back. This is useful for parsers
and other text processors that deal in character ranges but process text with
meaningful lines and columns.
## Install
```
$ npm install [--save] lines-and-columns
```
## Usage
```js
import { LinesAndColumns } from 'lines-and-columns'
const lines = new LinesAndColumns(
`table {
border: 0
}`
)
lines.locationForIndex(9)
// { line: 1, column: 1 }
lines.indexForLocation({ line: 1, column: 2 })
// 10
```
## License
MIT
@@ -0,0 +1,152 @@
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || (function () {
var ownKeys = function(o) {
ownKeys = Object.getOwnPropertyNames || function (o) {
var ar = [];
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
return ar;
};
return ownKeys(o);
};
return function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
__setModuleDefault(result, mod);
return result;
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
const utils_1 = require("@typescript-eslint/utils");
const tsutils = __importStar(require("ts-api-utils"));
const ts = __importStar(require("typescript"));
const util_1 = require("../util");
const FUNCTION_CONSTRUCTOR = 'Function';
const GLOBAL_CANDIDATES = new Set(['global', 'globalThis', 'window']);
const EVAL_LIKE_FUNCTIONS = new Set([
'execScript',
'setImmediate',
'setInterval',
'setTimeout',
]);
exports.default = (0, util_1.createRule)({
name: 'no-implied-eval',
meta: {
type: 'suggestion',
docs: {
description: 'Disallow the use of `eval()`-like functions',
extendsBaseRule: true,
recommended: 'recommended',
requiresTypeChecking: true,
},
messages: {
noFunctionConstructor: 'Implied eval. Do not use the Function constructor to create functions.',
noImpliedEvalError: 'Implied eval. Consider passing a function.',
},
schema: [],
},
defaultOptions: [],
create(context) {
const services = (0, util_1.getParserServices)(context);
const checker = services.program.getTypeChecker();
function getCalleeName(node) {
if (node.type === utils_1.AST_NODE_TYPES.Identifier) {
return node.name;
}
if (node.type === utils_1.AST_NODE_TYPES.MemberExpression &&
node.object.type === utils_1.AST_NODE_TYPES.Identifier &&
GLOBAL_CANDIDATES.has(node.object.name)) {
if (node.property.type === utils_1.AST_NODE_TYPES.Identifier) {
return node.property.name;
}
if (node.property.type === utils_1.AST_NODE_TYPES.Literal &&
typeof node.property.value === 'string') {
return node.property.value;
}
}
return null;
}
function isFunctionType(node) {
const type = services.getTypeAtLocation(node);
const symbol = type.getSymbol();
if (symbol &&
tsutils.isSymbolFlagSet(symbol, ts.SymbolFlags.Function | ts.SymbolFlags.Method)) {
return true;
}
if ((0, util_1.isBuiltinSymbolLike)(services.program, type, FUNCTION_CONSTRUCTOR)) {
return true;
}
const signatures = checker.getSignaturesOfType(type, ts.SignatureKind.Call);
return signatures.length > 0;
}
function isBind(node) {
return node.type === utils_1.AST_NODE_TYPES.MemberExpression
? isBind(node.property)
: node.type === utils_1.AST_NODE_TYPES.Identifier && node.name === 'bind';
}
function isFunction(node) {
switch (node.type) {
case utils_1.AST_NODE_TYPES.ArrowFunctionExpression:
case utils_1.AST_NODE_TYPES.FunctionDeclaration:
case utils_1.AST_NODE_TYPES.FunctionExpression:
return true;
case utils_1.AST_NODE_TYPES.Literal:
case utils_1.AST_NODE_TYPES.TemplateLiteral:
return false;
case utils_1.AST_NODE_TYPES.CallExpression:
return isBind(node.callee) || isFunctionType(node);
default:
return isFunctionType(node);
}
}
function checkImpliedEval(node) {
const calleeName = getCalleeName(node.callee);
if (calleeName == null) {
return;
}
if (calleeName === FUNCTION_CONSTRUCTOR) {
const type = services.getTypeAtLocation(node.callee);
const symbol = type.getSymbol();
if (symbol) {
if ((0, util_1.isBuiltinSymbolLike)(services.program, type, 'FunctionConstructor')) {
context.report({ node, messageId: 'noFunctionConstructor' });
return;
}
}
else {
context.report({ node, messageId: 'noFunctionConstructor' });
return;
}
}
if (node.arguments.length === 0) {
return;
}
const [handler] = node.arguments;
if (EVAL_LIKE_FUNCTIONS.has(calleeName) &&
!isFunction(handler) &&
(0, util_1.isReferenceToGlobalFunction)(calleeName, node, context.sourceCode)) {
context.report({ node: handler, messageId: 'noImpliedEvalError' });
}
}
return {
CallExpression: checkImpliedEval,
NewExpression: checkImpliedEval,
};
},
});
@@ -0,0 +1,7 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.isUndefinedIdentifier = isUndefinedIdentifier;
const utils_1 = require("@typescript-eslint/utils");
function isUndefinedIdentifier(i) {
return i.type === utils_1.AST_NODE_TYPES.Identifier && i.name === 'undefined';
}
@@ -0,0 +1,29 @@
import { escapeHtml } from "../utils.js";
import { defaultGetScrollRestorationKey, storageKey } from "../scroll-restoration.js";
import scroll_restoration_inline_default from "../scroll-restoration-inline.js";
//#region src/scroll-restoration-script/server.ts
const defaultInlineScrollRestorationScript = `(${scroll_restoration_inline_default})(${escapeHtml(JSON.stringify({
storageKey,
shouldScrollRestoration: true
}))})`;
function getScrollRestorationScript(options) {
if (options.storageKey === "tsr-scroll-restoration-v1_3" && options.shouldScrollRestoration === true && options.key === void 0 && options.behavior === void 0) return defaultInlineScrollRestorationScript;
return `(${scroll_restoration_inline_default})(${escapeHtml(JSON.stringify(options))})`;
}
function getScrollRestorationScriptForRouter(router) {
if (typeof router.options.scrollRestoration === "function" && !router.options.scrollRestoration({ location: router.latestLocation })) return null;
const getKey = router.options.getScrollRestorationKey;
if (!getKey) return defaultInlineScrollRestorationScript;
const location = router.latestLocation;
const userKey = getKey(location);
if (userKey === defaultGetScrollRestorationKey(location)) return defaultInlineScrollRestorationScript;
return getScrollRestorationScript({
storageKey,
shouldScrollRestoration: true,
key: userKey
});
}
//#endregion
export { getScrollRestorationScriptForRouter };
//# sourceMappingURL=server.js.map
@@ -0,0 +1,25 @@
/**
* @license lucide-react v0.469.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const Dna = createLucideIcon("Dna", [
["path", { d: "m10 16 1.5 1.5", key: "11lckj" }],
["path", { d: "m14 8-1.5-1.5", key: "1ohn8i" }],
["path", { d: "M15 2c-1.798 1.998-2.518 3.995-2.807 5.993", key: "80uv8i" }],
["path", { d: "m16.5 10.5 1 1", key: "696xn5" }],
["path", { d: "m17 6-2.891-2.891", key: "xu6p2f" }],
["path", { d: "M2 15c6.667-6 13.333 0 20-6", key: "1pyr53" }],
["path", { d: "m20 9 .891.891", key: "3xwk7g" }],
["path", { d: "M3.109 14.109 4 15", key: "q76aoh" }],
["path", { d: "m6.5 12.5 1 1", key: "cs35ky" }],
["path", { d: "m7 18 2.891 2.891", key: "1sisit" }],
["path", { d: "M9 22c1.798-1.998 2.518-3.995 2.807-5.993", key: "q3hbxp" }]
]);
export { Dna as default };
//# sourceMappingURL=dna.js.map
@@ -0,0 +1,7 @@
'use strict';
if (process.env.NODE_ENV === 'production') {
module.exports = require('./cjs/react-jsx-dev-runtime.react-server.production.js');
} else {
module.exports = require('./cjs/react-jsx-dev-runtime.react-server.development.js');
}
@@ -0,0 +1,131 @@
/*!
* etag
* Copyright(c) 2014-2016 Douglas Christopher Wilson
* MIT Licensed
*/
'use strict'
/**
* Module exports.
* @public
*/
module.exports = etag
/**
* Module dependencies.
* @private
*/
var crypto = require('crypto')
var Stats = require('fs').Stats
/**
* Module variables.
* @private
*/
var toString = Object.prototype.toString
/**
* Generate an entity tag.
*
* @param {Buffer|string} entity
* @return {string}
* @private
*/
function entitytag (entity) {
if (entity.length === 0) {
// fast-path empty
return '"0-2jmj7l5rSw0yVb/vlWAYkK/YBwk"'
}
// compute hash of entity
var hash = crypto
.createHash('sha1')
.update(entity, 'utf8')
.digest('base64')
.substring(0, 27)
// compute length of entity
var len = typeof entity === 'string'
? Buffer.byteLength(entity, 'utf8')
: entity.length
return '"' + len.toString(16) + '-' + hash + '"'
}
/**
* Create a simple ETag.
*
* @param {string|Buffer|Stats} entity
* @param {object} [options]
* @param {boolean} [options.weak]
* @return {String}
* @public
*/
function etag (entity, options) {
if (entity == null) {
throw new TypeError('argument entity is required')
}
// support fs.Stats object
var isStats = isstats(entity)
var weak = options && typeof options.weak === 'boolean'
? options.weak
: isStats
// validate argument
if (!isStats && typeof entity !== 'string' && !Buffer.isBuffer(entity)) {
throw new TypeError('argument entity must be string, Buffer, or fs.Stats')
}
// generate entity tag
var tag = isStats
? stattag(entity)
: entitytag(entity)
return weak
? 'W/' + tag
: tag
}
/**
* Determine if object is a Stats object.
*
* @param {object} obj
* @return {boolean}
* @api private
*/
function isstats (obj) {
// genuine fs.Stats
if (typeof Stats === 'function' && obj instanceof Stats) {
return true
}
// quack quack
return obj && typeof obj === 'object' &&
'ctime' in obj && toString.call(obj.ctime) === '[object Date]' &&
'mtime' in obj && toString.call(obj.mtime) === '[object Date]' &&
'ino' in obj && typeof obj.ino === 'number' &&
'size' in obj && typeof obj.size === 'number'
}
/**
* Generate a tag for a stat.
*
* @param {object} stat
* @return {string}
* @private
*/
function stattag (stat) {
var mtime = stat.mtime.getTime().toString(16)
var size = stat.size.toString(16)
return '"' + size + '-' + mtime + '"'
}