@weasel-js/labkit 1.6.0 → 1.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_dts/{CanvasStackContext-DQgcH1ny.d.ts → CanvasStackContext-Wo6OwIVM.d.ts} +1 -1
- package/dist/_dts/FloatingPanel-7j0IcXwz.d.ts +30 -0
- package/dist/_dts/{LayerList.d-2c9yup5Y.d.ts → LayerList.d-BoELAMsM.d.ts} +2 -2
- package/dist/_dts/{index-DINmCuLA.d.ts → PropertyField.d-D0ndfIIt.d.ts} +34 -83
- package/dist/_dts/{Select.d-BchGMC2Y.d.ts → Select.d-Cr8-zoup.d.ts} +4 -5
- package/dist/_dts/{usePanZoom-Bq73pwFe.d.ts → Stage-DWBBi8IU.d.ts} +80 -35
- package/dist/_dts/{index-B0--8PEM.d.ts → index-CKyX0ME_.d.ts} +12 -13
- package/dist/_dts/{frac-DTRq7Xpb.d.ts → types-B7yBTTF9.d.ts} +699 -649
- package/dist/_dts/{types-B7y8hX1D.d.ts → types-DTuViBvc.d.ts} +20 -1
- package/dist/_dts/{useTrialState-CP4jfuKl.d.ts → useTrialState-CMaV6UD4.d.ts} +2 -3
- package/dist/canvas/index.d.ts +39 -7
- package/dist/canvas/index.js +5 -3
- package/dist/chrome/index.d.ts +4 -5
- package/dist/chrome/index.js +8 -6
- package/dist/chunk-24W5VEJW.js +18 -0
- package/dist/chunk-24W5VEJW.js.map +1 -0
- package/dist/chunk-3RY6WL5T.js +38 -0
- package/dist/chunk-3RY6WL5T.js.map +1 -0
- package/dist/{chunk-H5VIV7MQ.js → chunk-4TT3PNPR.js} +60 -51
- package/dist/chunk-4TT3PNPR.js.map +1 -0
- package/dist/{chunk-ZORVNOKX.js → chunk-6FLXL3I7.js} +9 -145
- package/dist/chunk-6FLXL3I7.js.map +1 -0
- package/dist/{chunk-HFRE4QQV.js → chunk-ASOK76ZH.js} +53 -22
- package/dist/chunk-ASOK76ZH.js.map +1 -0
- package/dist/chunk-AWQG7FCC.js +19 -0
- package/dist/chunk-AWQG7FCC.js.map +1 -0
- package/dist/chunk-CGHF6RZV.js +300 -0
- package/dist/chunk-CGHF6RZV.js.map +1 -0
- package/dist/chunk-DWMSB4CA.js +228 -0
- package/dist/chunk-DWMSB4CA.js.map +1 -0
- package/dist/{chunk-USO6TERP.js → chunk-GHGO52SO.js} +11 -9
- package/dist/chunk-GHGO52SO.js.map +1 -0
- package/dist/{chunk-MOLIUNVH.js → chunk-HKV7LRHY.js} +4 -4
- package/dist/{chunk-MOLIUNVH.js.map → chunk-HKV7LRHY.js.map} +1 -1
- package/dist/{chunk-VQ47KWD5.js → chunk-IRTGUQ5O.js} +5 -4
- package/dist/chunk-IRTGUQ5O.js.map +1 -0
- package/dist/{chunk-H6ZAOWNE.js → chunk-JVBYV6TL.js} +3 -3
- package/dist/{chunk-H6ZAOWNE.js.map → chunk-JVBYV6TL.js.map} +1 -1
- package/dist/chunk-KHK5FGER.js +145 -0
- package/dist/chunk-KHK5FGER.js.map +1 -0
- package/dist/chunk-NEXR37YJ.js +144 -0
- package/dist/chunk-NEXR37YJ.js.map +1 -0
- package/dist/{chunk-BVL7Y574.js → chunk-O6FFFOHS.js} +14 -6
- package/dist/chunk-O6FFFOHS.js.map +1 -0
- package/dist/chunk-QGMOA2YE.js +731 -0
- package/dist/chunk-QGMOA2YE.js.map +1 -0
- package/dist/{chunk-ERFMC6WU.js → chunk-S4NCI32V.js} +19 -10
- package/dist/chunk-S4NCI32V.js.map +1 -0
- package/dist/{chunk-3FI7Y4R4.js → chunk-SLAQPUI4.js} +4 -4
- package/dist/{chunk-3FI7Y4R4.js.map → chunk-SLAQPUI4.js.map} +1 -1
- package/dist/{chunk-AWH3SRPW.js → chunk-TJ77A4A3.js} +3 -31
- package/dist/chunk-TJ77A4A3.js.map +1 -0
- package/dist/{chunk-WUJXJC5O.js → chunk-TYN6MLXX.js} +691 -1395
- package/dist/chunk-TYN6MLXX.js.map +1 -0
- package/dist/{chunk-RS3HRQWU.js → chunk-WPLAANH4.js} +4 -3
- package/dist/chunk-WPLAANH4.js.map +1 -0
- package/dist/config/index.d.ts +36 -35
- package/dist/config/index.js +4 -5
- package/dist/controls/index.d.ts +91 -7
- package/dist/controls/index.js +5 -4
- package/dist/dragdrop/index.d.ts +8 -6
- package/dist/dragdrop/index.js +3 -2
- package/dist/index.d.ts +50 -77
- package/dist/index.js +138 -254
- package/dist/index.js.map +1 -1
- package/dist/layers/index.d.ts +3 -4
- package/dist/layers/index.js +2 -1
- package/dist/loupe/index.d.ts +19 -16
- package/dist/loupe/index.js +5 -3
- package/dist/overview/index.d.ts +56 -0
- package/dist/overview/index.js +288 -0
- package/dist/overview/index.js.map +1 -0
- package/dist/passthrough/weasel-ui.d.ts +38 -38
- package/dist/passthrough/weasel-ui.js +2 -1
- package/dist/primitives/index.d.ts +19 -43
- package/dist/primitives/index.js +5 -3
- package/dist/state/index.d.ts +7 -7
- package/dist/state/index.js +4 -5
- package/dist/state/index.js.map +1 -1
- package/dist/styles.css +63 -1
- package/dist/undo/index.d.ts +3 -3
- package/package.json +13 -9
- package/src/annotations/index.ts +1 -0
- package/src/annotations/store.test.ts +26 -0
- package/src/annotations/store.ts +25 -6
- package/src/annotations/toolMap.test.ts +37 -2
- package/src/annotations/toolMap.ts +13 -0
- package/src/annotations/types.ts +27 -0
- package/src/canvas/AGENTS.md +8 -10
- package/src/canvas/CameraInput.test.tsx +136 -0
- package/src/canvas/CameraInput.tsx +311 -0
- package/src/canvas/CanvasStack.tsx +42 -58
- package/src/canvas/LinkedCursor.less +16 -0
- package/src/canvas/LinkedCursor.tsx +54 -0
- package/src/canvas/Stage.tsx +42 -37
- package/src/canvas/cameraView.test.ts +60 -0
- package/src/canvas/cameraView.ts +61 -0
- package/src/canvas/index.ts +11 -2
- package/src/chrome/regions/SidebarRegion.test.tsx +9 -2
- package/src/config/builder.ts +3 -3
- package/src/config/entry.test.ts +3 -1
- package/src/config/fromConfigField.ts +1 -0
- package/src/config/index.ts +4 -1
- package/src/config/resolve.ts +11 -1
- package/src/config/sectionTree.test.ts +12 -6
- package/src/config/sectionTree.ts +15 -5
- package/src/config/types.ts +21 -0
- package/src/controls/ControlPanel.test.tsx +12 -2
- package/src/controls/ControlPanel.tsx +28 -9
- package/src/controls/inDialog.test.tsx +18 -0
- package/src/controls/inDialog.tsx +2 -10
- package/src/index.test.ts +1 -1
- package/src/index.ts +8 -4
- package/src/instrument/SineWave.smoke.test.tsx +2 -0
- package/src/instrument/types.ts +10 -1
- package/src/lab/Lab.nebula.test.tsx +11 -2
- package/src/lab/Lab.test.tsx +3 -1
- package/src/lab/Lab.tsx +4 -4
- package/src/loupe/AGENTS.md +7 -6
- package/src/loupe/LoupeGestures.tsx +14 -9
- package/src/loupe/TrialLoupe.tsx +5 -5
- package/src/loupe/index.ts +1 -0
- package/src/loupe/loupeActions.ts +6 -2
- package/src/overview/AGENTS.md +38 -0
- package/src/overview/OverviewMarks.test.tsx +100 -0
- package/src/overview/OverviewMarks.tsx +93 -0
- package/src/overview/TrialOverview.less +53 -0
- package/src/overview/TrialOverview.stories.tsx +50 -0
- package/src/overview/TrialOverview.test.tsx +116 -0
- package/src/overview/TrialOverview.tsx +374 -0
- package/src/overview/index.ts +2 -0
- package/src/passthrough/weasel-ui.ts +7 -0
- package/src/specimen/Specimen.tsx +19 -2
- package/src/state/labRecords.test.ts +4 -1
- package/src/state/store.test.ts +4 -4
- package/src/state/useTrialState.test.tsx +1 -1
- package/src/styles.less +2 -0
- package/src/theme/Interstellar.stories.tsx +1 -5
- package/src/tools/labTool.ts +6 -2
- package/src/trial/Trial.annotations.test.tsx +16 -0
- package/src/trial/Trial.loupe.test.tsx +73 -1
- package/src/trial/Trial.stories.tsx +2 -0
- package/src/trial/Trial.tsx +17 -1
- package/src/trial/trialOps.test.ts +4 -4
- package/dist/_dts/inDialog-D5ZKGjiD.d.ts +0 -23
- package/dist/_dts/number.d-OeQYQoUO.d.ts +0 -28
- package/dist/chunk-2AYGEN57.js +0 -32
- package/dist/chunk-2AYGEN57.js.map +0 -1
- package/dist/chunk-AWH3SRPW.js.map +0 -1
- package/dist/chunk-BVL7Y574.js.map +0 -1
- package/dist/chunk-ERFMC6WU.js.map +0 -1
- package/dist/chunk-H5VIV7MQ.js.map +0 -1
- package/dist/chunk-HFRE4QQV.js.map +0 -1
- package/dist/chunk-RS3HRQWU.js.map +0 -1
- package/dist/chunk-TT5C5S6R.js +0 -368
- package/dist/chunk-TT5C5S6R.js.map +0 -1
- package/dist/chunk-USO6TERP.js.map +0 -1
- package/dist/chunk-VQ47KWD5.js.map +0 -1
- package/dist/chunk-WUJXJC5O.js.map +0 -1
- package/dist/chunk-ZORVNOKX.js.map +0 -1
- package/src/canvas/usePanZoom.test.ts +0 -244
- package/src/canvas/usePanZoom.ts +0 -147
|
@@ -1,15 +1,14 @@
|
|
|
1
|
-
import { j as ToggleBarSize, k as ToggleBarVariant, l as SegmentTooltipFields, F as FieldOrientation, O as OverlayPortalProps, W as WithoutPortalTarget } from '../_dts/Select.d-
|
|
2
|
-
export { B as Button, a as ButtonProps, b as ButtonSize, c as ButtonVariant, m as Field, n as FieldProps, o as ICON_PATHS, d as Icon, p as IconName, I as IconProps, e as Input, f as InputProps, S as Select, q as SelectItem, r as SelectItemProps, s as SelectOption, g as SelectProps, T as ToggleBar, h as ToggleBarItem, i as ToggleBarProps, t as fieldClasses } from '../_dts/Select.d-
|
|
1
|
+
import { j as ToggleBarSize, k as ToggleBarVariant, l as SegmentTooltipFields, F as FieldOrientation, O as OverlayPortalProps, W as WithoutPortalTarget } from '../_dts/Select.d-Cr8-zoup.js';
|
|
2
|
+
export { B as Button, a as ButtonProps, b as ButtonSize, c as ButtonVariant, m as Field, n as FieldProps, o as ICON_PATHS, d as Icon, p as IconName, I as IconProps, e as Input, f as InputProps, S as Select, q as SelectItem, r as SelectItemProps, s as SelectOption, g as SelectProps, T as ToggleBar, h as ToggleBarItem, i as ToggleBarProps, t as fieldClasses } from '../_dts/Select.d-Cr8-zoup.js';
|
|
3
3
|
import { ToolPrefLeaf, ToolPrefGroup, ToolsApi, oklchDegToHex } from '@weasel-js/core';
|
|
4
4
|
export { ToolPref as BuiltinPref, ToolPrefBoolean as PrefBoolean, ToolPrefBooleanControl as PrefBooleanControl, ToolPrefColor as PrefColor, ToolPrefCustom as PrefCustom, ToolPrefEnum as PrefEnum, ToolPrefEnumControl as PrefEnumControl, ToolPrefEnumEncoding as PrefEnumEncoding, ToolPrefGroup as PrefGroup, ToolPrefKind as PrefKind, ToolPrefLeaf as PrefLeaf, ToolPrefNumber as PrefNumber, ToolPrefNumberControl as PrefNumberControl, ToolPrefNumberUnit as PrefNumberUnit, ToolPrefObject as PrefObject, ToolPrefPaint as PrefPaint, ToolPrefString as PrefString, ToolPrefStringControl as PrefStringControl } from '@weasel-js/core';
|
|
5
|
-
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
6
5
|
import * as react from 'react';
|
|
7
6
|
import { ReactNode, CSSProperties, HTMLAttributes, ReactElement, PointerEvent, RefCallback, KeyboardEvent, RefObject } from 'react';
|
|
8
7
|
import { S as StanceProps, P as PrefRenderer } from '../_dts/PrefsRow.d-DFpPIeIC.js';
|
|
9
8
|
export { a as PrefRenderContext } from '../_dts/PrefsRow.d-DFpPIeIC.js';
|
|
10
|
-
export { L as LayerList, a as LayerListItem, b as LayerListProps, c as LayerMove, m as moveLayers } from '../_dts/LayerList.d-
|
|
9
|
+
export { L as LayerList, a as LayerListItem, b as LayerListProps, c as LayerMove, m as moveLayers } from '../_dts/LayerList.d-BoELAMsM.js';
|
|
11
10
|
import { ColorModePreference } from '@weasel-js/theme';
|
|
12
|
-
export { M as MINUS_SIGN,
|
|
11
|
+
export { M as MINUS_SIGN, q as PropertyAlign, r as PropertyDensity, P as PropertyMetricProps, s as formatNumber } from '../_dts/PropertyField.d-D0ndfIIt.js';
|
|
13
12
|
import { CheckboxProps as CheckboxProps$1, SwitchProps as SwitchProps$1, TabProps as TabProps$1, TabListProps as TabListProps$1, TabPanelProps as TabPanelProps$1, TabsProps as TabsProps$1, RadioProps as RadioProps$1, RadioGroupProps as RadioGroupProps$1, ValidationResult, NumberFieldProps as NumberFieldProps$1, ComboBoxProps as ComboBoxProps$1, ListBoxItemProps, SliderProps as SliderProps$1, ModalOverlayProps, DialogProps as DialogProps$1, PopoverProps } from 'react-aria-components';
|
|
14
13
|
export { DialogTrigger as CalloutTrigger } from 'react-aria-components';
|
|
15
14
|
|
|
@@ -82,7 +81,7 @@ interface ActionBarProps {
|
|
|
82
81
|
* (roving tabindex) yet — bar consumers today are short flat strips. Add
|
|
83
82
|
* if/when a long bar lands.
|
|
84
83
|
*/
|
|
85
|
-
declare function ActionBar(props: ActionBarProps):
|
|
84
|
+
declare function ActionBar(props: ActionBarProps): react.JSX.Element;
|
|
86
85
|
|
|
87
86
|
/**
|
|
88
87
|
* Built-in badge silhouettes. `pill`, `plain` and `square` are drawn in CSS;
|
|
@@ -876,7 +875,7 @@ interface DataGridProps<Row extends {
|
|
|
876
875
|
*/
|
|
877
876
|
declare function DataGrid<Row extends {
|
|
878
877
|
id: string;
|
|
879
|
-
}>(props: DataGridProps<Row>):
|
|
878
|
+
}>(props: DataGridProps<Row>): react.JSX.Element;
|
|
880
879
|
|
|
881
880
|
/** Props for `<DisclosureMark>`. */
|
|
882
881
|
interface DisclosureMarkProps {
|
|
@@ -896,7 +895,7 @@ interface DisclosureMarkProps {
|
|
|
896
895
|
* `DragHandleGlyph`: that register is outline strokes at a fixed weight, and
|
|
897
896
|
* this mark is filled.
|
|
898
897
|
*/
|
|
899
|
-
declare function DisclosureMark({ open, size, className }: DisclosureMarkProps):
|
|
898
|
+
declare function DisclosureMark({ open, size, className }: DisclosureMarkProps): react.JSX.Element;
|
|
900
899
|
/** Props for `<Disclosure>`. */
|
|
901
900
|
interface DisclosureProps {
|
|
902
901
|
/** Whether the section it controls is open. The consumer owns this. */
|
|
@@ -932,7 +931,7 @@ interface DisclosureProps {
|
|
|
932
931
|
* of the row's label rather than a child, so clicking to expand does not
|
|
933
932
|
* actuate the label's own control.
|
|
934
933
|
*/
|
|
935
|
-
declare function Disclosure({ open, onToggle, label, controls, size, disabled, className }: DisclosureProps):
|
|
934
|
+
declare function Disclosure({ open, onToggle, label, controls, size, disabled, className }: DisclosureProps): react.JSX.Element;
|
|
936
935
|
/** Props for `<DisclosureRow>`. */
|
|
937
936
|
interface DisclosureRowProps extends Omit<DisclosureProps, 'className'> {
|
|
938
937
|
/** The row's own content — a label, a checkbox, a count. */
|
|
@@ -947,7 +946,7 @@ interface DisclosureRowProps extends Omit<DisclosureProps, 'className'> {
|
|
|
947
946
|
* it, so a row whose content is a `<label>` wrapping a checkbox stays
|
|
948
947
|
* clickable as a label without the twisty actuating it.
|
|
949
948
|
*/
|
|
950
|
-
declare function DisclosureRow({ children, className, ...twisty }: DisclosureRowProps):
|
|
949
|
+
declare function DisclosureRow({ children, className, ...twisty }: DisclosureRowProps): react.JSX.Element;
|
|
951
950
|
|
|
952
951
|
/** Props for `<DragGhost>`. */
|
|
953
952
|
interface DragGhostProps {
|
|
@@ -979,7 +978,7 @@ interface DragHandleGlyphProps {
|
|
|
979
978
|
* Deliberately not part of the icon register: that register is outline strokes
|
|
980
979
|
* at a fixed weight, and a grip is filled dots. Forcing it in would either
|
|
981
980
|
* break the register's rule or produce a worse glyph. */
|
|
982
|
-
declare function DragHandleGlyph({ size }: DragHandleGlyphProps):
|
|
981
|
+
declare function DragHandleGlyph({ size }: DragHandleGlyphProps): react.JSX.Element;
|
|
983
982
|
|
|
984
983
|
/**
|
|
985
984
|
* Width class of a keycap: a modifier glyph, a multi-character legend that
|
|
@@ -1022,7 +1021,7 @@ interface KeyCapProps {
|
|
|
1022
1021
|
}
|
|
1023
1022
|
/** Single bordered keycap chip for one glyph (modifier or key). Use
|
|
1024
1023
|
* `KeySequence` to render a full shortcut. */
|
|
1025
|
-
declare function KeyCap({ label, inverted, variant, className, style, font }: KeyCapProps):
|
|
1024
|
+
declare function KeyCap({ label, inverted, variant, className, style, font }: KeyCapProps): react.JSX.Element;
|
|
1026
1025
|
|
|
1027
1026
|
/** One key in a shortcut. */
|
|
1028
1027
|
interface KeySpec {
|
|
@@ -1052,7 +1051,7 @@ interface KeySequenceProps {
|
|
|
1052
1051
|
}
|
|
1053
1052
|
/** Renders a shortcut as a row of `KeyCap` chips, one per key. Optional
|
|
1054
1053
|
* keys render inverted to distinguish them from required ones. */
|
|
1055
|
-
declare function KeySequence({ keys, separator, variant, font, className }: KeySequenceProps):
|
|
1054
|
+
declare function KeySequence({ keys, separator, variant, font, className }: KeySequenceProps): react.JSX.Element;
|
|
1056
1055
|
|
|
1057
1056
|
/** Apple-style glyph for a DOM `KeyboardEvent.key` value. Covers escape,
|
|
1058
1057
|
* delete/backspace, arrows, enter/return, tab, space. Unknown keys are
|
|
@@ -1250,7 +1249,8 @@ type SliderStop = {
|
|
|
1250
1249
|
* `'even'` falls back to linear.
|
|
1251
1250
|
*
|
|
1252
1251
|
* `trackClick: 'move-nearest'` makes a press on bare track send the closest
|
|
1253
|
-
* thumb there and continue as a drag. It is
|
|
1252
|
+
* thumb there, focus it, and continue as a drag. It is the default for a
|
|
1253
|
+
* single thumb. With several it defaults to `'none'`, because on a
|
|
1254
1254
|
* multi-thumb editor a stray click would yank a stop the user was not aiming
|
|
1255
1255
|
* at; `onAddThumb`, where it is set, keeps the track press.
|
|
1256
1256
|
*
|
|
@@ -1417,7 +1417,7 @@ interface ListEditorProps {
|
|
|
1417
1417
|
* each, and an add button under them. Enter in an entry adds one after it;
|
|
1418
1418
|
* Backspace in an empty one removes it.
|
|
1419
1419
|
*/
|
|
1420
|
-
declare function ListEditor({ value, onChange, placeholder, empty, addLabel, 'aria-label': ariaLabel, className, }: ListEditorProps):
|
|
1420
|
+
declare function ListEditor({ value, onChange, placeholder, empty, addLabel, 'aria-label': ariaLabel, className, }: ListEditorProps): react.JSX.Element;
|
|
1421
1421
|
|
|
1422
1422
|
/** Props for {@link ColorModeControl}. */
|
|
1423
1423
|
interface ColorModeControlProps {
|
|
@@ -1547,7 +1547,7 @@ interface PowerlineProps {
|
|
|
1547
1547
|
* Built for showing a path through a sequence of steps — the inspector uses
|
|
1548
1548
|
* it to display how input routes from tool to gesture to action to target.
|
|
1549
1549
|
*/
|
|
1550
|
-
declare function Powerline({ segments, startCap, size, variant, depth, gap, className, ...rest }: PowerlineProps):
|
|
1550
|
+
declare function Powerline({ segments, startCap, size, variant, depth, gap, className, ...rest }: PowerlineProps): react.JSX.Element;
|
|
1551
1551
|
|
|
1552
1552
|
/** Distinguishes a leaf from a group while walking a schema tree. */
|
|
1553
1553
|
declare function isPrefLeaf(node: ToolPrefLeaf | ToolPrefGroup): node is ToolPrefLeaf;
|
|
@@ -1608,7 +1608,7 @@ interface PrefsFormProps {
|
|
|
1608
1608
|
* Storage-agnostic: pair with `PrefsDialog` for the modal composition, and
|
|
1609
1609
|
* persist however the app likes via `onChange`.
|
|
1610
1610
|
*/
|
|
1611
|
-
declare function PrefsForm(props: PrefsFormProps):
|
|
1611
|
+
declare function PrefsForm(props: PrefsFormProps): react.JSX.Element;
|
|
1612
1612
|
|
|
1613
1613
|
/**
|
|
1614
1614
|
* Props for {@link PrefsDialog} — everything {@link PrefsForm} takes, plus
|
|
@@ -1639,7 +1639,7 @@ interface PrefsDialogProps extends PrefsFormProps {
|
|
|
1639
1639
|
* `layout="rail"` is what a dialog usually wants: the default columns wrap
|
|
1640
1640
|
* sideways past two groups, and this box is 900px at its widest.
|
|
1641
1641
|
*/
|
|
1642
|
-
declare function PrefsDialog(props: PrefsDialogProps):
|
|
1642
|
+
declare function PrefsDialog(props: PrefsDialogProps): react.JSX.Element;
|
|
1643
1643
|
|
|
1644
1644
|
/** Props for {@link Sidebar}. */
|
|
1645
1645
|
interface SidebarProps {
|
|
@@ -1670,7 +1670,7 @@ interface SidebarProps {
|
|
|
1670
1670
|
*
|
|
1671
1671
|
* Pair with `<SidebarPanel>` for collapsible sections.
|
|
1672
1672
|
*/
|
|
1673
|
-
declare function Sidebar(props: SidebarProps):
|
|
1673
|
+
declare function Sidebar(props: SidebarProps): react.JSX.Element;
|
|
1674
1674
|
|
|
1675
1675
|
/** Props for {@link SidebarPanel}. */
|
|
1676
1676
|
interface SidebarPanelProps {
|
|
@@ -1705,7 +1705,7 @@ interface SidebarPanelProps {
|
|
|
1705
1705
|
*
|
|
1706
1706
|
* Pair with `<Sidebar>` for the docked column layout.
|
|
1707
1707
|
*/
|
|
1708
|
-
declare function SidebarPanel(props: SidebarPanelProps):
|
|
1708
|
+
declare function SidebarPanel(props: SidebarPanelProps): react.JSX.Element;
|
|
1709
1709
|
|
|
1710
1710
|
/** Props for {@link ToolButton}. */
|
|
1711
1711
|
interface ToolButtonProps {
|
|
@@ -1749,7 +1749,7 @@ interface ToolButtonProps {
|
|
|
1749
1749
|
* and similar surfaces. Headless about layout direction (parent group
|
|
1750
1750
|
* supplies flex direction via `ToolGroup`). Theme via `--wzl-*` tokens.
|
|
1751
1751
|
*/
|
|
1752
|
-
declare function ToolButton(props: ToolButtonProps):
|
|
1752
|
+
declare function ToolButton(props: ToolButtonProps): react.JSX.Element;
|
|
1753
1753
|
|
|
1754
1754
|
/** Props for {@link ToolGroup}. */
|
|
1755
1755
|
interface ToolGroupProps {
|
|
@@ -1774,7 +1774,7 @@ interface ToolGroupProps {
|
|
|
1774
1774
|
* `<ToolButton>`s (or any children) along a chosen axis. No visual chrome
|
|
1775
1775
|
* beyond layout; theming lives on the buttons.
|
|
1776
1776
|
*/
|
|
1777
|
-
declare function ToolGroup(props: ToolGroupProps):
|
|
1777
|
+
declare function ToolGroup(props: ToolGroupProps): react.JSX.Element;
|
|
1778
1778
|
|
|
1779
1779
|
/** The full vocabulary of capability tags shipped in the default preset.
|
|
1780
1780
|
* Apps and other consumers can add their own tags; this list is what
|
|
@@ -1874,7 +1874,7 @@ interface ToolPaletteProps {
|
|
|
1874
1874
|
* Given a `modeRegistry`, tools whose capabilities the current mode does not
|
|
1875
1875
|
* allow render greyed out and inert rather than disappearing.
|
|
1876
1876
|
*/
|
|
1877
|
-
declare function ToolPalette(props: ToolPaletteProps):
|
|
1877
|
+
declare function ToolPalette(props: ToolPaletteProps): react.JSX.Element;
|
|
1878
1878
|
|
|
1879
1879
|
/**
|
|
1880
1880
|
* Props for {@link Checkbox}, on top of React Aria's `Checkbox` props. The
|
|
@@ -1922,27 +1922,27 @@ type TabsProps = Omit<TabsProps$1, 'className' | 'children'> & {
|
|
|
1922
1922
|
* Tab set wrapping React Aria's Tabs, skinned against the `--wzl-*` tokens.
|
|
1923
1923
|
* Holds a {@link TabList} and one {@link TabPanel} per tab.
|
|
1924
1924
|
*/
|
|
1925
|
-
declare function Tabs({ children, className, ...rest }: TabsProps):
|
|
1925
|
+
declare function Tabs({ children, className, ...rest }: TabsProps): react.JSX.Element;
|
|
1926
1926
|
/** Props for {@link TabList}, on top of React Aria's `TabList` props. */
|
|
1927
1927
|
type TabListProps<T extends object> = Omit<TabListProps$1<T>, 'className'> & {
|
|
1928
1928
|
className?: string;
|
|
1929
1929
|
};
|
|
1930
1930
|
/** The row of tab buttons inside a {@link Tabs}. */
|
|
1931
|
-
declare function TabList<T extends object>({ className, ...rest }: TabListProps<T>):
|
|
1931
|
+
declare function TabList<T extends object>({ className, ...rest }: TabListProps<T>): react.JSX.Element;
|
|
1932
1932
|
/** Props for {@link Tab}, on top of React Aria's `Tab` props. */
|
|
1933
1933
|
type TabProps = Omit<TabProps$1, 'className' | 'children'> & {
|
|
1934
1934
|
children?: ReactNode;
|
|
1935
1935
|
className?: string;
|
|
1936
1936
|
};
|
|
1937
1937
|
/** One tab button. Its `id` selects the {@link TabPanel} it reveals. */
|
|
1938
|
-
declare function Tab({ children, className, ...rest }: TabProps):
|
|
1938
|
+
declare function Tab({ children, className, ...rest }: TabProps): react.JSX.Element;
|
|
1939
1939
|
/** Props for {@link TabPanel}, on top of React Aria's `TabPanel` props. */
|
|
1940
1940
|
type TabPanelProps = Omit<TabPanelProps$1, 'className' | 'children'> & {
|
|
1941
1941
|
children?: ReactNode;
|
|
1942
1942
|
className?: string;
|
|
1943
1943
|
};
|
|
1944
1944
|
/** The content shown for the {@link Tab} whose `id` matches this panel's. */
|
|
1945
|
-
declare function TabPanel({ children, className, ...rest }: TabPanelProps):
|
|
1945
|
+
declare function TabPanel({ children, className, ...rest }: TabPanelProps): react.JSX.Element;
|
|
1946
1946
|
|
|
1947
1947
|
/** Props for {@link RadioGroup}, on top of React Aria's `RadioGroup` props. */
|
|
1948
1948
|
type RadioGroupProps = Omit<RadioGroupProps$1, 'children' | 'className'> & {
|
|
@@ -1957,14 +1957,14 @@ type RadioGroupProps = Omit<RadioGroupProps$1, 'children' | 'className'> & {
|
|
|
1957
1957
|
* supplying the same label / description / errorMessage slots as `Input`.
|
|
1958
1958
|
* Holds {@link Radio} children.
|
|
1959
1959
|
*/
|
|
1960
|
-
declare function RadioGroup(props: RadioGroupProps):
|
|
1960
|
+
declare function RadioGroup(props: RadioGroupProps): react.JSX.Element;
|
|
1961
1961
|
/** Props for {@link Radio}, on top of React Aria's `Radio` props. */
|
|
1962
1962
|
type RadioProps = Omit<RadioProps$1, 'className' | 'children'> & {
|
|
1963
1963
|
children?: ReactNode;
|
|
1964
1964
|
className?: string;
|
|
1965
1965
|
};
|
|
1966
1966
|
/** One choice in a {@link RadioGroup}. The label is passed as children. */
|
|
1967
|
-
declare function Radio({ children, className, ...rest }: RadioProps):
|
|
1967
|
+
declare function Radio({ children, className, ...rest }: RadioProps): react.JSX.Element;
|
|
1968
1968
|
|
|
1969
1969
|
/** Props for {@link NumberField}, on top of React Aria's `NumberField` props. */
|
|
1970
1970
|
type NumberFieldProps = Omit<NumberFieldProps$1, 'children' | 'className'> & {
|
|
@@ -2056,7 +2056,7 @@ type MenuButtonProps<T extends string = string> = {
|
|
|
2056
2056
|
* `shortcut` adds a kit tooltip reading `Name (⌘N)`, named by `aria-label` or
|
|
2057
2057
|
* a string `label`, as `Button` does; `tooltip` replaces that text.
|
|
2058
2058
|
*/
|
|
2059
|
-
declare function MenuButton<T extends string = string>({ label, items, onAction, isDisabled, className, 'aria-label': ariaLabel, portalContainer, shortcut, tooltip, }: MenuButtonProps<T>):
|
|
2059
|
+
declare function MenuButton<T extends string = string>({ label, items, onAction, isDisabled, className, 'aria-label': ariaLabel, portalContainer, shortcut, tooltip, }: MenuButtonProps<T>): react.JSX.Element;
|
|
2060
2060
|
|
|
2061
2061
|
/**
|
|
2062
2062
|
* One option in a {@link ComboBox}'s `options` list. `textValue` is the
|
|
@@ -2136,13 +2136,13 @@ type ComboBoxProps<T extends Key$1 = string> = Omit<ComboBoxProps$1<object>, 'ch
|
|
|
2136
2136
|
* type to filter; selection commits to `onSelectionChange`. When no value
|
|
2137
2137
|
* is in the input, selection clears (key becomes null).
|
|
2138
2138
|
*/
|
|
2139
|
-
declare function ComboBox<T extends Key$1 = string>(props: ComboBoxProps<T>):
|
|
2139
|
+
declare function ComboBox<T extends Key$1 = string>(props: ComboBoxProps<T>): react.JSX.Element;
|
|
2140
2140
|
/** Props for {@link ComboBoxItem}, on top of React Aria's `ListBoxItem` props. */
|
|
2141
2141
|
type ComboBoxItemProps = Omit<ListBoxItemProps, 'className'> & {
|
|
2142
2142
|
className?: string;
|
|
2143
2143
|
};
|
|
2144
2144
|
/** One row in a {@link ComboBox}'s filtered list. */
|
|
2145
|
-
declare function ComboBoxItem({ className, ...rest }: ComboBoxItemProps):
|
|
2145
|
+
declare function ComboBoxItem({ className, ...rest }: ComboBoxItemProps): react.JSX.Element;
|
|
2146
2146
|
|
|
2147
2147
|
/** Props for {@link RangeSlider}, on top of React Aria's `Slider` props. */
|
|
2148
2148
|
type RangeSliderProps = Omit<SliderProps$1, 'children' | 'className'> & {
|
|
@@ -2164,7 +2164,7 @@ type RangeSliderProps = Omit<SliderProps$1, 'children' | 'className'> & {
|
|
|
2164
2164
|
* *horizontal* axis here and collapses the track to its content width. Style
|
|
2165
2165
|
* the wrapper around one, not the root.
|
|
2166
2166
|
*/
|
|
2167
|
-
declare function RangeSlider(props: RangeSliderProps):
|
|
2167
|
+
declare function RangeSlider(props: RangeSliderProps): react.JSX.Element;
|
|
2168
2168
|
|
|
2169
2169
|
/** Props for {@link Dialog}, on top of React Aria's `ModalOverlay` props. */
|
|
2170
2170
|
type DialogProps = Omit<WithoutPortalTarget<ModalOverlayProps>, 'children' | 'className'> & OverlayPortalProps & StanceProps & {
|
|
@@ -2197,7 +2197,7 @@ type DialogProps = Omit<WithoutPortalTarget<ModalOverlayProps>, 'children' | 'cl
|
|
|
2197
2197
|
* underlying primitives. `stance` and `tone` work as on `<PropertyPanel>` —
|
|
2198
2198
|
* a destructive confirm is `stance="danger"`.
|
|
2199
2199
|
*/
|
|
2200
|
-
declare function Dialog(props: DialogProps):
|
|
2200
|
+
declare function Dialog(props: DialogProps): react.JSX.Element;
|
|
2201
2201
|
|
|
2202
2202
|
/** Props for {@link Callout}, on top of React Aria's `Popover` props. */
|
|
2203
2203
|
type CalloutProps = Omit<WithoutPortalTarget<PopoverProps>, 'children' | 'className' | 'isNonModal' | 'triggerRef'> & OverlayPortalProps & StanceProps & {
|
|
@@ -2251,7 +2251,7 @@ type CalloutProps = Omit<WithoutPortalTarget<PopoverProps>, 'children' | 'classN
|
|
|
2251
2251
|
* Wraps React Aria Popover + Dialog; positioning, collision flipping,
|
|
2252
2252
|
* dismissal, and focus behavior come from the underlying primitives.
|
|
2253
2253
|
*/
|
|
2254
|
-
declare function Callout(props: CalloutProps):
|
|
2254
|
+
declare function Callout(props: CalloutProps): react.JSX.Element;
|
|
2255
2255
|
|
|
2256
2256
|
/**
|
|
2257
2257
|
* Coordinate transforms (model ↔ plot) for Plot2D. Pure / deterministic —
|
|
@@ -2498,7 +2498,7 @@ interface CurveEditorProps {
|
|
|
2498
2498
|
* a `LayeredCurveEditor`. Reach for those directly to stack several curves
|
|
2499
2499
|
* on one plot.
|
|
2500
2500
|
*/
|
|
2501
|
-
declare function CurveEditor(props: CurveEditorProps):
|
|
2501
|
+
declare function CurveEditor(props: CurveEditorProps): react.JSX.Element;
|
|
2502
2502
|
|
|
2503
2503
|
/** Props for {@link PointPlotter}. */
|
|
2504
2504
|
interface PointPlotterProps {
|
|
@@ -2549,7 +2549,7 @@ interface PointPlotterProps {
|
|
|
2549
2549
|
* `'click-empty'` (CurveEditor defaults to `'click-curve'`, which
|
|
2550
2550
|
* doesn't make sense without a curve to hit-test against).
|
|
2551
2551
|
*/
|
|
2552
|
-
declare function PointPlotter(props: PointPlotterProps):
|
|
2552
|
+
declare function PointPlotter(props: PointPlotterProps): react.JSX.Element;
|
|
2553
2553
|
|
|
2554
2554
|
/**
|
|
2555
2555
|
* Options for {@link paintGradientTrack}.
|
|
@@ -2697,5 +2697,5 @@ type RovingTabIndex<T extends HTMLElement = HTMLDivElement> = {
|
|
|
2697
2697
|
*/
|
|
2698
2698
|
declare function useRovingTabIndex<T extends HTMLElement = HTMLDivElement>(options: UseRovingTabIndexOptions): RovingTabIndex<T>;
|
|
2699
2699
|
|
|
2700
|
-
export { ActionBar, Badge, ButtonBar, Callout, Checkbox, ColorModeControl, ComboBox, ComboBoxItem, CurveEditor, DataGrid, Dialog, Disclosure, DisclosureMark, DisclosureRow, DragGhost, DragHandleGlyph, EDGE_PROFILES, FieldOrientation, KeyCap, KeySequence, ListEditor, MenuButton, NumberField, OptionsBar, Plot2D, PointPlotter, Powerline, PrefRenderer, PrefsDialog, PrefsForm, Radio, RadioGroup, RangeSlider, Sidebar, SidebarPanel, Slider, Switch, Tab, TabList, TabPanel, Tabs, ToggleBarSize, ToggleBarVariant, ToolButton, ToolGroup, ToolPalette, chromaAt, detectPlatform, dlog, formatShortcut, formatShortcutParts, inferKeycapKind, isDebugEnabled, isPrefLeaf, keyGlyph, keySpecFromKey, keySpecsFromMods, keySpecsFromShortcut, oklchToHex, paintGradientTrack, prefValueAtPath, useAsyncOptions, useReorderDragList, useRovingTabIndex, visiblePrefSubtree };
|
|
2700
|
+
export { ActionBar, Badge, ButtonBar, Callout, Checkbox, ColorModeControl, ComboBox, ComboBoxItem, CurveEditor, DataGrid, Dialog, Disclosure, DisclosureMark, DisclosureRow, DragGhost, DragHandleGlyph, EDGE_PROFILES, FieldOrientation, KeyCap, KeySequence, ListEditor, MenuButton, NumberField, OptionsBar, OverlayPortalProps, Plot2D, PointPlotter, Powerline, PrefRenderer, PrefsDialog, PrefsForm, Radio, RadioGroup, RangeSlider, SegmentTooltipFields, Sidebar, SidebarPanel, Slider, StanceProps, Switch, Tab, TabList, TabPanel, Tabs, ToggleBarSize, ToggleBarVariant, ToolButton, ToolGroup, ToolPalette, WithoutPortalTarget, chromaAt, detectPlatform, dlog, formatShortcut, formatShortcutParts, inferKeycapKind, isDebugEnabled, isPrefLeaf, keyGlyph, keySpecFromKey, keySpecsFromMods, keySpecsFromShortcut, oklchToHex, paintGradientTrack, prefValueAtPath, useAsyncOptions, useReorderDragList, useRovingTabIndex, visiblePrefSubtree };
|
|
2701
2701
|
export type { ActionBarProps, AddPointMode, AnchorRenderProps, AsyncOption, AsyncOptionsResult, AxesSettings, BadgeProps, BadgeShape, BadgeSize, BadgeStatus, BadgeVariant, BoundsCtx, BuiltInEdgeName, ButtonBarItem, ButtonBarProps, ButtonBarSize, ButtonBarVariant, CalloutProps, CheckboxProps, ChromaCurve, ChromaCurvePoint, ColorModeControlProps, ComboBoxCommit, ComboBoxFilter, ComboBoxItemProps, ComboBoxOption, ComboBoxProps, ControlPoint, CurveDomain, CurveEditorProps, DataGridColumn, DataGridProps, DialogProps, DisclosureMarkProps, DisclosureProps, DisclosureRowProps, DragGhostProps, DragHandleGlyphProps, EdgeCap, EdgeProfile, EndpointMode, FillSettings, GradientTrackOpts, GridSettings, InterpolationMode, KeyCapProps, KeyCapVariant, KeySequenceProps, KeySpec, KeycapKind, ListEditorProps, LogicalMod, LogicalModSpec, MenuButtonItem, MenuButtonProps, NumberFieldProps, OptionsBarItem, OptionsBarProps, OptionsBarSize, OptionsBarVariant, Platform, Plot2DCoords, Plot2DHandle, Plot2DProps, PointPlotterProps, PowerlineProps, PowerlineSegment, PrefsDialogProps, PrefsFormProps, PrefsLayout, RadioGroupProps, RadioProps, RangeSliderProps, ReorderDragHandlers, ReorderDragState, ReorderGhost, RovingItem, RovingTabIndex, SidebarPanelProps, SidebarProps, SliderProps, SwitchProps, TabListProps, TabPanelProps, TabProps, TabsProps, Thumb, ThumbRenderCtx, ThumbShape, ToolButtonProps, ToolGroupProps, ToolPaletteProps, TrackCtx, UseAsyncOptionsProps, UseReorderDragListOptions, UseRovingTabIndexOptions };
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import '../chunk-SBXNQW4G.js';
|
|
2
|
-
export { v as ActionBar, Ht as Badge, c as Button, a7 as ButtonBar, g2 as Callout, u6 as CalloutTrigger,
|
|
2
|
+
export { v as ActionBar, Ht as Badge, c as Button, a7 as ButtonBar, g2 as Callout, u6 as CalloutTrigger, o3 as Checkbox, s3 as ColorModeControl, y2 as ComboBox, S3 as ComboBoxItem, L as CurveEditor, f as DataGrid, u3 as Dialog, i2 as Disclosure, r as DisclosureMark, a2 as DisclosureRow, a3 as DragGhost, n4 as DragHandleGlyph, Qe as EDGE_PROFILES, n5 as Field, n as ICON_PATHS, l as Icon, u4 as Input, f2 as KeyCap, p as KeySequence, D as LayerList, s2 as ListEditor, e2 as MINUS_SIGN, d2 as MenuButton, g as NumberField, r3 as OptionsBar, w as Plot2D, n9 as PointPlotter, r4 as Powerline, F2 as PrefsDialog, A2 as PrefsForm, u5 as Radio, l5 as RadioGroup, l8 as RangeSlider, T as Select, L2 as SelectItem, n6 as Sidebar, s5 as SidebarPanel, y as Slider, a6 as Switch, c5 as Tab, s6 as TabList, l7 as TabPanel, o5 as Tabs, a5 as ToggleBar, o4 as ToolButton, n8 as ToolGroup, h2 as ToolPalette, Z2 as chromaAt, o2 as detectPlatform, a as dlog, r2 as fieldClasses, t2 as formatNumber, n2 as formatShortcut, t as formatShortcutParts, d as inferKeycapKind, i as isDebugEnabled, s4 as isPrefLeaf, e as keyGlyph, l3 as keySpecFromKey, s as keySpecsFromMods, m as keySpecsFromShortcut, S2 as moveLayers, X2 as oklchToHex, v2 as paintGradientTrack, c2 as prefValueAtPath, Li as useAsyncOptions, u2 as useReorderDragList, a4 as useRovingTabIndex, l6 as visiblePrefSubtree } from '../chunk-TYN6MLXX.js';
|
|
3
|
+
import '../chunk-QGMOA2YE.js';
|
|
3
4
|
//# sourceMappingURL=weasel-ui.js.map
|
|
4
5
|
//# sourceMappingURL=weasel-ui.js.map
|
|
@@ -1,35 +1,11 @@
|
|
|
1
|
-
|
|
1
|
+
export { a as FloatingPanel, F as FloatingPanelProps } from '../_dts/FloatingPanel-7j0IcXwz.js';
|
|
2
|
+
import * as react from 'react';
|
|
2
3
|
import { ReactNode, MouseEventHandler } from 'react';
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
5
|
-
|
|
6
|
-
/** Props for `<FloatingPanel>`. */
|
|
7
|
-
interface FloatingPanelProps {
|
|
8
|
-
children: ReactNode;
|
|
9
|
-
/** Corner it rests in before it has ever been dragged. Default `'bottom-left'`. */
|
|
10
|
-
anchor?: Corner;
|
|
11
|
-
/** Corners that may capture it. Default: all four. */
|
|
12
|
-
snapCorners?: readonly Corner[];
|
|
13
|
-
/** Pixels in from a corner when snapped. Default 12. */
|
|
14
|
-
inset?: number;
|
|
15
|
-
/** Name to remember its position under, through `usePersistedState` — so it
|
|
16
|
-
* is remembered only inside a lab or a `<Persistence>`. Omit to forget on
|
|
17
|
-
* reload. */
|
|
18
|
-
persist?: string;
|
|
19
|
-
className?: string;
|
|
20
|
-
}
|
|
21
|
-
/**
|
|
22
|
-
* A draggable box that floats over its offset parent and snaps to its corners.
|
|
23
|
-
*
|
|
24
|
-
* Drives windease's `floatingStrategy` as a pure function rather than mounting a
|
|
25
|
-
* windease container: a lab overlay has one item and no zone tree, so the node
|
|
26
|
-
* model would be all cost. Pointer handling is therefore this component's, and
|
|
27
|
-
* windease's own affordance rendering never participates.
|
|
28
|
-
*/
|
|
29
|
-
declare function FloatingPanel({ children, anchor, snapCorners, inset, persist, className, }: FloatingPanelProps): react_jsx_runtime.JSX.Element;
|
|
4
|
+
import { JobHandle } from '../index.js';
|
|
5
|
+
import 'windease';
|
|
30
6
|
|
|
31
7
|
/** A live frame-rate readout, averaged over the last 30 frames. */
|
|
32
|
-
declare function FpsMeter():
|
|
8
|
+
declare function FpsMeter(): react.JSX.Element;
|
|
33
9
|
|
|
34
10
|
/** Props for `<JobProgress>`. */
|
|
35
11
|
interface JobProgressProps {
|
|
@@ -39,7 +15,7 @@ interface JobProgressProps {
|
|
|
39
15
|
/** A running job's progress, failures and outcome. Determinate once the job
|
|
40
16
|
* reports a total; a job that cannot count up front never sends one, so the
|
|
41
17
|
* bar stays indeterminate rather than inventing a denominator. */
|
|
42
|
-
declare function JobProgress({ job, className }: JobProgressProps):
|
|
18
|
+
declare function JobProgress({ job, className }: JobProgressProps): react.JSX.Element | null;
|
|
43
19
|
|
|
44
20
|
/** How a legend entry's swatch is drawn, matching how the thing looks on canvas. */
|
|
45
21
|
type LegendMark = 'line' | 'dash' | 'dot' | 'band';
|
|
@@ -57,7 +33,7 @@ interface LegendProps {
|
|
|
57
33
|
className?: string;
|
|
58
34
|
}
|
|
59
35
|
/** A color key. Presentational only — no handlers, no state, no hover behavior. */
|
|
60
|
-
declare function Legend({ entries, className }: LegendProps):
|
|
36
|
+
declare function Legend({ entries, className }: LegendProps): react.JSX.Element;
|
|
61
37
|
|
|
62
38
|
/** Props for `<ScaleIndicator>`. */
|
|
63
39
|
interface ScaleIndicatorProps {
|
|
@@ -73,7 +49,7 @@ interface ScaleIndicatorProps {
|
|
|
73
49
|
/** A scale bar: a labeled rule showing how far a round number of world units
|
|
74
50
|
* is at the current zoom. Reads the zoom from the surrounding canvas stack
|
|
75
51
|
* unless one is passed. */
|
|
76
|
-
declare function ScaleIndicator({ zoom, pixelsPerUnit, unit, targetWidth, }: ScaleIndicatorProps):
|
|
52
|
+
declare function ScaleIndicator({ zoom, pixelsPerUnit, unit, targetWidth, }: ScaleIndicatorProps): react.JSX.Element;
|
|
77
53
|
|
|
78
54
|
/** Props for `<Split>`. */
|
|
79
55
|
interface SplitProps {
|
|
@@ -120,16 +96,16 @@ interface SplitProps {
|
|
|
120
96
|
* arrows / Home / End, and clamped against the content pane's floor rather
|
|
121
97
|
* than against the sidebar's alone.
|
|
122
98
|
*/
|
|
123
|
-
declare function Split({ sidebar, children, side, label, className, sidebarClassName, contentClassName, width, defaultWidth, minWidth, maxWidth, contentMinWidth, onWidthChange, viewport, }: SplitProps):
|
|
99
|
+
declare function Split({ sidebar, children, side, label, className, sidebarClassName, contentClassName, width, defaultWidth, minWidth, maxWidth, contentMinWidth, onWidthChange, viewport, }: SplitProps): react.JSX.Element;
|
|
124
100
|
|
|
125
101
|
/** Props for `<StatusBar>`. */
|
|
126
102
|
interface StatusBarProps {
|
|
127
103
|
children: ReactNode;
|
|
128
104
|
}
|
|
129
105
|
/** A footer strip for readouts. Fill it with `<StatusBar.Section>`. */
|
|
130
|
-
declare function StatusBar({ children }: StatusBarProps):
|
|
106
|
+
declare function StatusBar({ children }: StatusBarProps): react.JSX.Element;
|
|
131
107
|
declare namespace StatusBar {
|
|
132
|
-
var Section: ({ children, end }: StatusBarSectionProps) =>
|
|
108
|
+
var Section: ({ children, end }: StatusBarSectionProps) => react.JSX.Element;
|
|
133
109
|
}
|
|
134
110
|
/** Props for `<StatusBar.Section>`. */
|
|
135
111
|
interface StatusBarSectionProps {
|
|
@@ -147,12 +123,12 @@ interface ToolbarProps {
|
|
|
147
123
|
}
|
|
148
124
|
/** A horizontal bar of controls. Fill it with `<Toolbar.Title>`,
|
|
149
125
|
* `<Toolbar.Group>`, `<Toolbar.Button>` and `<Toolbar.Spacer>`. */
|
|
150
|
-
declare function Toolbar({ children, 'aria-label': ariaLabel }: ToolbarProps):
|
|
126
|
+
declare function Toolbar({ children, 'aria-label': ariaLabel }: ToolbarProps): react.JSX.Element;
|
|
151
127
|
declare namespace Toolbar {
|
|
152
|
-
var Title: ({ children }: TitleProps) =>
|
|
153
|
-
var Group: ({ children, end, "aria-label": ariaLabel }: ToolbarGroupProps) =>
|
|
154
|
-
var Button: ({ children, onClick, disabled, title, "aria-label": ariaLabel, variant, iconOnly, pressed, }: ToolbarButtonProps) =>
|
|
155
|
-
var Spacer: () =>
|
|
128
|
+
var Title: ({ children }: TitleProps) => react.JSX.Element;
|
|
129
|
+
var Group: ({ children, end, "aria-label": ariaLabel }: ToolbarGroupProps) => react.JSX.Element;
|
|
130
|
+
var Button: ({ children, onClick, disabled, title, "aria-label": ariaLabel, variant, iconOnly, pressed, }: ToolbarButtonProps) => react.JSX.Element;
|
|
131
|
+
var Spacer: () => react.JSX.Element;
|
|
156
132
|
}
|
|
157
133
|
interface TitleProps {
|
|
158
134
|
children: ReactNode;
|
|
@@ -198,7 +174,7 @@ interface ZoomControlProps {
|
|
|
198
174
|
/** Zoom as a log-scaled slider with an editable percentage beside it. Pair it
|
|
199
175
|
* with zoom-in / zoom-out buttons in a `<Toolbar.Group>`; this component owns
|
|
200
176
|
* only the continuous part. */
|
|
201
|
-
declare function ZoomControl({ zoom, onZoomChange, onZoomCommit, min: minProp, max: maxProp, className, }: ZoomControlProps):
|
|
177
|
+
declare function ZoomControl({ zoom, onZoomChange, onZoomCommit, min: minProp, max: maxProp, className, }: ZoomControlProps): react.JSX.Element;
|
|
202
178
|
|
|
203
|
-
export {
|
|
204
|
-
export type {
|
|
179
|
+
export { FpsMeter, JobProgress, Legend, ScaleIndicator, Split, StatusBar, Toolbar, ZoomControl };
|
|
180
|
+
export type { JobProgressProps, LegendEntry, LegendMark, LegendProps, ScaleIndicatorProps, SplitProps, StatusBarProps, StatusBarSectionProps, ToolbarButtonProps, ToolbarGroupProps, ToolbarProps, ZoomControlProps };
|
package/dist/primitives/index.js
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
|
-
export {
|
|
2
|
-
export {
|
|
1
|
+
export { JobProgress, Legend, Split } from '../chunk-6FLXL3I7.js';
|
|
2
|
+
export { FloatingPanel } from '../chunk-NEXR37YJ.js';
|
|
3
|
+
export { FpsMeter, ScaleIndicator, StatusBar, Toolbar, ZoomControl } from '../chunk-SLAQPUI4.js';
|
|
3
4
|
import '../chunk-SBXNQW4G.js';
|
|
4
5
|
import '../chunk-RWNDDKOH.js';
|
|
5
6
|
import '../chunk-CQLQPQ4P.js';
|
|
6
7
|
import '../chunk-2YILQ7Y5.js';
|
|
7
|
-
import '../chunk-
|
|
8
|
+
import '../chunk-TYN6MLXX.js';
|
|
9
|
+
import '../chunk-QGMOA2YE.js';
|
|
8
10
|
//# sourceMappingURL=index.js.map
|
|
9
11
|
//# sourceMappingURL=index.js.map
|
package/dist/state/index.d.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
export { C as CURRENT_DOCUMENT_VERSION, I as IndexedDbAdapterOptions, L as LabStore, a as LabStoreActions, b as LabStoreContext, c as LabStoreProvider, O as OpenLabStoreOptions, d as OpenedLabStore, P as PersistedStateOptions, e as Persistence, f as PersistenceProps, R as RecordCache, g as RecordChange, T as TrialIdContext, h as TrialIdProvider, i as createIndexedDbAdapter, j as createLabStore, k as createMemoryAdapter, l as indexedDbAdapter, m as labDocumentKey, n as localStorageAdapter, o as noneAdapter, p as openLabStore, q as quarantineKey, s as sessionStorageAdapter, u as urlHashAdapter, r as useLabStore, t as usePersistedState, v as useTrialId, w as useTrialState } from '../_dts/useTrialState-
|
|
2
|
-
import { S as SerializedTrial, I as InstrumentSerializers, T as TrialRecord, U as UndoStack,
|
|
3
|
-
export { C as CreateLabStoreOptions,
|
|
4
|
-
import * as
|
|
1
|
+
export { C as CURRENT_DOCUMENT_VERSION, I as IndexedDbAdapterOptions, L as LabStore, a as LabStoreActions, b as LabStoreContext, c as LabStoreProvider, O as OpenLabStoreOptions, d as OpenedLabStore, P as PersistedStateOptions, e as Persistence, f as PersistenceProps, R as RecordCache, g as RecordChange, T as TrialIdContext, h as TrialIdProvider, i as createIndexedDbAdapter, j as createLabStore, k as createMemoryAdapter, l as indexedDbAdapter, m as labDocumentKey, n as localStorageAdapter, o as noneAdapter, p as openLabStore, q as quarantineKey, s as sessionStorageAdapter, u as urlHashAdapter, r as useLabStore, t as usePersistedState, v as useTrialId, w as useTrialState } from '../_dts/useTrialState-CMaV6UD4.js';
|
|
2
|
+
import { S as SerializedTrial, I as InstrumentSerializers, T as TrialRecord, U as UndoStack, c as StorageAdapter } from '../_dts/types-B7yBTTF9.js';
|
|
3
|
+
export { C as CreateLabStoreOptions, d as LabDocument, e as LabStoreState, M as Migration, f as SavedSnapshot, g as StorageChange, h as TrialStateHandle, i as UndockedPanel, j as UndockedPanels, k as dockPanel, p as panelKey, u as undockPanel } from '../_dts/types-B7yBTTF9.js';
|
|
4
|
+
import * as react from 'react';
|
|
5
5
|
import { ReactNode } from 'react';
|
|
6
6
|
import 'zustand/vanilla';
|
|
7
|
+
import '@weasel-js/core';
|
|
7
8
|
import '../_dts/PrefsRow.d-DFpPIeIC.js';
|
|
8
9
|
import '@weasel-js/theme';
|
|
9
|
-
import '
|
|
10
|
-
import '../_dts/types-B7y8hX1D.js';
|
|
10
|
+
import '../_dts/types-DTuViBvc.js';
|
|
11
11
|
import '../_dts/types-DJ79Tg5J.js';
|
|
12
12
|
|
|
13
13
|
/** The storage key a lab writes one of its buckets under. Namespaced by
|
|
@@ -50,7 +50,7 @@ interface SingletonExperimentProviderProps<TS, TC> {
|
|
|
50
50
|
* full `<Lab instruments={...}>` runtime. `storageKey` and `storage` are read
|
|
51
51
|
* once, at mount.
|
|
52
52
|
*/
|
|
53
|
-
declare function SingletonExperimentProvider<TS, TC>({ id, initialConfig, initialState, storage, storageKey, fallback, children, }: SingletonExperimentProviderProps<TS, TC>):
|
|
53
|
+
declare function SingletonExperimentProvider<TS, TC>({ id, initialConfig, initialState, storage, storageKey, fallback, children, }: SingletonExperimentProviderProps<TS, TC>): react.JSX.Element;
|
|
54
54
|
|
|
55
55
|
export { InstrumentSerializers, SerializedTrial, SingletonExperimentProvider, StorageAdapter, TrialRecord, UndoStack, decodeUrlHash, deserializeTrials, emptyUndoStack, encodeUrlHash, labStorageKey, serializeTrials };
|
|
56
56
|
export type { SingletonExperimentProviderProps };
|
package/dist/state/index.js
CHANGED
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
import { openLabStore } from '../chunk-
|
|
2
|
-
export { CURRENT_DOCUMENT_VERSION, createLabStore, dockPanel, labDocumentKey, openLabStore, panelKey, quarantineKey, undockPanel, useTrialState } from '../chunk-
|
|
1
|
+
import { openLabStore } from '../chunk-HKV7LRHY.js';
|
|
2
|
+
export { CURRENT_DOCUMENT_VERSION, createLabStore, dockPanel, labDocumentKey, openLabStore, panelKey, quarantineKey, undockPanel, useTrialState } from '../chunk-HKV7LRHY.js';
|
|
3
3
|
import { useWarnIgnoredChange, useOpenOnce, defaultStorage, PersistenceContext } from '../chunk-RWNDDKOH.js';
|
|
4
4
|
export { Persistence, createIndexedDbAdapter, createMemoryAdapter, decodeUrlHash, deserializeTrials, emptyUndoStack, encodeUrlHash, indexedDbAdapter, labStorageKey, localStorageAdapter, noneAdapter, serializeTrials, sessionStorageAdapter, urlHashAdapter, usePersistedState } from '../chunk-RWNDDKOH.js';
|
|
5
|
-
import '../chunk-
|
|
6
|
-
import '../chunk-
|
|
5
|
+
import '../chunk-O6FFFOHS.js';
|
|
6
|
+
import '../chunk-TJ77A4A3.js';
|
|
7
7
|
import { LabStoreProvider, TrialIdProvider } from '../chunk-2YILQ7Y5.js';
|
|
8
8
|
export { LabStoreContext, LabStoreProvider, TrialIdContext, TrialIdProvider, useLabStore, useTrialId } from '../chunk-2YILQ7Y5.js';
|
|
9
|
-
import '../chunk-WUJXJC5O.js';
|
|
10
9
|
import { jsx, Fragment } from 'react/jsx-runtime';
|
|
11
10
|
|
|
12
11
|
var SINGLETON_INSTRUMENT = "__singleton__";
|
package/dist/state/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/state/SingletonExperiment.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../../src/state/SingletonExperiment.tsx"],"names":[],"mappings":";;;;;;;;;;AAQA,IAAM,oBAAA,GAAuB,eAAA;AAwBtB,SAAS,2BAAA,CAAoC;AAAA,EAClD,EAAA;AAAA,EACA,aAAA;AAAA,EACA,YAAA;AAAA,EACA,OAAA;AAAA,EACA,UAAA;AAAA,EACA,QAAA,GAAW,IAAA;AAAA,EACX;AACF,CAAA,EAA6C;AAC3C,EAAA,oBAAA,CAAqB,+BAAA,EAAiC,EAAE,UAAA,EAAY,OAAA,EAAS,CAAA;AAC7E,EAAA,MAAM,MAAA,GAAS,YAAY,YAAY;AACrC,IAAA,MAAM,GAAA,GAAM,MAAM,YAAA,CAAa,EAAE,UAAA,EAAY,SAAS,OAAA,IAAY,MAAM,cAAA,EAAe,EAAI,CAAA;AAC3F,IAAA,IAAI,CAAC,GAAA,CAAI,KAAA,CAAM,QAAA,EAAS,CAAE,MAAA,CAAO,IAAA,CAAK,CAAC,CAAA,KAAM,CAAA,CAAE,EAAA,KAAO,EAAE,CAAA,EAAG;AACzD,MAAA,GAAA,CAAI,KAAA,CAAM,QAAA,EAAS,CAAE,QAAA,CAAS;AAAA,QAC5B,EAAA;AAAA,QACA,cAAA,EAAgB,oBAAA;AAAA,QAChB,MAAA,EAAQ,aAAA;AAAA,QACR,KAAA,EAAO,YAAA;AAAA,QACP,IAAA,EAAM,EAAE,IAAA,EAAM,CAAA,EAAG,GAAA,EAAK,EAAE,CAAA,EAAG,CAAA,EAAG,CAAA,EAAG,CAAA,EAAE;AAAE,OACtC,CAAA;AAAA,IACH;AACA,IAAA,OAAO,GAAA;AAAA,EACT,CAAC,CAAA;AACD,EAAA,IAAI,CAAC,MAAA,EAAQ,uBAAO,GAAA,CAAA,QAAA,EAAA,EAAG,QAAA,EAAA,QAAA,EAAS,CAAA;AAChC,EAAA,2BACG,gBAAA,EAAA,EAAiB,KAAA,EAAO,OAAO,KAAA,EAC9B,QAAA,kBAAA,GAAA,CAAC,mBAAmB,QAAA,EAAnB,EAA4B,KAAA,EAAO,MAAA,CAAO,SACzC,QAAA,kBAAA,GAAA,CAAC,eAAA,EAAA,EAAgB,SAAS,EAAA,EAAK,QAAA,EAAS,GAC1C,CAAA,EACF,CAAA;AAEJ","file":"index.js","sourcesContent":["import type { ReactNode } from 'react';\nimport { defaultStorage } from './adapters';\nimport { LabStoreProvider, TrialIdProvider } from './context';\nimport { openLabStore } from './openLabStore';\nimport { PersistenceContext } from './Persistence';\nimport type { StorageAdapter } from './types';\nimport { useOpenOnce, useWarnIgnoredChange } from './useOpenOnce';\n\nconst SINGLETON_INSTRUMENT = '__singleton__';\n\n/** Props for `<SingletonExperimentProvider>`. */\nexport interface SingletonExperimentProviderProps<TS, TC> {\n /** Stable id for the synthetic trial; also doubles as the\n * TrialIdContext value. */\n id: string;\n initialConfig: TC;\n initialState: TS;\n storageKey: string;\n /** Default: IndexedDB, or localStorage where IndexedDB will not open. */\n storage?: StorageAdapter;\n /** Rendered until the stored experiment has loaded. Default: nothing. */\n fallback?: ReactNode;\n children: ReactNode;\n}\n\n/**\n * One-trial `<Lab>` substitute for single-screen experiments. Mounts\n * a `LabStoreProvider` + `TrialIdProvider` with one synthetic\n * trial, so `useTrialState` works without going through the\n * full `<Lab instruments={...}>` runtime. `storageKey` and `storage` are read\n * once, at mount.\n */\nexport function SingletonExperimentProvider<TS, TC>({\n id,\n initialConfig,\n initialState,\n storage,\n storageKey,\n fallback = null,\n children,\n}: SingletonExperimentProviderProps<TS, TC>) {\n useWarnIgnoredChange('<SingletonExperimentProvider>', { storageKey, storage });\n const opened = useOpenOnce(async () => {\n const lab = await openLabStore({ storageKey, storage: storage ?? (await defaultStorage()) });\n if (!lab.store.getState().trials.some((w) => w.id === id)) {\n lab.store.getState().addTrial({\n id,\n instrumentName: SINGLETON_INSTRUMENT,\n config: initialConfig,\n state: initialState,\n view: { zoom: 1, pan: { x: 0, y: 0 } },\n });\n }\n return lab;\n });\n if (!opened) return <>{fallback}</>;\n return (\n <LabStoreProvider store={opened.store}>\n <PersistenceContext.Provider value={opened.records}>\n <TrialIdProvider trialId={id}>{children}</TrialIdProvider>\n </PersistenceContext.Provider>\n </LabStoreProvider>\n );\n}\n"]}
|