@weasel-js/labkit 1.7.0 → 1.7.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -3
- package/dist/_dts/{CanvasStackContext-D2jnIwfk.d.ts → CanvasStackContext-Cjy6I-Iv.d.ts} +4 -1
- package/dist/_dts/{Stage-CCWfQQWM.d.ts → Stage-D6t7o0pF.d.ts} +3 -2
- package/dist/_dts/{index-CsYqUHD3.d.ts → index-BTmaRy6a.d.ts} +10 -6
- package/dist/_dts/{types-CSm9jgol.d.ts → index-DCMA4Fy1.d.ts} +59 -113
- package/dist/_dts/{types-CRPSGFAp.d.ts → types-BUBSIZuV.d.ts} +8 -7
- package/dist/_dts/{useTrialState-CTZPgeZ7.d.ts → useTrialState-Bh8bzFgE.d.ts} +1 -1
- package/dist/canvas/index.d.ts +8 -6
- package/dist/canvas/index.js +6 -6
- package/dist/chrome/index.d.ts +7 -5
- package/dist/chrome/index.js +10 -9
- package/dist/chunk-2ES4W47N.js +8 -0
- package/dist/chunk-2ES4W47N.js.map +1 -0
- package/dist/{chunk-WPLAANH4.js → chunk-2N7UBSS2.js} +12 -12
- package/dist/chunk-2N7UBSS2.js.map +1 -0
- package/dist/chunk-4KSC7NXL.js +15491 -0
- package/dist/chunk-4KSC7NXL.js.map +1 -0
- package/dist/{chunk-7BO7HNGF.js → chunk-CEGFXTBD.js} +8 -61
- package/dist/chunk-CEGFXTBD.js.map +1 -0
- package/dist/{chunk-275JRRVD.js → chunk-E23Q6A3Y.js} +232 -37
- package/dist/chunk-E23Q6A3Y.js.map +1 -0
- package/dist/{chunk-GOZLNM4L.js → chunk-E6NARGU7.js} +5 -5
- package/dist/{chunk-GOZLNM4L.js.map → chunk-E6NARGU7.js.map} +1 -1
- package/dist/{chunk-IJJUK4FU.js → chunk-EESJUSYR.js} +5 -6
- package/dist/chunk-EESJUSYR.js.map +1 -0
- package/dist/{chunk-HXXTULDN.js → chunk-EFXRM6XQ.js} +8 -11
- package/dist/chunk-EFXRM6XQ.js.map +1 -0
- package/dist/chunk-F4ACIK7Z.js +210 -0
- package/dist/chunk-F4ACIK7Z.js.map +1 -0
- package/dist/{chunk-FMK7UQ6V.js → chunk-FB4MIZOO.js} +61 -44
- package/dist/chunk-FB4MIZOO.js.map +1 -0
- package/dist/{chunk-AWQG7FCC.js → chunk-FG3EXZDV.js} +3 -3
- package/dist/{chunk-AWQG7FCC.js.map → chunk-FG3EXZDV.js.map} +1 -1
- package/dist/{chunk-I5DUQ5HM.js → chunk-GAHELLJT.js} +75 -72
- package/dist/chunk-GAHELLJT.js.map +1 -0
- package/dist/{chunk-YT75VYRD.js → chunk-IBVRMHW5.js} +5 -5
- package/dist/{chunk-YT75VYRD.js.map → chunk-IBVRMHW5.js.map} +1 -1
- package/dist/{chunk-T5IBSPAM.js → chunk-JFOJESJF.js} +33 -23
- package/dist/chunk-JFOJESJF.js.map +1 -0
- package/dist/{chunk-RWNDDKOH.js → chunk-PMLZP7RT.js} +18 -15
- package/dist/chunk-PMLZP7RT.js.map +1 -0
- package/dist/{chunk-Y23G2VZL.js → chunk-READTDQX.js} +2 -2
- package/dist/chunk-READTDQX.js.map +1 -0
- package/dist/{chunk-JVBYV6TL.js → chunk-ROGJWDQA.js} +3 -3
- package/dist/{chunk-JVBYV6TL.js.map → chunk-ROGJWDQA.js.map} +1 -1
- package/dist/{chunk-ZIFPHIWZ.js → chunk-T6DLGEJB.js} +12 -14
- package/dist/chunk-T6DLGEJB.js.map +1 -0
- package/dist/{chunk-24W5VEJW.js → chunk-ULYYNWGP.js} +2 -2
- package/dist/{chunk-24W5VEJW.js.map → chunk-ULYYNWGP.js.map} +1 -1
- package/dist/{chunk-UNAZSLWE.js → chunk-VYVGVBGY.js} +17 -20
- package/dist/chunk-VYVGVBGY.js.map +1 -0
- package/dist/{chunk-KMJ7RWD3.js → chunk-WLMDTI2Q.js} +3 -3
- package/dist/{chunk-KMJ7RWD3.js.map → chunk-WLMDTI2Q.js.map} +1 -1
- package/dist/{chunk-J7OWWTCW.js → chunk-XE5HJOPL.js} +5 -6
- package/dist/chunk-XE5HJOPL.js.map +1 -0
- package/dist/chunk-XVUKDSYV.js +38 -0
- package/dist/chunk-XVUKDSYV.js.map +1 -0
- package/dist/{chunk-FZ7YFQN7.js → chunk-YCFKW5RX.js} +3 -3
- package/dist/chunk-YCFKW5RX.js.map +1 -0
- package/dist/{chunk-CQLQPQ4P.js → chunk-ZQIHJXP4.js} +2 -2
- package/dist/chunk-ZQIHJXP4.js.map +1 -0
- package/dist/config/index.d.ts +18 -10
- package/dist/config/index.js +4 -4
- package/dist/controls/index.d.ts +4 -7
- package/dist/controls/index.js +6 -5
- package/dist/dragdrop/index.d.ts +23 -3
- package/dist/dragdrop/index.js +4 -3
- package/dist/fonts/oswald-tabular-digits.woff2 +0 -0
- package/dist/index.d.ts +60 -714
- package/dist/index.js +357 -334
- package/dist/index.js.map +1 -1
- package/dist/job/index.d.ts +8 -0
- package/dist/job/index.js +1 -1
- package/dist/layers/index.d.ts +6 -5
- package/dist/layers/index.js +3 -2
- package/dist/loupe/index.d.ts +100 -30
- package/dist/loupe/index.js +585 -6
- package/dist/loupe/index.js.map +1 -1
- package/dist/overview/index.d.ts +4 -2
- package/dist/overview/index.js +15 -14
- package/dist/overview/index.js.map +1 -1
- package/dist/passthrough/weasel-canvas.d.ts +2 -0
- package/dist/passthrough/weasel-ui.d.ts +2 -2871
- package/dist/passthrough/weasel-ui.js +3 -2
- package/dist/primitives/index.d.ts +213 -3
- package/dist/primitives/index.js +8 -7
- package/dist/state/index.d.ts +7 -5
- package/dist/state/index.js +6 -6
- package/dist/styles.css +60 -44
- package/dist/surface/index.d.ts +10 -2
- package/dist/surface/index.js +1 -1
- package/dist/undo/index.d.ts +5 -3
- package/package.json +11 -11
- package/src/annotations/AnnotationOverlay.abandon.test.tsx +143 -0
- package/src/annotations/AnnotationOverlay.tsx +50 -31
- package/src/annotations/Annotations.overlay.test.tsx +31 -0
- package/src/annotations/capture.browser.test.ts +41 -0
- package/src/annotations/capture.ts +14 -7
- package/src/annotations/drawOne.ts +2 -2
- package/src/annotations/frac.test.ts +44 -1
- package/src/annotations/frac.ts +46 -18
- package/src/annotations/index.ts +1 -0
- package/src/annotations/paint.test.ts +74 -33
- package/src/annotations/paint.ts +70 -32
- package/src/annotations/store.test.ts +212 -2
- package/src/annotations/store.ts +130 -27
- package/src/annotations/svgNodes.test.ts +22 -10
- package/src/annotations/svgNodes.ts +3 -3
- package/src/annotations/types.ts +29 -10
- package/src/canvas/CameraInput.test.tsx +30 -0
- package/src/canvas/CameraInput.tsx +16 -15
- package/src/canvas/CanvasStack.tsx +5 -5
- package/src/canvas/CanvasStackContext.ts +4 -1
- package/src/canvas/Stage.tsx +3 -3
- package/src/canvas/cameraRegistry.ts +1 -0
- package/src/canvas/worldSpec.ts +3 -1
- package/src/chrome/builtins.test.ts +7 -6
- package/src/chrome/builtins.tsx +5 -1
- package/src/chrome/index.ts +1 -1
- package/src/chrome/merge.test.ts +5 -0
- package/src/chrome/merge.ts +4 -2
- package/src/chrome/regions/PaletteRegion.test.tsx +2 -3
- package/src/chrome/regions/PaletteRegion.tsx +3 -4
- package/src/chrome/regions/ViewportRegion.browser.test.less +6 -0
- package/src/chrome/regions/ViewportRegion.browser.test.tsx +38 -0
- package/src/chrome/regions/ViewportRegion.less +6 -0
- package/src/chrome/regions/ViewportRegion.tsx +10 -4
- package/src/chrome/types.ts +4 -2
- package/src/config/auto.ts +1 -0
- package/src/config/builder.ts +6 -0
- package/src/config/types.ts +2 -1
- package/src/controls/ControlPanel.test.tsx +37 -3
- package/src/controls/ControlPanel.tsx +12 -3
- package/src/dragdrop/DragDropRuntime.tsx +22 -13
- package/src/dragdrop/DragGhost.tsx +3 -0
- package/src/dragdrop/Palette.tsx +2 -0
- package/src/index.test.ts +5 -0
- package/src/index.ts +1 -1
- package/src/instrument/types.ts +0 -6
- package/src/job/useJob.ts +14 -9
- package/src/lab/Lab.tsx +5 -1
- package/src/lab/LabShell.less +1 -0
- package/src/lab/LabSwitcher.browser.test.tsx +27 -0
- package/src/lab/LabSwitcher.less +2 -0
- package/src/lab/LabZoom.tsx +4 -4
- package/src/lab/Workspace.tsx +48 -52
- package/src/loupe/AGENTS.md +28 -15
- package/src/loupe/CanvasLoupe.tsx +2 -3
- package/src/loupe/DomLoupe.tsx +1 -7
- package/src/loupe/Loupe.less +16 -0
- package/src/loupe/TrialLoupe.tsx +120 -57
- package/src/loupe/index.ts +1 -6
- package/src/loupe/types.test.ts +3 -3
- package/src/loupe/types.ts +24 -27
- package/src/loupe/useLoupe.test.tsx +29 -4
- package/src/loupe/useLoupe.ts +20 -17
- package/src/overview/OverviewMarks.tsx +12 -4
- package/src/overview/TrialOverview.tsx +3 -3
- package/src/passthrough/weasel-ui.test.ts +1 -1
- package/src/passthrough/weasel-ui.ts +1 -1
- package/src/primitives/FloatingPanel.tsx +7 -3
- package/src/primitives/JobProgress.less +1 -0
- package/src/primitives/Readout.test.tsx +2 -2
- package/src/primitives/Split.tsx +69 -41
- package/src/primitives/Toolbar.tsx +3 -3
- package/src/primitives/ZoomControl.less +1 -2
- package/src/specimen/Specimen.tsx +0 -1
- package/src/state/undock.ts +3 -0
- package/src/state/useOpenOnce.ts +20 -16
- package/src/state/view.ts +1 -0
- package/src/surface/index.ts +1 -1
- package/src/surface/useTiledSurface.test.tsx +14 -0
- package/src/surface/useTiledSurface.ts +11 -3
- package/src/trial/Trial.annotations.test.tsx +73 -0
- package/src/trial/Trial.less +0 -16
- package/src/trial/Trial.loupe.test.tsx +28 -11
- package/src/trial/Trial.tsx +74 -62
- package/src/trial/TrialChrome.tsx +6 -3
- package/src/trial/index.ts +2 -0
- package/src/trial/loupeSwitch.ts +15 -0
- package/dist/_dts/LayerList.d-DiuEArKq.d.ts +0 -83
- package/dist/_dts/PrefsRow.d-TOZ7BgD9.d.ts +0 -79
- package/dist/_dts/PropertyPanel.d-D-1paCbE.d.ts +0 -141
- package/dist/_dts/Select.d-Bensr_MT.d.ts +0 -579
- package/dist/_dts/index-B2Yj5aA0.d.ts +0 -274
- package/dist/chunk-275JRRVD.js.map +0 -1
- package/dist/chunk-4LJSC7MB.js +0 -143
- package/dist/chunk-4LJSC7MB.js.map +0 -1
- package/dist/chunk-7BO7HNGF.js.map +0 -1
- package/dist/chunk-CQLQPQ4P.js.map +0 -1
- package/dist/chunk-FMK7UQ6V.js.map +0 -1
- package/dist/chunk-FZ7YFQN7.js.map +0 -1
- package/dist/chunk-HXXTULDN.js.map +0 -1
- package/dist/chunk-I5DUQ5HM.js.map +0 -1
- package/dist/chunk-IJJUK4FU.js.map +0 -1
- package/dist/chunk-J7OWWTCW.js.map +0 -1
- package/dist/chunk-M7HP3FTK.js +0 -549
- package/dist/chunk-M7HP3FTK.js.map +0 -1
- package/dist/chunk-MIM5R4ZT.js +0 -14972
- package/dist/chunk-MIM5R4ZT.js.map +0 -1
- package/dist/chunk-RWNDDKOH.js.map +0 -1
- package/dist/chunk-T5IBSPAM.js.map +0 -1
- package/dist/chunk-UNAZSLWE.js.map +0 -1
- package/dist/chunk-WPLAANH4.js.map +0 -1
- package/dist/chunk-Y23G2VZL.js.map +0 -1
- package/dist/chunk-ZIFPHIWZ.js.map +0 -1
- package/src/primitives/useRovingTabIndex.test.ts +0 -48
- package/src/primitives/useRovingTabIndex.ts +0 -88
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import '../chunk-CZZPXUOU.js';
|
|
2
|
-
export {
|
|
3
|
-
import '../chunk-
|
|
2
|
+
export { b2 as ActionBar, Xt as Badge, c as Button, a9 as ButtonBar, a8 as COLOR_MODE_OPTIONS, v2 as Callout, f4 as CalloutTrigger, c5 as Checkbox, a2 as CloseButton, s2 as ColorModeControl, b4 as ComboBox, C2 as ComboBoxItem, L as CurveEditor, f as DataGrid, d3 as Dialog, i2 as Disclosure, r as DisclosureMark, a3 as DisclosureRow, a5 as DragGhost, n4 as DragGrip, Ze as EDGE_PROFILES, n5 as Field, p3 as GestureRoute, n as ICON_PATHS, l as Icon, u2 as Input, f2 as KeyCap, p as KeySequence, D2 as LayerList, l5 as ListEditor, MINUS_SIGN, p4 as MenuButton, y as NumberField, r3 as OptionsBar, w as Plot2D, n9 as PointPlotter, r4 as Powerline, R2 as PrefsDialog, j2 as PrefsForm, u3 as Radio, l4 as RadioGroup, l9 as RangeSlider, O2 as Select, B2 as SelectItem, n6 as Sidebar, a10 as SidebarPanel, S as Slider, a7 as Switch, c6 as Tab, s3 as TabList, l8 as TabPanel, o5 as Tabs, o3 as ThemeSwitcher, a6 as ToggleBar, o4 as ToolButton, n8 as ToolGroup, h4 as ToolPalette, Z2 as chromaAt, o2 as detectPlatform, a as dlog, r2 as fieldClasses, formatNumber, n2 as formatShortcut, t as formatShortcutParts, f3 as gestureRouteSegments, d2 as inferKeycapKind, i as isDebugEnabled, c3 as isPrefLeaf, e as keyGlyph, l3 as keySpecFromKey, s as keySpecsFromMods, m as keySpecsFromShortcut, S2 as moveLayers, X2 as oklchToHex, D as paintGradientTrack, l6 as prefValueAtPath, x as sampleByInterpolation, Bi as useAsyncOptions, d as useReorderDragList, c2 as useRovingTabIndex, u4 as visiblePrefSubtree } from '../chunk-4KSC7NXL.js';
|
|
3
|
+
import '../chunk-E23Q6A3Y.js';
|
|
4
|
+
import '../chunk-XVUKDSYV.js';
|
|
4
5
|
//# sourceMappingURL=weasel-ui.js.map
|
|
5
6
|
//# sourceMappingURL=weasel-ui.js.map
|
|
@@ -1,5 +1,215 @@
|
|
|
1
1
|
export { a as FloatingPanel, F as FloatingPanelProps } from '../_dts/FloatingPanel-7j0IcXwz.js';
|
|
2
|
-
|
|
3
|
-
import 'react';
|
|
2
|
+
import * as react from 'react';
|
|
3
|
+
import { ReactNode, MouseEventHandler } from 'react';
|
|
4
|
+
import { JobHandle } from '../index.js';
|
|
5
|
+
import { DetailRowStatus, DetailListValues } from '@weasel-js/ui';
|
|
4
6
|
import 'windease';
|
|
5
|
-
|
|
7
|
+
|
|
8
|
+
/** A live frame-rate readout, averaged over the last 30 frames. */
|
|
9
|
+
declare function FpsMeter(): react.JSX.Element;
|
|
10
|
+
|
|
11
|
+
/** Props for `<JobProgress>`. */
|
|
12
|
+
interface JobProgressProps {
|
|
13
|
+
job: JobHandle;
|
|
14
|
+
className?: string;
|
|
15
|
+
}
|
|
16
|
+
/** A running job's progress, failures and outcome. Determinate once the job
|
|
17
|
+
* reports a total; a job that cannot count up front never sends one, so the
|
|
18
|
+
* bar stays indeterminate rather than inventing a denominator. */
|
|
19
|
+
declare function JobProgress({ job, className }: JobProgressProps): react.JSX.Element | null;
|
|
20
|
+
|
|
21
|
+
/** How a legend entry's swatch is drawn, matching how the thing looks on canvas. */
|
|
22
|
+
type LegendMark = 'line' | 'dash' | 'dot' | 'band';
|
|
23
|
+
/** One row of a legend: a swatch and what it means. */
|
|
24
|
+
interface LegendEntry {
|
|
25
|
+
key: string;
|
|
26
|
+
label: string;
|
|
27
|
+
color: string;
|
|
28
|
+
/** Defaults to `'line'`. */
|
|
29
|
+
mark?: LegendMark;
|
|
30
|
+
}
|
|
31
|
+
/** Props for `<Legend>`. */
|
|
32
|
+
interface LegendProps {
|
|
33
|
+
entries: readonly LegendEntry[];
|
|
34
|
+
className?: string;
|
|
35
|
+
}
|
|
36
|
+
/** A color key. Presentational only — no handlers, no state, no hover behavior. */
|
|
37
|
+
declare function Legend({ entries, className }: LegendProps): react.JSX.Element;
|
|
38
|
+
|
|
39
|
+
/** One measurement in a {@link Readout}. */
|
|
40
|
+
interface ReadoutRow {
|
|
41
|
+
/** React key. Defaults to `label` when that is a string, else the row's index. */
|
|
42
|
+
key?: string;
|
|
43
|
+
label: ReactNode;
|
|
44
|
+
/** `null` or `undefined` keeps the row in place showing an en dash, so the
|
|
45
|
+
* readout holds its height while a measurement comes and goes. */
|
|
46
|
+
value?: ReactNode;
|
|
47
|
+
/** A dot in the status color before the value. Color is never the only
|
|
48
|
+
* signal: the value has to say the same thing in words. */
|
|
49
|
+
status?: DetailRowStatus;
|
|
50
|
+
/** `text` sets this row's value as wrapping prose instead of a figure. */
|
|
51
|
+
values?: DetailListValues;
|
|
52
|
+
}
|
|
53
|
+
/** Props for {@link Readout}. */
|
|
54
|
+
interface ReadoutProps {
|
|
55
|
+
rows: readonly ReadoutRow[];
|
|
56
|
+
/** Heading above the rows, which also names the list. */
|
|
57
|
+
title?: ReactNode;
|
|
58
|
+
/** Drawn below the rows — a small table, a note. */
|
|
59
|
+
children?: ReactNode;
|
|
60
|
+
className?: string;
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* Values a lab only reads — measurements shown beside its picture, such as
|
|
64
|
+
* "Lock margin +47.9°". A {@link DetailList} set as figures: labels take the
|
|
65
|
+
* params label recipe and `--wzl-params-label-width` rail, so a readout lines
|
|
66
|
+
* up with a `ControlPanel` beside it, and values sit right-aligned in the mono
|
|
67
|
+
* face with spaces kept, so figure-space padding aligns a column on its
|
|
68
|
+
* decimal point. Rows compose by hand as `DetailRow`s inside a `DetailList`
|
|
69
|
+
* with `values="figures"`.
|
|
70
|
+
*/
|
|
71
|
+
declare function Readout({ rows, title, children, className }: ReadoutProps): react.JSX.Element;
|
|
72
|
+
|
|
73
|
+
/** Props for `<ScaleIndicator>`. */
|
|
74
|
+
interface ScaleIndicatorProps {
|
|
75
|
+
/** Current view zoom factor. If omitted, reads from CanvasStackContext. Defaults to 1. */
|
|
76
|
+
zoom?: number;
|
|
77
|
+
/** World pixels per unit at zoom=1. Default: 1. */
|
|
78
|
+
pixelsPerUnit?: number;
|
|
79
|
+
/** Unit label. Default: 'px'. */
|
|
80
|
+
unit?: string;
|
|
81
|
+
/** Target bar width in display pixels. Default: 100. */
|
|
82
|
+
targetWidth?: number;
|
|
83
|
+
}
|
|
84
|
+
/** A scale bar: a labeled rule showing how far a round number of world units
|
|
85
|
+
* is at the current zoom. Reads the zoom from the surrounding canvas stack
|
|
86
|
+
* unless one is passed. */
|
|
87
|
+
declare function ScaleIndicator({ zoom, pixelsPerUnit, unit, targetWidth, }: ScaleIndicatorProps): react.JSX.Element;
|
|
88
|
+
|
|
89
|
+
/** Props for `<Split>`. */
|
|
90
|
+
interface SplitProps {
|
|
91
|
+
/** The sidebar pane's contents. */
|
|
92
|
+
sidebar: ReactNode;
|
|
93
|
+
/** The edge the sidebar sits on. Read once, when the strip mounts. Default `'start'`. */
|
|
94
|
+
side?: 'start' | 'end';
|
|
95
|
+
/** The content pane's contents. */
|
|
96
|
+
children: ReactNode;
|
|
97
|
+
/** Names the sidebar pane, and through it the seam. Default `'Sidebar'`. */
|
|
98
|
+
label?: string;
|
|
99
|
+
/** Extra classes on the strip, which always has `lk-split`. */
|
|
100
|
+
className?: string;
|
|
101
|
+
/** The class on the sidebar pane. */
|
|
102
|
+
sidebarClassName?: string;
|
|
103
|
+
/** The class on the content pane. */
|
|
104
|
+
contentClassName?: string;
|
|
105
|
+
/** The sidebar's current extent in pixels. Omit to leave it unpersisted: the
|
|
106
|
+
* seam still works, its result just does not outlive the mount. */
|
|
107
|
+
width?: number;
|
|
108
|
+
/** Where the sidebar starts before anyone drags it. */
|
|
109
|
+
defaultWidth?: number;
|
|
110
|
+
minWidth?: number;
|
|
111
|
+
maxWidth?: number;
|
|
112
|
+
/** How little the content pane may be squeezed to. Reported as the seam's
|
|
113
|
+
* reachable maximum, so the drag stops there rather than clamping silently. */
|
|
114
|
+
contentMinWidth?: number;
|
|
115
|
+
/** Fires through the drag, not on release: the pane is already there. */
|
|
116
|
+
onWidthChange?: (width: number) => void;
|
|
117
|
+
/**
|
|
118
|
+
* Fixed extent. Omit in an app — the strip measures its own box. Supply it
|
|
119
|
+
* where nothing measures, notably jsdom, or both panes lay out at zero.
|
|
120
|
+
*/
|
|
121
|
+
viewport?: {
|
|
122
|
+
w: number;
|
|
123
|
+
h: number;
|
|
124
|
+
};
|
|
125
|
+
}
|
|
126
|
+
/**
|
|
127
|
+
* A sidebar and a content pane as a two-pane strip with a draggable seam.
|
|
128
|
+
*
|
|
129
|
+
* The seam is `stripStrategy`'s own resize affordance, so it arrives as a
|
|
130
|
+
* `role="separator"` carrying the reachable range, operable by pointer and by
|
|
131
|
+
* arrows / Home / End, and clamped against the content pane's floor rather
|
|
132
|
+
* than against the sidebar's alone.
|
|
133
|
+
*/
|
|
134
|
+
declare function Split({ sidebar, children, side, label, className, sidebarClassName, contentClassName, width, defaultWidth, minWidth, maxWidth, contentMinWidth, onWidthChange, viewport, }: SplitProps): react.JSX.Element;
|
|
135
|
+
|
|
136
|
+
/** Props for `<StatusBar>`. */
|
|
137
|
+
interface StatusBarProps {
|
|
138
|
+
children: ReactNode;
|
|
139
|
+
}
|
|
140
|
+
/** A footer strip for readouts. Fill it with `<StatusBar.Section>`. */
|
|
141
|
+
declare function StatusBar({ children }: StatusBarProps): react.JSX.Element;
|
|
142
|
+
declare namespace StatusBar {
|
|
143
|
+
var Section: ({ children, end }: StatusBarSectionProps) => react.JSX.Element;
|
|
144
|
+
}
|
|
145
|
+
/** Props for `<StatusBar.Section>`. */
|
|
146
|
+
interface StatusBarSectionProps {
|
|
147
|
+
children: ReactNode;
|
|
148
|
+
/** Pushes this section, and everything after it, to the far end. */
|
|
149
|
+
end?: boolean;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
/** Props for `<Toolbar>`. */
|
|
153
|
+
interface ToolbarProps {
|
|
154
|
+
children: ReactNode;
|
|
155
|
+
/** Names the toolbar for assistive tech. Required by the APG pattern when a
|
|
156
|
+
* view holds more than one. */
|
|
157
|
+
'aria-label'?: string;
|
|
158
|
+
}
|
|
159
|
+
/** A horizontal bar of controls. Fill it with `<Toolbar.Title>`,
|
|
160
|
+
* `<Toolbar.Group>`, `<Toolbar.Button>` and `<Toolbar.Spacer>`. */
|
|
161
|
+
declare function Toolbar({ children, 'aria-label': ariaLabel }: ToolbarProps): react.JSX.Element;
|
|
162
|
+
declare namespace Toolbar {
|
|
163
|
+
var Title: ({ children }: TitleProps) => react.JSX.Element;
|
|
164
|
+
var Group: ({ children, end, "aria-label": ariaLabel }: ToolbarGroupProps) => react.JSX.Element;
|
|
165
|
+
var Button: ({ children, onClick, disabled, title, "aria-label": ariaLabel, variant, iconOnly, pressed, }: ToolbarButtonProps) => react.JSX.Element;
|
|
166
|
+
var Spacer: () => react.JSX.Element;
|
|
167
|
+
}
|
|
168
|
+
interface TitleProps {
|
|
169
|
+
children: ReactNode;
|
|
170
|
+
}
|
|
171
|
+
/** Props for `<Toolbar.Group>`. */
|
|
172
|
+
interface ToolbarGroupProps {
|
|
173
|
+
children: ReactNode;
|
|
174
|
+
/** Pushes this group, and everything after it, to the far end. */
|
|
175
|
+
end?: boolean;
|
|
176
|
+
'aria-label'?: string;
|
|
177
|
+
}
|
|
178
|
+
/** Props for `<Toolbar.Button>`. */
|
|
179
|
+
interface ToolbarButtonProps {
|
|
180
|
+
children: ReactNode;
|
|
181
|
+
onClick: MouseEventHandler<HTMLButtonElement>;
|
|
182
|
+
disabled?: boolean;
|
|
183
|
+
title?: string;
|
|
184
|
+
/** Required when `children` is an icon with no text of its own. */
|
|
185
|
+
'aria-label'?: string;
|
|
186
|
+
/** `danger` reddens on hover — for actions that discard work. */
|
|
187
|
+
variant?: 'default' | 'danger';
|
|
188
|
+
/** Square, for a button whose whole content is one glyph. */
|
|
189
|
+
iconOnly?: boolean;
|
|
190
|
+
/** Makes this a toggle: `aria-pressed`, and held down while true. */
|
|
191
|
+
pressed?: boolean;
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
/** Props for `<ZoomControl>`. */
|
|
195
|
+
interface ZoomControlProps {
|
|
196
|
+
/** Current zoom as a scale factor: 1 is actual size. */
|
|
197
|
+
zoom: number;
|
|
198
|
+
/** Fired continuously while the slider drags. */
|
|
199
|
+
onZoomChange: (zoom: number) => void;
|
|
200
|
+
/** Fired when a drag settles or the field is committed. Defaults to
|
|
201
|
+
* `onZoomChange`. */
|
|
202
|
+
onZoomCommit?: (zoom: number) => void;
|
|
203
|
+
/** Smallest selectable zoom. Defaults to 0.1 (10%). */
|
|
204
|
+
min?: number;
|
|
205
|
+
/** Largest selectable zoom. Defaults to 8 (800%). */
|
|
206
|
+
max?: number;
|
|
207
|
+
className?: string;
|
|
208
|
+
}
|
|
209
|
+
/** Zoom as a log-scaled slider with an editable percentage beside it. Pair it
|
|
210
|
+
* with zoom-in / zoom-out buttons in a `<Toolbar.Group>`; this component owns
|
|
211
|
+
* only the continuous part. */
|
|
212
|
+
declare function ZoomControl({ zoom, onZoomChange, onZoomCommit, min: minProp, max: maxProp, className, }: ZoomControlProps): react.JSX.Element;
|
|
213
|
+
|
|
214
|
+
export { FpsMeter, JobProgress, Legend, Readout, ScaleIndicator, Split, StatusBar, Toolbar, ZoomControl };
|
|
215
|
+
export type { JobProgressProps, LegendEntry, LegendMark, LegendProps, ReadoutProps, ReadoutRow, ScaleIndicatorProps, SplitProps, StatusBarProps, StatusBarSectionProps, ToolbarButtonProps, ToolbarGroupProps, ToolbarProps, ZoomControlProps };
|
package/dist/primitives/index.js
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
export { JobProgress, Legend, Readout, Split } from '../chunk-
|
|
2
|
-
export { FloatingPanel } from '../chunk-
|
|
3
|
-
export { FpsMeter, ScaleIndicator, StatusBar, Toolbar, ZoomControl } from '../chunk-
|
|
1
|
+
export { JobProgress, Legend, Readout, Split } from '../chunk-FB4MIZOO.js';
|
|
2
|
+
export { FloatingPanel } from '../chunk-XE5HJOPL.js';
|
|
3
|
+
export { FpsMeter, ScaleIndicator, StatusBar, Toolbar, ZoomControl } from '../chunk-CEGFXTBD.js';
|
|
4
4
|
import '../chunk-CZZPXUOU.js';
|
|
5
|
-
import '../chunk-
|
|
6
|
-
import '../chunk-
|
|
5
|
+
import '../chunk-PMLZP7RT.js';
|
|
6
|
+
import '../chunk-ZQIHJXP4.js';
|
|
7
7
|
import '../chunk-2YILQ7Y5.js';
|
|
8
|
-
import '../chunk-
|
|
9
|
-
import '../chunk-
|
|
8
|
+
import '../chunk-4KSC7NXL.js';
|
|
9
|
+
import '../chunk-E23Q6A3Y.js';
|
|
10
|
+
import '../chunk-XVUKDSYV.js';
|
|
10
11
|
//# sourceMappingURL=index.js.map
|
|
11
12
|
//# sourceMappingURL=index.js.map
|
package/dist/state/index.d.ts
CHANGED
|
@@ -1,13 +1,15 @@
|
|
|
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,
|
|
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-Bh8bzFgE.js';
|
|
2
|
+
import { S as SerializedTrial, I as InstrumentSerializers, T as TrialRecord, U as UndoStack, c as StorageAdapter } from '../_dts/index-DCMA4Fy1.js';
|
|
3
|
+
export { C as CreateLabStoreOptions, L as LabDocument, d as LabStoreState, M as Migration, e as SavedSnapshot, f as StorageChange, g as TrialStateHandle, h as UndockedPanel, i as UndockedPanels, j as dockPanel, p as panelKey, u as undockPanel } from '../_dts/index-DCMA4Fy1.js';
|
|
4
4
|
import * as react from 'react';
|
|
5
5
|
import { ReactNode } from 'react';
|
|
6
6
|
import 'zustand/vanilla';
|
|
7
|
+
import '@weasel-js/ui';
|
|
7
8
|
import '@weasel-js/core';
|
|
8
|
-
import '../_dts/PrefsRow.d-TOZ7BgD9.js';
|
|
9
9
|
import '@weasel-js/theme';
|
|
10
|
-
import '../_dts/types-
|
|
10
|
+
import '../_dts/types-BUBSIZuV.js';
|
|
11
|
+
import '@weasel-js/quantity';
|
|
12
|
+
import '@weasel-js/geom';
|
|
11
13
|
import '../_dts/types-DJ79Tg5J.js';
|
|
12
14
|
|
|
13
15
|
/** The storage key a lab writes one of its buckets under. Namespaced by
|
package/dist/state/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { openLabStore } from '../chunk-
|
|
2
|
-
export { CURRENT_DOCUMENT_VERSION, createLabStore, dockPanel, labDocumentKey, openLabStore, panelKey, quarantineKey, undockPanel, useTrialState } from '../chunk-
|
|
3
|
-
import { useWarnIgnoredChange, useOpenOnce, defaultStorage, PersistenceContext } from '../chunk-
|
|
4
|
-
export { Persistence, createIndexedDbAdapter, createMemoryAdapter, decodeUrlHash, deserializeTrials, emptyUndoStack, encodeUrlHash, indexedDbAdapter, labStorageKey, localStorageAdapter, noneAdapter, serializeTrials, sessionStorageAdapter, urlHashAdapter, usePersistedState } from '../chunk-
|
|
5
|
-
import '../chunk-
|
|
6
|
-
import '../chunk-
|
|
1
|
+
import { openLabStore } from '../chunk-IBVRMHW5.js';
|
|
2
|
+
export { CURRENT_DOCUMENT_VERSION, createLabStore, dockPanel, labDocumentKey, openLabStore, panelKey, quarantineKey, undockPanel, useTrialState } from '../chunk-IBVRMHW5.js';
|
|
3
|
+
import { useWarnIgnoredChange, useOpenOnce, defaultStorage, PersistenceContext } from '../chunk-PMLZP7RT.js';
|
|
4
|
+
export { Persistence, createIndexedDbAdapter, createMemoryAdapter, decodeUrlHash, deserializeTrials, emptyUndoStack, encodeUrlHash, indexedDbAdapter, labStorageKey, localStorageAdapter, noneAdapter, serializeTrials, sessionStorageAdapter, urlHashAdapter, usePersistedState } from '../chunk-PMLZP7RT.js';
|
|
5
|
+
import '../chunk-YCFKW5RX.js';
|
|
6
|
+
import '../chunk-READTDQX.js';
|
|
7
7
|
import { LabStoreProvider, TrialIdProvider } from '../chunk-2YILQ7Y5.js';
|
|
8
8
|
export { LabStoreContext, LabStoreProvider, TrialIdContext, TrialIdProvider, useLabStore, useTrialId } from '../chunk-2YILQ7Y5.js';
|
|
9
9
|
import { jsx, Fragment } from 'react/jsx-runtime';
|