@synnaxlabs/pluto 0.13.0 → 0.14.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-8mBjm1cO.js +126 -0
- package/dist/{Center-gEKkAkdh.js.map → Center-8mBjm1cO.js.map} +1 -1
- package/dist/Center-ER_owvfX.cjs +2 -0
- package/dist/{Center-ZAcURh-3.cjs.map → Center-ER_owvfX.cjs.map} +1 -1
- package/dist/Header-9CR1VnwV.js +34 -0
- package/dist/{Header-7x6367IV.js.map → Header-9CR1VnwV.js.map} +1 -1
- package/dist/Header-PpcdP7hn.cjs +2 -0
- package/dist/{Header-5YX6FUn6.cjs.map → Header-PpcdP7hn.cjs.map} +1 -1
- package/dist/Item--h4UWJZo.js +80 -0
- package/dist/{Item-owLU4Xop.js.map → Item--h4UWJZo.js.map} +1 -1
- package/dist/Item-EBiM5yGJ.cjs +2 -0
- package/dist/{Item-HWzX7RK2.cjs.map → Item-EBiM5yGJ.cjs.map} +1 -1
- package/dist/Item-_og4CdwZ.cjs +2 -0
- package/dist/{Item-rkSKzZoh.cjs.map → Item-_og4CdwZ.cjs.map} +1 -1
- package/dist/Item-kbCoFEj2.js +137 -0
- package/dist/{Item-EDdYN2NK.js.map → Item-kbCoFEj2.js.map} +1 -1
- package/dist/Keyboard-IWRXgioJ.js +14 -0
- package/dist/{Keyboard-mE03PKwA.js.map → Keyboard-IWRXgioJ.js.map} +1 -1
- package/dist/Keyboard-bXNOi0bP.cjs +2 -0
- package/dist/{Keyboard-w372197S.cjs.map → Keyboard-bXNOi0bP.cjs.map} +1 -1
- package/dist/Link-16dbGK7G.cjs +2 -0
- package/dist/{Link-xlTZan29.cjs.map → Link-16dbGK7G.cjs.map} +1 -1
- package/dist/Link-fRQvqiYx.js +11 -0
- package/dist/{Link-laNlv47N.js.map → Link-fRQvqiYx.js.map} +1 -1
- package/dist/SelectLevel-DrdlLBOs.cjs +2 -0
- package/dist/{SelectLevel-bGb0dRXh.cjs.map → SelectLevel-DrdlLBOs.cjs.map} +1 -1
- package/dist/SelectLevel-Uod3Ez6y.js +121 -0
- package/dist/{SelectLevel-cewIWtOv.js.map → SelectLevel-Uod3Ez6y.js.map} +1 -1
- package/dist/Selector-8rTHUToj.cjs +2 -0
- package/dist/{Selector-hQLSIYum.cjs.map → Selector-8rTHUToj.cjs.map} +1 -1
- package/dist/Selector-R4SumEUV.js +233 -0
- package/dist/{Selector-R3lL41_i.js.map → Selector-R4SumEUV.js.map} +1 -1
- package/dist/Swatch--Prmb5q_.cjs +2 -0
- package/dist/Swatch--Prmb5q_.cjs.map +1 -0
- package/dist/Swatch-IH4OmVdd.js +82 -0
- package/dist/Swatch-IH4OmVdd.js.map +1 -0
- package/dist/TimeRangeChip-jI9Nn9z8.js +7384 -0
- package/dist/TimeRangeChip-jI9Nn9z8.js.map +1 -0
- package/dist/TimeRangeChip-jQH9NacG.cjs +50 -0
- package/dist/TimeRangeChip-jQH9NacG.cjs.map +1 -0
- package/dist/Toggle-HVxv8bv2.js +10648 -0
- package/dist/Toggle-HVxv8bv2.js.map +1 -0
- package/dist/Toggle-QnKinMl4.cjs +73 -0
- package/dist/Toggle-QnKinMl4.cjs.map +1 -0
- package/dist/Video-iiPAk_ej.cjs +2 -0
- package/dist/{Video-a7BUKvzF.cjs.map → Video-iiPAk_ej.cjs.map} +1 -1
- package/dist/Video-vyIORMaH.js +11 -0
- package/dist/{Video-Vpwp5ao1.js.map → Video-vyIORMaH.js.map} +1 -1
- package/dist/aether.cjs +1 -89
- package/dist/aether.cjs.map +1 -1
- package/dist/aether.js +76 -80
- package/dist/aether.js.map +1 -1
- package/dist/align.cjs +1 -9
- package/dist/align.cjs.map +1 -1
- package/dist/align.js +5 -5
- package/dist/button.cjs +1 -14
- package/dist/button.cjs.map +1 -1
- package/dist/button.js +9 -8
- package/dist/button.js.map +1 -1
- package/dist/color-9QRifwqk.js +9 -0
- package/dist/color-9QRifwqk.js.map +1 -0
- package/dist/color-gJTR__ef.cjs +2 -0
- package/dist/color-gJTR__ef.cjs.map +1 -0
- package/dist/color.cjs +2 -0
- package/dist/color.cjs.map +1 -0
- package/dist/color.js +16 -0
- package/dist/color.js.map +1 -0
- package/dist/component-LA8IXGSG.js +17961 -0
- package/dist/component-LA8IXGSG.js.map +1 -0
- package/dist/component-dgLAEMbt.cjs +23 -0
- package/dist/component-dgLAEMbt.cjs.map +1 -0
- package/dist/css-5RvvUhjr.js +6414 -0
- package/dist/{css-NTD4Xm8x.js.map → css-5RvvUhjr.js.map} +1 -1
- package/dist/css-s9KpanYu.cjs +8 -0
- package/dist/{css-V3VUT_Js.cjs.map → css-s9KpanYu.cjs.map} +1 -1
- package/dist/css.cjs +2 -0
- package/dist/css.cjs.map +1 -0
- package/dist/css.js +10 -0
- package/dist/css.js.map +1 -0
- package/dist/dimensions--C45ahLe.js +20 -0
- package/dist/{dimensions-guJ5PHmb.js.map → dimensions--C45ahLe.js.map} +1 -1
- package/dist/dimensions-HfZjDJQz.cjs +2 -0
- package/dist/{dimensions-Sej0Zly9.cjs.map → dimensions-HfZjDJQz.cjs.map} +1 -1
- package/dist/dropdown.cjs +1 -12
- package/dist/dropdown.cjs.map +1 -1
- package/dist/dropdown.js +7 -6
- package/dist/dropdown.js.map +1 -1
- package/dist/external--jsfNkbo.cjs +2 -0
- package/dist/external--jsfNkbo.cjs.map +1 -0
- package/dist/external-1DGLK9F2.js +17 -0
- package/dist/external-1DGLK9F2.js.map +1 -0
- package/dist/external-4h9H4Y_N.js +21 -0
- package/dist/external-4h9H4Y_N.js.map +1 -0
- package/dist/external-4uqucf0m.js +67 -0
- package/dist/{external-QuVTCnGl.js.map → external-4uqucf0m.js.map} +1 -1
- package/dist/external-A_eQgT5T.cjs +2 -0
- package/dist/external-A_eQgT5T.cjs.map +1 -0
- package/dist/external-FCO_hdNr.js +24 -0
- package/dist/external-FCO_hdNr.js.map +1 -0
- package/dist/external-HZ6f2KvU.cjs +2 -0
- package/dist/external-HZ6f2KvU.cjs.map +1 -0
- package/dist/external-LPdjowBG.cjs +2 -0
- package/dist/external-LPdjowBG.cjs.map +1 -0
- package/dist/external-O1b3FJKI.cjs +2 -0
- package/dist/external-O1b3FJKI.cjs.map +1 -0
- package/dist/external-RGdrJX7y.cjs +2 -0
- package/dist/{external-9Ncn2J9B.cjs.map → external-RGdrJX7y.cjs.map} +1 -1
- package/dist/external-WiHGqQPA.js +30 -0
- package/dist/external-WiHGqQPA.js.map +1 -0
- package/dist/external-eWu6hCLU.cjs +2 -0
- package/dist/external-eWu6hCLU.cjs.map +1 -0
- package/dist/external-kvAz85mu.js +18 -0
- package/dist/external-kvAz85mu.js.map +1 -0
- package/dist/external-mpVdVPF1.js +88 -0
- package/dist/external-mpVdVPF1.js.map +1 -0
- package/dist/external-nTDD8IMd.cjs +2 -0
- package/dist/external-nTDD8IMd.cjs.map +1 -0
- package/dist/external-phknItOL.js +15 -0
- package/dist/external-phknItOL.js.map +1 -0
- package/dist/external-rGcWjp84.cjs +2 -0
- package/dist/{external-zBiIxeDG.cjs.map → external-rGcWjp84.cjs.map} +1 -1
- package/dist/external-r_2-tYfC.js +88 -0
- package/dist/{external-up1sE3F6.js.map → external-r_2-tYfC.js.map} +1 -1
- package/dist/external-sHbzLUrP.js +17 -0
- package/dist/external-sHbzLUrP.js.map +1 -0
- package/dist/external-tZiYBM94.cjs +2 -0
- package/dist/external-tZiYBM94.cjs.map +1 -0
- package/dist/external-tnCo64yx.cjs +2 -0
- package/dist/external-tnCo64yx.cjs.map +1 -0
- package/dist/external-uR-7_68y.js +16 -0
- package/dist/external-uR-7_68y.js.map +1 -0
- package/dist/external-uSIsCKNG.js +15 -0
- package/dist/external-uSIsCKNG.js.map +1 -0
- package/dist/external-z6BLlxur.cjs +2 -0
- package/dist/external-z6BLlxur.cjs.map +1 -0
- package/dist/font-HpLrwPSD.js +16 -0
- package/dist/{font-t7KoGNFX.js.map → font-HpLrwPSD.js.map} +1 -1
- package/dist/font-yosRgv9n.cjs +2 -0
- package/dist/{font-wlgaMRYN.cjs.map → font-yosRgv9n.cjs.map} +1 -1
- package/dist/fontString-_dtZSiPk.cjs +2 -0
- package/dist/{fontString-i24UxKCQ.cjs.map → fontString-_dtZSiPk.cjs.map} +1 -1
- package/dist/fontString-lodjYTYz.js +12 -0
- package/dist/{fontString-RKvYIr5H.js.map → fontString-lodjYTYz.js.map} +1 -1
- package/dist/header.cjs +1 -14
- package/dist/header.cjs.map +1 -1
- package/dist/header.js +9 -8
- package/dist/header.js.map +1 -1
- package/dist/index.cjs +1 -1174
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +737 -930
- package/dist/index.js.map +1 -1
- package/dist/input/Input.stories.d.ts +1 -0
- package/dist/input/TextArea.d.ts +20 -0
- package/dist/input/external.d.ts +1 -0
- package/dist/input/types.d.ts +4 -2
- package/dist/input.cjs +1 -14
- package/dist/input.cjs.map +1 -1
- package/dist/input.js +9 -8
- package/dist/input.js.map +1 -1
- package/dist/jsx-runtime-NmMXPjeo.js +632 -0
- package/dist/{jsx-runtime-rX5tAIG2.js.map → jsx-runtime-NmMXPjeo.js.map} +1 -1
- package/dist/jsx-runtime-evvPGacs.cjs +28 -0
- package/dist/{jsx-runtime-N1ikfypN.cjs.map → jsx-runtime-evvPGacs.cjs.map} +1 -1
- package/dist/list.cjs +1 -26
- package/dist/list.cjs.map +1 -1
- package/dist/list.js +21 -19
- package/dist/list.js.map +1 -1
- package/dist/menu.cjs +1 -15
- package/dist/menu.cjs.map +1 -1
- package/dist/menu.js +10 -9
- package/dist/menu.js.map +1 -1
- package/dist/style.css +1 -3119
- package/dist/table-MJysJcCC.js +10312 -0
- package/dist/table-MJysJcCC.js.map +1 -0
- package/dist/table-NIrLpFOm.cjs +69 -0
- package/dist/table-NIrLpFOm.cjs.map +1 -0
- package/dist/tabs.cjs +1 -14
- package/dist/tabs.cjs.map +1 -1
- package/dist/tabs.js +9 -8
- package/dist/tabs.js.map +1 -1
- package/dist/text.cjs +1 -16
- package/dist/text.cjs.map +1 -1
- package/dist/text.js +11 -10
- package/dist/text.js.map +1 -1
- package/dist/theming.cjs +1 -15
- package/dist/theming.cjs.map +1 -1
- package/dist/theming.js +10 -9
- package/dist/theming.js.map +1 -1
- package/dist/tree.cjs +1 -25
- package/dist/tree.cjs.map +1 -1
- package/dist/tree.js +20 -18
- package/dist/tree.js.map +1 -1
- package/dist/triggers.cjs +1 -15
- package/dist/triggers.cjs.map +1 -1
- package/dist/triggers.js +10 -9
- package/dist/triggers.js.map +1 -1
- package/dist/useDrag-4o21IpGy.js +36 -0
- package/dist/{useDrag-rQt5hv4R.js.map → useDrag-4o21IpGy.js.map} +1 -1
- package/dist/useDrag-l_moa7e3.cjs +2 -0
- package/dist/{useDrag-KRQ7DTg1.cjs.map → useDrag-l_moa7e3.cjs.map} +1 -1
- package/dist/video.cjs +1 -9
- package/dist/video.cjs.map +1 -1
- package/dist/video.js +3 -3
- package/package.json +15 -5
- package/dist/Center-ZAcURh-3.cjs +0 -148
- package/dist/Center-gEKkAkdh.js +0 -149
- package/dist/Header-5YX6FUn6.cjs +0 -35
- package/dist/Header-7x6367IV.js +0 -36
- package/dist/Item-EDdYN2NK.js +0 -171
- package/dist/Item-HWzX7RK2.cjs +0 -170
- package/dist/Item-owLU4Xop.js +0 -97
- package/dist/Item-rkSKzZoh.cjs +0 -96
- package/dist/Keyboard-mE03PKwA.js +0 -14
- package/dist/Keyboard-w372197S.cjs +0 -13
- package/dist/Link-laNlv47N.js +0 -13
- package/dist/Link-xlTZan29.cjs +0 -12
- package/dist/SelectLevel-bGb0dRXh.cjs +0 -152
- package/dist/SelectLevel-cewIWtOv.js +0 -153
- package/dist/Selector-R3lL41_i.js +0 -267
- package/dist/Selector-hQLSIYum.cjs +0 -266
- package/dist/TimeRangeChip-XXXLMCrf.cjs +0 -9316
- package/dist/TimeRangeChip-XXXLMCrf.cjs.map +0 -1
- package/dist/TimeRangeChip-eDCX5pUC.js +0 -9301
- package/dist/TimeRangeChip-eDCX5pUC.js.map +0 -1
- package/dist/Toggle-eOKYw1OT.cjs +0 -13664
- package/dist/Toggle-eOKYw1OT.cjs.map +0 -1
- package/dist/Toggle-kLunfJtR.js +0 -13665
- package/dist/Toggle-kLunfJtR.js.map +0 -1
- package/dist/Video-Vpwp5ao1.js +0 -12
- package/dist/Video-a7BUKvzF.cjs +0 -11
- package/dist/component-joFaJiQW.cjs +0 -24719
- package/dist/component-joFaJiQW.cjs.map +0 -1
- package/dist/component-k78Jq9I7.js +0 -24720
- package/dist/component-k78Jq9I7.js.map +0 -1
- package/dist/css-NTD4Xm8x.js +0 -9206
- package/dist/css-V3VUT_Js.cjs +0 -9204
- package/dist/dimensions-Sej0Zly9.cjs +0 -26
- package/dist/dimensions-guJ5PHmb.js +0 -27
- package/dist/external-2Aicsb3l.js +0 -88
- package/dist/external-2Aicsb3l.js.map +0 -1
- package/dist/external-9Ncn2J9B.cjs +0 -93
- package/dist/external-9RCzxzgZ.js +0 -30
- package/dist/external-9RCzxzgZ.js.map +0 -1
- package/dist/external-9pS8-DvV.js +0 -15
- package/dist/external-9pS8-DvV.js.map +0 -1
- package/dist/external-KxlyA74C.js +0 -20
- package/dist/external-KxlyA74C.js.map +0 -1
- package/dist/external-OSLzuRs1.cjs +0 -14
- package/dist/external-OSLzuRs1.cjs.map +0 -1
- package/dist/external-PS3nzqUn.cjs +0 -23
- package/dist/external-PS3nzqUn.cjs.map +0 -1
- package/dist/external-QRmqSjV0.js +0 -18
- package/dist/external-QRmqSjV0.js.map +0 -1
- package/dist/external-QuVTCnGl.js +0 -71
- package/dist/external-U5HRPaDI.cjs +0 -17
- package/dist/external-U5HRPaDI.cjs.map +0 -1
- package/dist/external-_CtRDtih.js +0 -17
- package/dist/external-_CtRDtih.js.map +0 -1
- package/dist/external-eQU48hM4.cjs +0 -87
- package/dist/external-eQU48hM4.cjs.map +0 -1
- package/dist/external-kbDFnfuk.js +0 -24
- package/dist/external-kbDFnfuk.js.map +0 -1
- package/dist/external-oX1JmOFf.js +0 -17
- package/dist/external-oX1JmOFf.js.map +0 -1
- package/dist/external-oZe6tF4A.cjs +0 -14
- package/dist/external-oZe6tF4A.cjs.map +0 -1
- package/dist/external-tVcmKSsT.cjs +0 -19
- package/dist/external-tVcmKSsT.cjs.map +0 -1
- package/dist/external-up1sE3F6.js +0 -94
- package/dist/external-uvx0b-Jw.cjs +0 -16
- package/dist/external-uvx0b-Jw.cjs.map +0 -1
- package/dist/external-vXBQOmKv.js +0 -15
- package/dist/external-vXBQOmKv.js.map +0 -1
- package/dist/external-yiqRIIvW.cjs +0 -16
- package/dist/external-yiqRIIvW.cjs.map +0 -1
- package/dist/external-zBiIxeDG.cjs +0 -70
- package/dist/external-zw9fckWT.cjs +0 -29
- package/dist/external-zw9fckWT.cjs.map +0 -1
- package/dist/font-t7KoGNFX.js +0 -17
- package/dist/font-wlgaMRYN.cjs +0 -16
- package/dist/fontString-RKvYIr5H.js +0 -13
- package/dist/fontString-i24UxKCQ.cjs +0 -12
- package/dist/jsx-runtime-N1ikfypN.cjs +0 -931
- package/dist/jsx-runtime-rX5tAIG2.js +0 -932
- package/dist/table-8MFXzE4C.js +0 -13664
- package/dist/table-8MFXzE4C.js.map +0 -1
- package/dist/table-VNkSG_Cj.cjs +0 -13661
- package/dist/table-VNkSG_Cj.cjs.map +0 -1
- package/dist/useDrag-KRQ7DTg1.cjs +0 -48
- package/dist/useDrag-rQt5hv4R.js +0 -49
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../src/status/Circle.tsx","../src/accordion/Accordion.tsx","../src/vis/lineplot/Legend.tsx","../src/vis/lineplot/Title.tsx","../src/select/Direction.tsx","../src/viewport/SelectMode.tsx","../src/channel/LinePlot.tsx","../src/mosaic/tree.ts","../src/mosaic/use.tsx","../src/os/Controls/Mac.tsx","../src/os/Controls/Windows.tsx","../src/os/use.ts","../src/os/Controls/Controls.tsx","../src/vis/diagram/align.ts","../src/vis/table/use.tsx","../src/pluto/defaultWorker.ts?url","../src/pluto/Pluto.tsx","../src/ranger/TimeRangeChip.tsx","../src/ranger/SelectLabel.tsx"],"sourcesContent":["// Copyright 2023 Synnax Labs, Inc.\n//\n// Use of this software is governed by the Business Source License included in the file\n// licenses/BSL.txt.\n//\n// As of the Change Date specified in that file, in accordance with the Business Source\n// License, use of this software will be governed by the Apache License, Version 2.0,\n// included in the file licenses/APL.txt.\n\nimport { type ReactElement } from \"react\";\n\nimport { Icon } from \"@synnaxlabs/media\";\n\nimport { type status } from \"@/status/aether\";\nimport { variantColors } from \"@/status/colors\";\n\nexport interface CircleProps {\n variant: status.Variant;\n}\n\nexport const Circle = ({ variant }: CircleProps): ReactElement => {\n return <Icon.Circle color={variantColors[variant]} />;\n};\n","// Copyright 2023 Synnax Labs, Inc.\n//\n// Use of this software is governed by the Business Source License included in the file\n// licenses/BSL.txt.\n//\n// As of the Change Date specified in that file, in accordance with the Business Source\n// License, use of this software will be governed by the Apache License, Version 2.0,\n// included in the file licenses/APL.txt.\n\nimport { type ReactElement, type RefObject } from \"react\";\n\nimport { Icon } from \"@synnaxlabs/media\";\nimport { box, type direction } from \"@synnaxlabs/x\";\n\nimport { type Button } from \"@/button\";\nimport { CSS } from \"@/css\";\nimport { Header } from \"@/header\";\nimport { Resize } from \"@/resize\";\n\nimport \"@/accordion/Accordion.css\";\n\n/** The props for a single entry in the {@link Accordion} component. */\nexport interface Entry {\n /** A unique key for the entry. */\n key: string;\n /** The name for the entries header. */\n name: string;\n /** The content for the entry. */\n content: ReactElement;\n /**\n * The initial size for the entry. It's recommended to set this to a decimal value\n * representing the percentage of the overall parent size.\n */\n initialSize?: number;\n /**\n * A list of actions to display in the entry's header. See the {@link Header.Actions}\n * component for more details.\n */\n actions?: Array<Button.IconProps | ReactElement>;\n}\n\n/** The props for the {@link Accordion} component. */\nexport interface AccordionProps\n extends Omit<\n Resize.MultipleProps,\n \"sizeDistribution\" | \"parentSize\" | \"onDragHandle\" | \"direction\"\n > {\n data: Entry[];\n}\n\nconst DIRECTION: direction.Direction = \"y\";\nconst MIN_SIZE = 28;\nconst COLLAPSED_THRESHOLD = 32;\nconst EXPAND_THRESHOLD = 40;\nconst DEFAULT_EXPAND_SIZE = 0.5;\n\n/**\n * A resizable accordion component, whose entries can be expanded and collapsed. This\n * component is intentionally opinionated in its interface in order to provide stylistic\n * consistency and simplicity. If you need more control, look at building a custom\n * accordion component using {@link Resize.Multiple}.\n *\n * @param props - All unused props are passed to the underyling {@link Resize.Multiple}\n * component.\n * @param props.entries - The entries to display in the accordion. See the\n * {@link Entry} interface for more details.\n */\nexport const Accordion = ({ data, ...props }: AccordionProps): ReactElement => {\n const {\n setSize,\n props: { sizeDistribution: sizes, ref, ...resizeProps },\n } = Resize.useMultiple({\n direction: DIRECTION,\n count: data.length,\n minSize: MIN_SIZE,\n });\n\n const onExpand = (index: number): void => {\n if (ref.current == null) return;\n const parentSize = box.dim(box.construct(ref.current), DIRECTION);\n if (sizes[index] < EXPAND_THRESHOLD / parentSize)\n setSize(index, data[index].initialSize ?? DEFAULT_EXPAND_SIZE);\n else setSize(index, MIN_SIZE + 1);\n };\n\n return (\n <Resize.Multiple\n empty\n className={CSS.B(\"accordion\")}\n sizeDistribution={sizes}\n ref={ref}\n {...props}\n {...resizeProps}\n >\n {data.map((entry, i) => (\n <EntryC\n {...entry}\n key={entry.key}\n index={i}\n direction={DIRECTION}\n onExpand={onExpand}\n parent={ref}\n size={sizes[i]}\n />\n ))}\n </Resize.Multiple>\n );\n};\n\ninterface EntryCProps extends Omit<Entry, \"key\"> {\n index: number;\n size: number;\n parent: RefObject<HTMLDivElement>;\n onExpand: (i: number) => void;\n direction: direction.Direction;\n}\n\nconst expandedIcon = <Icon.Caret.Down aria-label=\"contract\" />;\nconst collapsedIcon = <Icon.Caret.Right aria-label=\"expand\" />;\n\nconst EntryC = ({\n index,\n name,\n content,\n actions,\n size,\n parent,\n onExpand,\n}: EntryCProps): ReactElement => {\n let expanded = true;\n if (parent.current != null) {\n const parentSize = box.dim(box.construct(parent.current), DIRECTION);\n expanded = size * parentSize > COLLAPSED_THRESHOLD;\n }\n const icon = expanded ? expandedIcon : collapsedIcon;\n return (\n <>\n <Header.Header level=\"p\" className={CSS.expanded(expanded)} empty>\n <Header.ButtonTitle startIcon={icon} onClick={() => onExpand(index)}>\n {name}\n </Header.ButtonTitle>\n {actions != null && <Header.Actions>{actions}</Header.Actions>}\n </Header.Header>\n {content}\n </>\n );\n};\n","// Copyright 2023 Synnax Labs, Inc.\n//\n// Use of this software is governed by the Business Source License included in the file\n// licenses/BSL.txt.\n//\n// As of the Change Date specified in that file, in accordance with the Business Source\n// License, use of this software will be governed by the Apache License, Version 2.0,\n// included in the file licenses/APL.txt.\n\nimport { type ReactElement, memo } from \"react\";\n\nimport { Legend as Core } from \"@/vis/legend\";\nimport { type LineSpec, useContext } from \"@/vis/lineplot/LinePlot\";\n\nimport \"@/vis/legend/Container.css\";\n\nexport interface LegendProps extends Omit<Core.SimpleProps, \"data\" | \"onEntryChange\"> {\n onLineChange?: (line: LineSpec) => void;\n}\n\nexport const Legend = ({\n className,\n style,\n onLineChange,\n ...props\n}: LegendProps): ReactElement | null => {\n const { lines } = useContext(\"Legend\");\n useContext(\"Legend\");\n return <Core.Simple data={lines} onEntryChange={onLineChange} {...props} />;\n};\n","// Copyright 2023 Synnax Labs, Inc.\n//\n// Use of this software is governed by the Business Source License included in the file\n// licenses/BSL.txt.\n//\n// As of the Change Date specified in that file, in accordance with the Business Source\n// License, use of this software will be governed by the Apache License, Version 2.0,\n// included in the file licenses/APL.txt.\n\nimport { type ReactElement } from \"react\";\n\nimport { Align } from \"@/align\";\nimport { useUniqueKey } from \"@/hooks/useUniqueKey\";\nimport { Text } from \"@/text\";\nimport { Theming } from \"@/theming\";\nimport { useGridPosition } from \"@/vis/lineplot/LinePlot\";\n\nexport type TitleProps<L extends Text.Level = \"h2\"> = Text.MaybeEditableProps<L>;\n\nexport const Title = <L extends Text.Level = \"h2\">({\n level = \"h2\" as TitleProps<L>[\"level\"],\n ...props\n}: TitleProps<L>): ReactElement => {\n const key = useUniqueKey();\n const font = Theming.useTypography(level);\n const gridStyle = useGridPosition(\n {\n key,\n size: (font.lineHeight + 2) * font.baseSize,\n loc: \"top\",\n order: \"first\",\n },\n \"Title\",\n );\n return (\n <Align.Space justify=\"center\" align=\"center\" style={gridStyle}>\n {/* @ts-expect-error */}\n <Text.MaybeEditable<L> {...props} level={level} />\n </Align.Space>\n );\n};\n","// Copyright 2023 Synnax Labs, Inc.\n//\n// Use of this software is governed by the Business Source License included in the file\n// licenses/BSL.txt.\n//\n// As of the Change Date specified in that file, in accordance with the Business Source\n// License, use of this software will be governed by the Apache License, Version 2.0,\n// included in the file licenses/APL.txt.\n\nimport { type ReactElement } from \"react\";\n\nimport { Icon } from \"@synnaxlabs/media\";\nimport { type direction } from \"@synnaxlabs/x\";\n\nimport { Button as CoreButton } from \"@/button\";\nimport { Button, type ButtonOptionProps, type ButtonProps } from \"@/select/Button\";\n\ninterface Entry {\n key: direction.Direction;\n icon: ReactElement;\n}\n\nexport interface DirectionProps\n extends Omit<ButtonProps<direction.Direction, Entry>, \"data\" | \"entryRenderKey\"> {}\n\nconst DATA: Entry[] = [\n {\n key: \"x\",\n icon: <Icon.Arrow.Right />,\n },\n {\n key: \"y\",\n icon: <Icon.Arrow.Down />,\n },\n];\n\nconst defaultSelectDirectionButton = ({\n key,\n entry,\n onClick,\n selected,\n}: ButtonOptionProps<direction.Crude, Entry>): ReactElement => {\n return (\n <CoreButton.Icon\n key={key}\n variant={selected ? \"filled\" : \"outlined\"}\n onClick={onClick}\n >\n {entry.icon}\n </CoreButton.Icon>\n );\n};\n\nexport const Direction = ({\n children = defaultSelectDirectionButton,\n ...props\n}: DirectionProps): ReactElement => {\n return (\n <Button {...props} data={DATA}>\n {children}\n </Button>\n );\n};\n","// Copyright 2023 Synnax Labs, Inc.\n//\n// Use of this software is governed by the Business Source License included in the file\n// licenses/BSL.txt.\n//\n// As of the Change Date specified in that file, in accordance with the Business Source\n// License, use of this software will be governed by the Apache License, Version 2.0,\n// included in the file licenses/APL.txt.\n\nimport { type ReactElement, type ReactNode } from \"react\";\n\nimport { Icon } from \"@synnaxlabs/media\";\nimport { Case } from \"@synnaxlabs/x\";\n\nimport { Align } from \"@/align\";\nimport { Button } from \"@/button\";\nimport { Select } from \"@/select\";\nimport { Text } from \"@/text\";\nimport { Triggers } from \"@/triggers\";\nimport { type Trigger } from \"@/triggers/triggers\";\nimport { MODES, type Mode, type UseTriggers } from \"@/viewport/use\";\n\ninterface Entry {\n key: Mode;\n icon: ReactElement;\n tooltip: ReactNode;\n}\n\ninterface TooltipProps {\n mode: Mode;\n triggers: Trigger[];\n}\n\nconst Tooltip = ({ mode, triggers }: TooltipProps): ReactElement => (\n <Align.Space direction=\"x\" align=\"center\">\n <Text.Text level=\"small\">{Case.capitalize(mode)}</Text.Text>\n <Triggers.Text trigger={triggers[0]} level=\"small\" />\n </Align.Space>\n);\n\nconst MODE_ICONS: Record<Mode, ReactElement> = {\n zoom: <Icon.Zoom />,\n pan: <Icon.Pan />,\n select: <Icon.Selection />,\n zoomReset: <Icon.Expand />,\n click: <Icon.Bolt />,\n};\n\nexport interface SelectModeProps extends Omit<Select.ButtonProps<Mode>, \"data\"> {\n triggers: UseTriggers;\n disable?: Mode[];\n}\n\nexport const SelectMode = ({\n triggers,\n disable = [\"zoomReset\", \"click\"],\n ...props\n}: SelectModeProps): ReactElement => {\n const data = Object.entries(triggers)\n .filter(([key]) => !disable.includes(key as Mode) && MODES.includes(key as Mode))\n .map(([key, value]) => ({\n key: key as Mode,\n icon: MODE_ICONS[key as Mode],\n tooltip: <Tooltip mode={key as Mode} triggers={value as Trigger[]} />,\n }))\n .sort((a, b) => MODES.indexOf(a.key) - MODES.indexOf(b.key));\n\n return (\n <Select.Button<Mode, Entry> {...props} data={data} entryRenderKey=\"icon\">\n {({ title: _, entry, ...props }) => (\n <Button.Icon\n {...props}\n key={entry.key}\n variant={props.selected ? \"filled\" : \"text\"}\n size=\"medium\"\n tooltip={entry.tooltip}\n tooltipLocation={{ x: \"right\", y: \"top\" }}\n >\n {entry.icon}\n </Button.Icon>\n )}\n </Select.Button>\n );\n};\n","// Copyright 2023 Synnax Labs, Inc.\n//\n// Use of this software is governed by the Business Source License included in the file\n// licenses/BSL.txt.\n//\n// As of the Change Date specified in that file, in accordance with the Business Source\n// License, use of this software will be governed by the Apache License, Version 2.0,\n// included in the file licenses/APL.txt.\n\nimport { type ReactElement, useCallback } from \"react\";\n\nimport { type channel } from \"@synnaxlabs/client\";\nimport {\n box,\n location as loc,\n type TimeRange,\n type TimeSpan,\n type location,\n} from \"@synnaxlabs/x\";\n\nimport { HAUL_TYPE } from \"@/channel/types\";\nimport { type Color } from \"@/color\";\nimport { CSS } from \"@/css\";\nimport { Haul } from \"@/haul\";\nimport { telem } from \"@/telem/aether\";\nimport { type Text } from \"@/text\";\nimport { type Viewport } from \"@/viewport\";\nimport { LinePlot as Core } from \"@/vis/lineplot\";\nimport { Tooltip } from \"@/vis/lineplot/tooltip\";\nimport { Measure } from \"@/vis/measure\";\nimport { Rule } from \"@/vis/rule\";\n\nimport \"@/channel/LinePlot.css\";\n\n/** Props for an axis in {@link LinePlot} */\nexport interface AxisProps extends Core.AxisProps {\n /** A unique identifier for the axis */\n key: string;\n}\n\nexport interface BaseLineProps {\n key: string;\n axes: {\n x: string;\n y: string;\n };\n channels: {\n y: number;\n x?: number;\n };\n color: Color.Crude;\n strokeWidth?: number;\n label?: string;\n downsample?: number;\n}\n\nexport interface StaticLineProps extends BaseLineProps {\n variant: \"static\";\n timeRange: TimeRange;\n}\n\nexport interface DynamicLineProps extends BaseLineProps {\n variant: \"dynamic\";\n timeSpan: TimeSpan;\n}\n\nexport type LineProps = StaticLineProps | DynamicLineProps;\n\nexport interface RuleProps {\n key: string;\n position: number;\n color: Color.Crude;\n axis: string;\n label: string;\n lineWidth?: number;\n lineDash?: number;\n units?: string;\n}\n\nexport interface LinePlotProps extends Core.LinePlotProps {\n // Axes\n axes: AxisProps[];\n onAxisChannelDrop?: (axis: string, channels: channel.Key[]) => void;\n onAxisChange?: (axis: Partial<AxisProps> & { key: string }) => void;\n // Lines\n lines: LineProps[];\n onLineChange?: (line: Partial<LineProps> & { key: string }) => void;\n // Rules\n rules?: RuleProps[];\n onRuleChange?: (rule: Partial<RuleProps> & { key: string }) => void;\n // Title\n title?: string;\n showTitle?: boolean;\n onTitleChange?: (value: string) => void;\n titleLevel?: Text.Level;\n // Legend\n showLegend?: boolean;\n enableTooltip?: boolean;\n enableMeasure?: boolean;\n initialViewport?: Viewport.UseProps[\"initial\"];\n onViewportChange?: Viewport.UseProps[\"onChange\"];\n viewportTriggers?: Viewport.UseProps[\"triggers\"];\n}\n\nconst canDrop = Haul.canDropOfType(HAUL_TYPE);\n\nexport const LinePlot = ({\n lines,\n axes,\n showTitle = true,\n title = \"\",\n onTitleChange,\n showLegend = true,\n titleLevel = \"h4\",\n onLineChange,\n onRuleChange,\n onAxisChannelDrop,\n onAxisChange,\n rules,\n enableTooltip = true,\n enableMeasure = false,\n initialViewport = box.DECIMAL,\n onViewportChange,\n viewportTriggers,\n ...restProps\n}: LinePlotProps): ReactElement => {\n const xAxes = axes.filter(({ location: l }) => loc.isY(l));\n return (\n <Core.LinePlot {...restProps}>\n {xAxes.map((a, i) => {\n const axisLines = lines.filter((l) => l.axes.x === a.key);\n const yAxes = axes.filter(({ location: l }) => loc.isX(l));\n const axisRules = rules?.filter((r) =>\n [...yAxes.map(({ key: id }) => id), a.key].includes(r.axis),\n );\n return (\n <XAxis\n key={a.key}\n axis={a}\n index={i}\n lines={axisLines}\n yAxes={yAxes}\n rules={axisRules}\n onAxisChannelDrop={onAxisChannelDrop}\n onAxisChange={onAxisChange}\n />\n );\n })}\n {showLegend && <Core.Legend onLineChange={onLineChange} />}\n {showTitle && (\n <Core.Title value={title} onChange={onTitleChange} level={titleLevel} />\n )}\n <Core.Viewport\n initial={initialViewport}\n onChange={onViewportChange}\n triggers={viewportTriggers}\n >\n {enableTooltip && <Tooltip.Tooltip />}\n {enableMeasure && <Measure.Measure />}\n </Core.Viewport>\n </Core.LinePlot>\n );\n};\n\ninterface XAxisProps\n extends Pick<\n LinePlotProps,\n \"onRuleChange\" | \"lines\" | \"rules\" | \"onAxisChannelDrop\" | \"onAxisChange\"\n > {\n axis: AxisProps;\n yAxes: AxisProps[];\n index: number;\n}\n\nconst XAxis = ({\n yAxes,\n lines,\n index,\n rules,\n onRuleChange,\n onAxisChannelDrop,\n onAxisChange,\n axis: { location, key, showGrid, ...axis },\n}: XAxisProps): ReactElement => {\n const dropProps = Haul.useDrop({\n type: \"Channel.LinePlot.XAxis\",\n canDrop,\n onDrop: useCallback(\n ({ items }) => {\n const dropped = Haul.filterByType(HAUL_TYPE, items);\n onAxisChannelDrop?.(\n key,\n dropped.map(({ key }) => key as channel.Key),\n );\n return dropped;\n },\n [key, onAxisChannelDrop],\n ),\n });\n\n const xRules = rules?.filter((r) => r.axis === key);\n return (\n <Core.XAxis\n {...axis}\n {...dropProps}\n location={location as location.Y}\n showGrid={showGrid ?? index === 0}\n className={CSS(\n CSS.dropRegion(Haul.canDropOfType(HAUL_TYPE)(Haul.useDraggingState())),\n )}\n onAutoBoundsChange={(bounds) => onAxisChange?.({ key, bounds })}\n >\n {yAxes.map((a, i) => {\n const yLines = lines.filter((l) => l.axes.y === a.key);\n const yRules = rules?.filter((r) => r.axis === a.key);\n return (\n <YAxis\n key={a.key}\n axis={{\n ...a,\n showGrid: showGrid ?? (index === 0 && i === 0),\n }}\n lines={yLines}\n rules={yRules}\n onRuleChange={onRuleChange}\n onAxisChannelDrop={onAxisChannelDrop}\n onAxisChange={onAxisChange}\n />\n );\n })}\n {xRules?.map((rule) => (\n <Rule.Rule\n aetherKey={rule.key}\n {...rule}\n key={rule.key}\n onLabelChange={(value) => onRuleChange?.({ key: rule.key, label: value })}\n onPositionChange={(value) =>\n onRuleChange?.({ key: rule.key, position: value })\n }\n />\n ))}\n </Core.XAxis>\n );\n};\n\ninterface YAxisProps\n extends Pick<\n LinePlotProps,\n \"onRuleChange\" | \"lines\" | \"rules\" | \"onAxisChannelDrop\" | \"onAxisChange\"\n > {\n axis: AxisProps;\n}\n\nconst lineKey = ({ channels: { x, y } }: LineProps): string => `${x ?? 0}-${y}`;\n\nconst YAxis = ({\n lines,\n rules,\n onRuleChange,\n onAxisChannelDrop,\n onAxisChange,\n axis: { key, location: loc, ...props },\n}: YAxisProps): ReactElement => {\n const dropProps = Haul.useDrop({\n type: \"Channel.LinePlot.YAxis\",\n canDrop,\n onDrop: useCallback(\n ({ items }) => {\n const dropped = Haul.filterByType(HAUL_TYPE, items);\n onAxisChannelDrop?.(\n key,\n dropped.map(({ key }) => key as channel.Key),\n );\n return dropped;\n },\n [key, onAxisChannelDrop],\n ),\n });\n\n const dragging = Haul.useDraggingState();\n\n return (\n <Core.YAxis\n {...props}\n {...dropProps}\n location={loc as loc.X}\n className={CSS(CSS.dropRegion(Haul.canDropOfType(HAUL_TYPE)(dragging)))}\n onAutoBoundsChange={(bounds) => onAxisChange?.({ key, bounds })}\n >\n {lines.map((l) => (\n <Line key={lineKey(l)} line={l} />\n ))}\n {rules?.map((r) => (\n <Rule.Rule\n aetherKey={r.key}\n {...r}\n key={r.key}\n onLabelChange={(value) => onRuleChange?.({ key: r.key, label: value })}\n onPositionChange={(value) => onRuleChange?.({ key: r.key, position: value })}\n />\n ))}\n </Core.YAxis>\n );\n};\n\nconst Line = ({ line }: { line: LineProps }): ReactElement =>\n line.variant === \"static\" ? <StaticLine line={line} /> : <DynamicLine line={line} />;\n\nconst DynamicLine = ({\n line: {\n key,\n timeSpan,\n channels: { x, y },\n ...props\n },\n}: {\n line: DynamicLineProps;\n}): ReactElement => {\n const yTelem = telem.streamChannelData({ timeSpan, channel: y });\n const hasX = x != null && x !== 0;\n const xTelem = telem.streamChannelData({\n timeSpan,\n channel: hasX ? x : y,\n index: !hasX,\n });\n return <Core.Line aetherKey={key} y={yTelem} x={xTelem} {...props} />;\n};\n\nconst StaticLine = ({\n line: {\n timeRange,\n key,\n channels: { x, y },\n ...props\n },\n}: {\n line: StaticLineProps;\n}): ReactElement => {\n const yTelem = telem.channelData({ timeRange, channel: y });\n const hasX = x != null && x !== 0;\n const xTelem = telem.channelData({\n timeRange,\n channel: hasX ? x : y,\n index: !hasX,\n });\n return <Core.Line aetherKey={key} y={yTelem} x={xTelem} {...props} />;\n};\n","// Copyright 2023 Synnax Labs, Inc.\n//\n// Use of this software is governed by the Business Source License included in the file\n// licenses/BSL.txt.\n//\n// As of the Change Date specified in that file, in accordance with the Business Source\n// License, use of this software will be governed by the Apache License, Version 2.0,\n// included in the file licenses/APL.txt.\n\n\n\nimport { type Node } from \"@/mosaic/types\";\nimport { Tabs } from \"@/tabs\";\nimport { deep, direction, location, spatial } from \"@synnaxlabs/x\";\n\nconst TabNotFound = new Error(\"Tab not found\");\nconst InvalidMosaic = new Error(\"Invalid Mosaic\");\n\n/**\n * Inserts a tab into a node in the mosaic. If the given key is not found,\n * the tab is inserted into the closest ancestor. This is to deal\n * with mosaic garbage collection.\n *\n * @param key - The key of the node to insert the tab into.\n * @param tab - The tab to insert.\n * @param loc - The location where the tab was 'dropped' relative to the node.\n */\nexport const insertTab = (\n root: Node,\n tab: Tabs.Tab,\n loc: location.Location = \"center\",\n key?: number,\n): Node => {\n root = shallowCopyNode(root);\n if (key === undefined) return insertAnywhere(root, tab);\n\n const node = findNodeOrAncestor(root, key);\n\n // In the case where we're dropping the node in the center,\n // simply add the tab, change the selection, and return.\n if (loc === \"center\") {\n node.tabs?.push(tab);\n node.selected = tab.tabKey;\n return root;\n }\n\n // If we're not dropping the tab in the center,\n // and we have no tabs in the current node,\n // we can't split the node (because on side would be empty),\n // so we do nothing.\n if (node.tabs == null || node.tabs.length === 0) return root;\n\n const [insertOrder, siblingOrder, dir] = splitArrangement(loc);\n node.direction = dir;\n\n node[insertOrder] = { key: 0, tabs: [tab], selected: tab.tabKey };\n node[siblingOrder] = { key: 0, tabs: node.tabs, selected: node.selected };\n\n if (node.first == null || node.last == null) throw InvalidMosaic;\n\n // Assigning these keeps the mosaic sorted so we can do ancestor searches.\n node.first.key = node.key * 2;\n node.last.key = node.key * 2 + 1;\n\n // Clear the previous node, as it's now been and is not used\n // for rendering.\n node.tabs = undefined;\n node.size = undefined;\n node.selected = undefined;\n\n return root;\n};\n\nconst insertAnywhere = (root: Node, tab: Tabs.Tab): Node => {\n root = shallowCopyNode(root);\n if (root.tabs != null) {\n root.tabs.push(tab);\n root.selected = tab.tabKey;\n return root;\n }\n if (root.first != null) root.first = insertAnywhere(root.first, tab);\n else if (root.last != null) root.last = insertAnywhere(root.last, tab);\n return root;\n};\n\n/**\n * Automatically selects tabs for all nodes in the mosaic if they don't already have\n * a selection.\n *\n * @param root - The root of the mosaic.\n * @returns A shallow copy of the root with all nodes having a selection.\n */\nexport const autoSelectTabs = (root: Node): [Node, string[]] => {\n root = shallowCopyNode(root);\n const selected: string[] = [];\n if (root.tabs != null) {\n root.selected = Tabs.resetSelection(root.selected, root.tabs);\n if (root.selected != null) selected.push(root.selected);\n }\n if (root.first != null) {\n const [f, s] = autoSelectTabs(root.first);\n root.first = f;\n selected.push(...s);\n }\n if (root.last != null) {\n const [r, l] = autoSelectTabs(root.last);\n root.last = r;\n selected.push(...l);\n }\n return [root, selected];\n};\n\n/**\n * Removes a tab from the mosaic and performs any necessary garbage collection.\n *\n * @param root - The root of the mosaic.\n * @param tabKey - The key of the tab to remove. This tab must exist in the mosaic.\n */\nexport const removeTab = (root: Node, tabKey: string): [Node, string | null] => {\n root = shallowCopyNode(root);\n const [, node] = findMosaicTab(root, tabKey);\n if (node == null) throw TabNotFound;\n node.tabs = node.tabs?.filter((t) => t.tabKey !== tabKey);\n node.selected = Tabs.resetSelection(node.selected, node.tabs);\n const gced = gc(root);\n const selected = node.selected ?? findSelected(gced);\n return [gced, selected];\n};\n\nexport const findSelected = (root: Node): string | null => {\n if (root.selected != null) return root.selected;\n if (root.first != null) return findSelected(root.first);\n if (root.last != null) return findSelected(root.last);\n return null;\n};\n\n/**\n * Marks the given tab as selected.\n *\n * @param root - The root of the mosaic.\n * @param tabKey - The key of the tab to select. This tab must exist in the mosaic.\n * @returns A shallow copy of the root of the mosaic with the tab selected.\n */\nexport const selectTab = (root: Node, tabKey: string): Node => {\n root = shallowCopyNode(root);\n const [tab, entry] = findMosaicTab(root, tabKey);\n if (tab == null || entry == null) throw TabNotFound;\n entry.selected = tabKey;\n return root;\n};\n\n/**\n * Moves a tab from one node to another.\n *\n * @param root - The root of the mosaic.\n * @param to - The key of the node to move the tab to.\n * @param tabKey - The key of the tab to move. This tab must exist in the mosaic.\n * @param loc - The location where the tab was 'dropped' relative to the node.\n * @returns A shallow copy of the root of the mosaic with the tab moved.\n */\nexport const moveTab = (\n root: Node,\n tabKey: string,\n loc: location.Location,\n to: number,\n): [Node, string | null] => {\n root = shallowCopyNode(root);\n const [tab, entry] = findMosaicTab(root, tabKey);\n if (tab == null || entry == null) throw TabNotFound;\n const [r2, selected] = removeTab(root, tabKey);\n const r3 = insertTab(r2, tab, loc, to);\n return [r3, selected];\n};\n\n/**\n * Resizes the given mosaic leaf.\n *\n * @param root - The root of the mosaic.\n * @param key - The key of the leaf to resize.\n * @param size - The new size distribution for the leaf. Expressed as either a percentage\n * or a number of pixels of the first child.\n * @returns A shallow copy of the root of the mosaic with the leaf resized.\n */\nexport const resizeNode = (root: Node, key: number, size: number): Node => {\n const node = findMosaicNode(root, key);\n if (node == null) throw new Error(\"Node not found\");\n else node.size = size;\n return root;\n};\n\n/**\n * Sets the title of a tab.\n *\n * @param root - The root of the mosaic.\n * @param tabKey - The key of the tab to resize.\n * @param name - The new title of the tab.\n * @returns A shallow copy of the root of the mosaic with the tab title changed.\n */\nexport const renameTab = (root: Node, tabKey: string, name: string): Node => {\n root = shallowCopyNode(root);\n const [, leaf] = findMosaicTab(root, tabKey);\n if (leaf?.tabs == null) throw TabNotFound;\n leaf.tabs = Tabs.rename(tabKey, name, leaf?.tabs ?? []);\n return root;\n};\n\n/***\n * @returns True if the given mosaic node is empty, false otherwise.\n */\nexport const isEmpty = (root: Node): boolean => {\n if (root.tabs != null) return root.tabs.length === 0;\n return root.first == null && root.last == null;\n};\n\n/** Finds the node with the given key or its closest ancestor. */\nconst findNodeOrAncestor = (root: Node, key: number): Node => {\n const node = findMosaicNode(root, key);\n if (node != null) return node;\n const next = Math.floor(key / 2);\n return next === 0 ? root : findNodeOrAncestor(root, next);\n};\n\nconst gc = (root: Node): Node => {\n let gced = true;\n while (gced) [root, gced] = _gc(root);\n return root;\n};\n\nconst _gc = (node: Node): [Node, boolean] => {\n if (node.first == null || node.last == null) return [node, false];\n if (shouldGc(node.first)) return [liftUp(node.last, true), true];\n if (shouldGc(node.last)) return [liftUp(node.first, false), true];\n let [sGC, eGC] = [false, false];\n [node.first, sGC] = _gc(node.first);\n [node.last, eGC] = _gc(node.last);\n return [node, sGC || eGC];\n};\n\nconst liftUp = (node: Node, isLast: boolean): Node => {\n node.size = undefined;\n node.key = (node.key - Number(isLast)) / 2;\n return node;\n};\n\nconst shouldGc = (node: Node): boolean =>\n node.first == null &&\n node.last == null &&\n (node.tabs == null || node.tabs.length === 0);\n\nconst findMosaicTab = (\n node: Node,\n tabKey: string,\n): [Tabs.Tab | undefined, Node | undefined] => {\n if (node.tabs != null) {\n const tab = node.tabs.find((t) => t.tabKey === tabKey);\n if (tab != null) return [tab, node];\n }\n if (node.first == null || node.last == null) return [undefined, undefined];\n const [t1Tab, t2Tree] = findMosaicTab(node.first, tabKey);\n if (t1Tab != null && t2Tree != null) return [t1Tab, t2Tree];\n const [t2Tab, t2Tree2] = findMosaicTab(node.last, tabKey);\n return [t2Tab, t2Tree2];\n};\n\nconst findMosaicNode = (node: Node, key: number): Node | undefined => {\n if (node.key === key) return node;\n if (node.first == null || node.last == null) return undefined;\n const n1 = findMosaicNode(node.first, key);\n if (n1 != null) return n1;\n return findMosaicNode(node.last, key);\n};\n\nconst splitArrangement = (\n insertPosition: location.Location,\n): [spatial.Order, spatial.Order, direction.Direction] => {\n switch (insertPosition) {\n case \"top\":\n return [\"first\", \"last\", \"y\"];\n case \"left\":\n return [\"first\", \"last\", \"x\"];\n case \"bottom\":\n return [\"last\", \"first\", \"y\"];\n case \"right\":\n return [\"last\", \"first\", \"x\"];\n case \"center\":\n throw new Error(\"cannot split a center placed tab\");\n }\n};\n\nconst shallowCopyNode = (node: Node): Node => deep.copy(node);\n","// Copyright 2023 Synnax Labs, Inc.\n//\n// Use of this software is governed by the Business Source License included in the file\n// licenses/BSL.txt.\n//\n// As of the Change Date specified in that file, in accordance with the Business Source\n// License, use of this software will be governed by the Apache License, Version 2.0,\n// included in the file licenses/APL.txt.\n\nimport { useEffect, useState } from \"react\";\n\nimport { type location } from \"@synnaxlabs/x\";\n\nimport {\n moveTab,\n removeTab,\n resizeNode,\n selectTab,\n renameTab,\n autoSelectTabs,\n} from \"@/mosaic/tree\";\nimport { type Node } from \"@/mosaic/types\";\n\nexport interface UseProps {\n allowRename?: boolean;\n initialTree: Node;\n}\n\nexport interface UseReturn {\n root: Node;\n onDrop: (key: number, tabKey: string, loc: location.Location) => void;\n onClose: (tabKey: string) => void;\n onSelect: (tabKey: string) => void;\n onResize: (key: number, sizes: number) => void;\n onRename?: (tabKey: string, name: string) => void;\n}\n\n/**\n * The Mosaic.use hook implements the state management and logic for the Mosaic\n * component. This hook should be used in conjunction with the Mosaic component.\n *\n * @param props - The props for the Mosaic.use hook.\n * @param props.initialValue - The initial root node of the mosaic tree. For\n * information on what this node should look like, see the {@link Node}\n * type.\n */\nexport const use = ({ allowRename = false, initialTree }: UseProps): UseReturn => {\n const [root, setRoot] = useState(initialTree);\n\n useEffect(() => setRoot(autoSelectTabs(initialTree)[0]), [initialTree]);\n\n const handleDrop = (key: number, tabKey: string, loc: location.Location): void =>\n setRoot((r) => moveTab(r, tabKey, loc, key)[0]);\n\n const handleClose = (tabKey: string): void => setRoot((r) => removeTab(r, tabKey)[0]);\n\n const handleSelect = (tabKey: string): void => setRoot((r) => selectTab(r, tabKey));\n\n const handleResize = (key: number, size: number): void =>\n setRoot((r) => resizeNode(r, key, size));\n\n const handleRename = (tabKey: string, title: string): void =>\n setRoot((r) => renameTab(r, tabKey, title));\n\n return {\n root,\n onDrop: handleDrop,\n onClose: handleClose,\n onSelect: handleSelect,\n onResize: handleResize,\n onRename: allowRename ? handleRename : undefined,\n };\n};\n","// Copyright 2023 Synnax Labs, Inc.\n//\n// Use of this software is governed by the Business Source License included in the file\n// licenses/BSL.txt.\n//\n// As of the Change Date specified in that file, in accordance with the Business Source\n// License, use of this software will be governed by the Apache License, Version 2.0,\n// included in the file licenses/APL.txt.\n\nimport { type ReactElement } from \"react\";\n\nimport { Align } from \"@/align\";\nimport { type Button } from \"@/button\";\nimport { CSS } from \"@/css\";\nimport { type InternalControlsProps } from \"@/os/Controls/types\";\nimport { type ComponentSize } from \"@/util/component\";\n\nimport \"@/os/Controls/Mac.css\";\n\nexport const Icon = {\n Close: (\n <svg\n width=\"124\"\n height=\"124\"\n viewBox=\"0 0 124 124\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <rect\n x=\"26.8701\"\n y=\"88.3883\"\n width=\"87\"\n height=\"11\"\n transform=\"rotate(-45 26.8701 88.3883)\"\n fill=\"#7E0508\"\n />\n <rect\n x=\"26.8701\"\n y=\"34.6482\"\n width=\"11\"\n height=\"87\"\n transform=\"rotate(-45 26.8701 34.6482)\"\n fill=\"#7E0508\"\n />\n </svg>\n ),\n Minimize: (\n <svg\n width=\"87\"\n height=\"11\"\n viewBox=\"0 0 87 11\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <rect x=\"15\" width=\"60\" height=\"11\" fill=\"#985712\" />\n </svg>\n ),\n Maximize: (\n <svg\n width=\"143\"\n height=\"143\"\n viewBox=\"0 0 143 143\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M108.242 32.8833C108.797 32.8817 109.247 33.3317 109.245 33.8862L109.092 87.5891C109.09 88.4786 108.014 88.9223 107.385 88.2933L53.8351 34.7432C53.2061 34.1142 53.6499 33.0387 54.5394 33.0361L108.242 32.8833Z\"\n fill=\"#0B650D\"\n />\n <path\n d=\"M33.8862 109.245C33.3317 109.247 32.8818 108.797 32.8833 108.242L33.0361 54.5394C33.0387 53.6499 34.1142 53.2061 34.7432 53.8351L88.2934 107.385C88.9223 108.014 88.4786 109.09 87.5891 109.092L33.8862 109.245Z\"\n fill=\"#0B650D\"\n />\n </svg>\n ),\n};\n\nexport const MacOS = ({\n disabled = [],\n className,\n focused = true,\n onMinimize,\n onMaximize,\n onFullscreen,\n onClose,\n ...props\n}: InternalControlsProps): ReactElement => (\n <Align.Space\n size={1.5}\n direction=\"x\"\n className={CSS(\n CSS.B(\"macos-controls\"),\n !focused && CSS.BM(\"macos-controls\", \"blurred\"),\n className,\n )}\n {...props}\n >\n <TrafficLight\n onClick={onClose}\n className={CSS.BM(\"macos-control\", \"close\")}\n disabled={disabled.includes(\"close\")}\n >\n {Icon.Close}\n </TrafficLight>\n <TrafficLight\n onClick={onMinimize}\n className={CSS.BM(\"macos-control\", \"minimize\")}\n disabled={disabled.includes(\"minimize\")}\n >\n {Icon.Minimize}\n </TrafficLight>\n <TrafficLight\n onClick={onFullscreen}\n className={CSS.BM(\"macos-control\", \"maximize\")}\n disabled={disabled.includes(\"maximize\")}\n >\n {Icon.Maximize}\n </TrafficLight>\n </Align.Space>\n);\n\ninterface TrafficLightProps extends Button.IconProps {}\n\nconst TrafficLight = ({ className, ...props }: TrafficLightProps): ReactElement => (\n <button\n className={CSS(CSS.B(\"macos-control\"), className)}\n tabIndex={-1}\n size={\"\" as ComponentSize}\n {...props}\n />\n);\n","// Copyright 2023 Synnax Labs, Inc.\n//\n// Use of this software is governed by the Business Source License included in the file\n// licenses/BSL.txt.\n//\n// As of the Change Date specified in that file, in accordance with the Business Source\n// License, use of this software will be governed by the Apache License, Version 2.0,\n// included in the file licenses/APL.txt.\n\nimport { type ReactElement } from \"react\";\n\nimport { Icon } from \"@synnaxlabs/media\";\n\nimport { Align } from \"@/align\";\nimport { Button as CoreButton } from \"@/button\";\nimport { CSS } from \"@/css\";\nimport { type InternalControlsProps } from \"@/os/Controls/types\";\n\nimport \"@/os/Controls/Windows.css\";\n\nexport const Windows = ({\n disabled = [],\n onMinimize,\n onMaximize,\n onClose,\n // no-op on windows\n onFullscreen: _,\n ...props\n}: InternalControlsProps): ReactElement => (\n <Align.Pack {...props}>\n <Button \n className={CSS.BM(\"windows-control\", \"minimize\")}\n onClick={onMinimize} \n disabled={disabled.includes(\"minimize\")}\n >\n <Icon.Subtract />\n </Button>\n <Button \n className={CSS.BM(\"windows-control\", \"maximize\")}\n onClick={onMaximize} disabled={disabled.includes(\"maximize\")}\n >\n <Icon.Box />\n </Button>\n <Button\n onClick={onClose}\n className={CSS.BM(\"windows-control\", \"close\")}\n disabled={disabled.includes(\"close\")}\n >\n <Icon.Close />\n </Button>\n </Align.Pack>\n);\n\nconst Button = ({\n disabled = false,\n className,\n ...props\n}: CoreButton.IconProps): ReactElement | null =>\n !disabled ? (\n <CoreButton.Icon\n className={CSS(CSS.B(\"windows-control\"), className)}\n tabIndex={-1}\n {...props}\n />\n ) : null;\n","// Copyright 2023 Synnax Labs, Inc.\n//\n// Use of this software is governed by the Business Source License included in the file\n// licenses/BSL.txt.\n//\n// As of the Change Date specified in that file, in accordance with the Business Source\n// License, use of this software will be governed by the Apache License, Version 2.0,\n// included in the file licenses/APL.txt.\n\nimport { runtime } from \"@synnaxlabs/x\";\n\nexport const use = (props?: runtime.GetOSProps): runtime.OS | undefined =>\n runtime.getOS(props);\n","// Copyright 2023 Synnax Labs, Inc.\n//\n// Use of this software is governed by the Business Source License included in the file\n// licenses/BSL.txt.\n//\n// As of the Change Date specified in that file, in accordance with the Business Source\n// License, use of this software will be governed by the Apache License, Version 2.0,\n// included in the file licenses/APL.txt.\n\nimport { type ReactElement } from \"react\";\n\nimport { type runtime } from \"@synnaxlabs/x\";\n\nimport { MacOS } from \"@/os/Controls/Mac\";\nimport { type InternalControlsProps } from \"@/os/Controls/types\";\nimport { Windows } from \"@/os/Controls/Windows\";\nimport { use } from \"@/os/use\";\n\nconst Variants: Record<runtime.OS, React.FC<InternalControlsProps>> = {\n MacOS,\n Windows,\n Linux: Windows,\n Docker: Windows,\n};\n\nconst DEFAULT_OS = \"Windows\";\n\nexport interface ControlsProps extends InternalControlsProps {\n visibleIfOS?: runtime.OS;\n}\n\nexport const Controls = ({\n forceOS,\n visibleIfOS,\n ...props\n}: ControlsProps): ReactElement | null => {\n const os = use({ force: forceOS, default: DEFAULT_OS }) as runtime.OS;\n const C = Variants[os];\n if (visibleIfOS != null && visibleIfOS !== os) return null;\n return <C {...props} />;\n};\n","// Copyright 2023 Synnax Labs, Inc.\n//\n// Use of this software is governed by the Business Source License included in the file\n// licenses/BSL.txt.\n//\n// As of the Change Date specified in that file, in accordance with the Business Source\n// License, use of this software will be governed by the Apache License, Version 2.0,\n// included in the file licenses/APL.txt.\n\nimport { box, xy, type direction, location } from \"@synnaxlabs/x\";\n\nimport { type NodeLayout } from \"@/vis/diagram/util\";\n\nexport const alignNodes = (\n layouts: NodeLayout[],\n dir: direction.Direction = \"x\",\n): NodeLayout[] => {\n if (layouts.length === 0) return [];\n const loc = location.construct(dir);\n const oppositeLoc = location.swap(loc);\n // sort the layouts in order of their x position, lowest to highest\n layouts.sort((a, b) => box.loc(a.box, loc) - box.loc(b.box, loc));\n // grab the first node\n layouts.forEach((layout, i) => {\n if (i === 0) return;\n const prev = layouts[i - 1];\n const prevRightHandle = prev.handles.find((h) => h.orientation === oppositeLoc);\n const leftHandle = layout.handles.find((h) => h.orientation === loc);\n if (prevRightHandle == null || leftHandle == null) return;\n // We want to align the left handle of the current node with the right handle of the previous node\n const prevHandleAbsPos = prevRightHandle.absolutePosition;\n const leftHandleAbsPos = leftHandle.absolutePosition;\n const dist = xy.set(xy.translation(leftHandleAbsPos, prevHandleAbsPos), dir, 0);\n const newPos = xy.translate(box.topLeft(layout.box), dist);\n layout.box = box.construct(newPos, box.dims(layout.box));\n });\n return layouts;\n};\n","// Copyright 2023 Synnax Labs, Inc.\n//\n// Use of this software is governed by the Business Source License included in the file\n// licenses/BSL.txt.\n//\n// As of the Change Date specified in that file, in accordance with the Business Source\n// License, use of this software will be governed by the Apache License, Version 2.0,\n// included in the file licenses/APL.txt.\n\nimport { type z } from \"zod\";\n\nimport { Aether } from \"@/aether\";\nimport { table } from \"@/vis/table/aether\";\n\nexport interface UseProps extends z.input<typeof table.tableStateZ> {\n aetherKey: string;\n}\n\nexport interface SourceProps extends z.input<typeof table.tableSourceZ> {}\n\nexport const use = ({\n aetherKey,\n ...props\n}: UseProps): Aether.UseReturn<typeof table.tableStateZ> =>\n Aether.use({\n aetherKey,\n type: table.Table.TYPE,\n schema: table.tableStateZ,\n initialState: props,\n });\n","export default \"data:video/mp2t;base64,Ly8gQ29weXJpZ2h0IDIwMjMgU3lubmF4IExhYnMsIEluYy4KLy8KLy8gVXNlIG9mIHRoaXMgc29mdHdhcmUgaXMgZ292ZXJuZWQgYnkgdGhlIEJ1c2luZXNzIFNvdXJjZSBMaWNlbnNlIGluY2x1ZGVkIGluIHRoZSBmaWxlCi8vIGxpY2Vuc2VzL0JTTC50eHQuCi8vCi8vIEFzIG9mIHRoZSBDaGFuZ2UgRGF0ZSBzcGVjaWZpZWQgaW4gdGhhdCBmaWxlLCBpbiBhY2NvcmRhbmNlIHdpdGggdGhlIEJ1c2luZXNzIFNvdXJjZQovLyBMaWNlbnNlLCB1c2Ugb2YgdGhpcyBzb2Z0d2FyZSB3aWxsIGJlIGdvdmVybmVkIGJ5IHRoZSBBcGFjaGUgTGljZW5zZSwgVmVyc2lvbiAyLjAsCi8vIGluY2x1ZGVkIGluIHRoZSBmaWxlIGxpY2Vuc2VzL0FQTC50eHQuCgppbXBvcnQgeyBwbHV0byB9IGZyb20gIkAvcGx1dG8vYWV0aGVyIjsKCnBsdXRvLnJlbmRlcigpOwo=\"","// Copyright 2023 Synnax Labs, Inc.\n//\n// Use of this software is governed by the Business Source License included in the file\n// licenses/BSL.txt.\n//\n// As of the Change Date specified in that file, in accordance with the Business Source\n// License, use of this software will be governed by the Apache License, Version 2.0,\n// included in the file licenses/APL.txt.\n\nimport { type PropsWithChildren, type ReactElement } from \"react\";\n\nimport { Aether } from \"@/aether\";\nimport { Alamos } from \"@/alamos\";\nimport { Channel } from \"@/channel\";\nimport { Haul } from \"@/haul\";\nimport DefaultWorkerURL from \"@/pluto/defaultWorker.ts?url\";\nimport { Status } from \"@/status\";\nimport { Synnax } from \"@/synnax\";\nimport { Telem } from \"@/telem\";\nimport { Control } from \"@/telem/control\";\nimport { Theming } from \"@/theming\";\nimport { Tooltip } from \"@/tooltip\";\nimport { Triggers } from \"@/triggers\";\nimport { Worker } from \"@/worker\";\n\n// // @ts-expect-error - unable to resolve valid vite import\n// // eslint-disable-next-line import/no-unresolved\n\nimport \"@synnaxlabs/media/dist/style.css\";\n\nexport interface ProviderProps\n extends PropsWithChildren,\n Partial<Theming.ProviderProps>,\n Synnax.ProviderProps {\n workerEnabled?: boolean;\n workerURL?: URL;\n alamos?: Alamos.ProviderProps;\n tooltip?: Tooltip.ConfigProps;\n triggers?: Triggers.ProviderProps;\n haul?: Haul.ProviderProps;\n channelAlias?: Channel.AliasProviderProps;\n}\n\nexport const Provider = ({\n children,\n connParams,\n workerEnabled = true,\n workerURL,\n theme,\n toggleTheme,\n setTheme,\n tooltip,\n triggers,\n alamos,\n haul,\n channelAlias,\n}: ProviderProps): ReactElement => {\n return (\n <Triggers.Provider {...triggers}>\n <Tooltip.Config {...tooltip}>\n <Haul.Provider {...haul}>\n <Worker.Provider url={workerURL ?? DefaultWorkerURL} enabled={workerEnabled}>\n <Aether.Provider workerKey=\"vis\">\n <Alamos.Provider {...alamos}>\n <Status.Aggregator>\n <Synnax.Provider connParams={connParams}>\n <Channel.AliasProvider {...channelAlias}>\n <Telem.Provider>\n <Theming.Provider\n theme={theme}\n toggleTheme={toggleTheme}\n setTheme={setTheme}\n >\n <Control.StateProvider>{children}</Control.StateProvider>\n </Theming.Provider>\n </Telem.Provider>\n </Channel.AliasProvider>\n </Synnax.Provider>\n </Status.Aggregator>\n </Alamos.Provider>\n </Aether.Provider>\n </Worker.Provider>\n </Haul.Provider>\n </Tooltip.Config>\n </Triggers.Provider>\n );\n};\n","// Copyright 2023 Synnax Labs, Inc.\n//\n// Use of this software is governed by the Business Source License included in the file\n// licenses/BSL.txt.\n//\n// As of the Change Date specified in that file, in accordance with the Business Source\n// License, use of this software will be governed by the Apache License, Version 2.0,\n// included in the file licenses/APL.txt.\n\nimport { type ReactElement } from \"react\";\n\nimport { Icon } from \"@synnaxlabs/media\";\nimport { type CrudeTimeRange, TimeStamp, TimeSpan } from \"@synnaxlabs/x\";\n\nimport { Align } from \"@/align\";\nimport { CSS } from \"@/css\";\nimport { Text } from \"@/text\";\n\nimport \"@/ranger/TimeRangeChip.css\";\n\nexport interface TimeRangeChipProps {\n timeRange: CrudeTimeRange;\n}\n\nexport const TimeRangeChip = ({ timeRange }: TimeRangeChipProps): ReactElement => {\n const startTS = new TimeStamp(timeRange.start);\n const startFormat = startTS.isToday ? \"time\" : \"dateTime\";\n const endTS = new TimeStamp(timeRange.end);\n const isOpen = endTS.equals(TimeStamp.MAX);\n const endFormat = endTS.span(startTS) < TimeSpan.DAY ? \"time\" : \"dateTime\";\n\n return (\n <Align.Space\n direction=\"x\"\n size=\"small\"\n className={CSS(CSS.B(\"time-range-chip\"))}\n align=\"center\"\n >\n {startTS.isToday && <Text.Text level=\"small\">Today</Text.Text>}\n <Text.DateTime level=\"small\" displayTZ=\"local\" format={startFormat}>\n {startTS}\n </Text.DateTime>\n <Icon.Arrow.Right color=\"var(--pluto-text-color)\" />\n {isOpen ? (\n <Text.Text level=\"small\">Now</Text.Text>\n ) : (\n <Text.DateTime level=\"small\" displayTZ=\"local\" format={endFormat}>\n {endTS}\n </Text.DateTime>\n )}\n </Align.Space>\n );\n};\n","// Copyright 2023 Synnax Labs, Inc.\n//\n// Use of this software is governed by the Business Source License included in the file\n// licenses/BSL.txt.\n//\n// As of the Change Date specified in that file, in accordance with the Business Source\n// License, use of this software will be governed by the Apache License, Version 2.0,\n// included in the file licenses/APL.txt.\n\nimport { type ReactElement } from \"react\";\n\nimport { type label } from \"@synnaxlabs/client\";\nimport { Icon } from \"@synnaxlabs/media\";\n\nimport { type List } from \"@/list\";\nimport { Select } from \"@/select\";\nimport { Synnax } from \"@/synnax\";\nimport { Tag } from \"@/tag\";\n\nconst labelColumns: Array<List.ColumnSpec<label.Key, label.Label>> = [\n {\n key: \"color\",\n name: \"Color\",\n width: 50,\n render: (v) => (\n <Icon.Circle\n style={{ fontSize: 10, marginLeft: 10, marginRight: 30 }}\n color={v.entry.color}\n />\n ),\n },\n {\n key: \"name\",\n name: \"Name\",\n },\n];\n\nexport interface SelectLabelsProps\n extends Omit<Select.MultipleProps<label.Key, label.Label>, \"columns\" | \"searcher\"> {}\n\nexport const SelectLabels = (props: SelectLabelsProps): ReactElement => {\n const client = Synnax.use();\n return (\n <Select.Multiple\n {...props}\n searcher={client?.labels}\n columns={labelColumns}\n renderTag={(v) => <Tag.Tag color={v.entry.color}>{v.entry.name}</Tag.Tag>}\n />\n );\n};\n"],"names":["Icon","Resize.useMultiple","box","jsx","Resize.Multiple","jsxs","Fragment","Header.Header","Header.ButtonTitle","Header.Actions","useContext","Core.Simple","Theming.useTypography","Align.Space","Text.MaybeEditable","CoreButton.Icon","Button","Text.Text","Triggers.Text","Select.Button","props","Button.Icon","Haul.canDropOfType","loc","Core.LinePlot","Core.Legend","Core.Title","Core.Viewport","Tooltip.Tooltip","Measure.Measure","location","Haul.useDrop","Haul.filterByType","key","Core.XAxis","Haul.useDraggingState","Rule.Rule","Core.YAxis","telem.streamChannelData","Core.Line","telem.channelData","Tabs.resetSelection","Tabs.rename","deep","use","Align.Pack","runtime","h","Aether.use","table.Table","table.tableStateZ","Triggers.Provider","Tooltip.Config","Haul.Provider","Worker.Provider","Aether.Provider","Alamos.Provider","Status.Aggregator","Synnax.Provider","Channel.AliasProvider","Telem.Provider","Theming.Provider","Control.StateProvider","Text.DateTime","Synnax.use","Select.Multiple","Tag.Tag"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoBO,MAAM,SAAS,CAAC,EAAE,cAAyC;AAChE,+CAAQA,OAAK,QAAL,EAAY,OAAO,cAAc,OAAO,EAAG,CAAA;AACrD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AC4BA,MAAM,YAAiC;AACvC,MAAM,WAAW;AACjB,MAAM,sBAAsB;AAC5B,MAAM,mBAAmB;AACzB,MAAM,sBAAsB;AAarB,MAAM,YAAY,CAAC,EAAE,MAAM,GAAG,YAA0C;AACvE,QAAA;AAAA,IACJ;AAAA,IACA,OAAO,EAAE,kBAAkB,OAAO,KAAK,GAAG,YAAY;AAAA,EACxD,IAAIC,YAAmB;AAAA,IACrB,WAAW;AAAA,IACX,OAAO,KAAK;AAAA,IACZ,SAAS;AAAA,EAAA,CACV;AAEK,QAAA,WAAW,CAAC,UAAwB;AACxC,QAAI,IAAI,WAAW;AAAM;AACnB,UAAA,aAAaC,MAAI,IAAIA,MAAI,UAAU,IAAI,OAAO,GAAG,SAAS;AAC5D,QAAA,MAAM,KAAK,IAAI,mBAAmB;AACpC,cAAQ,OAAO,KAAK,KAAK,EAAE,eAAe,mBAAmB;AAAA;AAClD,cAAA,OAAO,WAAW,CAAC;AAAA,EAAA;AAIhC,SAAAC,kCAAA;AAAA,IAACC;AAAAA,IAAA;AAAA,MACC,OAAK;AAAA,MACL,WAAW,IAAI,EAAE,WAAW;AAAA,MAC5B,kBAAkB;AAAA,MAClB;AAAA,MACC,GAAG;AAAA,MACH,GAAG;AAAA,MAEH,UAAK,KAAA,IAAI,CAAC,OAAO,MAChB;AAAA,QAAC;AAAA,QAAA;AAAA,UACE,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,WAAU,SAAQ,QAAQ,WACpD,UACH,OAAA;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAIR;ACjCA,MAAM,eAA+D;AAAA,EACnE;AAAA,IACE,KAAK;AAAA,IACL,MAAM;AAAA,IACN,OAAO;AAAA,IACP,QAAQ,CAAC,MACP5D,kCAAA;AAAA,MAACH,OAAK;AAAA,MAAL;AAAA,QACC,OAAO,EAAE,UAAU,IAAI,YAAY,IAAI,aAAa,GAAG;AAAA,QACvD,OAAO,EAAE,MAAM;AAAA,MAAA;AAAA,IACjB;AAAA,EAEJ;AAAA,EACA;AAAA,IACE,KAAK;AAAA,IACL,MAAM;AAAA,EACR;AACF;AAKa,MAAA,eAAe,CAAC,UAA2C;AAChE,QAAA,SAASgE;AAEb,SAAA7D,kCAAA;AAAA,IAAC8D;AAAAA,IAAA;AAAA,MACE,GAAG;AAAA,MACJ,UAAU,iCAAQ;AAAA,MAClB,SAAS;AAAA,MACT,WAAW,CAAC,MAAM9D,kCAAA,IAAC+D,KAAA,EAAQ,OAAO,EAAE,MAAM,OAAQ,UAAA,EAAE,MAAM,KAAK,CAAA;AAAA,IAAA;AAAA,EAAA;AAGrE;;;;;;"}
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../src/status/Circle.tsx","../src/accordion/Accordion.tsx","../src/vis/lineplot/Legend.tsx","../src/vis/lineplot/Title.tsx","../src/select/Direction.tsx","../src/viewport/SelectMode.tsx","../src/channel/LinePlot.tsx","../src/mosaic/tree.ts","../src/mosaic/use.tsx","../src/os/Controls/Mac.tsx","../src/os/Controls/Windows.tsx","../src/os/use.ts","../src/os/Controls/Controls.tsx","../src/vis/diagram/align.ts","../src/vis/table/use.tsx","../src/pluto/defaultWorker.ts?url","../src/pluto/Pluto.tsx","../src/ranger/TimeRangeChip.tsx","../src/ranger/SelectLabel.tsx"],"sourcesContent":["// Copyright 2023 Synnax Labs, Inc.\n//\n// Use of this software is governed by the Business Source License included in the file\n// licenses/BSL.txt.\n//\n// As of the Change Date specified in that file, in accordance with the Business Source\n// License, use of this software will be governed by the Apache License, Version 2.0,\n// included in the file licenses/APL.txt.\n\nimport { type ReactElement } from \"react\";\n\nimport { Icon } from \"@synnaxlabs/media\";\n\nimport { type status } from \"@/status/aether\";\nimport { variantColors } from \"@/status/colors\";\n\nexport interface CircleProps {\n variant: status.Variant;\n}\n\nexport const Circle = ({ variant }: CircleProps): ReactElement => {\n return <Icon.Circle color={variantColors[variant]} />;\n};\n","// Copyright 2023 Synnax Labs, Inc.\n//\n// Use of this software is governed by the Business Source License included in the file\n// licenses/BSL.txt.\n//\n// As of the Change Date specified in that file, in accordance with the Business Source\n// License, use of this software will be governed by the Apache License, Version 2.0,\n// included in the file licenses/APL.txt.\n\nimport { type ReactElement, type RefObject } from \"react\";\n\nimport { Icon } from \"@synnaxlabs/media\";\nimport { box, type direction } from \"@synnaxlabs/x\";\n\nimport { type Button } from \"@/button\";\nimport { CSS } from \"@/css\";\nimport { Header } from \"@/header\";\nimport { Resize } from \"@/resize\";\n\nimport \"@/accordion/Accordion.css\";\n\n/** The props for a single entry in the {@link Accordion} component. */\nexport interface Entry {\n /** A unique key for the entry. */\n key: string;\n /** The name for the entries header. */\n name: string;\n /** The content for the entry. */\n content: ReactElement;\n /**\n * The initial size for the entry. It's recommended to set this to a decimal value\n * representing the percentage of the overall parent size.\n */\n initialSize?: number;\n /**\n * A list of actions to display in the entry's header. See the {@link Header.Actions}\n * component for more details.\n */\n actions?: Array<Button.IconProps | ReactElement>;\n}\n\n/** The props for the {@link Accordion} component. */\nexport interface AccordionProps\n extends Omit<\n Resize.MultipleProps,\n \"sizeDistribution\" | \"parentSize\" | \"onDragHandle\" | \"direction\"\n > {\n data: Entry[];\n}\n\nconst DIRECTION: direction.Direction = \"y\";\nconst MIN_SIZE = 28;\nconst COLLAPSED_THRESHOLD = 32;\nconst EXPAND_THRESHOLD = 40;\nconst DEFAULT_EXPAND_SIZE = 0.5;\n\n/**\n * A resizable accordion component, whose entries can be expanded and collapsed. This\n * component is intentionally opinionated in its interface in order to provide stylistic\n * consistency and simplicity. If you need more control, look at building a custom\n * accordion component using {@link Resize.Multiple}.\n *\n * @param props - All unused props are passed to the underyling {@link Resize.Multiple}\n * component.\n * @param props.entries - The entries to display in the accordion. See the\n * {@link Entry} interface for more details.\n */\nexport const Accordion = ({ data, ...props }: AccordionProps): ReactElement => {\n const {\n setSize,\n props: { sizeDistribution: sizes, ref, ...resizeProps },\n } = Resize.useMultiple({\n direction: DIRECTION,\n count: data.length,\n minSize: MIN_SIZE,\n });\n\n const onExpand = (index: number): void => {\n if (ref.current == null) return;\n const parentSize = box.dim(box.construct(ref.current), DIRECTION);\n if (sizes[index] < EXPAND_THRESHOLD / parentSize)\n setSize(index, data[index].initialSize ?? DEFAULT_EXPAND_SIZE);\n else setSize(index, MIN_SIZE + 1);\n };\n\n return (\n <Resize.Multiple\n empty\n className={CSS.B(\"accordion\")}\n sizeDistribution={sizes}\n ref={ref}\n {...props}\n {...resizeProps}\n >\n {data.map((entry, i) => (\n <EntryC\n {...entry}\n key={entry.key}\n index={i}\n direction={DIRECTION}\n onExpand={onExpand}\n parent={ref}\n size={sizes[i]}\n />\n ))}\n </Resize.Multiple>\n );\n};\n\ninterface EntryCProps extends Omit<Entry, \"key\"> {\n index: number;\n size: number;\n parent: RefObject<HTMLDivElement>;\n onExpand: (i: number) => void;\n direction: direction.Direction;\n}\n\nconst expandedIcon = <Icon.Caret.Down aria-label=\"contract\" />;\nconst collapsedIcon = <Icon.Caret.Right aria-label=\"expand\" />;\n\nconst EntryC = ({\n index,\n name,\n content,\n actions,\n size,\n parent,\n onExpand,\n}: EntryCProps): ReactElement => {\n let expanded = true;\n if (parent.current != null) {\n const parentSize = box.dim(box.construct(parent.current), DIRECTION);\n expanded = size * parentSize > COLLAPSED_THRESHOLD;\n }\n const icon = expanded ? expandedIcon : collapsedIcon;\n return (\n <>\n <Header.Header level=\"p\" className={CSS.expanded(expanded)} empty>\n <Header.ButtonTitle startIcon={icon} onClick={() => onExpand(index)}>\n {name}\n </Header.ButtonTitle>\n {actions != null && <Header.Actions>{actions}</Header.Actions>}\n </Header.Header>\n {content}\n </>\n );\n};\n","// Copyright 2023 Synnax Labs, Inc.\n//\n// Use of this software is governed by the Business Source License included in the file\n// licenses/BSL.txt.\n//\n// As of the Change Date specified in that file, in accordance with the Business Source\n// License, use of this software will be governed by the Apache License, Version 2.0,\n// included in the file licenses/APL.txt.\n\nimport { type ReactElement, memo } from \"react\";\n\nimport { Legend as Core } from \"@/vis/legend\";\nimport { type LineSpec, useContext } from \"@/vis/lineplot/LinePlot\";\n\nimport \"@/vis/legend/Container.css\";\n\nexport interface LegendProps extends Omit<Core.SimpleProps, \"data\" | \"onEntryChange\"> {\n onLineChange?: (line: LineSpec) => void;\n}\n\nexport const Legend = ({\n className,\n style,\n onLineChange,\n ...props\n}: LegendProps): ReactElement | null => {\n const { lines } = useContext(\"Legend\");\n useContext(\"Legend\");\n return <Core.Simple data={lines} onEntryChange={onLineChange} {...props} />;\n};\n","// Copyright 2023 Synnax Labs, Inc.\n//\n// Use of this software is governed by the Business Source License included in the file\n// licenses/BSL.txt.\n//\n// As of the Change Date specified in that file, in accordance with the Business Source\n// License, use of this software will be governed by the Apache License, Version 2.0,\n// included in the file licenses/APL.txt.\n\nimport { type ReactElement } from \"react\";\n\nimport { Align } from \"@/align\";\nimport { useUniqueKey } from \"@/hooks/useUniqueKey\";\nimport { Text } from \"@/text\";\nimport { Theming } from \"@/theming\";\nimport { useGridPosition } from \"@/vis/lineplot/LinePlot\";\n\nexport type TitleProps<L extends Text.Level = \"h2\"> = Text.MaybeEditableProps<L>;\n\nexport const Title = <L extends Text.Level = \"h2\">({\n level = \"h2\" as TitleProps<L>[\"level\"],\n ...props\n}: TitleProps<L>): ReactElement => {\n const key = useUniqueKey();\n const font = Theming.useTypography(level);\n const gridStyle = useGridPosition(\n {\n key,\n size: (font.lineHeight + 2) * font.baseSize,\n loc: \"top\",\n order: \"first\",\n },\n \"Title\",\n );\n return (\n <Align.Space justify=\"center\" align=\"center\" style={gridStyle}>\n {/* @ts-expect-error */}\n <Text.MaybeEditable<L> {...props} level={level} />\n </Align.Space>\n );\n};\n","// Copyright 2023 Synnax Labs, Inc.\n//\n// Use of this software is governed by the Business Source License included in the file\n// licenses/BSL.txt.\n//\n// As of the Change Date specified in that file, in accordance with the Business Source\n// License, use of this software will be governed by the Apache License, Version 2.0,\n// included in the file licenses/APL.txt.\n\nimport { type ReactElement } from \"react\";\n\nimport { Icon } from \"@synnaxlabs/media\";\nimport { type direction } from \"@synnaxlabs/x\";\n\nimport { Button as CoreButton } from \"@/button\";\nimport { Button, type ButtonOptionProps, type ButtonProps } from \"@/select/Button\";\n\ninterface Entry {\n key: direction.Direction;\n icon: ReactElement;\n}\n\nexport interface DirectionProps\n extends Omit<ButtonProps<direction.Direction, Entry>, \"data\" | \"entryRenderKey\"> {}\n\nconst DATA: Entry[] = [\n {\n key: \"x\",\n icon: <Icon.Arrow.Right />,\n },\n {\n key: \"y\",\n icon: <Icon.Arrow.Down />,\n },\n];\n\nconst defaultSelectDirectionButton = ({\n key,\n entry,\n onClick,\n selected,\n}: ButtonOptionProps<direction.Crude, Entry>): ReactElement => {\n return (\n <CoreButton.Icon\n key={key}\n variant={selected ? \"filled\" : \"outlined\"}\n onClick={onClick}\n >\n {entry.icon}\n </CoreButton.Icon>\n );\n};\n\nexport const Direction = ({\n children = defaultSelectDirectionButton,\n ...props\n}: DirectionProps): ReactElement => {\n return (\n <Button {...props} data={DATA}>\n {children}\n </Button>\n );\n};\n","// Copyright 2023 Synnax Labs, Inc.\n//\n// Use of this software is governed by the Business Source License included in the file\n// licenses/BSL.txt.\n//\n// As of the Change Date specified in that file, in accordance with the Business Source\n// License, use of this software will be governed by the Apache License, Version 2.0,\n// included in the file licenses/APL.txt.\n\nimport { type ReactElement, type ReactNode } from \"react\";\n\nimport { Icon } from \"@synnaxlabs/media\";\nimport { Case } from \"@synnaxlabs/x\";\n\nimport { Align } from \"@/align\";\nimport { Button } from \"@/button\";\nimport { Select } from \"@/select\";\nimport { Text } from \"@/text\";\nimport { Triggers } from \"@/triggers\";\nimport { type Trigger } from \"@/triggers/triggers\";\nimport { MODES, type Mode, type UseTriggers } from \"@/viewport/use\";\n\ninterface Entry {\n key: Mode;\n icon: ReactElement;\n tooltip: ReactNode;\n}\n\ninterface TooltipProps {\n mode: Mode;\n triggers: Trigger[];\n}\n\nconst Tooltip = ({ mode, triggers }: TooltipProps): ReactElement => (\n <Align.Space direction=\"x\" align=\"center\">\n <Text.Text level=\"small\">{Case.capitalize(mode)}</Text.Text>\n <Triggers.Text trigger={triggers[0]} level=\"small\" />\n </Align.Space>\n);\n\nconst MODE_ICONS: Record<Mode, ReactElement> = {\n zoom: <Icon.Zoom />,\n pan: <Icon.Pan />,\n select: <Icon.Selection />,\n zoomReset: <Icon.Expand />,\n click: <Icon.Bolt />,\n};\n\nexport interface SelectModeProps extends Omit<Select.ButtonProps<Mode>, \"data\"> {\n triggers: UseTriggers;\n disable?: Mode[];\n}\n\nexport const SelectMode = ({\n triggers,\n disable = [\"zoomReset\", \"click\"],\n ...props\n}: SelectModeProps): ReactElement => {\n const data = Object.entries(triggers)\n .filter(([key]) => !disable.includes(key as Mode) && MODES.includes(key as Mode))\n .map(([key, value]) => ({\n key: key as Mode,\n icon: MODE_ICONS[key as Mode],\n tooltip: <Tooltip mode={key as Mode} triggers={value as Trigger[]} />,\n }))\n .sort((a, b) => MODES.indexOf(a.key) - MODES.indexOf(b.key));\n\n return (\n <Select.Button<Mode, Entry> {...props} data={data} entryRenderKey=\"icon\">\n {({ title: _, entry, ...props }) => (\n <Button.Icon\n {...props}\n key={entry.key}\n variant={props.selected ? \"filled\" : \"text\"}\n size=\"medium\"\n tooltip={entry.tooltip}\n tooltipLocation={{ x: \"right\", y: \"top\" }}\n >\n {entry.icon}\n </Button.Icon>\n )}\n </Select.Button>\n );\n};\n","// Copyright 2023 Synnax Labs, Inc.\n//\n// Use of this software is governed by the Business Source License included in the file\n// licenses/BSL.txt.\n//\n// As of the Change Date specified in that file, in accordance with the Business Source\n// License, use of this software will be governed by the Apache License, Version 2.0,\n// included in the file licenses/APL.txt.\n\nimport { type ReactElement, useCallback } from \"react\";\n\nimport { type channel } from \"@synnaxlabs/client\";\nimport {\n box,\n location as loc,\n type TimeRange,\n type TimeSpan,\n type location,\n} from \"@synnaxlabs/x\";\n\nimport { HAUL_TYPE } from \"@/channel/types\";\nimport { type Color } from \"@/color\";\nimport { CSS } from \"@/css\";\nimport { Haul } from \"@/haul\";\nimport { telem } from \"@/telem/aether\";\nimport { type Text } from \"@/text\";\nimport { type Viewport } from \"@/viewport\";\nimport { LinePlot as Core } from \"@/vis/lineplot\";\nimport { Tooltip } from \"@/vis/lineplot/tooltip\";\nimport { Measure } from \"@/vis/measure\";\nimport { Rule } from \"@/vis/rule\";\n\nimport \"@/channel/LinePlot.css\";\n\n/** Props for an axis in {@link LinePlot} */\nexport interface AxisProps extends Core.AxisProps {\n /** A unique identifier for the axis */\n key: string;\n}\n\nexport interface BaseLineProps {\n key: string;\n axes: {\n x: string;\n y: string;\n };\n channels: {\n y: number;\n x?: number;\n };\n color: Color.Crude;\n strokeWidth?: number;\n label?: string;\n downsample?: number;\n}\n\nexport interface StaticLineProps extends BaseLineProps {\n variant: \"static\";\n timeRange: TimeRange;\n}\n\nexport interface DynamicLineProps extends BaseLineProps {\n variant: \"dynamic\";\n timeSpan: TimeSpan;\n}\n\nexport type LineProps = StaticLineProps | DynamicLineProps;\n\nexport interface RuleProps {\n key: string;\n position: number;\n color: Color.Crude;\n axis: string;\n label: string;\n lineWidth?: number;\n lineDash?: number;\n units?: string;\n}\n\nexport interface LinePlotProps extends Core.LinePlotProps {\n // Axes\n axes: AxisProps[];\n onAxisChannelDrop?: (axis: string, channels: channel.Key[]) => void;\n onAxisChange?: (axis: Partial<AxisProps> & { key: string }) => void;\n // Lines\n lines: LineProps[];\n onLineChange?: (line: Partial<LineProps> & { key: string }) => void;\n // Rules\n rules?: RuleProps[];\n onRuleChange?: (rule: Partial<RuleProps> & { key: string }) => void;\n // Title\n title?: string;\n showTitle?: boolean;\n onTitleChange?: (value: string) => void;\n titleLevel?: Text.Level;\n // Legend\n showLegend?: boolean;\n enableTooltip?: boolean;\n enableMeasure?: boolean;\n initialViewport?: Viewport.UseProps[\"initial\"];\n onViewportChange?: Viewport.UseProps[\"onChange\"];\n viewportTriggers?: Viewport.UseProps[\"triggers\"];\n}\n\nconst canDrop = Haul.canDropOfType(HAUL_TYPE);\n\nexport const LinePlot = ({\n lines,\n axes,\n showTitle = true,\n title = \"\",\n onTitleChange,\n showLegend = true,\n titleLevel = \"h4\",\n onLineChange,\n onRuleChange,\n onAxisChannelDrop,\n onAxisChange,\n rules,\n enableTooltip = true,\n enableMeasure = false,\n initialViewport = box.DECIMAL,\n onViewportChange,\n viewportTriggers,\n ...restProps\n}: LinePlotProps): ReactElement => {\n const xAxes = axes.filter(({ location: l }) => loc.isY(l));\n return (\n <Core.LinePlot {...restProps}>\n {xAxes.map((a, i) => {\n const axisLines = lines.filter((l) => l.axes.x === a.key);\n const yAxes = axes.filter(({ location: l }) => loc.isX(l));\n const axisRules = rules?.filter((r) =>\n [...yAxes.map(({ key: id }) => id), a.key].includes(r.axis),\n );\n return (\n <XAxis\n key={a.key}\n axis={a}\n index={i}\n lines={axisLines}\n yAxes={yAxes}\n rules={axisRules}\n onAxisChannelDrop={onAxisChannelDrop}\n onAxisChange={onAxisChange}\n />\n );\n })}\n {showLegend && <Core.Legend onLineChange={onLineChange} />}\n {showTitle && (\n <Core.Title value={title} onChange={onTitleChange} level={titleLevel} />\n )}\n <Core.Viewport\n initial={initialViewport}\n onChange={onViewportChange}\n triggers={viewportTriggers}\n >\n {enableTooltip && <Tooltip.Tooltip />}\n {enableMeasure && <Measure.Measure />}\n </Core.Viewport>\n </Core.LinePlot>\n );\n};\n\ninterface XAxisProps\n extends Pick<\n LinePlotProps,\n \"onRuleChange\" | \"lines\" | \"rules\" | \"onAxisChannelDrop\" | \"onAxisChange\"\n > {\n axis: AxisProps;\n yAxes: AxisProps[];\n index: number;\n}\n\nconst XAxis = ({\n yAxes,\n lines,\n index,\n rules,\n onRuleChange,\n onAxisChannelDrop,\n onAxisChange,\n axis: { location, key, showGrid, ...axis },\n}: XAxisProps): ReactElement => {\n const dropProps = Haul.useDrop({\n type: \"Channel.LinePlot.XAxis\",\n canDrop,\n onDrop: useCallback(\n ({ items }) => {\n const dropped = Haul.filterByType(HAUL_TYPE, items);\n onAxisChannelDrop?.(\n key,\n dropped.map(({ key }) => key as channel.Key),\n );\n return dropped;\n },\n [key, onAxisChannelDrop],\n ),\n });\n\n const xRules = rules?.filter((r) => r.axis === key);\n return (\n <Core.XAxis\n {...axis}\n {...dropProps}\n location={location as location.Y}\n showGrid={showGrid ?? index === 0}\n className={CSS(\n CSS.dropRegion(Haul.canDropOfType(HAUL_TYPE)(Haul.useDraggingState())),\n )}\n onAutoBoundsChange={(bounds) => onAxisChange?.({ key, bounds })}\n >\n {yAxes.map((a, i) => {\n const yLines = lines.filter((l) => l.axes.y === a.key);\n const yRules = rules?.filter((r) => r.axis === a.key);\n return (\n <YAxis\n key={a.key}\n axis={{\n ...a,\n showGrid: showGrid ?? (index === 0 && i === 0),\n }}\n lines={yLines}\n rules={yRules}\n onRuleChange={onRuleChange}\n onAxisChannelDrop={onAxisChannelDrop}\n onAxisChange={onAxisChange}\n />\n );\n })}\n {xRules?.map((rule) => (\n <Rule.Rule\n aetherKey={rule.key}\n {...rule}\n key={rule.key}\n onLabelChange={(value) => onRuleChange?.({ key: rule.key, label: value })}\n onPositionChange={(value) =>\n onRuleChange?.({ key: rule.key, position: value })\n }\n />\n ))}\n </Core.XAxis>\n );\n};\n\ninterface YAxisProps\n extends Pick<\n LinePlotProps,\n \"onRuleChange\" | \"lines\" | \"rules\" | \"onAxisChannelDrop\" | \"onAxisChange\"\n > {\n axis: AxisProps;\n}\n\nconst lineKey = ({ channels: { x, y } }: LineProps): string => `${x ?? 0}-${y}`;\n\nconst YAxis = ({\n lines,\n rules,\n onRuleChange,\n onAxisChannelDrop,\n onAxisChange,\n axis: { key, location: loc, ...props },\n}: YAxisProps): ReactElement => {\n const dropProps = Haul.useDrop({\n type: \"Channel.LinePlot.YAxis\",\n canDrop,\n onDrop: useCallback(\n ({ items }) => {\n const dropped = Haul.filterByType(HAUL_TYPE, items);\n onAxisChannelDrop?.(\n key,\n dropped.map(({ key }) => key as channel.Key),\n );\n return dropped;\n },\n [key, onAxisChannelDrop],\n ),\n });\n\n const dragging = Haul.useDraggingState();\n\n return (\n <Core.YAxis\n {...props}\n {...dropProps}\n location={loc as loc.X}\n className={CSS(CSS.dropRegion(Haul.canDropOfType(HAUL_TYPE)(dragging)))}\n onAutoBoundsChange={(bounds) => onAxisChange?.({ key, bounds })}\n >\n {lines.map((l) => (\n <Line key={lineKey(l)} line={l} />\n ))}\n {rules?.map((r) => (\n <Rule.Rule\n aetherKey={r.key}\n {...r}\n key={r.key}\n onLabelChange={(value) => onRuleChange?.({ key: r.key, label: value })}\n onPositionChange={(value) => onRuleChange?.({ key: r.key, position: value })}\n />\n ))}\n </Core.YAxis>\n );\n};\n\nconst Line = ({ line }: { line: LineProps }): ReactElement =>\n line.variant === \"static\" ? <StaticLine line={line} /> : <DynamicLine line={line} />;\n\nconst DynamicLine = ({\n line: {\n key,\n timeSpan,\n channels: { x, y },\n ...props\n },\n}: {\n line: DynamicLineProps;\n}): ReactElement => {\n const yTelem = telem.streamChannelData({ timeSpan, channel: y });\n const hasX = x != null && x !== 0;\n const xTelem = telem.streamChannelData({\n timeSpan,\n channel: hasX ? x : y,\n index: !hasX,\n });\n return <Core.Line aetherKey={key} y={yTelem} x={xTelem} {...props} />;\n};\n\nconst StaticLine = ({\n line: {\n timeRange,\n key,\n channels: { x, y },\n ...props\n },\n}: {\n line: StaticLineProps;\n}): ReactElement => {\n const yTelem = telem.channelData({ timeRange, channel: y });\n const hasX = x != null && x !== 0;\n const xTelem = telem.channelData({\n timeRange,\n channel: hasX ? x : y,\n index: !hasX,\n });\n return <Core.Line aetherKey={key} y={yTelem} x={xTelem} {...props} />;\n};\n","// Copyright 2023 Synnax Labs, Inc.\n//\n// Use of this software is governed by the Business Source License included in the file\n// licenses/BSL.txt.\n//\n// As of the Change Date specified in that file, in accordance with the Business Source\n// License, use of this software will be governed by the Apache License, Version 2.0,\n// included in the file licenses/APL.txt.\n\n\n\nimport { type Node } from \"@/mosaic/types\";\nimport { Tabs } from \"@/tabs\";\nimport { deep, direction, location, spatial } from \"@synnaxlabs/x\";\n\nconst TabNotFound = new Error(\"Tab not found\");\nconst InvalidMosaic = new Error(\"Invalid Mosaic\");\n\n/**\n * Inserts a tab into a node in the mosaic. If the given key is not found,\n * the tab is inserted into the closest ancestor. This is to deal\n * with mosaic garbage collection.\n *\n * @param key - The key of the node to insert the tab into.\n * @param tab - The tab to insert.\n * @param loc - The location where the tab was 'dropped' relative to the node.\n */\nexport const insertTab = (\n root: Node,\n tab: Tabs.Tab,\n loc: location.Location = \"center\",\n key?: number,\n): Node => {\n root = shallowCopyNode(root);\n if (key === undefined) return insertAnywhere(root, tab);\n\n const node = findNodeOrAncestor(root, key);\n\n // In the case where we're dropping the node in the center,\n // simply add the tab, change the selection, and return.\n if (loc === \"center\") {\n node.tabs?.push(tab);\n node.selected = tab.tabKey;\n return root;\n }\n\n // If we're not dropping the tab in the center,\n // and we have no tabs in the current node,\n // we can't split the node (because on side would be empty),\n // so we do nothing.\n if (node.tabs == null || node.tabs.length === 0) return root;\n\n const [insertOrder, siblingOrder, dir] = splitArrangement(loc);\n node.direction = dir;\n\n node[insertOrder] = { key: 0, tabs: [tab], selected: tab.tabKey };\n node[siblingOrder] = { key: 0, tabs: node.tabs, selected: node.selected };\n\n if (node.first == null || node.last == null) throw InvalidMosaic;\n\n // Assigning these keeps the mosaic sorted so we can do ancestor searches.\n node.first.key = node.key * 2;\n node.last.key = node.key * 2 + 1;\n\n // Clear the previous node, as it's now been and is not used\n // for rendering.\n node.tabs = undefined;\n node.size = undefined;\n node.selected = undefined;\n\n return root;\n};\n\nconst insertAnywhere = (root: Node, tab: Tabs.Tab): Node => {\n root = shallowCopyNode(root);\n if (root.tabs != null) {\n root.tabs.push(tab);\n root.selected = tab.tabKey;\n return root;\n }\n if (root.first != null) root.first = insertAnywhere(root.first, tab);\n else if (root.last != null) root.last = insertAnywhere(root.last, tab);\n return root;\n};\n\n/**\n * Automatically selects tabs for all nodes in the mosaic if they don't already have\n * a selection.\n *\n * @param root - The root of the mosaic.\n * @returns A shallow copy of the root with all nodes having a selection.\n */\nexport const autoSelectTabs = (root: Node): [Node, string[]] => {\n root = shallowCopyNode(root);\n const selected: string[] = [];\n if (root.tabs != null) {\n root.selected = Tabs.resetSelection(root.selected, root.tabs);\n if (root.selected != null) selected.push(root.selected);\n }\n if (root.first != null) {\n const [f, s] = autoSelectTabs(root.first);\n root.first = f;\n selected.push(...s);\n }\n if (root.last != null) {\n const [r, l] = autoSelectTabs(root.last);\n root.last = r;\n selected.push(...l);\n }\n return [root, selected];\n};\n\n/**\n * Removes a tab from the mosaic and performs any necessary garbage collection.\n *\n * @param root - The root of the mosaic.\n * @param tabKey - The key of the tab to remove. This tab must exist in the mosaic.\n */\nexport const removeTab = (root: Node, tabKey: string): [Node, string | null] => {\n root = shallowCopyNode(root);\n const [, node] = findMosaicTab(root, tabKey);\n if (node == null) throw TabNotFound;\n node.tabs = node.tabs?.filter((t) => t.tabKey !== tabKey);\n node.selected = Tabs.resetSelection(node.selected, node.tabs);\n const gced = gc(root);\n const selected = node.selected ?? findSelected(gced);\n return [gced, selected];\n};\n\nexport const findSelected = (root: Node): string | null => {\n if (root.selected != null) return root.selected;\n if (root.first != null) return findSelected(root.first);\n if (root.last != null) return findSelected(root.last);\n return null;\n};\n\n/**\n * Marks the given tab as selected.\n *\n * @param root - The root of the mosaic.\n * @param tabKey - The key of the tab to select. This tab must exist in the mosaic.\n * @returns A shallow copy of the root of the mosaic with the tab selected.\n */\nexport const selectTab = (root: Node, tabKey: string): Node => {\n root = shallowCopyNode(root);\n const [tab, entry] = findMosaicTab(root, tabKey);\n if (tab == null || entry == null) throw TabNotFound;\n entry.selected = tabKey;\n return root;\n};\n\n/**\n * Moves a tab from one node to another.\n *\n * @param root - The root of the mosaic.\n * @param to - The key of the node to move the tab to.\n * @param tabKey - The key of the tab to move. This tab must exist in the mosaic.\n * @param loc - The location where the tab was 'dropped' relative to the node.\n * @returns A shallow copy of the root of the mosaic with the tab moved.\n */\nexport const moveTab = (\n root: Node,\n tabKey: string,\n loc: location.Location,\n to: number,\n): [Node, string | null] => {\n root = shallowCopyNode(root);\n const [tab, entry] = findMosaicTab(root, tabKey);\n if (tab == null || entry == null) throw TabNotFound;\n const [r2, selected] = removeTab(root, tabKey);\n const r3 = insertTab(r2, tab, loc, to);\n return [r3, selected];\n};\n\n/**\n * Resizes the given mosaic leaf.\n *\n * @param root - The root of the mosaic.\n * @param key - The key of the leaf to resize.\n * @param size - The new size distribution for the leaf. Expressed as either a percentage\n * or a number of pixels of the first child.\n * @returns A shallow copy of the root of the mosaic with the leaf resized.\n */\nexport const resizeNode = (root: Node, key: number, size: number): Node => {\n const node = findMosaicNode(root, key);\n if (node == null) throw new Error(\"Node not found\");\n else node.size = size;\n return root;\n};\n\n/**\n * Sets the title of a tab.\n *\n * @param root - The root of the mosaic.\n * @param tabKey - The key of the tab to resize.\n * @param name - The new title of the tab.\n * @returns A shallow copy of the root of the mosaic with the tab title changed.\n */\nexport const renameTab = (root: Node, tabKey: string, name: string): Node => {\n root = shallowCopyNode(root);\n const [, leaf] = findMosaicTab(root, tabKey);\n if (leaf?.tabs == null) throw TabNotFound;\n leaf.tabs = Tabs.rename(tabKey, name, leaf?.tabs ?? []);\n return root;\n};\n\n/***\n * @returns True if the given mosaic node is empty, false otherwise.\n */\nexport const isEmpty = (root: Node): boolean => {\n if (root.tabs != null) return root.tabs.length === 0;\n return root.first == null && root.last == null;\n};\n\n/** Finds the node with the given key or its closest ancestor. */\nconst findNodeOrAncestor = (root: Node, key: number): Node => {\n const node = findMosaicNode(root, key);\n if (node != null) return node;\n const next = Math.floor(key / 2);\n return next === 0 ? root : findNodeOrAncestor(root, next);\n};\n\nconst gc = (root: Node): Node => {\n let gced = true;\n while (gced) [root, gced] = _gc(root);\n return root;\n};\n\nconst _gc = (node: Node): [Node, boolean] => {\n if (node.first == null || node.last == null) return [node, false];\n if (shouldGc(node.first)) return [liftUp(node.last, true), true];\n if (shouldGc(node.last)) return [liftUp(node.first, false), true];\n let [sGC, eGC] = [false, false];\n [node.first, sGC] = _gc(node.first);\n [node.last, eGC] = _gc(node.last);\n return [node, sGC || eGC];\n};\n\nconst liftUp = (node: Node, isLast: boolean): Node => {\n node.size = undefined;\n node.key = (node.key - Number(isLast)) / 2;\n return node;\n};\n\nconst shouldGc = (node: Node): boolean =>\n node.first == null &&\n node.last == null &&\n (node.tabs == null || node.tabs.length === 0);\n\nconst findMosaicTab = (\n node: Node,\n tabKey: string,\n): [Tabs.Tab | undefined, Node | undefined] => {\n if (node.tabs != null) {\n const tab = node.tabs.find((t) => t.tabKey === tabKey);\n if (tab != null) return [tab, node];\n }\n if (node.first == null || node.last == null) return [undefined, undefined];\n const [t1Tab, t2Tree] = findMosaicTab(node.first, tabKey);\n if (t1Tab != null && t2Tree != null) return [t1Tab, t2Tree];\n const [t2Tab, t2Tree2] = findMosaicTab(node.last, tabKey);\n return [t2Tab, t2Tree2];\n};\n\nconst findMosaicNode = (node: Node, key: number): Node | undefined => {\n if (node.key === key) return node;\n if (node.first == null || node.last == null) return undefined;\n const n1 = findMosaicNode(node.first, key);\n if (n1 != null) return n1;\n return findMosaicNode(node.last, key);\n};\n\nconst splitArrangement = (\n insertPosition: location.Location,\n): [spatial.Order, spatial.Order, direction.Direction] => {\n switch (insertPosition) {\n case \"top\":\n return [\"first\", \"last\", \"y\"];\n case \"left\":\n return [\"first\", \"last\", \"x\"];\n case \"bottom\":\n return [\"last\", \"first\", \"y\"];\n case \"right\":\n return [\"last\", \"first\", \"x\"];\n case \"center\":\n throw new Error(\"cannot split a center placed tab\");\n }\n};\n\nconst shallowCopyNode = (node: Node): Node => deep.copy(node);\n","// Copyright 2023 Synnax Labs, Inc.\n//\n// Use of this software is governed by the Business Source License included in the file\n// licenses/BSL.txt.\n//\n// As of the Change Date specified in that file, in accordance with the Business Source\n// License, use of this software will be governed by the Apache License, Version 2.0,\n// included in the file licenses/APL.txt.\n\nimport { useEffect, useState } from \"react\";\n\nimport { type location } from \"@synnaxlabs/x\";\n\nimport {\n moveTab,\n removeTab,\n resizeNode,\n selectTab,\n renameTab,\n autoSelectTabs,\n} from \"@/mosaic/tree\";\nimport { type Node } from \"@/mosaic/types\";\n\nexport interface UseProps {\n allowRename?: boolean;\n initialTree: Node;\n}\n\nexport interface UseReturn {\n root: Node;\n onDrop: (key: number, tabKey: string, loc: location.Location) => void;\n onClose: (tabKey: string) => void;\n onSelect: (tabKey: string) => void;\n onResize: (key: number, sizes: number) => void;\n onRename?: (tabKey: string, name: string) => void;\n}\n\n/**\n * The Mosaic.use hook implements the state management and logic for the Mosaic\n * component. This hook should be used in conjunction with the Mosaic component.\n *\n * @param props - The props for the Mosaic.use hook.\n * @param props.initialValue - The initial root node of the mosaic tree. For\n * information on what this node should look like, see the {@link Node}\n * type.\n */\nexport const use = ({ allowRename = false, initialTree }: UseProps): UseReturn => {\n const [root, setRoot] = useState(initialTree);\n\n useEffect(() => setRoot(autoSelectTabs(initialTree)[0]), [initialTree]);\n\n const handleDrop = (key: number, tabKey: string, loc: location.Location): void =>\n setRoot((r) => moveTab(r, tabKey, loc, key)[0]);\n\n const handleClose = (tabKey: string): void => setRoot((r) => removeTab(r, tabKey)[0]);\n\n const handleSelect = (tabKey: string): void => setRoot((r) => selectTab(r, tabKey));\n\n const handleResize = (key: number, size: number): void =>\n setRoot((r) => resizeNode(r, key, size));\n\n const handleRename = (tabKey: string, title: string): void =>\n setRoot((r) => renameTab(r, tabKey, title));\n\n return {\n root,\n onDrop: handleDrop,\n onClose: handleClose,\n onSelect: handleSelect,\n onResize: handleResize,\n onRename: allowRename ? handleRename : undefined,\n };\n};\n","// Copyright 2023 Synnax Labs, Inc.\n//\n// Use of this software is governed by the Business Source License included in the file\n// licenses/BSL.txt.\n//\n// As of the Change Date specified in that file, in accordance with the Business Source\n// License, use of this software will be governed by the Apache License, Version 2.0,\n// included in the file licenses/APL.txt.\n\nimport { type ReactElement } from \"react\";\n\nimport { Align } from \"@/align\";\nimport { type Button } from \"@/button\";\nimport { CSS } from \"@/css\";\nimport { type InternalControlsProps } from \"@/os/Controls/types\";\nimport { type ComponentSize } from \"@/util/component\";\n\nimport \"@/os/Controls/Mac.css\";\n\nexport const Icon = {\n Close: (\n <svg\n width=\"124\"\n height=\"124\"\n viewBox=\"0 0 124 124\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <rect\n x=\"26.8701\"\n y=\"88.3883\"\n width=\"87\"\n height=\"11\"\n transform=\"rotate(-45 26.8701 88.3883)\"\n fill=\"#7E0508\"\n />\n <rect\n x=\"26.8701\"\n y=\"34.6482\"\n width=\"11\"\n height=\"87\"\n transform=\"rotate(-45 26.8701 34.6482)\"\n fill=\"#7E0508\"\n />\n </svg>\n ),\n Minimize: (\n <svg\n width=\"87\"\n height=\"11\"\n viewBox=\"0 0 87 11\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <rect x=\"15\" width=\"60\" height=\"11\" fill=\"#985712\" />\n </svg>\n ),\n Maximize: (\n <svg\n width=\"143\"\n height=\"143\"\n viewBox=\"0 0 143 143\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M108.242 32.8833C108.797 32.8817 109.247 33.3317 109.245 33.8862L109.092 87.5891C109.09 88.4786 108.014 88.9223 107.385 88.2933L53.8351 34.7432C53.2061 34.1142 53.6499 33.0387 54.5394 33.0361L108.242 32.8833Z\"\n fill=\"#0B650D\"\n />\n <path\n d=\"M33.8862 109.245C33.3317 109.247 32.8818 108.797 32.8833 108.242L33.0361 54.5394C33.0387 53.6499 34.1142 53.2061 34.7432 53.8351L88.2934 107.385C88.9223 108.014 88.4786 109.09 87.5891 109.092L33.8862 109.245Z\"\n fill=\"#0B650D\"\n />\n </svg>\n ),\n};\n\nexport const MacOS = ({\n disabled = [],\n className,\n focused = true,\n onMinimize,\n onMaximize,\n onFullscreen,\n onClose,\n ...props\n}: InternalControlsProps): ReactElement => (\n <Align.Space\n size={1.5}\n direction=\"x\"\n className={CSS(\n CSS.B(\"macos-controls\"),\n !focused && CSS.BM(\"macos-controls\", \"blurred\"),\n className,\n )}\n {...props}\n >\n <TrafficLight\n onClick={onClose}\n className={CSS.BM(\"macos-control\", \"close\")}\n disabled={disabled.includes(\"close\")}\n >\n {Icon.Close}\n </TrafficLight>\n <TrafficLight\n onClick={onMinimize}\n className={CSS.BM(\"macos-control\", \"minimize\")}\n disabled={disabled.includes(\"minimize\")}\n >\n {Icon.Minimize}\n </TrafficLight>\n <TrafficLight\n onClick={onFullscreen}\n className={CSS.BM(\"macos-control\", \"maximize\")}\n disabled={disabled.includes(\"maximize\")}\n >\n {Icon.Maximize}\n </TrafficLight>\n </Align.Space>\n);\n\ninterface TrafficLightProps extends Button.IconProps {}\n\nconst TrafficLight = ({ className, ...props }: TrafficLightProps): ReactElement => (\n <button\n className={CSS(CSS.B(\"macos-control\"), className)}\n tabIndex={-1}\n size={\"\" as ComponentSize}\n {...props}\n />\n);\n","// Copyright 2023 Synnax Labs, Inc.\n//\n// Use of this software is governed by the Business Source License included in the file\n// licenses/BSL.txt.\n//\n// As of the Change Date specified in that file, in accordance with the Business Source\n// License, use of this software will be governed by the Apache License, Version 2.0,\n// included in the file licenses/APL.txt.\n\nimport { type ReactElement } from \"react\";\n\nimport { Icon } from \"@synnaxlabs/media\";\n\nimport { Align } from \"@/align\";\nimport { Button as CoreButton } from \"@/button\";\nimport { CSS } from \"@/css\";\nimport { type InternalControlsProps } from \"@/os/Controls/types\";\n\nimport \"@/os/Controls/Windows.css\";\n\nexport const Windows = ({\n disabled = [],\n onMinimize,\n onMaximize,\n onClose,\n // no-op on windows\n onFullscreen: _,\n ...props\n}: InternalControlsProps): ReactElement => (\n <Align.Pack {...props}>\n <Button \n className={CSS.BM(\"windows-control\", \"minimize\")}\n onClick={onMinimize} \n disabled={disabled.includes(\"minimize\")}\n >\n <Icon.Subtract />\n </Button>\n <Button \n className={CSS.BM(\"windows-control\", \"maximize\")}\n onClick={onMaximize} disabled={disabled.includes(\"maximize\")}\n >\n <Icon.Box />\n </Button>\n <Button\n onClick={onClose}\n className={CSS.BM(\"windows-control\", \"close\")}\n disabled={disabled.includes(\"close\")}\n >\n <Icon.Close />\n </Button>\n </Align.Pack>\n);\n\nconst Button = ({\n disabled = false,\n className,\n ...props\n}: CoreButton.IconProps): ReactElement | null =>\n !disabled ? (\n <CoreButton.Icon\n className={CSS(CSS.B(\"windows-control\"), className)}\n tabIndex={-1}\n {...props}\n />\n ) : null;\n","// Copyright 2023 Synnax Labs, Inc.\n//\n// Use of this software is governed by the Business Source License included in the file\n// licenses/BSL.txt.\n//\n// As of the Change Date specified in that file, in accordance with the Business Source\n// License, use of this software will be governed by the Apache License, Version 2.0,\n// included in the file licenses/APL.txt.\n\nimport { runtime } from \"@synnaxlabs/x\";\n\nexport const use = (props?: runtime.GetOSProps): runtime.OS | undefined =>\n runtime.getOS(props);\n","// Copyright 2023 Synnax Labs, Inc.\n//\n// Use of this software is governed by the Business Source License included in the file\n// licenses/BSL.txt.\n//\n// As of the Change Date specified in that file, in accordance with the Business Source\n// License, use of this software will be governed by the Apache License, Version 2.0,\n// included in the file licenses/APL.txt.\n\nimport { type ReactElement } from \"react\";\n\nimport { type runtime } from \"@synnaxlabs/x\";\n\nimport { MacOS } from \"@/os/Controls/Mac\";\nimport { type InternalControlsProps } from \"@/os/Controls/types\";\nimport { Windows } from \"@/os/Controls/Windows\";\nimport { use } from \"@/os/use\";\n\nconst Variants: Record<runtime.OS, React.FC<InternalControlsProps>> = {\n MacOS,\n Windows,\n Linux: Windows,\n Docker: Windows,\n};\n\nconst DEFAULT_OS = \"Windows\";\n\nexport interface ControlsProps extends InternalControlsProps {\n visibleIfOS?: runtime.OS;\n}\n\nexport const Controls = ({\n forceOS,\n visibleIfOS,\n ...props\n}: ControlsProps): ReactElement | null => {\n const os = use({ force: forceOS, default: DEFAULT_OS }) as runtime.OS;\n const C = Variants[os];\n if (visibleIfOS != null && visibleIfOS !== os) return null;\n return <C {...props} />;\n};\n","// Copyright 2023 Synnax Labs, Inc.\n//\n// Use of this software is governed by the Business Source License included in the file\n// licenses/BSL.txt.\n//\n// As of the Change Date specified in that file, in accordance with the Business Source\n// License, use of this software will be governed by the Apache License, Version 2.0,\n// included in the file licenses/APL.txt.\n\nimport { box, xy, type direction, location } from \"@synnaxlabs/x\";\n\nimport { type NodeLayout } from \"@/vis/diagram/util\";\n\nexport const alignNodes = (\n layouts: NodeLayout[],\n dir: direction.Direction = \"x\",\n): NodeLayout[] => {\n if (layouts.length === 0) return [];\n const loc = location.construct(dir);\n const oppositeLoc = location.swap(loc);\n // sort the layouts in order of their x position, lowest to highest\n layouts.sort((a, b) => box.loc(a.box, loc) - box.loc(b.box, loc));\n // grab the first node\n layouts.forEach((layout, i) => {\n if (i === 0) return;\n const prev = layouts[i - 1];\n const prevRightHandle = prev.handles.find((h) => h.orientation === oppositeLoc);\n const leftHandle = layout.handles.find((h) => h.orientation === loc);\n if (prevRightHandle == null || leftHandle == null) return;\n // We want to align the left handle of the current node with the right handle of the previous node\n const prevHandleAbsPos = prevRightHandle.absolutePosition;\n const leftHandleAbsPos = leftHandle.absolutePosition;\n const dist = xy.set(xy.translation(leftHandleAbsPos, prevHandleAbsPos), dir, 0);\n const newPos = xy.translate(box.topLeft(layout.box), dist);\n layout.box = box.construct(newPos, box.dims(layout.box));\n });\n return layouts;\n};\n","// Copyright 2023 Synnax Labs, Inc.\n//\n// Use of this software is governed by the Business Source License included in the file\n// licenses/BSL.txt.\n//\n// As of the Change Date specified in that file, in accordance with the Business Source\n// License, use of this software will be governed by the Apache License, Version 2.0,\n// included in the file licenses/APL.txt.\n\nimport { type z } from \"zod\";\n\nimport { Aether } from \"@/aether\";\nimport { table } from \"@/vis/table/aether\";\n\nexport interface UseProps extends z.input<typeof table.tableStateZ> {\n aetherKey: string;\n}\n\nexport interface SourceProps extends z.input<typeof table.tableSourceZ> {}\n\nexport const use = ({\n aetherKey,\n ...props\n}: UseProps): Aether.UseReturn<typeof table.tableStateZ> =>\n Aether.use({\n aetherKey,\n type: table.Table.TYPE,\n schema: table.tableStateZ,\n initialState: props,\n });\n","export default \"data:video/mp2t;base64,Ly8gQ29weXJpZ2h0IDIwMjMgU3lubmF4IExhYnMsIEluYy4KLy8KLy8gVXNlIG9mIHRoaXMgc29mdHdhcmUgaXMgZ292ZXJuZWQgYnkgdGhlIEJ1c2luZXNzIFNvdXJjZSBMaWNlbnNlIGluY2x1ZGVkIGluIHRoZSBmaWxlCi8vIGxpY2Vuc2VzL0JTTC50eHQuCi8vCi8vIEFzIG9mIHRoZSBDaGFuZ2UgRGF0ZSBzcGVjaWZpZWQgaW4gdGhhdCBmaWxlLCBpbiBhY2NvcmRhbmNlIHdpdGggdGhlIEJ1c2luZXNzIFNvdXJjZQovLyBMaWNlbnNlLCB1c2Ugb2YgdGhpcyBzb2Z0d2FyZSB3aWxsIGJlIGdvdmVybmVkIGJ5IHRoZSBBcGFjaGUgTGljZW5zZSwgVmVyc2lvbiAyLjAsCi8vIGluY2x1ZGVkIGluIHRoZSBmaWxlIGxpY2Vuc2VzL0FQTC50eHQuCgppbXBvcnQgeyBwbHV0byB9IGZyb20gIkAvcGx1dG8vYWV0aGVyIjsKCnBsdXRvLnJlbmRlcigpOwo=\"","// Copyright 2023 Synnax Labs, Inc.\n//\n// Use of this software is governed by the Business Source License included in the file\n// licenses/BSL.txt.\n//\n// As of the Change Date specified in that file, in accordance with the Business Source\n// License, use of this software will be governed by the Apache License, Version 2.0,\n// included in the file licenses/APL.txt.\n\nimport { type PropsWithChildren, type ReactElement } from \"react\";\n\nimport { Aether } from \"@/aether\";\nimport { Alamos } from \"@/alamos\";\nimport { Channel } from \"@/channel\";\nimport { Haul } from \"@/haul\";\nimport DefaultWorkerURL from \"@/pluto/defaultWorker.ts?url\";\nimport { Status } from \"@/status\";\nimport { Synnax } from \"@/synnax\";\nimport { Telem } from \"@/telem\";\nimport { Control } from \"@/telem/control\";\nimport { Theming } from \"@/theming\";\nimport { Tooltip } from \"@/tooltip\";\nimport { Triggers } from \"@/triggers\";\nimport { Worker } from \"@/worker\";\n\n// // @ts-expect-error - unable to resolve valid vite import\n// // eslint-disable-next-line import/no-unresolved\n\nimport \"@synnaxlabs/media/dist/style.css\";\n\nexport interface ProviderProps\n extends PropsWithChildren,\n Partial<Theming.ProviderProps>,\n Synnax.ProviderProps {\n workerEnabled?: boolean;\n workerURL?: URL;\n alamos?: Alamos.ProviderProps;\n tooltip?: Tooltip.ConfigProps;\n triggers?: Triggers.ProviderProps;\n haul?: Haul.ProviderProps;\n channelAlias?: Channel.AliasProviderProps;\n}\n\nexport const Provider = ({\n children,\n connParams,\n workerEnabled = true,\n workerURL,\n theme,\n toggleTheme,\n setTheme,\n tooltip,\n triggers,\n alamos,\n haul,\n channelAlias,\n}: ProviderProps): ReactElement => {\n return (\n <Triggers.Provider {...triggers}>\n <Tooltip.Config {...tooltip}>\n <Haul.Provider {...haul}>\n <Worker.Provider url={workerURL ?? DefaultWorkerURL} enabled={workerEnabled}>\n <Aether.Provider workerKey=\"vis\">\n <Alamos.Provider {...alamos}>\n <Status.Aggregator>\n <Synnax.Provider connParams={connParams}>\n <Channel.AliasProvider {...channelAlias}>\n <Telem.Provider>\n <Theming.Provider\n theme={theme}\n toggleTheme={toggleTheme}\n setTheme={setTheme}\n >\n <Control.StateProvider>{children}</Control.StateProvider>\n </Theming.Provider>\n </Telem.Provider>\n </Channel.AliasProvider>\n </Synnax.Provider>\n </Status.Aggregator>\n </Alamos.Provider>\n </Aether.Provider>\n </Worker.Provider>\n </Haul.Provider>\n </Tooltip.Config>\n </Triggers.Provider>\n );\n};\n","// Copyright 2023 Synnax Labs, Inc.\n//\n// Use of this software is governed by the Business Source License included in the file\n// licenses/BSL.txt.\n//\n// As of the Change Date specified in that file, in accordance with the Business Source\n// License, use of this software will be governed by the Apache License, Version 2.0,\n// included in the file licenses/APL.txt.\n\nimport { type ReactElement } from \"react\";\n\nimport { Icon } from \"@synnaxlabs/media\";\nimport { type CrudeTimeRange, TimeStamp, TimeSpan } from \"@synnaxlabs/x\";\n\nimport { Align } from \"@/align\";\nimport { CSS } from \"@/css\";\nimport { Text } from \"@/text\";\n\nimport \"@/ranger/TimeRangeChip.css\";\n\nexport interface TimeRangeChipProps {\n timeRange: CrudeTimeRange;\n}\n\nexport const TimeRangeChip = ({ timeRange }: TimeRangeChipProps): ReactElement => {\n const startTS = new TimeStamp(timeRange.start);\n const startFormat = startTS.isToday ? \"time\" : \"dateTime\";\n const endTS = new TimeStamp(timeRange.end);\n const isOpen = endTS.equals(TimeStamp.MAX);\n const endFormat = endTS.span(startTS) < TimeSpan.DAY ? \"time\" : \"dateTime\";\n\n return (\n <Align.Space\n direction=\"x\"\n size=\"small\"\n className={CSS(CSS.B(\"time-range-chip\"))}\n align=\"center\"\n >\n {startTS.isToday && <Text.Text level=\"small\">Today</Text.Text>}\n <Text.DateTime level=\"small\" displayTZ=\"local\" format={startFormat}>\n {startTS}\n </Text.DateTime>\n <Icon.Arrow.Right color=\"var(--pluto-text-color)\" />\n {isOpen ? (\n <Text.Text level=\"small\">Now</Text.Text>\n ) : (\n <Text.DateTime level=\"small\" displayTZ=\"local\" format={endFormat}>\n {endTS}\n </Text.DateTime>\n )}\n </Align.Space>\n );\n};\n","// Copyright 2023 Synnax Labs, Inc.\n//\n// Use of this software is governed by the Business Source License included in the file\n// licenses/BSL.txt.\n//\n// As of the Change Date specified in that file, in accordance with the Business Source\n// License, use of this software will be governed by the Apache License, Version 2.0,\n// included in the file licenses/APL.txt.\n\nimport { type ReactElement } from \"react\";\n\nimport { type label } from \"@synnaxlabs/client\";\nimport { Icon } from \"@synnaxlabs/media\";\n\nimport { type List } from \"@/list\";\nimport { Select } from \"@/select\";\nimport { Synnax } from \"@/synnax\";\nimport { Tag } from \"@/tag\";\n\nconst labelColumns: Array<List.ColumnSpec<label.Key, label.Label>> = [\n {\n key: \"color\",\n name: \"Color\",\n width: 50,\n render: (v) => (\n <Icon.Circle\n style={{ fontSize: 10, marginLeft: 10, marginRight: 30 }}\n color={v.entry.color}\n />\n ),\n },\n {\n key: \"name\",\n name: \"Name\",\n },\n];\n\nexport interface SelectLabelsProps\n extends Omit<Select.MultipleProps<label.Key, label.Label>, \"columns\" | \"searcher\"> {}\n\nexport const SelectLabels = (props: SelectLabelsProps): ReactElement => {\n const client = Synnax.use();\n return (\n <Select.Multiple\n {...props}\n searcher={client?.labels}\n columns={labelColumns}\n renderTag={(v) => <Tag.Tag color={v.entry.color}>{v.entry.name}</Tag.Tag>}\n />\n );\n};\n"],"names":["Circle","variant","Icon","variantColors","DIRECTION","MIN_SIZE","COLLAPSED_THRESHOLD","EXPAND_THRESHOLD","DEFAULT_EXPAND_SIZE","Accordion","data","props","setSize","sizes","ref","resizeProps","Resize.useMultiple","onExpand","index","parentSize","box","jsx","Resize.Multiple","CSS","entry","i","createElement","EntryC","expandedIcon","collapsedIcon","name","content","actions","size","parent","expanded","icon","jsxs","Fragment","Header.Header","Header.ButtonTitle","Header.Actions","Legend","className","style","onLineChange","lines","useContext","Core.Simple","Title","level","key","useUniqueKey","font","Theming.useTypography","gridStyle","useGridPosition","Align.Space","Text.MaybeEditable","DATA","defaultSelectDirectionButton","onClick","selected","CoreButton.Icon","Direction","children","Button","Tooltip","mode","triggers","Text.Text","Case","Triggers.Text","MODE_ICONS","SelectMode","disable","MODES","value","a","b","Select.Button","_","Button.Icon","canDrop","Haul.canDropOfType","HAUL_TYPE","LinePlot","axes","showTitle","title","onTitleChange","showLegend","titleLevel","onRuleChange","onAxisChannelDrop","onAxisChange","rules","enableTooltip","enableMeasure","initialViewport","onViewportChange","viewportTriggers","restProps","xAxes","l","loc","Core.LinePlot","axisLines","yAxes","axisRules","r","id","XAxis","Core.Legend","Core.Title","Core.Viewport","Tooltip.Tooltip","Measure.Measure","location","showGrid","axis","dropProps","Haul.useDrop","useCallback","items","dropped","Haul.filterByType","xRules","Core.XAxis","Haul.useDraggingState","bounds","yLines","yRules","YAxis","rule","Rule.Rule","lineKey","x","y","dragging","Core.YAxis","Line","line","StaticLine","DynamicLine","timeSpan","yTelem","telem.streamChannelData","hasX","xTelem","Core.Line","timeRange","telem.channelData","TabNotFound","InvalidMosaic","insertTab","root","tab","shallowCopyNode","insertAnywhere","node","findNodeOrAncestor","_a","insertOrder","siblingOrder","dir","splitArrangement","autoSelectTabs","Tabs.resetSelection","f","s","removeTab","tabKey","findMosaicTab","t","gced","gc","findSelected","selectTab","moveTab","to","r2","resizeNode","findMosaicNode","renameTab","leaf","Tabs.rename","isEmpty","next","_gc","shouldGc","liftUp","sGC","eGC","isLast","t1Tab","t2Tree","t2Tab","t2Tree2","n1","insertPosition","deep","use","allowRename","initialTree","setRoot","useState","useEffect","MacOS","disabled","focused","onMinimize","onMaximize","onFullscreen","onClose","TrafficLight","Windows","Align.Pack","runtime","Variants","DEFAULT_OS","Controls","forceOS","visibleIfOS","os","C","alignNodes","layouts","oppositeLoc","layout","prevRightHandle","h","leftHandle","prevHandleAbsPos","leftHandleAbsPos","dist","xy","newPos","aetherKey","Aether.use","table.Table","table.tableStateZ","DefaultWorkerURL","Provider","connParams","workerEnabled","workerURL","theme","toggleTheme","setTheme","tooltip","alamos","haul","channelAlias","Triggers.Provider","Tooltip.Config","Haul.Provider","Worker.Provider","Aether.Provider","Alamos.Provider","Status.Aggregator","Synnax.Provider","Channel.AliasProvider","Telem.Provider","Theming.Provider","Control.StateProvider","TimeRangeChip","startTS","TimeStamp","startFormat","endTS","isOpen","endFormat","TimeSpan","Text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EAAE,UAAU,IAAI,YAAY,IAAI,aAAa,GAAG;AAAA,QACvD,OAAOkR,EAAE,MAAM;AAAA,MAAA;AAAA,IACjB;AAAA,EAEJ;AAAA,EACA;AAAA,IACE,KAAK;AAAA,IACL,MAAM;AAAA,EACR;AACF,GAKaC,KAAe,CAAC1Q,MAA2C;AAChE,QAAA2Q,IAASC;AAEb,SAAAlQ,gBAAAA,EAAA;AAAA,IAACmQ;AAAAA,IAAA;AAAA,MACE,GAAG7Q;AAAA,MACJ,UAAU2Q,KAAA,gBAAAA,EAAQ;AAAA,MAClB,SAASH;AAAA,MACT,WAAW,CAACC,MAAM/P,gBAAAA,EAAA,IAACoQ,IAAA,EAAQ,OAAOL,EAAE,MAAM,OAAQ,UAAAA,EAAE,MAAM,KAAK,CAAA;AAAA,IAAA;AAAA,EAAA;AAGrE;;;;;"}
|
|
@@ -6,4 +6,5 @@ export declare const Basic: () => ReactElement;
|
|
|
6
6
|
export declare const Time: () => ReactElement;
|
|
7
7
|
export declare const Date: () => ReactElement;
|
|
8
8
|
export declare const Number: () => ReactElement;
|
|
9
|
+
export declare const TextArea: () => ReactElement;
|
|
9
10
|
export default story;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { type ComponentPropsWithoutRef } from "react";
|
|
2
|
+
import { type ExtensionProps } from '../input/types';
|
|
3
|
+
type HTMlTextAreaProps = Omit<ComponentPropsWithoutRef<"textarea">, "size" | "onChange" | "value" | "children" | "placeholder">;
|
|
4
|
+
export interface TextAreaProps extends ExtensionProps<string>, HTMlTextAreaProps {
|
|
5
|
+
selectOnFocus?: boolean;
|
|
6
|
+
centerPlaceholder?: boolean;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* A controlled text area input component.
|
|
10
|
+
*
|
|
11
|
+
* @param props - The props for the input component. Unlisted props are passed to the
|
|
12
|
+
* underlying input element.
|
|
13
|
+
* @param props.value - The value of the input.
|
|
14
|
+
* @param props.onChange - A function to call when the input value changes.
|
|
15
|
+
* @param props.size - The size of the input: "small" | "medium" | "large".
|
|
16
|
+
* @param props.selectOnFocus - Whether the input should select its contents when focused.
|
|
17
|
+
* @param props.centerPlaceholder - Whether the placeholder should be centered.
|
|
18
|
+
*/
|
|
19
|
+
export declare const TextArea: import("react").ForwardRefExoticComponent<TextAreaProps & import("react").RefAttributes<HTMLTextAreaElement>>;
|
|
20
|
+
export {};
|
package/dist/input/external.d.ts
CHANGED
package/dist/input/types.d.ts
CHANGED
|
@@ -7,13 +7,15 @@ export interface Control<I extends Value = Value, O extends Value = I> {
|
|
|
7
7
|
}
|
|
8
8
|
export interface OptionalControl<I extends Value = Value, O extends Value = I> extends Partial<Control<I, O>> {
|
|
9
9
|
}
|
|
10
|
-
type HTMLInputProps = Omit<ComponentPropsWithoutRef<"input">, "size" | "onChange" | "value" | "children">;
|
|
10
|
+
type HTMLInputProps = Omit<ComponentPropsWithoutRef<"input">, "size" | "onChange" | "value" | "children" | "placeholder">;
|
|
11
11
|
export type Variant = "outlined" | "shadow";
|
|
12
|
-
export interface
|
|
12
|
+
export interface ExtensionProps<I extends Value = Value, O extends Value = I> extends Control<I, O> {
|
|
13
13
|
size?: ComponentSize;
|
|
14
14
|
variant?: Variant;
|
|
15
15
|
sharp?: boolean;
|
|
16
16
|
placeholder?: ReactNode;
|
|
17
17
|
children?: ReactNode;
|
|
18
18
|
}
|
|
19
|
+
export interface BaseProps<I extends Value = Value, O extends Value = I> extends HTMLInputProps, ExtensionProps<I, O> {
|
|
20
|
+
}
|
|
19
21
|
export {};
|
package/dist/input.cjs
CHANGED
|
@@ -1,15 +1,2 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const external = require("./external-tVcmKSsT.cjs");
|
|
4
|
-
require("./Toggle-eOKYw1OT.cjs");
|
|
5
|
-
require("./jsx-runtime-N1ikfypN.cjs");
|
|
6
|
-
require("react");
|
|
7
|
-
require("./css-V3VUT_Js.cjs");
|
|
8
|
-
require("zod");
|
|
9
|
-
require("./component-joFaJiQW.cjs");
|
|
10
|
-
require("react-dom");
|
|
11
|
-
require("./Center-ZAcURh-3.cjs");
|
|
12
|
-
require("react-hook-form");
|
|
13
|
-
require("./Item-rkSKzZoh.cjs");
|
|
14
|
-
exports.Input = external.external;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./external-eWu6hCLU.cjs");require("./Toggle-QnKinMl4.cjs");require("./jsx-runtime-evvPGacs.cjs");require("react");require("./css-s9KpanYu.cjs");require("zod");require("./component-dgLAEMbt.cjs");require("react-dom");require("./Center-ER_owvfX.cjs");require("./color-gJTR__ef.cjs");require("react-hook-form");require("./Item-_og4CdwZ.cjs");exports.Input=e.external;
|
|
15
2
|
//# sourceMappingURL=input.cjs.map
|
package/dist/input.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"input.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"input.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
package/dist/input.js
CHANGED
|
@@ -1,15 +1,16 @@
|
|
|
1
|
-
import { e } from "./external-
|
|
2
|
-
import "./Toggle-
|
|
3
|
-
import "./jsx-runtime-
|
|
1
|
+
import { e as I } from "./external-4h9H4Y_N.js";
|
|
2
|
+
import "./Toggle-HVxv8bv2.js";
|
|
3
|
+
import "./jsx-runtime-NmMXPjeo.js";
|
|
4
4
|
import "react";
|
|
5
|
-
import "./css-
|
|
5
|
+
import "./css-5RvvUhjr.js";
|
|
6
6
|
import "zod";
|
|
7
|
-
import "./component-
|
|
7
|
+
import "./component-LA8IXGSG.js";
|
|
8
8
|
import "react-dom";
|
|
9
|
-
import "./Center-
|
|
9
|
+
import "./Center-8mBjm1cO.js";
|
|
10
|
+
import "./color-9QRifwqk.js";
|
|
10
11
|
import "react-hook-form";
|
|
11
|
-
import "./Item
|
|
12
|
+
import "./Item--h4UWJZo.js";
|
|
12
13
|
export {
|
|
13
|
-
|
|
14
|
+
I as Input
|
|
14
15
|
};
|
|
15
16
|
//# sourceMappingURL=input.js.map
|
package/dist/input.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"input.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"input.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;"}
|