@peter.naydenov/cuts 2.0.2 → 2.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.graphify_uncached.txt +1 -0
- package/.opencode/plugins/graphify.js +22 -0
- package/AGENTS.md +8 -0
- package/Changelog.md +9 -0
- package/README.md +154 -1
- package/coverage/lcov-report/index.html +1 -1
- package/coverage/lcov-report/src/findInstructions.js.html +1 -1
- package/coverage/lcov-report/src/index.html +1 -1
- package/coverage/lcov-report/src/main.js.html +1 -1
- package/coverage/lcov-report/src/methods/hide.js.html +1 -1
- package/coverage/lcov-report/src/methods/index.html +1 -1
- package/coverage/lcov-report/src/methods/jump.js.html +1 -1
- package/coverage/lcov-report/src/methods/jumpBack.js.html +1 -1
- package/coverage/lcov-report/src/methods/jumpsReset.js.html +1 -1
- package/coverage/lcov-report/src/methods/listShortcuts.js.html +1 -1
- package/coverage/lcov-report/src/methods/setScenes.js.html +1 -1
- package/coverage/lcov-report/src/methods/show.js.html +1 -1
- package/coverage/lcov-report/src/setInstruction.js.html +1 -1
- package/dist/cuts.umd.js +1 -1
- package/graphify-out/.graphify_python +1 -0
- package/graphify-out/GRAPH_REPORT.md +308 -0
- package/graphify-out/cache/012d3294918720b55e6b92b199990cfc018241eea880e1f6e6a0724aa6e1f17f.json +1 -0
- package/graphify-out/cache/01cec5959c65918486350dcf1673e6e3fc496e3f888d6872533927da64581a04.json +1 -0
- package/graphify-out/cache/0940319c089ade1ec8424e8d1a54cb8b4d8b5398da48bbb44dd68cefe9d33c00.json +1 -0
- package/graphify-out/cache/0da80b47b352499ba03cd5dee2fc281a98f09a19480e622d15faf49157df074b.json +1 -0
- package/graphify-out/cache/0e905bdb9bcd5a94e8d4f53d8c3a5c074283166b302d39436dbb245f2ec35e70.json +1 -0
- package/graphify-out/cache/0fa5cad2f351dcaa7d35b48576dee7f9ac9c5cc4b394b1f0deaff8a180e3c451.json +1 -0
- package/graphify-out/cache/10aa1439c5bfd598b80d729e5ba3b6cfdb58bd2b359f420c292aafc8c035a02d.json +1 -0
- package/graphify-out/cache/131c1daae8abc86c8218622f56273af8b1b9f9fa4aec2998ef825bca0f62913d.json +1 -0
- package/graphify-out/cache/17e5f2beac577cb4a9318ab14e559216c17efa10b9066767965970dbb5303aa8.json +1 -0
- package/graphify-out/cache/1e04390c6e1cff4babe570ffb9ca69c7dc48aedbd5a590844ad0306870c384a4.json +1 -0
- package/graphify-out/cache/240c8091236475ff2ee2cf2f9f9f6e80be1616c8f608aec6f0bd7df848581adc.json +1 -0
- package/graphify-out/cache/24418a06ce214a93595cb57c1a4c951b233e7e8fdc47122e2ba02935970a7266.json +1 -0
- package/graphify-out/cache/2675052ddc9cfa31333f6810c81eb9cfac04a6a627bd897a68963adcfb6a8c08.json +1 -0
- package/graphify-out/cache/309a7e48db971f382ade80198bb1fc2afaa016a36a2a7cfcb2a8538d79061530.json +1 -0
- package/graphify-out/cache/323e2198675ff4fba301afb26c3b188db91039aed029d2b3c4afd659ce75ca92.json +1 -0
- package/graphify-out/cache/3493a990cec8e577d0da3de4a54229b649a63400a4023ca1911c082309e27e7b.json +1 -0
- package/graphify-out/cache/35745072ea817929ae9707d52b4601e63a15233d033c67575cd13f4fef4a6374.json +1 -0
- package/graphify-out/cache/3bb336d107d9e0f7243aaf6249f4218da2af6734736192633943f0fabe04bd11.json +1 -0
- package/graphify-out/cache/4182a1dd2fcfa44f6ccc7615259fc5288fc1c5f23b6e41dd1d31acaad9d9672a.json +1 -0
- package/graphify-out/cache/4b1b786ba42a5f31760aacecaec23d8a430fdc7054d9fc94aeda68e1a814a37b.json +1 -0
- package/graphify-out/cache/53400873bbb9d220df1cd34714577c750185538ca2f43ce726c7e9d2064d9890.json +1 -0
- package/graphify-out/cache/5552036f9715ed1c0e0793131c919739e887f413ef8979efd8dac0d347d26a92.json +1 -0
- package/graphify-out/cache/55f4ffb8c1f3a0a68dd78016df9e1309f481b5942b468abab7f567fc8aa0f2ab.json +1 -0
- package/graphify-out/cache/570424b2534780740fec1c08d7435bb228af7705e3f6e9fa28ee087a6092c916.json +1 -0
- package/graphify-out/cache/573b92c02548ab00fcf9351dfa2c6fe7f401acca2b9315133edc7453e82a25bb.json +1 -0
- package/graphify-out/cache/57c611c887a762e47fff496f1438e35bff2794807b327ace69dc40b4b5126f6c.json +1 -0
- package/graphify-out/cache/682fea1576e6f89f0bbeecab480fdf3a3a15649f6f41b1af6db758248b4669a1.json +1 -0
- package/graphify-out/cache/6ca8a0aa9022e68f010ca8ece5ee0c5ba9616d31aa1716634bcb61fd7c03baf0.json +1 -0
- package/graphify-out/cache/7098a2a328c738b93faea79761188f18a8c8daaf530a590df89f1e3f6ecce7ed.json +1 -0
- package/graphify-out/cache/782b5a020c37aa0cc0163a21d32ea7af9a9677dbbf267a6c109aa9a919e5d79d.json +1 -0
- package/graphify-out/cache/8771f4d3ccb4ae55a13a2d1a452626e0dadb16a146ef0839dd963e42b3decfa2.json +1 -0
- package/graphify-out/cache/93fdbd9b92d3928bec4b31972bc7f458551868ce10157e68b624addbc310e45e.json +1 -0
- package/graphify-out/cache/941ca37c98b5c5e4224d8f28c98d82164fb9e047f551122ed9dd1e172c9ca210.json +1 -0
- package/graphify-out/cache/9603602b27e8453e47faac0e540e17de9e2473d716d2c1399b860d1ede74e649.json +1 -0
- package/graphify-out/cache/965a31d7d62cd7f81146f1c4c39b37535a7b0c720a800856477250781254fc23.json +1 -0
- package/graphify-out/cache/9a192662abf3d936dfc83c16bf18d6a46ac2ce3f16fb493050178eafcf640326.json +1 -0
- package/graphify-out/cache/9a4c098d43c0f0ec653bdfd3b68a482376fdd3a25c31c6b92bb92d8a49ed4de7.json +1 -0
- package/graphify-out/cache/9aec2f693fa17698f1d16683fff1947eab153d1fd788ee25ec4d06f6ba0b8171.json +1 -0
- package/graphify-out/cache/9daaa95737c689bd88ed99b880c7b4add83dfffa17ad6431aade0e8037946ce1.json +1 -0
- package/graphify-out/cache/a12981414bb5c59b6e9ad87b36cb4eb9c1e9b49cb7446ecb2789ab4496d1d4b3.json +1 -0
- package/graphify-out/cache/aa9a32d2538270661b9f591dec199134eb51488f103325c93e8eeb29f6088307.json +1 -0
- package/graphify-out/cache/ae75925bf4fc6a110fa7af9a0a8b20da642d6e61b8ac079b9a843c2e7848d2bf.json +1 -0
- package/graphify-out/cache/b0e7e88b335107d2ebb72524803d5575fc84eeb6c065e5c8dce8e659f59b14ce.json +1 -0
- package/graphify-out/cache/b5bad0c1d525f2d57687ff82e3f52644140625f0bb9a91e2a40bb94f172295ba.json +1 -0
- package/graphify-out/cache/bb9cde14b37ae2b22720974339bda8c8698f8db8e03ae108fc4e0a1b175a5799.json +1 -0
- package/graphify-out/cache/bfb8682a587eb2a75f2de9a6cb68eea52c6791ce763ed9fd370e4186f2ca964d.json +1 -0
- package/graphify-out/cache/c0e0ab86119b69a71d7c07134e3259961c112ac293d1c1976ebdaa975c6634a1.json +1 -0
- package/graphify-out/cache/cbd4d1c99376a1a9cbac38a927bc9bab92bdf6715ca31f99388b02ccab3accc1.json +1 -0
- package/graphify-out/cache/df569c88c4ba775eea79ac5596fe3b70345f3ee7a53459d865e196e0e807d966.json +1 -0
- package/graphify-out/cache/f6feb53a375f42d12de35e3a7d29cc2f3263f9fca0eff30b5f0ea2dd50a4bc7f.json +1 -0
- package/graphify-out/cache/ffc7c58210d00973bed4dc58e0d97fe862129d2dfeba3a60ea643bcb5ae6757f.json +1 -0
- package/graphify-out/cost.json +12 -0
- package/graphify-out/graph.html +266 -0
- package/graphify-out/graph.json +3190 -0
- package/graphify-out/manifest.json +52 -0
- package/opencode.json +6 -0
- package/package.json +21 -21
- package/playwright.config.js +13 -0
- package/test/01-findPosition.test.js +119 -0
- package/test/02-cuts.test.js +412 -0
- package/test-e2e/01-general.test.js +290 -0
- package/test-e2e/index.html +30 -0
- package/test-e2e/node_modules/.package-lock.json +584 -0
- package/test-e2e/node_modules/.vite/deps/@peter__naydenov_log.js +36 -0
- package/test-e2e/node_modules/.vite/deps/@peter__naydenov_log.js.map +1 -0
- package/test-e2e/node_modules/.vite/deps/@peter__naydenov_shortcuts.js +983 -0
- package/test-e2e/node_modules/.vite/deps/@peter__naydenov_shortcuts.js.map +1 -0
- package/test-e2e/node_modules/.vite/deps/@peter__naydenov_visual-controller-for-vue3.js +267 -0
- package/test-e2e/node_modules/.vite/deps/@peter__naydenov_visual-controller-for-vue3.js.map +1 -0
- package/test-e2e/node_modules/.vite/deps/_metadata.json +44 -0
- package/test-e2e/node_modules/.vite/deps/ask-for-promise.js +223 -0
- package/test-e2e/node_modules/.vite/deps/ask-for-promise.js.map +1 -0
- package/test-e2e/node_modules/.vite/deps/package.json +3 -0
- package/test-e2e/node_modules/.vite/deps/vue.js +2 -0
- package/test-e2e/node_modules/.vite/deps/vue.runtime.esm-bundler-DaROHT9e.js +8579 -0
- package/test-e2e/node_modules/.vite/deps/vue.runtime.esm-bundler-DaROHT9e.js.map +1 -0
- package/test-e2e/node_modules/@babel/helper-string-parser/LICENSE +22 -0
- package/test-e2e/node_modules/@babel/helper-string-parser/README.md +19 -0
- package/test-e2e/node_modules/@babel/helper-string-parser/lib/index.js +295 -0
- package/test-e2e/node_modules/@babel/helper-string-parser/lib/index.js.map +1 -0
- package/test-e2e/node_modules/@babel/helper-string-parser/package.json +31 -0
- package/test-e2e/node_modules/@babel/helper-validator-identifier/LICENSE +22 -0
- package/test-e2e/node_modules/@babel/helper-validator-identifier/README.md +19 -0
- package/test-e2e/node_modules/@babel/helper-validator-identifier/lib/identifier.js +70 -0
- package/test-e2e/node_modules/@babel/helper-validator-identifier/lib/identifier.js.map +1 -0
- package/test-e2e/node_modules/@babel/helper-validator-identifier/lib/index.js +57 -0
- package/test-e2e/node_modules/@babel/helper-validator-identifier/lib/index.js.map +1 -0
- package/test-e2e/node_modules/@babel/helper-validator-identifier/lib/keyword.js +35 -0
- package/test-e2e/node_modules/@babel/helper-validator-identifier/lib/keyword.js.map +1 -0
- package/test-e2e/node_modules/@babel/helper-validator-identifier/package.json +31 -0
- package/test-e2e/node_modules/@babel/parser/CHANGELOG.md +1073 -0
- package/test-e2e/node_modules/@babel/parser/LICENSE +19 -0
- package/test-e2e/node_modules/@babel/parser/README.md +19 -0
- package/test-e2e/node_modules/@babel/parser/bin/babel-parser.js +15 -0
- package/test-e2e/node_modules/@babel/parser/lib/index.js +14582 -0
- package/test-e2e/node_modules/@babel/parser/lib/index.js.map +1 -0
- package/test-e2e/node_modules/@babel/parser/package.json +50 -0
- package/test-e2e/node_modules/@babel/parser/typings/babel-parser.d.ts +262 -0
- package/test-e2e/node_modules/@babel/types/LICENSE +22 -0
- package/test-e2e/node_modules/@babel/types/README.md +19 -0
- package/test-e2e/node_modules/@babel/types/lib/asserts/assertNode.js +16 -0
- package/test-e2e/node_modules/@babel/types/lib/asserts/assertNode.js.map +1 -0
- package/test-e2e/node_modules/@babel/types/lib/asserts/generated/index.js +1251 -0
- package/test-e2e/node_modules/@babel/types/lib/asserts/generated/index.js.map +1 -0
- package/test-e2e/node_modules/@babel/types/lib/ast-types/generated/index.js +3 -0
- package/test-e2e/node_modules/@babel/types/lib/ast-types/generated/index.js.map +1 -0
- package/test-e2e/node_modules/@babel/types/lib/builders/flow/createFlowUnionType.js +18 -0
- package/test-e2e/node_modules/@babel/types/lib/builders/flow/createFlowUnionType.js.map +1 -0
- package/test-e2e/node_modules/@babel/types/lib/builders/flow/createTypeAnnotationBasedOnTypeof.js +31 -0
- package/test-e2e/node_modules/@babel/types/lib/builders/flow/createTypeAnnotationBasedOnTypeof.js.map +1 -0
- package/test-e2e/node_modules/@babel/types/lib/builders/generated/index.js +29 -0
- package/test-e2e/node_modules/@babel/types/lib/builders/generated/index.js.map +1 -0
- package/test-e2e/node_modules/@babel/types/lib/builders/generated/lowercase.js +2902 -0
- package/test-e2e/node_modules/@babel/types/lib/builders/generated/lowercase.js.map +1 -0
- package/test-e2e/node_modules/@babel/types/lib/builders/generated/uppercase.js +272 -0
- package/test-e2e/node_modules/@babel/types/lib/builders/generated/uppercase.js.map +1 -0
- package/test-e2e/node_modules/@babel/types/lib/builders/productions.js +12 -0
- package/test-e2e/node_modules/@babel/types/lib/builders/productions.js.map +1 -0
- package/test-e2e/node_modules/@babel/types/lib/builders/react/buildChildren.js +24 -0
- package/test-e2e/node_modules/@babel/types/lib/builders/react/buildChildren.js.map +1 -0
- package/test-e2e/node_modules/@babel/types/lib/builders/typescript/createTSUnionType.js +22 -0
- package/test-e2e/node_modules/@babel/types/lib/builders/typescript/createTSUnionType.js.map +1 -0
- package/test-e2e/node_modules/@babel/types/lib/builders/validateNode.js +21 -0
- package/test-e2e/node_modules/@babel/types/lib/builders/validateNode.js.map +1 -0
- package/test-e2e/node_modules/@babel/types/lib/clone/clone.js +12 -0
- package/test-e2e/node_modules/@babel/types/lib/clone/clone.js.map +1 -0
- package/test-e2e/node_modules/@babel/types/lib/clone/cloneDeep.js +12 -0
- package/test-e2e/node_modules/@babel/types/lib/clone/cloneDeep.js.map +1 -0
- package/test-e2e/node_modules/@babel/types/lib/clone/cloneDeepWithoutLoc.js +12 -0
- package/test-e2e/node_modules/@babel/types/lib/clone/cloneDeepWithoutLoc.js.map +1 -0
- package/test-e2e/node_modules/@babel/types/lib/clone/cloneNode.js +107 -0
- package/test-e2e/node_modules/@babel/types/lib/clone/cloneNode.js.map +1 -0
- package/test-e2e/node_modules/@babel/types/lib/clone/cloneWithoutLoc.js +12 -0
- package/test-e2e/node_modules/@babel/types/lib/clone/cloneWithoutLoc.js.map +1 -0
- package/test-e2e/node_modules/@babel/types/lib/comments/addComment.js +15 -0
- package/test-e2e/node_modules/@babel/types/lib/comments/addComment.js.map +1 -0
- package/test-e2e/node_modules/@babel/types/lib/comments/addComments.js +22 -0
- package/test-e2e/node_modules/@babel/types/lib/comments/addComments.js.map +1 -0
- package/test-e2e/node_modules/@babel/types/lib/comments/inheritInnerComments.js +12 -0
- package/test-e2e/node_modules/@babel/types/lib/comments/inheritInnerComments.js.map +1 -0
- package/test-e2e/node_modules/@babel/types/lib/comments/inheritLeadingComments.js +12 -0
- package/test-e2e/node_modules/@babel/types/lib/comments/inheritLeadingComments.js.map +1 -0
- package/test-e2e/node_modules/@babel/types/lib/comments/inheritTrailingComments.js +12 -0
- package/test-e2e/node_modules/@babel/types/lib/comments/inheritTrailingComments.js.map +1 -0
- package/test-e2e/node_modules/@babel/types/lib/comments/inheritsComments.js +17 -0
- package/test-e2e/node_modules/@babel/types/lib/comments/inheritsComments.js.map +1 -0
- package/test-e2e/node_modules/@babel/types/lib/comments/removeComments.js +15 -0
- package/test-e2e/node_modules/@babel/types/lib/comments/removeComments.js.map +1 -0
- package/test-e2e/node_modules/@babel/types/lib/constants/generated/index.js +60 -0
- package/test-e2e/node_modules/@babel/types/lib/constants/generated/index.js.map +1 -0
- package/test-e2e/node_modules/@babel/types/lib/constants/index.js +31 -0
- package/test-e2e/node_modules/@babel/types/lib/constants/index.js.map +1 -0
- package/test-e2e/node_modules/@babel/types/lib/converters/ensureBlock.js +14 -0
- package/test-e2e/node_modules/@babel/types/lib/converters/ensureBlock.js.map +1 -0
- package/test-e2e/node_modules/@babel/types/lib/converters/gatherSequenceExpressions.js +65 -0
- package/test-e2e/node_modules/@babel/types/lib/converters/gatherSequenceExpressions.js.map +1 -0
- package/test-e2e/node_modules/@babel/types/lib/converters/toBindingIdentifierName.js +14 -0
- package/test-e2e/node_modules/@babel/types/lib/converters/toBindingIdentifierName.js.map +1 -0
- package/test-e2e/node_modules/@babel/types/lib/converters/toBlock.js +29 -0
- package/test-e2e/node_modules/@babel/types/lib/converters/toBlock.js.map +1 -0
- package/test-e2e/node_modules/@babel/types/lib/converters/toComputedKey.js +14 -0
- package/test-e2e/node_modules/@babel/types/lib/converters/toComputedKey.js.map +1 -0
- package/test-e2e/node_modules/@babel/types/lib/converters/toExpression.js +28 -0
- package/test-e2e/node_modules/@babel/types/lib/converters/toExpression.js.map +1 -0
- package/test-e2e/node_modules/@babel/types/lib/converters/toIdentifier.js +25 -0
- package/test-e2e/node_modules/@babel/types/lib/converters/toIdentifier.js.map +1 -0
- package/test-e2e/node_modules/@babel/types/lib/converters/toKeyAlias.js +38 -0
- package/test-e2e/node_modules/@babel/types/lib/converters/toKeyAlias.js.map +1 -0
- package/test-e2e/node_modules/@babel/types/lib/converters/toSequenceExpression.js +19 -0
- package/test-e2e/node_modules/@babel/types/lib/converters/toSequenceExpression.js.map +1 -0
- package/test-e2e/node_modules/@babel/types/lib/converters/toStatement.js +39 -0
- package/test-e2e/node_modules/@babel/types/lib/converters/toStatement.js.map +1 -0
- package/test-e2e/node_modules/@babel/types/lib/converters/valueToNode.js +89 -0
- package/test-e2e/node_modules/@babel/types/lib/converters/valueToNode.js.map +1 -0
- package/test-e2e/node_modules/@babel/types/lib/definitions/core.js +1725 -0
- package/test-e2e/node_modules/@babel/types/lib/definitions/core.js.map +1 -0
- package/test-e2e/node_modules/@babel/types/lib/definitions/deprecated-aliases.js +11 -0
- package/test-e2e/node_modules/@babel/types/lib/definitions/deprecated-aliases.js.map +1 -0
- package/test-e2e/node_modules/@babel/types/lib/definitions/experimental.js +124 -0
- package/test-e2e/node_modules/@babel/types/lib/definitions/experimental.js.map +1 -0
- package/test-e2e/node_modules/@babel/types/lib/definitions/flow.js +495 -0
- package/test-e2e/node_modules/@babel/types/lib/definitions/flow.js.map +1 -0
- package/test-e2e/node_modules/@babel/types/lib/definitions/index.js +106 -0
- package/test-e2e/node_modules/@babel/types/lib/definitions/index.js.map +1 -0
- package/test-e2e/node_modules/@babel/types/lib/definitions/jsx.js +157 -0
- package/test-e2e/node_modules/@babel/types/lib/definitions/jsx.js.map +1 -0
- package/test-e2e/node_modules/@babel/types/lib/definitions/misc.js +31 -0
- package/test-e2e/node_modules/@babel/types/lib/definitions/misc.js.map +1 -0
- package/test-e2e/node_modules/@babel/types/lib/definitions/placeholders.js +27 -0
- package/test-e2e/node_modules/@babel/types/lib/definitions/placeholders.js.map +1 -0
- package/test-e2e/node_modules/@babel/types/lib/definitions/typescript.js +528 -0
- package/test-e2e/node_modules/@babel/types/lib/definitions/typescript.js.map +1 -0
- package/test-e2e/node_modules/@babel/types/lib/definitions/utils.js +296 -0
- package/test-e2e/node_modules/@babel/types/lib/definitions/utils.js.map +1 -0
- package/test-e2e/node_modules/@babel/types/lib/index-legacy.d.ts +2797 -0
- package/test-e2e/node_modules/@babel/types/lib/index.d.ts +3617 -0
- package/test-e2e/node_modules/@babel/types/lib/index.js +582 -0
- package/test-e2e/node_modules/@babel/types/lib/index.js.flow +2650 -0
- package/test-e2e/node_modules/@babel/types/lib/index.js.map +1 -0
- package/test-e2e/node_modules/@babel/types/lib/modifications/appendToMemberExpression.js +15 -0
- package/test-e2e/node_modules/@babel/types/lib/modifications/appendToMemberExpression.js.map +1 -0
- package/test-e2e/node_modules/@babel/types/lib/modifications/flow/removeTypeDuplicates.js +65 -0
- package/test-e2e/node_modules/@babel/types/lib/modifications/flow/removeTypeDuplicates.js.map +1 -0
- package/test-e2e/node_modules/@babel/types/lib/modifications/inherits.js +28 -0
- package/test-e2e/node_modules/@babel/types/lib/modifications/inherits.js.map +1 -0
- package/test-e2e/node_modules/@babel/types/lib/modifications/prependToMemberExpression.js +17 -0
- package/test-e2e/node_modules/@babel/types/lib/modifications/prependToMemberExpression.js.map +1 -0
- package/test-e2e/node_modules/@babel/types/lib/modifications/removeProperties.js +24 -0
- package/test-e2e/node_modules/@babel/types/lib/modifications/removeProperties.js.map +1 -0
- package/test-e2e/node_modules/@babel/types/lib/modifications/removePropertiesDeep.js +14 -0
- package/test-e2e/node_modules/@babel/types/lib/modifications/removePropertiesDeep.js.map +1 -0
- package/test-e2e/node_modules/@babel/types/lib/modifications/typescript/removeTypeDuplicates.js +66 -0
- package/test-e2e/node_modules/@babel/types/lib/modifications/typescript/removeTypeDuplicates.js.map +1 -0
- package/test-e2e/node_modules/@babel/types/lib/retrievers/getAssignmentIdentifiers.js +48 -0
- package/test-e2e/node_modules/@babel/types/lib/retrievers/getAssignmentIdentifiers.js.map +1 -0
- package/test-e2e/node_modules/@babel/types/lib/retrievers/getBindingIdentifiers.js +102 -0
- package/test-e2e/node_modules/@babel/types/lib/retrievers/getBindingIdentifiers.js.map +1 -0
- package/test-e2e/node_modules/@babel/types/lib/retrievers/getFunctionName.js +63 -0
- package/test-e2e/node_modules/@babel/types/lib/retrievers/getFunctionName.js.map +1 -0
- package/test-e2e/node_modules/@babel/types/lib/retrievers/getOuterBindingIdentifiers.js +13 -0
- package/test-e2e/node_modules/@babel/types/lib/retrievers/getOuterBindingIdentifiers.js.map +1 -0
- package/test-e2e/node_modules/@babel/types/lib/traverse/traverse.js +50 -0
- package/test-e2e/node_modules/@babel/types/lib/traverse/traverse.js.map +1 -0
- package/test-e2e/node_modules/@babel/types/lib/traverse/traverseFast.js +40 -0
- package/test-e2e/node_modules/@babel/types/lib/traverse/traverseFast.js.map +1 -0
- package/test-e2e/node_modules/@babel/types/lib/utils/deprecationWarning.js +44 -0
- package/test-e2e/node_modules/@babel/types/lib/utils/deprecationWarning.js.map +1 -0
- package/test-e2e/node_modules/@babel/types/lib/utils/inherit.js +13 -0
- package/test-e2e/node_modules/@babel/types/lib/utils/inherit.js.map +1 -0
- package/test-e2e/node_modules/@babel/types/lib/utils/react/cleanJSXElementLiteralChild.js +40 -0
- package/test-e2e/node_modules/@babel/types/lib/utils/react/cleanJSXElementLiteralChild.js.map +1 -0
- package/test-e2e/node_modules/@babel/types/lib/utils/shallowEqual.js +17 -0
- package/test-e2e/node_modules/@babel/types/lib/utils/shallowEqual.js.map +1 -0
- package/test-e2e/node_modules/@babel/types/lib/validators/buildMatchMemberExpression.js +13 -0
- package/test-e2e/node_modules/@babel/types/lib/validators/buildMatchMemberExpression.js.map +1 -0
- package/test-e2e/node_modules/@babel/types/lib/validators/generated/index.js +2797 -0
- package/test-e2e/node_modules/@babel/types/lib/validators/generated/index.js.map +1 -0
- package/test-e2e/node_modules/@babel/types/lib/validators/is.js +27 -0
- package/test-e2e/node_modules/@babel/types/lib/validators/is.js.map +1 -0
- package/test-e2e/node_modules/@babel/types/lib/validators/isBinding.js +27 -0
- package/test-e2e/node_modules/@babel/types/lib/validators/isBinding.js.map +1 -0
- package/test-e2e/node_modules/@babel/types/lib/validators/isBlockScoped.js +13 -0
- package/test-e2e/node_modules/@babel/types/lib/validators/isBlockScoped.js.map +1 -0
- package/test-e2e/node_modules/@babel/types/lib/validators/isImmutable.js +21 -0
- package/test-e2e/node_modules/@babel/types/lib/validators/isImmutable.js.map +1 -0
- package/test-e2e/node_modules/@babel/types/lib/validators/isLet.js +13 -0
- package/test-e2e/node_modules/@babel/types/lib/validators/isLet.js.map +1 -0
- package/test-e2e/node_modules/@babel/types/lib/validators/isNode.js +12 -0
- package/test-e2e/node_modules/@babel/types/lib/validators/isNode.js.map +1 -0
- package/test-e2e/node_modules/@babel/types/lib/validators/isNodesEquivalent.js +57 -0
- package/test-e2e/node_modules/@babel/types/lib/validators/isNodesEquivalent.js.map +1 -0
- package/test-e2e/node_modules/@babel/types/lib/validators/isPlaceholderType.js +15 -0
- package/test-e2e/node_modules/@babel/types/lib/validators/isPlaceholderType.js.map +1 -0
- package/test-e2e/node_modules/@babel/types/lib/validators/isReferenced.js +96 -0
- package/test-e2e/node_modules/@babel/types/lib/validators/isReferenced.js.map +1 -0
- package/test-e2e/node_modules/@babel/types/lib/validators/isScope.js +18 -0
- package/test-e2e/node_modules/@babel/types/lib/validators/isScope.js.map +1 -0
- package/test-e2e/node_modules/@babel/types/lib/validators/isSpecifierDefault.js +14 -0
- package/test-e2e/node_modules/@babel/types/lib/validators/isSpecifierDefault.js.map +1 -0
- package/test-e2e/node_modules/@babel/types/lib/validators/isType.js +17 -0
- package/test-e2e/node_modules/@babel/types/lib/validators/isType.js.map +1 -0
- package/test-e2e/node_modules/@babel/types/lib/validators/isValidES3Identifier.js +13 -0
- package/test-e2e/node_modules/@babel/types/lib/validators/isValidES3Identifier.js.map +1 -0
- package/test-e2e/node_modules/@babel/types/lib/validators/isValidIdentifier.js +18 -0
- package/test-e2e/node_modules/@babel/types/lib/validators/isValidIdentifier.js.map +1 -0
- package/test-e2e/node_modules/@babel/types/lib/validators/isVar.js +15 -0
- package/test-e2e/node_modules/@babel/types/lib/validators/isVar.js.map +1 -0
- package/test-e2e/node_modules/@babel/types/lib/validators/matchesPattern.js +44 -0
- package/test-e2e/node_modules/@babel/types/lib/validators/matchesPattern.js.map +1 -0
- package/test-e2e/node_modules/@babel/types/lib/validators/react/isCompatTag.js +11 -0
- package/test-e2e/node_modules/@babel/types/lib/validators/react/isCompatTag.js.map +1 -0
- package/test-e2e/node_modules/@babel/types/lib/validators/react/isReactComponent.js +11 -0
- package/test-e2e/node_modules/@babel/types/lib/validators/react/isReactComponent.js.map +1 -0
- package/test-e2e/node_modules/@babel/types/lib/validators/validate.js +42 -0
- package/test-e2e/node_modules/@babel/types/lib/validators/validate.js.map +1 -0
- package/test-e2e/node_modules/@babel/types/package.json +39 -0
- package/test-e2e/node_modules/@jridgewell/sourcemap-codec/LICENSE +19 -0
- package/test-e2e/node_modules/@jridgewell/sourcemap-codec/README.md +264 -0
- package/test-e2e/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.mjs +423 -0
- package/test-e2e/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.mjs.map +6 -0
- package/test-e2e/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.umd.js +464 -0
- package/test-e2e/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.umd.js.map +6 -0
- package/test-e2e/node_modules/@jridgewell/sourcemap-codec/package.json +63 -0
- package/test-e2e/node_modules/@jridgewell/sourcemap-codec/src/scopes.ts +345 -0
- package/test-e2e/node_modules/@jridgewell/sourcemap-codec/src/sourcemap-codec.ts +111 -0
- package/test-e2e/node_modules/@jridgewell/sourcemap-codec/src/strings.ts +65 -0
- package/test-e2e/node_modules/@jridgewell/sourcemap-codec/src/vlq.ts +55 -0
- package/test-e2e/node_modules/@jridgewell/sourcemap-codec/types/scopes.d.cts +50 -0
- package/test-e2e/node_modules/@jridgewell/sourcemap-codec/types/scopes.d.cts.map +1 -0
- package/test-e2e/node_modules/@jridgewell/sourcemap-codec/types/scopes.d.mts +50 -0
- package/test-e2e/node_modules/@jridgewell/sourcemap-codec/types/scopes.d.mts.map +1 -0
- package/test-e2e/node_modules/@jridgewell/sourcemap-codec/types/sourcemap-codec.d.cts +9 -0
- package/test-e2e/node_modules/@jridgewell/sourcemap-codec/types/sourcemap-codec.d.cts.map +1 -0
- package/test-e2e/node_modules/@jridgewell/sourcemap-codec/types/sourcemap-codec.d.mts +9 -0
- package/test-e2e/node_modules/@jridgewell/sourcemap-codec/types/sourcemap-codec.d.mts.map +1 -0
- package/test-e2e/node_modules/@jridgewell/sourcemap-codec/types/strings.d.cts +16 -0
- package/test-e2e/node_modules/@jridgewell/sourcemap-codec/types/strings.d.cts.map +1 -0
- package/test-e2e/node_modules/@jridgewell/sourcemap-codec/types/strings.d.mts +16 -0
- package/test-e2e/node_modules/@jridgewell/sourcemap-codec/types/strings.d.mts.map +1 -0
- package/test-e2e/node_modules/@jridgewell/sourcemap-codec/types/vlq.d.cts +7 -0
- package/test-e2e/node_modules/@jridgewell/sourcemap-codec/types/vlq.d.cts.map +1 -0
- package/test-e2e/node_modules/@jridgewell/sourcemap-codec/types/vlq.d.mts +7 -0
- package/test-e2e/node_modules/@jridgewell/sourcemap-codec/types/vlq.d.mts.map +1 -0
- package/test-e2e/node_modules/@oxc-project/types/LICENSE +22 -0
- package/test-e2e/node_modules/@oxc-project/types/README.md +3 -0
- package/test-e2e/node_modules/@oxc-project/types/package.json +26 -0
- package/test-e2e/node_modules/@oxc-project/types/types.d.ts +1912 -0
- package/test-e2e/node_modules/@peter.naydenov/notice/.github/ISSUE_TEMPLATE/bug_report.md +32 -0
- package/test-e2e/node_modules/@peter.naydenov/notice/.github/ISSUE_TEMPLATE/feature_request.md +20 -0
- package/test-e2e/node_modules/@peter.naydenov/notice/CODE_OF_CONDUCT.md +128 -0
- package/test-e2e/node_modules/@peter.naydenov/notice/Changelog.md +88 -0
- package/test-e2e/node_modules/@peter.naydenov/notice/LICENSE +21 -0
- package/test-e2e/node_modules/@peter.naydenov/notice/README.md +294 -0
- package/test-e2e/node_modules/@peter.naydenov/notice/SECURITY.md +18 -0
- package/test-e2e/node_modules/@peter.naydenov/notice/coverage/lcov-report/base.css +224 -0
- package/test-e2e/node_modules/@peter.naydenov/notice/coverage/lcov-report/block-navigation.js +87 -0
- package/test-e2e/node_modules/@peter.naydenov/notice/coverage/lcov-report/favicon.png +0 -0
- package/test-e2e/node_modules/@peter.naydenov/notice/coverage/lcov-report/index.html +116 -0
- package/test-e2e/node_modules/@peter.naydenov/notice/coverage/lcov-report/main.js.html +592 -0
- package/test-e2e/node_modules/@peter.naydenov/notice/coverage/lcov-report/prettify.css +1 -0
- package/test-e2e/node_modules/@peter.naydenov/notice/coverage/lcov-report/prettify.js +2 -0
- package/test-e2e/node_modules/@peter.naydenov/notice/coverage/lcov-report/sort-arrow-sprite.png +0 -0
- package/test-e2e/node_modules/@peter.naydenov/notice/coverage/lcov-report/sorter.js +196 -0
- package/test-e2e/node_modules/@peter.naydenov/notice/coverage/lcov.info +246 -0
- package/test-e2e/node_modules/@peter.naydenov/notice/coverage/tmp/coverage-46509-1760816753149-0.json +1 -0
- package/test-e2e/node_modules/@peter.naydenov/notice/coverage/tmp/coverage-46510-1760816753116-0.json +1 -0
- package/test-e2e/node_modules/@peter.naydenov/notice/dist/notice.cjs +1 -0
- package/test-e2e/node_modules/@peter.naydenov/notice/dist/notice.esm.mjs +1 -0
- package/test-e2e/node_modules/@peter.naydenov/notice/dist/notice.umd.js +1 -0
- package/test-e2e/node_modules/@peter.naydenov/notice/notice-desk.png +0 -0
- package/test-e2e/node_modules/@peter.naydenov/notice/package.json +64 -0
- package/test-e2e/node_modules/@peter.naydenov/notice/rollup.config.js +37 -0
- package/test-e2e/node_modules/@peter.naydenov/notice/src/main.js +168 -0
- package/test-e2e/node_modules/@peter.naydenov/notice/tsconfig.json +11 -0
- package/test-e2e/node_modules/@peter.naydenov/notice/types/main.d.ts +12 -0
- package/test-e2e/node_modules/@peter.naydenov/notice/types/main.d.ts.map +1 -0
- package/test-e2e/node_modules/@peter.naydenov/notice/types/src/main.d.ts +12 -0
- package/test-e2e/node_modules/@peter.naydenov/notice/types/src/main.d.ts.map +1 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/API.md +939 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/CODE_OF_CONDUCT.md +84 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/CONTRIBUTING.md +476 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/Changelog.md +217 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/How.to.create.plugins.md +929 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/LICENSE +21 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/Migration.guide.md +176 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/README-v.2.x.x.md +375 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/README.md +900 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/dist/main.d.ts +172 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/dist/methods/_normalizeWithPlugins.d.ts +64 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/dist/methods/_readShortcutWithPlugins.d.ts +9 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/dist/methods/_setupPlugin.d.ts +9 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/dist/methods/_systemAction.d.ts +9 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/dist/methods/changeContext.d.ts +9 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/dist/methods/index.d.ts +19 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/dist/methods/listShortcuts.d.ts +2 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/dist/methods/load.d.ts +9 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/dist/methods/unload.d.ts +9 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/dist/plugins/click/_findTarget.d.ts +10 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/dist/plugins/click/_listenDOM.d.ts +78 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/dist/plugins/click/_normalizeShortcutName.d.ts +8 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/dist/plugins/click/_readClickEvent.d.ts +2 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/dist/plugins/click/_registerShortcutEvents.d.ts +28 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/dist/plugins/click/index.d.ts +16 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/dist/plugins/form/_defaults.d.ts +17 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/dist/plugins/form/_listenDOM.d.ts +68 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/dist/plugins/form/_normalizeShortcutName.d.ts +2 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/dist/plugins/form/_registerShortcutEvents.d.ts +96 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/dist/plugins/form/index.d.ts +9 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/dist/plugins/hover/_findTarget.d.ts +10 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/dist/plugins/hover/_listenDOM.d.ts +68 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/dist/plugins/hover/_normalizeShortcutName.d.ts +2 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/dist/plugins/hover/_registerShortcutEvents.d.ts +28 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/dist/plugins/hover/index.d.ts +14 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/dist/plugins/key/_listenDOM.d.ts +63 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/dist/plugins/key/_normalizeShortcutName.d.ts +2 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/dist/plugins/key/_readKeyEvent.d.ts +2 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/dist/plugins/key/_registerShortcutEvents.d.ts +28 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/dist/plugins/key/_specialChars.d.ts +7 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/dist/plugins/key/index.d.ts +14 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/dist/plugins/scroll/_listenDOM.d.ts +58 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/dist/plugins/scroll/_normalizeShortcutName.d.ts +2 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/dist/plugins/scroll/_registerShortcutEvents.d.ts +28 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/dist/plugins/scroll/index.d.ts +16 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/dist/shortcuts.cjs +1 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/dist/shortcuts.esm.mjs +1 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/dist/shortcuts.umd.js +1 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/dist/src/main.d.ts +172 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/dist/src/methods/_normalizeWithPlugins.d.ts +64 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/dist/src/methods/_readShortcutWithPlugins.d.ts +9 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/dist/src/methods/_setupPlugin.d.ts +9 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/dist/src/methods/_systemAction.d.ts +9 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/dist/src/methods/changeContext.d.ts +9 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/dist/src/methods/index.d.ts +19 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/dist/src/methods/listShortcuts.d.ts +2 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/dist/src/methods/load.d.ts +9 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/dist/src/methods/unload.d.ts +9 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/dist/src/plugins/click/_findTarget.d.ts +10 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/dist/src/plugins/click/_listenDOM.d.ts +78 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/dist/src/plugins/click/_normalizeShortcutName.d.ts +8 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/dist/src/plugins/click/_readClickEvent.d.ts +2 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/dist/src/plugins/click/_registerShortcutEvents.d.ts +28 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/dist/src/plugins/click/index.d.ts +16 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/dist/src/plugins/form/_defaults.d.ts +17 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/dist/src/plugins/form/_listenDOM.d.ts +68 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/dist/src/plugins/form/_normalizeShortcutName.d.ts +2 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/dist/src/plugins/form/_registerShortcutEvents.d.ts +96 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/dist/src/plugins/form/index.d.ts +9 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/dist/src/plugins/hover/_findTarget.d.ts +10 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/dist/src/plugins/hover/_listenDOM.d.ts +68 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/dist/src/plugins/hover/_normalizeShortcutName.d.ts +2 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/dist/src/plugins/hover/_registerShortcutEvents.d.ts +28 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/dist/src/plugins/hover/index.d.ts +14 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/dist/src/plugins/key/_listenDOM.d.ts +63 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/dist/src/plugins/key/_normalizeShortcutName.d.ts +2 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/dist/src/plugins/key/_readKeyEvent.d.ts +2 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/dist/src/plugins/key/_registerShortcutEvents.d.ts +28 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/dist/src/plugins/key/_specialChars.d.ts +7 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/dist/src/plugins/key/index.d.ts +14 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/dist/src/plugins/scroll/_listenDOM.d.ts +58 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/dist/src/plugins/scroll/_normalizeShortcutName.d.ts +2 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/dist/src/plugins/scroll/_registerShortcutEvents.d.ts +28 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/dist/src/plugins/scroll/index.d.ts +16 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/eslint.config.js +80 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/html/assets/index-COTh6lXR.css +1 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/html/assets/index-DOkKC3NI.js +53 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/html/bg.png +0 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/html/favicon.ico +0 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/html/favicon.svg +5 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/html/html.meta.json.gz +0 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/html/index.html +32 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/index.html +126 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/javascript.svg +1 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/jsconfig.json +10 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/package.json +66 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/public/vite.svg +1 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/rollup.config.js +40 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/shortcuts.png +0 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/src/main.js +302 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/src/methods/_normalizeWithPlugins.js +49 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/src/methods/_readShortcutWithPlugins.js +32 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/src/methods/_setupPlugin.js +93 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/src/methods/_systemAction.js +33 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/src/methods/changeContext.js +68 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/src/methods/index.js +25 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/src/methods/listShortcuts.js +34 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/src/methods/load.js +58 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/src/methods/unload.js +38 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/src/plugins/click/_findTarget.js +26 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/src/plugins/click/_listenDOM.js +165 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/src/plugins/click/_normalizeShortcutName.js +51 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/src/plugins/click/_readClickEvent.js +24 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/src/plugins/click/_registerShortcutEvents.js +58 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/src/plugins/click/index.js +67 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/src/plugins/form/_defaults.js +28 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/src/plugins/form/_listenDOM.js +127 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/src/plugins/form/_normalizeShortcutName.js +21 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/src/plugins/form/_registerShortcutEvents.js +147 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/src/plugins/form/index.js +58 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/src/plugins/hover/_findTarget.js +26 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/src/plugins/hover/_listenDOM.js +154 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/src/plugins/hover/_normalizeShortcutName.js +21 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/src/plugins/hover/_registerShortcutEvents.js +51 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/src/plugins/hover/index.js +71 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/src/plugins/key/_listenDOM.js +186 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/src/plugins/key/_normalizeShortcutName.js +32 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/src/plugins/key/_readKeyEvent.js +28 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/src/plugins/key/_registerShortcutEvents.js +57 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/src/plugins/key/_specialChars.js +43 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/src/plugins/key/index.js +67 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/src/plugins/scroll/_listenDOM.js +141 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/src/plugins/scroll/_normalizeShortcutName.js +21 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/src/plugins/scroll/_registerShortcutEvents.js +50 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/src/plugins/scroll/index.js +61 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/style.css +97 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/test/01-general.test.js +275 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/test/02-key.test.js +473 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/test/03-click.test.js +596 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/test/04-form.test.js +327 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/test/05-hover.test.js +463 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/test/06-scroll.test.js +374 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/test-helpers/Block.jsx +15 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/test-helpers/setup.js +18 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/test-helpers/style.css +26 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/test-helpers/wait.js +8 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/tsconfig.json +24 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/vite.config.js +7 -0
- package/test-e2e/node_modules/@peter.naydenov/shortcuts/vitest.config.js +23 -0
- package/test-e2e/node_modules/@peter.naydenov/visual-controller-for-vue3/LICENSE +21 -0
- package/test-e2e/node_modules/@peter.naydenov/visual-controller-for-vue3/cypress/fixtures/example.json +5 -0
- package/test-e2e/node_modules/@peter.naydenov/visual-controller-for-vue3/cypress/support/commands.js +25 -0
- package/test-e2e/node_modules/@peter.naydenov/visual-controller-for-vue3/cypress/support/component-index.html +12 -0
- package/test-e2e/node_modules/@peter.naydenov/visual-controller-for-vue3/cypress/support/component.js +27 -0
- package/{cypress.config.mjs → test-e2e/node_modules/@peter.naydenov/visual-controller-for-vue3/cypress.config.js} +2 -3
- package/test-e2e/node_modules/@peter.naydenov/visual-controller-for-vue3/dist/visual-controller-for-vue3.cjs +1 -0
- package/test-e2e/node_modules/@peter.naydenov/visual-controller-for-vue3/dist/visual-controller-for-vue3.esm.mjs +1 -0
- package/test-e2e/node_modules/@peter.naydenov/visual-controller-for-vue3/dist/visual-controller-for-vue3.umd.js +1 -0
- package/test-e2e/node_modules/@peter.naydenov/visual-controller-for-vue3/index.html +13 -0
- package/test-e2e/node_modules/@peter.naydenov/visual-controller-for-vue3/package.json +43 -0
- package/test-e2e/node_modules/@peter.naydenov/visual-controller-for-vue3/public/vite.svg +1 -0
- package/test-e2e/node_modules/@peter.naydenov/visual-controller-for-vue3/readme.md +233 -0
- package/test-e2e/node_modules/@peter.naydenov/visual-controller-for-vue3/rollup.config.js +42 -0
- package/test-e2e/node_modules/@peter.naydenov/visual-controller-for-vue3/src/App.vue +44 -0
- package/test-e2e/node_modules/@peter.naydenov/visual-controller-for-vue3/src/assets/vue.svg +1 -0
- package/test-e2e/node_modules/@peter.naydenov/visual-controller-for-vue3/src/components/HelloWorld.vue +26 -0
- package/test-e2e/node_modules/@peter.naydenov/visual-controller-for-vue3/src/main.js +101 -0
- package/test-e2e/node_modules/@peter.naydenov/visual-controller-for-vue3/src/style.css +90 -0
- package/test-e2e/node_modules/@peter.naydenov/visual-controller-for-vue3/test/01_general.cy.js +98 -0
- package/test-e2e/node_modules/@peter.naydenov/visual-controller-for-vue3/vite.config.js +7 -0
- package/test-e2e/node_modules/@rolldown/binding-darwin-arm64/README.md +3 -0
- package/test-e2e/node_modules/@rolldown/binding-darwin-arm64/package.json +37 -0
- package/test-e2e/node_modules/@rolldown/binding-darwin-arm64/rolldown-binding.darwin-arm64.node +0 -0
- package/test-e2e/node_modules/@rolldown/pluginutils/LICENSE +25 -0
- package/test-e2e/node_modules/@rolldown/pluginutils/README.md +77 -0
- package/test-e2e/node_modules/@rolldown/pluginutils/dist/filter/composable-filters.d.ts +90 -0
- package/test-e2e/node_modules/@rolldown/pluginutils/dist/filter/composable-filters.js +256 -0
- package/test-e2e/node_modules/@rolldown/pluginutils/dist/filter/filter-vite-plugins.d.ts +28 -0
- package/test-e2e/node_modules/@rolldown/pluginutils/dist/filter/filter-vite-plugins.js +75 -0
- package/test-e2e/node_modules/@rolldown/pluginutils/dist/filter/index.d.ts +3 -0
- package/test-e2e/node_modules/@rolldown/pluginutils/dist/filter/index.js +3 -0
- package/test-e2e/node_modules/@rolldown/pluginutils/dist/filter/simple-filters.d.ts +71 -0
- package/test-e2e/node_modules/@rolldown/pluginutils/dist/filter/simple-filters.js +70 -0
- package/test-e2e/node_modules/@rolldown/pluginutils/dist/index.d.ts +1 -0
- package/test-e2e/node_modules/@rolldown/pluginutils/dist/index.js +1 -0
- package/test-e2e/node_modules/@rolldown/pluginutils/dist/utils.d.ts +2 -0
- package/test-e2e/node_modules/@rolldown/pluginutils/dist/utils.js +17 -0
- package/test-e2e/node_modules/@rolldown/pluginutils/package.json +37 -0
- package/test-e2e/node_modules/@vitejs/plugin-vue/LICENSE +21 -0
- package/test-e2e/node_modules/@vitejs/plugin-vue/README.md +278 -0
- package/test-e2e/node_modules/@vitejs/plugin-vue/dist/index.d.mts +120 -0
- package/test-e2e/node_modules/@vitejs/plugin-vue/dist/index.mjs +1745 -0
- package/test-e2e/node_modules/@vitejs/plugin-vue/package.json +65 -0
- package/test-e2e/node_modules/@vue/compiler-core/LICENSE +21 -0
- package/test-e2e/node_modules/@vue/compiler-core/README.md +1 -0
- package/test-e2e/node_modules/@vue/compiler-core/dist/compiler-core.cjs.js +6888 -0
- package/test-e2e/node_modules/@vue/compiler-core/dist/compiler-core.cjs.prod.js +6763 -0
- package/test-e2e/node_modules/@vue/compiler-core/dist/compiler-core.d.ts +1100 -0
- package/test-e2e/node_modules/@vue/compiler-core/dist/compiler-core.esm-bundler.js +5835 -0
- package/test-e2e/node_modules/@vue/compiler-core/index.js +7 -0
- package/test-e2e/node_modules/@vue/compiler-core/package.json +58 -0
- package/test-e2e/node_modules/@vue/compiler-dom/LICENSE +21 -0
- package/test-e2e/node_modules/@vue/compiler-dom/README.md +1 -0
- package/test-e2e/node_modules/@vue/compiler-dom/dist/compiler-dom.cjs.js +934 -0
- package/test-e2e/node_modules/@vue/compiler-dom/dist/compiler-dom.cjs.prod.js +689 -0
- package/test-e2e/node_modules/@vue/compiler-dom/dist/compiler-dom.d.ts +45 -0
- package/test-e2e/node_modules/@vue/compiler-dom/dist/compiler-dom.esm-browser.js +6644 -0
- package/test-e2e/node_modules/@vue/compiler-dom/dist/compiler-dom.esm-browser.prod.js +14 -0
- package/test-e2e/node_modules/@vue/compiler-dom/dist/compiler-dom.esm-bundler.js +690 -0
- package/test-e2e/node_modules/@vue/compiler-dom/dist/compiler-dom.global.js +6814 -0
- package/test-e2e/node_modules/@vue/compiler-dom/dist/compiler-dom.global.prod.js +14 -0
- package/test-e2e/node_modules/@vue/compiler-dom/index.js +7 -0
- package/test-e2e/node_modules/@vue/compiler-dom/package.json +57 -0
- package/test-e2e/node_modules/@vue/compiler-sfc/LICENSE +21 -0
- package/test-e2e/node_modules/@vue/compiler-sfc/README.md +79 -0
- package/test-e2e/node_modules/@vue/compiler-sfc/dist/compiler-sfc.cjs.js +25619 -0
- package/test-e2e/node_modules/@vue/compiler-sfc/dist/compiler-sfc.d.ts +487 -0
- package/test-e2e/node_modules/@vue/compiler-sfc/dist/compiler-sfc.esm-browser.js +50833 -0
- package/test-e2e/node_modules/@vue/compiler-sfc/package.json +67 -0
- package/test-e2e/node_modules/@vue/compiler-ssr/LICENSE +21 -0
- package/test-e2e/node_modules/@vue/compiler-ssr/README.md +1 -0
- package/test-e2e/node_modules/@vue/compiler-ssr/dist/compiler-ssr.cjs.js +1413 -0
- package/test-e2e/node_modules/@vue/compiler-ssr/dist/compiler-ssr.d.ts +4 -0
- package/test-e2e/node_modules/@vue/compiler-ssr/package.json +34 -0
- package/test-e2e/node_modules/@vue/reactivity/LICENSE +21 -0
- package/test-e2e/node_modules/@vue/reactivity/README.md +19 -0
- package/test-e2e/node_modules/@vue/reactivity/dist/reactivity.cjs.js +2033 -0
- package/test-e2e/node_modules/@vue/reactivity/dist/reactivity.cjs.prod.js +1877 -0
- package/test-e2e/node_modules/@vue/reactivity/dist/reactivity.d.ts +756 -0
- package/test-e2e/node_modules/@vue/reactivity/dist/reactivity.esm-browser.js +2031 -0
- package/test-e2e/node_modules/@vue/reactivity/dist/reactivity.esm-browser.prod.js +5 -0
- package/test-e2e/node_modules/@vue/reactivity/dist/reactivity.esm-bundler.js +1990 -0
- package/test-e2e/node_modules/@vue/reactivity/dist/reactivity.global.js +2087 -0
- package/test-e2e/node_modules/@vue/reactivity/dist/reactivity.global.prod.js +5 -0
- package/test-e2e/node_modules/@vue/reactivity/index.js +7 -0
- package/test-e2e/node_modules/@vue/reactivity/package.json +55 -0
- package/test-e2e/node_modules/@vue/runtime-core/LICENSE +21 -0
- package/test-e2e/node_modules/@vue/runtime-core/README.md +28 -0
- package/test-e2e/node_modules/@vue/runtime-core/dist/runtime-core.cjs.js +8718 -0
- package/test-e2e/node_modules/@vue/runtime-core/dist/runtime-core.cjs.prod.js +6856 -0
- package/test-e2e/node_modules/@vue/runtime-core/dist/runtime-core.d.ts +1866 -0
- package/test-e2e/node_modules/@vue/runtime-core/dist/runtime-core.esm-bundler.js +8647 -0
- package/test-e2e/node_modules/@vue/runtime-core/index.js +7 -0
- package/test-e2e/node_modules/@vue/runtime-core/package.json +52 -0
- package/test-e2e/node_modules/@vue/runtime-dom/LICENSE +21 -0
- package/test-e2e/node_modules/@vue/runtime-dom/README.md +13 -0
- package/test-e2e/node_modules/@vue/runtime-dom/dist/runtime-dom.cjs.js +1946 -0
- package/test-e2e/node_modules/@vue/runtime-dom/dist/runtime-dom.cjs.prod.js +1796 -0
- package/test-e2e/node_modules/@vue/runtime-dom/dist/runtime-dom.d.ts +1450 -0
- package/test-e2e/node_modules/@vue/runtime-dom/dist/runtime-dom.esm-browser.js +12794 -0
- package/test-e2e/node_modules/@vue/runtime-dom/dist/runtime-dom.esm-browser.prod.js +7 -0
- package/test-e2e/node_modules/@vue/runtime-dom/dist/runtime-dom.esm-bundler.js +1985 -0
- package/test-e2e/node_modules/@vue/runtime-dom/dist/runtime-dom.global.js +12847 -0
- package/test-e2e/node_modules/@vue/runtime-dom/dist/runtime-dom.global.prod.js +7 -0
- package/test-e2e/node_modules/@vue/runtime-dom/index.js +7 -0
- package/test-e2e/node_modules/@vue/runtime-dom/package.json +60 -0
- package/test-e2e/node_modules/@vue/server-renderer/LICENSE +21 -0
- package/test-e2e/node_modules/@vue/server-renderer/README.md +178 -0
- package/test-e2e/node_modules/@vue/server-renderer/dist/server-renderer.cjs.js +1159 -0
- package/test-e2e/node_modules/@vue/server-renderer/dist/server-renderer.cjs.prod.js +883 -0
- package/test-e2e/node_modules/@vue/server-renderer/dist/server-renderer.d.ts +65 -0
- package/test-e2e/node_modules/@vue/server-renderer/dist/server-renderer.esm-browser.js +8627 -0
- package/test-e2e/node_modules/@vue/server-renderer/dist/server-renderer.esm-browser.prod.js +5 -0
- package/test-e2e/node_modules/@vue/server-renderer/dist/server-renderer.esm-bundler.js +1097 -0
- package/test-e2e/node_modules/@vue/server-renderer/index.js +7 -0
- package/test-e2e/node_modules/@vue/server-renderer/package.json +55 -0
- package/test-e2e/node_modules/@vue/shared/LICENSE +21 -0
- package/test-e2e/node_modules/@vue/shared/README.md +3 -0
- package/test-e2e/node_modules/@vue/shared/dist/shared.cjs.js +612 -0
- package/test-e2e/node_modules/@vue/shared/dist/shared.cjs.prod.js +604 -0
- package/test-e2e/node_modules/@vue/shared/dist/shared.d.ts +334 -0
- package/test-e2e/node_modules/@vue/shared/dist/shared.esm-bundler.js +536 -0
- package/test-e2e/node_modules/@vue/shared/index.js +7 -0
- package/test-e2e/node_modules/@vue/shared/package.json +47 -0
- package/test-e2e/node_modules/ask-for-promise/LICENSE +21 -0
- package/test-e2e/node_modules/ask-for-promise/README.md +278 -0
- package/test-e2e/node_modules/ask-for-promise/dist/ask-for-promise.cjs +1 -0
- package/test-e2e/node_modules/ask-for-promise/dist/ask-for-promise.esm.mjs +1 -0
- package/test-e2e/node_modules/ask-for-promise/dist/ask-for-promise.umd.js +1 -0
- package/test-e2e/node_modules/ask-for-promise/package.json +77 -0
- package/test-e2e/node_modules/ask-for-promise/src/askForPromise.js +277 -0
- package/test-e2e/node_modules/ask-for-promise/types/index.d.ts +18 -0
- package/test-e2e/node_modules/csstype/LICENSE +19 -0
- package/test-e2e/node_modules/csstype/README.md +291 -0
- package/test-e2e/node_modules/csstype/index.d.ts +22569 -0
- package/test-e2e/node_modules/csstype/index.js.flow +6863 -0
- package/test-e2e/node_modules/csstype/package.json +70 -0
- package/test-e2e/node_modules/detect-libc/LICENSE +201 -0
- package/test-e2e/node_modules/detect-libc/README.md +163 -0
- package/test-e2e/node_modules/detect-libc/index.d.ts +14 -0
- package/test-e2e/node_modules/detect-libc/lib/detect-libc.js +313 -0
- package/test-e2e/node_modules/detect-libc/lib/elf.js +39 -0
- package/test-e2e/node_modules/detect-libc/lib/filesystem.js +51 -0
- package/test-e2e/node_modules/detect-libc/lib/process.js +24 -0
- package/test-e2e/node_modules/detect-libc/package.json +44 -0
- package/test-e2e/node_modules/entities/LICENSE +11 -0
- package/test-e2e/node_modules/entities/decode.d.ts +3 -0
- package/test-e2e/node_modules/entities/decode.js +3 -0
- package/test-e2e/node_modules/entities/dist/commonjs/decode-codepoint.d.ts +19 -0
- package/test-e2e/node_modules/entities/dist/commonjs/decode-codepoint.d.ts.map +1 -0
- package/test-e2e/node_modules/entities/dist/commonjs/decode-codepoint.js +77 -0
- package/test-e2e/node_modules/entities/dist/commonjs/decode-codepoint.js.map +1 -0
- package/test-e2e/node_modules/entities/dist/commonjs/decode.d.ts +205 -0
- package/test-e2e/node_modules/entities/dist/commonjs/decode.d.ts.map +1 -0
- package/test-e2e/node_modules/entities/dist/commonjs/decode.js +568 -0
- package/test-e2e/node_modules/entities/dist/commonjs/decode.js.map +1 -0
- package/test-e2e/node_modules/entities/dist/commonjs/encode.d.ts +22 -0
- package/test-e2e/node_modules/entities/dist/commonjs/encode.d.ts.map +1 -0
- package/test-e2e/node_modules/entities/dist/commonjs/encode.js +92 -0
- package/test-e2e/node_modules/entities/dist/commonjs/encode.js.map +1 -0
- package/test-e2e/node_modules/entities/dist/commonjs/escape.d.ts +46 -0
- package/test-e2e/node_modules/entities/dist/commonjs/escape.d.ts.map +1 -0
- package/test-e2e/node_modules/entities/dist/commonjs/escape.js +138 -0
- package/test-e2e/node_modules/entities/dist/commonjs/escape.js.map +1 -0
- package/test-e2e/node_modules/entities/dist/commonjs/generated/decode-data-html.d.ts +2 -0
- package/test-e2e/node_modules/entities/dist/commonjs/generated/decode-data-html.d.ts.map +1 -0
- package/test-e2e/node_modules/entities/dist/commonjs/generated/decode-data-html.js +7 -0
- package/test-e2e/node_modules/entities/dist/commonjs/generated/decode-data-html.js.map +1 -0
- package/test-e2e/node_modules/entities/dist/commonjs/generated/decode-data-xml.d.ts +2 -0
- package/test-e2e/node_modules/entities/dist/commonjs/generated/decode-data-xml.d.ts.map +1 -0
- package/test-e2e/node_modules/entities/dist/commonjs/generated/decode-data-xml.js +7 -0
- package/test-e2e/node_modules/entities/dist/commonjs/generated/decode-data-xml.js.map +1 -0
- package/test-e2e/node_modules/entities/dist/commonjs/generated/encode-html.d.ts +3 -0
- package/test-e2e/node_modules/entities/dist/commonjs/generated/encode-html.d.ts.map +1 -0
- package/test-e2e/node_modules/entities/dist/commonjs/generated/encode-html.js +14 -0
- package/test-e2e/node_modules/entities/dist/commonjs/generated/encode-html.js.map +1 -0
- package/test-e2e/node_modules/entities/dist/commonjs/index.d.ts +96 -0
- package/test-e2e/node_modules/entities/dist/commonjs/index.d.ts.map +1 -0
- package/test-e2e/node_modules/entities/dist/commonjs/index.js +131 -0
- package/test-e2e/node_modules/entities/dist/commonjs/index.js.map +1 -0
- package/test-e2e/node_modules/entities/dist/commonjs/internal/bin-trie-flags.d.ts +17 -0
- package/test-e2e/node_modules/entities/dist/commonjs/internal/bin-trie-flags.d.ts.map +1 -0
- package/test-e2e/node_modules/entities/dist/commonjs/internal/bin-trie-flags.js +21 -0
- package/test-e2e/node_modules/entities/dist/commonjs/internal/bin-trie-flags.js.map +1 -0
- package/test-e2e/node_modules/entities/dist/commonjs/internal/decode-shared.d.ts +2 -0
- package/test-e2e/node_modules/entities/dist/commonjs/internal/decode-shared.d.ts.map +1 -0
- package/test-e2e/node_modules/entities/dist/commonjs/internal/decode-shared.js +31 -0
- package/test-e2e/node_modules/entities/dist/commonjs/internal/decode-shared.js.map +1 -0
- package/test-e2e/node_modules/entities/dist/commonjs/internal/encode-shared.d.ts +32 -0
- package/test-e2e/node_modules/entities/dist/commonjs/internal/encode-shared.d.ts.map +1 -0
- package/test-e2e/node_modules/entities/dist/commonjs/internal/encode-shared.js +94 -0
- package/test-e2e/node_modules/entities/dist/commonjs/internal/encode-shared.js.map +1 -0
- package/test-e2e/node_modules/entities/dist/commonjs/package.json +3 -0
- package/test-e2e/node_modules/entities/dist/esm/decode-codepoint.d.ts +19 -0
- package/test-e2e/node_modules/entities/dist/esm/decode-codepoint.d.ts.map +1 -0
- package/test-e2e/node_modules/entities/dist/esm/decode-codepoint.js +72 -0
- package/test-e2e/node_modules/entities/dist/esm/decode-codepoint.js.map +1 -0
- package/test-e2e/node_modules/entities/dist/esm/decode.d.ts +205 -0
- package/test-e2e/node_modules/entities/dist/esm/decode.d.ts.map +1 -0
- package/test-e2e/node_modules/entities/dist/esm/decode.js +554 -0
- package/test-e2e/node_modules/entities/dist/esm/decode.js.map +1 -0
- package/test-e2e/node_modules/entities/dist/esm/encode.d.ts +22 -0
- package/test-e2e/node_modules/entities/dist/esm/encode.d.ts.map +1 -0
- package/test-e2e/node_modules/entities/dist/esm/encode.js +88 -0
- package/test-e2e/node_modules/entities/dist/esm/encode.js.map +1 -0
- package/test-e2e/node_modules/entities/dist/esm/escape.d.ts +46 -0
- package/test-e2e/node_modules/entities/dist/esm/escape.d.ts.map +1 -0
- package/test-e2e/node_modules/entities/dist/esm/escape.js +134 -0
- package/test-e2e/node_modules/entities/dist/esm/escape.js.map +1 -0
- package/test-e2e/node_modules/entities/dist/esm/generated/decode-data-html.d.ts +2 -0
- package/test-e2e/node_modules/entities/dist/esm/generated/decode-data-html.d.ts.map +1 -0
- package/test-e2e/node_modules/entities/dist/esm/generated/decode-data-html.js +4 -0
- package/test-e2e/node_modules/entities/dist/esm/generated/decode-data-html.js.map +1 -0
- package/test-e2e/node_modules/entities/dist/esm/generated/decode-data-xml.d.ts +2 -0
- package/test-e2e/node_modules/entities/dist/esm/generated/decode-data-xml.d.ts.map +1 -0
- package/test-e2e/node_modules/entities/dist/esm/generated/decode-data-xml.js +4 -0
- package/test-e2e/node_modules/entities/dist/esm/generated/decode-data-xml.js.map +1 -0
- package/test-e2e/node_modules/entities/dist/esm/generated/encode-html.d.ts +3 -0
- package/test-e2e/node_modules/entities/dist/esm/generated/encode-html.d.ts.map +1 -0
- package/test-e2e/node_modules/entities/dist/esm/generated/encode-html.js +11 -0
- package/test-e2e/node_modules/entities/dist/esm/generated/encode-html.js.map +1 -0
- package/test-e2e/node_modules/entities/dist/esm/index.d.ts +96 -0
- package/test-e2e/node_modules/entities/dist/esm/index.d.ts.map +1 -0
- package/test-e2e/node_modules/entities/dist/esm/index.js +107 -0
- package/test-e2e/node_modules/entities/dist/esm/index.js.map +1 -0
- package/test-e2e/node_modules/entities/dist/esm/internal/bin-trie-flags.d.ts +17 -0
- package/test-e2e/node_modules/entities/dist/esm/internal/bin-trie-flags.d.ts.map +1 -0
- package/test-e2e/node_modules/entities/dist/esm/internal/bin-trie-flags.js +18 -0
- package/test-e2e/node_modules/entities/dist/esm/internal/bin-trie-flags.js.map +1 -0
- package/test-e2e/node_modules/entities/dist/esm/internal/decode-shared.d.ts +2 -0
- package/test-e2e/node_modules/entities/dist/esm/internal/decode-shared.d.ts.map +1 -0
- package/test-e2e/node_modules/entities/dist/esm/internal/decode-shared.js +28 -0
- package/test-e2e/node_modules/entities/dist/esm/internal/decode-shared.js.map +1 -0
- package/test-e2e/node_modules/entities/dist/esm/internal/encode-shared.d.ts +32 -0
- package/test-e2e/node_modules/entities/dist/esm/internal/encode-shared.d.ts.map +1 -0
- package/test-e2e/node_modules/entities/dist/esm/internal/encode-shared.js +91 -0
- package/test-e2e/node_modules/entities/dist/esm/internal/encode-shared.js.map +1 -0
- package/test-e2e/node_modules/entities/dist/esm/package.json +3 -0
- package/test-e2e/node_modules/entities/escape.d.ts +3 -0
- package/test-e2e/node_modules/entities/escape.js +3 -0
- package/test-e2e/node_modules/entities/package.json +120 -0
- package/test-e2e/node_modules/entities/readme.md +143 -0
- package/test-e2e/node_modules/entities/src/decode-codepoint.ts +81 -0
- package/test-e2e/node_modules/entities/src/decode.ts +685 -0
- package/test-e2e/node_modules/entities/src/encode.ts +93 -0
- package/test-e2e/node_modules/entities/src/escape.ts +161 -0
- package/test-e2e/node_modules/entities/src/generated/.eslintrc.json +10 -0
- package/test-e2e/node_modules/entities/src/generated/decode-data-html.ts +6 -0
- package/test-e2e/node_modules/entities/src/generated/decode-data-xml.ts +6 -0
- package/test-e2e/node_modules/entities/src/generated/encode-html.ts +17 -0
- package/test-e2e/node_modules/entities/src/index.ts +187 -0
- package/test-e2e/node_modules/entities/src/internal/bin-trie-flags.ts +16 -0
- package/test-e2e/node_modules/entities/src/internal/decode-shared.ts +30 -0
- package/test-e2e/node_modules/entities/src/internal/encode-shared.ts +121 -0
- package/test-e2e/node_modules/estree-walker/CHANGELOG.md +92 -0
- package/test-e2e/node_modules/estree-walker/LICENSE +7 -0
- package/test-e2e/node_modules/estree-walker/README.md +48 -0
- package/test-e2e/node_modules/estree-walker/dist/esm/estree-walker.js +333 -0
- package/test-e2e/node_modules/estree-walker/dist/esm/package.json +1 -0
- package/test-e2e/node_modules/estree-walker/dist/umd/estree-walker.js +344 -0
- package/test-e2e/node_modules/estree-walker/package.json +37 -0
- package/test-e2e/node_modules/estree-walker/src/async.js +118 -0
- package/test-e2e/node_modules/estree-walker/src/index.js +35 -0
- package/test-e2e/node_modules/estree-walker/src/package.json +1 -0
- package/test-e2e/node_modules/estree-walker/src/sync.js +118 -0
- package/test-e2e/node_modules/estree-walker/src/walker.js +61 -0
- package/test-e2e/node_modules/estree-walker/types/async.d.ts +53 -0
- package/test-e2e/node_modules/estree-walker/types/index.d.ts +56 -0
- package/test-e2e/node_modules/estree-walker/types/sync.d.ts +53 -0
- package/test-e2e/node_modules/estree-walker/types/tsconfig.tsbuildinfo +345 -0
- package/test-e2e/node_modules/estree-walker/types/walker.d.ts +37 -0
- package/test-e2e/node_modules/fdir/LICENSE +7 -0
- package/test-e2e/node_modules/fdir/README.md +91 -0
- package/test-e2e/node_modules/fdir/dist/index.cjs +588 -0
- package/test-e2e/node_modules/fdir/dist/index.d.cts +155 -0
- package/test-e2e/node_modules/fdir/dist/index.d.mts +155 -0
- package/test-e2e/node_modules/fdir/dist/index.mjs +570 -0
- package/test-e2e/node_modules/fdir/package.json +103 -0
- package/test-e2e/node_modules/lightningcss/LICENSE +373 -0
- package/test-e2e/node_modules/lightningcss/README.md +105 -0
- package/test-e2e/node_modules/lightningcss/node/ast.d.ts +9892 -0
- package/test-e2e/node_modules/lightningcss/node/ast.js.flow +10539 -0
- package/test-e2e/node_modules/lightningcss/node/browserslistToTargets.js +48 -0
- package/test-e2e/node_modules/lightningcss/node/composeVisitors.js +450 -0
- package/test-e2e/node_modules/lightningcss/node/flags.js +28 -0
- package/test-e2e/node_modules/lightningcss/node/index.d.ts +494 -0
- package/test-e2e/node_modules/lightningcss/node/index.js +59 -0
- package/test-e2e/node_modules/lightningcss/node/index.js.flow +843 -0
- package/test-e2e/node_modules/lightningcss/node/index.mjs +4 -0
- package/test-e2e/node_modules/lightningcss/node/targets.d.ts +40 -0
- package/test-e2e/node_modules/lightningcss/node/targets.js.flow +39 -0
- package/test-e2e/node_modules/lightningcss/package.json +110 -0
- package/test-e2e/node_modules/lightningcss-darwin-arm64/LICENSE +373 -0
- package/test-e2e/node_modules/lightningcss-darwin-arm64/README.md +1 -0
- package/test-e2e/node_modules/lightningcss-darwin-arm64/lightningcss.darwin-arm64.node +0 -0
- package/test-e2e/node_modules/lightningcss-darwin-arm64/package.json +34 -0
- package/test-e2e/node_modules/magic-string/LICENSE +7 -0
- package/test-e2e/node_modules/magic-string/README.md +325 -0
- package/test-e2e/node_modules/magic-string/dist/magic-string.cjs.d.ts +289 -0
- package/test-e2e/node_modules/magic-string/dist/magic-string.cjs.js +1594 -0
- package/test-e2e/node_modules/magic-string/dist/magic-string.cjs.js.map +1 -0
- package/test-e2e/node_modules/magic-string/dist/magic-string.es.d.mts +289 -0
- package/test-e2e/node_modules/magic-string/dist/magic-string.es.mjs +1588 -0
- package/test-e2e/node_modules/magic-string/dist/magic-string.es.mjs.map +1 -0
- package/test-e2e/node_modules/magic-string/dist/magic-string.umd.js +1682 -0
- package/test-e2e/node_modules/magic-string/dist/magic-string.umd.js.map +1 -0
- package/test-e2e/node_modules/magic-string/package.json +67 -0
- package/test-e2e/node_modules/nanoid/LICENSE +20 -0
- package/test-e2e/node_modules/nanoid/README.md +39 -0
- package/test-e2e/node_modules/nanoid/async/index.browser.cjs +69 -0
- package/test-e2e/node_modules/nanoid/async/index.browser.js +34 -0
- package/test-e2e/node_modules/nanoid/async/index.cjs +71 -0
- package/test-e2e/node_modules/nanoid/async/index.d.ts +56 -0
- package/test-e2e/node_modules/nanoid/async/index.js +35 -0
- package/test-e2e/node_modules/nanoid/async/index.native.js +26 -0
- package/test-e2e/node_modules/nanoid/async/package.json +12 -0
- package/test-e2e/node_modules/nanoid/bin/nanoid.cjs +55 -0
- package/test-e2e/node_modules/nanoid/index.browser.cjs +72 -0
- package/test-e2e/node_modules/nanoid/index.browser.js +34 -0
- package/test-e2e/node_modules/nanoid/index.cjs +85 -0
- package/test-e2e/node_modules/nanoid/index.d.cts +91 -0
- package/test-e2e/node_modules/nanoid/index.d.ts +91 -0
- package/test-e2e/node_modules/nanoid/index.js +45 -0
- package/test-e2e/node_modules/nanoid/nanoid.js +1 -0
- package/test-e2e/node_modules/nanoid/non-secure/index.cjs +34 -0
- package/test-e2e/node_modules/nanoid/non-secure/index.d.ts +33 -0
- package/test-e2e/node_modules/nanoid/non-secure/index.js +21 -0
- package/test-e2e/node_modules/nanoid/non-secure/package.json +6 -0
- package/test-e2e/node_modules/nanoid/package.json +89 -0
- package/test-e2e/node_modules/nanoid/url-alphabet/index.cjs +7 -0
- package/test-e2e/node_modules/nanoid/url-alphabet/index.js +3 -0
- package/test-e2e/node_modules/nanoid/url-alphabet/package.json +6 -0
- package/test-e2e/node_modules/picocolors/LICENSE +15 -0
- package/test-e2e/node_modules/picocolors/README.md +21 -0
- package/test-e2e/node_modules/picocolors/package.json +25 -0
- package/test-e2e/node_modules/picocolors/picocolors.browser.js +4 -0
- package/test-e2e/node_modules/picocolors/picocolors.d.ts +5 -0
- package/test-e2e/node_modules/picocolors/picocolors.js +75 -0
- package/test-e2e/node_modules/picocolors/types.d.ts +51 -0
- package/test-e2e/node_modules/picomatch/LICENSE +21 -0
- package/test-e2e/node_modules/picomatch/README.md +749 -0
- package/test-e2e/node_modules/picomatch/index.js +17 -0
- package/test-e2e/node_modules/picomatch/lib/constants.js +184 -0
- package/test-e2e/node_modules/picomatch/lib/parse.js +1386 -0
- package/test-e2e/node_modules/picomatch/lib/picomatch.js +349 -0
- package/test-e2e/node_modules/picomatch/lib/scan.js +391 -0
- package/test-e2e/node_modules/picomatch/lib/utils.js +72 -0
- package/test-e2e/node_modules/picomatch/package.json +82 -0
- package/test-e2e/node_modules/picomatch/posix.js +3 -0
- package/test-e2e/node_modules/postcss/LICENSE +20 -0
- package/test-e2e/node_modules/postcss/README.md +28 -0
- package/test-e2e/node_modules/postcss/lib/at-rule.d.ts +139 -0
- package/test-e2e/node_modules/postcss/lib/at-rule.js +25 -0
- package/test-e2e/node_modules/postcss/lib/comment.d.ts +67 -0
- package/test-e2e/node_modules/postcss/lib/comment.js +13 -0
- package/test-e2e/node_modules/postcss/lib/container.d.ts +478 -0
- package/test-e2e/node_modules/postcss/lib/container.js +447 -0
- package/test-e2e/node_modules/postcss/lib/css-syntax-error.d.ts +247 -0
- package/test-e2e/node_modules/postcss/lib/css-syntax-error.js +133 -0
- package/test-e2e/node_modules/postcss/lib/declaration.d.ts +150 -0
- package/test-e2e/node_modules/postcss/lib/declaration.js +24 -0
- package/test-e2e/node_modules/postcss/lib/document.d.ts +68 -0
- package/test-e2e/node_modules/postcss/lib/document.js +33 -0
- package/test-e2e/node_modules/postcss/lib/fromJSON.d.ts +9 -0
- package/test-e2e/node_modules/postcss/lib/fromJSON.js +54 -0
- package/test-e2e/node_modules/postcss/lib/input.d.ts +226 -0
- package/test-e2e/node_modules/postcss/lib/input.js +273 -0
- package/test-e2e/node_modules/postcss/lib/lazy-result.d.ts +189 -0
- package/test-e2e/node_modules/postcss/lib/lazy-result.js +550 -0
- package/test-e2e/node_modules/postcss/lib/list.d.ts +60 -0
- package/test-e2e/node_modules/postcss/lib/list.js +58 -0
- package/test-e2e/node_modules/postcss/lib/map-generator.js +376 -0
- package/test-e2e/node_modules/postcss/lib/no-work-result.d.ts +45 -0
- package/test-e2e/node_modules/postcss/lib/no-work-result.js +137 -0
- package/test-e2e/node_modules/postcss/lib/node.d.ts +555 -0
- package/test-e2e/node_modules/postcss/lib/node.js +449 -0
- package/test-e2e/node_modules/postcss/lib/parse.d.ts +9 -0
- package/test-e2e/node_modules/postcss/lib/parse.js +42 -0
- package/test-e2e/node_modules/postcss/lib/parser.js +611 -0
- package/test-e2e/node_modules/postcss/lib/postcss.d.mts +66 -0
- package/test-e2e/node_modules/postcss/lib/postcss.d.ts +456 -0
- package/test-e2e/node_modules/postcss/lib/postcss.js +101 -0
- package/test-e2e/node_modules/postcss/lib/postcss.mjs +30 -0
- package/test-e2e/node_modules/postcss/lib/previous-map.d.ts +80 -0
- package/test-e2e/node_modules/postcss/lib/previous-map.js +145 -0
- package/test-e2e/node_modules/postcss/lib/processor.d.ts +114 -0
- package/test-e2e/node_modules/postcss/lib/processor.js +67 -0
- package/test-e2e/node_modules/postcss/lib/result.d.ts +204 -0
- package/test-e2e/node_modules/postcss/lib/result.js +42 -0
- package/test-e2e/node_modules/postcss/lib/root.d.ts +86 -0
- package/test-e2e/node_modules/postcss/lib/root.js +61 -0
- package/test-e2e/node_modules/postcss/lib/rule.d.ts +126 -0
- package/test-e2e/node_modules/postcss/lib/rule.js +27 -0
- package/test-e2e/node_modules/postcss/lib/stringifier.d.ts +45 -0
- package/test-e2e/node_modules/postcss/lib/stringifier.js +353 -0
- package/test-e2e/node_modules/postcss/lib/stringify.d.ts +9 -0
- package/test-e2e/node_modules/postcss/lib/stringify.js +11 -0
- package/test-e2e/node_modules/postcss/lib/symbols.js +5 -0
- package/test-e2e/node_modules/postcss/lib/terminal-highlight.js +70 -0
- package/test-e2e/node_modules/postcss/lib/tokenize.js +266 -0
- package/test-e2e/node_modules/postcss/lib/warn-once.js +13 -0
- package/test-e2e/node_modules/postcss/lib/warning.d.ts +146 -0
- package/test-e2e/node_modules/postcss/lib/warning.js +37 -0
- package/test-e2e/node_modules/postcss/package.json +88 -0
- package/test-e2e/node_modules/rolldown/LICENSE +25 -0
- package/test-e2e/node_modules/rolldown/README.md +11 -0
- package/test-e2e/node_modules/rolldown/bin/cli.mjs +2 -0
- package/test-e2e/node_modules/rolldown/dist/cli.d.mts +1 -0
- package/test-e2e/node_modules/rolldown/dist/cli.mjs +1191 -0
- package/test-e2e/node_modules/rolldown/dist/config.d.mts +14 -0
- package/test-e2e/node_modules/rolldown/dist/config.mjs +4 -0
- package/test-e2e/node_modules/rolldown/dist/experimental-index.d.mts +253 -0
- package/test-e2e/node_modules/rolldown/dist/experimental-index.mjs +320 -0
- package/test-e2e/node_modules/rolldown/dist/experimental-runtime-types.d.ts +98 -0
- package/test-e2e/node_modules/rolldown/dist/filter-index.d.mts +196 -0
- package/test-e2e/node_modules/rolldown/dist/filter-index.mjs +386 -0
- package/test-e2e/node_modules/rolldown/dist/get-log-filter.d.mts +3 -0
- package/test-e2e/node_modules/rolldown/dist/get-log-filter.mjs +68 -0
- package/test-e2e/node_modules/rolldown/dist/index.d.mts +4 -0
- package/test-e2e/node_modules/rolldown/dist/index.mjs +50 -0
- package/test-e2e/node_modules/rolldown/dist/parallel-plugin-worker.d.mts +1 -0
- package/test-e2e/node_modules/rolldown/dist/parallel-plugin-worker.mjs +28 -0
- package/test-e2e/node_modules/rolldown/dist/parallel-plugin.d.mts +13 -0
- package/test-e2e/node_modules/rolldown/dist/parallel-plugin.mjs +6 -0
- package/test-e2e/node_modules/rolldown/dist/parse-ast-index.d.mts +32 -0
- package/test-e2e/node_modules/rolldown/dist/parse-ast-index.mjs +60 -0
- package/test-e2e/node_modules/rolldown/dist/plugins-index.d.mts +33 -0
- package/test-e2e/node_modules/rolldown/dist/plugins-index.mjs +40 -0
- package/test-e2e/node_modules/rolldown/dist/shared/binding-DUEnSb0A.d.mts +1872 -0
- package/test-e2e/node_modules/rolldown/dist/shared/binding-s-V_wTpj.mjs +582 -0
- package/test-e2e/node_modules/rolldown/dist/shared/bindingify-input-options-DYpBf1OG.mjs +2235 -0
- package/test-e2e/node_modules/rolldown/dist/shared/constructors-BaEBnHl3.mjs +68 -0
- package/test-e2e/node_modules/rolldown/dist/shared/constructors-DYemMpPL.d.mts +37 -0
- package/test-e2e/node_modules/rolldown/dist/shared/define-config-DJOr6Iwt.mjs +6 -0
- package/test-e2e/node_modules/rolldown/dist/shared/define-config-DhJZwTRw.d.mts +3795 -0
- package/test-e2e/node_modules/rolldown/dist/shared/error-w0u7biK-.mjs +85 -0
- package/test-e2e/node_modules/rolldown/dist/shared/get-log-filter-semyr3Lj.d.mts +35 -0
- package/test-e2e/node_modules/rolldown/dist/shared/load-config-pmbgQdFU.mjs +120 -0
- package/test-e2e/node_modules/rolldown/dist/shared/logging-C6h4g8dA.d.mts +50 -0
- package/test-e2e/node_modules/rolldown/dist/shared/logs-D80CXhvg.mjs +180 -0
- package/test-e2e/node_modules/rolldown/dist/shared/misc-DJYbNKZX.mjs +21 -0
- package/test-e2e/node_modules/rolldown/dist/shared/normalize-string-or-regex-CVvpepxa.mjs +66 -0
- package/test-e2e/node_modules/rolldown/dist/shared/parse-BywQARUG.mjs +74 -0
- package/test-e2e/node_modules/rolldown/dist/shared/prompt-BYQIwEjg.mjs +845 -0
- package/test-e2e/node_modules/rolldown/dist/shared/resolve-tsconfig-CNjJwuKB.mjs +113 -0
- package/test-e2e/node_modules/rolldown/dist/shared/rolldown-BLMDGLfI.mjs +40 -0
- package/test-e2e/node_modules/rolldown/dist/shared/rolldown-build-DtGk-m96.mjs +3321 -0
- package/test-e2e/node_modules/rolldown/dist/shared/transform-Kz3D2LbX.d.mts +149 -0
- package/test-e2e/node_modules/rolldown/dist/shared/watch-Cixa7HbR.mjs +374 -0
- package/test-e2e/node_modules/rolldown/dist/utils-index.d.mts +376 -0
- package/test-e2e/node_modules/rolldown/dist/utils-index.mjs +2414 -0
- package/test-e2e/node_modules/rolldown/node_modules/@rolldown/pluginutils/LICENSE +25 -0
- package/test-e2e/node_modules/rolldown/node_modules/@rolldown/pluginutils/README.md +83 -0
- package/test-e2e/node_modules/rolldown/node_modules/@rolldown/pluginutils/dist/filter/composable-filters.d.ts +90 -0
- package/test-e2e/node_modules/rolldown/node_modules/@rolldown/pluginutils/dist/filter/composable-filters.js +256 -0
- package/test-e2e/node_modules/rolldown/node_modules/@rolldown/pluginutils/dist/filter/filter-vite-plugins.d.ts +28 -0
- package/test-e2e/node_modules/rolldown/node_modules/@rolldown/pluginutils/dist/filter/filter-vite-plugins.js +75 -0
- package/test-e2e/node_modules/rolldown/node_modules/@rolldown/pluginutils/dist/filter/index.d.ts +3 -0
- package/test-e2e/node_modules/rolldown/node_modules/@rolldown/pluginutils/dist/filter/index.js +3 -0
- package/test-e2e/node_modules/rolldown/node_modules/@rolldown/pluginutils/dist/filter/simple-filters.d.ts +71 -0
- package/test-e2e/node_modules/rolldown/node_modules/@rolldown/pluginutils/dist/filter/simple-filters.js +70 -0
- package/test-e2e/node_modules/rolldown/node_modules/@rolldown/pluginutils/dist/index.d.ts +1 -0
- package/test-e2e/node_modules/rolldown/node_modules/@rolldown/pluginutils/dist/index.js +1 -0
- package/test-e2e/node_modules/rolldown/node_modules/@rolldown/pluginutils/dist/utils.d.ts +2 -0
- package/test-e2e/node_modules/rolldown/node_modules/@rolldown/pluginutils/dist/utils.js +17 -0
- package/test-e2e/node_modules/rolldown/node_modules/@rolldown/pluginutils/package.json +37 -0
- package/test-e2e/node_modules/rolldown/package.json +153 -0
- package/test-e2e/node_modules/source-map-js/LICENSE +28 -0
- package/test-e2e/node_modules/source-map-js/README.md +765 -0
- package/test-e2e/node_modules/source-map-js/lib/array-set.js +121 -0
- package/test-e2e/node_modules/source-map-js/lib/base64-vlq.js +140 -0
- package/test-e2e/node_modules/source-map-js/lib/base64.js +67 -0
- package/test-e2e/node_modules/source-map-js/lib/binary-search.js +111 -0
- package/test-e2e/node_modules/source-map-js/lib/mapping-list.js +79 -0
- package/test-e2e/node_modules/source-map-js/lib/quick-sort.js +132 -0
- package/test-e2e/node_modules/source-map-js/lib/source-map-consumer.d.ts +1 -0
- package/test-e2e/node_modules/source-map-js/lib/source-map-consumer.js +1188 -0
- package/test-e2e/node_modules/source-map-js/lib/source-map-generator.d.ts +1 -0
- package/test-e2e/node_modules/source-map-js/lib/source-map-generator.js +444 -0
- package/test-e2e/node_modules/source-map-js/lib/source-node.d.ts +1 -0
- package/test-e2e/node_modules/source-map-js/lib/source-node.js +413 -0
- package/test-e2e/node_modules/source-map-js/lib/util.js +594 -0
- package/test-e2e/node_modules/source-map-js/package.json +71 -0
- package/test-e2e/node_modules/source-map-js/source-map.d.ts +104 -0
- package/test-e2e/node_modules/source-map-js/source-map.js +8 -0
- package/test-e2e/node_modules/tinyglobby/LICENSE +21 -0
- package/test-e2e/node_modules/tinyglobby/README.md +25 -0
- package/test-e2e/node_modules/tinyglobby/dist/index.cjs +334 -0
- package/test-e2e/node_modules/tinyglobby/dist/index.d.cts +148 -0
- package/test-e2e/node_modules/tinyglobby/dist/index.d.mts +148 -0
- package/test-e2e/node_modules/tinyglobby/dist/index.mjs +306 -0
- package/test-e2e/node_modules/tinyglobby/package.json +73 -0
- package/test-e2e/node_modules/vite/LICENSE.md +2230 -0
- package/test-e2e/node_modules/vite/README.md +20 -0
- package/test-e2e/node_modules/vite/bin/openChrome.js +68 -0
- package/test-e2e/node_modules/vite/bin/vite.js +79 -0
- package/test-e2e/node_modules/vite/client.d.ts +282 -0
- package/test-e2e/node_modules/vite/dist/client/client.mjs +1235 -0
- package/test-e2e/node_modules/vite/dist/client/env.mjs +18 -0
- package/test-e2e/node_modules/vite/dist/node/chunks/build.js +2 -0
- package/test-e2e/node_modules/vite/dist/node/chunks/build2.js +5378 -0
- package/test-e2e/node_modules/vite/dist/node/chunks/chunk.js +37 -0
- package/test-e2e/node_modules/vite/dist/node/chunks/config.js +2 -0
- package/test-e2e/node_modules/vite/dist/node/chunks/dist.js +6719 -0
- package/test-e2e/node_modules/vite/dist/node/chunks/lib.js +371 -0
- package/test-e2e/node_modules/vite/dist/node/chunks/logger.js +322 -0
- package/test-e2e/node_modules/vite/dist/node/chunks/moduleRunnerTransport.d.ts +96 -0
- package/test-e2e/node_modules/vite/dist/node/chunks/node.js +34785 -0
- package/test-e2e/node_modules/vite/dist/node/chunks/optimizer.js +2 -0
- package/test-e2e/node_modules/vite/dist/node/chunks/postcss-import.js +467 -0
- package/test-e2e/node_modules/vite/dist/node/chunks/preview.js +2 -0
- package/test-e2e/node_modules/vite/dist/node/chunks/server.js +2 -0
- package/test-e2e/node_modules/vite/dist/node/cli.js +837 -0
- package/test-e2e/node_modules/vite/dist/node/index.d.ts +3867 -0
- package/test-e2e/node_modules/vite/dist/node/index.js +3 -0
- package/test-e2e/node_modules/vite/dist/node/internal.d.ts +2 -0
- package/test-e2e/node_modules/vite/dist/node/internal.js +2 -0
- package/test-e2e/node_modules/vite/dist/node/module-runner.d.ts +315 -0
- package/test-e2e/node_modules/vite/dist/node/module-runner.js +1262 -0
- package/test-e2e/node_modules/vite/misc/false.js +1 -0
- package/test-e2e/node_modules/vite/misc/true.js +1 -0
- package/test-e2e/node_modules/vite/package.json +192 -0
- package/test-e2e/node_modules/vite/types/customEvent.d.ts +79 -0
- package/test-e2e/node_modules/vite/types/hmrPayload.d.ts +80 -0
- package/test-e2e/node_modules/vite/types/hot.d.ts +39 -0
- package/test-e2e/node_modules/vite/types/import-meta.d.ts +5 -0
- package/test-e2e/node_modules/vite/types/importGlob.d.ts +89 -0
- package/test-e2e/node_modules/vite/types/importMeta.d.ts +30 -0
- package/test-e2e/node_modules/vite/types/internal/cssPreprocessorOptions.d.ts +44 -0
- package/test-e2e/node_modules/vite/types/internal/esbuildOptions.d.ts +28 -0
- package/test-e2e/node_modules/vite/types/internal/lightningcssOptions.d.ts +18 -0
- package/test-e2e/node_modules/vite/types/internal/rollupTypeCompat.d.ts +24 -0
- package/test-e2e/node_modules/vite/types/internal/terserOptions.d.ts +11 -0
- package/test-e2e/node_modules/vite/types/metadata.d.ts +47 -0
- package/test-e2e/node_modules/vue/LICENSE +21 -0
- package/test-e2e/node_modules/vue/README.md +58 -0
- package/test-e2e/node_modules/vue/compiler-sfc/index.browser.js +1 -0
- package/test-e2e/node_modules/vue/compiler-sfc/index.browser.mjs +1 -0
- package/test-e2e/node_modules/vue/compiler-sfc/index.d.mts +1 -0
- package/test-e2e/node_modules/vue/compiler-sfc/index.d.ts +1 -0
- package/test-e2e/node_modules/vue/compiler-sfc/index.js +3 -0
- package/test-e2e/node_modules/vue/compiler-sfc/index.mjs +3 -0
- package/test-e2e/node_modules/vue/compiler-sfc/package.json +4 -0
- package/test-e2e/node_modules/vue/compiler-sfc/register-ts.js +3 -0
- package/test-e2e/node_modules/vue/dist/vue.cjs.js +80 -0
- package/test-e2e/node_modules/vue/dist/vue.cjs.prod.js +66 -0
- package/test-e2e/node_modules/vue/dist/vue.d.mts +7 -0
- package/test-e2e/node_modules/vue/dist/vue.d.ts +7 -0
- package/test-e2e/node_modules/vue/dist/vue.esm-browser.js +18708 -0
- package/test-e2e/node_modules/vue/dist/vue.esm-browser.prod.js +13 -0
- package/test-e2e/node_modules/vue/dist/vue.esm-bundler.js +71 -0
- package/test-e2e/node_modules/vue/dist/vue.global.js +18588 -0
- package/test-e2e/node_modules/vue/dist/vue.global.prod.js +13 -0
- package/test-e2e/node_modules/vue/dist/vue.runtime.esm-browser.js +12817 -0
- package/test-e2e/node_modules/vue/dist/vue.runtime.esm-browser.prod.js +7 -0
- package/test-e2e/node_modules/vue/dist/vue.runtime.esm-bundler.js +26 -0
- package/test-e2e/node_modules/vue/dist/vue.runtime.global.js +12871 -0
- package/test-e2e/node_modules/vue/dist/vue.runtime.global.prod.js +7 -0
- package/test-e2e/node_modules/vue/index.js +7 -0
- package/test-e2e/node_modules/vue/index.mjs +1 -0
- package/test-e2e/node_modules/vue/jsx-runtime/index.d.ts +25 -0
- package/test-e2e/node_modules/vue/jsx-runtime/index.js +15 -0
- package/test-e2e/node_modules/vue/jsx-runtime/index.mjs +12 -0
- package/test-e2e/node_modules/vue/jsx-runtime/package.json +5 -0
- package/test-e2e/node_modules/vue/jsx.d.ts +22 -0
- package/test-e2e/node_modules/vue/package.json +112 -0
- package/test-e2e/node_modules/vue/server-renderer/index.d.mts +1 -0
- package/test-e2e/node_modules/vue/server-renderer/index.d.ts +1 -0
- package/test-e2e/node_modules/vue/server-renderer/index.js +1 -0
- package/test-e2e/node_modules/vue/server-renderer/index.mjs +1 -0
- package/test-e2e/node_modules/vue/server-renderer/package.json +4 -0
- package/test-e2e/package-lock.json +1164 -0
- package/test-e2e/package.json +17 -0
- package/test-e2e/vite.config.js +17 -0
- package/test-results/.last-run.json +4 -0
- package/vite.config.js +12 -2
- package/vitest.config.js +1 -1
- package/cypress/support/component-index.html +0 -11
- package/test/01-general.cy.js +0 -348
- /package/{test → test-e2e}/blue.vue +0 -0
- /package/{test → test-e2e}/dummy.vue +0 -0
- /package/{test → test-e2e}/gray.vue +0 -0
- /package/{test → test-e2e}/red.vue +0 -0
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export default _findTarget;
|
|
2
|
+
/**
|
|
3
|
+
* @function _findTarget
|
|
4
|
+
* @description Find the appropriate hover target element by checking if element has any of the target attributes
|
|
5
|
+
* @param {Object} dependencies - Dependencies object
|
|
6
|
+
* @param {Object} state - Plugin state containing listenOptions with hoverTarget array
|
|
7
|
+
* @param {Element} target - DOM element to start searching from
|
|
8
|
+
* @returns {Element|false} - Target element or false if not found
|
|
9
|
+
*/
|
|
10
|
+
declare function _findTarget(dependencies: any, state: any, target: Element): Element | false;
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
export default _listenDOM;
|
|
2
|
+
export type HoverEventData = {
|
|
3
|
+
/**
|
|
4
|
+
* - The DOM element that is being hovered
|
|
5
|
+
*/
|
|
6
|
+
target: Element;
|
|
7
|
+
/**
|
|
8
|
+
* - Current context name
|
|
9
|
+
*/
|
|
10
|
+
context: string;
|
|
11
|
+
/**
|
|
12
|
+
* - Current context note
|
|
13
|
+
*/
|
|
14
|
+
note: string | null;
|
|
15
|
+
/**
|
|
16
|
+
* - The original DOM event
|
|
17
|
+
*/
|
|
18
|
+
event: Event;
|
|
19
|
+
/**
|
|
20
|
+
* - Extra dependencies object
|
|
21
|
+
*/
|
|
22
|
+
dependencies: any;
|
|
23
|
+
/**
|
|
24
|
+
* - Plugin state listenOptions (reference to pluginState.listenOptions)
|
|
25
|
+
*/
|
|
26
|
+
options: any;
|
|
27
|
+
/**
|
|
28
|
+
* - Viewport information with X, Y, width, height
|
|
29
|
+
*/
|
|
30
|
+
viewport: any;
|
|
31
|
+
/**
|
|
32
|
+
* - Element dimensions with width, height
|
|
33
|
+
*/
|
|
34
|
+
sizes: any;
|
|
35
|
+
/**
|
|
36
|
+
* - Element position relative to viewport with x, y
|
|
37
|
+
*/
|
|
38
|
+
position: any;
|
|
39
|
+
/**
|
|
40
|
+
* - Element position relative to page with x, y
|
|
41
|
+
*/
|
|
42
|
+
pagePosition: any;
|
|
43
|
+
/**
|
|
44
|
+
* - Event type ('hover')
|
|
45
|
+
*/
|
|
46
|
+
type: string;
|
|
47
|
+
};
|
|
48
|
+
/**
|
|
49
|
+
* @function _listenDOM
|
|
50
|
+
* @description Set up DOM event listeners for hover events
|
|
51
|
+
* @param {Object} dependencies - Dependencies object containing ev, _findTarget, resetState, extra
|
|
52
|
+
* @param {Object} state - Plugin state containing listenOptions and currentContext
|
|
53
|
+
* @returns {Object} - Object containing start and stop methods
|
|
54
|
+
*
|
|
55
|
+
* @typedef {Object} HoverEventData
|
|
56
|
+
* @property {Element} target - The DOM element that is being hovered
|
|
57
|
+
* @property {string} context - Current context name
|
|
58
|
+
* @property {string|null} note - Current context note
|
|
59
|
+
* @property {Event} event - The original DOM event
|
|
60
|
+
* @property {Object} dependencies - Extra dependencies object
|
|
61
|
+
* @property {Object} options - Plugin state listenOptions (reference to pluginState.listenOptions)
|
|
62
|
+
* @property {Object} viewport - Viewport information with X, Y, width, height
|
|
63
|
+
* @property {Object} sizes - Element dimensions with width, height
|
|
64
|
+
* @property {Object} position - Element position relative to viewport with x, y
|
|
65
|
+
* @property {Object} pagePosition - Element position relative to page with x, y
|
|
66
|
+
* @property {string} type - Event type ('hover')
|
|
67
|
+
*/
|
|
68
|
+
declare function _listenDOM(dependencies: any, state: any): any;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
export default _registerShortcutEvents;
|
|
2
|
+
export type HoverSetupData = {
|
|
3
|
+
/**
|
|
4
|
+
* - Extra dependencies object
|
|
5
|
+
*/
|
|
6
|
+
dependencies: any;
|
|
7
|
+
/**
|
|
8
|
+
* - Default options (clone of pluginState.defaultOptions)
|
|
9
|
+
*/
|
|
10
|
+
defaults: any;
|
|
11
|
+
/**
|
|
12
|
+
* - Plugin state listenOptions (reference to pluginState.listenOptions)
|
|
13
|
+
*/
|
|
14
|
+
options: any;
|
|
15
|
+
};
|
|
16
|
+
/**
|
|
17
|
+
* @function _registerShortcutEvents
|
|
18
|
+
* @description Register hover shortcut events and handle setup
|
|
19
|
+
* @param {Object} dependencies - Dependencies object containing regex, _defaults, ev
|
|
20
|
+
* @param {Object} pluginState - Plugin state containing currentContext, shortcuts, ERROR_EVENT_NAME
|
|
21
|
+
* @returns {number} - Number of registered shortcuts
|
|
22
|
+
*
|
|
23
|
+
* @typedef {Object} HoverSetupData
|
|
24
|
+
* @property {Object} dependencies - Extra dependencies object
|
|
25
|
+
* @property {Object} defaults - Default options (clone of pluginState.defaultOptions)
|
|
26
|
+
* @property {Object} options - Plugin state listenOptions (reference to pluginState.listenOptions)
|
|
27
|
+
*/
|
|
28
|
+
declare function _registerShortcutEvents(dependencies: any, pluginState: any): number;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export default pluginHover;
|
|
2
|
+
/**
|
|
3
|
+
* @function pluginHover
|
|
4
|
+
* @description Plugin for mouse hover shortcuts
|
|
5
|
+
* @param {function} setupPlugin - Plugin setup function from the library
|
|
6
|
+
* @param {Object} [options={}] - Plugin options
|
|
7
|
+
* @param {string[]} [options.hoverTarget=['data-hover']] - Array of attribute names for hover targets
|
|
8
|
+
* @param {number} [options.wait=320] - Time to wait for hover sequence in ms
|
|
9
|
+
* @returns {PluginAPI} Plugin API
|
|
10
|
+
*/
|
|
11
|
+
declare function pluginHover(setupPlugin: Function, options?: {
|
|
12
|
+
hoverTarget?: string[];
|
|
13
|
+
wait?: number;
|
|
14
|
+
}): PluginAPI;
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
export default _listenDOM;
|
|
2
|
+
export type KeyEventData = {
|
|
3
|
+
/**
|
|
4
|
+
* - Function to wait for keys (disables key sequence)
|
|
5
|
+
*/
|
|
6
|
+
wait: Function;
|
|
7
|
+
/**
|
|
8
|
+
* - Function to end waiting for keys (enables key sequence)
|
|
9
|
+
*/
|
|
10
|
+
end: Function;
|
|
11
|
+
/**
|
|
12
|
+
* - Function to ignore the last key in sequence
|
|
13
|
+
*/
|
|
14
|
+
ignore: Function;
|
|
15
|
+
/**
|
|
16
|
+
* - Function to check if currently waiting for keys
|
|
17
|
+
*/
|
|
18
|
+
isWaiting: Function;
|
|
19
|
+
/**
|
|
20
|
+
* - Current context note
|
|
21
|
+
*/
|
|
22
|
+
note: string | null;
|
|
23
|
+
/**
|
|
24
|
+
* - Current context name
|
|
25
|
+
*/
|
|
26
|
+
context: string;
|
|
27
|
+
/**
|
|
28
|
+
* - Extra dependencies object
|
|
29
|
+
*/
|
|
30
|
+
dependencies: any;
|
|
31
|
+
/**
|
|
32
|
+
* - Plugin state listenOptions (reference to pluginState.listenOptions)
|
|
33
|
+
*/
|
|
34
|
+
options: any;
|
|
35
|
+
/**
|
|
36
|
+
* - Viewport information with X, Y, width, height
|
|
37
|
+
*/
|
|
38
|
+
viewport: any;
|
|
39
|
+
/**
|
|
40
|
+
* - Event type ('key')
|
|
41
|
+
*/
|
|
42
|
+
type: string;
|
|
43
|
+
};
|
|
44
|
+
/**
|
|
45
|
+
* @function _listenDOM
|
|
46
|
+
* @description Set up DOM event listeners for keyboard events
|
|
47
|
+
* @param {Object} dependencies - Dependencies object containing ev, _specialChars, _readKeyEvent, extra, resetState
|
|
48
|
+
* @param {Object} state - Plugin state containing listenOptions and currentContext
|
|
49
|
+
* @returns {Object} - Object containing start and stop methods
|
|
50
|
+
*
|
|
51
|
+
* @typedef {Object} KeyEventData
|
|
52
|
+
* @property {Function} wait - Function to wait for keys (disables key sequence)
|
|
53
|
+
* @property {Function} end - Function to end waiting for keys (enables key sequence)
|
|
54
|
+
* @property {Function} ignore - Function to ignore the last key in sequence
|
|
55
|
+
* @property {Function} isWaiting - Function to check if currently waiting for keys
|
|
56
|
+
* @property {string|null} note - Current context note
|
|
57
|
+
* @property {string} context - Current context name
|
|
58
|
+
* @property {Object} dependencies - Extra dependencies object
|
|
59
|
+
* @property {Object} options - Plugin state listenOptions (reference to pluginState.listenOptions)
|
|
60
|
+
* @property {Object} viewport - Viewport information with X, Y, width, height
|
|
61
|
+
* @property {string} type - Event type ('key')
|
|
62
|
+
*/
|
|
63
|
+
declare function _listenDOM(dependencies: any, state: any): any;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
export default _registerShortcutEvents;
|
|
2
|
+
export type KeySetupData = {
|
|
3
|
+
/**
|
|
4
|
+
* - Extra dependencies object
|
|
5
|
+
*/
|
|
6
|
+
dependencies: any;
|
|
7
|
+
/**
|
|
8
|
+
* - Default options (clone of pluginState.defaultOptions)
|
|
9
|
+
*/
|
|
10
|
+
defaults: any;
|
|
11
|
+
/**
|
|
12
|
+
* - Plugin state listenOptions (reference to pluginState.listenOptions)
|
|
13
|
+
*/
|
|
14
|
+
options: any;
|
|
15
|
+
};
|
|
16
|
+
/**
|
|
17
|
+
* @function _registerShortcutEvents
|
|
18
|
+
* @description Register keyboard shortcut events and handle setup
|
|
19
|
+
* @param {Object} dependencies - Dependencies object containing regex
|
|
20
|
+
* @param {Object} pluginState - Plugin state containing currentContext, shortcuts
|
|
21
|
+
* @returns {number} - Number of registered shortcuts
|
|
22
|
+
*
|
|
23
|
+
* @typedef {Object} KeySetupData
|
|
24
|
+
* @property {Object} dependencies - Extra dependencies object
|
|
25
|
+
* @property {Object} defaults - Default options (clone of pluginState.defaultOptions)
|
|
26
|
+
* @property {Object} options - Plugin state listenOptions (reference to pluginState.listenOptions)
|
|
27
|
+
*/
|
|
28
|
+
declare function _registerShortcutEvents(dependencies: any, pluginState: any): number;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export default _specialChars;
|
|
2
|
+
/**
|
|
3
|
+
* @function _specialChars
|
|
4
|
+
* @description Get mapping of special keyboard characters to their normalized names
|
|
5
|
+
* @returns {Object} - Object mapping keyboard event keys to normalized names
|
|
6
|
+
*/
|
|
7
|
+
declare function _specialChars(): any;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export default pluginKey;
|
|
2
|
+
/**
|
|
3
|
+
* @function pluginKey
|
|
4
|
+
* @description Plugin for keyboard shortcuts
|
|
5
|
+
* @param {function} setupPlugin - Plugin setup function from the library
|
|
6
|
+
* @param {Object} [options={}] - Plugin options
|
|
7
|
+
* @param {number} [options.keyWait=480] - Time to wait for key sequence in ms
|
|
8
|
+
* @param {function} [options.streamKeys] - Function to stream key presses
|
|
9
|
+
* @returns {PluginAPI} Plugin API
|
|
10
|
+
*/
|
|
11
|
+
declare function pluginKey(setupPlugin: Function, options?: {
|
|
12
|
+
keyWait?: number;
|
|
13
|
+
streamKeys?: Function;
|
|
14
|
+
}): PluginAPI;
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
export default _listenDOM;
|
|
2
|
+
export type ScrollEventData = {
|
|
3
|
+
/**
|
|
4
|
+
* - Current scroll X position
|
|
5
|
+
*/
|
|
6
|
+
x: number;
|
|
7
|
+
/**
|
|
8
|
+
* - Current scroll Y position
|
|
9
|
+
*/
|
|
10
|
+
y: number;
|
|
11
|
+
/**
|
|
12
|
+
* - Scroll direction ('up', 'down', 'left', 'right')
|
|
13
|
+
*/
|
|
14
|
+
direction: string;
|
|
15
|
+
/**
|
|
16
|
+
* - Current context name
|
|
17
|
+
*/
|
|
18
|
+
context: string;
|
|
19
|
+
/**
|
|
20
|
+
* - Current context note
|
|
21
|
+
*/
|
|
22
|
+
note: string | null;
|
|
23
|
+
/**
|
|
24
|
+
* - Extra dependencies object
|
|
25
|
+
*/
|
|
26
|
+
dependencies: any;
|
|
27
|
+
/**
|
|
28
|
+
* - Plugin state listenOptions (reference to pluginState.listenOptions)
|
|
29
|
+
*/
|
|
30
|
+
options: any;
|
|
31
|
+
/**
|
|
32
|
+
* - Viewport information with X, Y, width, height
|
|
33
|
+
*/
|
|
34
|
+
viewport: any;
|
|
35
|
+
/**
|
|
36
|
+
* - Event type ('scroll')
|
|
37
|
+
*/
|
|
38
|
+
type: string;
|
|
39
|
+
};
|
|
40
|
+
/**
|
|
41
|
+
* @function _listenDOM
|
|
42
|
+
* @description Set up DOM event listeners for scroll events
|
|
43
|
+
* @param {Object} dependencies - Dependencies object containing ev, resetState, extra
|
|
44
|
+
* @param {Object} state - Plugin state containing listenOptions and currentContext
|
|
45
|
+
* @returns {Object} - Object containing start and stop methods
|
|
46
|
+
*
|
|
47
|
+
* @typedef {Object} ScrollEventData
|
|
48
|
+
* @property {number} x - Current scroll X position
|
|
49
|
+
* @property {number} y - Current scroll Y position
|
|
50
|
+
* @property {string} direction - Scroll direction ('up', 'down', 'left', 'right')
|
|
51
|
+
* @property {string} context - Current context name
|
|
52
|
+
* @property {string|null} note - Current context note
|
|
53
|
+
* @property {Object} dependencies - Extra dependencies object
|
|
54
|
+
* @property {Object} options - Plugin state listenOptions (reference to pluginState.listenOptions)
|
|
55
|
+
* @property {Object} viewport - Viewport information with X, Y, width, height
|
|
56
|
+
* @property {string} type - Event type ('scroll')
|
|
57
|
+
*/
|
|
58
|
+
declare function _listenDOM(dependencies: any, state: any): any;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
export default _registerShortcutEvents;
|
|
2
|
+
export type ScrollSetupData = {
|
|
3
|
+
/**
|
|
4
|
+
* - Extra dependencies object
|
|
5
|
+
*/
|
|
6
|
+
dependencies: any;
|
|
7
|
+
/**
|
|
8
|
+
* - Default options (clone of pluginState.defaultOptions)
|
|
9
|
+
*/
|
|
10
|
+
defaults: any;
|
|
11
|
+
/**
|
|
12
|
+
* - Plugin state listenOptions (reference to pluginState.listenOptions)
|
|
13
|
+
*/
|
|
14
|
+
options: any;
|
|
15
|
+
};
|
|
16
|
+
/**
|
|
17
|
+
* @function _registerShortcutEvents
|
|
18
|
+
* @description Register scroll shortcut events and handle setup
|
|
19
|
+
* @param {Object} dependencies - Dependencies object containing regex
|
|
20
|
+
* @param {Object} pluginState - Plugin state containing currentContext, shortcuts
|
|
21
|
+
* @returns {number} - Number of registered shortcuts
|
|
22
|
+
*
|
|
23
|
+
* @typedef {Object} ScrollSetupData
|
|
24
|
+
* @property {Object} dependencies - Extra dependencies object
|
|
25
|
+
* @property {Object} defaults - Default options (clone of pluginState.defaultOptions)
|
|
26
|
+
* @property {Object} options - Plugin state listenOptions (reference to pluginState.listenOptions)
|
|
27
|
+
*/
|
|
28
|
+
declare function _registerShortcutEvents(dependencies: any, pluginState: any): number;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export default pluginScroll;
|
|
2
|
+
/**
|
|
3
|
+
* @function pluginScroll
|
|
4
|
+
* @description Plugin for scroll event shortcuts
|
|
5
|
+
* @param {function} setupPlugin - Plugin setup function from the library
|
|
6
|
+
* @param {Object} [options={}] - Plugin options
|
|
7
|
+
* @param {number} [options.scrollWait=50] - Delay between scroll events in ms
|
|
8
|
+
* @param {number} [options.endScrollWait=400] - Delay when scroll was stopped in ms
|
|
9
|
+
* @param {number} [options.minSpace=40] - Minimum distance between scroll events in px
|
|
10
|
+
* @returns {PluginAPI} Plugin API
|
|
11
|
+
*/
|
|
12
|
+
declare function pluginScroll(setupPlugin: Function, options?: {
|
|
13
|
+
scrollWait?: number;
|
|
14
|
+
endScrollWait?: number;
|
|
15
|
+
minSpace?: number;
|
|
16
|
+
}): PluginAPI;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var t=require("@peter.naydenov/notice");var e={_normalizeWithPlugins:function(t,e){return function(t){const n=e.shortcuts;Object.keys(n).forEach(e=>{Object.entries(n[e]).forEach(([i,o])=>{const r=t(i);r!==i&&(delete n[e][i],n[e][r]=o)})})}},_readShortcutWithPlugins:function(t,e){return function(n){const{inAPI:i}=t,o=n.split(":")[0].toLowerCase().trim(),r=i._systemAction(o,"none");let s=n;return-1!==r&&(s=e.plugins[r].shortcutName(n)),s}},_setupPlugin:function(t,e){const{inAPI:n}=t,{currentContext:i,shortcuts:o,exposeShortcut:r,ERROR_EVENT_NAME:s}=e;return function(e){const{prefix:c,_normalizeShortcutName:u,_registerShortcutEvents:l,_listenDOM:a,pluginState:p,deps:d}=e,{resetState:f}=d;p.currentContext=i,p.shortcuts=o,p.exposeShortcut=r,p.ERROR_EVENT_NAME=s;const h={ev:t.ev,extra:t.extra,...d};n._normalizeWithPlugins(u);let m=l(h,p);const g=a(h,p);m>0&&g.start();const v={getPrefix:()=>c,shortcutName:t=>u(t),contextChange:()=>{f(),m=l(h,p),m<1&&g.stop(),m>0&&g.start()},mute:()=>g.stop(),unmute:()=>g.start(),destroy:()=>{g.stop(),f()}};return Object.freeze(v),v}},_systemAction:function(t,e){return function(t,n,i=null){return e.plugins.findIndex(e=>e.getPrefix()===t&&(e[n]&&e[n](i),!0))}},changeContext:function(t,e){const{shortcuts:n,currentContext:i,ERROR_EVENT_NAME:o}=e,{ev:r}=t;return function(t=!1){const s=i.name;if(!t)return r.reset(),void(i.name=null);s!==t&&(n[t]?(n[s]&&r.reset(),i.name=t,e.plugins.forEach(e=>e.contextChange(t)),Object.entries(n[t]).forEach(([t,e])=>{t.includes(":SETUP")||e.forEach(e=>r.on(t,e))}),r.on("*",(...t)=>{e.exposeShortcut&&e.exposeShortcut(...t)})):r.emit(o,`Context '${t}' does not exist`))}},listShortcuts:function(t,e){const n=e.shortcuts;return function(t=null){if(null!=t){const e=n[t];return null==e?null:Object.entries(e).map(([t,e])=>t)}return Object.keys(n).map(t=>{const e={};return e.context=t,e.shortcuts=Object.entries(n[t]).map(([t,e])=>t),e})}},load:function(t,e){const{shortcuts:n,plugins:i}=e,{API:{changeContext:o,getContext:r}}=t;return function(t){const e=r(),s=i.map(t=>t.getPrefix().toUpperCase());let c=!1;Object.entries(t).forEach(([t,o])=>{t===e&&(c=!0),n[t]={},Object.entries(o).forEach(([e,o])=>{let r=e;const c=e.toUpperCase().trim(),u=s.map((t,e)=>c.startsWith(t)?e:null).filter(t=>null!==t);if(u.length){const t=u[0];r=i[t].shortcutName(e)}o instanceof Function&&(o=[o]),n[t][r]=o})}),c&&(o(),o(e))}},unload:function(t,e){const{currentContext:n,shortcuts:i,ERROR_EVENT_NAME:o}=e,{ev:r}=t;return function(t){n.name!==t?i[t]?delete i[t]:r.emit(o,`Context '${t}' does not exist`):r.emit(o,`Context '${t}' can't be removed during is current active context. Change the context first`)}}};function n(t,e){const{ev:n,_specialChars:i,_readKeyEvent:o,extra:r,resetState:s}=t,{currentContext:c,streamKeys:u,listenOptions:l}=e;let a=[],p=null,d=!0,f=!1;const h=()=>d=!1,m=()=>d=!0,g=()=>f=!0,v=()=>!1===d;function x(){const t=a.map(t=>[t.join("+")]),i={wait:h,end:m,ignore:g,isWaiting:v,note:c.note,context:c.name,dependencies:r,options:e.listenOptions,viewport:{X:window.scrollX,Y:window.scrollY,width:window.innerWidth,height:window.innerHeight},type:"key"};if(!d){const e=`KEY:${t.at(-1).join("+")}`;n.emit(e,i),f&&(a=a.slice(0,-1),f=!1)}if(d){const o=`KEY:${t.join(",")}`;n.emit(o,i),f&&(a=a.slice(0,-1),f=!1),a=[],clearTimeout(e.keyIgnore),e.keyIgnore=null,clearTimeout(p),p=null}}function E(n){clearTimeout(p);if(i().hasOwnProperty(n.code))return a.push(o(n,i)),u&&u({key:n.key,context:c.name,note:c.note,dependencies:t.extra}),e.keyIgnore?(clearTimeout(e.keyIgnore),e.keyIgnore=setTimeout(()=>e.keyIgnore=null,l.keyWait),void a.pop()):d&&a.length===e.maxSequence?(x(),void(e.keyIgnore=setTimeout(()=>e.keyIgnore=null,l.keyWait))):void(d?p=setTimeout(x,l.keyWait):x())}function O(n){if(!i().hasOwnProperty(n.code)){if(clearTimeout(p),u&&u({key:n.key,context:c.name,note:c.note,dependencies:t.extra}),e.keyIgnore)return clearTimeout(e.keyIgnore),void(e.keyIgnore=setTimeout(()=>e.keyIgnore=null,l.keyWait));if(a.push(o(n,i)),d&&a.length===e.maxSequence)return x(),void(e.keyIgnore=setTimeout(()=>e.keyIgnore=null,l.keyWait));d?p=setTimeout(x,l.keyWait):x()}}return{start:function(){e.active||(document.addEventListener("keydown",E),document.addEventListener("keypress",O),e.active=!0)},stop:function(){e.active&&(document.removeEventListener("keydown",E),document.removeEventListener("keypress",O),e.active=!1,p&&(clearTimeout(p),p=null),e.keyIgnore&&(clearTimeout(e.keyIgnore),e.keyIgnore=null),a=[],d=!0,f=!1)}}}function i(t){const e=t.toUpperCase(),n=/KEY\s*\:/i.test(e),i=e.indexOf(":");if(!n)return t;if(e.includes("SETUP"))return"KEY:SETUP";return`KEY:${e.slice(i+1).split(",").map(t=>t.trim()).map(t=>t.split("+").map(t=>t.trim()).sort().join("+")).join(",")}`}function o(t,e){const{shiftKey:n,altKey:i,ctrlKey:o}=t,r=e(),s=t.code.replace("Key","").replace("Digit",""),c=[];return o&&c.push("CTRL"),n&&c.push("SHIFT"),i&&c.push("ALT"),r.hasOwnProperty(s)?c.push(r[s].toUpperCase()):["ControlLeft","ControlRight","ShiftLeft","ShiftRight","AltLeft","AltRight","Meta"].includes(s)||c.push(s.toUpperCase()),c.sort()}function r(t,e){let n=0,i=!1;const o=e.defaultOptions,{regex:r}=t,{currentContext:{name:s},shortcuts:c}=e;return null==s?0:(Object.entries(c[s]).forEach(([s,c])=>{if(!r.test(s))return;if("KEY:SETUP"===s){i=!0;const n=c.reduce((n,i)=>{const o=i({dependencies:t.extra,defaults:structuredClone(e.defaultOptions),options:e.listenOptions});return Object.assign(n,o)},o);return void Object.assign(e.listenOptions,n)}n++;const u=s.slice(4).split(",").length;e.maxSequence<u&&(e.maxSequence=u)}),i||Object.assign(e.listenOptions,o),n)}function s(){return{ArrowLeft:"LEFT",ArrowUp:"UP",ArrowRight:"RIGHT",ArrowDown:"DOWN",Enter:"ENTER",NumpadEnter:"ENTER",Escape:"ESC",Backspace:"BACKSPACE",Space:"SPACE",Tab:"TAB",Backquote:"`",BracketLeft:"[",BracketRight:"]",Equal:"=",Slash:"/",Backslash:"\\",IntlBackslash:"`",F1:"F1",F2:"F2",F3:"F3",F4:"F4",F5:"F5",F6:"F6",F7:"F7",F8:"F8",F9:"F9",F10:"F10",F11:"F11",F12:"F12"}}function c(t,e,n){const{listenOptions:{clickTarget:i}}=e,o=n;if(o===document.body)return null;return i.some(t=>o.hasAttribute(t))?o:c(t,e,o.parentNode)}function u(t,e){const{ev:n,_findTarget:i,_readClickEvent:o,extra:r}=t,{listenOptions:s,currentContext:c}=e;let u=null,l=null,a=null,p=null,d=0;function f(){if(!u)return;const{left:t,top:i,width:s,height:f}=u.getBoundingClientRect(),h=window.scrollX,m=window.scrollY,g=o(l,d),v={target:u,x:l.clientX,y:l.clientY,context:c.name,note:c.note,options:e.listenOptions,event:l,dependencies:r,viewport:{X:h,Y:m,width:window.innerWidth,height:window.innerHeight},sizes:{width:s,height:f},position:{x:t,y:i},pagePosition:{x:t+h,y:i+m},type:"click"};n.emit(g,v),a=null,p=null,u=null,l=null,d=0}function h(n){let o=e.maxLeftClicks;if(clearTimeout(a),p)return clearTimeout(p),void(p=setTimeout(()=>p=null,s.mouseWait));if(u=i(t,e,n.target),null!=u){if(u&&u.dataset.hasOwnProperty("quickClick")&&(o=1),u&&"A"===u.tagName&&(o=1),l=n,d++,d>=o)return f(),void(o>1&&(p=setTimeout(()=>p=null,s.mouseWait)));a=setTimeout(f,s.mouseWait)}}function m(n){let o=e.maxRightClicks;if(clearTimeout(a),p)return clearTimeout(p),void(p=setTimeout(()=>p=null,s.mouseWait));if(u=i(t,e,n.target),null!=u){if(u&&u.dataset.hasOwnProperty("quickClick")&&(o=1),u&&"A"===u.tagName&&(o=1),l=n,d++,d>=o)return f(),void(o>1&&(p=setTimeout(()=>p=null,s.mouseWait)));a=setTimeout(f,s.mouseWait)}}return{start:function(){e.active||(window.addEventListener("contextmenu",m),document.addEventListener("click",h),e.active=!0)},stop:function(){e.active&&(window.removeEventListener("contextmenu",m),document.removeEventListener("click",h),e.active=!1,p&&(clearTimeout(p),p=null),u=null,l=null,d=0)}}}function l(t){const e=t.toUpperCase(),n=/CLICK\s*\:/i.test(e),i=["LEFT","MIDDLE","RIGHT"],o=["ALT","SHIFT","CTRL"];let r=null,s=0;const c=[],u=e.indexOf(":");if(!n)return t;if(e.includes("SETUP"))return"CLICK:SETUP";return e.slice(u+1).trim().split("-").map(t=>t.trim()).forEach(t=>{i.includes(t)?r=t:o.includes(t)?c.push(t):isNaN(t)||(s=t)}),`CLICK:${r}-${s}${c.length>0?"-":""}${c.sort().join("-")}`}function a(t,e){const{shiftKey:n,altKey:i,ctrlKey:o,key:r,button:s}=t,c=`CLICK:${["LEFT","MIDDLE","RIGHT"][s]}-${e}`,u=[];return o&&u.push("CTRL"),n&&u.push("SHIFT"),i&&u.push("ALT"),u.length>0?`${c}${u.length>0?"-":""}${u.sort().join("-")}`:`${c}`}function p(t,e){let n=0,i=!1;const o=e.defaultOptions,{regex:r}=t,{listenOptions:s,currentContext:{name:c},shortcuts:u}=e;return null==c||(Object.entries(u[c]).forEach(([c,u])=>{if(!r.test(c))return;if("CLICK:SETUP"===c){i=!0;const n=u.reduce((n,i)=>{const o=i({dependencies:t.extra,defaults:structuredClone(e.defaultOptions),options:s});return Object.assign(n,o)},o);return void Object.assign(e.listenOptions,n)}n++;const[l,a]=c.slice(6).split("-");"LEFT"===l&&e.maxLeftClicks<a&&(e.maxLeftClicks=a),"RIGHT"===l&&e.maxRightClicks<a&&(e.maxRightClicks=a)}),i||Object.assign(e.listenOptions,o)),n}function d(t,e){const{ev:n}=t;let i=null;function o(t,e,n,i){const{left:o,top:r,width:s,height:c}=n.target.getBoundingClientRect(),u=window.scrollX,l=window.scrollY;return{target:n.target,context:e.currentContext.name,note:e.currentContext.note,event:n,dependencies:t.extra,options:e.listenOptions,viewport:{X:u,Y:l,width:window.innerWidth,height:window.innerHeight},sizes:{width:s,height:c},position:{x:o,y:r},pagePosition:{x:o+u,y:r+l},type:i}}function r(i){const{callbacks:r,typeFn:s}=e;i.target;const c=o(t,e,i,"form-in"),u=`${s(c)}/in`;null!=r[u]&&n.emit(u,c,r[u])}function s(i){const{callbacks:r,typeFn:s}=e,c=o(t,e,i,"form-out"),u=`${s(c)}/out`;null!=r[u]&&n.emit(u,c,r[u])}function c(r){const{callbacks:s,typeFn:c}=e,u=o(t,e,r,"form-instant"),l=c(u),a=e.wait[`${l}`],p=`${l}/instant`;if(null==s[p])return;if(0===a)return void n.emit(p,u,s[p]);clearTimeout(i),i=setTimeout(()=>n.emit(p,u,s[p]),a)}return{start:function(){e.active||(document.addEventListener("focusin",r),document.addEventListener("focusout",s),document.addEventListener("input",c),e.active=!0)},stop:function(){e.active&&(document.removeEventListener("focusin",r),document.removeEventListener("focusout",s),document.removeEventListener("input",c),e.active=!1,i&&(clearTimeout(i),i=null))}}}function f(t){const e=t.toUpperCase(),n=/FORM\s*\:/i.test(e),i=e.indexOf(":");if(!n)return t;return`FORM:${e.slice(i+1).trim()}`}function h(t,e){const{regex:n,_defaults:i,ev:o}=t,{currentContext:{name:r,note:s},shortcuts:c,callbacks:u,ERROR_EVENT_NAME:l,defaultOptions:a}=e;let p=[],d=[],f=[],h=0;if(null==r)return!1;if(Object.entries(c[r]).forEach(([i,o])=>{if(n.test(i)){if(i.includes("SETUP")){const n=o.reduce((n,i)=>{const o=i({dependencies:t.extra,defaults:structuredClone(e.defaultOptions),options:e.listenOptions});return Object.assign(n,o)},a);return void Object.assign(e.listenOptions,n)}"FORM:WATCH"===i&&(p=o),"FORM:DEFINE"===i&&(d=o),"FORM:ACTION"===i&&(f=o)}}),0===f.length)return h;const m=new Set;0===d.length&&(d=[i.define]),0===p.length&&(p=[i.watch]);const g=p.map(n=>n({dependencies:t.extra,context:r,note:s,options:e.listenOptions})).reduce((t,e)=>(t.push(e),t),[]);return e.watchList=document.querySelectorAll(g),e.watchList.forEach(n=>{const{left:i,top:o,width:c,height:u}=n.getBoundingClientRect(),l=window.scrollX,a=window.scrollY;return m.add(d[0]({target:n,context:r,note:s,dependencies:t.extra,options:e.listenOptions,viewport:{X:l,Y:a,width:window.innerWidth,height:window.innerHeight},sizes:{width:c,height:u},position:{x:i,y:o},pagePosition:{x:i+l,y:o+a}}))}),e.typeFn=d[0]?d[0]:i.define,f.forEach(n=>{if(!(n instanceof Function))return o.emit(l,"The 'form:action' should be a function."),!1;const i=n({dependencies:t.extra,options:e.listenOptions});if(!(i instanceof Array))return o.emit(l,"Warning: The 'form:action' function should RETURN an array."),!1;i.forEach(({fn:t,type:n,timing:i,wait:r=0})=>{if(m.has(n)&&t instanceof Function){const e=`${n}/${i}`,r=u.hasOwnProperty(e);r?u[e].push(t):u[e]=[t],r||o.on(e,(t,e)=>{e.forEach(e=>{e instanceof Function&&e(t)})})}"instant"===i&&(e.wait[`${n}`]=r)})}),h=Object.keys(e.callbacks).length,h}const m={watch:()=>"input, select, textarea, button, a",define:({target:t})=>"checkbox"===t.type||"radio"===t.type?"checkbox":"button"==t.type||"submit"==t.type?"button":"input"};function g(t,e,n){const{listenOptions:{hoverTarget:i}}=e,o=n;if(o===document.body)return!1;if(o===document)return!1;return i.some(t=>o.hasAttribute(t))?o:g(t,e,o.parentNode)}function v(t,e){const{ev:n,_findTarget:i,resetState:o,extra:r}=t;function s(o){const s=o.clientX,c=o.clientY,{hovered:u,hoverRectangle:l,listenOptions:a,hoverTimer:p,leaveTimer:d,lastEvent:f,lastHoverTarget:h}=e,m=i(t,e,o.target);if(!function(t,e,n){return!!t&&e>=t.left&&e<=t.right&&n>=t.top&&n<=t.bottom}(l,s,c)&&m!==u){if(u&&!m){if(e.hovered=!1,e.hoverRectangle=null,p&&(clearTimeout(p),e.hoverTimer=null),"off"===f)return;return void(e.leaveTimer=setTimeout(()=>{n.emit("HOVER:OFF",g(u)),e.leaveTimer=null,e.lastEvent="off"},a.wait))}u&&(n.emit("HOVER:OFF",g(u)),e.leaveTimer=null,e.lastEvent="off"),clearTimeout(d),clearTimeout(p),e.hovered=m,e.hoverRectangle=m.getBoundingClientRect(),e.hoverTimer=setTimeout(()=>{n.emit("HOVER:ON",g(m)),e.hoverTimer=null,e.lastHoverTarget=m,e.lastEvent="on"},a.wait)}function g(t){const{left:n,top:i,width:s,height:c}=t.getBoundingClientRect(),u=window.scrollX,l=window.scrollY;return{target:t,context:e.currentContext.name,note:e.currentContext.note,event:o,dependencies:r,options:e.listenOptions,viewport:{X:u,Y:l,width:window.innerWidth,height:window.innerHeight},sizes:{width:s,height:c},position:{x:n,y:i},pagePosition:{x:n+u,y:i+l},type:"hover"}}}return{start:function(){e.active||(document.addEventListener("mousemove",s),e.active=!0)},stop:function(){e.active&&(document.removeEventListener("mousemove",s),o())}}}function x(t){const e=t.toUpperCase(),n=/HOVER\s*\:/i.test(e),i=e.indexOf(":");if(!n)return t;return`HOVER:${e.slice(i+1).trim()}`}function E(t,e){let n=0,i=!1;const o=e.defaultOptions,{regex:r,_defaults:s,ev:c}=t,{currentContext:{name:u},shortcuts:l,ERROR_EVENT_NAME:a}=e;return null==u||(Object.entries(l[u]).forEach(([s,c])=>{if(r.test(s)){if("HOVER:SETUP"===s){i=!0;const n=c.reduce((n,i)=>{const o=i({dependencies:t.extra,defaults:structuredClone(e.defaultOptions),options:e.listenOptions});return Object.assign(n,o)},o);return void Object.assign(e.listenOptions,n)}n++}}),i||Object.assign(e.listenOptions,o)),n}function O(t,e){const{ev:n,resetState:i,extra:o}=t;let r=null,s=null;function c(t){t.clientX,t.clientY;const{lastPosition:i,lastDirection:c,listenOptions:u,currentContext:l}=e,{scrollWait:a,endScrollWait:p,minSpace:d}=u;if(!i)return;let f=null;const h=window.scrollX,m=window.scrollY,g=Math.abs(m-i.y),v=Math.abs(h-i.x);if(g<d&&v<d)return;const x=[];g>=d&&(m>i.y?x.push("down"):x.push("up")),v>=d&&(h>i.x?x.push("right"):x.push("left")),f=x[0]||null;const E=t=>({x:h,y:m,direction:t,context:l.name,note:l.note,dependencies:o,options:e.listenOptions,viewport:{X:h,Y:m,width:window.innerWidth,height:window.innerHeight},type:"scroll"});x.forEach(t=>{const e=`SCROLL:${t.toUpperCase()}`;n.emit(e,E(t))}),clearTimeout(r),clearTimeout(s);const O=x[x.length-1]||null;r=setTimeout(()=>{},a),s=setTimeout(()=>n.emit("SCROLL:END",E(O)),p),e.lastPosition={x:h,y:m},e.lastDirection=f}return{start:function(){e.active||(e.lastPosition={x:window.scrollX,y:window.scrollY},window.addEventListener("scroll",c),e.active=!0)},stop:function(){e.active&&(window.removeEventListener("scroll",c),i())}}}function y(t){const e=t.toUpperCase(),n=/SCROLL\s*\:/i.test(e),i=e.indexOf(":");if(!n)return t;return`SCROLL:${e.slice(i+1).trim()}`}function w(t,e){let n=0,i=!1;const o=e.defaultOptions,{regex:r}=t,{currentContext:{name:s},shortcuts:c}=e;return null==s||(Object.entries(c[s]).forEach(([s,c])=>{if(r.test(s)){if("SCROLL:SETUP"===s){i=!0;const n=c.reduce((n,i)=>{const o=i({dependencies:t.extra,defaults:structuredClone(e.defaultOptions),options:e.listenOptions});return Object.assign(n,o)},o);return void Object.assign(e.listenOptions,n)}n++}}),i||Object.assign(e.listenOptions,o)),n}exports.pluginClick=function(t,e={}){const n={_findTarget:c,_readClickEvent:a,regex:/CLICK\s*\:/i},i={active:!1,maxLeftClicks:1,maxRightClicks:1,defaultOptions:{mouseWait:320,clickTarget:["data-click","href"]},listenOptions:{mouseWait:320,clickTarget:["data-click","href"]},streamKeys:!(!e.streamKeys||"function"!=typeof e.streamKeys)&&e.streamKeys};return n.resetState=function(){},t({prefix:"click",_normalizeShortcutName:l,_registerShortcutEvents:p,_listenDOM:u,pluginState:i,deps:n})},exports.pluginForm=function(t,e={}){const n={_defaults:m,regex:/FORM\s*\:/i},i={callbacks:{},typeFn:"",watchList:[],wait:{},defaultOptions:{},listenOptions:{}};return n.resetState=function(){i.callbacks={},i.typeFn="",i.watchList=[],i.wait={}},t({prefix:"form",_normalizeShortcutName:f,_registerShortcutEvents:h,_listenDOM:d,pluginState:i,deps:n})},exports.pluginHover=function(t,e={}){const n={_findTarget:g,regex:/HOVER\s*\:/i},i={active:!1,hovered:!1,hoverRectangle:null,hoverTimer:null,leaveTimer:null,lastEvent:"",lastHoverTarget:null,defaultOptions:{hoverTarget:["data-hover"],wait:320},listenOptions:{hoverTarget:["data-hover"],wait:320}};return n.resetState=function(){i.active=!1,i.hovered=!1,i.hoverRectangle=null,clearTimeout(i.hoverTimer),clearTimeout(i.leaveTimer),i.hoverTimer=null,i.leaveTimer=null,i.lastHoverTarget=null},t({prefix:"hover",_normalizeShortcutName:x,_registerShortcutEvents:E,_listenDOM:v,pluginState:i,deps:n})},exports.pluginKey=function(t,e={}){const c={_specialChars:s,_readKeyEvent:o,regex:/KEY\s*\:/i},u={active:!1,maxSequence:1,keyIgnore:null,defaultOptions:{keyWait:480},listenOptions:{keyWait:480},streamKeys:!(!e.streamKeys||"function"!=typeof e.streamKeys)&&e.streamKeys};return c.resetState=function(){u.active=!1,u.keyIgnore=null,u.maxSequence=1},t({prefix:"key",_normalizeShortcutName:i,_registerShortcutEvents:r,_listenDOM:n,pluginState:u,deps:c})},exports.pluginScroll=function(t,e={}){const n={regex:/SCROLL\s*\:/i},i={active:!1,lastPosition:null,lastDirection:null,defaultOptions:{scrollWait:50,endScrollWait:400,minSpace:40},listenOptions:{scrollWait:50,endScrollWait:400,minSpace:40}};return n.resetState=function(){i.active=!1},t({prefix:"scroll",_normalizeShortcutName:y,_registerShortcutEvents:w,_listenDOM:O,pluginState:i,deps:n})},exports.shortcuts=function(n={}){const i={},o={},r=t(),s={currentContext:{name:null,note:null},shortcuts:{},plugins:[],exposeShortcut:!(!n.onShortcut||"function"!=typeof n.onShortcut)&&n.onShortcut,ERROR_EVENT_NAME:n.errorEventName?n.errorEventName:"@shortcuts-error"},c={ev:r,inAPI:i,API:o,extra:{}};return o.enablePlugin=(t,e={})=>{if("function"!=typeof t)return;const n=t(i._setupPlugin,e),o=n.getPrefix(),r=i._systemAction(o,"none");-1===r?(s.plugins.push(n),n.unmute()):(n.destroy(),s.plugins[r].unmute())},o.disablePlugin=t=>{const e=i._systemAction(t,"destroy");-1!==e&&s.plugins.splice(e,1)},o.mutePlugin=t=>i._systemAction(t,"mute"),o.unmutePlugin=t=>i._systemAction(t,"unmute"),o.listPlugins=()=>s.plugins.map(t=>t.getPrefix()),o.getContext=()=>s.currentContext.name,o.getNote=()=>s.currentContext.note,o.setNote=(t=null)=>{"string"!=typeof t&&null!=t||(s.currentContext.note=t)},o.pause=(t="*")=>{const e=i._readShortcutWithPlugins(t);r.stop(e)},o.resume=(t="*")=>{const e=i._readShortcutWithPlugins(t);r.start(e)},o.emit=(t,...e)=>r.emit(i._readShortcutWithPlugins(t),...e),o.listContexts=()=>Object.keys(s.shortcuts),o.setDependencies=t=>Object.assign(c.extra,t),o.getDependencies=()=>c.extra,o.reset=function(){r.reset(),o.changeContext(),s.plugins.forEach(t=>t.destroy()),o.listContexts().map(t=>o.unload(t)),c.extra={},s.exposeShortcut=null},Object.entries(e).forEach(([t,e])=>{t.startsWith("_")?i[t]=e(c,s):o[t]=e(c,s)}),o};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import t from"@peter.naydenov/notice";var e={_normalizeWithPlugins:function(t,e){return function(t){const n=e.shortcuts;Object.keys(n).forEach(e=>{Object.entries(n[e]).forEach(([i,o])=>{const r=t(i);r!==i&&(delete n[e][i],n[e][r]=o)})})}},_readShortcutWithPlugins:function(t,e){return function(n){const{inAPI:i}=t,o=n.split(":")[0].toLowerCase().trim(),r=i._systemAction(o,"none");let s=n;return-1!==r&&(s=e.plugins[r].shortcutName(n)),s}},_setupPlugin:function(t,e){const{inAPI:n}=t,{currentContext:i,shortcuts:o,exposeShortcut:r,ERROR_EVENT_NAME:s}=e;return function(e){const{prefix:c,_normalizeShortcutName:u,_registerShortcutEvents:l,_listenDOM:a,pluginState:d,deps:p}=e,{resetState:f}=p;d.currentContext=i,d.shortcuts=o,d.exposeShortcut=r,d.ERROR_EVENT_NAME=s;const h={ev:t.ev,extra:t.extra,...p};n._normalizeWithPlugins(u);let m=l(h,d);const g=a(h,d);m>0&&g.start();const v={getPrefix:()=>c,shortcutName:t=>u(t),contextChange:()=>{f(),m=l(h,d),m<1&&g.stop(),m>0&&g.start()},mute:()=>g.stop(),unmute:()=>g.start(),destroy:()=>{g.stop(),f()}};return Object.freeze(v),v}},_systemAction:function(t,e){return function(t,n,i=null){return e.plugins.findIndex(e=>e.getPrefix()===t&&(e[n]&&e[n](i),!0))}},changeContext:function(t,e){const{shortcuts:n,currentContext:i,ERROR_EVENT_NAME:o}=e,{ev:r}=t;return function(t=!1){const s=i.name;if(!t)return r.reset(),void(i.name=null);s!==t&&(n[t]?(n[s]&&r.reset(),i.name=t,e.plugins.forEach(e=>e.contextChange(t)),Object.entries(n[t]).forEach(([t,e])=>{t.includes(":SETUP")||e.forEach(e=>r.on(t,e))}),r.on("*",(...t)=>{e.exposeShortcut&&e.exposeShortcut(...t)})):r.emit(o,`Context '${t}' does not exist`))}},listShortcuts:function(t,e){const n=e.shortcuts;return function(t=null){if(null!=t){const e=n[t];return null==e?null:Object.entries(e).map(([t,e])=>t)}return Object.keys(n).map(t=>{const e={};return e.context=t,e.shortcuts=Object.entries(n[t]).map(([t,e])=>t),e})}},load:function(t,e){const{shortcuts:n,plugins:i}=e,{API:{changeContext:o,getContext:r}}=t;return function(t){const e=r(),s=i.map(t=>t.getPrefix().toUpperCase());let c=!1;Object.entries(t).forEach(([t,o])=>{t===e&&(c=!0),n[t]={},Object.entries(o).forEach(([e,o])=>{let r=e;const c=e.toUpperCase().trim(),u=s.map((t,e)=>c.startsWith(t)?e:null).filter(t=>null!==t);if(u.length){const t=u[0];r=i[t].shortcutName(e)}o instanceof Function&&(o=[o]),n[t][r]=o})}),c&&(o(),o(e))}},unload:function(t,e){const{currentContext:n,shortcuts:i,ERROR_EVENT_NAME:o}=e,{ev:r}=t;return function(t){n.name!==t?i[t]?delete i[t]:r.emit(o,`Context '${t}' does not exist`):r.emit(o,`Context '${t}' can't be removed during is current active context. Change the context first`)}}};function n(t,e){const{ev:n,_specialChars:i,_readKeyEvent:o,extra:r,resetState:s}=t,{currentContext:c,streamKeys:u,listenOptions:l}=e;let a=[],d=null,p=!0,f=!1;const h=()=>p=!1,m=()=>p=!0,g=()=>f=!0,v=()=>!1===p;function x(){const t=a.map(t=>[t.join("+")]),i={wait:h,end:m,ignore:g,isWaiting:v,note:c.note,context:c.name,dependencies:r,options:e.listenOptions,viewport:{X:window.scrollX,Y:window.scrollY,width:window.innerWidth,height:window.innerHeight},type:"key"};if(!p){const e=`KEY:${t.at(-1).join("+")}`;n.emit(e,i),f&&(a=a.slice(0,-1),f=!1)}if(p){const o=`KEY:${t.join(",")}`;n.emit(o,i),f&&(a=a.slice(0,-1),f=!1),a=[],clearTimeout(e.keyIgnore),e.keyIgnore=null,clearTimeout(d),d=null}}function E(n){clearTimeout(d);if(i().hasOwnProperty(n.code))return a.push(o(n,i)),u&&u({key:n.key,context:c.name,note:c.note,dependencies:t.extra}),e.keyIgnore?(clearTimeout(e.keyIgnore),e.keyIgnore=setTimeout(()=>e.keyIgnore=null,l.keyWait),void a.pop()):p&&a.length===e.maxSequence?(x(),void(e.keyIgnore=setTimeout(()=>e.keyIgnore=null,l.keyWait))):void(p?d=setTimeout(x,l.keyWait):x())}function O(n){if(!i().hasOwnProperty(n.code)){if(clearTimeout(d),u&&u({key:n.key,context:c.name,note:c.note,dependencies:t.extra}),e.keyIgnore)return clearTimeout(e.keyIgnore),void(e.keyIgnore=setTimeout(()=>e.keyIgnore=null,l.keyWait));if(a.push(o(n,i)),p&&a.length===e.maxSequence)return x(),void(e.keyIgnore=setTimeout(()=>e.keyIgnore=null,l.keyWait));p?d=setTimeout(x,l.keyWait):x()}}return{start:function(){e.active||(document.addEventListener("keydown",E),document.addEventListener("keypress",O),e.active=!0)},stop:function(){e.active&&(document.removeEventListener("keydown",E),document.removeEventListener("keypress",O),e.active=!1,d&&(clearTimeout(d),d=null),e.keyIgnore&&(clearTimeout(e.keyIgnore),e.keyIgnore=null),a=[],p=!0,f=!1)}}}function i(t){const e=t.toUpperCase(),n=/KEY\s*\:/i.test(e),i=e.indexOf(":");if(!n)return t;if(e.includes("SETUP"))return"KEY:SETUP";return`KEY:${e.slice(i+1).split(",").map(t=>t.trim()).map(t=>t.split("+").map(t=>t.trim()).sort().join("+")).join(",")}`}function o(t,e){const{shiftKey:n,altKey:i,ctrlKey:o}=t,r=e(),s=t.code.replace("Key","").replace("Digit",""),c=[];return o&&c.push("CTRL"),n&&c.push("SHIFT"),i&&c.push("ALT"),r.hasOwnProperty(s)?c.push(r[s].toUpperCase()):["ControlLeft","ControlRight","ShiftLeft","ShiftRight","AltLeft","AltRight","Meta"].includes(s)||c.push(s.toUpperCase()),c.sort()}function r(t,e){let n=0,i=!1;const o=e.defaultOptions,{regex:r}=t,{currentContext:{name:s},shortcuts:c}=e;return null==s?0:(Object.entries(c[s]).forEach(([s,c])=>{if(!r.test(s))return;if("KEY:SETUP"===s){i=!0;const n=c.reduce((n,i)=>{const o=i({dependencies:t.extra,defaults:structuredClone(e.defaultOptions),options:e.listenOptions});return Object.assign(n,o)},o);return void Object.assign(e.listenOptions,n)}n++;const u=s.slice(4).split(",").length;e.maxSequence<u&&(e.maxSequence=u)}),i||Object.assign(e.listenOptions,o),n)}function s(){return{ArrowLeft:"LEFT",ArrowUp:"UP",ArrowRight:"RIGHT",ArrowDown:"DOWN",Enter:"ENTER",NumpadEnter:"ENTER",Escape:"ESC",Backspace:"BACKSPACE",Space:"SPACE",Tab:"TAB",Backquote:"`",BracketLeft:"[",BracketRight:"]",Equal:"=",Slash:"/",Backslash:"\\",IntlBackslash:"`",F1:"F1",F2:"F2",F3:"F3",F4:"F4",F5:"F5",F6:"F6",F7:"F7",F8:"F8",F9:"F9",F10:"F10",F11:"F11",F12:"F12"}}function c(t,e={}){const c={_specialChars:s,_readKeyEvent:o,regex:/KEY\s*\:/i},u={active:!1,maxSequence:1,keyIgnore:null,defaultOptions:{keyWait:480},listenOptions:{keyWait:480},streamKeys:!(!e.streamKeys||"function"!=typeof e.streamKeys)&&e.streamKeys};return c.resetState=function(){u.active=!1,u.keyIgnore=null,u.maxSequence=1},t({prefix:"key",_normalizeShortcutName:i,_registerShortcutEvents:r,_listenDOM:n,pluginState:u,deps:c})}function u(t,e,n){const{listenOptions:{clickTarget:i}}=e,o=n;if(o===document.body)return null;return i.some(t=>o.hasAttribute(t))?o:u(t,e,o.parentNode)}function l(t,e){const{ev:n,_findTarget:i,_readClickEvent:o,extra:r}=t,{listenOptions:s,currentContext:c}=e;let u=null,l=null,a=null,d=null,p=0;function f(){if(!u)return;const{left:t,top:i,width:s,height:f}=u.getBoundingClientRect(),h=window.scrollX,m=window.scrollY,g=o(l,p),v={target:u,x:l.clientX,y:l.clientY,context:c.name,note:c.note,options:e.listenOptions,event:l,dependencies:r,viewport:{X:h,Y:m,width:window.innerWidth,height:window.innerHeight},sizes:{width:s,height:f},position:{x:t,y:i},pagePosition:{x:t+h,y:i+m},type:"click"};n.emit(g,v),a=null,d=null,u=null,l=null,p=0}function h(n){let o=e.maxLeftClicks;if(clearTimeout(a),d)return clearTimeout(d),void(d=setTimeout(()=>d=null,s.mouseWait));if(u=i(t,e,n.target),null!=u){if(u&&u.dataset.hasOwnProperty("quickClick")&&(o=1),u&&"A"===u.tagName&&(o=1),l=n,p++,p>=o)return f(),void(o>1&&(d=setTimeout(()=>d=null,s.mouseWait)));a=setTimeout(f,s.mouseWait)}}function m(n){let o=e.maxRightClicks;if(clearTimeout(a),d)return clearTimeout(d),void(d=setTimeout(()=>d=null,s.mouseWait));if(u=i(t,e,n.target),null!=u){if(u&&u.dataset.hasOwnProperty("quickClick")&&(o=1),u&&"A"===u.tagName&&(o=1),l=n,p++,p>=o)return f(),void(o>1&&(d=setTimeout(()=>d=null,s.mouseWait)));a=setTimeout(f,s.mouseWait)}}return{start:function(){e.active||(window.addEventListener("contextmenu",m),document.addEventListener("click",h),e.active=!0)},stop:function(){e.active&&(window.removeEventListener("contextmenu",m),document.removeEventListener("click",h),e.active=!1,d&&(clearTimeout(d),d=null),u=null,l=null,p=0)}}}function a(t){const e=t.toUpperCase(),n=/CLICK\s*\:/i.test(e),i=["LEFT","MIDDLE","RIGHT"],o=["ALT","SHIFT","CTRL"];let r=null,s=0;const c=[],u=e.indexOf(":");if(!n)return t;if(e.includes("SETUP"))return"CLICK:SETUP";return e.slice(u+1).trim().split("-").map(t=>t.trim()).forEach(t=>{i.includes(t)?r=t:o.includes(t)?c.push(t):isNaN(t)||(s=t)}),`CLICK:${r}-${s}${c.length>0?"-":""}${c.sort().join("-")}`}function d(t,e){const{shiftKey:n,altKey:i,ctrlKey:o,key:r,button:s}=t,c=`CLICK:${["LEFT","MIDDLE","RIGHT"][s]}-${e}`,u=[];return o&&u.push("CTRL"),n&&u.push("SHIFT"),i&&u.push("ALT"),u.length>0?`${c}${u.length>0?"-":""}${u.sort().join("-")}`:`${c}`}function p(t,e){let n=0,i=!1;const o=e.defaultOptions,{regex:r}=t,{listenOptions:s,currentContext:{name:c},shortcuts:u}=e;return null==c||(Object.entries(u[c]).forEach(([c,u])=>{if(!r.test(c))return;if("CLICK:SETUP"===c){i=!0;const n=u.reduce((n,i)=>{const o=i({dependencies:t.extra,defaults:structuredClone(e.defaultOptions),options:s});return Object.assign(n,o)},o);return void Object.assign(e.listenOptions,n)}n++;const[l,a]=c.slice(6).split("-");"LEFT"===l&&e.maxLeftClicks<a&&(e.maxLeftClicks=a),"RIGHT"===l&&e.maxRightClicks<a&&(e.maxRightClicks=a)}),i||Object.assign(e.listenOptions,o)),n}function f(t,e={}){const n={_findTarget:u,_readClickEvent:d,regex:/CLICK\s*\:/i},i={active:!1,maxLeftClicks:1,maxRightClicks:1,defaultOptions:{mouseWait:320,clickTarget:["data-click","href"]},listenOptions:{mouseWait:320,clickTarget:["data-click","href"]},streamKeys:!(!e.streamKeys||"function"!=typeof e.streamKeys)&&e.streamKeys};return n.resetState=function(){},t({prefix:"click",_normalizeShortcutName:a,_registerShortcutEvents:p,_listenDOM:l,pluginState:i,deps:n})}function h(t,e){const{ev:n}=t;let i=null;function o(t,e,n,i){const{left:o,top:r,width:s,height:c}=n.target.getBoundingClientRect(),u=window.scrollX,l=window.scrollY;return{target:n.target,context:e.currentContext.name,note:e.currentContext.note,event:n,dependencies:t.extra,options:e.listenOptions,viewport:{X:u,Y:l,width:window.innerWidth,height:window.innerHeight},sizes:{width:s,height:c},position:{x:o,y:r},pagePosition:{x:o+u,y:r+l},type:i}}function r(i){const{callbacks:r,typeFn:s}=e;i.target;const c=o(t,e,i,"form-in"),u=`${s(c)}/in`;null!=r[u]&&n.emit(u,c,r[u])}function s(i){const{callbacks:r,typeFn:s}=e,c=o(t,e,i,"form-out"),u=`${s(c)}/out`;null!=r[u]&&n.emit(u,c,r[u])}function c(r){const{callbacks:s,typeFn:c}=e,u=o(t,e,r,"form-instant"),l=c(u),a=e.wait[`${l}`],d=`${l}/instant`;if(null==s[d])return;if(0===a)return void n.emit(d,u,s[d]);clearTimeout(i),i=setTimeout(()=>n.emit(d,u,s[d]),a)}return{start:function(){e.active||(document.addEventListener("focusin",r),document.addEventListener("focusout",s),document.addEventListener("input",c),e.active=!0)},stop:function(){e.active&&(document.removeEventListener("focusin",r),document.removeEventListener("focusout",s),document.removeEventListener("input",c),e.active=!1,i&&(clearTimeout(i),i=null))}}}function m(t){const e=t.toUpperCase(),n=/FORM\s*\:/i.test(e),i=e.indexOf(":");if(!n)return t;return`FORM:${e.slice(i+1).trim()}`}function g(t,e){const{regex:n,_defaults:i,ev:o}=t,{currentContext:{name:r,note:s},shortcuts:c,callbacks:u,ERROR_EVENT_NAME:l,defaultOptions:a}=e;let d=[],p=[],f=[],h=0;if(null==r)return!1;if(Object.entries(c[r]).forEach(([i,o])=>{if(n.test(i)){if(i.includes("SETUP")){const n=o.reduce((n,i)=>{const o=i({dependencies:t.extra,defaults:structuredClone(e.defaultOptions),options:e.listenOptions});return Object.assign(n,o)},a);return void Object.assign(e.listenOptions,n)}"FORM:WATCH"===i&&(d=o),"FORM:DEFINE"===i&&(p=o),"FORM:ACTION"===i&&(f=o)}}),0===f.length)return h;const m=new Set;0===p.length&&(p=[i.define]),0===d.length&&(d=[i.watch]);const g=d.map(n=>n({dependencies:t.extra,context:r,note:s,options:e.listenOptions})).reduce((t,e)=>(t.push(e),t),[]);return e.watchList=document.querySelectorAll(g),e.watchList.forEach(n=>{const{left:i,top:o,width:c,height:u}=n.getBoundingClientRect(),l=window.scrollX,a=window.scrollY;return m.add(p[0]({target:n,context:r,note:s,dependencies:t.extra,options:e.listenOptions,viewport:{X:l,Y:a,width:window.innerWidth,height:window.innerHeight},sizes:{width:c,height:u},position:{x:i,y:o},pagePosition:{x:i+l,y:o+a}}))}),e.typeFn=p[0]?p[0]:i.define,f.forEach(n=>{if(!(n instanceof Function))return o.emit(l,"The 'form:action' should be a function."),!1;const i=n({dependencies:t.extra,options:e.listenOptions});if(!(i instanceof Array))return o.emit(l,"Warning: The 'form:action' function should RETURN an array."),!1;i.forEach(({fn:t,type:n,timing:i,wait:r=0})=>{if(m.has(n)&&t instanceof Function){const e=`${n}/${i}`,r=u.hasOwnProperty(e);r?u[e].push(t):u[e]=[t],r||o.on(e,(t,e)=>{e.forEach(e=>{e instanceof Function&&e(t)})})}"instant"===i&&(e.wait[`${n}`]=r)})}),h=Object.keys(e.callbacks).length,h}const v={watch:()=>"input, select, textarea, button, a",define:({target:t})=>"checkbox"===t.type||"radio"===t.type?"checkbox":"button"==t.type||"submit"==t.type?"button":"input"};function x(t,e={}){const n={_defaults:v,regex:/FORM\s*\:/i},i={callbacks:{},typeFn:"",watchList:[],wait:{},defaultOptions:{},listenOptions:{}};return n.resetState=function(){i.callbacks={},i.typeFn="",i.watchList=[],i.wait={}},t({prefix:"form",_normalizeShortcutName:m,_registerShortcutEvents:g,_listenDOM:h,pluginState:i,deps:n})}function E(t,e,n){const{listenOptions:{hoverTarget:i}}=e,o=n;if(o===document.body)return!1;if(o===document)return!1;return i.some(t=>o.hasAttribute(t))?o:E(t,e,o.parentNode)}function O(t,e){const{ev:n,_findTarget:i,resetState:o,extra:r}=t;function s(o){const s=o.clientX,c=o.clientY,{hovered:u,hoverRectangle:l,listenOptions:a,hoverTimer:d,leaveTimer:p,lastEvent:f,lastHoverTarget:h}=e,m=i(t,e,o.target);if(!function(t,e,n){return!!t&&e>=t.left&&e<=t.right&&n>=t.top&&n<=t.bottom}(l,s,c)&&m!==u){if(u&&!m){if(e.hovered=!1,e.hoverRectangle=null,d&&(clearTimeout(d),e.hoverTimer=null),"off"===f)return;return void(e.leaveTimer=setTimeout(()=>{n.emit("HOVER:OFF",g(u)),e.leaveTimer=null,e.lastEvent="off"},a.wait))}u&&(n.emit("HOVER:OFF",g(u)),e.leaveTimer=null,e.lastEvent="off"),clearTimeout(p),clearTimeout(d),e.hovered=m,e.hoverRectangle=m.getBoundingClientRect(),e.hoverTimer=setTimeout(()=>{n.emit("HOVER:ON",g(m)),e.hoverTimer=null,e.lastHoverTarget=m,e.lastEvent="on"},a.wait)}function g(t){const{left:n,top:i,width:s,height:c}=t.getBoundingClientRect(),u=window.scrollX,l=window.scrollY;return{target:t,context:e.currentContext.name,note:e.currentContext.note,event:o,dependencies:r,options:e.listenOptions,viewport:{X:u,Y:l,width:window.innerWidth,height:window.innerHeight},sizes:{width:s,height:c},position:{x:n,y:i},pagePosition:{x:n+u,y:i+l},type:"hover"}}}return{start:function(){e.active||(document.addEventListener("mousemove",s),e.active=!0)},stop:function(){e.active&&(document.removeEventListener("mousemove",s),o())}}}function y(t){const e=t.toUpperCase(),n=/HOVER\s*\:/i.test(e),i=e.indexOf(":");if(!n)return t;return`HOVER:${e.slice(i+1).trim()}`}function w(t,e){let n=0,i=!1;const o=e.defaultOptions,{regex:r,_defaults:s,ev:c}=t,{currentContext:{name:u},shortcuts:l,ERROR_EVENT_NAME:a}=e;return null==u||(Object.entries(l[u]).forEach(([s,c])=>{if(r.test(s)){if("HOVER:SETUP"===s){i=!0;const n=c.reduce((n,i)=>{const o=i({dependencies:t.extra,defaults:structuredClone(e.defaultOptions),options:e.listenOptions});return Object.assign(n,o)},o);return void Object.assign(e.listenOptions,n)}n++}}),i||Object.assign(e.listenOptions,o)),n}function T(t,e={}){const n={_findTarget:E,regex:/HOVER\s*\:/i},i={active:!1,hovered:!1,hoverRectangle:null,hoverTimer:null,leaveTimer:null,lastEvent:"",lastHoverTarget:null,defaultOptions:{hoverTarget:["data-hover"],wait:320},listenOptions:{hoverTarget:["data-hover"],wait:320}};return n.resetState=function(){i.active=!1,i.hovered=!1,i.hoverRectangle=null,clearTimeout(i.hoverTimer),clearTimeout(i.leaveTimer),i.hoverTimer=null,i.leaveTimer=null,i.lastHoverTarget=null},t({prefix:"hover",_normalizeShortcutName:y,_registerShortcutEvents:w,_listenDOM:O,pluginState:i,deps:n})}function C(t,e){const{ev:n,resetState:i,extra:o}=t;let r=null,s=null;function c(t){t.clientX,t.clientY;const{lastPosition:i,lastDirection:c,listenOptions:u,currentContext:l}=e,{scrollWait:a,endScrollWait:d,minSpace:p}=u;if(!i)return;let f=null;const h=window.scrollX,m=window.scrollY,g=Math.abs(m-i.y),v=Math.abs(h-i.x);if(g<p&&v<p)return;const x=[];g>=p&&(m>i.y?x.push("down"):x.push("up")),v>=p&&(h>i.x?x.push("right"):x.push("left")),f=x[0]||null;const E=t=>({x:h,y:m,direction:t,context:l.name,note:l.note,dependencies:o,options:e.listenOptions,viewport:{X:h,Y:m,width:window.innerWidth,height:window.innerHeight},type:"scroll"});x.forEach(t=>{const e=`SCROLL:${t.toUpperCase()}`;n.emit(e,E(t))}),clearTimeout(r),clearTimeout(s);const O=x[x.length-1]||null;r=setTimeout(()=>{},a),s=setTimeout(()=>n.emit("SCROLL:END",E(O)),d),e.lastPosition={x:h,y:m},e.lastDirection=f}return{start:function(){e.active||(e.lastPosition={x:window.scrollX,y:window.scrollY},window.addEventListener("scroll",c),e.active=!0)},stop:function(){e.active&&(window.removeEventListener("scroll",c),i())}}}function S(t){const e=t.toUpperCase(),n=/SCROLL\s*\:/i.test(e),i=e.indexOf(":");if(!n)return t;return`SCROLL:${e.slice(i+1).trim()}`}function k(t,e){let n=0,i=!1;const o=e.defaultOptions,{regex:r}=t,{currentContext:{name:s},shortcuts:c}=e;return null==s||(Object.entries(c[s]).forEach(([s,c])=>{if(r.test(s)){if("SCROLL:SETUP"===s){i=!0;const n=c.reduce((n,i)=>{const o=i({dependencies:t.extra,defaults:structuredClone(e.defaultOptions),options:e.listenOptions});return Object.assign(n,o)},o);return void Object.assign(e.listenOptions,n)}n++}}),i||Object.assign(e.listenOptions,o)),n}function R(t,e={}){const n={regex:/SCROLL\s*\:/i},i={active:!1,lastPosition:null,lastDirection:null,defaultOptions:{scrollWait:50,endScrollWait:400,minSpace:40},listenOptions:{scrollWait:50,endScrollWait:400,minSpace:40}};return n.resetState=function(){i.active=!1},t({prefix:"scroll",_normalizeShortcutName:S,_registerShortcutEvents:k,_listenDOM:C,pluginState:i,deps:n})}function L(n={}){const i={},o={},r=t(),s={currentContext:{name:null,note:null},shortcuts:{},plugins:[],exposeShortcut:!(!n.onShortcut||"function"!=typeof n.onShortcut)&&n.onShortcut,ERROR_EVENT_NAME:n.errorEventName?n.errorEventName:"@shortcuts-error"},c={ev:r,inAPI:i,API:o,extra:{}};return o.enablePlugin=(t,e={})=>{if("function"!=typeof t)return;const n=t(i._setupPlugin,e),o=n.getPrefix(),r=i._systemAction(o,"none");-1===r?(s.plugins.push(n),n.unmute()):(n.destroy(),s.plugins[r].unmute())},o.disablePlugin=t=>{const e=i._systemAction(t,"destroy");-1!==e&&s.plugins.splice(e,1)},o.mutePlugin=t=>i._systemAction(t,"mute"),o.unmutePlugin=t=>i._systemAction(t,"unmute"),o.listPlugins=()=>s.plugins.map(t=>t.getPrefix()),o.getContext=()=>s.currentContext.name,o.getNote=()=>s.currentContext.note,o.setNote=(t=null)=>{"string"!=typeof t&&null!=t||(s.currentContext.note=t)},o.pause=(t="*")=>{const e=i._readShortcutWithPlugins(t);r.stop(e)},o.resume=(t="*")=>{const e=i._readShortcutWithPlugins(t);r.start(e)},o.emit=(t,...e)=>r.emit(i._readShortcutWithPlugins(t),...e),o.listContexts=()=>Object.keys(s.shortcuts),o.setDependencies=t=>Object.assign(c.extra,t),o.getDependencies=()=>c.extra,o.reset=function(){r.reset(),o.changeContext(),s.plugins.forEach(t=>t.destroy()),o.listContexts().map(t=>o.unload(t)),c.extra={},s.exposeShortcut=null},Object.entries(e).forEach(([t,e])=>{t.startsWith("_")?i[t]=e(c,s):o[t]=e(c,s)}),o}export{f as pluginClick,x as pluginForm,T as pluginHover,c as pluginKey,R as pluginScroll,L as shortcuts};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).shortcuts={})}(this,function(t){"use strict";var e={_normalizeWithPlugins:function(t,e){return function(t){const n=e.shortcuts;Object.keys(n).forEach(e=>{Object.entries(n[e]).forEach(([i,o])=>{const r=t(i);r!==i&&(delete n[e][i],n[e][r]=o)})})}},_readShortcutWithPlugins:function(t,e){return function(n){const{inAPI:i}=t,o=n.split(":")[0].toLowerCase().trim(),r=i._systemAction(o,"none");let s=n;return-1!==r&&(s=e.plugins[r].shortcutName(n)),s}},_setupPlugin:function(t,e){const{inAPI:n}=t,{currentContext:i,shortcuts:o,exposeShortcut:r,ERROR_EVENT_NAME:s}=e;return function(e){const{prefix:c,_normalizeShortcutName:u,_registerShortcutEvents:l,_listenDOM:a,pluginState:f,deps:d}=e,{resetState:p}=d;f.currentContext=i,f.shortcuts=o,f.exposeShortcut=r,f.ERROR_EVENT_NAME=s;const h={ev:t.ev,extra:t.extra,...d};n._normalizeWithPlugins(u);let m=l(h,f);const g=a(h,f);m>0&&g.start();const v={getPrefix:()=>c,shortcutName:t=>u(t),contextChange:()=>{p(),m=l(h,f),m<1&&g.stop(),m>0&&g.start()},mute:()=>g.stop(),unmute:()=>g.start(),destroy:()=>{g.stop(),p()}};return Object.freeze(v),v}},_systemAction:function(t,e){return function(t,n,i=null){return e.plugins.findIndex(e=>e.getPrefix()===t&&(e[n]&&e[n](i),!0))}},changeContext:function(t,e){const{shortcuts:n,currentContext:i,ERROR_EVENT_NAME:o}=e,{ev:r}=t;return function(t=!1){const s=i.name;if(!t)return r.reset(),void(i.name=null);s!==t&&(n[t]?(n[s]&&r.reset(),i.name=t,e.plugins.forEach(e=>e.contextChange(t)),Object.entries(n[t]).forEach(([t,e])=>{t.includes(":SETUP")||e.forEach(e=>r.on(t,e))}),r.on("*",(...t)=>{e.exposeShortcut&&e.exposeShortcut(...t)})):r.emit(o,`Context '${t}' does not exist`))}},listShortcuts:function(t,e){const n=e.shortcuts;return function(t=null){if(null!=t){const e=n[t];return null==e?null:Object.entries(e).map(([t,e])=>t)}return Object.keys(n).map(t=>{const e={};return e.context=t,e.shortcuts=Object.entries(n[t]).map(([t,e])=>t),e})}},load:function(t,e){const{shortcuts:n,plugins:i}=e,{API:{changeContext:o,getContext:r}}=t;return function(t){const e=r(),s=i.map(t=>t.getPrefix().toUpperCase());let c=!1;Object.entries(t).forEach(([t,o])=>{t===e&&(c=!0),n[t]={},Object.entries(o).forEach(([e,o])=>{let r=e;const c=e.toUpperCase().trim(),u=s.map((t,e)=>c.startsWith(t)?e:null).filter(t=>null!==t);if(u.length){const t=u[0];r=i[t].shortcutName(e)}o instanceof Function&&(o=[o]),n[t][r]=o})}),c&&(o(),o(e))}},unload:function(t,e){const{currentContext:n,shortcuts:i,ERROR_EVENT_NAME:o}=e,{ev:r}=t;return function(t){n.name!==t?i[t]?delete i[t]:r.emit(o,`Context '${t}' does not exist`):r.emit(o,`Context '${t}' can't be removed during is current active context. Change the context first`)}}};function n(t,e){const{ev:n,_specialChars:i,_readKeyEvent:o,extra:r,resetState:s}=t,{currentContext:c,streamKeys:u,listenOptions:l}=e;let a=[],f=null,d=!0,p=!1;const h=()=>d=!1,m=()=>d=!0,g=()=>p=!0,v=()=>!1===d;function x(){const t=a.map(t=>[t.join("+")]),i={wait:h,end:m,ignore:g,isWaiting:v,note:c.note,context:c.name,dependencies:r,options:e.listenOptions,viewport:{X:window.scrollX,Y:window.scrollY,width:window.innerWidth,height:window.innerHeight},type:"key"};if(!d){const e=`KEY:${t.at(-1).join("+")}`;n.emit(e,i),p&&(a=a.slice(0,-1),p=!1)}if(d){const o=`KEY:${t.join(",")}`;n.emit(o,i),p&&(a=a.slice(0,-1),p=!1),a=[],clearTimeout(e.keyIgnore),e.keyIgnore=null,clearTimeout(f),f=null}}function E(n){clearTimeout(f);if(i().hasOwnProperty(n.code))return a.push(o(n,i)),u&&u({key:n.key,context:c.name,note:c.note,dependencies:t.extra}),e.keyIgnore?(clearTimeout(e.keyIgnore),e.keyIgnore=setTimeout(()=>e.keyIgnore=null,l.keyWait),void a.pop()):d&&a.length===e.maxSequence?(x(),void(e.keyIgnore=setTimeout(()=>e.keyIgnore=null,l.keyWait))):void(d?f=setTimeout(x,l.keyWait):x())}function O(n){if(!i().hasOwnProperty(n.code)){if(clearTimeout(f),u&&u({key:n.key,context:c.name,note:c.note,dependencies:t.extra}),e.keyIgnore)return clearTimeout(e.keyIgnore),void(e.keyIgnore=setTimeout(()=>e.keyIgnore=null,l.keyWait));if(a.push(o(n,i)),d&&a.length===e.maxSequence)return x(),void(e.keyIgnore=setTimeout(()=>e.keyIgnore=null,l.keyWait));d?f=setTimeout(x,l.keyWait):x()}}return{start:function(){e.active||(document.addEventListener("keydown",E),document.addEventListener("keypress",O),e.active=!0)},stop:function(){e.active&&(document.removeEventListener("keydown",E),document.removeEventListener("keypress",O),e.active=!1,f&&(clearTimeout(f),f=null),e.keyIgnore&&(clearTimeout(e.keyIgnore),e.keyIgnore=null),a=[],d=!0,p=!1)}}}function i(t){const e=t.toUpperCase(),n=/KEY\s*\:/i.test(e),i=e.indexOf(":");if(!n)return t;if(e.includes("SETUP"))return"KEY:SETUP";return`KEY:${e.slice(i+1).split(",").map(t=>t.trim()).map(t=>t.split("+").map(t=>t.trim()).sort().join("+")).join(",")}`}function o(t,e){const{shiftKey:n,altKey:i,ctrlKey:o}=t,r=e(),s=t.code.replace("Key","").replace("Digit",""),c=[];return o&&c.push("CTRL"),n&&c.push("SHIFT"),i&&c.push("ALT"),r.hasOwnProperty(s)?c.push(r[s].toUpperCase()):["ControlLeft","ControlRight","ShiftLeft","ShiftRight","AltLeft","AltRight","Meta"].includes(s)||c.push(s.toUpperCase()),c.sort()}function r(t,e){let n=0,i=!1;const o=e.defaultOptions,{regex:r}=t,{currentContext:{name:s},shortcuts:c}=e;return null==s?0:(Object.entries(c[s]).forEach(([s,c])=>{if(!r.test(s))return;if("KEY:SETUP"===s){i=!0;const n=c.reduce((n,i)=>{const o=i({dependencies:t.extra,defaults:structuredClone(e.defaultOptions),options:e.listenOptions});return Object.assign(n,o)},o);return void Object.assign(e.listenOptions,n)}n++;const u=s.slice(4).split(",").length;e.maxSequence<u&&(e.maxSequence=u)}),i||Object.assign(e.listenOptions,o),n)}function s(){return{ArrowLeft:"LEFT",ArrowUp:"UP",ArrowRight:"RIGHT",ArrowDown:"DOWN",Enter:"ENTER",NumpadEnter:"ENTER",Escape:"ESC",Backspace:"BACKSPACE",Space:"SPACE",Tab:"TAB",Backquote:"`",BracketLeft:"[",BracketRight:"]",Equal:"=",Slash:"/",Backslash:"\\",IntlBackslash:"`",F1:"F1",F2:"F2",F3:"F3",F4:"F4",F5:"F5",F6:"F6",F7:"F7",F8:"F8",F9:"F9",F10:"F10",F11:"F11",F12:"F12"}}function c(t,e,n){const{listenOptions:{clickTarget:i}}=e,o=n;if(o===document.body)return null;return i.some(t=>o.hasAttribute(t))?o:c(t,e,o.parentNode)}function u(t,e){const{ev:n,_findTarget:i,_readClickEvent:o,extra:r}=t,{listenOptions:s,currentContext:c}=e;let u=null,l=null,a=null,f=null,d=0;function p(){if(!u)return;const{left:t,top:i,width:s,height:p}=u.getBoundingClientRect(),h=window.scrollX,m=window.scrollY,g=o(l,d),v={target:u,x:l.clientX,y:l.clientY,context:c.name,note:c.note,options:e.listenOptions,event:l,dependencies:r,viewport:{X:h,Y:m,width:window.innerWidth,height:window.innerHeight},sizes:{width:s,height:p},position:{x:t,y:i},pagePosition:{x:t+h,y:i+m},type:"click"};n.emit(g,v),a=null,f=null,u=null,l=null,d=0}function h(n){let o=e.maxLeftClicks;if(clearTimeout(a),f)return clearTimeout(f),void(f=setTimeout(()=>f=null,s.mouseWait));if(u=i(t,e,n.target),null!=u){if(u&&u.dataset.hasOwnProperty("quickClick")&&(o=1),u&&"A"===u.tagName&&(o=1),l=n,d++,d>=o)return p(),void(o>1&&(f=setTimeout(()=>f=null,s.mouseWait)));a=setTimeout(p,s.mouseWait)}}function m(n){let o=e.maxRightClicks;if(clearTimeout(a),f)return clearTimeout(f),void(f=setTimeout(()=>f=null,s.mouseWait));if(u=i(t,e,n.target),null!=u){if(u&&u.dataset.hasOwnProperty("quickClick")&&(o=1),u&&"A"===u.tagName&&(o=1),l=n,d++,d>=o)return p(),void(o>1&&(f=setTimeout(()=>f=null,s.mouseWait)));a=setTimeout(p,s.mouseWait)}}return{start:function(){e.active||(window.addEventListener("contextmenu",m),document.addEventListener("click",h),e.active=!0)},stop:function(){e.active&&(window.removeEventListener("contextmenu",m),document.removeEventListener("click",h),e.active=!1,f&&(clearTimeout(f),f=null),u=null,l=null,d=0)}}}function l(t){const e=t.toUpperCase(),n=/CLICK\s*\:/i.test(e),i=["LEFT","MIDDLE","RIGHT"],o=["ALT","SHIFT","CTRL"];let r=null,s=0;const c=[],u=e.indexOf(":");if(!n)return t;if(e.includes("SETUP"))return"CLICK:SETUP";return e.slice(u+1).trim().split("-").map(t=>t.trim()).forEach(t=>{i.includes(t)?r=t:o.includes(t)?c.push(t):isNaN(t)||(s=t)}),`CLICK:${r}-${s}${c.length>0?"-":""}${c.sort().join("-")}`}function a(t,e){const{shiftKey:n,altKey:i,ctrlKey:o,key:r,button:s}=t,c=`CLICK:${["LEFT","MIDDLE","RIGHT"][s]}-${e}`,u=[];return o&&u.push("CTRL"),n&&u.push("SHIFT"),i&&u.push("ALT"),u.length>0?`${c}${u.length>0?"-":""}${u.sort().join("-")}`:`${c}`}function f(t,e){let n=0,i=!1;const o=e.defaultOptions,{regex:r}=t,{listenOptions:s,currentContext:{name:c},shortcuts:u}=e;return null==c||(Object.entries(u[c]).forEach(([c,u])=>{if(!r.test(c))return;if("CLICK:SETUP"===c){i=!0;const n=u.reduce((n,i)=>{const o=i({dependencies:t.extra,defaults:structuredClone(e.defaultOptions),options:s});return Object.assign(n,o)},o);return void Object.assign(e.listenOptions,n)}n++;const[l,a]=c.slice(6).split("-");"LEFT"===l&&e.maxLeftClicks<a&&(e.maxLeftClicks=a),"RIGHT"===l&&e.maxRightClicks<a&&(e.maxRightClicks=a)}),i||Object.assign(e.listenOptions,o)),n}function d(t,e){const{ev:n}=t;let i=null;function o(t,e,n,i){const{left:o,top:r,width:s,height:c}=n.target.getBoundingClientRect(),u=window.scrollX,l=window.scrollY;return{target:n.target,context:e.currentContext.name,note:e.currentContext.note,event:n,dependencies:t.extra,options:e.listenOptions,viewport:{X:u,Y:l,width:window.innerWidth,height:window.innerHeight},sizes:{width:s,height:c},position:{x:o,y:r},pagePosition:{x:o+u,y:r+l},type:i}}function r(i){const{callbacks:r,typeFn:s}=e;i.target;const c=o(t,e,i,"form-in"),u=`${s(c)}/in`;null!=r[u]&&n.emit(u,c,r[u])}function s(i){const{callbacks:r,typeFn:s}=e,c=o(t,e,i,"form-out"),u=`${s(c)}/out`;null!=r[u]&&n.emit(u,c,r[u])}function c(r){const{callbacks:s,typeFn:c}=e,u=o(t,e,r,"form-instant"),l=c(u),a=e.wait[`${l}`],f=`${l}/instant`;if(null==s[f])return;if(0===a)return void n.emit(f,u,s[f]);clearTimeout(i),i=setTimeout(()=>n.emit(f,u,s[f]),a)}return{start:function(){e.active||(document.addEventListener("focusin",r),document.addEventListener("focusout",s),document.addEventListener("input",c),e.active=!0)},stop:function(){e.active&&(document.removeEventListener("focusin",r),document.removeEventListener("focusout",s),document.removeEventListener("input",c),e.active=!1,i&&(clearTimeout(i),i=null))}}}function p(t){const e=t.toUpperCase(),n=/FORM\s*\:/i.test(e),i=e.indexOf(":");if(!n)return t;return`FORM:${e.slice(i+1).trim()}`}function h(t,e){const{regex:n,_defaults:i,ev:o}=t,{currentContext:{name:r,note:s},shortcuts:c,callbacks:u,ERROR_EVENT_NAME:l,defaultOptions:a}=e;let f=[],d=[],p=[],h=0;if(null==r)return!1;if(Object.entries(c[r]).forEach(([i,o])=>{if(n.test(i)){if(i.includes("SETUP")){const n=o.reduce((n,i)=>{const o=i({dependencies:t.extra,defaults:structuredClone(e.defaultOptions),options:e.listenOptions});return Object.assign(n,o)},a);return void Object.assign(e.listenOptions,n)}"FORM:WATCH"===i&&(f=o),"FORM:DEFINE"===i&&(d=o),"FORM:ACTION"===i&&(p=o)}}),0===p.length)return h;const m=new Set;0===d.length&&(d=[i.define]),0===f.length&&(f=[i.watch]);const g=f.map(n=>n({dependencies:t.extra,context:r,note:s,options:e.listenOptions})).reduce((t,e)=>(t.push(e),t),[]);return e.watchList=document.querySelectorAll(g),e.watchList.forEach(n=>{const{left:i,top:o,width:c,height:u}=n.getBoundingClientRect(),l=window.scrollX,a=window.scrollY;return m.add(d[0]({target:n,context:r,note:s,dependencies:t.extra,options:e.listenOptions,viewport:{X:l,Y:a,width:window.innerWidth,height:window.innerHeight},sizes:{width:c,height:u},position:{x:i,y:o},pagePosition:{x:i+l,y:o+a}}))}),e.typeFn=d[0]?d[0]:i.define,p.forEach(n=>{if(!(n instanceof Function))return o.emit(l,"The 'form:action' should be a function."),!1;const i=n({dependencies:t.extra,options:e.listenOptions});if(!(i instanceof Array))return o.emit(l,"Warning: The 'form:action' function should RETURN an array."),!1;i.forEach(({fn:t,type:n,timing:i,wait:r=0})=>{if(m.has(n)&&t instanceof Function){const e=`${n}/${i}`,r=u.hasOwnProperty(e);r?u[e].push(t):u[e]=[t],r||o.on(e,(t,e)=>{e.forEach(e=>{e instanceof Function&&e(t)})})}"instant"===i&&(e.wait[`${n}`]=r)})}),h=Object.keys(e.callbacks).length,h}const m={watch:()=>"input, select, textarea, button, a",define:({target:t})=>"checkbox"===t.type||"radio"===t.type?"checkbox":"button"==t.type||"submit"==t.type?"button":"input"};function g(t,e,n){const{listenOptions:{hoverTarget:i}}=e,o=n;if(o===document.body)return!1;if(o===document)return!1;return i.some(t=>o.hasAttribute(t))?o:g(t,e,o.parentNode)}function v(t,e){const{ev:n,_findTarget:i,resetState:o,extra:r}=t;function s(o){const s=o.clientX,c=o.clientY,{hovered:u,hoverRectangle:l,listenOptions:a,hoverTimer:f,leaveTimer:d,lastEvent:p,lastHoverTarget:h}=e,m=i(t,e,o.target);if(!function(t,e,n){return!!t&&e>=t.left&&e<=t.right&&n>=t.top&&n<=t.bottom}(l,s,c)&&m!==u){if(u&&!m){if(e.hovered=!1,e.hoverRectangle=null,f&&(clearTimeout(f),e.hoverTimer=null),"off"===p)return;return void(e.leaveTimer=setTimeout(()=>{n.emit("HOVER:OFF",g(u)),e.leaveTimer=null,e.lastEvent="off"},a.wait))}u&&(n.emit("HOVER:OFF",g(u)),e.leaveTimer=null,e.lastEvent="off"),clearTimeout(d),clearTimeout(f),e.hovered=m,e.hoverRectangle=m.getBoundingClientRect(),e.hoverTimer=setTimeout(()=>{n.emit("HOVER:ON",g(m)),e.hoverTimer=null,e.lastHoverTarget=m,e.lastEvent="on"},a.wait)}function g(t){const{left:n,top:i,width:s,height:c}=t.getBoundingClientRect(),u=window.scrollX,l=window.scrollY;return{target:t,context:e.currentContext.name,note:e.currentContext.note,event:o,dependencies:r,options:e.listenOptions,viewport:{X:u,Y:l,width:window.innerWidth,height:window.innerHeight},sizes:{width:s,height:c},position:{x:n,y:i},pagePosition:{x:n+u,y:i+l},type:"hover"}}}return{start:function(){e.active||(document.addEventListener("mousemove",s),e.active=!0)},stop:function(){e.active&&(document.removeEventListener("mousemove",s),o())}}}function x(t){const e=t.toUpperCase(),n=/HOVER\s*\:/i.test(e),i=e.indexOf(":");if(!n)return t;return`HOVER:${e.slice(i+1).trim()}`}function E(t,e){let n=0,i=!1;const o=e.defaultOptions,{regex:r,_defaults:s,ev:c}=t,{currentContext:{name:u},shortcuts:l,ERROR_EVENT_NAME:a}=e;return null==u||(Object.entries(l[u]).forEach(([s,c])=>{if(r.test(s)){if("HOVER:SETUP"===s){i=!0;const n=c.reduce((n,i)=>{const o=i({dependencies:t.extra,defaults:structuredClone(e.defaultOptions),options:e.listenOptions});return Object.assign(n,o)},o);return void Object.assign(e.listenOptions,n)}n++}}),i||Object.assign(e.listenOptions,o)),n}function O(t,e){const{ev:n,resetState:i,extra:o}=t;let r=null,s=null;function c(t){t.clientX,t.clientY;const{lastPosition:i,lastDirection:c,listenOptions:u,currentContext:l}=e,{scrollWait:a,endScrollWait:f,minSpace:d}=u;if(!i)return;let p=null;const h=window.scrollX,m=window.scrollY,g=Math.abs(m-i.y),v=Math.abs(h-i.x);if(g<d&&v<d)return;const x=[];g>=d&&(m>i.y?x.push("down"):x.push("up")),v>=d&&(h>i.x?x.push("right"):x.push("left")),p=x[0]||null;const E=t=>({x:h,y:m,direction:t,context:l.name,note:l.note,dependencies:o,options:e.listenOptions,viewport:{X:h,Y:m,width:window.innerWidth,height:window.innerHeight},type:"scroll"});x.forEach(t=>{const e=`SCROLL:${t.toUpperCase()}`;n.emit(e,E(t))}),clearTimeout(r),clearTimeout(s);const O=x[x.length-1]||null;r=setTimeout(()=>{},a),s=setTimeout(()=>n.emit("SCROLL:END",E(O)),f),e.lastPosition={x:h,y:m},e.lastDirection=p}return{start:function(){e.active||(e.lastPosition={x:window.scrollX,y:window.scrollY},window.addEventListener("scroll",c),e.active=!0)},stop:function(){e.active&&(window.removeEventListener("scroll",c),i())}}}function y(t){const e=t.toUpperCase(),n=/SCROLL\s*\:/i.test(e),i=e.indexOf(":");if(!n)return t;return`SCROLL:${e.slice(i+1).trim()}`}function w(t,e){let n=0,i=!1;const o=e.defaultOptions,{regex:r}=t,{currentContext:{name:s},shortcuts:c}=e;return null==s||(Object.entries(c[s]).forEach(([s,c])=>{if(r.test(s)){if("SCROLL:SETUP"===s){i=!0;const n=c.reduce((n,i)=>{const o=i({dependencies:t.extra,defaults:structuredClone(e.defaultOptions),options:e.listenOptions});return Object.assign(n,o)},o);return void Object.assign(e.listenOptions,n)}n++}}),i||Object.assign(e.listenOptions,o)),n}t.pluginClick=function(t,e={}){const n={_findTarget:c,_readClickEvent:a,regex:/CLICK\s*\:/i},i={active:!1,maxLeftClicks:1,maxRightClicks:1,defaultOptions:{mouseWait:320,clickTarget:["data-click","href"]},listenOptions:{mouseWait:320,clickTarget:["data-click","href"]},streamKeys:!(!e.streamKeys||"function"!=typeof e.streamKeys)&&e.streamKeys};return n.resetState=function(){},t({prefix:"click",_normalizeShortcutName:l,_registerShortcutEvents:f,_listenDOM:u,pluginState:i,deps:n})},t.pluginForm=function(t,e={}){const n={_defaults:m,regex:/FORM\s*\:/i},i={callbacks:{},typeFn:"",watchList:[],wait:{},defaultOptions:{},listenOptions:{}};return n.resetState=function(){i.callbacks={},i.typeFn="",i.watchList=[],i.wait={}},t({prefix:"form",_normalizeShortcutName:p,_registerShortcutEvents:h,_listenDOM:d,pluginState:i,deps:n})},t.pluginHover=function(t,e={}){const n={_findTarget:g,regex:/HOVER\s*\:/i},i={active:!1,hovered:!1,hoverRectangle:null,hoverTimer:null,leaveTimer:null,lastEvent:"",lastHoverTarget:null,defaultOptions:{hoverTarget:["data-hover"],wait:320},listenOptions:{hoverTarget:["data-hover"],wait:320}};return n.resetState=function(){i.active=!1,i.hovered=!1,i.hoverRectangle=null,clearTimeout(i.hoverTimer),clearTimeout(i.leaveTimer),i.hoverTimer=null,i.leaveTimer=null,i.lastHoverTarget=null},t({prefix:"hover",_normalizeShortcutName:x,_registerShortcutEvents:E,_listenDOM:v,pluginState:i,deps:n})},t.pluginKey=function(t,e={}){const c={_specialChars:s,_readKeyEvent:o,regex:/KEY\s*\:/i},u={active:!1,maxSequence:1,keyIgnore:null,defaultOptions:{keyWait:480},listenOptions:{keyWait:480},streamKeys:!(!e.streamKeys||"function"!=typeof e.streamKeys)&&e.streamKeys};return c.resetState=function(){u.active=!1,u.keyIgnore=null,u.maxSequence=1},t({prefix:"key",_normalizeShortcutName:i,_registerShortcutEvents:r,_listenDOM:n,pluginState:u,deps:c})},t.pluginScroll=function(t,e={}){const n={regex:/SCROLL\s*\:/i},i={active:!1,lastPosition:null,lastDirection:null,defaultOptions:{scrollWait:50,endScrollWait:400,minSpace:40},listenOptions:{scrollWait:50,endScrollWait:400,minSpace:40}};return n.resetState=function(){i.active=!1},t({prefix:"scroll",_normalizeShortcutName:y,_registerShortcutEvents:w,_listenDOM:O,pluginState:i,deps:n})},t.shortcuts=function(t={}){const n={},i={},o=function(){let t={"*":[]},e={},n=new Set,i=!1,o="";return{on:function(e,n){t[e]||(t[e]=[]),t[e].push(n)},once:function(t,n){"*"!==t&&(e[t]||(e[t]=[]),e[t].push(n))},off:function(n,i){if(i)return t[n]&&(t[n]=t[n].filter(t=>t!==i)),e[n]&&(e[n]=e[n].filter(t=>t!==i)),t[n]&&0===t[n].length&&delete t[n],void(e[n]&&0===e[n].length&&delete t[n]);e[n]&&delete e[n],t[n]&&delete t[n]},reset:function(){t={"*":[]},e={},n=new Set},emit:function(){const[r,...s]=arguments;function c(e){let i=!1;"*"!==e&&(n.has(e)||(t[e].every(t=>{const e=t(...s);return"string"!=typeof e||"STOP"!==e.toUpperCase()||(i=!0,!1)}),i||t["*"].forEach(t=>t(r,...s))))}if(i&&(console.log(`${o} Event "${r}" was triggered.`),s.length>0&&(console.log("Arguments:"),console.log(...s),console.log("^----"))),"*"!==r){if(e[r]){if(n.has(r))return;e[r].forEach(t=>t(...s)),delete e[r]}t[r]&&c(r)}else Object.keys(t).forEach(t=>c(t))},stop:function(i){if("*"===i){const i=Object.keys(t),o=Object.keys(e);return void(n=new Set([...o,...i]))}n.add(i)},start:function(t){"*"!==t?n.delete(t):n.clear()},debug:function(t,e){i=!!t,e&&"string"==typeof e&&(o=e)}}}(),r={currentContext:{name:null,note:null},shortcuts:{},plugins:[],exposeShortcut:!(!t.onShortcut||"function"!=typeof t.onShortcut)&&t.onShortcut,ERROR_EVENT_NAME:t.errorEventName?t.errorEventName:"@shortcuts-error"},s={ev:o,inAPI:n,API:i,extra:{}};return i.enablePlugin=(t,e={})=>{if("function"!=typeof t)return;const i=t(n._setupPlugin,e),o=i.getPrefix(),s=n._systemAction(o,"none");-1===s?(r.plugins.push(i),i.unmute()):(i.destroy(),r.plugins[s].unmute())},i.disablePlugin=t=>{const e=n._systemAction(t,"destroy");-1!==e&&r.plugins.splice(e,1)},i.mutePlugin=t=>n._systemAction(t,"mute"),i.unmutePlugin=t=>n._systemAction(t,"unmute"),i.listPlugins=()=>r.plugins.map(t=>t.getPrefix()),i.getContext=()=>r.currentContext.name,i.getNote=()=>r.currentContext.note,i.setNote=(t=null)=>{"string"!=typeof t&&null!=t||(r.currentContext.note=t)},i.pause=(t="*")=>{const e=n._readShortcutWithPlugins(t);o.stop(e)},i.resume=(t="*")=>{const e=n._readShortcutWithPlugins(t);o.start(e)},i.emit=(t,...e)=>o.emit(n._readShortcutWithPlugins(t),...e),i.listContexts=()=>Object.keys(r.shortcuts),i.setDependencies=t=>Object.assign(s.extra,t),i.getDependencies=()=>s.extra,i.reset=function(){o.reset(),i.changeContext(),r.plugins.forEach(t=>t.destroy()),i.listContexts().map(t=>i.unload(t)),s.extra={},r.exposeShortcut=null},Object.entries(e).forEach(([t,e])=>{t.startsWith("_")?n[t]=e(s,r):i[t]=e(s,r)}),i}});
|