@synnaxlabs/pluto 0.41.0 → 0.42.3
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/{Center-Dr9Np3yZ.js → Center-D0JeI7Ta.js} +2 -2
- package/dist/{Center-sJghNsrv.cjs → Center-DuI3XH-Q.cjs} +1 -1
- package/dist/{ContextMenu-GUed89mt.js → ContextMenu-BiNr7Gxv.js} +19 -20
- package/dist/ContextMenu-HpMLd1Ht.cjs +1 -0
- package/dist/DateTime-BsjSfOY-.cjs +1 -0
- package/dist/{DateTime-DEbT6v4l.js → DateTime-r6hocEmI.js} +2 -2
- package/dist/{Divider-Bpe7zJig.js → Divider-DqEkzRIY.js} +103 -97
- package/dist/{Divider-CloQr3vQ.cjs → Divider-Dut8qPee.cjs} +4 -4
- package/dist/Dropdown-BSSe1E1e.cjs +1 -0
- package/dist/{Dropdown-4Cti-bbQ.js → Dropdown-BrFL1eSc.js} +111 -112
- package/dist/Haul-C6i2oI7z.cjs +1 -0
- package/dist/{Haul-Bw54Yj6J.js → Haul-CEFSvdy9.js} +37 -38
- package/dist/{Item-9WCCzBv2.js → Item-C5SQraZM.js} +10 -11
- package/dist/Item-DSBs9VLu.cjs +1 -0
- package/dist/{Keyboard-CZFi6COK.cjs → Keyboard-Ca7TAAHK.cjs} +1 -1
- package/dist/{Keyboard-634856lT.js → Keyboard-Duo41pJL.js} +2 -2
- package/dist/{Link-fkoogssj.cjs → Link-B9ZGvoBU.cjs} +1 -1
- package/dist/{Link-BEheZd26.js → Link-C9GeoB0w.js} +1 -1
- package/dist/{Pack-DhZO_rza.js → Pack-BozAEHBp.js} +2 -2
- package/dist/{Pack-D6Z6WuZl.cjs → Pack-DeZUUdJM.cjs} +1 -1
- package/dist/{Provider-UAXPVomG.js → Provider-B86QO9NT.js} +301 -292
- package/dist/Provider-Cw0mSr2D.cjs +1 -0
- package/dist/{Space-DunsWl06.js → Space-CyTH97CN.js} +1 -1
- package/dist/{Space-BtaH1buB.cjs → Space-DvalhzRj.cjs} +1 -1
- package/dist/Text-8ps3Uw4T.js +35 -0
- package/dist/{Text-3PiRcn8q.js → Text-BR4FW9Hy.js} +75 -77
- package/dist/Text-C8GBHl-F.cjs +1 -0
- package/dist/Text-CMTkSEWx.cjs +4 -0
- package/dist/Text-DkA06TeT.cjs +1 -0
- package/dist/Text-sH_NOelc.js +137 -0
- package/dist/{Toggle-CZd8L4GI.js → Toggle-BRuUrO2N.js} +99 -101
- package/dist/Toggle-C0lZDyeo.cjs +1 -0
- package/dist/{Video-4XQ1qozd.js → Video-DWStbcmD.js} +1 -1
- package/dist/{Video-BM9uJLaQ.cjs → Video-DgjuFLiE.cjs} +1 -1
- package/dist/WithIcon-BgS5shNZ.cjs +1 -0
- package/dist/WithIcon-BhR6nwRh.js +98 -0
- package/dist/align.cjs +1 -1
- package/dist/align.js +1 -1
- package/dist/button.cjs +1 -1
- package/dist/button.js +1 -1
- package/dist/color.cjs +1 -1
- package/dist/color.js +1 -1
- package/dist/css-9iEiTRNL.cjs +15 -0
- package/dist/css-Cnb9DQMD.js +4747 -0
- package/dist/css.cjs +1 -1
- package/dist/css.js +2 -2
- package/dist/deep-BNa3STCp.cjs +1 -0
- package/dist/deep-P35D0Sz7.js +112 -0
- package/dist/dimensions-B6qmnzv3.js +19 -0
- package/dist/dimensions-By-vgVks.cjs +1 -0
- package/dist/dropdown.cjs +1 -1
- package/dist/dropdown.js +1 -1
- package/dist/eraser-BkqFgBRY.cjs +11 -0
- package/dist/eraser-CK8SwEJa.js +1148 -0
- package/dist/ether.cjs +1 -1
- package/dist/ether.js +67 -75
- package/dist/external-B1YsdhS4.js +432 -0
- package/dist/{external-BY2AjzRx.js → external-B7NxSklQ.js} +20 -19
- package/dist/external-B8uaUKhb.cjs +1 -0
- package/dist/external-BA_VOnV-.js +400 -0
- package/dist/{external-DNF8yEwq.js → external-BDkqwq72.js} +27 -28
- package/dist/external-BGBgNbe2.cjs +1 -0
- package/dist/{external-CVGidiDt.js → external-BOMdfX8_.js} +2 -2
- package/dist/{external-BIwhkj24.js → external-Bl8q9UBF.js} +1996 -2011
- package/dist/{external-BFOrrNde.js → external-BnK4UIFe.js} +3 -3
- package/dist/{external-CnxSp7fm.cjs → external-BwUa_5Vs.cjs} +1 -1
- package/dist/{external-BlUic3Vz.js → external-C0X4mXVG.js} +7 -8
- package/dist/{external-CH66YjTZ.js → external-C7yPkamb.js} +12 -13
- package/dist/external-CTc1n-JC.cjs +1 -0
- package/dist/{external-B-Cao-ae.cjs → external-CUgPP-JD.cjs} +1 -1
- package/dist/external-CzTBFiv_.cjs +1 -0
- package/dist/external-DGJ8YAe-.cjs +1 -0
- package/dist/{external-kZf9CjYn.cjs → external-DQwznOyH.cjs} +37 -37
- package/dist/external-DiLZ1dEk.cjs +1 -0
- package/dist/{external-BCUxzSzk.js → external-DissGp_3.js} +9 -10
- package/dist/{external-DVajt6X6.cjs → external-DmryCcwg.cjs} +1 -1
- package/dist/external-Dq8-cbf3.cjs +1 -0
- package/dist/{external-BbrPEGJw.js → external-_8qdWaAg.js} +2 -2
- package/dist/{external-C0ZRdtdj.js → external-bSUra-q7.js} +28 -28
- package/dist/external-zbKPQ9ls.cjs +46 -0
- package/dist/{font-BXKdXsr5.js → font-CjYcjBiv.js} +2 -2
- package/dist/{font-DCE90lco.cjs → font-XlUAG1-r.cjs} +1 -1
- package/dist/{fontString-C7Q9Laqk.js → fontString-BN1kd1AP.js} +1 -1
- package/dist/{fontString-BBvH9Ypy.cjs → fontString-Ddza50DF.cjs} +1 -1
- package/dist/header.cjs +1 -1
- package/dist/header.js +1 -1
- package/dist/hooks-B5aLaWzS.cjs +1 -0
- package/dist/hooks-DjznxGgm.js +296 -0
- package/dist/index.cjs +7 -7
- package/dist/index.js +8669 -8584
- package/dist/input.cjs +1 -1
- package/dist/input.js +1 -1
- package/dist/list.cjs +1 -1
- package/dist/list.js +1 -1
- package/dist/menu.cjs +1 -1
- package/dist/menu.js +1 -1
- package/dist/pluto.css +1 -1
- package/dist/provider-aWtsGnV8.cjs +58 -0
- package/dist/provider-r5Ly36FI.js +12854 -0
- package/dist/src/aether/aether/aether.d.ts +17 -18
- package/dist/src/aether/aether/aether.d.ts.map +1 -1
- package/dist/src/aether/aether/aether.spec.spec.d.ts +1 -5
- package/dist/src/aether/aether/aether.spec.spec.d.ts.map +1 -1
- package/dist/src/aether/main.d.ts.map +1 -1
- package/dist/src/aether/main.spec.d.ts +1 -5
- package/dist/src/aether/main.spec.d.ts.map +1 -1
- package/dist/src/aether/message.d.ts +11 -1
- package/dist/src/aether/message.d.ts.map +1 -1
- package/dist/src/alamos/aether/alamos.d.ts +19 -25
- package/dist/src/alamos/aether/alamos.d.ts.map +1 -1
- package/dist/src/button/Button.d.ts +2 -2
- package/dist/src/button/Button.d.ts.map +1 -1
- package/dist/src/button/color.d.ts +2 -2
- package/dist/src/button/color.d.ts.map +1 -1
- package/dist/src/channel/LinePlot.d.ts +4 -4
- package/dist/src/channel/LinePlot.d.ts.map +1 -1
- package/dist/src/color/BaseSwatch.d.ts +3 -3
- package/dist/src/color/BaseSwatch.d.ts.map +1 -1
- package/dist/src/color/GradientPicker.d.ts +1 -2
- package/dist/src/color/GradientPicker.d.ts.map +1 -1
- package/dist/src/color/Picker.d.ts +1 -1
- package/dist/src/color/Picker.d.ts.map +1 -1
- package/dist/src/color/Provider.d.ts +10 -98
- package/dist/src/color/Provider.d.ts.map +1 -1
- package/dist/src/color/external.d.ts +0 -4
- package/dist/src/color/external.d.ts.map +1 -1
- package/dist/src/css/color.d.ts +2 -2
- package/dist/src/css/color.d.ts.map +1 -1
- package/dist/src/divider/Divider.d.ts +2 -1
- package/dist/src/divider/Divider.d.ts.map +1 -1
- package/dist/src/ether.d.ts +0 -1
- package/dist/src/ether.d.ts.map +1 -1
- package/dist/src/form/Form.d.ts +1 -1
- package/dist/src/form/Form.d.ts.map +1 -1
- package/dist/src/haul/Haul.d.ts +7 -63
- package/dist/src/haul/Haul.d.ts.map +1 -1
- package/dist/src/hooks/useResize.d.ts.map +1 -1
- package/dist/src/index.d.ts +1 -0
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/input/Text.d.ts +4 -4
- package/dist/src/input/Text.d.ts.map +1 -1
- package/dist/src/mosaic/types.d.ts +6 -66
- package/dist/src/mosaic/types.d.ts.map +1 -1
- package/dist/src/pluto/Pluto.d.ts.map +1 -1
- package/dist/src/pluto/aether/pluto.d.ts.map +1 -1
- package/dist/src/select/Multiple.d.ts +2 -3
- package/dist/src/select/Multiple.d.ts.map +1 -1
- package/dist/src/state/state.d.ts +1 -2
- package/dist/src/state/state.d.ts.map +1 -1
- package/dist/src/status/Circle.d.ts.map +1 -1
- package/dist/src/status/aether/aggregator.d.ts +34 -96
- package/dist/src/status/aether/aggregator.d.ts.map +1 -1
- package/dist/src/status/aether/types.d.ts +23 -27
- package/dist/src/status/aether/types.d.ts.map +1 -1
- package/dist/src/synnax/Provider.d.ts +4 -0
- package/dist/src/synnax/Provider.d.ts.map +1 -1
- package/dist/src/synnax/aether/provider.d.ts +54 -388
- package/dist/src/synnax/aether/provider.d.ts.map +1 -1
- package/dist/src/table/aether/Table.d.ts +58 -418
- package/dist/src/table/aether/Table.d.ts.map +1 -1
- package/dist/src/table/cells/Cells.d.ts +41 -152
- package/dist/src/table/cells/Cells.d.ts.map +1 -1
- package/dist/src/table/cells/Forms.d.ts.map +1 -1
- package/dist/src/table/cells/registry.d.ts +6 -3
- package/dist/src/table/cells/registry.d.ts.map +1 -1
- package/dist/src/tabs/Selector.d.ts.map +1 -1
- package/dist/src/tabs/types.d.ts +5 -38
- package/dist/src/tabs/types.d.ts.map +1 -1
- package/dist/src/tag/Tag.d.ts +3 -4
- package/dist/src/tag/Tag.d.ts.map +1 -1
- package/dist/src/telem/aether/context.d.ts +8 -8
- package/dist/src/telem/aether/context.d.ts.map +1 -1
- package/dist/src/telem/aether/factory.d.ts +6 -2
- package/dist/src/telem/aether/factory.d.ts.map +1 -1
- package/dist/src/telem/aether/noop.d.ts.map +1 -1
- package/dist/src/telem/aether/pipeline.d.ts +25 -215
- package/dist/src/telem/aether/pipeline.d.ts.map +1 -1
- package/dist/src/telem/aether/provider.d.ts +7 -5
- package/dist/src/telem/aether/provider.d.ts.map +1 -1
- package/dist/src/telem/aether/remote.d.ts +62 -183
- package/dist/src/telem/aether/remote.d.ts.map +1 -1
- package/dist/src/telem/aether/static.d.ts +23 -72
- package/dist/src/telem/aether/static.d.ts.map +1 -1
- package/dist/src/telem/aether/telem.d.ts +60 -284
- package/dist/src/telem/aether/telem.d.ts.map +1 -1
- package/dist/src/telem/aether/transformers.d.ts +82 -318
- package/dist/src/telem/aether/transformers.d.ts.map +1 -1
- package/dist/src/telem/client/cache/cache.d.ts +1 -1
- package/dist/src/telem/client/cache/cache.d.ts.map +1 -1
- package/dist/src/telem/client/cache/dynamic.d.ts +5 -5
- package/dist/src/telem/client/cache/dynamic.d.ts.map +1 -1
- package/dist/src/telem/client/cache/static.d.ts +3 -3
- package/dist/src/telem/client/cache/static.d.ts.map +1 -1
- package/dist/src/telem/client/cache/unary.d.ts +3 -3
- package/dist/src/telem/client/cache/unary.d.ts.map +1 -1
- package/dist/src/telem/client/client.d.ts +8 -12
- package/dist/src/telem/client/client.d.ts.map +1 -1
- package/dist/src/telem/client/external.d.ts +0 -1
- package/dist/src/telem/client/external.d.ts.map +1 -1
- package/dist/src/telem/client/reader.d.ts +28 -10
- package/dist/src/telem/client/reader.d.ts.map +1 -1
- package/dist/src/telem/client/reader.spec.d.ts +6 -1
- package/dist/src/telem/client/reader.spec.d.ts.map +1 -1
- package/dist/src/telem/client/streamer.d.ts +6 -6
- package/dist/src/telem/client/streamer.d.ts.map +1 -1
- package/dist/src/telem/client/streamer.spec.d.ts +2 -0
- package/dist/src/telem/client/streamer.spec.d.ts.map +1 -0
- package/dist/src/telem/control/Indicator.d.ts.map +1 -1
- package/dist/src/telem/control/aether/chip.d.ts +44 -232
- package/dist/src/telem/control/aether/chip.d.ts.map +1 -1
- package/dist/src/telem/control/aether/controller.d.ts +36 -73
- package/dist/src/telem/control/aether/controller.d.ts.map +1 -1
- package/dist/src/telem/control/aether/indicator.d.ts +53 -253
- package/dist/src/telem/control/aether/indicator.d.ts.map +1 -1
- package/dist/src/telem/control/aether/legend.d.ts +22 -128
- package/dist/src/telem/control/aether/legend.d.ts.map +1 -1
- package/dist/src/telem/control/aether/state.d.ts +12 -42
- package/dist/src/telem/control/aether/state.d.ts.map +1 -1
- package/dist/src/text/Text.d.ts +5 -4
- package/dist/src/text/Text.d.ts.map +1 -1
- package/dist/src/text/core/types.d.ts +17 -14
- package/dist/src/text/core/types.d.ts.map +1 -1
- package/dist/src/text/dimensions.d.ts +1 -0
- package/dist/src/text/dimensions.d.ts.map +1 -1
- package/dist/src/theming/aether/provider.d.ts +1156 -5764
- package/dist/src/theming/aether/provider.d.ts.map +1 -1
- package/dist/src/theming/core/theme.d.ts +558 -1740
- package/dist/src/theming/core/theme.d.ts.map +1 -1
- package/dist/src/theming/css.d.ts.map +1 -1
- package/dist/src/tree/Tree.d.ts +1 -1
- package/dist/src/tree/Tree.d.ts.map +1 -1
- package/dist/src/tree/core.d.ts.map +1 -1
- package/dist/src/triggers/Provider.d.ts.map +1 -1
- package/dist/src/triggers/triggers.d.ts +248 -9
- package/dist/src/triggers/triggers.d.ts.map +1 -1
- package/dist/src/util/component.d.ts +7 -1
- package/dist/src/util/component.d.ts.map +1 -1
- package/dist/src/viewport/use.d.ts +8 -1
- package/dist/src/viewport/use.d.ts.map +1 -1
- package/dist/src/vis/axis/axis.d.ts +21 -44
- package/dist/src/vis/axis/axis.d.ts.map +1 -1
- package/dist/src/vis/axis/canvas.d.ts +17 -20
- package/dist/src/vis/axis/canvas.d.ts.map +1 -1
- package/dist/src/vis/axis/preciseTimeScale.d.ts +1 -2
- package/dist/src/vis/axis/preciseTimeScale.d.ts.map +1 -1
- package/dist/src/vis/axis/ticks.d.ts +11 -11
- package/dist/src/vis/axis/ticks.d.ts.map +1 -1
- package/dist/src/vis/button/aether/button.d.ts +10 -80
- package/dist/src/vis/button/aether/button.d.ts.map +1 -1
- package/dist/src/vis/canvas/Canvas.d.ts +2 -2
- package/dist/src/vis/canvas/Canvas.d.ts.map +1 -1
- package/dist/src/vis/canvas/aether/canvas.d.ts +45 -193
- package/dist/src/vis/canvas/aether/canvas.d.ts.map +1 -1
- package/dist/src/vis/diagram/Diagram.d.ts.map +1 -1
- package/dist/src/vis/diagram/aether/Diagram.d.ts +62 -469
- package/dist/src/vis/diagram/aether/Diagram.d.ts.map +1 -1
- package/dist/src/vis/diagram/aether/types.d.ts +32 -246
- package/dist/src/vis/diagram/aether/types.d.ts.map +1 -1
- package/dist/src/vis/diagram/edge/Edge.d.ts +2 -3
- package/dist/src/vis/diagram/edge/Edge.d.ts.map +1 -1
- package/dist/src/vis/diagram/edge/connector/connector.d.ts +5 -8
- package/dist/src/vis/diagram/edge/connector/connector.d.ts.map +1 -1
- package/dist/src/vis/diagram/edge/paths.d.ts +3 -4
- package/dist/src/vis/diagram/edge/paths.d.ts.map +1 -1
- package/dist/src/vis/draw2d/canvas.d.ts +21 -3
- package/dist/src/vis/draw2d/canvas.d.ts.map +1 -1
- package/dist/src/vis/draw2d/index.d.ts +3 -4
- package/dist/src/vis/draw2d/index.d.ts.map +1 -1
- package/dist/src/vis/eraser/aether/eraser.d.ts +30 -170
- package/dist/src/vis/eraser/aether/eraser.d.ts.map +1 -1
- package/dist/src/vis/grid/grid.d.ts +14 -24
- package/dist/src/vis/grid/grid.d.ts.map +1 -1
- package/dist/src/vis/legend/Container.d.ts +42 -86
- package/dist/src/vis/legend/Container.d.ts.map +1 -1
- package/dist/src/vis/legend/Simple.d.ts +3 -4
- package/dist/src/vis/legend/Simple.d.ts.map +1 -1
- package/dist/src/vis/light/aether/light.d.ts +10 -80
- package/dist/src/vis/light/aether/light.d.ts.map +1 -1
- package/dist/src/vis/line/aether/line.d.ts +20 -99
- package/dist/src/vis/line/aether/line.d.ts.map +1 -1
- package/dist/src/vis/lineplot/Axis.d.ts.map +1 -1
- package/dist/src/vis/lineplot/LinePlot.d.ts +2 -3
- package/dist/src/vis/lineplot/LinePlot.d.ts.map +1 -1
- package/dist/src/vis/lineplot/aether/BoundQuerier.d.ts +35 -0
- package/dist/src/vis/lineplot/aether/BoundQuerier.d.ts.map +1 -0
- package/dist/src/vis/lineplot/aether/LinePlot.d.ts +82 -489
- package/dist/src/vis/lineplot/aether/LinePlot.d.ts.map +1 -1
- package/dist/src/vis/lineplot/aether/XAxis.d.ts +63 -187
- package/dist/src/vis/lineplot/aether/XAxis.d.ts.map +1 -1
- package/dist/src/vis/lineplot/aether/YAxis.d.ts +61 -190
- package/dist/src/vis/lineplot/aether/YAxis.d.ts.map +1 -1
- package/dist/src/vis/lineplot/aether/axis.d.ts +33 -96
- package/dist/src/vis/lineplot/aether/axis.d.ts.map +1 -1
- package/dist/src/vis/lineplot/aether/external.d.ts +1 -0
- package/dist/src/vis/lineplot/aether/external.d.ts.map +1 -1
- package/dist/src/vis/lineplot/external.d.ts +1 -0
- package/dist/src/vis/lineplot/external.d.ts.map +1 -1
- package/dist/src/vis/lineplot/range/Provider.d.ts.map +1 -1
- package/dist/src/vis/lineplot/range/aether/annotation.d.ts +15 -52
- package/dist/src/vis/lineplot/range/aether/annotation.d.ts.map +1 -1
- package/dist/src/vis/lineplot/range/aether/provider.d.ts +43 -294
- package/dist/src/vis/lineplot/range/aether/provider.d.ts.map +1 -1
- package/dist/src/vis/lineplot/tooltip/aether/tooltip.d.ts +33 -138
- package/dist/src/vis/lineplot/tooltip/aether/tooltip.d.ts.map +1 -1
- package/dist/src/vis/lineplot/useBoundQuerier.d.ts +11 -0
- package/dist/src/vis/lineplot/useBoundQuerier.d.ts.map +1 -0
- package/dist/src/vis/log/aether/Log.d.ts +88 -455
- package/dist/src/vis/log/aether/Log.d.ts.map +1 -1
- package/dist/src/vis/measure/aether/measure.d.ts +40 -233
- package/dist/src/vis/measure/aether/measure.d.ts.map +1 -1
- package/dist/src/vis/performance/Performance.d.ts +2 -0
- package/dist/src/vis/performance/Performance.d.ts.map +1 -0
- package/dist/src/vis/performance/aether/index.d.ts +2 -0
- package/dist/src/vis/performance/aether/index.d.ts.map +1 -0
- package/dist/src/vis/performance/aether/performance.d.ts +15 -0
- package/dist/src/vis/performance/aether/performance.d.ts.map +1 -0
- package/dist/src/vis/performance/index.d.ts +2 -0
- package/dist/src/vis/performance/index.d.ts.map +1 -0
- package/dist/src/vis/render/GLProgram.d.ts +1 -2
- package/dist/src/vis/render/GLProgram.d.ts.map +1 -1
- package/dist/src/vis/render/context.d.ts +1 -0
- package/dist/src/vis/render/context.d.ts.map +1 -1
- package/dist/src/vis/render/controller.d.ts +7 -12
- package/dist/src/vis/render/controller.d.ts.map +1 -1
- package/dist/src/vis/render/loop.d.ts +15 -5
- package/dist/src/vis/render/loop.d.ts.map +1 -1
- package/dist/src/vis/rule/Rule.d.ts +1 -1
- package/dist/src/vis/rule/Rule.d.ts.map +1 -1
- package/dist/src/vis/rule/aether/aether.d.ts +12 -53
- package/dist/src/vis/rule/aether/aether.d.ts.map +1 -1
- package/dist/src/vis/schematic/Forms.d.ts.map +1 -1
- package/dist/src/vis/schematic/Symbols.d.ts +3 -4
- package/dist/src/vis/schematic/Symbols.d.ts.map +1 -1
- package/dist/src/vis/schematic/primitives/Primitives.d.ts +34 -35
- package/dist/src/vis/schematic/primitives/Primitives.d.ts.map +1 -1
- package/dist/src/vis/schematic/registry.d.ts +96 -1
- package/dist/src/vis/schematic/registry.d.ts.map +1 -1
- package/dist/src/vis/setpoint/aether/setpoint.d.ts +16 -155
- package/dist/src/vis/setpoint/aether/setpoint.d.ts.map +1 -1
- package/dist/src/vis/text/atlas.d.ts +32 -0
- package/dist/src/vis/text/atlas.d.ts.map +1 -0
- package/dist/src/vis/text/index.d.ts +2 -0
- package/dist/src/vis/text/index.d.ts.map +1 -0
- package/dist/src/vis/toggle/aether/toggle.d.ts +16 -150
- package/dist/src/vis/toggle/aether/toggle.d.ts.map +1 -1
- package/dist/src/vis/value/aether/value.d.ts +150 -563
- package/dist/src/vis/value/aether/value.d.ts.map +1 -1
- package/dist/src/vis/value/use.d.ts +59 -199
- package/dist/src/vis/value/use.d.ts.map +1 -1
- package/dist/{state-Bd_8X2jl.cjs → state-_FFrG5nH.cjs} +1 -1
- package/dist/tabs.cjs +1 -1
- package/dist/tabs.js +1 -1
- package/dist/text.cjs +1 -1
- package/dist/text.js +2 -2
- package/dist/theming.cjs +1 -1
- package/dist/theming.js +2 -2
- package/dist/{toArray-Dvn9FA_3.js → toArray-B7nD2CTw.js} +1 -1
- package/dist/{toArray-DRKOku1s.cjs → toArray-BvVYuN_b.cjs} +1 -1
- package/dist/tree.cjs +1 -1
- package/dist/tree.js +1 -1
- package/dist/triggers.cjs +1 -1
- package/dist/triggers.js +1 -1
- package/dist/units-CX_coN92.cjs +1 -0
- package/dist/units-Ct3Xl5nK.js +11 -0
- package/dist/useClickOutside-CSff8yb-.cjs +1 -0
- package/dist/useClickOutside-DDCP7Fh-.js +106 -0
- package/dist/{useDebouncedCallback-Dg4BDGP-.js → useDebouncedCallback-BG4I7mbT.js} +1 -1
- package/dist/useDebouncedCallback-DnwYZzjR.cjs +1 -0
- package/dist/{useMemoCompare-BEDaTIXL.js → useMemoCompare-BViQehyd.js} +2 -2
- package/dist/useMemoCompare-C2X7Mzx8.cjs +1 -0
- package/dist/useVirtualCursorDragWebKit-DDmXE4RW.cjs +1 -0
- package/dist/{useVirtualCursorDragWebKit-BixysrXI.js → useVirtualCursorDragWebKit-DTU2tUmp.js} +22 -23
- package/dist/value-B6OlPXe1.js +5974 -0
- package/dist/value-Bq1w9UY8.cjs +57 -0
- package/dist/video.cjs +1 -1
- package/dist/video.js +1 -1
- package/package.json +9 -8
- package/dist/ContextMenu-DCxj35_j.cjs +0 -1
- package/dist/DateTime-D6J8sRSH.cjs +0 -1
- package/dist/Dropdown-C7Im-qW-.cjs +0 -1
- package/dist/Haul-hv7TLQ7N.cjs +0 -1
- package/dist/Item-piF6rFAm.cjs +0 -1
- package/dist/Provider-DNTq46b0.cjs +0 -1
- package/dist/Text-BTEov6di.cjs +0 -1
- package/dist/Text-CaRMYy3U.js +0 -135
- package/dist/Text-DNspRcte.js +0 -36
- package/dist/Text-DylGoRKw.cjs +0 -4
- package/dist/Text-X_BHez8W.cjs +0 -1
- package/dist/Toggle-BKKBcuTj.cjs +0 -1
- package/dist/WithIcon-CC-RSx6r.js +0 -93
- package/dist/WithIcon-Dn8eAoMj.cjs +0 -1
- package/dist/aggregator-74jWxDne.cjs +0 -1
- package/dist/aggregator-DMvP8cai.js +0 -83
- package/dist/css-Cj2UCGXB.cjs +0 -1
- package/dist/css-Dyt-QnKy.js +0 -1199
- package/dist/deep-Cvb4bVYY.js +0 -105
- package/dist/deep-ICSlPm58.cjs +0 -1
- package/dist/dimensions-Cc0z-IDd.js +0 -18
- package/dist/dimensions-Djqdrqi0.cjs +0 -1
- package/dist/eraser-9-LOWZvk.cjs +0 -11
- package/dist/eraser-BjtEI-1I.js +0 -823
- package/dist/external-B-UNCzPY.cjs +0 -1
- package/dist/external-B18FBGpk.cjs +0 -1
- package/dist/external-BG1mV1W8.cjs +0 -1
- package/dist/external-BWeX0nyq.js +0 -399
- package/dist/external-BbmpRAH3.cjs +0 -1
- package/dist/external-D2vS6j9c.cjs +0 -46
- package/dist/external-DHmQqAfL.js +0 -435
- package/dist/external-DRGfSFQT.cjs +0 -1
- package/dist/external-DX4m-5qT.cjs +0 -1
- package/dist/external-DlywBW-S.cjs +0 -1
- package/dist/hooks-BQJQyGWV.js +0 -293
- package/dist/hooks-ClXSlga9.cjs +0 -1
- package/dist/index-CSKP1UPN.js +0 -2343
- package/dist/index-Ch3utIMa.cjs +0 -15
- package/dist/provider-CH0eoGfz.js +0 -10358
- package/dist/provider-D054LCpB.cjs +0 -53
- package/dist/src/color/core/color.d.ts +0 -143
- package/dist/src/color/core/color.d.ts.map +0 -1
- package/dist/src/color/core/color.spec.d.ts +0 -2
- package/dist/src/color/core/color.spec.d.ts.map +0 -1
- package/dist/src/color/core/external.d.ts +0 -5
- package/dist/src/color/core/external.d.ts.map +0 -1
- package/dist/src/color/core/gradient.d.ts +0 -58
- package/dist/src/color/core/gradient.d.ts.map +0 -1
- package/dist/src/color/core/index.d.ts +0 -2
- package/dist/src/color/core/index.d.ts.map +0 -1
- package/dist/src/color/core/palette.d.ts +0 -74
- package/dist/src/color/core/palette.d.ts.map +0 -1
- package/dist/src/color/core/transformColorsToHex.d.ts +0 -6
- package/dist/src/color/core/transformColorsToHex.d.ts.map +0 -1
- package/dist/src/telem/client/types.d.ts +0 -20
- package/dist/src/telem/client/types.d.ts.map +0 -1
- package/dist/transformColorsToHex-DE7uEs1w.cjs +0 -1
- package/dist/transformColorsToHex-UBrryWh5.js +0 -14
- package/dist/units-DjoHPrqM.cjs +0 -1
- package/dist/units-MBd0L3ff.js +0 -8
- package/dist/useClickOutside-4k9PAT_i.cjs +0 -1
- package/dist/useClickOutside-BYjsXGgb.js +0 -107
- package/dist/useDebouncedCallback-BBsAgC9k.cjs +0 -1
- package/dist/useMemoCompare-DORTZbzY.cjs +0 -1
- package/dist/useVirtualCursorDragWebKit-BSafZVD_.cjs +0 -1
- package/dist/value-CudL8z5e.js +0 -5957
- package/dist/value-DT0qJqgQ.cjs +0 -57
package/dist/css-Dyt-QnKy.js
DELETED
|
@@ -1,1199 +0,0 @@
|
|
|
1
|
-
var bt = Object.defineProperty;
|
|
2
|
-
var xt = (t, e, r) => e in t ? bt(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r;
|
|
3
|
-
var A = (t, e, r) => xt(t, typeof e != "symbol" ? e + "" : e, r);
|
|
4
|
-
import { z as i } from "zod";
|
|
5
|
-
const Q = i.tuple([i.number(), i.number()]);
|
|
6
|
-
i.tuple([i.bigint(), i.bigint()]);
|
|
7
|
-
const we = i.object({ width: i.number(), height: i.number() }), mt = i.object({
|
|
8
|
-
signedWidth: i.number(),
|
|
9
|
-
signedHeight: i.number()
|
|
10
|
-
}), wt = ["width", "height"];
|
|
11
|
-
i.enum(wt);
|
|
12
|
-
const $t = ["start", "center", "end"], vt = ["signedWidth", "signedHeight"];
|
|
13
|
-
i.enum(vt);
|
|
14
|
-
const H = i.object({ x: i.number(), y: i.number() }), Ve = i.object({ clientX: i.number(), clientY: i.number() }), $e = ["x", "y"], ve = i.enum($e), qe = ["top", "right", "bottom", "left"], Ot = i.enum(qe), ee = ["left", "right"], Oe = i.enum(ee), te = ["top", "bottom"], Me = i.enum(te), je = ["center"], ce = i.enum(je), Mt = [...qe, ...je], Ee = i.enum(Mt);
|
|
15
|
-
i.enum($t);
|
|
16
|
-
const jt = ["first", "last"];
|
|
17
|
-
i.enum(jt);
|
|
18
|
-
const Ge = i.object({ lower: i.number(), upper: i.number() }), Et = i.object({ lower: i.bigint(), upper: i.bigint() });
|
|
19
|
-
i.union([Ge, Q]);
|
|
20
|
-
i.union([Et, Q]);
|
|
21
|
-
const It = i.enum([...ve.options, ...Ee.options]), Tt = i.union([ve, Ee, i.instanceof(String)]), I = (t) => typeof t == "bigint" || t instanceof BigInt, q = (t, e) => I(t) ? t.valueOf() - BigInt(e.valueOf().valueOf()) : t.valueOf() - Number(e.valueOf()), St = (t, e) => I(t) ? t.valueOf() + BigInt(e.valueOf().valueOf()) : t + Number(e.valueOf()), Dn = (t, e, r = 1e-4) => Math.abs(t - e) < r, Ye = (t, e) => I(t) ? t === BigInt(e.valueOf().valueOf()) : t === Number(e.valueOf()), Vn = (t) => {
|
|
22
|
-
const e = 10 ** Math.floor(Math.log10(t));
|
|
23
|
-
return Math.round(t / e) * e;
|
|
24
|
-
}, Bt = (t, e) => I(t) ? t.valueOf() < BigInt(e.valueOf()) ? t : BigInt(e.valueOf()) : t.valueOf() < Number(e.valueOf()) ? t : Number(e.valueOf()), qn = (t, e) => I(t) ? t.valueOf() > BigInt(e.valueOf()) ? t : BigInt(e.valueOf()) : t.valueOf() > Number(e.valueOf()) ? t : Number(e.valueOf()), Nt = (t) => I(t) || t instanceof BigInt ? t.valueOf() < 0n ? -t : t : t.valueOf() < 0 ? -t : t, Gn = (t, e) => I(t) ? t.valueOf() * BigInt(e.valueOf()) : t.valueOf() * Number(e.valueOf()), Un = (t, e) => I(t) ? t.valueOf() / BigInt(e.valueOf()) : t.valueOf() / Number(e.valueOf()), p = (t, e) => {
|
|
25
|
-
const r = {};
|
|
26
|
-
if (typeof t == "number" || typeof t == "bigint")
|
|
27
|
-
e != null ? (r.lower = t, r.upper = e) : (r.lower = typeof t == "bigint" ? 0n : 0, r.upper = t);
|
|
28
|
-
else if (Array.isArray(t)) {
|
|
29
|
-
if (t.length !== 2) throw new Error("bounds: expected array of length 2");
|
|
30
|
-
[r.lower, r.upper] = t;
|
|
31
|
-
} else return le(t);
|
|
32
|
-
return le(r);
|
|
33
|
-
}, Ct = Object.freeze({ lower: 0, upper: 0 }), zt = Object.freeze({ lower: -1 / 0, upper: 1 / 0 }), At = Object.freeze({ lower: 0, upper: 1 }), Rt = Object.freeze({ lower: -1, upper: 1 }), Lt = (t, e) => {
|
|
34
|
-
if (t == null && e == null) return !0;
|
|
35
|
-
if (t == null || e == null) return !1;
|
|
36
|
-
const r = p(t), n = p(e);
|
|
37
|
-
return (r == null ? void 0 : r.lower) === (n == null ? void 0 : n.lower) && (r == null ? void 0 : r.upper) === (n == null ? void 0 : n.upper);
|
|
38
|
-
}, le = (t) => t.lower > t.upper ? { lower: t.upper, upper: t.lower } : t, _t = (t, e) => {
|
|
39
|
-
const r = p(t);
|
|
40
|
-
return e < r.lower ? r.lower : e >= r.upper ? r.upper - (typeof r.upper == "number" ? 1 : 1n) : e;
|
|
41
|
-
}, B = (t, e) => {
|
|
42
|
-
const r = p(t);
|
|
43
|
-
if (typeof e == "number" || typeof e == "bigint")
|
|
44
|
-
return e >= r.lower && e < r.upper;
|
|
45
|
-
const n = p(e);
|
|
46
|
-
return n.lower >= r.lower && n.upper <= r.upper;
|
|
47
|
-
}, Pt = (t, e) => {
|
|
48
|
-
const r = p(t), n = p(e);
|
|
49
|
-
return r.lower === n.lower ? !0 : n.upper === r.lower || n.lower === r.upper ? !1 : B(r, n.upper) || B(r, n.lower) || B(n, r.upper) || B(n, r.lower);
|
|
50
|
-
}, re = (t) => {
|
|
51
|
-
const e = p(t);
|
|
52
|
-
return e.upper - e.lower;
|
|
53
|
-
}, Zt = (t) => {
|
|
54
|
-
const e = p(t);
|
|
55
|
-
return typeof e.lower == "bigint" ? e.lower === 0n && e.upper === 0n : e.lower === 0 && e.upper === 0;
|
|
56
|
-
}, Ht = (t) => {
|
|
57
|
-
const e = re(t);
|
|
58
|
-
return typeof e == "number" ? e === 0 : e === 0n;
|
|
59
|
-
}, Wt = (t) => {
|
|
60
|
-
const e = p(t);
|
|
61
|
-
return typeof e.lower == "bigint" ? !0 : Number.isFinite(e.lower) && Number.isFinite(e.upper);
|
|
62
|
-
}, Yt = (t) => {
|
|
63
|
-
const e = p(t);
|
|
64
|
-
return (e.upper + e.lower) / 2;
|
|
65
|
-
}, kt = (t) => ({
|
|
66
|
-
lower: Math.min(...t.map((e) => p(e).lower)),
|
|
67
|
-
upper: Math.max(...t.map((e) => p(e).upper))
|
|
68
|
-
}), Ft = (t) => ({
|
|
69
|
-
lower: Math.max(...t.map((e) => p(e).lower)),
|
|
70
|
-
upper: Math.min(...t.map((e) => p(e).upper))
|
|
71
|
-
}), Xt = (t) => {
|
|
72
|
-
const e = p(t), r = typeof e.lower == "bigint";
|
|
73
|
-
return Array.from({ length: Number(re(t)) }, (n, o) => r ? e.lower + BigInt(o) : e.lower + o);
|
|
74
|
-
}, pe = (t, e) => {
|
|
75
|
-
const r = t.map((s) => p(s)), n = r.findIndex((s) => B(s, e) || e < s.lower);
|
|
76
|
-
if (n === -1) return { index: t.length, position: 0 };
|
|
77
|
-
const o = r[n];
|
|
78
|
-
return B(o, e) ? { index: n, position: Number(e - o.lower) } : { index: n, position: 0 };
|
|
79
|
-
}, ie = {
|
|
80
|
-
removeBefore: 0,
|
|
81
|
-
removeAfter: 0,
|
|
82
|
-
insertInto: 0,
|
|
83
|
-
deleteInBetween: 0
|
|
84
|
-
}, Dt = (t, e) => {
|
|
85
|
-
const r = t.map((l) => p(l)), n = p(e);
|
|
86
|
-
if (r.length === 0) return ie;
|
|
87
|
-
const o = pe(r, n.lower), s = pe(r, n.upper);
|
|
88
|
-
if (o.index === t.length) return { ...ie, insertInto: t.length };
|
|
89
|
-
if (s.index === 0) return { ...ie, removeAfter: s.position };
|
|
90
|
-
if (o.index === s.index)
|
|
91
|
-
return o.position !== 0 && s.position !== 0 ? null : {
|
|
92
|
-
removeAfter: s.position,
|
|
93
|
-
removeBefore: o.position,
|
|
94
|
-
insertInto: o.index,
|
|
95
|
-
deleteInBetween: 0
|
|
96
|
-
};
|
|
97
|
-
let u = s.index - o.index, a = o.index, c = q(Number(re(r[o.index])), o.position);
|
|
98
|
-
return o.position !== 0 ? (u -= 1, a += 1) : c = 0, {
|
|
99
|
-
removeBefore: c,
|
|
100
|
-
removeAfter: s.position,
|
|
101
|
-
insertInto: a,
|
|
102
|
-
deleteInBetween: u
|
|
103
|
-
};
|
|
104
|
-
}, Vt = (t, e, r) => {
|
|
105
|
-
const n = t.map((a) => p(a)), o = r > 0 ? 1 : r < 0 ? -1 : 0;
|
|
106
|
-
if (o === 0) return e;
|
|
107
|
-
let s = r, u = e;
|
|
108
|
-
for (; Ye(s, 0) === !1; ) {
|
|
109
|
-
const a = n.findIndex((c) => o > 0 ? u >= c.lower && u < c.upper : u > c.lower && u <= c.upper);
|
|
110
|
-
if (a !== -1) {
|
|
111
|
-
const c = n[a];
|
|
112
|
-
let l;
|
|
113
|
-
if (o > 0 ? l = q(c.upper, u) : l = q(u, c.lower), l > 0) {
|
|
114
|
-
const h = Bt(Nt(s), l);
|
|
115
|
-
if (u = St(
|
|
116
|
-
u,
|
|
117
|
-
o > 0 ? h : -h
|
|
118
|
-
), s = q(s, o > 0 ? h : -h), Ye(s, 0)) return u;
|
|
119
|
-
continue;
|
|
120
|
-
}
|
|
121
|
-
}
|
|
122
|
-
if (o > 0) {
|
|
123
|
-
const c = n.filter((l) => l.lower > u);
|
|
124
|
-
if (c.length > 0) u = c[0].lower;
|
|
125
|
-
else return u;
|
|
126
|
-
} else {
|
|
127
|
-
const c = n.filter((l) => l.upper < u);
|
|
128
|
-
if (c.length > 0)
|
|
129
|
-
u = c[c.length - 1].upper;
|
|
130
|
-
else return u;
|
|
131
|
-
}
|
|
132
|
-
}
|
|
133
|
-
return u;
|
|
134
|
-
}, qt = (t, e, r) => {
|
|
135
|
-
const n = t.map((u) => p(u));
|
|
136
|
-
if (e === r) return typeof e == "bigint" ? 0n : 0;
|
|
137
|
-
const o = e < r ? p([e, r]) : p([r, e]);
|
|
138
|
-
let s = typeof e == "bigint" ? 0n : 0;
|
|
139
|
-
for (const u of n) {
|
|
140
|
-
const a = u.lower > o.lower ? u.lower : o.lower, c = u.upper < o.upper ? u.upper : o.upper;
|
|
141
|
-
if (a < c) {
|
|
142
|
-
const l = c - a;
|
|
143
|
-
s = s + l;
|
|
144
|
-
}
|
|
145
|
-
}
|
|
146
|
-
return s;
|
|
147
|
-
}, Kn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
148
|
-
__proto__: null,
|
|
149
|
-
CLIP: Rt,
|
|
150
|
-
DECIMAL: At,
|
|
151
|
-
INFINITE: zt,
|
|
152
|
-
ZERO: Ct,
|
|
153
|
-
bounds: Ge,
|
|
154
|
-
buildInsertionPlan: Dt,
|
|
155
|
-
clamp: _t,
|
|
156
|
-
construct: p,
|
|
157
|
-
contains: B,
|
|
158
|
-
distance: qt,
|
|
159
|
-
equals: Lt,
|
|
160
|
-
findInsertPosition: pe,
|
|
161
|
-
isFinite: Wt,
|
|
162
|
-
isZero: Zt,
|
|
163
|
-
linspace: Xt,
|
|
164
|
-
makeValid: le,
|
|
165
|
-
max: kt,
|
|
166
|
-
mean: Yt,
|
|
167
|
-
min: Ft,
|
|
168
|
-
overlapsWith: Pt,
|
|
169
|
-
span: re,
|
|
170
|
-
spanIsZero: Ht,
|
|
171
|
-
traverse: Vt
|
|
172
|
-
}, Symbol.toStringTag, { value: "Module" })), Ue = It, T = (t) => $e.includes(t) ? t : te.includes(t) ? "y" : "x", Gt = (t) => T(t) === "x" ? "y" : "x", Ut = (t) => T(t) === "x" ? "width" : "height", Kt = (t) => T(t) === "x" ? "left" : "top", Jt = (t) => Ue.safeParse(t).success, Qt = (t) => T(t) === "x" ? "signedWidth" : "signedHeight", er = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
173
|
-
__proto__: null,
|
|
174
|
-
construct: T,
|
|
175
|
-
crude: Ue,
|
|
176
|
-
dimension: Ut,
|
|
177
|
-
direction: ve,
|
|
178
|
-
isDirection: Jt,
|
|
179
|
-
location: Kt,
|
|
180
|
-
signedDimension: Qt,
|
|
181
|
-
swap: Gt
|
|
182
|
-
}, Symbol.toStringTag, { value: "Module" })), tr = (t) => {
|
|
183
|
-
const e = t.replace(/_[a-z]/g, (r) => r[1].toUpperCase());
|
|
184
|
-
return e.length > 1 && e[0] === e[0].toUpperCase() && e[1] === e[1].toUpperCase() || e.length === 0 ? e : e[0].toLowerCase() + e.slice(1);
|
|
185
|
-
}, Ie = (t) => {
|
|
186
|
-
const e = (r, n = he) => {
|
|
187
|
-
if (typeof r == "string") return t(r);
|
|
188
|
-
if (Array.isArray(r)) return r.map((u) => e(u, n));
|
|
189
|
-
if (!ue(r)) return r;
|
|
190
|
-
n = sr(n);
|
|
191
|
-
const o = {}, s = r;
|
|
192
|
-
return Object.keys(s).forEach((u) => {
|
|
193
|
-
let a = s[u];
|
|
194
|
-
const c = t(u);
|
|
195
|
-
n.recursive && (ue(a) ? Fe(a, n.keepTypesOnRecursion) || (a = e(a, n)) : n.recursiveInArray && ke(a) && (a = [...a].map((l) => {
|
|
196
|
-
let h = l;
|
|
197
|
-
return ue(l) ? Fe(h, n.keepTypesOnRecursion) || (h = e(l, n)) : ke(l) && (h = e({ key: l }, n).key), h;
|
|
198
|
-
}))), o[c] = a;
|
|
199
|
-
}), o;
|
|
200
|
-
};
|
|
201
|
-
return e;
|
|
202
|
-
}, rr = Ie(tr), nr = (t) => (
|
|
203
|
-
// Don't convert the first character and don't convert a character that is after a
|
|
204
|
-
// non-alphanumeric character
|
|
205
|
-
t.replace(
|
|
206
|
-
/([a-z0-9])([A-Z])/g,
|
|
207
|
-
(e, r, n) => `${r}_${n.toLowerCase()}`
|
|
208
|
-
)
|
|
209
|
-
), or = Ie(nr), Ke = (t) => t.length === 0 ? t : t[0].toUpperCase() + t.slice(1), he = {
|
|
210
|
-
recursive: !0,
|
|
211
|
-
recursiveInArray: !0,
|
|
212
|
-
keepTypesOnRecursion: [Number, String, Uint8Array]
|
|
213
|
-
}, sr = (t = he) => (t.recursive == null ? t = he : t.recursiveInArray ?? (t.recursiveInArray = !1), t), ke = (t) => t != null && Array.isArray(t), ue = (t) => t != null && typeof t == "object" && !Array.isArray(t), Fe = (t, e) => (e || []).some((r) => t instanceof r), ir = (t) => t.replace(/\s+/g, "-").replace(
|
|
214
|
-
/([a-z0-9])([A-Z])/g,
|
|
215
|
-
(e, r, n) => `${r}-${n.toLowerCase()}`
|
|
216
|
-
).toLowerCase(), ur = Ie(ir), Jn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
217
|
-
__proto__: null,
|
|
218
|
-
camelToSnake: or,
|
|
219
|
-
capitalize: Ke,
|
|
220
|
-
snakeToCamel: rr,
|
|
221
|
-
toKebab: ur
|
|
222
|
-
}, Symbol.toStringTag, { value: "Module" })), ar = Oe, cr = Me, lr = ce, pr = {
|
|
223
|
-
top: "bottom",
|
|
224
|
-
right: "left",
|
|
225
|
-
bottom: "top",
|
|
226
|
-
left: "right",
|
|
227
|
-
center: "center"
|
|
228
|
-
}, hr = {
|
|
229
|
-
top: "left",
|
|
230
|
-
right: "top",
|
|
231
|
-
bottom: "right",
|
|
232
|
-
left: "bottom",
|
|
233
|
-
center: "center"
|
|
234
|
-
}, yr = Tt, M = (t) => t instanceof String || !$e.includes(t) ? t : t === "x" ? "left" : "top", fr = (t) => pr[M(t)], gr = (t) => hr[M(t)], W = (t) => {
|
|
235
|
-
const e = M(t);
|
|
236
|
-
return e === "top" || e === "bottom" ? "y" : "x";
|
|
237
|
-
}, dr = i.object({
|
|
238
|
-
x: Oe.or(ce),
|
|
239
|
-
y: Me.or(ce)
|
|
240
|
-
}), Je = i.object({ x: Oe, y: Me }), k = Object.freeze({ x: "left", y: "top" }), Te = Object.freeze({ x: "right", y: "top" }), ne = Object.freeze({ x: "left", y: "bottom" }), Se = Object.freeze({ x: "right", y: "bottom" }), Be = Object.freeze({ x: "center", y: "center" }), Ne = Object.freeze({ x: "center", y: "top" }), Ce = Object.freeze({ x: "center", y: "bottom" }), ze = Object.freeze({ x: "right", y: "center" }), Ae = Object.freeze({ x: "left", y: "center" }), br = Object.freeze([
|
|
241
|
-
Ae,
|
|
242
|
-
ze,
|
|
243
|
-
Ne,
|
|
244
|
-
Ce,
|
|
245
|
-
k,
|
|
246
|
-
Te,
|
|
247
|
-
ne,
|
|
248
|
-
Se,
|
|
249
|
-
Be
|
|
250
|
-
]), Re = (t, e) => t.x === e.x && t.y === e.y, xr = (t, e) => {
|
|
251
|
-
if (typeof e == "object") {
|
|
252
|
-
let r = !0;
|
|
253
|
-
return "x" in e && (t.x === e.x || (r = !1)), "y" in e && (t.y === e.y || (r = !1)), r;
|
|
254
|
-
}
|
|
255
|
-
return t.x === e || t.y === e;
|
|
256
|
-
}, Qe = (t) => [t.x, t.y], G = (t) => W(M(t)) === "x", mr = (t) => W(M(t)) === "y", wr = (t) => `${t.x}${Ke(t.y)}`, $r = (t, e) => {
|
|
257
|
-
let r, n;
|
|
258
|
-
if (typeof t == "object" && "x" in t ? (r = t.x, n = t.y) : (r = M(t), n = M(e ?? t)), W(r) === W(n) && r !== "center" && n !== "center")
|
|
259
|
-
throw new Error(
|
|
260
|
-
`[XYLocation] - encountered two locations with the same direction: ${r.toString()} - ${n.toString()}`
|
|
261
|
-
);
|
|
262
|
-
const o = { ...Be };
|
|
263
|
-
return r === "center" ? G(n) ? [o.x, o.y] = [n, r] : [o.x, o.y] = [r, n] : n === "center" ? G(r) ? [o.x, o.y] = [r, n] : [o.x, o.y] = [n, r] : G(r) ? [o.x, o.y] = [r, n] : [o.x, o.y] = [n, r], o;
|
|
264
|
-
}, vr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
265
|
-
__proto__: null,
|
|
266
|
-
BOTTOM_CENTER: Ce,
|
|
267
|
-
BOTTOM_LEFT: ne,
|
|
268
|
-
BOTTOM_RIGHT: Se,
|
|
269
|
-
CENTER: Be,
|
|
270
|
-
CENTER_LEFT: Ae,
|
|
271
|
-
CENTER_LOCATIONS: je,
|
|
272
|
-
CENTER_RIGHT: ze,
|
|
273
|
-
TOP_CENTER: Ne,
|
|
274
|
-
TOP_LEFT: k,
|
|
275
|
-
TOP_RIGHT: Te,
|
|
276
|
-
XY_LOCATIONS: br,
|
|
277
|
-
X_LOCATIONS: ee,
|
|
278
|
-
Y_LOCATIONS: te,
|
|
279
|
-
center: lr,
|
|
280
|
-
construct: M,
|
|
281
|
-
constructXY: $r,
|
|
282
|
-
corner: Je,
|
|
283
|
-
crude: yr,
|
|
284
|
-
direction: W,
|
|
285
|
-
isX: G,
|
|
286
|
-
isY: mr,
|
|
287
|
-
location: Ee,
|
|
288
|
-
outer: Ot,
|
|
289
|
-
rotate90: gr,
|
|
290
|
-
swap: fr,
|
|
291
|
-
x: ar,
|
|
292
|
-
xy: dr,
|
|
293
|
-
xyCouple: Qe,
|
|
294
|
-
xyEquals: Re,
|
|
295
|
-
xyMatches: xr,
|
|
296
|
-
xyToString: wr,
|
|
297
|
-
y: cr
|
|
298
|
-
}, Symbol.toStringTag, { value: "Module" })), ye = i.union([
|
|
299
|
-
i.number(),
|
|
300
|
-
H,
|
|
301
|
-
Q,
|
|
302
|
-
we,
|
|
303
|
-
mt,
|
|
304
|
-
Ve
|
|
305
|
-
]), y = (t, e) => {
|
|
306
|
-
if (typeof t == "string") {
|
|
307
|
-
if (e === void 0) throw new Error("The y coordinate must be given.");
|
|
308
|
-
return t === "x" ? { x: e, y: 0 } : { x: 0, y: e };
|
|
309
|
-
}
|
|
310
|
-
return typeof t == "number" ? { x: t, y: e ?? t } : Array.isArray(t) ? { x: t[0], y: t[1] } : "signedWidth" in t ? { x: t.signedWidth, y: t.signedHeight } : "clientX" in t ? { x: t.clientX, y: t.clientY } : "width" in t ? { x: t.width, y: t.height } : { x: t.x, y: t.y };
|
|
311
|
-
}, x = Object.freeze({ x: 0, y: 0 }), et = Object.freeze({ x: 1, y: 1 }), Or = Object.freeze({ x: 1 / 0, y: 1 / 0 }), Mr = Object.freeze({ x: NaN, y: NaN }), J = (t, e, r = 0) => {
|
|
312
|
-
const n = y(t), o = y(e);
|
|
313
|
-
return r === 0 ? n.x === o.x && n.y === o.y : Math.abs(n.x - o.x) <= r && Math.abs(n.y - o.y) <= r;
|
|
314
|
-
}, jr = (t) => J(t, x), Le = (t, e, r) => {
|
|
315
|
-
const n = y(t), o = y(e, r);
|
|
316
|
-
return { x: n.x * o.x, y: n.y * o.y };
|
|
317
|
-
}, tt = (t, e) => {
|
|
318
|
-
const r = y(t);
|
|
319
|
-
return { x: r.x + e, y: r.y };
|
|
320
|
-
}, rt = (t, e) => {
|
|
321
|
-
const r = y(t);
|
|
322
|
-
return { x: r.x, y: r.y + e };
|
|
323
|
-
}, Y = (t, e, r, ...n) => typeof e == "string" && typeof r == "number" ? e === "x" ? tt(t, r) : rt(t, r) : [t, e, r ?? x, ...n].reduce((o, s) => {
|
|
324
|
-
const u = y(s);
|
|
325
|
-
return { x: o.x + u.x, y: o.y + u.y };
|
|
326
|
-
}, x), Er = (t, e, r) => {
|
|
327
|
-
const n = y(t);
|
|
328
|
-
return e === "x" ? { x: r, y: n.y } : { x: n.x, y: r };
|
|
329
|
-
}, Ir = (t, e) => {
|
|
330
|
-
const r = y(t), n = y(e);
|
|
331
|
-
return Math.sqrt((r.x - n.x) ** 2 + (r.y - n.y) ** 2);
|
|
332
|
-
}, Tr = (t, e) => {
|
|
333
|
-
const r = y(t), n = y(e);
|
|
334
|
-
return { x: n.x - r.x, y: n.y - r.y };
|
|
335
|
-
}, Sr = (t) => {
|
|
336
|
-
const e = y(t);
|
|
337
|
-
return Number.isNaN(e.x) || Number.isNaN(e.y);
|
|
338
|
-
}, Br = (t) => {
|
|
339
|
-
const e = y(t);
|
|
340
|
-
return Number.isFinite(e.x) && Number.isFinite(e.y);
|
|
341
|
-
}, Nr = (t) => {
|
|
342
|
-
const e = y(t);
|
|
343
|
-
return [e.x, e.y];
|
|
344
|
-
}, Cr = (t) => {
|
|
345
|
-
const e = y(t);
|
|
346
|
-
return { left: e.x, top: e.y };
|
|
347
|
-
}, fe = (t, e = 0) => {
|
|
348
|
-
const r = y(t);
|
|
349
|
-
return { x: Number(r.x.toFixed(e)), y: Number(r.y.toFixed(e)) };
|
|
350
|
-
}, _ = (t, e) => {
|
|
351
|
-
const r = y(t), n = y(e);
|
|
352
|
-
return { x: r.x - n.x, y: r.y - n.y };
|
|
353
|
-
}, P = (t) => {
|
|
354
|
-
const e = y(t), r = Math.hypot(e.x, e.y);
|
|
355
|
-
return r === 0 ? { x: 0, y: 0 } : { x: -e.y / r, y: e.x / r };
|
|
356
|
-
}, nt = (t) => {
|
|
357
|
-
const e = y(t), r = Math.hypot(e.x, e.y);
|
|
358
|
-
return r === 0 ? { x: 0, y: 0 } : { x: e.x / r, y: e.y / r };
|
|
359
|
-
}, ot = (...t) => {
|
|
360
|
-
const e = t.reduce((r, n) => Y(r, n), x);
|
|
361
|
-
return Le(e, 1 / t.length);
|
|
362
|
-
}, zr = (t, e) => {
|
|
363
|
-
const r = [];
|
|
364
|
-
for (let n = 0; n < t.length; n++) {
|
|
365
|
-
const o = t[n];
|
|
366
|
-
let s, u, a, c;
|
|
367
|
-
if (n === 0) {
|
|
368
|
-
const l = t[n + 1], h = _(l, o);
|
|
369
|
-
u = P(h), a = u, c = e;
|
|
370
|
-
} else if (n === t.length - 1) {
|
|
371
|
-
const l = t[n - 1], h = _(o, l);
|
|
372
|
-
s = P(h), a = s, c = e;
|
|
373
|
-
} else {
|
|
374
|
-
const l = t[n - 1], h = t[n + 1], S = _(o, l), L = _(h, o);
|
|
375
|
-
s = P(S), u = P(L);
|
|
376
|
-
const dt = Math.acos(
|
|
377
|
-
(S.x * L.x + S.y * L.y) / (Math.hypot(S.x, S.y) * Math.hypot(L.x, L.y))
|
|
378
|
-
), We = Math.sin(dt / 2);
|
|
379
|
-
We === 0 ? c = e : c = e / We, a = nt(ot(s, u));
|
|
380
|
-
}
|
|
381
|
-
r.push(Le(a, c));
|
|
382
|
-
}
|
|
383
|
-
return r;
|
|
384
|
-
}, Ar = (t) => {
|
|
385
|
-
const e = y(t);
|
|
386
|
-
return { x: e.y, y: e.x };
|
|
387
|
-
}, Qn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
388
|
-
__proto__: null,
|
|
389
|
-
INFINITY: Or,
|
|
390
|
-
NAN: Mr,
|
|
391
|
-
ONE: et,
|
|
392
|
-
ZERO: x,
|
|
393
|
-
average: ot,
|
|
394
|
-
calculateMiters: zr,
|
|
395
|
-
clientXY: Ve,
|
|
396
|
-
construct: y,
|
|
397
|
-
couple: Nr,
|
|
398
|
-
crudeZ: ye,
|
|
399
|
-
css: Cr,
|
|
400
|
-
distance: Ir,
|
|
401
|
-
equals: J,
|
|
402
|
-
isFinite: Br,
|
|
403
|
-
isNan: Sr,
|
|
404
|
-
isZero: jr,
|
|
405
|
-
normal: P,
|
|
406
|
-
normalize: nt,
|
|
407
|
-
scale: Le,
|
|
408
|
-
set: Er,
|
|
409
|
-
sub: _,
|
|
410
|
-
swap: Ar,
|
|
411
|
-
translate: Y,
|
|
412
|
-
translateX: tt,
|
|
413
|
-
translateY: rt,
|
|
414
|
-
translation: Tr,
|
|
415
|
-
truncate: fe,
|
|
416
|
-
xy: H
|
|
417
|
-
}, Symbol.toStringTag, { value: "Module" })), F = i.union([i.number(), i.string()]), Rr = i.object({
|
|
418
|
-
top: F,
|
|
419
|
-
left: F,
|
|
420
|
-
width: F,
|
|
421
|
-
height: F
|
|
422
|
-
}), Lr = i.object({
|
|
423
|
-
left: i.number(),
|
|
424
|
-
top: i.number(),
|
|
425
|
-
right: i.number(),
|
|
426
|
-
bottom: i.number()
|
|
427
|
-
}), _r = i.object({
|
|
428
|
-
one: H,
|
|
429
|
-
two: H,
|
|
430
|
-
root: Je
|
|
431
|
-
}), st = { one: x, two: x, root: k }, Pr = { one: x, two: et, root: ne }, it = (t, e) => ({
|
|
432
|
-
one: t.one,
|
|
433
|
-
two: t.two,
|
|
434
|
-
root: e ?? t.root
|
|
435
|
-
}), f = (t, e, r = 0, n = 0, o) => {
|
|
436
|
-
const s = {
|
|
437
|
-
one: { ...x },
|
|
438
|
-
two: { ...x },
|
|
439
|
-
root: o ?? k
|
|
440
|
-
};
|
|
441
|
-
if (typeof t == "number") {
|
|
442
|
-
if (typeof e != "number")
|
|
443
|
-
throw new Error("Box constructor called with invalid arguments");
|
|
444
|
-
return s.one = { x: t, y: e }, s.two = { x: s.one.x + r, y: s.one.y + n }, s;
|
|
445
|
-
}
|
|
446
|
-
return "one" in t && "two" in t && "root" in t ? { ...t, root: o ?? t.root } : ("getBoundingClientRect" in t && (t = t.getBoundingClientRect()), "left" in t ? (s.one = { x: t.left, y: t.top }, s.two = { x: t.right, y: t.bottom }, s) : (s.one = t, e == null ? s.two = { x: s.one.x + r, y: s.one.y + n } : typeof e == "number" ? s.two = { x: s.one.x + e, y: s.one.y + r } : "width" in e ? s.two = {
|
|
447
|
-
x: s.one.x + e.width,
|
|
448
|
-
y: s.one.y + e.height
|
|
449
|
-
} : "signedWidth" in e ? s.two = {
|
|
450
|
-
x: s.one.x + e.signedWidth,
|
|
451
|
-
y: s.one.y + e.signedHeight
|
|
452
|
-
} : s.two = e, s));
|
|
453
|
-
}, Zr = (t, e, r) => {
|
|
454
|
-
const n = f(t);
|
|
455
|
-
if (typeof e == "string") {
|
|
456
|
-
if (r == null) throw new Error("Invalid arguments for resize");
|
|
457
|
-
const o = T(e);
|
|
458
|
-
return f(
|
|
459
|
-
n.one,
|
|
460
|
-
void 0,
|
|
461
|
-
o === "x" ? r : j(n),
|
|
462
|
-
o === "y" ? r : E(n),
|
|
463
|
-
n.root
|
|
464
|
-
);
|
|
465
|
-
}
|
|
466
|
-
return f(n.one, e, void 0, void 0, n.root);
|
|
467
|
-
}, Hr = (t, e, r = !0) => {
|
|
468
|
-
const n = f(t);
|
|
469
|
-
let o = (s, u) => s < u;
|
|
470
|
-
return r && (o = (s, u) => s <= u), "one" in e ? o(v(n), v(e)) && o(N(e), N(n)) && o(O(n), O(e)) && o(C(e), C(n)) : o(v(n), e.x) && o(e.x, N(n)) && o(O(n), e.y) && o(e.y, C(n));
|
|
471
|
-
}, Wr = (t, e) => J(t.one, e.one) && J(t.two, e.two) && Re(t.root, e.root), ut = (t) => ({
|
|
472
|
-
width: j(t),
|
|
473
|
-
height: E(t)
|
|
474
|
-
}), Yr = (t) => ({
|
|
475
|
-
signedWidth: oe(t),
|
|
476
|
-
signedHeight: se(t)
|
|
477
|
-
}), kr = (t) => ({
|
|
478
|
-
top: O(t),
|
|
479
|
-
left: v(t),
|
|
480
|
-
width: j(t),
|
|
481
|
-
height: E(t)
|
|
482
|
-
}), _e = (t, e, r = !1) => {
|
|
483
|
-
const n = T(e) === "y" ? se(t) : oe(t);
|
|
484
|
-
return r ? n : Math.abs(n);
|
|
485
|
-
}, $ = (t, e) => {
|
|
486
|
-
const r = f(t);
|
|
487
|
-
return {
|
|
488
|
-
x: e.x === "center" ? ge(r).x : z(r, e.x),
|
|
489
|
-
y: e.y === "center" ? ge(r).y : z(r, e.y)
|
|
490
|
-
};
|
|
491
|
-
}, z = (t, e) => {
|
|
492
|
-
const r = f(t), n = Qe(r.root).includes(e) ? Math.min : Math.max;
|
|
493
|
-
return ee.includes(e) ? n(r.one.x, r.two.x) : n(r.one.y, r.two.y);
|
|
494
|
-
}, Fr = (t) => t.one.x === t.two.x && t.one.y === t.two.y, j = (t) => _e(t, "x"), E = (t) => _e(t, "y"), oe = (t) => {
|
|
495
|
-
const e = f(t);
|
|
496
|
-
return e.two.x - e.one.x;
|
|
497
|
-
}, se = (t) => {
|
|
498
|
-
const e = f(t);
|
|
499
|
-
return e.two.y - e.one.y;
|
|
500
|
-
}, at = (t) => $(t, k), Xr = (t) => $(t, Ne), Dr = (t) => $(t, Te), Vr = (t) => $(t, ne), qr = (t) => $(t, Ce), Gr = (t) => $(t, Se), Ur = (t) => $(t, Ae), Kr = (t) => $(t, ze), N = (t) => z(t, "right"), C = (t) => z(t, "bottom"), v = (t) => z(t, "left"), O = (t) => z(t, "top"), ge = (t) => Y(at(t), {
|
|
501
|
-
x: oe(t) / 2,
|
|
502
|
-
y: se(t) / 2
|
|
503
|
-
}), Pe = (t) => {
|
|
504
|
-
const e = f(t);
|
|
505
|
-
return e.root.x === "left" ? v(e) : N(e);
|
|
506
|
-
}, Ze = (t) => {
|
|
507
|
-
const e = f(t);
|
|
508
|
-
return e.root.y === "top" ? O(e) : C(e);
|
|
509
|
-
}, Jr = (t) => ({ x: Pe(t), y: Ze(t) }), U = (t) => {
|
|
510
|
-
const e = f(t);
|
|
511
|
-
return { lower: e.one.x, upper: e.two.x };
|
|
512
|
-
}, K = (t) => {
|
|
513
|
-
const e = f(t);
|
|
514
|
-
return { lower: e.one.y, upper: e.two.y };
|
|
515
|
-
}, Qr = (t, e) => it(t, e), en = (t, e) => {
|
|
516
|
-
const r = f(t), n = ee.includes(e) ? "x" : te.includes(e) ? "y" : null;
|
|
517
|
-
if (n === null) throw new Error(`Invalid location: ${e}`);
|
|
518
|
-
const o = e === "top" || e === "left" ? Math.min : Math.max, s = { ...r.one }, u = { ...r.two };
|
|
519
|
-
return s[n] = o(r.one[n], r.two[n]), u[n] = o(r.one[n], r.two[n]), [s, u];
|
|
520
|
-
}, tn = (t, e) => {
|
|
521
|
-
const r = f(t), n = f(e), o = Pe(n) + (j(n) - j(r)) / 2, s = Ze(n) + (E(n) - E(r)) / 2;
|
|
522
|
-
return f({ x: o, y: s }, ut(r));
|
|
523
|
-
}, ct = (t) => typeof t != "object" || t == null ? !1 : "one" in t && "two" in t && "root" in t, rn = (t) => j(t) / E(t), nn = (t, e, r) => {
|
|
524
|
-
if (typeof e == "string") {
|
|
525
|
-
if (r == null) throw new Error("Undefined amount passed into box.translate");
|
|
526
|
-
const o = T(e);
|
|
527
|
-
e = y(o, r);
|
|
528
|
-
}
|
|
529
|
-
const n = f(t);
|
|
530
|
-
return f(
|
|
531
|
-
Y(n.one, e),
|
|
532
|
-
Y(n.two, e),
|
|
533
|
-
void 0,
|
|
534
|
-
void 0,
|
|
535
|
-
n.root
|
|
536
|
-
);
|
|
537
|
-
}, on = (t, e) => {
|
|
538
|
-
const r = Math.max(v(t), v(e)), n = Math.max(O(t), O(e)), o = Math.min(N(t), N(e)), s = Math.min(C(t), C(e));
|
|
539
|
-
return r > o || n > s ? st : f({ x: r, y: n }, { x: o, y: s }, void 0, void 0, t.root);
|
|
540
|
-
}, sn = (t) => j(t) * E(t), un = (t, e) => {
|
|
541
|
-
const r = f(t);
|
|
542
|
-
return f(
|
|
543
|
-
fe(r.one, e),
|
|
544
|
-
fe(r.two, e),
|
|
545
|
-
void 0,
|
|
546
|
-
void 0,
|
|
547
|
-
r.root
|
|
548
|
-
);
|
|
549
|
-
}, an = (t, e, r, n, o, s) => {
|
|
550
|
-
const u = { x: t, y: e }, a = { x: t + r, y: e + n };
|
|
551
|
-
return o.x !== s.x && (o.x === "center" ? (u.x -= r / 2, a.x -= r / 2) : (u.x -= r, a.x -= r)), o.y !== s.y && (o.y === "center" ? (u.y -= n / 2, a.y -= n / 2) : (u.y -= n, a.y -= n)), f(u, a, void 0, void 0, s);
|
|
552
|
-
}, eo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
553
|
-
__proto__: null,
|
|
554
|
-
DECIMAL: Pr,
|
|
555
|
-
ZERO: st,
|
|
556
|
-
area: sn,
|
|
557
|
-
areaIsZero: Fr,
|
|
558
|
-
aspect: rn,
|
|
559
|
-
bottom: C,
|
|
560
|
-
bottomCenter: qr,
|
|
561
|
-
bottomLeft: Vr,
|
|
562
|
-
bottomRight: Gr,
|
|
563
|
-
box: _r,
|
|
564
|
-
center: ge,
|
|
565
|
-
centerLeft: Ur,
|
|
566
|
-
centerRight: Kr,
|
|
567
|
-
construct: f,
|
|
568
|
-
constructWithAlternateRoot: an,
|
|
569
|
-
contains: Hr,
|
|
570
|
-
copy: it,
|
|
571
|
-
css: kr,
|
|
572
|
-
cssBox: Rr,
|
|
573
|
-
dim: _e,
|
|
574
|
-
dims: ut,
|
|
575
|
-
domRect: Lr,
|
|
576
|
-
edgePoints: en,
|
|
577
|
-
equals: Wr,
|
|
578
|
-
height: E,
|
|
579
|
-
intersection: on,
|
|
580
|
-
isBox: ct,
|
|
581
|
-
left: v,
|
|
582
|
-
loc: z,
|
|
583
|
-
positionInCenter: tn,
|
|
584
|
-
reRoot: Qr,
|
|
585
|
-
resize: Zr,
|
|
586
|
-
right: N,
|
|
587
|
-
root: Jr,
|
|
588
|
-
signedDims: Yr,
|
|
589
|
-
signedHeight: se,
|
|
590
|
-
signedWidth: oe,
|
|
591
|
-
top: O,
|
|
592
|
-
topCenter: Xr,
|
|
593
|
-
topLeft: at,
|
|
594
|
-
topRight: Dr,
|
|
595
|
-
translate: nn,
|
|
596
|
-
truncate: un,
|
|
597
|
-
width: j,
|
|
598
|
-
x: Pe,
|
|
599
|
-
xBounds: U,
|
|
600
|
-
xyLoc: $,
|
|
601
|
-
y: Ze,
|
|
602
|
-
yBounds: K
|
|
603
|
-
}, Symbol.toStringTag, { value: "Module" })), lt = i.object({ signedWidth: i.number(), signedHeight: i.number() }), cn = i.union([we, lt, H, Q]), ln = { width: 0, height: 0 }, pn = { width: 1, height: 1 }, d = (t, e) => typeof t == "number" ? { width: t, height: e ?? t } : Array.isArray(t) ? { width: t[0], height: t[1] } : "x" in t ? { width: t.x, height: t.y } : "signedWidth" in t ? { width: t.signedWidth, height: t.signedHeight } : { ...t }, hn = (t, e) => {
|
|
604
|
-
if (e == null) return !1;
|
|
605
|
-
const r = d(t), n = d(e);
|
|
606
|
-
return r.width === n.width && r.height === n.height;
|
|
607
|
-
}, yn = (t) => {
|
|
608
|
-
const e = d(t);
|
|
609
|
-
return { width: e.height, height: e.width };
|
|
610
|
-
}, fn = (t) => {
|
|
611
|
-
const e = d(t);
|
|
612
|
-
return `0 0 ${e.width} ${e.height}`;
|
|
613
|
-
}, gn = (t) => {
|
|
614
|
-
const e = d(t);
|
|
615
|
-
return [e.width, e.height];
|
|
616
|
-
}, dn = (t) => ({
|
|
617
|
-
width: Math.max(...t.map((e) => d(e).width)),
|
|
618
|
-
height: Math.max(...t.map((e) => d(e).height))
|
|
619
|
-
}), bn = (t) => ({
|
|
620
|
-
width: Math.min(...t.map((e) => d(e).width)),
|
|
621
|
-
height: Math.min(...t.map((e) => d(e).height))
|
|
622
|
-
}), xn = (t, e) => {
|
|
623
|
-
const r = d(t);
|
|
624
|
-
return { width: r.width * e, height: r.height * e };
|
|
625
|
-
}, to = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
626
|
-
__proto__: null,
|
|
627
|
-
DECIMAL: pn,
|
|
628
|
-
ZERO: ln,
|
|
629
|
-
construct: d,
|
|
630
|
-
couple: gn,
|
|
631
|
-
crude: cn,
|
|
632
|
-
dimensions: we,
|
|
633
|
-
equals: hn,
|
|
634
|
-
max: dn,
|
|
635
|
-
min: bn,
|
|
636
|
-
scale: xn,
|
|
637
|
-
signed: lt,
|
|
638
|
-
svgViewBox: fn,
|
|
639
|
-
swap: yn
|
|
640
|
-
}, Symbol.toStringTag, { value: "Module" }));
|
|
641
|
-
var mn = Object.defineProperty, wn = (t, e, r) => e in t ? mn(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r, w = (t, e, r) => wn(t, typeof e != "symbol" ? e + "" : e, r);
|
|
642
|
-
const $n = (t, e, r) => e !== void 0 && t < e ? e : r !== void 0 && t > r ? r : t, vn = i.object({ offset: ye, scale: ye }), On = i.object({ offset: i.number(), scale: i.number() }), Mn = (t) => (e, r, n, o) => r === "dimension" ? [e, n] : [
|
|
643
|
-
e,
|
|
644
|
-
o ? n - t : n + t
|
|
645
|
-
], jn = (t) => (e, r, n, o) => [
|
|
646
|
-
e,
|
|
647
|
-
o ? n / t : n * t
|
|
648
|
-
], En = (t) => (e, r, n) => {
|
|
649
|
-
if (e === null) return [t, n];
|
|
650
|
-
const { lower: o, upper: s } = e, { lower: u, upper: a } = t, c = s - o, l = a - u;
|
|
651
|
-
if (r === "dimension") return [t, n * (l / c)];
|
|
652
|
-
const h = (n - o) * (l / c) + u;
|
|
653
|
-
return [t, h];
|
|
654
|
-
}, In = (t) => (e, r, n) => [t, n], Tn = () => (t, e, r) => {
|
|
655
|
-
if (t === null) throw new Error("cannot invert without bounds");
|
|
656
|
-
if (e === "dimension") return [t, r];
|
|
657
|
-
const { lower: n, upper: o } = t;
|
|
658
|
-
return [t, o - (r - n)];
|
|
659
|
-
}, Sn = (t) => (e, r, n) => {
|
|
660
|
-
const { lower: o, upper: s } = t;
|
|
661
|
-
return n = $n(n, o, s), [e, n];
|
|
662
|
-
}, de = class Z {
|
|
663
|
-
constructor() {
|
|
664
|
-
w(this, "ops", []), w(this, "currBounds", null), w(this, "currType", null), w(this, "reversed", !1), this.ops = [];
|
|
665
|
-
}
|
|
666
|
-
/**
|
|
667
|
-
* @returns a new scale with a translation as its first operation. Any number provided
|
|
668
|
-
* to the {@link pos} operation on the scale will be translated by the specified value.
|
|
669
|
-
* @param value - The amount to translate by.
|
|
670
|
-
*/
|
|
671
|
-
static translate(e) {
|
|
672
|
-
return new Z().translate(e);
|
|
673
|
-
}
|
|
674
|
-
/**
|
|
675
|
-
* @returns a new scale with a magnification as its first operation. Any number provided
|
|
676
|
-
* to the {@link pos} or {@link dim} operation will be multiplied by the specified value.
|
|
677
|
-
* @param value - The amount to translate by.
|
|
678
|
-
*/
|
|
679
|
-
static magnify(e) {
|
|
680
|
-
return new Z().magnify(e);
|
|
681
|
-
}
|
|
682
|
-
static scale(e, r) {
|
|
683
|
-
return new Z().scale(e, r);
|
|
684
|
-
}
|
|
685
|
-
/**
|
|
686
|
-
* @returns a copy of the scale with a translation as its next operation. Any
|
|
687
|
-
* number provided to the {@link pos} method on the scale will be translated by the
|
|
688
|
-
* specified value.
|
|
689
|
-
* @param value - The amount to translate by.
|
|
690
|
-
*/
|
|
691
|
-
translate(e) {
|
|
692
|
-
const r = this.new(), n = Mn(e);
|
|
693
|
-
return n.type = "translate", r.ops.push(n), r;
|
|
694
|
-
}
|
|
695
|
-
/**
|
|
696
|
-
* @returns a copy of the scale with a translation as its next operation. Any number
|
|
697
|
-
* provided to the {@link pos} or {@link dim} method on the scale will be multiplied
|
|
698
|
-
* by the specified value.
|
|
699
|
-
* @param value - The amount to magnify by.
|
|
700
|
-
*/
|
|
701
|
-
magnify(e) {
|
|
702
|
-
const r = this.new(), n = jn(e);
|
|
703
|
-
return n.type = "magnify", r.ops.push(n), r;
|
|
704
|
-
}
|
|
705
|
-
scale(e, r) {
|
|
706
|
-
const n = p(e, r), o = this.new(), s = En(n);
|
|
707
|
-
return s.type = "scale", o.ops.push(s), o;
|
|
708
|
-
}
|
|
709
|
-
clamp(e, r) {
|
|
710
|
-
const n = p(e, r), o = this.new(), s = Sn(n);
|
|
711
|
-
return s.type = "clamp", o.ops.push(s), o;
|
|
712
|
-
}
|
|
713
|
-
reBound(e, r) {
|
|
714
|
-
const n = p(e, r), o = this.new(), s = In(n);
|
|
715
|
-
return s.type = "re-bound", o.ops.push(s), o;
|
|
716
|
-
}
|
|
717
|
-
invert() {
|
|
718
|
-
const e = Tn();
|
|
719
|
-
e.type = "invert";
|
|
720
|
-
const r = this.new();
|
|
721
|
-
return r.ops.push(e), r;
|
|
722
|
-
}
|
|
723
|
-
pos(e) {
|
|
724
|
-
return this.exec("position", e);
|
|
725
|
-
}
|
|
726
|
-
dim(e) {
|
|
727
|
-
return this.exec("dimension", e);
|
|
728
|
-
}
|
|
729
|
-
new() {
|
|
730
|
-
const e = new Z();
|
|
731
|
-
return e.ops = this.ops.slice(), e.reversed = this.reversed, e;
|
|
732
|
-
}
|
|
733
|
-
exec(e, r) {
|
|
734
|
-
return this.currBounds = null, this.ops.reduce(
|
|
735
|
-
([n, o], s) => s(n, e, o, this.reversed),
|
|
736
|
-
[null, r]
|
|
737
|
-
)[1];
|
|
738
|
-
}
|
|
739
|
-
reverse() {
|
|
740
|
-
const e = this.new();
|
|
741
|
-
e.ops.reverse();
|
|
742
|
-
const r = [];
|
|
743
|
-
return e.ops.forEach((n, o) => {
|
|
744
|
-
if (n.type === "scale" || r.some(([u, a]) => o >= u && o <= a))
|
|
745
|
-
return;
|
|
746
|
-
const s = e.ops.findIndex((u, a) => u.type === "scale" && a > o);
|
|
747
|
-
s !== -1 && r.push([o, s]);
|
|
748
|
-
}), r.forEach(([n, o]) => {
|
|
749
|
-
const s = e.ops.slice(n, o);
|
|
750
|
-
s.unshift(e.ops[o]), e.ops.splice(n, o - n + 1, ...s);
|
|
751
|
-
}), e.reversed = !e.reversed, e;
|
|
752
|
-
}
|
|
753
|
-
get transform() {
|
|
754
|
-
return { scale: this.dim(1), offset: this.pos(0) };
|
|
755
|
-
}
|
|
756
|
-
};
|
|
757
|
-
w(de, "IDENTITY", new de());
|
|
758
|
-
let be = de;
|
|
759
|
-
const xe = class m {
|
|
760
|
-
constructor(e = new be(), r = new be(), n = null) {
|
|
761
|
-
w(this, "x"), w(this, "y"), w(this, "currRoot"), this.x = e, this.y = r, this.currRoot = n;
|
|
762
|
-
}
|
|
763
|
-
static translate(e, r) {
|
|
764
|
-
return new m().translate(e, r);
|
|
765
|
-
}
|
|
766
|
-
static translateX(e) {
|
|
767
|
-
return new m().translateX(e);
|
|
768
|
-
}
|
|
769
|
-
static translateY(e) {
|
|
770
|
-
return new m().translateY(e);
|
|
771
|
-
}
|
|
772
|
-
static clamp(e) {
|
|
773
|
-
return new m().clamp(e);
|
|
774
|
-
}
|
|
775
|
-
static magnify(e) {
|
|
776
|
-
return new m().magnify(e);
|
|
777
|
-
}
|
|
778
|
-
static scale(e) {
|
|
779
|
-
return new m().scale(e);
|
|
780
|
-
}
|
|
781
|
-
static reBound(e) {
|
|
782
|
-
return new m().reBound(e);
|
|
783
|
-
}
|
|
784
|
-
translate(e, r) {
|
|
785
|
-
const n = y(e, r), o = this.copy();
|
|
786
|
-
return o.x = this.x.translate(n.x), o.y = this.y.translate(n.y), o;
|
|
787
|
-
}
|
|
788
|
-
translateX(e) {
|
|
789
|
-
const r = this.copy();
|
|
790
|
-
return r.x = this.x.translate(e), r;
|
|
791
|
-
}
|
|
792
|
-
translateY(e) {
|
|
793
|
-
const r = this.copy();
|
|
794
|
-
return r.y = this.y.translate(e), r;
|
|
795
|
-
}
|
|
796
|
-
magnify(e) {
|
|
797
|
-
const r = this.copy();
|
|
798
|
-
return r.x = this.x.magnify(e.x), r.y = this.y.magnify(e.y), r;
|
|
799
|
-
}
|
|
800
|
-
scale(e) {
|
|
801
|
-
const r = this.copy();
|
|
802
|
-
if (ct(e)) {
|
|
803
|
-
const n = this.currRoot;
|
|
804
|
-
return r.currRoot = e.root, n != null && !Re(n, e.root) && (n.x !== e.root.x && (r.x = r.x.invert()), n.y !== e.root.y && (r.y = r.y.invert())), r.x = r.x.scale(U(e)), r.y = r.y.scale(K(e)), r;
|
|
805
|
-
}
|
|
806
|
-
return r.x = r.x.scale(e.width), r.y = r.y.scale(e.height), r;
|
|
807
|
-
}
|
|
808
|
-
reBound(e) {
|
|
809
|
-
const r = this.copy();
|
|
810
|
-
return r.x = this.x.reBound(U(e)), r.y = this.y.reBound(K(e)), r;
|
|
811
|
-
}
|
|
812
|
-
clamp(e) {
|
|
813
|
-
const r = this.copy();
|
|
814
|
-
return r.x = this.x.clamp(U(e)), r.y = this.y.clamp(K(e)), r;
|
|
815
|
-
}
|
|
816
|
-
copy() {
|
|
817
|
-
const e = new m();
|
|
818
|
-
return e.currRoot = this.currRoot, e.x = this.x, e.y = this.y, e;
|
|
819
|
-
}
|
|
820
|
-
reverse() {
|
|
821
|
-
const e = this.copy();
|
|
822
|
-
return e.x = this.x.reverse(), e.y = this.y.reverse(), e;
|
|
823
|
-
}
|
|
824
|
-
pos(e) {
|
|
825
|
-
return { x: this.x.pos(e.x), y: this.y.pos(e.y) };
|
|
826
|
-
}
|
|
827
|
-
dim(e) {
|
|
828
|
-
return { x: this.x.dim(e.x), y: this.y.dim(e.y) };
|
|
829
|
-
}
|
|
830
|
-
box(e) {
|
|
831
|
-
return f(
|
|
832
|
-
this.pos(e.one),
|
|
833
|
-
this.pos(e.two),
|
|
834
|
-
0,
|
|
835
|
-
0,
|
|
836
|
-
this.currRoot ?? e.root
|
|
837
|
-
);
|
|
838
|
-
}
|
|
839
|
-
get transform() {
|
|
840
|
-
return {
|
|
841
|
-
scale: this.dim({ x: 1, y: 1 }),
|
|
842
|
-
offset: this.pos({ x: 0, y: 0 })
|
|
843
|
-
};
|
|
844
|
-
}
|
|
845
|
-
};
|
|
846
|
-
w(xe, "IDENTITY", new xe());
|
|
847
|
-
let Bn = xe;
|
|
848
|
-
const ro = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
849
|
-
__proto__: null,
|
|
850
|
-
Scale: be,
|
|
851
|
-
XY: Bn,
|
|
852
|
-
crudeXYTransform: vn,
|
|
853
|
-
transform: On
|
|
854
|
-
}, Symbol.toStringTag, { value: "Module" }));
|
|
855
|
-
function pt(t) {
|
|
856
|
-
var e, r, n = "";
|
|
857
|
-
if (typeof t == "string" || typeof t == "number") n += t;
|
|
858
|
-
else if (typeof t == "object") if (Array.isArray(t)) {
|
|
859
|
-
var o = t.length;
|
|
860
|
-
for (e = 0; e < o; e++) t[e] && (r = pt(t[e])) && (n && (n += " "), n += r);
|
|
861
|
-
} else for (r in t) t[r] && (n && (n += " "), n += r);
|
|
862
|
-
return n;
|
|
863
|
-
}
|
|
864
|
-
function Nn() {
|
|
865
|
-
for (var t, e, r = 0, n = "", o = arguments.length; r < o; r++) (t = arguments[r]) && (e = pt(t)) && (n && (n += " "), n += e);
|
|
866
|
-
return n;
|
|
867
|
-
}
|
|
868
|
-
const Cn = Nn, Xe = "-", De = "__", X = "--", ht = (t) => {
|
|
869
|
-
const e = (...r) => Cn(...r);
|
|
870
|
-
return e.B = (r) => t + Xe + r, e.E = (r) => t + De + r, e.M = (r) => t + X + r, e.BM = (r, n) => e.B(r) + X + n, e.BE = (r, n) => e.B(r) + De + n, e.BEM = (r, n, o) => e.BE(r, n) + X + o, e.extend = (r) => ht(e.B(r)), e.var = (r) => X + t + Xe + r, e;
|
|
871
|
-
}, zn = /^#?([0-9a-f]{6}|[0-9a-f]{8})$/i, me = i.string().regex(zn), R = i.number().min(0).max(255), An = i.number().min(0).max(1), He = i.tuple([R, R, R, An]), yt = i.tuple([R, R, R]), ft = i.object({ rgba255: He }), no = (t) => t == null ? void 0 : new g(t).hex, oo = (t) => {
|
|
872
|
-
if (t == null) return;
|
|
873
|
-
const e = g.z.safeParse(t);
|
|
874
|
-
if (e.success) return e.data.rgbaCSS;
|
|
875
|
-
if (typeof t == "string") return t;
|
|
876
|
-
throw e.error;
|
|
877
|
-
}, b = class b {
|
|
878
|
-
/**
|
|
879
|
-
* @constructor Creates a new color from the given color value. The color value can be
|
|
880
|
-
* a hex string, an array of RGB or RGBA values, or another color.
|
|
881
|
-
*
|
|
882
|
-
* @param color - The color value to create the color from. If the color value is a
|
|
883
|
-
* string, it must be a valid hex color (with or without the '#') with a hasheless
|
|
884
|
-
* length 6 or 8. If the hex color is 8 characters long, the last twoc haracters are
|
|
885
|
-
* used as the alpha value. If the color value is an array, it must be an array of
|
|
886
|
-
* length 3 or 4, with each value between 0 and 255. If the color value is another
|
|
887
|
-
* color, the color will be copied.
|
|
888
|
-
*
|
|
889
|
-
* @param alpha - An optional alpha value to set. If the color value carries its own
|
|
890
|
-
* alpha value, this value will be ignored. Defaults to 1.
|
|
891
|
-
*/
|
|
892
|
-
constructor(e, r = 1) {
|
|
893
|
-
/**
|
|
894
|
-
* @property the color as an RGBA tuple, with each color value between 0 and 255,
|
|
895
|
-
* and the alpha value between 0 and 1.
|
|
896
|
-
*/
|
|
897
|
-
A(this, "rgba255");
|
|
898
|
-
if (typeof e == "string") this.rgba255 = b.fromHex(e, r);
|
|
899
|
-
else if (Array.isArray(e)) {
|
|
900
|
-
if (e.length < 3 || e.length > 4)
|
|
901
|
-
throw new Error(`Invalid color: [${e.join(", ")}]`);
|
|
902
|
-
this.rgba255 = e.length === 3 ? [...e, r ?? 1] : e;
|
|
903
|
-
} else this.rgba255 = e.rgba255;
|
|
904
|
-
}
|
|
905
|
-
/**
|
|
906
|
-
* @returns true if the given color is semantically equal to this color. Different
|
|
907
|
-
* representations of the same color are considered equal (e.g. hex and rgba).
|
|
908
|
-
*/
|
|
909
|
-
equals(e) {
|
|
910
|
-
if (e == null) return !1;
|
|
911
|
-
const r = new b(e);
|
|
912
|
-
return this.rgba255.every((n, o) => n === r.rgba255[o]);
|
|
913
|
-
}
|
|
914
|
-
/**
|
|
915
|
-
* @returns the hex representation of the color. If the color has an opacity of 1,
|
|
916
|
-
* the returned hex will be 6 characters long. Otherwise, it will be 8 characters
|
|
917
|
-
* long.
|
|
918
|
-
*/
|
|
919
|
-
get hex() {
|
|
920
|
-
const [e, r, n, o] = this.rgba255;
|
|
921
|
-
return `#${D(e)}${D(r)}${D(n)}${o === 1 ? "" : D(o * 255)}`;
|
|
922
|
-
}
|
|
923
|
-
/**
|
|
924
|
-
* @returns the color as a CSS RGBA string.
|
|
925
|
-
*/
|
|
926
|
-
get rgbaCSS() {
|
|
927
|
-
const [e, r, n, o] = this.rgba255;
|
|
928
|
-
return `rgba(${e}, ${r}, ${n}, ${o})`;
|
|
929
|
-
}
|
|
930
|
-
/**
|
|
931
|
-
* @returns the color as a CSS RGB string with no alpha value.
|
|
932
|
-
*/
|
|
933
|
-
get rgbCSS() {
|
|
934
|
-
return `rgb(${this.rgbString})`;
|
|
935
|
-
}
|
|
936
|
-
/**
|
|
937
|
-
* @returns the color as an RGB string, with each color value between 0 and 255.
|
|
938
|
-
* @example "255, 255, 255"
|
|
939
|
-
*/
|
|
940
|
-
get rgbString() {
|
|
941
|
-
const [e, r, n] = this.rgba255;
|
|
942
|
-
return `${e}, ${r}, ${n}`;
|
|
943
|
-
}
|
|
944
|
-
/**
|
|
945
|
-
* @returns the color as an RGBA tuple, with each color value between 0 and 1,
|
|
946
|
-
* and the alpha value between 0 and 1.
|
|
947
|
-
*/
|
|
948
|
-
get rgba1() {
|
|
949
|
-
return [...this.rgb1, this.rgba255[3]];
|
|
950
|
-
}
|
|
951
|
-
get rgb1() {
|
|
952
|
-
return [this.rgba255[0] / 255, this.rgba255[1] / 255, this.rgba255[2] / 255];
|
|
953
|
-
}
|
|
954
|
-
/** @returns the red value of the color, between 0 and 255. */
|
|
955
|
-
get r() {
|
|
956
|
-
return this.rgba255[0];
|
|
957
|
-
}
|
|
958
|
-
/** @returns the green value of the color, between 0 and 255. */
|
|
959
|
-
get g() {
|
|
960
|
-
return this.rgba255[1];
|
|
961
|
-
}
|
|
962
|
-
/** @returns the blue value of the color, between 0 and 255. */
|
|
963
|
-
get b() {
|
|
964
|
-
return this.rgba255[2];
|
|
965
|
-
}
|
|
966
|
-
/** @returns the alpha value of the color, between 0 and 1. */
|
|
967
|
-
get a() {
|
|
968
|
-
return this.rgba255[3];
|
|
969
|
-
}
|
|
970
|
-
/** @returns true if all RGBA values are 0. */
|
|
971
|
-
get isZero() {
|
|
972
|
-
return this.equals(gt);
|
|
973
|
-
}
|
|
974
|
-
get hsla() {
|
|
975
|
-
return Ln(this.rgba255);
|
|
976
|
-
}
|
|
977
|
-
/**
|
|
978
|
-
* Creates a new color with the given alpha.
|
|
979
|
-
*
|
|
980
|
-
* @param alpha - The alpha value to set. If the value is greater than 1, it will be
|
|
981
|
-
* divided by 100.
|
|
982
|
-
* @returns A new color with the given alpha.
|
|
983
|
-
*/
|
|
984
|
-
setAlpha(e) {
|
|
985
|
-
const [r, n, o] = this.rgba255;
|
|
986
|
-
if (e > 100)
|
|
987
|
-
throw new Error(`Color opacity must be between 0 and 100, got ${e}`);
|
|
988
|
-
return e > 1 && (e /= 100), new b([r, n, o, e]);
|
|
989
|
-
}
|
|
990
|
-
/**
|
|
991
|
-
* @returns the luminance of the color, between 0 and 1.
|
|
992
|
-
*/
|
|
993
|
-
get luminance() {
|
|
994
|
-
const [e, r, n] = this.rgb1.map(
|
|
995
|
-
(o) => o <= 0.03928 ? o / 12.92 : ((o + 0.055) / 1.055) ** 2.4
|
|
996
|
-
);
|
|
997
|
-
return Number((0.2126 * e + 0.7152 * r + 0.0722 * n).toFixed(3));
|
|
998
|
-
}
|
|
999
|
-
/**
|
|
1000
|
-
* @returns the grayness of the color, between 0 and 1.
|
|
1001
|
-
*/
|
|
1002
|
-
get grayness() {
|
|
1003
|
-
const [e, r, n] = this.rgb1;
|
|
1004
|
-
return 1 - (Math.max(e, r, n) - Math.min(e, r, n));
|
|
1005
|
-
}
|
|
1006
|
-
/**
|
|
1007
|
-
* @returns the contrast ratio between this color and the given color. The contrast
|
|
1008
|
-
* ratio is a number between 1 and 21, where 1 is the lowest contrast and 21 is the
|
|
1009
|
-
* highest.
|
|
1010
|
-
* @param other
|
|
1011
|
-
* @returns
|
|
1012
|
-
*/
|
|
1013
|
-
contrast(e) {
|
|
1014
|
-
const r = new b(e), n = this.luminance, o = r.luminance;
|
|
1015
|
-
return (Math.max(n, o) + 0.5) / (Math.min(n, o) + 0.5);
|
|
1016
|
-
}
|
|
1017
|
-
pickByContrast(...e) {
|
|
1018
|
-
if (e.length === 0)
|
|
1019
|
-
throw new Error("[Color.pickByContrast] - must provide at least one color");
|
|
1020
|
-
const [r] = e.map((n) => new b(n)).sort((n, o) => this.contrast(o) - this.contrast(n));
|
|
1021
|
-
return r;
|
|
1022
|
-
}
|
|
1023
|
-
get isDark() {
|
|
1024
|
-
return this.luminance < 0.5;
|
|
1025
|
-
}
|
|
1026
|
-
get isLight() {
|
|
1027
|
-
return !this.isDark;
|
|
1028
|
-
}
|
|
1029
|
-
static fromHex(e, r = 1) {
|
|
1030
|
-
if (!me.safeParse(e).success) throw new Error(`Invalid hex color: ${e}`);
|
|
1031
|
-
return e = Rn(e), [
|
|
1032
|
-
V(e, 0),
|
|
1033
|
-
V(e, 2),
|
|
1034
|
-
V(e, 4),
|
|
1035
|
-
e.length === 8 ? V(e, 6) / 255 : r
|
|
1036
|
-
];
|
|
1037
|
-
}
|
|
1038
|
-
};
|
|
1039
|
-
A(b, "z", i.union([me, He, yt, i.instanceof(b), ft]).transform((e) => new b(e)));
|
|
1040
|
-
let g = b;
|
|
1041
|
-
const gt = new g([0, 0, 0, 0]), D = (t) => Math.floor(t).toString(16).padStart(2, "0"), V = (t, e) => parseInt(t.slice(e, e + 2), 16), Rn = (t) => t.startsWith("#") ? t.slice(1) : t, so = (t) => {
|
|
1042
|
-
let [e, r, n] = t;
|
|
1043
|
-
const o = t[3];
|
|
1044
|
-
e /= 360, r /= 100, n /= 100;
|
|
1045
|
-
let s, u, a;
|
|
1046
|
-
if (r === 0)
|
|
1047
|
-
s = u = a = n;
|
|
1048
|
-
else {
|
|
1049
|
-
const c = n < 0.5 ? n * (1 + r) : n + r - n * r, l = 2 * n - c;
|
|
1050
|
-
s = ae(l, c, e + 1 / 3), u = ae(l, c, e), a = ae(l, c, e - 1 / 3);
|
|
1051
|
-
}
|
|
1052
|
-
return [Math.round(s * 255), Math.round(u * 255), Math.round(a * 255), o];
|
|
1053
|
-
}, ae = (t, e, r) => (r < 0 && (r += 1), r > 1 && (r -= 1), r < 1 / 6 ? t + (e - t) * 6 * r : r < 1 / 2 ? e : r < 2 / 3 ? t + (e - t) * (2 / 3 - r) * 6 : t), Ln = (t) => {
|
|
1054
|
-
let [e, r, n] = t;
|
|
1055
|
-
const o = t[3];
|
|
1056
|
-
e /= 255, r /= 255, n /= 255, e /= 255, r /= 255, n /= 255;
|
|
1057
|
-
const s = Math.max(e, r, n), u = Math.min(e, r, n);
|
|
1058
|
-
let a, c, l = (s + u) / 2;
|
|
1059
|
-
if (s === u)
|
|
1060
|
-
a = c = 0;
|
|
1061
|
-
else {
|
|
1062
|
-
const h = s - u;
|
|
1063
|
-
c = l > 0.5 ? h / (2 - s - u) : h / (s + u), s === e ? a = (r - n) / h + (r < n ? 6 : 0) : s === r ? a = (n - e) / h + 2 : a = (e - r) / h + 4, a /= 6;
|
|
1064
|
-
}
|
|
1065
|
-
return a *= 360, c *= 100, l *= 100, [Math.round(a), Math.round(c), Math.round(l), o];
|
|
1066
|
-
}, _n = i.union([
|
|
1067
|
-
me,
|
|
1068
|
-
He,
|
|
1069
|
-
i.instanceof(g),
|
|
1070
|
-
i.string(),
|
|
1071
|
-
yt,
|
|
1072
|
-
ft
|
|
1073
|
-
]), Pn = i.object({
|
|
1074
|
-
key: i.string(),
|
|
1075
|
-
color: _n,
|
|
1076
|
-
position: i.number(),
|
|
1077
|
-
switched: i.boolean().optional()
|
|
1078
|
-
}), io = i.array(Pn), uo = (t, e) => {
|
|
1079
|
-
if (t.length === 0) return gt;
|
|
1080
|
-
if (t = t.slice().sort((r, n) => r.position - n.position), e <= t[0].position) return new g(t[0].color);
|
|
1081
|
-
if (e >= t[t.length - 1].position)
|
|
1082
|
-
return new g(t[t.length - 1].color);
|
|
1083
|
-
for (let r = 0; r < t.length - 1; r++) {
|
|
1084
|
-
const n = t[r], o = t[r + 1];
|
|
1085
|
-
if (e >= n.position && e <= o.position) {
|
|
1086
|
-
if (e === n.position) return new g(n.color);
|
|
1087
|
-
if (e === o.position) return new g(o.color);
|
|
1088
|
-
const s = (e - n.position) / (o.position - n.position), u = new g(n.color), a = new g(o.color), c = Math.round(u.r + s * (a.r - u.r)), l = Math.round(u.g + s * (a.g - u.g)), h = Math.round(u.b + s * (a.b - u.b)), S = u.a + s * (a.a - u.a);
|
|
1089
|
-
return new g([c, l, h, S]);
|
|
1090
|
-
}
|
|
1091
|
-
}
|
|
1092
|
-
return new g(t[t.length - 1].color);
|
|
1093
|
-
}, Zn = i.object({
|
|
1094
|
-
key: i.string(),
|
|
1095
|
-
name: i.string(),
|
|
1096
|
-
color: g.z
|
|
1097
|
-
}), ao = i.object({
|
|
1098
|
-
key: i.string(),
|
|
1099
|
-
name: i.string(),
|
|
1100
|
-
swatches: i.array(Zn)
|
|
1101
|
-
});
|
|
1102
|
-
class Hn {
|
|
1103
|
-
constructor(e = "") {
|
|
1104
|
-
A(this, "rows", []);
|
|
1105
|
-
A(this, "columns", []);
|
|
1106
|
-
A(this, "prefix");
|
|
1107
|
-
this.prefix = e;
|
|
1108
|
-
}
|
|
1109
|
-
row(e, r, n) {
|
|
1110
|
-
const { prefix: o } = this;
|
|
1111
|
-
return this.rows.push({ startLabel: o + e, endLabel: o + r, size: n }), this;
|
|
1112
|
-
}
|
|
1113
|
-
col(e, r, n) {
|
|
1114
|
-
const { prefix: o } = this;
|
|
1115
|
-
return this.columns.push({ startLabel: o + e, endLabel: o + r, size: n }), this;
|
|
1116
|
-
}
|
|
1117
|
-
build() {
|
|
1118
|
-
return {
|
|
1119
|
-
display: "grid",
|
|
1120
|
-
gridTemplateRows: this.rows.map((e, r) => {
|
|
1121
|
-
let n = r === 0 ? "[" : "";
|
|
1122
|
-
return n += `${e.startLabel}] ${e.size}${typeof e.size == "number" ? "px" : ""} [${e.endLabel}`, n += r === this.rows.length - 1 ? "]" : "", n;
|
|
1123
|
-
}).join(" "),
|
|
1124
|
-
gridTemplateColumns: this.columns.map((e, r) => {
|
|
1125
|
-
let n = r === 0 ? "[" : "";
|
|
1126
|
-
return n += `${e.startLabel}] ${e.size}${typeof e.size == "number" ? "px" : ""} [${e.endLabel}`, n += r === this.columns.length - 1 ? "]" : "", n;
|
|
1127
|
-
}).join(" ")
|
|
1128
|
-
};
|
|
1129
|
-
}
|
|
1130
|
-
}
|
|
1131
|
-
const Wn = (t, e) => Object.entries(e).forEach(
|
|
1132
|
-
([r, n]) => n != null && t.style.setProperty(r, `${n}`)
|
|
1133
|
-
), Yn = (t, e) => Array.from(t.style).forEach((r) => {
|
|
1134
|
-
r.startsWith(e) && t.style.removeProperty(r);
|
|
1135
|
-
}), kn = (t) => {
|
|
1136
|
-
const e = ht(t);
|
|
1137
|
-
return e.visible = (r) => e.M(r ? "visible" : "hidden"), e.expanded = (r) => e.M(r ? "expanded" : "collapsed"), e.loc = (r) => e.M(vr.construct(r)), e.disabled = (r) => r === !0 && e.M("disabled"), e.align = (r) => e.M(r), e.dir = (r) => r != null && e.M(er.construct(r)), e.size = (r) => typeof r == "string" && e.M(r), e.sharp = (r) => r !== !1 && e.M("sharp"), e.rounded = (r) => r !== !1 && e.M("rounded"), e.bordered = (r) => typeof r == "boolean" ? r && e.M("bordered") : r != null ? e.M(`bordered-${r.toString()}`) : e.M("bordered"), e.selected = (r) => r && e.M("selected"), e.altColor = (r) => r && e.M("alt-color"), e.editable = (r) => r && e.M("editable"), e.noSelect = e.M("no-select"), e.noWrap = (r) => r && e.M("no-wrap"), e.applyVars = Wn, e.removeVars = Yn, e.newGridBuilder = (r) => new Hn(r), e.dropRegion = (r) => r && e.B("haul-drop-region"), e.px = (r) => `${r}px`, e.inheritDims = (r = !0) => r && e.M("inherit-dims"), e.shade = (r) => r != null && e.M(`shade-${r}`), e.shadeVar = (r) => {
|
|
1138
|
-
if (r != null)
|
|
1139
|
-
return `var(--${t}-gray-l${r})`;
|
|
1140
|
-
}, e.levelSizeVar = (r) => `var(--${t}-${r}-size)`, e;
|
|
1141
|
-
}, co = kn("pluto");
|
|
1142
|
-
export {
|
|
1143
|
-
eo as $,
|
|
1144
|
-
_t as A,
|
|
1145
|
-
Re as B,
|
|
1146
|
-
co as C,
|
|
1147
|
-
xr as D,
|
|
1148
|
-
sn as E,
|
|
1149
|
-
B as F,
|
|
1150
|
-
Vt as G,
|
|
1151
|
-
qt as H,
|
|
1152
|
-
q as I,
|
|
1153
|
-
Qn as J,
|
|
1154
|
-
vr as K,
|
|
1155
|
-
Bt as L,
|
|
1156
|
-
an as M,
|
|
1157
|
-
Ye as N,
|
|
1158
|
-
Dn as O,
|
|
1159
|
-
fr as P,
|
|
1160
|
-
St as Q,
|
|
1161
|
-
Vn as R,
|
|
1162
|
-
Nt as S,
|
|
1163
|
-
k as T,
|
|
1164
|
-
qn as U,
|
|
1165
|
-
Gn as V,
|
|
1166
|
-
Un as W,
|
|
1167
|
-
re as X,
|
|
1168
|
-
Jn as Y,
|
|
1169
|
-
gt as Z,
|
|
1170
|
-
to as _,
|
|
1171
|
-
g as a,
|
|
1172
|
-
Kn as a0,
|
|
1173
|
-
$n as a1,
|
|
1174
|
-
br as b,
|
|
1175
|
-
oo as c,
|
|
1176
|
-
f as d,
|
|
1177
|
-
E as e,
|
|
1178
|
-
j as f,
|
|
1179
|
-
er as g,
|
|
1180
|
-
on as h,
|
|
1181
|
-
Ee as i,
|
|
1182
|
-
_n as j,
|
|
1183
|
-
uo as k,
|
|
1184
|
-
so as l,
|
|
1185
|
-
io as m,
|
|
1186
|
-
ht as n,
|
|
1187
|
-
no as o,
|
|
1188
|
-
ao as p,
|
|
1189
|
-
ro as q,
|
|
1190
|
-
Nn as r,
|
|
1191
|
-
Pn as s,
|
|
1192
|
-
T as t,
|
|
1193
|
-
rr as u,
|
|
1194
|
-
or as v,
|
|
1195
|
-
dr as w,
|
|
1196
|
-
Be as x,
|
|
1197
|
-
$ as y,
|
|
1198
|
-
p as z
|
|
1199
|
-
};
|