@weasel-js/labkit 1.5.0 → 1.5.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.
Files changed (192) hide show
  1. package/README.md +41 -4
  2. package/dist/_dts/{CanvasStackContext-CqkxkFJW.d.ts → CanvasStackContext-CJNMS6mz.d.ts} +1 -1
  3. package/dist/_dts/{PrefsForm.d-DDHFANkc.d.ts → PrefsForm.d-DPy9I8It.d.ts} +4 -0
  4. package/dist/_dts/Select.d-Gwr8fLpK.d.ts +453 -0
  5. package/dist/_dts/{frac-8R6UmlvN.d.ts → frac-B4okC2lX.d.ts} +42 -4
  6. package/dist/_dts/{index-retnAut7.d.ts → index-BNdz-tNd.d.ts} +90 -10
  7. package/dist/_dts/{index-B8uu2ba7.d.ts → index-CSJoj4LC.d.ts} +17 -6
  8. package/dist/_dts/{types-Ca2LCnPq.d.ts → types-DzoNY1pO.d.ts} +28 -4
  9. package/dist/_dts/{usePanZoom-nS798rOF.d.ts → usePanZoom-Pzf9f2jh.d.ts} +2 -2
  10. package/dist/_dts/{useTrialState-jcx_TdU6.d.ts → useTrialState-uLlmaccn.d.ts} +1 -1
  11. package/dist/canvas/index.d.ts +5 -5
  12. package/dist/canvas/index.js +1 -1
  13. package/dist/chrome/index.d.ts +4 -4
  14. package/dist/chrome/index.js +7 -7
  15. package/dist/chunk-7PFH3CNM.js +150 -0
  16. package/dist/chunk-7PFH3CNM.js.map +1 -0
  17. package/dist/{chunk-PGETSEDK.js → chunk-CEIUBPPW.js} +10 -6
  18. package/dist/chunk-CEIUBPPW.js.map +1 -0
  19. package/dist/chunk-EH7UEQV7.js +590 -0
  20. package/dist/chunk-EH7UEQV7.js.map +1 -0
  21. package/dist/{chunk-EKIICY6X.js → chunk-EHGVROVV.js} +37 -25
  22. package/dist/chunk-EHGVROVV.js.map +1 -0
  23. package/dist/{chunk-ZPH5WTWF.js → chunk-ERFMC6WU.js} +142 -66
  24. package/dist/chunk-ERFMC6WU.js.map +1 -0
  25. package/dist/{chunk-NS64DXMN.js → chunk-IHUVQ3TX.js} +39 -16
  26. package/dist/chunk-IHUVQ3TX.js.map +1 -0
  27. package/dist/{chunk-QLSV2N3G.js → chunk-IJJUK4FU.js} +25 -13
  28. package/dist/chunk-IJJUK4FU.js.map +1 -0
  29. package/dist/{chunk-67SJLMC7.js → chunk-IXTQI7JX.js} +45 -12
  30. package/dist/chunk-IXTQI7JX.js.map +1 -0
  31. package/dist/{chunk-MUKOW3TC.js → chunk-MDVTK5U3.js} +4 -4
  32. package/dist/{chunk-MUKOW3TC.js.map → chunk-MDVTK5U3.js.map} +1 -1
  33. package/dist/{chunk-UU3NJO6N.js → chunk-PHK4W562.js} +3 -3
  34. package/dist/{chunk-UU3NJO6N.js.map → chunk-PHK4W562.js.map} +1 -1
  35. package/dist/chunk-PJ7WEQBJ.js +18 -0
  36. package/dist/chunk-PJ7WEQBJ.js.map +1 -0
  37. package/dist/chunk-T3EC2DXD.js +12628 -0
  38. package/dist/chunk-T3EC2DXD.js.map +1 -0
  39. package/dist/{chunk-KJALCDWE.js → chunk-UN4U4P63.js} +4 -4
  40. package/dist/{chunk-KJALCDWE.js.map → chunk-UN4U4P63.js.map} +1 -1
  41. package/dist/{chunk-NDRYLVOW.js → chunk-Z76KEZAX.js} +2 -2
  42. package/dist/chunk-Z76KEZAX.js.map +1 -0
  43. package/dist/{chunk-6ZDGOZQV.js → chunk-ZDHY47EV.js} +70 -17
  44. package/dist/chunk-ZDHY47EV.js.map +1 -0
  45. package/dist/config/index.d.ts +60 -16
  46. package/dist/config/index.js +6 -4
  47. package/dist/controls/index.d.ts +3 -3
  48. package/dist/controls/index.js +4 -4
  49. package/dist/dragdrop/index.d.ts +3 -3
  50. package/dist/index.d.ts +177 -53
  51. package/dist/index.js +1333 -1683
  52. package/dist/index.js.map +1 -1
  53. package/dist/layers/index.d.ts +4 -4
  54. package/dist/layers/index.js +2 -2
  55. package/dist/loupe/index.d.ts +67 -16
  56. package/dist/loupe/index.js +1 -1
  57. package/dist/passthrough/weasel-ui.d.ts +26 -202
  58. package/dist/passthrough/weasel-ui.js +1 -1
  59. package/dist/primitives/index.d.ts +3 -1
  60. package/dist/primitives/index.js +3 -3
  61. package/dist/state/index.d.ts +5 -5
  62. package/dist/state/index.js +5 -3
  63. package/dist/state/index.js.map +1 -1
  64. package/dist/styles.css +153 -40
  65. package/dist/surface/index.js +1 -1
  66. package/dist/ui/layers/index.js +1 -1
  67. package/dist/undo/index.d.ts +3 -3
  68. package/package.json +9 -9
  69. package/src/annotations/AnnotationOverlay.tsx +3 -0
  70. package/src/annotations/Annotations.less +4 -0
  71. package/src/annotations/Annotations.overlay.test.tsx +20 -0
  72. package/src/annotations/svgNodes.ts +1 -0
  73. package/src/annotations/toolMap.test.ts +9 -5
  74. package/src/annotations/toolMap.ts +3 -0
  75. package/src/canvas/CanvasStack.stories.tsx +1 -1
  76. package/src/canvas/usePanZoom.test.ts +28 -0
  77. package/src/canvas/usePanZoom.ts +11 -4
  78. package/src/chrome/ChromeRegions.stories.tsx +1 -1
  79. package/src/chrome/LabChrome.tsx +21 -5
  80. package/src/chrome/builtins.test.ts +1 -0
  81. package/src/chrome/builtins.tsx +1 -0
  82. package/src/chrome/index.ts +1 -0
  83. package/src/chrome/labTypes.ts +2 -2
  84. package/src/chrome/regions/PaletteRegion.tsx +1 -6
  85. package/src/chrome/regions/SidebarRegion.stories.tsx +44 -0
  86. package/src/chrome/regions/ToolbarRegion.tsx +11 -7
  87. package/src/chrome/types.ts +3 -0
  88. package/src/config/auto.test.ts +12 -0
  89. package/src/config/auto.ts +15 -0
  90. package/src/config/autoConfig.test.ts +107 -0
  91. package/src/config/autoConfig.ts +153 -0
  92. package/src/config/builder.test.ts +38 -0
  93. package/src/config/builder.ts +53 -8
  94. package/src/config/index.ts +3 -0
  95. package/src/config/path.ts +7 -2
  96. package/src/config/resolve.test.ts +25 -0
  97. package/src/config/resolve.ts +17 -1
  98. package/src/config/types.ts +32 -2
  99. package/src/config/useResolvedConfig.ts +26 -0
  100. package/src/controls/AutoControls.stories.tsx +88 -0
  101. package/src/controls/ControlPanel.stories.tsx +42 -1
  102. package/src/controls/ControlPanel.test.tsx +514 -4
  103. package/src/controls/ControlPanel.tsx +557 -80
  104. package/src/index.ts +29 -1
  105. package/src/instrument/serializers.ts +29 -1
  106. package/src/lab/Lab.chrome.test.tsx +16 -0
  107. package/src/lab/Lab.stories.tsx +1 -1
  108. package/src/lab/Lab.surface.test.tsx +7 -2
  109. package/src/lab/Lab.test.tsx +79 -1
  110. package/src/lab/Lab.tsx +105 -13
  111. package/src/lab/LabContext.ts +8 -0
  112. package/src/lab/LabFit.stories.tsx +4 -4
  113. package/src/lab/LabFullChrome.stories.tsx +1 -1
  114. package/src/lab/LabHeader.tsx +0 -1
  115. package/src/lab/LabRoot.test.tsx +56 -0
  116. package/src/lab/LabRoot.tsx +47 -0
  117. package/src/lab/LabShell.less +24 -3
  118. package/src/lab/LabShell.stories.tsx +50 -1
  119. package/src/lab/LabShell.tsx +18 -27
  120. package/src/lab/LabSwitcher.less +10 -10
  121. package/src/lab/LabSwitcher.test.tsx +14 -9
  122. package/src/lab/LabSwitcher.tsx +8 -4
  123. package/src/lab/Workspace.less +1 -1
  124. package/src/lab/Workspace.stories.tsx +1 -1
  125. package/src/lab/Workspace.surface.test.tsx +1 -1
  126. package/src/lab/index.ts +2 -0
  127. package/src/layers/LayerList.stories.tsx +1 -1
  128. package/src/loupe/AGENTS.md +16 -4
  129. package/src/loupe/LoupeGestures.tsx +67 -0
  130. package/src/loupe/TrialLoupe.tsx +43 -28
  131. package/src/loupe/index.ts +4 -0
  132. package/src/loupe/loupeActions.ts +98 -0
  133. package/src/loupe/useLoupe.test.tsx +59 -2
  134. package/src/loupe/useLoupe.ts +28 -48
  135. package/src/passthrough/weasel-ui.ts +3 -3
  136. package/src/primitives/FloatingPanel.stories.tsx +1 -1
  137. package/src/primitives/FpsMeter.stories.tsx +1 -1
  138. package/src/primitives/JobProgress.stories.tsx +1 -1
  139. package/src/primitives/Legend.stories.tsx +1 -1
  140. package/src/primitives/ScaleIndicator.stories.tsx +1 -1
  141. package/src/primitives/Sidebar.less +7 -0
  142. package/src/primitives/Sidebar.stories.tsx +1 -1
  143. package/src/primitives/Split.test.tsx +25 -0
  144. package/src/primitives/Split.tsx +36 -20
  145. package/src/primitives/StatusBar.stories.tsx +1 -1
  146. package/src/primitives/Toolbar.stories.tsx +1 -1
  147. package/src/specimen/Specimen.less +95 -0
  148. package/src/specimen/Specimen.stories.tsx +13 -0
  149. package/src/specimen/Specimen.test.tsx +13 -0
  150. package/src/specimen/Specimen.tsx +888 -0
  151. package/src/state/Persistence.stories.tsx +4 -4
  152. package/src/state/store.test.ts +65 -0
  153. package/src/state/store.ts +32 -8
  154. package/src/state/types.ts +26 -2
  155. package/src/state/useTrialState.test.tsx +85 -0
  156. package/src/state/useTrialState.ts +9 -1
  157. package/src/styles.less +1 -0
  158. package/src/surface/index.ts +1 -1
  159. package/src/surface/useSurfaceTile.test.tsx +1 -1
  160. package/src/surface/useTiledSurface.test.tsx +65 -10
  161. package/src/surface/useTiledSurface.ts +23 -11
  162. package/src/theme/Interstellar.stories.tsx +2 -2
  163. package/src/theme/interstellar.test.ts +16 -5
  164. package/src/theme/interstellar.theme.json +180 -0
  165. package/src/theme/interstellar.ts +8 -5
  166. package/src/tools/labTool.ts +3 -3
  167. package/src/trial/Trial.annotations.test.tsx +13 -4
  168. package/src/trial/Trial.canvas.test.tsx +32 -0
  169. package/src/trial/Trial.config.test.tsx +75 -2
  170. package/src/trial/Trial.less +4 -0
  171. package/src/trial/Trial.stories.tsx +4 -1
  172. package/src/trial/Trial.test.tsx +3 -0
  173. package/src/trial/Trial.tsx +21 -14
  174. package/src/trial/TrialChrome.tsx +17 -3
  175. package/src/trial/trialOps.test.ts +101 -1
  176. package/src/trial/trialOps.ts +62 -4
  177. package/dist/_dts/ToggleBar.d-DbHoWKIA.d.ts +0 -116
  178. package/dist/chunk-67SJLMC7.js.map +0 -1
  179. package/dist/chunk-6ZDGOZQV.js.map +0 -1
  180. package/dist/chunk-E44SU6XS.js +0 -50
  181. package/dist/chunk-E44SU6XS.js.map +0 -1
  182. package/dist/chunk-EKIICY6X.js.map +0 -1
  183. package/dist/chunk-NDRYLVOW.js.map +0 -1
  184. package/dist/chunk-NS64DXMN.js.map +0 -1
  185. package/dist/chunk-PGETSEDK.js.map +0 -1
  186. package/dist/chunk-QLSV2N3G.js.map +0 -1
  187. package/dist/chunk-S2SHZRD7.js +0 -7681
  188. package/dist/chunk-S2SHZRD7.js.map +0 -1
  189. package/dist/chunk-TQBBYTAF.js +0 -280
  190. package/dist/chunk-TQBBYTAF.js.map +0 -1
  191. package/dist/chunk-ZPH5WTWF.js.map +0 -1
  192. package/src/theme/interstellar.tokens.json +0 -61
