@synnaxlabs/pluto 0.42.4 → 0.43.1
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/README.md +3 -3
- package/dist/{Center-D0JeI7Ta.js → Center-Bq5L7oy0.js} +2 -2
- package/dist/{Center-DuI3XH-Q.cjs → Center-DE_BtCCX.cjs} +1 -1
- package/dist/ContextMenu-BC5x7XR5.cjs +1 -0
- package/dist/{ContextMenu-BiNr7Gxv.js → ContextMenu-DLM5eLLG.js} +11 -11
- package/dist/DateTime-CdNKxVxT.js +17 -0
- package/dist/DateTime-DC19AIGq.cjs +1 -0
- package/dist/{Divider-DqEkzRIY.js → Divider-CDFHLK9U.js} +213 -215
- package/dist/Divider-D74_FAXn.cjs +22 -0
- package/dist/Dropdown-BpoU-xVd.cjs +1 -0
- package/dist/Dropdown-CQu3yo3v.js +327 -0
- package/dist/Haul-D6kpOYBa.js +124 -0
- package/dist/Haul-De8axVdi.cjs +1 -0
- package/dist/{Item-DSBs9VLu.cjs → Item-CB5c--eX.cjs} +1 -1
- package/dist/{Item-C5SQraZM.js → Item-LAMTj0X2.js} +6 -6
- package/dist/{Keyboard-Ca7TAAHK.cjs → Keyboard-CiNuYBa3.cjs} +1 -1
- package/dist/{Keyboard-Duo41pJL.js → Keyboard-DjeQa-Nx.js} +2 -2
- package/dist/{Link-B9ZGvoBU.cjs → Link-CPnT8Xp9.cjs} +1 -1
- package/dist/{Link-C9GeoB0w.js → Link-DcudTtgT.js} +1 -1
- package/dist/Pack-80N7XB5O.cjs +1 -0
- package/dist/Pack-BiS6QIuA.js +52 -0
- package/dist/Provider-CLPfWTcl.js +464 -0
- package/dist/Provider-s70PZ9lg.cjs +1 -0
- package/dist/{Space-DvalhzRj.cjs → Space-ByFmfiTa.cjs} +1 -1
- package/dist/{Space-CyTH97CN.js → Space-DxHm2ok7.js} +1 -1
- package/dist/{Text-sH_NOelc.js → Text-BiWcjO1i.js} +17 -17
- package/dist/{Text-8ps3Uw4T.js → Text-CacHYC7L.js} +4 -4
- package/dist/{Text-DkA06TeT.cjs → Text-DTPuORh0.cjs} +1 -1
- package/dist/Text-Dw0NDc2A.cjs +4 -0
- package/dist/Text-bSIbkBIL.cjs +1 -0
- package/dist/{Text-BR4FW9Hy.js → Text-wL3te5S6.js} +125 -122
- package/dist/{Toggle-BRuUrO2N.js → Toggle-CbzT5wR_.js} +115 -109
- package/dist/Toggle-CpDGR6M6.cjs +1 -0
- package/dist/{Video-DWStbcmD.js → Video-Bq_WSdfc.js} +1 -1
- package/dist/{Video-DgjuFLiE.cjs → Video-BuzHLiXL.cjs} +1 -1
- package/dist/{WithIcon-BhR6nwRh.js → WithIcon-B7VPBqA2.js} +24 -27
- package/dist/WithIcon-CCnlO2LC.cjs +1 -0
- package/dist/align.cjs +1 -1
- package/dist/align.js +1 -1
- package/dist/array-CPtP5Oov.js +7 -0
- package/dist/array-CZHEGH95.cjs +1 -0
- 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-C7rJrqRi.cjs +38 -0
- package/dist/css-DjQu2Qyf.js +12511 -0
- package/dist/css.cjs +1 -1
- package/dist/css.js +11 -5
- package/dist/deep-BRgXTyZn.cjs +1 -0
- package/dist/deep-D72Fid_q.js +193 -0
- package/dist/{dimensions-By-vgVks.cjs → dimensions-BmlCx5q4.cjs} +1 -1
- package/dist/{dimensions-B6qmnzv3.js → dimensions-FnMV2fyj.js} +1 -1
- package/dist/dropdown.cjs +1 -1
- package/dist/dropdown.js +1 -1
- package/dist/{eraser-CK8SwEJa.js → eraser-BJxXs5KS.js} +246 -427
- package/dist/eraser-CGxyWj3B.cjs +11 -0
- package/dist/ether.cjs +1 -1
- package/dist/ether.js +36 -37
- package/dist/{external-B1YsdhS4.js → external-5nVYtLDI.js} +122 -123
- package/dist/{external-Bl8q9UBF.js → external-69bqTAcN.js} +1837 -1838
- package/dist/external-B-B5ro_s.cjs +1 -0
- package/dist/{external-BwUa_5Vs.cjs → external-B3Mtbu36.cjs} +1 -1
- package/dist/external-BgwS5D0j.cjs +1 -0
- package/dist/{external-BnK4UIFe.js → external-Bn3A7Rew.js} +3 -3
- package/dist/{external-DmryCcwg.cjs → external-Bojct8Fy.cjs} +1 -1
- package/dist/{external-DissGp_3.js → external-C6mmYO7R.js} +8 -8
- package/dist/{external-C0X4mXVG.js → external-CVHgvs0C.js} +6 -6
- package/dist/external-CnkWbciu.js +399 -0
- package/dist/{external-zbKPQ9ls.cjs → external-Cxwmal3D.cjs} +2 -2
- package/dist/external-DC1RT1Js.cjs +1 -0
- package/dist/external-DOujCKRS.cjs +1 -0
- package/dist/{external-BOMdfX8_.js → external-Dm9rg2x7.js} +2 -2
- package/dist/external-EvgywGSS.cjs +1 -0
- package/dist/external-GjPk23XZ.cjs +1 -0
- package/dist/{external-CUgPP-JD.cjs → external-MJ2UMa_L.cjs} +1 -1
- package/dist/{external-BDkqwq72.js → external-UeyJ6mPv.js} +7901 -7839
- package/dist/{external-B8uaUKhb.cjs → external-V0yO0q2n.cjs} +1 -1
- package/dist/{external-DQwznOyH.cjs → external-cDUxSE0v.cjs} +38 -38
- package/dist/{external-_8qdWaAg.js → external-cJGWYB3x.js} +2 -2
- package/dist/{external-C7yPkamb.js → external-fwvNilmo.js} +8 -8
- package/dist/{external-bSUra-q7.js → external-l7imNJRR.js} +26 -26
- package/dist/external-upR9Jz-8.js +60 -0
- package/dist/{font-CjYcjBiv.js → font-Csp00pQP.js} +2 -2
- package/dist/{font-XlUAG1-r.cjs → font-ifUcrCey.cjs} +1 -1
- package/dist/fontString-BWECl_1B.cjs +1 -0
- package/dist/{fontString-BN1kd1AP.js → fontString-ap-NPnCD.js} +6 -5
- package/dist/header.cjs +1 -1
- package/dist/header.js +1 -1
- package/dist/hooks-B92WH57y.cjs +1 -0
- package/dist/{hooks-DjznxGgm.js → hooks-u_TgL0Xi.js} +79 -79
- package/dist/index.cjs +7 -7
- package/dist/index.js +7378 -7351
- 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-YWPkhTn6.cjs +154 -0
- package/dist/provider-gW90qzEG.js +32024 -0
- package/dist/src/aether/aether/aether.d.ts +16 -16
- package/dist/src/aether/aether/aether.d.ts.map +1 -1
- package/dist/src/aether/aether/aether.spec.d.ts +5 -0
- package/dist/src/aether/aether/aether.spec.d.ts.map +1 -0
- package/dist/src/aether/main.d.ts +68 -19
- package/dist/src/aether/main.d.ts.map +1 -1
- package/dist/src/aether/main.spec.d.ts +2 -2
- package/dist/src/aether/main.spec.d.ts.map +1 -1
- package/dist/src/aether/message.d.ts +24 -14
- package/dist/src/aether/message.d.ts.map +1 -1
- package/dist/src/alamos/aether/alamos.d.ts +3 -3
- package/dist/src/alamos/aether/alamos.d.ts.map +1 -1
- package/dist/src/align/Pack.d.ts.map +1 -1
- package/dist/src/breadcrumb/Breadcrumb.d.ts.map +1 -1
- package/dist/src/button/Button.d.ts +1 -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 +2 -2
- package/dist/src/channel/LinePlot.d.ts.map +1 -1
- package/dist/src/channel/Select.d.ts.map +1 -1
- package/dist/src/color/Provider.d.ts +10 -10
- package/dist/src/color/Provider.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.map +1 -1
- package/dist/src/dropdown/Dropdown.d.ts.map +1 -1
- package/dist/src/form/Field.d.ts +3 -3
- package/dist/src/form/Field.d.ts.map +1 -1
- package/dist/src/form/Form.d.ts +42 -28
- package/dist/src/form/Form.d.ts.map +1 -1
- package/dist/src/form/synced.d.ts +8 -8
- package/dist/src/form/synced.d.ts.map +1 -1
- package/dist/src/haul/Haul.d.ts +6 -6
- package/dist/src/haul/Haul.d.ts.map +1 -1
- package/dist/src/hooks/ref.d.ts +2 -2
- package/dist/src/hooks/ref.d.ts.map +1 -1
- package/dist/src/hooks/useResize.d.ts.map +1 -1
- package/dist/src/index.d.ts +0 -1
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/input/HelpText.d.ts +4 -4
- package/dist/src/input/HelpText.d.ts.map +1 -1
- package/dist/src/input/Item.d.ts +1 -1
- package/dist/src/input/Item.d.ts.map +1 -1
- package/dist/src/input/Text.d.ts +2 -3
- package/dist/src/input/Text.d.ts.map +1 -1
- package/dist/src/label/Select.d.ts.map +1 -1
- package/dist/src/list/Selector.d.ts.map +1 -1
- package/dist/src/list/useSelect.d.ts.map +1 -1
- package/dist/src/memo/proxyMemo.d.ts.map +1 -1
- package/dist/src/memo/useMemoCompare.d.ts +3 -3
- package/dist/src/memo/useMemoCompare.d.ts.map +1 -1
- package/dist/src/mosaic/types.d.ts +9 -1
- package/dist/src/mosaic/types.d.ts.map +1 -1
- package/dist/src/note/Note.d.ts +2 -2
- package/dist/src/note/Note.d.ts.map +1 -1
- package/dist/src/observe/use.d.ts +2 -2
- package/dist/src/observe/use.d.ts.map +1 -1
- package/dist/src/pluto/aether/pluto.d.ts.map +1 -1
- package/dist/src/ranger/Select.d.ts.map +1 -1
- package/dist/src/select/Button.d.ts +5 -3
- package/dist/src/select/Button.d.ts.map +1 -1
- package/dist/src/select/Multiple.d.ts.map +1 -1
- package/dist/src/select/Single.d.ts.map +1 -1
- package/dist/src/state/state.d.ts +2 -1
- package/dist/src/state/state.d.ts.map +1 -1
- package/dist/src/status/Indicator.d.ts +8 -0
- package/dist/src/status/Indicator.d.ts.map +1 -0
- package/dist/src/status/Text.d.ts +2 -2
- package/dist/src/status/Text.d.ts.map +1 -1
- package/dist/src/status/aether/aggregator.d.ts +14 -17
- package/dist/src/status/aether/aggregator.d.ts.map +1 -1
- package/dist/src/status/aether/types.d.ts +5 -17
- package/dist/src/status/aether/types.d.ts.map +1 -1
- package/dist/src/status/colors.d.ts +1 -1
- package/dist/src/status/colors.d.ts.map +1 -1
- package/dist/src/status/external.d.ts +1 -1
- package/dist/src/status/external.d.ts.map +1 -1
- package/dist/src/synnax/Provider.d.ts +2 -0
- package/dist/src/synnax/Provider.d.ts.map +1 -1
- package/dist/src/synnax/aether/provider.d.ts +28 -28
- package/dist/src/synnax/aether/provider.d.ts.map +1 -1
- package/dist/src/table/Table.d.ts +1 -1
- package/dist/src/table/Table.d.ts.map +1 -1
- package/dist/src/table/aether/Table.d.ts +28 -28
- package/dist/src/table/aether/Table.d.ts.map +1 -1
- package/dist/src/table/cells/Cells.d.ts +16 -16
- package/dist/src/table/cells/Cells.d.ts.map +1 -1
- package/dist/src/table/cells/registry.d.ts +2 -2
- package/dist/src/table/cells/registry.d.ts.map +1 -1
- package/dist/src/tabs/types.d.ts +3 -3
- package/dist/src/tabs/types.d.ts.map +1 -1
- package/dist/src/telem/aether/context.d.ts +1 -1
- package/dist/src/telem/aether/context.d.ts.map +1 -1
- package/dist/src/telem/aether/pipeline.d.ts +19 -19
- package/dist/src/telem/aether/pipeline.d.ts.map +1 -1
- package/dist/src/telem/aether/provider.d.ts +4 -4
- package/dist/src/telem/aether/provider.d.ts.map +1 -1
- package/dist/src/telem/aether/remote.d.ts +27 -28
- package/dist/src/telem/aether/remote.d.ts.map +1 -1
- package/dist/src/telem/aether/static.d.ts +13 -13
- package/dist/src/telem/aether/static.d.ts.map +1 -1
- package/dist/src/telem/aether/telem.d.ts +44 -45
- package/dist/src/telem/aether/telem.d.ts.map +1 -1
- package/dist/src/telem/aether/transformers.d.ts +44 -47
- 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/streamer.d.ts.map +1 -1
- package/dist/src/telem/control/Chip.d.ts +1 -1
- package/dist/src/telem/control/Chip.d.ts.map +1 -1
- package/dist/src/telem/control/Controller.d.ts +1 -1
- package/dist/src/telem/control/Controller.d.ts.map +1 -1
- package/dist/src/telem/control/Indicator.d.ts +1 -1
- package/dist/src/telem/control/Indicator.d.ts.map +1 -1
- package/dist/src/telem/control/StateProvider.d.ts +1 -3
- package/dist/src/telem/control/StateProvider.d.ts.map +1 -1
- package/dist/src/telem/control/aether/chip.d.ts +19 -21
- package/dist/src/telem/control/aether/chip.d.ts.map +1 -1
- package/dist/src/telem/control/aether/controller.d.ts +17 -14
- package/dist/src/telem/control/aether/controller.d.ts.map +1 -1
- package/dist/src/telem/control/aether/indicator.d.ts +25 -28
- package/dist/src/telem/control/aether/indicator.d.ts.map +1 -1
- package/dist/src/telem/control/aether/legend.d.ts +13 -13
- package/dist/src/telem/control/aether/legend.d.ts.map +1 -1
- package/dist/src/telem/control/aether/state.d.ts +8 -8
- package/dist/src/telem/control/aether/state.d.ts.map +1 -1
- package/dist/src/text/Editable.d.ts.map +1 -1
- package/dist/src/text/Text.d.ts +2 -2
- package/dist/src/text/Text.d.ts.map +1 -1
- package/dist/src/text/WithIcon.d.ts.map +1 -1
- package/dist/src/text/core/dimensions.d.ts +24 -0
- package/dist/src/text/core/dimensions.d.ts.map +1 -0
- package/dist/src/text/core/dimensions.spec.d.ts +2 -0
- package/dist/src/text/core/dimensions.spec.d.ts.map +1 -0
- package/dist/src/text/core/external.d.ts +3 -0
- package/dist/src/text/core/external.d.ts.map +1 -0
- package/dist/src/text/core/index.d.ts +1 -1
- package/dist/src/text/core/index.d.ts.map +1 -1
- package/dist/src/text/core/types.d.ts +5 -5
- package/dist/src/text/core/types.d.ts.map +1 -1
- package/dist/src/text/external.d.ts +1 -1
- package/dist/src/text/external.d.ts.map +1 -1
- package/dist/src/theming/aether/provider.d.ts +809 -809
- package/dist/src/theming/aether/provider.d.ts.map +1 -1
- package/dist/src/theming/core/theme.d.ts +423 -424
- package/dist/src/theming/core/theme.d.ts.map +1 -1
- package/dist/src/tooltip/Dialog.d.ts.map +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/triggers.d.ts +1 -1
- package/dist/src/triggers/triggers.d.ts.map +1 -1
- package/dist/src/util/component.d.ts +1 -1
- package/dist/src/util/component.d.ts.map +1 -1
- package/dist/src/util/zod.d.ts +2 -2
- package/dist/src/util/zod.d.ts.map +1 -1
- package/dist/src/viewport/use.d.ts +1 -1
- package/dist/src/viewport/use.d.ts.map +1 -1
- package/dist/src/vis/axis/axis.d.ts +10 -10
- package/dist/src/vis/axis/axis.d.ts.map +1 -1
- package/dist/src/vis/axis/ticks.d.ts +2 -2
- package/dist/src/vis/axis/ticks.d.ts.map +1 -1
- package/dist/src/vis/button/aether/button.d.ts +25 -7
- package/dist/src/vis/button/aether/button.d.ts.map +1 -1
- package/dist/src/vis/button/use.d.ts +5 -3
- package/dist/src/vis/button/use.d.ts.map +1 -1
- package/dist/src/vis/canvas/aether/canvas.d.ts +11 -11
- package/dist/src/vis/canvas/aether/canvas.d.ts.map +1 -1
- package/dist/src/vis/diagram/Diagram.d.ts +3 -2
- package/dist/src/vis/diagram/Diagram.d.ts.map +1 -1
- package/dist/src/vis/diagram/aether/Diagram.d.ts +32 -32
- package/dist/src/vis/diagram/aether/Diagram.d.ts.map +1 -1
- package/dist/src/vis/diagram/aether/types.d.ts +19 -45
- package/dist/src/vis/diagram/aether/types.d.ts.map +1 -1
- package/dist/src/vis/diagram/align.d.ts.map +1 -1
- package/dist/src/vis/diagram/edge/connector/connector.d.ts +2 -2
- package/dist/src/vis/diagram/edge/connector/connector.d.ts.map +1 -1
- package/dist/src/vis/draw2d/canvas.d.ts +1 -4
- package/dist/src/vis/draw2d/canvas.d.ts.map +1 -1
- package/dist/src/vis/draw2d/index.d.ts.map +1 -1
- package/dist/src/vis/eraser/aether/eraser.d.ts +11 -11
- package/dist/src/vis/eraser/aether/eraser.d.ts.map +1 -1
- package/dist/src/vis/eraser/use.d.ts +1 -1
- package/dist/src/vis/eraser/use.d.ts.map +1 -1
- package/dist/src/vis/grid/grid.d.ts +3 -3
- package/dist/src/vis/grid/grid.d.ts.map +1 -1
- package/dist/src/vis/legend/Container.d.ts +7 -7
- package/dist/src/vis/legend/Container.d.ts.map +1 -1
- package/dist/src/vis/light/aether/light.d.ts +7 -8
- package/dist/src/vis/light/aether/light.d.ts.map +1 -1
- package/dist/src/vis/light/use.d.ts +2 -2
- package/dist/src/vis/light/use.d.ts.map +1 -1
- package/dist/src/vis/line/Line.d.ts +1 -1
- package/dist/src/vis/line/Line.d.ts.map +1 -1
- package/dist/src/vis/line/aether/line.d.ts +10 -10
- package/dist/src/vis/line/aether/line.d.ts.map +1 -1
- package/dist/src/vis/lineplot/Axis.d.ts +2 -2
- package/dist/src/vis/lineplot/Axis.d.ts.map +1 -1
- package/dist/src/vis/lineplot/Line.d.ts +1 -1
- package/dist/src/vis/lineplot/Line.d.ts.map +1 -1
- package/dist/src/vis/lineplot/LinePlot.d.ts +2 -2
- package/dist/src/vis/lineplot/LinePlot.d.ts.map +1 -1
- package/dist/src/vis/lineplot/aether/BoundQuerier.d.ts +7 -7
- package/dist/src/vis/lineplot/aether/BoundQuerier.d.ts.map +1 -1
- package/dist/src/vis/lineplot/aether/LinePlot.d.ts +30 -30
- package/dist/src/vis/lineplot/aether/LinePlot.d.ts.map +1 -1
- package/dist/src/vis/lineplot/aether/XAxis.d.ts +64 -64
- package/dist/src/vis/lineplot/aether/XAxis.d.ts.map +1 -1
- package/dist/src/vis/lineplot/aether/YAxis.d.ts +64 -64
- package/dist/src/vis/lineplot/aether/YAxis.d.ts.map +1 -1
- package/dist/src/vis/lineplot/aether/axis.d.ts +13 -13
- package/dist/src/vis/lineplot/aether/axis.d.ts.map +1 -1
- package/dist/src/vis/lineplot/range/Annotation.d.ts +2 -2
- package/dist/src/vis/lineplot/range/Annotation.d.ts.map +1 -1
- package/dist/src/vis/lineplot/range/Provider.d.ts +1 -1
- package/dist/src/vis/lineplot/range/Provider.d.ts.map +1 -1
- package/dist/src/vis/lineplot/range/aether/annotation.d.ts +11 -11
- package/dist/src/vis/lineplot/range/aether/annotation.d.ts.map +1 -1
- package/dist/src/vis/lineplot/range/aether/provider.d.ts +33 -31
- package/dist/src/vis/lineplot/range/aether/provider.d.ts.map +1 -1
- package/dist/src/vis/lineplot/tooltip/Tooltip.d.ts +2 -2
- package/dist/src/vis/lineplot/tooltip/Tooltip.d.ts.map +1 -1
- package/dist/src/vis/lineplot/tooltip/aether/tooltip.d.ts +29 -29
- package/dist/src/vis/lineplot/tooltip/aether/tooltip.d.ts.map +1 -1
- package/dist/src/vis/lineplot/useBoundQuerier.d.ts.map +1 -1
- package/dist/src/vis/log/Log.d.ts +2 -2
- package/dist/src/vis/log/Log.d.ts.map +1 -1
- package/dist/src/vis/log/aether/Log.d.ts +37 -37
- package/dist/src/vis/log/aether/Log.d.ts.map +1 -1
- package/dist/src/vis/measure/Measure.d.ts +1 -1
- package/dist/src/vis/measure/Measure.d.ts.map +1 -1
- package/dist/src/vis/measure/aether/measure.d.ts +36 -36
- package/dist/src/vis/measure/aether/measure.d.ts.map +1 -1
- package/dist/src/vis/render/context.d.ts.map +1 -1
- package/dist/src/vis/render/loop.d.ts +10 -15
- package/dist/src/vis/render/loop.d.ts.map +1 -1
- package/dist/src/vis/rule/Rule.d.ts +2 -2
- package/dist/src/vis/rule/Rule.d.ts.map +1 -1
- package/dist/src/vis/rule/aether/aether.d.ts +10 -10
- 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/Grid.d.ts +6 -3
- package/dist/src/vis/schematic/Grid.d.ts.map +1 -1
- package/dist/src/vis/schematic/SelectOrientation.d.ts +3 -2
- package/dist/src/vis/schematic/SelectOrientation.d.ts.map +1 -1
- package/dist/src/vis/schematic/Symbols.d.ts +108 -99
- package/dist/src/vis/schematic/Symbols.d.ts.map +1 -1
- package/dist/src/vis/schematic/external.d.ts +1 -0
- package/dist/src/vis/schematic/external.d.ts.map +1 -1
- package/dist/src/vis/schematic/primitives/Primitives.d.ts +28 -28
- package/dist/src/vis/schematic/primitives/Primitives.d.ts.map +1 -1
- package/dist/src/vis/schematic/registry.d.ts +5 -5
- package/dist/src/vis/schematic/registry.d.ts.map +1 -1
- package/dist/src/vis/setpoint/aether/setpoint.d.ts +11 -11
- package/dist/src/vis/setpoint/aether/setpoint.d.ts.map +1 -1
- package/dist/src/vis/setpoint/use.d.ts +2 -2
- package/dist/src/vis/setpoint/use.d.ts.map +1 -1
- package/dist/src/vis/text/atlas.d.ts +0 -2
- package/dist/src/vis/text/atlas.d.ts.map +1 -1
- package/dist/src/vis/text/index.d.ts.map +1 -1
- package/dist/src/vis/toggle/aether/toggle.d.ts +11 -12
- package/dist/src/vis/toggle/aether/toggle.d.ts.map +1 -1
- package/dist/src/vis/toggle/use.d.ts +2 -2
- package/dist/src/vis/toggle/use.d.ts.map +1 -1
- package/dist/src/vis/value/aether/value.d.ts +43 -43
- package/dist/src/vis/value/aether/value.d.ts.map +1 -1
- package/dist/src/vis/value/use.d.ts +15 -15
- package/dist/src/vis/value/use.d.ts.map +1 -1
- package/dist/state-DAFH2z9y.js +4082 -0
- package/dist/state-DwM4WaEw.cjs +27 -0
- 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/tree.cjs +1 -1
- package/dist/tree.js +1 -1
- package/dist/triggers.cjs +1 -1
- package/dist/triggers.js +1 -1
- package/dist/useClickOutside-CUa496t0.cjs +1 -0
- package/dist/{useClickOutside-DDCP7Fh-.js → useClickOutside-Dw3KdU3w.js} +22 -22
- package/dist/{useDebouncedCallback-DnwYZzjR.cjs → useDebouncedCallback-Bx-HX76R.cjs} +1 -1
- package/dist/{useDebouncedCallback-BG4I7mbT.js → useDebouncedCallback-Cvo_HNow.js} +1 -1
- package/dist/{useMemoCompare-BViQehyd.js → useMemoCompare-B5QPDK2p.js} +2 -2
- package/dist/{useMemoCompare-C2X7Mzx8.cjs → useMemoCompare-BDs2sKw5.cjs} +1 -1
- package/dist/useVirtualCursorDragWebKit-CUbBopD6.cjs +1 -0
- package/dist/{useVirtualCursorDragWebKit-DTU2tUmp.js → useVirtualCursorDragWebKit-CfxbToxm.js} +7 -7
- package/dist/value--TYeJRXm.cjs +55 -0
- package/dist/value-dkHk-BsO.js +10797 -0
- package/dist/video.cjs +1 -1
- package/dist/video.js +1 -1
- package/package.json +24 -23
- package/dist/ContextMenu-HpMLd1Ht.cjs +0 -1
- package/dist/DateTime-BsjSfOY-.cjs +0 -1
- package/dist/DateTime-r6hocEmI.js +0 -17
- package/dist/Divider-Dut8qPee.cjs +0 -22
- package/dist/Dropdown-BSSe1E1e.cjs +0 -1
- package/dist/Dropdown-BrFL1eSc.js +0 -327
- package/dist/Haul-C6i2oI7z.cjs +0 -1
- package/dist/Haul-CEFSvdy9.js +0 -124
- package/dist/Pack-BozAEHBp.js +0 -48
- package/dist/Pack-DeZUUdJM.cjs +0 -1
- package/dist/Provider-B86QO9NT.js +0 -461
- package/dist/Provider-Cw0mSr2D.cjs +0 -1
- package/dist/Text-C8GBHl-F.cjs +0 -1
- package/dist/Text-CMTkSEWx.cjs +0 -4
- package/dist/Toggle-C0lZDyeo.cjs +0 -1
- package/dist/WithIcon-BgS5shNZ.cjs +0 -1
- package/dist/css-9iEiTRNL.cjs +0 -15
- package/dist/css-Cnb9DQMD.js +0 -4747
- package/dist/deep-BNa3STCp.cjs +0 -1
- package/dist/deep-P35D0Sz7.js +0 -112
- package/dist/eraser-BkqFgBRY.cjs +0 -11
- package/dist/external-B7NxSklQ.js +0 -60
- package/dist/external-BA_VOnV-.js +0 -400
- package/dist/external-BGBgNbe2.cjs +0 -1
- package/dist/external-CTc1n-JC.cjs +0 -1
- package/dist/external-CzTBFiv_.cjs +0 -1
- package/dist/external-DGJ8YAe-.cjs +0 -1
- package/dist/external-DiLZ1dEk.cjs +0 -1
- package/dist/external-Dq8-cbf3.cjs +0 -1
- package/dist/fontString-Ddza50DF.cjs +0 -1
- package/dist/hooks-B5aLaWzS.cjs +0 -1
- package/dist/provider-aWtsGnV8.cjs +0 -58
- package/dist/provider-r5Ly36FI.js +0 -12854
- package/dist/src/aether/aether/aether.spec.spec.d.ts +0 -5
- package/dist/src/aether/aether/aether.spec.spec.d.ts.map +0 -1
- package/dist/src/select/Modal.d.ts +0 -1
- package/dist/src/select/Modal.d.ts.map +0 -1
- package/dist/src/status/Circle.d.ts +0 -8
- package/dist/src/status/Circle.d.ts.map +0 -1
- package/dist/src/text/dimensions.d.ts +0 -4
- package/dist/src/text/dimensions.d.ts.map +0 -1
- package/dist/src/vis/performance/Performance.d.ts +0 -2
- package/dist/src/vis/performance/Performance.d.ts.map +0 -1
- package/dist/src/vis/performance/aether/index.d.ts +0 -2
- package/dist/src/vis/performance/aether/index.d.ts.map +0 -1
- package/dist/src/vis/performance/aether/performance.d.ts +0 -15
- package/dist/src/vis/performance/aether/performance.d.ts.map +0 -1
- package/dist/src/vis/performance/index.d.ts +0 -2
- package/dist/src/vis/performance/index.d.ts.map +0 -1
- package/dist/state-CjGemC7S.js +0 -88
- package/dist/state-_FFrG5nH.cjs +0 -1
- package/dist/toArray-B7nD2CTw.js +0 -5
- package/dist/toArray-BvVYuN_b.cjs +0 -1
- package/dist/units-CX_coN92.cjs +0 -1
- package/dist/units-Ct3Xl5nK.js +0 -11
- package/dist/useClickOutside-CSff8yb-.cjs +0 -1
- package/dist/useVirtualCursorDragWebKit-DDmXE4RW.cjs +0 -1
- package/dist/value-CkzEjG7v.cjs +0 -57
- package/dist/value-DIoBc3VU.js +0 -5977
|
@@ -1,58 +1,58 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import { a as
|
|
8
|
-
const
|
|
9
|
-
include:
|
|
10
|
-
exclude:
|
|
11
|
-
level:
|
|
12
|
-
}),
|
|
13
|
-
class
|
|
1
|
+
var z = Object.defineProperty;
|
|
2
|
+
var H = (l, t, e) => t in l ? z(l, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : l[t] = e;
|
|
3
|
+
var a = (l, t, e) => H(l, typeof t != "symbol" ? t + "" : t, e);
|
|
4
|
+
import { P as n, A as C, K as u, q as M, o as y, c as V, C as Z } from "./css-DjQu2Qyf.js";
|
|
5
|
+
import { h as _, j as $, k as J, m as Q, n as j, L as tt } from "./provider-gW90qzEG.js";
|
|
6
|
+
import { o as N, _ as et, b as I, g as st } from "./state-DAFH2z9y.js";
|
|
7
|
+
import { a as X } from "./dimensions-FnMV2fyj.js";
|
|
8
|
+
const it = N({
|
|
9
|
+
include: I().array().optional(),
|
|
10
|
+
exclude: I().array().optional(),
|
|
11
|
+
level: et(_.LOG_LEVELS).optional().default("info")
|
|
12
|
+
}), b = "alamos-provider";
|
|
13
|
+
class O extends $ {
|
|
14
14
|
constructor() {
|
|
15
15
|
super(...arguments);
|
|
16
|
-
|
|
16
|
+
a(this, "schema", it);
|
|
17
17
|
}
|
|
18
18
|
afterUpdate(e) {
|
|
19
|
-
if (e.getOptional(
|
|
20
|
-
const i = [], { include: r, exclude:
|
|
21
|
-
(r != null ||
|
|
19
|
+
if (e.getOptional(b) != null) return;
|
|
20
|
+
const i = [], { include: r, exclude: h, level: o } = this.state;
|
|
21
|
+
(r != null || h != null) && i.push(_.logLevelKeyFiler({ include: r, exclude: h })), o != null && i.push(_.logThresholdFilter(o)), i.length === 0 && i.push(() => !1), this.internal.ins = new _.Instrumentation({
|
|
22
22
|
key: "aether",
|
|
23
23
|
logger: new _.Logger({ filters: i })
|
|
24
|
-
}), e.set(
|
|
24
|
+
}), e.set(b, this.internal.ins);
|
|
25
25
|
}
|
|
26
26
|
}
|
|
27
|
-
|
|
28
|
-
const
|
|
29
|
-
const e =
|
|
27
|
+
a(O, "TYPE", "alamos.Provider");
|
|
28
|
+
const rt = (l, t) => {
|
|
29
|
+
const e = l.get(b);
|
|
30
30
|
if (e == null) throw new Error("No instrumentation provider");
|
|
31
31
|
return t == null ? e : e.child(t);
|
|
32
|
-
},
|
|
33
|
-
[
|
|
34
|
-
},
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
32
|
+
}, Ct = {
|
|
33
|
+
[O.TYPE]: O
|
|
34
|
+
}, T = (l, t) => n.construct(
|
|
35
|
+
n.left(l) - t.x,
|
|
36
|
+
n.top(l) - t.y,
|
|
37
|
+
n.width(l) + t.x * 2,
|
|
38
|
+
n.height(l) + t.y * 2
|
|
39
39
|
);
|
|
40
40
|
class R {
|
|
41
|
-
constructor(t, e, s, i =
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
41
|
+
constructor(t, e, s, i = C.XY.IDENTITY) {
|
|
42
|
+
a(this, "scale_");
|
|
43
|
+
a(this, "wrapped");
|
|
44
|
+
a(this, "atlasRegistry");
|
|
45
|
+
a(this, "cachedFont", null);
|
|
46
|
+
a(this, "cachedFillStyle", null);
|
|
47
|
+
a(this, "cachedStrokeStyle", null);
|
|
48
|
+
a(this, "cachedLineWidth", null);
|
|
49
|
+
a(this, "cachedGlobalAlpha", null);
|
|
50
|
+
a(this, "cachedTextAlign", null);
|
|
51
|
+
a(this, "cachedTextBaseline", null);
|
|
52
|
+
a(this, "cachedLineCap", null);
|
|
53
|
+
a(this, "cachedLineJoin", null);
|
|
54
|
+
a(this, "cachedMiterLimit", null);
|
|
55
|
+
a(this, "dpr");
|
|
56
56
|
this.wrapped = t, this.scale_ = i, this.atlasRegistry = e, this.dpr = s;
|
|
57
57
|
}
|
|
58
58
|
get fontStretch() {
|
|
@@ -88,6 +88,11 @@ class R {
|
|
|
88
88
|
set textRendering(t) {
|
|
89
89
|
this.wrapped.textRendering = t;
|
|
90
90
|
}
|
|
91
|
+
checkAtlasFillStyle(t = !1) {
|
|
92
|
+
return t && typeof this.fillStyle == "string" ? [!0, this.fillStyle] : (t && console.warn(
|
|
93
|
+
"attempted to use a text atlas with a gradient fill style. This is not supported. Falling back to default canvas fill."
|
|
94
|
+
), [!1, null]);
|
|
95
|
+
}
|
|
91
96
|
reset() {
|
|
92
97
|
this.wrapped.reset();
|
|
93
98
|
}
|
|
@@ -133,16 +138,16 @@ class R {
|
|
|
133
138
|
set strokeStyle(t) {
|
|
134
139
|
t !== this.cachedStrokeStyle && (this.cachedStrokeStyle = t, this.wrapped.strokeStyle = t);
|
|
135
140
|
}
|
|
136
|
-
drawImage(t, e, s, i, r,
|
|
141
|
+
drawImage(t, e, s, i, r, h, o, c, d) {
|
|
137
142
|
this.wrapped.drawImage(
|
|
138
143
|
t,
|
|
139
144
|
e,
|
|
140
145
|
s,
|
|
141
146
|
i,
|
|
142
147
|
r,
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
148
|
+
h != null ? this.scale_.x.pos(h) : h,
|
|
149
|
+
o != null ? this.scale_.y.pos(o) : o,
|
|
150
|
+
c != null ? this.scale_.x.dim(c) : c,
|
|
146
151
|
d != null ? this.scale_.y.dim(d) : d
|
|
147
152
|
);
|
|
148
153
|
}
|
|
@@ -175,8 +180,8 @@ class R {
|
|
|
175
180
|
createPattern(t, e) {
|
|
176
181
|
return this.wrapped.createPattern(t, e);
|
|
177
182
|
}
|
|
178
|
-
createRadialGradient(t, e, s, i, r,
|
|
179
|
-
return this.wrapped.createRadialGradient(t, e, s, i, r,
|
|
183
|
+
createRadialGradient(t, e, s, i, r, h) {
|
|
184
|
+
return this.wrapped.createRadialGradient(t, e, s, i, r, h);
|
|
180
185
|
}
|
|
181
186
|
get filter() {
|
|
182
187
|
return this.wrapped.filter;
|
|
@@ -190,7 +195,7 @@ class R {
|
|
|
190
195
|
getImageData(t, e, s, i, r) {
|
|
191
196
|
return this.wrapped.getImageData(t, e, s, i, r);
|
|
192
197
|
}
|
|
193
|
-
putImageData(t, e, s, i, r,
|
|
198
|
+
putImageData(t, e, s, i, r, h, o) {
|
|
194
199
|
this.wrapped.putImageData(
|
|
195
200
|
// @ts-expect-error - typescript overloads cause issues here
|
|
196
201
|
t,
|
|
@@ -198,8 +203,8 @@ class R {
|
|
|
198
203
|
s,
|
|
199
204
|
i,
|
|
200
205
|
r,
|
|
201
|
-
|
|
202
|
-
|
|
206
|
+
h,
|
|
207
|
+
o
|
|
203
208
|
);
|
|
204
209
|
}
|
|
205
210
|
get imageSmoothingEnabled() {
|
|
@@ -214,14 +219,14 @@ class R {
|
|
|
214
219
|
set imageSmoothingQuality(t) {
|
|
215
220
|
this.wrapped.imageSmoothingQuality = t;
|
|
216
221
|
}
|
|
217
|
-
arc(t, e, s, i, r,
|
|
222
|
+
arc(t, e, s, i, r, h) {
|
|
218
223
|
this.wrapped.arc(
|
|
219
224
|
this.scale_.x.pos(t),
|
|
220
225
|
this.scale_.y.pos(e),
|
|
221
226
|
this.scale_.x.dim(s),
|
|
222
227
|
i,
|
|
223
228
|
r,
|
|
224
|
-
|
|
229
|
+
h
|
|
225
230
|
);
|
|
226
231
|
}
|
|
227
232
|
arcTo(t, e, s, i, r) {
|
|
@@ -233,29 +238,29 @@ class R {
|
|
|
233
238
|
this.scale_.x.dim(r)
|
|
234
239
|
);
|
|
235
240
|
}
|
|
236
|
-
bezierCurveTo(t, e, s, i, r,
|
|
241
|
+
bezierCurveTo(t, e, s, i, r, h) {
|
|
237
242
|
this.wrapped.bezierCurveTo(
|
|
238
243
|
this.scale_.x.pos(t),
|
|
239
244
|
this.scale_.y.pos(e),
|
|
240
245
|
this.scale_.x.pos(s),
|
|
241
246
|
this.scale_.y.pos(i),
|
|
242
247
|
this.scale_.x.pos(r),
|
|
243
|
-
this.scale_.y.pos(
|
|
248
|
+
this.scale_.y.pos(h)
|
|
244
249
|
);
|
|
245
250
|
}
|
|
246
251
|
closePath() {
|
|
247
252
|
this.wrapped.closePath();
|
|
248
253
|
}
|
|
249
|
-
ellipse(t, e, s, i, r,
|
|
254
|
+
ellipse(t, e, s, i, r, h, o, c) {
|
|
250
255
|
this.wrapped.ellipse(
|
|
251
256
|
this.scale_.x.pos(t),
|
|
252
257
|
this.scale_.y.pos(e),
|
|
253
258
|
this.scale_.x.dim(s),
|
|
254
259
|
this.scale_.y.dim(i),
|
|
255
260
|
r,
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
261
|
+
h,
|
|
262
|
+
o,
|
|
263
|
+
c
|
|
259
264
|
);
|
|
260
265
|
}
|
|
261
266
|
lineTo(t, e) {
|
|
@@ -368,13 +373,9 @@ class R {
|
|
|
368
373
|
this.wrapped.save();
|
|
369
374
|
}
|
|
370
375
|
fillText(t, e, s, i, r = {}) {
|
|
371
|
-
const
|
|
372
|
-
if (
|
|
373
|
-
this.atlasRegistry.get({
|
|
374
|
-
font: this.font,
|
|
375
|
-
textColor: this.fillStyle,
|
|
376
|
-
dpr: this.dpr
|
|
377
|
-
}).fillText(this, t, e, s);
|
|
376
|
+
const [h, o] = this.checkAtlasFillStyle(r.useAtlas);
|
|
377
|
+
if (h) {
|
|
378
|
+
this.atlasRegistry.get({ font: this.font, textColor: o }).fillText(this, t, e, s);
|
|
378
379
|
return;
|
|
379
380
|
}
|
|
380
381
|
this.wrapped.fillText(
|
|
@@ -384,20 +385,12 @@ class R {
|
|
|
384
385
|
i != null ? this.scale_.x.dim(i) : void 0
|
|
385
386
|
);
|
|
386
387
|
}
|
|
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
388
|
measureText(t) {
|
|
395
389
|
return this.wrapped.measureText(t);
|
|
396
390
|
}
|
|
397
391
|
textDimensions(t, e = {}) {
|
|
398
|
-
const
|
|
399
|
-
|
|
400
|
-
return s ? i = this.atlasMeasureText(t) : i = M(this.measureText(t)), i;
|
|
392
|
+
const [s, i] = this.checkAtlasFillStyle(e.useAtlas);
|
|
393
|
+
return s ? this.atlasRegistry.get({ font: this.font, textColor: i }).measureText(t) : X(this.measureText(t));
|
|
401
394
|
}
|
|
402
395
|
strokeText(t, e, s, i) {
|
|
403
396
|
this.wrapped.strokeText(
|
|
@@ -449,37 +442,37 @@ class R {
|
|
|
449
442
|
scale(t, e) {
|
|
450
443
|
this.wrapped.scale(t, e), this.dpr = t;
|
|
451
444
|
}
|
|
452
|
-
scissor(t, e =
|
|
453
|
-
const s = new
|
|
454
|
-
return t =
|
|
445
|
+
scissor(t, e = u.ZERO) {
|
|
446
|
+
const s = new at(this.scale_);
|
|
447
|
+
return t = T(t, e), s.rect(...u.couple(n.topLeft(t)), ...M.couple(n.dims(t))), this.save(), this.clip(s.getPath()), () => this.restore();
|
|
455
448
|
}
|
|
456
|
-
setTransform(t, e, s, i, r,
|
|
457
|
-
this.wrapped.setTransform(t, e, s, i, r,
|
|
449
|
+
setTransform(t, e, s, i, r, h) {
|
|
450
|
+
this.wrapped.setTransform(t, e, s, i, r, h);
|
|
458
451
|
}
|
|
459
|
-
transform(t, e, s, i, r,
|
|
460
|
-
this.wrapped.transform(t, e, s, i, r,
|
|
452
|
+
transform(t, e, s, i, r, h) {
|
|
453
|
+
this.wrapped.transform(t, e, s, i, r, h);
|
|
461
454
|
}
|
|
462
455
|
translate(t, e) {
|
|
463
456
|
this.wrapped.translate(t, e);
|
|
464
457
|
}
|
|
465
458
|
}
|
|
466
|
-
class
|
|
467
|
-
constructor(t =
|
|
468
|
-
|
|
469
|
-
|
|
459
|
+
class at {
|
|
460
|
+
constructor(t = C.XY.IDENTITY, e) {
|
|
461
|
+
a(this, "scale_");
|
|
462
|
+
a(this, "path");
|
|
470
463
|
this.scale_ = t, e instanceof Path2D || typeof e == "string" ? this.path = new Path2D(e) : this.path = new Path2D();
|
|
471
464
|
}
|
|
472
465
|
addPath(t, e) {
|
|
473
466
|
this.path.addPath(t, e);
|
|
474
467
|
}
|
|
475
|
-
arc(t, e, s, i, r,
|
|
468
|
+
arc(t, e, s, i, r, h) {
|
|
476
469
|
this.path.arc(
|
|
477
470
|
this.scale_.x.pos(t),
|
|
478
471
|
this.scale_.y.pos(e),
|
|
479
472
|
this.scale_.x.dim(s),
|
|
480
473
|
i,
|
|
481
474
|
r,
|
|
482
|
-
|
|
475
|
+
h
|
|
483
476
|
);
|
|
484
477
|
}
|
|
485
478
|
arcTo(t, e, s, i, r) {
|
|
@@ -491,29 +484,29 @@ class et {
|
|
|
491
484
|
this.scale_.x.dim(r)
|
|
492
485
|
);
|
|
493
486
|
}
|
|
494
|
-
bezierCurveTo(t, e, s, i, r,
|
|
487
|
+
bezierCurveTo(t, e, s, i, r, h) {
|
|
495
488
|
this.path.bezierCurveTo(
|
|
496
489
|
this.scale_.x.pos(t),
|
|
497
490
|
this.scale_.y.pos(e),
|
|
498
491
|
this.scale_.x.pos(s),
|
|
499
492
|
this.scale_.y.pos(i),
|
|
500
493
|
this.scale_.x.pos(r),
|
|
501
|
-
this.scale_.y.pos(
|
|
494
|
+
this.scale_.y.pos(h)
|
|
502
495
|
);
|
|
503
496
|
}
|
|
504
497
|
closePath() {
|
|
505
498
|
this.path.closePath();
|
|
506
499
|
}
|
|
507
|
-
ellipse(t, e, s, i, r,
|
|
500
|
+
ellipse(t, e, s, i, r, h, o, c) {
|
|
508
501
|
this.path.ellipse(
|
|
509
502
|
this.scale_.x.pos(t),
|
|
510
503
|
this.scale_.y.pos(e),
|
|
511
504
|
this.scale_.x.dim(s),
|
|
512
505
|
this.scale_.y.dim(i),
|
|
513
506
|
r,
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
507
|
+
h,
|
|
508
|
+
o,
|
|
509
|
+
c
|
|
517
510
|
);
|
|
518
511
|
}
|
|
519
512
|
lineTo(t, e) {
|
|
@@ -539,13 +532,13 @@ class et {
|
|
|
539
532
|
);
|
|
540
533
|
}
|
|
541
534
|
roundRect(t, e, s, i, r) {
|
|
542
|
-
const
|
|
535
|
+
const h = this.scaleRadii(r);
|
|
543
536
|
this.path.roundRect(
|
|
544
537
|
this.scale_.x.pos(t),
|
|
545
538
|
this.scale_.y.pos(e),
|
|
546
539
|
this.scale_.x.dim(s),
|
|
547
540
|
this.scale_.y.dim(i),
|
|
548
|
-
|
|
541
|
+
h
|
|
549
542
|
);
|
|
550
543
|
}
|
|
551
544
|
// Helper method to scale radii for roundRect
|
|
@@ -563,18 +556,18 @@ class et {
|
|
|
563
556
|
return this.path;
|
|
564
557
|
}
|
|
565
558
|
}
|
|
566
|
-
const
|
|
559
|
+
const ht = `precision mediump float;
|
|
567
560
|
|
|
568
561
|
void main(void) {
|
|
569
562
|
gl_FragColor = vec4(0.0, 0.0, 0.0, 0.0);
|
|
570
563
|
}
|
|
571
|
-
`,
|
|
564
|
+
`, nt = `attribute vec4 a_position;
|
|
572
565
|
|
|
573
566
|
void main(void) {
|
|
574
567
|
gl_Position = a_position;
|
|
575
568
|
}
|
|
576
|
-
`, k = (
|
|
577
|
-
let
|
|
569
|
+
`, k = (l) => new Error(`failed to compile webgl program: ${l}`), lt = new Error("null shader encountered");
|
|
570
|
+
let ot = class {
|
|
578
571
|
/**
|
|
579
572
|
* @constructor compiles the given vertex and fragment shaders under the given
|
|
580
573
|
* render context into a program.
|
|
@@ -585,14 +578,14 @@ let at = class {
|
|
|
585
578
|
*/
|
|
586
579
|
constructor(t, e, s) {
|
|
587
580
|
/** The render context used by this program. */
|
|
588
|
-
|
|
581
|
+
a(this, "renderCtx");
|
|
589
582
|
/** The underlying webgl program. */
|
|
590
|
-
|
|
583
|
+
a(this, "prog");
|
|
591
584
|
/** The code for the vertex shader. */
|
|
592
|
-
|
|
585
|
+
a(this, "vertShader");
|
|
593
586
|
/** The code for the fragment shader. */
|
|
594
|
-
|
|
595
|
-
|
|
587
|
+
a(this, "fragShader");
|
|
588
|
+
a(this, "uniformLocCache", /* @__PURE__ */ new Map());
|
|
596
589
|
this.renderCtx = t;
|
|
597
590
|
const i = t.gl.createProgram();
|
|
598
591
|
if (i == null) throw k("failed to create program");
|
|
@@ -609,7 +602,7 @@ let at = class {
|
|
|
609
602
|
* @param value - The value to set.
|
|
610
603
|
*/
|
|
611
604
|
uniformXY(t, e) {
|
|
612
|
-
this.renderCtx.gl.uniform2fv(this.getUniformLoc(t),
|
|
605
|
+
this.renderCtx.gl.uniform2fv(this.getUniformLoc(t), u.couple(e));
|
|
613
606
|
}
|
|
614
607
|
/**
|
|
615
608
|
* Sets a uniform color value.
|
|
@@ -633,22 +626,22 @@ let at = class {
|
|
|
633
626
|
}
|
|
634
627
|
compileShader(t, e) {
|
|
635
628
|
const s = this.renderCtx.gl, i = s.createShader(e);
|
|
636
|
-
if (i == null) throw
|
|
629
|
+
if (i == null) throw lt;
|
|
637
630
|
if (s.shaderSource(i, t), s.compileShader(i), !s.getShaderParameter(i, s.COMPILE_STATUS)) {
|
|
638
|
-
const
|
|
639
|
-
throw s.deleteShader(i), k(
|
|
631
|
+
const h = s.getShaderInfoLog(i);
|
|
632
|
+
throw s.deleteShader(i), k(h ?? "unknown");
|
|
640
633
|
}
|
|
641
634
|
s.attachShader(this.prog, i);
|
|
642
635
|
}
|
|
643
636
|
};
|
|
644
|
-
const
|
|
645
|
-
class
|
|
637
|
+
const ct = new Float32Array([0, 0, 0, 0, 0, 0]);
|
|
638
|
+
class pt extends ot {
|
|
646
639
|
constructor(e) {
|
|
647
|
-
super(e,
|
|
648
|
-
|
|
640
|
+
super(e, nt, ht);
|
|
641
|
+
a(this, "positionBuffer");
|
|
649
642
|
const s = e.gl.createBuffer();
|
|
650
|
-
if (s == null) throw new
|
|
651
|
-
this.positionBuffer = s, e.gl.bindBuffer(e.gl.ARRAY_BUFFER, this.positionBuffer), e.gl.bufferData(e.gl.ARRAY_BUFFER,
|
|
643
|
+
if (s == null) throw new J("webgl: failed to create buffer");
|
|
644
|
+
this.positionBuffer = s, e.gl.bindBuffer(e.gl.ARRAY_BUFFER, this.positionBuffer), e.gl.bufferData(e.gl.ARRAY_BUFFER, ct, e.gl.STATIC_DRAW);
|
|
652
645
|
}
|
|
653
646
|
exec() {
|
|
654
647
|
const { gl: e } = this.renderCtx, s = e.getAttribLocation(this.prog, "a_position");
|
|
@@ -657,197 +650,24 @@ class ht extends at {
|
|
|
657
650
|
e.bindVertexArray(i), e.enableVertexAttribArray(s), e.vertexAttribPointer(s, 2, e.FLOAT, !1, 0, 0), this.setAsActive(), e.drawArrays(e.TRIANGLES, 0, 3);
|
|
658
651
|
}
|
|
659
652
|
}
|
|
660
|
-
const
|
|
661
|
-
|
|
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 {
|
|
653
|
+
const B = { high: 1, low: 0 };
|
|
654
|
+
class dt {
|
|
834
655
|
constructor({
|
|
835
656
|
afterRender: t,
|
|
836
|
-
instrumentation: e = _.Instrumentation.NOOP
|
|
657
|
+
instrumentation: e = _.Instrumentation.NOOP,
|
|
658
|
+
handleError: s
|
|
837
659
|
}) {
|
|
838
|
-
/** To lock things so renders don't collide */
|
|
839
|
-
n(this, "mutex", new ut());
|
|
840
660
|
/** Stores the current requests for rendering. */
|
|
841
|
-
|
|
661
|
+
a(this, "requests", /* @__PURE__ */ new Map());
|
|
842
662
|
/** Stores render cleanup functions for clearing canvases and other resources. */
|
|
843
|
-
|
|
663
|
+
a(this, "cleanup", /* @__PURE__ */ new Map());
|
|
844
664
|
/** A callback to run after each render call. */
|
|
845
|
-
|
|
665
|
+
a(this, "afterRender");
|
|
846
666
|
/** Instrumentation for logging, tracing, metrics, etc. */
|
|
847
|
-
|
|
848
|
-
/**
|
|
849
|
-
|
|
850
|
-
this.afterRender = t, this.instrumentation = e, this.start();
|
|
667
|
+
a(this, "instrumentation");
|
|
668
|
+
/** A function to add status to the status bar. */
|
|
669
|
+
a(this, "handleError");
|
|
670
|
+
this.afterRender = t, this.instrumentation = e, this.handleError = s, this.start();
|
|
851
671
|
}
|
|
852
672
|
/**
|
|
853
673
|
* Sets a new request in the queue according to a set of rules:
|
|
@@ -863,19 +683,15 @@ class ft {
|
|
|
863
683
|
const e = this.requests.get(t.key);
|
|
864
684
|
if (e == null) this.requests.set(t.key, t);
|
|
865
685
|
else {
|
|
866
|
-
const s =
|
|
686
|
+
const s = B[t.priority] >= B[e.priority], i = t.canvases.length >= e.canvases.length;
|
|
867
687
|
s && i && this.requests.set(t.key, t);
|
|
868
688
|
}
|
|
869
689
|
}
|
|
870
690
|
/** Execute the render. */
|
|
871
691
|
render() {
|
|
872
|
-
var
|
|
692
|
+
var e;
|
|
873
693
|
const { requests: t } = this;
|
|
874
|
-
|
|
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);
|
|
694
|
+
t.size !== 0 && (this.runCleanupsSync(), this.renderSync(), this.requests.clear(), (e = this.afterRender) == null || e.call(this));
|
|
879
695
|
}
|
|
880
696
|
runCleanupsSync() {
|
|
881
697
|
const { cleanup: t, requests: e } = this;
|
|
@@ -891,66 +707,64 @@ class ft {
|
|
|
891
707
|
const s = e.render();
|
|
892
708
|
s != null && this.cleanup.set(e.key, s);
|
|
893
709
|
} catch (s) {
|
|
894
|
-
|
|
710
|
+
this.handleError(s, "render loop failed");
|
|
895
711
|
}
|
|
896
712
|
});
|
|
897
713
|
}
|
|
898
714
|
/** Starts the rendering loop. */
|
|
899
|
-
|
|
715
|
+
start() {
|
|
900
716
|
const t = () => {
|
|
901
717
|
try {
|
|
902
718
|
this.render();
|
|
903
719
|
} catch (e) {
|
|
904
|
-
|
|
720
|
+
this.handleError(e, "render loop failed");
|
|
905
721
|
}
|
|
906
722
|
requestAnimationFrame(t);
|
|
907
723
|
};
|
|
908
724
|
requestAnimationFrame(t);
|
|
909
725
|
}
|
|
910
726
|
}
|
|
911
|
-
const
|
|
727
|
+
const S = 2, f = 2, E = class E {
|
|
912
728
|
constructor(t) {
|
|
913
729
|
// A canvas buffer that holds rendered characters.
|
|
914
|
-
|
|
730
|
+
a(this, "atlas");
|
|
915
731
|
// Cached dimensions of a character.
|
|
916
|
-
|
|
917
|
-
// The device pixel ratio of the atlas.
|
|
918
|
-
n(this, "dpr");
|
|
732
|
+
a(this, "charDims");
|
|
919
733
|
// A map of characters to their index in the atlas.
|
|
920
|
-
|
|
921
|
-
const { font: e,
|
|
922
|
-
this.
|
|
923
|
-
const
|
|
924
|
-
|
|
925
|
-
const
|
|
926
|
-
this.charDims =
|
|
927
|
-
const
|
|
734
|
+
a(this, "charMap");
|
|
735
|
+
const { font: e, characters: s = E.DEFAULT_CHARS, textColor: i } = t;
|
|
736
|
+
this.charMap = /* @__PURE__ */ new Map();
|
|
737
|
+
const r = V.unique(Array.from(s)), o = new OffscreenCanvas(1, 1).getContext("2d");
|
|
738
|
+
o.font = e;
|
|
739
|
+
const c = o.measureText("0");
|
|
740
|
+
this.charDims = X(c), this.charDims.width += S, this.charDims.height += S;
|
|
741
|
+
const d = r.length, g = this.charDims.width, x = this.charDims.height, p = Math.ceil(Math.sqrt(d)), A = Math.ceil(d / p);
|
|
928
742
|
this.atlas = new OffscreenCanvas(
|
|
929
|
-
|
|
930
|
-
|
|
743
|
+
g * p * f,
|
|
744
|
+
x * (A + 1) * f
|
|
931
745
|
);
|
|
932
|
-
const
|
|
933
|
-
|
|
934
|
-
const
|
|
935
|
-
|
|
746
|
+
const m = this.atlas.getContext("2d");
|
|
747
|
+
m.scale(f, f), m.font = e, m.textBaseline = "alphabetic", m.textAlign = "left", m.fillStyle = y.hex(i), m.clearRect(0, 0, this.atlas.width, this.atlas.height), r.forEach((F, L) => {
|
|
748
|
+
const q = L % p, K = Math.floor(L / p), U = q * g, W = (K + 1) * x;
|
|
749
|
+
m.fillText(F, U, W), this.charMap.set(F, L);
|
|
936
750
|
});
|
|
937
751
|
}
|
|
938
752
|
fillText(t, e, s, i) {
|
|
939
|
-
const { width: r, height:
|
|
940
|
-
for (let
|
|
941
|
-
const d = e[
|
|
942
|
-
if (
|
|
943
|
-
const
|
|
753
|
+
const { width: r, height: h } = this.charDims, o = Math.ceil(Math.sqrt(this.charMap.size));
|
|
754
|
+
for (let c = 0; c < e.length; c++) {
|
|
755
|
+
const d = e[c], g = this.charMap.get(d);
|
|
756
|
+
if (g === void 0) continue;
|
|
757
|
+
const x = g % o, p = Math.floor(g / o);
|
|
944
758
|
t.drawImage(
|
|
945
759
|
this.atlas,
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
r *
|
|
949
|
-
|
|
950
|
-
s +
|
|
951
|
-
i -
|
|
760
|
+
x * r * f,
|
|
761
|
+
p * h * f + S,
|
|
762
|
+
r * f,
|
|
763
|
+
h * f,
|
|
764
|
+
s + c * r,
|
|
765
|
+
i - h - S / f,
|
|
952
766
|
r,
|
|
953
|
-
|
|
767
|
+
h
|
|
954
768
|
);
|
|
955
769
|
}
|
|
956
770
|
}
|
|
@@ -959,11 +773,11 @@ const T = 2, v = class v {
|
|
|
959
773
|
}
|
|
960
774
|
};
|
|
961
775
|
// The default characters to include in the atlas.
|
|
962
|
-
|
|
963
|
-
let
|
|
964
|
-
class
|
|
776
|
+
a(E, "DEFAULT_CHARS", "0123456789.:-µmsNa∞ᴇ");
|
|
777
|
+
let v = E;
|
|
778
|
+
class ut {
|
|
965
779
|
constructor() {
|
|
966
|
-
|
|
780
|
+
a(this, "atlases");
|
|
967
781
|
this.atlases = /* @__PURE__ */ new Map();
|
|
968
782
|
}
|
|
969
783
|
/**
|
|
@@ -971,96 +785,102 @@ class gt {
|
|
|
971
785
|
* atlas does not exist in the registry, it is created and added to the registry.
|
|
972
786
|
*/
|
|
973
787
|
get(t) {
|
|
974
|
-
const e = `${t.font}-${y.hex(t.textColor)}-${t.
|
|
788
|
+
const e = `${t.font}-${y.hex(t.textColor)}-${t.characters}`;
|
|
975
789
|
if (this.atlases.has(e)) return this.atlases.get(e);
|
|
976
|
-
const s = new
|
|
790
|
+
const s = new v(t);
|
|
977
791
|
return this.atlases.set(e, s), s;
|
|
978
792
|
}
|
|
979
793
|
}
|
|
980
|
-
const
|
|
981
|
-
constructor(t, e, s, i, r) {
|
|
794
|
+
const G = (l) => (l.textRendering = "optimizeSpeed", l.imageSmoothingEnabled = !1, l), w = class w {
|
|
795
|
+
constructor(t, e, s, i, r, h, o) {
|
|
982
796
|
/* The canvas element used by WebGL. */
|
|
983
|
-
|
|
797
|
+
a(this, "glCanvas");
|
|
984
798
|
/** The canvas element used by the 2D canvas. */
|
|
985
|
-
|
|
799
|
+
a(this, "upper2dCanvas");
|
|
986
800
|
/** The canvas element used by the 2D canvas. */
|
|
987
|
-
|
|
801
|
+
a(this, "lower2dCanvas");
|
|
988
802
|
/** The WebGL rendering context. */
|
|
989
|
-
|
|
803
|
+
a(this, "gl");
|
|
990
804
|
/** A 2D canvas that sits below the WebGL canvas. */
|
|
991
|
-
|
|
805
|
+
a(this, "lower2d");
|
|
992
806
|
/** A 2D canvas that sits above the WebGL canvas. */
|
|
993
|
-
|
|
807
|
+
a(this, "upper2d");
|
|
994
808
|
/** The region the canvas occupies in pixel space */
|
|
995
|
-
|
|
809
|
+
a(this, "region");
|
|
996
810
|
/** The device pixel ratio of the canvas */
|
|
997
|
-
|
|
811
|
+
a(this, "dpr");
|
|
998
812
|
/** queue render transitions onto the stack */
|
|
999
|
-
|
|
813
|
+
a(this, "loop");
|
|
1000
814
|
/** See the @link{clear.Program} for why this is necessary. */
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
815
|
+
a(this, "clearProgram");
|
|
816
|
+
a(this, "os");
|
|
817
|
+
a(this, "instrumentation");
|
|
1004
818
|
this.upper2dCanvas = s, this.lower2dCanvas = e, this.glCanvas = t, this.os = i, this.instrumentation = r, this.dpr = 1;
|
|
1005
|
-
const
|
|
1006
|
-
if (
|
|
1007
|
-
const
|
|
1008
|
-
this.lower2d =
|
|
1009
|
-
new R(
|
|
819
|
+
const c = this.lower2dCanvas.getContext("2d");
|
|
820
|
+
if (c == null) throw new Error("Could not get 2D context");
|
|
821
|
+
const d = new ut();
|
|
822
|
+
this.lower2d = G(
|
|
823
|
+
new R(c, d, this.dpr)
|
|
1010
824
|
);
|
|
1011
|
-
const
|
|
1012
|
-
if (
|
|
1013
|
-
this.upper2d =
|
|
1014
|
-
new R(
|
|
825
|
+
const g = this.upper2dCanvas.getContext("2d");
|
|
826
|
+
if (g == null) throw new Error("Could not get 2D context");
|
|
827
|
+
this.upper2d = G(
|
|
828
|
+
new R(g, d, this.dpr)
|
|
1015
829
|
);
|
|
1016
|
-
const
|
|
830
|
+
const x = {
|
|
1017
831
|
preserveDrawingBuffer: !0,
|
|
1018
832
|
powerPreference: "high-performance",
|
|
1019
833
|
stencil: !1,
|
|
1020
834
|
depth: !1
|
|
1021
|
-
},
|
|
1022
|
-
if (
|
|
1023
|
-
|
|
1024
|
-
|
|
835
|
+
}, p = this.glCanvas.getContext("webgl2", x);
|
|
836
|
+
if (p == null) throw new Error("Could not get WebGL context");
|
|
837
|
+
p.disable(p.DEPTH_TEST), p.disable(p.STENCIL_TEST), p.disable(p.CULL_FACE), p.disable(p.DITHER), this.gl = p, this.glCanvas.oncontextlost = () => h({
|
|
838
|
+
variant: "error",
|
|
839
|
+
message: "WebGL context lost"
|
|
840
|
+
});
|
|
841
|
+
const A = () => {
|
|
1025
842
|
this.gl.flush(), this.gl.finish();
|
|
1026
843
|
};
|
|
1027
|
-
this.loop = new
|
|
1028
|
-
afterRender:
|
|
1029
|
-
instrumentation: this.instrumentation
|
|
1030
|
-
|
|
844
|
+
this.loop = new dt({
|
|
845
|
+
afterRender: A,
|
|
846
|
+
instrumentation: this.instrumentation,
|
|
847
|
+
handleError: o
|
|
848
|
+
}), this.region = n.ZERO, this.os === "Windows" && (this.clearProgram = new pt(this));
|
|
1031
849
|
}
|
|
1032
850
|
static create(t, e, s, i, r) {
|
|
1033
|
-
const
|
|
851
|
+
const h = rt(t, "render_context"), o = new w(
|
|
1034
852
|
e,
|
|
1035
853
|
s,
|
|
1036
854
|
i,
|
|
1037
855
|
r,
|
|
1038
|
-
|
|
856
|
+
h,
|
|
857
|
+
Q(t),
|
|
858
|
+
j(t)
|
|
1039
859
|
);
|
|
1040
|
-
return t.set(
|
|
860
|
+
return t.set(w.CONTEXT_KEY, o), o;
|
|
1041
861
|
}
|
|
1042
862
|
static useOptional(t) {
|
|
1043
|
-
return t.getOptional(
|
|
863
|
+
return t.getOptional(w.CONTEXT_KEY);
|
|
1044
864
|
}
|
|
1045
865
|
static use(t) {
|
|
1046
|
-
return t.get(
|
|
866
|
+
return t.get(w.CONTEXT_KEY);
|
|
1047
867
|
}
|
|
1048
868
|
update(t) {
|
|
1049
|
-
t.set(
|
|
869
|
+
t.set(w.CONTEXT_KEY, this);
|
|
1050
870
|
}
|
|
1051
871
|
/**
|
|
1052
872
|
* Resizes the canvas to the given region and device pixel ratio. Ensuring
|
|
1053
873
|
* that all drawing operations and viewports are scaled correctly.
|
|
1054
874
|
*/
|
|
1055
875
|
resize(t, e) {
|
|
1056
|
-
|
|
876
|
+
n.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, n.width(t) * e, n.height(t) * e));
|
|
1057
877
|
}
|
|
1058
878
|
resizeCanvas(t) {
|
|
1059
|
-
t.width =
|
|
879
|
+
t.width = n.width(this.region) * this.dpr, t.height = n.height(this.region) * this.dpr;
|
|
1060
880
|
}
|
|
1061
881
|
/** @returns the aspect ratio of the canvas. */
|
|
1062
882
|
get aspect() {
|
|
1063
|
-
return
|
|
883
|
+
return n.aspect(this.region);
|
|
1064
884
|
}
|
|
1065
885
|
/**
|
|
1066
886
|
* Takes the given box in PIXEL space and produces a transform
|
|
@@ -1068,48 +888,48 @@ const q = (h) => (h.textRendering = "optimizeSpeed", h.imageSmoothingEnabled = !
|
|
|
1068
888
|
* in the canvas.
|
|
1069
889
|
*/
|
|
1070
890
|
scaleRegion(t) {
|
|
1071
|
-
return new
|
|
891
|
+
return new C.XY(
|
|
1072
892
|
// Accept a value in decimal.
|
|
1073
|
-
|
|
893
|
+
C.Scale.scale(0, 1).scale(n.width(t)).translate(n.left(t)).reBound(n.width(this.region)).scale(-1, 1),
|
|
1074
894
|
// Accept a value in decimal.
|
|
1075
|
-
|
|
895
|
+
C.Scale.scale(0, 1).scale(n.height(t)).invert().translate(n.top(t)).reBound(n.height(this.region)).scale(-1, 1).invert()
|
|
1076
896
|
);
|
|
1077
897
|
}
|
|
1078
|
-
scissor(t, e =
|
|
898
|
+
scissor(t, e = u.ZERO, s) {
|
|
1079
899
|
const i = [];
|
|
1080
900
|
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
901
|
}
|
|
1082
|
-
scissorGL(t, e =
|
|
1083
|
-
return this.gl.enable(this.gl.SCISSOR_TEST), t =
|
|
1084
|
-
|
|
1085
|
-
(
|
|
1086
|
-
|
|
1087
|
-
|
|
902
|
+
scissorGL(t, e = u.ZERO) {
|
|
903
|
+
return this.gl.enable(this.gl.SCISSOR_TEST), t = T(t, e), this.gl.scissor(
|
|
904
|
+
n.left(t) * this.dpr,
|
|
905
|
+
(n.height(this.region) - n.bottom(t)) * this.dpr,
|
|
906
|
+
n.width(t) * this.dpr,
|
|
907
|
+
n.height(t) * this.dpr
|
|
1088
908
|
), () => this.gl.disable(this.gl.SCISSOR_TEST);
|
|
1089
909
|
}
|
|
1090
|
-
erase(t, e =
|
|
1091
|
-
e =
|
|
910
|
+
erase(t, e = u.ZERO, ...s) {
|
|
911
|
+
e = u.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
912
|
}
|
|
1093
|
-
eraseGL(t, e =
|
|
913
|
+
eraseGL(t, e = u.ZERO) {
|
|
1094
914
|
var r;
|
|
1095
|
-
const { gl: s } = this, i = this.scissorGL(
|
|
915
|
+
const { gl: s } = this, i = this.scissorGL(T(t, e));
|
|
1096
916
|
s.clearColor(...y.rgba1(y.ZERO)), s.clear(s.COLOR_BUFFER_BIT), this.os === "Windows" && ((r = this.clearProgram) == null || r.exec()), i();
|
|
1097
917
|
}
|
|
1098
|
-
eraseCanvas(t, e, s =
|
|
1099
|
-
const i =
|
|
1100
|
-
t.clearRect(...
|
|
918
|
+
eraseCanvas(t, e, s = u.ZERO) {
|
|
919
|
+
const i = T(e, s);
|
|
920
|
+
t.clearRect(...u.couple(n.topLeft(i)), ...M.couple(n.dims(i)));
|
|
1101
921
|
}
|
|
1102
922
|
};
|
|
1103
|
-
|
|
1104
|
-
let D =
|
|
1105
|
-
const
|
|
1106
|
-
region:
|
|
1107
|
-
enabled:
|
|
1108
|
-
}),
|
|
1109
|
-
class P extends
|
|
923
|
+
a(w, "CONTEXT_KEY", Z.B("render-context"));
|
|
924
|
+
let D = w;
|
|
925
|
+
const gt = N({
|
|
926
|
+
region: n.box,
|
|
927
|
+
enabled: st().optional().default(!1)
|
|
928
|
+
}), Y = ["gl", "lower2d", "upper2d"];
|
|
929
|
+
class P extends tt {
|
|
1110
930
|
constructor() {
|
|
1111
931
|
super(...arguments);
|
|
1112
|
-
|
|
932
|
+
a(this, "schema", gt);
|
|
1113
933
|
}
|
|
1114
934
|
afterUpdate(e) {
|
|
1115
935
|
this.deleted || (this.internal.renderCtx = D.use(e), this.renderOnLifecycleChange());
|
|
@@ -1122,27 +942,26 @@ class P extends Q {
|
|
|
1122
942
|
key: `${this.type}-${this.key}`,
|
|
1123
943
|
render: this.render.bind(this),
|
|
1124
944
|
priority: "high",
|
|
1125
|
-
canvases:
|
|
945
|
+
canvases: Y
|
|
1126
946
|
});
|
|
1127
947
|
}
|
|
1128
948
|
render() {
|
|
1129
|
-
this.deleted || !this.state.enabled || this.internal.renderCtx.erase(this.state.region,
|
|
949
|
+
this.deleted || !this.state.enabled || this.internal.renderCtx.erase(this.state.region, u.construct(0), ...Y);
|
|
1130
950
|
}
|
|
1131
951
|
}
|
|
1132
|
-
|
|
1133
|
-
const
|
|
952
|
+
a(P, "TYPE", "eraser");
|
|
953
|
+
const St = {
|
|
1134
954
|
[P.TYPE]: P
|
|
1135
955
|
};
|
|
1136
956
|
export {
|
|
1137
957
|
D as C,
|
|
1138
958
|
P as E,
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
tt as u
|
|
959
|
+
ot as G,
|
|
960
|
+
dt as L,
|
|
961
|
+
O as P,
|
|
962
|
+
St as R,
|
|
963
|
+
Ct as a,
|
|
964
|
+
gt as e,
|
|
965
|
+
it as p,
|
|
966
|
+
rt as u
|
|
1148
967
|
};
|