@synnaxlabs/pluto 0.41.0 → 0.42.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{Center-Dr9Np3yZ.js → Center-CNcAEDgS.js} +2 -2
- package/dist/{Center-sJghNsrv.cjs → Center-Map6aflE.cjs} +1 -1
- package/dist/ContextMenu-DmRPxhnI.cjs +1 -0
- package/dist/{ContextMenu-GUed89mt.js → ContextMenu-fLU0wr9S.js} +19 -20
- package/dist/DateTime-CP3OmEGY.cjs +1 -0
- package/dist/{DateTime-DEbT6v4l.js → DateTime-CWAcEwXO.js} +2 -2
- package/dist/{Divider-Bpe7zJig.js → Divider-BTLn5ucU.js} +103 -97
- package/dist/{Divider-CloQr3vQ.cjs → Divider-Dvb6dsgX.cjs} +4 -4
- package/dist/Dropdown-CaGzfZRa.cjs +1 -0
- package/dist/{Dropdown-4Cti-bbQ.js → Dropdown-nw8kRSbl.js} +110 -111
- package/dist/Haul-B8zGWk0I.cjs +1 -0
- package/dist/{Haul-Bw54Yj6J.js → Haul-Cnuzk7Z-.js} +37 -38
- package/dist/Item-BzrQqxRC.cjs +1 -0
- package/dist/{Item-9WCCzBv2.js → Item-FmwC-twg.js} +10 -11
- package/dist/{Keyboard-CZFi6COK.cjs → Keyboard-BfvjkBgh.cjs} +1 -1
- package/dist/{Keyboard-634856lT.js → Keyboard-Cevv7vrQ.js} +2 -2
- package/dist/{Link-fkoogssj.cjs → Link-DI7BZ5dL.cjs} +1 -1
- package/dist/{Link-BEheZd26.js → Link-Dljdu4e9.js} +1 -1
- package/dist/{Pack-D6Z6WuZl.cjs → Pack-lJqoOmHx.cjs} +1 -1
- package/dist/{Pack-DhZO_rza.js → Pack-to0DG2iP.js} +2 -2
- package/dist/Provider-BlM1x1cF.cjs +1 -0
- package/dist/{Provider-UAXPVomG.js → Provider-C_B463cg.js} +301 -292
- package/dist/{Space-DunsWl06.js → Space-C2oZDkE1.js} +1 -1
- package/dist/{Space-BtaH1buB.cjs → Space-DfcVsxz8.cjs} +1 -1
- package/dist/{Text-CaRMYy3U.js → Text-BXADoWYY.js} +54 -52
- package/dist/Text-BiYpGaEZ.js +35 -0
- package/dist/Text-BjHlLKsp.cjs +1 -0
- package/dist/{Text-3PiRcn8q.js → Text-CWiPrDI1.js} +75 -77
- package/dist/Text-DrIBbnml.cjs +1 -0
- package/dist/Text-ZJqK1cI3.cjs +4 -0
- package/dist/{Toggle-CZd8L4GI.js → Toggle-CeUVv58o.js} +102 -104
- package/dist/Toggle-CfwYy9fe.cjs +1 -0
- package/dist/{Video-4XQ1qozd.js → Video-BZ1XTEez.js} +1 -1
- package/dist/{Video-BM9uJLaQ.cjs → Video-C7YoF37-.cjs} +1 -1
- package/dist/WithIcon-DG7VJxsE.cjs +1 -0
- package/dist/WithIcon-pBZ7H9Lq.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-B7c7_G5h.js +4746 -0
- package/dist/css-hg3QdDDt.cjs +15 -0
- package/dist/css.cjs +1 -1
- package/dist/css.js +2 -2
- package/dist/deep-B1etRzze.cjs +1 -0
- package/dist/deep-BytImVW-.js +102 -0
- package/dist/dimensions-Cz-q0Mok.cjs +1 -0
- package/dist/dimensions-DcjW7X3n.js +19 -0
- package/dist/dropdown.cjs +1 -1
- package/dist/dropdown.js +1 -1
- package/dist/eraser-BOx6Xhwn.cjs +11 -0
- package/dist/eraser-Bsb4kKS3.js +1148 -0
- package/dist/ether.cjs +1 -1
- package/dist/ether.js +67 -75
- package/dist/{external-CVGidiDt.js → external-1KJXZcr9.js} +2 -2
- package/dist/{external-DVajt6X6.cjs → external-BHHC7TQ_.cjs} +1 -1
- package/dist/external-BLEs2AYM.cjs +46 -0
- package/dist/external-BdVuZd3H.cjs +1 -0
- package/dist/external-BiBhgCdz.cjs +1 -0
- package/dist/external-C75Z9Zbn.cjs +1 -0
- package/dist/external-CEfSeJMr.js +432 -0
- package/dist/external-CLTPcWrI.cjs +1 -0
- package/dist/{external-C0ZRdtdj.js → external-CRNR1bD0.js} +28 -28
- package/dist/{external-CnxSp7fm.cjs → external-Cfj1plcw.cjs} +1 -1
- package/dist/{external-DNF8yEwq.js → external-Ck1rVwUu.js} +27 -28
- package/dist/external-Cni9ftkW.cjs +1 -0
- package/dist/{external-BlUic3Vz.js → external-DCcp3sQD.js} +7 -8
- package/dist/{external-B-Cao-ae.cjs → external-DCfs7IFi.cjs} +1 -1
- package/dist/external-DDD_nc3x.js +400 -0
- package/dist/external-DNT-gmZx.cjs +1 -0
- package/dist/{external-BY2AjzRx.js → external-DeCeUbqe.js} +20 -19
- package/dist/{external-BFOrrNde.js → external-DgSaeiBz.js} +3 -3
- package/dist/{external-kZf9CjYn.cjs → external-DhfASB4W.cjs} +37 -37
- package/dist/{external-BCUxzSzk.js → external-bkwgRzLc.js} +9 -10
- package/dist/{external-BIwhkj24.js → external-hgzjVlDR.js} +1996 -2011
- package/dist/external-pUEPQrp_.cjs +1 -0
- package/dist/{external-CH66YjTZ.js → external-qwaFowDe.js} +12 -13
- package/dist/{external-BbrPEGJw.js → external-sUHGRdqd.js} +2 -2
- package/dist/{font-DCE90lco.cjs → font-BFTKtIQk.cjs} +1 -1
- package/dist/{font-BXKdXsr5.js → font-Crn-D_ua.js} +2 -2
- package/dist/{fontString-BBvH9Ypy.cjs → fontString-DQLaRHQV.cjs} +1 -1
- package/dist/{fontString-C7Q9Laqk.js → fontString-DjnDxFrE.js} +1 -1
- package/dist/header.cjs +1 -1
- package/dist/header.js +1 -1
- package/dist/hooks-CM9HWxYc.js +296 -0
- package/dist/hooks-CTKCi-OE.cjs +1 -0
- package/dist/index.cjs +7 -7
- package/dist/index.js +8599 -8514
- 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-BDFfcHVT.js +12851 -0
- package/dist/provider-XPRFhwnl.cjs +58 -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 +8 -100
- 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 +38 -153
- 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 +21 -74
- 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 +79 -321
- 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 +49 -257
- package/dist/src/telem/control/aether/indicator.d.ts.map +1 -1
- package/dist/src/telem/control/aether/legend.d.ts +18 -132
- package/dist/src/telem/control/aether/legend.d.ts.map +1 -1
- package/dist/src/telem/control/aether/state.d.ts +10 -44
- 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 +755 -5891
- package/dist/src/theming/aether/provider.d.ts.map +1 -1
- package/dist/src/theming/core/theme.d.ts +314 -1848
- 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 +17 -48
- 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 +29 -249
- 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 +18 -101
- 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 +51 -191
- package/dist/src/vis/lineplot/aether/XAxis.d.ts.map +1 -1
- package/dist/src/vis/lineplot/aether/YAxis.d.ts +49 -194
- package/dist/src/vis/lineplot/aether/YAxis.d.ts.map +1 -1
- package/dist/src/vis/lineplot/aether/axis.d.ts +27 -98
- 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 +17 -154
- 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 +82 -461
- package/dist/src/vis/log/aether/Log.d.ts.map +1 -1
- package/dist/src/vis/measure/aether/measure.d.ts +24 -249
- 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 +8 -57
- 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 +144 -569
- package/dist/src/vis/value/aether/value.d.ts.map +1 -1
- package/dist/src/vis/value/use.d.ts +55 -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-CKKNRQlP.cjs +1 -0
- package/dist/units-a8CggrTe.js +11 -0
- package/dist/{useClickOutside-BYjsXGgb.js → useClickOutside-CKMnqdvH.js} +29 -30
- package/dist/useClickOutside-CPAEkvf8.cjs +1 -0
- package/dist/{useDebouncedCallback-Dg4BDGP-.js → useDebouncedCallback-Cyd6pZ59.js} +1 -1
- package/dist/useDebouncedCallback-DsKlBI86.cjs +1 -0
- package/dist/{useMemoCompare-BEDaTIXL.js → useMemoCompare-B930TM0g.js} +2 -2
- package/dist/useMemoCompare-DprA41gC.cjs +1 -0
- package/dist/{useVirtualCursorDragWebKit-BixysrXI.js → useVirtualCursorDragWebKit-BrSOJpYY.js} +22 -23
- package/dist/useVirtualCursorDragWebKit-Cvp93Pya.cjs +1 -0
- package/dist/value-B7u8K1CW.cjs +57 -0
- package/dist/value-BdZLWVof.js +5974 -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-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/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
|
@@ -0,0 +1,1148 @@
|
|
|
1
|
+
var V = Object.defineProperty;
|
|
2
|
+
var $ = (h, t, e) => t in h ? V(h, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : h[t] = e;
|
|
3
|
+
var n = (h, t, e) => $(h, typeof t != "symbol" ? t + "" : t, e);
|
|
4
|
+
import { $ as c, s as x, J as f, _ as G, z as y, b as K, C as H } from "./css-B7c7_G5h.js";
|
|
5
|
+
import { z as m } from "zod";
|
|
6
|
+
import { h as _, j as J, Q as Z, L as Q } from "./provider-BDFfcHVT.js";
|
|
7
|
+
import { a as M } from "./dimensions-DcjW7X3n.js";
|
|
8
|
+
const j = m.object({
|
|
9
|
+
include: m.string().array().optional(),
|
|
10
|
+
exclude: m.string().array().optional(),
|
|
11
|
+
level: m.enum(_.LOG_LEVELS).optional().default("info")
|
|
12
|
+
}), A = "alamos-provider";
|
|
13
|
+
class b extends J {
|
|
14
|
+
constructor() {
|
|
15
|
+
super(...arguments);
|
|
16
|
+
n(this, "schema", j);
|
|
17
|
+
}
|
|
18
|
+
afterUpdate(e) {
|
|
19
|
+
if (e.getOptional(A) != null) return;
|
|
20
|
+
const i = [], { include: r, exclude: a, level: l } = this.state;
|
|
21
|
+
(r != null || a != null) && i.push(_.logLevelKeyFiler({ include: r, exclude: a })), l != null && i.push(_.logThresholdFilter(l)), i.length === 0 && i.push(() => !1), this.internal.ins = new _.Instrumentation({
|
|
22
|
+
key: "aether",
|
|
23
|
+
logger: new _.Logger({ filters: i })
|
|
24
|
+
}), e.set(A, this.internal.ins);
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
n(b, "TYPE", "alamos.Provider");
|
|
28
|
+
const tt = (h, t) => {
|
|
29
|
+
const e = h.get(A);
|
|
30
|
+
if (e == null) throw new Error("No instrumentation provider");
|
|
31
|
+
return t == null ? e : e.child(t);
|
|
32
|
+
}, St = {
|
|
33
|
+
[b.TYPE]: b
|
|
34
|
+
}, E = (h, t) => c.construct(
|
|
35
|
+
c.left(h) - t.x,
|
|
36
|
+
c.top(h) - t.y,
|
|
37
|
+
c.width(h) + t.x * 2,
|
|
38
|
+
c.height(h) + t.y * 2
|
|
39
|
+
);
|
|
40
|
+
class R {
|
|
41
|
+
constructor(t, e, s, i = x.XY.IDENTITY) {
|
|
42
|
+
n(this, "scale_");
|
|
43
|
+
n(this, "wrapped");
|
|
44
|
+
n(this, "atlasRegistry");
|
|
45
|
+
n(this, "cachedFont", null);
|
|
46
|
+
n(this, "cachedFillStyle", null);
|
|
47
|
+
n(this, "cachedStrokeStyle", null);
|
|
48
|
+
n(this, "cachedLineWidth", null);
|
|
49
|
+
n(this, "cachedGlobalAlpha", null);
|
|
50
|
+
n(this, "cachedTextAlign", null);
|
|
51
|
+
n(this, "cachedTextBaseline", null);
|
|
52
|
+
n(this, "cachedLineCap", null);
|
|
53
|
+
n(this, "cachedLineJoin", null);
|
|
54
|
+
n(this, "cachedMiterLimit", null);
|
|
55
|
+
n(this, "dpr");
|
|
56
|
+
this.wrapped = t, this.scale_ = i, this.atlasRegistry = e, this.dpr = s;
|
|
57
|
+
}
|
|
58
|
+
get fontStretch() {
|
|
59
|
+
return this.wrapped.fontStretch;
|
|
60
|
+
}
|
|
61
|
+
set fontStretch(t) {
|
|
62
|
+
this.wrapped.fontStretch = t;
|
|
63
|
+
}
|
|
64
|
+
get fontVariantCaps() {
|
|
65
|
+
return this.wrapped.fontVariantCaps;
|
|
66
|
+
}
|
|
67
|
+
set fontVariantCaps(t) {
|
|
68
|
+
this.wrapped.fontVariantCaps = t;
|
|
69
|
+
}
|
|
70
|
+
isContextLost() {
|
|
71
|
+
return this.wrapped.isContextLost();
|
|
72
|
+
}
|
|
73
|
+
get wordSpacing() {
|
|
74
|
+
return this.wrapped.wordSpacing;
|
|
75
|
+
}
|
|
76
|
+
set wordSpacing(t) {
|
|
77
|
+
this.wrapped.wordSpacing = t;
|
|
78
|
+
}
|
|
79
|
+
get letterSpacing() {
|
|
80
|
+
return this.wrapped.letterSpacing;
|
|
81
|
+
}
|
|
82
|
+
set letterSpacing(t) {
|
|
83
|
+
this.wrapped.letterSpacing = t;
|
|
84
|
+
}
|
|
85
|
+
get textRendering() {
|
|
86
|
+
return this.wrapped.textRendering;
|
|
87
|
+
}
|
|
88
|
+
set textRendering(t) {
|
|
89
|
+
this.wrapped.textRendering = t;
|
|
90
|
+
}
|
|
91
|
+
reset() {
|
|
92
|
+
this.wrapped.reset();
|
|
93
|
+
}
|
|
94
|
+
applyScale(t) {
|
|
95
|
+
return new R(
|
|
96
|
+
this,
|
|
97
|
+
this.atlasRegistry,
|
|
98
|
+
this.dpr,
|
|
99
|
+
t
|
|
100
|
+
);
|
|
101
|
+
}
|
|
102
|
+
get canvas() {
|
|
103
|
+
return this.wrapped.canvas;
|
|
104
|
+
}
|
|
105
|
+
get miterLimit() {
|
|
106
|
+
return this.cachedMiterLimit ?? this.wrapped.miterLimit;
|
|
107
|
+
}
|
|
108
|
+
set miterLimit(t) {
|
|
109
|
+
const e = this.scale_.x.dim(t);
|
|
110
|
+
e !== this.cachedMiterLimit && (this.cachedMiterLimit = e, this.wrapped.miterLimit = e);
|
|
111
|
+
}
|
|
112
|
+
get globalAlpha() {
|
|
113
|
+
return this.cachedGlobalAlpha ?? this.wrapped.globalAlpha;
|
|
114
|
+
}
|
|
115
|
+
set globalAlpha(t) {
|
|
116
|
+
t !== this.cachedGlobalAlpha && (this.cachedGlobalAlpha = t, this.wrapped.globalAlpha = t);
|
|
117
|
+
}
|
|
118
|
+
get globalCompositeOperation() {
|
|
119
|
+
return this.wrapped.globalCompositeOperation;
|
|
120
|
+
}
|
|
121
|
+
set globalCompositeOperation(t) {
|
|
122
|
+
this.wrapped.globalCompositeOperation = t;
|
|
123
|
+
}
|
|
124
|
+
get fillStyle() {
|
|
125
|
+
return this.cachedFillStyle ?? this.wrapped.fillStyle;
|
|
126
|
+
}
|
|
127
|
+
set fillStyle(t) {
|
|
128
|
+
t !== this.cachedFillStyle && (this.cachedFillStyle = t, this.wrapped.fillStyle = t);
|
|
129
|
+
}
|
|
130
|
+
get strokeStyle() {
|
|
131
|
+
return this.cachedStrokeStyle ?? this.wrapped.strokeStyle;
|
|
132
|
+
}
|
|
133
|
+
set strokeStyle(t) {
|
|
134
|
+
t !== this.cachedStrokeStyle && (this.cachedStrokeStyle = t, this.wrapped.strokeStyle = t);
|
|
135
|
+
}
|
|
136
|
+
drawImage(t, e, s, i, r, a, l, p, d) {
|
|
137
|
+
this.wrapped.drawImage(
|
|
138
|
+
t,
|
|
139
|
+
e,
|
|
140
|
+
s,
|
|
141
|
+
i,
|
|
142
|
+
r,
|
|
143
|
+
a != null ? this.scale_.x.pos(a) : a,
|
|
144
|
+
l != null ? this.scale_.y.pos(l) : l,
|
|
145
|
+
p != null ? this.scale_.x.dim(p) : p,
|
|
146
|
+
d != null ? this.scale_.y.dim(d) : d
|
|
147
|
+
);
|
|
148
|
+
}
|
|
149
|
+
beginPath() {
|
|
150
|
+
this.wrapped.beginPath();
|
|
151
|
+
}
|
|
152
|
+
clip(t, e) {
|
|
153
|
+
this.wrapped.clip(t, e);
|
|
154
|
+
}
|
|
155
|
+
fill(t, e) {
|
|
156
|
+
if (t == null) return this.wrapped.fill();
|
|
157
|
+
this.wrapped.fill(t, e);
|
|
158
|
+
}
|
|
159
|
+
isPointInPath(t, e, s, i) {
|
|
160
|
+
return this.wrapped.isPointInPath(t, e, s, i);
|
|
161
|
+
}
|
|
162
|
+
isPointInStroke(t, e, s) {
|
|
163
|
+
return this.wrapped.isPointInStroke(t, e, s);
|
|
164
|
+
}
|
|
165
|
+
stroke(t) {
|
|
166
|
+
if (t == null) return this.wrapped.stroke();
|
|
167
|
+
this.wrapped.stroke(t);
|
|
168
|
+
}
|
|
169
|
+
createConicGradient(t, e, s) {
|
|
170
|
+
return this.wrapped.createConicGradient(t, e, s);
|
|
171
|
+
}
|
|
172
|
+
createLinearGradient(t, e, s, i) {
|
|
173
|
+
return this.wrapped.createLinearGradient(t, e, s, i);
|
|
174
|
+
}
|
|
175
|
+
createPattern(t, e) {
|
|
176
|
+
return this.wrapped.createPattern(t, e);
|
|
177
|
+
}
|
|
178
|
+
createRadialGradient(t, e, s, i, r, a) {
|
|
179
|
+
return this.wrapped.createRadialGradient(t, e, s, i, r, a);
|
|
180
|
+
}
|
|
181
|
+
get filter() {
|
|
182
|
+
return this.wrapped.filter;
|
|
183
|
+
}
|
|
184
|
+
set filter(t) {
|
|
185
|
+
this.wrapped.filter = t;
|
|
186
|
+
}
|
|
187
|
+
createImageData(t, e, s) {
|
|
188
|
+
return this.wrapped.createImageData(t, e, s);
|
|
189
|
+
}
|
|
190
|
+
getImageData(t, e, s, i, r) {
|
|
191
|
+
return this.wrapped.getImageData(t, e, s, i, r);
|
|
192
|
+
}
|
|
193
|
+
putImageData(t, e, s, i, r, a, l) {
|
|
194
|
+
this.wrapped.putImageData(
|
|
195
|
+
// @ts-expect-error - typescript overloads cause issues here
|
|
196
|
+
t,
|
|
197
|
+
e,
|
|
198
|
+
s,
|
|
199
|
+
i,
|
|
200
|
+
r,
|
|
201
|
+
a,
|
|
202
|
+
l
|
|
203
|
+
);
|
|
204
|
+
}
|
|
205
|
+
get imageSmoothingEnabled() {
|
|
206
|
+
return this.wrapped.imageSmoothingEnabled;
|
|
207
|
+
}
|
|
208
|
+
set imageSmoothingEnabled(t) {
|
|
209
|
+
this.wrapped.imageSmoothingEnabled = t;
|
|
210
|
+
}
|
|
211
|
+
get imageSmoothingQuality() {
|
|
212
|
+
return this.wrapped.imageSmoothingQuality;
|
|
213
|
+
}
|
|
214
|
+
set imageSmoothingQuality(t) {
|
|
215
|
+
this.wrapped.imageSmoothingQuality = t;
|
|
216
|
+
}
|
|
217
|
+
arc(t, e, s, i, r, a) {
|
|
218
|
+
this.wrapped.arc(
|
|
219
|
+
this.scale_.x.pos(t),
|
|
220
|
+
this.scale_.y.pos(e),
|
|
221
|
+
this.scale_.x.dim(s),
|
|
222
|
+
i,
|
|
223
|
+
r,
|
|
224
|
+
a
|
|
225
|
+
);
|
|
226
|
+
}
|
|
227
|
+
arcTo(t, e, s, i, r) {
|
|
228
|
+
this.wrapped.arcTo(
|
|
229
|
+
this.scale_.x.pos(t),
|
|
230
|
+
this.scale_.y.pos(e),
|
|
231
|
+
this.scale_.x.pos(s),
|
|
232
|
+
this.scale_.y.pos(i),
|
|
233
|
+
this.scale_.x.dim(r)
|
|
234
|
+
);
|
|
235
|
+
}
|
|
236
|
+
bezierCurveTo(t, e, s, i, r, a) {
|
|
237
|
+
this.wrapped.bezierCurveTo(
|
|
238
|
+
this.scale_.x.pos(t),
|
|
239
|
+
this.scale_.y.pos(e),
|
|
240
|
+
this.scale_.x.pos(s),
|
|
241
|
+
this.scale_.y.pos(i),
|
|
242
|
+
this.scale_.x.pos(r),
|
|
243
|
+
this.scale_.y.pos(a)
|
|
244
|
+
);
|
|
245
|
+
}
|
|
246
|
+
closePath() {
|
|
247
|
+
this.wrapped.closePath();
|
|
248
|
+
}
|
|
249
|
+
ellipse(t, e, s, i, r, a, l, p) {
|
|
250
|
+
this.wrapped.ellipse(
|
|
251
|
+
this.scale_.x.pos(t),
|
|
252
|
+
this.scale_.y.pos(e),
|
|
253
|
+
this.scale_.x.dim(s),
|
|
254
|
+
this.scale_.y.dim(i),
|
|
255
|
+
r,
|
|
256
|
+
a,
|
|
257
|
+
l,
|
|
258
|
+
p
|
|
259
|
+
);
|
|
260
|
+
}
|
|
261
|
+
lineTo(t, e) {
|
|
262
|
+
this.wrapped.lineTo(this.scale_.x.pos(t), this.scale_.y.pos(e));
|
|
263
|
+
}
|
|
264
|
+
moveTo(t, e) {
|
|
265
|
+
this.wrapped.moveTo(this.scale_.x.pos(t), this.scale_.y.pos(e));
|
|
266
|
+
}
|
|
267
|
+
quadraticCurveTo(t, e, s, i) {
|
|
268
|
+
this.wrapped.quadraticCurveTo(
|
|
269
|
+
this.scale_.x.pos(t),
|
|
270
|
+
this.scale_.y.pos(e),
|
|
271
|
+
this.scale_.x.pos(s),
|
|
272
|
+
this.scale_.y.pos(i)
|
|
273
|
+
);
|
|
274
|
+
}
|
|
275
|
+
rect(t, e, s, i) {
|
|
276
|
+
this.wrapped.rect(
|
|
277
|
+
this.scale_.x.pos(t),
|
|
278
|
+
this.scale_.y.pos(e),
|
|
279
|
+
this.scale_.x.dim(s),
|
|
280
|
+
this.scale_.y.dim(i)
|
|
281
|
+
);
|
|
282
|
+
}
|
|
283
|
+
roundRect(t, e, s, i, r) {
|
|
284
|
+
this.wrapped.roundRect(
|
|
285
|
+
this.scale_.x.pos(t),
|
|
286
|
+
this.scale_.y.pos(e),
|
|
287
|
+
this.scale_.x.dim(s),
|
|
288
|
+
this.scale_.y.dim(i),
|
|
289
|
+
typeof r == "number" ? this.scale_.x.dim(r) : r
|
|
290
|
+
);
|
|
291
|
+
}
|
|
292
|
+
get lineCap() {
|
|
293
|
+
return this.cachedLineCap ?? this.wrapped.lineCap;
|
|
294
|
+
}
|
|
295
|
+
set lineCap(t) {
|
|
296
|
+
t !== this.cachedLineCap && (this.cachedLineCap = t, this.wrapped.lineCap = t);
|
|
297
|
+
}
|
|
298
|
+
get lineDashOffset() {
|
|
299
|
+
return this.wrapped.lineDashOffset;
|
|
300
|
+
}
|
|
301
|
+
set lineDashOffset(t) {
|
|
302
|
+
this.wrapped.lineDashOffset = this.scale_.x.dim(t);
|
|
303
|
+
}
|
|
304
|
+
get lineJoin() {
|
|
305
|
+
return this.cachedLineJoin ?? this.wrapped.lineJoin;
|
|
306
|
+
}
|
|
307
|
+
set lineJoin(t) {
|
|
308
|
+
t !== this.cachedLineJoin && (this.cachedLineJoin = t, this.wrapped.lineJoin = t);
|
|
309
|
+
}
|
|
310
|
+
get lineWidth() {
|
|
311
|
+
return this.cachedLineWidth ?? this.wrapped.lineWidth;
|
|
312
|
+
}
|
|
313
|
+
set lineWidth(t) {
|
|
314
|
+
const e = this.scale_.x.dim(t);
|
|
315
|
+
e !== this.cachedLineWidth && (this.cachedLineWidth = e, this.wrapped.lineWidth = e);
|
|
316
|
+
}
|
|
317
|
+
getLineDash() {
|
|
318
|
+
return this.wrapped.getLineDash();
|
|
319
|
+
}
|
|
320
|
+
setLineDash(t) {
|
|
321
|
+
const e = Array.from(t).map((s) => this.scale_.x.dim(s));
|
|
322
|
+
this.wrapped.setLineDash(e);
|
|
323
|
+
}
|
|
324
|
+
clearRect(t, e, s, i) {
|
|
325
|
+
this.wrapped.clearRect(t, e, s, i);
|
|
326
|
+
}
|
|
327
|
+
fillRect(t, e, s, i) {
|
|
328
|
+
this.wrapped.fillRect(
|
|
329
|
+
this.scale_.x.pos(t),
|
|
330
|
+
this.scale_.y.pos(e),
|
|
331
|
+
this.scale_.x.dim(s),
|
|
332
|
+
this.scale_.y.dim(i)
|
|
333
|
+
);
|
|
334
|
+
}
|
|
335
|
+
strokeRect(t, e, s, i) {
|
|
336
|
+
this.wrapped.strokeRect(
|
|
337
|
+
this.scale_.x.pos(t),
|
|
338
|
+
this.scale_.y.pos(e),
|
|
339
|
+
this.scale_.x.dim(s),
|
|
340
|
+
this.scale_.y.dim(i)
|
|
341
|
+
);
|
|
342
|
+
}
|
|
343
|
+
get shadowBlur() {
|
|
344
|
+
return this.wrapped.shadowBlur;
|
|
345
|
+
}
|
|
346
|
+
set shadowBlur(t) {
|
|
347
|
+
this.wrapped.shadowBlur = t;
|
|
348
|
+
}
|
|
349
|
+
get shadowColor() {
|
|
350
|
+
return this.wrapped.shadowColor;
|
|
351
|
+
}
|
|
352
|
+
set shadowColor(t) {
|
|
353
|
+
this.wrapped.shadowColor = t;
|
|
354
|
+
}
|
|
355
|
+
get shadowOffsetX() {
|
|
356
|
+
return this.wrapped.shadowOffsetX;
|
|
357
|
+
}
|
|
358
|
+
set shadowOffsetX(t) {
|
|
359
|
+
this.wrapped.shadowOffsetX = t;
|
|
360
|
+
}
|
|
361
|
+
get shadowOffsetY() {
|
|
362
|
+
return this.wrapped.shadowOffsetY;
|
|
363
|
+
}
|
|
364
|
+
restore() {
|
|
365
|
+
this.cachedFillStyle = null, this.cachedStrokeStyle = null, this.cachedLineWidth = null, this.cachedGlobalAlpha = null, this.cachedTextAlign = null, this.cachedTextBaseline = null, this.cachedLineCap = null, this.cachedLineJoin = null, this.cachedMiterLimit = null, this.cachedFont = null, this.wrapped.restore();
|
|
366
|
+
}
|
|
367
|
+
save() {
|
|
368
|
+
this.wrapped.save();
|
|
369
|
+
}
|
|
370
|
+
fillText(t, e, s, i, r = {}) {
|
|
371
|
+
const { useAtlas: a } = r;
|
|
372
|
+
if (a == !0) {
|
|
373
|
+
this.atlasRegistry.get({
|
|
374
|
+
font: this.font,
|
|
375
|
+
textColor: this.fillStyle,
|
|
376
|
+
dpr: this.dpr
|
|
377
|
+
}).fillText(this, t, e, s);
|
|
378
|
+
return;
|
|
379
|
+
}
|
|
380
|
+
this.wrapped.fillText(
|
|
381
|
+
t,
|
|
382
|
+
this.scale_.x.pos(e),
|
|
383
|
+
this.scale_.y.pos(s),
|
|
384
|
+
i != null ? this.scale_.x.dim(i) : void 0
|
|
385
|
+
);
|
|
386
|
+
}
|
|
387
|
+
atlasMeasureText(t) {
|
|
388
|
+
return this.atlasRegistry.get({
|
|
389
|
+
font: this.font,
|
|
390
|
+
textColor: this.fillStyle,
|
|
391
|
+
dpr: this.dpr
|
|
392
|
+
}).measureText(t);
|
|
393
|
+
}
|
|
394
|
+
measureText(t) {
|
|
395
|
+
return this.wrapped.measureText(t);
|
|
396
|
+
}
|
|
397
|
+
textDimensions(t, e = {}) {
|
|
398
|
+
const { useAtlas: s } = e;
|
|
399
|
+
let i;
|
|
400
|
+
return s ? i = this.atlasMeasureText(t) : i = M(this.measureText(t)), i;
|
|
401
|
+
}
|
|
402
|
+
strokeText(t, e, s, i) {
|
|
403
|
+
this.wrapped.strokeText(
|
|
404
|
+
t,
|
|
405
|
+
this.scale_.x.pos(e),
|
|
406
|
+
this.scale_.y.pos(s),
|
|
407
|
+
i != null ? this.scale_.x.dim(i) : void 0
|
|
408
|
+
);
|
|
409
|
+
}
|
|
410
|
+
get direction() {
|
|
411
|
+
return this.wrapped.direction;
|
|
412
|
+
}
|
|
413
|
+
set direction(t) {
|
|
414
|
+
this.wrapped.direction = t;
|
|
415
|
+
}
|
|
416
|
+
get font() {
|
|
417
|
+
return this.cachedFont != null ? this.cachedFont : this.wrapped.font;
|
|
418
|
+
}
|
|
419
|
+
set font(t) {
|
|
420
|
+
t !== this.cachedFont && (this.cachedFont = t, this.wrapped.font = this.cachedFont);
|
|
421
|
+
}
|
|
422
|
+
get fontKerning() {
|
|
423
|
+
return this.wrapped.fontKerning;
|
|
424
|
+
}
|
|
425
|
+
set fontKerning(t) {
|
|
426
|
+
this.wrapped.fontKerning = t;
|
|
427
|
+
}
|
|
428
|
+
get textAlign() {
|
|
429
|
+
return this.cachedTextAlign ?? this.wrapped.textAlign;
|
|
430
|
+
}
|
|
431
|
+
set textAlign(t) {
|
|
432
|
+
t !== this.cachedTextAlign && (this.cachedTextAlign = t, this.wrapped.textAlign = t);
|
|
433
|
+
}
|
|
434
|
+
get textBaseline() {
|
|
435
|
+
return this.cachedTextBaseline ?? this.wrapped.textBaseline;
|
|
436
|
+
}
|
|
437
|
+
set textBaseline(t) {
|
|
438
|
+
t !== this.cachedTextBaseline && (this.cachedTextBaseline = t, this.wrapped.textBaseline = t);
|
|
439
|
+
}
|
|
440
|
+
getTransform() {
|
|
441
|
+
return this.wrapped.getTransform();
|
|
442
|
+
}
|
|
443
|
+
resetTransform() {
|
|
444
|
+
this.wrapped.resetTransform();
|
|
445
|
+
}
|
|
446
|
+
rotate(t) {
|
|
447
|
+
this.wrapped.rotate(t);
|
|
448
|
+
}
|
|
449
|
+
scale(t, e) {
|
|
450
|
+
this.wrapped.scale(t, e), this.dpr = t;
|
|
451
|
+
}
|
|
452
|
+
scissor(t, e = f.ZERO) {
|
|
453
|
+
const s = new et(this.scale_);
|
|
454
|
+
return t = E(t, e), s.rect(...f.couple(c.topLeft(t)), ...G.couple(c.dims(t))), this.save(), this.clip(s.getPath()), () => this.restore();
|
|
455
|
+
}
|
|
456
|
+
setTransform(t, e, s, i, r, a) {
|
|
457
|
+
this.wrapped.setTransform(t, e, s, i, r, a);
|
|
458
|
+
}
|
|
459
|
+
transform(t, e, s, i, r, a) {
|
|
460
|
+
this.wrapped.transform(t, e, s, i, r, a);
|
|
461
|
+
}
|
|
462
|
+
translate(t, e) {
|
|
463
|
+
this.wrapped.translate(t, e);
|
|
464
|
+
}
|
|
465
|
+
}
|
|
466
|
+
class et {
|
|
467
|
+
constructor(t = x.XY.IDENTITY, e) {
|
|
468
|
+
n(this, "scale_");
|
|
469
|
+
n(this, "path");
|
|
470
|
+
this.scale_ = t, e instanceof Path2D || typeof e == "string" ? this.path = new Path2D(e) : this.path = new Path2D();
|
|
471
|
+
}
|
|
472
|
+
addPath(t, e) {
|
|
473
|
+
this.path.addPath(t, e);
|
|
474
|
+
}
|
|
475
|
+
arc(t, e, s, i, r, a) {
|
|
476
|
+
this.path.arc(
|
|
477
|
+
this.scale_.x.pos(t),
|
|
478
|
+
this.scale_.y.pos(e),
|
|
479
|
+
this.scale_.x.dim(s),
|
|
480
|
+
i,
|
|
481
|
+
r,
|
|
482
|
+
a
|
|
483
|
+
);
|
|
484
|
+
}
|
|
485
|
+
arcTo(t, e, s, i, r) {
|
|
486
|
+
this.path.arcTo(
|
|
487
|
+
this.scale_.x.pos(t),
|
|
488
|
+
this.scale_.y.pos(e),
|
|
489
|
+
this.scale_.x.pos(s),
|
|
490
|
+
this.scale_.y.pos(i),
|
|
491
|
+
this.scale_.x.dim(r)
|
|
492
|
+
);
|
|
493
|
+
}
|
|
494
|
+
bezierCurveTo(t, e, s, i, r, a) {
|
|
495
|
+
this.path.bezierCurveTo(
|
|
496
|
+
this.scale_.x.pos(t),
|
|
497
|
+
this.scale_.y.pos(e),
|
|
498
|
+
this.scale_.x.pos(s),
|
|
499
|
+
this.scale_.y.pos(i),
|
|
500
|
+
this.scale_.x.pos(r),
|
|
501
|
+
this.scale_.y.pos(a)
|
|
502
|
+
);
|
|
503
|
+
}
|
|
504
|
+
closePath() {
|
|
505
|
+
this.path.closePath();
|
|
506
|
+
}
|
|
507
|
+
ellipse(t, e, s, i, r, a, l, p) {
|
|
508
|
+
this.path.ellipse(
|
|
509
|
+
this.scale_.x.pos(t),
|
|
510
|
+
this.scale_.y.pos(e),
|
|
511
|
+
this.scale_.x.dim(s),
|
|
512
|
+
this.scale_.y.dim(i),
|
|
513
|
+
r,
|
|
514
|
+
a,
|
|
515
|
+
l,
|
|
516
|
+
p
|
|
517
|
+
);
|
|
518
|
+
}
|
|
519
|
+
lineTo(t, e) {
|
|
520
|
+
this.path.lineTo(this.scale_.x.pos(t), this.scale_.y.pos(e));
|
|
521
|
+
}
|
|
522
|
+
moveTo(t, e) {
|
|
523
|
+
this.path.moveTo(this.scale_.x.pos(t), this.scale_.y.pos(e));
|
|
524
|
+
}
|
|
525
|
+
quadraticCurveTo(t, e, s, i) {
|
|
526
|
+
this.path.quadraticCurveTo(
|
|
527
|
+
this.scale_.x.pos(t),
|
|
528
|
+
this.scale_.y.pos(e),
|
|
529
|
+
this.scale_.x.pos(s),
|
|
530
|
+
this.scale_.y.pos(i)
|
|
531
|
+
);
|
|
532
|
+
}
|
|
533
|
+
rect(t, e, s, i) {
|
|
534
|
+
this.path.rect(
|
|
535
|
+
this.scale_.x.pos(t),
|
|
536
|
+
this.scale_.y.pos(e),
|
|
537
|
+
this.scale_.x.dim(s),
|
|
538
|
+
this.scale_.y.dim(i)
|
|
539
|
+
);
|
|
540
|
+
}
|
|
541
|
+
roundRect(t, e, s, i, r) {
|
|
542
|
+
const a = this.scaleRadii(r);
|
|
543
|
+
this.path.roundRect(
|
|
544
|
+
this.scale_.x.pos(t),
|
|
545
|
+
this.scale_.y.pos(e),
|
|
546
|
+
this.scale_.x.dim(s),
|
|
547
|
+
this.scale_.y.dim(i),
|
|
548
|
+
a
|
|
549
|
+
);
|
|
550
|
+
}
|
|
551
|
+
// Helper method to scale radii for roundRect
|
|
552
|
+
scaleRadii(t) {
|
|
553
|
+
return t == null ? t : typeof t == "number" ? this.scale_.x.dim(t) : Array.isArray(t) ? t.map((e) => this.scaleRadius(e)) : this.scaleRadius(t);
|
|
554
|
+
}
|
|
555
|
+
scaleRadius(t) {
|
|
556
|
+
return typeof t == "number" ? this.scale_.x.dim(t) : {
|
|
557
|
+
x: this.scale_.x.dim(t.x ?? 0),
|
|
558
|
+
y: this.scale_.y.dim(t.y ?? 0)
|
|
559
|
+
};
|
|
560
|
+
}
|
|
561
|
+
// Method to retrieve the underlying Path2D
|
|
562
|
+
getPath() {
|
|
563
|
+
return this.path;
|
|
564
|
+
}
|
|
565
|
+
}
|
|
566
|
+
const st = `precision mediump float;
|
|
567
|
+
|
|
568
|
+
void main(void) {
|
|
569
|
+
gl_FragColor = vec4(0.0, 0.0, 0.0, 0.0);
|
|
570
|
+
}
|
|
571
|
+
`, it = `attribute vec4 a_position;
|
|
572
|
+
|
|
573
|
+
void main(void) {
|
|
574
|
+
gl_Position = a_position;
|
|
575
|
+
}
|
|
576
|
+
`, k = (h) => new Error(`failed to compile webgl program: ${h}`), rt = new Error("null shader encountered");
|
|
577
|
+
let at = class {
|
|
578
|
+
/**
|
|
579
|
+
* @constructor compiles the given vertex and fragment shaders under the given
|
|
580
|
+
* render context into a program.
|
|
581
|
+
*
|
|
582
|
+
* @param ctx - The render context to use.
|
|
583
|
+
* @param vertShader - The vertex shader code.
|
|
584
|
+
* @param fragShader - The fragment shader code.
|
|
585
|
+
*/
|
|
586
|
+
constructor(t, e, s) {
|
|
587
|
+
/** The render context used by this program. */
|
|
588
|
+
n(this, "renderCtx");
|
|
589
|
+
/** The underlying webgl program. */
|
|
590
|
+
n(this, "prog");
|
|
591
|
+
/** The code for the vertex shader. */
|
|
592
|
+
n(this, "vertShader");
|
|
593
|
+
/** The code for the fragment shader. */
|
|
594
|
+
n(this, "fragShader");
|
|
595
|
+
n(this, "uniformLocCache", /* @__PURE__ */ new Map());
|
|
596
|
+
this.renderCtx = t;
|
|
597
|
+
const i = t.gl.createProgram();
|
|
598
|
+
if (i == null) throw k("failed to create program");
|
|
599
|
+
this.prog = i, this.vertShader = e, this.fragShader = s, this.compile();
|
|
600
|
+
}
|
|
601
|
+
/** Sets the current program as the active program used by the context. */
|
|
602
|
+
setAsActive() {
|
|
603
|
+
return this.renderCtx.gl.useProgram(this.prog), () => this.renderCtx.gl.useProgram(null);
|
|
604
|
+
}
|
|
605
|
+
/**
|
|
606
|
+
* Sets a uniform XY coordinate value.
|
|
607
|
+
*
|
|
608
|
+
* @param name - The name of the uniform.
|
|
609
|
+
* @param value - The value to set.
|
|
610
|
+
*/
|
|
611
|
+
uniformXY(t, e) {
|
|
612
|
+
this.renderCtx.gl.uniform2fv(this.getUniformLoc(t), f.couple(e));
|
|
613
|
+
}
|
|
614
|
+
/**
|
|
615
|
+
* Sets a uniform color value.
|
|
616
|
+
*
|
|
617
|
+
* @param name - The name of the uniform.
|
|
618
|
+
* @param value - The value to set.
|
|
619
|
+
*/
|
|
620
|
+
uniformColor(t, e) {
|
|
621
|
+
this.renderCtx.gl.uniform4fv(this.getUniformLoc(t), y.rgba1(e));
|
|
622
|
+
}
|
|
623
|
+
getUniformLoc(t) {
|
|
624
|
+
const e = this.uniformLocCache.get(t);
|
|
625
|
+
if (e != null) return e;
|
|
626
|
+
const s = this.renderCtx.gl.getUniformLocation(this.prog, t);
|
|
627
|
+
if (s == null) throw new Error(`unexpected missing uniform ${t}`);
|
|
628
|
+
return this.uniformLocCache.set(t, s), s;
|
|
629
|
+
}
|
|
630
|
+
compile() {
|
|
631
|
+
const t = this.renderCtx.gl;
|
|
632
|
+
this.compileShader(this.vertShader, t.VERTEX_SHADER), this.compileShader(this.fragShader, t.FRAGMENT_SHADER), t.linkProgram(this.prog);
|
|
633
|
+
}
|
|
634
|
+
compileShader(t, e) {
|
|
635
|
+
const s = this.renderCtx.gl, i = s.createShader(e);
|
|
636
|
+
if (i == null) throw rt;
|
|
637
|
+
if (s.shaderSource(i, t), s.compileShader(i), !s.getShaderParameter(i, s.COMPILE_STATUS)) {
|
|
638
|
+
const a = s.getShaderInfoLog(i);
|
|
639
|
+
throw s.deleteShader(i), k(a ?? "unknown");
|
|
640
|
+
}
|
|
641
|
+
s.attachShader(this.prog, i);
|
|
642
|
+
}
|
|
643
|
+
};
|
|
644
|
+
const nt = new Float32Array([0, 0, 0, 0, 0, 0]);
|
|
645
|
+
class ht extends at {
|
|
646
|
+
constructor(e) {
|
|
647
|
+
super(e, it, st);
|
|
648
|
+
n(this, "positionBuffer");
|
|
649
|
+
const s = e.gl.createBuffer();
|
|
650
|
+
if (s == null) throw new Z("webgl: failed to create buffer");
|
|
651
|
+
this.positionBuffer = s, e.gl.bindBuffer(e.gl.ARRAY_BUFFER, this.positionBuffer), e.gl.bufferData(e.gl.ARRAY_BUFFER, nt, e.gl.STATIC_DRAW);
|
|
652
|
+
}
|
|
653
|
+
exec() {
|
|
654
|
+
const { gl: e } = this.renderCtx, s = e.getAttribLocation(this.prog, "a_position");
|
|
655
|
+
e.bindBuffer(e.ARRAY_BUFFER, this.positionBuffer);
|
|
656
|
+
const i = e.createVertexArray();
|
|
657
|
+
e.bindVertexArray(i), e.enableVertexAttribArray(s), e.vertexAttribPointer(s, 2, e.FLOAT, !1, 0, 0), this.setAsActive(), e.drawArrays(e.TRIANGLES, 0, 3);
|
|
658
|
+
}
|
|
659
|
+
}
|
|
660
|
+
const ot = new Error("request for lock canceled");
|
|
661
|
+
var lt = function(h, t, e, s) {
|
|
662
|
+
function i(r) {
|
|
663
|
+
return r instanceof e ? r : new e(function(a) {
|
|
664
|
+
a(r);
|
|
665
|
+
});
|
|
666
|
+
}
|
|
667
|
+
return new (e || (e = Promise))(function(r, a) {
|
|
668
|
+
function l(o) {
|
|
669
|
+
try {
|
|
670
|
+
d(s.next(o));
|
|
671
|
+
} catch (u) {
|
|
672
|
+
a(u);
|
|
673
|
+
}
|
|
674
|
+
}
|
|
675
|
+
function p(o) {
|
|
676
|
+
try {
|
|
677
|
+
d(s.throw(o));
|
|
678
|
+
} catch (u) {
|
|
679
|
+
a(u);
|
|
680
|
+
}
|
|
681
|
+
}
|
|
682
|
+
function d(o) {
|
|
683
|
+
o.done ? r(o.value) : i(o.value).then(l, p);
|
|
684
|
+
}
|
|
685
|
+
d((s = s.apply(h, t || [])).next());
|
|
686
|
+
});
|
|
687
|
+
};
|
|
688
|
+
class ct {
|
|
689
|
+
constructor(t, e = ot) {
|
|
690
|
+
this._value = t, this._cancelError = e, this._queue = [], this._weightedWaiters = [];
|
|
691
|
+
}
|
|
692
|
+
acquire(t = 1, e = 0) {
|
|
693
|
+
if (t <= 0)
|
|
694
|
+
throw new Error(`invalid weight ${t}: must be positive`);
|
|
695
|
+
return new Promise((s, i) => {
|
|
696
|
+
const r = { resolve: s, reject: i, weight: t, priority: e }, a = Y(this._queue, (l) => e <= l.priority);
|
|
697
|
+
a === -1 && t <= this._value ? this._dispatchItem(r) : this._queue.splice(a + 1, 0, r);
|
|
698
|
+
});
|
|
699
|
+
}
|
|
700
|
+
runExclusive(t) {
|
|
701
|
+
return lt(this, arguments, void 0, function* (e, s = 1, i = 0) {
|
|
702
|
+
const [r, a] = yield this.acquire(s, i);
|
|
703
|
+
try {
|
|
704
|
+
return yield e(r);
|
|
705
|
+
} finally {
|
|
706
|
+
a();
|
|
707
|
+
}
|
|
708
|
+
});
|
|
709
|
+
}
|
|
710
|
+
waitForUnlock(t = 1, e = 0) {
|
|
711
|
+
if (t <= 0)
|
|
712
|
+
throw new Error(`invalid weight ${t}: must be positive`);
|
|
713
|
+
return this._couldLockImmediately(t, e) ? Promise.resolve() : new Promise((s) => {
|
|
714
|
+
this._weightedWaiters[t - 1] || (this._weightedWaiters[t - 1] = []), pt(this._weightedWaiters[t - 1], { resolve: s, priority: e });
|
|
715
|
+
});
|
|
716
|
+
}
|
|
717
|
+
isLocked() {
|
|
718
|
+
return this._value <= 0;
|
|
719
|
+
}
|
|
720
|
+
getValue() {
|
|
721
|
+
return this._value;
|
|
722
|
+
}
|
|
723
|
+
setValue(t) {
|
|
724
|
+
this._value = t, this._dispatchQueue();
|
|
725
|
+
}
|
|
726
|
+
release(t = 1) {
|
|
727
|
+
if (t <= 0)
|
|
728
|
+
throw new Error(`invalid weight ${t}: must be positive`);
|
|
729
|
+
this._value += t, this._dispatchQueue();
|
|
730
|
+
}
|
|
731
|
+
cancel() {
|
|
732
|
+
this._queue.forEach((t) => t.reject(this._cancelError)), this._queue = [];
|
|
733
|
+
}
|
|
734
|
+
_dispatchQueue() {
|
|
735
|
+
for (this._drainUnlockWaiters(); this._queue.length > 0 && this._queue[0].weight <= this._value; )
|
|
736
|
+
this._dispatchItem(this._queue.shift()), this._drainUnlockWaiters();
|
|
737
|
+
}
|
|
738
|
+
_dispatchItem(t) {
|
|
739
|
+
const e = this._value;
|
|
740
|
+
this._value -= t.weight, t.resolve([e, this._newReleaser(t.weight)]);
|
|
741
|
+
}
|
|
742
|
+
_newReleaser(t) {
|
|
743
|
+
let e = !1;
|
|
744
|
+
return () => {
|
|
745
|
+
e || (e = !0, this.release(t));
|
|
746
|
+
};
|
|
747
|
+
}
|
|
748
|
+
_drainUnlockWaiters() {
|
|
749
|
+
if (this._queue.length === 0)
|
|
750
|
+
for (let t = this._value; t > 0; t--) {
|
|
751
|
+
const e = this._weightedWaiters[t - 1];
|
|
752
|
+
e && (e.forEach((s) => s.resolve()), this._weightedWaiters[t - 1] = []);
|
|
753
|
+
}
|
|
754
|
+
else {
|
|
755
|
+
const t = this._queue[0].priority;
|
|
756
|
+
for (let e = this._value; e > 0; e--) {
|
|
757
|
+
const s = this._weightedWaiters[e - 1];
|
|
758
|
+
if (!s)
|
|
759
|
+
continue;
|
|
760
|
+
const i = s.findIndex((r) => r.priority <= t);
|
|
761
|
+
(i === -1 ? s : s.splice(0, i)).forEach((r) => r.resolve());
|
|
762
|
+
}
|
|
763
|
+
}
|
|
764
|
+
}
|
|
765
|
+
_couldLockImmediately(t, e) {
|
|
766
|
+
return (this._queue.length === 0 || this._queue[0].priority < e) && t <= this._value;
|
|
767
|
+
}
|
|
768
|
+
}
|
|
769
|
+
function pt(h, t) {
|
|
770
|
+
const e = Y(h, (s) => t.priority <= s.priority);
|
|
771
|
+
h.splice(e + 1, 0, t);
|
|
772
|
+
}
|
|
773
|
+
function Y(h, t) {
|
|
774
|
+
for (let e = h.length - 1; e >= 0; e--)
|
|
775
|
+
if (t(h[e]))
|
|
776
|
+
return e;
|
|
777
|
+
return -1;
|
|
778
|
+
}
|
|
779
|
+
var dt = function(h, t, e, s) {
|
|
780
|
+
function i(r) {
|
|
781
|
+
return r instanceof e ? r : new e(function(a) {
|
|
782
|
+
a(r);
|
|
783
|
+
});
|
|
784
|
+
}
|
|
785
|
+
return new (e || (e = Promise))(function(r, a) {
|
|
786
|
+
function l(o) {
|
|
787
|
+
try {
|
|
788
|
+
d(s.next(o));
|
|
789
|
+
} catch (u) {
|
|
790
|
+
a(u);
|
|
791
|
+
}
|
|
792
|
+
}
|
|
793
|
+
function p(o) {
|
|
794
|
+
try {
|
|
795
|
+
d(s.throw(o));
|
|
796
|
+
} catch (u) {
|
|
797
|
+
a(u);
|
|
798
|
+
}
|
|
799
|
+
}
|
|
800
|
+
function d(o) {
|
|
801
|
+
o.done ? r(o.value) : i(o.value).then(l, p);
|
|
802
|
+
}
|
|
803
|
+
d((s = s.apply(h, t || [])).next());
|
|
804
|
+
});
|
|
805
|
+
};
|
|
806
|
+
class ut {
|
|
807
|
+
constructor(t) {
|
|
808
|
+
this._semaphore = new ct(1, t);
|
|
809
|
+
}
|
|
810
|
+
acquire() {
|
|
811
|
+
return dt(this, arguments, void 0, function* (t = 0) {
|
|
812
|
+
const [, e] = yield this._semaphore.acquire(1, t);
|
|
813
|
+
return e;
|
|
814
|
+
});
|
|
815
|
+
}
|
|
816
|
+
runExclusive(t, e = 0) {
|
|
817
|
+
return this._semaphore.runExclusive(() => t(), 1, e);
|
|
818
|
+
}
|
|
819
|
+
isLocked() {
|
|
820
|
+
return this._semaphore.isLocked();
|
|
821
|
+
}
|
|
822
|
+
waitForUnlock(t = 0) {
|
|
823
|
+
return this._semaphore.waitForUnlock(1, t);
|
|
824
|
+
}
|
|
825
|
+
release() {
|
|
826
|
+
this._semaphore.isLocked() && this._semaphore.release();
|
|
827
|
+
}
|
|
828
|
+
cancel() {
|
|
829
|
+
return this._semaphore.cancel();
|
|
830
|
+
}
|
|
831
|
+
}
|
|
832
|
+
const F = { high: 1, low: 0 };
|
|
833
|
+
class ft {
|
|
834
|
+
constructor({
|
|
835
|
+
afterRender: t,
|
|
836
|
+
instrumentation: e = _.Instrumentation.NOOP
|
|
837
|
+
}) {
|
|
838
|
+
/** To lock things so renders don't collide */
|
|
839
|
+
n(this, "mutex", new ut());
|
|
840
|
+
/** Stores the current requests for rendering. */
|
|
841
|
+
n(this, "requests", /* @__PURE__ */ new Map());
|
|
842
|
+
/** Stores render cleanup functions for clearing canvases and other resources. */
|
|
843
|
+
n(this, "cleanup", /* @__PURE__ */ new Map());
|
|
844
|
+
/** A callback to run after each render call. */
|
|
845
|
+
n(this, "afterRender");
|
|
846
|
+
/** Instrumentation for logging, tracing, metrics, etc. */
|
|
847
|
+
n(this, "instrumentation");
|
|
848
|
+
/** The total number of renders */
|
|
849
|
+
n(this, "count", 0);
|
|
850
|
+
this.afterRender = t, this.instrumentation = e, this.start();
|
|
851
|
+
}
|
|
852
|
+
/**
|
|
853
|
+
* Sets a new request in the queue according to a set of rules:
|
|
854
|
+
*
|
|
855
|
+
* 1. If no request with the same key exists, add the request to the queue.
|
|
856
|
+
* 2. If a request with the same key exists, replace it if the new request has a
|
|
857
|
+
* greater or equal priority and a greater or equal number of canvases that are
|
|
858
|
+
* being rendered to.
|
|
859
|
+
*
|
|
860
|
+
* @param req - The request to set.
|
|
861
|
+
*/
|
|
862
|
+
set(t) {
|
|
863
|
+
const e = this.requests.get(t.key);
|
|
864
|
+
if (e == null) this.requests.set(t.key, t);
|
|
865
|
+
else {
|
|
866
|
+
const s = F[t.priority] >= F[e.priority], i = t.canvases.length >= e.canvases.length;
|
|
867
|
+
s && i && this.requests.set(t.key, t);
|
|
868
|
+
}
|
|
869
|
+
}
|
|
870
|
+
/** Execute the render. */
|
|
871
|
+
render() {
|
|
872
|
+
var r;
|
|
873
|
+
const { requests: t } = this;
|
|
874
|
+
if (t.size === 0) return;
|
|
875
|
+
const e = this.instrumentation.T.bench("render-cycle"), s = this.instrumentation.T.bench("render-cycle-cleanup");
|
|
876
|
+
this.runCleanupsSync(), s();
|
|
877
|
+
const i = this.instrumentation.T.bench("render-cycle-render");
|
|
878
|
+
this.renderSync(), i(), e(), this.requests.clear(), (r = this.afterRender) == null || r.call(this);
|
|
879
|
+
}
|
|
880
|
+
runCleanupsSync() {
|
|
881
|
+
const { cleanup: t, requests: e } = this;
|
|
882
|
+
t.forEach((s, i) => {
|
|
883
|
+
const r = e.get(i);
|
|
884
|
+
r != null && (s(r), t.delete(i));
|
|
885
|
+
});
|
|
886
|
+
}
|
|
887
|
+
renderSync() {
|
|
888
|
+
const { requests: t } = this;
|
|
889
|
+
t.forEach((e) => {
|
|
890
|
+
try {
|
|
891
|
+
const s = e.render();
|
|
892
|
+
s != null && this.cleanup.set(e.key, s);
|
|
893
|
+
} catch (s) {
|
|
894
|
+
console.error(s);
|
|
895
|
+
}
|
|
896
|
+
});
|
|
897
|
+
}
|
|
898
|
+
/** Starts the rendering loop. */
|
|
899
|
+
async start() {
|
|
900
|
+
const t = () => {
|
|
901
|
+
try {
|
|
902
|
+
this.render();
|
|
903
|
+
} catch (e) {
|
|
904
|
+
console.error(e);
|
|
905
|
+
}
|
|
906
|
+
requestAnimationFrame(t);
|
|
907
|
+
};
|
|
908
|
+
requestAnimationFrame(t);
|
|
909
|
+
}
|
|
910
|
+
}
|
|
911
|
+
const T = 2, v = class v {
|
|
912
|
+
constructor(t) {
|
|
913
|
+
// A canvas buffer that holds rendered characters.
|
|
914
|
+
n(this, "atlas");
|
|
915
|
+
// Cached dimensions of a character.
|
|
916
|
+
n(this, "charDims");
|
|
917
|
+
// The device pixel ratio of the atlas.
|
|
918
|
+
n(this, "dpr");
|
|
919
|
+
// A map of characters to their index in the atlas.
|
|
920
|
+
n(this, "charMap");
|
|
921
|
+
const { font: e, dpr: s, characters: i = v.DEFAULT_CHARS, textColor: r } = t;
|
|
922
|
+
this.dpr = s, this.charMap = /* @__PURE__ */ new Map();
|
|
923
|
+
const a = K.unique(Array.from(i)), p = new OffscreenCanvas(1, 1).getContext("2d");
|
|
924
|
+
p.font = e;
|
|
925
|
+
const d = p.measureText("0");
|
|
926
|
+
this.charDims = M(d), this.charDims.width += T, this.charDims.height += T;
|
|
927
|
+
const o = a.length, u = this.charDims.width, C = this.charDims.height, S = Math.ceil(Math.sqrt(o)), W = Math.ceil(o / S);
|
|
928
|
+
this.atlas = new OffscreenCanvas(
|
|
929
|
+
u * S * this.dpr,
|
|
930
|
+
C * (W + 1) * this.dpr
|
|
931
|
+
);
|
|
932
|
+
const w = this.atlas.getContext("2d");
|
|
933
|
+
w.scale(this.dpr, this.dpr), w.font = e, w.textBaseline = "alphabetic", w.textAlign = "left", w.fillStyle = y.hex(r), w.clearRect(0, 0, this.atlas.width, this.atlas.height), a.forEach((I, L) => {
|
|
934
|
+
const U = L % S, N = Math.floor(L / S), z = U * u, X = (N + 1) * C;
|
|
935
|
+
w.fillText(I, z, X), this.charMap.set(I, L);
|
|
936
|
+
});
|
|
937
|
+
}
|
|
938
|
+
fillText(t, e, s, i) {
|
|
939
|
+
const { width: r, height: a } = this.charDims, l = Math.ceil(Math.sqrt(this.charMap.size));
|
|
940
|
+
for (let p = 0; p < e.length; p++) {
|
|
941
|
+
const d = e[p], o = this.charMap.get(d);
|
|
942
|
+
if (o === void 0) continue;
|
|
943
|
+
const u = o % l, C = Math.floor(o / l);
|
|
944
|
+
t.drawImage(
|
|
945
|
+
this.atlas,
|
|
946
|
+
u * r * this.dpr,
|
|
947
|
+
C * a * this.dpr + T,
|
|
948
|
+
r * this.dpr,
|
|
949
|
+
a * this.dpr,
|
|
950
|
+
s + p * r,
|
|
951
|
+
i - a - T / this.dpr,
|
|
952
|
+
r,
|
|
953
|
+
a
|
|
954
|
+
);
|
|
955
|
+
}
|
|
956
|
+
}
|
|
957
|
+
measureText(t) {
|
|
958
|
+
return { width: t.length * this.charDims.width, height: this.charDims.height };
|
|
959
|
+
}
|
|
960
|
+
};
|
|
961
|
+
// The default characters to include in the atlas.
|
|
962
|
+
n(v, "DEFAULT_CHARS", "0123456789.:-umsNa∞ᴇ");
|
|
963
|
+
let O = v;
|
|
964
|
+
class gt {
|
|
965
|
+
constructor() {
|
|
966
|
+
n(this, "atlases");
|
|
967
|
+
this.atlases = /* @__PURE__ */ new Map();
|
|
968
|
+
}
|
|
969
|
+
/**
|
|
970
|
+
* @returns at atlas from the registry compatible with the given props. If the
|
|
971
|
+
* atlas does not exist in the registry, it is created and added to the registry.
|
|
972
|
+
*/
|
|
973
|
+
get(t) {
|
|
974
|
+
const e = `${t.font}-${y.hex(t.textColor)}-${t.dpr}-${t.characters}`;
|
|
975
|
+
if (this.atlases.has(e)) return this.atlases.get(e);
|
|
976
|
+
const s = new O(t);
|
|
977
|
+
return this.atlases.set(e, s), s;
|
|
978
|
+
}
|
|
979
|
+
}
|
|
980
|
+
const q = (h) => (h.textRendering = "optimizeSpeed", h.imageSmoothingEnabled = !1, h), g = class g {
|
|
981
|
+
constructor(t, e, s, i, r) {
|
|
982
|
+
/* The canvas element used by WebGL. */
|
|
983
|
+
n(this, "glCanvas");
|
|
984
|
+
/** The canvas element used by the 2D canvas. */
|
|
985
|
+
n(this, "upper2dCanvas");
|
|
986
|
+
/** The canvas element used by the 2D canvas. */
|
|
987
|
+
n(this, "lower2dCanvas");
|
|
988
|
+
/** The WebGL rendering context. */
|
|
989
|
+
n(this, "gl");
|
|
990
|
+
/** A 2D canvas that sits below the WebGL canvas. */
|
|
991
|
+
n(this, "lower2d");
|
|
992
|
+
/** A 2D canvas that sits above the WebGL canvas. */
|
|
993
|
+
n(this, "upper2d");
|
|
994
|
+
/** The region the canvas occupies in pixel space */
|
|
995
|
+
n(this, "region");
|
|
996
|
+
/** The device pixel ratio of the canvas */
|
|
997
|
+
n(this, "dpr");
|
|
998
|
+
/** queue render transitions onto the stack */
|
|
999
|
+
n(this, "loop");
|
|
1000
|
+
/** See the @link{clear.Program} for why this is necessary. */
|
|
1001
|
+
n(this, "clearProgram");
|
|
1002
|
+
n(this, "os");
|
|
1003
|
+
n(this, "instrumentation");
|
|
1004
|
+
this.upper2dCanvas = s, this.lower2dCanvas = e, this.glCanvas = t, this.os = i, this.instrumentation = r, this.dpr = 1;
|
|
1005
|
+
const a = this.lower2dCanvas.getContext("2d");
|
|
1006
|
+
if (a == null) throw new Error("Could not get 2D context");
|
|
1007
|
+
const l = new gt();
|
|
1008
|
+
this.lower2d = q(
|
|
1009
|
+
new R(a, l, this.dpr)
|
|
1010
|
+
);
|
|
1011
|
+
const p = this.upper2dCanvas.getContext("2d");
|
|
1012
|
+
if (p == null) throw new Error("Could not get 2D context");
|
|
1013
|
+
this.upper2d = q(
|
|
1014
|
+
new R(p, l, this.dpr)
|
|
1015
|
+
);
|
|
1016
|
+
const d = {
|
|
1017
|
+
preserveDrawingBuffer: !0,
|
|
1018
|
+
powerPreference: "high-performance",
|
|
1019
|
+
stencil: !1,
|
|
1020
|
+
depth: !1
|
|
1021
|
+
}, o = this.glCanvas.getContext("webgl2", d);
|
|
1022
|
+
if (o == null) throw new Error("Could not get WebGL context");
|
|
1023
|
+
o.disable(o.DEPTH_TEST), o.disable(o.STENCIL_TEST), o.disable(o.CULL_FACE), o.disable(o.DITHER), this.gl = o, this.glCanvas.oncontextlost = console.error;
|
|
1024
|
+
const u = () => {
|
|
1025
|
+
this.gl.flush(), this.gl.finish();
|
|
1026
|
+
};
|
|
1027
|
+
this.loop = new ft({
|
|
1028
|
+
afterRender: u,
|
|
1029
|
+
instrumentation: this.instrumentation
|
|
1030
|
+
}), this.region = c.ZERO, this.os === "Windows" && (this.clearProgram = new ht(this));
|
|
1031
|
+
}
|
|
1032
|
+
static create(t, e, s, i, r) {
|
|
1033
|
+
const a = tt(t, "render_context"), l = new g(
|
|
1034
|
+
e,
|
|
1035
|
+
s,
|
|
1036
|
+
i,
|
|
1037
|
+
r,
|
|
1038
|
+
a
|
|
1039
|
+
);
|
|
1040
|
+
return t.set(g.CONTEXT_KEY, l), l;
|
|
1041
|
+
}
|
|
1042
|
+
static useOptional(t) {
|
|
1043
|
+
return t.getOptional(g.CONTEXT_KEY);
|
|
1044
|
+
}
|
|
1045
|
+
static use(t) {
|
|
1046
|
+
return t.get(g.CONTEXT_KEY);
|
|
1047
|
+
}
|
|
1048
|
+
update(t) {
|
|
1049
|
+
t.set(g.CONTEXT_KEY, this);
|
|
1050
|
+
}
|
|
1051
|
+
/**
|
|
1052
|
+
* Resizes the canvas to the given region and device pixel ratio. Ensuring
|
|
1053
|
+
* that all drawing operations and viewports are scaled correctly.
|
|
1054
|
+
*/
|
|
1055
|
+
resize(t, e) {
|
|
1056
|
+
c.equals(this.region, t) && this.dpr === e || (this.region = t, this.dpr = e, this.resizeCanvas(this.glCanvas), this.resizeCanvas(this.upper2dCanvas), this.resizeCanvas(this.lower2dCanvas), this.lower2d.scale(this.dpr, this.dpr), this.upper2d.scale(this.dpr, this.dpr), this.gl.viewport(0, 0, c.width(t) * e, c.height(t) * e));
|
|
1057
|
+
}
|
|
1058
|
+
resizeCanvas(t) {
|
|
1059
|
+
t.width = c.width(this.region) * this.dpr, t.height = c.height(this.region) * this.dpr;
|
|
1060
|
+
}
|
|
1061
|
+
/** @returns the aspect ratio of the canvas. */
|
|
1062
|
+
get aspect() {
|
|
1063
|
+
return c.aspect(this.region);
|
|
1064
|
+
}
|
|
1065
|
+
/**
|
|
1066
|
+
* Takes the given box in PIXEL space and produces a transform
|
|
1067
|
+
* in CLIP space representing the sub-region represented by the box
|
|
1068
|
+
* in the canvas.
|
|
1069
|
+
*/
|
|
1070
|
+
scaleRegion(t) {
|
|
1071
|
+
return new x.XY(
|
|
1072
|
+
// Accept a value in decimal.
|
|
1073
|
+
x.Scale.scale(0, 1).scale(c.width(t)).translate(c.left(t)).reBound(c.width(this.region)).scale(-1, 1),
|
|
1074
|
+
// Accept a value in decimal.
|
|
1075
|
+
x.Scale.scale(0, 1).scale(c.height(t)).invert().translate(c.top(t)).reBound(c.height(this.region)).scale(-1, 1).invert()
|
|
1076
|
+
);
|
|
1077
|
+
}
|
|
1078
|
+
scissor(t, e = f.ZERO, s) {
|
|
1079
|
+
const i = [];
|
|
1080
|
+
return s.includes("upper2d") && i.push(this.upper2d.scissor(t, e)), s.includes("lower2d") && i.push(this.lower2d.scissor(t, e)), s.includes("gl") && i.push(this.scissorGL(t, e)), () => i.forEach((r) => r());
|
|
1081
|
+
}
|
|
1082
|
+
scissorGL(t, e = f.ZERO) {
|
|
1083
|
+
return this.gl.enable(this.gl.SCISSOR_TEST), t = E(t, e), this.gl.scissor(
|
|
1084
|
+
c.left(t) * this.dpr,
|
|
1085
|
+
(c.height(this.region) - c.bottom(t)) * this.dpr,
|
|
1086
|
+
c.width(t) * this.dpr,
|
|
1087
|
+
c.height(t) * this.dpr
|
|
1088
|
+
), () => this.gl.disable(this.gl.SCISSOR_TEST);
|
|
1089
|
+
}
|
|
1090
|
+
erase(t, e = f.ZERO, ...s) {
|
|
1091
|
+
e = f.construct(e), s.length === 0 && (s = ["upper2d", "lower2d", "gl"]), s.includes("upper2d") && this.eraseCanvas(this.upper2d, t, e), s.includes("lower2d") && this.eraseCanvas(this.lower2d, t, e), s.includes("gl") && this.eraseGL(t, e);
|
|
1092
|
+
}
|
|
1093
|
+
eraseGL(t, e = f.ZERO) {
|
|
1094
|
+
var r;
|
|
1095
|
+
const { gl: s } = this, i = this.scissorGL(E(t, e));
|
|
1096
|
+
s.clearColor(...y.rgba1(y.ZERO)), s.clear(s.COLOR_BUFFER_BIT), this.os === "Windows" && ((r = this.clearProgram) == null || r.exec()), i();
|
|
1097
|
+
}
|
|
1098
|
+
eraseCanvas(t, e, s = f.ZERO) {
|
|
1099
|
+
const i = E(e, s);
|
|
1100
|
+
t.clearRect(...f.couple(c.topLeft(i)), ...G.couple(c.dims(i)));
|
|
1101
|
+
}
|
|
1102
|
+
};
|
|
1103
|
+
n(g, "CONTEXT_KEY", H.B("render-context"));
|
|
1104
|
+
let D = g;
|
|
1105
|
+
const wt = m.object({
|
|
1106
|
+
region: c.box,
|
|
1107
|
+
enabled: m.boolean().optional().default(!1)
|
|
1108
|
+
}), B = ["gl", "lower2d", "upper2d"];
|
|
1109
|
+
class P extends Q {
|
|
1110
|
+
constructor() {
|
|
1111
|
+
super(...arguments);
|
|
1112
|
+
n(this, "schema", wt);
|
|
1113
|
+
}
|
|
1114
|
+
afterUpdate(e) {
|
|
1115
|
+
this.deleted || (this.internal.renderCtx = D.use(e), this.renderOnLifecycleChange());
|
|
1116
|
+
}
|
|
1117
|
+
afterDelete() {
|
|
1118
|
+
this.renderOnLifecycleChange();
|
|
1119
|
+
}
|
|
1120
|
+
renderOnLifecycleChange() {
|
|
1121
|
+
this.internal.renderCtx.loop.set({
|
|
1122
|
+
key: `${this.type}-${this.key}`,
|
|
1123
|
+
render: this.render.bind(this),
|
|
1124
|
+
priority: "high",
|
|
1125
|
+
canvases: B
|
|
1126
|
+
});
|
|
1127
|
+
}
|
|
1128
|
+
render() {
|
|
1129
|
+
this.deleted || !this.state.enabled || this.internal.renderCtx.erase(this.state.region, f.construct(0), ...B);
|
|
1130
|
+
}
|
|
1131
|
+
}
|
|
1132
|
+
n(P, "TYPE", "eraser");
|
|
1133
|
+
const Et = {
|
|
1134
|
+
[P.TYPE]: P
|
|
1135
|
+
};
|
|
1136
|
+
export {
|
|
1137
|
+
D as C,
|
|
1138
|
+
P as E,
|
|
1139
|
+
at as G,
|
|
1140
|
+
ft as L,
|
|
1141
|
+
ut as M,
|
|
1142
|
+
b as P,
|
|
1143
|
+
Et as R,
|
|
1144
|
+
St as a,
|
|
1145
|
+
wt as e,
|
|
1146
|
+
j as p,
|
|
1147
|
+
tt as u
|
|
1148
|
+
};
|