docs: 仓库链接指向本镜像仓库
Build NapCat Artifacts / Type Check & Test (push) Waiting to run

This commit is contained in:
TanTan committed 2026-11-13 09:25:58 +08:00
1 parent f954252a34
commit e311ca3275
35554 files changed
+6229626 -4

No files matched your search

@@ -0,0 +1,542 @@
/**
* @license React
* react.production.js
*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
"use strict";
var REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"),
REACT_PORTAL_TYPE = Symbol.for("react.portal"),
REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"),
REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"),
REACT_PROFILER_TYPE = Symbol.for("react.profiler"),
REACT_CONSUMER_TYPE = Symbol.for("react.consumer"),
REACT_CONTEXT_TYPE = Symbol.for("react.context"),
REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"),
REACT_SUSPENSE_TYPE = Symbol.for("react.suspense"),
REACT_MEMO_TYPE = Symbol.for("react.memo"),
REACT_LAZY_TYPE = Symbol.for("react.lazy"),
REACT_ACTIVITY_TYPE = Symbol.for("react.activity"),
MAYBE_ITERATOR_SYMBOL = Symbol.iterator;
function getIteratorFn(maybeIterable) {
if (null === maybeIterable || "object" !== typeof maybeIterable) return null;
maybeIterable =
(MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL]) ||
maybeIterable["@@iterator"];
return "function" === typeof maybeIterable ? maybeIterable : null;
}
var ReactNoopUpdateQueue = {
isMounted: function () {
return !1;
},
enqueueForceUpdate: function () {},
enqueueReplaceState: function () {},
enqueueSetState: function () {}
},
assign = Object.assign,
emptyObject = {};
function Component(props, context, updater) {
this.props = props;
this.context = context;
this.refs = emptyObject;
this.updater = updater || ReactNoopUpdateQueue;
}
Component.prototype.isReactComponent = {};
Component.prototype.setState = function (partialState, callback) {
if (
"object" !== typeof partialState &&
"function" !== typeof partialState &&
null != partialState
)
throw Error(
"takes an object of state variables to update or a function which returns an object of state variables."
);
this.updater.enqueueSetState(this, partialState, callback, "setState");
};
Component.prototype.forceUpdate = function (callback) {
this.updater.enqueueForceUpdate(this, callback, "forceUpdate");
};
function ComponentDummy() {}
ComponentDummy.prototype = Component.prototype;
function PureComponent(props, context, updater) {
this.props = props;
this.context = context;
this.refs = emptyObject;
this.updater = updater || ReactNoopUpdateQueue;
}
var pureComponentPrototype = (PureComponent.prototype = new ComponentDummy());
pureComponentPrototype.constructor = PureComponent;
assign(pureComponentPrototype, Component.prototype);
pureComponentPrototype.isPureReactComponent = !0;
var isArrayImpl = Array.isArray;
function noop() {}
var ReactSharedInternals = { H: null, A: null, T: null, S: null },
hasOwnProperty = Object.prototype.hasOwnProperty;
function ReactElement(type, key, props) {
var refProp = props.ref;
return {
$$typeof: REACT_ELEMENT_TYPE,
type: type,
key: key,
ref: void 0 !== refProp ? refProp : null,
props: props
};
}
function cloneAndReplaceKey(oldElement, newKey) {
return ReactElement(oldElement.type, newKey, oldElement.props);
}
function isValidElement(object) {
return (
"object" === typeof object &&
null !== object &&
object.$$typeof === REACT_ELEMENT_TYPE
);
}
function escape(key) {
var escaperLookup = { "=": "=0", ":": "=2" };
return (
"$" +
key.replace(/[=:]/g, function (match) {
return escaperLookup[match];
})
);
}
var userProvidedKeyEscapeRegex = /\/+/g;
function getElementKey(element, index) {
return "object" === typeof element && null !== element && null != element.key
? escape("" + element.key)
: index.toString(36);
}
function resolveThenable(thenable) {
switch (thenable.status) {
case "fulfilled":
return thenable.value;
case "rejected":
throw thenable.reason;
default:
switch (
("string" === typeof thenable.status
? thenable.then(noop, noop)
: ((thenable.status = "pending"),
thenable.then(
function (fulfilledValue) {
"pending" === thenable.status &&
((thenable.status = "fulfilled"),
(thenable.value = fulfilledValue));
},
function (error) {
"pending" === thenable.status &&
((thenable.status = "rejected"), (thenable.reason = error));
}
)),
thenable.status)
) {
case "fulfilled":
return thenable.value;
case "rejected":
throw thenable.reason;
}
}
throw thenable;
}
function mapIntoArray(children, array, escapedPrefix, nameSoFar, callback) {
var type = typeof children;
if ("undefined" === type || "boolean" === type) children = null;
var invokeCallback = !1;
if (null === children) invokeCallback = !0;
else
switch (type) {
case "bigint":
case "string":
case "number":
invokeCallback = !0;
break;
case "object":
switch (children.$$typeof) {
case REACT_ELEMENT_TYPE:
case REACT_PORTAL_TYPE:
invokeCallback = !0;
break;
case REACT_LAZY_TYPE:
return (
(invokeCallback = children._init),
mapIntoArray(
invokeCallback(children._payload),
array,
escapedPrefix,
nameSoFar,
callback
)
);
}
}
if (invokeCallback)
return (
(callback = callback(children)),
(invokeCallback =
"" === nameSoFar ? "." + getElementKey(children, 0) : nameSoFar),
isArrayImpl(callback)
? ((escapedPrefix = ""),
null != invokeCallback &&
(escapedPrefix =
invokeCallback.replace(userProvidedKeyEscapeRegex, "$&/") + "/"),
mapIntoArray(callback, array, escapedPrefix, "", function (c) {
return c;
}))
: null != callback &&
(isValidElement(callback) &&
(callback = cloneAndReplaceKey(
callback,
escapedPrefix +
(null == callback.key ||
(children && children.key === callback.key)
? ""
: ("" + callback.key).replace(
userProvidedKeyEscapeRegex,
"$&/"
) + "/") +
invokeCallback
)),
array.push(callback)),
1
);
invokeCallback = 0;
var nextNamePrefix = "" === nameSoFar ? "." : nameSoFar + ":";
if (isArrayImpl(children))
for (var i = 0; i < children.length; i++)
(nameSoFar = children[i]),
(type = nextNamePrefix + getElementKey(nameSoFar, i)),
(invokeCallback += mapIntoArray(
nameSoFar,
array,
escapedPrefix,
type,
callback
));
else if (((i = getIteratorFn(children)), "function" === typeof i))
for (
children = i.call(children), i = 0;
!(nameSoFar = children.next()).done;
)
(nameSoFar = nameSoFar.value),
(type = nextNamePrefix + getElementKey(nameSoFar, i++)),
(invokeCallback += mapIntoArray(
nameSoFar,
array,
escapedPrefix,
type,
callback
));
else if ("object" === type) {
if ("function" === typeof children.then)
return mapIntoArray(
resolveThenable(children),
array,
escapedPrefix,
nameSoFar,
callback
);
array = String(children);
throw Error(
"Objects are not valid as a React child (found: " +
("[object Object]" === array
? "object with keys {" + Object.keys(children).join(", ") + "}"
: array) +
"). If you meant to render a collection of children, use an array instead."
);
}
return invokeCallback;
}
function mapChildren(children, func, context) {
if (null == children) return children;
var result = [],
count = 0;
mapIntoArray(children, result, "", "", function (child) {
return func.call(context, child, count++);
});
return result;
}
function lazyInitializer(payload) {
if (-1 === payload._status) {
var ctor = payload._result;
ctor = ctor();
ctor.then(
function (moduleObject) {
if (0 === payload._status || -1 === payload._status)
(payload._status = 1), (payload._result = moduleObject);
},
function (error) {
if (0 === payload._status || -1 === payload._status)
(payload._status = 2), (payload._result = error);
}
);
-1 === payload._status && ((payload._status = 0), (payload._result = ctor));
}
if (1 === payload._status) return payload._result.default;
throw payload._result;
}
var reportGlobalError =
"function" === typeof reportError
? reportError
: function (error) {
if (
"object" === typeof window &&
"function" === typeof window.ErrorEvent
) {
var event = new window.ErrorEvent("error", {
bubbles: !0,
cancelable: !0,
message:
"object" === typeof error &&
null !== error &&
"string" === typeof error.message
? String(error.message)
: String(error),
error: error
});
if (!window.dispatchEvent(event)) return;
} else if (
"object" === typeof process &&
"function" === typeof process.emit
) {
process.emit("uncaughtException", error);
return;
}
console.error(error);
},
Children = {
map: mapChildren,
forEach: function (children, forEachFunc, forEachContext) {
mapChildren(
children,
function () {
forEachFunc.apply(this, arguments);
},
forEachContext
);
},
count: function (children) {
var n = 0;
mapChildren(children, function () {
n++;
});
return n;
},
toArray: function (children) {
return (
mapChildren(children, function (child) {
return child;
}) || []
);
},
only: function (children) {
if (!isValidElement(children))
throw Error(
"React.Children.only expected to receive a single React element child."
);
return children;
}
};
exports.Activity = REACT_ACTIVITY_TYPE;
exports.Children = Children;
exports.Component = Component;
exports.Fragment = REACT_FRAGMENT_TYPE;
exports.Profiler = REACT_PROFILER_TYPE;
exports.PureComponent = PureComponent;
exports.StrictMode = REACT_STRICT_MODE_TYPE;
exports.Suspense = REACT_SUSPENSE_TYPE;
exports.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE =
ReactSharedInternals;
exports.__COMPILER_RUNTIME = {
__proto__: null,
c: function (size) {
return ReactSharedInternals.H.useMemoCache(size);
}
};
exports.cache = function (fn) {
return function () {
return fn.apply(null, arguments);
};
};
exports.cacheSignal = function () {
return null;
};
exports.cloneElement = function (element, config, children) {
if (null === element || void 0 === element)
throw Error(
"The argument must be a React element, but you passed " + element + "."
);
var props = assign({}, element.props),
key = element.key;
if (null != config)
for (propName in (void 0 !== config.key && (key = "" + config.key), config))
!hasOwnProperty.call(config, propName) ||
"key" === propName ||
"__self" === propName ||
"__source" === propName ||
("ref" === propName && void 0 === config.ref) ||
(props[propName] = config[propName]);
var propName = arguments.length - 2;
if (1 === propName) props.children = children;
else if (1 < propName) {
for (var childArray = Array(propName), i = 0; i < propName; i++)
childArray[i] = arguments[i + 2];
props.children = childArray;
}
return ReactElement(element.type, key, props);
};
exports.createContext = function (defaultValue) {
defaultValue = {
$$typeof: REACT_CONTEXT_TYPE,
_currentValue: defaultValue,
_currentValue2: defaultValue,
_threadCount: 0,
Provider: null,
Consumer: null
};
defaultValue.Provider = defaultValue;
defaultValue.Consumer = {
$$typeof: REACT_CONSUMER_TYPE,
_context: defaultValue
};
return defaultValue;
};
exports.createElement = function (type, config, children) {
var propName,
props = {},
key = null;
if (null != config)
for (propName in (void 0 !== config.key && (key = "" + config.key), config))
hasOwnProperty.call(config, propName) &&
"key" !== propName &&
"__self" !== propName &&
"__source" !== propName &&
(props[propName] = config[propName]);
var childrenLength = arguments.length - 2;
if (1 === childrenLength) props.children = children;
else if (1 < childrenLength) {
for (var childArray = Array(childrenLength), i = 0; i < childrenLength; i++)
childArray[i] = arguments[i + 2];
props.children = childArray;
}
if (type && type.defaultProps)
for (propName in ((childrenLength = type.defaultProps), childrenLength))
void 0 === props[propName] &&
(props[propName] = childrenLength[propName]);
return ReactElement(type, key, props);
};
exports.createRef = function () {
return { current: null };
};
exports.forwardRef = function (render) {
return { $$typeof: REACT_FORWARD_REF_TYPE, render: render };
};
exports.isValidElement = isValidElement;
exports.lazy = function (ctor) {
return {
$$typeof: REACT_LAZY_TYPE,
_payload: { _status: -1, _result: ctor },
_init: lazyInitializer
};
};
exports.memo = function (type, compare) {
return {
$$typeof: REACT_MEMO_TYPE,
type: type,
compare: void 0 === compare ? null : compare
};
};
exports.startTransition = function (scope) {
var prevTransition = ReactSharedInternals.T,
currentTransition = {};
ReactSharedInternals.T = currentTransition;
try {
var returnValue = scope(),
onStartTransitionFinish = ReactSharedInternals.S;
null !== onStartTransitionFinish &&
onStartTransitionFinish(currentTransition, returnValue);
"object" === typeof returnValue &&
null !== returnValue &&
"function" === typeof returnValue.then &&
returnValue.then(noop, reportGlobalError);
} catch (error) {
reportGlobalError(error);
} finally {
null !== prevTransition &&
null !== currentTransition.types &&
(prevTransition.types = currentTransition.types),
(ReactSharedInternals.T = prevTransition);
}
};
exports.unstable_useCacheRefresh = function () {
return ReactSharedInternals.H.useCacheRefresh();
};
exports.use = function (usable) {
return ReactSharedInternals.H.use(usable);
};
exports.useActionState = function (action, initialState, permalink) {
return ReactSharedInternals.H.useActionState(action, initialState, permalink);
};
exports.useCallback = function (callback, deps) {
return ReactSharedInternals.H.useCallback(callback, deps);
};
exports.useContext = function (Context) {
return ReactSharedInternals.H.useContext(Context);
};
exports.useDebugValue = function () {};
exports.useDeferredValue = function (value, initialValue) {
return ReactSharedInternals.H.useDeferredValue(value, initialValue);
};
exports.useEffect = function (create, deps) {
return ReactSharedInternals.H.useEffect(create, deps);
};
exports.useEffectEvent = function (callback) {
return ReactSharedInternals.H.useEffectEvent(callback);
};
exports.useId = function () {
return ReactSharedInternals.H.useId();
};
exports.useImperativeHandle = function (ref, create, deps) {
return ReactSharedInternals.H.useImperativeHandle(ref, create, deps);
};
exports.useInsertionEffect = function (create, deps) {
return ReactSharedInternals.H.useInsertionEffect(create, deps);
};
exports.useLayoutEffect = function (create, deps) {
return ReactSharedInternals.H.useLayoutEffect(create, deps);
};
exports.useMemo = function (create, deps) {
return ReactSharedInternals.H.useMemo(create, deps);
};
exports.useOptimistic = function (passthrough, reducer) {
return ReactSharedInternals.H.useOptimistic(passthrough, reducer);
};
exports.useReducer = function (reducer, initialArg, init) {
return ReactSharedInternals.H.useReducer(reducer, initialArg, init);
};
exports.useRef = function (initialValue) {
return ReactSharedInternals.H.useRef(initialValue);
};
exports.useState = function (initialState) {
return ReactSharedInternals.H.useState(initialState);
};
exports.useSyncExternalStore = function (
subscribe,
getSnapshot,
getServerSnapshot
) {
return ReactSharedInternals.H.useSyncExternalStore(
subscribe,
getSnapshot,
getServerSnapshot
);
};
exports.useTransition = function () {
return ReactSharedInternals.H.useTransition();
};
exports.version = "19.2.0";
@@ -0,0 +1 @@
module.exports={C:{"5":0.01288,"43":1.08802,"115":0.04507,"136":0.00644,"140":0.00644,"141":0.00644,"142":0.01288,"143":0.12876,"144":0.12876,_:"2 3 4 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 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 137 138 139 145 146 147 3.5 3.6"},D:{"39":0.00644,"40":0.00644,"41":0.00644,"42":0.00644,"43":0.00644,"44":0.00644,"45":0.01288,"46":0.00644,"47":0.00644,"48":0.02575,"49":0.01931,"50":0.00644,"51":0.00644,"52":0.00644,"53":0.01288,"54":0.00644,"55":0.00644,"56":0.00644,"57":0.01288,"58":0.00644,"59":0.00644,"60":0.00644,"63":0.00644,"67":0.00644,"69":0.11588,"70":0.03863,"73":0.01288,"75":0.00644,"78":0.01931,"79":0.06438,"80":0.01931,"81":0.01288,"83":0.04507,"84":0.00644,"85":0.01288,"86":0.0515,"87":0.06438,"88":0.00644,"89":0.01288,"90":0.00644,"91":0.01288,"92":0.09013,"94":0.00644,"95":0.01288,"96":0.00644,"97":0.06438,"98":0.19314,"99":0.06438,"100":0.00644,"101":0.07726,"102":0.00644,"103":0.01288,"104":0.00644,"105":1.661,"106":0.34765,"107":0.10945,"108":0.07082,"109":0.52792,"110":1.26185,"111":0.62449,"112":0.36053,"113":0.54079,"114":1.75757,"115":0.08369,"116":0.03219,"117":0.10945,"118":1.25541,"119":0.20602,"120":0.61805,"121":0.78544,"122":0.66311,"123":0.38628,"124":0.22533,"125":0.97214,"126":0.63092,"127":0.54723,"128":0.63736,"129":0.68887,"130":0.43135,"131":0.12876,"132":0.06438,"133":0.09657,"134":28.20488,"135":0.07082,"136":0.03219,"137":0.12876,"138":0.19958,"139":0.15451,"140":1.82195,"141":1.52581,"142":0.01288,"143":0.02575,_:"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 61 62 64 65 66 68 71 72 74 76 77 93 144 145"},F:{"122":0.01288,_:"9 11 12 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 60 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 9.5-9.6 10.0-10.1 10.5 10.6 11.1 11.5 11.6 12.1"},B:{"18":0.00644,"89":0.00644,"92":0.0515,"100":0.01288,"106":0.01931,"107":0.00644,"108":0.00644,"109":0.07082,"110":0.00644,"111":0.00644,"112":0.01288,"113":0.03863,"114":0.03863,"115":0.02575,"116":0.01288,"117":0.01288,"118":0.01288,"119":0.01288,"120":0.29615,"121":0.01931,"122":0.03863,"123":0.02575,"124":0.01931,"125":0.02575,"126":0.05794,"127":0.05794,"128":0.03219,"129":0.03219,"130":0.03863,"131":0.09013,"132":0.03863,"133":0.06438,"134":0.06438,"135":0.06438,"136":0.07082,"137":0.09013,"138":0.16095,"139":0.21889,"140":1.10734,"141":4.2362,"142":0.01288,_:"12 13 14 15 16 17 79 80 81 83 84 85 86 87 88 90 91 93 94 95 96 97 98 99 101 102 103 104 105"},E:{"13":0.00644,"14":0.01931,"15":0.00644,_:"0 4 5 6 7 8 9 10 11 12 3.1 3.2 5.1 6.1 7.1 9.1 10.1 11.1 12.1 17.0 26.1 26.2","13.1":0.01931,"14.1":0.02575,"15.1":0.00644,"15.2-15.3":0.00644,"15.4":0.01288,"15.5":0.01288,"15.6":0.07082,"16.0":0.00644,"16.1":0.01931,"16.2":0.01288,"16.3":0.01931,"16.4":0.00644,"16.5":0.00644,"16.6":0.07726,"17.1":0.03219,"17.2":0.00644,"17.3":0.00644,"17.4":0.01288,"17.5":0.02575,"17.6":0.04507,"18.0":0.01288,"18.1":0.01288,"18.2":0.00644,"18.3":0.03219,"18.4":0.01288,"18.5-18.6":0.05794,"26.0":0.10301},G:{"8":0,"3.2":0,"4.0-4.1":0,"4.2-4.3":0.00069,"5.0-5.1":0,"6.0-6.1":0.00275,"7.0-7.1":0.00206,"8.1-8.4":0,"9.0-9.2":0,"9.3":0.00619,"10.0-10.2":0.00069,"10.3":0.01169,"11.0-11.2":0.17328,"11.3-11.4":0.00413,"12.0-12.1":0.00138,"12.2-12.5":0.03369,"13.0-13.1":0,"13.2":0.00344,"13.3":0.00138,"13.4-13.7":0.0055,"14.0-14.4":0.01169,"14.5-14.8":0.01238,"15.0-15.1":0.01169,"15.2-15.3":0.00894,"15.4":0.01031,"15.5":0.01169,"15.6-15.8":0.15265,"16.0":0.02063,"16.1":0.03851,"16.2":0.01994,"16.3":0.03576,"16.4":0.00894,"16.5":0.01582,"16.6-16.7":0.20423,"17.0":0.01444,"17.1":0.022,"17.2":0.01582,"17.3":0.02338,"17.4":0.04126,"17.5":0.07083,"17.6-17.7":0.17878,"18.0":0.04057,"18.1":0.08389,"18.2":0.04538,"18.3":0.14578,"18.4":0.07495,"18.5-18.6":3.82184,"26.0":0.4724,"26.1":0.01719},P:{"27":0.01287,"28":0.14162,"29":0.01287,_:"4 20 21 22 23 24 25 26 5.0-5.4 6.2-6.4 7.2-7.4 8.2 9.2 10.1 11.1-11.2 12.0 13.0 14.0 15.0 16.0 17.0 18.0 19.0"},I:{"0":3.57379,"3":0,"4":0,"2.1":0,"2.2":0,"2.3":0,"4.1":0,"4.2-4.3":0.00072,"4.4":0,"4.4.3-4.4.4":0.00179},K:{"0":0.01424,_:"10 11 12 11.1 11.5 12.1"},A:{"9":0.20129,"11":2.81813,_:"6 7 8 10 5.5"},S:{_:"2.5 3.0-3.1"},J:{_:"7 10"},N:{_:"10 11"},R:{_:"0"},M:{"0":0.11395},Q:{"14.9":1.4885},O:{"0":3.24763},H:{"0":0},L:{"0":19.51747}};
@@ -0,0 +1 @@
{"name":"combined-stream","version":"1.0.8","requiresBuild":false,"files":{"package.json":{"checkedAt":1794532111441,"integrity":"sha512-t7prZfhD550sZMBl2cm8/foTtZJhBIzqcvrri6fH5pnvPD5TrnMC+mvMoZ1+B3dCg6JIkUnv8qmfFJhohTWSGg==","mode":388,"size":640},"License":{"checkedAt":1794532111442,"integrity":"sha512-QC/HN+kDgNYpC7i33wfvn5wKaEz8H4mMLjVuA6w03m1OlQFq5w7L4MbJZrWZaWlso2u4xIS7xZDZT6574cQ1Og==","mode":388,"size":1085},"Readme.md":{"checkedAt":1794532111442,"integrity":"sha512-AMSXvw5GumnxK1C7XXz6mOZKXT0KVZkZ9ezcDU+xBg516b1Gn5wuwp2cR52XZK+C/wSnebqoSf63Wg+yts2B6g==","mode":388,"size":4551},"yarn.lock":{"checkedAt":1794532111442,"integrity":"sha512-wos/5bMpanOEY86KR8YcIyfL+DaYC1h6Hrf5urk4G4qmSpBhJ9B0a+iJdaKU4rE2bpxuvSm+s1M8JqNMCDbsYw==","mode":388,"size":551},"lib/combined_stream.js":{"checkedAt":1794532111442,"integrity":"sha512-NLJJG4D921foMMCtUqm22p78dWVUkLEXof2LtGSVnVSsJYXd1nJpdftgpAF9M69Q+ETEMR8VcMCcQTVZtKBpmg==","mode":420,"size":4687}}}
@@ -0,0 +1,78 @@
import { Newable, ServiceIdentifier } from '@inversifyjs/common';
import { Binding, BindingActivation, BindingConstraints, BindingDeactivation, BindingScope, BindingType, DynamicValueBuilder, Factory, MetadataName, MetadataTag, Provider, ResolutionContext, ScopedBinding } from '@inversifyjs/core';
import { Writable } from '../../common/models/Writable';
import { BindInFluentSyntax, BindInWhenOnFluentSyntax, BindOnFluentSyntax, BindToFluentSyntax, BindWhenFluentSyntax, BindWhenOnFluentSyntax } from './BindingFluentSyntax';
import { BindingIdentifier } from './BindingIdentifier';
import { MapToResolvedValueInjectOptions } from './MapToResolvedValueInjectOptions';
export declare class BindInFluentSyntaxImplementation<T> implements BindInFluentSyntax<T> {
#private;
constructor(binding: Writable<ScopedBinding<BindingType, BindingScope, T>>);
getIdentifier(): BindingIdentifier;
inRequestScope(): BindWhenOnFluentSyntax<T>;
inSingletonScope(): BindWhenOnFluentSyntax<T>;
inTransientScope(): BindWhenOnFluentSyntax<T>;
}
export declare class BindToFluentSyntaxImplementation<T> implements BindToFluentSyntax<T> {
#private;
constructor(callback: (binding: Binding<T>) => void, containerModuleId: number | undefined, defaultScope: BindingScope, serviceIdentifier: ServiceIdentifier<T>);
to(type: Newable<T>): BindInWhenOnFluentSyntax<T>;
toSelf(): BindInWhenOnFluentSyntax<T>;
toConstantValue(value: T): BindWhenOnFluentSyntax<T>;
toDynamicValue(builder: DynamicValueBuilder<T>): BindInWhenOnFluentSyntax<T>;
toResolvedValue(factory: () => T | Promise<T>): BindInWhenOnFluentSyntax<T>;
toResolvedValue<TArgs extends unknown[]>(factory: (...args: TArgs) => T | Promise<T>, injectOptions: MapToResolvedValueInjectOptions<TArgs>): BindInWhenOnFluentSyntax<T>;
toFactory<T extends Factory<unknown, any>>(this: BindToFluentSyntaxImplementation<T>, builder: (context: ResolutionContext) => T | Promise<T>): BindWhenOnFluentSyntax<T>;
/**
* @deprecated Use `toFactory()` instead. Providers will be removed in v8.
* Providers exist for historical reasons from v5 when async dependencies weren't supported.
* Factories are more flexible and can handle both sync and async operations.
*/
toProvider<T extends Provider<unknown, any>>(this: BindToFluentSyntaxImplementation<T>, provider: (context: ResolutionContext) => T): BindWhenOnFluentSyntax<T>;
toService(service: ServiceIdentifier<T>): void;
}
export declare class BindOnFluentSyntaxImplementation<T> implements BindOnFluentSyntax<T> {
#private;
constructor(binding: Writable<ScopedBinding<BindingType, BindingScope, T>>);
getIdentifier(): BindingIdentifier;
onActivation(activation: BindingActivation<T>): BindWhenFluentSyntax<T>;
onDeactivation(deactivation: BindingDeactivation<T>): BindWhenFluentSyntax<T>;
}
export declare class BindWhenFluentSyntaxImplementation<T> implements BindWhenFluentSyntax<T> {
#private;
constructor(binding: Writable<ScopedBinding<BindingType, BindingScope, T>>);
getIdentifier(): BindingIdentifier;
when(constraint: (metadata: BindingConstraints) => boolean): BindOnFluentSyntax<T>;
whenAnyAncestor(constraint: (metadata: BindingConstraints) => boolean): BindOnFluentSyntax<T>;
whenAnyAncestorIs(serviceIdentifier: ServiceIdentifier): BindOnFluentSyntax<T>;
whenAnyAncestorNamed(name: MetadataName): BindOnFluentSyntax<T>;
whenAnyAncestorTagged(tag: MetadataTag, tagValue: unknown): BindOnFluentSyntax<T>;
whenDefault(): BindOnFluentSyntax<T>;
whenNamed(name: MetadataName): BindOnFluentSyntax<T>;
whenNoParent(constraint: (metadata: BindingConstraints) => boolean): BindOnFluentSyntax<T>;
whenNoParentIs(serviceIdentifier: ServiceIdentifier): BindOnFluentSyntax<T>;
whenNoParentNamed(name: MetadataName): BindOnFluentSyntax<T>;
whenNoParentTagged(tag: MetadataTag, tagValue: unknown): BindOnFluentSyntax<T>;
whenParent(constraint: (metadata: BindingConstraints) => boolean): BindOnFluentSyntax<T>;
whenParentIs(serviceIdentifier: ServiceIdentifier): BindOnFluentSyntax<T>;
whenParentNamed(name: MetadataName): BindOnFluentSyntax<T>;
whenParentTagged(tag: MetadataTag, tagValue: unknown): BindOnFluentSyntax<T>;
whenTagged(tag: MetadataTag, tagValue: unknown): BindOnFluentSyntax<T>;
whenNoAncestor(constraint: (metadata: BindingConstraints) => boolean): BindOnFluentSyntax<T>;
whenNoAncestorIs(serviceIdentifier: ServiceIdentifier): BindOnFluentSyntax<T>;
whenNoAncestorNamed(name: MetadataName): BindOnFluentSyntax<T>;
whenNoAncestorTagged(tag: MetadataTag, tagValue: unknown): BindOnFluentSyntax<T>;
}
export declare class BindWhenOnFluentSyntaxImplementation<T> extends BindWhenFluentSyntaxImplementation<T> implements BindWhenOnFluentSyntax<T> {
#private;
constructor(binding: Writable<ScopedBinding<BindingType, BindingScope, T>>);
onActivation(activation: BindingActivation<T>): BindWhenFluentSyntax<T>;
onDeactivation(deactivation: BindingDeactivation<T>): BindWhenFluentSyntax<T>;
}
export declare class BindInWhenOnFluentSyntaxImplementation<T> extends BindWhenOnFluentSyntaxImplementation<T> implements BindInWhenOnFluentSyntax<T> {
#private;
constructor(binding: Writable<ScopedBinding<BindingType, BindingScope, T>>);
inRequestScope(): BindWhenOnFluentSyntax<T>;
inSingletonScope(): BindWhenOnFluentSyntax<T>;
inTransientScope(): BindWhenOnFluentSyntax<T>;
}
//# sourceMappingURL=BindingFluentSyntaxImplementation.d.ts.map
@@ -0,0 +1,2 @@
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("react")):"function"==typeof define&&define.amd?define(["exports","react"],e):e((t=t||self).ReactWindow={},t.React)}(this,(function(t,e){"use strict";function r(){return(r=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(t[o]=r[o])}return t}).apply(this,arguments)}function o(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function n(t,e){return(n=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function i(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,n(t,e)}var a=Number.isNaN||function(t){return"number"==typeof t&&t!=t};function l(t,e){if(t.length!==e.length)return!1;for(var r=0;r<t.length;r++)if(o=t[r],n=e[r],!(o===n||a(o)&&a(n)))return!1;var o,n;return!0}function s(t,e){var r;void 0===e&&(e=l);var o,n=[],i=!1;return function(){for(var a=[],l=0;l<arguments.length;l++)a[l]=arguments[l];return i&&r===this&&e(a,n)||(o=t.apply(this,a),i=!0,r=this,n=a),o}}var c="object"==typeof performance&&"function"==typeof performance.now?function(){return performance.now()}:function(){return Date.now()};function u(t){cancelAnimationFrame(t.id)}function f(t,e){var r=c();var o={id:requestAnimationFrame((function n(){c()-r>=e?t.call(null):o.id=requestAnimationFrame(n)}))};return o}var d=-1;function h(t){if(void 0===t&&(t=!1),-1===d||t){var e=document.createElement("div"),r=e.style;r.width="50px",r.height="50px",r.overflow="scroll",document.body.appendChild(e),d=e.offsetWidth-e.clientWidth,document.body.removeChild(e)}return d}var m=null;function p(t){if(void 0===t&&(t=!1),null===m||t){var e=document.createElement("div"),r=e.style;r.width="50px",r.height="50px",r.overflow="scroll",r.direction="rtl";var o=document.createElement("div"),n=o.style;return n.width="100px",n.height="100px",e.appendChild(o),document.body.appendChild(e),e.scrollLeft>0?m="positive-descending":(e.scrollLeft=1,m=0===e.scrollLeft?"negative":"positive-ascending"),document.body.removeChild(e),m}return m}var v=function(t){var e=t.columnIndex;t.data;return t.rowIndex+":"+e};function g(t){var n,a=t.getColumnOffset,l=t.getColumnStartIndexForOffset,c=t.getColumnStopIndexForStartIndex,d=t.getColumnWidth,m=t.getEstimatedTotalHeight,g=t.getEstimatedTotalWidth,I=t.getOffsetForColumnAndAlignment,w=t.getOffsetForRowAndAlignment,M=t.getRowHeight,x=t.getRowOffset,_=t.getRowStartIndexForOffset,C=t.getRowStopIndexForStartIndex,R=t.initInstanceProps,y=t.shouldResetStyleCacheOnItemSizeChange,O=t.validateProps;return(n=function(t){function n(e){var r;return(r=t.call(this,e)||this)._instanceProps=R(r.props,o(r)),r._resetIsScrollingTimeoutId=null,r._outerRef=void 0,r.state={instance:o(r),isScrolling:!1,horizontalScrollDirection:"forward",scrollLeft:"number"==typeof r.props.initialScrollLeft?r.props.initialScrollLeft:0,scrollTop:"number"==typeof r.props.initialScrollTop?r.props.initialScrollTop:0,scrollUpdateWasRequested:!1,verticalScrollDirection:"forward"},r._callOnItemsRendered=void 0,r._callOnItemsRendered=s((function(t,e,o,n,i,a,l,s){return r.props.onItemsRendered({overscanColumnStartIndex:t,overscanColumnStopIndex:e,overscanRowStartIndex:o,overscanRowStopIndex:n,visibleColumnStartIndex:i,visibleColumnStopIndex:a,visibleRowStartIndex:l,visibleRowStopIndex:s})})),r._callOnScroll=void 0,r._callOnScroll=s((function(t,e,o,n,i){return r.props.onScroll({horizontalScrollDirection:o,scrollLeft:t,scrollTop:e,verticalScrollDirection:n,scrollUpdateWasRequested:i})})),r._getItemStyle=void 0,r._getItemStyle=function(t,e){var o,n=r.props,i=n.columnWidth,l=n.direction,s=n.rowHeight,c=r._getItemStyleCache(y&&i,y&&l,y&&s),u=t+":"+e;if(c.hasOwnProperty(u))o=c[u];else{var f=a(r.props,e,r._instanceProps),h="rtl"===l;c[u]=o={position:"absolute",left:h?void 0:f,right:h?f:void 0,top:x(r.props,t,r._instanceProps),height:M(r.props,t,r._instanceProps),width:d(r.props,e,r._instanceProps)}}return o},r._getItemStyleCache=void 0,r._getItemStyleCache=s((function(t,e,r){return{}})),r._onScroll=function(t){var e=t.currentTarget,o=e.clientHeight,n=e.clientWidth,i=e.scrollLeft,a=e.scrollTop,l=e.scrollHeight,s=e.scrollWidth;r.setState((function(t){if(t.scrollLeft===i&&t.scrollTop===a)return null;var e=r.props.direction,c=i;if("rtl"===e)switch(p()){case"negative":c=-i;break;case"positive-descending":c=s-n-i}c=Math.max(0,Math.min(c,s-n));var u=Math.max(0,Math.min(a,l-o));return{isScrolling:!0,horizontalScrollDirection:t.scrollLeft<i?"forward":"backward",scrollLeft:c,scrollTop:u,verticalScrollDirection:t.scrollTop<a?"forward":"backward",scrollUpdateWasRequested:!1}}),r._resetIsScrollingDebounced)},r._outerRefSetter=function(t){var e=r.props.outerRef;r._outerRef=t,"function"==typeof e?e(t):null!=e&&"object"==typeof e&&e.hasOwnProperty("current")&&(e.current=t)},r._resetIsScrollingDebounced=function(){null!==r._resetIsScrollingTimeoutILine truncated
//# sourceMappingURL=index-prod.umd.js.map
@@ -0,0 +1,13 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.CurrencyDigits = CurrencyDigits;
var _262_1 = require("../262");
/**
* https://tc39.es/ecma402/#sec-currencydigits
*/
function CurrencyDigits(c, _a) {
var currencyDigitsData = _a.currencyDigitsData;
return (0, _262_1.HasOwnProperty)(currencyDigitsData, c)
? currencyDigitsData[c]
: 2;
}
@@ -0,0 +1,3 @@
# postcss-value-parser (forked + inlined)
This is a customized version of of [PostCSS Value Parser](https://github.com/TrySound/postcss-value-parser) to fix some bugs around parsing CSS functions.
@@ -0,0 +1,37 @@
import { AbstractTokenizer } from './AbstractTokenizer.js';
import type { IRandomAccessTokenizer, IRandomAccessFileInfo, IReadChunkOptions, ITokenizerOptions } from './types.js';
import { type FileHandle } from 'node:fs/promises';
interface IFileTokenizerOptions extends ITokenizerOptions {
/**
* Pass additional file information to the tokenizer
*/
fileInfo: IRandomAccessFileInfo;
}
export declare class FileTokenizer extends AbstractTokenizer implements IRandomAccessTokenizer {
private fileHandle;
fileInfo: IRandomAccessFileInfo;
/**
* Create tokenizer from provided file path
* @param sourceFilePath File path
*/
static fromFile(sourceFilePath: string): Promise<FileTokenizer>;
protected constructor(fileHandle: FileHandle, options: IFileTokenizerOptions);
/**
* Read buffer from file
* @param uint8Array - Uint8Array to write result to
* @param options - Read behaviour options
* @returns Promise number of bytes read
*/
readBuffer(uint8Array: Uint8Array, options?: IReadChunkOptions): Promise<number>;
/**
* Peek buffer from file
* @param uint8Array - Uint8Array (or Buffer) to write data to
* @param options - Read behaviour options
* @returns Promise number of bytes read
*/
peekBuffer(uint8Array: Uint8Array, options?: IReadChunkOptions): Promise<number>;
close(): Promise<void>;
setPosition(position: number): void;
supportsRandomAccess(): boolean;
}
export {};
@@ -0,0 +1 @@
!function(_,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e(require("dayjs")):"function"==typeof define&&define.amd?define(["dayjs"],e):(_="undefined"!=typeof globalThis?globalThis:_||self).dayjs_locale_ar_dz=e(_.dayjs)}(this,(function(_){"use strict";function e(_){return _&&"object"==typeof _&&"default"in _?_:{default:_}}var t=e(_),d={name:"ar-dz",weekdays:"الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت".split("_"),months:"جانفي_فيفري_مارس_أفريل_ماي_جوان_جويلية_أوت_سبتمبر_أكتوبر_نوفمبر_ديسمبر".split("_"),weekdaysShort:"احد_اثنين_ثلاثاء_اربعاء_خميس_جمعة_سبت".split("_"),monthsShort:"جانفي_فيفري_مارس_أفريل_ماي_جوان_جويلية_أوت_سبتمبر_أكتوبر_نوفمبر_ديسمبر".split("_"),weekdaysMin:"أح_إث_ثلا_أر_خم_جم_سب".split("_"),ordinal:function(_){return _},formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},meridiem:function(_){return _>12?"م":"ص"},relativeTime:{future:"في %s",past:"منذ %s",s:"ثوان",m:"دقيقة",mm:"%d دقائق",h:"ساعة",hh:"%d ساعات",d:"يوم",dd:"%d أيام",M:"شهر",MM:"%d أشهر",y:"سنة",yy:"%d سنوات"}};return t.default.locale(d,null,!0),d}));
@@ -0,0 +1,133 @@
# unique-stream
node.js through stream that emits a unique stream of objects based on criteria
[![Build Status](https://github.com/eugeneware/unique-stream/actions/workflows/ci.yml/badge.svg?event=push)](https://github.com/eugeneware/unique-stream/actions/workflows/ci.yml)
## Installation
Install via [npm](https://www.npmjs.com/):
```
$ npm install unique-stream
```
## Examples
### Dedupe a ReadStream based on JSON.stringify:
``` js
var unique = require('unique-stream')
, Stream = require('stream');
// return a stream of 3 identical objects
function makeStreamOfObjects() {
var s = new Stream;
s.readable = true;
var count = 3;
for (var i = 0; i < 3; i++) {
setImmediate(function () {
s.emit('data', { name: 'Bob', number: 123 });
--count || end();
});
}
function end() {
s.emit('end');
}
return s;
}
// Will only print out one object as the rest are dupes. (Uses JSON.stringify)
makeStreamOfObjects()
.pipe(unique())
.on('data', console.log);
```
### Dedupe a ReadStream based on an object property:
``` js
// Use name as the key field to dedupe on. Will only print one object
makeStreamOfObjects()
.pipe(unique('name'))
.on('data', console.log);
```
### Dedupe a ReadStream based on a custom function:
``` js
// Use a custom function to dedupe on. Use the 'number' field. Will only print one object.
makeStreamOfObjects()
.pipe(function (data) {
return data.number;
})
.on('data', console.log);
```
## Dedupe multiple streams
The reason I wrote this was to dedupe multiple object streams:
``` js
var aggregator = unique();
// Stream 1
makeStreamOfObjects()
.pipe(aggregator);
// Stream 2
makeStreamOfObjects()
.pipe(aggregator);
// Stream 3
makeStreamOfObjects()
.pipe(aggregator);
aggregator.on('data', console.log);
```
## Use a custom store to record keys that have been encountered
By default a set is used to store keys encountered so far, in order to check new ones for
uniqueness. You can supply your own store instead, providing it supports the add(key) and
has(key) methods. This could allow you to use a persistent store so that already encountered
objects are not re-streamed when node is reloaded.
``` js
var keyStore = {
store: {},
add: function(key) {
this.store[key] = true;
},
has: function(key) {
return this.store[key] !== undefined;
}
};
makeStreamOfObjects()
.pipe(unique('name', keyStore))
.on('data', console.log);
```
## Contributing
unique-stream is an **OPEN Open Source Project**. This means that:
> Individuals making significant and valuable contributions are given commit-access to the project to contribute as they see fit. This project is more like an open wiki than a standard guarded open source project.
See the [CONTRIBUTING.md](https://github.com/eugeneware/unique-stream/blob/master/CONTRIBUTING.md) file for more details.
### Contributors
unique-stream is only possible due to the excellent work of the following contributors:
<table><tbody>
<tr><th align="left">Eugene Ware</th><td><a href="https://github.com/eugeneware">GitHub/eugeneware</a></td></tr>
<tr><th align="left">Craig Ambrose</th><td><a href="https://github.com/craigambrose">GitHub/craigambrose</a></td></tr>
<tr><th align="left">Shinnosuke Watanabe</th><td><a href="https://github.com/shinnn">GitHub/shinnn</a></td></tr>
<tr><th align="left">Rouven Weßling</th><td><a href="https://github.com/realityking">GitHub/realityking</a></td></tr>
</tbody></table>
@@ -0,0 +1,6 @@
import { ResolvedValueBinding } from '../models/ResolvedValueBinding';
/**
* Clones a ResolvedValueBinding
*/
export declare function cloneResolvedValueBinding<TActivated>(binding: ResolvedValueBinding<TActivated>): ResolvedValueBinding<TActivated>;
//# sourceMappingURL=cloneResolvedValueBinding.d.ts.map
@@ -0,0 +1,123 @@
# color
> JavaScript library for immutable color conversion and manipulation with support for CSS color strings.
```js
const color = Color('#7743CE').alpha(0.5).lighten(0.5);
console.log(color.hsl().string()); // 'hsla(262, 59%, 81%, 0.5)'
console.log(color.cmyk().round().array()); // [ 16, 25, 0, 8, 0.5 ]
console.log(color.ansi256().object()); // { ansi256: 183, alpha: 0.5 }
```
## Install
```console
$ npm install color
```
## Usage
```js
const Color = require('color');
```
### Constructors
```js
const color = Color('rgb(255, 255, 255)')
const color = Color({r: 255, g: 255, b: 255})
const color = Color.rgb(255, 255, 255)
const color = Color.rgb([255, 255, 255])
```
Set the values for individual channels with `alpha`, `red`, `green`, `blue`, `hue`, `saturationl` (hsl), `saturationv` (hsv), `lightness`, `whiteness`, `blackness`, `cyan`, `magenta`, `yellow`, `black`
String constructors are handled by [color-string](https://www.npmjs.com/package/color-string)
### Getters
```js
color.hsl();
```
Convert a color to a different space (`hsl()`, `cmyk()`, etc.).
```js
color.object(); // {r: 255, g: 255, b: 255}
```
Get a hash of the color value. Reflects the color's current model (see above).
```js
color.rgb().array() // [255, 255, 255]
```
Get an array of the values with `array()`. Reflects the color's current model (see above).
```js
color.rgbNumber() // 16777215 (0xffffff)
```
Get the rgb number value.
```js
color.hex() // #ffffff
```
Get the hex value. (**NOTE:** `.hex()` does not return alpha values; use `.hexa()` for an RGBA representation)
```js
color.red() // 255
```
Get the value for an individual channel.
### CSS Strings
```js
color.hsl().string() // 'hsl(320, 50%, 100%)'
```
Calling `.string()` with a number rounds the numbers to that decimal place. It defaults to 1.
### Luminosity
```js
color.luminosity(); // 0.412
```
The [WCAG luminosity](http://www.w3.org/TR/WCAG20/#relativeluminancedef) of the color. 0 is black, 1 is white.
```js
color.contrast(Color("blue")) // 12
```
The [WCAG contrast ratio](http://www.w3.org/TR/WCAG20/#contrast-ratiodef) to another color, from 1 (same color) to 21 (contrast b/w white and black).
```js
color.isLight(); // true
color.isDark(); // false
```
Get whether the color is "light" or "dark", useful for deciding text color.
### Manipulation
```js
color.negate() // rgb(0, 100, 255) -> rgb(255, 155, 0)
color.lighten(0.5) // hsl(100, 50%, 50%) -> hsl(100, 50%, 75%)
color.lighten(0.5) // hsl(100, 50%, 0) -> hsl(100, 50%, 0)
color.darken(0.5) // hsl(100, 50%, 50%) -> hsl(100, 50%, 25%)
color.darken(0.5) // hsl(100, 50%, 0) -> hsl(100, 50%, 0)
color.lightness(50) // hsl(100, 50%, 10%) -> hsl(100, 50%, 50%)
color.saturate(0.5) // hsl(100, 50%, 50%) -> hsl(100, 75%, 50%)
color.desaturate(0.5) // hsl(100, 50%, 50%) -> hsl(100, 25%, 50%)
color.grayscale() // #5CBF54 -> #969696
color.whiten(0.5) // hwb(100, 50%, 50%) -> hwb(100, 75%, 50%)
color.blacken(0.5) // hwb(100, 50%, 50%) -> hwb(100, 50%, 75%)
color.fade(0.5) // rgba(10, 10, 10, 0.8) -> rgba(10, 10, 10, 0.4)
color.opaquer(0.5) // rgba(10, 10, 10, 0.8) -> rgba(10, 10, 10, 1.0)
color.rotate(180) // hsl(60, 20%, 20%) -> hsl(240, 20%, 20%)
color.rotate(-90) // hsl(60, 20%, 20%) -> hsl(330, 20%, 20%)
color.mix(Color("yellow")) // cyan -> rgb(128, 255, 128)
color.mix(Color("yellow"), 0.3) // cyan -> rgb(77, 255, 179)
// chaining
color.green(100).grayscale().lighten(0.6)
```
## Propers
The API was inspired by [color-js](https://github.com/brehaut/color-js). Manipulation functions by CSS tools like Sass, LESS, and Stylus.
@@ -0,0 +1,63 @@
<?xml version="1.0" encoding="UTF-8"?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://purl.org/rss/1.0/" xmlns:ev="http://purl.org/rss/1.0/modules/event/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:syn="http://purl.org/rss/1.0/modules/syndication/" xmlns:dcterms="http://purl.org/dc/terms/" xmlns:admin="http://webns.net/mvcb/">
<channel rdf:about="https://github.com/fb55/htmlparser2/">
<title>A title to parse and remember</title>
<link>https://github.com/fb55/htmlparser2/</link>
<description/>
<dc:language>en-us</dc:language>
<dc:rights>Copyright 2015 the authors</dc:rights>
<dc:publisher>webmaster@thisisafakedoma.in</dc:publisher>
<dc:creator>webmaster@thisisafakedoma.in</dc:creator>
<dc:source>https://github.com/fb55/htmlparser2/</dc:source>
<dc:title>A title to parse and remember</dc:title>
<dc:type>Collection</dc:type>
<syn:updateBase>2011-11-04T09:39:10-07:00</syn:updateBase>
<syn:updateFrequency>4</syn:updateFrequency>
<syn:updatePeriod>hourly</syn:updatePeriod>
<items>
<rdf:Seq>
<rdf:li rdf:resource="http://somefakesite/path/to/something.html"/>
</rdf:Seq>
</items>
</channel>
<item rdf:about="http://somefakesite/path/to/something.html">
<title><![CDATA[ Fast HTML Parsing ]]></title>
<link>
http://somefakesite/path/to/something.html
</link>
<description><![CDATA[
Great test content<br>A link: <a href="http://github.com">Github</a>
]]></description>
<dc:date>2011-11-04T09:35:17-07:00</dc:date>
<dc:language>en-us</dc:language>
<dc:rights>Copyright 2015 the authors</dc:rights>
<dc:source>
http://somefakesite/path/to/something.html
</dc:source>
<dc:title><![CDATA[ Fast HTML Parsing ]]></dc:title>
<dc:type>text</dc:type>
<dcterms:issued>2011-11-04T09:35:17-07:00</dcterms:issued>
</item>
<item rdf:about="http://somefakesite/path/to/something-else.html">
<title><![CDATA[
This space intentionally left blank
]]></title>
<link>
http://somefakesite/path/to/something-else.html
</link>
<description><![CDATA[
The early bird gets the worm
]]></description>
<dc:date>2011-11-04T09:34:54-07:00</dc:date>
<dc:language>en-us</dc:language>
<dc:rights>Copyright 2015 the authors</dc:rights>
<dc:source>
http://somefakesite/path/to/something-else.html
</dc:source>
<dc:title><![CDATA[
This space intentionally left blank
]]></dc:title>
<dc:type>text</dc:type>
<dcterms:issued>2011-11-04T09:34:54-07:00</dcterms:issued>
</item>
</rdf:RDF>
@@ -0,0 +1,592 @@
"use strict";
// parse a single path portion
Object.defineProperty(exports, "__esModule", { value: true });
exports.AST = void 0;
const brace_expressions_js_1 = require("./brace-expressions.js");
const unescape_js_1 = require("./unescape.js");
const types = new Set(['!', '?', '+', '*', '@']);
const isExtglobType = (c) => types.has(c);
// Patterns that get prepended to bind to the start of either the
// entire string, or just a single path portion, to prevent dots
// and/or traversal patterns, when needed.
// Exts don't need the ^ or / bit, because the root binds that already.
const startNoTraversal = '(?!(?:^|/)\\.\\.?(?:$|/))';
const startNoDot = '(?!\\.)';
// characters that indicate a start of pattern needs the "no dots" bit,
// because a dot *might* be matched. ( is not in the list, because in
// the case of a child extglob, it will handle the prevention itself.
const addPatternStart = new Set(['[', '.']);
// cases where traversal is A-OK, no dot prevention needed
const justDots = new Set(['..', '.']);
const reSpecials = new Set('().*{}+?[]^$\\!');
const regExpEscape = (s) => s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, '\\$&');
// any single thing other than /
const qmark = '[^/]';
// * => any number of characters
const star = qmark + '*?';
// use + when we need to ensure that *something* matches, because the * is
// the only thing in the path portion.
const starNoEmpty = qmark + '+?';
// remove the \ chars that we added if we end up doing a nonmagic compare
// const deslash = (s: string) => s.replace(/\\(.)/g, '$1')
class AST {
type;
#root;
#hasMagic;
#uflag = false;
#parts = [];
#parent;
#parentIndex;
#negs;
#filledNegs = false;
#options;
#toString;
// set to true if it's an extglob with no children
// (which really means one child of '')
#emptyExt = false;
constructor(type, parent, options = {}) {
this.type = type;
// extglobs are inherently magical
if (type)
this.#hasMagic = true;
this.#parent = parent;
this.#root = this.#parent ? this.#parent.#root : this;
this.#options = this.#root === this ? options : this.#root.#options;
this.#negs = this.#root === this ? [] : this.#root.#negs;
if (type === '!' && !this.#root.#filledNegs)
this.#negs.push(this);
this.#parentIndex = this.#parent ? this.#parent.#parts.length : 0;
}
get hasMagic() {
/* c8 ignore start */
if (this.#hasMagic !== undefined)
return this.#hasMagic;
/* c8 ignore stop */
for (const p of this.#parts) {
if (typeof p === 'string')
continue;
if (p.type || p.hasMagic)
return (this.#hasMagic = true);
}
// note: will be undefined until we generate the regexp src and find out
return this.#hasMagic;
}
// reconstructs the pattern
toString() {
if (this.#toString !== undefined)
return this.#toString;
if (!this.type) {
return (this.#toString = this.#parts.map(p => String(p)).join(''));
}
else {
return (this.#toString =
this.type + '(' + this.#parts.map(p => String(p)).join('|') + ')');
}
}
#fillNegs() {
/* c8 ignore start */
if (this !== this.#root)
throw new Error('should only call on root');
if (this.#filledNegs)
return this;
/* c8 ignore stop */
// call toString() once to fill this out
this.toString();
this.#filledNegs = true;
let n;
while ((n = this.#negs.pop())) {
if (n.type !== '!')
continue;
// walk up the tree, appending everthing that comes AFTER parentIndex
let p = n;
let pp = p.#parent;
while (pp) {
for (let i = p.#parentIndex + 1; !pp.type && i < pp.#parts.length; i++) {
for (const part of n.#parts) {
/* c8 ignore start */
if (typeof part === 'string') {
throw new Error('string part in extglob AST??');
}
/* c8 ignore stop */
part.copyIn(pp.#parts[i]);
}
}
p = pp;
pp = p.#parent;
}
}
return this;
}
push(...parts) {
for (const p of parts) {
if (p === '')
continue;
/* c8 ignore start */
if (typeof p !== 'string' && !(p instanceof AST && p.#parent === this)) {
throw new Error('invalid part: ' + p);
}
/* c8 ignore stop */
this.#parts.push(p);
}
}
toJSON() {
const ret = this.type === null
? this.#parts.slice().map(p => (typeof p === 'string' ? p : p.toJSON()))
: [this.type, ...this.#parts.map(p => p.toJSON())];
if (this.isStart() && !this.type)
ret.unshift([]);
if (this.isEnd() &&
(this === this.#root ||
(this.#root.#filledNegs && this.#parent?.type === '!'))) {
ret.push({});
}
return ret;
}
isStart() {
if (this.#root === this)
return true;
// if (this.type) return !!this.#parent?.isStart()
if (!this.#parent?.isStart())
return false;
if (this.#parentIndex === 0)
return true;
// if everything AHEAD of this is a negation, then it's still the "start"
const p = this.#parent;
for (let i = 0; i < this.#parentIndex; i++) {
const pp = p.#parts[i];
if (!(pp instanceof AST && pp.type === '!')) {
return false;
}
}
return true;
}
isEnd() {
if (this.#root === this)
return true;
if (this.#parent?.type === '!')
return true;
if (!this.#parent?.isEnd())
return false;
if (!this.type)
return this.#parent?.isEnd();
// if not root, it'll always have a parent
/* c8 ignore start */
const pl = this.#parent ? this.#parent.#parts.length : 0;
/* c8 ignore stop */
return this.#parentIndex === pl - 1;
}
copyIn(part) {
if (typeof part === 'string')
this.push(part);
else
this.push(part.clone(this));
}
clone(parent) {
const c = new AST(this.type, parent);
for (const p of this.#parts) {
c.copyIn(p);
}
return c;
}
static #parseAST(str, ast, pos, opt) {
let escaping = false;
let inBrace = false;
let braceStart = -1;
let braceNeg = false;
if (ast.type === null) {
// outside of a extglob, append until we find a start
let i = pos;
let acc = '';
while (i < str.length) {
const c = str.charAt(i++);
// still accumulate escapes at this point, but we do ignore
// starts that are escaped
if (escaping || c === '\\') {
escaping = !escaping;
acc += c;
continue;
}
if (inBrace) {
if (i === braceStart + 1) {
if (c === '^' || c === '!') {
braceNeg = true;
}
}
else if (c === ']' && !(i === braceStart + 2 && braceNeg)) {
inBrace = false;
}
acc += c;
continue;
}
else if (c === '[') {
inBrace = true;
braceStart = i;
braceNeg = false;
acc += c;
continue;
}
if (!opt.noext && isExtglobType(c) && str.charAt(i) === '(') {
ast.push(acc);
acc = '';
const ext = new AST(c, ast);
i = AST.#parseAST(str, ext, i, opt);
ast.push(ext);
continue;
}
acc += c;
}
ast.push(acc);
return i;
}
// some kind of extglob, pos is at the (
// find the next | or )
let i = pos + 1;
let part = new AST(null, ast);
const parts = [];
let acc = '';
while (i < str.length) {
const c = str.charAt(i++);
// still accumulate escapes at this point, but we do ignore
// starts that are escaped
if (escaping || c === '\\') {
escaping = !escaping;
acc += c;
continue;
}
if (inBrace) {
if (i === braceStart + 1) {
if (c === '^' || c === '!') {
braceNeg = true;
}
}
else if (c === ']' && !(i === braceStart + 2 && braceNeg)) {
inBrace = false;
}
acc += c;
continue;
}
else if (c === '[') {
inBrace = true;
braceStart = i;
braceNeg = false;
acc += c;
continue;
}
if (isExtglobType(c) && str.charAt(i) === '(') {
part.push(acc);
acc = '';
const ext = new AST(c, part);
part.push(ext);
i = AST.#parseAST(str, ext, i, opt);
continue;
}
if (c === '|') {
part.push(acc);
acc = '';
parts.push(part);
part = new AST(null, ast);
continue;
}
if (c === ')') {
if (acc === '' && ast.#parts.length === 0) {
ast.#emptyExt = true;
}
part.push(acc);
acc = '';
ast.push(...parts, part);
return i;
}
acc += c;
}
// unfinished extglob
// if we got here, it was a malformed extglob! not an extglob, but
// maybe something else in there.
ast.type = null;
ast.#hasMagic = undefined;
ast.#parts = [str.substring(pos - 1)];
return i;
}
static fromGlob(pattern, options = {}) {
const ast = new AST(null, undefined, options);
AST.#parseAST(pattern, ast, 0, options);
return ast;
}
// returns the regular expression if there's magic, or the unescaped
// string if not.
toMMPattern() {
// should only be called on root
/* c8 ignore start */
if (this !== this.#root)
return this.#root.toMMPattern();
/* c8 ignore stop */
const glob = this.toString();
const [re, body, hasMagic, uflag] = this.toRegExpSource();
// if we're in nocase mode, and not nocaseMagicOnly, then we do
// still need a regular expression if we have to case-insensitively
// match capital/lowercase characters.
const anyMagic = hasMagic ||
this.#hasMagic ||
(this.#options.nocase &&
!this.#options.nocaseMagicOnly &&
glob.toUpperCase() !== glob.toLowerCase());
if (!anyMagic) {
return body;
}
const flags = (this.#options.nocase ? 'i' : '') + (uflag ? 'u' : '');
return Object.assign(new RegExp(`^${re}$`, flags), {
_src: re,
_glob: glob,
});
}
get options() {
return this.#options;
}
// returns the string match, the regexp source, whether there's magic
// in the regexp (so a regular expression is required) and whether or
// not the uflag is needed for the regular expression (for posix classes)
// TODO: instead of injecting the start/end at this point, just return
// the BODY of the regexp, along with the start/end portions suitable
// for binding the start/end in either a joined full-path makeRe context
// (where we bind to (^|/), or a standalone matchPart context (where
// we bind to ^, and not /). Otherwise slashes get duped!
//
// In part-matching mode, the start is:
// - if not isStart: nothing
// - if traversal possible, but not allowed: ^(?!\.\.?$)
// - if dots allowed or not possible: ^
// - if dots possible and not allowed: ^(?!\.)
// end is:
// - if not isEnd(): nothing
// - else: $
//
// In full-path matching mode, we put the slash at the START of the
// pattern, so start is:
// - if first pattern: same as part-matching mode
// - if not isStart(): nothing
// - if traversal possible, but not allowed: /(?!\.\.?(?:$|/))
// - if dots allowed or not possible: /
// - if dots possible and not allowed: /(?!\.)
// end is:
// - if last pattern, same as part-matching mode
// - else nothing
//
// Always put the (?:$|/) on negated tails, though, because that has to be
// there to bind the end of the negated pattern portion, and it's easier to
// just stick it in now rather than try to inject it later in the middle of
// the pattern.
//
// We can just always return the same end, and leave it up to the caller
// to know whether it's going to be used joined or in parts.
// And, if the start is adjusted slightly, can do the same there:
// - if not isStart: nothing
// - if traversal possible, but not allowed: (?:/|^)(?!\.\.?$)
// - if dots allowed or not possible: (?:/|^)
// - if dots possible and not allowed: (?:/|^)(?!\.)
//
// But it's better to have a simpler binding without a conditional, for
// performance, so probably better to return both start options.
//
// Then the caller just ignores the end if it's not the first pattern,
// and the start always gets applied.
//
// But that's always going to be $ if it's the ending pattern, or nothing,
// so the caller can just attach $ at the end of the pattern when building.
//
// So the todo is:
// - better detect what kind of start is needed
// - return both flavors of starting pattern
// - attach $ at the end of the pattern when creating the actual RegExp
//
// Ah, but wait, no, that all only applies to the root when the first pattern
// is not an extglob. If the first pattern IS an extglob, then we need all
// that dot prevention biz to live in the extglob portions, because eg
// +(*|.x*) can match .xy but not .yx.
//
// So, return the two flavors if it's #root and the first child is not an
// AST, otherwise leave it to the child AST to handle it, and there,
// use the (?:^|/) style of start binding.
//
// Even simplified further:
// - Since the start for a join is eg /(?!\.) and the start for a part
// is ^(?!\.), we can just prepend (?!\.) to the pattern (either root
// or start or whatever) and prepend ^ or / at the Regexp construction.
toRegExpSource(allowDot) {
const dot = allowDot ?? !!this.#options.dot;
if (this.#root === this)
this.#fillNegs();
if (!this.type) {
const noEmpty = this.isStart() && this.isEnd();
const src = this.#parts
.map(p => {
const [re, _, hasMagic, uflag] = typeof p === 'string'
? AST.#parseGlob(p, this.#hasMagic, noEmpty)
: p.toRegExpSource(allowDot);
this.#hasMagic = this.#hasMagic || hasMagic;
this.#uflag = this.#uflag || uflag;
return re;
})
.join('');
let start = '';
if (this.isStart()) {
if (typeof this.#parts[0] === 'string') {
// this is the string that will match the start of the pattern,
// so we need to protect against dots and such.
// '.' and '..' cannot match unless the pattern is that exactly,
// even if it starts with . or dot:true is set.
const dotTravAllowed = this.#parts.length === 1 && justDots.has(this.#parts[0]);
if (!dotTravAllowed) {
const aps = addPatternStart;
// check if we have a possibility of matching . or ..,
// and prevent that.
const needNoTrav =
// dots are allowed, and the pattern starts with [ or .
(dot && aps.has(src.charAt(0))) ||
// the pattern starts with \., and then [ or .
(src.startsWith('\\.') && aps.has(src.charAt(2))) ||
// the pattern starts with \.\., and then [ or .
(src.startsWith('\\.\\.') && aps.has(src.charAt(4)));
// no need to prevent dots if it can't match a dot, or if a
// sub-pattern will be preventing it anyway.
const needNoDot = !dot && !allowDot && aps.has(src.charAt(0));
start = needNoTrav ? startNoTraversal : needNoDot ? startNoDot : '';
}
}
}
// append the "end of path portion" pattern to negation tails
let end = '';
if (this.isEnd() &&
this.#root.#filledNegs &&
this.#parent?.type === '!') {
end = '(?:$|\\/)';
}
const final = start + src + end;
return [
final,
(0, unescape_js_1.unescape)(src),
(this.#hasMagic = !!this.#hasMagic),
this.#uflag,
];
}
// We need to calculate the body *twice* if it's a repeat pattern
// at the start, once in nodot mode, then again in dot mode, so a
// pattern like *(?) can match 'x.y'
const repeated = this.type === '*' || this.type === '+';
// some kind of extglob
const start = this.type === '!' ? '(?:(?!(?:' : '(?:';
let body = this.#partsToRegExp(dot);
if (this.isStart() && this.isEnd() && !body && this.type !== '!') {
// invalid extglob, has to at least be *something* present, if it's
// the entire path portion.
const s = this.toString();
this.#parts = [s];
this.type = null;
this.#hasMagic = undefined;
return [s, (0, unescape_js_1.unescape)(this.toString()), false, false];
}
// XXX abstract out this map method
let bodyDotAllowed = !repeated || allowDot || dot || !startNoDot
? ''
: this.#partsToRegExp(true);
if (bodyDotAllowed === body) {
bodyDotAllowed = '';
}
if (bodyDotAllowed) {
body = `(?:${body})(?:${bodyDotAllowed})*?`;
}
// an empty !() is exactly equivalent to a starNoEmpty
let final = '';
if (this.type === '!' && this.#emptyExt) {
final = (this.isStart() && !dot ? startNoDot : '') + starNoEmpty;
}
else {
const close = this.type === '!'
? // !() must match something,but !(x) can match ''
'))' +
(this.isStart() && !dot && !allowDot ? startNoDot : '') +
star +
')'
: this.type === '@'
? ')'
: this.type === '?'
? ')?'
: this.type === '+' && bodyDotAllowed
? ')'
: this.type === '*' && bodyDotAllowed
? `)?`
: `)${this.type}`;
final = start + body + close;
}
return [
final,
(0, unescape_js_1.unescape)(body),
(this.#hasMagic = !!this.#hasMagic),
this.#uflag,
];
}
#partsToRegExp(dot) {
return this.#parts
.map(p => {
// extglob ASTs should only contain parent ASTs
/* c8 ignore start */
if (typeof p === 'string') {
throw new Error('string type in extglob ast??');
}
/* c8 ignore stop */
// can ignore hasMagic, because extglobs are already always magic
const [re, _, _hasMagic, uflag] = p.toRegExpSource(dot);
this.#uflag = this.#uflag || uflag;
return re;
})
.filter(p => !(this.isStart() && this.isEnd()) || !!p)
.join('|');
}
static #parseGlob(glob, hasMagic, noEmpty = false) {
let escaping = false;
let re = '';
let uflag = false;
for (let i = 0; i < glob.length; i++) {
const c = glob.charAt(i);
if (escaping) {
escaping = false;
re += (reSpecials.has(c) ? '\\' : '') + c;
continue;
}
if (c === '\\') {
if (i === glob.length - 1) {
re += '\\\\';
}
else {
escaping = true;
}
continue;
}
if (c === '[') {
const [src, needUflag, consumed, magic] = (0, brace_expressions_js_1.parseClass)(glob, i);
if (consumed) {
re += src;
uflag = uflag || needUflag;
i += consumed - 1;
hasMagic = hasMagic || magic;
continue;
}
}
if (c === '*') {
if (noEmpty && glob === '*')
re += starNoEmpty;
else
re += star;
hasMagic = true;
continue;
}
if (c === '?') {
re += qmark;
hasMagic = true;
continue;
}
re += regExpEscape(c);
}
return [re, (0, unescape_js_1.unescape)(glob), !!hasMagic, uflag];
}
}
exports.AST = AST;
//# sourceMappingURL=ast.js.map
@@ -0,0 +1,29 @@
'use strict';
var $TypeError = require('es-errors/type');
var callBound = require('call-bound');
var $arrayBufferResizable = callBound('%ArrayBuffer.prototype.resizable%', true);
var $sharedArrayGrowable = callBound('%SharedArrayBuffer.prototype.growable%', true);
var isArrayBuffer = require('is-array-buffer');
var isSharedArrayBuffer = require('is-shared-array-buffer');
// https://262.ecma-international.org/15.0/#sec-isfixedlengtharraybuffer
module.exports = function IsFixedLengthArrayBuffer(arrayBuffer) {
var isAB = isArrayBuffer(arrayBuffer);
var isSAB = isSharedArrayBuffer(arrayBuffer);
if (!isAB && !isSAB) {
throw new $TypeError('Assertion failed: `arrayBuffer` must be an ArrayBuffer or SharedArrayBuffer');
}
if (isAB && $arrayBufferResizable) {
return !$arrayBufferResizable(arrayBuffer); // step 1
}
if (isSAB && $sharedArrayGrowable) {
return !$sharedArrayGrowable(arrayBuffer); // step 1
}
return true; // step 2
};
@@ -0,0 +1,152 @@
/**
* @author Toru Nagashima
* See LICENSE file in root directory for full license.
*/
"use strict"
const path = require("path")
const fs = require("fs")
const { convertTsExtensionToJs } = require("../util/map-typescript-extension")
const visitImport = require("../util/visit-import")
/**
* Get all file extensions of the files which have the same basename.
* @param {string} filePath The path to the original file to check.
* @returns {string[]} File extensions.
*/
function getExistingExtensions(filePath) {
const directory = path.dirname(filePath)
const extension = path.extname(filePath)
const basename = path.basename(filePath, extension)
try {
return fs
.readdirSync(directory)
.filter(filename => filename.startsWith(`${basename}.`))
.map(filename => path.extname(filename))
} catch {
return []
}
}
/**
* @typedef {[
* ("always" | "never")?,
* {[ext in string]?: "always" | "never"}?
* ]} RuleOptions
*/
/** @type {import('./rule-module').RuleModule<{RuleOptions: RuleOptions}>} */
module.exports = {
meta: {
docs: {
description:
"enforce the style of file extensions in `import` declarations",
recommended: false,
url: "https://github.com/eslint-community/eslint-plugin-n/blob/HEAD/docs/rules/file-extension-in-import.md",
},
fixable: "code",
messages: {
requireExt: "require file extension '{{ext}}'.",
forbidExt: "forbid file extension '{{ext}}'.",
},
schema: [
{
enum: ["always", "never"],
},
{
type: "object",
properties: {},
additionalProperties: {
enum: ["always", "never"],
},
},
],
type: "suggestion",
},
create(context) {
if ((context.filename ?? context.getFilename()).startsWith("<")) {
return {}
}
const defaultStyle = context.options[0] || "always"
const overrideStyle = context.options[1] || {}
/**
* @param {import("../util/import-target.js")} target
* @returns {void}
*/
function verify({ filePath, name, node, moduleType }) {
// Ignore if it's not resolved to a file or it's a bare module.
if (
(moduleType !== "relative" && moduleType !== "absolute") ||
filePath == null
) {
return
}
// Get extension.
const currentExt = path.extname(name)
const actualExt = path.extname(filePath)
const style = overrideStyle[actualExt] || defaultStyle
const expectedExt = convertTsExtensionToJs(
context,
filePath,
actualExt
)
// Verify.
if (style === "always" && currentExt !== expectedExt) {
context.report({
node,
messageId: "requireExt",
data: { ext: expectedExt },
fix(fixer) {
if (node.range == null) {
return null
}
const index = node.range[1] - 1
return fixer.insertTextBeforeRange(
[index, index],
expectedExt
)
},
})
}
if (
style === "never" &&
currentExt !== "" &&
expectedExt !== "" &&
currentExt === expectedExt
) {
const otherExtensions = getExistingExtensions(filePath)
/** @type {import('eslint').Rule.ReportDescriptor} */
const descriptor = {
node,
messageId: "forbidExt",
data: { ext: currentExt },
}
if (otherExtensions.length === 1) {
descriptor.fix = fixer => {
if (node.range == null) {
return null
}
const index = name.lastIndexOf(currentExt)
const start = node.range[0] + 1 + index
const end = start + currentExt.length
return fixer.removeRange([start, end])
}
}
context.report(descriptor)
}
}
return visitImport(context, { optionIndex: 1 }, targets => {
targets.forEach(verify)
})
},
}
@@ -0,0 +1,10 @@
import { InstanceBinding } from '../../binding/models/InstanceBinding';
import { ClassMetadata } from '../../metadata/models/ClassMetadata';
import { BaseBindingNode } from './BaseBindingNode';
import { PlanServiceNode } from './PlanServiceNode';
export interface InstanceBindingNode<TBinding extends InstanceBinding<any> = InstanceBinding<any>> extends BaseBindingNode<TBinding> {
readonly classMetadata: ClassMetadata;
readonly constructorParams: (PlanServiceNode | undefined)[];
readonly propertyParams: Map<string | symbol, PlanServiceNode>;
}
//# sourceMappingURL=InstanceBindingNode.d.ts.map
@@ -0,0 +1,48 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.heartbeat = heartbeat;
var constants_1 = require("./constants");
function getLastMessageTime(lastMessageTime) {
if (Array.isArray(lastMessageTime)) {
return lastMessageTime.reduce(function (p, c) { return (p.current > c.current) ? p : c; }).current;
}
return lastMessageTime.current;
}
function heartbeat(ws, lastMessageTime, options) {
var _a = options || {}, _b = _a.interval, interval = _b === void 0 ? constants_1.DEFAULT_HEARTBEAT.interval : _b, _c = _a.timeout, timeout = _c === void 0 ? constants_1.DEFAULT_HEARTBEAT.timeout : _c, _d = _a.message, message = _d === void 0 ? constants_1.DEFAULT_HEARTBEAT.message : _d;
// how often check interval between ping messages
// minimum is 100ms
// maximum is ${interval / 10}ms
var intervalCheck = Math.max(100, interval / 10);
var lastPingSentAt = Date.now();
var heartbeatInterval = setInterval(function () {
var timeNow = Date.now();
var lastMessageReceivedAt = getLastMessageTime(lastMessageTime);
if (lastMessageReceivedAt + timeout <= timeNow) {
console.warn("Heartbeat timed out, closing connection, last message received ".concat(timeNow - lastMessageReceivedAt, "ms ago, last ping sent ").concat(timeNow - lastPingSentAt, "ms ago"));
ws.close();
}
else {
if (lastMessageReceivedAt + interval <= timeNow && lastPingSentAt + interval <= timeNow) {
try {
if (typeof message === 'function') {
ws.send(message());
}
else {
ws.send(message);
}
lastPingSentAt = timeNow;
}
catch (err) {
console.error("Heartbeat failed, closing connection", err instanceof Error ? err.message : err);
ws.close();
}
}
}
}, intervalCheck);
ws.addEventListener("close", function () {
clearInterval(heartbeatInterval);
});
return function () { };
}
//# sourceMappingURL=heartbeat.js.map
@@ -0,0 +1,24 @@
export {gfmStrikethroughHtml} from './lib/html.js'
export {gfmStrikethrough} from './lib/syntax.js'
/**
* Configuration (optional).
*/
export interface Options {
/**
* Whether to support strikethrough with a single tilde (default: `true`).
*
* Single tildes work on github.com, but are technically prohibited by the
* GFM spec.
*/
singleTilde?: boolean | null | undefined
}
declare module 'micromark-util-types' {
interface TokenTypeMap {
strikethroughSequence: 'strikethroughSequence'
strikethroughSequenceTemporary: 'strikethroughSequenceTemporary'
strikethrough: 'strikethrough'
strikethroughText: 'strikethroughText'
}
}
@@ -0,0 +1,3 @@
export function isNonEmpty(value: object): boolean;
export function isStringArray(value: unknown): value is string[];
//# sourceMappingURL=utils.d.ts.map
@@ -0,0 +1,63 @@
{
"name": "@types/babel__traverse",
"version": "7.28.0",
"description": "TypeScript definitions for @babel/traverse",
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/babel__traverse",
"license": "MIT",
"contributors": [
{
"name": "Troy Gerwien",
"githubUsername": "yortus",
"url": "https://github.com/yortus"
},
{
"name": "Marvin Hagemeister",
"githubUsername": "marvinhagemeister",
"url": "https://github.com/marvinhagemeister"
},
{
"name": "Ryan Petrich",
"githubUsername": "rpetrich",
"url": "https://github.com/rpetrich"
},
{
"name": "Melvin Groenhoff",
"githubUsername": "mgroenhoff",
"url": "https://github.com/mgroenhoff"
},
{
"name": "Dean L.",
"githubUsername": "dlgrit",
"url": "https://github.com/dlgrit"
},
{
"name": "Ifiok Jr.",
"githubUsername": "ifiokjr",
"url": "https://github.com/ifiokjr"
},
{
"name": "ExE Boss",
"githubUsername": "ExE-Boss",
"url": "https://github.com/ExE-Boss"
},
{
"name": "Daniel Tschinder",
"githubUsername": "danez",
"url": "https://github.com/danez"
}
],
"main": "",
"types": "index.d.ts",
"repository": {
"type": "git",
"url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git",
"directory": "types/babel__traverse"
},
"scripts": {},
"dependencies": {
"@babel/types": "^7.28.2"
},
"peerDependencies": {},
"typesPublisherContentHash": "f8bf439253873b2b30a22c425df086f130320cf70d832d84412e82a51e410680",
"typeScriptVersion": "5.1"
}
@@ -0,0 +1,61 @@
{
"name": "@heroui/shared-utils",
"version": "2.1.12",
"description": "A set of HeroUI utilities",
"keywords": [
"system"
],
"author": "HeroUI <support@heroui.com>",
"homepage": "https://heroui.com",
"license": "MIT",
"main": "dist/index.js",
"sideEffects": false,
"files": [
"dist",
"scripts"
],
"publishConfig": {
"access": "public"
},
"repository": {
"type": "git",
"url": "git+https://github.com/heroui-inc/heroui.git",
"directory": "packages/utilities/shared-utils"
},
"bugs": {
"url": "https://github.com/heroui-inc/heroui/issues"
},
"clean-package": "../../../clean-package.config.json",
"tsup": {
"clean": true,
"target": "es2019",
"format": [
"cjs",
"esm"
],
"splitting": false,
"entry": [
"src/demi/react18",
"src/demi/react19"
]
},
"module": "dist/index.mjs",
"types": "dist/index.d.ts",
"exports": {
".": {
"types": "./dist/index.d.ts",
"import": "./dist/index.mjs",
"require": "./dist/index.js"
},
"./package.json": "./package.json"
},
"scripts": {
"postinstall": "node -e \"try{require('./scripts/postinstall.js')}catch(e){}\"",
"build": "tsup src --dts",
"dev": "pnpm build:fast --watch",
"clean": "rimraf dist .turbo",
"typecheck": "tsc --noEmit",
"build:fast": "tsup src",
"postbuild": "npm run postinstall"
}
}
@@ -0,0 +1,6 @@
import { Tokenizer } from './index.js';
/**
* Splits remaining `spec.lines[].tokens.description` into `name` and `descriptions` tokens,
* and populates the `spec.name`
*/
export default function nameTokenizer(): Tokenizer;
@@ -0,0 +1,5 @@
import Frequency from "./frequency";
declare type InterceptorOptions = {
frequency: Frequency;
};
export default InterceptorOptions;
@@ -0,0 +1,8 @@
var $44ad94f7205cf593$exports = {};
$44ad94f7205cf593$exports = {
"dismiss": `L\xf5peta`
};
export {$44ad94f7205cf593$exports as default};
//# sourceMappingURL=et-EE.module.js.map
@@ -0,0 +1,233 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.ReflectionBinaryWriter = void 0;
const binary_format_contract_1 = require("./binary-format-contract");
const reflection_info_1 = require("./reflection-info");
const assert_1 = require("./assert");
const pb_long_1 = require("./pb-long");
/**
* Writes proto3 messages in binary format using reflection information.
*
* https://developers.google.com/protocol-buffers/docs/encoding
*/
class ReflectionBinaryWriter {
constructor(info) {
this.info = info;
}
prepare() {
if (!this.fields) {
const fieldsInput = this.info.fields ? this.info.fields.concat() : [];
this.fields = fieldsInput.sort((a, b) => a.no - b.no);
}
}
/**
* Writes the message to binary format.
*/
write(message, writer, options) {
this.prepare();
for (const field of this.fields) {
let value, // this will be our field value, whether it is member of a oneof or not
emitDefault, // whether we emit the default value (only true for oneof members)
repeated = field.repeat, localName = field.localName;
// handle oneof ADT
if (field.oneof) {
const group = message[field.oneof];
if (group.oneofKind !== localName)
continue; // if field is not selected, skip
value = group[localName];
emitDefault = true;
}
else {
value = message[localName];
emitDefault = false;
}
// we have handled oneof above. we just have to honor `emitDefault`.
switch (field.kind) {
case "scalar":
case "enum":
let T = field.kind == "enum" ? reflection_info_1.ScalarType.INT32 : field.T;
if (repeated) {
assert_1.assert(Array.isArray(value));
if (repeated == reflection_info_1.RepeatType.PACKED)
this.packed(writer, T, field.no, value);
else
for (const item of value)
this.scalar(writer, T, field.no, item, true);
}
else if (value === undefined)
assert_1.assert(field.opt);
else
this.scalar(writer, T, field.no, value, emitDefault || field.opt);
break;
case "message":
if (repeated) {
assert_1.assert(Array.isArray(value));
for (const item of value)
this.message(writer, options, field.T(), field.no, item);
}
else {
this.message(writer, options, field.T(), field.no, value);
}
break;
case "map":
assert_1.assert(typeof value == 'object' && value !== null);
for (const [key, val] of Object.entries(value))
this.mapEntry(writer, options, field, key, val);
break;
}
}
let u = options.writeUnknownFields;
if (u !== false)
(u === true ? binary_format_contract_1.UnknownFieldHandler.onWrite : u)(this.info.typeName, message, writer);
}
mapEntry(writer, options, field, key, value) {
writer.tag(field.no, binary_format_contract_1.WireType.LengthDelimited);
writer.fork();
// javascript only allows number or string for object properties
// we convert from our representation to the protobuf type
let keyValue = key;
switch (field.K) {
case reflection_info_1.ScalarType.INT32:
case reflection_info_1.ScalarType.FIXED32:
case reflection_info_1.ScalarType.UINT32:
case reflection_info_1.ScalarType.SFIXED32:
case reflection_info_1.ScalarType.SINT32:
keyValue = Number.parseInt(key);
break;
case reflection_info_1.ScalarType.BOOL:
assert_1.assert(key == 'true' || key == 'false');
keyValue = key == 'true';
break;
}
// write key, expecting key field number = 1
this.scalar(writer, field.K, 1, keyValue, true);
// write value, expecting value field number = 2
switch (field.V.kind) {
case 'scalar':
this.scalar(writer, field.V.T, 2, value, true);
break;
case 'enum':
this.scalar(writer, reflection_info_1.ScalarType.INT32, 2, value, true);
break;
case 'message':
this.message(writer, options, field.V.T(), 2, value);
break;
}
writer.join();
}
message(writer, options, handler, fieldNo, value) {
if (value === undefined)
return;
handler.internalBinaryWrite(value, writer.tag(fieldNo, binary_format_contract_1.WireType.LengthDelimited).fork(), options);
writer.join();
}
/**
* Write a single scalar value.
*/
scalar(writer, type, fieldNo, value, emitDefault) {
let [wireType, method, isDefault] = this.scalarInfo(type, value);
if (!isDefault || emitDefault) {
writer.tag(fieldNo, wireType);
writer[method](value);
}
}
/**
* Write an array of scalar values in packed format.
*/
packed(writer, type, fieldNo, value) {
if (!value.length)
return;
assert_1.assert(type !== reflection_info_1.ScalarType.BYTES && type !== reflection_info_1.ScalarType.STRING);
// write tag
writer.tag(fieldNo, binary_format_contract_1.WireType.LengthDelimited);
// begin length-delimited
writer.fork();
// write values without tags
let [, method,] = this.scalarInfo(type);
for (let i = 0; i < value.length; i++)
writer[method](value[i]);
// end length delimited
writer.join();
}
/**
* Get information for writing a scalar value.
*
* Returns tuple:
* [0]: appropriate WireType
* [1]: name of the appropriate method of IBinaryWriter
* [2]: whether the given value is a default value
*
* If argument `value` is omitted, [2] is always false.
*/
scalarInfo(type, value) {
let t = binary_format_contract_1.WireType.Varint;
let m;
let i = value === undefined;
let d = value === 0;
switch (type) {
case reflection_info_1.ScalarType.INT32:
m = "int32";
break;
case reflection_info_1.ScalarType.STRING:
d = i || !value.length;
t = binary_format_contract_1.WireType.LengthDelimited;
m = "string";
break;
case reflection_info_1.ScalarType.BOOL:
d = value === false;
m = "bool";
break;
case reflection_info_1.ScalarType.UINT32:
m = "uint32";
break;
case reflection_info_1.ScalarType.DOUBLE:
t = binary_format_contract_1.WireType.Bit64;
m = "double";
break;
case reflection_info_1.ScalarType.FLOAT:
t = binary_format_contract_1.WireType.Bit32;
m = "float";
break;
case reflection_info_1.ScalarType.INT64:
d = i || pb_long_1.PbLong.from(value).isZero();
m = "int64";
break;
case reflection_info_1.ScalarType.UINT64:
d = i || pb_long_1.PbULong.from(value).isZero();
m = "uint64";
break;
case reflection_info_1.ScalarType.FIXED64:
d = i || pb_long_1.PbULong.from(value).isZero();
t = binary_format_contract_1.WireType.Bit64;
m = "fixed64";
break;
case reflection_info_1.ScalarType.BYTES:
d = i || !value.byteLength;
t = binary_format_contract_1.WireType.LengthDelimited;
m = "bytes";
break;
case reflection_info_1.ScalarType.FIXED32:
t = binary_format_contract_1.WireType.Bit32;
m = "fixed32";
break;
case reflection_info_1.ScalarType.SFIXED32:
t = binary_format_contract_1.WireType.Bit32;
m = "sfixed32";
break;
case reflection_info_1.ScalarType.SFIXED64:
d = i || pb_long_1.PbLong.from(value).isZero();
t = binary_format_contract_1.WireType.Bit64;
m = "sfixed64";
break;
case reflection_info_1.ScalarType.SINT32:
m = "sint32";
break;
case reflection_info_1.ScalarType.SINT64:
d = i || pb_long_1.PbLong.from(value).isZero();
m = "sint64";
break;
}
return [t, m, i || d];
}
}
exports.ReflectionBinaryWriter = ReflectionBinaryWriter;
@@ -0,0 +1,6 @@
export function formatPropWrapperFunctions(propWrapperFunctions: any): string;
export function getExactPropWrapperFunctions(context: any): Set<any>;
export function getPropWrapperFunctions(context: any): Set<any>;
export function isExactPropWrapperFunction(context: any, name: any): any;
export function isPropWrapperFunction(context: any, name: any): any;
//# sourceMappingURL=propWrapper.d.ts.map
@@ -0,0 +1,9 @@
{
"name": "benchmark-uuid",
"private": true,
"description": "Benchmarks for node-uuid",
"dependencies": {
"uuid": "1.4.1",
"uuid-js": "0.7.4"
}
}
@@ -0,0 +1,17 @@
import { OB11BaseNoticeEvent } from './OB11BaseNoticeEvent';
import { NapCatCore } from '../../../napcat-core';
/**
* 群灰条消息事件
* 用于上报未知类型的灰条消息,便于下游检测和处理伪造灰条攻击
*/
export declare class OB11GroupGrayTipEvent extends OB11BaseNoticeEvent {
notice_type: string;
sub_type: string;
group_id: number;
user_id: number;
message_id: number;
busi_id: string;
content: string;
raw_info: unknown;
constructor(core: NapCatCore, groupId: number, userId: number, messageId: number, busiId: string, content: string, rawInfo: unknown);
}
@@ -0,0 +1,111 @@
export declare const OidbSvcTrpcTcp0XE37_800: {
subCommand: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.UINT32, false, false>;
field2: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.INT32, false, false>;
body: import("napcat-protobuf").MessageProtoFieldType<() => {
senderUid: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.STRING, true, false>;
receiverUid: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.STRING, true, false>;
fileUuid: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.STRING, true, false>;
fileHash: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.STRING, true, false>;
}, true, false>;
field101: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.INT32, false, false>;
field102: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.INT32, false, false>;
field200: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.INT32, false, false>;
};
export declare const OidbSvcTrpcTcp0XE37_800Body: {
senderUid: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.STRING, true, false>;
receiverUid: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.STRING, true, false>;
fileUuid: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.STRING, true, false>;
fileHash: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.STRING, true, false>;
};
export declare const OidbSvcTrpcTcp0XE37Response: {
command: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.UINT32, false, false>;
seq: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.INT32, false, false>;
upload: import("napcat-protobuf").MessageProtoFieldType<() => {
retCode: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.INT32, false, false>;
retMsg: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.STRING, true, false>;
totalSpace: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.INT64, false, false>;
usedSpace: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.INT64, false, false>;
uploadedSize: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.INT64, false, false>;
uploadIp: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.STRING, true, false>;
uploadDomain: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.STRING, true, false>;
uploadPort: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.UINT32, false, false>;
uuid: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.STRING, true, false>;
uploadKey: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.BYTES, true, false>;
boolFileExist: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.BOOL, false, false>;
packSize: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.INT32, false, false>;
uploadIpList: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.STRING, false, true>;
uploadHttpsPort: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.INT32, false, false>;
uploadHttpsDomain: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.STRING, true, false>;
uploadDns: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.STRING, true, false>;
uploadLanip: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.STRING, true, false>;
fileAddon: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.STRING, true, false>;
mediaPlatformUploadKey: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.BYTES, true, false>;
}, true, false>;
businessId: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.INT32, false, false>;
clientType: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.INT32, false, false>;
flagSupportMediaPlatform: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.INT32, false, false>;
};
export declare const ApplyUploadRespV3: {
retCode: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.INT32, false, false>;
retMsg: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.STRING, true, false>;
totalSpace: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.INT64, false, false>;
usedSpace: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.INT64, false, false>;
uploadedSize: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.INT64, false, false>;
uploadIp: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.STRING, true, false>;
uploadDomain: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.STRING, true, false>;
uploadPort: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.UINT32, false, false>;
uuid: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.STRING, true, false>;
uploadKey: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.BYTES, true, false>;
boolFileExist: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.BOOL, false, false>;
packSize: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.INT32, false, false>;
uploadIpList: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.STRING, false, true>;
uploadHttpsPort: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.INT32, false, false>;
uploadHttpsDomain: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.STRING, true, false>;
uploadDns: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.STRING, true, false>;
uploadLanip: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.STRING, true, false>;
fileAddon: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.STRING, true, false>;
mediaPlatformUploadKey: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.BYTES, true, false>;
};
export declare const OidbSvcTrpcTcp0XE37_800Response: {
command: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.UINT32, true, false>;
subCommand: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.UINT32, true, false>;
body: import("napcat-protobuf").MessageProtoFieldType<() => {
field10: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.UINT32, true, false>;
field30: import("napcat-protobuf").MessageProtoFieldType<() => {
uin: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.UINT32, true, false>;
field2: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.UINT32, true, false>;
field3: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.UINT32, true, false>;
size: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.UINT32, true, false>;
timestamp: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.UINT32, true, false>;
fileUuid: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.STRING, true, false>;
fileName: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.STRING, true, false>;
field100: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.BYTES, true, false>;
field101: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.BYTES, true, false>;
field110: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.UINT32, true, false>;
timestamp1: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.UINT32, true, false>;
fileHash: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.STRING, true, false>;
field141: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.BYTES, true, false>;
field142: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.BYTES, true, false>;
}, true, false>;
}, true, false>;
field50: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.UINT32, true, false>;
};
export declare const OidbSvcTrpcTcp0XE37_800ResponseBody: {
field10: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.UINT32, true, false>;
field30: import("napcat-protobuf").MessageProtoFieldType<() => {
uin: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.UINT32, true, false>;
field2: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.UINT32, true, false>;
field3: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.UINT32, true, false>;
size: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.UINT32, true, false>;
timestamp: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.UINT32, true, false>;
fileUuid: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.STRING, true, false>;
fileName: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.STRING, true, false>;
field100: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.BYTES, true, false>;
field101: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.BYTES, true, false>;
field110: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.UINT32, true, false>;
timestamp1: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.UINT32, true, false>;
fileHash: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.STRING, true, false>;
field141: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.BYTES, true, false>;
field142: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.BYTES, true, false>;
}, true, false>;
};
@@ -0,0 +1 @@
{"name":"uuid","version":"2.0.3","requiresBuild":false,"files":{"package.json":{"checkedAt":1794532118632,"integrity":"sha512-CuHgxknIm8+7vvI/MaurWSw94VatoDtrnMn2CQGgQFE4v9Z2qp+Ps8fwL6PVZvH7sPXihJeXb+FYNzJHRn3dWA==","mode":420,"size":968},".npmignore":{"checkedAt":1794532118633,"integrity":"sha512-RTMZelUvli5jfAWFZC5MCc6cOC27gkWDn2oAILHzp/KPtRUeVHt+IoAMI+axtzNNoCupTQC20TA8sVHCZu3ReQ==","mode":420,"size":23},"README.md":{"checkedAt":1794532118633,"integrity":"sha512-N5ClL0kW0DHikZR/bQFU2E+nracVOnh2k38FzbyHn1uPoN+ctcNlmzxBjKobT7Lyi4NFgc2oYrFH07mRpq5I9w==","mode":420,"size":6393},"rng.js":{"checkedAt":1794532118633,"integrity":"sha512-CJyPoLWUScf2dkF1fGfIq05eTDszxFZzNIHfUgEGxoI4AOmV7VoTY54x0jGjJeH/uxjNQApKAM7E9ujfePNZNA==","mode":420,"size":90},"rng-browser.js":{"checkedAt":1794532118633,"integrity":"sha512-2mVPihjW7zV+C5Zzf8NL/2uBfXecQOi/l4a3S6clat00Z/BgsfAMTzbwVzmSWi6di5HBn0DDph25kKGkgivtRQ==","mode":420,"size":735},"uuid.js":{"checkedAt":1794532118633,"integrity":"sha512-W/xe9178yuURrgRuKnH+vNU9c4esToH1gNBm+5LrKymkfWb1zHAukos3dent8PYSLqk7LW7WGS5/rHAcPgouKA==","mode":420,"size":5285},".travis.yml":{"checkedAt":1794532118633,"integrity":"sha512-d0F3G7/MUOsObjnnSw7p6uLeJYWVzZ4Boh+ISF6mXxgx/pU+2pRoIMWezrh9Ku8JYwCrgUrABT1y8QgnEBc7tg==","mode":420,"size":64},"benchmark/package.json":{"checkedAt":1794532118633,"integrity":"sha512-FT8QXrAXtM/aYaIliUgU4W5YWaSeJElpsnJz3SNiEHTYeWMeVVHbVr4DYQFKJny1mPVU7EvFj+VrQK8sWhx65w==","mode":420,"size":164},"benchmark/README.md":{"checkedAt":1794532118633,"integrity":"sha512-pdnKGWUTECbO5QvLBIrfTNsXImH2oRgrxV3hRjmlUQ4WGlmI0JQkJGg6NbsqzPTc43XmeP9hlcBK8lulQR5YjA==","mode":420,"size":2031},"benchmark/benchmark.js":{"checkedAt":1794532118634,"integrity":"sha512-ZXCx/04fpvj6wdpMFawfxLTxoi/o4QcK93uwFXdKSkiw/1DWmEc1NTIdTLT+z2Bc1mAsg8U71SiPgrdA8+uoow==","mode":420,"size":2237},"benchmark/bench.gnu":{"checkedAt":1794532118634,"integrity":"sha512-2ywWTIZWUQ+momRkiv32k6IvuFZPkSfbyR4fKHxe7wXbTl9eAMuaz4cD74Yv1A7EoMbcprLj8qH0hEC5ZzZKOA==","mode":420,"size":5822},"benchmark/bench.sh":{"checkedAt":1794532118634,"integrity":"sha512-b0O2rJf+fbqp57I1gDt1s7lj1XQJMJQ9dWueljg7vZUeIrcJDYk8N0EBEvH0cjcp1PRbc7KNhoBwYNz3XsN8gQ==","mode":493,"size":1101},"benchmark/benchmark-native.c":{"checkedAt":1794532118634,"integrity":"sha512-XjzP2L0IWZCSQFNE2QoY51pxdcSGMmW2mmv6GVgYHyD/ft8lZzmleXx0vVRKV+8ivFsOsnMj7KKmExfPMOzlfg==","mode":420,"size":613},"LICENSE.md":{"checkedAt":1794532118634,"integrity":"sha512-bBinvzZdOhcixjUTaI/YQ51hUjX6Q07lSDb5sJr/aFLEc0CGxS0YUUIH/ZKt0/3X2TePpTxzlikZ6rxh9bTKaw==","mode":420,"size":100},"test/test.js":{"checkedAt":1794532118634,"integrity":"sha512-Yy6OmpqixNmD7RCijWLPSz7VfH4OYWMLxnWRVN98AbeX1lChhwMbQfXwWMjByAwhQWu5xRuFxbG5MrulkxpZvQ==","mode":420,"size":3166},"test/mocha.opts":{"checkedAt":1794532118634,"integrity":"sha512-AMw+Lx/6hyLExy0lQW+9H93nA858SbMaI3eX4FGrl5Y/IMSCFXCO7266zBwOhcpxTylYT9FlBtt31FIIHhsf/w==","mode":420,"size":11},"misc/compare.js":{"checkedAt":1794532118634,"integrity":"sha512-wJGMVEs2mMMZz2jCAM6mSHYT6g3W4twQnD6pdnuz2YroaygfpM8JuWwuvnvyxBRA4wHTx9j7Q+agtyRxv8wtNQ==","mode":420,"size":1439},"misc/perf.js":{"checkedAt":1794532118634,"integrity":"sha512-Npk9JjMweIyIoOqxOzFCd+GbzJTdaElL/ApZZMIzefjhvNS8kfsz7HMX/bkVEiUIn/inb0xlirG4h7jQBQkQ2Q==","mode":420,"size":2931}}}
@@ -0,0 +1,25 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
/**
* @file 字体外观分类器
* @author mengke01(kekee000@gmail.com)
*
* @see:
* https://developer.apple.com/fonts/TrueType-Reference-Manual/RM06/Chap6OS2.html
*/
var _default = exports.default = {
bFamilyType: ['Any', 'No Fit', 'Text and Display', 'Script', 'Decorative', 'Pictorial'],
bSerifStyle: ['Any', 'No Fit', 'Cove', 'Obtuse Cove', 'Square Cove', 'Obtuse Square Cove', 'Square', 'Thin', 'Bone', 'Exaggerated', 'Triangle', 'Normal Sans', 'Obtuse Sans', 'Perp Sans', 'Flared', 'Rounded'],
bWeight: ['Any', 'No Fit', 'Very Light', 'Light', 'Thin', 'Book', 'Medium', 'Demi', 'Bold', 'Heavy', 'Black', 'Nord'],
bProportion: ['Any', 'No Fit', 'Old Style', 'Modern', 'Even Width', 'Expanded', 'Condensed', 'Very Expanded', 'Very Condensed', 'Monospaced'],
bContrast: ['Any', 'No Fit', 'None', 'Very Low', 'Low', 'Medium Low', 'Medium', 'Medium High', 'High', 'Very High'],
bStrokeVariation: ['Any', 'No Fit', 'Gradual/Diagonal', 'Gradual/Transitional', 'Gradual/Vertical', 'Gradual/Horizontal', 'Rapid/Vertical', 'Rapid/Horizontal', 'Instant/Vertical'],
bArmStyle: ['Any', 'No Fit', 'Straight Arms/Horizontal', 'Straight Arms/Wedge', 'Straight Arms/Vertical', 'Straight Arms/Single Serif', 'Straight Arms/Double Serif', 'Non-Straight Arms/Horizontal', 'Non-Straight Arms/Wedge', 'Non-Straight Arms/Vertical', 'Non-Straight Arms/Single Serif', 'Non-Straight Arms/Double Serif'],
bLetterform: ['Any', 'No Fit', 'Normal/Contact', 'Normal/Weighted', 'Normal/Boxed', 'Normal/Flattened', 'Normal/Rounded', 'Normal/Off Center', 'Normal/Square', 'Oblique/Contact', 'Oblique/Weighted', 'Oblique/Boxed', 'Oblique/Flattened', 'Oblique/Rounded', 'Oblique/Off Center', 'Oblique/Square'],
bMidline: ['Any', 'No Fit', 'Standard/Trimmed', 'Standard/Pointed', 'Standard/Serifed', 'High/Trimmed', 'High/Pointed', 'High/Serifed', 'Constant/Trimmed', 'Constant/Pointed', 'Constant/Serifed', 'Low/Trimmed', 'Low/Pointed', 'Low/Serifed'],
bXHeight: ['Any', 'No Fit', 'Constant/Small', 'Constant/Standard', 'Constant/Large', 'Ducking/Small', 'Ducking/Standard', 'Ducking/Large']
};
@@ -0,0 +1 @@
{"mappings":";;;;;;;;AAAA;;;;;;;;;;CAUC","sources":["packages/@react-stately/tabs/src/index.ts"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nexport {useTabListState} from './useTabListState';\n\nexport type {TabListProps} from '@react-types/tabs';\nexport type {TabListStateOptions, TabListState} from './useTabListState';\n"],"names":[],"version":3,"file":"main.js.map"}
@@ -0,0 +1,29 @@
import { Kind, Hint, ReadonlyKind, OptionalKind } from '../symbols/index.mjs';
export interface SchemaOptions {
$schema?: string;
/** Id for this schema */
$id?: string;
/** Title of this schema */
title?: string;
/** Description of this schema */
description?: string;
/** Default value for this schema */
default?: any;
/** Example values matching this schema */
examples?: any;
/** Optional annotation for readOnly */
readOnly?: boolean;
/** Optional annotation for writeOnly */
writeOnly?: boolean;
[prop: string]: any;
}
export interface TKind {
[Kind]: string;
}
export interface TSchema extends TKind, SchemaOptions {
[ReadonlyKind]?: string;
[OptionalKind]?: string;
[Hint]?: string;
params: unknown[];
static: unknown;
}
@@ -0,0 +1 @@
{"mappings":";;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;AAaD,MAAM,kDAAc,CAAA,GAAA,sCAAI,EAAE,aAAa,CAAgB;AAMvD;;CAEC,GACD,SAAS,6CAAuB,KAAkC;IAChE,IAAI,UAAC,MAAM,YAAE,QAAQ,EAAC,GAAG;IACzB,IAAI,QAAgB,CAAA,GAAA,sCAAI,EAAE,OAAO,CAAC,IAAO,CAAA;oBACvC;YACA,WAAW,CAAA,GAAA,+BAAI,EAAE,UAAU,QAAQ;QACrC,CAAA,GAAI;QAAC;KAAO;IAEZ,qBACE,0DAAC,kCAAY,QAAQ;QAAC,OAAO;OAC1B;AAGP;AAMA;;CAEC,GACD,SAAS,oDAA8B,KAAyC;IAC9E,IAAI,YAAC,QAAQ,EAAC,GAAG;IACjB,IAAI,gBAAgB,CAAA,GAAA,0CAAe;IAEnC,qBACE,0DAAC,kCAAY,QAAQ;QAAC,OAAO;OAC1B;AAGP;AAKO,SAAS,0CAAa,KAAwB;IACnD,IAAI,UAAC,MAAM,YAAE,QAAQ,EAAC,GAAG;IAEzB,+EAA+E;IAC/E,mEAAmE;IACnE,IAAI,QACF,qBAAO,0DAAC;QAAuB,QAAQ;QAAQ,UAAU;;IAG3D,qBAAO,0DAAC;QAA8B,UAAU;;AAClD;AAKO,SAAS;IACd,IAAI,gBAAgB,CAAA,GAAA,0CAAe;IACnC,IAAI,UAAU,CAAA,GAAA,uBAAS,EAAE;IACzB,OAAO,WAAW;AACpB","sources":["packages/@react-aria/i18n/src/context.tsx"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {isRTL} from './utils';\nimport {Locale, useDefaultLocale} from './useDefaultLocale';\nimport React, {JSX, ReactNode, useContext} from 'react';\n\nexport interface I18nProviderProps {\n /** Contents that should have the locale applied. */\n children: ReactNode,\n /** The locale to apply to the children. */\n locale?: string\n}\n\nconst I18nContext = React.createContext<Locale | null>(null);\n\ninterface I18nProviderWithLocaleProps extends I18nProviderProps {\n locale: string\n}\n\n/**\n * Internal component that handles the case when locale is provided.\n */\nfunction I18nProviderWithLocale(props: I18nProviderWithLocaleProps): JSX.Element {\n let {locale, children} = props; \n let value: Locale = React.useMemo(() => ({\n locale,\n direction: isRTL(locale) ? 'rtl' : 'ltr'\n }), [locale]);\n\n return (\n <I18nContext.Provider value={value}>\n {children}\n </I18nContext.Provider>\n );\n}\n\ninterface I18nProviderWithDefaultLocaleProps {\n children: ReactNode\n}\n\n/**\n * Internal component that handles the case when no locale is provided.\n */\nfunction I18nProviderWithDefaultLocale(props: I18nProviderWithDefaultLocaleProps): JSX.Element {\n let {children} = props;\n let defaultLocale = useDefaultLocale();\n\n return (\n <I18nContext.Provider value={defaultLocale}>\n {children}\n </I18nContext.Provider>\n );\n}\n\n/**\n * Provides the locale for the application to all child components.\n */\nexport function I18nProvider(props: I18nProviderProps): JSX.Element {\n let {locale, children} = props;\n\n // Conditionally render different components to avoid calling useDefaultLocale.\n // This is necessary because useDefaultLocale triggers a re-render.\n if (locale) {\n return <I18nProviderWithLocale locale={locale} children={children} />;\n }\n\n return <I18nProviderWithDefaultLocale children={children} />;\n}\n\n/**\n * Returns the current locale and layout direction.\n */\nexport function useLocale(): Locale {\n let defaultLocale = useDefaultLocale();\n let context = useContext(I18nContext);\n return context || defaultLocale;\n}\n"],"names":[],"version":3,"file":"context.main.js.map"}
@@ -0,0 +1,196 @@
/**
* @fileoverview The schema to validate language options
* @author Nicholas C. Zakas
*/
"use strict";
//-----------------------------------------------------------------------------
// Data
//-----------------------------------------------------------------------------
const globalVariablesValues = new Set([
true,
"true",
"writable",
"writeable",
false,
"false",
"readonly",
"readable",
null,
"off",
]);
//------------------------------------------------------------------------------
// Helpers
//------------------------------------------------------------------------------
/**
* Check if a value is a non-null object.
* @param {any} value The value to check.
* @returns {boolean} `true` if the value is a non-null object.
*/
function isNonNullObject(value) {
return typeof value === "object" && value !== null;
}
/**
* Check if a value is a non-null non-array object.
* @param {any} value The value to check.
* @returns {boolean} `true` if the value is a non-null non-array object.
*/
function isNonArrayObject(value) {
return isNonNullObject(value) && !Array.isArray(value);
}
/**
* Check if a value is undefined.
* @param {any} value The value to check.
* @returns {boolean} `true` if the value is undefined.
*/
function isUndefined(value) {
return typeof value === "undefined";
}
//-----------------------------------------------------------------------------
// Schemas
//-----------------------------------------------------------------------------
/**
* Validates the ecmaVersion property.
* @param {string|number} ecmaVersion The value to check.
* @returns {void}
* @throws {TypeError} If the value is invalid.
*/
function validateEcmaVersion(ecmaVersion) {
if (isUndefined(ecmaVersion)) {
throw new TypeError(
'Key "ecmaVersion": Expected an "ecmaVersion" property.',
);
}
if (typeof ecmaVersion !== "number" && ecmaVersion !== "latest") {
throw new TypeError(
'Key "ecmaVersion": Expected a number or "latest".',
);
}
}
/**
* Validates the sourceType property.
* @param {string} sourceType The value to check.
* @returns {void}
* @throws {TypeError} If the value is invalid.
*/
function validateSourceType(sourceType) {
if (
typeof sourceType !== "string" ||
!/^(?:script|module|commonjs)$/u.test(sourceType)
) {
throw new TypeError(
'Key "sourceType": Expected "script", "module", or "commonjs".',
);
}
}
/**
* Validates the globals property.
* @param {Object} globals The value to check.
* @returns {void}
* @throws {TypeError} If the value is invalid.
*/
function validateGlobals(globals) {
if (!isNonArrayObject(globals)) {
throw new TypeError('Key "globals": Expected an object.');
}
for (const key of Object.keys(globals)) {
// avoid hairy edge case
if (key === "__proto__") {
continue;
}
if (key !== key.trim()) {
throw new TypeError(
`Key "globals": Global "${key}" has leading or trailing whitespace.`,
);
}
if (!globalVariablesValues.has(globals[key])) {
throw new TypeError(
`Key "globals": Key "${key}": Expected "readonly", "writable", or "off".`,
);
}
}
}
/**
* Validates the parser property.
* @param {Object} parser The value to check.
* @returns {void}
* @throws {TypeError} If the value is invalid.
*/
function validateParser(parser) {
if (
!parser ||
typeof parser !== "object" ||
(typeof parser.parse !== "function" &&
typeof parser.parseForESLint !== "function")
) {
throw new TypeError(
'Key "parser": Expected object with parse() or parseForESLint() method.',
);
}
}
/**
* Validates the language options.
* @param {Object} languageOptions The language options to validate.
* @returns {void}
* @throws {TypeError} If the language options are invalid.
*/
function validateLanguageOptions(languageOptions) {
if (!isNonArrayObject(languageOptions)) {
throw new TypeError("Expected an object.");
}
const {
ecmaVersion,
sourceType,
globals,
parser,
parserOptions,
...otherOptions
} = languageOptions;
if ("ecmaVersion" in languageOptions) {
validateEcmaVersion(ecmaVersion);
}
if ("sourceType" in languageOptions) {
validateSourceType(sourceType);
}
if ("globals" in languageOptions) {
validateGlobals(globals);
}
if ("parser" in languageOptions) {
validateParser(parser);
}
if ("parserOptions" in languageOptions) {
if (!isNonArrayObject(parserOptions)) {
throw new TypeError('Key "parserOptions": Expected an object.');
}
}
const otherOptionKeys = Object.keys(otherOptions);
if (otherOptionKeys.length > 0) {
throw new TypeError(`Unexpected key "${otherOptionKeys[0]}" found.`);
}
}
module.exports = { validateLanguageOptions };
@@ -0,0 +1,73 @@
# indent-string
> Indent each line in a string
## Install
```
$ npm install indent-string
```
## Usage
```js
import indentString from 'indent-string';
indentString('Unicorns\nRainbows', 4);
//=> ' Unicorns\n Rainbows'
indentString('Unicorns\nRainbows', 4, {indent: '♥'});
//=> '♥♥♥♥Unicorns\n♥♥♥♥Rainbows'
```
## API
### indentString(string, count?, options?)
#### string
Type: `string`
The string to indent.
#### count
Type: `number`\
Default: `1`
How many times you want `options.indent` repeated.
#### options
Type: `object`
##### indent
Type: `string`\
Default: `' '`
The string to use for the indent.
##### includeEmptyLines
Type: `boolean`\
Default: `false`
Also indent empty lines.
## Related
- [indent-string-cli](https://github.com/sindresorhus/indent-string-cli) - CLI for this module
- [strip-indent](https://github.com/sindresorhus/strip-indent) - Strip leading whitespace from every line in a string
---
<div align="center">
<b>
<a href="https://tidelift.com/subscription/pkg/npm-indent-string?utm_source=npm-indent-string&utm_medium=referral&utm_campaign=readme">Get professional support for this package with a Tidelift subscription</a>
</b>
<br>
<sub>
Tidelift helps make open source sustainable for maintainers while giving companies<br>assurances about security, maintenance, and licensing for their dependencies.
</sub>
</div>
@@ -0,0 +1,24 @@
# @heroui/avatar
The Avatar component is used to represent a user, and displays the profile picture, initials or fallback icon.
Please refer to the [documentation](https://heroui.com/docs/components/avatar) for more information.
## Installation
```sh
yarn add @heroui/avatar
# or
npm i @heroui/avatar
```
## Contribution
Yes please! See the
[contributing guidelines](https://github.com/frontio-ai/heroui/blob/master/CONTRIBUTING.md)
for details.
## License
This project is licensed under the terms of the
[MIT license](https://github.com/frontio-ai/heroui/blob/master/LICENSE).
@@ -0,0 +1,8 @@
"use client";
import {
scroll_shadow_default
} from "./chunk-4EXC76WE.mjs";
import "./chunk-XKHEX3UH.mjs";
export {
scroll_shadow_default as default
};
@@ -0,0 +1,15 @@
function onError(err) {
throw err; /* ↓ Check stack trace ↓ */
}
module.exports = function jiti(filename, opts) {
const jiti = require("../dist/jiti");
opts = { onError, ...opts };
if (!opts.transform) {
opts.transform = require("../dist/babel");
}
return jiti(filename, opts);
};
@@ -0,0 +1,118 @@
# Changelog
All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [v1.0.8](https://github.com/es-shims/String.prototype.trimStart/compare/v1.0.7...v1.0.8) - 2024-03-21
### Commits
- [actions] use reusable workflows [`d139c11`](https://github.com/es-shims/String.prototype.trimStart/commit/d139c119ba5003936649741fae52b28080794dd3)
- [Dev Deps] update `aud`, `npmignore`, `tape` [`16ff815`](https://github.com/es-shims/String.prototype.trimStart/commit/16ff81546c62ac3159fdf223cd1b035729fd55f0)
- [Deps] update `call-bind`, `define-properties` [`8dd308d`](https://github.com/es-shims/String.prototype.trimStart/commit/8dd308dd225ea3cb6a4d2c9662e435101367a5ef)
- [Refactor] use `es-object-atoms` instead of `es-abstract` [`4868f56`](https://github.com/es-shims/String.prototype.trimStart/commit/4868f566f8052ab7e28ce733ecc62b56f743f7fc)
- [meta] add missing `engines.node` [`8c1cce6`](https://github.com/es-shims/String.prototype.trimStart/commit/8c1cce612e4e1fdd1e5172c9e508a88abd3e6a5c)
## [v1.0.7](https://github.com/es-shims/String.prototype.trimStart/compare/v1.0.6...v1.0.7) - 2023-09-04
### Commits
- [Dev Deps] update `@es-shims/api`, `@ljharb/eslint-config`, `aud`, `tape` [`58e7aa6`](https://github.com/es-shims/String.prototype.trimStart/commit/58e7aa63b702f4494b89b8723b585bab5899a304)
- [Deps] update `define-properties`, `es-abstract` [`8d9a7bf`](https://github.com/es-shims/String.prototype.trimStart/commit/8d9a7bf123f320799211dd57aa0c832aaafb8a19)
## [v1.0.6](https://github.com/es-shims/String.prototype.trimStart/compare/v1.0.5...v1.0.6) - 2022-11-07
### Commits
- [meta] use `npmignore` to autogenerate an npmignore file [`0838ae4`](https://github.com/es-shims/String.prototype.trimStart/commit/0838ae4ed948df470185afbeea4296f5c5ecd759)
- [actions] update rebase action to use reusable workflow [`d6bb784`](https://github.com/es-shims/String.prototype.trimStart/commit/d6bb78400a00459e9ab0b28f433c45804a65184d)
- [Dev Deps] update `aud`, `tape` [`8734d9a`](https://github.com/es-shims/String.prototype.trimStart/commit/8734d9a616c6aca9ec7f0c8819e66c2496deb32e)
- [Deps] update `es-abstract` [`30f593f`](https://github.com/es-shims/String.prototype.trimStart/commit/30f593f3febf6d8d9b3d5605174b437fed9cbb3a)
## [v1.0.5](https://github.com/es-shims/String.prototype.trimStart/compare/v1.0.4...v1.0.5) - 2022-05-02
### Commits
- [actions] reuse common workflows [`61d4009`](https://github.com/es-shims/String.prototype.trimStart/commit/61d40098a96b3dcc6cf963c9d03dd1b23b6eb13d)
- [actions] use `node/install` instead of `node/run`; use `codecov` action [`bfe39c4`](https://github.com/es-shims/String.prototype.trimStart/commit/bfe39c498e26a4ad75c64cce27ff3df9bfef2cc1)
- [Fix] ensure main entry point properly checks the receiver in ES3 engines [`36e3730`](https://github.com/es-shims/String.prototype.trimStart/commit/36e37307bb06fb5dc34d861a4bf6f7db931340d9)
- [Fix] as of unicode v6, the mongolian vowel separator is no longer whitespace [`4f77eed`](https://github.com/es-shims/String.prototype.trimStart/commit/4f77eed5aa64e6f781310847d7831563fce90f5c)
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `@es-shims/api`, `safe-publish-latest`, `tape` [`59fcb99`](https://github.com/es-shims/String.prototype.trimStart/commit/59fcb995ef8d4723a83e28d46dbe41a14253b681)
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `auto-changelog`, `functions-have-names`, `tape` [`486ffcf`](https://github.com/es-shims/String.prototype.trimStart/commit/486ffcfa93c75516601169a3973b81fdfeb7de8b)
- [actions] update codecov uploader [`b33ac48`](https://github.com/es-shims/String.prototype.trimStart/commit/b33ac48ccc86f6b894d8fde5162bd1c806904972)
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `@es-shims/api`, `aud`, `auto-changelog`, `tape` [`3c89fa5`](https://github.com/es-shims/String.prototype.trimStart/commit/3c89fa571d1c4b8894230d93caaf3b3d9885534d)
- [readme] add github actions/codecov badges [`00be6b3`](https://github.com/es-shims/String.prototype.trimStart/commit/00be6b34fdd989950b934b4471087362b78d4b0c)
- [Dev Deps] update `eslint`, `tape` [`13a08f5`](https://github.com/es-shims/String.prototype.trimStart/commit/13a08f578c53cf5f129fb6ebe486e8bbcc40c14e)
- [actions] update workflows [`6ac576d`](https://github.com/es-shims/String.prototype.trimStart/commit/6ac576dde99f73d19492777efed29ec069e89bf1)
- [meta] use `prepublishOnly` script for npm 7+ [`fa382ca`](https://github.com/es-shims/String.prototype.trimStart/commit/fa382caa5c8e9a868572605ce215a3db1dc9ef21)
- [Deps] update `define-properties` [`d57bffe`](https://github.com/es-shims/String.prototype.trimStart/commit/d57bffef7d89384c8888627c5ee33b80e24d54e0)
## [v1.0.4](https://github.com/es-shims/String.prototype.trimStart/compare/v1.0.3...v1.0.4) - 2021-02-23
### Commits
- [meta] do not publish github action workflow files [`9c434ec`](https://github.com/es-shims/String.prototype.trimStart/commit/9c434eceb50141cf36e8e65f514226b0b547b568)
- [readme] remove travis badge [`7843160`](https://github.com/es-shims/String.prototype.trimStart/commit/7843160a3e8feaa2213feb0da9c5ad7d9bf21b59)
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `functions-have-names`, `has-strict-mode`, `tape` [`8b52646`](https://github.com/es-shims/String.prototype.trimStart/commit/8b52646510aea20473da5491fe0876117a2251b1)
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `tape` [`badeda2`](https://github.com/es-shims/String.prototype.trimStart/commit/badeda2b01d2e266e4d1c2e7dc0e4fca0f066f3e)
- [Tests] increase coverage [`bf8777d`](https://github.com/es-shims/String.prototype.trimStart/commit/bf8777d54c4b05c093559021cfaf0670306120f8)
- [actions] update workflows [`61be1c6`](https://github.com/es-shims/String.prototype.trimStart/commit/61be1c649ae859faa40286e57fa22cef65ae1229)
- [meta] gitignore coverage output [`c9c98d7`](https://github.com/es-shims/String.prototype.trimStart/commit/c9c98d75d7708e8906a39b55a0ad7a0ed6a9e4b0)
- [Deps] update `call-bind` [`c8645e8`](https://github.com/es-shims/String.prototype.trimStart/commit/c8645e89f9ace7681660ba66c724cf00c798f3d4)
## [v1.0.3](https://github.com/es-shims/String.prototype.trimStart/compare/v1.0.2...v1.0.3) - 2020-11-21
### Commits
- [Tests] migrate tests to Github Actions [`fbc7519`](https://github.com/es-shims/String.prototype.trimStart/commit/fbc7519cce2b5bfff9fe28dea96fb5f6f82e19fd)
- [Tests] add `implementation` test; run `es-shim-api` in postlint; use `tape` runner [`3c9330b`](https://github.com/es-shims/String.prototype.trimStart/commit/3c9330be9ad02497f78ff0fd94b7c918c3a4bc21)
- [Tests] run `nyc` on all tests [`52229ca`](https://github.com/es-shims/String.prototype.trimStart/commit/52229ca28426be516c3826743e417be85144673e)
- [Deps] replace `es-abstract` with `call-bind` [`5e5068d`](https://github.com/es-shims/String.prototype.trimStart/commit/5e5068d2cc85d0a6f2a441ea984521ee70470537)
- [Dev Deps] update `eslint`, `aud`; add `safe-publish-latest` [`42a853e`](https://github.com/es-shims/String.prototype.trimStart/commit/42a853e2cb419378085098cb66e421ee94eed3ab)
## [v1.0.2](https://github.com/es-shims/String.prototype.trimStart/compare/v1.0.1...v1.0.2) - 2020-10-20
### Commits
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `auto-changelog`, `tape` [`d032b38`](https://github.com/es-shims/String.prototype.trimStart/commit/d032b38aac7e9ebae7bf5c4195492c508af2815a)
- [actions] add "Allow Edits" workflow [`83e30ba`](https://github.com/es-shims/String.prototype.trimStart/commit/83e30bac01572b6dba6358fec6e339c55dc431c9)
- [Deps] update `es-abstract` [`707d85d`](https://github.com/es-shims/String.prototype.trimStart/commit/707d85d827d9c537a144f199fdecc47edaade1cd)
- [actions] switch Automatic Rebase workflow to `pull_request_target` event [`096c6d9`](https://github.com/es-shims/String.prototype.trimStart/commit/096c6d9dc142286c750da7024e7a88ed698a4953)
## [v1.0.1](https://github.com/es-shims/String.prototype.trimStart/compare/v1.0.0...v1.0.1) - 2020-04-09
### Commits
- [meta] add some missing repo metadata [`3385da3`](https://github.com/es-shims/String.prototype.trimStart/commit/3385da3bbb87819de11a869981ca954887a6a092)
- [Dev Deps] update `auto-changelog` [`879377d`](https://github.com/es-shims/String.prototype.trimStart/commit/879377df9c1ff97d8f0b3eac800683f1d68a304c)
## [v1.0.0](https://github.com/es-shims/String.prototype.trimStart/compare/v0.1.0...v1.0.0) - 2020-03-30
### Commits
- [Breaking] convert to es-shim API [`970922c`](https://github.com/es-shims/String.prototype.trimStart/commit/970922c494c78b033c351c77f61a8aefd49c30d9)
- [meta] add `auto-changelog` [`ff30c09`](https://github.com/es-shims/String.prototype.trimStart/commit/ff30c0996289113d2c3dbbfca7e280ff151bf36d)
- [meta] update readme [`816291d`](https://github.com/es-shims/String.prototype.trimStart/commit/816291d01e0eaf85da9b732c179cfb2454bd282e)
- [Tests] add `npm run lint` [`3341104`](https://github.com/es-shims/String.prototype.trimStart/commit/3341104450bc6ac84f3b70a6d6c0fbeb4df5131e)
- Only apps should have lockfiles [`f008df7`](https://github.com/es-shims/String.prototype.trimStart/commit/f008df73fbf3dcf8dfad6d5cad86de7050d0ae09)
- [actions] add automatic rebasing / merge commit blocking [`e5ba35c`](https://github.com/es-shims/String.prototype.trimStart/commit/e5ba35c1a14fcf652336cc9c4be49d232981161e)
- [Tests] use shared travis-ci configs [`46516b1`](https://github.com/es-shims/String.prototype.trimStart/commit/46516b137a8c07ed5807d751bd61199688ef9baa)
- [meta] add `funding` field [`34ae856`](https://github.com/es-shims/String.prototype.trimStart/commit/34ae8563f115bd4a5e5f5d2d786c0fa0a420fa2a)
- [meta] fix non-updated version number [`3b0e262`](https://github.com/es-shims/String.prototype.trimStart/commit/3b0e262e2f4eeee2e1b99fe890f8ca17bed8f2fd)
## [v0.1.0](https://github.com/es-shims/String.prototype.trimStart/compare/v0.0.1...v0.1.0) - 2017-12-19
### Commits
- updated README [`ab2f6ac`](https://github.com/es-shims/String.prototype.trimStart/commit/ab2f6ac8813ed336a0f2dc3aa8cdb52f4d52814b)
## v0.0.1 - 2017-12-19
### Commits
- finished polyfill [`1c7ca20`](https://github.com/es-shims/String.prototype.trimStart/commit/1c7ca2043e3383b6e743870bc622ad4a38477147)
- created README file: [`192ecad`](https://github.com/es-shims/String.prototype.trimStart/commit/192ecaded4e0d5baaa65cd41e590b8d837520d44)
- Initial commit [`14044f8`](https://github.com/es-shims/String.prototype.trimStart/commit/14044f8a0fe1d155fe7403a8327bdbaf135da2d6)
- updated README [`d4fb6be`](https://github.com/es-shims/String.prototype.trimStart/commit/d4fb6be15455dd68fc4b306bee1d30dd4afc96e7)
@@ -0,0 +1,100 @@
import {
configLoader,
loadConfig,
ConfigLoaderFailResult,
ConfigLoaderSuccessResult,
} from "../config-loader";
import { join } from "path";
describe("config-loader", (): void => {
it("should use explicitParams when set", () => {
const result = configLoader({
explicitParams: {
baseUrl: "/foo/bar",
paths: {
asd: ["asd"],
},
},
cwd: "/baz",
});
const successResult = result as ConfigLoaderSuccessResult;
// assert.equal(successResult.resultType, "success");
// assert.equal(successResult.absoluteBaseUrl, "/foo/bar");
// assert.equal(successResult.paths["asd"][0], "asd");
expect(successResult.resultType).toBe("success");
expect(successResult.absoluteBaseUrl).toBe("/foo/bar");
expect(successResult.paths["asd"][0]).toBe("asd");
});
it("should use explicitParams when set and add cwd when path is relative", () => {
const result = configLoader({
explicitParams: {
baseUrl: "bar/",
paths: {
asd: ["asd"],
},
},
cwd: "/baz",
});
const successResult = result as ConfigLoaderSuccessResult;
// assert.equal(successResult.resultType, "success");
// assert.equal(successResult.absoluteBaseUrl, join("/baz", "bar/"));
expect(successResult.resultType).toBe("success");
expect(successResult.absoluteBaseUrl).toBe(join("/baz", "bar/"));
});
it("should fallback to tsConfigLoader when explicitParams is not set", () => {
const result = configLoader({
explicitParams: undefined,
cwd: "/baz",
// tslint:disable-next-line:no-any
tsConfigLoader: (_: any) => ({
tsConfigPath: "/baz/tsconfig.json",
baseUrl: "./src",
paths: {},
}),
});
const successResult = result as ConfigLoaderSuccessResult;
// assert.equal(successResult.resultType, "success");
// assert.equal(successResult.absoluteBaseUrl, join("/baz", "src"));
expect(successResult.resultType).toBe("success");
expect(successResult.absoluteBaseUrl).toBe(join("/baz", "src"));
});
it("should show an error message when baseUrl is missing", () => {
const result = configLoader({
explicitParams: undefined,
cwd: "/baz",
// tslint:disable-next-line:no-any
tsConfigLoader: (_: any) => ({
tsConfigPath: "/baz/tsconfig.json",
baseUrl: undefined,
paths: {},
}),
});
const failResult = result as ConfigLoaderFailResult;
// assert.equal(failResult.resultType, "failed");
// assert.isTrue(failResult.message.indexOf("baseUrl") > -1);
expect(failResult.resultType).toBe("failed");
expect(failResult.message.indexOf("baseUrl") > -1).toBeTruthy();
});
it("should presume cwd to be a tsconfig file when loadConfig is called with absolute path to tsconfig.json", () => {
// using tsconfig-named.json to ensure that future changes to fix
// https://github.com/dividab/tsconfig-paths/issues/31
// do not pass this test case just because of a directory walk looking
// for tsconfig.json
const configFile = join(__dirname, "tsconfig-named.json");
const result = loadConfig(configFile);
const successResult = result as ConfigLoaderSuccessResult;
// assert.equal(successResult.resultType, "success");
// assert.equal(successResult.configFileAbsolutePath, configFile);
expect(successResult.resultType).toBe("success");
expect(successResult.configFileAbsolutePath).toBe(configFile);
});
});
@@ -0,0 +1,3 @@
import type { Pair } from '../nodes/Pair';
import type { StringifyContext } from './stringify';
export declare function stringifyPair({ key, value }: Readonly<Pair>, ctx: StringifyContext, onComment?: () => void, onChompKeep?: () => void): string;
@@ -0,0 +1,22 @@
"use strict";
const units = require("./units.js");
const { DATE, DAY, HOUR, MILLISECOND, MINUTE, MONTH, SECOND, TIME, YEAR } = units;
const compatUnits = {};
function mapUnit(key, ...args) {
for (let i = 0; i < arguments.length; i++) {
compatUnits[arguments[i]] = key;
}
}
mapUnit(YEAR, "Y", "y", "years");
mapUnit(MONTH, "M", "months");
mapUnit(DATE, "D", "dates");
mapUnit(DAY, "d", "days");
mapUnit(HOUR, "h", "hours");
mapUnit(MINUTE, "m", "minutes");
mapUnit(SECOND, "s", "seconds");
mapUnit(MILLISECOND, "ms", "milliseconds");
mapUnit(TIME, "t");
function normalizeUnit(u) {
return compatUnits[u];
}
exports.normalizeUnit = normalizeUnit;
@@ -0,0 +1,228 @@
import { describe, it, expect, vi } from "vitest";
import { Parser, type ParserOptions } from "./Parser.js";
import * as helper from "./__fixtures__/testHelper.js";
/**
* Write to the parser twice, once a bytes, once as a single blob. Then check
* that we received the expected events.
*
* @internal
* @param input Data to write.
* @param options Parser options.
* @returns Promise that resolves if the test passes.
*/
function runTest(input: string, options?: ParserOptions) {
let firstResult: unknown[] | undefined;
return new Promise<void>((resolve, reject) => {
const handler = helper.getEventCollector((error, actual) => {
if (error) {
return reject(error);
}
if (firstResult) {
expect(actual).toEqual(firstResult);
resolve();
} else {
firstResult = actual;
expect(actual).toMatchSnapshot();
}
});
const parser = new Parser(handler, options);
// First, try to run the test via chunks
for (let index = 0; index < input.length; index++) {
parser.write(input.charAt(index));
}
parser.end();
// Then, parse everything
parser.parseComplete(input);
});
}
describe("Events", () => {
it("simple", () => runTest("<h1 class=test>adsf</h1>"));
it("Template script tags", () =>
runTest(
'<p><script type="text/template"><h1>Heading1</h1></script></p>',
));
it("Lowercase tags", () =>
runTest("<H1 class=test>adsf</H1>", { lowerCaseTags: true }));
it("CDATA", () =>
runTest("<tag><![CDATA[ asdf ><asdf></adsf><> fo]]></tag><![CD>", {
xmlMode: true,
}));
it("CDATA (inside special)", () =>
runTest(
"<script>/*<![CDATA[*/ asdf ><asdf></adsf><> fo/*]]>*/</script>",
));
it("leading lt", () => runTest(">a>"));
it("end slash: void element ending with />", () =>
runTest("<hr / ><p>Hold the line."));
it("end slash: void element ending with >", () =>
runTest("<hr ><p>Hold the line."));
it("end slash: void element ending with >, xmlMode=true", () =>
runTest("<hr ><p>Hold the line.", { xmlMode: true }));
it("end slash: non-void element ending with />", () =>
runTest("<xx / ><p>Hold the line."));
it("end slash: non-void element ending with />, xmlMode=true", () =>
runTest("<xx / ><p>Hold the line.", { xmlMode: true }));
it("end slash: non-void element ending with />, recognizeSelfClosing=true", () =>
runTest("<xx / ><p>Hold the line.", { recognizeSelfClosing: true }));
it("end slash: as part of attrib value of void element", () =>
runTest("<img src=gif.com/123/><p>Hold the line."));
it("end slash: as part of attrib value of non-void element", () =>
runTest("<a href=http://test.com/>Foo</a><p>Hold the line."));
it("Implicit close tags", () =>
runTest(
"<ol><li class=test><div><table style=width:100%><tr><th>TH<td colspan=2><h3>Heading</h3><tr><td><div>Div</div><td><div>Div2</div></table></div><li><div><h3>Heading 2</h3></div></li></ol><p>Para<h4>Heading 4</h4><p><ul><li>Hi<li>bye</ul>",
));
it("attributes (no white space, no value, no quotes)", () =>
runTest(
'<button class="test0"title="test1" disabled value=test2>adsf</button>',
));
it("crazy attribute", () => runTest("<p < = '' FAIL>stuff</p><a"));
it("Scripts creating other scripts", () =>
runTest("<p><script>var str = '<script></'+'script>';</script></p>"));
it("Long comment ending", () =>
runTest("<meta id='before'><!-- text ---><meta id='after'>"));
it("Long CDATA ending", () =>
runTest("<before /><tag><![CDATA[ text ]]]></tag><after />", {
xmlMode: true,
}));
it("Implicit open p and br tags", () =>
runTest("<div>Hallo</p>World</br></ignore></div></p></br>"));
it("lt followed by whitespace", () => runTest("a < b"));
it("double attribute", () => runTest("<h1 class=test class=boo></h1>"));
it("numeric entities", () =>
runTest("&#x61;&#x62&#99;&#100&#x66g&#x;&#x68"));
it("legacy entities", () => runTest("&AMPel&iacutee&ampeer;s&lter&sum"));
it("named entities", () =>
runTest("&amp;el&lt;er&CounterClockwiseContourIntegral;foo&bar"));
it("xml entities", () =>
runTest("&amp;&gt;&amp&lt;&uuml;&#x61;&#x62&#99;&#100&#101", {
xmlMode: true,
}));
it("entity in attribute", () =>
runTest(
"<a href='http://example.com/p&#x61;#x61ge?param=value&param2&param3=&lt;val&; & &'>",
));
it("double brackets", () =>
runTest("<<princess-purpose>>testing</princess-purpose>"));
it("legacy entities fail", () => runTest("M&M"));
it("Special special tags", () =>
runTest(
"<tItLe><b>foo</b><title></TiTlE><sitle><b></b></sitle><ttyle><b></b></ttyle><sCriPT></scripter</soo</sCript><STyLE></styler</STylE><sCiPt><stylee><scriptee><soo>",
));
it("Empty tag name", () => runTest("< ></ >"));
it("Not quite closed", () => runTest("<foo /bar></foo bar>"));
it("Entities in attributes", () =>
runTest("<foo bar=&amp; baz=\"&amp;\" boo='&amp;' noo=>"));
it("CDATA in HTML", () => runTest("<![CDATA[ foo ]]>"));
it("Comment edge-cases", () => runTest("<!-foo><!-- --- --><!--foo"));
it("CDATA edge-cases", () =>
runTest("<![CDATA><![CDATA[[]]sdaf]]><![CDATA[foo", {
recognizeCDATA: true,
}));
it("Comment false ending", () => runTest("<!-- a-b-> -->"));
it("Scripts ending with <", () => runTest("<script><</script>"));
it("CDATA more edge-cases", () =>
runTest("<![CDATA[foo]bar]>baz]]>", { recognizeCDATA: true }));
it("tag names are not ASCII alpha", () => runTest("<12>text</12>"));
it("open-implies-close case of (non-br) void close tag in non-XML mode", () =>
runTest("<select><input></select>", { lowerCaseAttributeNames: true }));
it("entity in attribute (#276)", () =>
runTest(
'<img src="?&image_uri=1&&image;=2&image=3"/>?&image_uri=1&&image;=2&image=3',
));
it("entity in title (#592)", () => runTest("<title>the &quot;title&quot"));
it("entity in title - decodeEntities=false (#592)", () =>
runTest("<title>the &quot;title&quot;", { decodeEntities: false }));
it("</title> in <script> (#745)", () =>
runTest("<script>'</title>'</script>"));
it("XML tags", () => runTest("<:foo><_bar>", { xmlMode: true }));
it("Trailing legacy entity", () => runTest("&timesbar;&timesbar"));
it("Trailing numeric entity", () => runTest("&#53&#53"));
it("Multi-byte entity", () => runTest("&NotGreaterFullEqual;"));
it("Start & end indices from domhandler", () =>
runTest(
"<!DOCTYPE html> <html> <title>The Title</title> <body class='foo'>Hello world <p></p></body> <!-- the comment --> </html> ",
));
it("Self-closing indices (#941)", () =>
runTest("<xml><a/><b/></xml>", { xmlMode: true }));
it("Entity after <", () => runTest("<&amp;"));
it("Attribute in XML (see #1350)", () =>
runTest(
'<Page\n title="Hello world"\n actionBarVisible="false"/>',
{ xmlMode: true },
));
});
describe("Helper", () => {
it("should handle errors", () => {
const eventCallback = vi.fn();
const parser = new Parser(helper.getEventCollector(eventCallback));
parser.end();
parser.write("foo");
expect(eventCallback).toHaveBeenCalledTimes(2);
expect(eventCallback).toHaveBeenNthCalledWith(1, null, []);
expect(eventCallback).toHaveBeenLastCalledWith(
new Error(".write() after done!"),
);
});
});
@@ -0,0 +1,18 @@
'use strict';
var define = require('define-properties');
var getPolyfill = require('./polyfill');
var $IteratorPrototype = require('../Iterator.prototype/implementation');
module.exports = function shimIteratorPrototypeReduce() {
var polyfill = getPolyfill();
define(
$IteratorPrototype,
{ reduce: polyfill },
{ reduce: function () { return $IteratorPrototype.reduce !== polyfill; } }
);
return polyfill;
};
@@ -0,0 +1,62 @@
/**
* @author Toru Nagashima <https://github.com/mysticatea>
* See LICENSE file in root directory for full license.
*/
"use strict"
const { getSourceCode } = require("eslint-compat-utils")
const { isCommaToken } = require("../utils")
module.exports = {
meta: {
docs: {
description:
"disallow trailing commas in parameter/argument lists.",
category: "ES2017",
recommended: false,
url: "http://eslint-community.github.io/eslint-plugin-es-x/rules/no-trailing-function-commas.html",
},
fixable: "code",
messages: {
forbidden:
"ES2017 trailing commas in parameter/argument lists are forbidden.",
},
schema: [],
type: "problem",
},
create(context) {
const sourceCode = getSourceCode(context)
return {
":function"(node) {
const length = node.params.length
if (length === 0) {
return
}
const lastParam = node.params[length - 1]
const token = sourceCode.getTokenAfter(lastParam)
if (isCommaToken(token)) {
context.report({
loc: token.loc,
messageId: "forbidden",
fix(fixer) {
return fixer.remove(token)
},
})
}
},
"CallExpression, NewExpression"(node) {
const token = sourceCode.getLastToken(node, 1)
if (node.arguments.length >= 1 && isCommaToken(token)) {
context.report({
loc: token.loc,
messageId: "forbidden",
fix(fixer) {
return fixer.remove(token)
},
})
}
},
}
},
}
@@ -0,0 +1,72 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = _asyncIterator;
function _asyncIterator(iterable) {
var method,
async,
sync,
retry = 2;
if (typeof Symbol !== "undefined") {
async = Symbol.asyncIterator;
sync = Symbol.iterator;
}
while (retry--) {
if (async && (method = iterable[async]) != null) {
return method.call(iterable);
}
if (sync && (method = iterable[sync]) != null) {
return new AsyncFromSyncIterator(method.call(iterable));
}
async = "@@asyncIterator";
sync = "@@iterator";
}
throw new TypeError("Object is not async iterable");
}
function AsyncFromSyncIterator(s) {
AsyncFromSyncIterator = function (s) {
this.s = s;
this.n = s.next;
};
AsyncFromSyncIterator.prototype = {
s: null,
n: null,
next: function () {
return AsyncFromSyncIteratorContinuation(this.n.apply(this.s, arguments));
},
return: function (value) {
var ret = this.s["return"];
if (ret === undefined) {
return Promise.resolve({
value: value,
done: true
});
}
return AsyncFromSyncIteratorContinuation(ret.apply(this.s, arguments));
},
throw: function (maybeError) {
var thr = this.s["return"];
if (thr === undefined) {
return Promise.reject(maybeError);
}
return AsyncFromSyncIteratorContinuation(thr.apply(this.s, arguments));
}
};
function AsyncFromSyncIteratorContinuation(r) {
if (Object(r) !== r) {
return Promise.reject(new TypeError(r + " is not an object."));
}
var done = r.done;
return Promise.resolve(r.value).then(function (value) {
return {
value: value,
done: done
};
});
}
return new AsyncFromSyncIterator(s);
}
//# sourceMappingURL=asyncIterator.js.map
@@ -0,0 +1,97 @@
## 1.6.1
###### *Oct 14, 2025*
- eslint: use mjs for eslint config file
- package: remove type field
## 1.6.0
###### *Oct 12, 2025*
- monaco-editor: update to the latest version (0.54.0)
- package: update all dependencies to the latest version
- playground: update all dependencies to the latest version
## 1.5.0
###### *Feb 13, 2025*
- monaco-editor: update to the latest version (0.52.2)
- package: remove monaco-editor from peerDependencies
## 1.4.0
###### *Oct 1, 2023*
- monaco-editor: update to the latest version (0.43.0)
## 1.3.3
###### *Apr 2, 2023*
- monaco-editor: update to the latest version (0.36.1)
## 1.3.2
###### *May 11, 2022*
- utility: resolve monaco instance in case of provided monaco instance and global availability
## 1.3.1
###### *Apr 23, 2022*
- utility: implement isInitialized flag
## 1.3.0
###### *Mar 20, 2022*
- types: add optional monaco type into config params
- utility: implement optional monaco param for config
- test: fix a test case according to the new changes
- playground: create a playground for testing the library
- monaco-editor: update to the latest version (0.33.0)
## 1.2.0
###### *Oct 3, 2021*
- monaco-editor: update to the latest version (0.28.1)
- types: fix CancelablePromise type
## 1.1.1
###### *Jun 21, 2021*
- monaco-editor: update to the latest version (0.25.2)
## 1.1.0
###### *Jun 12, 2021*
- monaco-editor: update to the latest version (0.25.0)
## 1.0.1
###### *Mar 18, 2021*
- monaco-editor: update to the latest version (0.23.0)
## 1.0.0
###### *Jan 15, 2021*
🎉 First stable release
- utility: rename the main utility: monaco -> loader
- helpers: create (+ named export) `__getMonacoInstance` internal helper
## 0.1.3
###### *Jan 8, 2021*
- build: in `cjs` and `es` bundles `state-local` is marked as externam lib
- build: in `cjs` and `es` modules structure is preserved - `output.preserveModules = true`
## 0.1.2
###### *Jan 7, 2021*
- package: add jsdelivr source path
## 0.1.1
###### *Jan 7, 2021*
- lib: rename scripts name (from 'core' to 'loader')
## 0.1.0
###### *Jan 6, 2021*
🎉 First release
@@ -0,0 +1,10 @@
import { __decorate } from "tslib";
import { Time } from "@peculiar/asn1-x509";
import { AsnTypeTypes, AsnType } from "@peculiar/asn1-schema";
export const id_signingTime = "1.2.840.113549.1.9.5";
let SigningTime = class SigningTime extends Time {
};
SigningTime = __decorate([
AsnType({ type: AsnTypeTypes.Choice })
], SigningTime);
export { SigningTime };
@@ -0,0 +1 @@
{"name":"is-alphabetical","version":"2.0.1","requiresBuild":false,"files":{"license":{"checkedAt":1794532114107,"integrity":"sha512-cQvy4TvDNGTww5W7wo7SHRjv/0G8g3u/v8V2BhwwrAM+M5M2Z7W8hy+cQrU+e4exnULY2LrZ0EQqBk6Fj/Sdrw==","mode":420,"size":1099},"index.js":{"checkedAt":1794532114107,"integrity":"sha512-cjFUE1c241CUXAAsghCqCP2STbhdYuCcUnGLwHtwQmGdUcIDM8HrybA+7MIzex9Z2yxdGjGAIPjRjW/JqZYiSQ==","mode":420,"size":445},"package.json":{"checkedAt":1794532114107,"integrity":"sha512-ngjFqT4yFWQIGFATMRNrH8SbNd86wwbkmXhC1HTNgziBI+aetVd14T9x8+VZVrmuqzGIJG39nTA6Pj/UHvzQZg==","mode":420,"size":1873},"readme.md":{"checkedAt":1794532114107,"integrity":"sha512-uE8QF8X06PI3Veu4uj0gdFqzx1BoDLW3f507DkgEEkzP78OBts3upZ+u/ARvrI7K5D2rfIWIyEe4t5O9PPxGQQ==","mode":420,"size":3540},"index.d.ts":{"checkedAt":1794532114107,"integrity":"sha512-Lff9rfRvN5O42Fiikfb4r7HIhGNghPT40JrJNz9hcqDdQG/QyNRTmPXTQevs8qTPMPXbvtNzTkSuaUiXTj65YQ==","mode":420,"size":278}}}
@@ -0,0 +1,40 @@
// Portuguese [pt]
import dayjs from '../index';
var locale = {
name: 'pt',
weekdays: 'domingo_segunda-feira_terça-feira_quarta-feira_quinta-feira_sexta-feira_sábado'.split('_'),
weekdaysShort: 'dom_seg_ter_qua_qui_sex_sab'.split('_'),
weekdaysMin: 'Do_2ª_3ª_4ª_5ª_6ª_Sa'.split('_'),
months: 'janeiro_fevereiro_março_abril_maio_junho_julho_agosto_setembro_outubro_novembro_dezembro'.split('_'),
monthsShort: 'jan_fev_mar_abr_mai_jun_jul_ago_set_out_nov_dez'.split('_'),
ordinal: function ordinal(n) {
return n + "\xBA";
},
weekStart: 1,
yearStart: 4,
formats: {
LT: 'HH:mm',
LTS: 'HH:mm:ss',
L: 'DD/MM/YYYY',
LL: 'D [de] MMMM [de] YYYY',
LLL: 'D [de] MMMM [de] YYYY [às] HH:mm',
LLLL: 'dddd, D [de] MMMM [de] YYYY [às] HH:mm'
},
relativeTime: {
future: 'em %s',
past: 'há %s',
s: 'alguns segundos',
m: 'um minuto',
mm: '%d minutos',
h: 'uma hora',
hh: '%d horas',
d: 'um dia',
dd: '%d dias',
M: 'um mês',
MM: '%d meses',
y: 'um ano',
yy: '%d anos'
}
};
dayjs.locale(locale, null, true);
export default locale;
@@ -0,0 +1,36 @@
/**
* Make a value safe for injection as a URL.
*
* This encodes unsafe characters with percent-encoding and skips already
* encoded sequences (see `normalizeUri`).
* Further unsafe characters are encoded as character references (see
* `micromark-util-encode`).
*
* A regex of allowed protocols can be given, in which case the URL is
* sanitized.
* For example, `/^(https?|ircs?|mailto|xmpp)$/i` can be used for `a[href]`, or
* `/^https?$/i` for `img[src]` (this is what `github.com` allows).
* If the URL includes an unknown protocol (one not matched by `protocol`, such
* as a dangerous example, `javascript:`), the value is ignored.
*
* @param {string | null | undefined} url
* URI to sanitize.
* @param {RegExp | null | undefined} [protocol]
* Allowed protocols.
* @returns {string}
* Sanitized URI.
*/
export function sanitizeUri(url: string | null | undefined, protocol?: RegExp | null | undefined): string;
/**
* Normalize a URL.
*
* Encode unsafe characters with percent-encoding, skipping already encoded
* sequences.
*
* @param {string} value
* URI to normalize.
* @returns {string}
* Normalized URI.
*/
export function normalizeUri(value: string): string;
//# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,44 @@
# import/no-namespace
🔧 This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix).
<!-- end auto-generated rule header -->
Enforce a convention of not using namespace (a.k.a. "wildcard" `*`) imports.
The rule is auto-fixable when the namespace object is only used for direct member access, e.g. `namespace.a`.
## Options
This rule supports the following options:
- `ignore`: array of glob strings for modules that should be ignored by the rule.
## Rule Details
Valid:
```js
import defaultExport from './foo'
import { a, b } from './bar'
import defaultExport, { a, b } from './foobar'
```
```js
/* eslint import/no-namespace: ["error", {ignore: ['*.ext']}] */
import * as bar from './ignored-module.ext';
```
Invalid:
```js
import * as foo from 'foo';
```
```js
import defaultExport, * as foo from 'foo';
```
## When Not To Use It
If you want to use namespaces, you don't want to use this rule.
@@ -0,0 +1,142 @@
import { isTag, hasChildren } from "domhandler";
/**
* Search a node and its children for nodes passing a test function. If `node` is not an array, it will be wrapped in one.
*
* @category Querying
* @param test Function to test nodes on.
* @param node Node to search. Will be included in the result set if it matches.
* @param recurse Also consider child nodes.
* @param limit Maximum number of nodes to return.
* @returns All nodes passing `test`.
*/
export function filter(test, node, recurse = true, limit = Infinity) {
return find(test, Array.isArray(node) ? node : [node], recurse, limit);
}
/**
* Search an array of nodes and their children for nodes passing a test function.
*
* @category Querying
* @param test Function to test nodes on.
* @param nodes Array of nodes to search.
* @param recurse Also consider child nodes.
* @param limit Maximum number of nodes to return.
* @returns All nodes passing `test`.
*/
export function find(test, nodes, recurse, limit) {
const result = [];
/** Stack of the arrays we are looking at. */
const nodeStack = [Array.isArray(nodes) ? nodes : [nodes]];
/** Stack of the indices within the arrays. */
const indexStack = [0];
for (;;) {
// First, check if the current array has any more elements to look at.
if (indexStack[0] >= nodeStack[0].length) {
// If we have no more arrays to look at, we are done.
if (indexStack.length === 1) {
return result;
}
// Otherwise, remove the current array from the stack.
nodeStack.shift();
indexStack.shift();
// Loop back to the start to continue with the next array.
continue;
}
const elem = nodeStack[0][indexStack[0]++];
if (test(elem)) {
result.push(elem);
if (--limit <= 0)
return result;
}
if (recurse && hasChildren(elem) && elem.children.length > 0) {
/*
* Add the children to the stack. We are depth-first, so this is
* the next array we look at.
*/
indexStack.unshift(0);
nodeStack.unshift(elem.children);
}
}
}
/**
* Finds the first element inside of an array that matches a test function. This is an alias for `Array.prototype.find`.
*
* @category Querying
* @param test Function to test nodes on.
* @param nodes Array of nodes to search.
* @returns The first node in the array that passes `test`.
* @deprecated Use `Array.prototype.find` directly.
*/
export function findOneChild(test, nodes) {
return nodes.find(test);
}
/**
* Finds one element in a tree that passes a test.
*
* @category Querying
* @param test Function to test nodes on.
* @param nodes Node or array of nodes to search.
* @param recurse Also consider child nodes.
* @returns The first node that passes `test`.
*/
export function findOne(test, nodes, recurse = true) {
const searchedNodes = Array.isArray(nodes) ? nodes : [nodes];
for (let i = 0; i < searchedNodes.length; i++) {
const node = searchedNodes[i];
if (isTag(node) && test(node)) {
return node;
}
if (recurse && hasChildren(node) && node.children.length > 0) {
const found = findOne(test, node.children, true);
if (found)
return found;
}
}
return null;
}
/**
* Checks if a tree of nodes contains at least one node passing a test.
*
* @category Querying
* @param test Function to test nodes on.
* @param nodes Array of nodes to search.
* @returns Whether a tree of nodes contains at least one node passing the test.
*/
export function existsOne(test, nodes) {
return (Array.isArray(nodes) ? nodes : [nodes]).some((node) => (isTag(node) && test(node)) ||
(hasChildren(node) && existsOne(test, node.children)));
}
/**
* Search an array of nodes and their children for elements passing a test function.
*
* Same as `find`, but limited to elements and with less options, leading to reduced complexity.
*
* @category Querying
* @param test Function to test nodes on.
* @param nodes Array of nodes to search.
* @returns All nodes passing `test`.
*/
export function findAll(test, nodes) {
const result = [];
const nodeStack = [Array.isArray(nodes) ? nodes : [nodes]];
const indexStack = [0];
for (;;) {
if (indexStack[0] >= nodeStack[0].length) {
if (nodeStack.length === 1) {
return result;
}
// Otherwise, remove the current array from the stack.
nodeStack.shift();
indexStack.shift();
// Loop back to the start to continue with the next array.
continue;
}
const elem = nodeStack[0][indexStack[0]++];
if (isTag(elem) && test(elem))
result.push(elem);
if (hasChildren(elem) && elem.children.length > 0) {
indexStack.unshift(0);
nodeStack.unshift(elem.children);
}
}
}
//# sourceMappingURL=querying.js.map
@@ -0,0 +1 @@
{"version":3,"file":"has-magic.js","sourceRoot":"","sources":["../../src/has-magic.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAA;AAGrC;;;;;;;;;;GAUG;AACH,MAAM,CAAC,MAAM,QAAQ,GAAG,CACtB,OAA0B,EAC1B,UAAuB,EAAE,EAChB,EAAE;IACX,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE,CAAC;QAC5B,OAAO,GAAG,CAAC,OAAO,CAAC,CAAA;IACrB,CAAC;IACD,KAAK,MAAM,CAAC,IAAI,OAAO,EAAE,CAAC;QACxB,IAAI,IAAI,SAAS,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC,QAAQ,EAAE;YAAE,OAAO,IAAI,CAAA;IACvD,CAAC;IACD,OAAO,KAAK,CAAA;AACd,CAAC,CAAA","sourcesContent":["import { Minimatch } from 'minimatch'\nimport { GlobOptions } from './glob.js'\n\n/**\n * Return true if the patterns provided contain any magic glob characters,\n * given the options provided.\n *\n * Brace expansion is not considered \"magic\" unless the `magicalBraces` option\n * is set, as brace expansion just turns one string into an array of strings.\n * So a pattern like `'x{a,b}y'` would return `false`, because `'xay'` and\n * `'xby'` both do not contain any magic glob characters, and it's treated the\n * same as if you had called it on `['xay', 'xby']`. When `magicalBraces:true`\n * is in the options, brace expansion _is_ treated as a pattern having magic.\n */\nexport const hasMagic = (\n pattern: string | string[],\n options: GlobOptions = {},\n): boolean => {\n if (!Array.isArray(pattern)) {\n pattern = [pattern]\n }\n for (const p of pattern) {\n if (new Minimatch(p, options).hasMagic()) return true\n }\n return false\n}\n"]}
@@ -0,0 +1,52 @@
{
"name": "@tootallnate/once",
"version": "2.0.0",
"description": "Creates a Promise that waits for a single event",
"main": "./dist/index.js",
"types": "./dist/index.d.ts",
"files": [
"dist"
],
"scripts": {
"prebuild": "rimraf dist",
"build": "tsc",
"test": "jest",
"prepublishOnly": "npm run build"
},
"repository": {
"type": "git",
"url": "git://github.com/TooTallNate/once.git"
},
"keywords": [],
"author": "Nathan Rajlich <nathan@tootallnate.net> (http://n8.io/)",
"license": "MIT",
"bugs": {
"url": "https://github.com/TooTallNate/once/issues"
},
"devDependencies": {
"@types/jest": "^27.0.2",
"@types/node": "^12.12.11",
"abort-controller": "^3.0.0",
"jest": "^27.2.1",
"rimraf": "^3.0.0",
"ts-jest": "^27.0.5",
"typescript": "^4.4.3"
},
"engines": {
"node": ">= 10"
},
"jest": {
"preset": "ts-jest",
"globals": {
"ts-jest": {
"diagnostics": false,
"isolatedModules": true
}
},
"verbose": false,
"testEnvironment": "node",
"testMatch": [
"<rootDir>/test/**/*.test.ts"
]
}
}
@@ -0,0 +1,65 @@
{
"name": "@simplewebauthn/server",
"version": "13.2.2",
"description": "SimpleWebAuthn for Servers",
"keywords": [
"typescript",
"webauthn",
"passkeys",
"fido",
"node"
],
"author": "Matthew Miller <matthew@millerti.me>",
"homepage": "https://github.com/MasterKale/SimpleWebAuthn/tree/master/packages/server#readme",
"repository": {
"type": "git",
"url": "git+https://github.com/MasterKale/SimpleWebAuthn.git",
"directory": "packages/server"
},
"license": "MIT",
"bugs": {
"url": "https://github.com/MasterKale/SimpleWebAuthn/issues"
},
"main": "./script/index.js",
"module": "./esm/index.js",
"exports": {
".": {
"import": "./esm/index.js",
"require": "./script/index.js"
},
"./helpers": {
"import": "./esm/helpers/index.js",
"require": "./script/helpers/index.js"
}
},
"publishConfig": {
"access": "public"
},
"engines": {
"node": ">=20.0.0"
},
"typesVersions": {
"*": {
".": [
"esm/index.d.ts"
],
"helpers": [
"esm/helpers/index.d.ts"
]
}
},
"dependencies": {
"@hexagon/base64": "^1.1.27",
"@levischuck/tiny-cbor": "^0.2.2",
"@peculiar/asn1-android": "^2.3.10",
"@peculiar/asn1-ecc": "^2.3.8",
"@peculiar/asn1-rsa": "^2.3.8",
"@peculiar/asn1-schema": "^2.3.8",
"@peculiar/asn1-x509": "^2.3.8",
"@peculiar/x509": "^1.13.0"
},
"devDependencies": {
"@types/node": "^20.9.0"
},
"_generatedBy": "dnt@dev"
}
@@ -0,0 +1,29 @@
"use client";
"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// src/base/table-row.tsx
var table_row_exports = {};
__export(table_row_exports, {
default: () => table_row_default
});
module.exports = __toCommonJS(table_row_exports);
var import_table = require("@react-stately/table");
var TableRow = import_table.Row;
var table_row_default = TableRow;
@@ -0,0 +1 @@
{"mappings":"AAAA;;;;;;;;;;CAUC,GAED;;CAEC,GACM,SAAS,0CAAM,KAAa,EAAE,MAAc,CAAC,QAAQ,EAAE,MAAc,QAAQ;IAClF,IAAI,WAAW,KAAK,GAAG,CAAC,KAAK,GAAG,CAAC,OAAO,MAAM;IAC9C,OAAO;AACT;AAEO,SAAS,0CAAqB,KAAa,EAAE,IAAY;IAC9D,IAAI,eAAe;IACnB,IAAI,YAAY;IAChB,IAAI,aAAa,KAAK,QAAQ;IAC9B,iFAAiF;IACjF,IAAI,SAAS,WAAW,WAAW,GAAG,OAAO,CAAC;IAC9C,IAAI,SAAS,GACX,YAAY,KAAK,GAAG,CAAC,KAAK,KAAK,CAAC,KAAK,KAAK,CAAC,KAAK,GAAG,CAAC,WAAW;SAC1D;QACL,IAAI,aAAa,WAAW,OAAO,CAAC;QACpC,IAAI,cAAc,GAChB,YAAY,WAAW,MAAM,GAAG;IAEpC;IACA,IAAI,YAAY,GAAG;QACjB,IAAI,MAAM,KAAK,GAAG,CAAC,IAAI;QACvB,eAAe,KAAK,KAAK,CAAC,eAAe,OAAO;IAClD;IACA,OAAO;AACT;AAEO,SAAS,0CAAgB,KAAa,EAAE,GAAuB,EAAE,GAAuB,EAAE,IAAY;IAC3G,MAAM,OAAO;IACb,MAAM,OAAO;IACb,IAAI,YAAa,AAAC,CAAA,QAAS,CAAA,MAAM,OAAO,IAAI,GAAE,CAAC,IAAK;IACpD,IAAI,eAAe,0CAAqB,KAAK,GAAG,CAAC,aAAa,KAAK,OAC/D,QAAQ,KAAK,IAAI,CAAC,aAAc,CAAA,OAAO,KAAK,GAAG,CAAC,UAAS,IACzD,QAAQ,WAAW;IAEvB,IAAI,CAAC,MAAM,MAAM;QACf,IAAI,eAAe,KACjB,eAAe;aACV,IAAI,CAAC,MAAM,QAAQ,eAAe,KACvC,eAAe,MAAM,KAAK,KAAK,CAAC,0CAAqB,AAAC,CAAA,MAAM,GAAE,IAAK,MAAM,SAAS;IAEtF,OAAO,IAAI,CAAC,MAAM,QAAQ,eAAe,KACvC,eAAe,KAAK,KAAK,CAAC,0CAAqB,MAAM,MAAM,SAAS;IAGtE,gEAAgE;IAChE,eAAe,0CAAqB,cAAc;IAElD,OAAO;AACT;AAGO,SAAS,yCAAc,KAAa,EAAE,MAAc,EAAE,OAAe,EAAE;IAC5E,MAAM,MAAM,KAAK,GAAG,CAAC,MAAM;IAE3B,OAAO,KAAK,KAAK,CAAC,QAAQ,OAAO;AACnC","sources":["packages/@react-stately/utils/src/number.ts"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n/**\n * Takes a value and forces it to the closest min/max if it's outside. Also forces it to the closest valid step.\n */\nexport function clamp(value: number, min: number = -Infinity, max: number = Infinity): number {\n let newValue = Math.min(Math.max(value, min), max);\n return newValue;\n}\n\nexport function roundToStepPrecision(value: number, step: number): number {\n let roundedValue = value;\n let precision = 0;\n let stepString = step.toString();\n // Handle negative exponents in exponential notation (e.g., \"1e-7\" → precision 8)\n let eIndex = stepString.toLowerCase().indexOf('e-');\n if (eIndex > 0) {\n precision = Math.abs(Math.floor(Math.log10(Math.abs(step)))) + eIndex;\n } else {\n let pointIndex = stepString.indexOf('.');\n if (pointIndex >= 0) {\n precision = stepString.length - pointIndex;\n }\n }\n if (precision > 0) {\n let pow = Math.pow(10, precision);\n roundedValue = Math.round(roundedValue * pow) / pow;\n }\n return roundedValue;\n}\n\nexport function snapValueToStep(value: number, min: number | undefined, max: number | undefined, step: number): number {\n min = Number(min);\n max = Number(max);\n let remainder = ((value - (isNaN(min) ? 0 : min)) % step);\n let snappedValue = roundToStepPrecision(Math.abs(remainder) * 2 >= step\n ? value + Math.sign(remainder) * (step - Math.abs(remainder))\n : value - remainder, step);\n\n if (!isNaN(min)) {\n if (snappedValue < min) {\n snappedValue = min;\n } else if (!isNaN(max) && snappedValue > max) {\n snappedValue = min + Math.floor(roundToStepPrecision((max - min) / step, step)) * step;\n }\n } else if (!isNaN(max) && snappedValue > max) {\n snappedValue = Math.floor(roundToStepPrecision(max / step, step)) * step;\n }\n\n // correct floating point behavior by rounding to step precision\n snappedValue = roundToStepPrecision(snappedValue, step);\n\n return snappedValue;\n}\n\n/* Takes a value and rounds off to the number of digits. */\nexport function toFixedNumber(value: number, digits: number, base: number = 10): number {\n const pow = Math.pow(base, digits);\n\n return Math.round(value * pow) / pow;\n}\n"],"names":[],"version":3,"file":"number.module.js.map"}
@@ -0,0 +1,11 @@
'use strict';
var msPerDay = require('../helpers/timeConstants').msPerDay;
var DayFromYear = require('./DayFromYear');
// https://262.ecma-international.org/5.1/#sec-15.9.1.3
module.exports = function TimeFromYear(y) {
return msPerDay * DayFromYear(y);
};
@@ -0,0 +1,27 @@
import { W as WorkerGlobalState, B as BirpcOptions, R as RuntimeRPC, a as WorkerSetupContext } from './chunks/worker.d.ZGohxCEd.js';
import { Awaitable } from '@vitest/utils';
import '@vitest/runner';
import 'vite/module-runner';
import './chunks/config.d.BTfZNUu9.js';
import '@vitest/pretty-format';
import '@vitest/snapshot';
import '@vitest/utils/diff';
import './chunks/environment.d.CrsxCzP1.js';
/** @experimental */
declare function runBaseTests(method: "run" | "collect", state: WorkerGlobalState): Promise<void>;
type WorkerRpcOptions = Pick<BirpcOptions<RuntimeRPC>, "on" | "off" | "post" | "serialize" | "deserialize">;
interface VitestWorker extends WorkerRpcOptions {
runTests: (state: WorkerGlobalState) => Awaitable<unknown>;
collectTests: (state: WorkerGlobalState) => Awaitable<unknown>;
setup?: (context: WorkerSetupContext) => Promise<() => Promise<unknown>>;
}
interface Options extends VitestWorker {
teardown?: () => void;
}
/** @experimental */
declare function init(worker: Options): void;
export { init, runBaseTests };
@@ -0,0 +1,112 @@
import {EventEmitter} from 'events';
type WithRequiredProperties<T, K extends keyof T> = T & Required<Pick<T, K>>;
declare class Keyv<Value = any, Options extends Record<string, any> = Record<string, unknown>> extends EventEmitter {
/**
* `this.opts` is an object containing at least the properties listed
* below. However, `Keyv.Options` allows arbitrary properties as well.
* These properties can be specified as the second type parameter to `Keyv`.
*/
opts: WithRequiredProperties<
Keyv.Options<Value>,
'deserialize' | 'namespace' | 'serialize' | 'store' | 'uri'
> &
Options;
/**
* @param opts The options object is also passed through to the storage adapter. Check your storage adapter docs for any extra options.
*/
constructor(options?: Keyv.Options<Value> & Options);
/**
* @param uri The connection string URI.
*
* Merged into the options object as options.uri.
* @param opts The options object is also passed through to the storage adapter. Check your storage adapter docs for any extra options.
*/
constructor(uri?: string, options?: Keyv.Options<Value> & Options);
/** Returns the value. */
get(key: string, options?: {raw?: false}): Promise<Value | undefined>;
/** Returns the raw value. */
get(key: string, options: {raw: true}): Promise<Keyv.DeserializedData<Value> | undefined>;
/** Returns an array of values. Uses `store.getMany` if it exists, otherwise uses parallel calls to `store.get`. */
get(key: string[], options?: {raw?: false}): Promise<Array<Value | undefined>>;
/** Returns an array of raw values. Uses `store.getMany` if it exists, otherwise uses parallel calls to `store.get`. */
get(key: string[], options: {raw: true}): Promise<Array<Keyv.DeserializedData<Value> | undefined>>;
/**
* Set a value.
*
* By default keys are persistent. You can set an expiry TTL in milliseconds.
*/
set(key: string, value: Value, ttl?: number): Promise<true>;
/**
* Deletes an entry.
*
* Returns `true` if the key existed, `false` if not.
*/
delete(key: string | string[]): Promise<boolean>;
/** Delete all entries in the current namespace. */
clear(): Promise<void>;
/** Check if key exists in current namespace. */
has(key: string): Promise<boolean>;
/** Iterator */
iterator(namespace?: string): AsyncGenerator<any, void, any>;
/**
* Closes the connection.
*
* Returns `undefined` when the connection closes.
*/
disconnect(): Promise<void>;
}
declare namespace Keyv {
interface Options<Value> {
[key: string]: any;
/** Namespace for the current instance. */
namespace?: string | undefined;
/** A custom serialization function. */
serialize?: ((data: DeserializedData<Value>) => string) | undefined;
/** A custom deserialization function. */
deserialize?: ((data: string) => DeserializedData<Value> | undefined) | undefined;
/** The connection string URI. */
uri?: string | undefined;
/** The storage adapter instance to be used by Keyv. */
store?: Store<string | undefined> | undefined;
/** Default TTL. Can be overridden by specififying a TTL on `.set()`. */
ttl?: number | undefined;
/** Specify an adapter to use. e.g `'redis'` or `'mongodb'`. */
adapter?: 'redis' | 'mongodb' | 'mongo' | 'sqlite' | 'postgresql' | 'postgres' | 'mysql' | undefined;
/** Enable compression option **/
compression?: CompressionAdapter | undefined;
}
interface CompressionAdapter {
compress(value: any, options?: any): Promise<any>;
decompress(value: any, options?: any): Promise<any>;
serialize(value: any): Promise<any>;
deserialize(value: any): Promise<any>;
}
interface DeserializedData<Value> {
value: Value; expires: number | undefined;
}
type StoredData<Value> = DeserializedData<Value> | string | undefined;
interface Store<Value> {
get(key: string): Value | Promise<Value | undefined> | undefined;
set(key: string, value: Value, ttl?: number): any;
delete(key: string): boolean | Promise<boolean>;
clear(): void | Promise<void>;
has?(key: string): boolean | Promise<boolean>;
getMany?(
keys: string[]
): Array<StoredData<Value>> | Promise<Array<StoredData<Value>>> | undefined;
}
}
export = Keyv;
@@ -0,0 +1,36 @@
"use strict"
const {
definePrototypeMethodHandler,
} = require("../util/define-prototype-method-handler")
module.exports = {
meta: {
docs: {
description:
"disallow the `Intl.DateTimeFormat.prototype.formatRange` method.",
category: "ES2021-Intl-API",
recommended: false,
url: "http://eslint-community.github.io/eslint-plugin-es-x/rules/no-intl-datetimeformat-prototype-formatrange.html",
},
fixable: null,
messages: {
forbidden: "ES2021 Intl API '{{name}}' method is forbidden.",
},
schema: [
{
type: "object",
properties: {
aggressive: { type: "boolean" },
},
additionalProperties: false,
},
],
type: "problem",
},
create(context) {
return definePrototypeMethodHandler(context, {
"Intl.DateTimeFormat": ["formatRange"],
})
},
}
@@ -0,0 +1,32 @@
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $species = GetIntrinsic('%Symbol.species%', true);
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var IsConstructor = require('./IsConstructor');
// https://262.ecma-international.org/6.0/#sec-speciesconstructor
module.exports = function SpeciesConstructor(O, defaultConstructor) {
if (!isObject(O)) {
throw new $TypeError('Assertion failed: Type(O) is not Object');
}
var C = O.constructor;
if (typeof C === 'undefined') {
return defaultConstructor;
}
if (!isObject(C)) {
throw new $TypeError('O.constructor is not an Object');
}
var S = $species ? C[$species] : void 0;
if (S == null) {
return defaultConstructor;
}
if (IsConstructor(S)) {
return S;
}
throw new $TypeError('no constructor found');
};
@@ -0,0 +1,24 @@
# @heroui/use-image
A Quick description of the component
> This is an internal utility, not intended for public usage.
## Installation
```sh
yarn add @heroui/use-image
# or
npm i @heroui/use-image
```
## Contribution
Yes please! See the
[contributing guidelines](https://github.com/frontio-ai/heroui/blob/master/CONTRIBUTING.md)
for details.
## License
This project is licensed under the terms of the
[MIT license](https://github.com/frontio-ai/heroui/blob/master/LICENSE).
@@ -0,0 +1,4 @@
function _identity(t) {
return t;
}
export { _identity as default };
@@ -0,0 +1 @@
export { _ as default } from "../esm/_class_name_tdz_error.js";
@@ -0,0 +1,5 @@
var convert = require('./convert'),
func = convert('wrapperAt', require('../wrapperAt'), require('./_falseOptions'));
func.placeholder = require('./placeholder');
module.exports = func;
@@ -0,0 +1,87 @@
/*
* Copyright 2020 Adobe. All rights reserved.
* This file is licensed to you 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
*
* 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 REPRESENTATIONS
* OF ANY KIND, either express or implied. See the License for the specific language
* governing permissions and limitations under the License.
*/
// Portions of the code in this file are based on code from react.
// Original licensing for the following can be found in the
// NOTICE file in the root directory of this source tree.
// See https://github.com/facebook/react/tree/cc7c1aece46a6b69b41958d731e0fd27c94bfc6c/packages/react-interactions
import {DOMAttributes, FocusableElement, FocusEvents} from '@react-types/shared';
import {FocusEvent, useCallback} from 'react';
import {getActiveElement, getEventTarget, getOwnerDocument} from '@react-aria/utils';
import {useSyntheticBlurEvent} from './utils';
export interface FocusProps<Target = FocusableElement> extends FocusEvents<Target> {
/** Whether the focus events should be disabled. */
isDisabled?: boolean
}
export interface FocusResult<Target = FocusableElement> {
/** Props to spread onto the target element. */
focusProps: DOMAttributes<Target>
}
/**
* Handles focus events for the immediate target.
* Focus events on child elements will be ignored.
*/
export function useFocus<Target extends FocusableElement = FocusableElement>(props: FocusProps<Target>): FocusResult<Target> {
let {
isDisabled,
onFocus: onFocusProp,
onBlur: onBlurProp,
onFocusChange
} = props;
const onBlur: FocusProps<Target>['onBlur'] = useCallback((e: FocusEvent<Target>) => {
if (e.target === e.currentTarget) {
if (onBlurProp) {
onBlurProp(e);
}
if (onFocusChange) {
onFocusChange(false);
}
return true;
}
}, [onBlurProp, onFocusChange]);
const onSyntheticFocus = useSyntheticBlurEvent<Target>(onBlur);
const onFocus: FocusProps<Target>['onFocus'] = useCallback((e: FocusEvent<Target>) => {
// Double check that document.activeElement actually matches e.target in case a previously chained
// focus handler already moved focus somewhere else.
const ownerDocument = getOwnerDocument(e.target);
const activeElement = ownerDocument ? getActiveElement(ownerDocument) : getActiveElement();
if (e.target === e.currentTarget && activeElement === getEventTarget(e.nativeEvent)) {
if (onFocusProp) {
onFocusProp(e);
}
if (onFocusChange) {
onFocusChange(true);
}
onSyntheticFocus(e);
}
}, [onFocusChange, onFocusProp, onSyntheticFocus]);
return {
focusProps: {
onFocus: (!isDisabled && (onFocusProp || onFocusChange || onBlurProp)) ? onFocus : undefined,
onBlur: (!isDisabled && (onBlurProp || onFocusChange)) ? onBlur : undefined
}
};
}
@@ -0,0 +1,23 @@
"use strict";
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
Object.defineProperty(exports, "__esModule", {
value: true
});
exports["default"] = void 0;
var _tslib = require("tslib");
var _react = require("react");
var _useThrottleFn = _interopRequireDefault(require("../useThrottleFn"));
function useThrottle(value, options) {
var _a = (0, _tslib.__read)((0, _react.useState)(value), 2),
throttled = _a[0],
setThrottled = _a[1];
var run = (0, _useThrottleFn["default"])(function () {
setThrottled(value);
}, options).run;
(0, _react.useEffect)(function () {
run();
}, [value]);
return throttled;
}
var _default = exports["default"] = useThrottle;
@@ -0,0 +1,44 @@
/**
* Throttle decorator
* @param {Function} fn
* @param {Number} freq
* @return {Function}
*/
function throttle(fn, freq) {
let timestamp = 0;
let threshold = 1000 / freq;
let lastArgs;
let timer;
const invoke = (args, now = Date.now()) => {
timestamp = now;
lastArgs = null;
if (timer) {
clearTimeout(timer);
timer = null;
}
fn(...args);
}
const throttled = (...args) => {
const now = Date.now();
const passed = now - timestamp;
if ( passed >= threshold) {
invoke(args, now);
} else {
lastArgs = args;
if (!timer) {
timer = setTimeout(() => {
timer = null;
invoke(lastArgs)
}, threshold - passed);
}
}
}
const flush = () => lastArgs && invoke(lastArgs);
return [throttled, flush];
}
export default throttle;
@@ -0,0 +1,2 @@
export { animateSequence } from './animation/animators/waapi/animate-sequence.mjs';
export { animateMini as animate } from './animation/animators/waapi/animate-style.mjs';
@@ -0,0 +1 @@
module.exports={A:{A:{"1":"A B","2":"K D E F wC"},B:{"1":"0 1 2 3 4 5 C L M G N O P Q H R S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB I"},C:{"1":"0 1 2 3 4 5 6 7 8 9 J ZB K D E F A B C L M G N O P aB AB BB CB DB EB FB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB wB xB yB zB 0B 1B 2B 3B UC 4B VC 5B 6B 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC Q H R WC S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB I XC MC YC yC zC","2":"xC TC 0C 1C"},D:{"1":"0 1 2 3 4 5 6 7 8 9 A B C L M G N O P aB AB BB CB DB EB FB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB wB xB yB zB 0B 1B 2B 3B UC 4B VC 5B 6B 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC Q H R S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB I XC MC YC","2":"J ZB K D E F"},E:{"1":"B C L M G aC NC OC 7C 8C 9C bC cC PC AD QC dC eC fC gC hC BD RC iC jC kC lC mC CD SC nC oC pC qC rC sC tC DD ED","2":"J 2C ZC","16":"ZB","388":"K D E F A 3C 4C 5C 6C"},F:{"1":"0 1 2 3 4 5 6 7 8 9 B C G N O P aB AB BB CB DB EB FB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB wB xB yB zB 0B 1B 2B 3B 4B 5B 6B 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC Q H R WC S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z FD GD HD ID NC uC JD OC","2":"F"},G:{"1":"SD TD UD VD WD XD YD ZD aD bD cD dD bC cC PC eD QC dC eC fC gC hC fD RC iC jC kC lC mC gD SC nC oC pC qC rC sC tC","16":"ZC KD vC","388":"E LD MD ND OD PD QD RD"},H:{"2":"hD"},I:{"1":"I nD","2":"TC J iD jD kD lD vC mD"},J:{"1":"A","2":"D"},K:{"1":"A B C H NC uC OC"},L:{"1":"I"},M:{"1":"MC"},N:{"132":"A B"},O:{"1":"PC"},P:{"1":"6 7 8 9 J AB BB CB DB EB FB oD pD qD rD sD aC tD uD vD wD xD QC RC SC yD"},Q:{"1":"zD"},R:{"1":"0D"},S:{"1":"1D 2D"}},B:1,C:"Pattern attribute for input fields",D:true};
@@ -0,0 +1,195 @@
/**
* @fileoverview Enforce default props alphabetical sorting
* @author Vladimir Kattsov
* @deprecated
*/
'use strict';
const variableUtil = require('../util/variable');
const docsUrl = require('../util/docsUrl');
const report = require('../util/report');
const log = require('../util/log');
const eslintUtil = require('../util/eslint');
const getFirstTokens = eslintUtil.getFirstTokens;
const getText = eslintUtil.getText;
let isWarnedForDeprecation = false;
// ------------------------------------------------------------------------------
// Rule Definition
// ------------------------------------------------------------------------------
const messages = {
propsNotSorted: 'Default prop types declarations should be sorted alphabetically',
};
/** @type {import('eslint').Rule.RuleModule} */
module.exports = {
meta: {
deprecated: true,
replacedBy: ['sort-default-props'],
docs: {
description: 'Enforce defaultProps declarations alphabetical sorting',
category: 'Stylistic Issues',
recommended: false,
url: docsUrl('jsx-sort-default-props'),
},
// fixable: 'code',
messages,
schema: [{
type: 'object',
properties: {
ignoreCase: {
type: 'boolean',
},
},
additionalProperties: false,
}],
},
create(context) {
const configuration = context.options[0] || {};
const ignoreCase = configuration.ignoreCase || false;
/**
* Get properties name
* @param {Object} node - Property.
* @returns {string} Property name.
*/
function getPropertyName(node) {
if (node.key || ['MethodDefinition', 'Property'].indexOf(node.type) !== -1) {
return node.key.name;
}
if (node.type === 'MemberExpression') {
return node.property.name;
// Special case for class properties
// (babel-eslint@5 does not expose property name so we have to rely on tokens)
}
if (node.type === 'ClassProperty') {
const tokens = getFirstTokens(context, node, 2);
return tokens[1] && tokens[1].type === 'Identifier' ? tokens[1].value : tokens[0].value;
}
return '';
}
/**
* Checks if the Identifier node passed in looks like a defaultProps declaration.
* @param {ASTNode} node The node to check. Must be an Identifier node.
* @returns {boolean} `true` if the node is a defaultProps declaration, `false` if not
*/
function isDefaultPropsDeclaration(node) {
const propName = getPropertyName(node);
return (propName === 'defaultProps' || propName === 'getDefaultProps');
}
function getKey(node) {
return getText(context, node.key || node.argument);
}
/**
* Find a variable by name in the current scope.
* @param {ASTNode} node The node to look for.
* @param {string} name Name of the variable to look for.
* @returns {ASTNode|null} Return null if the variable could not be found, ASTNode otherwise.
*/
function findVariableByName(node, name) {
const variable = variableUtil
.getVariableFromContext(context, node, name);
if (!variable || !variable.defs[0] || !variable.defs[0].node) {
return null;
}
if (variable.defs[0].node.type === 'TypeAlias') {
return variable.defs[0].node.right;
}
return variable.defs[0].node.init;
}
/**
* Checks if defaultProps declarations are sorted
* @param {Array} declarations The array of AST nodes being checked.
* @returns {void}
*/
function checkSorted(declarations) {
// function fix(fixer) {
// return propTypesSortUtil.fixPropTypesSort(context, fixer, declarations, ignoreCase);
// }
declarations.reduce((prev, curr, idx, decls) => {
if (/Spread(?:Property|Element)$/.test(curr.type)) {
return decls[idx + 1];
}
let prevPropName = getKey(prev);
let currentPropName = getKey(curr);
if (ignoreCase) {
prevPropName = prevPropName.toLowerCase();
currentPropName = currentPropName.toLowerCase();
}
if (currentPropName < prevPropName) {
report(context, messages.propsNotSorted, 'propsNotSorted', {
node: curr,
// fix
});
return prev;
}
return curr;
}, declarations[0]);
}
function checkNode(node) {
if (!node) {
return;
}
if (node.type === 'ObjectExpression') {
checkSorted(node.properties);
} else if (node.type === 'Identifier') {
const propTypesObject = findVariableByName(node, node.name);
if (propTypesObject && propTypesObject.properties) {
checkSorted(propTypesObject.properties);
}
}
}
// --------------------------------------------------------------------------
// Public API
// --------------------------------------------------------------------------
return {
'ClassProperty, PropertyDefinition'(node) {
if (!isDefaultPropsDeclaration(node)) {
return;
}
checkNode(node.value);
},
MemberExpression(node) {
if (!isDefaultPropsDeclaration(node)) {
return;
}
checkNode('right' in node.parent && node.parent.right);
},
Program() {
if (isWarnedForDeprecation) {
return;
}
log('The react/jsx-sort-default-props rule is deprecated. It has been renamed to `react/sort-default-props`.');
isWarnedForDeprecation = true;
},
};
},
};
@@ -0,0 +1,14 @@
{
"root": true,
"extends": "@ljharb",
"globals": {
"StopIteration": false,
},
"rules": {
"func-name-matching": [2, "always"],
"id-length": 0,
},
}
@@ -0,0 +1,77 @@
{
"name": "iterator.prototype",
"version": "1.1.5",
"description": "`Iterator.prototype`, or a shared object to use.",
"main": "index.js",
"exports": {
".": "./index.js",
"./package.json": "./package.json"
},
"scripts": {
"prepack": "npmignore --auto --commentLines=autogenerated",
"prepublishOnly": "safe-publish-latest",
"prepublish": "not-in-publish || npm run prepublishOnly",
"prelint": "evalmd README.md",
"lint": "eslint --ext=js,mjs .",
"pretest": "npm run lint",
"tests-only": "tape 'test/**/*.js'",
"test": "npm run tests-only",
"posttest": "npx npm@'>=10.2' audit --production",
"version": "auto-changelog && git add CHANGELOG.md",
"postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\""
},
"repository": {
"type": "git",
"url": "git+https://github.com/ljharb/Iterator.prototype.git"
},
"keywords": [
"javascript",
"ecmascript",
"iterator",
"prototype"
],
"author": "Jordan Harband <ljharb@gmail.com>",
"license": "MIT",
"bugs": {
"url": "https://github.com/ljharb/Iterator.prototype/issues"
},
"homepage": "https://github.com/ljharb/Iterator.prototype#readme",
"dependencies": {
"define-data-property": "^1.1.4",
"es-object-atoms": "^1.0.0",
"get-intrinsic": "^1.2.6",
"get-proto": "^1.0.0",
"has-symbols": "^1.1.0",
"set-function-name": "^2.0.2"
},
"devDependencies": {
"@ljharb/eslint-config": "^21.1.1",
"auto-changelog": "^2.5.0",
"encoding": "^0.1.13",
"eslint": "=8.8.0",
"evalmd": "^0.0.19",
"in-publish": "^2.0.1",
"npmignore": "^0.3.1",
"safe-publish-latest": "^2.0.0",
"tape": "^5.9.0"
},
"testling": {
"files": "test/index.js"
},
"auto-changelog": {
"output": "CHANGELOG.md",
"template": "keepachangelog",
"unreleased": false,
"commitLimit": false,
"backfillLimit": false,
"hideCredit": true
},
"publishConfig": {
"ignore": [
".github/workflows"
]
},
"engines": {
"node": ">= 0.4"
}
}
@@ -0,0 +1 @@
{"version":3,"names":["_index","require","isScope","node","parent","isBlockStatement","isFunction","isCatchClause","isPattern","isScopable"],"sources":["../../src/validators/isScope.ts"],"sourcesContent":["import {\n isFunction,\n isCatchClause,\n isBlockStatement,\n isScopable,\n isPattern,\n} from \"./generated/index.ts\";\nimport type * as t from \"../index.ts\";\n\n/**\n * Check if the input `node` is a scope.\n */\nexport default function isScope(\n node: t.Node | null | undefined,\n parent: t.Node,\n): boolean {\n // If a BlockStatement is an immediate descendent of a Function/CatchClause, it must be in the body.\n // Hence we skipped the parentKey === \"params\" check\n if (isBlockStatement(node) && (isFunction(parent) || isCatchClause(parent))) {\n return false;\n }\n\n // If a Pattern is an immediate descendent of a Function/CatchClause, it must be in the params.\n // Hence we skipped the parentKey === \"params\" check\n if (isPattern(node) && (isFunction(parent) || isCatchClause(parent))) {\n return true;\n }\n\n return isScopable(node);\n}\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAYe,SAASC,OAAOA,CAC7BC,IAA+B,EAC/BC,MAAc,EACL;EAGT,IAAI,IAAAC,uBAAgB,EAACF,IAAI,CAAC,KAAK,IAAAG,iBAAU,EAACF,MAAM,CAAC,IAAI,IAAAG,oBAAa,EAACH,MAAM,CAAC,CAAC,EAAE;IAC3E,OAAO,KAAK;EACd;EAIA,IAAI,IAAAI,gBAAS,EAACL,IAAI,CAAC,KAAK,IAAAG,iBAAU,EAACF,MAAM,CAAC,IAAI,IAAAG,oBAAa,EAACH,MAAM,CAAC,CAAC,EAAE;IACpE,OAAO,IAAI;EACb;EAEA,OAAO,IAAAK,iBAAU,EAACN,IAAI,CAAC;AACzB","ignoreList":[]}
@@ -0,0 +1,19 @@
import { DateInput } from './types';
/**
* Calculates the difference in months between two dates.
* 计算两个日期之间的月份差
*
* @param date - The first date to compare.
* @param input - The second date to compare.
* @param asFloat - Whether to return the result as a float.
* @returns The difference in months between the two dates.
* @example
* ```ts
* diffInMonths(new Date(), new Date()); // 0
* diffInMonths(new Date(), new Date(Date.now() + 1000 * 60 * 60 * 24 * 30)); // 1
* diffInMonths(new Date(), new Date(Date.now() - 1000 * 60 * 60 * 24 * 30)); // -1
* diffInMonths(new Date(), new Date(Date.now() - 1000 * 60 * 60 * 24 * 30 * 2)); // -2
* diffInMonths(new Date(), new Date(Date.now() + 1000 * 60 * 60 * 24 * 30 * 2)); // 2
* ```
*/
export default function diffInMonths(date: Date, input: DateInput, asFloat?: boolean): number;
@@ -0,0 +1 @@
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self).dayjs_plugin_timezone=e()}(this,(function(){"use strict";var t={year:0,month:1,day:2,hour:3,minute:4,second:5},e={};return function(n,i,o){var r,a=function(t,n,i){void 0===i&&(i={});var o=new Date(t),r=function(t,n){void 0===n&&(n={});var i=n.timeZoneName||"short",o=t+"|"+i,r=e[o];return r||(r=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:t,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",timeZoneName:i}),e[o]=r),r}(n,i);return r.formatToParts(o)},u=function(e,n){for(var i=a(e,n),r=[],u=0;u<i.length;u+=1){var f=i[u],s=f.type,m=f.value,c=t[s];c>=0&&(r[c]=parseInt(m,10))}var d=r[3],l=24===d?0:d,h=r[0]+"-"+r[1]+"-"+r[2]+" "+l+":"+r[4]+":"+r[5]+":000",v=+e;return(o.utc(h).valueOf()-(v-=v%1e3))/6e4},f=i.prototype;f.tz=function(t,e){void 0===t&&(t=r);var n,i=this.utcOffset(),a=this.toDate(),u=a.toLocaleString("en-US",{timeZone:t}),f=Math.round((a-new Date(u))/1e3/60),s=15*-Math.round(a.getTimezoneOffset()/15)-f;if(!Number(s))n=this.utcOffset(0,e);else if(n=o(u,{locale:this.$L}).$set("millisecond",this.$ms).utcOffset(s,!0),e){var m=n.utcOffset();n=n.add(i-m,"minute")}return n.$x.$timezone=t,n},f.offsetName=function(t){var e=this.$x.$timezone||o.tz.guess(),n=a(this.valueOf(),e,{timeZoneName:t}).find((function(t){return"timezonename"===t.type.toLowerCase()}));return n&&n.value};var s=f.startOf;f.startOf=function(t,e){if(!this.$x||!this.$x.$timezone)return s.call(this,t,e);var n=o(this.format("YYYY-MM-DD HH:mm:ss:SSS"),{locale:this.$L});return s.call(n,t,e).tz(this.$x.$timezone,!0)},o.tz=function(t,e,n){var i=n&&e,a=n||e||r,f=u(+o(),a);if("string"!=typeof t)return o(t).tz(a);var s=function(t,e,n){var i=t-60*e*1e3,o=u(i,n);if(e===o)return[i,e];var r=u(i-=60*(o-e)*1e3,n);return o===r?[i,o]:[t-60*Math.min(o,r)*1e3,Math.max(o,r)]}(o.utc(t,i).valueOf(),f,a),m=s[0],c=s[1],d=o(m).utcOffset(c);return d.$x.$timezone=a,d},o.tz.guess=function(){return Intl.DateTimeFormat().resolvedOptions().timeZone},o.tz.setDefault=function(t){r=t}}}));
@@ -0,0 +1 @@
module.exports={A:{A:{"2":"K D E F A B wC"},B:{"2":"C L M G N O P Q H R S T U V W X Y Z","132":"0 1 2 3 4 5 a b c d e f g h i j k l m n o p q r s t u v w x y z GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB I"},C:{"2":"6 7 8 9 xC TC J ZB K D E F A B C L M G N O P aB AB BB CB DB EB FB bB cB dB 0C 1C","132":"0 1 2 3 4 5 eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB wB xB yB zB 0B 1B 2B 3B UC 4B VC 5B 6B 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC Q H R WC S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB I XC MC YC yC zC"},D:{"2":"6 7 8 9 J ZB K D E F A B C L M G N O P aB AB BB CB DB EB FB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB wB xB yB zB 0B 1B 2B 3B UC 4B VC 5B 6B 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC Q H R S T U V W X Y Z","132":"0 1 2 3 4 5 a b c d e f g h i j k l m n o p q r s t u v w x y z GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB I XC MC YC"},E:{"2":"J ZB K D E F A B C L M G 2C ZC 3C 4C 5C 6C aC NC OC 7C 8C 9C bC cC PC AD QC dC eC fC gC hC BD","4":"RC iC jC kC lC mC CD SC nC oC pC qC rC sC tC DD ED"},F:{"2":"6 7 8 9 F B C G N O P aB AB BB CB DB EB FB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB wB xB yB zB 0B 1B 2B 3B 4B 5B 6B 7B 8B 9B AC BC CC DC EC FC GC HC IC JC FD GD HD ID NC uC JD OC","132":"0 1 2 3 4 5 KC LC Q H R WC S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z"},G:{"2":"E ZC KD vC LD MD ND OD PD QD RD SD TD UD VD WD XD YD ZD aD bD cD dD bC cC PC eD QC dC eC fC gC hC fD","4":"RC iC jC kC lC mC gD SC nC oC pC qC rC sC tC"},H:{"2":"hD"},I:{"2":"TC J iD jD kD lD vC mD nD","132":"I"},J:{"2":"D A"},K:{"2":"A B C NC uC OC","132":"H"},L:{"132":"I"},M:{"132":"MC"},N:{"2":"A B"},O:{"1":"PC"},P:{"2":"J oD pD qD rD sD aC tD uD vD wD xD","132":"6 7 8 9 AB BB CB DB EB FB QC RC SC yD"},Q:{"2":"zD"},R:{"132":"0D"},S:{"132":"1D 2D"}},B:4,C:"CSS Counter Styles",D:true};
@@ -0,0 +1,110 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.convertPatternGroupToTask = exports.convertPatternGroupsToTasks = exports.groupPatternsByBaseDirectory = exports.getNegativePatternsAsPositive = exports.getPositivePatterns = exports.convertPatternsToTasks = exports.generate = void 0;
const utils = require("../utils");
function generate(input, settings) {
const patterns = processPatterns(input, settings);
const ignore = processPatterns(settings.ignore, settings);
const positivePatterns = getPositivePatterns(patterns);
const negativePatterns = getNegativePatternsAsPositive(patterns, ignore);
const staticPatterns = positivePatterns.filter((pattern) => utils.pattern.isStaticPattern(pattern, settings));
const dynamicPatterns = positivePatterns.filter((pattern) => utils.pattern.isDynamicPattern(pattern, settings));
const staticTasks = convertPatternsToTasks(staticPatterns, negativePatterns, /* dynamic */ false);
const dynamicTasks = convertPatternsToTasks(dynamicPatterns, negativePatterns, /* dynamic */ true);
return staticTasks.concat(dynamicTasks);
}
exports.generate = generate;
function processPatterns(input, settings) {
let patterns = input;
/**
* The original pattern like `{,*,**,a/*}` can lead to problems checking the depth when matching entry
* and some problems with the micromatch package (see fast-glob issues: #365, #394).
*
* To solve this problem, we expand all patterns containing brace expansion. This can lead to a slight slowdown
* in matching in the case of a large set of patterns after expansion.
*/
if (settings.braceExpansion) {
patterns = utils.pattern.expandPatternsWithBraceExpansion(patterns);
}
/**
* If the `baseNameMatch` option is enabled, we must add globstar to patterns, so that they can be used
* at any nesting level.
*
* We do this here, because otherwise we have to complicate the filtering logic. For example, we need to change
* the pattern in the filter before creating a regular expression. There is no need to change the patterns
* in the application. Only on the input.
*/
if (settings.baseNameMatch) {
patterns = patterns.map((pattern) => pattern.includes('/') ? pattern : `**/${pattern}`);
}
/**
* This method also removes duplicate slashes that may have been in the pattern or formed as a result of expansion.
*/
return patterns.map((pattern) => utils.pattern.removeDuplicateSlashes(pattern));
}
/**
* Returns tasks grouped by basic pattern directories.
*
* Patterns that can be found inside (`./`) and outside (`../`) the current directory are handled separately.
* This is necessary because directory traversal starts at the base directory and goes deeper.
*/
function convertPatternsToTasks(positive, negative, dynamic) {
const tasks = [];
const patternsOutsideCurrentDirectory = utils.pattern.getPatternsOutsideCurrentDirectory(positive);
const patternsInsideCurrentDirectory = utils.pattern.getPatternsInsideCurrentDirectory(positive);
const outsideCurrentDirectoryGroup = groupPatternsByBaseDirectory(patternsOutsideCurrentDirectory);
const insideCurrentDirectoryGroup = groupPatternsByBaseDirectory(patternsInsideCurrentDirectory);
tasks.push(...convertPatternGroupsToTasks(outsideCurrentDirectoryGroup, negative, dynamic));
/*
* For the sake of reducing future accesses to the file system, we merge all tasks within the current directory
* into a global task, if at least one pattern refers to the root (`.`). In this case, the global task covers the rest.
*/
if ('.' in insideCurrentDirectoryGroup) {
tasks.push(convertPatternGroupToTask('.', patternsInsideCurrentDirectory, negative, dynamic));
}
else {
tasks.push(...convertPatternGroupsToTasks(insideCurrentDirectoryGroup, negative, dynamic));
}
return tasks;
}
exports.convertPatternsToTasks = convertPatternsToTasks;
function getPositivePatterns(patterns) {
return utils.pattern.getPositivePatterns(patterns);
}
exports.getPositivePatterns = getPositivePatterns;
function getNegativePatternsAsPositive(patterns, ignore) {
const negative = utils.pattern.getNegativePatterns(patterns).concat(ignore);
const positive = negative.map(utils.pattern.convertToPositivePattern);
return positive;
}
exports.getNegativePatternsAsPositive = getNegativePatternsAsPositive;
function groupPatternsByBaseDirectory(patterns) {
const group = {};
return patterns.reduce((collection, pattern) => {
const base = utils.pattern.getBaseDirectory(pattern);
if (base in collection) {
collection[base].push(pattern);
}
else {
collection[base] = [pattern];
}
return collection;
}, group);
}
exports.groupPatternsByBaseDirectory = groupPatternsByBaseDirectory;
function convertPatternGroupsToTasks(positive, negative, dynamic) {
return Object.keys(positive).map((base) => {
return convertPatternGroupToTask(base, positive[base], negative, dynamic);
});
}
exports.convertPatternGroupsToTasks = convertPatternGroupsToTasks;
function convertPatternGroupToTask(base, positive, negative, dynamic) {
return {
dynamic,
positive,
negative,
base,
patterns: [].concat(positive, negative.map(utils.pattern.convertToNegativePattern))
};
}
exports.convertPatternGroupToTask = convertPatternGroupToTask;
@@ -0,0 +1,8 @@
import type { TSESTree } from '@typescript-eslint/types';
import type { ScopeManager } from '../ScopeManager';
import type { Scope } from './Scope';
import { ScopeBase } from './ScopeBase';
import { ScopeType } from './ScopeType';
export declare class ModuleScope extends ScopeBase<ScopeType.module, TSESTree.Program, Scope> {
constructor(scopeManager: ScopeManager, upperScope: ModuleScope['upper'], block: ModuleScope['block']);
}
@@ -0,0 +1 @@
module.exports={A:{A:{"2":"K D E F A wC","2052":"B"},B:{"1":"0 1 2 3 4 5 C L M G N O P Q H R S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB I"},C:{"1":"0 1 2 3 4 5 hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB wB xB yB zB 0B 1B 2B 3B UC 4B VC 5B 6B 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC Q H R WC S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB I XC MC YC yC zC","132":"xC TC J ZB K D E F A B C 0C 1C","260":"6 7 8 9 L M G N O P aB AB BB CB DB EB FB bB cB dB eB fB gB"},D:{"1":"0 1 2 3 4 5 uB vB wB xB yB zB 0B 1B 2B 3B UC 4B VC 5B 6B 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC Q H R S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB I XC MC YC","260":"6 J ZB K D E F A B C L M G N O P aB","772":"7 8 9 AB BB CB DB EB FB bB cB dB eB fB gB hB iB jB kB lB","1028":"mB nB oB pB qB rB sB tB"},E:{"1":"B C L M G NC OC 7C 8C 9C bC cC PC AD QC dC eC fC gC hC BD RC iC jC kC lC mC CD SC nC oC pC qC rC sC tC DD ED","260":"J ZB A 2C ZC aC","772":"K D E F 3C 4C 5C 6C"},F:{"1":"0 1 2 3 4 5 hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB wB xB yB zB 0B 1B 2B 3B 4B 5B 6B 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC Q H R WC S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z","2":"F FD","132":"B GD HD ID NC uC","644":"C JD OC","772":"6 7 8 9 G N O P aB AB BB CB DB","1028":"EB FB bB cB dB eB fB gB"},G:{"1":"TD UD VD WD XD YD ZD aD bD cD dD bC cC PC eD QC dC eC fC gC hC fD RC iC jC kC lC mC gD SC nC oC pC qC rC sC tC","260":"ZC KD vC RD SD","772":"E LD MD ND OD PD QD"},H:{"644":"hD"},I:{"1":"I","16":"iD jD","260":"kD","772":"TC J lD vC mD nD"},J:{"772":"D A"},K:{"1":"H","132":"A B NC uC","644":"C OC"},L:{"1":"I"},M:{"1":"MC"},N:{"1":"B","2":"A"},O:{"1":"PC"},P:{"1":"6 7 8 9 AB BB CB DB EB FB oD pD qD rD sD aC tD uD vD wD xD QC RC SC yD","1028":"J"},Q:{"1":"zD"},R:{"1":"0D"},S:{"1":"1D 2D"}},B:6,C:"const",D:true};
@@ -0,0 +1,25 @@
{
"name": "@types/deep-eql",
"version": "4.0.2",
"description": "TypeScript definitions for deep-eql",
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/deep-eql",
"license": "MIT",
"contributors": [
{
"name": "Rodrigo Pietnechuk",
"githubUsername": "ghnoob",
"url": "https://github.com/ghnoob"
}
],
"main": "",
"types": "index.d.ts",
"repository": {
"type": "git",
"url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git",
"directory": "types/deep-eql"
},
"scripts": {},
"dependencies": {},
"typesPublisherContentHash": "3b8981ce557947fc00ca08cbd93b4206bfc0943360956867381a0a3f6b1eabf5",
"typeScriptVersion": "4.5"
}
@@ -0,0 +1,24 @@
# @heroui/spacer
Spacer is a component used to add space between components.
Please refer to the [documentation](https://heroui.com/docs/components/spacer) for more information.
## Installation
```sh
yarn add @heroui/spacer
# or
npm i @heroui/spacer
```
## Contribution
Yes please! See the
[contributing guidelines](https://github.com/heroui-inc/heroui/blob/master/CONTRIBUTING.md)
for details.
## License
This project is licensed under the terms of the
[MIT license](https://github.com/heroui-inc/heroui/blob/master/LICENSE).
@@ -0,0 +1 @@
{"version":3,"file":"getDirtyFields.d.ts","sourceRoot":"","sources":["../../src/logic/getDirtyFields.ts"],"names":[],"mappings":"AAWA,iBAAS,eAAe,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,GAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAM,uBAWpE;AAED,MAAM,CAAC,OAAO,UAAU,cAAc,CAAC,CAAC,EACtC,IAAI,EAAE,CAAC,EACP,UAAU,EAAE,CAAC,EACb,qBAAqB,CAAC,EAAE,MAAM,CAC5B,OAAO,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC,EACxB,UAAU,CAAC,OAAO,eAAe,CAAC,GAAG,OAAO,CAC7C,mEA0BF"}
@@ -0,0 +1,41 @@
'use strict';
/**
* Tracks newlines during parsing in order to provide an efficient API for
* determining the one-indexed `{ line, col }` position for any offset
* within the input.
*/
class LineCounter {
constructor() {
this.lineStarts = [];
/**
* Should be called in ascending order. Otherwise, call
* `lineCounter.lineStarts.sort()` before calling `linePos()`.
*/
this.addNewLine = (offset) => this.lineStarts.push(offset);
/**
* Performs a binary search and returns the 1-indexed { line, col }
* position of `offset`. If `line === 0`, `addNewLine` has never been
* called or `offset` is before the first known newline.
*/
this.linePos = (offset) => {
let low = 0;
let high = this.lineStarts.length;
while (low < high) {
const mid = (low + high) >> 1; // Math.floor((low + high) / 2)
if (this.lineStarts[mid] < offset)
low = mid + 1;
else
high = mid;
}
if (this.lineStarts[low] === offset)
return { line: low + 1, col: 1 };
if (low === 0)
return { line: 0, col: offset };
const start = this.lineStarts[low - 1];
return { line: low, col: offset - start + 1 };
};
}
}
exports.LineCounter = LineCounter;
@@ -0,0 +1,4 @@
/** @type {Construct} */
export const blockQuote: Construct;
import type { Construct } from 'micromark-util-types';
//# sourceMappingURL=block-quote.d.ts.map
@@ -0,0 +1,81 @@
var $kg1kr$react = require("react");
function $parcel$interopDefault(a) {
return a && a.__esModule ? a.default : a;
}
function $parcel$export(e, n, v, s) {
Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
}
$parcel$export(module.exports, "PackageLocalizationProvider", () => $417d44b6975b2ee7$export$9ec1fc026a5460ba);
$parcel$export(module.exports, "getPackageLocalizationScript", () => $417d44b6975b2ee7$export$fe9518edbbdc73da);
/*
* Copyright 2023 Adobe. All rights reserved.
* This file is licensed to you 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
*
* 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 REPRESENTATIONS
* OF ANY KIND, either express or implied. See the License for the specific language
* governing permissions and limitations under the License.
*/
function $417d44b6975b2ee7$export$9ec1fc026a5460ba(props) {
if (typeof document !== 'undefined') {
console.log('PackageLocalizationProvider should only be rendered on the server.');
return null;
}
let { nonce: nonce, locale: locale, strings: strings } = props;
// suppressHydrationWarning is necessary because the browser
// remove the nonce parameter from the DOM before hydration
return /*#__PURE__*/ (0, ($parcel$interopDefault($kg1kr$react))).createElement("script", {
nonce: typeof window === 'undefined' ? nonce : '',
suppressHydrationWarning: true,
dangerouslySetInnerHTML: {
__html: $417d44b6975b2ee7$export$fe9518edbbdc73da(locale, strings)
}
});
}
function $417d44b6975b2ee7$export$fe9518edbbdc73da(locale, strings) {
return `window[Symbol.for('react-aria.i18n.locale')]=${JSON.stringify(locale)};{${$417d44b6975b2ee7$var$serialize(strings)}}`;
}
const $417d44b6975b2ee7$var$cache = new WeakMap();
function $417d44b6975b2ee7$var$serialize(strings) {
let cached = $417d44b6975b2ee7$var$cache.get(strings);
if (cached) return cached;
// Find common strings between packages and hoist them into variables.
let seen = new Set();
let common = new Map();
for(let pkg in strings)for(let key in strings[pkg]){
let v = strings[pkg][key];
let s = typeof v === 'string' ? JSON.stringify(v) : v.toString();
if (seen.has(s) && !common.has(s)) {
let name = String.fromCharCode(common.size > 25 ? common.size + 97 : common.size + 65);
common.set(s, name);
}
seen.add(s);
}
let res = '';
if (common.size > 0) res += 'let ';
for (let [string, name] of common)res += `${name}=${string},`;
if (common.size > 0) res = res.slice(0, -1) + ';';
res += "window[Symbol.for('react-aria.i18n.strings')]={";
for(let pkg in strings){
res += `'${pkg}':{`;
for(let key in strings[pkg]){
let v = strings[pkg][key];
let s = typeof v === 'string' ? JSON.stringify(v) : v.toString();
if (common.has(s)) s = common.get(s);
res += `${/[ ()]/.test(key) ? JSON.stringify(key) : key}:${s},`;
}
res = res.slice(0, -1) + '},';
}
res = res.slice(0, -1) + '};';
$417d44b6975b2ee7$var$cache.set(strings, res);
return res;
}
//# sourceMappingURL=index.js.map
@@ -0,0 +1,78 @@
import { AsnArray } from "@peculiar/asn1-schema";
/**
* ```asn1
* AttributeType ::= OBJECT IDENTIFIER
* ```
*/
export type AttributeType = string;
/**
* ```asn1
* DirectoryString ::= CHOICE {
* teletexString TeletexString (SIZE (1..MAX)),
* printableString PrintableString (SIZE (1..MAX)),
* universalString UniversalString (SIZE (1..MAX)),
* utf8String UTF8String (SIZE (1..MAX)),
* bmpString BMPString (SIZE (1..MAX)) }
* ```
*/
export declare class DirectoryString {
teletexString?: string;
printableString?: string;
universalString?: string;
utf8String?: string;
bmpString?: string;
constructor(params?: Partial<DirectoryString>);
/**
* Returns a string representation of an object.
*/
toString(): string;
}
/**
* ```asn1
* AttributeValue ::= ANY -- DEFINED BY AttributeType
* in general it will be a DirectoryString
* ```
*/
export declare class AttributeValue extends DirectoryString {
ia5String?: string;
anyValue?: ArrayBuffer;
constructor(params?: Partial<AttributeValue>);
toString(): string;
}
/**
* ```asn1
* AttributeTypeAndValue ::= SEQUENCE {
* type AttributeType,
* value AttributeValue }
* ```
*/
export declare class AttributeTypeAndValue {
type: string;
value: AttributeValue;
constructor(params?: Partial<AttributeTypeAndValue>);
}
/**
* ```asn1
* RelativeDistinguishedName ::= SET SIZE (1..MAX) OF AttributeTypeAndValue
* ```
*/
export declare class RelativeDistinguishedName extends AsnArray<AttributeTypeAndValue> {
constructor(items?: AttributeTypeAndValue[]);
}
/**
* ```asn1
* RDNSequence ::= SEQUENCE OF RelativeDistinguishedName
* ```
*/
export declare class RDNSequence extends AsnArray<RelativeDistinguishedName> {
constructor(items?: RelativeDistinguishedName[]);
}
/**
* ```asn1
* Name ::= CHOICE { -- only one possibility for now --
* rdnSequence RDNSequence }
* ```
*/
export declare class Name extends RDNSequence {
constructor(items?: RelativeDistinguishedName[]);
}
@@ -0,0 +1,229 @@
# micromark-factory-title
[![Build][build-badge]][build]
[![Coverage][coverage-badge]][coverage]
[![Downloads][downloads-badge]][downloads]
[![Size][bundle-size-badge]][bundle-size]
[![Sponsors][sponsors-badge]][opencollective]
[![Backers][backers-badge]][opencollective]
[![Chat][chat-badge]][chat]
[micromark][] factory to parse markdown titles (found in resources,
definitions).
## Contents
* [What is this?](#what-is-this)
* [When should I use this?](#when-should-i-use-this)
* [Install](#install)
* [Use](#use)
* [API](#api)
* [`factoryTitle(…)`](#factorytitle)
* [Types](#types)
* [Compatibility](#compatibility)
* [Security](#security)
* [Contribute](#contribute)
* [License](#license)
## What is this?
This package exposes states to parse titles.
## When should I use this?
This package is useful when you are making your own micromark extensions.
## Install
This package is [ESM only][esm].
In Node.js (version 16+), install with [npm][]:
```sh
npm install micromark-factory-title
```
In Deno with [`esm.sh`][esmsh]:
```js
import {factorySpace} from 'https://esm.sh/micromark-factory-title@1'
```
In browsers with [`esm.sh`][esmsh]:
```html
<script type="module">
import {factorySpace} from 'https://esm.sh/micromark-factory-title@1?bundle'
</script>
```
## Use
```js
import {factoryTitle} from 'micromark-factory-title'
import {codes, types} from 'micromark-util-symbol'
// A micromark tokenizer that uses the factory:
/**
* @this {TokenizeContext}
* Context.
* @type {Tokenizer}
*/
function tokenizeDefinition(effects, ok, nok) {
return start
// …
/** @type {State} */
function before(code) {
if (
code === codes.quotationMark ||
code === codes.apostrophe ||
code === codes.leftParenthesis
) {
return factoryTitle(
effects,
factorySpace(effects, after, types.whitespace),
nok,
types.definitionTitle,
types.definitionTitleMarker,
types.definitionTitleString
)(code)
}
return nok(code)
}
// …
}
```
## API
This module exports the identifier [`factoryTitle`][api-factory-title].
There is no default export.
### `factoryTitle(…)`
Parse titles.
###### Examples
```markdown
"a"
'b'
(c)
"a
b"
'a
b'
(a\)b)
```
###### Parameters
* `effects` (`Effects`)
— context
* `ok` (`State`)
— state switched to when successful
* `nok` (`State`)
— state switched to when unsuccessful
* `type` (`string`)
— type of the whole title (`"a"`, `'b'`, `(c)`)
* `markerType` (`string`)
— type for the markers (`"`, `'`, `(`, and `)`)
* `stringType` (`string`)
— type for the value (`a`)
###### Returns
Start state (`State`).
## Types
This package is fully typed with [TypeScript][].
It exports no additional types.
## Compatibility
Projects maintained by the unified collective are compatible with maintained
versions of Node.js.
When we cut a new major release, we drop support for unmaintained versions of
Node.
This means we try to keep the current release line,
`micromark-factory-title@2`, compatible with Node.js 16.
This package works with `micromark@3`.
## Security
This package is safe.
See [`security.md`][securitymd] in [`micromark/.github`][health] for how to
submit a security report.
## Contribute
See [`contributing.md`][contributing] in [`micromark/.github`][health] for ways
to get started.
See [`support.md`][support] for ways to get help.
This project has a [code of conduct][coc].
By interacting with this repository, organisation, or community you agree to
abide by its terms.
## License
[MIT][license] © [Titus Wormer][author]
<!-- Definitions -->
[build-badge]: https://github.com/micromark/micromark/workflows/main/badge.svg
[build]: https://github.com/micromark/micromark/actions
[coverage-badge]: https://img.shields.io/codecov/c/github/micromark/micromark.svg
[coverage]: https://codecov.io/github/micromark/micromark
[downloads-badge]: https://img.shields.io/npm/dm/micromark-factory-title.svg
[downloads]: https://www.npmjs.com/package/micromark-factory-title
[bundle-size-badge]: https://img.shields.io/badge/dynamic/json?label=minzipped%20size&query=$.size.compressedSize&url=https://deno.bundlejs.com/?q=micromark-factory-title
[bundle-size]: https://bundlejs.com/?q=micromark-factory-title
[sponsors-badge]: https://opencollective.com/unified/sponsors/badge.svg
[backers-badge]: https://opencollective.com/unified/backers/badge.svg
[opencollective]: https://opencollective.com/unified
[npm]: https://docs.npmjs.com/cli/install
[esm]: https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c
[esmsh]: https://esm.sh
[chat-badge]: https://img.shields.io/badge/chat-discussions-success.svg
[chat]: https://github.com/micromark/micromark/discussions
[license]: https://github.com/micromark/micromark/blob/main/license
[author]: https://wooorm.com
[health]: https://github.com/micromark/.github
[securitymd]: https://github.com/micromark/.github/blob/main/security.md
[contributing]: https://github.com/micromark/.github/blob/main/contributing.md
[support]: https://github.com/micromark/.github/blob/main/support.md
[coc]: https://github.com/micromark/.github/blob/main/code-of-conduct.md
[typescript]: https://www.typescriptlang.org
[micromark]: https://github.com/micromark/micromark
[api-factory-title]: #factorytitle
@@ -0,0 +1,14 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.FlatESLint = void 0;
/* eslint-disable @typescript-eslint/no-namespace */
const use_at_your_own_risk_1 = require("eslint/use-at-your-own-risk");
/**
* The ESLint class is the primary class to use in Node.js applications.
* This class depends on the Node.js fs module and the file system, so you cannot use it in browsers.
*
* If you want to lint code on browsers, use the Linter class instead.
*/
class FlatESLint extends use_at_your_own_risk_1.FlatESLint {
}
exports.FlatESLint = FlatESLint;
@@ -0,0 +1,2 @@
var _ = require('./lodash.min').runInContext();
module.exports = require('./fp/_baseConvert')(_, _);
@@ -0,0 +1 @@
{"name":"@codemirror/language","version":"6.12.1","requiresBuild":false,"files":{"LICENSE":{"checkedAt":1794532103589,"integrity":"sha512-93AnA94LXftw4iulmPgONmsxHTOmEXXVnuDgrubQugXHDb6+kqBYV3LU04W4nfNUBsUNOpHH1CYTncof2riVDg==","mode":420,"size":1118},"dist/index.cjs":{"checkedAt":1794532103589,"integrity":"sha512-BVy5rMslAgko4mvy27YV9ysCQLKwmMNPbAmc6xPvzFSTfixhL5MiHSxTuQ+9ynzcp2HBvVqjMCfp60EJeYqRFg==","mode":420,"size":103010},"dist/index.d.cts":{"checkedAt":1794532103589,"integrity":"sha512-1uv/BR53p+A0KTDBc+Zh5PSwpOeX4mQQl5d7b7ormxKprM83B/A3e9Jg/HUCBNrt7qamFdwnF1q2sF9Hn5B2Zg==","mode":420,"size":43918},"dist/index.js":{"checkedAt":1794532103590,"integrity":"sha512-dOx8Ic6fnwX0d4zOT5pD+ns7infI5AawhVxAcaED8cmZ2Uu3z6YeVtOAgw4PvulH9LxG0pAgq16QzxSgBNkX+w==","mode":420,"size":101528},"package.json":{"checkedAt":1794532103590,"integrity":"sha512-Dm6PLiPrWVzbSgmPDJ43t95OkBstzOHbpMMOwUwV5j3f6bwkbe6Ej4AAZ3D7S903usgzk/QpKv5aLTwnBNNBvg==","mode":420,"size":1063},"CHANGELOG.md":{"checkedAt":1794532103590,"integrity":"sha512-6019fmxsZQ7ApkKwWgWd7VI2eQOdLaCmoYeD1/eGUd0747y2orXTd+qB9hPzsSSPuDqplcrt7CsBUoDD+W5E4w==","mode":420,"size":11512},"README.md":{"checkedAt":1794532103590,"integrity":"sha512-orcYmrg2Rc3uK8fSivRXp8ZJ0Vxg1dl1z6/iHcfGZvHLqasadSlN1rOgV60TOOQR3KGA0a5wiN0yrmDjRXV3Gg==","mode":420,"size":2189},"dist/index.d.ts":{"checkedAt":1794532103589,"integrity":"sha512-1uv/BR53p+A0KTDBc+Zh5PSwpOeX4mQQl5d7b7ormxKprM83B/A3e9Jg/HUCBNrt7qamFdwnF1q2sF9Hn5B2Zg==","mode":420,"size":43918},".github/workflows/dispatch.yml":{"checkedAt":1794532103590,"integrity":"sha512-m1oo9FDcj8HyBMn9j8PAdgJGReOxejwknSt0WhQByhphBMTHHlS1n9+UPCgcv631fi+EwCNIv0+z6VZAl52zag==","mode":420,"size":415}}}
@@ -0,0 +1,70 @@
// --------------------------------------------------------------------------
// PropertyKey
// --------------------------------------------------------------------------
/** Returns true if this value has this property key */
export function HasPropertyKey(value, key) {
return key in value;
}
// --------------------------------------------------------------------------
// Object Instances
// --------------------------------------------------------------------------
/** Returns true if this value is an async iterator */
export function IsAsyncIterator(value) {
return IsObject(value) && !IsArray(value) && !IsUint8Array(value) && Symbol.asyncIterator in value;
}
/** Returns true if this value is an array */
export function IsArray(value) {
return Array.isArray(value);
}
/** Returns true if this value is bigint */
export function IsBigInt(value) {
return typeof value === 'bigint';
}
/** Returns true if this value is a boolean */
export function IsBoolean(value) {
return typeof value === 'boolean';
}
/** Returns true if this value is a Date object */
export function IsDate(value) {
return value instanceof globalThis.Date;
}
/** Returns true if this value is a function */
export function IsFunction(value) {
return typeof value === 'function';
}
/** Returns true if this value is an iterator */
export function IsIterator(value) {
return IsObject(value) && !IsArray(value) && !IsUint8Array(value) && Symbol.iterator in value;
}
/** Returns true if this value is null */
export function IsNull(value) {
return value === null;
}
/** Returns true if this value is number */
export function IsNumber(value) {
return typeof value === 'number';
}
/** Returns true if this value is an object */
export function IsObject(value) {
return typeof value === 'object' && value !== null;
}
/** Returns true if this value is RegExp */
export function IsRegExp(value) {
return value instanceof globalThis.RegExp;
}
/** Returns true if this value is string */
export function IsString(value) {
return typeof value === 'string';
}
/** Returns true if this value is symbol */
export function IsSymbol(value) {
return typeof value === 'symbol';
}
/** Returns true if this value is a Uint8Array */
export function IsUint8Array(value) {
return value instanceof globalThis.Uint8Array;
}
/** Returns true if this value is undefined */
export function IsUndefined(value) {
return value === undefined;
}
@@ -0,0 +1,37 @@
# jsx-a11y/no-aria-hidden-on-focusable
<!-- end auto-generated rule header -->
Enforce that `aria-hidden="true"` is not set on focusable elements.
`aria-hidden="true"` can be used to hide purely decorative content from screen reader users. An element with `aria-hidden="true"` that can also be reached by keyboard can lead to confusion or unexpected behavior for screen reader users. Avoid using `aria-hidden="true"` on focusable elements.
## Rule details
### Succeed
```jsx
<div aria-hidden="true" />
<img aria-hidden="true" />
<a aria-hidden="false" href="#" />
<button aria-hidden="true" tabIndex="-1" /> // `tabIndex=-1` removes the element from sequential focus navigation so we don't flag it.
<a href="/" />
<div aria-hidden="true"><a href="#"></a></div> // This is also bad but will not be handled by this rule.
```
### Fail
```jsx
<div aria-hidden="true" tabIndex="0" />
<input aria-hidden="true" />
<a href="/" aria-hidden="true" />
<button aria-hidden="true" />
<textarea aria-hidden="true" />
```
## Accessibility guidelines
General best practice (reference resources)
### Resources
- [aria-hidden elements do not contain focusable elements](https://dequeuniversity.com/rules/axe/html/4.4/aria-hidden-focus)
- [Element with aria-hidden has no content in sequential focus navigation](https://www.w3.org/WAI/standards-guidelines/act/rules/6cfa84/proposed/)
- [MDN aria-hidden](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-hidden)
@@ -0,0 +1,151 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = _default;
var _t = require("@babel/types");
var _util = require("./util.js");
const {
BOOLEAN_NUMBER_BINARY_OPERATORS,
createTypeAnnotationBasedOnTypeof,
numberTypeAnnotation,
voidTypeAnnotation
} = _t;
function _default(node) {
if (!this.isReferenced()) return;
const binding = this.scope.getBinding(node.name);
if (binding) {
if (binding.identifier.typeAnnotation) {
return binding.identifier.typeAnnotation;
} else {
return getTypeAnnotationBindingConstantViolations(binding, this, node.name);
}
}
if (node.name === "undefined") {
return voidTypeAnnotation();
} else if (node.name === "NaN" || node.name === "Infinity") {
return numberTypeAnnotation();
} else if (node.name === "arguments") {}
}
function getTypeAnnotationBindingConstantViolations(binding, path, name) {
const types = [];
const functionConstantViolations = [];
let constantViolations = getConstantViolationsBefore(binding, path, functionConstantViolations);
const testType = getConditionalAnnotation(binding, path, name);
if (testType) {
const testConstantViolations = getConstantViolationsBefore(binding, testType.ifStatement);
constantViolations = constantViolations.filter(path => !testConstantViolations.includes(path));
types.push(testType.typeAnnotation);
}
if (constantViolations.length) {
constantViolations.push(...functionConstantViolations);
for (const violation of constantViolations) {
types.push(violation.getTypeAnnotation());
}
}
if (!types.length) {
return;
}
return (0, _util.createUnionType)(types);
}
function getConstantViolationsBefore(binding, path, functions) {
const violations = binding.constantViolations.slice();
violations.unshift(binding.path);
return violations.filter(violation => {
violation = violation.resolve();
const status = violation._guessExecutionStatusRelativeTo(path);
if (functions && status === "unknown") functions.push(violation);
return status === "before";
});
}
function inferAnnotationFromBinaryExpression(name, path) {
const operator = path.node.operator;
const right = path.get("right").resolve();
const left = path.get("left").resolve();
let target;
if (left.isIdentifier({
name
})) {
target = right;
} else if (right.isIdentifier({
name
})) {
target = left;
}
if (target) {
if (operator === "===") {
return target.getTypeAnnotation();
}
if (BOOLEAN_NUMBER_BINARY_OPERATORS.includes(operator)) {
return numberTypeAnnotation();
}
return;
}
if (operator !== "===" && operator !== "==") return;
let typeofPath;
let typePath;
if (left.isUnaryExpression({
operator: "typeof"
})) {
typeofPath = left;
typePath = right;
} else if (right.isUnaryExpression({
operator: "typeof"
})) {
typeofPath = right;
typePath = left;
}
if (!typeofPath) return;
if (!typeofPath.get("argument").isIdentifier({
name
})) return;
typePath = typePath.resolve();
if (!typePath.isLiteral()) return;
const typeValue = typePath.node.value;
if (typeof typeValue !== "string") return;
return createTypeAnnotationBasedOnTypeof(typeValue);
}
function getParentConditionalPath(binding, path, name) {
let parentPath;
while (parentPath = path.parentPath) {
if (parentPath.isIfStatement() || parentPath.isConditionalExpression()) {
if (path.key === "test") {
return;
}
return parentPath;
}
if (parentPath.isFunction()) {
if (name == null || parentPath.parentPath.scope.getBinding(name) !== binding) return;
}
path = parentPath;
}
}
function getConditionalAnnotation(binding, path, name) {
const ifStatement = getParentConditionalPath(binding, path, name);
if (!ifStatement) return;
const test = ifStatement.get("test");
const paths = [test];
const types = [];
for (let i = 0; i < paths.length; i++) {
const path = paths[i];
if (path.isLogicalExpression()) {
if (path.node.operator === "&&") {
paths.push(path.get("left"));
paths.push(path.get("right"));
}
} else if (path.isBinaryExpression()) {
const type = inferAnnotationFromBinaryExpression(name, path);
if (type) types.push(type);
}
}
if (types.length) {
return {
typeAnnotation: (0, _util.createUnionType)(types),
ifStatement
};
}
return getConditionalAnnotation(binding, ifStatement, name);
}
//# sourceMappingURL=inferer-reference.js.map
Loaded 100 of 35554 files, more files were not shown because too many files have changed in this diff. Show more