@weasel-js/labkit 1.5.2 → 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/README.md +3 -7
- package/dist/_dts/{CanvasStackContext-CMMo180l.d.ts → CanvasStackContext-Wo6OwIVM.d.ts} +1 -1
- package/dist/_dts/FloatingPanel-7j0IcXwz.d.ts +30 -0
- package/dist/_dts/LayerList.d-BoELAMsM.d.ts +83 -0
- package/dist/_dts/{PrefsForm.d-DPy9I8It.d.ts → PrefsRow.d-DFpPIeIC.d.ts} +16 -1
- package/dist/_dts/PropertyField.d-D0ndfIIt.d.ts +404 -0
- package/dist/_dts/{Select.d-ZTiwzYyT.d.ts → Select.d-Cr8-zoup.d.ts} +105 -15
- package/dist/_dts/{usePanZoom-SSTZe410.d.ts → Stage-DWBBi8IU.d.ts} +80 -35
- package/dist/_dts/{index-DlKolEIZ.d.ts → index-CKyX0ME_.d.ts} +12 -13
- package/dist/_dts/{frac-B4hFJMiN.d.ts → types-B7yBTTF9.d.ts} +709 -651
- package/dist/_dts/{types-Db-3NNk1.d.ts → types-DTuViBvc.d.ts} +21 -2
- package/dist/_dts/{useTrialState-pnAE-UBD.d.ts → useTrialState-CMaV6UD4.d.ts} +2 -3
- package/dist/canvas/index.d.ts +41 -8
- package/dist/canvas/index.js +5 -3
- package/dist/chrome/index.d.ts +6 -6
- package/dist/chrome/index.js +9 -7
- package/dist/chunk-24W5VEJW.js +18 -0
- package/dist/chunk-24W5VEJW.js.map +1 -0
- package/dist/chunk-2RVCB2PT.js +3 -0
- package/dist/chunk-2RVCB2PT.js.map +1 -0
- package/dist/chunk-3RY6WL5T.js +38 -0
- package/dist/chunk-3RY6WL5T.js.map +1 -0
- package/dist/{chunk-CKUKF72R.js → chunk-4TT3PNPR.js} +68 -55
- package/dist/chunk-4TT3PNPR.js.map +1 -0
- package/dist/{chunk-KJCUERQF.js → chunk-6FLXL3I7.js} +9 -164
- package/dist/chunk-6FLXL3I7.js.map +1 -0
- package/dist/chunk-ASOK76ZH.js +431 -0
- 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-GHGO52SO.js +92 -0
- package/dist/chunk-GHGO52SO.js.map +1 -0
- package/dist/{chunk-LRI3MBGR.js → chunk-HKV7LRHY.js} +4 -4
- package/dist/{chunk-LRI3MBGR.js.map → chunk-HKV7LRHY.js.map} +1 -1
- package/dist/{chunk-EMXAIRUJ.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-A2ACAGW6.js → chunk-O6FFFOHS.js} +32 -7
- 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-753Y6HE6.js → chunk-SLAQPUI4.js} +4 -4
- package/dist/chunk-SLAQPUI4.js.map +1 -0
- package/dist/{chunk-REOBGYMC.js → chunk-TJ77A4A3.js} +3 -5
- package/dist/chunk-TJ77A4A3.js.map +1 -0
- package/dist/chunk-TYN6MLXX.js +13864 -0
- 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 +51 -7
- package/dist/config/index.js +4 -5
- package/dist/controls/index.d.ts +92 -5
- package/dist/controls/index.js +5 -4
- package/dist/dragdrop/index.d.ts +9 -6
- package/dist/dragdrop/index.js +3 -2
- package/dist/index.d.ts +108 -154
- package/dist/index.js +456 -600
- package/dist/index.js.map +1 -1
- package/dist/layers/index.d.ts +5 -35
- package/dist/layers/index.js +3 -3
- package/dist/loupe/index.d.ts +21 -17
- 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 +434 -231
- package/dist/passthrough/weasel-ui.js +2 -1
- package/dist/primitives/index.d.ts +19 -54
- package/dist/primitives/index.js +6 -4
- package/dist/state/index.d.ts +8 -7
- package/dist/state/index.js +4 -5
- package/dist/state/index.js.map +1 -1
- package/dist/styles.css +360 -174
- package/dist/undo/index.d.ts +5 -4
- package/package.json +13 -13
- package/src/annotations/frac.test.ts +7 -0
- package/src/annotations/index.ts +1 -0
- package/src/annotations/paint.test.ts +21 -0
- package/src/annotations/paint.ts +12 -0
- package/src/annotations/store.test.ts +57 -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 +30 -2
- 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.test.tsx +18 -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.less +197 -0
- package/src/chrome/regions/SidebarRegion.test.tsx +27 -0
- package/src/chrome/regions/SidebarRegion.tsx +7 -2
- package/src/chrome/types.ts +5 -2
- package/src/config/autoConfig.ts +2 -2
- package/src/config/builder.ts +21 -2
- package/src/config/entry.test.ts +10 -0
- package/src/config/fromConfigField.ts +1 -0
- package/src/config/index.ts +5 -0
- package/src/config/resolve.ts +11 -1
- package/src/config/rules.ts +2 -0
- package/src/config/sectionTree.test.ts +152 -0
- package/src/config/sectionTree.ts +134 -0
- package/src/config/types.ts +21 -0
- package/src/controls/ControlPanel.less +4 -0
- package/src/controls/ControlPanel.stories.tsx +55 -2
- package/src/controls/ControlPanel.test.tsx +40 -3
- package/src/controls/ControlPanel.tsx +134 -336
- package/src/controls/inDialog.test.tsx +100 -0
- package/src/controls/inDialog.tsx +38 -0
- package/src/controls/index.ts +1 -0
- package/src/index.test.ts +1 -1
- package/src/index.ts +18 -29
- package/src/instrument/SineWave.smoke.test.tsx +2 -0
- package/src/instrument/types.ts +15 -3
- package/src/lab/Lab.nebula.test.tsx +40 -0
- package/src/lab/Lab.test.tsx +3 -1
- package/src/lab/Lab.tsx +42 -19
- package/src/lab/LabBoundary.test.tsx +66 -0
- package/src/lab/LabBoundary.tsx +56 -0
- package/src/lab/LabHeader.tsx +4 -23
- package/src/lab/LabRoot.tsx +2 -3
- package/src/lab/LabShell.less +0 -1
- package/src/lab/LabShell.stories.tsx +15 -0
- package/src/lab/LabShell.test.tsx +18 -0
- package/src/lab/LabShell.tsx +14 -1
- package/src/lab/LabSwitcher.less +1 -1
- package/src/lab/LabSwitcher.test.tsx +41 -0
- package/src/lab/LabSwitcher.tsx +30 -8
- package/src/lab/index.ts +1 -0
- package/src/layers/AGENTS.md +18 -74
- package/src/layers/index.ts +4 -2
- 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 +32 -10
- package/src/primitives/index.ts +0 -2
- package/src/specimen/Specimen.tsx +59 -56
- package/src/state/labRecords.test.ts +4 -1
- package/src/state/store.test.ts +4 -4
- package/src/state/types.ts +2 -1
- package/src/state/useTrialState.test.tsx +1 -1
- package/src/styles.less +6 -2
- package/src/theme/Interstellar.stories.tsx +8 -13
- package/src/theme/base.less +3 -20
- package/src/theme/interstellar.test.ts +6 -3
- package/src/theme/interstellar.theme.json +0 -56
- package/src/theme/interstellar.ts +2 -2
- package/src/tools/labTool.ts +6 -2
- package/src/trial/Trial.annotations.test.tsx +16 -0
- package/src/trial/Trial.canvas.test.tsx +1 -1
- package/src/trial/Trial.loupe.test.tsx +73 -1
- package/src/trial/Trial.stories.tsx +2 -0
- package/src/trial/Trial.tsx +47 -9
- package/src/trial/trialOps.test.ts +4 -4
- package/dist/_dts/index-8LiKe3A-.d.ts +0 -410
- package/dist/chunk-2AYGEN57.js +0 -32
- package/dist/chunk-2AYGEN57.js.map +0 -1
- package/dist/chunk-6BUQ77ZV.js +0 -18
- package/dist/chunk-6BUQ77ZV.js.map +0 -1
- package/dist/chunk-753Y6HE6.js.map +0 -1
- package/dist/chunk-A2ACAGW6.js.map +0 -1
- package/dist/chunk-CKUKF72R.js.map +0 -1
- package/dist/chunk-D35PFTS7.js +0 -170
- package/dist/chunk-D35PFTS7.js.map +0 -1
- package/dist/chunk-EMXAIRUJ.js.map +0 -1
- package/dist/chunk-ERFMC6WU.js.map +0 -1
- package/dist/chunk-FKLT3ITC.js +0 -590
- package/dist/chunk-FKLT3ITC.js.map +0 -1
- package/dist/chunk-KJCUERQF.js.map +0 -1
- package/dist/chunk-LASCBWW7.js +0 -13456
- package/dist/chunk-LASCBWW7.js.map +0 -1
- package/dist/chunk-REOBGYMC.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/ui/layers/index.d.ts +0 -66
- package/dist/ui/layers/index.js +0 -3
- package/dist/ui/layers/index.js.map +0 -1
- package/src/canvas/usePanZoom.test.ts +0 -244
- package/src/canvas/usePanZoom.ts +0 -147
- package/src/lab/useSystemMode.ts +0 -30
- package/src/layers/LayerList.less +0 -93
- package/src/layers/LayerList.stories.tsx +0 -66
- package/src/layers/LayerList.test.tsx +0 -232
- package/src/layers/LayerList.tsx +0 -268
- package/src/primitives/Sidebar.less +0 -112
- package/src/primitives/Sidebar.stories.tsx +0 -38
- package/src/primitives/Sidebar.test.tsx +0 -74
- package/src/primitives/Sidebar.tsx +0 -35
- package/src/ui/layers/index.ts +0 -5
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import '../chunk-SBXNQW4G.js';
|
|
2
|
-
export {
|
|
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,18 +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):
|
|
77
|
-
|
|
78
|
-
/** Props for `<Sidebar>`. */
|
|
79
|
-
interface SidebarProps {
|
|
80
|
-
children: ReactNode;
|
|
81
|
-
title?: string;
|
|
82
|
-
collapsed?: boolean;
|
|
83
|
-
onToggle?: () => void;
|
|
84
|
-
}
|
|
85
|
-
/** A collapsible side panel with an optional title. Collapse state is the
|
|
86
|
-
* caller's to hold. */
|
|
87
|
-
declare function Sidebar({ children, title, collapsed, onToggle }: SidebarProps): react_jsx_runtime.JSX.Element;
|
|
52
|
+
declare function ScaleIndicator({ zoom, pixelsPerUnit, unit, targetWidth, }: ScaleIndicatorProps): react.JSX.Element;
|
|
88
53
|
|
|
89
54
|
/** Props for `<Split>`. */
|
|
90
55
|
interface SplitProps {
|
|
@@ -131,16 +96,16 @@ interface SplitProps {
|
|
|
131
96
|
* arrows / Home / End, and clamped against the content pane's floor rather
|
|
132
97
|
* than against the sidebar's alone.
|
|
133
98
|
*/
|
|
134
|
-
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;
|
|
135
100
|
|
|
136
101
|
/** Props for `<StatusBar>`. */
|
|
137
102
|
interface StatusBarProps {
|
|
138
103
|
children: ReactNode;
|
|
139
104
|
}
|
|
140
105
|
/** A footer strip for readouts. Fill it with `<StatusBar.Section>`. */
|
|
141
|
-
declare function StatusBar({ children }: StatusBarProps):
|
|
106
|
+
declare function StatusBar({ children }: StatusBarProps): react.JSX.Element;
|
|
142
107
|
declare namespace StatusBar {
|
|
143
|
-
var Section: ({ children, end }: StatusBarSectionProps) =>
|
|
108
|
+
var Section: ({ children, end }: StatusBarSectionProps) => react.JSX.Element;
|
|
144
109
|
}
|
|
145
110
|
/** Props for `<StatusBar.Section>`. */
|
|
146
111
|
interface StatusBarSectionProps {
|
|
@@ -158,12 +123,12 @@ interface ToolbarProps {
|
|
|
158
123
|
}
|
|
159
124
|
/** A horizontal bar of controls. Fill it with `<Toolbar.Title>`,
|
|
160
125
|
* `<Toolbar.Group>`, `<Toolbar.Button>` and `<Toolbar.Spacer>`. */
|
|
161
|
-
declare function Toolbar({ children, 'aria-label': ariaLabel }: ToolbarProps):
|
|
126
|
+
declare function Toolbar({ children, 'aria-label': ariaLabel }: ToolbarProps): react.JSX.Element;
|
|
162
127
|
declare namespace Toolbar {
|
|
163
|
-
var Title: ({ children }: TitleProps) =>
|
|
164
|
-
var Group: ({ children, end, "aria-label": ariaLabel }: ToolbarGroupProps) =>
|
|
165
|
-
var Button: ({ children, onClick, disabled, title, "aria-label": ariaLabel, variant, iconOnly, pressed, }: ToolbarButtonProps) =>
|
|
166
|
-
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;
|
|
167
132
|
}
|
|
168
133
|
interface TitleProps {
|
|
169
134
|
children: ReactNode;
|
|
@@ -209,7 +174,7 @@ interface ZoomControlProps {
|
|
|
209
174
|
/** Zoom as a log-scaled slider with an editable percentage beside it. Pair it
|
|
210
175
|
* with zoom-in / zoom-out buttons in a `<Toolbar.Group>`; this component owns
|
|
211
176
|
* only the continuous part. */
|
|
212
|
-
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;
|
|
213
178
|
|
|
214
|
-
export {
|
|
215
|
-
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';
|
|
4
|
+
import '../chunk-SBXNQW4G.js';
|
|
3
5
|
import '../chunk-RWNDDKOH.js';
|
|
4
6
|
import '../chunk-CQLQPQ4P.js';
|
|
5
7
|
import '../chunk-2YILQ7Y5.js';
|
|
6
|
-
import '../chunk-
|
|
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,12 +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, c as StorageAdapter } from '../_dts/
|
|
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 '../_dts/types-Db-3NNk1.js';
|
|
8
7
|
import '@weasel-js/core';
|
|
9
|
-
import '../_dts/
|
|
8
|
+
import '../_dts/PrefsRow.d-DFpPIeIC.js';
|
|
9
|
+
import '@weasel-js/theme';
|
|
10
|
+
import '../_dts/types-DTuViBvc.js';
|
|
10
11
|
import '../_dts/types-DJ79Tg5J.js';
|
|
11
12
|
|
|
12
13
|
/** The storage key a lab writes one of its buckets under. Namespaced by
|
|
@@ -49,7 +50,7 @@ interface SingletonExperimentProviderProps<TS, TC> {
|
|
|
49
50
|
* full `<Lab instruments={...}>` runtime. `storageKey` and `storage` are read
|
|
50
51
|
* once, at mount.
|
|
51
52
|
*/
|
|
52
|
-
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;
|
|
53
54
|
|
|
54
55
|
export { InstrumentSerializers, SerializedTrial, SingletonExperimentProvider, StorageAdapter, TrialRecord, UndoStack, decodeUrlHash, deserializeTrials, emptyUndoStack, encodeUrlHash, labStorageKey, serializeTrials };
|
|
55
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-LASCBWW7.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"]}
|