@@ -1,10 +1,10 @@
1
- import { a9 as LayerDescriptor } from '../_dts/frac-8R6UmlvN.js';
2
- export { a8 as LayerCapability } from '../_dts/frac-8R6UmlvN.js';
1
+ import { aa as LayerDescriptor } from '../_dts/frac-B4okC2lX.js';
2
+ export { a9 as LayerCapability } from '../_dts/frac-B4okC2lX.js';
3
3
  import * as react_jsx_runtime from 'react/jsx-runtime';
4
4
  import 'react';
5
- import '../_dts/types-Ca2LCnPq.js';
5
+ import '../_dts/types-DzoNY1pO.js';
6
6
  import '@weasel-js/core';
7
- import '../_dts/PrefsForm.d-DDHFANkc.js';
7
+ import '../_dts/PrefsForm.d-DPy9I8It.js';
8
8
  import '../_dts/types-DJ79Tg5J.js';
9
9
 
10
10
  /** A layer that may itself contain layers. A plain `LayerDescriptor` is one
@@ -1,5 +1,5 @@
1
- export { LayerList } from '../chunk-MUKOW3TC.js';
1
+ export { LayerList } from '../chunk-MDVTK5U3.js';
2
2
  import '../chunk-SBXNQW4G.js';
3
- import '../chunk-S2SHZRD7.js';
3
+ import '../chunk-T3EC2DXD.js';
4
4
  //# sourceMappingURL=index.js.map
5
5
  //# sourceMappingURL=index.js.map
@@ -1,11 +1,11 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import { aD as LoupePoint, aE as LoupeMode, k as ViewTransform, W as WorldFrame, a as WorldSpec, V as ViewportSize, ac as LoupeRenderArgs, af as ResolvedLoupe } from '../_dts/frac-8R6UmlvN.js';
3
- export { a7 as LOUPE_DEFAULTS, aa as LoupeCapability, ab as LoupeDeclaration, aA as resolveLoupe } from '../_dts/frac-8R6UmlvN.js';
4
- import { c as CanvasStackSurface, C as CanvasLayerDescriptor } from '../_dts/CanvasStackContext-CqkxkFJW.js';
2
+ import { aG as LoupePoint, aH as LoupeMode, k as ViewTransform, W as WorldFrame, a as WorldSpec, V as ViewportSize, ad as LoupeRenderArgs, ag as ResolvedLoupe } from '../_dts/frac-B4okC2lX.js';
3
+ export { a8 as LOUPE_DEFAULTS, ab as LoupeCapability, ac as LoupeDeclaration, aD as resolveLoupe } from '../_dts/frac-B4okC2lX.js';
4
+ import { c as CanvasStackSurface, C as CanvasLayerDescriptor } from '../_dts/CanvasStackContext-CJNMS6mz.js';
5
5
  import { RefObject, ReactNode } from 'react';
6
- import '../_dts/types-Ca2LCnPq.js';
7
- import '@weasel-js/core';
8
- import '../_dts/PrefsForm.d-DDHFANkc.js';
6
+ import { Action } from '@weasel-js/core';
7
+ import '../_dts/types-DzoNY1pO.js';
8
+ import '../_dts/PrefsForm.d-DPy9I8It.js';
9
9
  import '../_dts/types-DJ79Tg5J.js';
10
10
 
11
11
  /** Props for `<CanvasLoupe>`. */
