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 @@
{"version":3,"file":"font.js","names":["ClassAttributor","Scope","StyleAttributor","config","scope","INLINE","whitelist","FontClass","FontStyleAttributor","value","node","replace","FontStyle"],"sources":["../../src/formats/font.ts"],"sourcesContent":["import { ClassAttributor, Scope, StyleAttributor } from 'parchment';\n\nconst config = {\n scope: Scope.INLINE,\n whitelist: ['serif', 'monospace'],\n};\n\nconst FontClass = new ClassAttributor('font', 'ql-font', config);\n\nclass FontStyleAttributor extends StyleAttributor {\n value(node: HTMLElement) {\n return super.value(node).replace(/[\"']/g, '');\n }\n}\n\nconst FontStyle = new FontStyleAttributor('font', 'font-family', config);\n\nexport { FontStyle, FontClass };\n"],"mappings":"AAAA,SAASA,eAAe,EAAEC,KAAK,EAAEC,eAAe,QAAQ,WAAW;AAEnE,MAAMC,MAAM,GAAG;EACbC,KAAK,EAAEH,KAAK,CAACI,MAAM;EACnBC,SAAS,EAAE,CAAC,OAAO,EAAE,WAAW;AAClC,CAAC;AAED,MAAMC,SAAS,GAAG,IAAIP,eAAe,CAAC,MAAM,EAAE,SAAS,EAAEG,MAAM,CAAC;AAEhE,MAAMK,mBAAmB,SAASN,eAAe,CAAC;EAChDO,KAAKA,CAACC,IAAiB,EAAE;IACvB,OAAO,KAAK,CAACD,KAAK,CAACC,IAAI,CAAC,CAACC,OAAO,CAAC,OAAO,EAAE,EAAE,CAAC;EAC/C;AACF;AAEA,MAAMC,SAAS,GAAG,IAAIJ,mBAAmB,CAAC,MAAM,EAAE,aAAa,EAAEL,MAAM,CAAC;AAExE,SAASS,SAAS,EAAEL,SAAS","ignoreList":[]}
@@ -0,0 +1,67 @@
# 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).
## [v2.1.0](https://github.com/es-shims/es-set-tostringtag/compare/v2.0.3...v2.1.0) - 2025-01-01
### Commits
- [actions] split out node 10-20, and 20+ [`ede033c`](https://github.com/es-shims/es-set-tostringtag/commit/ede033cc4e506c3966d2d482d4ac5987e329162a)
- [types] use shared config [`28ef164`](https://github.com/es-shims/es-set-tostringtag/commit/28ef164ad7c5bc21837c79f7ef25542a1f258ade)
- [New] add `nonConfigurable` option [`3bee3f0`](https://github.com/es-shims/es-set-tostringtag/commit/3bee3f04caddd318f3932912212ed20b2d62aad7)
- [Fix] validate boolean option argument [`3c8a609`](https://github.com/es-shims/es-set-tostringtag/commit/3c8a609c795a305ccca163f0ff6956caa88cdc0e)
- [Dev Deps] update `@arethetypeswrong/cli`, `@ljharb/eslint-config`, `@ljharb/tsconfig`, `@types/get-intrinsic`, `@types/tape`, `auto-changelog`, `tape` [`501a969`](https://github.com/es-shims/es-set-tostringtag/commit/501a96998484226e07f5ffd447e8f305a998f1d8)
- [Tests] add coverage [`18af289`](https://github.com/es-shims/es-set-tostringtag/commit/18af2897b4e937373c9b8c8831bc338932246470)
- [readme] document `force` option [`bd446a1`](https://github.com/es-shims/es-set-tostringtag/commit/bd446a107b71a2270278442e5124f45590d3ee64)
- [Tests] use `@arethetypeswrong/cli` [`7c2c2fa`](https://github.com/es-shims/es-set-tostringtag/commit/7c2c2fa3cca0f4d263603adb75426b239514598f)
- [Tests] replace `aud` with `npm audit` [`9e372d7`](https://github.com/es-shims/es-set-tostringtag/commit/9e372d7e6db3dab405599a14d9074a99a03b8242)
- [Deps] update `get-intrinsic` [`7df1216`](https://github.com/es-shims/es-set-tostringtag/commit/7df12167295385c2a547410e687cb0c04f3a34b9)
- [Deps] update `hasown` [`993a7d2`](https://github.com/es-shims/es-set-tostringtag/commit/993a7d200e2059fd857ec1a25d0a49c2c34ae6e2)
- [Dev Deps] add missing peer dep [`148ed8d`](https://github.com/es-shims/es-set-tostringtag/commit/148ed8db99a7a94f9af3823fd083e6e437fa1587)
## [v2.0.3](https://github.com/es-shims/es-set-tostringtag/compare/v2.0.2...v2.0.3) - 2024-02-20
### Commits
- add types [`d538513`](https://github.com/es-shims/es-set-tostringtag/commit/d5385133592a32a0a416cb535327918af7fbc4ad)
- [Deps] update `get-intrinsic`, `has-tostringtag`, `hasown` [`d129b29`](https://github.com/es-shims/es-set-tostringtag/commit/d129b29536bccc8a9d03a47887ca4d1f7ad0c5b9)
- [Dev Deps] update `aud`, `npmignore`, `tape` [`132ed23`](https://github.com/es-shims/es-set-tostringtag/commit/132ed23c964a41ed55e4ab4a5a2c3fe185e821c1)
- [Tests] fix hasOwn require [`f89c831`](https://github.com/es-shims/es-set-tostringtag/commit/f89c831fe5f3edf1f979c597b56fee1be6111f56)
## [v2.0.2](https://github.com/es-shims/es-set-tostringtag/compare/v2.0.1...v2.0.2) - 2023-10-20
### Commits
- [Refactor] use `hasown` instead of `has` [`0cc6c4e`](https://github.com/es-shims/es-set-tostringtag/commit/0cc6c4e61fd13e8f00b85424ae6e541ebf289e74)
- [Dev Deps] update `@ljharb/eslint-config`, `aud`, `tape` [`70e447c`](https://github.com/es-shims/es-set-tostringtag/commit/70e447cf9f82b896ddf359fda0a0498c16cf3ed2)
- [Deps] update `get-intrinsic` [`826aab7`](https://github.com/es-shims/es-set-tostringtag/commit/826aab76180392871c8efa99acc0f0bbf775c64e)
## [v2.0.1](https://github.com/es-shims/es-set-tostringtag/compare/v2.0.0...v2.0.1) - 2023-01-05
### Fixed
- [Fix] move `has` to prod deps [`#2`](https://github.com/es-shims/es-set-tostringtag/issues/2)
### Commits
- [Dev Deps] update `@ljharb/eslint-config` [`b9eecd2`](https://github.com/es-shims/es-set-tostringtag/commit/b9eecd23c10b7b43ba75089ac8ff8cc6b295798b)
## [v2.0.0](https://github.com/es-shims/es-set-tostringtag/compare/v1.0.0...v2.0.0) - 2022-12-21
### Commits
- [Tests] refactor tests [`168dcfb`](https://github.com/es-shims/es-set-tostringtag/commit/168dcfbb535c279dc48ccdc89419155125aaec18)
- [Breaking] do not set toStringTag if it is already set [`226ab87`](https://github.com/es-shims/es-set-tostringtag/commit/226ab874192c625d9e5f0e599d3f60d2b2aa83b5)
- [New] add `force` option to set even if already set [`1abd4ec`](https://github.com/es-shims/es-set-tostringtag/commit/1abd4ecb282f19718c4518284b0293a343564505)
## v1.0.0 - 2022-12-21
### Commits
- Initial implementation, tests, readme [`a0e1147`](https://github.com/es-shims/es-set-tostringtag/commit/a0e11473f79a233b46374525c962ea1b4d42418a)
- Initial commit [`ffd4aff`](https://github.com/es-shims/es-set-tostringtag/commit/ffd4afffbeebf29aff0d87a7cfc3f7844e09fe68)
- npm init [`fffe5bd`](https://github.com/es-shims/es-set-tostringtag/commit/fffe5bd1d1146d084730a387a9c672371f4a8fff)
- Only apps should have lockfiles [`d363871`](https://github.com/es-shims/es-set-tostringtag/commit/d36387139465623e161a15dbd39120537f150c62)
@@ -0,0 +1,30 @@
module.exports = {
'countBy': require('./countBy'),
'each': require('./each'),
'eachRight': require('./eachRight'),
'every': require('./every'),
'filter': require('./filter'),
'find': require('./find'),
'findLast': require('./findLast'),
'flatMap': require('./flatMap'),
'flatMapDeep': require('./flatMapDeep'),
'flatMapDepth': require('./flatMapDepth'),
'forEach': require('./forEach'),
'forEachRight': require('./forEachRight'),
'groupBy': require('./groupBy'),
'includes': require('./includes'),
'invokeMap': require('./invokeMap'),
'keyBy': require('./keyBy'),
'map': require('./map'),
'orderBy': require('./orderBy'),
'partition': require('./partition'),
'reduce': require('./reduce'),
'reduceRight': require('./reduceRight'),
'reject': require('./reject'),
'sample': require('./sample'),
'sampleSize': require('./sampleSize'),
'shuffle': require('./shuffle'),
'size': require('./size'),
'some': require('./some'),
'sortBy': require('./sortBy')
};
@@ -0,0 +1 @@
{"name":"file-selector","version":"2.1.2","requiresBuild":false,"files":{"LICENSE":{"checkedAt":1794532112087,"integrity":"sha512-n1d9OwhX6OduSBz/AAwPPL0WhaNol5bCBHqGBEqTLeOwxopN67xVm6E2BRbq/MnUoZ93dUV4jDvlxbi1o7lK0A==","mode":420,"size":1069},"dist/es2015/file-selector.js":{"checkedAt":1794532112087,"integrity":"sha512-O3gQKtEjCd4A20GtZ/0X/Gb3qNTSWZoqfFX2QUjF0nQExNnOFSvOlXxrnG/iEi0NXm/SbRCRNjZTnQieD7DUfQ==","mode":420,"size":7499},"dist/file-selector.js":{"checkedAt":1794532112087,"integrity":"sha512-NZcgwj9H9xF07p7MGWUp9uPmtnnyU2mHnfXX0x7+bYOnj8cuhmVZ4uJRd740/Mw5l65YKzSfl1wPFke5qHvlXg==","mode":420,"size":12796},"dist/bundles/file-selector.umd.js":{"checkedAt":1794532112087,"integrity":"sha512-1xwRi22Os5R1rTkHPKmxLlYFS61qHnE8YlsbfMmmY/oPwdAjqD/Unmbcaw/S7ky3UBmArFVD09vx99BYQ8ubVQ==","mode":420,"size":62481},"dist/bundles/file-selector.umd.min.js":{"checkedAt":1794532112088,"integrity":"sha512-1UDcLl7NCWEtI4eUrM9CsYzPiFRNXdl9LteBLN5JT0s6R2OcQl08YOEeB6kpJ2+6CFdgqGw3/aZ5+FqDnlEGNw==","mode":420,"size":44364},"dist/es2015/file.js":{"checkedAt":1794532112088,"integrity":"sha512-nWNckf8Ta9osfp9RWgV3JTrhvoSq7LWIdMPam7I5dH9x5qqbnvwYNZbybch0QrU/OyxrwCtJMHe2eIuc+MrEWw==","mode":420,"size":50276},"dist/file.js":{"checkedAt":1794532112088,"integrity":"sha512-OZg3rJ+YT9+88MuyDGPS7nueO3Il435VV5hO9jWRGVFk8GTZB8SdGl1OP9iibdHe5tKK0K/MvhRUNX70PzpS7Q==","mode":420,"size":50441},"dist/es2015/index.js":{"checkedAt":1794532112089,"integrity":"sha512-GVpQqp+VNBw/sPQAnE3rD1umuNQhZ4a4/s5ItEqYozAKzs5w4T+SgILHx6CdgPL4S781i4RlZ54xFVHJtq4OGw==","mode":420,"size":78},"dist/index.js":{"checkedAt":1794532112089,"integrity":"sha512-4CNkQseXVcIV4P45+j8DWX8dYZ9kSeVdzywTgHh4e6/mtLrn8YUgnZPprd8Zst8cQEyjsr2TZl4WW0Cjs/vhmQ==","mode":420,"size":311},"package.json":{"checkedAt":1794532112089,"integrity":"sha512-9qnM7v5V+81GSSIeOV3qZuLBvypfsOCrMjF/amxADeRB3H56it1JnmQFsPr+PNZCkM+H4OjZL3b7IVw7GkSQ7g==","mode":420,"size":1864},"dist/es2015/file-selector.js.map":{"checkedAt":1794532112089,"integrity":"sha512-NjBIyAhFE48sq7BwJVwv8uDMyQFPu0mcs1HYxwBP7YCT7KshL5EgJqlx1C34FD2QjJNHO3N49tUggu7FAV+Jpw==","mode":420,"size":5451},"dist/file-selector.js.map":{"checkedAt":1794532112089,"integrity":"sha512-dub+d2iclJ6h0ebbkNJ+XWknuvGm6xIUaZ5bdkdFiPDMMjMhh8Roq5vicuzluxqk565X27n9tZGHLkwFOSIakw==","mode":420,"size":5333},"dist/bundles/file-selector.umd.js.map":{"checkedAt":1794532112090,"integrity":"sha512-B1oTaIsKw8xX9kykcOMcKSZLOxumzpwbgoKhI99ISm0AHXZFvvJIiUCNNf4T3PhDBCG7joy6uZbq77/e+ujBJw==","mode":420,"size":130912},"dist/bundles/file-selector.umd.min.js.map":{"checkedAt":1794532112090,"integrity":"sha512-n9vOyAX23rJIibMFt06y217pSSIrTlkhlcu+wbs9TWAnGeuXKx+W0PrlHcf1s6G5w+Qe1iuWW8SkyRcwv2541g==","mode":420,"size":100794},"dist/es2015/file.js.map":{"checkedAt":1794532112090,"integrity":"sha512-gBmWCIk/4cKXIz2gu2Id/1fQed0A8k7PaTUFoQF++MjPQ0tG307i0sms88DOmzW0hZnuZT1BSRfwgFXoqS82KQ==","mode":420,"size":40877},"dist/file.js.map":{"checkedAt":1794532112091,"integrity":"sha512-one2saZqlmZZ5+a4rbvrBhZGFVLPh/ULzyIkDitvc3hvXWV4ZBUFQ8Nh6k7DtnlllsZPEgjv/SHZzwMuJKMy7A==","mode":420,"size":40875},"dist/es2015/index.js.map":{"checkedAt":1794532112091,"integrity":"sha512-fF5jpt3ClKCcJJ8ErtQ2Cdbgh++DQ4IY1UouOxTbnoAS+k6XkIAsWa3vnoqWxCTuJu2NkMAEzyynehzyBoDHdQ==","mode":420,"size":146},"dist/index.js.map":{"checkedAt":1794532112091,"integrity":"sha512-Zfb8BtAjwptLhW0H0EBSyRCYuYJJ5YJNyk4xK9LhcWoDkx8YDcW86YijTrnW6qsem+g1SueUD3d14fbv4OAynA==","mode":420,"size":138},"README.md":{"checkedAt":1794532112091,"integrity":"sha512-H6zvo5G4zi5u9KsAPbz8kOBVXJSZAPGfvgmGehLLGnpVqanZOFTF1E8NVSXjx2ar9C8V1TjMuu+r0mHmgsjFZA==","mode":420,"size":8782},"dist/file-selector.d.ts":{"checkedAt":1794532112091,"integrity":"sha512-VwJQreLbStGVLFBjDK2lm/Be0CCjtyJ/2rbRfRHfuLIJrVY1Oi3W/KqnSxwx42N1k/7xTsguk8ll3gHHjlkcvw==","mode":420,"size":566},"src/file-selector.ts":{"checkedAt":1794532112091,"integrity":"sha512-+kZ7QIGFW0jIcg5gBOxC9Fpyj2uDle6vwRPt13fH154vXWySGj+ZBgBTb/rRCYWfKtDqSveuX+dRdDaN/Pq78w==","mode":420,"size":7410},"dist/file.d.ts":{"checkedAt":1794532112091,"integrity":"sha512-hSt5kzMgLUbtdkiyZ0kyJz36x9NwYzRA860jTgbaGUThmxzzlKxGo+LlN1y9W5Y7mhimYBc0TALWN3stM7o7/w==","mode":420,"size":327},"src/file.ts":{"checkedAt":1794532112092,"integrity":"sha512-dDk8JEV47mzG2a1YfP46DOQNgv1rma2YTl/oewlFKBV5y0n2dumPDUtNOXEGxAUiKXnbMZMjpIbPPJ6M5UEZ6w==","mode":420,"size":50502},"dist/index.d.ts":{"checkedAt":1794532112092,"integrity":"sha512-liP3ZU1mWs1OEcH0S91jUdt8r95VpoNOXnD7aBujPRZGXk7j+rTunuSF/V013oklxIw03pPseZ2rtRctz/Y80A==","mode":420,"size":84},"src/index.ts":{"checkedAt":1794532112092,"integrity":"sha512-80Mjo5J79+TAfRULxR0nAmfuoBis4JM2azocS8uk6cL42TY1025Rpc72QM1UfPg3LuZnhR8hBqLHRSKZbP4o+w==","mode":420,"size":80}}}
@@ -0,0 +1,782 @@
export var digitMapping = {
"adlm": [
"𞥐",
"𞥑",
"𞥒",
"𞥓",
"𞥔",
"𞥕",
"𞥖",
"𞥗",
"𞥘",
"𞥙"
],
"ahom": [
"𑜰",
"𑜱",
"𑜲",
"𑜳",
"𑜴",
"𑜵",
"𑜶",
"𑜷",
"𑜸",
"𑜹"
],
"arab": [
"٠",
"١",
"٢",
"٣",
"٤",
"٥",
"٦",
"٧",
"٨",
"٩"
],
"arabext": [
"۰",
"۱",
"۲",
"۳",
"۴",
"۵",
"۶",
"۷",
"۸",
"۹"
],
"bali": [
"᭐",
"᭑",
"᭒",
"᭓",
"᭔",
"᭕",
"᭖",
"᭗",
"᭘",
"᭙"
],
"beng": [
"০",
"১",
"২",
"৩",
"৪",
"৫",
"৬",
"৭",
"৮",
"৯"
],
"bhks": [
"𑱐",
"𑱑",
"𑱒",
"𑱓",
"𑱔",
"𑱕",
"𑱖",
"𑱗",
"𑱘",
"𑱙"
],
"brah": [
"𑁦",
"𑁧",
"𑁨",
"𑁩",
"𑁪",
"𑁫",
"𑁬",
"𑁭",
"𑁮",
"𑁯"
],
"cakm": [
"𑄶",
"𑄷",
"𑄸",
"𑄹",
"𑄺",
"𑄻",
"𑄼",
"𑄽",
"𑄾",
"𑄿"
],
"cham": [
"꩐",
"꩑",
"꩒",
"꩓",
"꩔",
"꩕",
"꩖",
"꩗",
"꩘",
"꩙"
],
"deva": [
"०",
"१",
"२",
"३",
"४",
"५",
"६",
"७",
"८",
"९"
],
"diak": [
"𑥐",
"𑥑",
"𑥒",
"𑥓",
"𑥔",
"𑥕",
"𑥖",
"𑥗",
"𑥘",
"𑥙"
],
"fullwide": [
"0",
"1",
"2",
"3",
"4",
"5",
"6",
"7",
"8",
"9"
],
"gong": [
"𑶠",
"𑶡",
"𑶢",
"𑶣",
"𑶤",
"𑶥",
"𑶦",
"𑶧",
"𑶨",
"𑶩"
],
"gonm": [
"𑵐",
"𑵑",
"𑵒",
"𑵓",
"𑵔",
"𑵕",
"𑵖",
"𑵗",
"𑵘",
"𑵙"
],
"gujr": [
"૦",
"૧",
"૨",
"૩",
"૪",
"૫",
"૬",
"૭",
"૮",
"૯"
],
"guru": [
"੦",
"੧",
"੨",
"੩",
"੪",
"੫",
"੬",
"੭",
"੮",
"੯"
],
"hanidec": [
"〇",
"一",
"二",
"三",
"四",
"五",
"六",
"七",
"八",
"九"
],
"hmng": [
"𖭐",
"𖭑",
"𖭒",
"𖭓",
"𖭔",
"𖭕",
"𖭖",
"𖭗",
"𖭘",
"𖭙"
],
"hmnp": [
"𞅀",
"𞅁",
"𞅂",
"𞅃",
"𞅄",
"𞅅",
"𞅆",
"𞅇",
"𞅈",
"𞅉"
],
"java": [
"꧐",
"꧑",
"꧒",
"꧓",
"꧔",
"꧕",
"꧖",
"꧗",
"꧘",
"꧙"
],
"kali": [
"꤀",
"꤁",
"꤂",
"꤃",
"꤄",
"꤅",
"꤆",
"꤇",
"꤈",
"꤉"
],
"khmr": [
"០",
"១",
"២",
"៣",
"៤",
"៥",
"៦",
"៧",
"៨",
"៩"
],
"knda": [
"೦",
"೧",
"೨",
"೩",
"೪",
"೫",
"೬",
"೭",
"೮",
"೯"
],
"lana": [
"᪀",
"᪁",
"᪂",
"᪃",
"᪄",
"᪅",
"᪆",
"᪇",
"᪈",
"᪉"
],
"lanatham": [
"᪐",
"᪑",
"᪒",
"᪓",
"᪔",
"᪕",
"᪖",
"᪗",
"᪘",
"᪙"
],
"laoo": [
"໐",
"໑",
"໒",
"໓",
"໔",
"໕",
"໖",
"໗",
"໘",
"໙"
],
"lepc": [
"᪐",
"᪑",
"᪒",
"᪓",
"᪔",
"᪕",
"᪖",
"᪗",
"᪘",
"᪙"
],
"limb": [
"᥆",
"᥇",
"᥈",
"᥉",
"᥊",
"᥋",
"᥌",
"᥍",
"᥎",
"᥏"
],
"mathbold": [
"𝟎",
"𝟏",
"𝟐",
"𝟑",
"𝟒",
"𝟓",
"𝟔",
"𝟕",
"𝟖",
"𝟗"
],
"mathdbl": [
"𝟘",
"𝟙",
"𝟚",
"𝟛",
"𝟜",
"𝟝",
"𝟞",
"𝟟",
"𝟠",
"𝟡"
],
"mathmono": [
"𝟶",
"𝟷",
"𝟸",
"𝟹",
"𝟺",
"𝟻",
"𝟼",
"𝟽",
"𝟾",
"𝟿"
],
"mathsanb": [
"𝟬",
"𝟭",
"𝟮",
"𝟯",
"𝟰",
"𝟱",
"𝟲",
"𝟳",
"𝟴",
"𝟵"
],
"mathsans": [
"𝟢",
"𝟣",
"𝟤",
"𝟥",
"𝟦",
"𝟧",
"𝟨",
"𝟩",
"𝟪",
"𝟫"
],
"mlym": [
"൦",
"൧",
"൨",
"൩",
"൪",
"൫",
"൬",
"൭",
"൮",
"൯"
],
"modi": [
"𑙐",
"𑙑",
"𑙒",
"𑙓",
"𑙔",
"𑙕",
"𑙖",
"𑙗",
"𑙘",
"𑙙"
],
"mong": [
"᠐",
"᠑",
"᠒",
"᠓",
"᠔",
"᠕",
"᠖",
"᠗",
"᠘",
"᠙"
],
"mroo": [
"𖩠",
"𖩡",
"𖩢",
"𖩣",
"𖩤",
"𖩥",
"𖩦",
"𖩧",
"𖩨",
"𖩩"
],
"mtei": [
"꯰",
"꯱",
"꯲",
"꯳",
"꯴",
"꯵",
"꯶",
"꯷",
"꯸",
"꯹"
],
"mymr": [
"၀",
"၁",
"၂",
"၃",
"၄",
"၅",
"၆",
"၇",
"၈",
"၉"
],
"mymrshan": [
"႐",
"႑",
"႒",
"႓",
"႔",
"႕",
"႖",
"႗",
"႘",
"႙"
],
"mymrtlng": [
"꧰",
"꧱",
"꧲",
"꧳",
"꧴",
"꧵",
"꧶",
"꧷",
"꧸",
"꧹"
],
"newa": [
"𑑐",
"𑑑",
"𑑒",
"𑑓",
"𑑔",
"𑑕",
"𑑖",
"𑑗",
"𑑘",
"𑑙"
],
"nkoo": [
"߀",
"߁",
"߂",
"߃",
"߄",
"߅",
"߆",
"߇",
"߈",
"߉"
],
"olck": [
"᱐",
"᱑",
"᱒",
"᱓",
"᱔",
"᱕",
"᱖",
"᱗",
"᱘",
"᱙"
],
"orya": [
"୦",
"୧",
"୨",
"୩",
"୪",
"୫",
"୬",
"୭",
"୮",
"୯"
],
"osma": [
"𐒠",
"𐒡",
"𐒢",
"𐒣",
"𐒤",
"𐒥",
"𐒦",
"𐒧",
"𐒨",
"𐒩"
],
"rohg": [
"𐴰",
"𐴱",
"𐴲",
"𐴳",
"𐴴",
"𐴵",
"𐴶",
"𐴷",
"𐴸",
"𐴹"
],
"saur": [
"꣐",
"꣑",
"꣒",
"꣓",
"꣔",
"꣕",
"꣖",
"꣗",
"꣘",
"꣙"
],
"segment": [
"🯰",
"🯱",
"🯲",
"🯳",
"🯴",
"🯵",
"🯶",
"🯷",
"🯸",
"🯹"
],
"shrd": [
"𑇐",
"𑇑",
"𑇒",
"𑇓",
"𑇔",
"𑇕",
"𑇖",
"𑇗",
"𑇘",
"𑇙"
],
"sind": [
"𑋰",
"𑋱",
"𑋲",
"𑋳",
"𑋴",
"𑋵",
"𑋶",
"𑋷",
"𑋸",
"𑋹"
],
"sinh": [
"෦",
"෧",
"෨",
"෩",
"෪",
"෫",
"෬",
"෭",
"෮",
"෯"
],
"sora": [
"𑃰",
"𑃱",
"𑃲",
"𑃳",
"𑃴",
"𑃵",
"𑃶",
"𑃷",
"𑃸",
"𑃹"
],
"sund": [
"᮰",
"᮱",
"᮲",
"᮳",
"᮴",
"᮵",
"᮶",
"᮷",
"᮸",
"᮹"
],
"takr": [
"𑛀",
"𑛁",
"𑛂",
"𑛃",
"𑛄",
"𑛅",
"𑛆",
"𑛇",
"𑛈",
"𑛉"
],
"talu": [
"᧐",
"᧑",
"᧒",
"᧓",
"᧔",
"᧕",
"᧖",
"᧗",
"᧘",
"᧙"
],
"tamldec": [
"௦",
"௧",
"௨",
"௩",
"௪",
"௫",
"௬",
"௭",
"௮",
"௯"
],
"telu": [
"౦",
"౧",
"౨",
"౩",
"౪",
"౫",
"౬",
"౭",
"౮",
"౯"
],
"thai": [
"๐",
"๑",
"๒",
"๓",
"๔",
"๕",
"๖",
"๗",
"๘",
"๙"
],
"tibt": [
"༠",
"༡",
"༢",
"༣",
"༤",
"༥",
"༦",
"༧",
"༨",
"༩"
],
"tirh": [
"𑓐",
"𑓑",
"𑓒",
"𑓓",
"𑓔",
"𑓕",
"𑓖",
"𑓗",
"𑓘",
"𑓙"
],
"vaii": [
"ᘠ",
"ᘡ",
"ᘢ",
"ᘣ",
"ᘤ",
"ᘥ",
"ᘦ",
"ᘧ",
"ᘨ",
"ᘩ"
],
"wara": [
"𑣠",
"𑣡",
"𑣢",
"𑣣",
"𑣤",
"𑣥",
"𑣦",
"𑣧",
"𑣨",
"𑣩"
],
"wcho": [
"𞋰",
"𞋱",
"𞋲",
"𞋳",
"𞋴",
"𞋵",
"𞋶",
"𞋷",
"𞋸",
"𞋹"
]
};
@@ -0,0 +1,30 @@
Copyright (c) 2014, GMO GlobalSign
Copyright (c) 2015-2022, Peculiar Ventures
All rights reserved.
Author 2014-2019, Yury Strozhevsky
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice, this
list of conditions and the following disclaimer in the documentation and/or
other materials provided with the distribution.
* Neither the name of the copyright holder nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
@@ -0,0 +1,4 @@
import { MutableRefObject } from 'react';
import { Options, SendMessage, WebSocketLike } from './types';
import { ReadyState } from './constants';
export declare const createOrJoinSocket: (webSocketRef: MutableRefObject<WebSocketLike | null>, url: string, setReadyState: (readyState: ReadyState) => void, optionsRef: MutableRefObject<Options>, setLastMessage: (message: WebSocketEventMap["message"]) => void, startRef: MutableRefObject<() => void>, reconnectCount: MutableRefObject<number>, lastMessageTime: MutableRefObject<number>, sendMessage: SendMessage) => (() => void);
@@ -0,0 +1,22 @@
"use client";
import { frame, cancelFrame } from 'motion-dom';
import { useRef, useContext, useEffect } from 'react';
import { MotionConfigContext } from '../context/MotionConfigContext.mjs';
function useAnimationFrame(callback) {
const initialTimestamp = useRef(0);
const { isStatic } = useContext(MotionConfigContext);
useEffect(() => {
if (isStatic)
return;
const provideTimeSinceStart = ({ timestamp, delta }) => {
if (!initialTimestamp.current)
initialTimestamp.current = timestamp;
callback(timestamp - initialTimestamp.current, delta);
};
frame.update(provideTimeSinceStart, true);
return () => cancelFrame(provideTimeSinceStart);
}, [callback]);
}
export { useAnimationFrame };
@@ -0,0 +1,3 @@
type Listener = () => void;
declare function subscribe(listener: Listener): () => void;
export default subscribe;
@@ -0,0 +1,73 @@
{
"name": "longest-streak",
"version": "3.1.0",
"description": "Count the longest repeating streak of a substring",
"license": "MIT",
"keywords": [
"count",
"length",
"longest",
"repeating",
"streak",
"substring",
"character"
],
"repository": "wooorm/longest-streak",
"bugs": "https://github.com/wooorm/longest-streak/issues",
"funding": {
"type": "github",
"url": "https://github.com/sponsors/wooorm"
},
"author": "Titus Wormer <tituswormer@gmail.com> (https://wooorm.com)",
"contributors": [
"Titus Wormer <tituswormer@gmail.com> (https://wooorm.com)"
],
"sideEffects": false,
"type": "module",
"main": "index.js",
"types": "index.d.ts",
"files": [
"index.d.ts",
"index.js"
],
"devDependencies": {
"@types/node": "^18.0.0",
"c8": "^7.0.0",
"prettier": "^2.0.0",
"remark-cli": "^11.0.0",
"remark-preset-wooorm": "^9.0.0",
"type-coverage": "^2.0.0",
"typescript": "^4.0.0",
"xo": "^0.52.0"
},
"scripts": {
"prepack": "npm run build && npm run format",
"build": "tsc --build --clean && tsc --build && type-coverage",
"format": "remark . -qfo && prettier . -w --loglevel warn && xo --fix",
"test-api": "node --conditions development test.js",
"test-coverage": "c8 --check-coverage --100 --reporter lcov npm run test-api",
"test": "npm run build && npm run format && npm run test-coverage"
},
"prettier": {
"tabWidth": 2,
"useTabs": false,
"singleQuote": true,
"bracketSpacing": false,
"semi": false,
"trailingComma": "none"
},
"xo": {
"prettier": true
},
"remarkConfig": {
"plugins": [
"preset-wooorm"
]
},
"typeCoverage": {
"atLeast": 100,
"detail": true,
"strict": true,
"ignoreCatch": true
}
}
@@ -0,0 +1 @@
{"version":3,"file":"updateMetadataOptional.js","sourceRoot":"","sources":["../../../../src/metadata/actions/updateMetadataOptional.ts"],"names":[],"mappings":";;AAKA,wDAaC;AAlBD,8EAA2E;AAC3E,sFAAmF;AAInF,SAAgB,sBAAsB,CACpC,QAAwE;IAExE,IAAI,QAAQ,CAAC,QAAQ,EAAE,CAAC;QACtB,MAAM,IAAI,uCAAkB,CAC1B,+CAAsB,CAAC,0BAA0B,EACjD,0CAA0C,CAC3C,CAAC;IACJ,CAAC;IAED,QAAQ,CAAC,QAAQ,GAAG,IAAI,CAAC;IAEzB,OAAO,QAAQ,CAAC;AAClB,CAAC"}
@@ -0,0 +1,136 @@
/**
* Rule: catch-or-return
* Ensures that promises either include a catch() handler
* or are returned (to be handled upstream)
*/
'use strict'
const getDocsUrl = require('./lib/get-docs-url')
const isPromise = require('./lib/is-promise')
const isMemberCallWithObjectName = require('./lib/is-member-call-with-object-name')
module.exports = {
meta: {
type: 'problem',
docs: {
description: 'Enforce the use of `catch()` on un-returned promises.',
url: getDocsUrl('catch-or-return'),
},
messages: {
terminationMethod: 'Expected {{ terminationMethod }}() or return',
},
schema: [
{
type: 'object',
properties: {
allowFinally: {
type: 'boolean',
},
allowThen: {
type: 'boolean',
},
allowThenStrict: {
type: 'boolean',
},
terminationMethod: {
oneOf: [
{ type: 'string' },
{
type: 'array',
items: {
type: 'string',
},
},
],
},
},
additionalProperties: false,
},
],
},
create(context) {
const options = context.options[0] || {}
const allowThen = options.allowThen
const allowThenStrict = options.allowThenStrict
const allowFinally = options.allowFinally
let terminationMethod = options.terminationMethod || 'catch'
if (typeof terminationMethod === 'string') {
terminationMethod = [terminationMethod]
}
function isAllowedPromiseTermination(expression) {
// somePromise.then(a, b)
if (
(allowThen || allowThenStrict) &&
expression.type === 'CallExpression' &&
expression.callee.type === 'MemberExpression' &&
expression.callee.property.name === 'then' &&
expression.arguments.length === 2 &&
// somePromise.then(null, b)
((allowThen && !allowThenStrict) ||
(expression.arguments[0].type === 'Literal' &&
expression.arguments[0].value === null))
) {
return true
}
// somePromise.catch().finally(fn)
if (
allowFinally &&
expression.type === 'CallExpression' &&
expression.callee.type === 'MemberExpression' &&
expression.callee.property.name === 'finally' &&
isPromise(expression.callee.object) &&
isAllowedPromiseTermination(expression.callee.object)
) {
return true
}
// somePromise.catch()
if (
expression.type === 'CallExpression' &&
expression.callee.type === 'MemberExpression' &&
terminationMethod.indexOf(expression.callee.property.name) !== -1
) {
return true
}
// somePromise['catch']()
if (
expression.type === 'CallExpression' &&
expression.callee.type === 'MemberExpression' &&
expression.callee.property.type === 'Literal' &&
expression.callee.property.value === 'catch'
) {
return true
}
// cy.get().then(a, b);
if (isMemberCallWithObjectName('cy', expression)) {
return true
}
return false
}
return {
ExpressionStatement(node) {
if (!isPromise(node.expression)) {
return
}
if (isAllowedPromiseTermination(node.expression)) {
return
}
context.report({
node,
messageId: 'terminationMethod',
data: { terminationMethod },
})
},
}
},
}
@@ -0,0 +1 @@
{"name":"bufferstreams","version":"3.0.0","requiresBuild":false,"files":{"package.json":{"checkedAt":1794532120548,"integrity":"sha512-9ILYRtL3jqvnTP6FFjat4sEELYZHsPVOUlDOlbPWg5WgTtZW+W/BrgXUBNE2xZCtI/bCyauD3wtbgezHHnM08A==","mode":420,"size":3220},"CHANGELOG.md":{"checkedAt":1794532120548,"integrity":"sha512-DOhAP0sIFz2/uNKzOiupOKH8NpfVf+0370C+VC/1Qhobc+sYlJUxbwa1icm1tVlkx6xlkyoI2N2vO/PfetaeKA==","mode":420,"size":6985},"LICENSE":{"checkedAt":1794532120548,"integrity":"sha512-vtaCl/zJKrh8m6yB+LA5z9LTL3Cdr9rc18RRBrFXULGwCmaPutLULAbKrBVj+iEQe8x2QxsFyBIsiCgZlyRu9Q==","mode":420,"size":1089},"README.md":{"checkedAt":1794532120548,"integrity":"sha512-sfx7WwOe38D1iQjjmLgp0RgZCfcvhJSkdIUGXQ2Oxe/Buz15rMyIWU3XVmQZ43ZR5PSH+SCkCTq5I4IXxE+YDw==","mode":420,"size":3915},"src/index.js":{"checkedAt":1794532120548,"integrity":"sha512-L4IKDMiUWXIVApHZhm60Ro2+l4+Y366F5xE8lUiQZS7AeMG498PjkGrEcZqDDVy5vhaCeNa4QO62xLO5E6gq+Q==","mode":420,"size":2190}}}
@@ -0,0 +1 @@
{"version":3,"names":["_genMapping","require","_traceMapping","SourceMap","constructor","opts","code","_opts$sourceFileName","_map","_rawMappings","_sourceFileName","_lastGenLine","_lastSourceLine","_lastSourceColumn","_inputMap","map","GenMapping","sourceRoot","sourceFileName","replace","undefined","inputSourceMap","TraceMap","resolvedSources","length","i","_this$_inputMap$sourc","setSourceContent","sourcesContent","Object","keys","get","toEncodedMap","getDecoded","toDecodedMap","getRawMappings","allMappings","mark","generated","line","column","identifierName","identifierNamePos","filename","_originalMapping","originalMapping","originalPositionFor","name","originalIdentifierMapping","source","maybeAddMapping","original","exports","default"],"sources":["../src/source-map.ts"],"sourcesContent":["import {\n GenMapping,\n maybeAddMapping,\n setSourceContent,\n allMappings,\n toEncodedMap,\n toDecodedMap,\n} from \"@jridgewell/gen-mapping\";\n\nimport type {\n EncodedSourceMap,\n DecodedSourceMap,\n Mapping,\n} from \"@jridgewell/gen-mapping\";\n\nimport type {\n InvalidOriginalMapping,\n OriginalMapping,\n SourceMapInput,\n} from \"@jridgewell/trace-mapping\";\nimport { originalPositionFor, TraceMap } from \"@jridgewell/trace-mapping\";\n\n/**\n * Build a sourcemap.\n */\n\nexport default class SourceMap {\n private _map: GenMapping;\n private _rawMappings: Mapping[] | undefined;\n private _sourceFileName: string | undefined;\n\n // Any real line is > 0, so init to 0 is fine.\n private _lastGenLine = 0;\n private _lastSourceLine = 0;\n\n // Source columns can be 0, but we only check in unison with sourceLine, which\n // inits to an impossible value. So init to 0 is fine.\n private _lastSourceColumn = 0;\n\n public _inputMap: TraceMap | null = null;\n\n constructor(\n opts: {\n sourceFileName?: string;\n sourceRoot?: string;\n inputSourceMap?: SourceMapInput;\n },\n code: string | { [sourceFileName: string]: string } | null | undefined,\n ) {\n const map = (this._map = new GenMapping({ sourceRoot: opts.sourceRoot }));\n this._sourceFileName = opts.sourceFileName?.replace(/\\\\/g, \"/\");\n this._rawMappings = undefined;\n\n if (opts.inputSourceMap) {\n this._inputMap = new TraceMap(opts.inputSourceMap);\n const resolvedSources = this._inputMap.resolvedSources;\n if (resolvedSources.length) {\n for (let i = 0; i < resolvedSources.length; i++) {\n setSourceContent(\n map,\n resolvedSources[i],\n // @ts-expect-error FIXME: this._inputMap.sourcesContent?.[i] may be undefined, which is not acceptable by setSourceContent\n this._inputMap.sourcesContent?.[i],\n );\n }\n }\n }\n\n if (typeof code === \"string\" && !opts.inputSourceMap) {\n setSourceContent(map, this._sourceFileName!, code);\n } else if (typeof code === \"object\") {\n for (const sourceFileName of Object.keys(code!)) {\n setSourceContent(\n map,\n sourceFileName.replace(/\\\\/g, \"/\"),\n code![sourceFileName],\n );\n }\n }\n }\n\n /**\n * Get the sourcemap.\n */\n get(): EncodedSourceMap {\n return toEncodedMap(this._map);\n }\n\n getDecoded(): DecodedSourceMap {\n return toDecodedMap(this._map);\n }\n\n getRawMappings(): Mapping[] {\n return (this._rawMappings ||= allMappings(this._map));\n }\n\n /**\n * Mark the current generated position with a source position. May also be passed null line/column\n * values to insert a mapping to nothing.\n */\n\n mark(\n generated: { line: number; column: number },\n line: number | undefined,\n column: number | undefined,\n identifierName?: string | null,\n identifierNamePos?: { line: number; column: number },\n filename?: string | null,\n ) {\n this._rawMappings = undefined;\n\n let originalMapping: OriginalMapping | InvalidOriginalMapping | undefined;\n\n if (line != null) {\n if (this._inputMap) {\n // This is the lookup for this mark\n originalMapping = originalPositionFor(this._inputMap, {\n line,\n column: column!,\n });\n\n // If the we found a name, nothing else needs to be done\n // Maybe we're marking a `(` and the input map already had a name attached there,\n // or we're marking a `(` and the sourcemap spanned a `foo(`,\n // or we're marking an identifier, etc.\n if (!originalMapping.name && identifierNamePos) {\n // We're trying to mark a `(` (as that's the only thing that provides\n // an identifierNamePos currently), and we the AST had an identifier attached.\n // Lookup it's original name.\n const originalIdentifierMapping = originalPositionFor(\n this._inputMap,\n identifierNamePos,\n );\n if (originalIdentifierMapping.name) {\n identifierName = originalIdentLine truncated
@@ -0,0 +1,32 @@
/**
* Rule: avoid-new
* Avoid creating new promises outside of utility libraries.
*/
'use strict'
const getDocsUrl = require('./lib/get-docs-url')
module.exports = {
meta: {
type: 'suggestion',
docs: {
description:
'Disallow creating `new` promises outside of utility libs (use [util.promisify][] instead).',
url: getDocsUrl('avoid-new'),
},
schema: [],
messages: {
avoidNew: 'Avoid creating new promises.',
},
},
create(context) {
return {
NewExpression(node) {
if (node.callee.name === 'Promise') {
context.report({ node, messageId: 'avoidNew' })
}
},
}
},
}
@@ -0,0 +1 @@
{"mappings":";;;;AAAA;;;;;;;;;;CAUC;;;AAyBM,SAAS,0CAAiC,GAAG,IAAO;IACzD,oFAAoF;IACpF,uDAAuD;IACvD,IAAI,SAAgB;QAAC,GAAG,IAAI,CAAC,EAAE;IAAA;IAC/B,IAAK,IAAI,IAAI,GAAG,IAAI,KAAK,MAAM,EAAE,IAAK;QACpC,IAAI,QAAQ,IAAI,CAAC,EAAE;QACnB,IAAK,IAAI,OAAO,MAAO;YACrB,IAAI,IAAI,MAAM,CAAC,IAAI;YACnB,IAAI,IAAI,KAAK,CAAC,IAAI;YAElB,eAAe;YACf,IACE,OAAO,MAAM,cACb,OAAO,MAAM,cACb,qCAAqC;YACrC,GAAG,CAAC,EAAE,KAAK,OACX,GAAG,CAAC,EAAE,KAAK,OACX,IAAI,UAAU,CAAC,MAAM,OAAO,GAAG,MAC/B,IAAI,UAAU,CAAC,MAAM,OAAO,GAAG,IAE/B,MAAM,CAAC,IAAI,GAAG,CAAA,GAAA,yCAAI,EAAE,GAAG;iBAGlB,IACL,AAAC,CAAA,QAAQ,eAAe,QAAQ,kBAAiB,KACjD,OAAO,MAAM,YACb,OAAO,MAAM,UAEb,MAAM,CAAC,IAAI,GAAG,CAAA,GAAA,WAAG,EAAE,GAAG;iBACjB,IAAI,QAAQ,QAAQ,KAAK,GAC9B,OAAO,EAAE,GAAG,CAAA,GAAA,yCAAO,EAAE,GAAG;iBAGxB,MAAM,CAAC,IAAI,GAAG,MAAM,YAAY,IAAI;QAExC;IACF;IAEA,OAAO;AACT","sources":["packages/@react-aria/utils/src/mergeProps.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 {chain} from './chain';\nimport clsx from 'clsx';\nimport {mergeIds} from './useId';\n\ninterface Props {\n [key: string]: any\n}\n\ntype PropsArg = Props | null | undefined;\n\n// taken from: https://stackoverflow.com/questions/51603250/typescript-3-parameter-list-intersection-type/51604379#51604379\ntype TupleTypes<T> = { [P in keyof T]: T[P] } extends { [key: number]: infer V } ? NullToObject<V> : never;\ntype NullToObject<T> = T extends (null | undefined) ? {} : T;\n \ntype UnionToIntersection<U> = (U extends any ? (k: U) => void : never) extends ((k: infer I) => void) ? I : never;\n\n/**\n * Merges multiple props objects together. Event handlers are chained,\n * classNames are combined, and ids are deduplicated - different ids\n * will trigger a side-effect and re-render components hooked up with `useId`.\n * For all other props, the last prop object overrides all previous ones.\n * @param args - Multiple sets of props to merge together.\n */\nexport function mergeProps<T extends PropsArg[]>(...args: T): UnionToIntersection<TupleTypes<T>> {\n // Start with a base clone of the first argument. This is a lot faster than starting\n // with an empty object and adding properties as we go.\n let result: Props = {...args[0]};\n for (let i = 1; i < args.length; i++) {\n let props = args[i];\n for (let key in props) {\n let a = result[key];\n let b = props[key];\n\n // Chain events\n if (\n typeof a === 'function' &&\n typeof b === 'function' &&\n // This is a lot faster than a regex.\n key[0] === 'o' &&\n key[1] === 'n' &&\n key.charCodeAt(2) >= /* 'A' */ 65 &&\n key.charCodeAt(2) <= /* 'Z' */ 90\n ) {\n result[key] = chain(a, b);\n\n // Merge classnames, sometimes classNames are empty string which eval to false, so we just need to do a type check\n } else if (\n (key === 'className' || key === 'UNSAFE_className') &&\n typeof a === 'string' &&\n typeof b === 'string'\n ) {\n result[key] = clsx(a, b);\n } else if (key === 'id' && a && b) {\n result.id = mergeIds(a, b);\n // Override others\n } else {\n result[key] = b !== undefined ? b : a;\n }\n }\n }\n\n return result as UnionToIntersection<TupleTypes<T>>;\n}\n"],"names":[],"version":3,"file":"mergeProps.module.js.map"}
@@ -0,0 +1,81 @@
import {usePress as $f6c31cce2adf654f$export$45712eceda6fad21} from "./usePress.mjs";
import {useGlobalListeners as $4k2kv$useGlobalListeners, getOwnerDocument as $4k2kv$getOwnerDocument, focusWithoutScrolling as $4k2kv$focusWithoutScrolling, useDescription as $4k2kv$useDescription, mergeProps as $4k2kv$mergeProps} from "@react-aria/utils";
import {useRef as $4k2kv$useRef} from "react";
/*
* 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.
*/
const $8a26561d2877236e$var$DEFAULT_THRESHOLD = 500;
function $8a26561d2877236e$export$c24ed0104d07eab9(props) {
let { isDisabled: isDisabled, onLongPressStart: onLongPressStart, onLongPressEnd: onLongPressEnd, onLongPress: onLongPress, threshold: threshold = $8a26561d2877236e$var$DEFAULT_THRESHOLD, accessibilityDescription: accessibilityDescription } = props;
const timeRef = (0, $4k2kv$useRef)(undefined);
let { addGlobalListener: addGlobalListener, removeGlobalListener: removeGlobalListener } = (0, $4k2kv$useGlobalListeners)();
let { pressProps: pressProps } = (0, $f6c31cce2adf654f$export$45712eceda6fad21)({
isDisabled: isDisabled,
onPressStart (e) {
e.continuePropagation();
if (e.pointerType === 'mouse' || e.pointerType === 'touch') {
if (onLongPressStart) onLongPressStart({
...e,
type: 'longpressstart'
});
timeRef.current = setTimeout(()=>{
// Prevent other usePress handlers from also handling this event.
e.target.dispatchEvent(new PointerEvent('pointercancel', {
bubbles: true
}));
// Ensure target is focused. On touch devices, browsers typically focus on pointer up.
if ((0, $4k2kv$getOwnerDocument)(e.target).activeElement !== e.target) (0, $4k2kv$focusWithoutScrolling)(e.target);
if (onLongPress) onLongPress({
...e,
type: 'longpress'
});
timeRef.current = undefined;
}, threshold);
// Prevent context menu, which may be opened on long press on touch devices
if (e.pointerType === 'touch') {
let onContextMenu = (e)=>{
e.preventDefault();
};
addGlobalListener(e.target, 'contextmenu', onContextMenu, {
once: true
});
addGlobalListener(window, 'pointerup', ()=>{
// If no contextmenu event is fired quickly after pointerup, remove the handler
// so future context menu events outside a long press are not prevented.
setTimeout(()=>{
removeGlobalListener(e.target, 'contextmenu', onContextMenu);
}, 30);
}, {
once: true
});
}
}
},
onPressEnd (e) {
if (timeRef.current) clearTimeout(timeRef.current);
if (onLongPressEnd && (e.pointerType === 'mouse' || e.pointerType === 'touch')) onLongPressEnd({
...e,
type: 'longpressend'
});
}
});
let descriptionProps = (0, $4k2kv$useDescription)(onLongPress && !isDisabled ? accessibilityDescription : undefined);
return {
longPressProps: (0, $4k2kv$mergeProps)(pressProps, descriptionProps)
};
}
export {$8a26561d2877236e$export$c24ed0104d07eab9 as useLongPress};
//# sourceMappingURL=useLongPress.module.js.map
@@ -0,0 +1,86 @@
{
"name": "@vitest/mocker",
"type": "module",
"version": "4.0.9",
"description": "Vitest module mocker implementation",
"license": "MIT",
"funding": "https://opencollective.com/vitest",
"homepage": "https://github.com/vitest-dev/vitest/tree/main/packages/mocker#readme",
"repository": {
"type": "git",
"url": "git+https://github.com/vitest-dev/vitest.git",
"directory": "packages/mocker"
},
"bugs": {
"url": "https://github.com/vitest-dev/vitest/issues"
},
"sideEffects": false,
"exports": {
".": {
"types": "./dist/index.d.ts",
"default": "./dist/index.js"
},
"./node": {
"types": "./dist/node.d.ts",
"default": "./dist/node.js"
},
"./browser": {
"types": "./dist/browser.d.ts",
"default": "./dist/browser.js"
},
"./redirect": {
"types": "./dist/redirect.d.ts",
"default": "./dist/redirect.js"
},
"./automock": {
"types": "./dist/automock.d.ts",
"default": "./dist/automock.js"
},
"./register": {
"types": "./dist/register.d.ts",
"default": "./dist/register.js"
},
"./auto-register": {
"types": "./dist/register.d.ts",
"default": "./dist/register.js"
},
"./*": "./*"
},
"main": "./dist/index.js",
"module": "./dist/index.js",
"types": "./dist/index.d.ts",
"files": [
"*.d.ts",
"dist"
],
"peerDependencies": {
"msw": "^2.4.9",
"vite": "^6.0.0 || ^7.0.0-0"
},
"peerDependenciesMeta": {
"msw": {
"optional": true
},
"vite": {
"optional": true
}
},
"dependencies": {
"estree-walker": "^3.0.3",
"magic-string": "^0.30.21",
"@vitest/spy": "4.0.9"
},
"devDependencies": {
"@types/estree": "^1.0.8",
"acorn-walk": "^8.3.4",
"msw": "^2.12.1",
"pathe": "^2.0.3",
"vite": "^6.3.5",
"@vitest/utils": "4.0.9",
"@vitest/spy": "4.0.9"
},
"scripts": {
"build": "premove dist && rollup -c",
"dev": "rollup -c --watch"
}
}
@@ -0,0 +1,5 @@
var convert = require('./convert'),
func = convert('differenceWith', require('../differenceWith'));
func.placeholder = require('./placeholder');
module.exports = func;
@@ -0,0 +1,105 @@
var $625cf83917e112ad$exports = require("./utils.main.js");
var $kDAhS$react = require("react");
var $kDAhS$reactariautils = require("@react-aria/utils");
function $parcel$export(e, n, v, s) {
Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
}
$parcel$export(module.exports, "useFocusWithin", () => $d16842bbd0359d1b$export$420e68273165f4ec);
/*
* Copyright 2020 Adobe. All rights reserved.
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. You may obtain a copy
* of the License at http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
* OF ANY KIND, either express or implied. See the License for the specific language
* governing permissions and limitations under the License.
*/ // Portions of the code in this file are based on code from react.
// Original licensing for the following can be found in the
// NOTICE file in the root directory of this source tree.
// See https://github.com/facebook/react/tree/cc7c1aece46a6b69b41958d731e0fd27c94bfc6c/packages/react-interactions
function $d16842bbd0359d1b$export$420e68273165f4ec(props) {
let { isDisabled: isDisabled, onBlurWithin: onBlurWithin, onFocusWithin: onFocusWithin, onFocusWithinChange: onFocusWithinChange } = props;
let state = (0, $kDAhS$react.useRef)({
isFocusWithin: false
});
let { addGlobalListener: addGlobalListener, removeAllGlobalListeners: removeAllGlobalListeners } = (0, $kDAhS$reactariautils.useGlobalListeners)();
let onBlur = (0, $kDAhS$react.useCallback)((e)=>{
// Ignore events bubbling through portals.
if (!e.currentTarget.contains(e.target)) return;
// We don't want to trigger onBlurWithin and then immediately onFocusWithin again
// when moving focus inside the element. Only trigger if the currentTarget doesn't
// include the relatedTarget (where focus is moving).
if (state.current.isFocusWithin && !e.currentTarget.contains(e.relatedTarget)) {
state.current.isFocusWithin = false;
removeAllGlobalListeners();
if (onBlurWithin) onBlurWithin(e);
if (onFocusWithinChange) onFocusWithinChange(false);
}
}, [
onBlurWithin,
onFocusWithinChange,
state,
removeAllGlobalListeners
]);
let onSyntheticFocus = (0, $625cf83917e112ad$exports.useSyntheticBlurEvent)(onBlur);
let onFocus = (0, $kDAhS$react.useCallback)((e)=>{
// Ignore events bubbling through portals.
if (!e.currentTarget.contains(e.target)) return;
// Double check that document.activeElement actually matches e.target in case a previously chained
// focus handler already moved focus somewhere else.
const ownerDocument = (0, $kDAhS$reactariautils.getOwnerDocument)(e.target);
const activeElement = (0, $kDAhS$reactariautils.getActiveElement)(ownerDocument);
if (!state.current.isFocusWithin && activeElement === (0, $kDAhS$reactariautils.getEventTarget)(e.nativeEvent)) {
if (onFocusWithin) onFocusWithin(e);
if (onFocusWithinChange) onFocusWithinChange(true);
state.current.isFocusWithin = true;
onSyntheticFocus(e);
// Browsers don't fire blur events when elements are removed from the DOM.
// However, if a focus event occurs outside the element we're tracking, we
// can manually fire onBlur.
let currentTarget = e.currentTarget;
addGlobalListener(ownerDocument, 'focus', (e)=>{
if (state.current.isFocusWithin && !(0, $kDAhS$reactariautils.nodeContains)(currentTarget, e.target)) {
let nativeEvent = new ownerDocument.defaultView.FocusEvent('blur', {
relatedTarget: e.target
});
(0, $625cf83917e112ad$exports.setEventTarget)(nativeEvent, currentTarget);
let event = (0, $625cf83917e112ad$exports.createSyntheticEvent)(nativeEvent);
onBlur(event);
}
}, {
capture: true
});
}
}, [
onFocusWithin,
onFocusWithinChange,
onSyntheticFocus,
addGlobalListener,
onBlur
]);
if (isDisabled) return {
focusWithinProps: {
// These cannot be null, that would conflict in mergeProps
onFocus: undefined,
onBlur: undefined
}
};
return {
focusWithinProps: {
onFocus: onFocus,
onBlur: onBlur
}
};
}
//# sourceMappingURL=useFocusWithin.main.js.map
@@ -0,0 +1,297 @@
/**
* @file ttf转换为woff
* @author mengke01(kekee000@gmail.com)
*
* woff format:
* http://www.w3.org/TR/2012/REC-WOFF-20121213/
*
* references:
* https://github.com/fontello/ttf2woff
* https://github.com/nodeca/pako
*/
/* eslint-disable no-multi-spaces */
import Reader from './reader';
import Writer from './writer';
import string from '../common/string';
import utilString from './util/string';
import error from './error';
import config from './data/default';
/**
* metadata 转换成XML
*
* @param {Object} metadata metadata
*
* @example
* metadata json:
*
* {
* "uniqueid": "",
* "vendor": {
* "name": "",
* "url": ""
* },
* "credit": [
* {
* "name": "",
* "url": "",
* "role": ""
* }
* ],
* "description": "",
* "license": {
* "id": "",
* "url": "",
* "text": ""
* },
* "copyright": "",
* "trademark": "",
* "licensee": ""
* }
*
* @return {string} xml字符串
*/
function metadata2xml(metadata) {
let xml = ''
+ '<?xml version="1.0" encoding="UTF-8"?>'
+ '<metadata version="1.0">';
metadata.uniqueid = metadata.uniqueid || (config.fontId + '.' + Date.now());
xml += '<uniqueid id="' + string.encodeHTML(metadata.uniqueid) + '" />';
if (metadata.vendor) {
xml += '<vendor name="' + string.encodeHTML(metadata.vendor.name) + '"'
+ ' url="' + string.encodeHTML(metadata.vendor.url) + '" />';
}
if (metadata.credit) {
xml += '<credits>';
const credits = metadata.credit instanceof Array ? metadata.credit : [metadata.credit];
credits.forEach((credit) => {
xml += '<credit name="' + string.encodeHTML(credit.name) + '"'
+ ' url="' + string.encodeHTML(credit.url) + '"'
+ ' role="' + string.encodeHTML(credit.role || 'Contributor') + '" />';
});
xml += '</credits>';
}
if (metadata.description) {
xml += '<description><text xml:lang="en">'
+ string.encodeHTML(metadata.description)
+ '</text></description>';
}
if (metadata.license) {
xml += '<license url="' + string.encodeHTML(metadata.license.url) + '"'
+ ' id="' + string.encodeHTML(metadata.license.id) + '"><text xml:lang="en">';
xml += string.encodeHTML(metadata.license.text);
xml += '</text></license>';
}
if (metadata.copyright) {
xml += '<copyright><text xml:lang="en">';
xml += string.encodeHTML(metadata.copyright);
xml += '</text></copyright>';
}
if (metadata.trademark) {
xml += '<trademark><text xml:lang="en">'
+ string.encodeHTML(metadata.trademark)
+ '</text></trademark>';
}
if (metadata.licensee) {
xml += '<licensee name="' + string.encodeHTML(metadata.licensee) + '"/>';
}
xml += '</metadata>';
return xml;
}
/**
* ttf格式转换成woff字体格式
*
* @param {ArrayBuffer} ttfBuffer ttf缓冲数组
* @param {Object} options 选项
* @param {Object} options.metadata 字体相关的信息
* @param {Object} options.deflate 压缩相关函数
*
* @return {ArrayBuffer} woff格式byte流
*/
export default function ttf2woff(ttfBuffer, options = {}) {
// woff 头部结构
const woffHeader = {
signature: 0x774F4646, // for woff
flavor: 0x10000, // for ttf
length: 0,
numTables: 0,
reserved: 0,
totalSfntSize: 0,
majorVersion: 0,
minorVersion: 0,
metaOffset: 0,
metaLength: 0,
metaOrigLength: 0,
privOffset: 0,
privLength: 0
};
const ttfReader = new Reader(ttfBuffer);
let tableEntries = [];
const numTables = ttfReader.readUint16(4); // 读取ttf表个数
let tableEntry;
let deflatedData;
let i;
let l;
if (numTables <= 0 || numTables > 100) {
error.raise(10101);
}
// 读取ttf表索引信息
ttfReader.seek(12);
for (i = 0; i < numTables; ++i) {
tableEntry = {
tag: ttfReader.readString(ttfReader.offset, 4),
checkSum: ttfReader.readUint32(),
offset: ttfReader.readUint32(),
length: ttfReader.readUint32()
};
const entryOffset = ttfReader.offset;
if (tableEntry.tag === 'head') {
// 读取font revision
woffHeader.majorVersion = ttfReader.readUint16(tableEntry.offset + 4);
woffHeader.minorVersion = ttfReader.readUint16(tableEntry.offset + 6);
}
// ttf 表数据
const sfntData = ttfReader.readBytes(tableEntry.offset, tableEntry.length);
// 对数据进行压缩
if (options.deflate) {
deflatedData = options.deflate(sfntData);
// 这里需要判断是否压缩后数据小于原始数据
if (deflatedData.length < sfntData.length) {
tableEntry.data = deflatedData;
tableEntry.deflated = true;
}
else {
tableEntry.data = sfntData;
}
}
else {
tableEntry.data = sfntData;
}
tableEntry.compLength = tableEntry.data.length;
tableEntries.push(tableEntry);
ttfReader.seek(entryOffset);
}
if (!tableEntries.length) {
error.raise(10204);
}
// 对table进行排序
tableEntries = tableEntries.sort((a, b) => a.tag === b.tag ? 0 : a.tag < b.tag ? -1 : 1);
// 计算offset和 woff size
let woffSize = 44 + 20 * numTables; // header size + table entries
let ttfSize = 12 + 16 * numTables;
for (i = 0, l = tableEntries.length; i < l; ++i) {
tableEntry = tableEntries[i];
tableEntry.offset = woffSize;
// 4字节对齐
woffSize += tableEntry.compLength + (tableEntry.compLength % 4 ? 4 - tableEntry.compLength % 4 : 0);
ttfSize += tableEntry.length + (tableEntry.length % 4 ? 4 - tableEntry.length % 4 : 0);
}
// 计算metaData
let metadata = null;
if (options.metadata) {
const xml = utilString.toUTF8Bytes(metadata2xml(options.metadata));
if (options.deflate) {
deflatedData = options.deflate(xml);
if (deflatedData.length < xml.length) {
metadata = deflatedData;
}
else {
metadata = xml;
}
}
else {
metadata = xml;
}
woffHeader.metaLength = metadata.length;
woffHeader.metaOrigLength = xml.length;
woffHeader.metaOffset = woffSize;
// metadata header + length
woffSize += woffHeader.metaLength + (woffHeader.metaLength % 4 ? 4 - woffHeader.metaLength % 4 : 0);
}
woffHeader.numTables = tableEntries.length;
woffHeader.length = woffSize;
woffHeader.totalSfntSize = ttfSize;
// 写woff数据
const woffWriter = new Writer(new ArrayBuffer(woffSize));
// 写woff头部
woffWriter.writeUint32(woffHeader.signature);
woffWriter.writeUint32(woffHeader.flavor);
woffWriter.writeUint32(woffHeader.length);
woffWriter.writeUint16(woffHeader.numTables);
woffWriter.writeUint16(woffHeader.reserved);
woffWriter.writeUint32(woffHeader.totalSfntSize);
woffWriter.writeUint16(woffHeader.majorVersion);
woffWriter.writeUint16(woffHeader.minorVersion);
woffWriter.writeUint32(woffHeader.metaOffset);
woffWriter.writeUint32(woffHeader.metaLength);
woffWriter.writeUint32(woffHeader.metaOrigLength);
woffWriter.writeUint32(woffHeader.privOffset);
woffWriter.writeUint32(woffHeader.privLength);
// 写woff表索引
for (i = 0, l = tableEntries.length; i < l; ++i) {
tableEntry = tableEntries[i];
woffWriter.writeString(tableEntry.tag);
woffWriter.writeUint32(tableEntry.offset);
woffWriter.writeUint32(tableEntry.compLength);
woffWriter.writeUint32(tableEntry.length);
woffWriter.writeUint32(tableEntry.checkSum);
}
// 写表数据
for (i = 0, l = tableEntries.length; i < l; ++i) {
tableEntry = tableEntries[i];
woffWriter.writeBytes(tableEntry.data);
if (tableEntry.compLength % 4) {
woffWriter.writeEmpty(4 - tableEntry.compLength % 4);
}
}
// 写metadata
if (metadata) {
woffWriter.writeBytes(metadata);
if (woffHeader.metaLength % 4) {
woffWriter.writeEmpty(4 - woffHeader.metaLength % 4);
}
}
return woffWriter.getBuffer();
}
@@ -0,0 +1,47 @@
'use strict';
var loader = require('./lib/loader');
var dumper = require('./lib/dumper');
function renamed(from, to) {
return function () {
throw new Error('Function yaml.' + from + ' is removed in js-yaml 4. ' +
'Use yaml.' + to + ' instead, which is now safe by default.');
};
}
module.exports.Type = require('./lib/type');
module.exports.Schema = require('./lib/schema');
module.exports.FAILSAFE_SCHEMA = require('./lib/schema/failsafe');
module.exports.JSON_SCHEMA = require('./lib/schema/json');
module.exports.CORE_SCHEMA = require('./lib/schema/core');
module.exports.DEFAULT_SCHEMA = require('./lib/schema/default');
module.exports.load = loader.load;
module.exports.loadAll = loader.loadAll;
module.exports.dump = dumper.dump;
module.exports.YAMLException = require('./lib/exception');
// Re-export all types in case user wants to create custom schema
module.exports.types = {
binary: require('./lib/type/binary'),
float: require('./lib/type/float'),
map: require('./lib/type/map'),
null: require('./lib/type/null'),
pairs: require('./lib/type/pairs'),
set: require('./lib/type/set'),
timestamp: require('./lib/type/timestamp'),
bool: require('./lib/type/bool'),
int: require('./lib/type/int'),
merge: require('./lib/type/merge'),
omap: require('./lib/type/omap'),
seq: require('./lib/type/seq'),
str: require('./lib/type/str')
};
// Removed functions from JS-YAML 3.0.x
module.exports.safeLoad = renamed('safeLoad', 'load');
module.exports.safeLoadAll = renamed('safeLoadAll', 'loadAll');
module.exports.safeDump = renamed('safeDump', 'dump');
@@ -0,0 +1,324 @@
import selectorParser from 'postcss-selector-parser'
import unescape from 'postcss-selector-parser/dist/util/unesc'
import escapeClassName from '../util/escapeClassName'
import prefixSelector from '../util/prefixSelector'
import { movePseudos } from './pseudoElements'
import { splitAtTopLevelOnly } from './splitAtTopLevelOnly'
/** @typedef {import('postcss-selector-parser').Root} Root */
/** @typedef {import('postcss-selector-parser').Selector} Selector */
/** @typedef {import('postcss-selector-parser').Pseudo} Pseudo */
/** @typedef {import('postcss-selector-parser').Node} Node */
/** @typedef {{format: string, respectPrefix: boolean}[]} RawFormats */
/** @typedef {import('postcss-selector-parser').Root} ParsedFormats */
/** @typedef {RawFormats | ParsedFormats} AcceptedFormats */
let MERGE = ':merge'
/**
* @param {RawFormats} formats
* @param {{context: any, candidate: string, base: string | null}} options
* @returns {ParsedFormats | null}
*/
export function formatVariantSelector(formats, { context, candidate }) {
let prefix = context?.tailwindConfig.prefix ?? ''
// Parse the format selector into an AST
let parsedFormats = formats.map((format) => {
let ast = selectorParser().astSync(format.format)
return {
...format,
ast: format.respectPrefix ? prefixSelector(prefix, ast) : ast,
}
})
// We start with the candidate selector
let formatAst = selectorParser.root({
nodes: [
selectorParser.selector({
nodes: [selectorParser.className({ value: escapeClassName(candidate) })],
}),
],
})
// And iteratively merge each format selector into the candidate selector
for (let { ast } of parsedFormats) {
// 1. Handle :merge() special pseudo-class
;[formatAst, ast] = handleMergePseudo(formatAst, ast)
// 2. Merge the format selector into the current selector AST
ast.walkNesting((nesting) => nesting.replaceWith(...formatAst.nodes[0].nodes))
// 3. Keep going!
formatAst = ast
}
return formatAst
}
/**
* Given any node in a selector this gets the "simple" selector it's a part of
* A simple selector is just a list of nodes without any combinators
* Technically :is(), :not(), :has(), etc… can have combinators but those are nested
* inside the relevant node and won't be picked up so they're fine to ignore
*
* @param {Node} node
* @returns {Node[]}
**/
function simpleSelectorForNode(node) {
/** @type {Node[]} */
let nodes = []
// Walk backwards until we hit a combinator node (or the start)
while (node.prev() && node.prev().type !== 'combinator') {
node = node.prev()
}
// Now record all non-combinator nodes until we hit one (or the end)
while (node && node.type !== 'combinator') {
nodes.push(node)
node = node.next()
}
return nodes
}
/**
* Resorts the nodes in a selector to ensure they're in the correct order
* Tags go before classes, and pseudo classes go after classes
*
* @param {Selector} sel
* @returns {Selector}
**/
function resortSelector(sel) {
sel.sort((a, b) => {
if (a.type === 'tag' && b.type === 'class') {
return -1
} else if (a.type === 'class' && b.type === 'tag') {
return 1
} else if (a.type === 'class' && b.type === 'pseudo' && b.value.startsWith('::')) {
return -1
} else if (a.type === 'pseudo' && a.value.startsWith('::') && b.type === 'class') {
return 1
}
return sel.index(a) - sel.index(b)
})
return sel
}
/**
* Remove extraneous selectors that do not include the base class/candidate
*
* Example:
* Given the utility `.a, .b { color: red}`
* Given the candidate `sm:b`
*
* The final selector should be `.sm\:b` and not `.a, .sm\:b`
*
* @param {Selector} ast
* @param {string} base
*/
export function eliminateIrrelevantSelectors(sel, base) {
let hasClassesMatchingCandidate = false
sel.walk((child) => {
if (child.type === 'class' && child.value === base) {
hasClassesMatchingCandidate = true
return false // Stop walking
}
})
if (!hasClassesMatchingCandidate) {
sel.remove()
}
// We do NOT recursively eliminate sub selectors that don't have the base class
// as this is NOT a safe operation. For example, if we have:
// `.space-x-2 > :not([hidden]) ~ :not([hidden])`
// We cannot remove the [hidden] from the :not() because it would change the
// meaning of the selector.
// TODO: Can we do this for :matches, :is, and :where?
}
/**
* @param {string} current
* @param {AcceptedFormats} formats
* @param {{context: any, candidate: string, base: string | null}} options
* @returns {string}
*/
export function finalizeSelector(current, formats, { context, candidate, base }) {
let separator = context?.tailwindConfig?.separator ?? ':'
// Split by the separator, but ignore the separator inside square brackets:
//
// E.g.: dark:lg:hover:[paint-order:markers]
// ┬ ┬ ┬ ┬
// │ │ │ ╰── We will not split here
// ╰──┴─────┴─────────────── We will split here
//
base = base ?? splitAtTopLevelOnly(candidate, separator).pop()
// Parse the selector into an AST
let selector = selectorParser().astSync(current)
// Normalize escaped classes, e.g.:
//
// The idea would be to replace the escaped `base` in the selector with the
// `format`. However, in css you can escape the same selector in a few
// different ways. This would result in different strings and therefore we
// can't replace it properly.
//
// base: bg-[rgb(255,0,0)]
// base in selector: bg-\\[rgb\\(255\\,0\\,0\\)\\]
// escaped base: bg-\\[rgb\\(255\\2c 0\\2c 0\\)\\]
//
selector.walkClasses((node) => {
if (node.raws && node.value.includes(base)) {
node.raws.value = escapeClassName(unescape(node.raws.value))
}
})
// Remove extraneous selectors that do not include the base candidate
selector.each((sel) => eliminateIrrelevantSelectors(sel, base))
// If ffter eliminating irrelevant selectors, we end up with nothing
// Then the whole "rule" this is associated with does not need to exist
// We use `null` as a marker value for that case
if (selector.length === 0) {
return null
}
// If there are no formats that means there were no variants added to the candidate
// so we can just return the selector as-is
let formatAst = Array.isArray(formats)
? formatVariantSelector(formats, { context, candidate })
: formats
if (formatAst === null) {
return selector.toString()
}
let simpleStart = selectorParser.comment({ value: '/*__simple__*/' })
let simpleEnd = selectorParser.comment({ value: '/*__simple__*/' })
// We can safely replace the escaped base now, since the `base` section is
// now in a normalized escaped value.
selector.walkClasses((node) => {
if (node.value !== base) {
return
}
let parent = node.parent
let formatNodes = formatAst.nodes[0].nodes
// Perf optimization: if the parent is a single class we can just replace it and be done
if (parent.nodes.length === 1) {
node.replaceWith(...formatNodes)
return
}
let simpleSelector = simpleSelectorForNode(node)
parent.insertBefore(simpleSelector[0], simpleStart)
parent.insertAfter(simpleSelector[simpleSelector.length - 1], simpleEnd)
for (let child of formatNodes) {
parent.insertBefore(simpleSelector[0], child.clone())
}
node.remove()
// Re-sort the simple selector to ensure it's in the correct order
simpleSelector = simpleSelectorForNode(simpleStart)
let firstNode = parent.index(simpleStart)
parent.nodes.splice(
firstNode,
simpleSelector.length,
...resortSelector(selectorParser.selector({ nodes: simpleSelector })).nodes
)
simpleStart.remove()
simpleEnd.remove()
})
// Remove unnecessary pseudo selectors that we used as placeholders
selector.walkPseudos((p) => {
if (p.value === MERGE) {
p.replaceWith(p.nodes)
}
})
// Move pseudo elements to the end of the selector (if necessary)
selector.each((sel) => movePseudos(sel))
return selector.toString()
}
/**
*
* @param {Selector} selector
* @param {Selector} format
*/
export function handleMergePseudo(selector, format) {
/** @type {{pseudo: Pseudo, value: string}[]} */
let merges = []
// Find all :merge() pseudo-classes in `selector`
selector.walkPseudos((pseudo) => {
if (pseudo.value === MERGE) {
merges.push({
pseudo,
value: pseudo.nodes[0].toString(),
})
}
})
// Find all :merge() "attachments" in `format` and attach them to the matching selector in `selector`
format.walkPseudos((pseudo) => {
if (pseudo.value !== MERGE) {
return
}
let value = pseudo.nodes[0].toString()
// Does `selector` contain a :merge() pseudo-class with the same value?
let existing = merges.find((merge) => merge.value === value)
// Nope so there's nothing to do
if (!existing) {
return
}
// Everything after `:merge()` up to the next combinator is what is attached to the merged selector
let attachments = []
let next = pseudo.next()
while (next && next.type !== 'combinator') {
attachments.push(next)
next = next.next()
}
let combinator = next
existing.pseudo.parent.insertAfter(
existing.pseudo,
selectorParser.selector({ nodes: attachments.map((node) => node.clone()) })
)
pseudo.remove()
attachments.forEach((node) => node.remove())
// What about this case:
// :merge(.group):focus > &
// :merge(.group):hover &
if (combinator && combinator.type === 'combinator') {
combinator.remove()
}
})
return [selector, format]
}
@@ -0,0 +1,234 @@
/*!
* on-finished
* Copyright(c) 2013 Jonathan Ong
* Copyright(c) 2014 Douglas Christopher Wilson
* MIT Licensed
*/
'use strict'
/**
* Module exports.
* @public
*/
module.exports = onFinished
module.exports.isFinished = isFinished
/**
* Module dependencies.
* @private
*/
var asyncHooks = tryRequireAsyncHooks()
var first = require('ee-first')
/**
* Variables.
* @private
*/
/* istanbul ignore next */
var defer = typeof setImmediate === 'function'
? setImmediate
: function (fn) { process.nextTick(fn.bind.apply(fn, arguments)) }
/**
* Invoke callback when the response has finished, useful for
* cleaning up resources afterwards.
*
* @param {object} msg
* @param {function} listener
* @return {object}
* @public
*/
function onFinished (msg, listener) {
if (isFinished(msg) !== false) {
defer(listener, null, msg)
return msg
}
// attach the listener to the message
attachListener(msg, wrap(listener))
return msg
}
/**
* Determine if message is already finished.
*
* @param {object} msg
* @return {boolean}
* @public
*/
function isFinished (msg) {
var socket = msg.socket
if (typeof msg.finished === 'boolean') {
// OutgoingMessage
return Boolean(msg.finished || (socket && !socket.writable))
}
if (typeof msg.complete === 'boolean') {
// IncomingMessage
return Boolean(msg.upgrade || !socket || !socket.readable || (msg.complete && !msg.readable))
}
// don't know
return undefined
}
/**
* Attach a finished listener to the message.
*
* @param {object} msg
* @param {function} callback
* @private
*/
function attachFinishedListener (msg, callback) {
var eeMsg
var eeSocket
var finished = false
function onFinish (error) {
eeMsg.cancel()
eeSocket.cancel()
finished = true
callback(error)
}
// finished on first message event
eeMsg = eeSocket = first([[msg, 'end', 'finish']], onFinish)
function onSocket (socket) {
// remove listener
msg.removeListener('socket', onSocket)
if (finished) return
if (eeMsg !== eeSocket) return
// finished on first socket event
eeSocket = first([[socket, 'error', 'close']], onFinish)
}
if (msg.socket) {
// socket already assigned
onSocket(msg.socket)
return
}
// wait for socket to be assigned
msg.on('socket', onSocket)
if (msg.socket === undefined) {
// istanbul ignore next: node.js 0.8 patch
patchAssignSocket(msg, onSocket)
}
}
/**
* Attach the listener to the message.
*
* @param {object} msg
* @return {function}
* @private
*/
function attachListener (msg, listener) {
var attached = msg.__onFinished
// create a private single listener with queue
if (!attached || !attached.queue) {
attached = msg.__onFinished = createListener(msg)
attachFinishedListener(msg, attached)
}
attached.queue.push(listener)
}
/**
* Create listener on message.
*
* @param {object} msg
* @return {function}
* @private
*/
function createListener (msg) {
function listener (err) {
if (msg.__onFinished === listener) msg.__onFinished = null
if (!listener.queue) return
var queue = listener.queue
listener.queue = null
for (var i = 0; i < queue.length; i++) {
queue[i](err, msg)
}
}
listener.queue = []
return listener
}
/**
* Patch ServerResponse.prototype.assignSocket for node.js 0.8.
*
* @param {ServerResponse} res
* @param {function} callback
* @private
*/
// istanbul ignore next: node.js 0.8 patch
function patchAssignSocket (res, callback) {
var assignSocket = res.assignSocket
if (typeof assignSocket !== 'function') return
// res.on('socket', callback) is broken in 0.8
res.assignSocket = function _assignSocket (socket) {
assignSocket.call(this, socket)
callback(socket)
}
}
/**
* Try to require async_hooks
* @private
*/
function tryRequireAsyncHooks () {
try {
return require('async_hooks')
} catch (e) {
return {}
}
}
/**
* Wrap function with async resource, if possible.
* AsyncResource.bind static method backported.
* @private
*/
function wrap (fn) {
var res
// create anonymous resource
if (asyncHooks.AsyncResource) {
res = new asyncHooks.AsyncResource(fn.name || 'bound-anonymous-fn')
}
// incompatible node.js
if (!res || !res.runInAsyncScope) {
return fn
}
// return bound function
return res.runInAsyncScope.bind(res, fn, null)
}
@@ -0,0 +1 @@
{"name":"@react-stately/overlays","version":"3.6.12","requiresBuild":false,"files":{"LICENSE":{"checkedAt":1794532105972,"integrity":"sha512-cil7stSp3ik41Hdv2Dj+GMcbvUfs1q+MZ2Yte0804py9i6oJJN/diCiIr/brcQOZ5ZqwAI6dgaHA7l8FZheQBw==","mode":420,"size":11335},"dist/main.js":{"checkedAt":1794532107313,"integrity":"sha512-oj9B4l2T+sD5WB1qGcb1JC4iMfkcQWzTX6v+q2F9tpELSHoF4W8F3fEnrWpswTbPTgKRTarEXZGNxwl+DmChLA==","mode":420,"size":977},"dist/module.js":{"checkedAt":1794532107313,"integrity":"sha512-cSRDALzTvwk8f7I0ANw7QRCTVuqZ45jww4lgAs+CD+psi9GtjLkjMHqPpa1+S9BhswGtQFt/wJvzD7Bxn+MdUQ==","mode":420,"size":857},"dist/useOverlayTriggerState.main.js":{"checkedAt":1794532107314,"integrity":"sha512-M9Pzc1JpObcfMJVFjaqccDEUQ/EUE3t7YJC6mO4ECupBWbe+7L3IfMZYCtou7GGh6+QLisVnGJUGSLNDRqfliw==","mode":420,"size":1705},"dist/useOverlayTriggerState.module.js":{"checkedAt":1794532107314,"integrity":"sha512-qN6YBYJje3wh7wvk9BXMLRQgrS0dZW0se1yxzQ53t6t89lrtqLxDkg5Mf2NLdx0/tNk84L0Zfx8973rdgvmPvw==","mode":420,"size":1555},"package.json":{"checkedAt":1794532107314,"integrity":"sha512-0fpS9Dz+4rp4ny45kTVJZxhU1LA7Im+haP8iduruAO0cDUGxyGRactAWdhydU0yUwgl5JExW8uRlULKSP8xPyQ==","mode":420,"size":870},"dist/main.js.map":{"checkedAt":1794532107314,"integrity":"sha512-6KyKBwtaarmRRHPkSEySKHIZbLoUNJ/vgWM0OmStRG4/ukTyjneeZ5t0ajf9PSwbtZYgF5A47oom7VyZ8BDlYg==","mode":420,"size":1005},"dist/module.js.map":{"checkedAt":1794532107314,"integrity":"sha512-DtlDWyIx9I8XOl50PkEJWqle1vfhW27ahb6glmr0DRNOBp4cPKU3nf5IIRvOl1gT4BipOL/SPr3kGs638U2e8Q==","mode":420,"size":1001},"dist/types.d.ts.map":{"checkedAt":1794532107314,"integrity":"sha512-YCQeRAoHCzVuBOk7lPa+mFOFx5R4W+d6qM0G4Pi7wR1ITOQla/23nghkUa+iHfYaWzltaSglQWd85NytgrVEPQ==","mode":420,"size":1517},"dist/useOverlayTriggerState.main.js.map":{"checkedAt":1794532107314,"integrity":"sha512-x057qIjqbntFoTHve5cQ8JhwUuit/HKqpk1J41bxPwp+oiJ0I17z/tUtp//Ha5TnqhBrXZXFX0EbC/ZMReFdIw==","mode":420,"size":2407},"dist/useOverlayTriggerState.module.js.map":{"checkedAt":1794532107314,"integrity":"sha512-kJUw2N1HyDje3b+dO9AU9xg18BBuDYpp/k+18OnhnAzqXoGJR9G4j3G0NSz22wt9jmsmXXJrMzbks3+Dyq8VkA==","mode":420,"size":2403},"README.md":{"checkedAt":1794532107314,"integrity":"sha512-tDHJIh7f8OHvF98pn2IE4TtS2VwT9hlB/ECBHL2t+Q8MKn05qY+hTWD2eZHEjMhlKUjir75uAAS/sAa0hOdi2A==","mode":420,"size":141},"dist/import.mjs":{"checkedAt":1794532107314,"integrity":"sha512-A0wI12GzCy1UAsIknLYYd4kjU9+L7HbmM99R5UcdqxttKbXLHEOwyyNfxPzY2M+3pnxhJ4LwiRL4XzdXCrxKQw==","mode":420,"size":851},"dist/useOverlayTriggerState.mjs":{"checkedAt":1794532107315,"integrity":"sha512-qN6YBYJje3wh7wvk9BXMLRQgrS0dZW0se1yxzQ53t6t89lrtqLxDkg5Mf2NLdx0/tNk84L0Zfx8973rdgvmPvw==","mode":420,"size":1555},"src/index.ts":{"checkedAt":1794532107315,"integrity":"sha512-KyQhRHAGGymCuCczD1Bp8mgn1Et4vUqkc/lEUp3xuwCeRsiWbApweh3PRUJKSbl3W1H2VGI67le39nulOFTMZQ==","mode":420,"size":818},"dist/types.d.ts":{"checkedAt":1794532107315,"integrity":"sha512-83MKfEmtHwOf+64BMh8FHKjhlDLWYskNHWzjQ7qj3oe9lpsqdCVypJlWJDj1NjPucVtQdTyeEiOnUNxXVJvSdg==","mode":420,"size":749},"src/useOverlayTriggerState.ts":{"checkedAt":1794532107315,"integrity":"sha512-K7L0wRigSJzMLluCCQx3YBeZhCeocEgAebFAX+nF0ZeQtqXs4ddm0Nw0XhK2XOtmQ3zTF6Iq+m+0B25yyTisqQ==","mode":420,"size":1755}}}
@@ -0,0 +1,14 @@
module.exports = {
"ascending": `ascendente`,
"ascendingSort": (args)=>`ordenado por columna ${args.columnName} en sentido ascendente`,
"columnSize": (args)=>`${args.value} p\xedxeles`,
"descending": `descendente`,
"descendingSort": (args)=>`ordenado por columna ${args.columnName} en orden descendente`,
"resizerDescription": `Pulse Intro para empezar a redimensionar`,
"select": `Seleccionar`,
"selectAll": `Seleccionar todos`,
"sortable": `columna ordenable`
};
//# sourceMappingURL=es-ES.main.js.map
@@ -0,0 +1 @@
module.exports={A:{A:{"1":"K D E F A B","16":"wC"},B:{"1":"0 1 2 3 4 5 C L M G N O P Q H R S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB I"},C:{"1":"0 1 2 3 4 5 6 7 8 9 J ZB K D E F A B C L M G N O P aB AB BB CB DB EB FB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB wB xB yB zB 0B 1B 2B 3B UC 4B VC 5B 6B 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC Q H R WC S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB I XC MC YC yC zC 1C","2":"xC TC","16":"0C"},D:{"1":"0 1 2 3 4 5 EB FB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB wB xB yB zB 0B 1B 2B 3B UC 4B VC 5B 6B 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC Q H R S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB I XC MC YC","2":"6 7 8 9 J ZB K D E F A B C L M G N O P aB AB BB CB DB"},E:{"1":"K D E F A B C L M G 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","2":"J ZB 2C ZC 3C"},F:{"1":"0 1 2 3 4 5 6 7 8 9 C G N O P aB AB BB CB DB EB FB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB wB xB yB zB 0B 1B 2B 3B 4B 5B 6B 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC Q H R WC S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z JD OC","2":"F B FD GD HD ID NC uC"},G:{"1":"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":"E ZC KD vC LD MD ND OD PD QD RD SD TD UD VD"},H:{"2":"hD"},I:{"1":"I mD nD","2":"TC J iD jD kD lD vC"},J:{"2":"D A"},K:{"1":"H","2":"A B C NC uC OC"},L:{"1":"I"},M:{"1":"MC"},N:{"1":"A B"},O:{"1":"PC"},P:{"1":"6 7 8 9 J AB BB CB DB EB FB oD pD qD rD sD aC tD uD vD wD xD QC RC SC yD"},Q:{"1":"zD"},R:{"1":"0D"},S:{"1":"1D 2D"}},B:1,C:"indeterminate checkbox",D:true};
@@ -0,0 +1 @@
{"name":"tsc-alias","version":"1.8.16","requiresBuild":false,"files":{"LICENSE":{"checkedAt":1794532102520,"integrity":"sha512-epaMUU/spfpUAG7Zhx+T5qVPmdYHEk11d57Cr0CrCXGMjlzRtK3otOLi9SmsOFQzXoP5xuz6IiU60BE4av/TRg==","mode":420,"size":1064},"dist/replacers/base-url.replacer.js":{"checkedAt":1794532102520,"integrity":"sha512-DTHHI+WH3V2TrnuspLGZSB8GN8/xNJbw6UwMa0Ajnzso6yeQulpHTzcDQa00icAce4hK5Wg75YIIXWtuUgxEsQ==","mode":420,"size":1837},"dist/helpers/config.js":{"checkedAt":1794532102520,"integrity":"sha512-RcdIZyT6VourV1wDqScpoyngfx57XDgDkRH3a8MtudED1E3hWrWev1GuJx90Qa3Ur1AOULlP8Y/3abbfs+jXdw==","mode":420,"size":9155},"dist/replacers/default.replacer.js":{"checkedAt":1794532102520,"integrity":"sha512-gp6GJwrIQe6F/GCatQJUa5Y7HBP4+TgQq2MRJ2EUqabkPwvOiGHAU1rXr0hEpq7qGIaDEhI751cZIxq1sfmFuQ==","mode":420,"size":3404},"dist/utils/import-path-resolver.js":{"checkedAt":1794532102520,"integrity":"sha512-wn8YZEzzAIsSBmYtWqCWkfTDd0zhqGUtFuqIdb0x0iL8sMpXnZEQrYGlufkx74gDNpjmhi//DK9tRr/HyLfEMw==","mode":420,"size":3697},"dist/bin/index.js":{"checkedAt":1794532102520,"integrity":"sha512-DwGXhh/E0XywbrXDaM7K0l0+QwzdYNxtFmTgRiu71wOOBZOpBqur+YyniqeD3lDx45R0QstBVnVEK8sz0Q/56Q==","mode":493,"size":1883},"dist/helpers/index.js":{"checkedAt":1794532102521,"integrity":"sha512-przNknLYDyDpZ/S0DkAFU86ujm2GOf0nN++C+o3ulYsyPPj/lLuVtSp//d3xCNbfArFU3vc4r5kIkF8zfogQgQ==","mode":420,"size":923},"dist/index.js":{"checkedAt":1794532102521,"integrity":"sha512-xpFuh5/MEYwJc71C8H3g7N8RQw2iVdQbNy0tHBI45bmJxMX7ueN2pZhXla/Mz+HvsB1CY84r6x9YyiDaFlfSdg==","mode":420,"size":4100},"dist/utils/index.js":{"checkedAt":1794532102521,"integrity":"sha512-W3rjrkPyokaGxtQf49k8+Xr8BFXDW9XZDExYghkjEtGL62NYOY3MktMGJ8i8gRL9bq6QYcXa6W4HmFYGbZlGBQ==","mode":420,"size":982},"dist/interfaces.js":{"checkedAt":1794532102521,"integrity":"sha512-QN9nkZ1OSl/KXLFa8O3UTQ/fekJIH/XQnu0L+GGpEFJVYH0pJH3VBJnWkdm6mugUNEF72TRj1wbgNRThYNPbzg==","mode":420,"size":115},"dist/utils/output.js":{"checkedAt":1794532102521,"integrity":"sha512-S7pYMtU7VSjDY29lLKv9XZtbofhVx9RreysXKdmUPScquCbV+T0hlZ9+UHhPgVxxxheCsoBuHi1XI3ewrYwRbw==","mode":420,"size":1242},"dist/utils/path-cache.js":{"checkedAt":1794532102521,"integrity":"sha512-nwVnzqX6Xl87vE1pxjgw1Xmy3UdwfFLGNxcSubLzal3Ev4qICyI6icMA6ryxI1Nurr6DZJp3sJNRYSo8rLeS5A==","mode":420,"size":2445},"dist/helpers/path.js":{"checkedAt":1794532102521,"integrity":"sha512-zgEb/zJI1wKMvMih2MgEWvYqDlrLKbWv3GRh8oSHVX8rMeieG+zF1MLWFMyy++Lfsr2QeWBZ69djbfvbNrQX4A==","mode":420,"size":3215},"dist/helpers/replacers.js":{"checkedAt":1794532102521,"integrity":"sha512-65badV6FPJWWYaZ19X0+f+OkfGiqHqnwm5zYb6RB9ZoQXs2TRsicMftmHsZ/PkVNSErBWdnTPTNMFjDJpfX6Xw==","mode":420,"size":7697},"dist/utils/trie.js":{"checkedAt":1794532102522,"integrity":"sha512-c7dfbpL8BDQFhjqbnvRp33Z7tRvO6Zy7aw4qEWBFL7cLhr6A6o3tWrr1OCsDXEJItz0f6Sj3vxirZ+SPBzvGIw==","mode":420,"size":3109},"package.json":{"checkedAt":1794532102522,"integrity":"sha512-AdpHzoHETsy87eYXT1zmgDfzwecacKRukmw+PnQ5DBGzj4QLQu60YNc1fBS/kQFNaOLbaQ5GkYrRm3HGWFe0Kw==","mode":420,"size":1624},"dist/replacers/base-url.replacer.js.map":{"checkedAt":1794532102522,"integrity":"sha512-xDwEOsxldhACcgqQ4yTeayGHARS5tYFL2kZ6TGp44YAXc7/xvMkN2HnOefu5X0747YFQ40AcSE1AxANUHZFpEg==","mode":420,"size":3544},"dist/helpers/config.js.map":{"checkedAt":1794532102522,"integrity":"sha512-9AcJyqWkZvE1FB+Ib6+OYZnpo9fVErKCu8YxTON1iGAUGz7ZVwPfbwi3w09S+iUHU/afuzbOsOiUtL9ZFL9bAg==","mode":420,"size":14629},"dist/replacers/default.replacer.js.map":{"checkedAt":1794532102522,"integrity":"sha512-JHTYcwwru7T5YDcO4XBhzOiHLkuRWSJXHZb5SiwDvSGcG8x1VX2/Xq7bhvfmMSM7cZCyX5HhXCnfIhX3OSJ2EA==","mode":420,"size":6901},"dist/utils/import-path-resolver.js.map":{"checkedAt":1794532102522,"integrity":"sha512-IpQ7i/Z9/AOxWQLKmcUQjfNPWF/JJZApbW7NQm6FyaXTwzLVVrrhY5eU0ehl/WVcgH7ymP3PMdyAzrmwIvorZw==","mode":420,"size":8390},"dist/bin/index.js.map":{"checkedAt":1794532102523,"integrity":"sha512-DoMek7EuKifpz3K0nrl+XJRST79OC2OihgnyAOmoEyV3Kiu5hUfFegK3e+IFJUkhgw7+z51U7LSNIp1rQXo0+g==","mode":420,"size":3155},"dist/helpers/index.js.map":{"checkedAt":1794532102523,"integrity":"sha512-2c93Yw/CleW4pcK9G+8OkR5yf2hKMGO7A3xb5WgAYJCJ0FfMNlx4X9DdInDML1gCZ3KOEuCVEfuqgqATDnZRtw==","mode":420,"size":270},"dist/index.js.map":{"checkedAt":1794532102523,"integrity":"sha512-olkGxnThgQhtEoCaHEbXeCarBL46CRXHLvWEqAIhZtxviPjzk0DbsoGPbXrYDZrY7sIyq3dX0ge0AQZnHM8nAw==","mode":420,"size":6129},"dist/utils/index.js.map":{"checkedAt":1794532102523,"integrity":"sha512-4wUCy70Du3U0PiGuvFZnZGx0H8yWhR/W1KzPegYZTm80SKv+KTLKNOYYc7ZRCMADxw/bocYoNECTTxZ8V4BeLw==","mode":420,"size":323},"dist/interfaces.js.map":{"checkedAt":1794532102523,"integrity":"sha512-wR3d/dXFS2+RoJwYqwK69lLBH/3zE/YpA2zua7B6VlI0qoamFeLNbLWiA4MmsCSZzw6uUXydJ7kJ86W2AyQS0A==","mode":420,"size":3208},"dist/utils/output.js.map":{"checkedAt":1794532102523,"integrity":"sha512-3ZJuPaOUI4a479ejTk8m3vYN1udFW6fHA9vu1YJer/FAKJpnIR0fszrR34RBsu9vHu6m5hCr1VDsH5KAUgMZAA==","mode":420,"size":2648},"dist/utils/path-cache.js.map":{"checkedAt":1794532102523Line truncated
@@ -0,0 +1,37 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var rowgroupRole = {
abstract: false,
accessibleNameRequired: false,
baseConcepts: [],
childrenPresentational: false,
nameFrom: ['author', 'contents'],
prohibitedProps: [],
props: {},
relatedConcepts: [{
concept: {
name: 'tbody'
},
module: 'HTML'
}, {
concept: {
name: 'tfoot'
},
module: 'HTML'
}, {
concept: {
name: 'thead'
},
module: 'HTML'
}],
requireContextRole: ['grid', 'table', 'treegrid'],
requiredContextRole: ['grid', 'table', 'treegrid'],
requiredOwnedElements: [['row']],
requiredProps: {},
superClass: [['roletype', 'structure']]
};
var _default = exports.default = rowgroupRole;
@@ -0,0 +1,6 @@
export declare const isObject: (value: unknown) => value is Record<any, any>;
export declare const isFunction: (value: unknown) => value is (...args: any) => any;
export declare const isString: (value: unknown) => value is string;
export declare const isBoolean: (value: unknown) => value is boolean;
export declare const isNumber: (value: unknown) => value is number;
export declare const isUndef: (value: unknown) => value is undefined;
@@ -0,0 +1,105 @@
"use client";
import {
useInput
} from "./chunk-MSLIMGMJ.mjs";
// src/input.tsx
import { CloseFilledIcon } from "@heroui/shared-icons";
import { useMemo } from "react";
import { forwardRef } from "@heroui/system";
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
var Input = forwardRef((props, ref) => {
const {
Component,
label,
description,
isClearable,
startContent,
endContent,
labelPlacement,
hasHelper,
isOutsideLeft,
shouldLabelBeOutside,
errorMessage,
isInvalid,
getBaseProps,
getLabelProps,
getInputProps,
getInnerWrapperProps,
getInputWrapperProps,
getMainWrapperProps,
getHelperWrapperProps,
getDescriptionProps,
getErrorMessageProps,
getClearButtonProps
} = useInput({ ...props, ref });
const labelContent = label ? /* @__PURE__ */ jsx("label", { ...getLabelProps(), children: label }) : null;
const end = useMemo(() => {
if (isClearable) {
return /* @__PURE__ */ jsx("button", { ...getClearButtonProps(), children: endContent || /* @__PURE__ */ jsx(CloseFilledIcon, {}) });
}
return endContent;
}, [isClearable, getClearButtonProps]);
const helperWrapper = useMemo(() => {
const shouldShowError = isInvalid && errorMessage;
const hasContent = shouldShowError || description;
if (!hasHelper || !hasContent)
return null;
return /* @__PURE__ */ jsx("div", { ...getHelperWrapperProps(), children: shouldShowError ? /* @__PURE__ */ jsx("div", { ...getErrorMessageProps(), children: errorMessage }) : /* @__PURE__ */ jsx("div", { ...getDescriptionProps(), children: description }) });
}, [
hasHelper,
isInvalid,
errorMessage,
description,
getHelperWrapperProps,
getErrorMessageProps,
getDescriptionProps
]);
const innerWrapper = useMemo(() => {
return /* @__PURE__ */ jsxs("div", { ...getInnerWrapperProps(), children: [
startContent,
/* @__PURE__ */ jsx("input", { ...getInputProps() }),
end
] });
}, [startContent, end, getInputProps, getInnerWrapperProps]);
const mainWrapper = useMemo(() => {
if (shouldLabelBeOutside) {
return /* @__PURE__ */ jsxs("div", { ...getMainWrapperProps(), children: [
/* @__PURE__ */ jsxs("div", { ...getInputWrapperProps(), children: [
!isOutsideLeft ? labelContent : null,
innerWrapper
] }),
helperWrapper
] });
}
return /* @__PURE__ */ jsxs(Fragment, { children: [
/* @__PURE__ */ jsxs("div", { ...getInputWrapperProps(), children: [
labelContent,
innerWrapper
] }),
helperWrapper
] });
}, [
labelPlacement,
helperWrapper,
shouldLabelBeOutside,
labelContent,
innerWrapper,
errorMessage,
description,
getMainWrapperProps,
getInputWrapperProps,
getErrorMessageProps,
getDescriptionProps
]);
return /* @__PURE__ */ jsxs(Component, { ...getBaseProps(), children: [
isOutsideLeft ? labelContent : null,
mainWrapper
] });
});
Input.displayName = "HeroUI.Input";
var input_default = Input;
export {
input_default
};
@@ -0,0 +1,176 @@
import Block from '../blots/block.js';
import Container from '../blots/container.js';
class TableCell extends Block {
static blotName = 'table';
static tagName = 'TD';
static create(value) {
const node = super.create();
if (value) {
node.setAttribute('data-row', value);
} else {
node.setAttribute('data-row', tableId());
}
return node;
}
static formats(domNode) {
if (domNode.hasAttribute('data-row')) {
return domNode.getAttribute('data-row');
}
return undefined;
}
cellOffset() {
if (this.parent) {
return this.parent.children.indexOf(this);
}
return -1;
}
format(name, value) {
if (name === TableCell.blotName && value) {
this.domNode.setAttribute('data-row', value);
} else {
super.format(name, value);
}
}
row() {
return this.parent;
}
rowOffset() {
if (this.row()) {
return this.row().rowOffset();
}
return -1;
}
table() {
return this.row() && this.row().table();
}
}
class TableRow extends Container {
static blotName = 'table-row';
static tagName = 'TR';
checkMerge() {
// @ts-expect-error
if (super.checkMerge() && this.next.children.head != null) {
// @ts-expect-error
const thisHead = this.children.head.formats();
// @ts-expect-error
const thisTail = this.children.tail.formats();
// @ts-expect-error
const nextHead = this.next.children.head.formats();
// @ts-expect-error
const nextTail = this.next.children.tail.formats();
return thisHead.table === thisTail.table && thisHead.table === nextHead.table && thisHead.table === nextTail.table;
}
return false;
}
optimize(context) {
super.optimize(context);
this.children.forEach(child => {
if (child.next == null) return;
const childFormats = child.formats();
const nextFormats = child.next.formats();
if (childFormats.table !== nextFormats.table) {
const next = this.splitAfter(child);
if (next) {
// @ts-expect-error TODO: parameters of optimize() should be a optional
next.optimize();
}
// We might be able to merge with prev now
if (this.prev) {
// @ts-expect-error TODO: parameters of optimize() should be a optional
this.prev.optimize();
}
}
});
}
rowOffset() {
if (this.parent) {
return this.parent.children.indexOf(this);
}
return -1;
}
table() {
return this.parent && this.parent.parent;
}
}
class TableBody extends Container {
static blotName = 'table-body';
static tagName = 'TBODY';
}
class TableContainer extends Container {
static blotName = 'table-container';
static tagName = 'TABLE';
balanceCells() {
const rows = this.descendants(TableRow);
const maxColumns = rows.reduce((max, row) => {
return Math.max(row.children.length, max);
}, 0);
rows.forEach(row => {
new Array(maxColumns - row.children.length).fill(0).forEach(() => {
let value;
if (row.children.head != null) {
value = TableCell.formats(row.children.head.domNode);
}
const blot = this.scroll.create(TableCell.blotName, value);
row.appendChild(blot);
// @ts-expect-error TODO: parameters of optimize() should be a optional
blot.optimize(); // Add break blot
});
});
}
cells(column) {
return this.rows().map(row => row.children.at(column));
}
deleteColumn(index) {
// @ts-expect-error
const [body] = this.descendant(TableBody);
if (body == null || body.children.head == null) return;
body.children.forEach(row => {
const cell = row.children.at(index);
if (cell != null) {
cell.remove();
}
});
}
insertColumn(index) {
// @ts-expect-error
const [body] = this.descendant(TableBody);
if (body == null || body.children.head == null) return;
body.children.forEach(row => {
const ref = row.children.at(index);
// @ts-expect-error
const value = TableCell.formats(row.children.head.domNode);
const cell = this.scroll.create(TableCell.blotName, value);
row.insertBefore(cell, ref);
});
}
insertRow(index) {
// @ts-expect-error
const [body] = this.descendant(TableBody);
if (body == null || body.children.head == null) return;
const id = tableId();
const row = this.scroll.create(TableRow.blotName);
body.children.head.children.forEach(() => {
const cell = this.scroll.create(TableCell.blotName, id);
row.appendChild(cell);
});
const ref = body.children.at(index);
body.insertBefore(row, ref);
}
rows() {
const body = this.children.head;
if (body == null) return [];
return body.children.map(row => row);
}
}
TableContainer.allowedChildren = [TableBody];
TableBody.requiredContainer = TableContainer;
TableBody.allowedChildren = [TableRow];
TableRow.requiredContainer = TableBody;
TableRow.allowedChildren = [TableCell];
TableCell.requiredContainer = TableRow;
function tableId() {
const id = Math.random().toString(36).slice(2, 6);
return `row-${id}`;
}
export { TableCell, TableRow, TableBody, TableContainer, tableId };
//# sourceMappingURL=table.js.map
@@ -0,0 +1,11 @@
{
"env": {
"browser": true,
"node": true
},
"rules": {
"no-console": 0,
"no-empty": [1, { "allowEmptyCatch": true }]
},
"extends": "eslint:recommended"
}
@@ -0,0 +1,25 @@
var baseSortedIndex = require('./_baseSortedIndex');
/**
* This method is like `_.sortedIndex` except that it returns the highest
* index at which `value` should be inserted into `array` in order to
* maintain its sort order.
*
* @static
* @memberOf _
* @since 3.0.0
* @category Array
* @param {Array} array The sorted array to inspect.
* @param {*} value The value to evaluate.
* @returns {number} Returns the index at which `value` should be inserted
* into `array`.
* @example
*
* _.sortedLastIndex([4, 5, 5, 5, 6], 5);
* // => 4
*/
function sortedLastIndex(array, value) {
return baseSortedIndex(array, value, true);
}
module.exports = sortedLastIndex;
@@ -0,0 +1,33 @@
/// <reference types="node" />
import { SocksProxy } from 'socks';
import { Agent, ClientRequest, RequestOptions } from 'agent-base';
import { AgentOptions } from 'agent-base';
import { Url } from 'url';
import net from 'net';
import tls from 'tls';
interface BaseSocksProxyAgentOptions {
host?: string | null;
port?: string | number | null;
username?: string | null;
tls?: tls.ConnectionOptions | null;
}
interface SocksProxyAgentOptionsExtra {
timeout?: number;
}
export interface SocksProxyAgentOptions extends AgentOptions, BaseSocksProxyAgentOptions, Partial<Omit<Url & SocksProxy, keyof BaseSocksProxyAgentOptions>> {
}
export declare class SocksProxyAgent extends Agent {
private readonly shouldLookup;
private readonly proxy;
private readonly tlsConnectionOptions;
timeout: number | null;
constructor(input: string | SocksProxyAgentOptions, options?: SocksProxyAgentOptionsExtra);
/**
* Initiates a SOCKS connection to the specified SOCKS proxy server,
* which in turn connects to the specified remote host and port.
*
* @api protected
*/
callback(req: ClientRequest, opts: RequestOptions): Promise<net.Socket>;
}
export {};
@@ -0,0 +1,22 @@
import { LogWrapper } from './log';
interface ServerRkeyData {
group_rkey: string;
private_rkey: string;
expired_time: number;
}
export declare class RkeyManager {
serverUrl: string[];
logger: LogWrapper;
private rkeyData;
private urlFailures;
private readonly FAILURE_LIMIT;
private readonly ONE_DAY;
constructor(serverUrl: string[], logger: LogWrapper);
getRkey(): Promise<ServerRkeyData>;
private getAvailableUrls;
private isUrlDisabled;
private updateUrlFailure;
isExpired(): boolean;
refreshRkey(): Promise<void>;
}
export {};
@@ -0,0 +1 @@
{"version":3,"file":"all-signals.js","sourceRoot":"","sources":["../../src/all-signals.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,gBAAgB,CAAA;AACtC,MAAM,CAAC,MAAM,UAAU;AACrB,0EAA0E;AAC1E,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,MAAM,CAC3B,CAAC,CAAC,EAAE,CACF,CAAC,CAAC,UAAU,CAAC,KAAK,CAAC;IACnB,iDAAiD;IACjD,CAAC,KAAK,SAAS;IACf,yDAAyD;IACzD,CAAC,KAAK,SAAS,CACE,CAAA;AAEvB,8DAA8D;AAC9D,gEAAgE;AAChE,6DAA6D;AAC7D,gCAAgC;AAChC,EAAE;AACF,YAAY;AACZ,aAAa;AACb,aAAa;AACb,cAAc;AACd,gBAAgB;AAChB,iBAAiB;AACjB,iBAAiB;AACjB,iBAAiB;AACjB,iBAAiB;AACjB,iBAAiB;AACjB,iBAAiB;AACjB,gBAAgB;AAChB,gBAAgB;AAChB,gBAAgB;AAChB,gBAAgB;AAChB,gBAAgB;AAChB,gBAAgB;AAChB,gBAAgB;AAChB,gBAAgB;AAChB,cAAc;AACd,gBAAgB;AAChB,iBAAiB;AACjB,iBAAiB;AACjB,iBAAiB;AACjB,iBAAiB;AACjB,iBAAiB;AACjB,iBAAiB;AACjB,iBAAiB;AACjB,gBAAgB;AAChB,gBAAgB;AAChB,gBAAgB;AAChB,gBAAgB;AAChB,gBAAgB;AAChB,gBAAgB;AAChB,gBAAgB;AAChB,gBAAgB;AAChB,eAAe;AACf,eAAe","sourcesContent":["import constants from 'node:constants'\nexport const allSignals =\n // this is the full list of signals that Node will let us do anything with\n Object.keys(constants).filter(\n k =>\n k.startsWith('SIG') &&\n // https://github.com/tapjs/signal-exit/issues/21\n k !== 'SIGPROF' &&\n // no sense trying to listen for SIGKILL, it's impossible\n k !== 'SIGKILL',\n ) as NodeJS.Signals[]\n\n// These are some obscure signals that are reported by kill -l\n// on macOS, Linux, or Windows, but which don't have any mapping\n// in Node.js. No sense trying if they're just going to throw\n// every time on every platform.\n//\n// 'SIGEMT',\n// 'SIGLOST',\n// 'SIGPOLL',\n// 'SIGRTMAX',\n// 'SIGRTMAX-1',\n// 'SIGRTMAX-10',\n// 'SIGRTMAX-11',\n// 'SIGRTMAX-12',\n// 'SIGRTMAX-13',\n// 'SIGRTMAX-14',\n// 'SIGRTMAX-15',\n// 'SIGRTMAX-2',\n// 'SIGRTMAX-3',\n// 'SIGRTMAX-4',\n// 'SIGRTMAX-5',\n// 'SIGRTMAX-6',\n// 'SIGRTMAX-7',\n// 'SIGRTMAX-8',\n// 'SIGRTMAX-9',\n// 'SIGRTMIN',\n// 'SIGRTMIN+1',\n// 'SIGRTMIN+10',\n// 'SIGRTMIN+11',\n// 'SIGRTMIN+12',\n// 'SIGRTMIN+13',\n// 'SIGRTMIN+14',\n// 'SIGRTMIN+15',\n// 'SIGRTMIN+16',\n// 'SIGRTMIN+2',\n// 'SIGRTMIN+3',\n// 'SIGRTMIN+4',\n// 'SIGRTMIN+5',\n// 'SIGRTMIN+6',\n// 'SIGRTMIN+7',\n// 'SIGRTMIN+8',\n// 'SIGRTMIN+9',\n// 'SIGSTKFLT',\n// 'SIGUNUSED',\n"]}
@@ -0,0 +1,39 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = _objectSpread2;
var _defineProperty = require("./defineProperty.js");
function ownKeys(object, enumerableOnly) {
var keys = Object.keys(object);
if (Object.getOwnPropertySymbols) {
var symbols = Object.getOwnPropertySymbols(object);
if (enumerableOnly) {
symbols = symbols.filter(function (sym) {
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
});
}
keys.push.apply(keys, symbols);
}
return keys;
}
function _objectSpread2(target) {
for (var i = 1; i < arguments.length; i++) {
var source = arguments[i] != null ? arguments[i] : {};
if (i % 2) {
ownKeys(Object(source), true).forEach(function (key) {
(0, _defineProperty.default)(target, key, source[key]);
});
} else if (Object.getOwnPropertyDescriptors) {
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
} else {
ownKeys(Object(source)).forEach(function (key) {
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
});
}
}
return target;
}
//# sourceMappingURL=objectSpread2.js.map
@@ -0,0 +1,44 @@
{
"name": "camelcase",
"version": "6.3.0",
"description": "Convert a dash/dot/underscore/space separated string to camelCase or PascalCase: `foo-bar` → `fooBar`",
"license": "MIT",
"repository": "sindresorhus/camelcase",
"funding": "https://github.com/sponsors/sindresorhus",
"author": {
"name": "Sindre Sorhus",
"email": "sindresorhus@gmail.com",
"url": "https://sindresorhus.com"
},
"engines": {
"node": ">=10"
},
"scripts": {
"test": "xo && ava && tsd"
},
"files": [
"index.js",
"index.d.ts"
],
"keywords": [
"camelcase",
"camel-case",
"camel",
"case",
"dash",
"hyphen",
"dot",
"underscore",
"separator",
"string",
"text",
"convert",
"pascalcase",
"pascal-case"
],
"devDependencies": {
"ava": "^1.4.1",
"tsd": "^0.11.0",
"xo": "^0.28.3"
}
}
@@ -0,0 +1,68 @@
{
"author": {
"email": "yury@strozhevsky.com",
"name": "Yury Strozhevsky"
},
"contributors": [
{
"email": "rmh@unmitigatedrisk.com",
"name": "Ryan Hurst"
},
{
"email": "microshine@mail.ru",
"name": "Miroshin Stepan"
}
],
"repository": {
"type": "git",
"url": "https://github.com/PeculiarVentures/pvutils.git"
},
"description": "Common utilities for products from Peculiar Ventures",
"scripts": {
"prepare": "npm run build",
"test": "mocha",
"lint": "eslint . --ext .ts",
"lint:fix": "eslint --fix . --ext .ts",
"build": "rollup -c",
"coverage": "nyc npm test",
"coveralls": "nyc report --reporter=text-lcov | coveralls",
"release": "standard-version"
},
"files": [
"build",
"README.md",
"LICENSE"
],
"module": "./build/utils.es.js",
"main": "./build/utils.js",
"types": "./build/index.d.ts",
"devDependencies": {
"@types/mocha": "^10.0.10",
"@types/node": "^17.0.19",
"@typescript-eslint/eslint-plugin": "^5.12.1",
"@typescript-eslint/parser": "^5.12.1",
"eslint": "^8.9.0",
"eslint-plugin-import": "^2.25.4",
"mocha": "^11.7.4",
"nyc": "^15.1.0",
"rollup": "2.79.2",
"rollup-plugin-dts": "^4.1.0",
"rollup-plugin-typescript2": "^0.31.2",
"standard-version": "^9.5.0",
"ts-node": "^10.5.0",
"typescript": "^4.5.5"
},
"name": "pvutils",
"version": "1.1.5",
"license": "MIT",
"engines": {
"node": ">=16.0.0"
},
"devEngines": {
"packageManager": {
"name": "npm",
"version": ">=10",
"onFail": "error"
}
}
}
@@ -0,0 +1,204 @@
# 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.9](https://github.com/ljharb/Object.entries/compare/v1.1.8...v1.1.9) - 2025-03-14
### Commits
- [actions] split out node 10-20, and 20+ [`5ea5516`](https://github.com/ljharb/Object.entries/commit/5ea55165f812ad2c547af70bac86431a368fc556)
- [Dev Deps] update `@es-shims/api`, `@ljharb/eslint-config`, `array.prototype.map`, `auto-changelog`, `has-strict-mode`, `tape` [`d2f5f11`](https://github.com/ljharb/Object.entries/commit/d2f5f116b33401af53ffea7eab03c5ea60654b72)
- [Deps] update `call-bind`, `es-object-atoms` [`9e50a4b`](https://github.com/ljharb/Object.entries/commit/9e50a4b8a72a85ff10db99eb3ba960526c409a86)
- [Refactor] use `call-bound` directly [`b44af77`](https://github.com/ljharb/Object.entries/commit/b44af773a2bbb6ac74e752289e0da0bd2a583715)
- [Tests] replace `aud` with `npm audit` [`615e995`](https://github.com/ljharb/Object.entries/commit/615e99538b1d0cdc9fc55c63633d0e0ff5bbe304)
- [Dev Deps] add missing peer dep [`b750b1a`](https://github.com/ljharb/Object.entries/commit/b750b1acc727c2c95a7a406ae30b54681578fda9)
## [v1.1.8](https://github.com/ljharb/Object.entries/compare/v1.1.7...v1.1.8) - 2024-03-18
### Commits
- [actions] remove redundant finisher [`14a9f46`](https://github.com/ljharb/Object.entries/commit/14a9f46a8068b5d676e6babf417ed4731b779b87)
- [Dev Deps] update `array.prototype.map`, `aud`, `npmignore`, `tape` [`eee9379`](https://github.com/ljharb/Object.entries/commit/eee9379437fee86a75f542717ce2dec0f813469b)
- [Deps] update `call-bind`, `define-properties` [`02bbe0d`](https://github.com/ljharb/Object.entries/commit/02bbe0d4c860ec04ef993b149a90f61650c128d1)
- [Refactor] use `es-object-atoms` instead of `es-abstract` [`dac98c9`](https://github.com/ljharb/Object.entries/commit/dac98c90921712f2b055cdb77c5318bc7eb5a424)
## [v1.1.7](https://github.com/ljharb/Object.entries/compare/v1.1.6...v1.1.7) - 2023-08-27
### Commits
- [Dev Deps] update `@es-shims/api`, `@ljharb/eslint-config`, `aud`, `tape` [`f2edb13`](https://github.com/ljharb/Object.entries/commit/f2edb1340e8ff5a07f3997b7f3b6f23a048162a1)
- [Deps] update `define-properties`, `es-abstract` [`7b9daec`](https://github.com/ljharb/Object.entries/commit/7b9daec059051d2a1900500d9b5eff5846bd8536)
## [v1.1.6](https://github.com/ljharb/Object.entries/compare/v1.1.5...v1.1.6) - 2022-11-05
### Commits
- [actions] reuse common workflows [`e6dc177`](https://github.com/ljharb/Object.entries/commit/e6dc177fef3434a3eeb430d1bef2ca4db3b473e0)
- [meta] use `npmignore` to autogenerate an npmignore file [`76b4136`](https://github.com/ljharb/Object.entries/commit/76b4136ccddca82ee7ed07da53f1856b6509b79b)
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `@es-shims/api`, `safe-publish-latest`, `tape` [`2ab7fcd`](https://github.com/ljharb/Object.entries/commit/2ab7fcd693cff6a39dfbc2b4854d2366eafb4d88)
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `array.prototype.map`, `aud`, `auto-changelog`, `functions-have-names`, `tape` [`61a205e`](https://github.com/ljharb/Object.entries/commit/61a205eb569e1d2956c010c639199b6f33649e75)
- [actions] update rebase action to use reusable workflow [`3b886b0`](https://github.com/ljharb/Object.entries/commit/3b886b01481a99cd9108a98bfc8f4538fcf1fd5d)
- [actions] update codecov uploader [`6db30f8`](https://github.com/ljharb/Object.entries/commit/6db30f8663954b35b5498818a401be654d5678cd)
- [Deps] update `define-properties`, `es-abstract` [`fa0a9c9`](https://github.com/ljharb/Object.entries/commit/fa0a9c920eb69474631f26956b199600a4cc4c90)
## [v1.1.5](https://github.com/ljharb/Object.entries/compare/v1.1.4...v1.1.5) - 2021-10-03
### Commits
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `array.prototype.map`, `tape` [`3fa8e24`](https://github.com/ljharb/Object.entries/commit/3fa8e24026bcef1ea84ad421ef138255068123b0)
- [Deps] update `es-abstract` [`9288cc0`](https://github.com/ljharb/Object.entries/commit/9288cc0b2b2282c6a41b1d4499bf41945639c18f)
- [Robustness] use call-bound `Array.prototype.push` [`e495b27`](https://github.com/ljharb/Object.entries/commit/e495b2737b16124a936002a0e204bda0a1608f12)
- [meta] npmignore coverage output [`d16eb7d`](https://github.com/ljharb/Object.entries/commit/d16eb7d64e44baf37beb3f08f405fb206bc0fe50)
## [v1.1.4](https://github.com/ljharb/Object.entries/compare/v1.1.3...v1.1.4) - 2021-05-26
### Commits
- [actions] use `node/install` instead of `node/run`; use `codecov` action [`502a2d7`](https://github.com/ljharb/Object.entries/commit/502a2d729a36dbe92f03a2416be5d9cf3f3cd5fa)
- [meta] do not publish github action workflow files [`f38243c`](https://github.com/ljharb/Object.entries/commit/f38243c9c9e4b0478219d9313316e6d7af433496)
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `functions-have-names`, `has-strict-mode`, `tape` [`28b8c53`](https://github.com/ljharb/Object.entries/commit/28b8c53aa2f3671e8d500d332d4b658afd27ced7)
- [readme] fix repo URLs; remove travis badge [`01eb2bc`](https://github.com/ljharb/Object.entries/commit/01eb2bc33977dba3e25f9e8ce4341a8eac24662f)
- [readme] add actions and codecov badges [`e9455ce`](https://github.com/ljharb/Object.entries/commit/e9455ce300168157a448f695b1be983bda974a8a)
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `auto-changelog` [`3f26a81`](https://github.com/ljharb/Object.entries/commit/3f26a81ba0dff813c5828e1d818bf02330c1ddc7)
- [actions] update workflows [`2447f74`](https://github.com/ljharb/Object.entries/commit/2447f740f3b963221f7525588879f628c1a4538b)
- [Refactor] `propertyIsEnumerable` checks own-ness; remove `has` [`a65ae8d`](https://github.com/ljharb/Object.entries/commit/a65ae8d8349464d7d9fb2621c5e2ee02533cd9e3)
- [actions] update workflows [`2465bef`](https://github.com/ljharb/Object.entries/commit/2465befa1132bf327853ed134e9640b6d7cb7d90)
- [Tests] swap `array-map` for `array.prototype.map` [`37d5157`](https://github.com/ljharb/Object.entries/commit/37d51574118272e90cbbe6356ecca505e399e7ed)
- [Dev Deps] update `eslint`, `tape` [`3878db8`](https://github.com/ljharb/Object.entries/commit/3878db8f4b120e35e7e2ab9c3906983a6a3c98a9)
- [Deps] update `call-bind`, `es-abstract` [`9ff20ec`](https://github.com/ljharb/Object.entries/commit/9ff20ec9bb0b079e652eaabb5f4e15b785d6abd2)
- [meta] use `prepublishOnly` script for npm 7+ [`052d1ca`](https://github.com/ljharb/Object.entries/commit/052d1caf5f9b56be1948fa68ddd47a6ee36bdb0f)
- [Tests] increase coverage [`1e84c9c`](https://github.com/ljharb/Object.entries/commit/1e84c9ce0eb2dd5178ccea5e659384c70f29e758)
- [Deps] update `es-abstract` [`65af70d`](https://github.com/ljharb/Object.entries/commit/65af70d1c31bce6eb630ffa100dde99a0cb53529)
- [Deps] update `es-abstract` [`2a633ce`](https://github.com/ljharb/Object.entries/commit/2a633ce6ec8b363e865a41783758c1b5ab55f6e8)
- [meta] gitignore coverage output [`5f4a0c1`](https://github.com/ljharb/Object.entries/commit/5f4a0c10918a492ce09fbab6ea104bc9f8567fa7)
## [v1.1.3](https://github.com/ljharb/Object.entries/compare/v1.1.2...v1.1.3) - 2020-11-26
### Commits
- [Tests] migrate tests to Github Actions [`f9641aa`](https://github.com/ljharb/Object.entries/commit/f9641aa552ca26fe787474f342d0868f65c306b3)
- [Tests] add `implementation` test; run `es-shim-api` in postlint; use `tape` runner [`7cd4184`](https://github.com/ljharb/Object.entries/commit/7cd418456d3de86030959fc7f8e790dba41698d9)
- [Tests] run `nyc` on all tests [`de597c9`](https://github.com/ljharb/Object.entries/commit/de597c9b1feeb48c3a8c90e3e19c20b13885e6ed)
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `auto-changelog`, `tape` [`f453127`](https://github.com/ljharb/Object.entries/commit/f4531276dd22be8dfa3d693155f095fc2e3d09ab)
- [actions] add "Allow Edits" workflow [`5b65ef6`](https://github.com/ljharb/Object.entries/commit/5b65ef6626632d17a9f601246cadfec1e658c94b)
- [Deps] update `es-abstract`; use `call-bind` where applicable [`339136d`](https://github.com/ljharb/Object.entries/commit/339136db2e06c06b718fb13528fb8a8b21ecb3db)
- [actions] switch Automatic Rebase workflow to `pull_request_target` event [`ef2df4d`](https://github.com/ljharb/Object.entries/commit/ef2df4d65c2a2faeb1d0cd1964ecf9b4d7723fa9)
## [v1.1.2](https://github.com/ljharb/Object.entries/compare/v1.1.1...v1.1.2) - 2020-05-20
### Commits
- [meta] add `auto-changelog` [`29e2771`](https://github.com/ljharb/Object.entries/commit/29e2771f01d3cc14c9372584ca8c966ccd10a294)
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `tape`, `functions-have-names`; add `safe-publish-latest` [`f30dde0`](https://github.com/ljharb/Object.entries/commit/f30dde0d2061c6f17078c45db925d536b3986327)
- [Refactor] use `callBound` instead of `function-bind` [`db94733`](https://github.com/ljharb/Object.entries/commit/db94733a409286914f0b0067ced2a05e0af34064)
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `tape`; add `aud` [`124d3bb`](https://github.com/ljharb/Object.entries/commit/124d3bb9f14c7f117aec7310fd0a461e90d7255b)
- [Fix] do not mutate the native function when present [`fffb674`](https://github.com/ljharb/Object.entries/commit/fffb6746635276a921eb6c893d230448d89d8436)
- [Dev Deps] update `@ljharb/eslint-config`, `aud` [`5552db4`](https://github.com/ljharb/Object.entries/commit/5552db46d67f9d9b2de2952d44b96a883b96007d)
- [Deps] update `es-abstract` [`bcf93d0`](https://github.com/ljharb/Object.entries/commit/bcf93d0dc0a5b1a3cd0620ad75876d09602524bd)
- [meta] only run `aud` on prod deps [`13c35c9`](https://github.com/ljharb/Object.entries/commit/13c35c9d8e0b1e30be0ea9e5307ea552d8b31143)
- [Deps] update `es-abstract` [`9374fed`](https://github.com/ljharb/Object.entries/commit/9374fed15ca58ba6af9494d1bc61634e9a6b9d8b)
## [v1.1.1](https://github.com/ljharb/Object.entries/compare/v1.1.0...v1.1.1) - 2019-12-12
### Commits
- [Tests] use shared travis-ci configs [`576c8a7`](https://github.com/ljharb/Object.entries/commit/576c8a7db358c79ba8135a0c87c91e6e3f31c91a)
- [Tests] up to `node` `v12.7`, `v11.15`, `v10.16`, `v8.16`, `v6.17`; use `nvm install-latest-npm` [`26c5a45`](https://github.com/ljharb/Object.entries/commit/26c5a4570bb7c4a535921e5e1a51e1f22f2fbd80)
- [actions] add automatic rebasing / merge commit blocking [`3253bdf`](https://github.com/ljharb/Object.entries/commit/3253bdf6b24d83414db15b4175eaf2fa0fdd1b5f)
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `functions-have-names` [`bf480ef`](https://github.com/ljharb/Object.entries/commit/bf480efed7cdd20bd99d2d441bf99472fc061057)
- [Refactor] use split-up `es-abstract` (85% bundle size decrease) [`3fd42b9`](https://github.com/ljharb/Object.entries/commit/3fd42b97b91a2192b20f3b6f04c7e658ba841955)
- [Tests] use `npx aud` instead of `nsp` or `npm audit` with hoops [`9bf7f7f`](https://github.com/ljharb/Object.entries/commit/9bf7f7feaab5b4d1ffbd19e63a91db619fc3c15d)
- [meta] clean up scripts [`908f4fd`](https://github.com/ljharb/Object.entries/commit/908f4fdc3c7b7bb4fd595b8136715254e1462d01)
- [Dev Deps] update `eslint`, `tape` [`213436c`](https://github.com/ljharb/Object.entries/commit/213436c385c49dd9f50aacfeb77a85a44c276de6)
- [Tests] use `functions-have-names` [`8cd5de5`](https://github.com/ljharb/Object.entries/commit/8cd5de572695fcf0ffda03714cd0a0754a296edb)
- [Deps] update `es-abstract` [`3a2ca03`](https://github.com/ljharb/Object.entries/commit/3a2ca0383cc511c05f196820a264e81e3dad0a54)
## [v1.1.0](https://github.com/ljharb/Object.entries/compare/v1.0.4...v1.1.0) - 2019-01-01
### Fixed
- Exclude test.html from the npm package. [`#12`](https://github.com/ljharb/Object.entries/issues/12)
### Commits
- [Tests] remove `jscs` [`052aed1`](https://github.com/ljharb/Object.entries/commit/052aed1bba3d9b1fc177d8570110291740ffa3d0)
- [Tests] up to `node` `v11.1`, `v10.13`, `v9.11`, `v8.12`, `v7.10`, `v6.14`, `v4.9`; use `nvm install-latest-npm` [`0015678`](https://github.com/ljharb/Object.entries/commit/001567848e2c81be9df50f3e7e16cdfbe168f815)
- [Tests] up to `node` `v7.4`, `v4.7`; improve test matrix [`6f19e66`](https://github.com/ljharb/Object.entries/commit/6f19e66bbbf6d38628589ad3654fd3cb3299cc47)
- [Tests] up to `node` `v11.6`, `v10.15`, `v8.15`, `v6.16` [`89415ba`](https://github.com/ljharb/Object.entries/commit/89415ba61eb7260b7f16ad7df95c40a3f175fa5a)
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `nsp`, `tape` [`91f9ee6`](https://github.com/ljharb/Object.entries/commit/91f9ee65a28021d42fe53fb3b0341160c691f876)
- [New] add `auto` entry point` [`9799c0d`](https://github.com/ljharb/Object.entries/commit/9799c0d8634cfecb68038a1770fcb35e184ebe94)
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `covert`, `tape` [`074677d`](https://github.com/ljharb/Object.entries/commit/074677d53f2226fc1f09ed18275ce0963cf60998)
- [Deps] update `define-properties`, `es-abstract`, `function-bind`, `has` [`db5d97e`](https://github.com/ljharb/Object.entries/commit/db5d97ed6ff82757df50bc776afa9aa8260bdb3b)
- [Tests] use `npm audit` instead of `nsp` [`bc3e6a7`](https://github.com/ljharb/Object.entries/commit/bc3e6a74aa961adee9e66bb46c02ca5aa5eba8fd)
- Only apps should have lockfiles [`d192ab7`](https://github.com/ljharb/Object.entries/commit/d192ab7e6bfd9e2c4260e82097ab5d81915cc30f)
## [v1.0.4](https://github.com/ljharb/Object.entries/compare/v1.0.3...v1.0.4) - 2016-12-04
### Commits
- [Dev Deps] update `tape`, `jscs`, `nsp`, `eslint`, `@ljharb/eslint-config`, `@es-shims/api` [`cf4a9cf`](https://github.com/ljharb/Object.entries/commit/cf4a9cf9f0397a5ff385801879df86316b90cc00)
- [Tests] up to `node` `v7.2`, `v6.9`, `v4.6`; improve test matrix. [`281ccbd`](https://github.com/ljharb/Object.entries/commit/281ccbd6fe3b3bf6f214bd628679963bbe34ed7e)
- [Dev Deps] update `tape`, `jscs`, `nsp`, `eslint`, `@ljharb/eslint-config` [`33fb890`](https://github.com/ljharb/Object.entries/commit/33fb8903265ac8e5ec64bde093c1b2a047e9e709)
- [Dev Deps] update `jscs`, `nsp`, `eslint`, `@ljharb/eslint-config` [`7c1ea3f`](https://github.com/ljharb/Object.entries/commit/7c1ea3f748fce028d95b4f4e87104725a3659aaa)
- [Dev Deps] update `tape`, `jscs`, `nsp`, `eslint`, `@ljharb/eslint-config` [`f9473c7`](https://github.com/ljharb/Object.entries/commit/f9473c7f49d894c5e6de116652aa39420889f549)
- [Dev Deps] update `jscs`, `nsp`, `eslint`, `@es-shims/api` [`1368a76`](https://github.com/ljharb/Object.entries/commit/1368a7680f0bb37063e006d81879623a6a8021cc)
- [Tests] up to `v5.6`, `v4.3` [`7ad9976`](https://github.com/ljharb/Object.entries/commit/7ad9976601f953997142d7a23fd7714345474f52)
- [Dev Deps] update `tape`, `jscs`, `nsp`, `eslint`, `@ljharb/eslint-config` [`6bf18dc`](https://github.com/ljharb/Object.entries/commit/6bf18dc431fbff454b4a3a0531450250aadbbc49)
- [Dev Deps] update `jscs`, `eslint`, `@ljharb/eslint-config` [`a45c239`](https://github.com/ljharb/Object.entries/commit/a45c239369a29305ea854e5a99ebaef3199e3dfa)
- [Dev Deps] update `tape`, `jscs`, `nsp`, `eslint`, `@ljharb/eslint-config` [`13f7d10`](https://github.com/ljharb/Object.entries/commit/13f7d10ddf5947d2b3c853edfd2a450498dd3694)
- [Tests] up to `node` `v5.9`, `v4.4` [`261533c`](https://github.com/ljharb/Object.entries/commit/261533c95bde27255ff86f9f20d4de958d48e860)
- [Dev Deps] update `jscs` [`8dd7b5f`](https://github.com/ljharb/Object.entries/commit/8dd7b5f169295af19b363ccccd39eeb8c25bb688)
- [Docs] update to reflect ES2017 inclusion. [`7662206`](https://github.com/ljharb/Object.entries/commit/7662206b05bd30f4851fd94eb6c27051601387eb)
- [Tests] use pretest/posttest for linting/security [`87d62ad`](https://github.com/ljharb/Object.entries/commit/87d62ad0fd1212bbb827a8be9a121906f4498835)
- [Tests] fix npm upgrades on older nodes [`67cabde`](https://github.com/ljharb/Object.entries/commit/67cabdeb4860c94a96c2075581260c5862dd3564)
- [Tests] up to `node` `v6.2` [`c50c154`](https://github.com/ljharb/Object.entries/commit/c50c154edb3acdc4741ef55df9e2d2cdae9a11d3)
- [Dev Deps] update `jscs`, `eslint`, `@ljharb/eslint-config` [`ff17ab8`](https://github.com/ljharb/Object.entries/commit/ff17ab8b5f27535b4f048afe6d7340319bb051cd)
- [Deps] update `es-abstract` [`b8be50a`](https://github.com/ljharb/Object.entries/commit/b8be50ab1beab650243dc4066d2e90ec755f79e9)
- [Deps] update `es-abstract` [`fb3a7e1`](https://github.com/ljharb/Object.entries/commit/fb3a7e192617e8247730818b6d6ff977304184b5)
- [Tests] on `node` `v5.12` [`ba624ca`](https://github.com/ljharb/Object.entries/commit/ba624caff1a2a722d17c495bd35d4b0994f4cc42)
- [Tests] on `node` `v5.10` [`e513ca5`](https://github.com/ljharb/Object.entries/commit/e513ca566d2ca3e39f0638e15cb1f126f82d14ca)
- [Deps] update `function-bind` [`6e25d29`](https://github.com/ljharb/Object.entries/commit/6e25d2992bf73908d6e544e8563997c81053f9e2)
- [Deps] update `es-abstract` [`bf680a4`](https://github.com/ljharb/Object.entries/commit/bf680a49bd7dccd98b58ab35b994306b199c3c94)
- [Deps] update `es-abstract` [`fbb209b`](https://github.com/ljharb/Object.entries/commit/fbb209b786bdd23d169b38c9dda1d2b38fae5e73)
- [Deps] update `define-properties` [`77d4ead`](https://github.com/ljharb/Object.entries/commit/77d4ead3e5f5f2877f5e3cba99cdd0e293089811)
- [Tests] on `node` `v4.2` [`d946594`](https://github.com/ljharb/Object.entries/commit/d946594e73f99a3896f89ce5e517effd7f9c8487)
- [Tests] on `node` `v5.0` [`80d7d16`](https://github.com/ljharb/Object.entries/commit/80d7d16f766d22bd9134d8bc5d796ef2e67d2239)
## [v1.0.3](https://github.com/ljharb/Object.entries/compare/v1.0.2...v1.0.3) - 2015-10-06
### Commits
- Add test case to cover non-enumerable keys made enumerable by a previous getter. [`5b53808`](https://github.com/ljharb/Object.entries/commit/5b53808de5c7af8070b398a7d23fcfa60713ba70)
- [Dev Deps] update `tape`, `eslint`, `@ljharb/eslint-config` [`1c3ddff`](https://github.com/ljharb/Object.entries/commit/1c3ddff43a0ad435ebd23cb09ade6ceec3e38f02)
- [Dev Deps] update `jscs`, `eslint` [`0a0f1be`](https://github.com/ljharb/Object.entries/commit/0a0f1be8d4cb060689e5e7e8a16a8de5a358b599)
- [Deps] update `es-abstract` [`8cacfdc`](https://github.com/ljharb/Object.entries/commit/8cacfdc380db1f73f7f4331c934119c8323f39a3)
## [v1.0.2](https://github.com/ljharb/Object.entries/compare/v1.0.1...v1.0.2) - 2015-09-25
### Fixed
- Not-yet-visited keys deleted on a [[Get]] must not show up in the output [`#1`](https://github.com/ljharb/Object.entries/issues/1)
## [v1.0.1](https://github.com/ljharb/Object.entries/compare/v1.0.0...v1.0.1) - 2015-09-21
### Commits
- [Tests] on `iojs` `v3.3`, up to `node` `v4.1` [`181f888`](https://github.com/ljharb/Object.entries/commit/181f888a24cc89e2e3fd5cf2b93abbbda204242f)
- [Dev Deps] update `eslint`, `@ljharb/eslint-config` [`e93536e`](https://github.com/ljharb/Object.entries/commit/e93536e3313967445764e27cd146800c18133060)
- Add es-shim API keyword [`51080c2`](https://github.com/ljharb/Object.entries/commit/51080c2c41f19567f1bda40d5dd00e7d8f177d64)
- [Docs] update version badge URL [`398a7e4`](https://github.com/ljharb/Object.entries/commit/398a7e4550eb37adf880013a735875a8986181da)
## v1.0.0 - 2015-09-02
### Commits
- Dotfiles [`3a59351`](https://github.com/ljharb/Object.entries/commit/3a59351792c3b06ffbb6f515198a35955a0a1124)
- Tests [`bd1ceae`](https://github.com/ljharb/Object.entries/commit/bd1ceae7b6e16381da6065513ce4373e0f15e0ad)
- package.json [`301832d`](https://github.com/ljharb/Object.entries/commit/301832d1fb1a688f879f7d06451062d2fea7671f)
- Read me [`d92e775`](https://github.com/ljharb/Object.entries/commit/d92e7756a80e0e3e2a32a1b6525b8d48ecd73391)
- Initial commit [`212a7ce`](https://github.com/ljharb/Object.entries/commit/212a7ce24ef0edbcc8c84d5d3338fe3a60ffa963)
- Implementation. [`8fd8aae`](https://github.com/ljharb/Object.entries/commit/8fd8aae302b1d25db118e5f127ff887e04f966c7)
- Clarifying tests that only Symbol *properties* are omitted. [`1b5cb92`](https://github.com/ljharb/Object.entries/commit/1b5cb92ae7edde17fb17971f961d157bef714c63)
@@ -0,0 +1,47 @@
Copyright JS Foundation and other contributors <https://js.foundation/>
Based on Underscore.js, copyright Jeremy Ashkenas,
DocumentCloud and Investigative Reporters & Editors <http://underscorejs.org/>
This software consists of voluntary contributions made by many
individuals. For exact contribution history, see the revision history
available at https://github.com/lodash/lodash
The following license applies to all parts of this software except as
documented below:
====
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.
====
Copyright and related rights for sample code are waived via CC0. Sample
code is defined as all source code displayed within the prose of the
documentation.
CC0: http://creativecommons.org/publicdomain/zero/1.0/
====
Files located in the node_modules and vendor directories are externally
maintained libraries used by this software which have their own
licenses; we recommend you read them, as their terms may differ from the
terms above.
@@ -0,0 +1,713 @@
import { cloneDeep, isEqual } from 'lodash-es';
import Delta, { AttributeMap } from 'quill-delta';
import { EmbedBlot, Scope, TextBlot } from 'parchment';
import Quill from '../core/quill.js';
import logger from '../core/logger.js';
import Module from '../core/module.js';
const debug = logger('quill:keyboard');
const SHORTKEY = /Mac/i.test(navigator.platform) ? 'metaKey' : 'ctrlKey';
class Keyboard extends Module {
static match(evt, binding) {
if (['altKey', 'ctrlKey', 'metaKey', 'shiftKey'].some(key => {
return !!binding[key] !== evt[key] && binding[key] !== null;
})) {
return false;
}
return binding.key === evt.key || binding.key === evt.which;
}
constructor(quill, options) {
super(quill, options);
this.bindings = {};
// @ts-expect-error Fix me later
Object.keys(this.options.bindings).forEach(name => {
// @ts-expect-error Fix me later
if (this.options.bindings[name]) {
// @ts-expect-error Fix me later
this.addBinding(this.options.bindings[name]);
}
});
this.addBinding({
key: 'Enter',
shiftKey: null
}, this.handleEnter);
this.addBinding({
key: 'Enter',
metaKey: null,
ctrlKey: null,
altKey: null
}, () => {});
if (/Firefox/i.test(navigator.userAgent)) {
// Need to handle delete and backspace for Firefox in the general case #1171
this.addBinding({
key: 'Backspace'
}, {
collapsed: true
}, this.handleBackspace);
this.addBinding({
key: 'Delete'
}, {
collapsed: true
}, this.handleDelete);
} else {
this.addBinding({
key: 'Backspace'
}, {
collapsed: true,
prefix: /^.?$/
}, this.handleBackspace);
this.addBinding({
key: 'Delete'
}, {
collapsed: true,
suffix: /^.?$/
}, this.handleDelete);
}
this.addBinding({
key: 'Backspace'
}, {
collapsed: false
}, this.handleDeleteRange);
this.addBinding({
key: 'Delete'
}, {
collapsed: false
}, this.handleDeleteRange);
this.addBinding({
key: 'Backspace',
altKey: null,
ctrlKey: null,
metaKey: null,
shiftKey: null
}, {
collapsed: true,
offset: 0
}, this.handleBackspace);
this.listen();
}
addBinding(keyBinding) {
let context = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
let handler = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
const binding = normalize(keyBinding);
if (binding == null) {
debug.warn('Attempted to add invalid keyboard binding', binding);
return;
}
if (typeof context === 'function') {
context = {
handler: context
};
}
if (typeof handler === 'function') {
handler = {
handler
};
}
const keys = Array.isArray(binding.key) ? binding.key : [binding.key];
keys.forEach(key => {
const singleBinding = {
...binding,
key,
...context,
...handler
};
this.bindings[singleBinding.key] = this.bindings[singleBinding.key] || [];
this.bindings[singleBinding.key].push(singleBinding);
});
}
listen() {
this.quill.root.addEventListener('keydown', evt => {
if (evt.defaultPrevented || evt.isComposing) return;
// evt.isComposing is false when pressing Enter/Backspace when composing in Safari
// https://bugs.webkit.org/show_bug.cgi?id=165004
const isComposing = evt.keyCode === 229 && (evt.key === 'Enter' || evt.key === 'Backspace');
if (isComposing) return;
const bindings = (this.bindings[evt.key] || []).concat(this.bindings[evt.which] || []);
const matches = bindings.filter(binding => Keyboard.match(evt, binding));
if (matches.length === 0) return;
// @ts-expect-error
const blot = Quill.find(evt.target, true);
if (blot && blot.scroll !== this.quill.scroll) return;
const range = this.quill.getSelection();
if (range == null || !this.quill.hasFocus()) return;
const [line, offset] = this.quill.getLine(range.index);
const [leafStart, offsetStart] = this.quill.getLeaf(range.index);
const [leafEnd, offsetEnd] = range.length === 0 ? [leafStart, offsetStart] : this.quill.getLeaf(range.index + range.length);
const prefixText = leafStart instanceof TextBlot ? leafStart.value().slice(0, offsetStart) : '';
const suffixText = leafEnd instanceof TextBlot ? leafEnd.value().slice(offsetEnd) : '';
const curContext = {
collapsed: range.length === 0,
// @ts-expect-error Fix me later
empty: range.length === 0 && line.length() <= 1,
format: this.quill.getFormat(range),
line,
offset,
prefix: prefixText,
suffix: suffixText,
event: evt
};
const prevented = matches.some(binding => {
if (binding.collapsed != null && binding.collapsed !== curContext.collapsed) {
return false;
}
if (binding.empty != null && binding.empty !== curContext.empty) {
return false;
}
if (binding.offset != null && binding.offset !== curContext.offset) {
return false;
}
if (Array.isArray(binding.format)) {
// any format is present
if (binding.format.every(name => curContext.format[name] == null)) {
return false;
}
} else if (typeof binding.format === 'object') {
// all formats must match
if (!Object.keys(binding.format).every(name => {
// @ts-expect-error Fix me later
if (binding.format[name] === true) return curContext.format[name] != null;
// @ts-expect-error Fix me later
if (binding.format[name] === false) return curContext.format[name] == null;
// @ts-expect-error Fix me later
return isEqual(binding.format[name], curContext.format[name]);
})) {
return false;
}
}
if (binding.prefix != null && !binding.prefix.test(curContext.prefix)) {
return false;
}
if (binding.suffix != null && !binding.suffix.test(curContext.suffix)) {
return false;
}
// @ts-expect-error Fix me later
return binding.handler.call(this, range, curContext, binding) !== true;
});
if (prevented) {
evt.preventDefault();
}
});
}
handleBackspace(range, context) {
// Check for astral symbols
const length = /[\uD800-\uDBFF][\uDC00-\uDFFF]$/.test(context.prefix) ? 2 : 1;
if (range.index === 0 || this.quill.getLength() <= 1) return;
let formats = {};
const [line] = this.quill.getLine(range.index);
let delta = new Delta().retain(range.index - length).delete(length);
if (context.offset === 0) {
// Always deleting newline here, length always 1
const [prev] = this.quill.getLine(range.index - 1);
if (prev) {
const isPrevLineEmpty = prev.statics.blotName === 'block' && prev.length() <= 1;
if (!isPrevLineEmpty) {
// @ts-expect-error Fix me later
const curFormats = line.formats();
const prevFormats = this.quill.getFormat(range.index - 1, 1);
formats = AttributeMap.diff(curFormats, prevFormats) || {};
if (Object.keys(formats).length > 0) {
// line.length() - 1 targets \n in line, another -1 for newline being deleted
const formatDelta = new Delta()
// @ts-expect-error Fix me later
.retain(range.index + line.length() - 2).retain(1, formats);
delta = delta.compose(formatDelta);
}
}
}
}
this.quill.updateContents(delta, Quill.sources.USER);
this.quill.focus();
}
handleDelete(range, context) {
// Check for astral symbols
const length = /^[\uD800-\uDBFF][\uDC00-\uDFFF]/.test(context.suffix) ? 2 : 1;
if (range.index >= this.quill.getLength() - length) return;
let formats = {};
const [line] = this.quill.getLine(range.index);
let delta = new Delta().retain(range.index).delete(length);
// @ts-expect-error Fix me later
if (context.offset >= line.length() - 1) {
const [next] = this.quill.getLine(range.index + 1);
if (next) {
// @ts-expect-error Fix me later
const curFormats = line.formats();
const nextFormats = this.quill.getFormat(range.index, 1);
formats = AttributeMap.diff(curFormats, nextFormats) || {};
if (Object.keys(formats).length > 0) {
delta = delta.retain(next.length() - 1).retain(1, formats);
}
}
}
this.quill.updateContents(delta, Quill.sources.USER);
this.quill.focus();
}
handleDeleteRange(range) {
deleteRange({
range,
quill: this.quill
});
this.quill.focus();
}
handleEnter(range, context) {
const lineFormats = Object.keys(context.format).reduce((formats, format) => {
if (this.quill.scroll.query(format, Scope.BLOCK) && !Array.isArray(context.format[format])) {
formats[format] = context.format[format];
}
return formats;
}, {});
const delta = new Delta().retain(range.index).delete(range.length).insert('\n', lineFormats);
this.quill.updateContents(delta, Quill.sources.USER);
this.quill.setSelection(range.index + 1, Quill.sources.SILENT);
this.quill.focus();
}
}
const defaultOptions = {
bindings: {
bold: makeFormatHandler('bold'),
italic: makeFormatHandler('italic'),
underline: makeFormatHandler('underline'),
indent: {
// highlight tab or tab at beginning of list, indent or blockquote
key: 'Tab',
format: ['blockquote', 'indent', 'list'],
handler(range, context) {
if (context.collapsed && context.offset !== 0) return true;
this.quill.format('indent', '+1', Quill.sources.USER);
return false;
}
},
outdent: {
key: 'Tab',
shiftKey: true,
format: ['blockquote', 'indent', 'list'],
// highlight tab or tab at beginning of list, indent or blockquote
handler(range, context) {
if (context.collapsed && context.offset !== 0) return true;
this.quill.format('indent', '-1', Quill.sources.USER);
return false;
}
},
'outdent backspace': {
key: 'Backspace',
collapsed: true,
shiftKey: null,
metaKey: null,
ctrlKey: null,
altKey: null,
format: ['indent', 'list'],
offset: 0,
handler(range, context) {
if (context.format.indent != null) {
this.quill.format('indent', '-1', Quill.sources.USER);
} else if (context.format.list != null) {
this.quill.format('list', false, Quill.sources.USER);
}
}
},
'indent code-block': makeCodeBlockHandler(true),
'outdent code-block': makeCodeBlockHandler(false),
'remove tab': {
key: 'Tab',
shiftKey: true,
collapsed: true,
prefix: /\t$/,
handler(range) {
this.quill.deleteText(range.index - 1, 1, Quill.sources.USER);
}
},
tab: {
key: 'Tab',
handler(range, context) {
if (context.format.table) return true;
this.quill.history.cutoff();
const delta = new Delta().retain(range.index).delete(range.length).insert('\t');
this.quill.updateContents(delta, Quill.sources.USER);
this.quill.history.cutoff();
this.quill.setSelection(range.index + 1, Quill.sources.SILENT);
return false;
}
},
'blockquote empty enter': {
key: 'Enter',
collapsed: true,
format: ['blockquote'],
empty: true,
handler() {
this.quill.format('blockquote', false, Quill.sources.USER);
}
},
'list empty enter': {
key: 'Enter',
collapsed: true,
format: ['list'],
empty: true,
handler(range, context) {
const formats = {
list: false
};
if (context.format.indent) {
formats.indent = false;
}
this.quill.formatLine(range.index, range.length, formats, Quill.sources.USER);
}
},
'checklist enter': {
key: 'Enter',
collapsed: true,
format: {
list: 'checked'
},
handler(range) {
const [line, offset] = this.quill.getLine(range.index);
const formats = {
// @ts-expect-error Fix me later
...line.formats(),
list: 'checked'
};
const delta = new Delta().retain(range.index).insert('\n', formats)
// @ts-expect-error Fix me later
.retain(line.length() - offset - 1).retain(1, {
list: 'unchecked'
});
this.quill.updateContents(delta, Quill.sources.USER);
this.quill.setSelection(range.index + 1, Quill.sources.SILENT);
this.quill.scrollSelectionIntoView();
}
},
'header enter': {
key: 'Enter',
collapsed: true,
format: ['header'],
suffix: /^$/,
handler(range, context) {
const [line, offset] = this.quill.getLine(range.index);
const delta = new Delta().retain(range.index).insert('\n', context.format)
// @ts-expect-error Fix me later
.retain(line.length() - offset - 1).retain(1, {
header: null
});
this.quill.updateContents(delta, Quill.sources.USER);
this.quill.setSelection(range.index + 1, Quill.sources.SILENT);
this.quill.scrollSelectionIntoView();
}
},
'table backspace': {
key: 'Backspace',
format: ['table'],
collapsed: true,
offset: 0,
handler() {}
},
'table delete': {
key: 'Delete',
format: ['table'],
collapsed: true,
suffix: /^$/,
handler() {}
},
'table enter': {
key: 'Enter',
shiftKey: null,
format: ['table'],
handler(range) {
const module = this.quill.getModule('table');
if (module) {
// @ts-expect-error
const [table, row, cell, offset] = module.getTable(range);
const shift = tableSide(table, row, cell, offset);
if (shift == null) return;
let index = table.offset();
if (shift < 0) {
const delta = new Delta().retain(index).insert('\n');
this.quill.updateContents(delta, Quill.sources.USER);
this.quill.setSelection(range.index + 1, range.length, Quill.sources.SILENT);
} else if (shift > 0) {
index += table.length();
const delta = new Delta().retain(index).insert('\n');
this.quill.updateContents(delta, Quill.sources.USER);
this.quill.setSelection(index, Quill.sources.USER);
}
}
}
},
'table tab': {
key: 'Tab',
shiftKey: null,
format: ['table'],
handler(range, context) {
const {
event,
line: cell
} = context;
const offset = cell.offset(this.quill.scroll);
if (event.shiftKey) {
this.quill.setSelection(offset - 1, Quill.sources.USER);
} else {
this.quill.setSelection(offset + cell.length(), Quill.sources.USER);
}
}
},
'list autofill': {
key: ' ',
shiftKey: null,
collapsed: true,
format: {
'code-block': false,
blockquote: false,
table: false
},
prefix: /^\s*?(\d+\.|-|\*|\[ ?\]|\[x\])$/,
handler(range, context) {
if (this.quill.scroll.query('list') == null) return true;
const {
length
} = context.prefix;
const [line, offset] = this.quill.getLine(range.index);
if (offset > length) return true;
let value;
switch (context.prefix.trim()) {
case '[]':
case '[ ]':
value = 'unchecked';
break;
case '[x]':
value = 'checked';
break;
case '-':
case '*':
value = 'bullet';
break;
default:
value = 'ordered';
}
this.quill.insertText(range.index, ' ', Quill.sources.USER);
this.quill.history.cutoff();
const delta = new Delta().retain(range.index - offset).delete(length + 1)
// @ts-expect-error Fix me later
.retain(line.length() - 2 - offset).retain(1, {
list: value
});
this.quill.updateContents(delta, Quill.sources.USER);
this.quill.history.cutoff();
this.quill.setSelection(range.index - length, Quill.sources.SILENT);
return false;
}
},
'code exit': {
key: 'Enter',
collapsed: true,
format: ['code-block'],
prefix: /^$/,
suffix: /^\s*$/,
handler(range) {
const [line, offset] = this.quill.getLine(range.index);
let numLines = 2;
let cur = line;
while (cur != null && cur.length() <= 1 && cur.formats()['code-block']) {
// @ts-expect-error
cur = cur.prev;
numLines -= 1;
// Requisite prev lines are empty
if (numLines <= 0) {
const delta = new Delta()
// @ts-expect-error Fix me later
.retain(range.index + line.length() - offset - 2).retain(1, {
'code-block': null
}).delete(1);
this.quill.updateContents(delta, Quill.sources.USER);
this.quill.setSelection(range.index - 1, Quill.sources.SILENT);
return false;
}
}
return true;
}
},
'embed left': makeEmbedArrowHandler('ArrowLeft', false),
'embed left shift': makeEmbedArrowHandler('ArrowLeft', true),
'embed right': makeEmbedArrowHandler('ArrowRight', false),
'embed right shift': makeEmbedArrowHandler('ArrowRight', true),
'table down': makeTableArrowHandler(false),
'table up': makeTableArrowHandler(true)
}
};
Keyboard.DEFAULTS = defaultOptions;
function makeCodeBlockHandler(indent) {
return {
key: 'Tab',
shiftKey: !indent,
format: {
'code-block': true
},
handler(range, _ref) {
let {
event
} = _ref;
const CodeBlock = this.quill.scroll.query('code-block');
// @ts-expect-error
const {
TAB
} = CodeBlock;
if (range.length === 0 && !event.shiftKey) {
this.quill.insertText(range.index, TAB, Quill.sources.USER);
this.quill.setSelection(range.index + TAB.length, Quill.sources.SILENT);
return;
}
const lines = range.length === 0 ? this.quill.getLines(range.index, 1) : this.quill.getLines(range);
let {
index,
length
} = range;
lines.forEach((line, i) => {
if (indent) {
line.insertAt(0, TAB);
if (i === 0) {
index += TAB.length;
} else {
length += TAB.length;
}
// @ts-expect-error Fix me later
} else if (line.domNode.textContent.startsWith(TAB)) {
line.deleteAt(0, TAB.length);
if (i === 0) {
index -= TAB.length;
} else {
length -= TAB.length;
}
}
});
this.quill.update(Quill.sources.USER);
this.quill.setSelection(index, length, Quill.sources.SILENT);
}
};
}
function makeEmbedArrowHandler(key, shiftKey) {
const where = key === 'ArrowLeft' ? 'prefix' : 'suffix';
return {
key,
shiftKey,
altKey: null,
[where]: /^$/,
handler(range) {
let {
index
} = range;
if (key === 'ArrowRight') {
index += range.length + 1;
}
const [leaf] = this.quill.getLeaf(index);
if (!(leaf instanceof EmbedBlot)) return true;
if (key === 'ArrowLeft') {
if (shiftKey) {
this.quill.setSelection(range.index - 1, range.length + 1, Quill.sources.USER);
} else {
this.quill.setSelection(range.index - 1, Quill.sources.USER);
}
} else if (shiftKey) {
this.quill.setSelection(range.index, range.length + 1, Quill.sources.USER);
} else {
this.quill.setSelection(range.index + range.length + 1, Quill.sources.USER);
}
return false;
}
};
}
function makeFormatHandler(format) {
return {
key: format[0],
shortKey: true,
handler(range, context) {
this.quill.format(format, !context.format[format], Quill.sources.USER);
}
};
}
function makeTableArrowHandler(up) {
return {
key: up ? 'ArrowUp' : 'ArrowDown',
collapsed: true,
format: ['table'],
handler(range, context) {
// TODO move to table module
const key = up ? 'prev' : 'next';
const cell = context.line;
const targetRow = cell.parent[key];
if (targetRow != null) {
if (targetRow.statics.blotName === 'table-row') {
// @ts-expect-error
let targetCell = targetRow.children.head;
let cur = cell;
while (cur.prev != null) {
// @ts-expect-error
cur = cur.prev;
targetCell = targetCell.next;
}
const index = targetCell.offset(this.quill.scroll) + Math.min(context.offset, targetCell.length() - 1);
this.quill.setSelection(index, 0, Quill.sources.USER);
}
} else {
// @ts-expect-error
const targetLine = cell.table()[key];
if (targetLine != null) {
if (up) {
this.quill.setSelection(targetLine.offset(this.quill.scroll) + targetLine.length() - 1, 0, Quill.sources.USER);
} else {
this.quill.setSelection(targetLine.offset(this.quill.scroll), 0, Quill.sources.USER);
}
}
}
return false;
}
};
}
function normalize(binding) {
if (typeof binding === 'string' || typeof binding === 'number') {
binding = {
key: binding
};
} else if (typeof binding === 'object') {
binding = cloneDeep(binding);
} else {
return null;
}
if (binding.shortKey) {
binding[SHORTKEY] = binding.shortKey;
delete binding.shortKey;
}
return binding;
}
// TODO: Move into quill.ts or editor.ts
function deleteRange(_ref2) {
let {
quill,
range
} = _ref2;
const lines = quill.getLines(range);
let formats = {};
if (lines.length > 1) {
const firstFormats = lines[0].formats();
const lastFormats = lines[lines.length - 1].formats();
formats = AttributeMap.diff(lastFormats, firstFormats) || {};
}
quill.deleteText(range, Quill.sources.USER);
if (Object.keys(formats).length > 0) {
quill.formatLine(range.index, 1, formats, Quill.sources.USER);
}
quill.setSelection(range.index, Quill.sources.SILENT);
}
function tableSide(_table, row, cell, offset) {
if (row.prev == null && row.next == null) {
if (cell.prev == null && cell.next == null) {
return offset === 0 ? -1 : 1;
}
return cell.prev == null ? -1 : 1;
}
if (row.prev == null) {
return -1;
}
if (row.next == null) {
return 1;
}
return null;
}
export { Keyboard as default, SHORTKEY, normalize, deleteRange };
//# sourceMappingURL=keyboard.js.map
@@ -0,0 +1,180 @@
'use strict';
var _Object$setPrototypeO;
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
var finished = require('./end-of-stream');
var kLastResolve = Symbol('lastResolve');
var kLastReject = Symbol('lastReject');
var kError = Symbol('error');
var kEnded = Symbol('ended');
var kLastPromise = Symbol('lastPromise');
var kHandlePromise = Symbol('handlePromise');
var kStream = Symbol('stream');
function createIterResult(value, done) {
return {
value: value,
done: done
};
}
function readAndResolve(iter) {
var resolve = iter[kLastResolve];
if (resolve !== null) {
var data = iter[kStream].read();
// we defer if data is null
// we can be expecting either 'end' or
// 'error'
if (data !== null) {
iter[kLastPromise] = null;
iter[kLastResolve] = null;
iter[kLastReject] = null;
resolve(createIterResult(data, false));
}
}
}
function onReadable(iter) {
// we wait for the next tick, because it might
// emit an error with process.nextTick
process.nextTick(readAndResolve, iter);
}
function wrapForNext(lastPromise, iter) {
return function (resolve, reject) {
lastPromise.then(function () {
if (iter[kEnded]) {
resolve(createIterResult(undefined, true));
return;
}
iter[kHandlePromise](resolve, reject);
}, reject);
};
}
var AsyncIteratorPrototype = Object.getPrototypeOf(function () {});
var ReadableStreamAsyncIteratorPrototype = Object.setPrototypeOf((_Object$setPrototypeO = {
get stream() {
return this[kStream];
},
next: function next() {
var _this = this;
// if we have detected an error in the meanwhile
// reject straight away
var error = this[kError];
if (error !== null) {
return Promise.reject(error);
}
if (this[kEnded]) {
return Promise.resolve(createIterResult(undefined, true));
}
if (this[kStream].destroyed) {
// We need to defer via nextTick because if .destroy(err) is
// called, the error will be emitted via nextTick, and
// we cannot guarantee that there is no error lingering around
// waiting to be emitted.
return new Promise(function (resolve, reject) {
process.nextTick(function () {
if (_this[kError]) {
reject(_this[kError]);
} else {
resolve(createIterResult(undefined, true));
}
});
});
}
// if we have multiple next() calls
// we will wait for the previous Promise to finish
// this logic is optimized to support for await loops,
// where next() is only called once at a time
var lastPromise = this[kLastPromise];
var promise;
if (lastPromise) {
promise = new Promise(wrapForNext(lastPromise, this));
} else {
// fast path needed to support multiple this.push()
// without triggering the next() queue
var data = this[kStream].read();
if (data !== null) {
return Promise.resolve(createIterResult(data, false));
}
promise = new Promise(this[kHandlePromise]);
}
this[kLastPromise] = promise;
return promise;
}
}, _defineProperty(_Object$setPrototypeO, Symbol.asyncIterator, function () {
return this;
}), _defineProperty(_Object$setPrototypeO, "return", function _return() {
var _this2 = this;
// destroy(err, cb) is a private API
// we can guarantee we have that here, because we control the
// Readable class this is attached to
return new Promise(function (resolve, reject) {
_this2[kStream].destroy(null, function (err) {
if (err) {
reject(err);
return;
}
resolve(createIterResult(undefined, true));
});
});
}), _Object$setPrototypeO), AsyncIteratorPrototype);
var createReadableStreamAsyncIterator = function createReadableStreamAsyncIterator(stream) {
var _Object$create;
var iterator = Object.create(ReadableStreamAsyncIteratorPrototype, (_Object$create = {}, _defineProperty(_Object$create, kStream, {
value: stream,
writable: true
}), _defineProperty(_Object$create, kLastResolve, {
value: null,
writable: true
}), _defineProperty(_Object$create, kLastReject, {
value: null,
writable: true
}), _defineProperty(_Object$create, kError, {
value: null,
writable: true
}), _defineProperty(_Object$create, kEnded, {
value: stream._readableState.endEmitted,
writable: true
}), _defineProperty(_Object$create, kHandlePromise, {
value: function value(resolve, reject) {
var data = iterator[kStream].read();
if (data) {
iterator[kLastPromise] = null;
iterator[kLastResolve] = null;
iterator[kLastReject] = null;
resolve(createIterResult(data, false));
} else {
iterator[kLastResolve] = resolve;
iterator[kLastReject] = reject;
}
},
writable: true
}), _Object$create));
iterator[kLastPromise] = null;
finished(stream, function (err) {
if (err && err.code !== 'ERR_STREAM_PREMATURE_CLOSE') {
var reject = iterator[kLastReject];
// reject if we are waiting for data in the Promise
// returned by next() and store the error
if (reject !== null) {
iterator[kLastPromise] = null;
iterator[kLastResolve] = null;
iterator[kLastReject] = null;
reject(err);
}
iterator[kError] = err;
return;
}
var resolve = iterator[kLastResolve];
if (resolve !== null) {
iterator[kLastPromise] = null;
iterator[kLastResolve] = null;
iterator[kLastReject] = null;
resolve(createIterResult(undefined, true));
}
iterator[kEnded] = true;
});
stream.on('readable', onReadable.bind(null, iterator));
return iterator;
};
module.exports = createReadableStreamAsyncIterator;
@@ -0,0 +1,25 @@
'use strict';
var $TypeError = require('es-errors/type');
var hasOwn = require('hasown');
var isPropertyDescriptor = require('../helpers/records/property-descriptor');
// https://262.ecma-international.org/5.1/#sec-8.10.2
module.exports = function IsDataDescriptor(Desc) {
if (typeof Desc === 'undefined') {
return false;
}
if (!isPropertyDescriptor(Desc)) {
throw new $TypeError('Assertion failed: `Desc` must be a Property Descriptor');
}
if (!hasOwn(Desc, '[[Value]]') && !hasOwn(Desc, '[[Writable]]')) {
return false;
}
return true;
};
@@ -0,0 +1,194 @@
export { parseAst, parseAstAsync } from 'rollup/parseAst';
import { a as arraify, i as isInNodeModules, D as DevEnvironment } from './chunks/dep-D4NMHUTW.js';
export { B as BuildEnvironment, f as build, m as buildErrorMessage, g as createBuilder, F as createFilter, h as createIdResolver, I as createLogger, n as createRunnableDevEnvironment, c as createServer, y as createServerHotChannel, w as createServerModuleRunner, x as createServerModuleRunnerTransport, d as defineConfig, v as fetchModule, j as formatPostcssSourceMap, L as isFileLoadingAllowed, K as isFileServingAllowed, q as isRunnableDevEnvironment, l as loadConfigFromFile, M as loadEnv, E as mergeAlias, C as mergeConfig, z as moduleRunnerTransform, A as normalizePath, o as optimizeDeps, p as perEnvironmentPlugin, b as perEnvironmentState, k as preprocessCSS, e as preview, r as resolveConfig, N as resolveEnvPrefix, G as rollupVersion, u as runnerImport, J as searchForWorkspaceRoot, H as send, s as sortUserPlugins, t as transformWithEsbuild } from './chunks/dep-D4NMHUTW.js';
export { defaultAllowedOrigins, DEFAULT_CLIENT_CONDITIONS as defaultClientConditions, DEFAULT_CLIENT_MAIN_FIELDS as defaultClientMainFields, DEFAULT_SERVER_CONDITIONS as defaultServerConditions, DEFAULT_SERVER_MAIN_FIELDS as defaultServerMainFields, VERSION as version } from './constants.js';
export { version as esbuildVersion } from 'esbuild';
import 'node:fs';
import 'node:path';
import 'node:fs/promises';
import 'node:url';
import 'node:util';
import 'node:perf_hooks';
import 'node:module';
import 'node:crypto';
import 'picomatch';
import 'path';
import 'fs';
import 'fdir';
import 'node:child_process';
import 'node:http';
import 'node:https';
import 'tty';
import 'util';
import 'net';
import 'events';
import 'url';
import 'http';
import 'stream';
import 'os';
import 'child_process';
import 'node:os';
import 'node:net';
import 'node:dns';
import 'vite/module-runner';
import 'node:buffer';
import 'module';
import 'node:readline';
import 'node:process';
import 'node:events';
import 'tinyglobby';
import 'crypto';
import 'node:assert';
import 'node:v8';
import 'node:worker_threads';
import 'https';
import 'tls';
import 'zlib';
import 'buffer';
import 'assert';
import 'node:querystring';
import 'node:zlib';
const CSS_LANGS_RE = (
// eslint-disable-next-line regexp/no-unused-capturing-group
/\.(css|less|sass|scss|styl|stylus|pcss|postcss|sss)(?:$|\?)/
);
const isCSSRequest = (request) => CSS_LANGS_RE.test(request);
class SplitVendorChunkCache {
cache;
constructor() {
this.cache = /* @__PURE__ */ new Map();
}
reset() {
this.cache = /* @__PURE__ */ new Map();
}
}
function splitVendorChunk(options = {}) {
const cache = options.cache ?? new SplitVendorChunkCache();
return (id, { getModuleInfo }) => {
if (isInNodeModules(id) && !isCSSRequest(id) && staticImportedByEntry(id, getModuleInfo, cache.cache)) {
return "vendor";
}
};
}
function staticImportedByEntry(id, getModuleInfo, cache, importStack = []) {
if (cache.has(id)) {
return cache.get(id);
}
if (importStack.includes(id)) {
cache.set(id, false);
return false;
}
const mod = getModuleInfo(id);
if (!mod) {
cache.set(id, false);
return false;
}
if (mod.isEntry) {
cache.set(id, true);
return true;
}
const someImporterIs = mod.importers.some(
(importer) => staticImportedByEntry(
importer,
getModuleInfo,
cache,
importStack.concat(id)
)
);
cache.set(id, someImporterIs);
return someImporterIs;
}
function splitVendorChunkPlugin() {
const caches = [];
function createSplitVendorChunk(output, config) {
const cache = new SplitVendorChunkCache();
caches.push(cache);
const build = config.build ?? {};
const format = output.format;
if (!build.ssr && !build.lib && format !== "umd" && format !== "iife") {
return splitVendorChunk({ cache });
}
}
return {
name: "vite:split-vendor-chunk",
config(config) {
let outputs = config.build?.rollupOptions?.output;
if (outputs) {
outputs = arraify(outputs);
for (const output of outputs) {
const viteManualChunks = createSplitVendorChunk(output, config);
if (viteManualChunks) {
if (output.manualChunks) {
if (typeof output.manualChunks === "function") {
const userManualChunks = output.manualChunks;
output.manualChunks = (id, api) => {
return userManualChunks(id, api) ?? viteManualChunks(id, api);
};
} else {
console.warn(
"(!) the `splitVendorChunk` plugin doesn't have any effect when using the object form of `build.rollupOptions.output.manualChunks`. Consider using the function form instead."
);
}
} else {
output.manualChunks = viteManualChunks;
}
}
}
} else {
return {
build: {
rollupOptions: {
output: {
manualChunks: createSplitVendorChunk({}, config)
}
}
}
};
}
},
buildStart() {
caches.forEach((cache) => cache.reset());
}
};
}
function createFetchableDevEnvironment(name, config, context) {
if (typeof Request === "undefined" || typeof Response === "undefined") {
throw new TypeError(
"FetchableDevEnvironment requires a global `Request` and `Response` object."
);
}
if (!context.handleRequest) {
throw new TypeError(
"FetchableDevEnvironment requires a `handleRequest` method during initialisation."
);
}
return new FetchableDevEnvironment(name, config, context);
}
function isFetchableDevEnvironment(environment) {
return environment instanceof FetchableDevEnvironment;
}
class FetchableDevEnvironment extends DevEnvironment {
_handleRequest;
constructor(name, config, context) {
super(name, config, context);
this._handleRequest = context.handleRequest;
}
async dispatchFetch(request) {
if (!(request instanceof Request)) {
throw new TypeError(
"FetchableDevEnvironment `dispatchFetch` must receive a `Request` object."
);
}
const response = await this._handleRequest(request);
if (!(response instanceof Response)) {
throw new TypeError(
"FetchableDevEnvironment `context.handleRequest` must return a `Response` object."
);
}
return response;
}
}
export { DevEnvironment, createFetchableDevEnvironment, isCSSRequest, isFetchableDevEnvironment, splitVendorChunk, splitVendorChunkPlugin };
@@ -0,0 +1,10 @@
import constructor from "../types/constructor";
import { InjectionToken } from "../providers";
import Lifecycle from "../types/lifecycle";
/**
* Class decorator factory that registers the class as a scoped dependency within
* the global container.
*
* @return The class decorator
*/
export default function scoped<T>(lifecycle: Lifecycle.ContainerScoped | Lifecycle.ResolutionScoped, token?: InjectionToken<T>): (target: constructor<T>) => void;
@@ -0,0 +1,40 @@
import { OneBotAction } from '../../action/OneBotAction';
import { Static } from '@sinclair/typebox';
declare const PayloadSchema: import("@sinclair/typebox").TObject<{
group_id: import("@sinclair/typebox").TString;
folder_id: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
folder: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
file_count: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TNumber, import("@sinclair/typebox").TString]>;
}>;
type PayloadType = Static<typeof PayloadSchema>;
declare const ReturnSchema: import("@sinclair/typebox").TObject<{
files: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TUnknown>;
folders: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TUnknown>;
}>;
type ReturnType = Static<typeof ReturnSchema>;
export declare class GetGroupFilesByFolder extends OneBotAction<PayloadType, ReturnType> {
actionName: "get_group_files_by_folder";
payloadSchema: import("@sinclair/typebox").TObject<{
group_id: import("@sinclair/typebox").TString;
folder_id: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
folder: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
file_count: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TNumber, import("@sinclair/typebox").TString]>;
}>;
returnSchema: import("@sinclair/typebox").TObject<{
files: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TUnknown>;
folders: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TUnknown>;
}>;
actionSummary: string;
actionDescription: string;
actionTags: string[];
payloadExample: {
group_id: string;
folder_id: string;
};
returnExample: {
files: never[];
folders: never[];
};
_handle(payload: PayloadType): Promise<ReturnType>;
}
export {};
@@ -0,0 +1,7 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.buildEmptySetMetadata = buildEmptySetMetadata;
function buildEmptySetMetadata() {
return new Set();
}
//# sourceMappingURL=buildEmptySetMetadata.js.map
@@ -0,0 +1,7 @@
export default {
input: "src/index.js",
output: {
file: "dist/index.cjs",
format: "cjs"
}
}
@@ -0,0 +1,32 @@
var $a3ce5bb3074610af$exports = require("./useListBox.main.js");
var $c164f9f79f4cef2d$exports = require("./useOption.main.js");
var $f32afd5f225c3320$exports = require("./useListBoxSection.main.js");
var $87beb89ab4a308fd$exports = require("./utils.main.js");
function $parcel$export(e, n, v, s) {
Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
}
$parcel$export(module.exports, "useListBox", () => $a3ce5bb3074610af$exports.useListBox);
$parcel$export(module.exports, "useOption", () => $c164f9f79f4cef2d$exports.useOption);
$parcel$export(module.exports, "useListBoxSection", () => $f32afd5f225c3320$exports.useListBoxSection);
$parcel$export(module.exports, "listData", () => $87beb89ab4a308fd$exports.listData);
$parcel$export(module.exports, "getItemId", () => $87beb89ab4a308fd$exports.getItemId);
/*
* 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.
*/
//# sourceMappingURL=main.js.map
@@ -0,0 +1,73 @@
{
"name": "@heroui/accordion",
"version": "2.2.24",
"description": "Collapse display a list of high-level options that can expand/collapse to reveal more information.",
"keywords": [
"react",
"accordion",
"collapse",
"display",
"list",
"expand",
"tree view"
],
"author": "HeroUI <support@heroui.com>",
"homepage": "https://heroui.com",
"license": "MIT",
"main": "dist/index.js",
"sideEffects": false,
"files": [
"dist"
],
"publishConfig": {
"access": "public"
},
"repository": {
"type": "git",
"url": "git+https://github.com/heroui-inc/heroui.git",
"directory": "packages/components/accordion"
},
"bugs": {
"url": "https://github.com/heroui-inc/heroui/issues"
},
"peerDependencies": {
"react": ">=18 || >=19.0.0-rc.0",
"react-dom": ">=18 || >=19.0.0-rc.0",
"framer-motion": ">=11.5.6 || >=12.0.0-alpha.1",
"@heroui/theme": ">=2.4.17",
"@heroui/system": ">=2.4.18"
},
"dependencies": {
"@react-aria/interactions": "3.25.6",
"@react-aria/focus": "3.21.2",
"@react-stately/tree": "3.9.3",
"@react-types/accordion": "3.0.0-alpha.26",
"@react-types/shared": "3.32.1",
"@heroui/aria-utils": "2.2.24",
"@heroui/shared-icons": "2.1.10",
"@heroui/react-utils": "2.1.14",
"@heroui/shared-utils": "2.1.12",
"@heroui/framer-utils": "2.1.23",
"@heroui/divider": "2.2.20",
"@heroui/use-aria-accordion": "2.2.18",
"@heroui/dom-animation": "2.1.10"
},
"clean-package": "../../../clean-package.config.json",
"module": "dist/index.mjs",
"types": "dist/index.d.ts",
"exports": {
".": {
"types": "./dist/index.d.ts",
"import": "./dist/index.mjs",
"require": "./dist/index.js"
},
"./package.json": "./package.json"
},
"scripts": {
"build": "tsup src --dts",
"build:fast": "tsup src",
"dev": "pnpm build:fast --watch",
"clean": "rimraf dist .turbo",
"typecheck": "tsc --noEmit"
}
}
@@ -0,0 +1,14 @@
'use strict';
/**
* Logs out a message if there is no format option set.
* @param {string} message - Message to log.
*/
function log(message) {
if (!/=-(f|-format)=/.test(process.argv.join('='))) {
// eslint-disable-next-line no-console
console.log(message);
}
}
module.exports = log;
@@ -0,0 +1,75 @@
import {CalendarDate as $35ea8db9cb2ccb90$export$99faa760c7908e4f} from "./CalendarDate.module.js";
import {fromExtendedYear as $3b62074eb05584b2$export$4475b7e617eb123c, getExtendedYear as $3b62074eb05584b2$export$c36e0ecb2d4fa69d, GregorianCalendar as $3b62074eb05584b2$export$80ee6245ec4f29ec} from "./GregorianCalendar.module.js";
/*
* Copyright 2020 Adobe. All rights reserved.
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. You may obtain a copy
* of the License at http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
* OF ANY KIND, either express or implied. See the License for the specific language
* governing permissions and limitations under the License.
*/ // Portions of the code in this file are based on code from ICU.
// Original licensing can be found in the NOTICE file in the root directory of this source tree.
const $5f31bd6f0c8940b2$var$TAIWAN_ERA_START = 1911;
function $5f31bd6f0c8940b2$var$gregorianYear(date) {
return date.era === 'minguo' ? date.year + $5f31bd6f0c8940b2$var$TAIWAN_ERA_START : 1 - date.year + $5f31bd6f0c8940b2$var$TAIWAN_ERA_START;
}
function $5f31bd6f0c8940b2$var$gregorianToTaiwan(year) {
let y = year - $5f31bd6f0c8940b2$var$TAIWAN_ERA_START;
if (y > 0) return [
'minguo',
y
];
else return [
'before_minguo',
1 - y
];
}
class $5f31bd6f0c8940b2$export$65e01080afcb0799 extends (0, $3b62074eb05584b2$export$80ee6245ec4f29ec) {
fromJulianDay(jd) {
let date = super.fromJulianDay(jd);
let extendedYear = (0, $3b62074eb05584b2$export$c36e0ecb2d4fa69d)(date.era, date.year);
let [era, year] = $5f31bd6f0c8940b2$var$gregorianToTaiwan(extendedYear);
return new (0, $35ea8db9cb2ccb90$export$99faa760c7908e4f)(this, era, year, date.month, date.day);
}
toJulianDay(date) {
return super.toJulianDay($5f31bd6f0c8940b2$var$toGregorian(date));
}
getEras() {
return [
'before_minguo',
'minguo'
];
}
balanceDate(date) {
let [era, year] = $5f31bd6f0c8940b2$var$gregorianToTaiwan($5f31bd6f0c8940b2$var$gregorianYear(date));
date.era = era;
date.year = year;
}
isInverseEra(date) {
return date.era === 'before_minguo';
}
getDaysInMonth(date) {
return super.getDaysInMonth($5f31bd6f0c8940b2$var$toGregorian(date));
}
getYearsInEra(date) {
return date.era === 'before_minguo' ? 9999 : 9999 - $5f31bd6f0c8940b2$var$TAIWAN_ERA_START;
}
constructor(...args){
super(...args), this.identifier = 'roc' // Republic of China
;
}
}
function $5f31bd6f0c8940b2$var$toGregorian(date) {
let [era, year] = (0, $3b62074eb05584b2$export$4475b7e617eb123c)($5f31bd6f0c8940b2$var$gregorianYear(date));
return new (0, $35ea8db9cb2ccb90$export$99faa760c7908e4f)(era, year, date.month, date.day);
}
export {$5f31bd6f0c8940b2$export$65e01080afcb0799 as TaiwanCalendar};
//# sourceMappingURL=TaiwanCalendar.module.js.map
@@ -0,0 +1,52 @@
'use strict';
var errcode = require('err-code');
var retry = require('retry');
var hasOwn = Object.prototype.hasOwnProperty;
function isRetryError(err) {
return err && err.code === 'EPROMISERETRY' && hasOwn.call(err, 'retried');
}
function promiseRetry(fn, options) {
var temp;
var operation;
if (typeof fn === 'object' && typeof options === 'function') {
// Swap options and fn when using alternate signature (options, fn)
temp = options;
options = fn;
fn = temp;
}
operation = retry.operation(options);
return new Promise(function (resolve, reject) {
operation.attempt(function (number) {
Promise.resolve()
.then(function () {
return fn(function (err) {
if (isRetryError(err)) {
err = err.retried;
}
throw errcode(new Error('Retrying'), 'EPROMISERETRY', { retried: err });
}, number);
})
.then(resolve, function (err) {
if (isRetryError(err)) {
err = err.retried;
if (operation.retry(err || new Error())) {
return;
}
}
reject(err);
});
});
});
}
module.exports = promiseRetry;
@@ -0,0 +1,3 @@
# @react-aria/grid
This package is part of [react-spectrum](https://github.com/adobe/react-spectrum). See the repo for more details.
@@ -0,0 +1,15 @@
The ISC License
Copyright (c) 2010-2023 Isaac Z. Schlueter and Contributors
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
@@ -0,0 +1,109 @@
# dom-serializer [![Build Status](https://travis-ci.com/cheeriojs/dom-serializer.svg?branch=master)](https://travis-ci.com/cheeriojs/dom-serializer)
Renders a [domhandler](https://github.com/fb55/domhandler) DOM node or an array of domhandler DOM nodes to a string.
```js
import render from "dom-serializer";
// OR
const render = require("dom-serializer").default;
```
# API
## `render`
▸ **render**(`node`: Node \| Node[], `options?`: [_Options_](#Options)): _string_
Renders a DOM node or an array of DOM nodes to a string.
Can be thought of as the equivalent of the `outerHTML` of the passed node(s).
#### Parameters:
| Name | Type | Default value | Description |
| :-------- | :--------------------------------- | :------------ | :----------------------------- |
| `node` | Node \| Node[] | - | Node to be rendered. |
| `options` | [_DomSerializerOptions_](#Options) | {} | Changes serialization behavior |
**Returns:** _string_
## Options
### `encodeEntities`
• `Optional` **decodeEntities**: _boolean | "utf8"_
Encode characters that are either reserved in HTML or XML.
If `xmlMode` is `true` or the value not `'utf8'`, characters outside of the utf8 range will be encoded as well.
**`default`** `decodeEntities`
---
### `decodeEntities`
• `Optional` **decodeEntities**: _boolean_
Option inherited from parsing; will be used as the default value for `encodeEntities`.
**`default`** true
---
### `emptyAttrs`
• `Optional` **emptyAttrs**: _boolean_
Print an empty attribute's value.
**`default`** xmlMode
**`example`** With <code>emptyAttrs: false</code>: <code>&lt;input checked&gt;</code>
**`example`** With <code>emptyAttrs: true</code>: <code>&lt;input checked=""&gt;</code>
---
### `selfClosingTags`
• `Optional` **selfClosingTags**: _boolean_
Print self-closing tags for tags without contents.
**`default`** xmlMode
**`example`** With <code>selfClosingTags: false</code>: <code>&lt;foo&gt;&lt;/foo&gt;</code>
**`example`** With <code>selfClosingTags: true</code>: <code>&lt;foo /&gt;</code>
---
### `xmlMode`
• `Optional` **xmlMode**: _boolean_ \| _"foreign"_
Treat the input as an XML document; enables the `emptyAttrs` and `selfClosingTags` options.
If the value is `"foreign"`, it will try to correct mixed-case attribute names.
**`default`** false
---
## Ecosystem
| Name | Description |
| ------------------------------------------------------------- | ------------------------------------------------------- |
| [htmlparser2](https://github.com/fb55/htmlparser2) | Fast & forgiving HTML/XML parser |
| [domhandler](https://github.com/fb55/domhandler) | Handler for htmlparser2 that turns documents into a DOM |
| [domutils](https://github.com/fb55/domutils) | Utilities for working with domhandler's DOM |
| [css-select](https://github.com/fb55/css-select) | CSS selector engine, compatible with domhandler's DOM |
| [cheerio](https://github.com/cheeriojs/cheerio) | The jQuery API for domhandler's DOM |
| [dom-serializer](https://github.com/cheeriojs/dom-serializer) | Serializer for domhandler's DOM |
---
LICENSE: MIT
@@ -0,0 +1,14 @@
module.exports = {
"ascending": `cresc\u{103}toare`,
"ascendingSort": (args)=>`sortate dup\u{103} coloana ${args.columnName} \xeen ordine cresc\u{103}toare`,
"columnSize": (args)=>`${args.value} pixeli`,
"descending": `descresc\u{103}toare`,
"descendingSort": (args)=>`sortate dup\u{103} coloana ${args.columnName} \xeen ordine descresc\u{103}toare`,
"resizerDescription": `Ap\u{103}sa\u{21B}i pe Enter pentru a \xeencepe redimensionarea`,
"select": `Selectare`,
"selectAll": `Selectare total\u{103}`,
"sortable": `coloan\u{103} sortabil\u{103}`
};
//# sourceMappingURL=ro-RO.main.js.map
@@ -0,0 +1,8 @@
import type { TSESTree } from '@typescript-eslint/types';
import type { ScopeManager } from '../ScopeManager';
import type { Scope } from './Scope';
import { ScopeBase } from './ScopeBase';
import { ScopeType } from './ScopeType';
export declare class ForScope extends ScopeBase<ScopeType.for, TSESTree.ForInStatement | TSESTree.ForOfStatement | TSESTree.ForStatement, Scope> {
constructor(scopeManager: ScopeManager, upperScope: ForScope['upper'], block: ForScope['block']);
}
@@ -0,0 +1,3 @@
export * from './constants.js';
export * from './helpers.js';
//# sourceMappingURL=index.js.map
@@ -0,0 +1,21 @@
import { Block, Tokens, Spec } from './primitives.js';
export declare function isSpace(source: string): boolean;
export declare function hasCR(source: string): boolean;
export declare function splitCR(source: string): [string, string];
export declare function splitSpace(source: string): [string, string];
export declare function splitLines(source: string): string[];
export declare function seedBlock(block?: Partial<Block>): Block;
export declare function seedSpec(spec?: Partial<Spec>): Spec;
export declare function seedTokens(tokens?: Partial<Tokens>): Tokens;
/**
* Assures Block.tags[].source contains references to the Block.source items,
* using Block.source as a source of truth. This is a counterpart of rewireSpecs
* @param block parsed coments block
*/
export declare function rewireSource(block: Block): Block;
/**
* Assures Block.source contains references to the Block.tags[].source items,
* using Block.tags[].source as a source of truth. This is a counterpart of rewireSource
* @param block parsed coments block
*/
export declare function rewireSpecs(block: Block): Block;
@@ -0,0 +1,5 @@
var convert = require('./convert'),
func = convert('nthArg', require('../nthArg'));
func.placeholder = require('./placeholder');
module.exports = func;
@@ -0,0 +1,44 @@
'use strict';
var $TypeError = require('es-errors/type');
var IsValidIntegerIndex = require('./IsValidIntegerIndex');
var SetValueInBuffer = require('./SetValueInBuffer');
var ToBigInt = require('./ToBigInt');
var ToNumber = require('./ToNumber');
var typedArrayBuffer = require('typed-array-buffer');
var typedArrayByteOffset = require('typed-array-byte-offset');
var whichTypedArray = require('which-typed-array');
var tableTAO = require('./tables/typed-array-objects');
// https://262.ecma-international.org/12.0/#sec-integerindexedelementset
module.exports = function IntegerIndexedElementSet(O, index, value) {
if (typeof index !== 'number') {
throw new $TypeError('Assertion failed: `index` must be a Number');
}
var arrayTypeName = whichTypedArray(O); // step 4.b
if (!arrayTypeName) {
throw new $TypeError('Assertion failed: `O` must be a TypedArray'); // step 1
}
var contentType = arrayTypeName === 'BigInt64Array' || arrayTypeName === 'BigUint64Array' ? 'BigInt' : 'Number';
var numValue = contentType === 'BigInt' ? ToBigInt(value) : ToNumber(value); // steps 2 - 3
if (IsValidIntegerIndex(O, index)) { // step 4
var offset = typedArrayByteOffset(O); // step 4.a
var elementType = tableTAO.name['$' + arrayTypeName]; // step 4.e
var elementSize = tableTAO.size['$' + elementType]; // step 4.c
var indexedPosition = (index * elementSize) + offset; // step 4.d
SetValueInBuffer(typedArrayBuffer(O), indexedPosition, elementType, numValue, true, 'Unordered'); // step 4.e
}
// 5. Return NormalCompletion(undefined)
};
@@ -0,0 +1,16 @@
#!/usr/bin/env node
const { resolve } = require("node:path");
const script = process.argv.splice(2, 1)[0];
if (!script) {
console.error("Usage: jiti <path> [...arguments]");
process.exit(1);
}
const pwd = process.cwd();
const jiti = require("..")(pwd);
const resolved = (process.argv[1] = jiti.resolve(resolve(pwd, script)));
jiti(resolved);
@@ -0,0 +1,136 @@
/*
* 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.
*/
import {Collection, CollectionStateBase, Key, LayoutDelegate, Node} from '@react-types/shared';
import {ListCollection} from './ListCollection';
import {MultipleSelectionStateProps, SelectionManager, useMultipleSelectionState} from '@react-stately/selection';
import {useCallback, useEffect, useMemo, useRef} from 'react';
import {useCollection} from '@react-stately/collections';
export interface ListProps<T> extends CollectionStateBase<T>, MultipleSelectionStateProps {
/** Filter function to generate a filtered list of nodes. */
filter?: (nodes: Iterable<Node<T>>) => Iterable<Node<T>>,
/** @private */
suppressTextValueWarning?: boolean,
/**
* A delegate object that provides layout information for items in the collection.
* This can be used to override the behavior of shift selection.
*/
layoutDelegate?: LayoutDelegate
}
export interface ListState<T> {
/** A collection of items in the list. */
collection: Collection<Node<T>>,
/** A set of items that are disabled. */
disabledKeys: Set<Key>,
/** A selection manager to read and update multiple selection state. */
selectionManager: SelectionManager
}
/**
* Provides state management for list-like components. Handles building a collection
* of items from props, and manages multiple selection state.
*/
export function useListState<T extends object>(props: ListProps<T>): ListState<T> {
let {filter, layoutDelegate} = props;
let selectionState = useMultipleSelectionState(props);
let disabledKeys = useMemo(() =>
props.disabledKeys ? new Set(props.disabledKeys) : new Set<Key>()
, [props.disabledKeys]);
let factory = useCallback(nodes => filter ? new ListCollection(filter(nodes)) : new ListCollection(nodes as Iterable<Node<T>>), [filter]);
let context = useMemo(() => ({suppressTextValueWarning: props.suppressTextValueWarning}), [props.suppressTextValueWarning]);
let collection = useCollection(props, factory, context);
let selectionManager = useMemo(() =>
new SelectionManager(collection, selectionState, {layoutDelegate})
, [collection, selectionState, layoutDelegate]
);
useFocusedKeyReset(collection, selectionManager);
return {
collection,
disabledKeys,
selectionManager
};
}
/**
* Filters a collection using the provided filter function and returns a new ListState.
*/
export function UNSTABLE_useFilteredListState<T extends object>(state: ListState<T>, filterFn: ((nodeValue: string, node: Node<T>) => boolean) | null | undefined): ListState<T> {
let collection = useMemo(() => filterFn ? state.collection.filter!(filterFn) : state.collection, [state.collection, filterFn]);
let selectionManager = state.selectionManager.withCollection(collection);
useFocusedKeyReset(collection, selectionManager);
return {
collection,
selectionManager,
disabledKeys: state.disabledKeys
};
}
function useFocusedKeyReset<T>(collection: Collection<Node<T>>, selectionManager: SelectionManager) {
// Reset focused key if that item is deleted from the collection.
const cachedCollection = useRef<Collection<Node<T>> | null>(null);
useEffect(() => {
if (selectionManager.focusedKey != null && !collection.getItem(selectionManager.focusedKey) && cachedCollection.current) {
const startItem = cachedCollection.current.getItem(selectionManager.focusedKey);
const cachedItemNodes = [...cachedCollection.current.getKeys()].map(
key => {
const itemNode = cachedCollection.current!.getItem(key);
return itemNode?.type === 'item' ? itemNode : null;
}
).filter(node => node !== null);
const itemNodes = [...collection.getKeys()].map(
key => {
const itemNode = collection.getItem(key);
return itemNode?.type === 'item' ? itemNode : null;
}
).filter(node => node !== null);
const diff: number = (cachedItemNodes?.length ?? 0) - (itemNodes?.length ?? 0);
let index = Math.min(
(
diff > 1 ?
Math.max((startItem?.index ?? 0) - diff + 1, 0) :
startItem?.index ?? 0
),
(itemNodes?.length ?? 0) - 1);
let newNode: Node<T> | null = null;
let isReverseSearching = false;
while (index >= 0) {
if (!selectionManager.isDisabled(itemNodes[index].key)) {
newNode = itemNodes[index];
break;
}
// Find next, not disabled item.
if (index < itemNodes.length - 1 && !isReverseSearching) {
index++;
// Otherwise, find previous, not disabled item.
} else {
isReverseSearching = true;
if (index > (startItem?.index ?? 0)) {
index = (startItem?.index ?? 0);
}
index--;
}
}
selectionManager.setFocusedKey(newNode ? newNode.key : null);
}
cachedCollection.current = collection;
}, [collection, selectionManager]);
}
@@ -0,0 +1,663 @@
import Tokenizer, { type Callbacks, QuoteType } from "./Tokenizer.js";
import { fromCodePoint } from "entities/decode";
const formTags = new Set([
"input",
"option",
"optgroup",
"select",
"button",
"datalist",
"textarea",
]);
const pTag = new Set(["p"]);
const tableSectionTags = new Set(["thead", "tbody"]);
const ddtTags = new Set(["dd", "dt"]);
const rtpTags = new Set(["rt", "rp"]);
const openImpliesClose = new Map<string, Set<string>>([
["tr", new Set(["tr", "th", "td"])],
["th", new Set(["th"])],
["td", new Set(["thead", "th", "td"])],
["body", new Set(["head", "link", "script"])],
["li", new Set(["li"])],
["p", pTag],
["h1", pTag],
["h2", pTag],
["h3", pTag],
["h4", pTag],
["h5", pTag],
["h6", pTag],
["select", formTags],
["input", formTags],
["output", formTags],
["button", formTags],
["datalist", formTags],
["textarea", formTags],
["option", new Set(["option"])],
["optgroup", new Set(["optgroup", "option"])],
["dd", ddtTags],
["dt", ddtTags],
["address", pTag],
["article", pTag],
["aside", pTag],
["blockquote", pTag],
["details", pTag],
["div", pTag],
["dl", pTag],
["fieldset", pTag],
["figcaption", pTag],
["figure", pTag],
["footer", pTag],
["form", pTag],
["header", pTag],
["hr", pTag],
["main", pTag],
["nav", pTag],
["ol", pTag],
["pre", pTag],
["section", pTag],
["table", pTag],
["ul", pTag],
["rt", rtpTags],
["rp", rtpTags],
["tbody", tableSectionTags],
["tfoot", tableSectionTags],
]);
const voidElements = new Set([
"area",
"base",
"basefont",
"br",
"col",
"command",
"embed",
"frame",
"hr",
"img",
"input",
"isindex",
"keygen",
"link",
"meta",
"param",
"source",
"track",
"wbr",
]);
const foreignContextElements = new Set(["math", "svg"]);
const htmlIntegrationElements = new Set([
"mi",
"mo",
"mn",
"ms",
"mtext",
"annotation-xml",
"foreignobject",
"desc",
"title",
]);
export interface ParserOptions {
/**
* Indicates whether special tags (`<script>`, `<style>`, and `<title>`) should get special treatment
* and if "empty" tags (eg. `<br>`) can have children. If `false`, the content of special tags
* will be text only. For feeds and other XML content (documents that don't consist of HTML),
* set this to `true`.
*
* @default false
*/
xmlMode?: boolean;
/**
* Decode entities within the document.
*
* @default true
*/
decodeEntities?: boolean;
/**
* If set to true, all tags will be lowercased.
*
* @default !xmlMode
*/
lowerCaseTags?: boolean;
/**
* If set to `true`, all attribute names will be lowercased. This has noticeable impact on speed.
*
* @default !xmlMode
*/
lowerCaseAttributeNames?: boolean;
/**
* If set to true, CDATA sections will be recognized as text even if the xmlMode option is not enabled.
* NOTE: If xmlMode is set to `true` then CDATA sections will always be recognized as text.
*
* @default xmlMode
*/
recognizeCDATA?: boolean;
/**
* If set to `true`, self-closing tags will trigger the onclosetag event even if xmlMode is not set to `true`.
* NOTE: If xmlMode is set to `true` then self-closing tags will always be recognized.
*
* @default xmlMode
*/
recognizeSelfClosing?: boolean;
/**
* Allows the default tokenizer to be overwritten.
*/
Tokenizer?: typeof Tokenizer;
}
export interface Handler {
onparserinit(parser: Parser): void;
/**
* Resets the handler back to starting state
*/
onreset(): void;
/**
* Signals the handler that parsing is done
*/
onend(): void;
onerror(error: Error): void;
onclosetag(name: string, isImplied: boolean): void;
onopentagname(name: string): void;
/**
*
* @param name Name of the attribute
* @param value Value of the attribute.
* @param quote Quotes used around the attribute. `null` if the attribute has no quotes around the value, `undefined` if the attribute has no value.
*/
onattribute(
name: string,
value: string,
quote?: string | undefined | null,
): void;
onopentag(
name: string,
attribs: { [s: string]: string },
isImplied: boolean,
): void;
ontext(data: string): void;
oncomment(data: string): void;
oncdatastart(): void;
oncdataend(): void;
oncommentend(): void;
onprocessinginstruction(name: string, data: string): void;
}
const reNameEnd = /\s|\//;
export class Parser implements Callbacks {
/** The start index of the last event. */
public startIndex = 0;
/** The end index of the last event. */
public endIndex = 0;
/**
* Store the start index of the current open tag,
* so we can update the start index for attributes.
*/
private openTagStart = 0;
private tagname = "";
private attribname = "";
private attribvalue = "";
private attribs: null | { [key: string]: string } = null;
private readonly stack: string[] = [];
/** Determines whether self-closing tags are recognized. */
private readonly foreignContext: boolean[];
private readonly cbs: Partial<Handler>;
private readonly lowerCaseTagNames: boolean;
private readonly lowerCaseAttributeNames: boolean;
private readonly recognizeSelfClosing: boolean;
/** We are parsing HTML. Inverse of the `xmlMode` option. */
private readonly htmlMode: boolean;
private readonly tokenizer: Tokenizer;
private readonly buffers: string[] = [];
private bufferOffset = 0;
/** The index of the last written buffer. Used when resuming after a `pause()`. */
private writeIndex = 0;
/** Indicates whether the parser has finished running / `.end` has been called. */
private ended = false;
constructor(
cbs?: Partial<Handler> | null,
private readonly options: ParserOptions = {},
) {
this.cbs = cbs ?? {};
this.htmlMode = !this.options.xmlMode;
this.lowerCaseTagNames = options.lowerCaseTags ?? this.htmlMode;
this.lowerCaseAttributeNames =
options.lowerCaseAttributeNames ?? this.htmlMode;
this.recognizeSelfClosing =
options.recognizeSelfClosing ?? !this.htmlMode;
this.tokenizer = new (options.Tokenizer ?? Tokenizer)(
this.options,
this,
);
this.foreignContext = [!this.htmlMode];
this.cbs.onparserinit?.(this);
}
// Tokenizer event handlers
/** @internal */
ontext(start: number, endIndex: number): void {
const data = this.getSlice(start, endIndex);
this.endIndex = endIndex - 1;
this.cbs.ontext?.(data);
this.startIndex = endIndex;
}
/** @internal */
ontextentity(cp: number, endIndex: number): void {
this.endIndex = endIndex - 1;
this.cbs.ontext?.(fromCodePoint(cp));
this.startIndex = endIndex;
}
/**
* Checks if the current tag is a void element. Override this if you want
* to specify your own additional void elements.
*/
protected isVoidElement(name: string): boolean {
return this.htmlMode && voidElements.has(name);
}
/** @internal */
onopentagname(start: number, endIndex: number): void {
this.endIndex = endIndex;
let name = this.getSlice(start, endIndex);
if (this.lowerCaseTagNames) {
name = name.toLowerCase();
}
this.emitOpenTag(name);
}
private emitOpenTag(name: string) {
this.openTagStart = this.startIndex;
this.tagname = name;
const impliesClose = this.htmlMode && openImpliesClose.get(name);
if (impliesClose) {
while (this.stack.length > 0 && impliesClose.has(this.stack[0])) {
const element = this.stack.shift()!;
this.cbs.onclosetag?.(element, true);
}
}
if (!this.isVoidElement(name)) {
this.stack.unshift(name);
if (this.htmlMode) {
if (foreignContextElements.has(name)) {
this.foreignContext.unshift(true);
} else if (htmlIntegrationElements.has(name)) {
this.foreignContext.unshift(false);
}
}
}
this.cbs.onopentagname?.(name);
if (this.cbs.onopentag) this.attribs = {};
}
private endOpenTag(isImplied: boolean) {
this.startIndex = this.openTagStart;
if (this.attribs) {
this.cbs.onopentag?.(this.tagname, this.attribs, isImplied);
this.attribs = null;
}
if (this.cbs.onclosetag && this.isVoidElement(this.tagname)) {
this.cbs.onclosetag(this.tagname, true);
}
this.tagname = "";
}
/** @internal */
onopentagend(endIndex: number): void {
this.endIndex = endIndex;
this.endOpenTag(false);
// Set `startIndex` for next node
this.startIndex = endIndex + 1;
}
/** @internal */
onclosetag(start: number, endIndex: number): void {
this.endIndex = endIndex;
let name = this.getSlice(start, endIndex);
if (this.lowerCaseTagNames) {
name = name.toLowerCase();
}
if (
this.htmlMode &&
(foreignContextElements.has(name) ||
htmlIntegrationElements.has(name))
) {
this.foreignContext.shift();
}
if (!this.isVoidElement(name)) {
const pos = this.stack.indexOf(name);
if (pos !== -1) {
for (let index = 0; index <= pos; index++) {
const element = this.stack.shift()!;
// We know the stack has sufficient elements.
this.cbs.onclosetag?.(element, index !== pos);
}
} else if (this.htmlMode && name === "p") {
// Implicit open before close
this.emitOpenTag("p");
this.closeCurrentTag(true);
}
} else if (this.htmlMode && name === "br") {
// We can't use `emitOpenTag` for implicit open, as `br` would be implicitly closed.
this.cbs.onopentagname?.("br");
this.cbs.onopentag?.("br", {}, true);
this.cbs.onclosetag?.("br", false);
}
// Set `startIndex` for next node
this.startIndex = endIndex + 1;
}
/** @internal */
onselfclosingtag(endIndex: number): void {
this.endIndex = endIndex;
if (this.recognizeSelfClosing || this.foreignContext[0]) {
this.closeCurrentTag(false);
// Set `startIndex` for next node
this.startIndex = endIndex + 1;
} else {
// Ignore the fact that the tag is self-closing.
this.onopentagend(endIndex);
}
}
private closeCurrentTag(isOpenImplied: boolean) {
const name = this.tagname;
this.endOpenTag(isOpenImplied);
// Self-closing tags will be on the top of the stack
if (this.stack[0] === name) {
// If the opening tag isn't implied, the closing tag has to be implied.
this.cbs.onclosetag?.(name, !isOpenImplied);
this.stack.shift();
}
}
/** @internal */
onattribname(start: number, endIndex: number): void {
this.startIndex = start;
const name = this.getSlice(start, endIndex);
this.attribname = this.lowerCaseAttributeNames
? name.toLowerCase()
: name;
}
/** @internal */
onattribdata(start: number, endIndex: number): void {
this.attribvalue += this.getSlice(start, endIndex);
}
/** @internal */
onattribentity(cp: number): void {
this.attribvalue += fromCodePoint(cp);
}
/** @internal */
onattribend(quote: QuoteType, endIndex: number): void {
this.endIndex = endIndex;
this.cbs.onattribute?.(
this.attribname,
this.attribvalue,
quote === QuoteType.Double
? '"'
: quote === QuoteType.Single
? "'"
: quote === QuoteType.NoValue
? undefined
: null,
);
if (
this.attribs &&
!Object.prototype.hasOwnProperty.call(this.attribs, this.attribname)
) {
this.attribs[this.attribname] = this.attribvalue;
}
this.attribvalue = "";
}
private getInstructionName(value: string) {
const index = value.search(reNameEnd);
let name = index < 0 ? value : value.substr(0, index);
if (this.lowerCaseTagNames) {
name = name.toLowerCase();
}
return name;
}
/** @internal */
ondeclaration(start: number, endIndex: number): void {
this.endIndex = endIndex;
const value = this.getSlice(start, endIndex);
if (this.cbs.onprocessinginstruction) {
const name = this.getInstructionName(value);
this.cbs.onprocessinginstruction(`!${name}`, `!${value}`);
}
// Set `startIndex` for next node
this.startIndex = endIndex + 1;
}
/** @internal */
onprocessinginstruction(start: number, endIndex: number): void {
this.endIndex = endIndex;
const value = this.getSlice(start, endIndex);
if (this.cbs.onprocessinginstruction) {
const name = this.getInstructionName(value);
this.cbs.onprocessinginstruction(`?${name}`, `?${value}`);
}
// Set `startIndex` for next node
this.startIndex = endIndex + 1;
}
/** @internal */
oncomment(start: number, endIndex: number, offset: number): void {
this.endIndex = endIndex;
this.cbs.oncomment?.(this.getSlice(start, endIndex - offset));
this.cbs.oncommentend?.();
// Set `startIndex` for next node
this.startIndex = endIndex + 1;
}
/** @internal */
oncdata(start: number, endIndex: number, offset: number): void {
this.endIndex = endIndex;
const value = this.getSlice(start, endIndex - offset);
if (!this.htmlMode || this.options.recognizeCDATA) {
this.cbs.oncdatastart?.();
this.cbs.ontext?.(value);
this.cbs.oncdataend?.();
} else {
this.cbs.oncomment?.(`[CDATA[${value}]]`);
this.cbs.oncommentend?.();
}
// Set `startIndex` for next node
this.startIndex = endIndex + 1;
}
/** @internal */
onend(): void {
if (this.cbs.onclosetag) {
// Set the end index for all remaining tags
this.endIndex = this.startIndex;
for (let index = 0; index < this.stack.length; index++) {
this.cbs.onclosetag(this.stack[index], true);
}
}
this.cbs.onend?.();
}
/**
* Resets the parser to a blank state, ready to parse a new HTML document
*/
public reset(): void {
this.cbs.onreset?.();
this.tokenizer.reset();
this.tagname = "";
this.attribname = "";
this.attribs = null;
this.stack.length = 0;
this.startIndex = 0;
this.endIndex = 0;
this.cbs.onparserinit?.(this);
this.buffers.length = 0;
this.foreignContext.length = 0;
this.foreignContext.unshift(!this.htmlMode);
this.bufferOffset = 0;
this.writeIndex = 0;
this.ended = false;
}
/**
* Resets the parser, then parses a complete document and
* pushes it to the handler.
*
* @param data Document to parse.
*/
public parseComplete(data: string): void {
this.reset();
this.end(data);
}
private getSlice(start: number, end: number) {
while (start - this.bufferOffset >= this.buffers[0].length) {
this.shiftBuffer();
}
let slice = this.buffers[0].slice(
start - this.bufferOffset,
end - this.bufferOffset,
);
while (end - this.bufferOffset > this.buffers[0].length) {
this.shiftBuffer();
slice += this.buffers[0].slice(0, end - this.bufferOffset);
}
return slice;
}
private shiftBuffer(): void {
this.bufferOffset += this.buffers[0].length;
this.writeIndex--;
this.buffers.shift();
}
/**
* Parses a chunk of data and calls the corresponding callbacks.
*
* @param chunk Chunk to parse.
*/
public write(chunk: string): void {
if (this.ended) {
this.cbs.onerror?.(new Error(".write() after done!"));
return;
}
this.buffers.push(chunk);
if (this.tokenizer.running) {
this.tokenizer.write(chunk);
this.writeIndex++;
}
}
/**
* Parses the end of the buffer and clears the stack, calls onend.
*
* @param chunk Optional final chunk to parse.
*/
public end(chunk?: string): void {
if (this.ended) {
this.cbs.onerror?.(new Error(".end() after done!"));
return;
}
if (chunk) this.write(chunk);
this.ended = true;
this.tokenizer.end();
}
/**
* Pauses parsing. The parser won't emit events until `resume` is called.
*/
public pause(): void {
this.tokenizer.pause();
}
/**
* Resumes parsing after `pause` was called.
*/
public resume(): void {
this.tokenizer.resume();
while (
this.tokenizer.running &&
this.writeIndex < this.buffers.length
) {
this.tokenizer.write(this.buffers[this.writeIndex++]);
}
if (this.ended) this.tokenizer.end();
}
/**
* Alias of `write`, for backwards compatibility.
*
* @param chunk Chunk to parse.
* @deprecated
*/
public parseChunk(chunk: string): void {
this.write(chunk);
}
/**
* Alias of `end`, for backwards compatibility.
*
* @param chunk Optional final chunk to parse.
* @deprecated
*/
public done(chunk?: string): void {
this.end(chunk);
}
}
@@ -0,0 +1,21 @@
import * as _heroui_system_rsc from '@heroui/system-rsc';
import { PropGetter, HTMLHeroUIProps } from '@heroui/system-rsc';
import { DividerVariantProps } from '@heroui/theme';
import { Ref } from 'react';
import { SeparatorProps } from './use-separator.js';
import '@react-types/shared';
interface Props extends HTMLHeroUIProps<"hr"> {
/**
* Ref to the DOM node.
*/
ref?: Ref<HTMLElement> | undefined;
}
type UseDividerProps = Props & DividerVariantProps & Omit<SeparatorProps, "elementType">;
declare function useDivider(props: UseDividerProps): {
Component: _heroui_system_rsc.As<any>;
getDividerProps: PropGetter<Record<string, unknown>, _heroui_system_rsc.DOMAttributes<_heroui_system_rsc.DOMElement>>;
};
type UseDividerReturn = ReturnType<typeof useDivider>;
export { UseDividerProps, UseDividerReturn, useDivider };
@@ -0,0 +1,8 @@
import { ClassAttributor } from 'parchment';
declare class IndentAttributor extends ClassAttributor {
add(node: HTMLElement, value: string | number): boolean;
canAdd(node: HTMLElement, value: string): boolean;
value(node: HTMLElement): number | undefined;
}
declare const IndentClass: IndentAttributor;
export default IndentClass;
@@ -0,0 +1,23 @@
"use strict";
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
Object.defineProperty(exports, "__esModule", {
value: true
});
exports["default"] = void 0;
var _tslib = require("tslib");
var _react = require("react");
var _useDebounceFn = _interopRequireDefault(require("../useDebounceFn"));
function useDebounce(value, options) {
var _a = (0, _tslib.__read)((0, _react.useState)(value), 2),
debounced = _a[0],
setDebounced = _a[1];
var run = (0, _useDebounceFn["default"])(function () {
setDebounced(value);
}, options).run;
(0, _react.useEffect)(function () {
run();
}, [value]);
return debounced;
}
var _default = exports["default"] = useDebounce;
@@ -0,0 +1,50 @@
/**
* @fileoverview Enforce scope prop is only used on <th> elements.
* @author Ethan Cohen
*/
// -----------------------------------------------------------------------------
// Requirements
// -----------------------------------------------------------------------------
import { RuleTester } from 'eslint';
import parserOptionsMapper from '../../__util__/parserOptionsMapper';
import parsers from '../../__util__/helpers/parsers';
import rule from '../../../src/rules/scope';
// -----------------------------------------------------------------------------
// Tests
// -----------------------------------------------------------------------------
const ruleTester = new RuleTester();
const expectedError = {
message: 'The scope prop can only be used on <th> elements.',
type: 'JSXAttribute',
};
const componentsSettings = {
'jsx-a11y': {
components: {
Foo: 'div',
TableHeader: 'th',
},
},
};
ruleTester.run('scope', rule, {
valid: parsers.all([].concat(
{ code: '<div />;' },
{ code: '<div foo />;' },
{ code: '<th scope />' },
{ code: '<th scope="row" />' },
{ code: '<th scope={foo} />' },
{ code: '<th scope={"col"} {...props} />' },
{ code: '<Foo scope="bar" {...props} />' },
{ code: '<TableHeader scope="row" />', settings: componentsSettings },
)).map(parserOptionsMapper),
invalid: parsers.all([].concat(
{ code: '<div scope />', errors: [expectedError] },
{ code: '<Foo scope="bar" />', settings: componentsSettings, errors: [expectedError] },
)).map(parserOptionsMapper),
});
@@ -0,0 +1,81 @@
## 6.0.2 (2025-06-19)
### Bug fixes
Make sure to include a .d.cts file to make TypeScript happy.
## 6.0.1 (2022-06-30)
### Bug fixes
Work around limitations in tree-shaking software that prevented `basicSetup` from being removed when unused.
## 6.0.0 (2022-06-08)
### Breaking changes
Change the package name from `@codemirror/example-setup` to just `codemirror`.
The package no longer exports `EditorState` (since that is no longer necessary to set up a basic editor).
### New features
The new `minimalSetup` export provides a minimal set of editor extensions.
## 0.20.0 (2022-04-20)
### Breaking changes
Update dependencies to 0.20.0
## 0.19.3 (2022-03-30)
### New features
Add the extension that shows a crosshair cursor when Alt is held down to the basic setup.
## 0.19.1 (2021-12-13)
### New features
The basic setup now includes the `dropCursor` extension.
## 0.19.0 (2021-08-11)
### Breaking changes
Update dependencies to 0.19.0
## 0.18.2 (2021-05-25)
### Bug fixes
Fix too-low dependency on @codemirror/gutter that could cause broken upgrades.
## 0.18.1 (2021-05-15)
### New features
The basic setup now includes `highlightActiveLineGutter` from @codemirror/gutter.
## 0.18.0 (2021-03-03)
### Breaking changes
Update dependencies to 0.18.
## 0.17.1 (2021-01-06)
### Bug fixes
Putting a theme after the basic setup no longer causes the default highlighter to be used with the theme's editor styling.
### New features
The package now also exports a CommonJS module.
## 0.17.0 (2020-12-29)
### Breaking changes
First numbered release.
@@ -0,0 +1,3 @@
# @react-stately/collections
This package is part of [react-spectrum](https://github.com/adobe/react-spectrum). See the repo for more details.
@@ -0,0 +1,76 @@
import {
ImmerState,
Patch,
Drafted,
ImmerBaseState,
AnyMap,
AnySet,
ArchType,
die
} from "../internal"
/** Plugin utilities */
const plugins: {
Patches?: {
generatePatches_(
state: ImmerState,
basePath: PatchPath,
patches: Patch[],
inversePatches: Patch[]
): void
generateReplacementPatches_(
base: any,
replacement: any,
patches: Patch[],
inversePatches: Patch[]
): void
applyPatches_<T>(draft: T, patches: readonly Patch[]): T
}
MapSet?: {
proxyMap_<T extends AnyMap>(target: T, parent?: ImmerState): T
proxySet_<T extends AnySet>(target: T, parent?: ImmerState): T
}
} = {}
type Plugins = typeof plugins
export function getPlugin<K extends keyof Plugins>(
pluginKey: K
): Exclude<Plugins[K], undefined> {
const plugin = plugins[pluginKey]
if (!plugin) {
die(0, pluginKey)
}
// @ts-ignore
return plugin
}
export function loadPlugin<K extends keyof Plugins>(
pluginKey: K,
implementation: Plugins[K]
): void {
if (!plugins[pluginKey]) plugins[pluginKey] = implementation
}
/** Map / Set plugin */
export interface MapState extends ImmerBaseState {
type_: ArchType.Map
copy_: AnyMap | undefined
assigned_: Map<any, boolean> | undefined
base_: AnyMap
revoked_: boolean
draft_: Drafted<AnyMap, MapState>
}
export interface SetState extends ImmerBaseState {
type_: ArchType.Set
copy_: AnySet | undefined
base_: AnySet
drafts_: Map<any, Drafted> // maps the original value to the draft value in the new set
revoked_: boolean
draft_: Drafted<AnySet, SetState>
}
/** Patches plugin */
export type PatchPath = (string | number)[]
@@ -0,0 +1,48 @@
/*
* 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.
*/
import {BaseEvent} from '@react-types/shared';
import {SyntheticEvent} from 'react';
/**
* This function wraps a React event handler to make stopPropagation the default, and support continuePropagation instead.
*/
export function createEventHandler<T extends SyntheticEvent>(handler?: (e: BaseEvent<T>) => void): ((e: T) => void) | undefined {
if (!handler) {
return undefined;
}
let shouldStopPropagation = true;
return (e: T) => {
let event: BaseEvent<T> = {
...e,
preventDefault() {
e.preventDefault();
},
isDefaultPrevented() {
return e.isDefaultPrevented();
},
stopPropagation() {
console.error('stopPropagation is now the default behavior for events in React Spectrum. You can use continuePropagation() to revert this behavior.');
},
continuePropagation() {
shouldStopPropagation = false;
}
};
handler(event);
if (shouldStopPropagation) {
e.stopPropagation();
}
};
}
@@ -0,0 +1,15 @@
#! /usr/bin/env node
var BufferStreams = require('bufferstreams');
var ttf2woff2 = require('../dist');
process.stdin
.pipe(
new BufferStreams(function (err, buf, cb) {
if (err) {
throw err;
}
cb(null, ttf2woff2(buf));
}),
)
.pipe(process.stdout);
@@ -0,0 +1,260 @@
/**
* @fileoverview Prevent common casing typos
*/
'use strict';
const PROP_TYPES = Object.keys(require('prop-types'));
const Components = require('../util/Components');
const docsUrl = require('../util/docsUrl');
const astUtil = require('../util/ast');
const componentUtil = require('../util/componentUtil');
const report = require('../util/report');
const lifecycleMethods = require('../util/lifecycleMethods');
// ------------------------------------------------------------------------------
// Rule Definition
// ------------------------------------------------------------------------------
const STATIC_CLASS_PROPERTIES = ['propTypes', 'contextTypes', 'childContextTypes', 'defaultProps'];
const messages = {
typoPropTypeChain: 'Typo in prop type chain qualifier: {{name}}',
typoPropType: 'Typo in declared prop type: {{name}}',
typoStaticClassProp: 'Typo in static class property declaration',
typoPropDeclaration: 'Typo in property declaration',
typoLifecycleMethod: 'Typo in component lifecycle method declaration: {{actual}} should be {{expected}}',
staticLifecycleMethod: 'Lifecycle method should be static: {{method}}',
noPropTypesBinding: '`\'prop-types\'` imported without a local `PropTypes` binding.',
noReactBinding: '`\'react\'` imported without a local `React` binding.',
};
/** @type {import('eslint').Rule.RuleModule} */
module.exports = {
meta: {
docs: {
description: 'Disallow common typos',
category: 'Stylistic Issues',
recommended: false,
url: docsUrl('no-typos'),
},
messages,
schema: [],
},
create: Components.detect((context, components, utils) => {
let propTypesPackageName = null;
let reactPackageName = null;
function checkValidPropTypeQualifier(node) {
if (node.name !== 'isRequired') {
report(context, messages.typoPropTypeChain, 'typoPropTypeChain', {
node,
data: { name: node.name },
});
}
}
function checkValidPropType(node) {
if (node.name && !PROP_TYPES.some((propTypeName) => propTypeName === node.name)) {
report(context, messages.typoPropType, 'typoPropType', {
node,
data: { name: node.name },
});
}
}
function isPropTypesPackage(node) {
return (
node.type === 'Identifier'
&& node.name === propTypesPackageName
) || (
node.type === 'MemberExpression'
&& node.property.name === 'PropTypes'
&& node.object.name === reactPackageName
);
}
/* eslint-disable no-use-before-define */
function checkValidCallExpression(node) {
const callee = node.callee;
if (callee.type === 'MemberExpression' && callee.property.name === 'shape') {
checkValidPropObject(node.arguments[0]);
} else if (callee.type === 'MemberExpression' && callee.property.name === 'oneOfType') {
const args = node.arguments[0];
if (args && args.type === 'ArrayExpression') {
args.elements.forEach((el) => {
checkValidProp(el);
});
}
}
}
function checkValidProp(node) {
if ((!propTypesPackageName && !reactPackageName) || !node) {
return;
}
if (node.type === 'MemberExpression') {
if (
node.object.type === 'MemberExpression'
&& isPropTypesPackage(node.object.object)
) { // PropTypes.myProp.isRequired
checkValidPropType(node.object.property);
checkValidPropTypeQualifier(node.property);
} else if (
isPropTypesPackage(node.object)
&& node.property.name !== 'isRequired'
) { // PropTypes.myProp
checkValidPropType(node.property);
} else if (astUtil.isCallExpression(node.object)) {
checkValidPropTypeQualifier(node.property);
checkValidCallExpression(node.object);
}
} else if (astUtil.isCallExpression(node)) {
checkValidCallExpression(node);
}
}
/* eslint-enable no-use-before-define */
function checkValidPropObject(node) {
if (node && node.type === 'ObjectExpression') {
node.properties.forEach((prop) => checkValidProp(prop.value));
}
}
function reportErrorIfPropertyCasingTypo(propertyValue, propertyKey, isClassProperty) {
const propertyName = propertyKey.name;
if (propertyName === 'propTypes' || propertyName === 'contextTypes' || propertyName === 'childContextTypes') {
checkValidPropObject(propertyValue);
}
STATIC_CLASS_PROPERTIES.forEach((CLASS_PROP) => {
if (propertyName && CLASS_PROP.toLowerCase() === propertyName.toLowerCase() && CLASS_PROP !== propertyName) {
const messageId = isClassProperty
? 'typoStaticClassProp'
: 'typoPropDeclaration';
report(context, messages[messageId], messageId, {
node: propertyKey,
});
}
});
}
function reportErrorIfLifecycleMethodCasingTypo(node) {
const key = node.key;
let nodeKeyName = key.name;
if (key.type === 'Literal') {
nodeKeyName = key.value;
}
if (key.type === 'PrivateName' || (node.computed && typeof nodeKeyName !== 'string')) {
return;
}
lifecycleMethods.static.forEach((method) => {
if (!node.static && nodeKeyName && nodeKeyName.toLowerCase() === method.toLowerCase()) {
report(context, messages.staticLifecycleMethod, 'staticLifecycleMethod', {
node,
data: {
method: nodeKeyName,
},
});
}
});
lifecycleMethods.instance.concat(lifecycleMethods.static).forEach((method) => {
if (nodeKeyName && method.toLowerCase() === nodeKeyName.toLowerCase() && method !== nodeKeyName) {
report(context, messages.typoLifecycleMethod, 'typoLifecycleMethod', {
node,
data: { actual: nodeKeyName, expected: method },
});
}
});
}
return {
ImportDeclaration(node) {
if (node.source && node.source.value === 'prop-types') { // import PropType from "prop-types"
if (node.specifiers.length > 0) {
propTypesPackageName = node.specifiers[0].local.name;
} else {
report(context, messages.noPropTypesBinding, 'noPropTypesBinding', {
node,
});
}
} else if (node.source && node.source.value === 'react') { // import { PropTypes } from "react"
if (node.specifiers.length > 0) {
reactPackageName = node.specifiers[0].local.name; // guard against accidental anonymous `import "react"`
} else {
report(context, messages.noReactBinding, 'noReactBinding', {
node,
});
}
if (node.specifiers.length >= 1) {
const propTypesSpecifier = node.specifiers.find((specifier) => (
specifier.imported
&& specifier.imported.name === 'PropTypes'
));
if (propTypesSpecifier) {
propTypesPackageName = propTypesSpecifier.local.name;
}
}
}
},
'ClassProperty, PropertyDefinition'(node) {
if (!node.static || !componentUtil.isES6Component(node.parent.parent, context)) {
return;
}
reportErrorIfPropertyCasingTypo(node.value, node.key, true);
},
MemberExpression(node) {
const propertyName = node.property.name;
if (
!propertyName
|| STATIC_CLASS_PROPERTIES.map((prop) => prop.toLocaleLowerCase()).indexOf(propertyName.toLowerCase()) === -1
) {
return;
}
const relatedComponent = utils.getRelatedComponent(node);
if (
relatedComponent
&& (componentUtil.isES6Component(relatedComponent.node, context) || (
relatedComponent.node.type !== 'ClassDeclaration' && utils.isReturningJSX(relatedComponent.node)))
&& (node.parent && node.parent.type === 'AssignmentExpression' && node.parent.right)
) {
reportErrorIfPropertyCasingTypo(node.parent.right, node.property, true);
}
},
MethodDefinition(node) {
if (!componentUtil.isES6Component(node.parent.parent, context)) {
return;
}
reportErrorIfLifecycleMethodCasingTypo(node);
},
ObjectExpression(node) {
const component = componentUtil.isES5Component(node, context) && components.get(node);
if (!component) {
return;
}
node.properties.filter((property) => property.type !== 'SpreadElement').forEach((property) => {
reportErrorIfPropertyCasingTypo(property.value, property.key, false);
reportErrorIfLifecycleMethodCasingTypo(property);
});
},
};
}),
};
@@ -0,0 +1,25 @@
{
"name": "@levischuck/tiny-cbor",
"version": "0.2.11",
"description": "Tiny CBOR library",
"repository": {
"type": "git",
"url": "git+https://github.com/levischuck/tiny-cbor.git"
},
"license": "MIT",
"bugs": {
"url": "https://github.com/levischuck/tiny-cbor/issues"
},
"main": "./script/index.js",
"module": "./esm/index.js",
"exports": {
".": {
"import": "./esm/index.js",
"require": "./script/index.js"
}
},
"devDependencies": {
"@types/node": "^20.9.0"
},
"_generatedBy": "dnt@0.40.0"
}
@@ -0,0 +1,21 @@
var baseEach = require('./_baseEach');
/**
* The base implementation of `_.every` without support for iteratee shorthands.
*
* @private
* @param {Array|Object} collection The collection to iterate over.
* @param {Function} predicate The function invoked per iteration.
* @returns {boolean} Returns `true` if all elements pass the predicate check,
* else `false`
*/
function baseEvery(collection, predicate) {
var result = true;
baseEach(collection, function(value, index, collection) {
result = !!predicate(value, index, collection);
return result;
});
return result;
}
module.exports = baseEvery;
@@ -0,0 +1 @@
{"name":"buffer-equal","version":"1.0.1","requiresBuild":false,"files":{".eslintrc":{"checkedAt":1794532124082,"integrity":"sha512-aZWsmVCDpuiOxseFtUqNVPvg90jYR7+GgQUCXMe0vHeFhn0voZ8I2EgYjZXHZLjo0UzMY9oEvvjnRGOh4DzZPA==","mode":420,"size":219},"LICENSE":{"checkedAt":1794532124082,"integrity":"sha512-UYETA37gNUDKrmMFiphSX5pKZ0Jb2MNZb2l77Vrh0gU/5292uFpO77gMxRn3sD02jPS0RSiMTKfKy151I/M5Yg==","mode":420,"size":1073},"example/eq.js":{"checkedAt":1794532124082,"integrity":"sha512-pjrDjwPb0Dj4Mc8/+/hSeQ3Ihy9TtdV2KzxF3+gEVvBl7lQQ901zWMhcqhwMevv4t1Hk8IWS3nvo7+YUxubiFg==","mode":420,"size":263},"test/eq.js":{"checkedAt":1794532124082,"integrity":"sha512-3FdzezRhhorCgXS72g1KOz8woyl0XWJob7THlv9/RIjth8eUkrdWncELgZ3Y6OqQVnskaMCkrNcu1go5xuR7bQ==","mode":420,"size":648},"index.js":{"checkedAt":1794532124082,"integrity":"sha512-aeA0Lp98qIQH+dMp4sS0FNxhrtdLEugy3GyWupiYc8ZSmFfI7G/tbsCdSs9NSMVvwu0uYPQ1UGhDxYFct7YRAw==","mode":420,"size":408},"package.json":{"checkedAt":1794532124082,"integrity":"sha512-7fgJgCEjOBKeP40TqJXFTc2hYVGqQhp2Qz00HnDZgVUjak5xFt54fAU6HXb/gfw3oMmSMxWnCdWiMXdq/pXYtg==","mode":420,"size":1613},"CHANGELOG.md":{"checkedAt":1794532124083,"integrity":"sha512-b1pMboLjCjAdqb5+YXlBGlOyez70n8D1BipOHtPPhMNygo6X8mvpurk63G0RcKjw33wuvlSJy0piih2UOfQGAw==","mode":420,"size":3629},"README.md":{"checkedAt":1794532124083,"integrity":"sha512-iPkWl76H2bRNLdceW5IIHxqi+Wf4hNhLrKnDanepDz+nSCQYOAF5XtkEbeqMeScb2r4fOG5nbMPK0//X7r7MEw==","mode":420,"size":2038},".github/FUNDING.yml":{"checkedAt":1794532124083,"integrity":"sha512-+worgRXPgNMnTXYEjR14ZSePlUdIPxfgPuuQ11cx+EZnZTzqx3t+OhdpNsTJcsx62FPnvF9jHcDJZ8leRMp5Bw==","mode":420,"size":583}}}
@@ -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 (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
var __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);
};
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.coerce = exports.iso = exports.ZodISODuration = exports.ZodISOTime = exports.ZodISODate = exports.ZodISODateTime = exports.locales = exports.NEVER = exports.TimePrecision = exports.toJSONSchema = exports.flattenError = exports.formatError = exports.prettifyError = exports.treeifyError = exports.regexes = exports.clone = exports.$brand = exports.$input = exports.$output = exports.function = exports.config = exports.registry = exports.globalRegistry = exports.core = void 0;
exports.core = __importStar(require("../core/index.cjs"));
__exportStar(require("./schemas.cjs"), exports);
__exportStar(require("./checks.cjs"), exports);
__exportStar(require("./errors.cjs"), exports);
__exportStar(require("./parse.cjs"), exports);
__exportStar(require("./compat.cjs"), exports);
// zod-specified
const index_js_1 = require("../core/index.cjs");
const en_js_1 = __importDefault(require("../locales/en.cjs"));
(0, index_js_1.config)((0, en_js_1.default)());
var index_js_2 = require("../core/index.cjs");
Object.defineProperty(exports, "globalRegistry", { enumerable: true, get: function () { return index_js_2.globalRegistry; } });
Object.defineProperty(exports, "registry", { enumerable: true, get: function () { return index_js_2.registry; } });
Object.defineProperty(exports, "config", { enumerable: true, get: function () { return index_js_2.config; } });
Object.defineProperty(exports, "function", { enumerable: true, get: function () { return index_js_2.function; } });
Object.defineProperty(exports, "$output", { enumerable: true, get: function () { return index_js_2.$output; } });
Object.defineProperty(exports, "$input", { enumerable: true, get: function () { return index_js_2.$input; } });
Object.defineProperty(exports, "$brand", { enumerable: true, get: function () { return index_js_2.$brand; } });
Object.defineProperty(exports, "clone", { enumerable: true, get: function () { return index_js_2.clone; } });
Object.defineProperty(exports, "regexes", { enumerable: true, get: function () { return index_js_2.regexes; } });
Object.defineProperty(exports, "treeifyError", { enumerable: true, get: function () { return index_js_2.treeifyError; } });
Object.defineProperty(exports, "prettifyError", { enumerable: true, get: function () { return index_js_2.prettifyError; } });
Object.defineProperty(exports, "formatError", { enumerable: true, get: function () { return index_js_2.formatError; } });
Object.defineProperty(exports, "flattenError", { enumerable: true, get: function () { return index_js_2.flattenError; } });
Object.defineProperty(exports, "toJSONSchema", { enumerable: true, get: function () { return index_js_2.toJSONSchema; } });
Object.defineProperty(exports, "TimePrecision", { enumerable: true, get: function () { return index_js_2.TimePrecision; } });
Object.defineProperty(exports, "NEVER", { enumerable: true, get: function () { return index_js_2.NEVER; } });
exports.locales = __importStar(require("../locales/index.cjs"));
// iso
// must be exported from top-level
// https://github.com/colinhacks/zod/issues/4491
var iso_js_1 = require("./iso.cjs");
Object.defineProperty(exports, "ZodISODateTime", { enumerable: true, get: function () { return iso_js_1.ZodISODateTime; } });
Object.defineProperty(exports, "ZodISODate", { enumerable: true, get: function () { return iso_js_1.ZodISODate; } });
Object.defineProperty(exports, "ZodISOTime", { enumerable: true, get: function () { return iso_js_1.ZodISOTime; } });
Object.defineProperty(exports, "ZodISODuration", { enumerable: true, get: function () { return iso_js_1.ZodISODuration; } });
exports.iso = __importStar(require("./iso.cjs"));
exports.coerce = __importStar(require("./coerce.cjs"));
@@ -0,0 +1,3 @@
# @react-aria/textfield
This package is part of [react-spectrum](https://github.com/adobe/react-spectrum). See the repo for more details.
@@ -0,0 +1,27 @@
import { AriaToggleProps } from "@react-types/checkbox";
import { InputHTMLAttributes, LabelHTMLAttributes } from "react";
import { RefObject } from "@react-types/shared";
import { ToggleState } from "@react-stately/toggle";
export interface ToggleAria {
/** Props to be spread on the label element. */
labelProps: LabelHTMLAttributes<HTMLLabelElement>;
/** Props to be spread on the input element. */
inputProps: InputHTMLAttributes<HTMLInputElement>;
/** Whether the toggle is selected. */
isSelected: boolean;
/** Whether the toggle is in a pressed state. */
isPressed: boolean;
/** Whether the toggle is disabled. */
isDisabled: boolean;
/** Whether the toggle is read only. */
isReadOnly: boolean;
/** Whether the toggle is invalid. */
isInvalid: boolean;
}
/**
* Handles interactions for toggle elements, e.g. Checkboxes and Switches.
*/
export function useToggle(props: AriaToggleProps, state: ToggleState, ref: RefObject<HTMLInputElement | null>): ToggleAria;
export type { AriaToggleProps } from '@react-types/checkbox';
//# sourceMappingURL=types.d.ts.map
@@ -0,0 +1,78 @@
"use strict";
// THIS CODE WAS AUTOMATICALLY GENERATED
// DO NOT EDIT THIS CODE BY HAND
// SEE https://typescript-eslint.io/users/configs
//
// For developers working in the typescript-eslint monorepo:
// You can regenerate it using `yarn generate-configs`
module.exports = {
extends: ['./configs/eslintrc/base', './configs/eslintrc/eslint-recommended'],
rules: {
'@typescript-eslint/await-thenable': 'error',
'@typescript-eslint/no-array-delete': 'error',
'@typescript-eslint/no-base-to-string': 'error',
'@typescript-eslint/no-confusing-void-expression': 'error',
'@typescript-eslint/no-deprecated': 'error',
'@typescript-eslint/no-duplicate-type-constituents': 'error',
'@typescript-eslint/no-floating-promises': 'error',
'@typescript-eslint/no-for-in-array': 'error',
'no-implied-eval': 'off',
'@typescript-eslint/no-implied-eval': 'error',
'@typescript-eslint/no-meaningless-void-operator': 'error',
'@typescript-eslint/no-misused-promises': 'error',
'@typescript-eslint/no-misused-spread': 'error',
'@typescript-eslint/no-mixed-enums': 'error',
'@typescript-eslint/no-redundant-type-constituents': 'error',
'@typescript-eslint/no-unnecessary-boolean-literal-compare': 'error',
'@typescript-eslint/no-unnecessary-condition': 'error',
'@typescript-eslint/no-unnecessary-template-expression': 'error',
'@typescript-eslint/no-unnecessary-type-arguments': 'error',
'@typescript-eslint/no-unnecessary-type-assertion': 'error',
'@typescript-eslint/no-unnecessary-type-conversion': 'error',
'@typescript-eslint/no-unnecessary-type-parameters': 'error',
'@typescript-eslint/no-unsafe-argument': 'error',
'@typescript-eslint/no-unsafe-assignment': 'error',
'@typescript-eslint/no-unsafe-call': 'error',
'@typescript-eslint/no-unsafe-enum-comparison': 'error',
'@typescript-eslint/no-unsafe-member-access': 'error',
'@typescript-eslint/no-unsafe-return': 'error',
'@typescript-eslint/no-unsafe-unary-minus': 'error',
'no-throw-literal': 'off',
'@typescript-eslint/only-throw-error': 'error',
'prefer-promise-reject-errors': 'off',
'@typescript-eslint/prefer-promise-reject-errors': 'error',
'@typescript-eslint/prefer-reduce-type-parameter': 'error',
'@typescript-eslint/prefer-return-this-type': 'error',
'@typescript-eslint/related-getter-setter-pairs': 'error',
'require-await': 'off',
'@typescript-eslint/require-await': 'error',
'@typescript-eslint/restrict-plus-operands': [
'error',
{
allowAny: false,
allowBoolean: false,
allowNullish: false,
allowNumberAndString: false,
allowRegExp: false,
},
],
'@typescript-eslint/restrict-template-expressions': [
'error',
{
allowAny: false,
allowBoolean: false,
allowNever: false,
allowNullish: false,
allowNumber: false,
allowRegExp: false,
},
],
'no-return-await': 'off',
'@typescript-eslint/return-await': [
'error',
'error-handling-correctness-only',
],
'@typescript-eslint/unbound-method': 'error',
'@typescript-eslint/use-unknown-in-catch-callback-variable': 'error',
},
};
@@ -0,0 +1,158 @@
'use client';
'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
var react = require('react');
const ErrorBoundaryContext = react.createContext(null);
const initialState = {
didCatch: false,
error: null
};
class ErrorBoundary extends react.Component {
constructor(props) {
super(props);
this.resetErrorBoundary = this.resetErrorBoundary.bind(this);
this.state = initialState;
}
static getDerivedStateFromError(error) {
return {
didCatch: true,
error
};
}
resetErrorBoundary() {
const {
error
} = this.state;
if (error !== null) {
var _this$props$onReset, _this$props;
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
(_this$props$onReset = (_this$props = this.props).onReset) === null || _this$props$onReset === void 0 ? void 0 : _this$props$onReset.call(_this$props, {
args,
reason: "imperative-api"
});
this.setState(initialState);
}
}
componentDidCatch(error, info) {
var _this$props$onError, _this$props2;
(_this$props$onError = (_this$props2 = this.props).onError) === null || _this$props$onError === void 0 ? void 0 : _this$props$onError.call(_this$props2, error, info);
}
componentDidUpdate(prevProps, prevState) {
const {
didCatch
} = this.state;
const {
resetKeys
} = this.props;
// There's an edge case where if the thing that triggered the error happens to *also* be in the resetKeys array,
// we'd end up resetting the error boundary immediately.
// This would likely trigger a second error to be thrown.
// So we make sure that we don't check the resetKeys on the first call of cDU after the error is set.
if (didCatch && prevState.error !== null && hasArrayChanged(prevProps.resetKeys, resetKeys)) {
var _this$props$onReset2, _this$props3;
(_this$props$onReset2 = (_this$props3 = this.props).onReset) === null || _this$props$onReset2 === void 0 ? void 0 : _this$props$onReset2.call(_this$props3, {
next: resetKeys,
prev: prevProps.resetKeys,
reason: "keys"
});
this.setState(initialState);
}
}
render() {
const {
children,
fallbackRender,
FallbackComponent,
fallback
} = this.props;
const {
didCatch,
error
} = this.state;
let childToRender = children;
if (didCatch) {
const props = {
error,
resetErrorBoundary: this.resetErrorBoundary
};
if (typeof fallbackRender === "function") {
childToRender = fallbackRender(props);
} else if (FallbackComponent) {
childToRender = react.createElement(FallbackComponent, props);
} else if (fallback !== undefined) {
childToRender = fallback;
} else {
throw error;
}
}
return react.createElement(ErrorBoundaryContext.Provider, {
value: {
didCatch,
error,
resetErrorBoundary: this.resetErrorBoundary
}
}, childToRender);
}
}
function hasArrayChanged() {
let a = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
let b = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
return a.length !== b.length || a.some((item, index) => !Object.is(item, b[index]));
}
function assertErrorBoundaryContext(value) {
if (value == null || typeof value.didCatch !== "boolean" || typeof value.resetErrorBoundary !== "function") {
throw new Error("ErrorBoundaryContext not found");
}
}
function useErrorBoundary() {
const context = react.useContext(ErrorBoundaryContext);
assertErrorBoundaryContext(context);
const [state, setState] = react.useState({
error: null,
hasError: false
});
const memoized = react.useMemo(() => ({
resetBoundary: () => {
context.resetErrorBoundary();
setState({
error: null,
hasError: false
});
},
showBoundary: error => setState({
error,
hasError: true
})
}), [context.resetErrorBoundary]);
if (state.hasError) {
throw state.error;
}
return memoized;
}
function withErrorBoundary(component, errorBoundaryProps) {
const Wrapped = react.forwardRef((props, ref) => react.createElement(ErrorBoundary, errorBoundaryProps, react.createElement(component, {
...props,
ref
})));
// Format for display in DevTools
const name = component.displayName || component.name || "Unknown";
Wrapped.displayName = "withErrorBoundary(".concat(name, ")");
return Wrapped;
}
exports.ErrorBoundary = ErrorBoundary;
exports.ErrorBoundaryContext = ErrorBoundaryContext;
exports.useErrorBoundary = useErrorBoundary;
exports.withErrorBoundary = withErrorBoundary;
@@ -0,0 +1,39 @@
import type { TSESTree } from '@typescript-eslint/utils';
import { SyntaxKind } from 'typescript';
import type { ValueOf } from './types';
export declare enum OperatorPrecedence {
Comma = 0,
Spread = 1,
Yield = 2,
Assignment = 3,
Conditional = 4,
Coalesce = 4,// NOTE: This is wrong
LogicalOR = 5,
LogicalAND = 6,
BitwiseOR = 7,
BitwiseXOR = 8,
BitwiseAND = 9,
Equality = 10,
Relational = 11,
Shift = 12,
Additive = 13,
Multiplicative = 14,
Exponentiation = 15,
Unary = 16,
Update = 17,
LeftHandSide = 18,
Member = 19,
Primary = 20,
Highest = 20,
Lowest = 0,
Invalid = -1
}
/**
* Note that this does not take into account parenthesization. You should check
* for parenthesization separately if it's relevant to your usage.
*/
export declare function getOperatorPrecedenceForNode(node: TSESTree.Node): OperatorPrecedence;
type TSESTreeOperatorKind = ValueOf<TSESTree.BinaryOperatorToText> | ValueOf<TSESTree.PunctuatorTokenToText>;
export declare function getOperatorPrecedence(nodeKind: SyntaxKind, operatorKind: SyntaxKind, hasArguments?: boolean): OperatorPrecedence;
export declare function getBinaryOperatorPrecedence(kind: SyntaxKind | TSESTreeOperatorKind): OperatorPrecedence;
export {};
@@ -0,0 +1,368 @@
export default `flf2a 1 1 10 -1 8
rot13.flf (C) 1994 by Victor Parada (vparada@inf.utfsm.cl) 94/12/28.
Based on Terminal by Glenn Chappell 4/93
Includes characters 128-255
figlet release 2.1 -- 12 Aug 1994
@
!@
"@
#@
$@
%@
&@
'@
(@
)@
*@
+@
,@
-@
.@
/@
0@
1@
2@
3@
4@
5@
6@
7@
8@
9@
:@
;@
<@
=@
>@
?@
@#
N@
O@
P@
Q@
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@
a@
b@
c@
d@
e@
f@
g@
h@
i@
j@
k@
l@
m@
{@
|@
}@
~@
�@
�@
�@
�@
�@
�@
�@
128
�@
129
�@
130
�@
131
�@
132
�@
133
�@
134
�@
135
�@
136
�@
137
�@
138
�@
139
�@
140
�@
141
�@
142
�@
143
�@
144
�@
145
�@
146
�@
147
�@
148
�@
149
�@
150
�@
151
�@
152
�@
153
�@
154
�@
155
�@
156
�@
157
�@
158
�@
159
�@
160
�@
161
�@
162
�@
163
�@
164
�@
165
�@
166
�@
167
�@
168
�@
169
�@
170
�@
171
�@
172
�@
173
�@
174
�@
175
�@
176
�@
177
�@
178
�@
179
�@
180
�@
181
�@
182
�@
183
�@
184
�@
185
�@
186
�@
187
�@
188
�@
189
�@
190
�@
191
�@
192
�@
193
�@
194
�@
195
�@
196
�@
197
�@
198
�@
199
�@
200
�@
201
�@
202
�@
203
�@
204
�@
205
�@
206
�@
207
�@
208
�@
209
�@
210
�@
211
�@
212
�@
213
�@
214
�@
215
�@
216
�@
217
�@
218
�@
219
�@
220
�@
221
�@
222
�@
223
�@
224
�@
225
�@
226
�@
227
�@
228
�@
229
�@
230
�@
231
�@
232
�@
233
�@
234
�@
235
�@
236
�@
237
�@
238
�@
239
�@
240
�@
241
�@
242
�@
243
�@
244
�@
245
�@
246
�@
247
�@
248
�@
249
�@
250
�@
251
�@
252
�@
253
�@
254
�@
255
�@
`
@@ -0,0 +1,46 @@
# has-tostringtag <sup>[![Version Badge][2]][1]</sup>
[![github actions][actions-image]][actions-url]
[![coverage][codecov-image]][codecov-url]
[![dependency status][5]][6]
[![dev dependency status][7]][8]
[![License][license-image]][license-url]
[![Downloads][downloads-image]][downloads-url]
[![npm badge][11]][1]
Determine if the JS environment has `Symbol.toStringTag` support. Supports spec, or shams.
## Example
```js
var hasSymbolToStringTag = require('has-tostringtag');
hasSymbolToStringTag() === true; // if the environment has native Symbol.toStringTag support. Not polyfillable, not forgeable.
var hasSymbolToStringTagKinda = require('has-tostringtag/shams');
hasSymbolToStringTagKinda() === true; // if the environment has a Symbol.toStringTag sham that mostly follows the spec.
```
## Supported Symbol shams
- get-own-property-symbols [npm](https://www.npmjs.com/package/get-own-property-symbols) | [github](https://github.com/WebReflection/get-own-property-symbols)
- core-js [npm](https://www.npmjs.com/package/core-js) | [github](https://github.com/zloirock/core-js)
## Tests
Simply clone the repo, `npm install`, and run `npm test`
[1]: https://npmjs.org/package/has-tostringtag
[2]: https://versionbadg.es/inspect-js/has-tostringtag.svg
[5]: https://david-dm.org/inspect-js/has-tostringtag.svg
[6]: https://david-dm.org/inspect-js/has-tostringtag
[7]: https://david-dm.org/inspect-js/has-tostringtag/dev-status.svg
[8]: https://david-dm.org/inspect-js/has-tostringtag#info=devDependencies
[11]: https://nodei.co/npm/has-tostringtag.png?downloads=true&stars=true
[license-image]: https://img.shields.io/npm/l/has-tostringtag.svg
[license-url]: LICENSE
[downloads-image]: https://img.shields.io/npm/dm/has-tostringtag.svg
[downloads-url]: https://npm-stat.com/charts.html?package=has-tostringtag
[codecov-image]: https://codecov.io/gh/inspect-js/has-tostringtag/branch/main/graphs/badge.svg
[codecov-url]: https://app.codecov.io/gh/inspect-js/has-tostringtag/
[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/inspect-js/has-tostringtag
[actions-url]: https://github.com/inspect-js/has-tostringtag/actions
@@ -0,0 +1 @@
{"name":"qrcode.react","version":"4.2.0","requiresBuild":false,"files":{"LICENSE":{"checkedAt":1794532111725,"integrity":"sha512-hGO2oc0AR3EsUz318QEzzWx5vOOj7xjLTt8/rO861IPjH283Fr40BenZnAt1ieUAxD2nvel4q1nq3tN5JMlXnQ==","mode":420,"size":877},"lib/esm/index.js":{"checkedAt":1794532111725,"integrity":"sha512-SUB0pC+6Ryf03UcrAFFal4vCkGaNXelS1pDoUDrmYbw//8kKSctORSdGALp/Lh0dBqreZe0ZPiVDhnfTyR787g==","mode":420,"size":44840},"lib/index.js":{"checkedAt":1794532111725,"integrity":"sha512-blmL/YK9yCEubb70BkFjEZTu1bNAsAT9cTgOpnXa7rRC2siluyHMPBjHJdHKH2u2bWxrZhZXLmpzuBD3Ck/v9Q==","mode":420,"size":46568},"lib/esm/package.json":{"checkedAt":1794532111725,"integrity":"sha512-nTI0IMxjxr7nncxdtfDxj2uOBz2q+P+lRZ4R8t5ZqfXowXjXf6kq/J3dNSYj3sNixi//hZxxovq5Px4hcsSYfw==","mode":420,"size":23},"lib/package.json":{"checkedAt":1794532111725,"integrity":"sha512-bFiTnaWPm3Fik6gyj3o2SbbiQr8jX64ABVoMx5+yeI5Kmd+qQi4M+tvoTg1eM7g29oYn5qQJZUh37cRDuU0ExA==","mode":420,"size":25},"package.json":{"checkedAt":1794532111726,"integrity":"sha512-ALLIc3ktCdXWjWgcLJd7fRmadO0m0ToEafZ3JRJBxFO8aWDb8cZoUELQVoevHcZzD1VLods3E4m5ijqqAE/WpQ==","mode":420,"size":2684},"README.md":{"checkedAt":1794532111726,"integrity":"sha512-fC6SqnBTC+7q0Hkxh0rNs+YG6kGtJduHdMtsDW9gGbHLntrAi5Dm/k5EWVqLU6JehMz07LmRpkwH67w3pe7UOg==","mode":420,"size":11655},"lib/index.d.mts":{"checkedAt":1794532111726,"integrity":"sha512-fFuQ/GG4yzYdc26HzOy/ArqvS1zgwh5eno9Ar4fzyAvcjRrTGv4OYgHz9d3SEPHaFhmcg+5mI+E/NUw8nzoCUA==","mode":420,"size":4154},"lib/index.d.ts":{"checkedAt":1794532111726,"integrity":"sha512-fFuQ/GG4yzYdc26HzOy/ArqvS1zgwh5eno9Ar4fzyAvcjRrTGv4OYgHz9d3SEPHaFhmcg+5mI+E/NUw8nzoCUA==","mode":420,"size":4154}}}
@@ -0,0 +1,17 @@
function allocUnsafe (size) {
if (typeof size !== 'number') {
throw new TypeError('"size" argument must be a number')
}
if (size < 0) {
throw new RangeError('"size" argument must not be negative')
}
if (Buffer.allocUnsafe) {
return Buffer.allocUnsafe(size)
} else {
return new Buffer(size)
}
}
module.exports = allocUnsafe
@@ -0,0 +1,37 @@
"use client";
"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// src/provider-context.ts
var provider_context_exports = {};
__export(provider_context_exports, {
ProviderContext: () => ProviderContext,
useProviderContext: () => useProviderContext
});
module.exports = __toCommonJS(provider_context_exports);
var import_react_utils = require("@heroui/react-utils");
var [ProviderContext, useProviderContext] = (0, import_react_utils.createContext)({
name: "ProviderContext",
strict: false
});
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
ProviderContext,
useProviderContext
});
@@ -0,0 +1 @@
{"mappings":";AAAA,4BAAiB;IAAG,aAAa,CAAC,qCAAa,CAAC;IAC9C,iBAAiB,CAAC,OAAS,CAAC,iCAAqB,EAAE,KAAK,UAAU,CAAC,sCAAc,CAAC;IAClF,cAAc,CAAC,OAAS,GAAG,KAAK,KAAK,CAAC,cAAQ,CAAC;IAC/C,cAAc,CAAC,uCAAe,CAAC;IAC/B,kBAAkB,CAAC,OAAS,CAAC,iCAAqB,EAAE,KAAK,UAAU,CAAC,wCAAgB,CAAC;IACrF,sBAAsB,CAAC,oEAA4C,CAAC;IACpE,UAAU,CAAC,aAAO,CAAC;IACnB,aAAa,CAAC,kBAAY,CAAC;IAC3B,YAAY,CAAC,6BAAiB,CAAC;AACjC","sources":["packages/@react-aria/table/intl/lv-LV.json"],"sourcesContent":["{\n \"ascending\": \"augošā secībā\",\n \"ascendingSort\": \"kārtots pēc kolonnas {columnName} augošā secībā\",\n \"columnSize\": \"{value} pikseļi\",\n \"descending\": \"dilstošā secībā\",\n \"descendingSort\": \"kārtots pēc kolonnas {columnName} dilstošā secībā\",\n \"resizerDescription\": \"Nospiediet Enter, lai sāktu izmēru mainīšanu\",\n \"select\": \"Atlasīt\",\n \"selectAll\": \"Atlasīt visu\",\n \"sortable\": \"kārtojamā kolonna\"\n}\n"],"names":[],"version":3,"file":"lv-LV.module.js.map"}
@@ -0,0 +1,21 @@
The MIT License (MIT)
Copyright (c) 2018 Lars-Magnus Skog
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 @@
{"version":3,"names":["REACT_ELEMENT_TYPE","_createRawReactElement","type","props","key","children","Symbol","defaultProps","childrenLength","arguments","length","childArray","Array","i","propName","$$typeof","undefined","ref","_owner"],"sources":["../../src/helpers/jsx.ts"],"sourcesContent":["/* @minVersion 7.0.0-beta.0 */\n\nvar REACT_ELEMENT_TYPE: symbol | 0xeac7;\n\ninterface Props {\n children?: any;\n [propName: string]: any;\n}\n\ninterface ReactElement {\n $$typeof: typeof REACT_ELEMENT_TYPE;\n type: any;\n key: string | null;\n ref: null;\n props: Props;\n _owner: null;\n}\n\ntype ReactElementType = any;\ntype ReactKey = string | number | bigint;\ntype ReactNode =\n | ReactElement\n | string\n | number\n | Iterable<ReactNode>\n | boolean\n | null\n | undefined;\n\nexport default function _createRawReactElement(\n type: ReactElementType,\n props: Props,\n key?: ReactKey,\n children?: ReactNode[],\n): ReactElement {\n if (!REACT_ELEMENT_TYPE) {\n REACT_ELEMENT_TYPE =\n (typeof Symbol === \"function\" &&\n // \"for\" is a reserved keyword in ES3 so escaping it here for backward compatibility\n Symbol[\"for\"] &&\n Symbol[\"for\"](\"react.element\")) ||\n 0xeac7;\n }\n\n var defaultProps: Props = type && type.defaultProps;\n var childrenLength = arguments.length - 3;\n\n if (!props && childrenLength !== 0) {\n // If we're going to assign props.children, we create a new object now\n // to avoid mutating defaultProps.\n props = { children: void 0 };\n }\n\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = new Array(childrenLength);\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 3];\n }\n props.children = childArray;\n }\n\n if (props && defaultProps) {\n for (var propName in defaultProps) {\n if (props[propName] === void 0) {\n props[propName] = defaultProps[propName];\n }\n }\n } else if (!props) {\n props = defaultProps || {};\n }\n\n return {\n $$typeof: REACT_ELEMENT_TYPE,\n type: type,\n key: key === undefined ? null : \"\" + key,\n ref: null,\n props: props,\n _owner: null,\n };\n}\n"],"mappings":";;;;;;AAEA,IAAIA,kBAAmC;AA2BxB,SAASC,sBAAsBA,CAC5CC,IAAsB,EACtBC,KAAY,EACZC,GAAc,EACdC,QAAsB,EACR;EACd,IAAI,CAACL,kBAAkB,EAAE;IACvBA,kBAAkB,GACf,OAAOM,MAAM,KAAK,UAAU,IAE3BA,MAAM,CAAC,KAAK,CAAC,IACbA,MAAM,CAAC,KAAK,CAAC,CAAC,eAAe,CAAC,IAChC,MAAM;EACV;EAEA,IAAIC,YAAmB,GAAGL,IAAI,IAAIA,IAAI,CAACK,YAAY;EACnD,IAAIC,cAAc,GAAGC,SAAS,CAACC,MAAM,GAAG,CAAC;EAEzC,IAAI,CAACP,KAAK,IAAIK,cAAc,KAAK,CAAC,EAAE;IAGlCL,KAAK,GAAG;MAAEE,QAAQ,EAAE,KAAK;IAAE,CAAC;EAC9B;EAEA,IAAIG,cAAc,KAAK,CAAC,EAAE;IACxBL,KAAK,CAACE,QAAQ,GAAGA,QAAQ;EAC3B,CAAC,MAAM,IAAIG,cAAc,GAAG,CAAC,EAAE;IAC7B,IAAIG,UAAU,GAAG,IAAIC,KAAK,CAACJ,cAAc,CAAC;IAC1C,KAAK,IAAIK,CAAC,GAAG,CAAC,EAAEA,CAAC,GAAGL,cAAc,EAAEK,CAAC,EAAE,EAAE;MACvCF,UAAU,CAACE,CAAC,CAAC,GAAGJ,SAAS,CAACI,CAAC,GAAG,CAAC,CAAC;IAClC;IACAV,KAAK,CAACE,QAAQ,GAAGM,UAAU;EAC7B;EAEA,IAAIR,KAAK,IAAII,YAAY,EAAE;IACzB,KAAK,IAAIO,QAAQ,IAAIP,YAAY,EAAE;MACjC,IAAIJ,KAAK,CAACW,QAAQ,CAAC,KAAK,KAAK,CAAC,EAAE;QAC9BX,KAAK,CAACW,QAAQ,CAAC,GAAGP,YAAY,CAACO,QAAQ,CAAC;MAC1C;IACF;EACF,CAAC,MAAM,IAAI,CAACX,KAAK,EAAE;IACjBA,KAAK,GAAGI,YAAY,IAAI,CAAC,CAAC;EAC5B;EAEA,OAAO;IACLQ,QAAQ,EAAEf,kBAAkB;IAC5BE,IAAI,EAAEA,IAAI;IACVE,GAAG,EAAEA,GAAG,KAAKY,SAAS,GAAG,IAAI,GAAG,EAAE,GAAGZ,GAAG;IACxCa,GAAG,EAAE,IAAI;IACTd,KAAK,EAAEA,KAAK;IACZe,MAAM,EAAE;EACV,CAAC;AACH","ignoreList":[]}
@@ -0,0 +1,82 @@
{
"name": "safe-push-apply",
"version": "1.0.0",
"description": "Push an array of items into an array, while being robust against prototype modification",
"main": "index.js",
"exports": {
".": "./index.js",
"./package.json": "./package.json"
},
"sideEffects": false,
"scripts": {
"prepack": "npmignore --auto --commentLines=autogenerated",
"version": "auto-changelog && git add CHANGELOG.md",
"postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"",
"prelint": "evalmd README.md",
"lint": "eslint --ext=js,mjs .",
"postlint": "tsc && attw -P",
"prepublish": "not-in-publish || npm run prepublishOnly",
"prepublishOnly": "safe-publish-latest",
"pretest": "npm run lint",
"tests-only": "nyc tape test",
"test": "npm run tests-only",
"posttest": "npx npm@'>= 10.2' audit --production"
},
"keywords": [
"array",
"push",
"apply",
"pushApply",
"safe"
],
"author": "Jordan Harband <ljharb@gmail.com>",
"funding": {
"url": "https://github.com/sponsors/ljharb"
},
"license": "MIT",
"repository": {
"type": "git",
"url": "git+https://github.com/ljharb/safe-push-apply.git"
},
"bugs": {
"url": "https://github.com/ljharb/safe-push-apply/issues"
},
"homepage": "https://github.com/ljharb/safe-push-apply#readme",
"dependencies": {
"es-errors": "^1.3.0",
"isarray": "^2.0.5"
},
"devDependencies": {
"@arethetypeswrong/cli": "^0.17.1",
"@ljharb/eslint-config": "^21.1.1",
"@ljharb/tsconfig": "^0.2.2",
"@types/isarray": "^2.0.3",
"@types/tape": "^5.6.5",
"auto-changelog": "^2.5.0",
"encoding": "^0.1.13",
"eslint": "=8.8.0",
"evalmd": "^0.0.19",
"in-publish": "^2.0.1",
"npmignore": "^0.3.1",
"nyc": "^10.3.2",
"safe-publish-latest": "^2.0.0",
"tape": "^5.9.0",
"typescript": "next"
},
"engines": {
"node": ">= 0.4"
},
"auto-changelog": {
"output": "CHANGELOG.md",
"template": "keepachangelog",
"unreleased": false,
"commitLimit": false,
"backfillLimit": false,
"hideCredit": true
},
"publishConfig": {
"ignore": [
".github/workflows"
]
}
}
Loaded 100 of 35554 files, more files were not shown because too many files have changed in this diff. Show more