@weasel-js/labkit 1.5.1 → 1.5.2

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 (92) hide show
  1. package/dist/_dts/{CanvasStackContext-CJNMS6mz.d.ts → CanvasStackContext-CMMo180l.d.ts} +1 -1
  2. package/dist/_dts/{Select.d-Gwr8fLpK.d.ts → Select.d-ZTiwzYyT.d.ts} +27 -1
  3. package/dist/_dts/{frac-B4okC2lX.d.ts → frac-B4hFJMiN.d.ts} +16 -6
  4. package/dist/_dts/{index-BNdz-tNd.d.ts → index-8LiKe3A-.d.ts} +30 -43
  5. package/dist/_dts/{index-CSJoj4LC.d.ts → index-DlKolEIZ.d.ts} +5 -4
  6. package/dist/_dts/{types-DzoNY1pO.d.ts → types-Db-3NNk1.d.ts} +4 -4
  7. package/dist/_dts/{usePanZoom-Pzf9f2jh.d.ts → usePanZoom-SSTZe410.d.ts} +4 -47
  8. package/dist/_dts/{useTrialState-uLlmaccn.d.ts → useTrialState-pnAE-UBD.d.ts} +1 -1
  9. package/dist/canvas/index.d.ts +4 -4
  10. package/dist/canvas/index.js +1 -1
  11. package/dist/chrome/index.d.ts +3 -3
  12. package/dist/chrome/index.js +6 -6
  13. package/dist/{chunk-PJ7WEQBJ.js → chunk-6BUQ77ZV.js} +4 -4
  14. package/dist/{chunk-PJ7WEQBJ.js.map → chunk-6BUQ77ZV.js.map} +1 -1
  15. package/dist/{chunk-UN4U4P63.js → chunk-753Y6HE6.js} +9 -9
  16. package/dist/chunk-753Y6HE6.js.map +1 -0
  17. package/dist/{chunk-ZDHY47EV.js → chunk-A2ACAGW6.js} +6 -7
  18. package/dist/chunk-A2ACAGW6.js.map +1 -0
  19. package/dist/{chunk-IHUVQ3TX.js → chunk-CKUKF72R.js} +10 -10
  20. package/dist/chunk-CKUKF72R.js.map +1 -0
  21. package/dist/{chunk-MDVTK5U3.js → chunk-D35PFTS7.js} +3 -3
  22. package/dist/{chunk-MDVTK5U3.js.map → chunk-D35PFTS7.js.map} +1 -1
  23. package/dist/{chunk-PHK4W562.js → chunk-EMXAIRUJ.js} +3 -3
  24. package/dist/{chunk-PHK4W562.js.map → chunk-EMXAIRUJ.js.map} +1 -1
  25. package/dist/{chunk-EH7UEQV7.js → chunk-FKLT3ITC.js} +69 -69
  26. package/dist/chunk-FKLT3ITC.js.map +1 -0
  27. package/dist/{chunk-EHGVROVV.js → chunk-KJCUERQF.js} +3 -3
  28. package/dist/{chunk-EHGVROVV.js.map → chunk-KJCUERQF.js.map} +1 -1
  29. package/dist/chunk-LASCBWW7.js +13456 -0
  30. package/dist/chunk-LASCBWW7.js.map +1 -0
  31. package/dist/{chunk-IXTQI7JX.js → chunk-LRI3MBGR.js} +4 -4
  32. package/dist/{chunk-IXTQI7JX.js.map → chunk-LRI3MBGR.js.map} +1 -1
  33. package/dist/{chunk-7PFH3CNM.js → chunk-REOBGYMC.js} +4 -4
  34. package/dist/{chunk-7PFH3CNM.js.map → chunk-REOBGYMC.js.map} +1 -1
  35. package/dist/{chunk-CEIUBPPW.js → chunk-TT5C5S6R.js} +3 -86
  36. package/dist/chunk-TT5C5S6R.js.map +1 -0
  37. package/dist/config/index.d.ts +7 -8
  38. package/dist/config/index.js +5 -5
  39. package/dist/controls/index.d.ts +2 -2
  40. package/dist/controls/index.js +4 -4
  41. package/dist/dragdrop/index.d.ts +2 -2
  42. package/dist/index.d.ts +72 -28
  43. package/dist/index.js +142 -123
  44. package/dist/index.js.map +1 -1
  45. package/dist/layers/index.d.ts +3 -3
  46. package/dist/layers/index.js +2 -2
  47. package/dist/loupe/index.d.ts +4 -4
  48. package/dist/passthrough/weasel-ui.d.ts +33 -30
  49. package/dist/passthrough/weasel-ui.js +1 -1
  50. package/dist/primitives/index.js +3 -3
  51. package/dist/state/index.d.ts +4 -4
  52. package/dist/state/index.js +5 -5
  53. package/dist/styles.css +114 -18
  54. package/dist/ui/layers/index.js +1 -1
  55. package/dist/undo/index.d.ts +2 -2
  56. package/package.json +9 -9
  57. package/src/canvas/index.ts +0 -9
  58. package/src/chrome/labTypes.ts +1 -1
  59. package/src/chrome/regions/PaletteRegion.test.tsx +18 -0
  60. package/src/chrome/regions/PaletteRegion.tsx +5 -4
  61. package/src/chrome/regions/TitleBarRegion.tsx +1 -1
  62. package/src/chrome/types.ts +8 -2
  63. package/src/config/builder.ts +3 -4
  64. package/src/config/types.ts +4 -4
  65. package/src/controls/AutoControls.stories.tsx +6 -6
  66. package/src/controls/ControlPanel.less +23 -0
  67. package/src/controls/ControlPanel.stories.tsx +41 -0
  68. package/src/controls/ControlPanel.test.tsx +53 -110
  69. package/src/controls/ControlPanel.tsx +61 -77
  70. package/src/index.test.ts +0 -2
  71. package/src/index.ts +4 -10
  72. package/src/lab/Lab.tsx +21 -5
  73. package/src/layers/LayerList.less +1 -1
  74. package/src/layers/LayerList.stories.tsx +1 -1
  75. package/src/primitives/FpsMeter.less +6 -1
  76. package/src/primitives/FpsMeter.test.tsx +12 -4
  77. package/src/primitives/FpsMeter.tsx +6 -1
  78. package/src/primitives/JobProgress.stories.tsx +1 -1
  79. package/src/primitives/StatusBar.less +6 -0
  80. package/src/state/types.ts +6 -1
  81. package/src/state/view.test.ts +4 -4
  82. package/src/trial/Trial.canvas.test.tsx +8 -4
  83. package/src/trial/Trial.config.test.tsx +1 -1
  84. package/dist/chunk-CEIUBPPW.js.map +0 -1
  85. package/dist/chunk-EH7UEQV7.js.map +0 -1
  86. package/dist/chunk-IHUVQ3TX.js.map +0 -1
  87. package/dist/chunk-T3EC2DXD.js +0 -12628
  88. package/dist/chunk-T3EC2DXD.js.map +0 -1
  89. package/dist/chunk-UN4U4P63.js.map +0 -1
  90. package/dist/chunk-ZDHY47EV.js.map +0 -1
  91. package/src/canvas/useOrbit.test.ts +0 -167
  92. package/src/canvas/useOrbit.ts +0 -156
@@ -1,6 +1,6 @@
1
1
  import * as react from 'react';
2
2
  import { RefObject } from 'react';