@@ -118,6 +118,53 @@ interface LoupeBubbleProps {
118
118
  */
119
119
  declare function LoupeBubble({ aim, diameter, hostRef, children }: LoupeBubbleProps): react_jsx_runtime.JSX.Element;
120
120
 
121
+ /**
122
+ * The loupe's two bindable interactions, as `Action` descriptors the gesture
123
+ * dispatcher routes: hold a key to peek, and walk the magnification with the
124
+ * wheel.
125
+ *
126
+ * Free of React so the routing can be tested without a DOM.
127
+ */
128
+
129
+ /** Canonical id of the hold-to-peek action. */
130
+ declare const LOUPE_PEEK_ID = "loupe.peek";
131
+ /** Canonical id of the wheel-magnify action. */
132
+ declare const LOUPE_MAGNIFY_ID = "loupe.magnify";
133
+ /** What the actions do to a live loupe. Every member is read through the
134
+ * object on each invocation, so one stable instance serves the life of the
135
+ * registration. */
136
+ interface LoupeInputApi {
137
+ /** Whether the lens is up. The wheel belongs to the loupe only while it is;
138
+ * otherwise `loupe.magnify` declines and the dispatcher leaves the event
139
+ * unhandled, which is what hands it back to the lab's own pan/zoom. */
140
+ shown: () => boolean;
141
+ /** Raise or drop the hold-to-peek flag. */
142
+ setPeeking: (on: boolean) => void;
143
+ /** Multiply the magnification by one wheel notch of `deltaY`. */
144
+ magnifyBy: (deltaY: number) => void;
145
+ }
146
+ /**
147
+ * Build the loupe's actions. `peekKey` is a `KeyboardEvent.key`; passing
148
+ * `null` omits `loupe.peek` entirely rather than registering a binding no key
149
+ * can match.
150
+ */
151
+ declare function createLoupeActions(input: LoupeInputApi, peekKey: string | null): readonly Action[];
152
+
153
+ /** Props for `<LoupeGestures>`. */
154
+ interface LoupeGesturesProps {
155
+ /** The element the dispatcher listens on — the same one the lens tracks. */
156
+ hostRef: RefObject<HTMLElement | null>;
157
+ input: LoupeInputApi;
158
+ /** `KeyboardEvent.key` for hold-to-peek, or `null` for no peek binding. */
159
+ peekKey: string | null;
160
+ }
161
+ /**
162
+ * The loupe's input, routed. Render it inside a `<WeaselProvider isolate>` —
163
+ * with no registry in scope it renders nothing rather than registering
164
+ * actions that could never fire.
165
+ */
166
+ declare function LoupeGestures(props: LoupeGesturesProps): react_jsx_runtime.JSX.Element | null;
167
+
121
168
  /** Props for `<TrialLoupe>`. */
122
169
  interface TrialLoupeProps {
123
170
  capability: ResolvedLoupe;
@@ -137,7 +184,7 @@ interface TrialLoupeProps {
137
184
  * stack it is mounted inside, or the instrument's own `render` at a magnified
138
185
  * camera.
139
186
  */
140
- declare function TrialLoupe({ capability, enabled, state, config, view, worldSpec, hostRef, }: TrialLoupeProps): react_jsx_runtime.JSX.Element | null;
187
+ declare function TrialLoupe({ capability, enabled, state, config, view, worldSpec, hostRef, }: TrialLoupeProps): react_jsx_runtime.JSX.Element;
141
188
 
142
189
  /** Options for {@link useLoupe}. */
143
190
  interface UseLoupeOptions {
@@ -163,18 +210,22 @@ interface LoupeState {
163
210
  setFactor: (factor: number) => void;
164
211
  /** Sample what the lens shows at a point inside it. */
165
212
  pick: (p?: LoupePoint) => string | null;
213
+ /** What `<LoupeGestures>` drives the lens through. Stable for the life of
214
+ * the hook, so registering the actions on it does not churn. */
215
+ input: LoupeInputApi;
166
216
  }
167
217
  /**
168
- * Binds `@weasel-js/loupe`'s model to a host element and drives it from the
169
- * pointer, the peek key and the wheel.
218
+ * Binds `@weasel-js/loupe`'s model to a host element and tracks the pointer
219
+ * across it.
170
220
  *
171
- * These are plain listeners rather than gesture bindings because labkit trials
172
- * do not route input through the dispatcher — see the loupe entry under
173
- * "Selection, actions & UI panels" in `docs/TODO.md`. They are all in this one
174
- * hook so that when trial input does go through it, this is the only file to
175
- * rewrite.
221
+ * The peek key and the wheel are not here: they are `loupe.peek` and
222
+ * `loupe.magnify`, routed through the gesture dispatcher that
223
+ * `<LoupeGestures>` mounts on the same host. Aiming stays a plain listener
224
+ * because a hover is not a gesture the grammar names — `GESTURE_DESCRIPTORS`
225
+ * has no continuous-motion entry, and inventing one to carry the lens' aim
226
+ * would be an input taxonomy change, not a loupe change.
176
227
  */
177
228
  declare function useLoupe({ capability, hostRef, enabled, sample }: UseLoupeOptions): LoupeState;
178
229
 
179
- export { CanvasLoupe, DomLoupe, LoupeBubble, LoupeRenderArgs, ResolvedLoupe, TrialLoupe, drawCanvasLens, lensCamera, lensSourceRect, sampleStack, useLoupe };
180
- export type { CanvasLoupeProps, DomLoupeProps, LensCamera, LoupeBubbleProps, LoupeState, SourceRect, TrialLoupeProps, UseLoupeOptions };
230
+ export { CanvasLoupe, DomLoupe, LOUPE_MAGNIFY_ID, LOUPE_PEEK_ID, LoupeBubble, LoupeGestures, LoupeRenderArgs, ResolvedLoupe, TrialLoupe, createLoupeActions, drawCanvasLens, lensCamera, lensSourceRect, sampleStack, useLoupe };
231
+ export type { CanvasLoupeProps, DomLoupeProps, LensCamera, LoupeBubbleProps, LoupeGesturesProps, LoupeInputApi, LoupeState, SourceRect, TrialLoupeProps, UseLoupeOptions };
@@ -1,4 +1,4 @@
1
- export { CanvasLoupe, DomLoupe, LOUPE_DEFAULTS, LoupeBubble, TrialLoupe, drawCanvasLens, lensCamera, lensSourceRect, resolveLoupe, sampleStack, useLoupe } from '../chunk-ZPH5WTWF.js';
1
+ export { CanvasLoupe, DomLoupe, LOUPE_DEFAULTS, LOUPE_MAGNIFY_ID, LOUPE_PEEK_ID, LoupeBubble, LoupeGestures, TrialLoupe, createLoupeActions, drawCanvasLens, lensCamera, lensSourceRect, resolveLoupe, sampleStack, useLoupe } from '../chunk-ERFMC6WU.js';
2
2
  import '../chunk-H6ZAOWNE.js';
3
3
  import '../chunk-2AYGEN57.js';
4
4
  import '../chunk-CQLQPQ4P.js';
@@ -1,12 +1,13 @@
1
- import * as react_jsx_runtime from 'react/jsx-runtime';
1
+ import { O as OverlayPortalProps, W as WithoutPortalTarget } from '../_dts/Select.d-Gwr8fLpK.js';
2
+ export { B as Button, a as ButtonProps, b as ButtonSize, c as ButtonVariant, l as ICON_PATHS, d as Icon, m as IconName, I as IconProps, e as Input, f as InputProps, S as Select, n as SelectItem, o as SelectItemProps, p as SelectOption, g as SelectProps, T as ToggleBar, h as ToggleBarItem, i as ToggleBarProps, j as ToggleBarSize, k as ToggleBarVariant } from '../_dts/Select.d-Gwr8fLpK.js';
2
3
  import { ToolPrefLeaf, ToolPrefGroup, ToolsApi } from '@weasel-js/core';
3
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';
4
6
  import * as react from 'react';
5
7
  import { ReactNode, CSSProperties, ReactElement, KeyboardEvent, RefObject, PointerEvent, RefCallback } from 'react';
6
- export { B as Button, a as ButtonProps, b as ButtonSize, c as ButtonVariant, T as ToggleBar, d as ToggleBarItem, e as ToggleBarProps, f as ToggleBarSize, g as ToggleBarVariant } from '../_dts/ToggleBar.d-DbHoWKIA.js';
7
8
  export { LayerStack, LayerStackItem, LayerStackProps } from '../ui/layers/index.js';
8
- export { a as PrefRenderContext, P as PrefRenderer } from '../_dts/PrefsForm.d-DDHFANkc.js';
9
- import { TextFieldProps, ValidationResult, 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, NumberFieldProps as NumberFieldProps$1, SelectProps as SelectProps$1, ListBoxItemProps, ComboBoxProps as ComboBoxProps$1, SliderProps as SliderProps$1, ModalOverlayProps, DialogProps as DialogProps$1, PopoverProps } from 'react-aria-components';
9
+ export { a as PrefRenderContext, P as PrefRenderer } from '../_dts/PrefsForm.d-DPy9I8It.js';
10
+ 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';
10
11
  export { DialogTrigger as CalloutTrigger } from 'react-aria-components';
11
12
 
12
13
  /**
@@ -42,101 +43,6 @@ declare function isDebugEnabled(namespace: string): boolean;
42
43
  * Each call is prefixed with `[namespace]` so the source is searchable. */
43
44
  declare function dlog(namespace: string, ...args: unknown[]): void;
44
45
 
45
- declare const ICON_PATHS: {
46
- readonly clone: "<path d=\"M7 7.4V4.6A1.6 1.6 0 0 1 8.6 3h6.8A1.6 1.6 0 0 1 17 4.6v6.8a1.6 1.6 0 0 1-1.6 1.6H12.6\" stroke-linecap=\"butt\"/><rect x=\"3\" y=\"7\" width=\"10\" height=\"10\" rx=\"1.6\"/><path d=\"M5.7 10.8h4.6M5.7 13.4h3\" stroke-width=\"1\"/>";
47
- readonly reset: "<path d=\"M7.28 4.88A5.8 5.8 0 1 0 12.72 4.88\"/><path d=\"M13.81 7.57 12.72 4.88 15.56 4.28\"/>";
48
- readonly close: "<path d=\"M5 5 15 15M15 5 5 15\" stroke-width=\"1.75\"/>";
49
- readonly export: "<path d=\"M4 12.6v2.9A1.5 1.5 0 0 0 5.5 17h9a1.5 1.5 0 0 0 1.5-1.5v-2.9\"/><path d=\"M10 3.2v8.5\"/><path d=\"M11.7 9.35 10 11.7 8.3 9.35\"/><path d=\"M6.8 14.7h6.4\" stroke-width=\"1\"/>";
50
- readonly zoomIn: "<circle cx=\"9\" cy=\"9\" r=\"5.4\"/><path d=\"M12.82 12.82 16.9 16.9\"/><path d=\"M9 6.7v4.6M6.7 9h4.6\"/>";
51
- readonly pan: "<path d=\"M10 8.1V3.2M10 11.9V16.8M8.1 10H3.2M11.9 10H16.8\"/><path d=\"M8.26 5.27 10 3.2 11.74 5.27M11.74 14.73 10 16.8 8.26 14.73M5.27 11.74 3.2 10 5.27 8.26M14.73 8.26 16.8 10 14.73 11.74\"/><circle cx=\"10\" cy=\"10\" r=\"1.9\"/>";
52
- readonly add: "<path d=\"M10 4.9v10.2M4.9 10h10.2\"/>";
53
- readonly remove: "<path d=\"M4.9 10h10.2\"/>";
54
- readonly delete: "<path d=\"M3.6 5.8h12.8M8 5.8V4.5A1.1 1.1 0 0 1 9.1 3.4h1.8A1.1 1.1 0 0 1 12 4.5v1.3\"/><path d=\"M5.2 5.8v9.6A1.6 1.6 0 0 0 6.8 17h6.4a1.6 1.6 0 0 0 1.6-1.6V5.8\"/><path d=\"M8.4 8.8v5.2M11.6 8.8v5.2\" stroke-width=\"1\"/>";
55
- readonly sort: "<path d=\"M3.6 5.6h7.2M3.6 10h8.8M3.6 14.4h5\"/><path d=\"M15.3 5.4v9.4\"/><path d=\"M16.97 12.81 15.3 14.8 13.63 12.81\"/>";
56
- readonly undo: "<path d=\"M4.4 8.4h6.8a3.6 3.6 0 0 1 0 7.2H8.6\"/><path d=\"M6.47 10.14 4.4 8.4 6.47 6.66\"/>";
57
- readonly redo: "<path d=\"M15.6 8.4H8.8a3.6 3.6 0 0 0 0 7.2H11.4\"/><path d=\"M13.53 6.66 15.6 8.4 13.53 10.14\"/>";
58
- readonly zoomOut: "<circle cx=\"9\" cy=\"9\" r=\"5.4\"/><path d=\"M12.82 12.82 16.9 16.9\"/><path d=\"M6.7 9h4.6\"/>";
59
- readonly fit: "<path d=\"M3.2 7.2V4.4A1.2 1.2 0 0 1 4.4 3.2h2.8M12.8 3.2h2.8A1.2 1.2 0 0 1 16.8 4.4v2.8M16.8 12.8v2.8a1.2 1.2 0 0 1-1.2 1.2h-2.8M7.2 16.8H4.4a1.2 1.2 0 0 1-1.2-1.2v-2.8\"/><rect x=\"7.4\" y=\"8.2\" width=\"5.2\" height=\"3.6\" rx=\"0.8\" stroke-width=\"1\"/>";
60
- readonly snapshot: "<path d=\"M3.8 8.3A1.4 1.4 0 0 1 5.2 6.9h1.9L8 5.1h4l.9 1.8h1.9A1.4 1.4 0 0 1 16.2 8.3v6A1.4 1.4 0 0 1 14.8 15.7H5.2A1.4 1.4 0 0 1 3.8 14.3z\"/><circle cx=\"10\" cy=\"11\" r=\"2.75\"/>";
61
- readonly play: "<path d=\"M7.6 5.2 15.6 10 7.6 14.8Z\"/>";
62
- readonly pause: "<path d=\"M7.8 5.2v9.6M12.2 5.2v9.6\"/>";
63
- readonly stop: "<rect x=\"5.6\" y=\"5.6\" width=\"8.8\" height=\"8.8\" rx=\"1.4\"/>";
64
- readonly step: "<path d=\"M6.4 5.4 13 10 6.4 14.6Z\"/><path d=\"M15.2 5.4v9.2\"/>";
65
- readonly crosshair: "<circle cx=\"10\" cy=\"10\" r=\"5.6\"/><path d=\"M10 2.8v4.4M10 12.8v4.4M2.8 10h4.4M12.8 10h4.4\"/>";
66
- readonly fullscreen: "<path d=\"M11.6 3.6h4.8v4.8M8.4 16.4H3.6v-4.8\"/><path d=\"M16.4 3.6 11.2 8.8M3.6 16.4 8.8 11.2\"/>";
67
- readonly compare: "<rect x=\"3.4\" y=\"4.6\" width=\"13.2\" height=\"10.8\" rx=\"1.6\"/><path d=\"M10 4.6v10.8\" stroke-width=\"1\"/><path d=\"M5.2 7.6h3.4M5.2 10h2.6M5.2 12.4h3.4\" stroke-width=\"1\"/><path d=\"M11.4 7.6h3.4M11.4 10h3.4M11.4 12.4h1.8\" stroke-width=\"1\"/>";
68
- readonly filter: "<path d=\"M3.4 4.6h13.2L11.8 11v5.4L8.2 14.8V11z\"/>";
69
- readonly search: "<circle cx=\"9\" cy=\"9\" r=\"5.4\"/><path d=\"M12.82 12.82 16.9 16.9\"/>";
70
- readonly loupe: "<circle cx=\"9\" cy=\"9\" r=\"5.6\"/><path d=\"M12.96 12.96 17 17\"/><rect x=\"6\" y=\"6\" width=\"6\" height=\"6\" stroke-width=\"1\"/><path d=\"M9 6v6M6 9h6\" stroke-width=\"1\"/>";
71
- readonly layers: "<path d=\"M10 2.8 17.2 6.6 10 10.4 2.8 6.6z\"/><path d=\"M2.8 10 10 13.8 17.2 10\" stroke-width=\"1\"/><path d=\"M2.8 13.4 10 17.2 17.2 13.4\" stroke-width=\"1\"/>";
72
- readonly lock: "<rect x=\"4.6\" y=\"9\" width=\"10.8\" height=\"8\" rx=\"1.6\"/><path d=\"M7.2 9V6.6a2.8 2.8 0 0 1 5.6 0V9\"/>";
73
- readonly unlock: "<rect x=\"4.6\" y=\"9\" width=\"10.8\" height=\"8\" rx=\"1.6\"/><path d=\"M7.2 9V6.6a2.8 2.8 0 0 1 5.6 0\"/>";
74
- readonly visible: "<path d=\"M2.6 10C4.6 6.6 7.1 5 10 5s5.4 1.6 7.4 5c-2 3.4-4.5 5-7.4 5s-5.4-1.6-7.4-5z\"/><circle cx=\"10\" cy=\"10\" r=\"2.2\"/>";
75
- readonly hidden: "<path d=\"M2.6 10C4.6 6.6 7.1 5 10 5s5.4 1.6 7.4 5c-2 3.4-4.5 5-7.4 5s-5.4-1.6-7.4-5z\"/><circle cx=\"10\" cy=\"10\" r=\"2.2\"/><path d=\"M4.2 15.8 15.8 4.2\"/>";
76
- readonly pin: "<path d=\"M8.2 3.4v5.2l-2 2.6h7.6l-2-2.6V3.4z\"/><path d=\"M7 3.4h6\"/><path d=\"M10 11.2v5.4\"/>";
77
- readonly link: "<path d=\"M8.6 11.4a3.4 3.4 0 0 1 0-4.8l2.2-2.2a3.4 3.4 0 0 1 4.8 4.8l-1.1 1.1\"/><path d=\"M11.4 8.6a3.4 3.4 0 0 1 0 4.8l-2.2 2.2a3.4 3.4 0 0 1-4.8-4.8l1.1-1.1\"/>";
78
- readonly collapse: "<path d=\"M14.16 4.05 10 7.8 5.84 4.05M5.84 15.95 10 12.2 14.16 15.95\"/>";
79
- readonly expand: "<path d=\"M5.84 8.15 10 4.4 14.16 8.15M14.16 11.85 10 15.6 5.84 11.85\"/>";
80
- readonly chevron: "<path d=\"M14.9 7.98 10 12.4 5.1 7.98\"/>";
81
- readonly tune: "<path d=\"M3.4 6h13.2M3.4 10h13.2M3.4 14h13.2\" stroke-width=\"1.25\"/><circle cx=\"7\" cy=\"6\" r=\"1.8\"/><circle cx=\"12.6\" cy=\"10\" r=\"1.8\"/><circle cx=\"9\" cy=\"14\" r=\"1.8\"/>";
82
- readonly grid: "<rect x=\"3.4\" y=\"3.4\" width=\"13.2\" height=\"13.2\" rx=\"1.4\"/><path d=\"M7.8 3.4v13.2M12.2 3.4v13.2M3.4 7.8h13.2M3.4 12.2h13.2\" stroke-width=\"1\"/>";
83
- readonly snap: "<path d=\"M5.4 15.6V9.4a4.6 4.6 0 0 1 9.2 0v6.2h-3.2V9.4a1.4 1.4 0 0 0-2.8 0v6.2z\"/><path d=\"M5.4 12.8h3.2M11.4 12.8h3.2\" stroke-width=\"1\"/>";
84
- readonly measure: "<rect x=\"2.6\" y=\"7.4\" width=\"14.8\" height=\"5.2\" rx=\"1.2\"/><path d=\"M6 7.4v2.2M9.4 7.4v3M12.8 7.4v2.2\" stroke-width=\"1\"/>";
85
- readonly randomize: "<rect x=\"3.6\" y=\"3.6\" width=\"12.8\" height=\"12.8\" rx=\"2\"/><circle cx=\"7.2\" cy=\"7.2\" r=\"1\" fill=\"currentColor\" stroke=\"none\"/><circle cx=\"10\" cy=\"10\" r=\"1\" fill=\"currentColor\" stroke=\"none\"/><circle cx=\"12.8\" cy=\"12.8\" r=\"1\" fill=\"currentColor\" stroke=\"none\"/>";
86
- readonly refresh: "<path d=\"M4.27 12.09A6.1 6.1 0 0 1 14.67 6.08\"/><path d=\"M14.67 3.38 14.67 6.08 12.01 5.61\"/><path d=\"M15.73 7.91A6.1 6.1 0 0 1 5.33 13.92\"/><path d=\"M5.33 16.62 5.33 13.92 7.99 14.39\"/>";
87
- readonly info: "<circle cx=\"10\" cy=\"10\" r=\"7\"/><path d=\"M10 9.4v4.4\"/><path d=\"M10 6.5h0\"/>";
88
- readonly warning: "<path d=\"M10 3.4 17.4 16.2H2.6z\"/><path d=\"M10 8.4v3.4\"/><path d=\"M10 14h0\"/>";
89
- readonly error: "<circle cx=\"10\" cy=\"10\" r=\"7\"/><path d=\"M7.6 7.6 12.4 12.4M12.4 7.6 7.6 12.4\"/>";
90
- readonly busy: "<path d=\"M10 3.2A6.8 6.8 0 1 1 3.2 10\"/>";
91
- readonly modeLight: "<circle cx=\"10\" cy=\"10\" r=\"3.5\"/><path d=\"M15.3 10L17.7 10M13.75 6.25L15.44 4.56M10 4.7L10 2.3M6.25 6.25L4.56 4.56M4.7 10L2.3 10M6.25 13.75L4.56 15.44M10 15.3L10 17.7M13.75 13.75L15.44 15.44\"/>";
92
- readonly modeDark: "<path d=\"M8.19 3.55A6.7 6.7 0 1 0 16.45 11.81A5.9 5.9 0 0 1 8.19 3.55Z\"/>";
93
- readonly modeAuto: "<path d=\"M10 2.6Q10 10 17.4 10Q10 10 10 17.4Q10 10 2.6 10Q10 10 10 2.6Z\"/>";
94
- readonly strokeWidth: "<path d=\"M3.4 5.6h13.2\" stroke-width=\"1\"/><path d=\"M3.4 10h13.2\" stroke-width=\"2\"/><path d=\"M3.4 15.2h13.2\" stroke-width=\"3.4\"/>";
95
- readonly strokeCap: "<path d=\"M2.5 10H12\" stroke-linecap=\"butt\"/><path d=\"M12 6V14\" stroke-width=\"1\"/>";
96
- readonly strokeJoin: "<path d=\"M4.4 15.5 10 5.5 15.6 15.5\" stroke-linecap=\"butt\" stroke-linejoin=\"miter\"/>";
97
- readonly strokeAlign: "<circle cx=\"10\" cy=\"10\" r=\"6.2\"/>";
98
- readonly capButt: "<path d=\"M5.5 5.25H14.5V14.75H5.5Z\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linejoin=\"miter\"/>";
99
- readonly capRound: "<path d=\"M3.13 5.25H12.13V14.75H3.13Z\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linejoin=\"miter\"/><path d=\"M12.13 4.5A5.5 5.5 0 0 1 12.13 15.5Z\" fill=\"currentColor\" stroke=\"none\"/>";
100
- readonly capSquare: "<path d=\"M3.13 5.25H12.13V14.75H3.13Z\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linejoin=\"miter\"/><path d=\"M12.13 4.5H17.63V15.5H12.13Z\" fill=\"currentColor\" stroke=\"none\"/>";
101
- readonly joinMiter: "<path d=\"M10 3.5 15.6 15.5H4.4Z\" fill=\"currentColor\" stroke=\"none\"/>";
102
- readonly joinRound: "<path d=\"M4.4 15.5V12a5.6 5.6 0 0 1 11.2 0v3.5Z\" fill=\"currentColor\" stroke=\"none\"/>";
103
- readonly joinBevel: "<path d=\"M6.8 8.2h6.4l2.4 7.3H4.4Z\" fill=\"currentColor\" stroke=\"none\"/>";
104
- readonly alignInner: "<path d=\"M10 3.8A6.2 6.2 0 1 0 10 16.2A6.2 6.2 0 1 0 10 3.8Z\" fill=\"currentColor\" stroke=\"none\"/>";
105
- readonly alignCenter: "<path d=\"M10 2.1A7.9 7.9 0 1 0 10 17.9A7.9 7.9 0 1 0 10 2.1ZM10 5.5A4.5 4.5 0 1 0 10 14.5A4.5 4.5 0 1 0 10 5.5Z\" fill=\"currentColor\" stroke=\"none\" fill-rule=\"evenodd\"/>";
106
- readonly alignOuter: "<path d=\"M0 0H20V20H0ZM10 3.8A6.2 6.2 0 1 0 10 16.2A6.2 6.2 0 1 0 10 3.8Z\" fill=\"currentColor\" stroke=\"none\" fill-rule=\"evenodd\"/>";
107
- readonly dashSolid: "<path d=\"M2 10h16\" stroke-width=\"3\" stroke-linecap=\"butt\"/>";
108
- readonly dashDashed: "<path d=\"M2 10h16\" stroke-width=\"3\" stroke-linecap=\"butt\" stroke-dasharray=\"6 4\"/>";
109
- readonly dashDotted: "<path d=\"M2 10h16\" stroke-width=\"3\" stroke-linecap=\"butt\" stroke-dasharray=\"2.5 2\"/>";
110
- readonly dashCustom: "<path d=\"M2 10h16\" stroke-width=\"3\" stroke-linecap=\"butt\" stroke-dasharray=\"5 2 2 2\"/>";
111
- readonly paintSolid: "<path d=\"M3.4 3.4H16.6V16.6H3.4Z\" fill=\"currentColor\" stroke=\"none\" fill-opacity=\"1\"/>";
112
- readonly paintLinear: "<path d=\"M3.4 3.4H6.7V16.6H3.4Z\" fill=\"currentColor\" stroke=\"none\" fill-opacity=\"1\"/><path d=\"M6.7 3.4H10V16.6H6.7Z\" fill=\"currentColor\" stroke=\"none\" fill-opacity=\"0.68\"/><path d=\"M10 3.4H13.3V16.6H10Z\" fill=\"currentColor\" stroke=\"none\" fill-opacity=\"0.42\"/><path d=\"M13.3 3.4H16.6V16.6H13.3Z\" fill=\"currentColor\" stroke=\"none\" fill-opacity=\"0.2\"/>";
113
- readonly paintRadial: "<path d=\"M3.4 3.4H16.6V16.6H3.4ZM4.95 4.95H15.05V15.05H4.95Z\" fill=\"currentColor\" fill-rule=\"evenodd\" stroke=\"none\" fill-opacity=\"0.7\"/><path d=\"M4.95 4.95H15.05V15.05H4.95ZM6.5 6.5H13.5V13.5H6.5Z\" fill=\"currentColor\" fill-rule=\"evenodd\" stroke=\"none\" fill-opacity=\"0.53\"/><path d=\"M6.5 6.5H13.5V13.5H6.5ZM8.05 8.05H11.95V11.95H8.05Z\" fill=\"currentColor\" fill-rule=\"evenodd\" stroke=\"none\" fill-opacity=\"0.37\"/><path d=\"M8.05 8.05H11.95V11.95H8.05Z\" fill=\"currentColor\" fill-rule=\"evenodd\" stroke=\"none\" fill-opacity=\"0.2\"/>";
114
- readonly paintConic: "<path d=\"M10 10L16.6 3.4L16.6 16.6Z\" fill=\"currentColor\" stroke=\"none\" fill-opacity=\"1\"/><path d=\"M10 10L16.6 16.6L3.4 16.6Z\" fill=\"currentColor\" stroke=\"none\" fill-opacity=\"0.68\"/><path d=\"M10 10L3.4 16.6L3.4 3.4Z\" fill=\"currentColor\" stroke=\"none\" fill-opacity=\"0.42\"/><path d=\"M10 10L3.4 3.4L16.6 3.4Z\" fill=\"currentColor\" stroke=\"none\" fill-opacity=\"0.2\"/>";
115
- readonly paintPattern: "<path d=\"M3.4 3.4L4.7 3.4L3.4 4.7Z\" fill=\"currentColor\" stroke=\"none\"/><path d=\"M8.7 3.4L11.3 3.4L3.4 11.3L3.4 8.7Z\" fill=\"currentColor\" stroke=\"none\"/><path d=\"M15.3 3.4L16.6 3.4L16.6 4.7L4.7 16.6L3.4 16.6L3.4 15.3Z\" fill=\"currentColor\" stroke=\"none\"/><path d=\"M16.6 8.7L16.6 11.3L11.3 16.6L8.7 16.6Z\" fill=\"currentColor\" stroke=\"none\"/><path d=\"M16.6 15.3L16.6 16.6L15.3 16.6Z\" fill=\"currentColor\" stroke=\"none\"/><path d=\"M15.3 3.4L16.6 3.4L16.6 4.7Z\" fill=\"currentColor\" stroke=\"none\"/><path d=\"M8.7 3.4L11.3 3.4L16.6 8.7L16.6 11.3Z\" fill=\"currentColor\" stroke=\"none\"/><path d=\"M3.4 3.4L4.7 3.4L16.6 15.3L16.6 16.6L15.3 16.6L3.4 4.7Z\" fill=\"currentColor\" stroke=\"none\"/><path d=\"M11.3 16.6L8.7 16.6L3.4 11.3L3.4 8.7Z\" fill=\"currentColor\" stroke=\"none\"/><path d=\"M4.7 16.6L3.4 16.6L3.4 15.3Z\" fill=\"currentColor\" stroke=\"none\"/>";
116
- readonly paintNone: "<path d=\"M3.4 3.4H16.6V16.6H3.4Z\"/><path d=\"M3.4 16.6L16.6 3.4\" stroke=\"var(--wzl-danger, #d94a3f)\" stroke-width=\"1.8\" stroke-linecap=\"butt\"/>";
117
- readonly layoutRows: "<rect x=\"3.4\" y=\"3.4\" width=\"13.2\" height=\"3.4\" rx=\"1\" fill=\"currentColor\" stroke=\"none\"/><rect x=\"3.4\" y=\"8.3\" width=\"13.2\" height=\"3.4\" rx=\"1\" fill=\"currentColor\" stroke=\"none\"/><rect x=\"3.4\" y=\"13.2\" width=\"13.2\" height=\"3.4\" rx=\"1\" fill=\"currentColor\" stroke=\"none\"/>";
118
- readonly layoutColumns: "<rect x=\"3.4\" y=\"3.4\" width=\"3.4\" height=\"13.2\" rx=\"1\" fill=\"currentColor\" stroke=\"none\"/><rect x=\"8.3\" y=\"3.4\" width=\"3.4\" height=\"13.2\" rx=\"1\" fill=\"currentColor\" stroke=\"none\"/><rect x=\"13.2\" y=\"3.4\" width=\"3.4\" height=\"13.2\" rx=\"1\" fill=\"currentColor\" stroke=\"none\"/>";
119
- readonly layoutGrid: "<rect x=\"3.4\" y=\"3.4\" width=\"3.4\" height=\"3.4\" rx=\"1\" fill=\"currentColor\" stroke=\"none\"/><rect x=\"8.3\" y=\"3.4\" width=\"3.4\" height=\"3.4\" rx=\"1\" fill=\"currentColor\" stroke=\"none\"/><rect x=\"13.2\" y=\"3.4\" width=\"3.4\" height=\"3.4\" rx=\"1\" fill=\"currentColor\" stroke=\"none\"/><rect x=\"3.4\" y=\"8.3\" width=\"3.4\" height=\"3.4\" rx=\"1\" fill=\"currentColor\" stroke=\"none\"/><rect x=\"8.3\" y=\"8.3\" width=\"3.4\" height=\"3.4\" rx=\"1\" fill=\"currentColor\" stroke=\"none\"/><rect x=\"13.2\" y=\"8.3\" width=\"3.4\" height=\"3.4\" rx=\"1\" fill=\"currentColor\" stroke=\"none\"/><rect x=\"3.4\" y=\"13.2\" width=\"3.4\" height=\"3.4\" rx=\"1\" fill=\"currentColor\" stroke=\"none\"/><rect x=\"8.3\" y=\"13.2\" width=\"3.4\" height=\"3.4\" rx=\"1\" fill=\"currentColor\" stroke=\"none\"/><rect x=\"13.2\" y=\"13.2\" width=\"3.4\" height=\"3.4\" rx=\"1\" fill=\"currentColor\" stroke=\"none\"/>";
120
- };
121
- /** Every glyph name in the set. */
122
- type IconName = keyof typeof ICON_PATHS;
123
-
124
- /** Shared prop shape for the icon set. Color comes from the surrounding
125
- * `color` CSS property — every glyph strokes in `currentColor`. */
126
- interface IconProps {
127
- className?: string;
128
- /** Rendered pixel size, applied to both width and height. Defaults to 20. */
129
- size?: number;
130
- /** Accessible name. Omit inside a button that already labels itself; the
131
- * glyph is then `aria-hidden`. */
132
- label?: string;
133
- }
134
- /** Renders one glyph by name. The named components below are the usual way
135
- * in; reach for this when the glyph is chosen at runtime. */
136
- declare function Icon({ name, className, size, label }: IconProps & {
137
- name: IconName;
138
- }): react_jsx_runtime.JSX.Element;
139
-
140
46
  /** Props for {@link ActionBar}. */
141
47
  interface ActionBarProps {
142
48
  /** Group key — only actions with `action.group === group` are rendered. */
@@ -1218,6 +1124,11 @@ type TrackCtx = {
1218
1124
  trackWidth: number;
1219
1125
  valueToFraction: (v: number) => number;
1220
1126
  };
1127
+ /** A {@link Slider} stop that carries a label, drawn under the track at the stop. */
1128
+ type SliderStop = {
1129
+ value: number;
1130
+ label?: ReactNode;
1131
+ };
1221
1132
  /**
1222
1133
  * Props for {@link Slider}.
1223
1134
  *
@@ -1228,6 +1139,16 @@ type TrackCtx = {
1228
1139
  * on it, and the arrow keys move stop to stop. `step` still quantizes the
1229
1140
  * values between them. Each one is drawn on the track as a mark; pass
1230
1141
  * `showStops: false` for a track whose own paint already reads as the stops.
1142
+ * A stop given as a {@link SliderStop} with a `label` gets that label drawn
1143
+ * under it; `stopLabels` narrows the row to the two ends or turns it off.
1144
+ *
1145
+ * `snap: 'strict'` makes every stop a detent the thumb must rest on: drags and
1146
+ * track presses land on the nearest one, and `step` no longer applies.
1147
+ * `spacing: 'even'` places the stops at equal intervals, runs the track from
1148
+ * the first stop to the last, and maps values linearly within each gap — so a
1149
+ * geometric list (0.25/0.5/1/2/4) gets usable room for every stop instead of
1150
+ * four crowded into the first fifth. Both need stops; with fewer than two,
1151
+ * `'even'` falls back to linear.
1231
1152
  *
1232
1153
  * `trackClick: 'move-nearest'` makes a press on bare track send the closest
1233
1154
  * thumb there and continue as a drag. It is off by default because on a
@@ -1247,8 +1168,11 @@ type SliderProps<T extends Thumb = Thumb> = {
1247
1168
  min: number;
1248
1169
  max: number;
1249
1170
  step?: number;
1250
- stops?: number[];
1171
+ stops?: readonly (number | SliderStop)[];
1251
1172
  showStops?: boolean;
1173
+ stopLabels?: 'all' | 'ends' | 'none';
1174
+ snap?: 'magnetic' | 'strict';
1175
+ spacing?: 'linear' | 'even';
1252
1176
  trackClick?: 'none' | 'move-nearest';
1253
1177
  constraint?: 'free' | 'ordered';
1254
1178
  onAddThumb?: (atValue: number) => T | null;
@@ -1676,33 +1600,6 @@ declare const fieldClasses: {
1676
1600
  error: string;
1677
1601
  };
1678
1602
 
1679
- /** Props for {@link Input}, on top of React Aria's `TextField` props. */
1680
- type InputProps = Omit<TextFieldProps, 'children' | 'className'> & {
1681
- label?: ReactNode;
1682
- description?: ReactNode;
1683
- errorMessage?: ReactNode | ((v: ValidationResult) => ReactNode);
1684
- placeholder?: string;
1685
- leadingAdornment?: ReactNode;
1686
- trailingAdornment?: ReactNode;
1687
- className?: string;
1688
- };
1689
- /**
1690
- * Single-line text input wrapping React Aria's TextField. Supplies a
1691
- * default skin against the `--wzl-*` token system, and exposes the
1692
- * familiar label / description / errorMessage / adornment slot shape.
1693
- *
1694
- * `ref` forwards to the underlying `<input>`.
1695
- */
1696
- declare const Input: react.ForwardRefExoticComponent<Omit<TextFieldProps, "className" | "children"> & {
1697
- label?: ReactNode;
1698
- description?: ReactNode;
1699
- errorMessage?: ReactNode | ((v: ValidationResult) => ReactNode);
1700
- placeholder?: string;
1701
- leadingAdornment?: ReactNode;
1702
- trailingAdornment?: ReactNode;
1703
- className?: string;
1704
- } & react.RefAttributes<HTMLInputElement>>;
1705
-
1706
1603
  /**
1707
1604
  * Props for {@link Checkbox}, on top of React Aria's `Checkbox` props. The
1708
1605
  * label is passed as children.
@@ -1843,79 +1740,6 @@ declare const NumberField: react.ForwardRefExoticComponent<Omit<NumberFieldProps
1843
1740
  className?: string;
1844
1741
  } & react.RefAttributes<HTMLInputElement>>;
1845
1742
 
1846
- /** The `portalContainer` prop every weasel overlay accepts. */
1847
- interface OverlayPortalProps {
1848
- /**
1849
- * Where the overlay's portal mounts. Defaults to the nearest ancestor of
1850
- * the overlay's own position that carries a weasel theme, so the overlay
1851
- * resolves the same `--wzl-*` tokens as the control it belongs to. Pass
1852
- * `null` for `document.body`.
1853
- */
1854
- portalContainer?: Element | null;
1855
- }
1856
- /** React Aria props minus the portal key a weasel overlay owns. */
1857
- type WithoutPortalTarget<T> = Omit<T, 'UNSTABLE_portalContainer'>;
1858
-
1859
- /** One option in a {@link Select}'s `options` list. */
1860
- type SelectOption = {
1861
- value: string;
1862
- label: ReactNode;
1863
- isDisabled?: boolean;
1864
- /**
1865
- * Plain-text form of `label`, for type-to-select and screen readers.
1866
- * Only needed when `label` isn't a bare string — a label built from
1867
- * elements has no text React Aria can read off it. A string label
1868
- * supplies this itself.
1869
- */
1870
- textValue?: string;
1871
- };
1872
- type Key$2 = string | number;
1873
- /**
1874
- * Props for {@link Select}, on top of React Aria's `Select` props, with the
1875
- * selection key narrowed to the option value type.
1876
- */
1877
- type SelectProps<T extends Key$2 = string> = Omit<SelectProps$1<object>, 'children' | 'className' | 'selectedKey' | 'defaultSelectedKey' | 'onSelectionChange'> & {
1878
- label?: ReactNode;
1879
- description?: ReactNode;
1880
- errorMessage?: ReactNode | ((v: ValidationResult) => ReactNode);
1881
- placeholder?: string;
1882
- /** Either pass `options` for a quick render, or `children` for full control. */
1883
- options?: ReadonlyArray<SelectOption & {
1884
- value: T;
1885
- }>;
1886
- children?: ReactNode;
1887
- selectedKey?: T | null;
1888
- defaultSelectedKey?: T;
1889
- onSelectionChange?: (key: T) => void;
1890
- /**
1891
- * `'fill'` (the default) takes the width of whatever row the select sits in.
1892
- * `'fit'` sizes the trigger to its widest option, so it neither swallows a
1893
- * toolbar's slack nor changes width as the selection moves.
1894
- */
1895
- width?: 'fill' | 'fit';
1896
- className?: string;
1897
- } & OverlayPortalProps;
1898
- /**
1899
- * Form select wrapping React Aria's Select. Pass either `options` for a
1900
- * quick declarative render or `children` of `<SelectItem>` for control over
1901
- * each row.
1902
- *
1903
- * The selection key type is parameterized so consumers with a string-literal
1904
- * union for `value` (e.g. `'r' | 'g' | 'b'`) get a typed `onSelectionChange`.
1905
- */
1906
- declare function Select<T extends Key$2 = string>(props: SelectProps<T>): react_jsx_runtime.JSX.Element;
1907
- /** Props for {@link SelectItem}, on top of React Aria's `ListBoxItem` props. */
1908
- type SelectItemProps = Omit<ListBoxItemProps, 'className' | 'children'> & {
1909
- children?: ReactNode;
1910
- className?: string;
1911
- };
1912
- /**
1913
- * One row in a {@link Select}'s list, with a leading check mark when
1914
- * selected. A string child supplies its own `textValue`; anything richer must
1915
- * pass one so type-to-select and screen readers have something to read.
1916
- */
1917
- declare function SelectItem({ children, className, textValue, ...rest }: SelectItemProps): react_jsx_runtime.JSX.Element;
1918
-
1919
1743
  /** One row in a {@link MenuButton}'s list. */
1920
1744
  type MenuButtonItem<T extends string = string> = {
1921
1745
  value: T;
@@ -2667,5 +2491,5 @@ declare const MINUS_SIGN = "\u2212";
2667
2491
  */
2668
2492
  declare function formatNumber(value: number, options?: Intl.NumberFormatOptions): string;
2669
2493
 
2670
- export { ActionBar, ActionsBar, Badge, Callout, Checkbox, ComboBox, ComboBoxItem, CurveEditor, DataGrid, Dialog, Disclosure, DisclosureRow, DragHandleGlyph, EDGE_PROFILES, Field, ICON_PATHS, Icon, Input, KeyCap, KeySequence, MINUS_SIGN, MenuButton, NumberField, OptionsBar, Plot2D, PointPlotter, Powerline, Radio, RadioGroup, RangeSlider, Select, SelectItem, Sidebar, SidebarPanel, Slider, Switch, Tab, TabList, TabPanel, Tabs, ToolButton, ToolGroup, ToolPalette, chromaAt, detectPlatform, dlog, fieldClasses, formatNumber, formatShortcut, formatShortcutParts, inferKeycapKind, isDebugEnabled, isPrefLeaf, keyGlyph, keySpecFromKey, keySpecsFromMods, oklchToHex, paintGradientTrack, prefValueAtPath, useAsyncOptions, useReorderDragList, useRovingTabIndex, visiblePrefSubtree };
2671
- export type { ActionBarProps, ActionsBarItem, ActionsBarProps, ActionsBarSize, ActionsBarVariant, AddPointMode, AnchorRenderProps, AsyncOption, AsyncOptionsResult, AxesSettings, BadgeProps, BadgeShape, BadgeSize, BadgeTone, BadgeVariant, BoundsCtx, BuiltInEdgeName, CalloutProps, CheckboxProps, ChromaCurve, ChromaCurvePoint, ComboBoxCommit, ComboBoxFilter, ComboBoxItemProps, ComboBoxOption, ComboBoxProps, ControlPoint, CurveDomain, CurveEditorProps, DataGridColumn, DataGridProps, DialogProps, DisclosureDirection, DisclosureProps, DisclosureRowProps, DragHandleGlyphProps, EdgeCap, EdgeProfile, EndpointMode, FieldOrientation, FieldProps, FillSettings, GradientTrackOpts, GridSettings, IconName, IconProps, InputProps, InterpolationMode, KeyCapProps, KeyCapVariant, KeySequenceProps, KeySpec, KeycapKind, LayerListItem, LogicalMod, LogicalModSpec, MenuButtonItem, MenuButtonProps, NumberFieldProps, OptionsBarItem, OptionsBarProps, OptionsBarSize, OptionsBarVariant, Platform, Plot2DCoords, Plot2DHandle, Plot2DProps, PointPlotterProps, PowerlineProps, PowerlineSegment, RadioGroupProps, RadioProps, RangeSliderProps, ReorderDragHandlers, ReorderDragState, RovingItem, RovingTabIndex, SelectItemProps, SelectOption, SelectProps, SidebarPanelProps, SidebarProps, SliderProps, SwitchProps, TabListProps, TabPanelProps, TabProps, TabsProps, Thumb, ThumbRenderCtx, ThumbShape, ToolButtonProps, ToolGroupProps, ToolPaletteProps, TrackCtx, UseAsyncOptionsProps, UseReorderDragListOptions, UseRovingTabIndexOptions };
2494
+ export { ActionBar, ActionsBar, Badge, Callout, Checkbox, ComboBox, ComboBoxItem, CurveEditor, DataGrid, Dialog, Disclosure, DisclosureRow, DragHandleGlyph, EDGE_PROFILES, Field, KeyCap, KeySequence, MINUS_SIGN, MenuButton, NumberField, OptionsBar, Plot2D, PointPlotter, Powerline, Radio, RadioGroup, RangeSlider, Sidebar, SidebarPanel, Slider, Switch, Tab, TabList, TabPanel, Tabs, ToolButton, ToolGroup, ToolPalette, chromaAt, detectPlatform, dlog, fieldClasses, formatNumber, formatShortcut, formatShortcutParts, inferKeycapKind, isDebugEnabled, isPrefLeaf, keyGlyph, keySpecFromKey, keySpecsFromMods, oklchToHex, paintGradientTrack, prefValueAtPath, useAsyncOptions, useReorderDragList, useRovingTabIndex, visiblePrefSubtree };
2495
+ export type { ActionBarProps, ActionsBarItem, ActionsBarProps, ActionsBarSize, ActionsBarVariant, AddPointMode, AnchorRenderProps, AsyncOption, AsyncOptionsResult, AxesSettings, BadgeProps, BadgeShape, BadgeSize, BadgeTone, BadgeVariant, BoundsCtx, BuiltInEdgeName, CalloutProps, CheckboxProps, ChromaCurve, ChromaCurvePoint, ComboBoxCommit, ComboBoxFilter, ComboBoxItemProps, ComboBoxOption, ComboBoxProps, ControlPoint, CurveDomain, CurveEditorProps, DataGridColumn, DataGridProps, DialogProps, DisclosureDirection, DisclosureProps, DisclosureRowProps, DragHandleGlyphProps, EdgeCap, EdgeProfile, EndpointMode, FieldOrientation, FieldProps, FillSettings, GradientTrackOpts, GridSettings, InterpolationMode, KeyCapProps, KeyCapVariant, KeySequenceProps, KeySpec, KeycapKind, LayerListItem, LogicalMod, LogicalModSpec, MenuButtonItem, MenuButtonProps, NumberFieldProps, OptionsBarItem, OptionsBarProps, OptionsBarSize, OptionsBarVariant, Platform, Plot2DCoords, Plot2DHandle, Plot2DProps, PointPlotterProps, PowerlineProps, PowerlineSegment, RadioGroupProps, RadioProps, RangeSliderProps, ReorderDragHandlers, ReorderDragState, RovingItem, RovingTabIndex, SidebarPanelProps, SidebarProps, SliderProps, SwitchProps, TabListProps, TabPanelProps, TabProps, TabsProps, Thumb, ThumbRenderCtx, ThumbShape, ToolButtonProps, ToolGroupProps, ToolPaletteProps, TrackCtx, UseAsyncOptionsProps, UseReorderDragListOptions, UseRovingTabIndexOptions };
@@ -1,4 +1,4 @@
1
1
  import '../chunk-SBXNQW4G.js';
2
- export { m as ActionBar, r8 as ActionsBar, Lt as Badge, a3 as Button, g3 as Callout, l6 as CalloutTrigger, o as Checkbox, y3 as ComboBox, S as ComboBoxItem, P2 as CurveEditor, s2 as DataGrid, l3 as Dialog, r5 as Disclosure, i3 as DisclosureRow, n4 as DragHandleGlyph, Je as EDGE_PROFILES, n2 as Field, t as ICON_PATHS, r as Icon, u2 as Input, s3 as KeyCap, c2 as KeySequence, c3 as LayerStack, e as MINUS_SIGN, l5 as MenuButton, g2 as NumberField, r7 as OptionsBar, w2 as Plot2D, n7 as PointPlotter, r9 as Powerline, u3 as Radio, l as RadioGroup, l2 as RangeSlider, g as Select, b2 as SelectItem, n5 as Sidebar, s4 as SidebarPanel, y2 as Slider, a2 as Switch, c4 as Tab, s5 as TabList, l4 as TabPanel, o4 as Tabs, r6 as ToggleBar, o3 as ToolButton, n6 as ToolGroup, _2 as ToolPalette, dr as chromaAt, u4 as detectPlatform, a as dlog, r3 as fieldClasses, t2 as formatNumber, d2 as formatShortcut, u5 as formatShortcutParts, o2 as inferKeycapKind, i as isDebugEnabled, n3 as isPrefLeaf, e2 as keyGlyph, p2 as keySpecFromKey, d as keySpecsFromMods, ur as oklchToHex, v2 as paintGradientTrack, r4 as prefValueAtPath, fr as useAsyncOptions, s as useReorderDragList, a4 as useRovingTabIndex, i2 as visiblePrefSubtree } from '../chunk-S2SHZRD7.js';
2
+ export { m as ActionBar, r8 as ActionsBar, Lt as Badge, a5 as Button, g3 as Callout, l8 as CalloutTrigger, o2 as Checkbox, y2 as ComboBox, S3 as ComboBoxItem, L2 as CurveEditor, s2 as DataGrid, l5 as Dialog, r6 as Disclosure, i3 as DisclosureRow, n4 as DragHandleGlyph, Je as EDGE_PROFILES, n2 as Field, t as ICON_PATHS, o as Icon, u2 as Input, s3 as KeyCap, c3 as KeySequence, c4 as LayerStack, e as MINUS_SIGN, l7 as MenuButton, g2 as NumberField, r7 as OptionsBar, w2 as Plot2D, n8 as PointPlotter, r10 as Powerline, u3 as Radio, l3 as RadioGroup, l4 as RangeSlider, g as Select, b3 as SelectItem, n5 as Sidebar, s4 as SidebarPanel, b2 as Slider, a4 as Switch, c6 as Tab, s5 as TabList, l6 as TabPanel, o5 as Tabs, r3 as ToggleBar, o4 as ToolButton, n7 as ToolGroup, _2 as ToolPalette, Ar as chromaAt, u4 as detectPlatform, a as dlog, r4 as fieldClasses, t2 as formatNumber, d2 as formatShortcut, u5 as formatShortcutParts, o3 as inferKeycapKind, i as isDebugEnabled, n3 as isPrefLeaf, e3 as keyGlyph, p2 as keySpecFromKey, d as keySpecsFromMods, kr as oklchToHex, v2 as paintGradientTrack, r5 as prefValueAtPath, jr as useAsyncOptions, s as useReorderDragList, a3 as useRovingTabIndex, i2 as visiblePrefSubtree } from '../chunk-T3EC2DXD.js';
3
3
  //# sourceMappingURL=weasel-ui.js.map
4
4
  //# sourceMappingURL=weasel-ui.js.map
@@ -90,6 +90,8 @@ declare function Sidebar({ children, title, collapsed, onToggle }: SidebarProps)
90
90
  interface SplitProps {
91
91
  /** The sidebar pane's contents. */
92
92
  sidebar: ReactNode;
93
+ /** The edge the sidebar sits on. Read once, when the strip mounts. Default `'start'`. */
94
+ side?: 'start' | 'end';
93
95
  /** The content pane's contents. */
94
96
  children: ReactNode;
95
97
  /** Names the sidebar pane, and through it the seam. Default `'Sidebar'`. */
@@ -129,7 +131,7 @@ interface SplitProps {
129
131
  * arrows / Home / End, and clamped against the content pane's floor rather
130
132
  * than against the sidebar's alone.
131
133
  */
132
- declare function Split({ sidebar, children, label, className, sidebarClassName, contentClassName, width, defaultWidth, minWidth, maxWidth, contentMinWidth, onWidthChange, viewport, }: SplitProps): react_jsx_runtime.JSX.Element;
134
+ declare function Split({ sidebar, children, side, label, className, sidebarClassName, contentClassName, width, defaultWidth, minWidth, maxWidth, contentMinWidth, onWidthChange, viewport, }: SplitProps): react_jsx_runtime.JSX.Element;
133
135
 
134
136
  /** Props for `<StatusBar>`. */
135
137
  interface StatusBarProps {
@@ -1,9 +1,9 @@
1
- export { FloatingPanel, JobProgress, Legend, Sidebar, Split } from '../chunk-EKIICY6X.js';
2
- export { FpsMeter, ScaleIndicator, StatusBar, Toolbar, ZoomControl } from '../chunk-KJALCDWE.js';
1
+ export { FloatingPanel, JobProgress, Legend, Sidebar, Split } from '../chunk-EHGVROVV.js';
2
+ export { FpsMeter, ScaleIndicator, StatusBar, Toolbar, ZoomControl } from '../chunk-UN4U4P63.js';
3
3
  import '../chunk-RWNDDKOH.js';
4
4
  import '../chunk-CQLQPQ4P.js';
5
5
  import '../chunk-2YILQ7Y5.js';
6
6
  import '../chunk-SBXNQW4G.js';
7
- import '../chunk-S2SHZRD7.js';
7
+ import '../chunk-T3EC2DXD.js';
8
8
  //# sourceMappingURL=index.js.map
9
9
  //# sourceMappingURL=index.js.map
@@ -1,12 +1,12 @@
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-jcx_TdU6.js';
2
- import { S as SerializedTrial, I as InstrumentSerializers, T as TrialRecord, U as UndoStack, c as StorageAdapter } from '../_dts/frac-8R6UmlvN.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/frac-8R6UmlvN.js';
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-uLlmaccn.js';
2
+ import { S as SerializedTrial, I as InstrumentSerializers, T as TrialRecord, U as UndoStack, c as StorageAdapter } from '../_dts/frac-B4okC2lX.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/frac-B4okC2lX.js';
4
4
  import * as react_jsx_runtime from 'react/jsx-runtime';
5
5
  import { ReactNode } from 'react';
6
6
  import 'zustand/vanilla';
7
- import '../_dts/types-Ca2LCnPq.js';
7
+ import '../_dts/types-DzoNY1pO.js';
8
8
  import '@weasel-js/core';
9
- import '../_dts/PrefsForm.d-DDHFANkc.js';
9
+ import '../_dts/PrefsForm.d-DPy9I8It.js';
10
10
  import '../_dts/types-DJ79Tg5J.js';
11
11
 
12
12
  /** The storage key a lab writes one of its buckets under. Namespaced by
@@ -1,10 +1,12 @@
1
- import { openLabStore } from '../chunk-67SJLMC7.js';
2
- export { CURRENT_DOCUMENT_VERSION, createLabStore, dockPanel, labDocumentKey, openLabStore, panelKey, quarantineKey, undockPanel, useTrialState } from '../chunk-67SJLMC7.js';
1
+ import { openLabStore } from '../chunk-IXTQI7JX.js';
2
+ export { CURRENT_DOCUMENT_VERSION, createLabStore, dockPanel, labDocumentKey, openLabStore, panelKey, quarantineKey, undockPanel, useTrialState } from '../chunk-IXTQI7JX.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-E44SU6XS.js';
5
+ import '../chunk-ZDHY47EV.js';
6
+ import '../chunk-7PFH3CNM.js';
6
7
  import { LabStoreProvider, TrialIdProvider } from '../chunk-2YILQ7Y5.js';
7
8
  export { LabStoreContext, LabStoreProvider, TrialIdContext, TrialIdProvider, useLabStore, useTrialId } from '../chunk-2YILQ7Y5.js';
9
+ import '../chunk-T3EC2DXD.js';
8
10
  import { jsx, Fragment } from 'react/jsx-runtime';
9
11
 
10
12
  var SINGLETON_INSTRUMENT = "__singleton__";
@@ -1 +1 @@
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"]}
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"]}