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 @@
{"mappings":";;;;;;AAAA;;;;;;;;;;CAUC,GAQD,MAAM,qCAAe,OAAO,GAAG,CAAC;AAChC,MAAM,sCAAgB,OAAO,GAAG,CAAC;AACjC,IAAI,4CAAuG;AAMpG,MAAM;IAaX,6DAA6D,GAC7D,mBAAmB,GAAM,EAAE,MAAc,EAAK;QAC5C,IAAI,UAAU,IAAI,CAAC,mBAAmB,CAAC;QACvC,IAAI,SAAS,OAAO,CAAC,IAAI;QACzB,IAAI,CAAC,QACH,MAAM,IAAI,MAAM,CAAC,4BAA4B,EAAE,IAAI,IAAI,EAAE,OAAO,OAAO,CAAC;QAG1E,OAAO;IACT;IAEA,wDAAwD,GACxD,oBAAoB,MAAc,EAAgB;QAChD,IAAI,UAAU,IAAI,CAAC,OAAO,CAAC,OAAO;QAClC,IAAI,CAAC,SAAS;YACZ,UAAU,0CAAoB,QAAQ,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,aAAa;YACtE,IAAI,CAAC,OAAO,CAAC,OAAO,GAAG;QACzB;QAEA,OAAO;IACT;IAEA,OAAO,8BAA6F,WAAmB,EAA0C;QAC/J,IAAI,OAAO,WAAW,aACpB,OAAO;QAGT,IAAI,SAAS,MAAM,CAAC,mCAAa;QACjC,IAAI,8CAAwB,WAAW;YACrC,IAAI,gBAAgB,MAAM,CAAC,oCAAc;YACzC,IAAI,CAAC,eACH,OAAO;YAGT,4CAAsB,CAAC;YACvB,IAAK,IAAI,OAAO,cACd,yCAAmB,CAAC,IAAI,GAAG,IAAI,0CAA0B;gBAAC,CAAC,OAAO,EAAE,aAAa,CAAC,IAAI;YAAA,GAAG;QAE7F;QAEA,IAAI,aAAa,sDAAA,gEAAA,yCAAqB,CAAC,YAAY;QACnD,IAAI,CAAC,YACH,MAAM,IAAI,MAAM,CAAC,qBAAqB,EAAE,YAAY,oHAAoH,CAAC;QAG3K,OAAO;IACT;IAvDA,YAAY,QAAgC,EAAE,gBAAwB,OAAO,CAAE;QAC7E,yDAAyD;QACzD,uGAAuG;QACvG,IAAI,CAAC,OAAO,GAAG,OAAO,WAAW,CAC/B,OAAO,OAAO,CAAC,UAAU,MAAM,CAAC,CAAC,GAAG,EAAE,GAAK;QAE7C,IAAI,CAAC,aAAa,GAAG;IACvB;AAiDF;AAEA,SAAS,0CAAiE,MAAc,EAAE,OAA+B,EAAE,gBAAgB,OAAO;IAChJ,sCAAsC;IACtC,IAAI,OAAO,CAAC,OAAO,EACjB,OAAO,OAAO,CAAC,OAAO;IAGxB,iDAAiD;IACjD,2EAA2E;IAC3E,8CAA8C;IAC9C,uEAAuE;IACvE,sDAAsD;IACtD,IAAI,WAAW,kCAAY;IAC3B,IAAI,OAAO,CAAC,SAAS,EACnB,OAAO,OAAO,CAAC,SAAS;IAG1B,IAAK,IAAI,OAAO,QAAS;QACvB,IAAI,IAAI,UAAU,CAAC,WAAW,MAC5B,OAAO,OAAO,CAAC,IAAI;IAEvB;IAEA,8BAA8B;IAC9B,OAAO,OAAO,CAAC,cAAc;AAC/B;AAEA,SAAS,kCAAY,MAAc;IACjC,aAAa;IACb,IAAI,KAAK,MAAM,EACb,aAAa;IACb,OAAO,IAAI,KAAK,MAAM,CAAC,QAAQ,QAAQ;IAGzC,OAAO,OAAO,KAAK,CAAC,IAAI,CAAC,EAAE;AAC7B","sources":["packages/@internationalized/string/src/LocalizedStringDictionary.ts"],"sourcesContent":["/*\n * Copyright 2022 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 type {LocalizedString} from './LocalizedStringFormatter';\n\nexport type LocalizedStrings<K extends string, T extends LocalizedString> = {\n [lang: string]: Record<K, T>\n};\n\nconst localeSymbol = Symbol.for('react-aria.i18n.locale');\nconst stringsSymbol = Symbol.for('react-aria.i18n.strings');\nlet cachedGlobalStrings: {[packageName: string]: LocalizedStringDictionary<any, any>} | null | undefined = undefined;\n\n/**\n * Stores a mapping of localized strings. Can be used to find the\n * closest available string for a given locale.\n */\nexport class LocalizedStringDictionary<K extends string = string, T extends LocalizedString = string> {\n private strings: LocalizedStrings<K, T>;\n private defaultLocale: string;\n\n constructor(messages: LocalizedStrings<K, T>, defaultLocale: string = 'en-US') {\n // Clone messages so we don't modify the original object.\n // Filter out entries with falsy values which may have been caused by applying optimize-locales-plugin.\n this.strings = Object.fromEntries(\n Object.entries(messages).filter(([, v]) => v)\n );\n this.defaultLocale = defaultLocale;\n }\n\n /** Returns a localized string for the given key and locale. */\n getStringForLocale(key: K, locale: string): T {\n let strings = this.getStringsForLocale(locale);\n let string = strings[key];\n if (!string) {\n throw new Error(`Could not find intl message ${key} in ${locale} locale`);\n }\n\n return string;\n }\n\n /** Returns all localized strings for the given locale. */\n getStringsForLocale(locale: string): Record<K, T> {\n let strings = this.strings[locale];\n if (!strings) {\n strings = getStringsForLocale(locale, this.strings, this.defaultLocale);\n this.strings[locale] = strings;\n }\n\n return strings;\n }\n\n static getGlobalDictionaryForPackage<K extends string = string, T extends LocalizedString = string>(packageName: string): LocalizedStringDictionary<K, T> | null {\n if (typeof window === 'undefined') {\n return null;\n }\n\n let locale = window[localeSymbol];\n if (cachedGlobalStrings === undefined) {\n let globalStrings = window[stringsSymbol];\n if (!globalStrings) {\n return null;\n }\n\n cachedGlobalStrings = {};\n for (let pkg in globalStrings) {\n cachedGlobalStrings[pkg] = new LocalizedStringDictionary({[locale]: globalStrings[pkg]}, locale);\n }\n }\n\n let dictionary = cachedGlobalStrings?.[packageName];\n if (!dictionary) {\n Line truncated
@@ -0,0 +1 @@
{"mappings":";;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;AAQD,MAAM,8BAAQ,IAAI;AAClB,SAAS,0CAAoB,OAAyB;IACpD,IAAI,aAAa,4BAAM,GAAG,CAAC;IAC3B,IAAI,CAAC,YAAY;QACf,aAAa,IAAI,CAAA,GAAA,iDAAgB,EAAE;QACnC,4BAAM,GAAG,CAAC,SAAS;IACrB;IAEA,OAAO;AACT;AAQO,SAAS,0CAAoB,OAAyB;IAC3D,IAAI,UAAC,MAAM,EAAC,GAAG,CAAA,GAAA,mCAAQ;IACvB,IAAI,aAAa,CAAA,GAAA,oBAAM,EAAE,IAAM,0CAAoB,UAAU;QAAC;KAAQ;IACtE,IAAI,YAAY,CAAA,GAAA,oBAAM,EAAE,IAAM,IAAI,CAAA,GAAA,gDAAe,EAAE,QAAQ,aAAa;QAAC;QAAQ;KAAW;IAC5F,OAAO,CAAA,GAAA,wBAAU,EAAE,CAAC,KAAK,YAAc,UAAU,MAAM,CAAC,KAAK,YAAY;QAAC;KAAU;AACtF","sources":["packages/@react-aria/i18n/src/useMessageFormatter.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\nimport {LocalizedStrings, MessageDictionary, MessageFormatter} from '@internationalized/message';\nimport {useCallback, useMemo} from 'react';\nimport {useLocale} from './context';\n\nexport type FormatMessage = (key: string, variables?: {[key: string]: any}) => string;\n\nconst cache = new WeakMap();\nfunction getCachedDictionary(strings: LocalizedStrings) {\n let dictionary = cache.get(strings);\n if (!dictionary) {\n dictionary = new MessageDictionary(strings);\n cache.set(strings, dictionary);\n }\n\n return dictionary;\n}\n\n/**\n * Handles formatting ICU Message strings to create localized strings for the current locale.\n * Automatically updates when the locale changes, and handles caching of messages for performance.\n * @param strings - A mapping of languages to strings by key.\n * @deprecated - use useLocalizedStringFormatter instead.\n */\nexport function useMessageFormatter(strings: LocalizedStrings): FormatMessage {\n let {locale} = useLocale();\n let dictionary = useMemo(() => getCachedDictionary(strings), [strings]);\n let formatter = useMemo(() => new MessageFormatter(locale, dictionary), [locale, dictionary]);\n return useCallback((key, variables) => formatter.format(key, variables), [formatter]);\n}\n"],"names":[],"version":3,"file":"useMessageFormatter.main.js.map"}
@@ -0,0 +1,91 @@
# 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.1.0](https://github.com/inspect-js/has-symbols/compare/v1.0.3...v1.1.0) - 2024-12-02
### Commits
- [actions] update workflows [`548c0bf`](https://github.com/inspect-js/has-symbols/commit/548c0bf8c9b1235458df7a1c0490b0064647a282)
- [actions] further shard; update action deps [`bec56bb`](https://github.com/inspect-js/has-symbols/commit/bec56bb0fb44b43a786686b944875a3175cf3ff3)
- [meta] use `npmignore` to autogenerate an npmignore file [`ac81032`](https://github.com/inspect-js/has-symbols/commit/ac81032809157e0a079e5264e9ce9b6f1275777e)
- [New] add types [`6469cbf`](https://github.com/inspect-js/has-symbols/commit/6469cbff1866cfe367b2b3d181d9296ec14b2a3d)
- [actions] update rebase action to use reusable workflow [`9c9d4d0`](https://github.com/inspect-js/has-symbols/commit/9c9d4d0d8938e4b267acdf8e421f4e92d1716d72)
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `tape` [`adb5887`](https://github.com/inspect-js/has-symbols/commit/adb5887ca9444849b08beb5caaa9e1d42320cdfb)
- [Dev Deps] update `@ljharb/eslint-config`, `aud`, `tape` [`13ec198`](https://github.com/inspect-js/has-symbols/commit/13ec198ec80f1993a87710af1606a1970b22c7cb)
- [Dev Deps] update `auto-changelog`, `core-js`, `tape` [`941be52`](https://github.com/inspect-js/has-symbols/commit/941be5248387cab1da72509b22acf3fdb223f057)
- [Tests] replace `aud` with `npm audit` [`74f49e9`](https://github.com/inspect-js/has-symbols/commit/74f49e9a9d17a443020784234a1c53ce765b3559)
- [Dev Deps] update `npmignore` [`9c0ac04`](https://github.com/inspect-js/has-symbols/commit/9c0ac0452a834f4c2a4b54044f2d6a89f17e9a70)
- [Dev Deps] add missing peer dep [`52337a5`](https://github.com/inspect-js/has-symbols/commit/52337a5621cced61f846f2afdab7707a8132cc12)
## [v1.0.3](https://github.com/inspect-js/has-symbols/compare/v1.0.2...v1.0.3) - 2022-03-01
### Commits
- [actions] use `node/install` instead of `node/run`; use `codecov` action [`518b28f`](https://github.com/inspect-js/has-symbols/commit/518b28f6c5a516cbccae30794e40aa9f738b1693)
- [meta] add `bugs` and `homepage` fields; reorder package.json [`c480b13`](https://github.com/inspect-js/has-symbols/commit/c480b13fd6802b557e1cef9749872cb5fdeef744)
- [actions] reuse common workflows [`01d0ee0`](https://github.com/inspect-js/has-symbols/commit/01d0ee0a8d97c0947f5edb73eb722027a77b2b07)
- [actions] update codecov uploader [`6424ebe`](https://github.com/inspect-js/has-symbols/commit/6424ebe86b2c9c7c3d2e9bd4413a4e4f168cb275)
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `auto-changelog`, `tape` [`dfa7e7f`](https://github.com/inspect-js/has-symbols/commit/dfa7e7ff38b594645d8c8222aab895157fa7e282)
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `safe-publish-latest`, `tape` [`0c8d436`](https://github.com/inspect-js/has-symbols/commit/0c8d43685c45189cea9018191d4fd7eca91c9d02)
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `tape` [`9026554`](https://github.com/inspect-js/has-symbols/commit/902655442a1bf88e72b42345494ef0c60f5d36ab)
- [readme] add actions and codecov badges [`eaa9682`](https://github.com/inspect-js/has-symbols/commit/eaa9682f990f481d3acf7a1c7600bec36f7b3adc)
- [Dev Deps] update `eslint`, `tape` [`bc7a3ba`](https://github.com/inspect-js/has-symbols/commit/bc7a3ba46f27b7743f8a2579732d59d1b9ac791e)
- [Dev Deps] update `eslint`, `auto-changelog` [`0ace00a`](https://github.com/inspect-js/has-symbols/commit/0ace00af08a88cdd1e6ce0d60357d941c60c2d9f)
- [meta] use `prepublishOnly` script for npm 7+ [`093f72b`](https://github.com/inspect-js/has-symbols/commit/093f72bc2b0ed00c781f444922a5034257bf561d)
- [Tests] test on all 16 minors [`9b80d3d`](https://github.com/inspect-js/has-symbols/commit/9b80d3d9102529f04c20ec5b1fcc6e38426c6b03)
## [v1.0.2](https://github.com/inspect-js/has-symbols/compare/v1.0.1...v1.0.2) - 2021-02-27
### Fixed
- [Fix] use a universal way to get the original Symbol [`#11`](https://github.com/inspect-js/has-symbols/issues/11)
### Commits
- [Tests] migrate tests to Github Actions [`90ae798`](https://github.com/inspect-js/has-symbols/commit/90ae79820bdfe7bc703d67f5f3c5e205f98556d3)
- [meta] do not publish github action workflow files [`29e60a1`](https://github.com/inspect-js/has-symbols/commit/29e60a1b7c25c7f1acf7acff4a9320d0d10c49b4)
- [Tests] run `nyc` on all tests [`8476b91`](https://github.com/inspect-js/has-symbols/commit/8476b915650d360915abe2522505abf4b0e8f0ae)
- [readme] fix repo URLs, remove defunct badges [`126288e`](https://github.com/inspect-js/has-symbols/commit/126288ecc1797c0a40247a6b78bcb2e0bc5d7036)
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `auto-changelog`, `core-js`, `get-own-property-symbols` [`d84bdfa`](https://github.com/inspect-js/has-symbols/commit/d84bdfa48ac5188abbb4904b42614cd6c030940a)
- [Tests] fix linting errors [`0df3070`](https://github.com/inspect-js/has-symbols/commit/0df3070b981b6c9f2ee530c09189a7f5c6def839)
- [actions] add "Allow Edits" workflow [`1e6bc29`](https://github.com/inspect-js/has-symbols/commit/1e6bc29b188f32b9648657b07eda08504be5aa9c)
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `tape` [`36cea2a`](https://github.com/inspect-js/has-symbols/commit/36cea2addd4e6ec435f35a2656b4e9ef82498e9b)
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `tape` [`1278338`](https://github.com/inspect-js/has-symbols/commit/127833801865fbc2cc8979beb9ca869c7bfe8222)
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `tape` [`1493254`](https://github.com/inspect-js/has-symbols/commit/1493254eda13db5fb8fc5e4a3e8324b3d196029d)
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `core-js` [`b090bf2`](https://github.com/inspect-js/has-symbols/commit/b090bf214d3679a30edc1e2d729d466ab5183e1d)
- [actions] switch Automatic Rebase workflow to `pull_request_target` event [`4addb7a`](https://github.com/inspect-js/has-symbols/commit/4addb7ab4dc73f927ae99928d68817554fc21dc0)
- [Dev Deps] update `auto-changelog`, `tape` [`81d0baf`](https://github.com/inspect-js/has-symbols/commit/81d0baf3816096a89a8558e8043895f7a7d10d8b)
- [Dev Deps] update `auto-changelog`; add `aud` [`1a4e561`](https://github.com/inspect-js/has-symbols/commit/1a4e5612c25d91c3a03d509721d02630bc4fe3da)
- [readme] remove unused testling URLs [`3000941`](https://github.com/inspect-js/has-symbols/commit/3000941f958046e923ed8152edb1ef4a599e6fcc)
- [Tests] only audit prod deps [`692e974`](https://github.com/inspect-js/has-symbols/commit/692e9743c912410e9440207631a643a34b4741a1)
- [Dev Deps] update `@ljharb/eslint-config` [`51c946c`](https://github.com/inspect-js/has-symbols/commit/51c946c7f6baa793ec5390bb5a45cdce16b4ba76)
## [v1.0.1](https://github.com/inspect-js/has-symbols/compare/v1.0.0...v1.0.1) - 2019-11-16
### Commits
- [Tests] use shared travis-ci configs [`ce396c9`](https://github.com/inspect-js/has-symbols/commit/ce396c9419ff11c43d0da5d05cdbb79f7fb42229)
- [Tests] up to `node` `v12.4`, `v11.15`, `v10.15`, `v9.11`, `v8.15`, `v7.10`, `v6.17`, `v4.9`; use `nvm install-latest-npm` [`0690732`](https://github.com/inspect-js/has-symbols/commit/0690732801f47ab429f39ba1962f522d5c462d6b)
- [meta] add `auto-changelog` [`2163d0b`](https://github.com/inspect-js/has-symbols/commit/2163d0b7f36343076b8f947cd1667dd1750f26fc)
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `core-js`, `safe-publish-latest`, `tape` [`8e0951f`](https://github.com/inspect-js/has-symbols/commit/8e0951f1a7a2e52068222b7bb73511761e6e4d9c)
- [actions] add automatic rebasing / merge commit blocking [`b09cdb7`](https://github.com/inspect-js/has-symbols/commit/b09cdb7cd7ee39e7a769878f56e2d6066f5ccd1d)
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `safe-publish-latest`, `core-js`, `get-own-property-symbols`, `tape` [`1dd42cd`](https://github.com/inspect-js/has-symbols/commit/1dd42cd86183ed0c50f99b1062345c458babca91)
- [meta] create FUNDING.yml [`aa57a17`](https://github.com/inspect-js/has-symbols/commit/aa57a17b19708906d1927f821ea8e73394d84ca4)
- Only apps should have lockfiles [`a2d8bea`](https://github.com/inspect-js/has-symbols/commit/a2d8bea23a97d15c09eaf60f5b107fcf9a4d57aa)
- [Tests] use `npx aud` instead of `nsp` or `npm audit` with hoops [`9e96cb7`](https://github.com/inspect-js/has-symbols/commit/9e96cb783746cbed0c10ef78e599a8eaa7ebe193)
- [meta] add `funding` field [`a0b32cf`](https://github.com/inspect-js/has-symbols/commit/a0b32cf68e803f963c1639b6d47b0a9d6440bab0)
- [Dev Deps] update `safe-publish-latest` [`cb9f0a5`](https://github.com/inspect-js/has-symbols/commit/cb9f0a521a3a1790f1064d437edd33bb6c3d6af0)
## v1.0.0 - 2016-09-19
### Commits
- Tests. [`ecb6eb9`](https://github.com/inspect-js/has-symbols/commit/ecb6eb934e4883137f3f93b965ba5e0a98df430d)
- package.json [`88a337c`](https://github.com/inspect-js/has-symbols/commit/88a337cee0864a0da35f5d19e69ff0ef0150e46a)
- Initial commit [`42e1e55`](https://github.com/inspect-js/has-symbols/commit/42e1e5502536a2b8ac529c9443984acd14836b1c)
- Initial implementation. [`33f5cc6`](https://github.com/inspect-js/has-symbols/commit/33f5cc6cdff86e2194b081ee842bfdc63caf43fb)
- read me [`01f1170`](https://github.com/inspect-js/has-symbols/commit/01f1170188ff7cb1558aa297f6ba5b516c6d7b0c)
@@ -0,0 +1,22 @@
// src/sun-filled.tsx
import { jsx, jsxs } from "react/jsx-runtime";
var SunFilledIcon = (props) => /* @__PURE__ */ jsx(
"svg",
{
"aria-hidden": "true",
focusable: "false",
height: "1em",
role: "presentation",
viewBox: "0 0 24 24",
width: "1em",
...props,
children: /* @__PURE__ */ jsxs("g", { fill: "currentColor", children: [
/* @__PURE__ */ jsx("path", { d: "M19 12a7 7 0 11-7-7 7 7 0 017 7z" }),
/* @__PURE__ */ jsx("path", { d: "M12 22.96a.969.969 0 01-1-.96v-.08a1 1 0 012 0 1.038 1.038 0 01-1 1.04zm7.14-2.82a1.024 1.024 0 01-.71-.29l-.13-.13a1 1 0 011.41-1.41l.13.13a1 1 0 010 1.41.984.984 0 01-.7.29zm-14.28 0a1.024 1.024 0 01-.71-.29 1 1 0 010-1.41l.13-.13a1 1 0 011.41 1.41l-.13.13a1 1 0 01-.7.29zM22 13h-.08a1 1 0 010-2 1.038 1.038 0 011.04 1 .969.969 0 01-.96 1zM2.08 13H2a1 1 0 010-2 1.038 1.038 0 011.04 1 .969.969 0 01-.96 1zm16.93-7.01a1.024 1.024 0 01-.71-.29 1 1 0 010-1.41l.13-.13a1 1 0 011.41 1.41l-.13.13a.984.984 0 01-.7.29zm-14.02 0a1.024 1.024 0 01-.71-.29l-.13-.14a1 1 0 011.41-1.41l.13.13a1 1 0 010 1.41.97.97 0 01-.7.3zM12 3.04a.969.969 0 01-1-.96V2a1 1 0 012 0 1.038 1.038 0 01-1 1.04z" })
] })
}
);
export {
SunFilledIcon
};
@@ -0,0 +1,21 @@
The MIT License (MIT)
Copyright (c) 2024 Pelle Wessman
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
@@ -0,0 +1 @@
{"mappings":"AAAA;;;;;;;;;;CAUC,GAMM,SAAS,0CAAI,MAAc,EAAE,SAAiB;IACnD,OAAO,SAAS,YAAY,KAAK,KAAK,CAAC,SAAS;AAClD","sources":["packages/@internationalized/date/src/utils.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 type Mutable<T> = {\n -readonly[P in keyof T]: T[P]\n};\n\nexport function mod(amount: number, numerator: number): number {\n return amount - numerator * Math.floor(amount / numerator);\n}\n"],"names":[],"version":3,"file":"utils.module.js.map"}
@@ -0,0 +1 @@
{"version":3,"file":"fecha.umd.js","sources":["../src/fecha.ts"],"sourcesContent":["const token = /d{1,4}|M{1,4}|YY(?:YY)?|S{1,3}|Do|ZZ|Z|([HhMsDm])\\1?|[aA]|\"[^\"]*\"|'[^']*'/g;\nconst twoDigitsOptional = \"\\\\d\\\\d?\";\nconst twoDigits = \"\\\\d\\\\d\";\nconst threeDigits = \"\\\\d{3}\";\nconst fourDigits = \"\\\\d{4}\";\nconst word = \"[^\\\\s]+\";\nconst literal = /\\[([^]*?)\\]/gm;\n\ntype DateInfo = {\n year: number;\n month: number;\n day: number;\n hour: number;\n minute: number;\n second: number;\n millisecond: number;\n isPm: number | null;\n timezoneOffset: number | null;\n};\n\nexport type I18nSettings = {\n amPm: [string, string];\n dayNames: Days;\n dayNamesShort: Days;\n monthNames: Months;\n monthNamesShort: Months;\n DoFn(dayOfMonth: number): string;\n};\n\nexport type I18nSettingsOptional = Partial<I18nSettings>;\n\nexport type Days = [string, string, string, string, string, string, string];\nexport type Months = [\n string,\n string,\n string,\n string,\n string,\n string,\n string,\n string,\n string,\n string,\n string,\n string\n];\n\nfunction shorten<T extends string[]>(arr: T, sLen: number): string[] {\n const newArr: string[] = [];\n for (let i = 0, len = arr.length; i < len; i++) {\n newArr.push(arr[i].substr(0, sLen));\n }\n return newArr;\n}\n\nconst monthUpdate = (\n arrName: \"monthNames\" | \"monthNamesShort\" | \"dayNames\" | \"dayNamesShort\"\n) => (v: string, i18n: I18nSettings): number | null => {\n const lowerCaseArr = i18n[arrName].map(v => v.toLowerCase());\n const index = lowerCaseArr.indexOf(v.toLowerCase());\n if (index > -1) {\n return index;\n }\n return null;\n};\n\nexport function assign<A>(a: A): A;\nexport function assign<A, B>(a: A, b: B): A & B;\nexport function assign<A, B, C>(a: A, b: B, c: C): A & B & C;\nexport function assign<A, B, C, D>(a: A, b: B, c: C, d: D): A & B & C & D;\nexport function assign(origObj: any, ...args: any[]): any {\n for (const obj of args) {\n for (const key in obj) {\n // @ts-ignore ex\n origObj[key] = obj[key];\n }\n }\n return origObj;\n}\n\nconst dayNames: Days = [\n \"Sunday\",\n \"Monday\",\n \"Tuesday\",\n \"Wednesday\",\n \"Thursday\",\n \"Friday\",\n \"Saturday\"\n];\nconst monthNames: Months = [\n \"January\",\n \"February\",\n \"March\",\n \"April\",\n \"May\",\n \"June\",\n \"July\",\n \"August\",\n \"September\",\n \"October\",\n \"November\",\n \"December\"\n];\n\nconst monthNamesShort: Months = shorten(monthNames, 3) as Months;\nconst dayNamesShort: Days = shorten(dayNames, 3) as Days;\n\nconst defaultI18n: I18nSettings = {\n dayNamesShort,\n dayNames,\n monthNamesShort,\n monthNames,\n amPm: [\"am\", \"pm\"],\n DoFn(dayOfMonth: number) {\n return (\n dayOfMonth +\n [\"th\", \"st\", \"nd\", \"rd\"][\n dayOfMonth % 10 > 3\n ? 0\n : ((dayOfMonth - (dayOfMonth % 10) !== 10 ? 1 : 0) * dayOfMonth) % 10\n ]\n );\n }\n};\nlet globalI18n = assign({}, defaultI18n);\nconst setGlobalDateI18n = (i18n: I18nSettingsOptional): I18nSettings =>\n (globalI18n = assign(globalI18n, i18n));\n\nconst regexEscape = (str: string): string =>\n str.replace(/[|\\\\{()[^$+*?.-]/g, \"\\\\$&\");\n\nconst pad = (val: string | number, len = 2): string => {\n val = String(val);\n while (val.length < len) {\n val = \"0\" + val;\n }\n return val;\n};\n\nconst formatFlags: Record<\n string,\n (dateObj: Date, i18n: I18nSettings) => string\n> = {\n D: (dateObj: Date): string => String(dateObj.getDate()),\n DD: (dateObj: Date): string => pad(dateObj.getDate()),\n Do: (dateObj: Date, i18n: I18nSettings): string =>\n i18n.DoFn(dateObj.getDate()),\n d: (dateObj: Date): string => String(dateObj.getDay()),\n dd: (dateObj: Date): string => pad(dateObj.getDay()),\n ddd: (dateObj: Date, i18n: I18nSettings): string =>\n i18n.dayNamesShort[dateObj.getDay()],\n dddd: (dateObj: Date, i18n: I18nSettings): string =>\n i18n.dayNames[dateObj.getDay()],\n M: (dateObj: Date): string => String(dateObj.getMonth() + 1),\n MM: (dateObj: Date): string => pad(dateObj.getMonth() + 1),\n MMM: (dateObj: Date, i18n: I18nSettings): string =>\n i18n.monthNamesShort[dateObj.getMonth()],\n MMMM: (dateObj: Date, i18n: I18nSettings): string =>\n i18n.monthNames[dateObj.getMonth()],\n YY: (dateObj: Date): string =>\n pad(String(dateObj.getFullYear()), 4).substr(2),\n YYYY: (dateObj: Date): string => pad(dateObj.getFullYear(), 4),\n h: (dateObj: Date): string => String(dateObj.getHours() % 12 || 12),\n hh: (dateObj: Date): string => pad(dateObj.getHours() % 12 || 12),\n H: (dateObj: Date): string => String(dateObj.getHours()),\n HH: (dateObj: Date): string => pad(dateObj.getHours()),\n m: (dateObj: Date): string => String(dateObj.getMinutes()),\n mm: (dateObj: Date): string => pad(dateObj.getMinutes()),\n s: (dateObj: Date): string => String(dateObj.getSeconds()),\n ss: (dateObj: Date): string => pad(dateOLine truncated
@@ -0,0 +1 @@
{"version":3,"file":"jsx-wrap-multilines.d.ts","sourceRoot":"","sources":["jsx-wrap-multilines.js"],"names":[],"mappings":"wBAyCW,OAAO,QAAQ,EAAE,IAAI,CAAC,UAAU"}
@@ -0,0 +1,50 @@
# is-weakmap <sup>[![Version Badge][npm-version-svg]][package-url]</sup>
[![github actions][actions-image]][actions-url]
[![coverage][codecov-image]][codecov-url]
[![License][license-image]][license-url]
[![Downloads][downloads-image]][downloads-url]
[![npm badge][npm-badge-png]][package-url]
Is this value a JS WeakMap? This module works cross-realm/iframe, and despite ES6 @@toStringTag.
## Example
```js
var isWeakMap = require('is-weakmap');
assert(!isWeakMap(function () {}));
assert(!isWeakMap(null));
assert(!isWeakMap(function* () { yield 42; return Infinity; });
assert(!isWeakMap(Symbol('foo')));
assert(!isWeakMap(1n));
assert(!isWeakMap(Object(1n)));
assert(!isWeakMap(new Set()));
assert(!isWeakMap(new WeakSet()));
assert(!isWeakMap(new Map()));
assert(isWeakMap(new WeakMap()));
class MyWeakMap extends WeakMap {}
assert(isWeakMap(new MyWeakMap()));
```
## Tests
Simply clone the repo, `npm install`, and run `npm test`
[package-url]: https://npmjs.org/package/is-weakmap
[npm-version-svg]: https://versionbadg.es/inspect-js/is-weakmap.svg
[deps-svg]: https://david-dm.org/inspect-js/is-weakmap.svg
[deps-url]: https://david-dm.org/inspect-js/is-weakmap
[dev-deps-svg]: https://david-dm.org/inspect-js/is-weakmap/dev-status.svg
[dev-deps-url]: https://david-dm.org/inspect-js/is-weakmap#info=devDependencies
[npm-badge-png]: https://nodei.co/npm/is-weakmap.png?downloads=true&stars=true
[license-image]: https://img.shields.io/npm/l/is-weakmap.svg
[license-url]: LICENSE
[downloads-image]: https://img.shields.io/npm/dm/is-weakmap.svg
[downloads-url]: https://npm-stat.com/charts.html?package=is-weakmap
[codecov-image]: https://codecov.io/gh/inspect-js/is-weakmap/branch/main/graphs/badge.svg
[codecov-url]: https://app.codecov.io/gh/inspect-js/is-weakmap/
[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/inspect-js/is-weakmap
[actions-url]: https://github.com/inspect-js/is-weakmap/actions
@@ -0,0 +1,5 @@
type Func = (...args: unknown[]) => unknown;
declare function setFunctionName<T extends Func = Func>(fn: T, name: string, loose?: boolean): T;
export = setFunctionName;
@@ -0,0 +1,24 @@
/**
Flatten the type output to improve type hints shown in editors.
@example
```
import {Simplify} from 'type-fest';
type PositionProps = {
top: number;
left: number;
};
type SizeProps = {
width: number;
height: number;
};
// In your editor, hovering over `Props` will show a flattened object with all the properties.
type Props = Simplify<PositionProps & SizeProps>;
```
@category Utilities
*/
export type Simplify<T> = {[KeyType in keyof T]: T[KeyType]};
@@ -0,0 +1,88 @@
{
"name": "postcss",
"version": "8.5.6",
"description": "Tool for transforming styles with JS plugins",
"engines": {
"node": "^10 || ^12 || >=14"
},
"exports": {
".": {
"import": "./lib/postcss.mjs",
"require": "./lib/postcss.js"
},
"./lib/at-rule": "./lib/at-rule.js",
"./lib/comment": "./lib/comment.js",
"./lib/container": "./lib/container.js",
"./lib/css-syntax-error": "./lib/css-syntax-error.js",
"./lib/declaration": "./lib/declaration.js",
"./lib/fromJSON": "./lib/fromJSON.js",
"./lib/input": "./lib/input.js",
"./lib/lazy-result": "./lib/lazy-result.js",
"./lib/no-work-result": "./lib/no-work-result.js",
"./lib/list": "./lib/list.js",
"./lib/map-generator": "./lib/map-generator.js",
"./lib/node": "./lib/node.js",
"./lib/parse": "./lib/parse.js",
"./lib/parser": "./lib/parser.js",
"./lib/postcss": "./lib/postcss.js",
"./lib/previous-map": "./lib/previous-map.js",
"./lib/processor": "./lib/processor.js",
"./lib/result": "./lib/result.js",
"./lib/root": "./lib/root.js",
"./lib/rule": "./lib/rule.js",
"./lib/stringifier": "./lib/stringifier.js",
"./lib/stringify": "./lib/stringify.js",
"./lib/symbols": "./lib/symbols.js",
"./lib/terminal-highlight": "./lib/terminal-highlight.js",
"./lib/tokenize": "./lib/tokenize.js",
"./lib/warn-once": "./lib/warn-once.js",
"./lib/warning": "./lib/warning.js",
"./package.json": "./package.json"
},
"main": "./lib/postcss.js",
"types": "./lib/postcss.d.ts",
"keywords": [
"css",
"postcss",
"rework",
"preprocessor",
"parser",
"source map",
"transform",
"manipulation",
"transpiler"
],
"funding": [
{
"type": "opencollective",
"url": "https://opencollective.com/postcss/"
},
{
"type": "tidelift",
"url": "https://tidelift.com/funding/github/npm/postcss"
},
{
"type": "github",
"url": "https://github.com/sponsors/ai"
}
],
"author": "Andrey Sitnik <andrey@sitnik.ru>",
"license": "MIT",
"homepage": "https://postcss.org/",
"repository": "postcss/postcss",
"bugs": {
"url": "https://github.com/postcss/postcss/issues"
},
"dependencies": {
"nanoid": "^3.3.11",
"picocolors": "^1.1.1",
"source-map-js": "^1.2.1"
},
"browser": {
"./lib/terminal-highlight": false,
"source-map-js": false,
"path": false,
"url": false,
"fs": false
}
}
@@ -0,0 +1,44 @@
{
"root": true,
"extends": [
"airbnb-base",
"plugin:flowtype/recommended"
],
"ignorePatterns": [
"lib/",
"reports/",
"examples/",
],
"parser": "@babel/eslint-parser",
"plugins": [
"flowtype",
],
"rules": {
"max-len": "off",
"no-template-curly-in-string": "off",
},
"overrides": [
{
"files": ["src/rules/*"],
"extends": ["plugin:eslint-plugin/rules-recommended"],
"rules": {
"eslint-plugin/require-meta-docs-description": ["error", { "pattern": "^(Enforce|Require|Disallow)" }],
"eslint-plugin/require-meta-docs-url": [
"error",
{ "pattern": "https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/{{name}}.md" },
],
"eslint-plugin/require-meta-type": "off",
},
},
{
"files": ["__tests__/src/rules/*.js"],
"extends": ["plugin:eslint-plugin/tests-recommended"],
},
{
"files": ["__tests__/**/*"],
"env": {
"jest": true,
},
},
],
}
@@ -0,0 +1,18 @@
/**
* This method returns an empty string.
*
* @static
* @memberOf _
* @since 4.13.0
* @category Util
* @returns {string} Returns the empty string.
* @example
*
* _.times(2, _.stubString);
* // => ['', '']
*/
function stubString() {
return '';
}
export default stubString;
@@ -0,0 +1,22 @@
The MIT License (MIT)
Copyright (c) 2015 Unshift.io, Arnout Kazemier, the Contributors.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
@@ -0,0 +1,263 @@
/**
* Module dependencies.
*/
const tty = require('tty');
const util = require('util');
/**
* This is the Node.js implementation of `debug()`.
*/
exports.init = init;
exports.log = log;
exports.formatArgs = formatArgs;
exports.save = save;
exports.load = load;
exports.useColors = useColors;
exports.destroy = util.deprecate(
() => {},
'Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.'
);
/**
* Colors.
*/
exports.colors = [6, 2, 3, 4, 5, 1];
try {
// Optional dependency (as in, doesn't need to be installed, NOT like optionalDependencies in package.json)
// eslint-disable-next-line import/no-extraneous-dependencies
const supportsColor = require('supports-color');
if (supportsColor && (supportsColor.stderr || supportsColor).level >= 2) {
exports.colors = [
20,
21,
26,
27,
32,
33,
38,
39,
40,
41,
42,
43,
44,
45,
56,
57,
62,
63,
68,
69,
74,
75,
76,
77,
78,
79,
80,
81,
92,
93,
98,
99,
112,
113,
128,
129,
134,
135,
148,
149,
160,
161,
162,
163,
164,
165,
166,
167,
168,
169,
170,
171,
172,
173,
178,
179,
184,
185,
196,
197,
198,
199,
200,
201,
202,
203,
204,
205,
206,
207,
208,
209,
214,
215,
220,
221
];
}
} catch (error) {
// Swallow - we only care if `supports-color` is available; it doesn't have to be.
}
/**
* Build up the default `inspectOpts` object from the environment variables.
*
* $ DEBUG_COLORS=no DEBUG_DEPTH=10 DEBUG_SHOW_HIDDEN=enabled node script.js
*/
exports.inspectOpts = Object.keys(process.env).filter(key => {
return /^debug_/i.test(key);
}).reduce((obj, key) => {
// Camel-case
const prop = key
.substring(6)
.toLowerCase()
.replace(/_([a-z])/g, (_, k) => {
return k.toUpperCase();
});
// Coerce string value into JS value
let val = process.env[key];
if (/^(yes|on|true|enabled)$/i.test(val)) {
val = true;
} else if (/^(no|off|false|disabled)$/i.test(val)) {
val = false;
} else if (val === 'null') {
val = null;
} else {
val = Number(val);
}
obj[prop] = val;
return obj;
}, {});
/**
* Is stdout a TTY? Colored output is enabled when `true`.
*/
function useColors() {
return 'colors' in exports.inspectOpts ?
Boolean(exports.inspectOpts.colors) :
tty.isatty(process.stderr.fd);
}
/**
* Adds ANSI color escape codes if enabled.
*
* @api public
*/
function formatArgs(args) {
const {namespace: name, useColors} = this;
if (useColors) {
const c = this.color;
const colorCode = '\u001B[3' + (c < 8 ? c : '8;5;' + c);
const prefix = ` ${colorCode};1m${name} \u001B[0m`;
args[0] = prefix + args[0].split('\n').join('\n' + prefix);
args.push(colorCode + 'm+' + module.exports.humanize(this.diff) + '\u001B[0m');
} else {
args[0] = getDate() + name + ' ' + args[0];
}
}
function getDate() {
if (exports.inspectOpts.hideDate) {
return '';
}
return new Date().toISOString() + ' ';
}
/**
* Invokes `util.formatWithOptions()` with the specified arguments and writes to stderr.
*/
function log(...args) {
return process.stderr.write(util.formatWithOptions(exports.inspectOpts, ...args) + '\n');
}
/**
* Save `namespaces`.
*
* @param {String} namespaces
* @api private
*/
function save(namespaces) {
if (namespaces) {
process.env.DEBUG = namespaces;
} else {
// If you set a process.env field to null or undefined, it gets cast to the
// string 'null' or 'undefined'. Just delete instead.
delete process.env.DEBUG;
}
}
/**
* Load `namespaces`.
*
* @return {String} returns the previously persisted debug modes
* @api private
*/
function load() {
return process.env.DEBUG;
}
/**
* Init logic for `debug` instances.
*
* Create a new `inspectOpts` object in case `useColors` is set
* differently for a particular `debug` instance.
*/
function init(debug) {
debug.inspectOpts = {};
const keys = Object.keys(exports.inspectOpts);
for (let i = 0; i < keys.length; i++) {
debug.inspectOpts[keys[i]] = exports.inspectOpts[keys[i]];
}
}
module.exports = require('./common')(exports);
const {formatters} = module.exports;
/**
* Map %o to `util.inspect()`, all on a single line.
*/
formatters.o = function (v) {
this.inspectOpts.colors = this.useColors;
return util.inspect(v, this.inspectOpts)
.split('\n')
.map(str => str.trim())
.join(' ');
};
/**
* Map %O to `util.inspect()`, allowing multiple lines if needed.
*/
formatters.O = function (v) {
this.inspectOpts.colors = this.useColors;
return util.inspect(v, this.inspectOpts);
};
@@ -0,0 +1,49 @@
{
"name": "@types/compression",
"version": "1.8.1",
"description": "TypeScript definitions for compression",
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/compression",
"license": "MIT",
"contributors": [
{
"name": "Santi Albo",
"githubUsername": "santialbo",
"url": "https://github.com/santialbo"
},
{
"name": "Rob van der Burgt",
"githubUsername": "rburgt",
"url": "https://github.com/rburgt"
},
{
"name": "Neil Bryson Cargamento",
"githubUsername": "neilbryson",
"url": "https://github.com/neilbryson"
},
{
"name": "Piotr Błażejewicz",
"githubUsername": "peterblazejewicz",
"url": "https://github.com/peterblazejewicz"
},
{
"name": "Sebastian Beltran",
"githubUsername": "bjohansebas",
"url": "https://github.com/bjohansebas"
}
],
"main": "",
"types": "index.d.ts",
"repository": {
"type": "git",
"url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git",
"directory": "types/compression"
},
"scripts": {},
"dependencies": {
"@types/express": "*",
"@types/node": "*"
},
"peerDependencies": {},
"typesPublisherContentHash": "6b4eb04fd4e192c872fa74993aa678fec3430d7eef528a26b337b14bec479a91",
"typeScriptVersion": "5.1"
}
@@ -0,0 +1 @@
{"version":3,"file":"file.js","sourceRoot":"","sources":["../../src/file.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,iBAAiB,GAAG,IAAI,GAAG,CAAC;IACrC,gGAAgG;IAChG,CAAC,KAAK,EAAE,8CAA8C,CAAC;IACvD,CAAC,MAAM,EAAE,oBAAoB,CAAC;IAC9B,CAAC,KAAK,EAAE,aAAa,CAAC;IACtB,CAAC,KAAK,EAAE,aAAa,CAAC;IACtB,CAAC,KAAK,EAAE,WAAW,CAAC;IACpB,CAAC,MAAM,EAAE,YAAY,CAAC;IACtB,CAAC,KAAK,EAAE,WAAW,CAAC;IACpB,CAAC,IAAI,EAAE,6BAA6B,CAAC;IACrC,CAAC,MAAM,EAAE,6BAA6B,CAAC;IACvC,CAAC,KAAK,EAAE,6BAA6B,CAAC;IACtC,CAAC,KAAK,EAAE,8BAA8B,CAAC;IACvC,CAAC,KAAK,EAAE,aAAa,CAAC;IACtB,CAAC,KAAK,EAAE,8BAA8B,CAAC;IACvC,CAAC,KAAK,EAAE,8BAA8B,CAAC;IACvC,CAAC,KAAK,EAAE,uBAAuB,CAAC;IAChC,CAAC,IAAI,EAAE,qCAAqC,CAAC;IAC7C,CAAC,KAAK,EAAE,WAAW,CAAC;IACpB,CAAC,KAAK,EAAE,sCAAsC,CAAC;IAC/C,CAAC,KAAK,EAAE,8BAA8B,CAAC;IACvC,CAAC,KAAK,EAAE,0BAA0B,CAAC;IACnC,CAAC,OAAO,EAAE,yBAAyB,CAAC;IACpC,CAAC,KAAK,EAAE,aAAa,CAAC;IACtB,CAAC,KAAK,EAAE,4BAA4B,CAAC;IACrC,CAAC,KAAK,EAAE,0BAA0B,CAAC;IACnC,CAAC,KAAK,EAAE,4BAA4B,CAAC;IACrC,CAAC,OAAO,EAAE,6BAA6B,CAAC;IACxC,CAAC,IAAI,EAAE,iBAAiB,CAAC;IACzB,CAAC,KAAK,EAAE,cAAc,CAAC;IACvB,CAAC,MAAM,EAAE,cAAc,CAAC;IACxB,CAAC,MAAM,EAAE,cAAc,CAAC;IACxB,CAAC,KAAK,EAAE,6DAA6D,CAAC;IACtE,CAAC,KAAK,EAAE,yBAAyB,CAAC;IAClC,CAAC,KAAK,EAAE,2BAA2B,CAAC;IACpC,CAAC,KAAK,EAAE,WAAW,CAAC;IACpB,CAAC,KAAK,EAAE,yCAAyC,CAAC;IAClD,CAAC,MAAM,EAAE,YAAY,CAAC;IACtB,CAAC,UAAU,EAAE,qBAAqB,CAAC;IACnC,CAAC,aAAa,EAAE,8BAA8B,CAAC;IAC/C,CAAC,KAAK,EAAE,gCAAgC,CAAC;IACzC,CAAC,KAAK,EAAE,uBAAuB,CAAC;IAChC,CAAC,KAAK,EAAE,mBAAmB,CAAC;IAC5B,CAAC,KAAK,EAAE,2BAA2B,CAAC;IACpC,CAAC,KAAK,EAAE,gBAAgB,CAAC;IACzB,CAAC,KAAK,EAAE,YAAY,CAAC;IACrB,CAAC,KAAK,EAAE,mCAAmC,CAAC;IAC5C,CAAC,KAAK,EAAE,gBAAgB,CAAC;IACzB,CAAC,KAAK,EAAE,yBAAyB,CAAC;IAClC,CAAC,MAAM,EAAE,sBAAsB,CAAC;IAChC,CAAC,SAAS,EAAE,yBAAyB,CAAC;IACtC,CAAC,aAAa,EAAE,6BAA6B,CAAC;IAC9C,CAAC,SAAS,EAAE,yBAAyB,CAAC;IACtC,CAAC,KAAK,EAAE,sCAAsC,CAAC;IAC/C,CAAC,IAAI,EAAE,YAAY,CAAC;IACpB,CAAC,KAAK,EAAE,iBAAiB,CAAC;IAC1B,CAAC,MAAM,EAAE,YAAY,CAAC;IACtB,CAAC,IAAI,EAAE,wBAAwB,CAAC;IAChC,CAAC,KAAK,EAAE,uCAAuC,CAAC;IAChD,CAAC,KAAK,EAAE,uCAAuC,CAAC;IAChD,CAAC,KAAK,EAAE,kCAAkC,CAAC;IAC3C,CAAC,KAAK,EAAE,8BAA8B,CAAC;IACvC,CAAC,KAAK,EAAE,mBAAmB,CAAC;IAC5B,CAAC,KAAK,EAAE,0BAA0B,CAAC;IACnC,CAAC,OAAO,EAAE,qBAAqB,CAAC;IAChC,CAAC,KAAK,EAAE,wBAAwB,CAAC;IACjC,CAAC,KAAK,EAAE,iCAAiC,CAAC;IAC1C,CAAC,MAAM,EAAE,oBAAoB,CAAC;IAC9B,CAAC,KAAK,EAAE,6BAA6B,CAAC;IACtC,CAAC,KAAK,EAAE,kCAAkC,CAAC;IAC3C,CAAC,KAAK,EAAE,0BAA0B,CAAC;IACnC,CAAC,KAAK,EAAE,qBAAqB,CAAC;IAC9B,CAAC,OAAO,EAAE,qBAAqB,CAAC;IAChC,CAAC,KAAK,EAAE,qBAAqB,CAAC;IAC9B,CAAC,MAAM,EAAE,mCAAmC,CAAC;IAC7C,CAAC,KAAK,EAAE,WAAW,CAAC;IACpB,CAAC,MAAM,EAAE,4BAA4B,CAAC;IACtC,CAAC,KAAK,EAAE,oCAAoC,CAAC;IAC7C,CAAC,KAAK,EAAE,qBAAqB,CAAC;IAC9B,CAAC,KAAK,EAAE,0BAA0B,CAAC;IACnC,CAAC,MAAM,EAAE,0BAA0B,CAAC;IACpC,CAAC,KAAK,EAAE,qCAAqC,CAAC;IAC9C,CAAC,MAAM,EAAE,gBAAgB,CAAC;IAC1B,CAAC,QAAQ,EAAE,0BAA0B,CAAC;IACtC,CAAC,IAAI,EAAE,oBAAoB,CAAC;IAC5B,CAAC,KAAK,EAAE,qBAAqB,CAAC;IAC9B,CAAC,GAAG,EAAE,UAAU,CAAC;IACjB,CAAC,KAAK,EAAE,+BAA+B,CAAC;IACxC,CAAC,KAAK,EAAE,+BAA+B,CAAC;IACxC,CAAC,KAAK,EAAE,+BAA+B,CAAC;IACxC,CAAC,KAAK,EAAE,+BAA+B,CAAC;IACxC,CAAC,KAAK,EAAE,+BAA+B,CAAC;IACxC,CAAC,QAAQ,EAAE,8CAA8C,CAAC;IAC1D,CAAC,QAAQ,EAAE,kDAAkD,CAAC;IAC9D,CAAC,KAAK,EAAE,mCAAmC,CAAC;IAC5C,CAAC,KAAK,EAAE,aAAa,CAAC;IACtB,CAAC,KAAK,EAAE,8BAA8B,CAAC;IACvC,CAAC,KAAK,EAAE,0BAA0B,CAAC;IACnC,CAAC,KAAK,EAAE,+BAA+B,CAAC;IACxC,CAAC,KAAK,EAAE,mBAAmB,CAAC;IAC5B,CAAC,KAAK,EAAE,mBAAmB,CAAC;IAC5B,CAAC,KAAK,EAAE,mBAAmB,CAAC;IAC5B,CAAC,KAAK,EAAE,mBAAmB,CAAC;IAC5B,CAAC,KAAK,EAAE,mBAAmB,CAAC;IAC5B,CAAC,IAAI,EAAE,UAAU,CAAC;IAClB,CAAC,KAAK,EAAE,qBAAqB,CAAC;IAC9B,CAAC,KAAK,EAAE,wBAAwB,CAAC;IACjC,CAAC,OAAO,EAAE,uBAAuB,CAAC;IAClC,CAAC,SAAS,EAAE,8BAA8B,CAAC;IAC3C,CAAC,KAAK,EAAE,mBAAmB,CAAC;IAC5B,CAAC,KAAK,EAAE,sBAAsB,CAAC;IAC/B,CAAC,MAAM,EAAE,sBAAsB,CAAC;IAChC,CAAC,OAAO,EAAE,oCAAoC,CAAC;IAC/C,CAAC,OAAO,EAAE,6BAA6B,CAAC;IACxC,CAAC,OAAO,EAAE,4BAA4B,CAAC;IACvC,CAAC,OAAO,EAAE,yBAAyB,CAAC;IACpC,CAAC,OAAO,EAAE,yBAAyB,CAAC;IACpC,CAAC,OAAO,EAAE,wBAAwB,CAAC;IACnC,CAAC,KAAK,EAAE,iBAAiB,CAAC;IAC1B,CAAC,KAAK,EAAE,gBAAgB,CAAC;IACzB,CAAC,OAAO,EAAE,8BAA8B,CAAC;IACzC,CAAC,KAAK,EAAE,4BAA4B,CAAC;IACrC,CAAC,KAAK,EAAE,uBAAuB,CAAC;IAChC,CAAC,KAAK,EAAE,8BAA8B,CAAC;IACvC,CAAC,KAAK,EAAE,WAAW,CAAC;IACpB,CAAC,MAAM,EAAE,oBAAoB,CAAC;IAC9B,CAAC,KAAK,EAAE,6BAA6B,CAAC;IACtC,CAAC,MAAM,EAAE,4BAA4B,CAAC;IACtC,CAAC,KAAK,EAAE,gBAAgB,CAAC;IACzB,CAAC,KAAK,EAAE,wDAAwD,CAAC;IACjE,CAAC,KAAK,EAAE,6BAA6B,CAAC;IACtC,CAAC,KAAK,EAAE,kBAAkB,CAAC;IAC3B,CAAC,KAAK,EAAE,0BAA0B,CAAC;IACnC,CAAC,OAAO,EAAE,0BAA0B,CAAC;IACrC,CAAC,MAAM,EAAE,wCAAwC,CAAC;IAClD,CAAC,MAAM,EAAE,uCAAuC,CAAC;IACjD,CAAC,MAAM,EAAE,wCAAwC,CAAC;IAClD,CAAC,MAAM,EAAE,wCAAwC,CAAC;IAClD,CAAC,MAAM,EAAE,+BAA+B,CAAC;IACzC,CAAC,KAAK,EAAE,sBAAsB,CAAC;IAC/B,CAAC,KAAK,EAAE,6BAA6B,CAAC;IACtC,CAAC,MAAM,EAAE,iBAAiB,CAAC;IAC3B,CAAC,KAAK,EAAE,gBAAgB,CAAC;IACzB,CAAC,KAAK,EAAE,yCAAyC,CAAC;IAClD,CAAC,KAAK,EAAE,aAAa,CAAC;IACtB,CAAC,KAAK,EAAE,yBAAyB,CAAC;IAClC,CAAC,QAAQ,EAAE,mBAAmB,CAAC;IAC/B,CAAC,KAAK,EAAE,0BAA0B,CAAC;IACnC,CAAC,MAAM,EAAE,YAAY,CAAC;IACtB,CAAC,MAAM,EAAE,oBAAoB,CAAC;Line truncated
@@ -0,0 +1,26 @@
import { MoveResult } from '@react-aria/interactions';
interface UseDraggableProps {
/**
* Ref to the moving target DOM node.
*/
targetRef?: React.RefObject<HTMLElement>;
/**
* Whether to disable the target is draggable.
* @default false
*/
isDisabled?: boolean;
/**
* Whether the target can overflow the viewport.
* @default false
*/
canOverflow?: boolean;
}
/**
* A hook to make a target draggable.
* @param props UseDraggableProps
* @returns MoveResult for the drag DOM node.
*/
declare function useDraggable(props: UseDraggableProps): MoveResult;
export { UseDraggableProps, useDraggable };
@@ -0,0 +1,40 @@
import { promises, existsSync } from 'node:fs';
import { resolve, isAbsolute, dirname, join, basename } from 'pathe';
class NodeSnapshotEnvironment {
constructor(options = {}) {
this.options = options;
}
getVersion() {
return "1";
}
getHeader() {
return `// Snapshot v${this.getVersion()}`;
}
async resolveRawPath(testPath, rawPath) {
return isAbsolute(rawPath) ? rawPath : resolve(dirname(testPath), rawPath);
}
async resolvePath(filepath) {
return join(join(dirname(filepath), this.options.snapshotsDirName ?? "__snapshots__"), `${basename(filepath)}.snap`);
}
async prepareDirectory(dirPath) {
await promises.mkdir(dirPath, { recursive: true });
}
async saveSnapshotFile(filepath, snapshot) {
await promises.mkdir(dirname(filepath), { recursive: true });
await promises.writeFile(filepath, snapshot, "utf-8");
}
async readSnapshotFile(filepath) {
if (!existsSync(filepath)) {
return null;
}
return promises.readFile(filepath, "utf-8");
}
async removeSnapshotFile(filepath) {
if (existsSync(filepath)) {
await promises.unlink(filepath);
}
}
}
export { NodeSnapshotEnvironment };
@@ -0,0 +1 @@
{"name":"@eslint/config-helpers","version":"0.4.2","requiresBuild":false,"files":{"LICENSE":{"checkedAt":1794532092897,"integrity":"sha512-3Gto0TuM+VlkS5NfEZKwLHGqelz2U71DtEgPqJ7sjU0/FqInjsjDtAqx/bIzsxc6eP2DWQ1vc54Mno/1bCglVw==","mode":420,"size":11357},"dist/cjs/index.cjs":{"checkedAt":1794532092897,"integrity":"sha512-igrSWsLWqV8Ku2Brn+QiJZixd4OH77va2VG4jagWKVVD4EZ6CHPtXvo48Fb/jPzBFI/Ht9ytcq8OnX7NDI8+0A==","mode":420,"size":17228},"dist/cjs/index.d.cts":{"checkedAt":1794532092897,"integrity":"sha512-bW24hkJkpVXSNEtqh0twHYr5Pm7ITsmT0/SvFFbQQUzdFusDW5bV+Fq2JQpsdoz9iMnuj8zrkfcUojGiivMN4w==","mode":420,"size":1328},"dist/cjs/types.cts":{"checkedAt":1794532092897,"integrity":"sha512-IVGFtPT3L3EMLaWqXrVKqNmbmVQ1jNQ1UI15wQhV2BjWNOUu6ZXd9pv2zlcEQNATydjqwRaU0pIVIKRi0oWVQw==","mode":420,"size":727},"dist/esm/index.js":{"checkedAt":1794532092897,"integrity":"sha512-BdHv6u4GFw8gIYeesWHrRQ2fkcBu9TaGw6Z0d093yLb7yrbA2t3/yI172KGxQaRkjO7m6zjUBRZfG1bSYRRLgA==","mode":420,"size":17210},"package.json":{"checkedAt":1794532092898,"integrity":"sha512-JPtNa+7h+47ZqqDdjKdGOtRPUFlSEiFO/NVG5ItS2HBQJLnoLIy6HDXjEc40dIYjBsJTNouEeUzKKbdyQoL+tQ==","mode":420,"size":1706},"README.md":{"checkedAt":1794532092898,"integrity":"sha512-Cx07JGJEGVyLAw/gxJOaRQFd89Ee+iKiNjrUQPj+I6SjHQWstkKfJuJ1da2T9WRQwQh+Vnn03p+G6vXWsvAy7Q==","mode":420,"size":5160},"dist/esm/index.d.ts":{"checkedAt":1794532092898,"integrity":"sha512-+mg/PI7A+IEt3WGIRWopZAdgztfIyfyPMXKwJh51dFBqmECw0C+RFgdZiIcs6/t8E8SG1cod3IEPjxJiS8IsmQ==","mode":420,"size":1327},"dist/esm/types.d.ts":{"checkedAt":1794532092898,"integrity":"sha512-4qWvpe0En0HRopMiXej5i0ARct0WtbFDdZZMfiNSqojSQXCasPbVsrdAAilnWdCqsmdXJgEfDplOoOYCTsu3tQ==","mode":420,"size":724},"dist/esm/types.ts":{"checkedAt":1794532092897,"integrity":"sha512-IVGFtPT3L3EMLaWqXrVKqNmbmVQ1jNQ1UI15wQhV2BjWNOUu6ZXd9pv2zlcEQNATydjqwRaU0pIVIKRi0oWVQw==","mode":420,"size":727}}}
@@ -0,0 +1,10 @@
'use strict';
module.exports = function every(array, predicate) {
for (var i = 0; i < array.length; i += 1) {
if (!predicate(array[i], i, array)) {
return false;
}
}
return true;
};
@@ -0,0 +1,101 @@
[![Build Status](https://travis-ci.org/isaacs/rimraf.svg?branch=master)](https://travis-ci.org/isaacs/rimraf) [![Dependency Status](https://david-dm.org/isaacs/rimraf.svg)](https://david-dm.org/isaacs/rimraf) [![devDependency Status](https://david-dm.org/isaacs/rimraf/dev-status.svg)](https://david-dm.org/isaacs/rimraf#info=devDependencies)
The [UNIX command](http://en.wikipedia.org/wiki/Rm_(Unix)) `rm -rf` for node.
Install with `npm install rimraf`, or just drop rimraf.js somewhere.
## API
`rimraf(f, [opts], callback)`
The first parameter will be interpreted as a globbing pattern for files. If you
want to disable globbing you can do so with `opts.disableGlob` (defaults to
`false`). This might be handy, for instance, if you have filenames that contain
globbing wildcard characters.
The callback will be called with an error if there is one. Certain
errors are handled for you:
* Windows: `EBUSY` and `ENOTEMPTY` - rimraf will back off a maximum of
`opts.maxBusyTries` times before giving up, adding 100ms of wait
between each attempt. The default `maxBusyTries` is 3.
* `ENOENT` - If the file doesn't exist, rimraf will return
successfully, since your desired outcome is already the case.
* `EMFILE` - Since `readdir` requires opening a file descriptor, it's
possible to hit `EMFILE` if too many file descriptors are in use.
In the sync case, there's nothing to be done for this. But in the
async case, rimraf will gradually back off with timeouts up to
`opts.emfileWait` ms, which defaults to 1000.
## options
* unlink, chmod, stat, lstat, rmdir, readdir,
unlinkSync, chmodSync, statSync, lstatSync, rmdirSync, readdirSync
In order to use a custom file system library, you can override
specific fs functions on the options object.
If any of these functions are present on the options object, then
the supplied function will be used instead of the default fs
method.
Sync methods are only relevant for `rimraf.sync()`, of course.
For example:
```javascript
var myCustomFS = require('some-custom-fs')
rimraf('some-thing', myCustomFS, callback)
```
* maxBusyTries
If an `EBUSY`, `ENOTEMPTY`, or `EPERM` error code is encountered
on Windows systems, then rimraf will retry with a linear backoff
wait of 100ms longer on each try. The default maxBusyTries is 3.
Only relevant for async usage.
* emfileWait
If an `EMFILE` error is encountered, then rimraf will retry
repeatedly with a linear backoff of 1ms longer on each try, until
the timeout counter hits this max. The default limit is 1000.
If you repeatedly encounter `EMFILE` errors, then consider using
[graceful-fs](http://npm.im/graceful-fs) in your program.
Only relevant for async usage.
* glob
Set to `false` to disable [glob](http://npm.im/glob) pattern
matching.
Set to an object to pass options to the glob module. The default
glob options are `{ nosort: true, silent: true }`.
Glob version 6 is used in this module.
Relevant for both sync and async usage.
* disableGlob
Set to any non-falsey value to disable globbing entirely.
(Equivalent to setting `glob: false`.)
## rimraf.sync
It can remove stuff synchronously, too. But that's not so good. Use
the async API. It's better.
## CLI
If installed with `npm install rimraf -g` it can be used as a global
command `rimraf <path> [<path> ...]` which is useful for cross platform support.
## mkdirp
If you need to create a directory recursively, check out
[mkdirp](https://github.com/substack/node-mkdirp).
@@ -0,0 +1,16 @@
'use strict';
var IsUnclampedIntegerElementType = require('./IsUnclampedIntegerElementType');
var IsBigIntElementType = require('./IsBigIntElementType');
// https://262.ecma-international.org/15.0/#sec-isnotearconfiguration
module.exports = function IsNoTearConfiguration(type, order) {
if (IsUnclampedIntegerElementType(type)) {
return true;
}
if (IsBigIntElementType(type) && order !== 'INIT' && order !== 'UNORDERED') {
return true;
}
return false;
};
@@ -0,0 +1,8 @@
'use strict'
const parse = require('./parse')
const clean = (version, options) => {
const s = parse(version.trim().replace(/^[=v]+/, ''), options)
return s ? s.version : null
}
module.exports = clean
@@ -0,0 +1,70 @@
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || (function () {
var ownKeys = function(o) {
ownKeys = Object.getOwnPropertyNames || function (o) {
var ar = [];
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
return ar;
};
return ownKeys(o);
};
return function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
__setModuleDefault(result, mod);
return result;
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
exports.typeDeclaredInPackageDeclarationFile = typeDeclaredInPackageDeclarationFile;
const ts = __importStar(require("typescript"));
function findParentModuleDeclaration(node) {
switch (node.kind) {
case ts.SyntaxKind.ModuleDeclaration:
// "namespace x {...}" should be ignored here
if (node.flags & ts.NodeFlags.Namespace) {
break;
}
return ts.isStringLiteral(node.name)
? node
: undefined;
case ts.SyntaxKind.SourceFile:
return undefined;
}
return findParentModuleDeclaration(node.parent);
}
function typeDeclaredInDeclareModule(packageName, declarations) {
return declarations.some(declaration => findParentModuleDeclaration(declaration)?.name.text === packageName);
}
function typeDeclaredInDeclarationFile(packageName, declarationFiles, program) {
// Handle scoped packages: if the name starts with @, remove it and replace / with __
const typesPackageName = packageName.replace(/^@([^/]+)\//, '$1__');
const matcher = new RegExp(`${packageName}|${typesPackageName}`);
return declarationFiles.some(declaration => {
const packageIdName = program.sourceFileToPackageName.get(declaration.path);
return (packageIdName != null &&
matcher.test(packageIdName) &&
program.isSourceFileFromExternalLibrary(declaration));
});
}
function typeDeclaredInPackageDeclarationFile(packageName, declarations, declarationFiles, program) {
return (typeDeclaredInDeclareModule(packageName, declarations) ||
typeDeclaredInDeclarationFile(packageName, declarationFiles, program));
}
@@ -0,0 +1,125 @@
/**
* @import {Handle, Info, State} from 'mdast-util-to-markdown'
* @import {PhrasingParents} from '../types.js'
*/
import {encodeCharacterReference} from './encode-character-reference.js'
/**
* Serialize the children of a parent that contains phrasing children.
*
* These children will be joined flush together.
*
* @param {PhrasingParents} parent
* Parent of flow nodes.
* @param {State} state
* Info passed around about the current state.
* @param {Info} info
* Info on where we are in the document we are generating.
* @returns {string}
* Serialized children, joined together.
*/
export function containerPhrasing(parent, state, info) {
const indexStack = state.indexStack
const children = parent.children || []
/** @type {Array<string>} */
const results = []
let index = -1
let before = info.before
/** @type {string | undefined} */
let encodeAfter
indexStack.push(-1)
let tracker = state.createTracker(info)
while (++index < children.length) {
const child = children[index]
/** @type {string} */
let after
indexStack[indexStack.length - 1] = index
if (index + 1 < children.length) {
/** @type {Handle} */
// @ts-expect-error: hush, it’s actually a `zwitch`.
let handle = state.handle.handlers[children[index + 1].type]
/** @type {Handle} */
// @ts-expect-error: hush, it’s actually a `zwitch`.
if (handle && handle.peek) handle = handle.peek
after = handle
? handle(children[index + 1], parent, state, {
before: '',
after: '',
...tracker.current()
}).charAt(0)
: ''
} else {
after = info.after
}
// In some cases, html (text) can be found in phrasing right after an eol.
// When we’d serialize that, in most cases that would be seen as html
// (flow).
// As we can’t escape or so to prevent it from happening, we take a somewhat
// reasonable approach: replace that eol with a space.
// See: <https://github.com/syntax-tree/mdast-util-to-markdown/issues/15>
if (
results.length > 0 &&
(before === '\r' || before === '\n') &&
child.type === 'html'
) {
results[results.length - 1] = results[results.length - 1].replace(
/(\r?\n|\r)$/,
' '
)
before = ' '
// To do: does this work to reset tracker?
tracker = state.createTracker(info)
tracker.move(results.join(''))
}
let value = state.handle(child, parent, state, {
...tracker.current(),
after,
before
})
// If we had to encode the first character after the previous node and it’s
// still the same character,
// encode it.
if (encodeAfter && encodeAfter === value.slice(0, 1)) {
value =
encodeCharacterReference(encodeAfter.charCodeAt(0)) + value.slice(1)
}
const encodingInfo = state.attentionEncodeSurroundingInfo
state.attentionEncodeSurroundingInfo = undefined
encodeAfter = undefined
// If we have to encode the first character before the current node and
// it’s still the same character,
// encode it.
if (encodingInfo) {
if (
results.length > 0 &&
encodingInfo.before &&
before === results[results.length - 1].slice(-1)
) {
results[results.length - 1] =
results[results.length - 1].slice(0, -1) +
encodeCharacterReference(before.charCodeAt(0))
}
if (encodingInfo.after) encodeAfter = after
}
tracker.move(value)
results.push(value)
before = value.slice(-1)
}
indexStack.pop()
return results.join('')
}
@@ -0,0 +1 @@
{"version":3,"file":"InstanceBinding.d.ts","sourceRoot":"","sources":["../../../../src/binding/models/InstanceBinding.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAE9C,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAClD,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAEhD,MAAM,WAAW,eAAe,CAAC,UAAU,CACzC,SAAQ,aAAa,CACnB,OAAO,iBAAiB,CAAC,QAAQ,EACjC,YAAY,EACZ,UAAU,CACX;IACD,QAAQ,CAAC,kBAAkB,EAAE,OAAO,CAAC,UAAU,CAAC,CAAC;CAClD"}
@@ -0,0 +1,35 @@
"use strict"
const {
definePrototypeMethodHandler,
} = require("../util/define-prototype-method-handler")
module.exports = {
meta: {
docs: {
description: "disallow the `RegExp.prototype.compile` method.",
category: "legacy",
recommended: false,
url: "http://eslint-community.github.io/eslint-plugin-es-x/rules/no-regexp-prototype-compile.html",
},
fixable: null,
messages: {
forbidden: "Annex B feature '{{name}}' method is forbidden.",
},
schema: [
{
type: "object",
properties: {
aggressive: { type: "boolean" },
},
additionalProperties: false,
},
],
type: "problem",
},
create(context) {
return definePrototypeMethodHandler(context, {
RegExp: ["compile"],
})
},
}
@@ -0,0 +1,3 @@
import CryptoJS = require("./index");
export = CryptoJS.HmacSHA256;
@@ -0,0 +1 @@
{"version":3,"file":"stringifyServiceIdentifier.d.ts","sourceRoot":"","sources":["../../../../src/services/calculations/stringifyServiceIdentifier.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAEhE,wBAAgB,0BAA0B,CACxC,iBAAiB,EAAE,iBAAiB,GACnC,MAAM,CAUR"}
@@ -0,0 +1,6 @@
import {
animations
} from "../chunk-DMASP6FA.mjs";
export {
animations
};
@@ -0,0 +1 @@
{"name":"path-type","version":"4.0.0","requiresBuild":false,"files":{"package.json":{"checkedAt":1794532102787,"integrity":"sha512-MGG+S0LEfOU6cupshaoN7TCPhKxLzXM0z2xvzbTRJg3n2Pciw64alZJX2bvi0BDEuqk6SJ9fNh25+xrQuOymlA==","mode":420,"size":714},"index.d.ts":{"checkedAt":1794532102787,"integrity":"sha512-YIaXzHzUOx9yVG0KLCxwCx5a3i+9sBnPHnVh+rlErdEkHjPN71fn9zblBx94mTjZMuhsWsrf7W49T+u2yBSb3g==","mode":420,"size":1296},"index.js":{"checkedAt":1794532102787,"integrity":"sha512-ybPgHToJQJN9OXkDxCxjwYFTqh0foWCmN8rtL3ONcNvlA7jX5xQquz9j6AlCCrHT6hZ/fnpvgiwpUxhP+Nk09A==","mode":420,"size":1176},"license":{"checkedAt":1794532093346,"integrity":"sha512-nIst73auX/5NY2Fmv5Y116vWnNrEv4GaIUX3lpZG05rpXJY2S8EX+fpUS5hRjClCM0VdT2Za9DDHXXB5jdSrEw==","mode":420,"size":1109},"readme.md":{"checkedAt":1794532102787,"integrity":"sha512-xGprIZ7MY0TZAZGGKjbpkTZWs84Fqd/gkWy0FYSMQQiMk5P6qijuR4PymvAc41kw1YXcIJOWosXJsus+TUae1g==","mode":420,"size":1112}}}
@@ -0,0 +1,157 @@
function $parcel$export(e, n, v, s) {
Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
}
$parcel$export(module.exports, "NumberFormatter", () => $0c1d5654b62fc485$export$cc77c4ff7e8673c5);
/*
* 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.
*/ let $0c1d5654b62fc485$var$formatterCache = new Map();
let $0c1d5654b62fc485$var$supportsSignDisplay = false;
try {
$0c1d5654b62fc485$var$supportsSignDisplay = new Intl.NumberFormat('de-DE', {
signDisplay: 'exceptZero'
}).resolvedOptions().signDisplay === 'exceptZero';
// eslint-disable-next-line no-empty
} catch {}
let $0c1d5654b62fc485$var$supportsUnit = false;
try {
$0c1d5654b62fc485$var$supportsUnit = new Intl.NumberFormat('de-DE', {
style: 'unit',
unit: 'degree'
}).resolvedOptions().style === 'unit';
// eslint-disable-next-line no-empty
} catch {}
// Polyfill for units since Safari doesn't support them yet. See https://bugs.webkit.org/show_bug.cgi?id=215438.
// Currently only polyfilling the unit degree in narrow format for ColorSlider in our supported locales.
// Values were determined by switching to each locale manually in Chrome.
const $0c1d5654b62fc485$var$UNITS = {
degree: {
narrow: {
default: "\xb0",
'ja-JP': " \u5EA6",
'zh-TW': "\u5EA6",
'sl-SI': " \xb0"
}
}
};
class $0c1d5654b62fc485$export$cc77c4ff7e8673c5 {
/** Formats a number value as a string, according to the locale and options provided to the constructor. */ format(value) {
let res = '';
if (!$0c1d5654b62fc485$var$supportsSignDisplay && this.options.signDisplay != null) res = $0c1d5654b62fc485$export$711b50b3c525e0f2(this.numberFormatter, this.options.signDisplay, value);
else res = this.numberFormatter.format(value);
if (this.options.style === 'unit' && !$0c1d5654b62fc485$var$supportsUnit) {
var _UNITS_unit;
let { unit: unit, unitDisplay: unitDisplay = 'short', locale: locale } = this.resolvedOptions();
if (!unit) return res;
let values = (_UNITS_unit = $0c1d5654b62fc485$var$UNITS[unit]) === null || _UNITS_unit === void 0 ? void 0 : _UNITS_unit[unitDisplay];
res += values[locale] || values.default;
}
return res;
}
/** Formats a number to an array of parts such as separators, digits, punctuation, and more. */ formatToParts(value) {
// TODO: implement signDisplay for formatToParts
return this.numberFormatter.formatToParts(value);
}
/** Formats a number range as a string. */ formatRange(start, end) {
if (typeof this.numberFormatter.formatRange === 'function') return this.numberFormatter.formatRange(start, end);
if (end < start) throw new RangeError('End date must be >= start date');
// Very basic fallback for old browsers.
return `${this.format(start)} \u{2013} ${this.format(end)}`;
}
/** Formats a number range as an array of parts. */ formatRangeToParts(start, end) {
if (typeof this.numberFormatter.formatRangeToParts === 'function') return this.numberFormatter.formatRangeToParts(start, end);
if (end < start) throw new RangeError('End date must be >= start date');
let startParts = this.numberFormatter.formatToParts(start);
let endParts = this.numberFormatter.formatToParts(end);
return [
...startParts.map((p)=>({
...p,
source: 'startRange'
})),
{
type: 'literal',
value: " \u2013 ",
source: 'shared'
},
...endParts.map((p)=>({
...p,
source: 'endRange'
}))
];
}
/** Returns the resolved formatting options based on the values passed to the constructor. */ resolvedOptions() {
let options = this.numberFormatter.resolvedOptions();
if (!$0c1d5654b62fc485$var$supportsSignDisplay && this.options.signDisplay != null) options = {
...options,
signDisplay: this.options.signDisplay
};
if (!$0c1d5654b62fc485$var$supportsUnit && this.options.style === 'unit') options = {
...options,
style: 'unit',
unit: this.options.unit,
unitDisplay: this.options.unitDisplay
};
return options;
}
constructor(locale, options = {}){
this.numberFormatter = $0c1d5654b62fc485$var$getCachedNumberFormatter(locale, options);
this.options = options;
}
}
function $0c1d5654b62fc485$var$getCachedNumberFormatter(locale, options = {}) {
let { numberingSystem: numberingSystem } = options;
if (numberingSystem && locale.includes('-nu-')) {
if (!locale.includes('-u-')) locale += '-u-';
locale += `-nu-${numberingSystem}`;
}
if (options.style === 'unit' && !$0c1d5654b62fc485$var$supportsUnit) {
var _UNITS_unit;
let { unit: unit, unitDisplay: unitDisplay = 'short' } = options;
if (!unit) throw new Error('unit option must be provided with style: "unit"');
if (!((_UNITS_unit = $0c1d5654b62fc485$var$UNITS[unit]) === null || _UNITS_unit === void 0 ? void 0 : _UNITS_unit[unitDisplay])) throw new Error(`Unsupported unit ${unit} with unitDisplay = ${unitDisplay}`);
options = {
...options,
style: 'decimal'
};
}
let cacheKey = locale + (options ? Object.entries(options).sort((a, b)=>a[0] < b[0] ? -1 : 1).join() : '');
if ($0c1d5654b62fc485$var$formatterCache.has(cacheKey)) return $0c1d5654b62fc485$var$formatterCache.get(cacheKey);
let numberFormatter = new Intl.NumberFormat(locale, options);
$0c1d5654b62fc485$var$formatterCache.set(cacheKey, numberFormatter);
return numberFormatter;
}
function $0c1d5654b62fc485$export$711b50b3c525e0f2(numberFormat, signDisplay, num) {
if (signDisplay === 'auto') return numberFormat.format(num);
else if (signDisplay === 'never') return numberFormat.format(Math.abs(num));
else {
let needsPositiveSign = false;
if (signDisplay === 'always') needsPositiveSign = num > 0 || Object.is(num, 0);
else if (signDisplay === 'exceptZero') {
if (Object.is(num, -0) || Object.is(num, 0)) num = Math.abs(num);
else needsPositiveSign = num > 0;
}
if (needsPositiveSign) {
let negative = numberFormat.format(-num);
let noSign = numberFormat.format(num);
// ignore RTL/LTR marker character
let minus = negative.replace(noSign, '').replace(/\u200e|\u061C/, '');
if ([
...minus
].length !== 1) console.warn('@react-aria/i18n polyfill for NumberFormat signDisplay: Unsupported case');
let positive = negative.replace(noSign, '!!!').replace(minus, '+').replace('!!!', noSign);
return positive;
} else return numberFormat.format(num);
}
}
//# sourceMappingURL=NumberFormatter.main.js.map
@@ -0,0 +1,13 @@
/// <reference types="node" />
import * as fs from 'fs';
import type { ErrnoException } from '../types';
export declare type StatAsynchronousMethod = (path: string, callback: (error: ErrnoException | null, stats: fs.Stats) => void) => void;
export declare type StatSynchronousMethod = (path: string) => fs.Stats;
export interface FileSystemAdapter {
lstat: StatAsynchronousMethod;
stat: StatAsynchronousMethod;
lstatSync: StatSynchronousMethod;
statSync: StatSynchronousMethod;
}
export declare const FILE_SYSTEM_ADAPTER: FileSystemAdapter;
export declare function createFileSystemAdapter(fsMethods?: Partial<FileSystemAdapter>): FileSystemAdapter;
@@ -0,0 +1,6 @@
declare function useSet<K>(initialValue?: Iterable<K>): readonly [Set<K>, {
readonly add: (this: unknown, key: K) => void;
readonly remove: (this: unknown, key: K) => void;
readonly reset: (this: unknown) => void;
}];
export default useSet;
@@ -0,0 +1,32 @@
/**
* @author Toru Nagashima <https://github.com/mysticatea>
* See LICENSE file in root directory for full license.
*/
"use strict"
module.exports = {
meta: {
docs: {
description: "disallow spread elements.",
category: "ES2015",
recommended: false,
url:
"http://mysticatea.github.io/eslint-plugin-es/rules/no-spread-elements.html",
},
fixable: null,
messages: {
forbidden: "ES2015 spread elements are forbidden.",
},
schema: [],
type: "problem",
},
create(context) {
return {
":matches(ArrayExpression, CallExpression, NewExpression) > SpreadElement"(
node
) {
context.report({ node, messageId: "forbidden" })
},
}
},
}
@@ -0,0 +1,107 @@
# is-extglob [![NPM version](https://img.shields.io/npm/v/is-extglob.svg?style=flat)](https://www.npmjs.com/package/is-extglob) [![NPM downloads](https://img.shields.io/npm/dm/is-extglob.svg?style=flat)](https://npmjs.org/package/is-extglob) [![Build Status](https://img.shields.io/travis/jonschlinkert/is-extglob.svg?style=flat)](https://travis-ci.org/jonschlinkert/is-extglob)
> Returns true if a string has an extglob.
## Install
Install with [npm](https://www.npmjs.com/):
```sh
$ npm install --save is-extglob
```
## Usage
```js
var isExtglob = require('is-extglob');
```
**True**
```js
isExtglob('?(abc)');
isExtglob('@(abc)');
isExtglob('!(abc)');
isExtglob('*(abc)');
isExtglob('+(abc)');
```
**False**
Escaped extglobs:
```js
isExtglob('\\?(abc)');
isExtglob('\\@(abc)');
isExtglob('\\!(abc)');
isExtglob('\\*(abc)');
isExtglob('\\+(abc)');
```
Everything else...
```js
isExtglob('foo.js');
isExtglob('!foo.js');
isExtglob('*.js');
isExtglob('**/abc.js');
isExtglob('abc/*.js');
isExtglob('abc/(aaa|bbb).js');
isExtglob('abc/[a-z].js');
isExtglob('abc/{a,b}.js');
isExtglob('abc/?.js');
isExtglob('abc.js');
isExtglob('abc/def/ghi.js');
```
## History
**v2.0**
Adds support for escaping. Escaped exglobs no longer return true.
## About
### Related projects
* [has-glob](https://www.npmjs.com/package/has-glob): Returns `true` if an array has a glob pattern. | [homepage](https://github.com/jonschlinkert/has-glob "Returns `true` if an array has a glob pattern.")
* [is-glob](https://www.npmjs.com/package/is-glob): Returns `true` if the given string looks like a glob pattern or an extglob pattern… [more](https://github.com/jonschlinkert/is-glob) | [homepage](https://github.com/jonschlinkert/is-glob "Returns `true` if the given string looks like a glob pattern or an extglob pattern. This makes it easy to create code that only uses external modules like node-glob when necessary, resulting in much faster code execution and initialization time, and a bet")
* [micromatch](https://www.npmjs.com/package/micromatch): Glob matching for javascript/node.js. A drop-in replacement and faster alternative to minimatch and multimatch. | [homepage](https://github.com/jonschlinkert/micromatch "Glob matching for javascript/node.js. A drop-in replacement and faster alternative to minimatch and multimatch.")
### Contributing
Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new).
### Building docs
_(This document was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme) (a [verb](https://github.com/verbose/verb) generator), please don't edit the readme directly. Any changes to the readme must be made in [.verb.md](.verb.md).)_
To generate the readme and API documentation with [verb](https://github.com/verbose/verb):
```sh
$ npm install -g verb verb-generate-readme && verb
```
### Running tests
Install dev dependencies:
```sh
$ npm install -d && npm test
```
### Author
**Jon Schlinkert**
* [github/jonschlinkert](https://github.com/jonschlinkert)
* [twitter/jonschlinkert](http://twitter.com/jonschlinkert)
### License
Copyright © 2016, [Jon Schlinkert](https://github.com/jonschlinkert).
Released under the [MIT license](https://github.com/jonschlinkert/is-extglob/blob/master/LICENSE).
***
_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.1.31, on October 12, 2016._
@@ -0,0 +1,207 @@
import { isPair } from '../nodes/identity.js';
import { Pair } from '../nodes/Pair.js';
import { YAMLMap } from '../nodes/YAMLMap.js';
import { YAMLSeq } from '../nodes/YAMLSeq.js';
import { resolveEnd } from './resolve-end.js';
import { resolveProps } from './resolve-props.js';
import { containsNewline } from './util-contains-newline.js';
import { mapIncludes } from './util-map-includes.js';
const blockMsg = 'Block collections are not allowed within flow collections';
const isBlock = (token) => token && (token.type === 'block-map' || token.type === 'block-seq');
function resolveFlowCollection({ composeNode, composeEmptyNode }, ctx, fc, onError, tag) {
const isMap = fc.start.source === '{';
const fcName = isMap ? 'flow map' : 'flow sequence';
const NodeClass = (tag?.nodeClass ?? (isMap ? YAMLMap : YAMLSeq));
const coll = new NodeClass(ctx.schema);
coll.flow = true;
const atRoot = ctx.atRoot;
if (atRoot)
ctx.atRoot = false;
if (ctx.atKey)
ctx.atKey = false;
let offset = fc.offset + fc.start.source.length;
for (let i = 0; i < fc.items.length; ++i) {
const collItem = fc.items[i];
const { start, key, sep, value } = collItem;
const props = resolveProps(start, {
flow: fcName,
indicator: 'explicit-key-ind',
next: key ?? sep?.[0],
offset,
onError,
parentIndent: fc.indent,
startOnNewline: false
});
if (!props.found) {
if (!props.anchor && !props.tag && !sep && !value) {
if (i === 0 && props.comma)
onError(props.comma, 'UNEXPECTED_TOKEN', `Unexpected , in ${fcName}`);
else if (i < fc.items.length - 1)
onError(props.start, 'UNEXPECTED_TOKEN', `Unexpected empty item in ${fcName}`);
if (props.comment) {
if (coll.comment)
coll.comment += '\n' + props.comment;
else
coll.comment = props.comment;
}
offset = props.end;
continue;
}
if (!isMap && ctx.options.strict && containsNewline(key))
onError(key, // checked by containsNewline()
'MULTILINE_IMPLICIT_KEY', 'Implicit keys of flow sequence pairs need to be on a single line');
}
if (i === 0) {
if (props.comma)
onError(props.comma, 'UNEXPECTED_TOKEN', `Unexpected , in ${fcName}`);
}
else {
if (!props.comma)
onError(props.start, 'MISSING_CHAR', `Missing , between ${fcName} items`);
if (props.comment) {
let prevItemComment = '';
loop: for (const st of start) {
switch (st.type) {
case 'comma':
case 'space':
break;
case 'comment':
prevItemComment = st.source.substring(1);
break loop;
default:
break loop;
}
}
if (prevItemComment) {
let prev = coll.items[coll.items.length - 1];
if (isPair(prev))
prev = prev.value ?? prev.key;
if (prev.comment)
prev.comment += '\n' + prevItemComment;
else
prev.comment = prevItemComment;
props.comment = props.comment.substring(prevItemComment.length + 1);
}
}
}
if (!isMap && !sep && !props.found) {
// item is a value in a seq
// → key & sep are empty, start does not include ? or :
const valueNode = value
? composeNode(ctx, value, props, onError)
: composeEmptyNode(ctx, props.end, sep, null, props, onError);
coll.items.push(valueNode);
offset = valueNode.range[2];
if (isBlock(value))
onError(valueNode.range, 'BLOCK_IN_FLOW', blockMsg);
}
else {
// item is a key+value pair
// key value
ctx.atKey = true;
const keyStart = props.end;
const keyNode = key
? composeNode(ctx, key, props, onError)
: composeEmptyNode(ctx, keyStart, start, null, props, onError);
if (isBlock(key))
onError(keyNode.range, 'BLOCK_IN_FLOW', blockMsg);
ctx.atKey = false;
// value properties
const valueProps = resolveProps(sep ?? [], {
flow: fcName,
indicator: 'map-value-ind',
next: value,
offset: keyNode.range[2],
onError,
parentIndent: fc.indent,
startOnNewline: false
});
if (valueProps.found) {
if (!isMap && !props.found && ctx.options.strict) {
if (sep)
for (const st of sep) {
if (st === valueProps.found)
break;
if (st.type === 'newline') {
onError(st, 'MULTILINE_IMPLICIT_KEY', 'Implicit keys of flow sequence pairs need to be on a single line');
break;
}
}
if (props.start < valueProps.found.offset - 1024)
onError(valueProps.found, 'KEY_OVER_1024_CHARS', 'The : indicator must be at most 1024 chars after the start of an implicit flow sequence key');
}
}
else if (value) {
if ('source' in value && value.source?.[0] === ':')
onError(value, 'MISSING_CHAR', `Missing space after : in ${fcName}`);
else
onError(valueProps.start, 'MISSING_CHAR', `Missing , or : between ${fcName} items`);
}
// value value
const valueNode = value
? composeNode(ctx, value, valueProps, onError)
: valueProps.found
? composeEmptyNode(ctx, valueProps.end, sep, null, valueProps, onError)
: null;
if (valueNode) {
if (isBlock(value))
onError(valueNode.range, 'BLOCK_IN_FLOW', blockMsg);
}
else if (valueProps.comment) {
if (keyNode.comment)
keyNode.comment += '\n' + valueProps.comment;
else
keyNode.comment = valueProps.comment;
}
const pair = new Pair(keyNode, valueNode);
if (ctx.options.keepSourceTokens)
pair.srcToken = collItem;
if (isMap) {
const map = coll;
if (mapIncludes(ctx, map.items, keyNode))
onError(keyStart, 'DUPLICATE_KEY', 'Map keys must be unique');
map.items.push(pair);
}
else {
const map = new YAMLMap(ctx.schema);
map.flow = true;
map.items.push(pair);
const endRange = (valueNode ?? keyNode).range;
map.range = [keyNode.range[0], endRange[1], endRange[2]];
coll.items.push(map);
}
offset = valueNode ? valueNode.range[2] : valueProps.end;
}
}
const expectedEnd = isMap ? '}' : ']';
const [ce, ...ee] = fc.end;
let cePos = offset;
if (ce?.source === expectedEnd)
cePos = ce.offset + ce.source.length;
else {
const name = fcName[0].toUpperCase() + fcName.substring(1);
const msg = atRoot
? `${name} must end with a ${expectedEnd}`
: `${name} in block collection must be sufficiently indented and end with a ${expectedEnd}`;
onError(offset, atRoot ? 'MISSING_CHAR' : 'BAD_INDENT', msg);
if (ce && ce.source.length !== 1)
ee.unshift(ce);
}
if (ee.length > 0) {
const end = resolveEnd(ee, cePos, ctx.options.strict, onError);
if (end.comment) {
if (coll.comment)
coll.comment += '\n' + end.comment;
else
coll.comment = end.comment;
}
coll.range = [fc.offset, cePos, end.offset];
}
else {
coll.range = [fc.offset, cePos, cePos];
}
return coll;
}
export { resolveFlowCollection };
@@ -0,0 +1 @@
{"version":3,"file":"isAnyAncestorBindingConstraintsWithServiceId.d.ts","sourceRoot":"","sources":["../../../../src/binding/calculations/isAnyAncestorBindingConstraintsWithServiceId.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAKvD,wBAAgB,4CAA4C,CAC1D,SAAS,EAAE,iBAAiB,GAC3B,CAAC,WAAW,EAAE,kBAAkB,KAAK,OAAO,CAI9C"}
@@ -0,0 +1,20 @@
root = true
[*]
indent_style = tab
indent_size = 4
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
max_line_length = 150
[CHANGELOG.md]
indent_style = space
indent_size = 2
[*.json]
max_line_length = off
[Makefile]
max_line_length = off
@@ -0,0 +1,11 @@
"use strict";
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
Object.defineProperty(exports, "__esModule", {
value: true
});
exports["default"] = void 0;
var _react = require("react");
var _createEffectWithTarget = _interopRequireDefault(require("./createEffectWithTarget"));
var useEffectWithTarget = (0, _createEffectWithTarget["default"])(_react.useLayoutEffect);
var _default = exports["default"] = useEffectWithTarget;
@@ -0,0 +1 @@
{"mappings":";AAAA,4BAAiB;IAAG,eAAe,CAAC,gBAAa,CAAC;AAClD","sources":["packages/@react-aria/breadcrumbs/intl/ro-RO.json"],"sourcesContent":["{\n \"breadcrumbs\": \"Miez de pâine\"\n}\n"],"names":[],"version":3,"file":"ro-RO.module.js.map"}
@@ -0,0 +1 @@
{"version":3,"file":"magic-string.es.mjs","sources":["../src/BitSet.js","../src/Chunk.js","../src/SourceMap.js","../src/utils/guessIndent.js","../src/utils/getRelativePath.js","../src/utils/isObject.js","../src/utils/getLocator.js","../src/utils/Mappings.js","../src/MagicString.js","../src/Bundle.js"],"sourcesContent":["export default class BitSet {\n\tconstructor(arg) {\n\t\tthis.bits = arg instanceof BitSet ? arg.bits.slice() : [];\n\t}\n\n\tadd(n) {\n\t\tthis.bits[n >> 5] |= 1 << (n & 31);\n\t}\n\n\thas(n) {\n\t\treturn !!(this.bits[n >> 5] & (1 << (n & 31)));\n\t}\n}\n","export default class Chunk {\n\tconstructor(start, end, content) {\n\t\tthis.start = start;\n\t\tthis.end = end;\n\t\tthis.original = content;\n\n\t\tthis.intro = '';\n\t\tthis.outro = '';\n\n\t\tthis.content = content;\n\t\tthis.storeName = false;\n\t\tthis.edited = false;\n\n\t\tif (DEBUG) {\n\t\t\t// we make these non-enumerable, for sanity while debugging\n\t\t\tObject.defineProperties(this, {\n\t\t\t\tprevious: { writable: true, value: null },\n\t\t\t\tnext: { writable: true, value: null },\n\t\t\t});\n\t\t} else {\n\t\t\tthis.previous = null;\n\t\t\tthis.next = null;\n\t\t}\n\t}\n\n\tappendLeft(content) {\n\t\tthis.outro += content;\n\t}\n\n\tappendRight(content) {\n\t\tthis.intro = this.intro + content;\n\t}\n\n\tclone() {\n\t\tconst chunk = new Chunk(this.start, this.end, this.original);\n\n\t\tchunk.intro = this.intro;\n\t\tchunk.outro = this.outro;\n\t\tchunk.content = this.content;\n\t\tchunk.storeName = this.storeName;\n\t\tchunk.edited = this.edited;\n\n\t\treturn chunk;\n\t}\n\n\tcontains(index) {\n\t\treturn this.start < index && index < this.end;\n\t}\n\n\teachNext(fn) {\n\t\tlet chunk = this;\n\t\twhile (chunk) {\n\t\t\tfn(chunk);\n\t\t\tchunk = chunk.next;\n\t\t}\n\t}\n\n\teachPrevious(fn) {\n\t\tlet chunk = this;\n\t\twhile (chunk) {\n\t\t\tfn(chunk);\n\t\t\tchunk = chunk.previous;\n\t\t}\n\t}\n\n\tedit(content, storeName, contentOnly) {\n\t\tthis.content = content;\n\t\tif (!contentOnly) {\n\t\t\tthis.intro = '';\n\t\t\tthis.outro = '';\n\t\t}\n\t\tthis.storeName = storeName;\n\n\t\tthis.edited = true;\n\n\t\treturn this;\n\t}\n\n\tprependLeft(content) {\n\t\tthis.outro = content + this.outro;\n\t}\n\n\tprependRight(content) {\n\t\tthis.intro = content + this.intro;\n\t}\n\n\treset() {\n\t\tthis.intro = '';\n\t\tthis.outro = '';\n\t\tif (this.edited) {\n\t\t\tthis.content = this.original;\n\t\t\tthis.storeName = false;\n\t\t\tthis.edited = false;\n\t\t}\n\t}\n\n\tsplit(index) {\n\t\tconst sliceIndex = index - this.start;\n\n\t\tconst originalBefore = this.original.slice(0, sliceIndex);\n\t\tconst originalAfter = this.original.slice(sliceIndex);\n\n\t\tthis.original = originalBefore;\n\n\t\tconst newChunk = new Chunk(index, this.end, originalAfter);\n\t\tnewChunk.outro = this.outro;\n\t\tthis.outro = '';\n\n\t\tthis.end = index;\n\n\t\tif (this.edited) {\n\t\t\t// after split we should save the edit content record into the correct chunk\n\t\t\t// to make sure sourcemap correct\n\t\t\t// For example:\n\t\t\t// ' test'.trim()\n\t\t\t// split -> ' ' + 'test'\n\t\t\t// ✔️ edit -> '' + 'test'\n\t\t\t// ✖️ edit -> 'test' + ''\n\t\t\t// TODO is this block necessary?...\n\t\t\tnewChunk.edit('', false);\n\t\t\tthis.content = '';\n\t\t} else {\n\t\t\tthis.content = originalBefore;\n\t\t}\n\n\t\tnewChunk.next = this.next;\n\t\tif (newChunk.next) newChunk.next.previous = newChunk;\n\t\tnewChunk.previous = this;\n\t\tthis.next = newChunk;\n\n\t\treturn newChunk;\n\t}\n\n\ttoString() {\n\t\treturn this.intro + this.content + this.outro;\n\t}\n\n\ttrimEnd(rx) {\n\t\tthis.outro = this.outro.replace(rx, '');\n\t\tif (this.outro.length) return true;\n\n\t\tconst trimmed = this.content.replace(rx, '');\n\n\t\tif (trimmed.length) {\n\t\t\tif (trimmed !== this.content) {\n\t\t\t\tthis.split(this.start + trimmed.length).edit('', undefined, true);\n\t\t\t\tif (this.edited) {\n\t\t\t\t\t// save the change, if it has been edited\n\t\t\t\t\tthis.edit(trimmed, this.storeName, true);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn true;\n\t\t} else {\n\t\t\tthis.edit('', undefined, true);\n\n\t\t\tthis.intro = this.intro.replace(rx, '');\n\t\t\tif (this.intro.length) return true;\n\t\t}\n\t}\n\n\ttrimStart(rx) {\n\t\tthis.intro = this.intro.replace(rx, '');\n\t\tif (this.intro.length) return true;\n\n\t\tconst trimmed = this.content.replace(rx, '');\n\n\t\tif (trimmed.length) {\n\t\t\tif (trimmed !== this.content) {\n\t\t\t\tconst newChunk = this.split(this.end - trimmed.length);\n\t\t\t\tif (this.edited) {\n\t\t\t\t\t// save the change, if it has been edited\n\t\t\t\t\tnewChunk.edit(trimmed, this.storeName, true);\n\t\t\t\t}\n\t\t\t\tthis.edit('', undefined, true);\n\t\t\t}\n\t\t\treturn true;\n\t\t} else {\n\t\t\tthis.edit('', undefined, true);\n\n\t\t\tthis.outro = this.outro.replace(rx, '');\n\t\t\tif (this.outro.length) return true;\n\t\t}\n\t}\n}\n","import { encode } from '@jridgewell/sourcemap-codec';\n\nfunction getBtoa() {Line truncated
@@ -0,0 +1,38 @@
var RegistryBase = (function () {
function RegistryBase() {
this._registryMap = new Map();
}
RegistryBase.prototype.entries = function () {
return this._registryMap.entries();
};
RegistryBase.prototype.getAll = function (key) {
this.ensure(key);
return this._registryMap.get(key);
};
RegistryBase.prototype.get = function (key) {
this.ensure(key);
var value = this._registryMap.get(key);
return value[value.length - 1] || null;
};
RegistryBase.prototype.set = function (key, value) {
this.ensure(key);
this._registryMap.get(key).push(value);
};
RegistryBase.prototype.setAll = function (key, value) {
this._registryMap.set(key, value);
};
RegistryBase.prototype.has = function (key) {
this.ensure(key);
return this._registryMap.get(key).length > 0;
};
RegistryBase.prototype.clear = function () {
this._registryMap.clear();
};
RegistryBase.prototype.ensure = function (key) {
if (!this._registryMap.has(key)) {
this._registryMap.set(key, []);
}
};
return RegistryBase;
}());
export default RegistryBase;
@@ -0,0 +1,39 @@
// Scottish Gaelic [gd]
import dayjs from '../index';
var locale = {
name: 'gd',
weekdays: 'Didòmhnaich_Diluain_Dimàirt_Diciadain_Diardaoin_Dihaoine_Disathairne'.split('_'),
months: 'Am Faoilleach_An Gearran_Am Màrt_An Giblean_An Cèitean_An t-Ògmhios_An t-Iuchar_An Lùnastal_An t-Sultain_An Dàmhair_An t-Samhain_An Dùbhlachd'.split('_'),
weekStart: 1,
weekdaysShort: 'Did_Dil_Dim_Dic_Dia_Dih_Dis'.split('_'),
monthsShort: 'Faoi_Gear_Màrt_Gibl_Cèit_Ògmh_Iuch_Lùn_Sult_Dàmh_Samh_Dùbh'.split('_'),
weekdaysMin: 'Dò_Lu_Mà_Ci_Ar_Ha_Sa'.split('_'),
ordinal: function ordinal(n) {
return n;
},
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'
},
relativeTime: {
future: 'ann an %s',
past: 'bho chionn %s',
s: 'beagan diogan',
m: 'mionaid',
mm: '%d mionaidean',
h: 'uair',
hh: '%d uairean',
d: 'latha',
dd: '%d latha',
M: 'mìos',
MM: '%d mìosan',
y: 'bliadhna',
yy: '%d bliadhna'
}
};
dayjs.locale(locale, null, true);
export default locale;
@@ -0,0 +1 @@
{"name":"@types/type-is","version":"1.6.7","requiresBuild":false,"files":{"LICENSE":{"checkedAt":1794532101869,"integrity":"sha512-HQaIQk9pwOcyKutyDk4o2a87WnotwYuLGYFW43emGm4FvIJFKPyg+OYaw5sTegKAKf+C5SKa1ACjzCLivbaHrQ==","mode":420,"size":1141},"README.md":{"checkedAt":1794532101869,"integrity":"sha512-SHWsVVFzAwfizWFD70E5nunLSOUiHuZGglyYnCZdfcRI/QJZqaXCGJuF/zgUNu7znZGdYVBeyxRoFuZ5Vpm3gg==","mode":420,"size":1275},"index.d.ts":{"checkedAt":1794532101869,"integrity":"sha512-tY4kphPeVo+TJByko72O0xALcho7EN/XBrGpVuAB21AIWHSG1yX04xchUCmfYmsN7O8EH0Ny+hVifUGXvYfdAA==","mode":420,"size":628},"package.json":{"checkedAt":1794532101870,"integrity":"sha512-MoEquWJSsGbM2qDh3dOHRGXwoWSwQjiphDlSLDEvJHDPMwXAmd22SDRDIN3BXPyuq7lXZCC7jzf3S8fX4IajTg==","mode":420,"size":857}}}
@@ -0,0 +1,28 @@
type VisitorKeys$1 = {
readonly [type: string]: ReadonlyArray<string>;
};
/**
* @typedef {{ readonly [type: string]: ReadonlyArray<string> }} VisitorKeys
*/
/**
* @type {VisitorKeys}
*/
declare const KEYS: VisitorKeys$1;
/**
* Get visitor keys of a given node.
* @param {Object} node The AST node to get keys.
* @returns {readonly string[]} Visitor keys of the node.
*/
declare function getKeys(node: Object): readonly string[];
/**
* Make the union set with `KEYS` and given keys.
* @param {VisitorKeys} additionalKeys The additional keys.
* @returns {VisitorKeys} The union set.
*/
declare function unionWith(additionalKeys: VisitorKeys): VisitorKeys;
type VisitorKeys = VisitorKeys$1;
export { KEYS, getKeys, unionWith };
export type { VisitorKeys };
@@ -0,0 +1,2 @@
export {};
//# sourceMappingURL=getDescription.spec.d.ts.map
@@ -0,0 +1,140 @@
# accepts
[![NPM Version][npm-version-image]][npm-url]
[![NPM Downloads][npm-downloads-image]][npm-url]
[![Node.js Version][node-version-image]][node-version-url]
[![Build Status][github-actions-ci-image]][github-actions-ci-url]
[![Test Coverage][coveralls-image]][coveralls-url]
Higher level content negotiation based on [negotiator](https://www.npmjs.com/package/negotiator).
Extracted from [koa](https://www.npmjs.com/package/koa) for general use.
In addition to negotiator, it allows:
- Allows types as an array or arguments list, ie `(['text/html', 'application/json'])`
as well as `('text/html', 'application/json')`.
- Allows type shorthands such as `json`.
- Returns `false` when no types match
- Treats non-existent headers as `*`
## Installation
This is a [Node.js](https://nodejs.org/en/) module available through the
[npm registry](https://www.npmjs.com/). Installation is done using the
[`npm install` command](https://docs.npmjs.com/getting-started/installing-npm-packages-locally):
```sh
$ npm install accepts
```
## API
```js
var accepts = require('accepts')
```
### accepts(req)
Create a new `Accepts` object for the given `req`.
#### .charset(charsets)
Return the first accepted charset. If nothing in `charsets` is accepted,
then `false` is returned.
#### .charsets()
Return the charsets that the request accepts, in the order of the client's
preference (most preferred first).
#### .encoding(encodings)
Return the first accepted encoding. If nothing in `encodings` is accepted,
then `false` is returned.
#### .encodings()
Return the encodings that the request accepts, in the order of the client's
preference (most preferred first).
#### .language(languages)
Return the first accepted language. If nothing in `languages` is accepted,
then `false` is returned.
#### .languages()
Return the languages that the request accepts, in the order of the client's
preference (most preferred first).
#### .type(types)
Return the first accepted type (and it is returned as the same text as what
appears in the `types` array). If nothing in `types` is accepted, then `false`
is returned.
The `types` array can contain full MIME types or file extensions. Any value
that is not a full MIME type is passed to `require('mime-types').lookup`.
#### .types()
Return the types that the request accepts, in the order of the client's
preference (most preferred first).
## Examples
### Simple type negotiation
This simple example shows how to use `accepts` to return a different typed
respond body based on what the client wants to accept. The server lists it's
preferences in order and will get back the best match between the client and
server.
```js
var accepts = require('accepts')
var http = require('http')
function app (req, res) {
var accept = accepts(req)
// the order of this list is significant; should be server preferred order
switch (accept.type(['json', 'html'])) {
case 'json':
res.setHeader('Content-Type', 'application/json')
res.write('{"hello":"world!"}')
break
case 'html':
res.setHeader('Content-Type', 'text/html')
res.write('<b>hello, world!</b>')
break
default:
// the fallback is text/plain, so no need to specify it above
res.setHeader('Content-Type', 'text/plain')
res.write('hello, world!')
break
}
res.end()
}
http.createServer(app).listen(3000)
```
You can test this out with the cURL program:
```sh
curl -I -H'Accept: text/html' http://localhost:3000/
```
## License
[MIT](LICENSE)
[coveralls-image]: https://badgen.net/coveralls/c/github/jshttp/accepts/master
[coveralls-url]: https://coveralls.io/r/jshttp/accepts?branch=master
[github-actions-ci-image]: https://badgen.net/github/checks/jshttp/accepts/master?label=ci
[github-actions-ci-url]: https://github.com/jshttp/accepts/actions/workflows/ci.yml
[node-version-image]: https://badgen.net/npm/node/accepts
[node-version-url]: https://nodejs.org/en/download
[npm-downloads-image]: https://badgen.net/npm/dm/accepts
[npm-url]: https://npmjs.org/package/accepts
[npm-version-image]: https://badgen.net/npm/v/accepts
@@ -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 a b c d e f","194":"0 1 2 3 4 5 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":"0 1 2 3 4 5 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 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 0C 1C"},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 a b c d e f","194":"0 1 2 3 4 5 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 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 KC LC Q H R WC FD GD HD ID NC uC JD OC","194":"0 1 2 3 4 5 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 RC iC jC kC lC mC gD SC nC oC pC qC rC sC tC"},H:{"2":"hD"},I:{"2":"TC J I iD jD kD lD vC mD nD"},J:{"2":"D A"},K:{"2":"A B C NC uC OC","194":"H"},L:{"194":"I"},M:{"2":"MC"},N:{"2":"A B"},O:{"2":"PC"},P:{"2":"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:{"2":"zD"},R:{"2":"0D"},S:{"2":"1D 2D"}},B:7,C:"Customizable Select element",D:true};
@@ -0,0 +1,21 @@
import { NodeIQQNTWrapperSession } from '../wrapper';
import { ListenerNamingMapping, ServiceNamingMapping } from '../index';
type EnsureFunc<T> = T extends (...args: any) => any ? T : never;
type FuncKeys<T> = Extract<{
[K in keyof T]: EnsureFunc<T[K]> extends never ? never : K;
}[keyof T], string>;
export type ListenerClassBase = Record<string, string>;
export declare class NTEventWrapper {
private readonly WrapperSession;
private readonly listenerManager;
private readonly EventTask;
constructor(wrapperSession: NodeIQQNTWrapperSession);
createProxyDispatch(ListenerMainName: string): any;
createEventFunction<Service extends keyof ServiceNamingMapping, ServiceMethod extends FuncKeys<ServiceNamingMapping[Service]>, T extends (...args: any) => any = EnsureFunc<ServiceNamingMapping[Service][ServiceMethod]>>(eventName: `${Service}/${ServiceMethod}`): T | undefined;
createListenerFunction<T>(listenerMainName: string, uniqueCode?: string): T;
dispatcherListener(ListenerMainName: string, ListenerSubName: string, ...args: any[]): Promise<void>;
callNoListenerEvent<Service extends keyof ServiceNamingMapping, ServiceMethod extends FuncKeys<ServiceNamingMapping[Service]>, EventType extends (...args: any) => any = EnsureFunc<ServiceNamingMapping[Service][ServiceMethod]>>(serviceAndMethod: `${Service}/${ServiceMethod}`, ...args: Parameters<EventType>): Promise<Awaited<ReturnType<EventType>>>;
registerListen<Listener extends keyof ListenerNamingMapping, ListenerMethod extends FuncKeys<ListenerNamingMapping[Listener]>, ListenerType extends (...args: any) => any = EnsureFunc<ListenerNamingMapping[Listener][ListenerMethod]>>(listenerAndMethod: `${Listener}/${ListenerMethod}`, checker: (...args: Parameters<ListenerType>) => boolean, waitTimes?: number, timeout?: number): Promise<Parameters<ListenerType>>;
callNormalEventV2<Service extends keyof ServiceNamingMapping, ServiceMethod extends FuncKeys<ServiceNamingMapping[Service]>, Listener extends keyof ListenerNamingMapping, ListenerMethod extends FuncKeys<ListenerNamingMapping[Listener]>, EventType extends (...args: any) => any = EnsureFunc<ServiceNamingMapping[Service][ServiceMethod]>, ListenerType extends (...args: any) => any = EnsureFunc<ListenerNamingMapping[Listener][ListenerMethod]>>(serviceAndMethod: `${Service}/${ServiceMethod}`, listenerAndMethod: `${Listener}/${ListenerMethod}`, args: Parameters<EventType>, checkerEvent?: (ret: Awaited<ReturnType<EventType>>) => boolean, checkerListener?: (...args: Parameters<ListenerType>) => boolean, callbackTimesToWait?: number, timeout?: number): Promise<[EventRet: Awaited<ReturnType<EventType>>, ...Parameters<ListenerType>]>;
}
export {};
@@ -0,0 +1,44 @@
import Block from '../blots/block.js';
import Break from '../blots/break.js';
import Cursor from '../blots/cursor.js';
import Inline from '../blots/inline.js';
import TextBlot, { escapeText } from '../blots/text.js';
import Container from '../blots/container.js';
import Quill from '../core/quill.js';
class CodeBlockContainer extends Container {
static create(value) {
const domNode = super.create(value);
domNode.setAttribute('spellcheck', 'false');
return domNode;
}
code(index, length) {
return this.children
// @ts-expect-error
.map(child => child.length() <= 1 ? '' : child.domNode.innerText).join('\n').slice(index, index + length);
}
html(index, length) {
// `\n`s are needed in order to support empty lines at the beginning and the end.
// https://html.spec.whatwg.org/multipage/syntax.html#element-restrictions
return `<pre>\n${escapeText(this.code(index, length))}\n</pre>`;
}
}
class CodeBlock extends Block {
static TAB = ' ';
static register() {
Quill.register(CodeBlockContainer);
}
}
class Code extends Inline {}
Code.blotName = 'code';
Code.tagName = 'CODE';
CodeBlock.blotName = 'code-block';
CodeBlock.className = 'ql-code-block';
CodeBlock.tagName = 'DIV';
CodeBlockContainer.blotName = 'code-block-container';
CodeBlockContainer.className = 'ql-code-block-container';
CodeBlockContainer.tagName = 'DIV';
CodeBlockContainer.allowedChildren = [CodeBlock];
CodeBlock.allowedChildren = [TextBlot, Break, Cursor];
CodeBlock.requiredContainer = CodeBlockContainer;
export { Code, CodeBlockContainer, CodeBlock as default };
//# sourceMappingURL=code.js.map
@@ -0,0 +1,59 @@
"use strict"
const ERROR_MESSAGE_REQUIRES_PARSER_SERVICES =
"You have used a rule which requires type information, but don't have parserOptions set to generate type information for this file. See https://typescript-eslint.io/getting-started/typed-linting for enabling linting with type information."
const ERROR_MESSAGE_UNKNOWN_PARSER =
'Note: detected a parser other than @typescript-eslint/parser. Make sure the parser is configured to forward "parserOptions.project" to @typescript-eslint/parser.'
/**
* Checks if the parser seems to be `@typescript-eslint/parser`.
* - Implementation from `@typescript-eslint/utils`. @see https://github.com/typescript-eslint/typescript-eslint/blob/3e545207f0e34611f528128fc699b25091bc40b3/packages/utils/src/eslint-utils/parserSeemsToBeTSESLint.ts
*
* @param {string | undefined} parser - The parser to check.
* @returns {boolean} `true` if the parser seems to be `@typescript-eslint/parser`, `false` otherwise.
*/
function parserSeemsToBeTSESLint(parser) {
return !!parser && /(?:typescript-eslint|\.\.)[\w/\\]*parser/.test(parser)
}
/**
* Throws a detailed error if parser services are not available.
* @param {string | undefined} parser - The parser name to mention in the error message.
*/
function throwError(parser) {
const messages = [
ERROR_MESSAGE_REQUIRES_PARSER_SERVICES,
`Parser: ${parser || "(unknown)"}`,
!parserSeemsToBeTSESLint(parser) && ERROR_MESSAGE_UNKNOWN_PARSER,
].filter(Boolean)
throw new Error(messages.join("\n"))
}
/**
* Get the TypeScript parser services.
* - Partial implementation from `@typescript-eslint/utils`. @see https://github.com/typescript-eslint/typescript-eslint/blob/3e545207f0e34611f528128fc699b25091bc40b3/packages/utils/src/eslint-utils/getParserServices.ts
*
* @param {import('eslint').Rule.RuleContext} context - Rule context.
* @returns {import('@typescript-eslint/parser').ParserServices | null} Parser services if TypeScript is being used, `null` otherwise.
* @throws {Error} If parser services are present but incomplete.
*/
module.exports = function getParserServices(context) {
const parserServices = context.sourceCode.parserServices
if (
!parserServices ||
parserServices.esTreeNodeToTSNodeMap == null ||
parserServices.tsNodeToESTreeNodeMap == null
) {
// Not using TypeScript parser, or no type info: return null for legacy/JS support.
return null
}
if (parserServices.program == null) {
const parser =
context.parserPath || context.languageOptions?.parser?.meta?.name
throwError(parser)
}
return parserServices
}
@@ -0,0 +1,31 @@
/**
* Checks if `value` is the
* [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
* of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
*
* @static
* @memberOf _
* @since 0.1.0
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is an object, else `false`.
* @example
*
* _.isObject({});
* // => true
*
* _.isObject([1, 2, 3]);
* // => true
*
* _.isObject(_.noop);
* // => true
*
* _.isObject(null);
* // => false
*/
function isObject(value) {
var type = typeof value;
return value != null && (type == 'object' || type == 'function');
}
module.exports = isObject;
@@ -0,0 +1,4 @@
/** @type {Construct} */
export const attention: Construct;
import type { Construct } from 'micromark-util-types';
//# sourceMappingURL=attention.d.ts.map
@@ -0,0 +1,8 @@
"use client";
import {
card_body_default
} from "./chunk-LGSBTEIA.mjs";
import "./chunk-XHGGCEVJ.mjs";
export {
card_body_default as default
};
@@ -0,0 +1,199 @@
/**
* @file isTtf
* @author junmer
*
* @see http://www.adobe.com/devnet/font.html
* https://developer.apple.com/fonts/TrueType-Reference-Manual/
* ynakajima/ttf.js
*/
/* eslint-env node */
'use strict';
var toArrayBuffer = require('b3b').b2ab;
/**
* isString
*
* @param {any} val val
* @return {boolean} isString
*/
function isString(val) {
return '[object String]' === Object.prototype.toString.call(val);
}
/**
* ゼロパディング
*
* @param {string} _char char
* @param {number} width width
* @return {string} paded str
*/
function padZero(_char, width) {
return ('0000000000000000000000000000000000000000000000000000000000000000' + _char)
.slice(-1 * width);
}
/**
* getViewFixed
*
* @param {DataView} view DataView
* @param {number} byteOffset byteOffset
* @param {Function} next isnext
* @return {number} fixed number
*/
function getViewFixed(view, byteOffset, next) {
var val = view.getInt32(byteOffset, next) / 65536.0;
return Math.ceil(val * 100000) / 100000;
}
/**
* getViewString
*
* @param {DataView} view DataView
* @param {number} strLen string length
* @param {number} byteOffset byteOffset
* @return {string} string
*/
function getViewString(view, strLen, byteOffset) {
var str = '';
for (var j = 0; j < strLen; ++j) {
var c = view.getUint8(byteOffset + j);
str += String.fromCharCode(c);
}
return str;
}
/**
* TableDirectory Constructor
*
* @param {DataView} view DataView
* @param {number} offset DataView offset
* @param {number} numTables table num
*/
function TTFTableDirectory(view, offset, numTables) {
this.init(view, offset, numTables);
}
/**
* 初期化
*
* @param {DataView} view DataView
* @param {number} offset DataView offset
* @param {number} numTables table num
*/
TTFTableDirectory.prototype.init = function (view, offset, numTables) {
for (var i = offset, l = numTables * 16; i < l; i += 16) {
var tag = getViewString(view, 4, i);
var checkSum = padZero(view.getUint32(i + 4, false).toString(16), 8);
var _offset = view.getUint32(i + 8, false);
var length = view.getUint32(i + 12, false);
this[tag] = {
tag: tag,
checkSum: checkSum,
offset: _offset,
length: length
};
}
};
/**
* ttfTables
* @type {Array}
*/
var ttfTables = [
'OS/2',
'cmap',
'glyf',
'head',
'hhea',
'hmtx',
'loca',
'maxp',
'name',
'post'
];
/**
* isTtf
*
* @param {ArrayBuffer|Buffer|String} buffer buffer
* @param {Object} opts opts
* @param {Array} opts.tables tables
* @return {boolean} is ttf
*/
module.exports = function (buffer, opts) {
if (!buffer || !buffer.length) {
return false;
}
opts = opts || {};
var ttf = buffer instanceof ArrayBuffer
? buffer
: isString(buffer)
? toArrayBuffer(new Buffer(buffer, 'binary'))
: toArrayBuffer(buffer);
var view = new DataView(ttf, 0, ttf.byteLength, false);
// version
var version = getViewFixed(view, 0, false);
// version must be 1
if (version !== 1) {
return false;
}
// num tables
var numTables = view.getUint16(4, false);
// num tables must < 100
if (numTables > 100) {
return false;
}
// // searchRenge
// view.getUint16(6, false);
// // entrySelector
// view.getUint16(8, false);
// // rengeShift
// view.getUint16(10, false);
// tableDirectory
var tableDirectory;
try {
// tableDirectoryの取得と各テーブルの初期化
// 12 is offset after rengeShift
tableDirectory = new TTFTableDirectory(view, 12, numTables);
}
catch (ex) {
return false;
}
// 判断 每个 ttf 的 tag 是否存在
// 不需要 全有
var checkFun = 'some';
var checkTables = ttfTables;
// 若指定 tables
// 需要全有
if (opts.tables) {
checkFun = 'every';
checkTables = opts.tables;
}
return checkTables[checkFun](function (tag) {
return tableDirectory.hasOwnProperty(tag);
});
};
@@ -0,0 +1,534 @@
/**
* @fileoverview `CascadingConfigArrayFactory` class.
*
* `CascadingConfigArrayFactory` class has a responsibility:
*
* 1. Handles cascading of config files.
*
* It provides two methods:
*
* - `getConfigArrayForFile(filePath)`
* Get the corresponded configuration of a given file. This method doesn't
* throw even if the given file didn't exist.
* - `clearCache()`
* Clear the internal cache. You have to call this method when
* `additionalPluginPool` was updated if `baseConfig` or `cliConfig` depends
* on the additional plugins. (`CLIEngine#addPlugin()` method calls this.)
*
* @author Toru Nagashima <https://github.com/mysticatea>
*/
//------------------------------------------------------------------------------
// Requirements
//------------------------------------------------------------------------------
import debugOrig from "debug";
import os from "node:os";
import path from "node:path";
import { ConfigArrayFactory } from "./config-array-factory.js";
import {
ConfigArray,
ConfigDependency,
IgnorePattern
} from "./config-array/index.js";
import ConfigValidator from "./shared/config-validator.js";
import { emitDeprecationWarning } from "./shared/deprecation-warnings.js";
const debug = debugOrig("eslintrc:cascading-config-array-factory");
//------------------------------------------------------------------------------
// Helpers
//------------------------------------------------------------------------------
// Define types for VSCode IntelliSense.
/** @typedef {import("./shared/types").ConfigData} ConfigData */
/** @typedef {import("./shared/types").Parser} Parser */
/** @typedef {import("./shared/types").Plugin} Plugin */
/** @typedef {import("./shared/types").Rule} Rule */
/** @typedef {ReturnType<ConfigArrayFactory["create"]>} ConfigArray */
/**
* @typedef {Object} CascadingConfigArrayFactoryOptions
* @property {Map<string,Plugin>} [additionalPluginPool] The map for additional plugins.
* @property {ConfigData} [baseConfig] The config by `baseConfig` option.
* @property {ConfigData} [cliConfig] The config by CLI options (`--env`, `--global`, `--ignore-pattern`, `--parser`, `--parser-options`, `--plugin`, and `--rule`). CLI options overwrite the setting in config files.
* @property {string} [cwd] The base directory to start lookup.
* @property {string} [ignorePath] The path to the alternative file of `.eslintignore`.
* @property {string[]} [rulePaths] The value of `--rulesdir` option.
* @property {string} [specificConfigPath] The value of `--config` option.
* @property {boolean} [useEslintrc] if `false` then it doesn't load config files.
* @property {Function} loadRules The function to use to load rules.
* @property {Map<string,Rule>} builtInRules The rules that are built in to ESLint.
* @property {Object} [resolver=ModuleResolver] The module resolver object.
* @property {string} eslintAllPath The path to the definitions for eslint:all.
* @property {Function} getEslintAllConfig Returns the config data for eslint:all.
* @property {string} eslintRecommendedPath The path to the definitions for eslint:recommended.
* @property {Function} getEslintRecommendedConfig Returns the config data for eslint:recommended.
*/
/**
* @typedef {Object} CascadingConfigArrayFactoryInternalSlots
* @property {ConfigArray} baseConfigArray The config array of `baseConfig` option.
* @property {ConfigData} baseConfigData The config data of `baseConfig` option. This is used to reset `baseConfigArray`.
* @property {ConfigArray} cliConfigArray The config array of CLI options.
* @property {ConfigData} cliConfigData The config data of CLI options. This is used to reset `cliConfigArray`.
* @property {ConfigArrayFactory} configArrayFactory The factory for config arrays.
* @property {Map<string, ConfigArray>} configCache The cache from directory paths to config arrays.
* @property {string} cwd The base directory to start lookup.
* @property {WeakMap<ConfigArray, ConfigArray>} finalizeCache The cache from config arrays to finalized config arrays.
* @property {string} [ignorePath] The path to the alternative file of `.eslintignore`.
* @property {string[]|null} rulePaths The value of `--rulesdir` option. This is used to reset `baseConfigArray`.
* @property {string|null} specificConfigPath The value of `--config` option. This is used to reset `cliConfigArray`.
* @property {boolean} useEslintrc if `false` then it doesn't load config files.
* @property {Function} loadRules The function to use to load rules.
* @property {Map<string,Rule>} builtInRules The rules that are built in to ESLint.
* @property {Object} [resolver=ModuleResolver] The module resolver object.
* @property {string} eslintAllPath The path to the definitions for eslint:all.
* @property {Function} getEslintAllConfig Returns the config data for eslint:all.
* @property {string} eslintRecommendedPath The path to the definitions for eslint:recommended.
* @property {Function} getEslintRecommendedConfig Returns the config data for eslint:recommended.
*/
/** @type {WeakMap<CascadingConfigArrayFactory, CascadingConfigArrayFactoryInternalSlots>} */
const internalSlotsMap = new WeakMap();
/**
* Create the config array from `baseConfig` and `rulePaths`.
* @param {CascadingConfigArrayFactoryInternalSlots} slots The slots.
* @returns {ConfigArray} The config array of the base configs.
*/
function createBaseConfigArray({
configArrayFactory,
baseConfigData,
rulePaths,
cwd,
loadRules
}) {
const baseConfigArray = configArrayFactory.create(
baseConfigData,
{ name: "BaseConfig" }
);
/*
* Create the config array element for the default ignore patterns.
* This element has `ignorePattern` property that ignores the default
* patterns in the current working directory.
*/
baseConfigArray.unshift(configArrayFactory.create(
{ ignorePatterns: IgnorePattern.DefaultPatterns },
{ name: "DefaultIgnorePattern" }
)[0]);
/*
* Load rules `--rulesdir` option as a pseudo plugin.
* Use a pseudo plugin to define rules of `--rulesdir`, so we can validate
* the rule's options with only information in the config array.
*/
if (rulePaths && rulePaths.length > 0) {
baseConfigArray.push({
type: "config",
name: "--rulesdir",
filePath: "",
plugins: {
"": new ConfigDependency({
definition: {
rules: rulePaths.reduce(
(map, rulesPath) => Object.assign(
map,
loadRules(rulesPath, cwd)
),
{}
)
},
filePath: "",
id: "",
importerName: "--rulesdir",
importerPath: ""
})
}
});
}
return baseConfigArray;
}
/**
* Create the config array from CLI options.
* @param {CascadingConfigArrayFactoryInternalSlots} slots The slots.
* @returns {ConfigArray} The config array of the base configs.
*/
function createCLIConfigArray({
cliConfigData,
configArrayFactory,
cwd,
ignorePath,
specificConfigPath
}) {
const cliConfigArray = configArrayFactory.create(
cliConfigData,
{ name: "CLIOptions" }
);
cliConfigArray.unshift(
...(ignorePath
? configArrayFactory.loadESLintIgnore(ignorePath)
: configArrayFactory.loadDefaultESLintIgnore())
);
if (specificConfigPath) {
cliConfigArray.unshift(
...configArrayFactory.loadFile(
specificConfigPath,
{ name: "--config", basePath: cwd }
)
);
}
return cliConfigArray;
}
/**
* The error type when there are files matched by a glob, but all of them have been ignored.
*/
class ConfigurationNotFoundError extends Error {
/**
* @param {string} directoryPath The directory path.
*/
constructor(directoryPath) {
super(`No ESLint configuration found in ${directoryPath}.`);
this.messageTemplate = "no-config-found";
this.messageData = { directoryPath };
}
}
/**
* This class provides the functionality that enumerates every file which is
* matched by given glob patterns and that configuration.
*/
class CascadingConfigArrayFactory {
/**
* Initialize this enumerator.
* @param {CascadingConfigArrayFactoryOptions} options The options.
*/
constructor({
additionalPluginPool = new Map(),
baseConfig: baseConfigData = null,
cliConfig: cliConfigData = null,
cwd = process.cwd(),
ignorePath,
resolvePluginsRelativeTo,
rulePaths = [],
specificConfigPath = null,
useEslintrc = true,
builtInRules = new Map(),
loadRules,
resolver,
eslintRecommendedPath,
getEslintRecommendedConfig,
eslintAllPath,
getEslintAllConfig
} = {}) {
const configArrayFactory = new ConfigArrayFactory({
additionalPluginPool,
cwd,
resolvePluginsRelativeTo,
builtInRules,
resolver,
eslintRecommendedPath,
getEslintRecommendedConfig,
eslintAllPath,
getEslintAllConfig
});
internalSlotsMap.set(this, {
baseConfigArray: createBaseConfigArray({
baseConfigData,
configArrayFactory,
cwd,
rulePaths,
loadRules
}),
baseConfigData,
cliConfigArray: createCLIConfigArray({
cliConfigData,
configArrayFactory,
cwd,
ignorePath,
specificConfigPath
}),
cliConfigData,
configArrayFactory,
configCache: new Map(),
cwd,
finalizeCache: new WeakMap(),
ignorePath,
rulePaths,
specificConfigPath,
useEslintrc,
builtInRules,
loadRules
});
}
/**
* The path to the current working directory.
* This is used by tests.
* @type {string}
*/
get cwd() {
const { cwd } = internalSlotsMap.get(this);
return cwd;
}
/**
* Get the config array of a given file.
* If `filePath` was not given, it returns the config which contains only
* `baseConfigData` and `cliConfigData`.
* @param {string} [filePath] The file path to a file.
* @param {Object} [options] The options.
* @param {boolean} [options.ignoreNotFoundError] If `true` then it doesn't throw `ConfigurationNotFoundError`.
* @returns {ConfigArray} The config array of the file.
*/
getConfigArrayForFile(filePath, { ignoreNotFoundError = false } = {}) {
const {
baseConfigArray,
cliConfigArray,
cwd
} = internalSlotsMap.get(this);
if (!filePath) {
return new ConfigArray(...baseConfigArray, ...cliConfigArray);
}
const directoryPath = path.dirname(path.resolve(cwd, filePath));
debug(`Load config files for ${directoryPath}.`);
return this._finalizeConfigArray(
this._loadConfigInAncestors(directoryPath),
directoryPath,
ignoreNotFoundError
);
}
/**
* Set the config data to override all configs.
* Require to call `clearCache()` method after this method is called.
* @param {ConfigData} configData The config data to override all configs.
* @returns {void}
*/
setOverrideConfig(configData) {
const slots = internalSlotsMap.get(this);
slots.cliConfigData = configData;
}
/**
* Clear config cache.
* @returns {void}
*/
clearCache() {
const slots = internalSlotsMap.get(this);
slots.baseConfigArray = createBaseConfigArray(slots);
slots.cliConfigArray = createCLIConfigArray(slots);
slots.configCache.clear();
}
/**
* Load and normalize config files from the ancestor directories.
* @param {string} directoryPath The path to a leaf directory.
* @param {boolean} configsExistInSubdirs `true` if configurations exist in subdirectories.
* @returns {ConfigArray} The loaded config.
* @throws {Error} If a config file is invalid.
* @private
*/
_loadConfigInAncestors(directoryPath, configsExistInSubdirs = false) {
const {
baseConfigArray,
configArrayFactory,
configCache,
cwd,
useEslintrc
} = internalSlotsMap.get(this);
if (!useEslintrc) {
return baseConfigArray;
}
let configArray = configCache.get(directoryPath);
// Hit cache.
if (configArray) {
debug(`Cache hit: ${directoryPath}.`);
return configArray;
}
debug(`No cache found: ${directoryPath}.`);
const homePath = os.homedir();
// Consider this is root.
if (directoryPath === homePath && cwd !== homePath) {
debug("Stop traversing because of considered root.");
if (configsExistInSubdirs) {
const filePath = ConfigArrayFactory.getPathToConfigFileInDirectory(directoryPath);
if (filePath) {
emitDeprecationWarning(
filePath,
"ESLINT_PERSONAL_CONFIG_SUPPRESS"
);
}
}
return this._cacheConfig(directoryPath, baseConfigArray);
}
// Load the config on this directory.
try {
configArray = configArrayFactory.loadInDirectory(directoryPath);
} catch (error) {
/* istanbul ignore next */
if (error.code === "EACCES") {
debug("Stop traversing because of 'EACCES' error.");
return this._cacheConfig(directoryPath, baseConfigArray);
}
throw error;
}
if (configArray.length > 0 && configArray.isRoot()) {
debug("Stop traversing because of 'root:true'.");
configArray.unshift(...baseConfigArray);
return this._cacheConfig(directoryPath, configArray);
}
// Load from the ancestors and merge it.
const parentPath = path.dirname(directoryPath);
const parentConfigArray = parentPath && parentPath !== directoryPath
? this._loadConfigInAncestors(
parentPath,
configsExistInSubdirs || configArray.length > 0
)
: baseConfigArray;
if (configArray.length > 0) {
configArray.unshift(...parentConfigArray);
} else {
configArray = parentConfigArray;
}
// Cache and return.
return this._cacheConfig(directoryPath, configArray);
}
/**
* Freeze and cache a given config.
* @param {string} directoryPath The path to a directory as a cache key.
* @param {ConfigArray} configArray The config array as a cache value.
* @returns {ConfigArray} The `configArray` (frozen).
*/
_cacheConfig(directoryPath, configArray) {
const { configCache } = internalSlotsMap.get(this);
Object.freeze(configArray);
configCache.set(directoryPath, configArray);
return configArray;
}
/**
* Finalize a given config array.
* Concatenate `--config` and other CLI options.
* @param {ConfigArray} configArray The parent config array.
* @param {string} directoryPath The path to the leaf directory to find config files.
* @param {boolean} ignoreNotFoundError If `true` then it doesn't throw `ConfigurationNotFoundError`.
* @returns {ConfigArray} The loaded config.
* @throws {Error} If a config file is invalid.
* @private
*/
_finalizeConfigArray(configArray, directoryPath, ignoreNotFoundError) {
const {
cliConfigArray,
configArrayFactory,
finalizeCache,
useEslintrc,
builtInRules
} = internalSlotsMap.get(this);
let finalConfigArray = finalizeCache.get(configArray);
if (!finalConfigArray) {
finalConfigArray = configArray;
// Load the personal config if there are no regular config files.
if (
useEslintrc &&
configArray.every(c => !c.filePath) &&
cliConfigArray.every(c => !c.filePath) // `--config` option can be a file.
) {
const homePath = os.homedir();
debug("Loading the config file of the home directory:", homePath);
const personalConfigArray = configArrayFactory.loadInDirectory(
homePath,
{ name: "PersonalConfig" }
);
if (
personalConfigArray.length > 0 &&
!directoryPath.startsWith(homePath)
) {
const lastElement =
personalConfigArray.at(-1);
emitDeprecationWarning(
lastElement.filePath,
"ESLINT_PERSONAL_CONFIG_LOAD"
);
}
finalConfigArray = finalConfigArray.concat(personalConfigArray);
}
// Apply CLI options.
if (cliConfigArray.length > 0) {
finalConfigArray = finalConfigArray.concat(cliConfigArray);
}
// Validate rule settings and environments.
const validator = new ConfigValidator({
builtInRules
});
validator.validateConfigArray(finalConfigArray);
// Cache it.
Object.freeze(finalConfigArray);
finalizeCache.set(configArray, finalConfigArray);
debug(
"Configuration was determined: %o on %s",
finalConfigArray,
directoryPath
);
}
// At least one element (the default ignore patterns) exists.
if (!ignoreNotFoundError && useEslintrc && finalConfigArray.length <= 1) {
throw new ConfigurationNotFoundError(directoryPath);
}
return finalConfigArray;
}
}
//------------------------------------------------------------------------------
// Public Interface
//------------------------------------------------------------------------------
export { CascadingConfigArrayFactory };
@@ -0,0 +1,8 @@
type EncodeTrieNode = string | {
v?: string;
n: number | Map<number, EncodeTrieNode>;
o?: string;
};
export declare const htmlTrie: Map<number, EncodeTrieNode>;
export {};
//# sourceMappingURL=encode-html.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"legacy.d.ts","sourceRoot":"https://raw.githubusercontent.com/fb55/domutils/0ab8bcf1ecfc70dfc93291a4cb2496578ac25e9c/src/","sources":["legacy.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAC7D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAKlD;;;;;;GAMG;AACH,MAAM,WAAW,eAAe;IAC5B,QAAQ,CAAC,EAAE,MAAM,GAAG,CAAC,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,CAAC;IAChD,QAAQ,CAAC,EAAE,MAAM,GAAG,CAAC,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,CAAC;IAChD,YAAY,CAAC,EAAE,MAAM,GAAG,CAAC,CAAC,IAAI,CAAC,EAAE,MAAM,KAAK,OAAO,CAAC,CAAC;IACrD,CAAC,aAAa,EAAE,MAAM,GAChB,SAAS,GACT,MAAM,GACN,CAAC,CAAC,cAAc,EAAE,MAAM,KAAK,OAAO,CAAC,CAAC;CAC/C;AAkFD;;;;;;;GAOG;AACH,wBAAgB,WAAW,CAAC,OAAO,EAAE,eAAe,EAAE,IAAI,EAAE,OAAO,GAAG,OAAO,CAG5E;AAED;;;;;;;;;GASG;AACH,wBAAgB,WAAW,CACvB,OAAO,EAAE,eAAe,EACxB,KAAK,EAAE,OAAO,GAAG,OAAO,EAAE,EAC1B,OAAO,EAAE,OAAO,EAChB,KAAK,GAAE,MAAiB,GACzB,OAAO,EAAE,CAGX;AAED;;;;;;;;GAQG;AACH,wBAAgB,cAAc,CAC1B,EAAE,EAAE,MAAM,GAAG,CAAC,CAAC,EAAE,EAAE,MAAM,KAAK,OAAO,CAAC,EACtC,KAAK,EAAE,OAAO,GAAG,OAAO,EAAE,EAC1B,OAAO,UAAO,GACf,OAAO,GAAG,IAAI,CAGhB;AAED;;;;;;;;;GASG;AACH,wBAAgB,oBAAoB,CAChC,OAAO,EAAE,MAAM,GAAG,CAAC,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,EAC7C,KAAK,EAAE,OAAO,GAAG,OAAO,EAAE,EAC1B,OAAO,UAAO,EACd,KAAK,GAAE,MAAiB,GACzB,OAAO,EAAE,CAOX;AAED;;;;;;;;;GASG;AACH,wBAAgB,sBAAsB,CAClC,SAAS,EAAE,MAAM,GAAG,CAAC,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,EAC/C,KAAK,EAAE,OAAO,GAAG,OAAO,EAAE,EAC1B,OAAO,UAAO,EACd,KAAK,GAAE,MAAiB,GACzB,OAAO,EAAE,CAOX;AAED;;;;;;;;;GASG;AACH,wBAAgB,oBAAoB,CAChC,IAAI,EAAE,WAAW,GAAG,CAAC,CAAC,IAAI,EAAE,WAAW,KAAK,OAAO,CAAC,EACpD,KAAK,EAAE,OAAO,GAAG,OAAO,EAAE,EAC1B,OAAO,UAAO,EACd,KAAK,GAAE,MAAiB,GACzB,OAAO,EAAE,CAEX"}
@@ -0,0 +1 @@
module.exports={A:{A:{"2":"K D E F A B wC"},B:{"1":"M G N O P","2":"C L","257":"0 1 2 3 4 5 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 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":"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 0C 1C","194":"cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB"},D:{"1":"eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB wB xB yB zB","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","257":"0 1 2 3 4 5 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"},E:{"1":"D E F A B C L M G 5C 6C 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 ZB K 2C ZC 3C 4C"},F:{"1":"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","2":"6 7 8 9 F B C G N O P aB AB BB CB FD GD HD ID NC uC JD OC","257":"0 1 2 3 4 5 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"},G:{"1":"E 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 RC iC jC kC lC mC gD SC nC oC pC qC rC sC tC","2":"ZC KD vC LD MD"},H:{"2":"hD"},I:{"2":"TC J I iD jD kD lD vC mD nD"},J:{"2":"D A"},K:{"2":"A B C H NC uC OC"},L:{"1":"I"},M:{"1":"MC"},N:{"2":"A B"},O:{"2":"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","2":"J"},Q:{"1":"zD"},R:{"2":"0D"},S:{"1":"1D 2D"}},B:7,C:"Speech Synthesis API",D:true};
@@ -0,0 +1 @@
{"version":3,"file":"isFirstLetterCapitalized.d.ts","sourceRoot":"","sources":["isFirstLetterCapitalized.js"],"names":[],"mappings":"AAOiB,gCAHN,MAAM,GACJ,OAAO,CAQnB"}
@@ -0,0 +1,2 @@
// THIS FILE IS AUTO GENERATED
module.exports = require('./lib/index.js');
@@ -0,0 +1,40 @@
/// <reference types="node" />
declare namespace pathKey {
interface Options {
/**
Use a custom environment variables object. Default: [`process.env`](https://nodejs.org/api/process.html#process_process_env).
*/
readonly env?: {[key: string]: string | undefined};
/**
Get the PATH key for a specific platform. Default: [`process.platform`](https://nodejs.org/api/process.html#process_process_platform).
*/
readonly platform?: NodeJS.Platform;
}
}
declare const pathKey: {
/**
Get the [PATH](https://en.wikipedia.org/wiki/PATH_(variable)) environment variable key cross-platform.
@example
```
import pathKey = require('path-key');
const key = pathKey();
//=> 'PATH'
const PATH = process.env[key];
//=> '/usr/local/bin:/usr/bin:/bin'
```
*/
(options?: pathKey.Options): string;
// TODO: Remove this for the next major release, refactor the whole definition to:
// declare function pathKey(options?: pathKey.Options): string;
// export = pathKey;
default: typeof pathKey;
};
export = pathKey;
@@ -0,0 +1,656 @@
/**
* @import {
* Construct,
* Event,
* Resolver,
* State,
* TokenizeContext,
* Tokenizer,
* Token
* } from 'micromark-util-types'
*/
import {ok as assert} from 'devlop'
import {factoryDestination} from 'micromark-factory-destination'
import {factoryLabel} from 'micromark-factory-label'
import {factoryTitle} from 'micromark-factory-title'
import {factoryWhitespace} from 'micromark-factory-whitespace'
import {markdownLineEndingOrSpace} from 'micromark-util-character'
import {push, splice} from 'micromark-util-chunked'
import {normalizeIdentifier} from 'micromark-util-normalize-identifier'
import {resolveAll} from 'micromark-util-resolve-all'
import {codes, constants, types} from 'micromark-util-symbol'
/** @type {Construct} */
export const labelEnd = {
name: 'labelEnd',
resolveAll: resolveAllLabelEnd,
resolveTo: resolveToLabelEnd,
tokenize: tokenizeLabelEnd
}
/** @type {Construct} */
const resourceConstruct = {tokenize: tokenizeResource}
/** @type {Construct} */
const referenceFullConstruct = {tokenize: tokenizeReferenceFull}
/** @type {Construct} */
const referenceCollapsedConstruct = {tokenize: tokenizeReferenceCollapsed}
/** @type {Resolver} */
function resolveAllLabelEnd(events) {
let index = -1
/** @type {Array<Event>} */
const newEvents = []
while (++index < events.length) {
const token = events[index][1]
newEvents.push(events[index])
if (
token.type === types.labelImage ||
token.type === types.labelLink ||
token.type === types.labelEnd
) {
// Remove the marker.
const offset = token.type === types.labelImage ? 4 : 2
token.type = types.data
index += offset
}
}
// If the events are equal, we don't have to copy newEvents to events
if (events.length !== newEvents.length) {
splice(events, 0, events.length, newEvents)
}
return events
}
/** @type {Resolver} */
function resolveToLabelEnd(events, context) {
let index = events.length
let offset = 0
/** @type {Token} */
let token
/** @type {number | undefined} */
let open
/** @type {number | undefined} */
let close
/** @type {Array<Event>} */
let media
// Find an opening.
while (index--) {
token = events[index][1]
if (open) {
// If we see another link, or inactive link label, we’ve been here before.
if (
token.type === types.link ||
(token.type === types.labelLink && token._inactive)
) {
break
}
// Mark other link openings as inactive, as we can’t have links in
// links.
if (events[index][0] === 'enter' && token.type === types.labelLink) {
token._inactive = true
}
} else if (close) {
if (
events[index][0] === 'enter' &&
(token.type === types.labelImage || token.type === types.labelLink) &&
!token._balanced
) {
open = index
if (token.type !== types.labelLink) {
offset = 2
break
}
}
} else if (token.type === types.labelEnd) {
close = index
}
}
assert(open !== undefined, '`open` is supposed to be found')
assert(close !== undefined, '`close` is supposed to be found')
const group = {
type: events[open][1].type === types.labelLink ? types.link : types.image,
start: {...events[open][1].start},
end: {...events[events.length - 1][1].end}
}
const label = {
type: types.label,
start: {...events[open][1].start},
end: {...events[close][1].end}
}
const text = {
type: types.labelText,
start: {...events[open + offset + 2][1].end},
end: {...events[close - 2][1].start}
}
media = [
['enter', group, context],
['enter', label, context]
]
// Opening marker.
media = push(media, events.slice(open + 1, open + offset + 3))
// Text open.
media = push(media, [['enter', text, context]])
// Always populated by defaults.
assert(
context.parser.constructs.insideSpan.null,
'expected `insideSpan.null` to be populated'
)
// Between.
media = push(
media,
resolveAll(
context.parser.constructs.insideSpan.null,
events.slice(open + offset + 4, close - 3),
context
)
)
// Text close, marker close, label close.
media = push(media, [
['exit', text, context],
events[close - 2],
events[close - 1],
['exit', label, context]
])
// Reference, resource, or so.
media = push(media, events.slice(close + 1))
// Media close.
media = push(media, [['exit', group, context]])
splice(events, open, events.length, media)
return events
}
/**
* @this {TokenizeContext}
* Context.
* @type {Tokenizer}
*/
function tokenizeLabelEnd(effects, ok, nok) {
const self = this
let index = self.events.length
/** @type {Token} */
let labelStart
/** @type {boolean} */
let defined
// Find an opening.
while (index--) {
if (
(self.events[index][1].type === types.labelImage ||
self.events[index][1].type === types.labelLink) &&
!self.events[index][1]._balanced
) {
labelStart = self.events[index][1]
break
}
}
return start
/**
* Start of label end.
*
* ```markdown
* > | [a](b) c
* ^
* > | [a][b] c
* ^
* > | [a][] b
* ^
* > | [a] b
* ```
*
* @type {State}
*/
function start(code) {
assert(code === codes.rightSquareBracket, 'expected `]`')
// If there is not an okay opening.
if (!labelStart) {
return nok(code)
}
// If the corresponding label (link) start is marked as inactive,
// it means we’d be wrapping a link, like this:
//
// ```markdown
// > | a [b [c](d) e](f) g.
// ^
// ```
//
// We can’t have that, so it’s just balanced brackets.
if (labelStart._inactive) {
return labelEndNok(code)
}
defined = self.parser.defined.includes(
normalizeIdentifier(
self.sliceSerialize({start: labelStart.end, end: self.now()})
)
)
effects.enter(types.labelEnd)
effects.enter(types.labelMarker)
effects.consume(code)
effects.exit(types.labelMarker)
effects.exit(types.labelEnd)
return after
}
/**
* After `]`.
*
* ```markdown
* > | [a](b) c
* ^
* > | [a][b] c
* ^
* > | [a][] b
* ^
* > | [a] b
* ^
* ```
*
* @type {State}
*/
function after(code) {
// Note: `markdown-rs` also parses GFM footnotes here, which for us is in
// an extension.
// Resource (`[asd](fgh)`)?
if (code === codes.leftParenthesis) {
return effects.attempt(
resourceConstruct,
labelEndOk,
defined ? labelEndOk : labelEndNok
)(code)
}
// Full (`[asd][fgh]`) or collapsed (`[asd][]`) reference?
if (code === codes.leftSquareBracket) {
return effects.attempt(
referenceFullConstruct,
labelEndOk,
defined ? referenceNotFull : labelEndNok
)(code)
}
// Shortcut (`[asd]`) reference?
return defined ? labelEndOk(code) : labelEndNok(code)
}
/**
* After `]`, at `[`, but not at a full reference.
*
* > 👉 **Note**: we only get here if the label is defined.
*
* ```markdown
* > | [a][] b
* ^
* > | [a] b
* ^
* ```
*
* @type {State}
*/
function referenceNotFull(code) {
return effects.attempt(
referenceCollapsedConstruct,
labelEndOk,
labelEndNok
)(code)
}
/**
* Done, we found something.
*
* ```markdown
* > | [a](b) c
* ^
* > | [a][b] c
* ^
* > | [a][] b
* ^
* > | [a] b
* ^
* ```
*
* @type {State}
*/
function labelEndOk(code) {
// Note: `markdown-rs` does a bunch of stuff here.
return ok(code)
}
/**
* Done, it’s nothing.
*
* There was an okay opening, but we didn’t match anything.
*
* ```markdown
* > | [a](b c
* ^
* > | [a][b c
* ^
* > | [a] b
* ^
* ```
*
* @type {State}
*/
function labelEndNok(code) {
labelStart._balanced = true
return nok(code)
}
}
/**
* @this {TokenizeContext}
* Context.
* @type {Tokenizer}
*/
function tokenizeResource(effects, ok, nok) {
return resourceStart
/**
* At a resource.
*
* ```markdown
* > | [a](b) c
* ^
* ```
*
* @type {State}
*/
function resourceStart(code) {
assert(code === codes.leftParenthesis, 'expected left paren')
effects.enter(types.resource)
effects.enter(types.resourceMarker)
effects.consume(code)
effects.exit(types.resourceMarker)
return resourceBefore
}
/**
* In resource, after `(`, at optional whitespace.
*
* ```markdown
* > | [a](b) c
* ^
* ```
*
* @type {State}
*/
function resourceBefore(code) {
return markdownLineEndingOrSpace(code)
? factoryWhitespace(effects, resourceOpen)(code)
: resourceOpen(code)
}
/**
* In resource, after optional whitespace, at `)` or a destination.
*
* ```markdown
* > | [a](b) c
* ^
* ```
*
* @type {State}
*/
function resourceOpen(code) {
if (code === codes.rightParenthesis) {
return resourceEnd(code)
}
return factoryDestination(
effects,
resourceDestinationAfter,
resourceDestinationMissing,
types.resourceDestination,
types.resourceDestinationLiteral,
types.resourceDestinationLiteralMarker,
types.resourceDestinationRaw,
types.resourceDestinationString,
constants.linkResourceDestinationBalanceMax
)(code)
}
/**
* In resource, after destination, at optional whitespace.
*
* ```markdown
* > | [a](b) c
* ^
* ```
*
* @type {State}
*/
function resourceDestinationAfter(code) {
return markdownLineEndingOrSpace(code)
? factoryWhitespace(effects, resourceBetween)(code)
: resourceEnd(code)
}
/**
* At invalid destination.
*
* ```markdown
* > | [a](<<) b
* ^
* ```
*
* @type {State}
*/
function resourceDestinationMissing(code) {
return nok(code)
}
/**
* In resource, after destination and whitespace, at `(` or title.
*
* ```markdown
* > | [a](b ) c
* ^
* ```
*
* @type {State}
*/
function resourceBetween(code) {
if (
code === codes.quotationMark ||
code === codes.apostrophe ||
code === codes.leftParenthesis
) {
return factoryTitle(
effects,
resourceTitleAfter,
nok,
types.resourceTitle,
types.resourceTitleMarker,
types.resourceTitleString
)(code)
}
return resourceEnd(code)
}
/**
* In resource, after title, at optional whitespace.
*
* ```markdown
* > | [a](b "c") d
* ^
* ```
*
* @type {State}
*/
function resourceTitleAfter(code) {
return markdownLineEndingOrSpace(code)
? factoryWhitespace(effects, resourceEnd)(code)
: resourceEnd(code)
}
/**
* In resource, at `)`.
*
* ```markdown
* > | [a](b) d
* ^
* ```
*
* @type {State}
*/
function resourceEnd(code) {
if (code === codes.rightParenthesis) {
effects.enter(types.resourceMarker)
effects.consume(code)
effects.exit(types.resourceMarker)
effects.exit(types.resource)
return ok
}
return nok(code)
}
}
/**
* @this {TokenizeContext}
* Context.
* @type {Tokenizer}
*/
function tokenizeReferenceFull(effects, ok, nok) {
const self = this
return referenceFull
/**
* In a reference (full), at the `[`.
*
* ```markdown
* > | [a][b] d
* ^
* ```
*
* @type {State}
*/
function referenceFull(code) {
assert(code === codes.leftSquareBracket, 'expected left bracket')
return factoryLabel.call(
self,
effects,
referenceFullAfter,
referenceFullMissing,
types.reference,
types.referenceMarker,
types.referenceString
)(code)
}
/**
* In a reference (full), after `]`.
*
* ```markdown
* > | [a][b] d
* ^
* ```
*
* @type {State}
*/
function referenceFullAfter(code) {
return self.parser.defined.includes(
normalizeIdentifier(
self.sliceSerialize(self.events[self.events.length - 1][1]).slice(1, -1)
)
)
? ok(code)
: nok(code)
}
/**
* In reference (full) that was missing.
*
* ```markdown
* > | [a][b d
* ^
* ```
*
* @type {State}
*/
function referenceFullMissing(code) {
return nok(code)
}
}
/**
* @this {TokenizeContext}
* Context.
* @type {Tokenizer}
*/
function tokenizeReferenceCollapsed(effects, ok, nok) {
return referenceCollapsedStart
/**
* In reference (collapsed), at `[`.
*
* > 👉 **Note**: we only get here if the label is defined.
*
* ```markdown
* > | [a][] d
* ^
* ```
*
* @type {State}
*/
function referenceCollapsedStart(code) {
// We only attempt a collapsed label if there’s a `[`.
assert(code === codes.leftSquareBracket, 'expected left bracket')
effects.enter(types.reference)
effects.enter(types.referenceMarker)
effects.consume(code)
effects.exit(types.referenceMarker)
return referenceCollapsedOpen
}
/**
* In reference (collapsed), at `]`.
*
* > 👉 **Note**: we only get here if the label is defined.
*
* ```markdown
* > | [a][] d
* ^
* ```
*
* @type {State}
*/
function referenceCollapsedOpen(code) {
if (code === codes.rightSquareBracket) {
effects.enter(types.referenceMarker)
effects.consume(code)
effects.exit(types.referenceMarker)
effects.exit(types.reference)
return ok
}
return nok(code)
}
}
@@ -0,0 +1,2 @@
import 'reflect-metadata';
//# sourceMappingURL=updateReflectMetadata.spec.d.ts.map
@@ -0,0 +1 @@
export declare function runTask<T, R>(workerScript: string, taskData: T): Promise<R>;
@@ -0,0 +1 @@
{"version":3,"file":"forbid-component-props.d.ts","sourceRoot":"","sources":["forbid-component-props.js"],"names":[],"mappings":"wBAyBW,OAAO,QAAQ,EAAE,IAAI,CAAC,UAAU"}
@@ -0,0 +1,22 @@
var ExtendedKeyUsage_1;
import { __decorate } from "tslib";
import { AsnPropTypes, AsnArray, AsnType, AsnTypeTypes } from "@peculiar/asn1-schema";
import { id_ce, id_kp } from "../object_identifiers";
export const id_ce_extKeyUsage = `${id_ce}.37`;
let ExtendedKeyUsage = ExtendedKeyUsage_1 = class ExtendedKeyUsage extends AsnArray {
constructor(items) {
super(items);
Object.setPrototypeOf(this, ExtendedKeyUsage_1.prototype);
}
};
ExtendedKeyUsage = ExtendedKeyUsage_1 = __decorate([
AsnType({ type: AsnTypeTypes.Sequence, itemType: AsnPropTypes.ObjectIdentifier })
], ExtendedKeyUsage);
export { ExtendedKeyUsage };
export const anyExtendedKeyUsage = `${id_ce_extKeyUsage}.0`;
export const id_kp_serverAuth = `${id_kp}.1`;
export const id_kp_clientAuth = `${id_kp}.2`;
export const id_kp_codeSigning = `${id_kp}.3`;
export const id_kp_emailProtection = `${id_kp}.4`;
export const id_kp_timeStamping = `${id_kp}.8`;
export const id_kp_OCSPSigning = `${id_kp}.9`;
@@ -0,0 +1,136 @@
<h1 align="center"> <img width="35" height="35" alt="Motion logo" src="https://github.com/user-attachments/assets/00d6d1c3-72c4-4c2f-a664-69da13182ffc" /><br />Motion for React</h1>
<h3 align="center">
An open source animation library<br />for React
</h3>
<p align="center">
<a href="https://www.npmjs.com/package/motion" rel="noopener noreferrer nofollow" ><img src="https://img.shields.io/npm/v/motion?color=0368FF&label=version" alt="npm version"></a>
<a href="https://www.npmjs.com/package/motion" rel="noopener noreferrer nofollow" ><img src="https://img.shields.io/npm/dm/framer-motion?color=8D30FF&label=npm" alt="npm downloads per month"></a>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://www.jsdelivr.com/package/npm/motion"><img alt="jsDelivr hits (npm)" src="https://img.shields.io/jsdelivr/npm/hm/framer-motion?logo=jsdeliver&color=FF4FBA"></a>
<img alt="NPM License" src="https://img.shields.io/npm/l/motion?color=FF2B6E">
</p>
```bash
npm install motion
```
## Table of Contents
1. [Why Motion?](#why-motion)
2. [🍦 Platforms](#-platforms)
3. [🎓 Examples](#-examples)
4. [⚡️ Motion+](#-motion)
5. [👩🏻‍⚖️ License](#-license)
6. [💎 Contribute](#-contribute)
7. [✨ Sponsors](#-sponsors)
## Why Motion?
- **Simple API:** First-class React, JavaScript, and Vue packages.
- **Hybrid engine:** Power of JavaScript combined with native browser APIs for 120fps, GPU-accelerated animations.
- **Production-ready:** TypeScript, extensive test suite, tree-shakable, tiny footprint.
**Batteries included:** Gestures, springs, layout transitions, scroll-linked effects, timelines.
## 🍦 Platforms
Motion is available for [React](https://motion.dev/docs/react), [JavaScript](https://motion.dev/docs/quick-start) and [Vue](https://motion.dev/docs/vue).
<details>
<summary>React</summary>
```jsx
import { motion } from "motion/react"
function Component() {
return <motion.div animate={{ x: 100 }} />
}
```
Get started with [Motion for React](https://motion.dev/docs/react).
</details>
<details>
<summary>JavaScript</summary>
```javascript
import { animate } from "motion"
animate("#box", { x: 100 })
```
Get started with [JavaScript](https://motion.dev/docs/quick-start).
</details>
<details>
<summary>Vue</summary>
```html
<script>
import { motion } from "motion-v"
</script>
<template> <motion.div :animate={{ x: 100 }} /> </template>
```
Get started with [Motion for Vue](https://motion.dev/docs/vue).
</details>
## 🎓 Examples
Browse 100+ free and 180+ premium [Motion Examples](https://motion.dev/examples), with copy-paste code that'll level-up your animations whether you're a beginner or an expert.
## ⚡️ Motion+
A one-time payment, lifetime-updates membership:
- **180+ premium examples**
- **Premium APIs** like [Cursor](https://motion.dev/docs/cursor) and [Ticker](https://motion.dev/docs/react-ticker)
- **Visual editing** for VS Code (alpha)
- **Private Discord**
- **Early access content**
[Get Motion+](https://motion.dev/plus)
## 👩🏻‍⚖️ License
- Motion is MIT licensed.
## 💎 Contribute
- Want to contribute to Motion? Our [contributing guide](https://github.com/motiondivision/motion/blob/master/CONTRIBUTING.md) has you covered.
## ✨ Sponsors
Motion is sustainable thanks to the kind support of its sponsors.
[Become a sponsor](https://motion.dev/sponsor)
### Partner
Motion powers Framer animations, the web builder for creative pros. Design and ship your dream site. Zero code, maximum speed.
<a href="https://framer.link/FlnUbQY">
<img alt="Framer" src="https://github.com/user-attachments/assets/22a79be7-672e-4336-bfb7-5d55d1deb917" width="250px" height="150px">
</a>
### Platinum
<a href="https://linear.app"><img alt="Linear" src="https://github.com/user-attachments/assets/f9ce44b4-af28-4770-bb6e-9515b474bfb2" width="250px" height="150px"></a> <a href="https://figma.com"><img alt="Figma" src="https://github.com/user-attachments/assets/1077d0ab-4305-4a1f-81c8-d5be8c4c6717" width="250px" height="150px"></a> <a href="https://sanity.io"><img alt="Sanity" src="https://github.com/user-attachments/assets/80134088-f456-483f-8edd-940593c120ce" width="250px" height="150px"></a>
### Gold
<a href="https://tailwindcss.com"><img alt="Tailwind" src="https://github.com/user-attachments/assets/1d5f2571-8bc3-4367-9fec-14d291168ff0" width="200px" height="120px"></a> <a href="https://emilkowal.ski"><img alt="Emil Kowalski" src="https://github.com/user-attachments/assets/33d1cb98-238a-4eed-a0df-9c7ab097d65b" width="200px" height="120px"></a> <a href="https://liveblocks.io"><img alt="Liveblocks" src="https://github.com/user-attachments/assets/28eddbe5-1617-4e74-969d-2eb6fcd481af" width="200px" height="120px"></a> <a href="https://lu.ma"><img alt="Luma" src="https://github.com/user-attachments/assets/ac282433-6adb-4ad2-9fd2-5c6ee513c14b" width="200px" height="120px"></a> <a href="https://notion.com"><img alt="Notion" src="https://github.com/user-attachments/assets/a27a6033-3cb0-4232-a6bb-625e1824517b" width="200px" height="120px"></a> <a href="https://lottiefiles.com"><img alt="LottieFiles" src="https://github.com/user-attachments/assets/4e99d8c7-4cba-43ee-93c5-93861ae708ec" width="200px" height="120px"></a>
### Silver
<a href="https://www.frontend.fyi/?utm_source=motion"><img alt="Frontend.fyi" src="https://github.com/user-attachments/assets/f16e3eb9-f0bd-4ad1-8049-f079a3d65c69" width="150px" height="100px"></a> <a href="https://firecrawl.dev"><img alt="Firecrawl" src="https://github.com/user-attachments/assets/2c44e7f4-5c2a-4714-9050-1570538665ff" width="150px" height="100px"></a> <a href="https://puzzmo.com"><img alt="Puzzmo" src="https://github.com/user-attachments/assets/e32205a7-3ab1-41ec-8729-a794058fd655" width="150px" height="100px"></a> <a href="https://bolt.new"><img alt="Bolt.new" src="https://github.com/user-attachments/assets/7932d4b2-bb6c-422e-82b9-6ad78a7e3090" width="150px" height="100px"></a>
### Personal
- [OlegWock](https://sinja.io)
- [Lambert Weller](https://github.com/l-mbert)
- [Jake LeBoeuf](https://jklb.wf)
- [Han Lee](https://github.com/hahnlee)
@@ -0,0 +1,26 @@
import { AsnArray } from "@peculiar/asn1-schema";
/**
* ```asn1
* PKCS12Attribute ::= SEQUENCE {
* attrId ATTRIBUTE.&id ({PKCS12AttrSet}),
* attrValues SET OF ATTRIBUTE.&Type ({PKCS12AttrSet}{@attrId})
* } -- This type is compatible with the X.500 type 'Attribute'
* ```
*/
export declare class PKCS12Attribute {
attrId: string;
attrValues: ArrayBuffer[];
constructor(params?: Partial<PKCS12Attribute>);
}
/**
* ```asn1
* PKCS12AttrSet ATTRIBUTE ::= {
* friendlyName |
* localKeyId,
* ... -- Other attributes are allowed
* }
* ```
*/
export declare class PKCS12AttrSet extends AsnArray<PKCS12Attribute> {
constructor(items?: PKCS12Attribute[]);
}
@@ -0,0 +1 @@
"use strict";var r=require("../register-D46fvsV_.cjs");require("../get-pipe-path-BoR10qr8.cjs"),require("module"),require("node:path"),require("../temporary-directory-B83uKxJF.cjs"),require("node:os"),require("node:module"),require("node:url"),require("get-tsconfig"),require("node:fs"),require("../index-gckBtVBf.cjs"),require("esbuild"),require("node:crypto"),require("../client-D6NvIMSC.cjs"),require("node:net"),require("node:util"),require("../index-BWFBUo6r.cjs"),r.register();
@@ -0,0 +1 @@
{"name":"foreground-child","version":"3.3.1","requiresBuild":false,"files":{"LICENSE":{"checkedAt":1794532105295,"integrity":"sha512-e6QFASPQo+yqcyfnjkBj6RUVamJzctxReAH0YONGrmiMZ7EuqPv1HD4xV6UTAyv6TQeJGu+suGsTEgOT1TUnnQ==","mode":420,"size":775},"dist/commonjs/all-signals.js":{"checkedAt":1794532105295,"integrity":"sha512-cBeRQ0TIkIhqxzdXASWss4p/utyl6La4OQA9FLVavHXDBK2KsBPXJyXQeK2rzWbunFoqtIjAzIWboy0RPOJGuQ==","mode":420,"size":1553},"dist/esm/all-signals.js":{"checkedAt":1794532105295,"integrity":"sha512-oiTVMuqvIoskpbTjzygSbueoAATMG/YwjnM/Y94Z3TWFhxKrH+kbFNK5/5VEKGyl772fs+QMtEfCwgN1hANUbQ==","mode":420,"size":1269},"dist/commonjs/index.js":{"checkedAt":1794532105296,"integrity":"sha512-zfYmxQ4qSLoPIIlryxA5ljcQHpjrZgiWhhTwu2QQbey6/h+EU1I/67zKVpMGHIXjWJAIqNBOs5TJFW6YLtBnEA==","mode":420,"size":4076},"dist/esm/index.js":{"checkedAt":1794532105296,"integrity":"sha512-BaA9H5GTsnV9FM5Rliim0dMs+xyGBBlo7tK7kFIkUtVoOvFIgWYjMtXOrjq62xC2vZqVLkYehMQpxeGQIaDOpw==","mode":420,"size":3613},"dist/commonjs/proxy-signals.js":{"checkedAt":1794532105296,"integrity":"sha512-M+8J5a76AzvaemQ03WreFFtSBaizIY8bG2apbFbdMQlWRqnUWLv4bRPgBBxmyfSMbYq2QHatTKnFcWU6h5aljQ==","mode":420,"size":1159},"dist/esm/proxy-signals.js":{"checkedAt":1794532105296,"integrity":"sha512-vtJPCH22XuN4X8aCM8WPbIozRfvFGm/KiirmyVrNiUYcLDtqwYFu8GEbXEmTK/UQox/mSgz9H8OxRkWNZ8f4iA==","mode":420,"size":997},"dist/commonjs/watchdog.js":{"checkedAt":1794532105296,"integrity":"sha512-bzHNLCJEOH1ISkkttoWlH9fJJvxmvwK4lGxZnjBXCwZHEMq0yxeUnLHlOt/5DfTLrNcVAq608eS8Itnp/V9zkQ==","mode":420,"size":1574},"dist/esm/watchdog.js":{"checkedAt":1794532105296,"integrity":"sha512-xZ9r4Gosyv1c+Hlr8RfDjwW12poVDHQ8a8oERM8ZRjdn/WQb8NL75arbZP6pezxoseKzlLdGd7CbTNSgWvII1g==","mode":420,"size":1416},"dist/commonjs/package.json":{"checkedAt":1794532105296,"integrity":"sha512-bFiTnaWPm3Fik6gyj3o2SbbiQr8jX64ABVoMx5+yeI5Kmd+qQi4M+tvoTg1eM7g29oYn5qQJZUh37cRDuU0ExA==","mode":420,"size":25},"dist/esm/package.json":{"checkedAt":1794532105297,"integrity":"sha512-nTI0IMxjxr7nncxdtfDxj2uOBz2q+P+lRZ4R8t5ZqfXowXjXf6kq/J3dNSYj3sNixi//hZxxovq5Px4hcsSYfw==","mode":420,"size":23},"package.json":{"checkedAt":1794532105297,"integrity":"sha512-GmDjGtPSGpT6orzF50/IOG70XDC68LiXLUqLzA7lH1Vm5j+oy3sCiY4a5w3COR0JJbIB2tGZqynzli+L3/Zslg==","mode":420,"size":2713},"dist/commonjs/all-signals.d.ts.map":{"checkedAt":1794532105297,"integrity":"sha512-diTXmHhYZ4yRL9lWAgX55lKXOgUyIPmwvn2HjBJ40Lou4wvuliSf7S7mWHpvvuVyLopNXxX11MOEUvuKHOB0UQ==","mode":420,"size":169},"dist/esm/all-signals.d.ts.map":{"checkedAt":1794532105297,"integrity":"sha512-diTXmHhYZ4yRL9lWAgX55lKXOgUyIPmwvn2HjBJ40Lou4wvuliSf7S7mWHpvvuVyLopNXxX11MOEUvuKHOB0UQ==","mode":420,"size":169},"dist/commonjs/all-signals.js.map":{"checkedAt":1794532105297,"integrity":"sha512-1NXhbgxBBqs5FLPjxzSddqAl90QIpLUzbbKcEA3tIXmTzwzj/e4tnQgDh9BfoUdOcN+Ohh1XaTA+iU0ulaN/sA==","mode":420,"size":2231},"dist/esm/all-signals.js.map":{"checkedAt":1794532105297,"integrity":"sha512-Qj2eGh2155cOLWMYuYk/u9/7crcTN+Z6HD28d9uXeq9fac9/QE3hEboAu5CgPDYWhDTCG5l3qTklQc3WWdtr+w==","mode":420,"size":2254},"dist/commonjs/index.d.ts.map":{"checkedAt":1794532105297,"integrity":"sha512-cKqRxLyK5xXVIpMRx2l0yyF3X46bQsBrALueAOQK+8n+gpHDTDn/O8anRA13HQeG4SUbfB7n7672H2YP1atblg==","mode":420,"size":1921},"dist/esm/index.d.ts.map":{"checkedAt":1794532105297,"integrity":"sha512-cKqRxLyK5xXVIpMRx2l0yyF3X46bQsBrALueAOQK+8n+gpHDTDn/O8anRA13HQeG4SUbfB7n7672H2YP1atblg==","mode":420,"size":1921},"dist/commonjs/index.js.map":{"checkedAt":1794532105298,"integrity":"sha512-ZC+dbh1T4cREmT6ZZ9t8lYDRN2yPvHeJ4Q9CG++jJkg6dznFQfU7VrcWI7+tA8C2W6QGhpcxg5sAcxrwFQbHRA==","mode":420,"size":9835},"dist/esm/index.js.map":{"checkedAt":1794532105298,"integrity":"sha512-3gH9JzuVpW7KyP8sbjdO1RxiWDni0ghbN0B9km/mfCOvGjt4xev2kL1WD7+70PnrMvjhggXQdGOsSvRNKPn5ZQ==","mode":420,"size":9922},"dist/commonjs/proxy-signals.d.ts.map":{"checkedAt":1794532105298,"integrity":"sha512-gRfTrWx78eXEagrd8T4FHyrJM2yjJGNicuE1r2P+SlASZxj5QLaWovB3SE3BLCGDf7NoH0Fq9JjLMEwizlmFdA==","mode":420,"size":221},"dist/esm/proxy-signals.d.ts.map":{"checkedAt":1794532105298,"integrity":"sha512-gRfTrWx78eXEagrd8T4FHyrJM2yjJGNicuE1r2P+SlASZxj5QLaWovB3SE3BLCGDf7NoH0Fq9JjLMEwizlmFdA==","mode":420,"size":221},"dist/commonjs/proxy-signals.js.map":{"checkedAt":1794532105298,"integrity":"sha512-/eeLunHJ0k+7qBqhgTTUxVstLeWe5KyL74pTFSED9kLV5N3gEsAzBtBcWVzDqvWSjSLTT3sjZGuHJwH+1JlMBw==","mode":420,"size":1884},"dist/esm/proxy-signals.js.map":{"checkedAt":1794532105298,"integrity":"sha512-hEBki/VHFxtLBSw4g48lJB2lS88TuIILcI36bljI2TO5USm78X9Ma10Dn4FnGIZHl2pIZBgIQQVl3ZiPu1yxlg==","mode":420,"size":1896},"dist/commonjs/watchdog.d.ts.map":{"checkedAt":1794532105299,"integrity":"sha512-lJYWqDYh51JFbeMmYhXiTxMSwuTfuaC5ggaHv1XKT3+UjZvp2jbi2cOEnoZhCICSoG5LJTbKz28D447IIHTv7A==","mode":420,"size":211},"dist/esm/watchdog.d.ts.map":{"checkedAt":1794532105299,"integrity":"sha512-lJYWqDYh51JFbeMmYhXiTxMSwuTfuaC5ggaHv1XKT3+UjZvp2jbi2cOEnoZhCICSoG5LJTbKz28D447IIHTv7A==","mode":420,"size":211},"dist/coLine truncated
@@ -0,0 +1,18 @@
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __exportStar = (this && this.__exportStar) || function(m, exports) {
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
};
Object.defineProperty(exports, "__esModule", { value: true });
__exportStar(require("./transform"), exports);
@@ -0,0 +1 @@
{"mappings":"AAAA,iBAAiB;IAAG,aAAa,CAAC,gBAAE,CAAC;IACnC,iBAAiB,CAAC,OAAS,CAAC,SAAE,EAAE,KAAK,UAAU,CAAC,iEAAS,CAAC;IAC1D,cAAc,CAAC,OAAS,GAAG,KAAK,KAAK,CAAC,iCAAK,CAAC;IAC5C,cAAc,CAAC,gBAAE,CAAC;IAClB,kBAAkB,CAAC,OAAS,CAAC,SAAE,EAAE,KAAK,UAAU,CAAC,iEAAS,CAAC;IAC3D,sBAAsB,CAAC,sHAAoB,CAAC;IAC5C,UAAU,CAAC,gBAAE,CAAC;IACd,aAAa,CAAC,wCAAK,CAAC;IACpB,YAAY,CAAC,gEAAQ,CAAC;AACxB","sources":["packages/@react-aria/table/intl/ja-JP.json"],"sourcesContent":["{\n \"ascending\": \"昇順\",\n \"ascendingSort\": \"列 {columnName} を昇順で並べ替え\",\n \"columnSize\": \"{value} ピクセル\",\n \"descending\": \"降順\",\n \"descendingSort\": \"列 {columnName} を降順で並べ替え\",\n \"resizerDescription\": \"Enter キーを押してサイズ変更を開始\",\n \"select\": \"選択\",\n \"selectAll\": \"すべて選択\",\n \"sortable\": \"並べ替え可能な列\"\n}\n"],"names":[],"version":3,"file":"ja-JP.main.js.map"}
@@ -0,0 +1,70 @@
/**
* @author Toru Nagashima <https://github.com/mysticatea>
* See LICENSE file in root directory for full license.
*/
"use strict"
const {
CALL,
CONSTRUCT,
PatternMatcher,
ReferenceTracker,
getStringIfConstant,
} = require("@eslint-community/eslint-utils")
module.exports = {
/**
* Define generator to search pattern.
* The iterator generated by the generator returns the start and end index of the match.
* @param {RegExp} pattern Base pattern
* @returns {function(string):IterableIterator<RegExpExecArray>} generator
*/
definePatternSearchGenerator(pattern) {
const matcher = new PatternMatcher(pattern)
return matcher.execAll.bind(matcher)
},
/**
* Check whether a given token is a comma token or not.
* @param {Token} token The token to check.
* @returns {boolean} `true` if the token is a comma token.
*/
isCommaToken(token) {
return (
token != null && token.type === "Punctuator" && token.value === ","
)
},
/**
* Iterate the calls of the `RegExp` global variable.
* @param {Scope} globalScope The global scope object.
* @returns {IterableIterator<{node:Node,pattern:(string|null),flags:(string|null)}>} The iterator of `CallExpression` or `NewExpression` for `RegExp`.
*/
*getRegExpCalls(globalScope) {
const tracker = new ReferenceTracker(globalScope)
for (const { node } of tracker.iterateGlobalReferences({
RegExp: { [CALL]: true, [CONSTRUCT]: true },
})) {
const [patternNode, flagsNode] = node.arguments
yield {
node,
pattern: getStringIfConstant(patternNode, globalScope),
flags: getStringIfConstant(flagsNode, globalScope),
}
}
},
printWarningOfDeprecatedConfig(configId) {
if (!process) {
return
}
const newConfigId = configId.replace("no-", "no-new-in-es")
process.emitWarning(
`"plugin:es-x/${configId}" has been deprecated in favor of "plugin:es-x/${newConfigId}".`,
{
type: "DeprecationWarning",
code: "ESLINT_PLUGIN_ES_LEGACY_CONFIG",
},
)
},
}
@@ -0,0 +1,93 @@
'use strict';
var utils = require('../utils.js');
require('eslint-visitor-keys');
require('espree');
require('estraverse');
const messages = {
onOwnLine: "Closing tag of a multiline JSX expression must be on its own line.",
matchIndent: "Expected closing tag to match indentation of opening.",
alignWithOpening: "Expected closing tag to be aligned with the line containing the opening tag"
};
const DEFAULT_LOCATION = "tag-aligned";
const MESSAGE_LOCATION = {
"tag-aligned": "matchIndent",
"line-aligned": "alignWithOpening"
};
var jsxClosingTagLocation = utils.createRule({
name: "jsx-closing-tag-location",
package: "jsx",
meta: {
type: "layout",
docs: {
description: "Enforce closing tag location for multiline JSX"
},
fixable: "whitespace",
messages,
schema: [{
anyOf: [
{
type: "string",
enum: ["tag-aligned", "line-aligned"],
default: DEFAULT_LOCATION
}
]
}]
},
defaultOptions: [
DEFAULT_LOCATION
],
create(context) {
const option = context.options[0] || DEFAULT_LOCATION;
function getIndentation(openingStartOfLine, opening) {
if (option === "line-aligned")
return openingStartOfLine.column;
else
return opening.loc.start.column;
}
function handleClosingElement(node) {
if (!node.parent)
return;
const sourceCode = context.sourceCode;
const opening = "openingFragment" in node.parent ? node.parent.openingFragment : node.parent.openingElement;
const openingLoc = sourceCode.getFirstToken(opening).loc.start;
const openingLine = sourceCode.lines[openingLoc.line - 1];
const openingStartOfLine = {
column: /^\s*/.exec(openingLine)?.[0].length,
line: openingLoc.line
};
if (opening.loc.start.line === node.loc.start.line)
return;
if (opening.loc.start.column === node.loc.start.column && option === "tag-aligned") {
return;
}
if (openingStartOfLine.column === node.loc.start.column && option === "line-aligned") {
return;
}
const messageId = utils.isNodeFirstInLine(context, node) ? MESSAGE_LOCATION[option] : "onOwnLine";
context.report({
node,
messageId,
loc: node.loc,
fix(fixer) {
const indent = new Array((getIndentation(openingStartOfLine, opening) || 0) + 1).join(" ");
if (utils.isNodeFirstInLine(context, node)) {
return fixer.replaceTextRange(
[node.range[0] - node.loc.start.column, node.range[0]],
indent
);
}
return fixer.insertTextBefore(node, `
${indent}`);
}
});
}
return {
JSXClosingElement: handleClosingElement,
JSXClosingFragment: handleClosingElement
};
}
});
module.exports = jsxClosingTagLocation;
@@ -0,0 +1,12 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
/**
* @file DOM解析器,兼容node端和浏览器端
* @author mengke01(kekee000@gmail.com)
*/
/* eslint-disable no-undef */
var _default = exports.default = typeof window !== 'undefined' && window.DOMParser ? window.DOMParser : require('@xmldom/xmldom').DOMParser;
@@ -0,0 +1,28 @@
"use strict";
// THIS CODE WAS AUTOMATICALLY GENERATED
// DO NOT EDIT THIS CODE BY HAND
// RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE:
// npx nx generate-lib repo
Object.defineProperty(exports, "__esModule", { value: true });
exports.es2017 = void 0;
const es2016_1 = require("./es2016");
const es2017_arraybuffer_1 = require("./es2017.arraybuffer");
const es2017_date_1 = require("./es2017.date");
const es2017_intl_1 = require("./es2017.intl");
const es2017_object_1 = require("./es2017.object");
const es2017_sharedmemory_1 = require("./es2017.sharedmemory");
const es2017_string_1 = require("./es2017.string");
const es2017_typedarrays_1 = require("./es2017.typedarrays");
exports.es2017 = {
libs: [
es2016_1.es2016,
es2017_arraybuffer_1.es2017_arraybuffer,
es2017_date_1.es2017_date,
es2017_intl_1.es2017_intl,
es2017_object_1.es2017_object,
es2017_sharedmemory_1.es2017_sharedmemory,
es2017_string_1.es2017_string,
es2017_typedarrays_1.es2017_typedarrays,
],
variables: [],
};
@@ -0,0 +1 @@
{"version":3,"file":"getFirstIterableResult.spec.d.ts","sourceRoot":"","sources":["../../../../src/common/calculations/getFirstIterableResult.spec.ts"],"names":[],"mappings":""}
@@ -0,0 +1,15 @@
import type { TSchema, SchemaOptions } from '../schema/index';
import type { Static } from '../static/index';
import { Kind } from '../symbols/index';
type TIntersectStatic<T extends TSchema[], P extends unknown[], Acc extends unknown = unknown> = T extends [infer L extends TSchema, ...infer R extends TSchema[]] ? TIntersectStatic<R, P, Acc & Static<L, P>> : Acc;
export type TUnevaluatedProperties = undefined | TSchema | boolean;
export interface IntersectOptions extends SchemaOptions {
unevaluatedProperties?: TUnevaluatedProperties;
}
export interface TIntersect<T extends TSchema[] = TSchema[]> extends TSchema, IntersectOptions {
[Kind]: 'Intersect';
static: TIntersectStatic<T, this['params']>;
type?: 'object';
allOf: [...T];
}
export {};
@@ -0,0 +1,11 @@
{
"root": true,
"extends": "@ljharb",
"rules": {
"max-params": [2, 3],
"new-cap": [2, { "capIsNewExceptions": ["GetIntrinsic"] }],
"no-magic-numbers": 0,
},
}
@@ -0,0 +1,77 @@
# reflect.getprototypeof <sup>[![Version Badge][npm-version-svg]][package-url]</sup>
[![github actions][actions-image]][actions-url]
[![coverage][codecov-image]][codecov-url]
[![dependency status][deps-svg]][deps-url]
[![dev dependency status][dev-deps-svg]][dev-deps-url]
[![License][license-image]][license-url]
[![Downloads][downloads-image]][downloads-url]
[![npm badge][npm-badge-png]][package-url]
An ES2015 mostly-spec-compliant `Reflect.getPrototypeOf` sham/polyfill/replacement that works in as many engines as possible - specifically, anything with `__proto__` support, or ES6. Built-in types will also work correctly in older engines.
This package implements the [es-shim API](https://github.com/es-shims/api) interface. It works in an ES3-supported environment and complies with the [spec](https://www.ecma-international.org/ecma-262/5.1/).
## Example
```js
var getPrototypeOf = require('reflect.getprototypeof');
var assert = require('assert');
assert.throws(() => getPrototypeOf(true));
assert.throws(() => getPrototypeOf(42));
assert.throws(() => getPrototypeOf(''));
assert.equal(getPrototypeOf(/a/g), RegExp.prototype);
assert.equal(getPrototypeOf(new Date()), Date.prototype);
assert.equal(getPrototypeOf(function () {}), Function.prototype);
assert.equal(getPrototypeOf([]), Array.prototype);
assert.equal(getPrototypeOf({}), Object.prototype);
```
```js
var getPrototypeOf = require('reflect.getprototypeof');
var assert = require('assert');
/* when Reflect or Reflect.getPrototypeOf is not present */
if (typeof Reflect === 'object') { delete Reflect.getPrototypeOf; }
delete globalThis.Reflect;
var shimmed = getPrototypeOf.shim();
assert.equal(shimmed, getPrototypeOf.getPolyfill());
assert.throws(() => Reflect.getPrototypeOf(true));
assert.throws(() => Reflect.getPrototypeOf(42));
assert.throws(() => Reflect.getPrototypeOf(''));
assert.equal(Reflect.getPrototypeOf(/a/g), RegExp.prototype);
assert.equal(Reflect.getPrototypeOf(new Date()), Date.prototype);
assert.equal(Reflect.getPrototypeOf(function () {}), Function.prototype);
assert.equal(Reflect.getPrototypeOf([]), Array.prototype);
assert.equal(Reflect.getPrototypeOf({}), Object.prototype);
```
```js
var getPrototypeOf = require('reflect.getprototypeof');
var assert = require('assert');
/* when Reflect.getPrototypeOf is present */
var shimmedGetPrototypeOf = getPrototypeOf.shim();
assert.equal(shimmedGetPrototypeOf, Reflect.getPrototypeOf);
assert.equal(Reflect.getPrototypeOf([]), Array.prototype);
```
## Tests
Simply clone the repo, `npm install`, and run `npm test`
[package-url]: https://npmjs.org/package/reflect.getprototypeof
[npm-version-svg]: https://versionbadg.es/es-shims/Reflect.getPrototypeOf.svg
[deps-svg]: https://david-dm.org/es-shims/Reflect.getPrototypeOf.svg
[deps-url]: https://david-dm.org/es-shims/Reflect.getPrototypeOf
[dev-deps-svg]: https://david-dm.org/es-shims/Reflect.getPrototypeOf/dev-status.svg
[dev-deps-url]: https://david-dm.org/es-shims/Reflect.getPrototypeOf#info=devDependencies
[npm-badge-png]: https://nodei.co/npm/reflect.getprototypeof.png?downloads=true&stars=true
[license-image]: https://img.shields.io/npm/l/reflect.getprototypeof.svg
[license-url]: LICENSE
[downloads-image]: https://img.shields.io/npm/dm/reflect.getprototypeof.svg
[downloads-url]: https://npm-stat.com/charts.html?package=reflect.getprototypeof
[codecov-image]: https://codecov.io/gh/es-shims/Reflect.getPrototypeOf/branch/main/graphs/badge.svg
[codecov-url]: https://app.codecov.io/gh/es-shims/Reflect.getPrototypeOf/
[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/es-shims/Reflect.getPrototypeOf
[actions-url]: https://github.com/es-shims/Reflect.getPrototypeOf/actions
@@ -0,0 +1,9 @@
import { TypeBoxError } from '../../type/error/index.mjs';
export declare class ValueMutateError extends TypeBoxError {
constructor(message: string);
}
export type Mutable = {
[key: string]: unknown;
} | unknown[];
/** `[Mutable]` Performs a deep mutable value assignment while retaining internal references */
export declare function Mutate(current: Mutable, next: Mutable): void;
@@ -0,0 +1,5 @@
import { NumberFormatInternal, NumberFormatPart } from '../types/number';
/**
* https://tc39.es/ecma402/#sec-formatapproximately
*/
export declare function FormatApproximately(internalSlots: NumberFormatInternal, result: NumberFormatPart[]): NumberFormatPart[];
@@ -0,0 +1,717 @@
/**
* @fileoverview A rule to control the use of single variable declarations.
* @author Ian Christian Myers
*/
"use strict";
//------------------------------------------------------------------------------
// Requirements
//------------------------------------------------------------------------------
const astUtils = require("./utils/ast-utils");
//------------------------------------------------------------------------------
// Helpers
//------------------------------------------------------------------------------
/**
* Determines whether the given node is in a statement list.
* @param {ASTNode} node node to check
* @returns {boolean} `true` if the given node is in a statement list
*/
function isInStatementList(node) {
return astUtils.STATEMENT_LIST_PARENTS.has(node.parent.type);
}
//------------------------------------------------------------------------------
// Rule Definition
//------------------------------------------------------------------------------
/** @type {import('../types').Rule.RuleModule} */
module.exports = {
meta: {
type: "suggestion",
docs: {
description:
"Enforce variables to be declared either together or separately in functions",
recommended: false,
frozen: true,
url: "https://eslint.org/docs/latest/rules/one-var",
},
fixable: "code",
schema: [
{
oneOf: [
{
enum: ["always", "never", "consecutive"],
},
{
type: "object",
properties: {
separateRequires: {
type: "boolean",
},
var: {
enum: ["always", "never", "consecutive"],
},
let: {
enum: ["always", "never", "consecutive"],
},
const: {
enum: ["always", "never", "consecutive"],
},
using: {
enum: ["always", "never", "consecutive"],
},
awaitUsing: {
enum: ["always", "never", "consecutive"],
},
},
additionalProperties: false,
},
{
type: "object",
properties: {
initialized: {
enum: ["always", "never", "consecutive"],
},
uninitialized: {
enum: ["always", "never", "consecutive"],
},
},
additionalProperties: false,
},
],
},
],
messages: {
combineUninitialized:
"Combine this with the previous '{{type}}' statement with uninitialized variables.",
combineInitialized:
"Combine this with the previous '{{type}}' statement with initialized variables.",
splitUninitialized:
"Split uninitialized '{{type}}' declarations into multiple statements.",
splitInitialized:
"Split initialized '{{type}}' declarations into multiple statements.",
splitRequires:
"Split requires to be separated into a single block.",
combine: "Combine this with the previous '{{type}}' statement.",
split: "Split '{{type}}' declarations into multiple statements.",
},
},
create(context) {
const MODE_ALWAYS = "always";
const MODE_NEVER = "never";
const MODE_CONSECUTIVE = "consecutive";
const mode = context.options[0] || MODE_ALWAYS;
const options = {};
if (typeof mode === "string") {
// simple options configuration with just a string
options.var = { uninitialized: mode, initialized: mode };
options.let = { uninitialized: mode, initialized: mode };
options.const = { uninitialized: mode, initialized: mode };
options.using = { uninitialized: mode, initialized: mode };
options.awaitUsing = { uninitialized: mode, initialized: mode };
} else if (typeof mode === "object") {
// options configuration is an object
options.separateRequires = !!mode.separateRequires;
options.var = { uninitialized: mode.var, initialized: mode.var };
options.let = { uninitialized: mode.let, initialized: mode.let };
options.const = {
uninitialized: mode.const,
initialized: mode.const,
};
options.using = {
uninitialized: mode.using,
initialized: mode.using,
};
options.awaitUsing = {
uninitialized: mode.awaitUsing,
initialized: mode.awaitUsing,
};
if (Object.hasOwn(mode, "uninitialized")) {
options.var.uninitialized = mode.uninitialized;
options.let.uninitialized = mode.uninitialized;
options.const.uninitialized = mode.uninitialized;
options.using.uninitialized = mode.uninitialized;
options.awaitUsing.uninitialized = mode.uninitialized;
}
if (Object.hasOwn(mode, "initialized")) {
options.var.initialized = mode.initialized;
options.let.initialized = mode.initialized;
options.const.initialized = mode.initialized;
options.using.initialized = mode.initialized;
options.awaitUsing.initialized = mode.initialized;
}
}
const sourceCode = context.sourceCode;
//--------------------------------------------------------------------------
// Helpers
//--------------------------------------------------------------------------
const functionStack = [];
const blockStack = [];
/**
* Increments the blockStack counter.
* @returns {void}
* @private
*/
function startBlock() {
blockStack.push({
let: { initialized: false, uninitialized: false },
const: { initialized: false, uninitialized: false },
using: { initialized: false, uninitialized: false },
awaitUsing: { initialized: false, uninitialized: false },
});
}
/**
* Increments the functionStack counter.
* @returns {void}
* @private
*/
function startFunction() {
functionStack.push({ initialized: false, uninitialized: false });
startBlock();
}
/**
* Decrements the blockStack counter.
* @returns {void}
* @private
*/
function endBlock() {
blockStack.pop();
}
/**
* Decrements the functionStack counter.
* @returns {void}
* @private
*/
function endFunction() {
functionStack.pop();
endBlock();
}
/**
* Check if a variable declaration is a require.
* @param {ASTNode} decl variable declaration Node
* @returns {bool} if decl is a require, return true; else return false.
* @private
*/
function isRequire(decl) {
return (
decl.init &&
decl.init.type === "CallExpression" &&
decl.init.callee.name === "require"
);
}
/**
* Records whether initialized/uninitialized/required variables are defined in current scope.
* @param {string} statementType one of: "var", "let", "const", "using", or "awaitUsing"
* @param {ASTNode[]} declarations List of declarations
* @param {Object} currentScope The scope being investigated
* @returns {void}
* @private
*/
function recordTypes(statementType, declarations, currentScope) {
for (let i = 0; i < declarations.length; i++) {
if (declarations[i].init === null) {
if (
options[statementType] &&
options[statementType].uninitialized === MODE_ALWAYS
) {
currentScope.uninitialized = true;
}
} else {
if (
options[statementType] &&
options[statementType].initialized === MODE_ALWAYS
) {
if (
options.separateRequires &&
isRequire(declarations[i])
) {
currentScope.required = true;
} else {
currentScope.initialized = true;
}
}
}
}
}
/**
* Determines the current scope (function or block)
* @param {string} statementType one of: "var", "let", "const", "using", or "awaitUsing"
* @returns {Object} The scope associated with statementType
*/
function getCurrentScope(statementType) {
let currentScope;
if (statementType === "var") {
currentScope = functionStack.at(-1);
} else if (statementType === "let") {
currentScope = blockStack.at(-1).let;
} else if (statementType === "const") {
currentScope = blockStack.at(-1).const;
} else if (statementType === "using") {
currentScope = blockStack.at(-1).using;
} else if (statementType === "awaitUsing") {
currentScope = blockStack.at(-1).awaitUsing;
}
return currentScope;
}
/**
* Counts the number of initialized and uninitialized declarations in a list of declarations
* @param {ASTNode[]} declarations List of declarations
* @returns {Object} Counts of 'uninitialized' and 'initialized' declarations
* @private
*/
function countDeclarations(declarations) {
const counts = { uninitialized: 0, initialized: 0 };
for (let i = 0; i < declarations.length; i++) {
if (declarations[i].init === null) {
counts.uninitialized++;
} else {
counts.initialized++;
}
}
return counts;
}
/**
* Determines if there is more than one var statement in the current scope.
* @param {string} statementType one of: "var", "let", "const", "using", or "awaitUsing"
* @param {ASTNode[]} declarations List of declarations
* @returns {boolean} Returns true if it is the first var declaration, false if not.
* @private
*/
function hasOnlyOneStatement(statementType, declarations) {
const declarationCounts = countDeclarations(declarations);
const currentOptions = options[statementType] || {};
const currentScope = getCurrentScope(statementType);
const hasRequires = declarations.some(isRequire);
if (
currentOptions.uninitialized === MODE_ALWAYS &&
currentOptions.initialized === MODE_ALWAYS
) {
if (currentScope.uninitialized || currentScope.initialized) {
if (!hasRequires) {
return false;
}
}
}
if (declarationCounts.uninitialized > 0) {
if (
currentOptions.uninitialized === MODE_ALWAYS &&
currentScope.uninitialized
) {
return false;
}
}
if (declarationCounts.initialized > 0) {
if (
currentOptions.initialized === MODE_ALWAYS &&
currentScope.initialized
) {
if (!hasRequires) {
return false;
}
}
}
if (currentScope.required && hasRequires) {
return false;
}
recordTypes(statementType, declarations, currentScope);
return true;
}
/**
* Fixer to join VariableDeclaration's into a single declaration
* @param {VariableDeclarator[]} declarations The `VariableDeclaration` to join
* @returns {Function} The fixer function
*/
function joinDeclarations(declarations) {
const declaration = declarations[0];
const body = Array.isArray(declaration.parent.parent.body)
? declaration.parent.parent.body
: [];
const currentIndex = body.findIndex(
node => node.range[0] === declaration.parent.range[0],
);
const previousNode = body[currentIndex - 1];
return function* joinDeclarationsFixer(fixer) {
const type = sourceCode.getFirstToken(declaration.parent);
const beforeType = sourceCode.getTokenBefore(type);
if (
previousNode &&
previousNode.kind === declaration.parent.kind
) {
if (beforeType.value === ";") {
yield fixer.replaceText(beforeType, ",");
} else {
yield fixer.insertTextAfter(beforeType, ",");
}
if (declaration.parent.kind === "await using") {
const usingToken = sourceCode.getTokenAfter(type);
yield fixer.remove(usingToken);
}
yield fixer.replaceText(type, "");
}
};
}
/**
* Fixer to split a VariableDeclaration into individual declarations
* @param {VariableDeclaration} declaration The `VariableDeclaration` to split
* @returns {Function|null} The fixer function
*/
function splitDeclarations(declaration) {
const { parent } = declaration;
// don't autofix code such as: if (foo) var x, y;
if (
!isInStatementList(
parent.type === "ExportNamedDeclaration"
? parent
: declaration,
)
) {
return null;
}
return fixer =>
declaration.declarations
.map(declarator => {
const tokenAfterDeclarator =
sourceCode.getTokenAfter(declarator);
if (tokenAfterDeclarator === null) {
return null;
}
const afterComma = sourceCode.getTokenAfter(
tokenAfterDeclarator,
{ includeComments: true },
);
if (tokenAfterDeclarator.value !== ",") {
return null;
}
const exportPlacement =
declaration.parent.type === "ExportNamedDeclaration"
? "export "
: "";
/*
* `var x,y`
* tokenAfterDeclarator ^^ afterComma
*/
if (
afterComma.range[0] ===
tokenAfterDeclarator.range[1]
) {
return fixer.replaceText(
tokenAfterDeclarator,
`; ${exportPlacement}${declaration.kind} `,
);
}
/*
* `var x,
* tokenAfterDeclarator ^
* y`
* ^ afterComma
*/
if (
afterComma.loc.start.line >
tokenAfterDeclarator.loc.end.line ||
afterComma.type === "Line" ||
afterComma.type === "Block"
) {
let lastComment = afterComma;
while (
lastComment.type === "Line" ||
lastComment.type === "Block"
) {
lastComment = sourceCode.getTokenAfter(
lastComment,
{ includeComments: true },
);
}
return fixer.replaceTextRange(
[
tokenAfterDeclarator.range[0],
lastComment.range[0],
],
`;${sourceCode.text.slice(
tokenAfterDeclarator.range[1],
lastComment.range[0],
)}${exportPlacement}${declaration.kind} `,
);
}
return fixer.replaceText(
tokenAfterDeclarator,
`; ${exportPlacement}${declaration.kind}`,
);
})
.filter(x => x);
}
/**
* Checks a given VariableDeclaration node for errors.
* @param {ASTNode} node The VariableDeclaration node to check
* @returns {void}
* @private
*/
function checkVariableDeclaration(node) {
const parent = node.parent;
const type = node.kind;
const key = type === "await using" ? "awaitUsing" : type;
if (!options[key]) {
return;
}
const declarations = node.declarations;
const declarationCounts = countDeclarations(declarations);
const mixedRequires =
declarations.some(isRequire) && !declarations.every(isRequire);
if (options[key].initialized === MODE_ALWAYS) {
if (options.separateRequires && mixedRequires) {
context.report({
node,
messageId: "splitRequires",
});
}
}
// consecutive
const nodeIndex =
(parent.body &&
parent.body.length > 0 &&
parent.body.indexOf(node)) ||
0;
if (nodeIndex > 0) {
const previousNode = parent.body[nodeIndex - 1];
const isPreviousNodeDeclaration =
previousNode.type === "VariableDeclaration";
const declarationsWithPrevious = declarations.concat(
previousNode.declarations || [],
);
if (
isPreviousNodeDeclaration &&
previousNode.kind === type &&
!(
declarationsWithPrevious.some(isRequire) &&
!declarationsWithPrevious.every(isRequire)
)
) {
const previousDeclCounts = countDeclarations(
previousNode.declarations,
);
if (
options[key].initialized === MODE_CONSECUTIVE &&
options[key].uninitialized === MODE_CONSECUTIVE
) {
context.report({
node,
messageId: "combine",
data: {
type,
},
fix: joinDeclarations(declarations),
});
} else if (
options[key].initialized === MODE_CONSECUTIVE &&
declarationCounts.initialized > 0 &&
previousDeclCounts.initialized > 0
) {
context.report({
node,
messageId: "combineInitialized",
data: {
type,
},
fix: joinDeclarations(declarations),
});
} else if (
options[key].uninitialized === MODE_CONSECUTIVE &&
declarationCounts.uninitialized > 0 &&
previousDeclCounts.uninitialized > 0
) {
context.report({
node,
messageId: "combineUninitialized",
data: {
type,
},
fix: joinDeclarations(declarations),
});
}
}
}
// always
if (!hasOnlyOneStatement(key, declarations)) {
if (
options[key].initialized === MODE_ALWAYS &&
options[key].uninitialized === MODE_ALWAYS
) {
context.report({
node,
messageId: "combine",
data: {
type,
},
fix: joinDeclarations(declarations),
});
} else {
if (
options[key].initialized === MODE_ALWAYS &&
declarationCounts.initialized > 0
) {
context.report({
node,
messageId: "combineInitialized",
data: {
type,
},
fix: joinDeclarations(declarations),
});
}
if (
options[key].uninitialized === MODE_ALWAYS &&
declarationCounts.uninitialized > 0
) {
if (
node.parent.left === node &&
(node.parent.type === "ForInStatement" ||
node.parent.type === "ForOfStatement")
) {
return;
}
context.report({
node,
messageId: "combineUninitialized",
data: {
type,
},
fix: joinDeclarations(declarations),
});
}
}
}
// never
if (parent.type !== "ForStatement" || parent.init !== node) {
const totalDeclarations =
declarationCounts.uninitialized +
declarationCounts.initialized;
if (totalDeclarations > 1) {
if (
options[key].initialized === MODE_NEVER &&
options[key].uninitialized === MODE_NEVER
) {
// both initialized and uninitialized
context.report({
node,
messageId: "split",
data: {
type,
},
fix: splitDeclarations(node),
});
} else if (
options[key].initialized === MODE_NEVER &&
declarationCounts.initialized > 0
) {
// initialized
context.report({
node,
messageId: "splitInitialized",
data: {
type,
},
fix: splitDeclarations(node),
});
} else if (
options[key].uninitialized === MODE_NEVER &&
declarationCounts.uninitialized > 0
) {
// uninitialized
context.report({
node,
messageId: "splitUninitialized",
data: {
type,
},
fix: splitDeclarations(node),
});
}
}
}
}
//--------------------------------------------------------------------------
// Public API
//--------------------------------------------------------------------------
return {
Program: startFunction,
FunctionDeclaration: startFunction,
FunctionExpression: startFunction,
ArrowFunctionExpression: startFunction,
StaticBlock: startFunction, // StaticBlock creates a new scope for `var` variables
BlockStatement: startBlock,
ForStatement: startBlock,
ForInStatement: startBlock,
ForOfStatement: startBlock,
SwitchStatement: startBlock,
VariableDeclaration: checkVariableDeclaration,
"ForStatement:exit": endBlock,
"ForOfStatement:exit": endBlock,
"ForInStatement:exit": endBlock,
"SwitchStatement:exit": endBlock,
"BlockStatement:exit": endBlock,
"Program:exit": endFunction,
"FunctionDeclaration:exit": endFunction,
"FunctionExpression:exit": endFunction,
"ArrowFunctionExpression:exit": endFunction,
"StaticBlock:exit": endFunction,
};
},
};
@@ -0,0 +1,356 @@
import { expect, expectTypeOf, test } from "vitest";
import { z } from "zod/v4";
test("recursion with z.lazy", () => {
const data = {
name: "I",
subcategories: [
{
name: "A",
subcategories: [
{
name: "1",
subcategories: [
{
name: "a",
subcategories: [],
},
],
},
],
},
],
};
const Category = z.object({
name: z.string(),
get subcategories() {
return z.array(Category).optional().nullable();
},
});
type Category = z.infer<typeof Category>;
interface _Category {
name: string;
subcategories?: _Category[] | undefined | null;
}
expectTypeOf<Category>().toEqualTypeOf<_Category>();
Category.parse(data);
});
test("recursion involving union type", () => {
const data = {
value: 1,
next: {
value: 2,
next: {
value: 3,
next: {
value: 4,
next: null,
},
},
},
};
const LL = z.object({
value: z.number(),
get next() {
return LL.nullable();
},
});
type LL = z.infer<typeof LL>;
type _LL = {
value: number;
next: _LL | null;
};
expectTypeOf<LL>().toEqualTypeOf<_LL>();
LL.parse(data);
});
test("mutual recursion - native", () => {
const Alazy = z.object({
val: z.number(),
get b() {
return Blazy;
},
});
const Blazy = z.object({
val: z.number(),
get a() {
return Alazy.optional();
},
});
const testData = {
val: 1,
b: {
val: 5,
a: {
val: 3,
b: {
val: 4,
a: {
val: 2,
b: {
val: 1,
},
},
},
},
},
};
type Alazy = z.infer<typeof Alazy>;
type Blazy = z.infer<typeof Blazy>;
interface _Alazy {
val: number;
b: _Blazy;
}
interface _Blazy {
val: number;
a?: _Alazy | undefined;
}
expectTypeOf<Alazy>().toEqualTypeOf<_Alazy>();
expectTypeOf<Blazy>().toEqualTypeOf<_Blazy>();
Alazy.parse(testData);
Blazy.parse(testData.b);
expect(() => Alazy.parse({ val: "asdf" })).toThrow();
});
test("pick and omit with getter", () => {
const Category = z.strictObject({
name: z.string(),
get subcategories() {
return z.array(Category);
},
});
type Category = z.infer<typeof Category>;
interface _Category {
name: string;
subcategories: _Category[];
}
expectTypeOf<Category>().toEqualTypeOf<_Category>();
const PickedCategory = Category.pick({ name: true });
const OmittedCategory = Category.omit({ subcategories: true });
const picked = { name: "test" };
const omitted = { name: "test" };
PickedCategory.parse(picked);
OmittedCategory.parse(omitted);
expect(() => PickedCategory.parse({ name: "test", subcategories: [] })).toThrow();
expect(() => OmittedCategory.parse({ name: "test", subcategories: [] })).toThrow();
});
test("deferred self-recursion", () => {
const Feature = z.object({
title: z.string(),
get features(): z.ZodOptional<z.ZodArray<typeof Feature>> {
return z.optional(z.array(Feature)); //.optional();
},
});
// type Feature = z.infer<typeof Feature>;
const Output = z.object({
id: z.int(), //.nonnegative(),
name: z.string(),
get features(): z.ZodArray<typeof Feature> {
return Feature.array();
},
});
type Output = z.output<typeof Output>;
type _Feature = {
title: string;
features?: _Feature[] | undefined;
};
type _Output = {
id: number;
name: string;
features: _Feature[];
};
// expectTypeOf<Feature>().toEqualTypeOf<_Feature>();
expectTypeOf<Output>().toEqualTypeOf<_Output>();
});
test("deferred mutual recursion", () => {
const Slot = z.object({
slotCode: z.string(),
get blocks() {
return z.array(Block);
},
});
type Slot = z.infer<typeof Slot>;
const Block = z.object({
blockCode: z.string(),
get slots() {
return z.array(Slot).optional();
},
});
type Block = z.infer<typeof Block>;
const Page = z.object({
slots: z.array(Slot),
});
type Page = z.infer<typeof Page>;
type _Slot = {
slotCode: string;
blocks: _Block[];
};
type _Block = {
blockCode: string;
slots?: _Slot[] | undefined;
};
type _Page = {
slots: _Slot[];
};
expectTypeOf<Slot>().toEqualTypeOf<_Slot>();
expectTypeOf<Block>().toEqualTypeOf<_Block>();
expectTypeOf<Page>().toEqualTypeOf<_Page>();
});
test("mutual recursion with meta", () => {
const A = z
.object({
name: z.string(),
get b() {
return B;
},
})
.readonly()
.meta({ id: "A" })
.optional();
const B = z
.object({
name: z.string(),
get a() {
return A;
},
})
.readonly()
.meta({ id: "B" });
type A = z.infer<typeof A>;
type B = z.infer<typeof B>;
type _A =
| Readonly<{
name: string;
b: _B;
}>
| undefined;
// | undefined;
type _B = Readonly<{
name: string;
a?: _A;
}>;
expectTypeOf<A>().toEqualTypeOf<_A>();
expectTypeOf<B>().toEqualTypeOf<_B>();
});
test("recursion compatibility", () => {
// array
const A = z.object({
get array() {
return A.array();
},
get optional() {
return A.optional();
},
get nullable() {
return A.nullable();
},
get nonoptional() {
return A.nonoptional();
},
get readonly() {
return A.readonly();
},
get describe() {
return A.describe("A recursive type");
},
get meta() {
return A.meta({ description: "A recursive type" });
},
get pipe() {
return A.pipe(z.any());
},
get strict() {
return A.strict();
},
get tuple() {
return z.tuple([A, A]);
},
get object() {
return z
.object({
subcategories: A,
})
.strict()
.loose();
},
get union() {
return z.union([A, A]);
},
get intersection() {
return z.intersection(A, A);
},
get record() {
return z.record(z.string(), A);
},
get map() {
return z.map(z.string(), A);
},
get set() {
return z.set(A);
},
get lazy() {
return z.lazy(() => A);
},
get promise() {
return z.promise(A);
},
});
});
// biome-ignore lint: sadf
export type RecursiveA = z.ZodUnion<
[
z.ZodObject<{
a: z.ZodDefault<RecursiveA>;
b: z.ZodPrefault<RecursiveA>;
c: z.ZodNonOptional<RecursiveA>;
d: z.ZodOptional<RecursiveA>;
e: z.ZodNullable<RecursiveA>;
g: z.ZodReadonly<RecursiveA>;
h: z.ZodPipe<RecursiveA, z.ZodString>;
i: z.ZodArray<RecursiveA>;
j: z.ZodSet<RecursiveA>;
k: z.ZodMap<RecursiveA, RecursiveA>;
l: z.ZodRecord<z.ZodString, RecursiveA>;
m: z.ZodUnion<[RecursiveA, RecursiveA]>;
n: z.ZodIntersection<RecursiveA, RecursiveA>;
o: z.ZodLazy<RecursiveA>;
p: z.ZodPromise<RecursiveA>;
q: z.ZodCatch<RecursiveA>;
r: z.ZodSuccess<RecursiveA>;
s: z.ZodTransform<RecursiveA, string>;
t: z.ZodTuple<[RecursiveA, RecursiveA]>;
u: z.ZodObject<{
a: RecursiveA;
}>;
}>,
]
>;
Loaded 100 of 35554 files, more files were not shown because too many files have changed in this diff. Show more