3
- import { k as ViewTransform, W as WorldFrame } from './frac-B4okC2lX.js';
3
+ import { k as ViewTransform, W as WorldFrame } from './frac-B4hFJMiN.js';
4
4
 
5
5
  /** One layer of a canvas stack: its id, whether it is currently shown, and how
6
6
  * it paints itself. */
@@ -6,7 +6,7 @@ import { TextFieldProps, ValidationResult, SelectProps as SelectProps$1, ListBox
6
6
  declare const ICON_PATHS: {
7
7
  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\"/>";
8
8
  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\"/>";
9
- readonly close: "<path d=\"M5 5 15 15M15 5 5 15\" stroke-width=\"1.75\"/>";
9
+ readonly close: "<path d=\"M4.5 4.5 15.5 15.5M15.5 4.5 4.5 15.5\" stroke-width=\"1.75\"/>";
10
10
  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\"/>";
11
11
  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\"/>";
12
12
  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\"/>";
@@ -20,6 +20,14 @@ declare const ICON_PATHS: {
20
20
  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\"/>";
21
21
  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\"/>";
22
22
  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\"/>";
23
+ readonly bold: "<path d=\"M6 3.5h4.6a3.1 3.1 0 0 1 0 6.2H6zM6 9.7h5.4a3.4 3.4 0 0 1 0 6.8H6z\" stroke-width=\"2.1\"/>";
24
+ readonly italic: "<path d=\"M9 3.5h6M5 16.5h6M12.5 3.5 7.5 16.5\"/>";
25
+ readonly underline: "<path d=\"M6 3.4v5.6a4 4 0 0 0 8 0V3.4\"/><path d=\"M4.6 17h10.8\"/>";
26
+ readonly strikethrough: "<path d=\"M14.4 5.8c-.9-1.6-2.4-2.4-4.4-2.4-2.5 0-4.2 1.3-4.2 3.1 0 .9.4 1.6 1.2 2.2\"/><path d=\"M5.6 14.2c.9 1.6 2.4 2.4 4.4 2.4 2.5 0 4.2-1.3 4.2-3.1 0-.9-.4-1.6-1.2-2.2\"/><path d=\"M3.4 10h13.2\"/>";
27
+ readonly overline: "<path d=\"M4.6 3h10.8\"/><ellipse cx=\"10\" cy=\"11.4\" rx=\"4.4\" ry=\"4.8\"/>";
28
+ readonly superscript: "<path d=\"M3.6 8.6 10.4 16.4M10.4 8.6 3.6 16.4\"/><path d=\"M11.9 5.3a2.2 2.2 0 1 1 4.3.8c0 1.4-4.3 2.2-4.3 3.5h4.5\"/>";
29
+ readonly subscript: "<path d=\"M3.6 3.6 10.4 11.4M10.4 3.6 3.6 11.4\"/><path d=\"M11.9 11.5a2.2 2.2 0 1 1 4.3.8c0 1.4-4.3 2.2-4.3 3.5h4.5\"/>";
30
+ readonly code: "<path d=\"M7 6.2 3.2 10 7 13.8M13 6.2 16.8 10 13 13.8\"/><path d=\"M11.2 4.8 8.8 15.2\"/>";
23
31
  readonly play: "<path d=\"M7.6 5.2 15.6 10 7.6 14.8Z\"/>";
24
32
  readonly pause: "<path d=\"M7.8 5.2v9.6M12.2 5.2v9.6\"/>";
25
33
  readonly stop: "<rect x=\"5.6\" y=\"5.6\" width=\"8.8\" height=\"8.8\" rx=\"1.4\"/>";
@@ -395,6 +403,10 @@ type SelectOption = {
395
403
  textValue?: string;
396
404
  };
397
405
  type Key = string | number;
406
+ /** How a {@link Select} trigger signals that it opens a list. */
407
+ type SelectIndicator = 'chevron' | 'underline' | 'none';
408
+ /** Where a {@link Select}'s list opens relative to its trigger. */
409
+ type SelectPopup = 'over' | 'below';
398
410
  /**
399
411
  * Props for {@link Select}, on top of React Aria's `Select` props, with the
400
412
  * selection key narrowed to the option value type.
@@ -420,6 +432,20 @@ type SelectProps<T extends Key = string> = Omit<SelectProps$1<object>, 'children
420
432
  width?: 'fill' | 'fit';
421
433
  /** `'bare'` drops the box, for a select set in a row of other chrome such as a property row. */
422
434
  variant?: 'field' | 'bare';
435
+ /**
436
+ * How the trigger says it opens a list. `'chevron'` draws the caret beside
437
+ * the value; `'underline'` marks the value itself, dotted at rest and solid
438
+ * while it is pointed at or open; `'none'` says nothing. Unset takes the
439
+ * variant's own: a boxed select shows the caret, a bare one — set in a row
440
+ * where 10px of caret is a tenth of the value's width — underlines.
441
+ */
442
+ indicator?: SelectIndicator;
443
+ /**
444
+ * Where the list opens. `'over'` (the default) puts the selected row on the
445
+ * trigger, its label in the trigger's own text column, so choosing what is
446
+ * already chosen moves nothing; `'below'` hangs it under the trigger.
447
+ */
448
+ popup?: SelectPopup;
423
449
  /**
424
450
  * Id for the trigger button. React Aria puts a plain `id` on the wrapper,
425
451
  * which is not labelable, so an outer `<label for>` needs this to reach a
@@ -1,5 +1,5 @@
1
1
  import { ComponentType, ReactNode, RefObject } from 'react';
2
- import { R as ResolvedConfig, C as ConfigPath, V as ValueAtPath, a as ConfigField, b as ConfigSchema } from './types-DzoNY1pO.js';
2
+ import { R as ResolvedConfig, C as ConfigPath, V as ValueAtPath, a as ConfigField, b as ConfigSchema } from './types-Db-3NNk1.js';
3
3
  import { J as JobHandle, a as JobCapability } from './types-DJ79Tg5J.js';
4
4
  import { Scene } from '@weasel-js/core';
5
5
 
@@ -130,6 +130,10 @@ interface SavedSnapshot {
130
130
  }
131
131
  /** `auto` follows the OS; the other two are an explicit choice. */
132
132
  type LabMode = 'auto' | 'light' | 'dark';
133
+ /** How much room the lab's own chrome takes — the theme's density axis, named
134
+ * the way the theme names it. A lab's instruments are unaffected: this sizes
135
+ * the shell around them. */
136
+ type LabDensity = 'compact' | 'comfortable' | 'roomy';
133
137
  /** Everything a lab persists: its trials, its saved snapshots, and the
134
138
  * chosen color mode. */
135
139
  interface LabStoreState {
@@ -173,7 +177,7 @@ interface TrialStateHandle<TS, TC> {
173
177
  setState: (next: TS | ((prev: TS) => TS)) => void;
174
178
  config: TC;
175
179
  /** The config as stored, before any auto path is resolved. What the control
176
- * panel renders, so a ghosted control sits at the value it pins back to. */
180
+ * panel renders, so an auto row pins back to the value it was holding. */
177
181
  raw: TC;
178
182
  /** Dotted paths this trial has unpinned. */
179
183
  auto: ReadonlySet<string>;
@@ -265,12 +269,18 @@ interface ToolbarItem<TCtx = TrialChromeContext> {
265
269
  * zero-argument handler stays valid. */
266
270
  onActivate: (ctx: TCtx) => void;
267
271
  }
268
- /** A selectable tool in the palette region. */
269
- interface ToolItem {
272
+ /** A tool in the palette region: a mode by default, a command when it carries
273
+ * an `onActivate`. `TCtx` is the chrome context that handler is handed — a
274
+ * trial's, or the lab's for a lab-level rail. */
275
+ interface ToolItem<TCtx = TrialChromeContext> {
270
276
  icon: IconComponent;
271
277
  label: string;
278
+ /** Shown in the tooltip. Not bound here — the trial owns its keymap. */
272
279
  shortcut?: string;
273
280
  disabled?: boolean;
281
+ /** Runs on press instead of selecting. An item with one is a command: it
282
+ * never writes the tool slot, and never reads as the current tool. */
283
+ onActivate?: (ctx: TCtx) => void;
274
284
  }
275
285
  /** A titled block in the sidebar. */
276
286
  interface SidebarSection {
@@ -1018,5 +1028,5 @@ declare function fracContains(box: FracRect, pt: FracPoint, tol?: number): boole
1018
1028
  * answers false for two rects that merely overlap. */
1019
1029
  declare function fracEncloses(outer: FracRect, inner: FracRect): boolean;
1020
1030
 
1021
- export { DEFAULT_FRAME as D, LOUPE_DEFAULTS as a8, fracEncloses as aA, fracToWorld as aB, isAuto as aC, resolveLoupe as aD, roundFrac as aE, worldToFrac as aF, annotationsFromJSON as av, auto as aw, createAnnotationScene as ax, createAnnotationStore as ay, fracContains as az, applyCamera as b, dockPanel as j, panelKey as p, resolveFrame as r, undockPanel as u };
1022
- export type { Auto as $, AnnotationData as A, AnnotationTarget as B, CreateLabStoreOptions as C, AnnotationsApi as E, AnnotationsCapability as F, TrialInfo as G, TrialTool as H, InstrumentSerializers as I, AnnotationKind as J, Instrument as K, LabDocument as L, Migration as M, TrialContribution as N, Annotation as O, PaletteItem as P, AnnotationInit as Q, AnnotationPatch as R, SerializedTrial as S, TrialRecord as T, UndoStack as U, ViewportSize as V, WorldFrame as W, AnnotationQuery as X, AnnotationStatus as Y, AnnotationStoreOptions as Z, AnnotationTargetInfo as _, WorldSpec as a, CanvasCapability as a0, CanvasLayer as a1, CaptureDeps as a2, ContributionBase as a3, FracPoint as a4, FracRect as a5, HitResult as a6, IconComponent as a7, LayerCapability as a9, LoupePoint as aG, LoupeMode as aH, LayerDescriptor as aa, LoupeCapability as ab, LoupeDeclaration as ac, LoupeRenderArgs as ad, RegionContribution as ae, RenderContext as af, ResolvedLoupe as ag, SerializedAnnotations as ah, SidebarSection as ai, SidebarSlotContext as aj, StageCapability as ak, StatusReadout as al, SystemEvent as am, ToolCapability as an, ToolItem as ao, ToolSlotContext as ap, ToolbarItem as aq, TrialChromeContext as ar, TrialRegion as as, UndoCapability as at, ViewportControl as au, StorageAdapter as c, LabStoreState as d, SavedSnapshot as e, StorageChange as f, TrialStateHandle as g, UndockedPanel as h, UndockedPanels as i, ViewTransform as k, Point as l, DragFeedback as m, DragDropCapability as n, LabMode as o, InstrumentList as q, InstrumentHooks as s, WorldRect as t, AnnotationMeaning as v, MarkScene as w, CaptureSource as x, CaptureOptions as y, CaptureResult as z };
1031
+ export { DEFAULT_FRAME as D, LOUPE_DEFAULTS as a9, fracContains as aA, fracEncloses as aB, fracToWorld as aC, isAuto as aD, resolveLoupe as aE, roundFrac as aF, worldToFrac as aG, annotationsFromJSON as aw, auto as ax, createAnnotationScene as ay, createAnnotationStore as az, applyCamera as b, dockPanel as j, panelKey as p, resolveFrame as r, undockPanel as u };
1032
+ export type { AnnotationTargetInfo as $, AnnotationData as A, AnnotationTarget as B, CreateLabStoreOptions as C, AnnotationsApi as E, AnnotationsCapability as F, TrialInfo as G, TrialTool as H, InstrumentSerializers as I, AnnotationKind as J, Instrument as K, LabDocument as L, Migration as M, LabDensity as N, TrialContribution as O, PaletteItem as P, Annotation as Q, AnnotationInit as R, SerializedTrial as S, TrialRecord as T, UndoStack as U, ViewportSize as V, WorldFrame as W, AnnotationPatch as X, AnnotationQuery as Y, AnnotationStatus as Z, AnnotationStoreOptions as _, WorldSpec as a, Auto as a0, CanvasCapability as a1, CanvasLayer as a2, CaptureDeps as a3, ContributionBase as a4, FracPoint as a5, FracRect as a6, HitResult as a7, IconComponent as a8, LoupePoint as aH, LoupeMode as aI, LayerCapability as aa, LayerDescriptor as ab, LoupeCapability as ac, LoupeDeclaration as ad, LoupeRenderArgs as ae, RegionContribution as af, RenderContext as ag, ResolvedLoupe as ah, SerializedAnnotations as ai, SidebarSection as aj, SidebarSlotContext as ak, StageCapability as al, StatusReadout as am, SystemEvent as an, ToolCapability as ao, ToolItem as ap, ToolSlotContext as aq, ToolbarItem as ar, TrialChromeContext as as, TrialRegion as at, UndoCapability as au, ViewportControl as av, StorageAdapter as c, LabStoreState as d, SavedSnapshot as e, StorageChange as f, TrialStateHandle as g, UndockedPanel as h, UndockedPanels as i, ViewTransform as k, Point as l, DragFeedback as m, DragDropCapability as n, LabMode as o, InstrumentList as q, InstrumentHooks as s, WorldRect as t, AnnotationMeaning as v, MarkScene as w, CaptureSource as x, CaptureOptions as y, CaptureResult as z };
@@ -1,7 +1,7 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
2
  import { ReactNode } from 'react';
3
3
  import { ToolPrefNumberFormat } from '@weasel-js/core';
4
- import { R as ResolvedConfig, a as ConfigField, d as ControlRenderer } from './types-DzoNY1pO.js';
4
+ import { R as ResolvedConfig, a as ConfigField, d as ControlRenderer } from './types-Db-3NNk1.js';
5
5
 
6
6
  /**
7
7
  * How much room a container gives its rows — gaps, padding, and field height,
@@ -106,19 +106,20 @@ interface PropertyRowProps extends PropertyMetricProps {
106
106
  * member has to carry its own name. */
107
107
  group?: boolean;
108
108
  className?: string;
109
- /** The row is auto: its value is not pinned and the owner computes it. Draws
110
- * the control ghosted and colorless. */
109
+ /** The row is auto: its value is not pinned and the owner computes it. The
110
+ * control is hidden — its box kept, so the row does not resize — and the
111
+ * row reads out the word instead. */
111
112
  auto?: boolean;
112
- /** Given, the row carries a pin dot that toggles `auto`. Omitted, the row can
113
- * show an auto state but not change it. */
113
+ /** Given, the row's label toggles `auto` when it is clicked. Omitted, the row
114
+ * can show an auto state but not change it.
115
+ *
116
+ * The label then names that toggle, so a control passed as `children` has to
117
+ * carry its own accessible name — every row in this module does. */
114
118
  onAutoChange?: (next: boolean) => void;
115
- /** Marks the row's element for a panel-level gesture handler. `PropertyRow`
116
- * does not spread unknown props, so this is declared rather than inherited. */
117
- 'data-auto-path'?: string;
118
119
  }
119
120
  /** The label-plus-control frame every typed row below is built from. Use it
120
121
  * directly for a control this module does not cover. */
121
- declare function PropertyRow({ label, readout, description, variant, layout, span, children, htmlFor, group, className, density, align, auto, onAutoChange, 'data-auto-path': autoPath, }: PropertyRowProps): react_jsx_runtime.JSX.Element;
122
+ declare function PropertyRow({ label, readout, description, variant, layout, span, children, htmlFor, group, className, density, align, auto, onAutoChange, }: PropertyRowProps): react_jsx_runtime.JSX.Element;
122
123
  /** Props for `<SliderRow>`. */
123
124
  interface SliderRowProps extends PropertyMetricProps {
124
125
  label: ReactNode;
@@ -142,7 +143,7 @@ interface SliderRowProps extends PropertyMetricProps {
142
143
  format?: (value: number) => ReactNode;
143
144
  /**
144
145
  * Static text in place of the editable readout. Use it when the row is not
145
- * showing a number a caller could type back — an auto row's `auto · 18`, say,
146
+ * showing a number a caller could type back — an auto row's `auto`, say,
146
147
  * which an editable field would seed a draft with and then fail to parse.
147
148
  */
148
149
  readout?: ReactNode;
@@ -160,14 +161,12 @@ interface SliderRowProps extends PropertyMetricProps {
160
161
  span?: boolean;
161
162
  /** The row is auto — see `<PropertyRow auto>`. */
162
163
  auto?: boolean;
163
- /** Toggles `auto` from a pin dot — see `<PropertyRow onAutoChange>`. */
164
+ /** Toggles `auto` from the row's label — see `<PropertyRow onAutoChange>`. */
164
165
  onAutoChange?: (next: boolean) => void;
165
- /** Marks the row for a panel-level gesture handler — see `<PropertyRow data-auto-path>`. */
166
- 'data-auto-path'?: string;
167
166
  }
168
167
  /** A bounded number edited by dragging, with a live readout whose precision
169
168
  * follows `step`. */
170
- declare function SliderRow({ label, value, min, max, step, onChange, onInput, format, readout, notation, unit, layout, description, span, density, align, auto, onAutoChange, 'data-auto-path': autoPath, }: SliderRowProps): react_jsx_runtime.JSX.Element;
169
+ declare function SliderRow({ label, value, min, max, step, onChange, onInput, format, readout, notation, unit, layout, description, span, density, align, auto, onAutoChange, }: SliderRowProps): react_jsx_runtime.JSX.Element;
171
170
  /** Props for `<ColorRow>`. */
172
171
  interface ColorRowProps extends PropertyMetricProps {
173
172
  label: ReactNode;
@@ -204,13 +203,11 @@ interface ColorRowProps extends PropertyMetricProps {
204
203
  span?: boolean;
205
204
  /** The row is auto — see `<PropertyRow auto>`. */
206
205
  auto?: boolean;
207
- /** Toggles `auto` from a pin dot — see `<PropertyRow onAutoChange>`. */
206
+ /** Toggles `auto` from the row's label — see `<PropertyRow onAutoChange>`. */
208
207
  onAutoChange?: (next: boolean) => void;
209
- /** Marks the row for a panel-level gesture handler — see `<PropertyRow data-auto-path>`. */
210
- 'data-auto-path'?: string;
211
208
  }
212
209
  /** A color swatch, optionally with an alpha slider beneath it. */
213
- declare function ColorRow({ label, readout, value, onChange, onInput, alpha, onAlphaChange, onAlphaInput, alphaDisabled, layout, description, span, density, align, auto, onAutoChange, 'data-auto-path': autoPath, }: ColorRowProps): react_jsx_runtime.JSX.Element;
210
+ declare function ColorRow({ label, readout, value, onChange, onInput, alpha, onAlphaChange, onAlphaInput, alphaDisabled, layout, description, span, density, align, auto, onAutoChange, }: ColorRowProps): react_jsx_runtime.JSX.Element;
214
211
  /** Props for `<CheckboxRow>`. */
215
212
  interface CheckboxRowProps extends PropertyMetricProps {
216
213
  label: ReactNode;
@@ -226,13 +223,11 @@ interface CheckboxRowProps extends PropertyMetricProps {
226
223
  span?: boolean;
227
224
  /** The row is auto — see `<PropertyRow auto>`. */
228
225
  auto?: boolean;
229
- /** Toggles `auto` from a pin dot — see `<PropertyRow onAutoChange>`. */
226
+ /** Toggles `auto` from the row's label — see `<PropertyRow onAutoChange>`. */
230
227
  onAutoChange?: (next: boolean) => void;
231
- /** Marks the row for a panel-level gesture handler — see `<PropertyRow data-auto-path>`. */
232
- 'data-auto-path'?: string;
233
228
  }
234
229
  /** A boolean checkbox. */
235
- declare function CheckboxRow({ label, readout, value, onChange, layout, span, description, density, align, auto, onAutoChange, 'data-auto-path': autoPath, }: CheckboxRowProps): react_jsx_runtime.JSX.Element;
230
+ declare function CheckboxRow({ label, readout, value, onChange, layout, span, description, density, align, auto, onAutoChange, }: CheckboxRowProps): react_jsx_runtime.JSX.Element;
236
231
  /** Props for `<TextRow>`. */
237
232
  interface TextRowProps extends PropertyMetricProps {
238
233
  label: ReactNode;
@@ -249,13 +244,11 @@ interface TextRowProps extends PropertyMetricProps {
249
244
  span?: boolean;
250
245
  /** The row is auto — see `<PropertyRow auto>`. */
251
246
  auto?: boolean;
252
- /** Toggles `auto` from a pin dot — see `<PropertyRow onAutoChange>`. */
247
+ /** Toggles `auto` from the row's label — see `<PropertyRow onAutoChange>`. */
253
248
  onAutoChange?: (next: boolean) => void;
254
- /** Marks the row for a panel-level gesture handler — see `<PropertyRow data-auto-path>`. */
255
- 'data-auto-path'?: string;
256
249
  }
257
250
  /** A single-line text input. */
258
- declare function TextRow({ label, readout, value, onChange, placeholder, maxLength, layout, description, span, density, align, auto, onAutoChange, 'data-auto-path': autoPath, }: TextRowProps): react_jsx_runtime.JSX.Element;
251
+ declare function TextRow({ label, readout, value, onChange, placeholder, maxLength, layout, description, span, density, align, auto, onAutoChange, }: TextRowProps): react_jsx_runtime.JSX.Element;
259
252
  /** Props for `<NumberRow>`. */
260
253
  interface NumberRowProps extends PropertyMetricProps {
261
254
  label: ReactNode;
@@ -291,14 +284,12 @@ interface NumberRowProps extends PropertyMetricProps {
291
284
  span?: boolean;
292
285
  /** The row is auto — see `<PropertyRow auto>`. */
293
286
  auto?: boolean;
294
- /** Toggles `auto` from a pin dot — see `<PropertyRow onAutoChange>`. */
287
+ /** Toggles `auto` from the row's label — see `<PropertyRow onAutoChange>`. */
295
288
  onAutoChange?: (next: boolean) => void;
296
- /** Marks the row for a panel-level gesture handler — see `<PropertyRow data-auto-path>`. */
297
- 'data-auto-path'?: string;
298
289
  }
299
290
  /** A number typed directly. Reach for `<SliderRow>` when the range matters
300
291
  * more than the exact value. */
301
- declare function NumberRow({ label, readout, value, onChange, onInput, min, max, step, placeholder, unit, layout, description, span, density, align, auto, onAutoChange, 'data-auto-path': autoPath, }: NumberRowProps): react_jsx_runtime.JSX.Element;
292
+ declare function NumberRow({ label, readout, value, onChange, onInput, min, max, step, placeholder, unit, layout, description, span, density, align, auto, onAutoChange, }: NumberRowProps): react_jsx_runtime.JSX.Element;
302
293
  interface PropertyOption<T extends string> {
303
294
  value: T;
304
295
  label: ReactNode;
@@ -320,14 +311,12 @@ interface SelectRowProps<T extends string> extends PropertyMetricProps {
320
311
  span?: boolean;
321
312
  /** The row is auto — see `<PropertyRow auto>`. */
322
313
  auto?: boolean;
323
- /** Toggles `auto` from a pin dot — see `<PropertyRow onAutoChange>`. */
314
+ /** Toggles `auto` from the row's label — see `<PropertyRow onAutoChange>`. */
324
315
  onAutoChange?: (next: boolean) => void;
325
- /** Marks the row for a panel-level gesture handler — see `<PropertyRow data-auto-path>`. */
326
- 'data-auto-path'?: string;
327
316
  }
328
317
  /** A dropdown over a fixed set of choices. Prefer `<ToggleRow>` when there
329
318
  * are only two or three and they should all stay visible. */
330
- declare function SelectRow<T extends string>({ label, readout, value, options, onChange, placeholder, layout, description, span, density, align, auto, onAutoChange, 'data-auto-path': autoPath, }: SelectRowProps<T>): react_jsx_runtime.JSX.Element;
319
+ declare function SelectRow<T extends string>({ label, readout, value, options, onChange, placeholder, layout, description, span, density, align, auto, onAutoChange, }: SelectRowProps<T>): react_jsx_runtime.JSX.Element;
331
320
  /** Props for `<ToggleRow>`. */
332
321
  interface ToggleRowProps<T extends string> extends PropertyMetricProps {
333
322
  label: ReactNode;
@@ -342,14 +331,12 @@ interface ToggleRowProps<T extends string> extends PropertyMetricProps {
342
331
  span?: boolean;
343
332
  /** The row is auto — see `<PropertyRow auto>`. */
344
333
  auto?: boolean;
345
- /** Toggles `auto` from a pin dot — see `<PropertyRow onAutoChange>`. */
334
+ /** Toggles `auto` from the row's label — see `<PropertyRow onAutoChange>`. */
346
335
  onAutoChange?: (next: boolean) => void;
347
- /** Marks the row for a panel-level gesture handler — see `<PropertyRow data-auto-path>`. */
348
- 'data-auto-path'?: string;
349
336
  }
350
337
  /** A segmented control: the same choice as a select, with every option
351
338
  * visible at once. */
352
- declare function ToggleRow<T extends string>({ label, readout, value, options, onChange, layout, description, span, density, align, auto, onAutoChange, 'data-auto-path': autoPath, }: ToggleRowProps<T>): react_jsx_runtime.JSX.Element;
339
+ declare function ToggleRow<T extends string>({ label, readout, value, options, onChange, layout, description, span, density, align, auto, onAutoChange, }: ToggleRowProps<T>): react_jsx_runtime.JSX.Element;
353
340
 
354
341
  /** How a panel packs its rows into the two-column property grid.
355
342
  * - `'auto'`: narrow controls (numbers, checkboxes, dropdowns, colors) sit
@@ -404,11 +391,11 @@ interface ControlPanelProps<TC extends Record<string, unknown>> {
404
391
  /** A fold moved. The key is a section's label — prefixed by its group's
405
392
  * dotted path when the section sits inside one — or a group's own path. */
406
393
  onCollapse?: (key: string, collapsed: boolean) => void;
407
- /** Dotted paths currently unpinned. A row in this set draws ghosted and its
408
- * dot reads as auto, and the dot writes the sentinel back through
409
- * `setConfig`. Omitted, the panel keeps the set itself: the dots still work
410
- * and the sentinel never reaches `setConfig`, which would otherwise store it
411
- * as the row's value. */
394
+ /** Dotted paths currently unpinned. A row in this set hides its control and
395
+ * reads out `auto`, and clicking its label writes the sentinel back through
396
+ * `setConfig`. Omitted, the panel keeps the set itself: the labels still
397
+ * toggle and the sentinel never reaches `setConfig`, which would otherwise
398
+ * store it as the row's value. */
412
399
  auto?: ReadonlySet<string>;
413
400
  /** Draw leaves marked `hidden`. */
414
401
  showHidden?: boolean;
@@ -1,5 +1,5 @@
1
- import { d as ControlRenderer, c as ConfigRule } from './types-DzoNY1pO.js';
2
- import { K as Instrument, ar as TrialChromeContext, N as TrialContribution, T as TrialRecord, q as InstrumentList, e as SavedSnapshot, o as LabMode, ap as ToolSlotContext, a3 as ContributionBase, aq as ToolbarItem, ao as ToolItem, ai as SidebarSection, al as StatusReadout, H as TrialTool, ae as RegionContribution, aj as SidebarSlotContext } from './frac-B4okC2lX.js';
1
+ import { d as ControlRenderer, c as ConfigRule } from './types-Db-3NNk1.js';
2
+ import { K as Instrument, as as TrialChromeContext, O as TrialContribution, T as TrialRecord, q as InstrumentList, e as SavedSnapshot, o as LabMode, aq as ToolSlotContext, a4 as ContributionBase, ar as ToolbarItem, ap as ToolItem, aj as SidebarSection, am as StatusReadout, H as TrialTool, af as RegionContribution, ak as SidebarSlotContext } from './frac-B4hFJMiN.js';
3
3
  import * as react_jsx_runtime from 'react/jsx-runtime';
4
4
  import * as react from 'react';
5
5
  import { ReactNode } from 'react';
@@ -107,7 +107,7 @@ type LabContribution<TCtx = LabChromeContext> = (ContributionBase & {
107
107
  render?: never;
108
108
  }) | (ContributionBase & {
109
109
  region: 'palette';
110
- item: ToolItem;
110
+ item: ToolItem<TCtx>;
111
111
  render?: never;
112
112
  }) | (ContributionBase & {
113
113
  region: 'sidebar' | 'aside';
@@ -181,7 +181,8 @@ interface PaletteRegionProps<TCtx extends ToolSlotContext = TrialChromeContext>
181
181
  region?: string;
182
182
  }
183
183
  /** A tool strip: a trial's, or the lab's. Selection lives in whichever tool
184
- * slot the context carries; this region only reflects it. */
184
+ * slot the context carries; this region only reflects it. An item carrying
185
+ * `onActivate` is a command instead — it presses, and never latches. */
185
186
  declare function PaletteRegion<TCtx extends ToolSlotContext = TrialChromeContext>({ contributions, ctx, region, }: PaletteRegionProps<TCtx>): react_jsx_runtime.JSX.Element | null;
186
187
 
187
188
  /** Props for `<SidebarRegion>`. */
@@ -111,15 +111,15 @@ interface NodeOptions extends BranchOptions {
111
111
  render?: ControlRenderer;
112
112
  /** Errors for this leaf under `config`, the instrument's whole config. */
113
113
  validate?: (leaf: ToolPrefLeaf, config: Record<string, unknown>) => string[];
114
- /** Computes this leaf's value while it is auto. Attaching one is what lets
115
- * the ghosted control draw a real value and keeps the instrument off
114
+ /** Computes this leaf's value while it is auto. Attaching one is what gives
115
+ * the row a real value to pin back to and keeps the instrument off
116
116
  * `?? compute()`. */
117
117
  autoResolve?: (config: Record<string, unknown>) => unknown;
118
118
  /** The leaf starts auto rather than pinned at its default. Set by
119
119
  * `.initial(auto)`. */
120
120
  unpinned?: boolean;
121
- /** The leaf can never be auto: the row takes no pin dot and ignores the
122
- * gesture. For a value the instrument cannot receive as `undefined`. */
121
+ /** The leaf can never be auto: the row's label does not toggle. For a value
122
+ * the instrument cannot receive as `undefined`. */
123
123
  manual?: boolean;
124
124
  }
125
125
  /** What a branch can say about itself, beyond its children. */
@@ -1,7 +1,7 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
2
  import { ReactNode, WheelEvent, PointerEvent as PointerEvent$1 } from 'react';
3
- import { k as ViewTransform, a as WorldSpec, V as ViewportSize, l as Point, W as WorldFrame } from './frac-B4okC2lX.js';
4
- import { C as CanvasLayerDescriptor } from './CanvasStackContext-CJNMS6mz.js';
3
+ import { k as ViewTransform, a as WorldSpec, V as ViewportSize, l as Point, W as WorldFrame } from './frac-B4hFJMiN.js';
4
+ import { C as CanvasLayerDescriptor } from './CanvasStackContext-CMMo180l.js';
5
5
 
6
6
  /** Props for `<CanvasStack>`. */
7
7
  interface CanvasStackProps {
@@ -88,49 +88,6 @@ declare function fitStage(size: ViewportSize, viewport: ViewportSize): ViewTrans
88
88
  */
89
89
  declare function Stage({ size, view: viewProp, onViewChange, minZoom, maxZoom, onResize, hostRef, overlay, children, }: StageProps): react_jsx_runtime.JSX.Element;
90
90
 
91
- /** A point in the space the instrument works in. */
92
- interface Vec3 {
93
- x: number;
94
- y: number;
95
- z: number;
96
- }
97
- /** An orbit camera as a trial view: where it looks from, and what it looks at.
98
- * labkit does not turn this into a matrix — the host's renderer does. */
99
- interface OrbitView {
100
- yaw: number;
101
- pitch: number;
102
- distance: number;
103
- target: Vec3;
104
- }
105
- /** Just short of the pole. At exactly ±PI/2 the azimuth is undefined and the
106
- * camera rolls, which reads as the model jumping rather than as a limit. */
107
- declare const PITCH_LIMIT: number;
108
- declare function clampPitch(pitch: number): number;
109
- declare function wrapYaw(yaw: number): number;
110
- /** The view a drag of (dx, dy) from `start` produces. Absolute against the drag
111
- * start, so it can be re-applied any number of times without compounding. */
112
- declare function orbitAfterDrag(start: OrbitView, dx: number, dy: number): OrbitView;
113
- /** Multiplicative, so one notch covers the same proportion of the distance
114
- * whether the camera is near or far. */
115
- declare function orbitAfterWheel(view: OrbitView, deltaY: number, minDistance: number, maxDistance: number): OrbitView;
116
- interface UseOrbitOptions {
117
- view: OrbitView;
118
- onViewChange: (v: OrbitView) => void;
119
- /** Restored on double-click. Defaults to the view the hook first saw. */
120
- home?: OrbitView;
121
- minDistance?: number;
122
- maxDistance?: number;
123
- }
124
- interface OrbitHandlers {
125
- onWheel: (e: WheelEvent<HTMLElement>) => void;
126
- onPointerDown: (e: PointerEvent$1<HTMLElement>) => void;
127
- onDoubleClick: () => void;
128
- isDragging: () => boolean;
129
- }
130
- /** Pointer gestures over an orbit view: drag to turn, wheel or pinch to dolly,
131
- * double-click to go home. The 3D peer of `usePanZoom`. */
132
- declare function useOrbit({ view, onViewChange, home, minDistance, maxDistance, }: UseOrbitOptions): OrbitHandlers;
133
-
134
91
  interface UsePanZoomOptions {
135
92
  view: ViewTransform;
136
93
  onViewChange: (v: ViewTransform) => void;
@@ -156,5 +113,5 @@ interface PanZoomHandlers {
156
113
  }
157
114
  declare function usePanZoom({ view, onViewChange, minZoom, maxZoom, frame, onTap, }: UsePanZoomOptions): PanZoomHandlers;
158
115
 
159
- export { CanvasStack as C, PITCH_LIMIT as P, Stage as S, centerOn as f, clampPitch as g, fitStage as h, orbitAfterWheel as i, usePanZoom as j, wrapYaw as k, orbitAfterDrag as o, screenToWorld as s, useOrbit as u, worldToScreen as w, zoomAt as z };
160
- export type { OrbitHandlers as O, UseOrbitOptions as U, Vec3 as V, ZoomAtOptions as Z, CanvasStackProps as a, OrbitView as b, PanZoomHandlers as c, StageProps as d, UsePanZoomOptions as e };
116
+ export { CanvasStack as C, Stage as S, centerOn as c, fitStage as f, screenToWorld as s, usePanZoom as u, worldToScreen as w, zoomAt as z };
117
+ export type { PanZoomHandlers as P, UsePanZoomOptions as U, ZoomAtOptions as Z, CanvasStackProps as a, StageProps as b };
@@ -1,4 +1,4 @@
1
- import { c as StorageAdapter, d as LabStoreState, T as TrialRecord, e as SavedSnapshot, o as LabMode, h as UndockedPanel, q as InstrumentList, s as InstrumentHooks, C as CreateLabStoreOptions, g as TrialStateHandle } from './frac-B4okC2lX.js';
1
+ import { c as StorageAdapter, d as LabStoreState, T as TrialRecord, e as SavedSnapshot, o as LabMode, h as UndockedPanel, q as InstrumentList, s as InstrumentHooks, C as CreateLabStoreOptions, g as TrialStateHandle } from './frac-B4hFJMiN.js';
2
2
  import * as react from 'react';
3
3
  import { ReactNode, ReactElement, Dispatch, SetStateAction } from 'react';
4
4
  import { StoreApi } from 'zustand/vanilla';
@@ -1,9 +1,9 @@
1
1
  import * as react from 'react';
2
- export { C as CanvasStack, a as CanvasStackProps, O as OrbitHandlers, b as OrbitView, P as PITCH_LIMIT, c as PanZoomHandlers, S as Stage, d as StageProps, U as UseOrbitOptions, e as UsePanZoomOptions, V as Vec3, Z as ZoomAtOptions, f as centerOn, g as clampPitch, h as fitStage, o as orbitAfterDrag, i as orbitAfterWheel, s as screenToWorld, u as useOrbit, j as usePanZoom, w as worldToScreen, k as wrapYaw, z as zoomAt } from '../_dts/usePanZoom-Pzf9f2jh.js';
3
- export { C as CanvasLayerDescriptor, a as CanvasStackContext, b as CanvasStackContextValue, c as CanvasStackSurface } from '../_dts/CanvasStackContext-CJNMS6mz.js';
4
- export { D as DEFAULT_FRAME, V as ViewportSize, W as WorldFrame, a as WorldSpec, b as applyCamera, r as resolveFrame } from '../_dts/frac-B4okC2lX.js';
2
+ export { C as CanvasStack, a as CanvasStackProps, P as PanZoomHandlers, S as Stage, b as StageProps, U as UsePanZoomOptions, Z as ZoomAtOptions, c as centerOn, f as fitStage, s as screenToWorld, u as usePanZoom, w as worldToScreen, z as zoomAt } from '../_dts/usePanZoom-SSTZe410.js';
3
+ export { C as CanvasLayerDescriptor, a as CanvasStackContext, b as CanvasStackContextValue, c as CanvasStackSurface } from '../_dts/CanvasStackContext-CMMo180l.js';
4
+ export { D as DEFAULT_FRAME, V as ViewportSize, W as WorldFrame, a as WorldSpec, b as applyCamera, r as resolveFrame } from '../_dts/frac-B4hFJMiN.js';
5
5
  import 'react/jsx-runtime';
6
- import '../_dts/types-DzoNY1pO.js';
6
+ import '../_dts/types-Db-3NNk1.js';
7
7
  import '@weasel-js/core';
8
8
  import '../_dts/PrefsForm.d-DPy9I8It.js';
9
9
  import '../_dts/types-DJ79Tg5J.js';
@@ -1,4 +1,4 @@
1
- export { CameraWheelContext, CanvasStack, PITCH_LIMIT, Stage, clampPitch, fitStage, orbitAfterDrag, orbitAfterWheel, useOrbit, usePanZoom, wrapYaw } from '../chunk-CEIUBPPW.js';
1
+ export { CameraWheelContext, CanvasStack, Stage, fitStage, usePanZoom } from '../chunk-TT5C5S6R.js';
2
2
  export { centerOn, zoomAt } from '../chunk-H6ZAOWNE.js';
3
3
  export { DEFAULT_FRAME, applyCamera, resolveFrame, screenToWorld, worldToScreen } from '../chunk-2AYGEN57.js';
4
4
  import '../chunk-WIG6XHJ7.js';
@@ -1,6 +1,6 @@
1
- export { a as LabAsideRegion, b as LabChromeContext, L as LabContribution, e as LabFooterRegion, f as LabHeaderRegion, g as LabRegion, h as LabRegionProps, i as LabSidebarRegion, P as PaletteRegion, j as PaletteRegionProps, S as SidebarRegion, k as SidebarRegionProps, l as StatusRegion, m as StatusRegionProps, T as TitleBarPlacement, n as TitleBarRegion, o as TitleBarRegionProps, p as ToolbarRegion, q as ToolbarRegionProps, V as ViewportRegion, r as ViewportRegionProps, t as builtinContributions, w as contributionsIn, x as labContributions, y as mergeContributions, C as suppressContributions, D as toolContributions, E as useLabChromeContext } from '../_dts/index-CSJoj4LC.js';
2
- export { a3 as ContributionBase, a7 as IconComponent, ae as RegionContribution, ai as SidebarSection, aj as SidebarSlotContext, al as StatusReadout, ao as ToolItem, ap as ToolSlotContext, aq as ToolbarItem, ar as TrialChromeContext, N as TrialContribution, as as TrialRegion, au as ViewportControl } from '../_dts/frac-B4okC2lX.js';
3
- import '../_dts/types-DzoNY1pO.js';
1
+ export { a as LabAsideRegion, b as LabChromeContext, L as LabContribution, e as LabFooterRegion, f as LabHeaderRegion, g as LabRegion, h as LabRegionProps, i as LabSidebarRegion, P as PaletteRegion, j as PaletteRegionProps, S as SidebarRegion, k as SidebarRegionProps, l as StatusRegion, m as StatusRegionProps, T as TitleBarPlacement, n as TitleBarRegion, o as TitleBarRegionProps, p as ToolbarRegion, q as ToolbarRegionProps, V as ViewportRegion, r as ViewportRegionProps, t as builtinContributions, w as contributionsIn, x as labContributions, y as mergeContributions, C as suppressContributions, D as toolContributions, E as useLabChromeContext } from '../_dts/index-DlKolEIZ.js';
2
+ export { a4 as ContributionBase, a8 as IconComponent, af as RegionContribution, aj as SidebarSection, ak as SidebarSlotContext, am as StatusReadout, ap as ToolItem, aq as ToolSlotContext, ar as ToolbarItem, as as TrialChromeContext, O as TrialContribution, at as TrialRegion, av as ViewportControl } from '../_dts/frac-B4hFJMiN.js';
3
+ import '../_dts/types-Db-3NNk1.js';
4
4
  import '@weasel-js/core';
5
5
  import '../_dts/PrefsForm.d-DPy9I8It.js';
6
6
  import 'react';
@@ -1,13 +1,13 @@
1
- export { LabAsideRegion, LabFooterRegion, LabHeaderRegion, LabSidebarRegion, PaletteRegion, SidebarRegion, StatusRegion, TitleBarRegion, ToolbarRegion, ViewportRegion, builtinContributions, contributionsIn, labContributions, mergeContributions, suppressContributions, toolContributions, useLabChromeContext } from '../chunk-IHUVQ3TX.js';
2
- import '../chunk-UN4U4P63.js';
1
+ export { LabAsideRegion, LabFooterRegion, LabHeaderRegion, LabSidebarRegion, PaletteRegion, SidebarRegion, StatusRegion, TitleBarRegion, ToolbarRegion, ViewportRegion, builtinContributions, contributionsIn, labContributions, mergeContributions, suppressContributions, toolContributions, useLabChromeContext } from '../chunk-CKUKF72R.js';
2
+ import '../chunk-753Y6HE6.js';
3
3
  import '../chunk-RWNDDKOH.js';
4
- import '../chunk-EH7UEQV7.js';
4
+ import '../chunk-FKLT3ITC.js';
5
5
  import '../chunk-Z76KEZAX.js';
6
- import '../chunk-PHK4W562.js';
7
- import '../chunk-7PFH3CNM.js';
6
+ import '../chunk-EMXAIRUJ.js';
7
+ import '../chunk-REOBGYMC.js';
8
8
  import '../chunk-CQLQPQ4P.js';
9
9
  import '../chunk-2YILQ7Y5.js';
10
10
  import '../chunk-SBXNQW4G.js';
11
- import '../chunk-T3EC2DXD.js';
11
+ import '../chunk-LASCBWW7.js';
12
12
  //# sourceMappingURL=index.js.map
13
13
  //# sourceMappingURL=index.js.map
@@ -1,6 +1,6 @@
1
1
  import { LabContext } from './chunk-Z76KEZAX.js';
2
- import { resolveConfigSchema } from './chunk-ZDHY47EV.js';
3
- import { fromConfigFields } from './chunk-PHK4W562.js';
2
+ import { resolveConfigSchema } from './chunk-A2ACAGW6.js';
3
+ import { fromConfigFields } from './chunk-EMXAIRUJ.js';
4
4
  import { useContext, useMemo } from 'react';
5
5
 
6
6
  var NO_RULES = [];
@@ -14,5 +14,5 @@ function useConfigSchema(instrument) {
14
14
  }
15
15
 
16
16
  export { useConfigSchema };
17
- //# sourceMappingURL=chunk-PJ7WEQBJ.js.map
18
- //# sourceMappingURL=chunk-PJ7WEQBJ.js.map
17
+ //# sourceMappingURL=chunk-6BUQ77ZV.js.map
18
+ //# sourceMappingURL=chunk-6BUQ77ZV.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/config/useConfigSchema.ts"],"names":[],"mappings":";;;;;AAOA,IAAM,WAAwB,EAAC;AASxB,SAAS,gBAEd,UAAA,EACgB;AAChB,EAAA,MAAM,GAAA,GAAM,WAAW,UAAU,CAAA;AACjC,EAAA,MAAM,KAAA,GAAQ,KAAK,WAAA,IAAe,QAAA;AAClC,EAAA,OAAO,OAAA;AAAA,IACL,MACE,UAAA,CAAW,MAAA,GACP,mBAAA,CAAoB,UAAA,CAAW,MAAA,EAAQ,KAAK,CAAA,GAC5C,gBAAA,CAAiB,UAAA,CAAW,YAAA,IAAe,IAAK,EAAE,CAAA;AAAA,IACxD,CAAC,YAAY,KAAK;AAAA,GACpB;AACF","file":"chunk-PJ7WEQBJ.js","sourcesContent":["import { useContext, useMemo } from 'react';\nimport type { Instrument } from '../instrument/types';\nimport { LabContext } from '../lab/LabContext';\nimport { fromConfigFields } from './fromConfigField';\nimport { resolveConfigSchema } from './resolve';\nimport type { ResolvedConfig } from './types';\n\nconst NO_RULES: readonly [] = [];\n\n/**\n * An instrument's controls, resolved against the surrounding lab's rules.\n *\n * Resolution cannot happen in `defineInstrument` — rules are lab-scoped and\n * that runs at module load — so it happens here, at render. Both instrument\n * paths land in the same shape, so callers never branch on which was used.\n */\nexport function useConfigSchema(\n // biome-ignore lint/suspicious/noExplicitAny: instruments are stored contravariantly; see InstrumentList\n instrument: Instrument<any, any, any>, // eslint-disable-line @typescript-eslint/no-explicit-any\n): ResolvedConfig {\n const lab = useContext(LabContext);\n const rules = lab?.configRules ?? NO_RULES;\n return useMemo(\n () =>\n instrument.config\n ? resolveConfigSchema(instrument.config, rules)\n : fromConfigFields(instrument.configSchema?.() ?? []),\n [instrument, rules],\n );\n}\n"]}
1
+ {"version":3,"sources":["../src/config/useConfigSchema.ts"],"names":[],"mappings":";;;;;AAOA,IAAM,WAAwB,EAAC;AASxB,SAAS,gBAEd,UAAA,EACgB;AAChB,EAAA,MAAM,GAAA,GAAM,WAAW,UAAU,CAAA;AACjC,EAAA,MAAM,KAAA,GAAQ,KAAK,WAAA,IAAe,QAAA;AAClC,EAAA,OAAO,OAAA;AAAA,IACL,MACE,UAAA,CAAW,MAAA,GACP,mBAAA,CAAoB,UAAA,CAAW,MAAA,EAAQ,KAAK,CAAA,GAC5C,gBAAA,CAAiB,UAAA,CAAW,YAAA,IAAe,IAAK,EAAE,CAAA;AAAA,IACxD,CAAC,YAAY,KAAK;AAAA,GACpB;AACF","file":"chunk-6BUQ77ZV.js","sourcesContent":["import { useContext, useMemo } from 'react';\nimport type { Instrument } from '../instrument/types';\nimport { LabContext } from '../lab/LabContext';\nimport { fromConfigFields } from './fromConfigField';\nimport { resolveConfigSchema } from './resolve';\nimport type { ResolvedConfig } from './types';\n\nconst NO_RULES: readonly [] = [];\n\n/**\n * An instrument's controls, resolved against the surrounding lab's rules.\n *\n * Resolution cannot happen in `defineInstrument` — rules are lab-scoped and\n * that runs at module load — so it happens here, at render. Both instrument\n * paths land in the same shape, so callers never branch on which was used.\n */\nexport function useConfigSchema(\n // biome-ignore lint/suspicious/noExplicitAny: instruments are stored contravariantly; see InstrumentList\n instrument: Instrument<any, any, any>, // eslint-disable-line @typescript-eslint/no-explicit-any\n): ResolvedConfig {\n const lab = useContext(LabContext);\n const rules = lab?.configRules ?? NO_RULES;\n return useMemo(\n () =>\n instrument.config\n ? resolveConfigSchema(instrument.config, rules)\n : fromConfigFields(instrument.configSchema?.() ?? []),\n [instrument, rules],\n );\n}\n"]}
@@ -1,5 +1,5 @@
1
1
  import { CanvasStackContext } from './chunk-CQLQPQ4P.js';
2
- import { b2, g2 } from './chunk-T3EC2DXD.js';
2
+ import { b3, g } from './chunk-LASCBWW7.js';
3
3
  import { useRef, useCallback, useEffect, useState, useContext } from 'react';
4
4
  import { jsx, jsxs } from 'react/jsx-runtime';
5
5
  import { useVisibleRaf, normalizeZoom } from '@weasel-js/core';
@@ -165,10 +165,10 @@ function FpsMeter() {
165
165
  loop.request();
166
166
  return () => loop.cancel();
167
167
  }, [loop]);
168
- return /* @__PURE__ */ jsx("div", { className: "lk-fps-meter", ref: rootRef, children: /* @__PURE__ */ jsxs("span", { className: "lk-fps-meter-value", children: [
169
- "FPS ",
170
- fps
171
- ] }) });
168
+ return /* @__PURE__ */ jsxs("div", { className: "lk-fps-meter", ref: rootRef, children: [
169
+ /* @__PURE__ */ jsx("span", { className: "lk-fps-meter-label", children: "FPS" }),
170
+ /* @__PURE__ */ jsx("span", { className: "lk-fps-meter-value", children: fps })
171
+ ] });
172
172
  }
173
173
  function niceNumber(n) {
174
174
  if (n <= 0) return 1;
@@ -222,7 +222,7 @@ function ZoomControl({
222
222
  };
223
223
  return /* @__PURE__ */ jsxs("div", { className: `lk-zoom${className ? ` ${className}` : ""}`, children: [
224
224
  /* @__PURE__ */ jsx(
225
- b2,
225
+ b3,
226
226
  {
227
227
  className: "lk-zoom__slider",
228
228
  ariaLabel: "Zoom",
@@ -237,7 +237,7 @@ function ZoomControl({
237
237
  }
238
238
  ),
239
239
  /* @__PURE__ */ jsx(
240
- g2,
240
+ g,
241
241
  {
242
242
  className: "lk-zoom__field",
243
243
  width: "fit",
@@ -266,5 +266,5 @@ function Section({ children, end }) {
266
266
  StatusBar.Section = Section;
267
267
 
268
268
  export { FpsMeter, ScaleIndicator, StatusBar, Toolbar, ZoomControl, useRovingTabIndex };
269
- //# sourceMappingURL=chunk-UN4U4P63.js.map
270
- //# sourceMappingURL=chunk-UN4U4P63.js.map
269
+ //# sourceMappingURL=chunk-753Y6HE6.js.map
270
+ //# sourceMappingURL=chunk-753Y6HE6.js.map