@wirekyt/dom 0.0.1 → 0.0.2
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/dist/anatomy-DMuSMbOP.d.cts +18 -0
- package/dist/anatomy-DMuSMbOP.d.ts +18 -0
- package/dist/anatomy.cjs +3 -0
- package/dist/anatomy.d.cts +2 -0
- package/dist/anatomy.d.ts +2 -0
- package/dist/anatomy.js +2 -0
- package/dist/angle-3hqP0Mp5.cjs +13 -0
- package/dist/angle-oNt8uGHQ.js +8 -0
- package/dist/aria-hidden-CEXexb2I.js +127 -0
- package/dist/aria-hidden-Y7iJHPMr.cjs +132 -0
- package/dist/aria-hidden.cjs +3 -0
- package/dist/aria-hidden.d.cts +10 -0
- package/dist/aria-hidden.d.ts +10 -0
- package/dist/aria-hidden.js +2 -0
- package/dist/array-BGtygd0o.cjs +198 -0
- package/dist/array-C4KbHsha.js +73 -0
- package/dist/auto-resize-5F5iiKZb.cjs +106 -0
- package/dist/auto-resize-KkNfCcBt.js +95 -0
- package/dist/auto-resize.cjs +4 -0
- package/dist/auto-resize.d.cts +7 -0
- package/dist/auto-resize.d.ts +7 -0
- package/dist/auto-resize.js +2 -0
- package/dist/caret-CHqaP4XG.cjs +30 -0
- package/dist/caret-aiDJ6mAS.js +19 -0
- package/dist/closest-Clo6ODcK.js +117 -0
- package/dist/closest-IiRz1GIJ.cjs +176 -0
- package/dist/collection-CJU0oDtX.js +1295 -0
- package/dist/collection-CwzUJwBJ.cjs +1342 -0
- package/dist/collection.cjs +15 -0
- package/dist/collection.d.cts +34 -0
- package/dist/collection.d.ts +34 -0
- package/dist/collection.js +3 -0
- package/dist/color-CsugZjq6.d.cts +60 -0
- package/dist/color-CsugZjq6.d.ts +60 -0
- package/dist/color-utils-DzeOVYlL.cjs +662 -0
- package/dist/color-utils-lDDg9FEh.js +639 -0
- package/dist/color-utils.cjs +6 -0
- package/dist/color-utils.d.cts +18 -0
- package/dist/color-utils.d.ts +18 -0
- package/dist/color-utils.js +2 -0
- package/dist/computed-style-B1MKlCoo.js +9 -0
- package/dist/computed-style-DLArEFNw.cjs +14 -0
- package/dist/controller-B8E8ZJCI.cjs +133 -0
- package/dist/controller-Dv7lWHDr.js +92 -0
- package/dist/core-BF6G2RiC.d.cts +1 -0
- package/dist/core-BNMw-JId.cjs +372 -0
- package/dist/core-BdeZuSX6.d.ts +1 -0
- package/dist/core-CJ0MZr3D.js +289 -0
- package/dist/core.cjs +19 -0
- package/dist/core.d.cts +3 -0
- package/dist/core.d.ts +3 -0
- package/dist/core.js +3 -0
- package/dist/create-anatomy-B2q3wiaw.js +22 -0
- package/dist/create-anatomy-BwDn25ph.cjs +27 -0
- package/dist/create-props-CgtcN_Qu.js +4 -0
- package/dist/create-props-CjLx2oS8.cjs +9 -0
- package/dist/data-url-C-Uk31Q9.cjs +42 -0
- package/dist/data-url-DHUHj7UF.js +37 -0
- package/dist/data-url-Gx_SWG-k.d.cts +10 -0
- package/dist/data-url-Gx_SWG-k.d.ts +10 -0
- package/dist/date-utils-D-JJHedx.cjs +868 -0
- package/dist/date-utils-D5zXW-Cs.js +569 -0
- package/dist/date-utils.cjs +52 -0
- package/dist/date-utils.d.cts +7 -0
- package/dist/date-utils.d.ts +7 -0
- package/dist/date-utils.js +2 -0
- package/dist/dismissable-C0bixtzl.cjs +348 -0
- package/dist/dismissable-KM1jPtNQ.js +337 -0
- package/dist/dismissable-layer-BTX5EvXw.d.ts +40 -0
- package/dist/dismissable-layer-Ch5niVaq.d.cts +40 -0
- package/dist/dismissable.cjs +4 -0
- package/dist/dismissable.d.cts +3 -0
- package/dist/dismissable.d.ts +3 -0
- package/dist/dismissable.js +2 -0
- package/dist/dom-query-CQzY93XU.cjs +488 -0
- package/dist/dom-query-e7fh0TEH.js +243 -0
- package/dist/dom-query.cjs +180 -0
- package/dist/dom-query.d.cts +142 -0
- package/dist/dom-query.d.ts +142 -0
- package/dist/dom-query.js +43 -0
- package/dist/equal-C927y7MN.cjs +30 -0
- package/dist/equal-DtrP8DPh.js +25 -0
- package/dist/event-DDz-mMhM.cjs +242 -0
- package/dist/event-bTItRgiw.js +117 -0
- package/dist/file-utils-6EXCdfHx.js +116 -0
- package/dist/file-utils-B7OJigQq.cjs +151 -0
- package/dist/file-utils.cjs +92 -0
- package/dist/file-utils.d.cts +40 -0
- package/dist/file-utils.d.ts +40 -0
- package/dist/file-utils.js +82 -0
- package/dist/focus-trap-89E5I9nm.js +487 -0
- package/dist/focus-trap-D7jKsfHW.cjs +498 -0
- package/dist/focus-trap.cjs +4 -0
- package/dist/focus-trap.d.cts +89 -0
- package/dist/focus-trap.d.ts +89 -0
- package/dist/focus-trap.js +2 -0
- package/dist/focus-visible-DWdQf__4.js +176 -0
- package/dist/focus-visible-G4cmlWqq.cjs +217 -0
- package/dist/focus-visible.cjs +9 -0
- package/dist/focus-visible.d.cts +32 -0
- package/dist/focus-visible.d.ts +32 -0
- package/dist/focus-visible.js +2 -0
- package/dist/form-B1DW_w_3.js +89 -0
- package/dist/form-CoupKpuP.cjs +130 -0
- package/dist/from-window-5ZhzSURC.js +68 -0
- package/dist/from-window-B9DKtaoR.cjs +115 -0
- package/dist/functions-isw5Ovcx.d.cts +16 -0
- package/dist/functions-isw5Ovcx.d.ts +16 -0
- package/dist/highlight-word.cjs +95 -0
- package/dist/highlight-word.d.cts +24 -0
- package/dist/highlight-word.d.ts +24 -0
- package/dist/highlight-word.js +94 -0
- package/dist/hotkeys.cjs +1183 -0
- package/dist/hotkeys.d.cts +199 -0
- package/dist/hotkeys.d.ts +199 -0
- package/dist/hotkeys.js +1173 -0
- package/dist/i18n-utils-BD4VtonY.cjs +345 -0
- package/dist/i18n-utils-C4FQZ39m.js +280 -0
- package/dist/i18n-utils.cjs +216 -0
- package/dist/i18n-utils.d.cts +71 -0
- package/dist/i18n-utils.d.ts +71 -0
- package/dist/i18n-utils.js +204 -0
- package/dist/index-3tNJficI.d.cts +117 -0
- package/dist/index-3tNJficI.d.ts +117 -0
- package/dist/index-BEfvdGE2.d.cts +116 -0
- package/dist/index-BEfvdGE2.d.ts +116 -0
- package/dist/index-BF6G2RiC.d.cts +1 -0
- package/dist/index-BKgxIVbE.d.cts +285 -0
- package/dist/index-BMtpmaRD.d.cts +16 -0
- package/dist/index-BMtpmaRD.d.ts +16 -0
- package/dist/index-BWiYePx8.d.cts +216 -0
- package/dist/index-BXfunVyD.d.cts +1342 -0
- package/dist/index-BXfunVyD.d.ts +1342 -0
- package/dist/index-BdeZuSX6.d.ts +1 -0
- package/dist/index-C2865AJq.d.cts +25 -0
- package/dist/index-C2865AJq.d.ts +25 -0
- package/dist/index-CFoN0L3C.d.ts +285 -0
- package/dist/index-vPrqYDHu.d.ts +216 -0
- package/dist/index.cjs +19 -0
- package/dist/index.d.cts +3 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +3 -0
- package/dist/initial-focus-BQxRRFPa.cjs +37 -0
- package/dist/initial-focus-BrN5tT2X.js +26 -0
- package/dist/interact-outside-BjqIunFx.js +211 -0
- package/dist/interact-outside-Dphjr2Zh.cjs +216 -0
- package/dist/interact-outside.cjs +3 -0
- package/dist/interact-outside.d.cts +2 -0
- package/dist/interact-outside.d.ts +2 -0
- package/dist/interact-outside.js +2 -0
- package/dist/json-tree-utils.cjs +1518 -0
- package/dist/json-tree-utils.d.cts +117 -0
- package/dist/json-tree-utils.d.ts +117 -0
- package/dist/json-tree-utils.js +1469 -0
- package/dist/list-collection-D_eNKrot.d.cts +60 -0
- package/dist/list-collection-RqYEWHb4.d.ts +60 -0
- package/dist/live-region-BD0OgmrH.cjs +68 -0
- package/dist/live-region-F8YMmbrY.js +63 -0
- package/dist/live-region.cjs +3 -0
- package/dist/live-region.d.cts +2 -0
- package/dist/live-region.d.ts +2 -0
- package/dist/live-region.js +2 -0
- package/dist/machines/accordion/index.cjs +328 -0
- package/dist/machines/accordion/index.d.cts +83 -0
- package/dist/machines/accordion/index.d.ts +83 -0
- package/dist/machines/accordion/index.js +321 -0
- package/dist/machines/angle-slider/index.cjs +420 -0
- package/dist/machines/angle-slider/index.d.cts +84 -0
- package/dist/machines/angle-slider/index.d.ts +84 -0
- package/dist/machines/angle-slider/index.js +415 -0
- package/dist/machines/async-list/index.cjs +310 -0
- package/dist/machines/async-list/index.d.cts +90 -0
- package/dist/machines/async-list/index.d.ts +90 -0
- package/dist/machines/async-list/index.js +308 -0
- package/dist/machines/avatar/index.cjs +165 -0
- package/dist/machines/avatar/index.d.cts +63 -0
- package/dist/machines/avatar/index.d.ts +63 -0
- package/dist/machines/avatar/index.js +160 -0
- package/dist/machines/carousel/index.cjs +929 -0
- package/dist/machines/carousel/index.d.cts +146 -0
- package/dist/machines/carousel/index.d.ts +146 -0
- package/dist/machines/carousel/index.js +920 -0
- package/dist/machines/cascade-select/index.cjs +1426 -0
- package/dist/machines/cascade-select/index.d.cts +167 -0
- package/dist/machines/cascade-select/index.d.ts +167 -0
- package/dist/machines/cascade-select/index.js +1419 -0
- package/dist/machines/checkbox/index.cjs +316 -0
- package/dist/machines/checkbox/index.d.cts +81 -0
- package/dist/machines/checkbox/index.d.ts +81 -0
- package/dist/machines/checkbox/index.js +311 -0
- package/dist/machines/clipboard/index.cjs +228 -0
- package/dist/machines/clipboard/index.d.cts +72 -0
- package/dist/machines/clipboard/index.d.ts +72 -0
- package/dist/machines/clipboard/index.js +221 -0
- package/dist/machines/collapsible/index.cjs +363 -0
- package/dist/machines/collapsible/index.d.cts +82 -0
- package/dist/machines/collapsible/index.d.ts +82 -0
- package/dist/machines/collapsible/index.js +358 -0
- package/dist/machines/color-picker/index.cjs +1534 -0
- package/dist/machines/color-picker/index.d.cts +207 -0
- package/dist/machines/color-picker/index.d.ts +207 -0
- package/dist/machines/color-picker/index.js +1518 -0
- package/dist/machines/combobox/index.cjs +1554 -0
- package/dist/machines/combobox/index.d.cts +219 -0
- package/dist/machines/combobox/index.d.ts +219 -0
- package/dist/machines/combobox/index.js +1542 -0
- package/dist/machines/date-input/index.cjs +1974 -0
- package/dist/machines/date-input/index.d.cts +230 -0
- package/dist/machines/date-input/index.d.ts +230 -0
- package/dist/machines/date-input/index.js +1958 -0
- package/dist/machines/date-picker/index.cjs +2424 -0
- package/dist/machines/date-picker/index.d.cts +378 -0
- package/dist/machines/date-picker/index.d.ts +378 -0
- package/dist/machines/date-picker/index.js +2408 -0
- package/dist/machines/dialog/index.cjs +378 -0
- package/dist/machines/dialog/index.d.cts +94 -0
- package/dist/machines/dialog/index.d.ts +94 -0
- package/dist/machines/dialog/index.js +373 -0
- package/dist/machines/drawer/index.cjs +2066 -0
- package/dist/machines/drawer/index.d.cts +334 -0
- package/dist/machines/drawer/index.d.ts +334 -0
- package/dist/machines/drawer/index.js +2059 -0
- package/dist/machines/editable/index.cjs +550 -0
- package/dist/machines/editable/index.d.cts +114 -0
- package/dist/machines/editable/index.d.ts +114 -0
- package/dist/machines/editable/index.js +545 -0
- package/dist/machines/file-upload/index.cjs +648 -0
- package/dist/machines/file-upload/index.d.cts +150 -0
- package/dist/machines/file-upload/index.d.ts +150 -0
- package/dist/machines/file-upload/index.js +641 -0
- package/dist/machines/floating-panel/index.cjs +1020 -0
- package/dist/machines/floating-panel/index.d.cts +149 -0
- package/dist/machines/floating-panel/index.d.ts +149 -0
- package/dist/machines/floating-panel/index.js +1012 -0
- package/dist/machines/hover-card/index.cjs +441 -0
- package/dist/machines/hover-card/index.d.cts +82 -0
- package/dist/machines/hover-card/index.d.ts +82 -0
- package/dist/machines/hover-card/index.js +436 -0
- package/dist/machines/image-cropper/index.cjs +2082 -0
- package/dist/machines/image-cropper/index.d.cts +182 -0
- package/dist/machines/image-cropper/index.d.ts +182 -0
- package/dist/machines/image-cropper/index.js +2076 -0
- package/dist/machines/listbox/index.cjs +873 -0
- package/dist/machines/listbox/index.d.cts +175 -0
- package/dist/machines/listbox/index.d.ts +175 -0
- package/dist/machines/listbox/index.js +860 -0
- package/dist/machines/marquee/index.cjs +387 -0
- package/dist/machines/marquee/index.d.cts +102 -0
- package/dist/machines/marquee/index.d.ts +102 -0
- package/dist/machines/marquee/index.js +382 -0
- package/dist/machines/menu/index.cjs +1562 -0
- package/dist/machines/menu/index.d.cts +188 -0
- package/dist/machines/menu/index.d.ts +188 -0
- package/dist/machines/menu/index.js +1549 -0
- package/dist/machines/navigation-menu/index.cjs +860 -0
- package/dist/machines/navigation-menu/index.d.cts +131 -0
- package/dist/machines/navigation-menu/index.d.ts +131 -0
- package/dist/machines/navigation-menu/index.js +855 -0
- package/dist/machines/number-input/index.cjs +1014 -0
- package/dist/machines/number-input/index.d.cts +136 -0
- package/dist/machines/number-input/index.d.ts +136 -0
- package/dist/machines/number-input/index.js +1009 -0
- package/dist/machines/pagination/index.cjs +413 -0
- package/dist/machines/pagination/index.d.cts +139 -0
- package/dist/machines/pagination/index.d.ts +139 -0
- package/dist/machines/pagination/index.js +404 -0
- package/dist/machines/password-input/index.cjs +224 -0
- package/dist/machines/password-input/index.d.cts +71 -0
- package/dist/machines/password-input/index.d.ts +71 -0
- package/dist/machines/password-input/index.js +219 -0
- package/dist/machines/pin-input/index.cjs +595 -0
- package/dist/machines/pin-input/index.d.cts +107 -0
- package/dist/machines/pin-input/index.d.ts +107 -0
- package/dist/machines/pin-input/index.js +590 -0
- package/dist/machines/popover/index.cjs +516 -0
- package/dist/machines/popover/index.d.cts +107 -0
- package/dist/machines/popover/index.d.ts +107 -0
- package/dist/machines/popover/index.js +511 -0
- package/dist/machines/presence/index.cjs +193 -0
- package/dist/machines/presence/index.d.cts +44 -0
- package/dist/machines/presence/index.d.ts +44 -0
- package/dist/machines/presence/index.js +190 -0
- package/dist/machines/progress/index.cjs +282 -0
- package/dist/machines/progress/index.d.cts +96 -0
- package/dist/machines/progress/index.d.ts +96 -0
- package/dist/machines/progress/index.js +277 -0
- package/dist/machines/qr-code/index.cjs +167 -0
- package/dist/machines/qr-code/index.d.cts +71 -0
- package/dist/machines/qr-code/index.d.ts +71 -0
- package/dist/machines/qr-code/index.js +162 -0
- package/dist/machines/radio-group/index.cjs +465 -0
- package/dist/machines/radio-group/index.d.cts +218 -0
- package/dist/machines/radio-group/index.d.ts +218 -0
- package/dist/machines/radio-group/index.js +458 -0
- package/dist/machines/rating-group/index.cjs +405 -0
- package/dist/machines/rating-group/index.d.cts +101 -0
- package/dist/machines/rating-group/index.d.ts +101 -0
- package/dist/machines/rating-group/index.js +398 -0
- package/dist/machines/scroll-area/index.cjs +865 -0
- package/dist/machines/scroll-area/index.d.cts +126 -0
- package/dist/machines/scroll-area/index.d.ts +126 -0
- package/dist/machines/scroll-area/index.js +860 -0
- package/dist/machines/select/index.cjs +1226 -0
- package/dist/machines/select/index.d.cts +190 -0
- package/dist/machines/select/index.d.ts +190 -0
- package/dist/machines/select/index.js +1214 -0
- package/dist/machines/signature-pad/index.cjs +337 -0
- package/dist/machines/signature-pad/index.d.cts +108 -0
- package/dist/machines/signature-pad/index.d.ts +108 -0
- package/dist/machines/signature-pad/index.js +330 -0
- package/dist/machines/slider/index.cjs +1103 -0
- package/dist/machines/slider/index.d.cts +154 -0
- package/dist/machines/slider/index.d.ts +154 -0
- package/dist/machines/slider/index.js +1094 -0
- package/dist/machines/splitter/index.cjs +1686 -0
- package/dist/machines/splitter/index.d.cts +282 -0
- package/dist/machines/splitter/index.d.ts +282 -0
- package/dist/machines/splitter/index.js +1675 -0
- package/dist/machines/steps/index.cjs +330 -0
- package/dist/machines/steps/index.d.cts +109 -0
- package/dist/machines/steps/index.d.ts +109 -0
- package/dist/machines/steps/index.js +325 -0
- package/dist/machines/switch/index.cjs +307 -0
- package/dist/machines/switch/index.d.cts +80 -0
- package/dist/machines/switch/index.d.ts +80 -0
- package/dist/machines/switch/index.js +302 -0
- package/dist/machines/tabs/index.cjs +542 -0
- package/dist/machines/tabs/index.d.cts +113 -0
- package/dist/machines/tabs/index.d.ts +113 -0
- package/dist/machines/tabs/index.js +533 -0
- package/dist/machines/tags-input/index.cjs +1151 -0
- package/dist/machines/tags-input/index.d.cts +182 -0
- package/dist/machines/tags-input/index.d.ts +182 -0
- package/dist/machines/tags-input/index.js +1144 -0
- package/dist/machines/timer/index.cjs +329 -0
- package/dist/machines/timer/index.d.cts +102 -0
- package/dist/machines/timer/index.d.ts +102 -0
- package/dist/machines/timer/index.js +323 -0
- package/dist/machines/toast/index.cjs +1185 -0
- package/dist/machines/toast/index.d.cts +204 -0
- package/dist/machines/toast/index.d.ts +204 -0
- package/dist/machines/toast/index.js +1180 -0
- package/dist/machines/toc/index.cjs +358 -0
- package/dist/machines/toc/index.d.cts +98 -0
- package/dist/machines/toc/index.d.ts +98 -0
- package/dist/machines/toc/index.js +351 -0
- package/dist/machines/toggle/index.cjs +99 -0
- package/dist/machines/toggle/index.d.cts +46 -0
- package/dist/machines/toggle/index.d.ts +46 -0
- package/dist/machines/toggle/index.js +94 -0
- package/dist/machines/toggle-group/index.cjs +329 -0
- package/dist/machines/toggle-group/index.d.cts +81 -0
- package/dist/machines/toggle-group/index.d.ts +81 -0
- package/dist/machines/toggle-group/index.js +322 -0
- package/dist/machines/tooltip/index.cjs +638 -0
- package/dist/machines/tooltip/index.d.cts +84 -0
- package/dist/machines/tooltip/index.d.ts +84 -0
- package/dist/machines/tooltip/index.js +633 -0
- package/dist/machines/tour/index.cjs +1123 -0
- package/dist/machines/tour/index.d.cts +207 -0
- package/dist/machines/tour/index.d.ts +207 -0
- package/dist/machines/tour/index.js +1115 -0
- package/dist/machines/tree-view/index.cjs +1288 -0
- package/dist/machines/tree-view/index.d.cts +221 -0
- package/dist/machines/tree-view/index.d.ts +221 -0
- package/dist/machines/tree-view/index.js +1279 -0
- package/dist/mutation-observer-_LbwtN3W.cjs +61 -0
- package/dist/mutation-observer-qObPUo3D.js +50 -0
- package/dist/navigate-CJOaL3vx.js +31 -0
- package/dist/navigate-uJG-006f.cjs +42 -0
- package/dist/overflow-BBihfMxX.cjs +67 -0
- package/dist/overflow-C-zO1CWA.js +44 -0
- package/dist/platform-BDB0wXUk.js +26 -0
- package/dist/platform-BZS-dkZN.cjs +109 -0
- package/dist/point-C9A4dk1i.js +27 -0
- package/dist/point-DxnCrJBy.cjs +32 -0
- package/dist/pointer-lock-BvfSjt_s.cjs +31 -0
- package/dist/pointer-lock-WezxTqu-.js +26 -0
- package/dist/pointer-move-CGzan38r.cjs +42 -0
- package/dist/pointer-move-Tijb8Ptk.js +37 -0
- package/dist/polygon-BvdwYRBw.js +76 -0
- package/dist/polygon-CTR1kEoU.cjs +93 -0
- package/dist/popper-DkAAS9VE.cjs +487 -0
- package/dist/popper-DzBZzAe4.js +464 -0
- package/dist/popper.cjs +6 -0
- package/dist/popper.d.cts +2 -0
- package/dist/popper.d.ts +2 -0
- package/dist/popper.js +2 -0
- package/dist/press-B7XLrLGR.js +65 -0
- package/dist/press-BdD5suLQ.cjs +70 -0
- package/dist/proxy-tab-focus-DWMXvAfO.js +54 -0
- package/dist/proxy-tab-focus-NthYgHdY.cjs +59 -0
- package/dist/raf-BSDcY4UD.cjs +85 -0
- package/dist/raf-DgINgykK.d.cts +15 -0
- package/dist/raf-DgINgykK.d.ts +15 -0
- package/dist/raf-Dhvm7f1e.js +62 -0
- package/dist/rect-utils-DiT4k3jS.cjs +548 -0
- package/dist/rect-utils-d_3gZVsc.js +459 -0
- package/dist/rect-utils.cjs +165 -0
- package/dist/rect-utils.d.cts +197 -0
- package/dist/rect-utils.d.ts +197 -0
- package/dist/rect-utils.js +116 -0
- package/dist/remove-scroll-DTVA5f4w.cjs +86 -0
- package/dist/remove-scroll-WEheFCiq.js +81 -0
- package/dist/remove-scroll.cjs +3 -0
- package/dist/remove-scroll.d.cts +4 -0
- package/dist/remove-scroll.d.ts +4 -0
- package/dist/remove-scroll.js +2 -0
- package/dist/rolldown-runtime-D6vf50IK.cjs +28 -0
- package/dist/scale-C5BBHVgH.js +17 -0
- package/dist/scale-C7iiUGhS.cjs +22 -0
- package/dist/scope-CysKlKe9.cjs +28 -0
- package/dist/scope-D1873Mzi.js +23 -0
- package/dist/scroll-CVJ40w2e.js +46 -0
- package/dist/scroll-Dyd1QLrc.cjs +63 -0
- package/dist/scroll-snap-Cuaqdevf.cjs +224 -0
- package/dist/scroll-snap-DqMiFASa.js +201 -0
- package/dist/scroll-snap.cjs +6 -0
- package/dist/scroll-snap.d.cts +14 -0
- package/dist/scroll-snap.d.ts +14 -0
- package/dist/scroll-snap.js +2 -0
- package/dist/selection-ClKhnWit.d.cts +49 -0
- package/dist/selection-DzLiSVkg.d.ts +49 -0
- package/dist/selection-map-962WvX2k.js +45 -0
- package/dist/selection-map-BwlZr1LH.cjs +68 -0
- package/dist/set-CFNGOW5W.js +50 -0
- package/dist/set-DrtWCLFb.cjs +73 -0
- package/dist/store-BLpJlMxz.js +257 -0
- package/dist/store-Btfrm2bs.cjs +47 -0
- package/dist/store-C5HvdLyc.js +42 -0
- package/dist/store-Wg8KVwNv.cjs +298 -0
- package/dist/store.cjs +9 -0
- package/dist/store.d.cts +26 -0
- package/dist/store.d.ts +26 -0
- package/dist/store.js +2 -0
- package/dist/stringify-state.cjs +48 -0
- package/dist/stringify-state.d.cts +8 -0
- package/dist/stringify-state.d.ts +8 -0
- package/dist/stringify-state.js +44 -0
- package/dist/tabbable-Bz1-1GAY.cjs +206 -0
- package/dist/tabbable-CDA1YMjZ.js +147 -0
- package/dist/text-selection-B3OQpQGy.cjs +75 -0
- package/dist/text-selection-DXvWvm6k.js +64 -0
- package/dist/timers-BRyPrXIX.js +82 -0
- package/dist/timers-Beu4SfAj.cjs +99 -0
- package/dist/tree-collection-3QX3EIhq.d.ts +77 -0
- package/dist/tree-collection-C6oDQGUJ.d.cts +77 -0
- package/dist/typeahead-DremEgML.d.cts +45 -0
- package/dist/typeahead-DremEgML.d.ts +45 -0
- package/dist/types-BFuHIo7S.js +10 -0
- package/dist/types-CczqoQLL.d.cts +57 -0
- package/dist/types-CczqoQLL.d.ts +57 -0
- package/dist/types-CjocssbC.d.cts +13 -0
- package/dist/types-CjocssbC.d.ts +13 -0
- package/dist/types-D7oF7eWh.d.cts +54 -0
- package/dist/types-D7oF7eWh.d.ts +54 -0
- package/dist/types-HCvp3Bhv.cjs +21 -0
- package/dist/types.cjs +14 -0
- package/dist/types.d.cts +6 -0
- package/dist/types.d.ts +6 -0
- package/dist/types.js +12 -0
- package/dist/utils-BH-oBBz2.cjs +614 -0
- package/dist/utils-Cht5XaHf.js +267 -0
- package/dist/utils.cjs +95 -0
- package/dist/utils.d.cts +144 -0
- package/dist/utils.d.ts +144 -0
- package/dist/utils.js +7 -0
- package/dist/visually-hidden-BgSCFLz_.cjs +29 -0
- package/dist/visually-hidden-yDJ517KZ.js +18 -0
- package/dist/wait-for-3n85JcCU.d.cts +15 -0
- package/dist/wait-for-3n85JcCU.d.ts +15 -0
- package/dist/wait-for-CI5Ye-Lo.js +69 -0
- package/dist/wait-for-Db73VpZQ.cjs +86 -0
- package/dist/warning-CrzBpWT1.js +19 -0
- package/dist/warning-HAmFXLHm.cjs +42 -0
- package/package.json +349 -6
|
@@ -0,0 +1,639 @@
|
|
|
1
|
+
import { D as mod, N as snapValueToStep, P as toFixedNumber, g as getPercentValue, l as clampValue, v as getValuePercent } from "./utils-Cht5XaHf.js";
|
|
2
|
+
//#region src/common/color-utils/color-format-gradient.ts
|
|
3
|
+
const generateRGB_R = (orientation, dir, zValue) => {
|
|
4
|
+
const maskImage = `linear-gradient(to ${orientation[Number(!dir)]}, transparent, #000)`;
|
|
5
|
+
return {
|
|
6
|
+
areaStyles: { backgroundImage: `linear-gradient(to ${orientation[Number(dir)]},rgb(${zValue},0,0),rgb(${zValue},255,0))` },
|
|
7
|
+
areaGradientStyles: {
|
|
8
|
+
backgroundImage: `linear-gradient(to ${orientation[Number(dir)]},rgb(${zValue},0,255),rgb(${zValue},255,255))`,
|
|
9
|
+
WebkitMaskImage: maskImage,
|
|
10
|
+
maskImage
|
|
11
|
+
}
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
const generateRGB_G = (orientation, dir, zValue) => {
|
|
15
|
+
const maskImage = `linear-gradient(to ${orientation[Number(!dir)]}, transparent, #000)`;
|
|
16
|
+
return {
|
|
17
|
+
areaStyles: { backgroundImage: `linear-gradient(to ${orientation[Number(dir)]},rgb(0,${zValue},0),rgb(255,${zValue},0))` },
|
|
18
|
+
areaGradientStyles: {
|
|
19
|
+
backgroundImage: `linear-gradient(to ${orientation[Number(dir)]},rgb(0,${zValue},255),rgb(255,${zValue},255))`,
|
|
20
|
+
WebkitMaskImage: maskImage,
|
|
21
|
+
maskImage
|
|
22
|
+
}
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
const generateRGB_B = (orientation, dir, zValue) => {
|
|
26
|
+
const maskImage = `linear-gradient(to ${orientation[Number(!dir)]}, transparent, #000)`;
|
|
27
|
+
return {
|
|
28
|
+
areaStyles: { backgroundImage: `linear-gradient(to ${orientation[Number(dir)]},rgb(0,0,${zValue}),rgb(255,0,${zValue}))` },
|
|
29
|
+
areaGradientStyles: {
|
|
30
|
+
backgroundImage: `linear-gradient(to ${orientation[Number(dir)]},rgb(0,255,${zValue}),rgb(255,255,${zValue}))`,
|
|
31
|
+
WebkitMaskImage: maskImage,
|
|
32
|
+
maskImage
|
|
33
|
+
}
|
|
34
|
+
};
|
|
35
|
+
};
|
|
36
|
+
const generateHSL_H = (orientation, dir, zValue) => {
|
|
37
|
+
return {
|
|
38
|
+
areaStyles: {},
|
|
39
|
+
areaGradientStyles: { background: [
|
|
40
|
+
`linear-gradient(to ${orientation[Number(dir)]}, hsla(0,0%,0%,1) 0%, hsla(0,0%,0%,0) 50%, hsla(0,0%,100%,0) 50%, hsla(0,0%,100%,1) 100%)`,
|
|
41
|
+
`linear-gradient(to ${orientation[Number(!dir)]},hsl(0,0%,50%),hsla(0,0%,50%,0))`,
|
|
42
|
+
`hsl(${zValue}, 100%, 50%)`
|
|
43
|
+
].join(",") }
|
|
44
|
+
};
|
|
45
|
+
};
|
|
46
|
+
const generateHSL_S = (orientation, dir, alphaValue) => {
|
|
47
|
+
return {
|
|
48
|
+
areaStyles: {},
|
|
49
|
+
areaGradientStyles: { background: [
|
|
50
|
+
`linear-gradient(to ${orientation[Number(!dir)]}, hsla(0,0%,0%,${alphaValue}) 0%, hsla(0,0%,0%,0) 50%, hsla(0,0%,100%,0) 50%, hsla(0,0%,100%,${alphaValue}) 100%)`,
|
|
51
|
+
`linear-gradient(to ${orientation[Number(dir)]},hsla(0,100%,50%,${alphaValue}),hsla(60,100%,50%,${alphaValue}),hsla(120,100%,50%,${alphaValue}),hsla(180,100%,50%,${alphaValue}),hsla(240,100%,50%,${alphaValue}),hsla(300,100%,50%,${alphaValue}),hsla(359,100%,50%,${alphaValue}))`,
|
|
52
|
+
"hsl(0, 0%, 50%)"
|
|
53
|
+
].join(",") }
|
|
54
|
+
};
|
|
55
|
+
};
|
|
56
|
+
const generateHSL_L = (orientation, dir, zValue) => {
|
|
57
|
+
return {
|
|
58
|
+
areaStyles: {},
|
|
59
|
+
areaGradientStyles: { backgroundImage: [`linear-gradient(to ${orientation[Number(!dir)]},hsl(0,0%,${zValue}%),hsla(0,0%,${zValue}%,0))`, `linear-gradient(to ${orientation[Number(dir)]},hsl(0,100%,${zValue}%),hsl(60,100%,${zValue}%),hsl(120,100%,${zValue}%),hsl(180,100%,${zValue}%),hsl(240,100%,${zValue}%),hsl(300,100%,${zValue}%),hsl(360,100%,${zValue}%))`].join(",") }
|
|
60
|
+
};
|
|
61
|
+
};
|
|
62
|
+
const generateHSB_H = (orientation, dir, zValue) => {
|
|
63
|
+
return {
|
|
64
|
+
areaStyles: {},
|
|
65
|
+
areaGradientStyles: { background: [
|
|
66
|
+
`linear-gradient(to ${orientation[Number(dir)]},hsl(0,0%,0%),hsla(0,0%,0%,0))`,
|
|
67
|
+
`linear-gradient(to ${orientation[Number(!dir)]},hsl(0,0%,100%),hsla(0,0%,100%,0))`,
|
|
68
|
+
`hsl(${zValue}, 100%, 50%)`
|
|
69
|
+
].join(",") }
|
|
70
|
+
};
|
|
71
|
+
};
|
|
72
|
+
const generateHSB_S = (orientation, dir, alphaValue) => {
|
|
73
|
+
return {
|
|
74
|
+
areaStyles: {},
|
|
75
|
+
areaGradientStyles: { background: [
|
|
76
|
+
`linear-gradient(to ${orientation[Number(!dir)]},hsla(0,0%,0%,${alphaValue}),hsla(0,0%,0%,0))`,
|
|
77
|
+
`linear-gradient(to ${orientation[Number(dir)]},hsla(0,100%,50%,${alphaValue}),hsla(60,100%,50%,${alphaValue}),hsla(120,100%,50%,${alphaValue}),hsla(180,100%,50%,${alphaValue}),hsla(240,100%,50%,${alphaValue}),hsla(300,100%,50%,${alphaValue}),hsla(359,100%,50%,${alphaValue}))`,
|
|
78
|
+
`linear-gradient(to ${orientation[Number(!dir)]},hsl(0,0%,0%),hsl(0,0%,100%))`
|
|
79
|
+
].join(",") }
|
|
80
|
+
};
|
|
81
|
+
};
|
|
82
|
+
const generateHSB_B = (orientation, dir, alphaValue) => {
|
|
83
|
+
return {
|
|
84
|
+
areaStyles: {},
|
|
85
|
+
areaGradientStyles: { background: [
|
|
86
|
+
`linear-gradient(to ${orientation[Number(!dir)]},hsla(0,0%,100%,${alphaValue}),hsla(0,0%,100%,0))`,
|
|
87
|
+
`linear-gradient(to ${orientation[Number(dir)]},hsla(0,100%,50%,${alphaValue}),hsla(60,100%,50%,${alphaValue}),hsla(120,100%,50%,${alphaValue}),hsla(180,100%,50%,${alphaValue}),hsla(240,100%,50%,${alphaValue}),hsla(300,100%,50%,${alphaValue}),hsla(359,100%,50%,${alphaValue}))`,
|
|
88
|
+
"#000"
|
|
89
|
+
].join(",") }
|
|
90
|
+
};
|
|
91
|
+
};
|
|
92
|
+
//#endregion
|
|
93
|
+
//#region src/common/color-utils/area-gradient.ts
|
|
94
|
+
function getColorAreaGradient(color, options) {
|
|
95
|
+
const { xChannel, yChannel, dir: dirProp = "ltr" } = options;
|
|
96
|
+
const { zChannel } = color.getColorAxes({
|
|
97
|
+
xChannel,
|
|
98
|
+
yChannel
|
|
99
|
+
});
|
|
100
|
+
const zValue = color.getChannelValue(zChannel);
|
|
101
|
+
const { minValue: zMin, maxValue: zMax } = color.getChannelRange(zChannel);
|
|
102
|
+
const orientation = ["top", dirProp === "rtl" ? "left" : "right"];
|
|
103
|
+
let dir = false;
|
|
104
|
+
let background = {
|
|
105
|
+
areaStyles: {},
|
|
106
|
+
areaGradientStyles: {}
|
|
107
|
+
};
|
|
108
|
+
let alphaValue = (zValue - zMin) / (zMax - zMin);
|
|
109
|
+
let isHSL = color.getFormat() === "hsla";
|
|
110
|
+
switch (zChannel) {
|
|
111
|
+
case "red":
|
|
112
|
+
dir = xChannel === "green";
|
|
113
|
+
background = generateRGB_R(orientation, dir, zValue);
|
|
114
|
+
break;
|
|
115
|
+
case "green":
|
|
116
|
+
dir = xChannel === "red";
|
|
117
|
+
background = generateRGB_G(orientation, dir, zValue);
|
|
118
|
+
break;
|
|
119
|
+
case "blue":
|
|
120
|
+
dir = xChannel === "red";
|
|
121
|
+
background = generateRGB_B(orientation, dir, zValue);
|
|
122
|
+
break;
|
|
123
|
+
case "hue":
|
|
124
|
+
dir = xChannel !== "saturation";
|
|
125
|
+
if (isHSL) background = generateHSL_H(orientation, dir, zValue);
|
|
126
|
+
else background = generateHSB_H(orientation, dir, zValue);
|
|
127
|
+
break;
|
|
128
|
+
case "saturation":
|
|
129
|
+
dir = xChannel === "hue";
|
|
130
|
+
if (isHSL) background = generateHSL_S(orientation, dir, alphaValue);
|
|
131
|
+
else background = generateHSB_S(orientation, dir, alphaValue);
|
|
132
|
+
break;
|
|
133
|
+
case "brightness":
|
|
134
|
+
dir = xChannel === "hue";
|
|
135
|
+
background = generateHSB_B(orientation, dir, alphaValue);
|
|
136
|
+
break;
|
|
137
|
+
case "lightness":
|
|
138
|
+
dir = xChannel === "hue";
|
|
139
|
+
background = generateHSL_L(orientation, dir, zValue);
|
|
140
|
+
break;
|
|
141
|
+
}
|
|
142
|
+
return background;
|
|
143
|
+
}
|
|
144
|
+
//#endregion
|
|
145
|
+
//#region src/common/color-utils/color.ts
|
|
146
|
+
const isEqualObject = (a, b) => {
|
|
147
|
+
if (Object.keys(a).length !== Object.keys(b).length) return false;
|
|
148
|
+
for (let key in a) if (a[key] !== b[key]) return false;
|
|
149
|
+
return true;
|
|
150
|
+
};
|
|
151
|
+
var Color = class {
|
|
152
|
+
toHexInt() {
|
|
153
|
+
return this.toFormat("rgba").toHexInt();
|
|
154
|
+
}
|
|
155
|
+
getChannelValue(channel) {
|
|
156
|
+
if (channel in this) return this[channel];
|
|
157
|
+
throw new Error("Unsupported color channel: " + channel);
|
|
158
|
+
}
|
|
159
|
+
getChannelValuePercent(channel, valueToCheck) {
|
|
160
|
+
const value = valueToCheck ?? this.getChannelValue(channel);
|
|
161
|
+
const { minValue, maxValue } = this.getChannelRange(channel);
|
|
162
|
+
return getValuePercent(value, minValue, maxValue);
|
|
163
|
+
}
|
|
164
|
+
getChannelPercentValue(channel, percentToCheck) {
|
|
165
|
+
const { minValue, maxValue, step } = this.getChannelRange(channel);
|
|
166
|
+
return snapValueToStep(getPercentValue(percentToCheck, minValue, maxValue, step), minValue, maxValue, step);
|
|
167
|
+
}
|
|
168
|
+
withChannelValue(channel, value) {
|
|
169
|
+
const { minValue, maxValue } = this.getChannelRange(channel);
|
|
170
|
+
if (channel in this) {
|
|
171
|
+
let clone = this.clone();
|
|
172
|
+
clone[channel] = clampValue(value, minValue, maxValue);
|
|
173
|
+
return clone;
|
|
174
|
+
}
|
|
175
|
+
throw new Error("Unsupported color channel: " + channel);
|
|
176
|
+
}
|
|
177
|
+
getColorAxes(xyChannels) {
|
|
178
|
+
let { xChannel, yChannel } = xyChannels;
|
|
179
|
+
let xCh = xChannel || this.getChannels().find((c) => c !== yChannel);
|
|
180
|
+
let yCh = yChannel || this.getChannels().find((c) => c !== xCh);
|
|
181
|
+
return {
|
|
182
|
+
xChannel: xCh,
|
|
183
|
+
yChannel: yCh,
|
|
184
|
+
zChannel: this.getChannels().find((c) => c !== xCh && c !== yCh)
|
|
185
|
+
};
|
|
186
|
+
}
|
|
187
|
+
incrementChannel(channel, stepSize) {
|
|
188
|
+
const { minValue, maxValue, step } = this.getChannelRange(channel);
|
|
189
|
+
const value = snapValueToStep(clampValue(this.getChannelValue(channel) + stepSize, minValue, maxValue), minValue, maxValue, step);
|
|
190
|
+
return this.withChannelValue(channel, value);
|
|
191
|
+
}
|
|
192
|
+
decrementChannel(channel, stepSize) {
|
|
193
|
+
return this.incrementChannel(channel, -stepSize);
|
|
194
|
+
}
|
|
195
|
+
isEqual(color) {
|
|
196
|
+
return isEqualObject(this.toJSON(), color.toJSON()) && this.getChannelValue("alpha") === color.getChannelValue("alpha");
|
|
197
|
+
}
|
|
198
|
+
};
|
|
199
|
+
//#endregion
|
|
200
|
+
//#region src/common/color-utils/rgb-color.ts
|
|
201
|
+
const HEX_COLOR_REGEX = /^#[\da-f]+$/i;
|
|
202
|
+
const RGB_COLOR_REGEX = /^rgba?\((.*)\)$/;
|
|
203
|
+
const HEX_STARTING_REGEX = /[^#]/gi;
|
|
204
|
+
var RGBColor = class RGBColor extends Color {
|
|
205
|
+
red;
|
|
206
|
+
green;
|
|
207
|
+
blue;
|
|
208
|
+
alpha;
|
|
209
|
+
constructor(red, green, blue, alpha) {
|
|
210
|
+
super();
|
|
211
|
+
this.red = red;
|
|
212
|
+
this.green = green;
|
|
213
|
+
this.blue = blue;
|
|
214
|
+
this.alpha = alpha;
|
|
215
|
+
}
|
|
216
|
+
static parse(value) {
|
|
217
|
+
let colors = [];
|
|
218
|
+
if (HEX_COLOR_REGEX.test(value) && [
|
|
219
|
+
4,
|
|
220
|
+
5,
|
|
221
|
+
7,
|
|
222
|
+
9
|
|
223
|
+
].includes(value.length)) {
|
|
224
|
+
const values = (value.length < 6 ? value.replace(HEX_STARTING_REGEX, "$&$&") : value).slice(1).split("");
|
|
225
|
+
while (values.length > 0) colors.push(parseInt(values.splice(0, 2).join(""), 16));
|
|
226
|
+
colors[3] = colors[3] !== void 0 ? colors[3] / 255 : void 0;
|
|
227
|
+
}
|
|
228
|
+
const match = value.match(RGB_COLOR_REGEX);
|
|
229
|
+
if (match?.[1]) colors = match[1].split(",").map((value) => Number(value.trim())).map((num, i) => clampValue(num, 0, i < 3 ? 255 : 1));
|
|
230
|
+
return colors.length < 3 ? void 0 : new RGBColor(colors[0], colors[1], colors[2], colors[3] ?? 1);
|
|
231
|
+
}
|
|
232
|
+
toString(format = "css") {
|
|
233
|
+
switch (format) {
|
|
234
|
+
case "hex": return "#" + (this.red.toString(16).padStart(2, "0") + this.green.toString(16).padStart(2, "0") + this.blue.toString(16).padStart(2, "0")).toUpperCase();
|
|
235
|
+
case "hexa": return "#" + (this.red.toString(16).padStart(2, "0") + this.green.toString(16).padStart(2, "0") + this.blue.toString(16).padStart(2, "0") + Math.round(this.alpha * 255).toString(16).padStart(2, "0")).toUpperCase();
|
|
236
|
+
case "rgb": return `rgb(${this.red}, ${this.green}, ${this.blue})`;
|
|
237
|
+
case "css":
|
|
238
|
+
case "rgba": return `rgba(${this.red}, ${this.green}, ${this.blue}, ${this.alpha})`;
|
|
239
|
+
case "hsl": return this.toHSL().toString("hsl");
|
|
240
|
+
case "hsb": return this.toHSB().toString("hsb");
|
|
241
|
+
default: return this.toFormat(format).toString(format);
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
toFormat(format) {
|
|
245
|
+
switch (format) {
|
|
246
|
+
case "rgba": return this;
|
|
247
|
+
case "hsba": return this.toHSB();
|
|
248
|
+
case "hsla": return this.toHSL();
|
|
249
|
+
default: throw new Error("Unsupported color conversion: rgb -> " + format);
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
toHexInt() {
|
|
253
|
+
return this.red << 16 | this.green << 8 | this.blue;
|
|
254
|
+
}
|
|
255
|
+
toHSB() {
|
|
256
|
+
const red = this.red / 255;
|
|
257
|
+
const green = this.green / 255;
|
|
258
|
+
const blue = this.blue / 255;
|
|
259
|
+
const min = Math.min(red, green, blue);
|
|
260
|
+
const brightness = Math.max(red, green, blue);
|
|
261
|
+
const chroma = brightness - min;
|
|
262
|
+
const saturation = brightness === 0 ? 0 : chroma / brightness;
|
|
263
|
+
let hue = 0;
|
|
264
|
+
if (chroma !== 0) {
|
|
265
|
+
switch (brightness) {
|
|
266
|
+
case red:
|
|
267
|
+
hue = (green - blue) / chroma + (green < blue ? 6 : 0);
|
|
268
|
+
break;
|
|
269
|
+
case green:
|
|
270
|
+
hue = (blue - red) / chroma + 2;
|
|
271
|
+
break;
|
|
272
|
+
case blue:
|
|
273
|
+
hue = (red - green) / chroma + 4;
|
|
274
|
+
break;
|
|
275
|
+
}
|
|
276
|
+
hue /= 6;
|
|
277
|
+
}
|
|
278
|
+
return new HSBColor(toFixedNumber(hue * 360, 2), toFixedNumber(saturation * 100, 2), toFixedNumber(brightness * 100, 2), toFixedNumber(this.alpha, 2));
|
|
279
|
+
}
|
|
280
|
+
toHSL() {
|
|
281
|
+
const red = this.red / 255;
|
|
282
|
+
const green = this.green / 255;
|
|
283
|
+
const blue = this.blue / 255;
|
|
284
|
+
const min = Math.min(red, green, blue);
|
|
285
|
+
const max = Math.max(red, green, blue);
|
|
286
|
+
const lightness = (max + min) / 2;
|
|
287
|
+
const chroma = max - min;
|
|
288
|
+
let hue = -1;
|
|
289
|
+
let saturation = -1;
|
|
290
|
+
if (chroma === 0) hue = saturation = 0;
|
|
291
|
+
else {
|
|
292
|
+
saturation = chroma / (lightness < .5 ? max + min : 2 - max - min);
|
|
293
|
+
switch (max) {
|
|
294
|
+
case red:
|
|
295
|
+
hue = (green - blue) / chroma + (green < blue ? 6 : 0);
|
|
296
|
+
break;
|
|
297
|
+
case green:
|
|
298
|
+
hue = (blue - red) / chroma + 2;
|
|
299
|
+
break;
|
|
300
|
+
case blue:
|
|
301
|
+
hue = (red - green) / chroma + 4;
|
|
302
|
+
break;
|
|
303
|
+
}
|
|
304
|
+
hue /= 6;
|
|
305
|
+
}
|
|
306
|
+
return new HSLColor(toFixedNumber(hue * 360, 2), toFixedNumber(saturation * 100, 2), toFixedNumber(lightness * 100, 2), toFixedNumber(this.alpha, 2));
|
|
307
|
+
}
|
|
308
|
+
clone() {
|
|
309
|
+
return new RGBColor(this.red, this.green, this.blue, this.alpha);
|
|
310
|
+
}
|
|
311
|
+
getChannelFormatOptions(channel) {
|
|
312
|
+
switch (channel) {
|
|
313
|
+
case "red":
|
|
314
|
+
case "green":
|
|
315
|
+
case "blue": return { style: "decimal" };
|
|
316
|
+
case "alpha": return { style: "percent" };
|
|
317
|
+
default: throw new Error("Unknown color channel: " + channel);
|
|
318
|
+
}
|
|
319
|
+
}
|
|
320
|
+
formatChannelValue(channel, locale) {
|
|
321
|
+
let options = this.getChannelFormatOptions(channel);
|
|
322
|
+
let value = this.getChannelValue(channel);
|
|
323
|
+
return new Intl.NumberFormat(locale, options).format(value);
|
|
324
|
+
}
|
|
325
|
+
getChannelRange(channel) {
|
|
326
|
+
switch (channel) {
|
|
327
|
+
case "red":
|
|
328
|
+
case "green":
|
|
329
|
+
case "blue": return {
|
|
330
|
+
minValue: 0,
|
|
331
|
+
maxValue: 255,
|
|
332
|
+
step: 1,
|
|
333
|
+
pageSize: 17
|
|
334
|
+
};
|
|
335
|
+
case "alpha": return {
|
|
336
|
+
minValue: 0,
|
|
337
|
+
maxValue: 1,
|
|
338
|
+
step: .01,
|
|
339
|
+
pageSize: .1
|
|
340
|
+
};
|
|
341
|
+
default: throw new Error("Unknown color channel: " + channel);
|
|
342
|
+
}
|
|
343
|
+
}
|
|
344
|
+
toJSON() {
|
|
345
|
+
return {
|
|
346
|
+
r: this.red,
|
|
347
|
+
g: this.green,
|
|
348
|
+
b: this.blue,
|
|
349
|
+
a: this.alpha
|
|
350
|
+
};
|
|
351
|
+
}
|
|
352
|
+
getFormat() {
|
|
353
|
+
return "rgba";
|
|
354
|
+
}
|
|
355
|
+
static colorChannels = [
|
|
356
|
+
"red",
|
|
357
|
+
"green",
|
|
358
|
+
"blue"
|
|
359
|
+
];
|
|
360
|
+
getChannels() {
|
|
361
|
+
return RGBColor.colorChannels;
|
|
362
|
+
}
|
|
363
|
+
};
|
|
364
|
+
//#endregion
|
|
365
|
+
//#region src/common/color-utils/hsl-color.ts
|
|
366
|
+
const HSL_REGEX = /hsl\(([-+]?\d+(?:.\d+)?\s*,\s*[-+]?\d+(?:.\d+)?%\s*,\s*[-+]?\d+(?:.\d+)?%)\)|hsla\(([-+]?\d+(?:.\d+)?\s*,\s*[-+]?\d+(?:.\d+)?%\s*,\s*[-+]?\d+(?:.\d+)?%\s*,\s*[-+]?\d(.\d+)?)\)/;
|
|
367
|
+
var HSLColor = class HSLColor extends Color {
|
|
368
|
+
hue;
|
|
369
|
+
saturation;
|
|
370
|
+
lightness;
|
|
371
|
+
alpha;
|
|
372
|
+
constructor(hue, saturation, lightness, alpha) {
|
|
373
|
+
super();
|
|
374
|
+
this.hue = hue;
|
|
375
|
+
this.saturation = saturation;
|
|
376
|
+
this.lightness = lightness;
|
|
377
|
+
this.alpha = alpha;
|
|
378
|
+
}
|
|
379
|
+
static parse(value) {
|
|
380
|
+
let m;
|
|
381
|
+
if (m = value.match(HSL_REGEX)) {
|
|
382
|
+
const [h, s, l, a] = (m[1] ?? m[2]).split(",").map((n) => Number(n.trim().replace("%", "")));
|
|
383
|
+
return new HSLColor(mod(h, 360), clampValue(s, 0, 100), clampValue(l, 0, 100), clampValue(a ?? 1, 0, 1));
|
|
384
|
+
}
|
|
385
|
+
}
|
|
386
|
+
toString(format = "css") {
|
|
387
|
+
switch (format) {
|
|
388
|
+
case "hex": return this.toRGB().toString("hex");
|
|
389
|
+
case "hexa": return this.toRGB().toString("hexa");
|
|
390
|
+
case "hsl": return `hsl(${this.hue}, ${toFixedNumber(this.saturation, 2)}%, ${toFixedNumber(this.lightness, 2)}%)`;
|
|
391
|
+
case "css":
|
|
392
|
+
case "hsla": return `hsla(${this.hue}, ${toFixedNumber(this.saturation, 2)}%, ${toFixedNumber(this.lightness, 2)}%, ${this.alpha})`;
|
|
393
|
+
case "hsb": return this.toHSB().toString("hsb");
|
|
394
|
+
case "rgb": return this.toRGB().toString("rgb");
|
|
395
|
+
default: return this.toFormat(format).toString(format);
|
|
396
|
+
}
|
|
397
|
+
}
|
|
398
|
+
toFormat(format) {
|
|
399
|
+
switch (format) {
|
|
400
|
+
case "hsla": return this;
|
|
401
|
+
case "hsba": return this.toHSB();
|
|
402
|
+
case "rgba": return this.toRGB();
|
|
403
|
+
default: throw new Error("Unsupported color conversion: hsl -> " + format);
|
|
404
|
+
}
|
|
405
|
+
}
|
|
406
|
+
toHSB() {
|
|
407
|
+
let saturation = this.saturation / 100;
|
|
408
|
+
let lightness = this.lightness / 100;
|
|
409
|
+
let brightness = lightness + saturation * Math.min(lightness, 1 - lightness);
|
|
410
|
+
saturation = brightness === 0 ? 0 : 2 * (1 - lightness / brightness);
|
|
411
|
+
return new HSBColor(toFixedNumber(this.hue, 2), toFixedNumber(saturation * 100, 2), toFixedNumber(brightness * 100, 2), toFixedNumber(this.alpha, 2));
|
|
412
|
+
}
|
|
413
|
+
toRGB() {
|
|
414
|
+
let hue = this.hue;
|
|
415
|
+
let saturation = this.saturation / 100;
|
|
416
|
+
let lightness = this.lightness / 100;
|
|
417
|
+
let a = saturation * Math.min(lightness, 1 - lightness);
|
|
418
|
+
let fn = (n, k = (n + hue / 30) % 12) => lightness - a * Math.max(Math.min(k - 3, 9 - k, 1), -1);
|
|
419
|
+
return new RGBColor(Math.round(fn(0) * 255), Math.round(fn(8) * 255), Math.round(fn(4) * 255), toFixedNumber(this.alpha, 2));
|
|
420
|
+
}
|
|
421
|
+
clone() {
|
|
422
|
+
return new HSLColor(this.hue, this.saturation, this.lightness, this.alpha);
|
|
423
|
+
}
|
|
424
|
+
getChannelFormatOptions(channel) {
|
|
425
|
+
switch (channel) {
|
|
426
|
+
case "hue": return {
|
|
427
|
+
style: "unit",
|
|
428
|
+
unit: "degree",
|
|
429
|
+
unitDisplay: "narrow"
|
|
430
|
+
};
|
|
431
|
+
case "saturation":
|
|
432
|
+
case "lightness":
|
|
433
|
+
case "alpha": return { style: "percent" };
|
|
434
|
+
default: throw new Error("Unknown color channel: " + channel);
|
|
435
|
+
}
|
|
436
|
+
}
|
|
437
|
+
formatChannelValue(channel, locale) {
|
|
438
|
+
let options = this.getChannelFormatOptions(channel);
|
|
439
|
+
let value = this.getChannelValue(channel);
|
|
440
|
+
if (channel === "saturation" || channel === "lightness") value /= 100;
|
|
441
|
+
return new Intl.NumberFormat(locale, options).format(value);
|
|
442
|
+
}
|
|
443
|
+
getChannelRange(channel) {
|
|
444
|
+
switch (channel) {
|
|
445
|
+
case "hue": return {
|
|
446
|
+
minValue: 0,
|
|
447
|
+
maxValue: 360,
|
|
448
|
+
step: 1,
|
|
449
|
+
pageSize: 15
|
|
450
|
+
};
|
|
451
|
+
case "saturation":
|
|
452
|
+
case "lightness": return {
|
|
453
|
+
minValue: 0,
|
|
454
|
+
maxValue: 100,
|
|
455
|
+
step: 1,
|
|
456
|
+
pageSize: 10
|
|
457
|
+
};
|
|
458
|
+
case "alpha": return {
|
|
459
|
+
minValue: 0,
|
|
460
|
+
maxValue: 1,
|
|
461
|
+
step: .01,
|
|
462
|
+
pageSize: .1
|
|
463
|
+
};
|
|
464
|
+
default: throw new Error("Unknown color channel: " + channel);
|
|
465
|
+
}
|
|
466
|
+
}
|
|
467
|
+
toJSON() {
|
|
468
|
+
return {
|
|
469
|
+
h: this.hue,
|
|
470
|
+
s: this.saturation,
|
|
471
|
+
l: this.lightness,
|
|
472
|
+
a: this.alpha
|
|
473
|
+
};
|
|
474
|
+
}
|
|
475
|
+
getFormat() {
|
|
476
|
+
return "hsla";
|
|
477
|
+
}
|
|
478
|
+
static colorChannels = [
|
|
479
|
+
"hue",
|
|
480
|
+
"saturation",
|
|
481
|
+
"lightness"
|
|
482
|
+
];
|
|
483
|
+
getChannels() {
|
|
484
|
+
return HSLColor.colorChannels;
|
|
485
|
+
}
|
|
486
|
+
};
|
|
487
|
+
//#endregion
|
|
488
|
+
//#region src/common/color-utils/hsb-color.ts
|
|
489
|
+
const HSB_REGEX = /hsb\(([-+]?\d+(?:.\d+)?\s*,\s*[-+]?\d+(?:.\d+)?%\s*,\s*[-+]?\d+(?:.\d+)?%)\)|hsba\(([-+]?\d+(?:.\d+)?\s*,\s*[-+]?\d+(?:.\d+)?%\s*,\s*[-+]?\d+(?:.\d+)?%\s*,\s*[-+]?\d(.\d+)?)\)/;
|
|
490
|
+
var HSBColor = class HSBColor extends Color {
|
|
491
|
+
hue;
|
|
492
|
+
saturation;
|
|
493
|
+
brightness;
|
|
494
|
+
alpha;
|
|
495
|
+
constructor(hue, saturation, brightness, alpha) {
|
|
496
|
+
super();
|
|
497
|
+
this.hue = hue;
|
|
498
|
+
this.saturation = saturation;
|
|
499
|
+
this.brightness = brightness;
|
|
500
|
+
this.alpha = alpha;
|
|
501
|
+
}
|
|
502
|
+
static parse(value) {
|
|
503
|
+
let m;
|
|
504
|
+
if (m = value.match(HSB_REGEX)) {
|
|
505
|
+
const [h, s, b, a] = (m[1] ?? m[2]).split(",").map((n) => Number(n.trim().replace("%", "")));
|
|
506
|
+
return new HSBColor(mod(h, 360), clampValue(s, 0, 100), clampValue(b, 0, 100), clampValue(a ?? 1, 0, 1));
|
|
507
|
+
}
|
|
508
|
+
}
|
|
509
|
+
toString(format = "css") {
|
|
510
|
+
switch (format) {
|
|
511
|
+
case "css": return this.toHSL().toString("css");
|
|
512
|
+
case "hex": return this.toRGB().toString("hex");
|
|
513
|
+
case "hexa": return this.toRGB().toString("hexa");
|
|
514
|
+
case "hsb": return `hsb(${this.hue}, ${toFixedNumber(this.saturation, 2)}%, ${toFixedNumber(this.brightness, 2)}%)`;
|
|
515
|
+
case "hsba": return `hsba(${this.hue}, ${toFixedNumber(this.saturation, 2)}%, ${toFixedNumber(this.brightness, 2)}%, ${this.alpha})`;
|
|
516
|
+
case "hsl": return this.toHSL().toString("hsl");
|
|
517
|
+
case "rgb": return this.toRGB().toString("rgb");
|
|
518
|
+
default: return this.toFormat(format).toString(format);
|
|
519
|
+
}
|
|
520
|
+
}
|
|
521
|
+
toFormat(format) {
|
|
522
|
+
switch (format) {
|
|
523
|
+
case "hsba": return this;
|
|
524
|
+
case "hsla": return this.toHSL();
|
|
525
|
+
case "rgba": return this.toRGB();
|
|
526
|
+
default: throw new Error("Unsupported color conversion: hsb -> " + format);
|
|
527
|
+
}
|
|
528
|
+
}
|
|
529
|
+
toHSL() {
|
|
530
|
+
let saturation = this.saturation / 100;
|
|
531
|
+
let brightness = this.brightness / 100;
|
|
532
|
+
let lightness = brightness * (1 - saturation / 2);
|
|
533
|
+
saturation = lightness === 0 || lightness === 1 ? 0 : (brightness - lightness) / Math.min(lightness, 1 - lightness);
|
|
534
|
+
return new HSLColor(toFixedNumber(this.hue, 2), toFixedNumber(saturation * 100, 2), toFixedNumber(lightness * 100, 2), toFixedNumber(this.alpha, 2));
|
|
535
|
+
}
|
|
536
|
+
toRGB() {
|
|
537
|
+
let hue = this.hue;
|
|
538
|
+
let saturation = this.saturation / 100;
|
|
539
|
+
let brightness = this.brightness / 100;
|
|
540
|
+
let fn = (n, k = (n + hue / 60) % 6) => brightness - saturation * brightness * Math.max(Math.min(k, 4 - k, 1), 0);
|
|
541
|
+
return new RGBColor(Math.round(fn(5) * 255), Math.round(fn(3) * 255), Math.round(fn(1) * 255), toFixedNumber(this.alpha, 2));
|
|
542
|
+
}
|
|
543
|
+
clone() {
|
|
544
|
+
return new HSBColor(this.hue, this.saturation, this.brightness, this.alpha);
|
|
545
|
+
}
|
|
546
|
+
getChannelFormatOptions(channel) {
|
|
547
|
+
switch (channel) {
|
|
548
|
+
case "hue": return {
|
|
549
|
+
style: "unit",
|
|
550
|
+
unit: "degree",
|
|
551
|
+
unitDisplay: "narrow"
|
|
552
|
+
};
|
|
553
|
+
case "saturation":
|
|
554
|
+
case "brightness":
|
|
555
|
+
case "alpha": return { style: "percent" };
|
|
556
|
+
default: throw new Error("Unknown color channel: " + channel);
|
|
557
|
+
}
|
|
558
|
+
}
|
|
559
|
+
formatChannelValue(channel, locale) {
|
|
560
|
+
let options = this.getChannelFormatOptions(channel);
|
|
561
|
+
let value = this.getChannelValue(channel);
|
|
562
|
+
if (channel === "saturation" || channel === "brightness") value /= 100;
|
|
563
|
+
return new Intl.NumberFormat(locale, options).format(value);
|
|
564
|
+
}
|
|
565
|
+
getChannelRange(channel) {
|
|
566
|
+
switch (channel) {
|
|
567
|
+
case "hue": return {
|
|
568
|
+
minValue: 0,
|
|
569
|
+
maxValue: 360,
|
|
570
|
+
step: 1,
|
|
571
|
+
pageSize: 15
|
|
572
|
+
};
|
|
573
|
+
case "saturation":
|
|
574
|
+
case "brightness": return {
|
|
575
|
+
minValue: 0,
|
|
576
|
+
maxValue: 100,
|
|
577
|
+
step: 1,
|
|
578
|
+
pageSize: 10
|
|
579
|
+
};
|
|
580
|
+
case "alpha": return {
|
|
581
|
+
minValue: 0,
|
|
582
|
+
maxValue: 1,
|
|
583
|
+
step: .01,
|
|
584
|
+
pageSize: .1
|
|
585
|
+
};
|
|
586
|
+
default: throw new Error("Unknown color channel: " + channel);
|
|
587
|
+
}
|
|
588
|
+
}
|
|
589
|
+
toJSON() {
|
|
590
|
+
return {
|
|
591
|
+
h: this.hue,
|
|
592
|
+
s: this.saturation,
|
|
593
|
+
b: this.brightness,
|
|
594
|
+
a: this.alpha
|
|
595
|
+
};
|
|
596
|
+
}
|
|
597
|
+
getFormat() {
|
|
598
|
+
return "hsba";
|
|
599
|
+
}
|
|
600
|
+
static colorChannels = [
|
|
601
|
+
"hue",
|
|
602
|
+
"saturation",
|
|
603
|
+
"brightness"
|
|
604
|
+
];
|
|
605
|
+
getChannels() {
|
|
606
|
+
return HSBColor.colorChannels;
|
|
607
|
+
}
|
|
608
|
+
};
|
|
609
|
+
//#endregion
|
|
610
|
+
//#region src/common/color-utils/native-color.ts
|
|
611
|
+
const nativeColors = "aliceblue:f0f8ff,antiquewhite:faebd7,aqua:00ffff,aquamarine:7fffd4,azure:f0ffff,beige:f5f5dc,bisque:ffe4c4,black:000000,blanchedalmond:ffebcd,blue:0000ff,blueviolet:8a2be2,brown:a52a2a,burlywood:deb887,cadetblue:5f9ea0,chartreuse:7fff00,chocolate:d2691e,coral:ff7f50,cornflowerblue:6495ed,cornsilk:fff8dc,crimson:dc143c,cyan:00ffff,darkblue:00008b,darkcyan:008b8b,darkgoldenrod:b8860b,darkgray:a9a9a9,darkgreen:006400,darkkhaki:bdb76b,darkmagenta:8b008b,darkolivegreen:556b2f,darkorange:ff8c00,darkorchid:9932cc,darkred:8b0000,darksalmon:e9967a,darkseagreen:8fbc8f,darkslateblue:483d8b,darkslategray:2f4f4f,darkturquoise:00ced1,darkviolet:9400d3,deeppink:ff1493,deepskyblue:00bfff,dimgray:696969,dodgerblue:1e90ff,firebrick:b22222,floralwhite:fffaf0,forestgreen:228b22,fuchsia:ff00ff,gainsboro:dcdcdc,ghostwhite:f8f8ff,gold:ffd700,goldenrod:daa520,gray:808080,green:008000,greenyellow:adff2f,honeydew:f0fff0,hotpink:ff69b4,indianred:cd5c5c,indigo:4b0082,ivory:fffff0,khaki:f0e68c,lavender:e6e6fa,lavenderblush:fff0f5,lawngreen:7cfc00,lemonchiffon:fffacd,lightblue:add8e6,lightcoral:f08080,lightcyan:e0ffff,lightgoldenrodyellow:fafad2,lightgrey:d3d3d3,lightgreen:90ee90,lightpink:ffb6c1,lightsalmon:ffa07a,lightseagreen:20b2aa,lightskyblue:87cefa,lightslategray:778899,lightsteelblue:b0c4de,lightyellow:ffffe0,lime:00ff00,limegreen:32cd32,linen:faf0e6,magenta:ff00ff,maroon:800000,mediumaquamarine:66cdaa,mediumblue:0000cd,mediumorchid:ba55d3,mediumpurple:9370d8,mediumseagreen:3cb371,mediumslateblue:7b68ee,mediumspringgreen:00fa9a,mediumturquoise:48d1cc,mediumvioletred:c71585,midnightblue:191970,mintcream:f5fffa,mistyrose:ffe4e1,moccasin:ffe4b5,navajowhite:ffdead,navy:000080,oldlace:fdf5e6,olive:808000,olivedrab:6b8e23,orange:ffa500,orangered:ff4500,orchid:da70d6,palegoldenrod:eee8aa,palegreen:98fb98,paleturquoise:afeeee,palevioletred:d87093,papayawhip:ffefd5,peachpuff:ffdab9,peru:cd853f,pink:ffc0cb,plum:dda0dd,powderblue:b0e0e6,purple:800080,rebeccapurple:663399,red:ff0000,rosybrown:bc8f8f,royalblue:4169e1,saddlebrown:8b4513,salmon:fa8072,sandybrown:f4a460,seagreen:2e8b57,seashell:fff5ee,sienna:a0522d,silver:c0c0c0,skyblue:87ceeb,slateblue:6a5acd,slategray:708090,snow:fffafa,springgreen:00ff7f,steelblue:4682b4,tan:d2b48c,teal:008080,thistle:d8bfd8,tomato:ff6347,turquoise:40e0d0,violet:ee82ee,wheat:f5deb3,white:ffffff,whitesmoke:f5f5f5,yellow:ffff00,yellowgreen:9acd32";
|
|
612
|
+
const makeMap = (str) => {
|
|
613
|
+
const map = /* @__PURE__ */ new Map();
|
|
614
|
+
const list = str.split(",");
|
|
615
|
+
for (let i = 0; i < list.length; i++) {
|
|
616
|
+
const [key, val] = list[i].split(":");
|
|
617
|
+
map.set(key, `#${val}`);
|
|
618
|
+
if (key.includes("gray")) map.set(key.replace("gray", "grey"), `#${val}`);
|
|
619
|
+
}
|
|
620
|
+
return map;
|
|
621
|
+
};
|
|
622
|
+
const nativeColorMap = makeMap(nativeColors);
|
|
623
|
+
//#endregion
|
|
624
|
+
//#region src/common/color-utils/parse-color.ts
|
|
625
|
+
const parseColor = (value) => {
|
|
626
|
+
if (nativeColorMap.has(value)) return parseColor(nativeColorMap.get(value));
|
|
627
|
+
const result = RGBColor.parse(value) || HSBColor.parse(value) || HSLColor.parse(value);
|
|
628
|
+
if (!result) {
|
|
629
|
+
const error = /* @__PURE__ */ new Error("Invalid color value: " + value);
|
|
630
|
+
Error.captureStackTrace?.(error, parseColor);
|
|
631
|
+
throw error;
|
|
632
|
+
}
|
|
633
|
+
return result;
|
|
634
|
+
};
|
|
635
|
+
const normalizeColor = (v) => {
|
|
636
|
+
return typeof v === "string" ? parseColor(v) : v;
|
|
637
|
+
};
|
|
638
|
+
//#endregion
|
|
639
|
+
export { getColorAreaGradient as i, parseColor as n, Color as r, normalizeColor as t };
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
const require_color_utils = require("./color-utils-DzeOVYlL.cjs");
|
|
3
|
+
exports.Color = require_color_utils.Color;
|
|
4
|
+
exports.getColorAreaGradient = require_color_utils.getColorAreaGradient;
|
|
5
|
+
exports.normalizeColor = require_color_utils.normalizeColor;
|
|
6
|
+
exports.parseColor = require_color_utils.parseColor;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { a as ColorFormat, i as ColorChannelRange, n as ColorAxes, o as ColorStringFormat, r as ColorChannel, s as ColorType, t as Color } from "./color-CsugZjq6.cjs";
|
|
2
|
+
//#region src/common/color-utils/area-gradient.d.ts
|
|
3
|
+
interface GradientOptions {
|
|
4
|
+
xChannel: ColorChannel;
|
|
5
|
+
yChannel: ColorChannel;
|
|
6
|
+
dir?: "rtl" | "ltr" | undefined;
|
|
7
|
+
}
|
|
8
|
+
interface GradientStyles {
|
|
9
|
+
areaStyles: Record<string, string>;
|
|
10
|
+
areaGradientStyles: Record<string, string>;
|
|
11
|
+
}
|
|
12
|
+
declare function getColorAreaGradient(color: Color, options: GradientOptions): GradientStyles;
|
|
13
|
+
//#endregion
|
|
14
|
+
//#region src/common/color-utils/parse-color.d.ts
|
|
15
|
+
declare const parseColor: (value: string) => ColorType;
|
|
16
|
+
declare const normalizeColor: (v: string | ColorType) => ColorType;
|
|
17
|
+
//#endregion
|
|
18
|
+
export { Color, type ColorAxes, type ColorChannel, type ColorChannelRange, type ColorFormat, type ColorStringFormat, type ColorType, getColorAreaGradient, normalizeColor, parseColor };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { a as ColorFormat, i as ColorChannelRange, n as ColorAxes, o as ColorStringFormat, r as ColorChannel, s as ColorType, t as Color } from "./color-CsugZjq6.js";
|
|
2
|
+
//#region src/common/color-utils/area-gradient.d.ts
|
|
3
|
+
interface GradientOptions {
|
|
4
|
+
xChannel: ColorChannel;
|
|
5
|
+
yChannel: ColorChannel;
|
|
6
|
+
dir?: "rtl" | "ltr" | undefined;
|
|
7
|
+
}
|
|
8
|
+
interface GradientStyles {
|
|
9
|
+
areaStyles: Record<string, string>;
|
|
10
|
+
areaGradientStyles: Record<string, string>;
|
|
11
|
+
}
|
|
12
|
+
declare function getColorAreaGradient(color: Color, options: GradientOptions): GradientStyles;
|
|
13
|
+
//#endregion
|
|
14
|
+
//#region src/common/color-utils/parse-color.d.ts
|
|
15
|
+
declare const parseColor: (value: string) => ColorType;
|
|
16
|
+
declare const normalizeColor: (v: string | ColorType) => ColorType;
|
|
17
|
+
//#endregion
|
|
18
|
+
export { Color, type ColorAxes, type ColorChannel, type ColorChannelRange, type ColorFormat, type ColorStringFormat, type ColorType, getColorAreaGradient, normalizeColor, parseColor };
|