@weasel-js/labkit 1.4.4 → 1.5.0

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 (219) hide show
  1. package/README.md +13 -2
  2. package/dist/_dts/{CanvasStackContext-kTEZvEgE.d.ts → CanvasStackContext-CqkxkFJW.d.ts} +1 -1
  3. package/dist/_dts/ToggleBar.d-DbHoWKIA.d.ts +116 -0
  4. package/dist/_dts/{frac-z7ker2Vx.d.ts → frac-8R6UmlvN.d.ts} +253 -31
  5. package/dist/_dts/index-B8uu2ba7.d.ts +237 -0
  6. package/dist/_dts/{index-Blv9uQzu.d.ts → index-retnAut7.d.ts} +18 -10
  7. package/dist/_dts/{types-B9_zrHmb.d.ts → types-Ca2LCnPq.d.ts} +65 -2
  8. package/dist/_dts/usePanZoom-nS798rOF.d.ts +160 -0
  9. package/dist/_dts/useTrialState-jcx_TdU6.d.ts +212 -0
  10. package/dist/canvas/index.d.ts +17 -128
  11. package/dist/canvas/index.js +4 -2
  12. package/dist/chrome/index.d.ts +4 -92
  13. package/dist/chrome/index.js +9 -5
  14. package/dist/chunk-67SJLMC7.js +704 -0
  15. package/dist/chunk-67SJLMC7.js.map +1 -0
  16. package/dist/chunk-6ZDGOZQV.js +310 -0
  17. package/dist/chunk-6ZDGOZQV.js.map +1 -0
  18. package/dist/{chunk-MOM3GOVY.js → chunk-EKIICY6X.js} +111 -25
  19. package/dist/chunk-EKIICY6X.js.map +1 -0
  20. package/dist/{chunk-CTRKTLYZ.js → chunk-H6ZAOWNE.js} +11 -11
  21. package/dist/chunk-H6ZAOWNE.js.map +1 -0
  22. package/dist/{chunk-SMHP6XZ4.js → chunk-KJALCDWE.js} +9 -7
  23. package/dist/chunk-KJALCDWE.js.map +1 -0
  24. package/dist/{chunk-BKFVHKJH.js → chunk-MUKOW3TC.js} +3 -3
  25. package/dist/{chunk-BKFVHKJH.js.map → chunk-MUKOW3TC.js.map} +1 -1
  26. package/dist/chunk-NDRYLVOW.js +15 -0
  27. package/dist/chunk-NDRYLVOW.js.map +1 -0
  28. package/dist/{chunk-64ZCN3DA.js → chunk-NS64DXMN.js} +226 -159
  29. package/dist/chunk-NS64DXMN.js.map +1 -0
  30. package/dist/{chunk-I6JCVE24.js → chunk-PGETSEDK.js} +135 -13
  31. package/dist/chunk-PGETSEDK.js.map +1 -0
  32. package/dist/{chunk-FQMJUVHJ.js → chunk-QLSV2N3G.js} +32 -37
  33. package/dist/chunk-QLSV2N3G.js.map +1 -0
  34. package/dist/chunk-RWNDDKOH.js +682 -0
  35. package/dist/chunk-RWNDDKOH.js.map +1 -0
  36. package/dist/chunk-S2SHZRD7.js +7681 -0
  37. package/dist/chunk-S2SHZRD7.js.map +1 -0
  38. package/dist/{chunk-U3IYHIAE.js → chunk-TQBBYTAF.js} +19 -82
  39. package/dist/chunk-TQBBYTAF.js.map +1 -0
  40. package/dist/chunk-UU3NJO6N.js +72 -0
  41. package/dist/chunk-UU3NJO6N.js.map +1 -0
  42. package/dist/chunk-WIG6XHJ7.js +35 -0
  43. package/dist/chunk-WIG6XHJ7.js.map +1 -0
  44. package/dist/{chunk-TJ7QY3OC.js → chunk-ZPH5WTWF.js} +21 -15
  45. package/dist/chunk-ZPH5WTWF.js.map +1 -0
  46. package/dist/config/index.d.ts +232 -0
  47. package/dist/config/index.js +6 -0
  48. package/dist/config/index.js.map +1 -0
  49. package/dist/controls/index.d.ts +2 -3
  50. package/dist/controls/index.js +3 -2
  51. package/dist/dragdrop/index.d.ts +2 -4
  52. package/dist/index.d.ts +110 -381
  53. package/dist/index.js +691 -817
  54. package/dist/index.js.map +1 -1
  55. package/dist/layers/index.d.ts +3 -5
  56. package/dist/layers/index.js +2 -2
  57. package/dist/loupe/index.d.ts +6 -8
  58. package/dist/loupe/index.js +2 -2
  59. package/dist/passthrough/weasel-ui.d.ts +164 -122
  60. package/dist/passthrough/weasel-ui.js +1 -1
  61. package/dist/primitives/index.d.ts +53 -6
  62. package/dist/primitives/index.js +6 -4
  63. package/dist/state/index.d.ts +12 -7
  64. package/dist/state/index.js +16 -13
  65. package/dist/state/index.js.map +1 -1
  66. package/dist/styles.css +84 -50
  67. package/dist/surface/index.d.ts +44 -7
  68. package/dist/surface/index.js +2 -1
  69. package/dist/ui/layers/index.js +1 -1
  70. package/dist/undo/index.d.ts +2 -4
  71. package/package.json +15 -8
  72. package/src/annotations/AnnotationOverlay.tsx +53 -5
  73. package/src/annotations/Annotations.overlay.test.tsx +85 -6
  74. package/src/annotations/drawOne.test.ts +1 -1
  75. package/src/annotations/drawOne.ts +2 -2
  76. package/src/annotations/paint.test.ts +2 -2
  77. package/src/annotations/paint.ts +1 -1
  78. package/src/annotations/preload.ts +6 -0
  79. package/src/annotations/store.test.ts +18 -0
  80. package/src/annotations/store.ts +5 -4
  81. package/src/annotations/svgNodes.test.ts +2 -2
  82. package/src/annotations/toolMap.ts +3 -3
  83. package/src/annotations/types.ts +6 -3
  84. package/src/canvas/CameraWheelContext.ts +12 -0
  85. package/src/canvas/CanvasStack.test.tsx +25 -0
  86. package/src/canvas/CanvasStack.tsx +31 -4
  87. package/src/canvas/Stage.less +18 -0
  88. package/src/canvas/Stage.test.tsx +186 -0
  89. package/src/canvas/Stage.tsx +134 -0
  90. package/src/canvas/camera.test.ts +17 -2
  91. package/src/canvas/camera.ts +9 -9
  92. package/src/canvas/index.ts +4 -0
  93. package/src/canvas/usePanZoom.ts +10 -5
  94. package/src/chrome/ChromeRegions.stories.tsx +0 -3
  95. package/src/chrome/LabChrome.tsx +114 -0
  96. package/src/chrome/builtins.tsx +20 -31
  97. package/src/chrome/index.ts +15 -0
  98. package/src/chrome/labRegions.test.tsx +208 -0
  99. package/src/chrome/labTypes.ts +50 -0
  100. package/src/chrome/merge.ts +7 -9
  101. package/src/chrome/regions/PaletteRegion.test.tsx +6 -4
  102. package/src/chrome/regions/PaletteRegion.tsx +21 -9
  103. package/src/chrome/regions/SidebarRegion.tsx +25 -13
  104. package/src/chrome/regions/StatusRegion.tsx +15 -8
  105. package/src/chrome/regions/ToolbarRegion.tsx +30 -16
  106. package/src/chrome/types.ts +47 -20
  107. package/src/config/builder.test.ts +4 -0
  108. package/src/config/builder.ts +16 -10
  109. package/src/config/declarationEmit.fixture.ts +11 -0
  110. package/src/config/declarationEmit.test.ts +51 -0
  111. package/src/config/entry.test.ts +46 -0
  112. package/src/config/index.ts +13 -1
  113. package/src/config/nodeClasses.test.ts +18 -0
  114. package/src/config/types.ts +3 -1
  115. package/src/controls/ControlPanel.test.tsx +16 -0
  116. package/src/controls/ControlPanel.tsx +5 -2
  117. package/src/fake-indexeddb-auto.d.ts +5 -0
  118. package/src/index.test.ts +7 -0
  119. package/src/index.ts +38 -5
  120. package/src/instrument/serializers.test.ts +22 -0
  121. package/src/instrument/serializers.ts +11 -0
  122. package/src/instrument/types.ts +25 -1
  123. package/src/lab/Lab.less +4 -13
  124. package/src/lab/Lab.persist.test.tsx +147 -0
  125. package/src/lab/Lab.stories.tsx +0 -2
  126. package/src/lab/Lab.surface.test.tsx +66 -3
  127. package/src/lab/Lab.test.tsx +91 -17
  128. package/src/lab/Lab.tsx +337 -124
  129. package/src/lab/LabFit.stories.less +18 -0
  130. package/src/lab/LabFit.stories.tsx +219 -0
  131. package/src/lab/LabFullChrome.stories.tsx +0 -3
  132. package/src/lab/LabHeader.test.tsx +40 -9
  133. package/src/lab/LabHeader.tsx +7 -13
  134. package/src/lab/LabPalette.tsx +13 -26
  135. package/src/lab/LabShell.less +49 -12
  136. package/src/lab/LabSwitcher.less +8 -1
  137. package/src/lab/Workspace.surface.test.tsx +2 -1
  138. package/src/lab/fitCheck.test.ts +57 -0
  139. package/src/lab/fitCheck.ts +125 -0
  140. package/src/loupe/AGENTS.md +1 -1
  141. package/src/loupe/Loupe.less +1 -1
  142. package/src/loupe/canvasLens.ts +1 -1
  143. package/src/loupe/types.ts +1 -1
  144. package/src/loupe/useLoupe.test.tsx +1 -1
  145. package/src/loupe/useLoupe.ts +1 -1
  146. package/src/passthrough/weasel-ui.ts +9 -0
  147. package/src/primitives/FloatingPanel.stories.tsx +13 -1
  148. package/src/primitives/FloatingPanel.test.tsx +47 -16
  149. package/src/primitives/FloatingPanel.tsx +11 -25
  150. package/src/primitives/Split.less +14 -0
  151. package/src/primitives/Split.test.tsx +108 -0
  152. package/src/primitives/Split.tsx +159 -0
  153. package/src/primitives/ZoomControl.tsx +5 -2
  154. package/src/primitives/index.ts +2 -0
  155. package/src/state/Persistence.stories.tsx +75 -0
  156. package/src/state/Persistence.tsx +33 -0
  157. package/src/state/SingletonExperiment.test.tsx +47 -53
  158. package/src/state/SingletonExperiment.tsx +24 -13
  159. package/src/state/adapterContract.ts +116 -0
  160. package/src/state/adapters.test.ts +113 -61
  161. package/src/state/adapters.ts +328 -69
  162. package/src/state/document.test.ts +71 -96
  163. package/src/state/document.ts +66 -52
  164. package/src/state/helpers.test.ts +1 -1
  165. package/src/state/index.ts +8 -0
  166. package/src/state/labRecords.test.ts +105 -0
  167. package/src/state/labRecords.ts +160 -0
  168. package/src/state/openLabStore.test.ts +658 -0
  169. package/src/state/openLabStore.ts +403 -0
  170. package/src/state/records.test.ts +234 -0
  171. package/src/state/records.ts +219 -0
  172. package/src/state/store.test.ts +104 -635
  173. package/src/state/store.ts +116 -157
  174. package/src/state/toolSlot.test.ts +1 -1
  175. package/src/state/types.ts +39 -15
  176. package/src/state/useOpenOnce.ts +68 -0
  177. package/src/state/usePersistedState.test.tsx +125 -0
  178. package/src/state/usePersistedState.ts +66 -0
  179. package/src/state/useTrialState.test.tsx +2 -3
  180. package/src/state/view.test.ts +49 -15
  181. package/src/state/view.ts +18 -1
  182. package/src/styles.less +2 -0
  183. package/src/surface/AGENTS.md +39 -7
  184. package/src/surface/SurfaceContext.ts +26 -3
  185. package/src/surface/index.ts +2 -0
  186. package/src/surface/useSurfaceTile.test.tsx +2 -1
  187. package/src/surface/useSurfaceTile.ts +6 -5
  188. package/src/surface/useTiledSurface.test.tsx +175 -0
  189. package/src/surface/useTiledSurface.ts +54 -5
  190. package/src/theme/Interstellar.stories.tsx +7 -7
  191. package/src/theme/interstellar.test.ts +1 -1
  192. package/src/theme/interstellar.tokens.json +2 -2
  193. package/src/tools/labTool.ts +11 -0
  194. package/src/trial/Trial.annotations.persist.test.tsx +100 -58
  195. package/src/trial/Trial.annotations.test.tsx +47 -4
  196. package/src/trial/Trial.job.test.tsx +3 -3
  197. package/src/trial/Trial.less +1 -26
  198. package/src/trial/Trial.stories.tsx +1 -2
  199. package/src/trial/Trial.test.tsx +28 -4
  200. package/src/trial/Trial.trialId.test.tsx +23 -1
  201. package/src/trial/Trial.tsx +118 -38
  202. package/src/trial/TrialBody.tsx +17 -141
  203. package/src/trial/TrialChrome.tsx +7 -4
  204. package/src/trial/trialOps.ts +5 -3
  205. package/dist/_dts/types-BP2OCcpg.d.ts +0 -155
  206. package/dist/_dts/types-x92Kfeme.d.ts +0 -62
  207. package/dist/_dts/useTrialState-D6Vb3T-g.d.ts +0 -99
  208. package/dist/chunk-2P6PP5N4.js +0 -553
  209. package/dist/chunk-2P6PP5N4.js.map +0 -1
  210. package/dist/chunk-64ZCN3DA.js.map +0 -1
  211. package/dist/chunk-CTRKTLYZ.js.map +0 -1
  212. package/dist/chunk-FQMJUVHJ.js.map +0 -1
  213. package/dist/chunk-I6JCVE24.js.map +0 -1
  214. package/dist/chunk-MOM3GOVY.js.map +0 -1
  215. package/dist/chunk-SMHP6XZ4.js.map +0 -1
  216. package/dist/chunk-TJ7QY3OC.js.map +0 -1
  217. package/dist/chunk-U3IYHIAE.js.map +0 -1
  218. package/dist/chunk-W3ECWC2K.js +0 -7335
  219. package/dist/chunk-W3ECWC2K.js.map +0 -1
@@ -1,12 +1,10 @@
1
- import { E as LayerDescriptor } from '../_dts/frac-z7ker2Vx.js';
2
- export { B as LayerCapability } from '../_dts/frac-z7ker2Vx.js';
1
+ import { a9 as LayerDescriptor } from '../_dts/frac-8R6UmlvN.js';
2
+ export { a8 as LayerCapability } from '../_dts/frac-8R6UmlvN.js';
3
3
  import * as react_jsx_runtime from 'react/jsx-runtime';
4
4
  import 'react';
5
- import '../_dts/types-B9_zrHmb.js';
5
+ import '../_dts/types-Ca2LCnPq.js';
6
6
  import '@weasel-js/core';
7
7
  import '../_dts/PrefsForm.d-DDHFANkc.js';
8
- import '../_dts/types-x92Kfeme.js';
9
- import '../_dts/types-BP2OCcpg.js';
10
8
  import '../_dts/types-DJ79Tg5J.js';
11
9
 
12
10
  /** A layer that may itself contain layers. A plain `LayerDescriptor` is one
@@ -1,5 +1,5 @@
1
- export { LayerList } from '../chunk-BKFVHKJH.js';
1
+ export { LayerList } from '../chunk-MUKOW3TC.js';
2
2
  import '../chunk-SBXNQW4G.js';
3
- import '../chunk-W3ECWC2K.js';
3
+ import '../chunk-S2SHZRD7.js';
4
4
  //# sourceMappingURL=index.js.map
5
5
  //# sourceMappingURL=index.js.map
@@ -1,13 +1,11 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import { ae as LoupePoint, af as LoupeMode, V as ViewTransform, W as WorldFrame, c as WorldSpec, a2 as ViewportSize, K as LoupeRenderArgs, N as ResolvedLoupe } from '../_dts/frac-z7ker2Vx.js';
3
- export { L as LOUPE_DEFAULTS, G as LoupeCapability, J as LoupeDeclaration, ab as resolveLoupe } from '../_dts/frac-z7ker2Vx.js';
4
- import { c as CanvasStackSurface, C as CanvasLayerDescriptor } from '../_dts/CanvasStackContext-kTEZvEgE.js';
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';
5
5
  import { RefObject, ReactNode } from 'react';
6
- import '../_dts/types-B9_zrHmb.js';
6
+ import '../_dts/types-Ca2LCnPq.js';
7
7
  import '@weasel-js/core';
8
8
  import '../_dts/PrefsForm.d-DDHFANkc.js';
9
- import '../_dts/types-x92Kfeme.js';
10
- import '../_dts/types-BP2OCcpg.js';
11
9
  import '../_dts/types-DJ79Tg5J.js';
12
10
 
13
11
  /** Props for `<CanvasLoupe>`. */
@@ -56,7 +54,7 @@ interface SourceRect {
56
54
  */
57
55
  declare function lensSourceRect(aim: LoupePoint, factor: number, diameter: number, dpr: number): SourceRect;
58
56
  /**
59
- * The colour a stack presents at a point: the topmost visible layer with
57
+ * The color a stack presents at a point: the topmost visible layer with
60
58
  * anything opaque there, or `null` when every layer is transparent — which is
61
59
  * the honest answer for a point showing nothing but the workspace behind.
62
60
  */
@@ -148,7 +146,7 @@ interface UseLoupeOptions {
148
146
  hostRef: RefObject<HTMLElement | null>;
149
147
  /** Whether the loupe is turned on. Hold-to-peek shows it regardless. */
150
148
  enabled: boolean;
151
- /** Hex colour at a host point. Omitted, the loupe reports no colour — which
149
+ /** Hex color at a host point. Omitted, the loupe reports no color — which
152
150
  * is the honest answer for a surface with no pixels to read. */
153
151
  sample?: (p: LoupePoint) => string | null;
154
152
  }
@@ -1,5 +1,5 @@
1
- export { CanvasLoupe, DomLoupe, LOUPE_DEFAULTS, LoupeBubble, TrialLoupe, drawCanvasLens, lensCamera, lensSourceRect, resolveLoupe, sampleStack, useLoupe } from '../chunk-TJ7QY3OC.js';
2
- import '../chunk-CTRKTLYZ.js';
1
+ export { CanvasLoupe, DomLoupe, LOUPE_DEFAULTS, LoupeBubble, TrialLoupe, drawCanvasLens, lensCamera, lensSourceRect, resolveLoupe, sampleStack, useLoupe } from '../chunk-ZPH5WTWF.js';
2
+ import '../chunk-H6ZAOWNE.js';
3
3
  import '../chunk-2AYGEN57.js';
4
4
  import '../chunk-CQLQPQ4P.js';
5
5
  //# sourceMappingURL=index.js.map
@@ -2,7 +2,8 @@ import * as react_jsx_runtime from 'react/jsx-runtime';
2
2
  import { ToolPrefLeaf, ToolPrefGroup, ToolsApi } from '@weasel-js/core';
3
3
  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';
4
4
  import * as react from 'react';
5
- import { ReactNode, CSSProperties, ButtonHTMLAttributes, ReactElement, KeyboardEvent, RefObject, PointerEvent, RefCallback } from 'react';
5
+ 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';
6
7
  export { LayerStack, LayerStackItem, LayerStackProps } from '../ui/layers/index.js';
7
8
  export { a as PrefRenderContext, P as PrefRenderer } from '../_dts/PrefsForm.d-DDHFANkc.js';
8
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';
@@ -885,51 +886,6 @@ type BadgeProps = BadgePropsByShape;
885
886
  */
886
887
  declare function Badge(props: BadgeProps): react_jsx_runtime.JSX.Element;
887
888
 
888
- /** Visual weight of a button. Defaults to `secondary`. */
889
- type ButtonVariant = 'primary' | 'secondary' | 'ghost';
890
- /** Button height and type scale. */
891
- type ButtonSize = 'sm' | 'md';
892
- type ButtonBase = {
893
- variant?: ButtonVariant;
894
- size?: ButtonSize;
895
- /** A button that stays down: renders `aria-pressed` and holds the active
896
- * treatment while it is on. For a control that reports a state rather than
897
- * firing an action -- a panel toggle, a mode switch. Left off, the button
898
- * announces no pressed state at all, which is what an action button wants. */
899
- pressed?: boolean;
900
- disabled?: boolean;
901
- loading?: boolean;
902
- leadingIcon?: ReactNode;
903
- trailingIcon?: ReactNode;
904
- fullWidth?: boolean;
905
- type?: 'button' | 'submit' | 'reset';
906
- className?: string;
907
- style?: ButtonHTMLAttributes<HTMLButtonElement>['style'];
908
- children?: ReactNode;
909
- onClick?: ButtonHTMLAttributes<HTMLButtonElement>['onClick'];
910
- };
911
- type ButtonRegular = ButtonBase & {
912
- iconOnly?: false;
913
- ariaLabel?: string;
914
- };
915
- type ButtonIconOnly = ButtonBase & {
916
- iconOnly: true;
917
- ariaLabel: string;
918
- };
919
- /**
920
- * Props for {@link Button}. Setting `iconOnly` makes `ariaLabel` required,
921
- * since an icon-only button has no text for a screen reader to announce.
922
- */
923
- type ButtonProps = ButtonRegular | ButtonIconOnly;
924
- /**
925
- * Standard button. `loading` swaps the leading icon for a spinner, marks the
926
- * button `aria-busy`, and leaves the label in place; it does not disable the
927
- * button, so pass `disabled` too if the click should be blocked.
928
- *
929
- * `ref` forwards to the underlying `<button>`.
930
- */
931
- declare const Button: react.ForwardRefExoticComponent<ButtonProps & react.RefAttributes<HTMLButtonElement>>;
932
-
933
889
  /**
934
890
  * One column of a {@link DataGrid}. `id` doubles as the default property name
935
891
  * read off each row when no `accessor` is given.
@@ -1318,72 +1274,6 @@ type SliderProps<T extends Thumb = Thumb> = {
1318
1274
  */
1319
1275
  declare function Slider<T extends Thumb = Thumb>(props: SliderProps<T>): ReactElement;
1320
1276
 
1321
- /** One segment of a {@link ToggleBar}, identified by its `value`. */
1322
- type ToggleBarItem<V extends string | number = string> = {
1323
- value: V;
1324
- label?: ReactNode;
1325
- ariaLabel?: string;
1326
- disabled?: boolean;
1327
- };
1328
- /** Segment height and type scale for a {@link ToggleBar}. */
1329
- type ToggleBarSize = 'sm' | 'md';
1330
- /** Visual treatment of a {@link ToggleBar}. */
1331
- type ToggleBarVariant = 'default' | 'minimal' | 'flat';
1332
- type CommonProps = {
1333
- ariaLabel?: string;
1334
- className?: string;
1335
- height?: number;
1336
- /** Size variant. `sm` is ~60% of the default height with reduced padding
1337
- * and font size — sized for dense surfaces like lab control panels. */
1338
- size?: ToggleBarSize;
1339
- /** Visual variant. `minimal` strips the pill track and glass treatment;
1340
- * selection becomes a flat accent. For dense diagnostic surfaces. */
1341
- variant?: ToggleBarVariant;
1342
- };
1343
- /**
1344
- * Props for {@link ToggleBar}, discriminated on `mode`. Single mode is
1345
- * controlled by one value or `null`; multiple mode by an array, and only it
1346
- * accepts `mixedValues`.
1347
- */
1348
- type ToggleBarProps<V extends string | number = string> = (CommonProps & {
1349
- mode?: 'single';
1350
- items: readonly ToggleBarItem<V>[];
1351
- value: V | null;
1352
- onChange: (next: V | null) => void;
1353
- allowDeselect?: boolean;
1354
- }) | (CommonProps & {
1355
- mode: 'multiple';
1356
- items: readonly ToggleBarItem<V>[];
1357
- value: readonly V[];
1358
- /**
1359
- * Values that are neither on nor off — the sources this bar
1360
- * aggregates disagree (a text range that is bold in part of it, a
1361
- * multi-selection whose nodes differ). Rendered `aria-pressed="mixed"`,
1362
- * the ARIA tri-state a toggle button actually has, rather than
1363
- * `SelectionPanel`'s reduced-opacity-plus-`title` workaround for
1364
- * `Switch`, which has no indeterminate state to render.
1365
- *
1366
- * `value` wins where the two lists overlap, so a caller that can't
1367
- * cheaply keep them disjoint doesn't get an ambiguous segment.
1368
- *
1369
- * Clicking a mixed segment turns it fully **on**, matching the
1370
- * everywhere-else convention (and `toggleFlagInRange`'s rule for a
1371
- * partially-styled text range) that a mixed toggle resolves toward
1372
- * the affirmative rather than clearing.
1373
- */
1374
- mixedValues?: readonly V[];
1375
- onChange: (next: V[]) => void;
1376
- });
1377
- /**
1378
- * Segmented control for choosing among a fixed set of values — one of them
1379
- * (`mode: 'single'`, the default) or any number (`mode: 'multiple'`).
1380
- *
1381
- * Single mode ignores a click on the already-selected segment unless
1382
- * `allowDeselect` is set. Arrow keys move focus without changing the value;
1383
- * Space and Enter commit.
1384
- */
1385
- declare function ToggleBar<V extends string | number = string>(props: ToggleBarProps<V>): ReactElement;
1386
-
1387
1277
  /**
1388
1278
  * One segment of an {@link OptionsBar}. Unlike `ToggleBar`, each item carries
1389
1279
  * its own selected state and its own `onChange`.
@@ -1979,12 +1869,12 @@ type SelectOption = {
1979
1869
  */
1980
1870
  textValue?: string;
1981
1871
  };
1982
- type Key$1 = string | number;
1872
+ type Key$2 = string | number;
1983
1873
  /**
1984
1874
  * Props for {@link Select}, on top of React Aria's `Select` props, with the
1985
1875
  * selection key narrowed to the option value type.
1986
1876
  */
1987
- type SelectProps<T extends Key$1 = string> = Omit<SelectProps$1<object>, 'children' | 'className' | 'selectedKey' | 'defaultSelectedKey' | 'onSelectionChange'> & {
1877
+ type SelectProps<T extends Key$2 = string> = Omit<SelectProps$1<object>, 'children' | 'className' | 'selectedKey' | 'defaultSelectedKey' | 'onSelectionChange'> & {
1988
1878
  label?: ReactNode;
1989
1879
  description?: ReactNode;
1990
1880
  errorMessage?: ReactNode | ((v: ValidationResult) => ReactNode);
@@ -2013,7 +1903,7 @@ type SelectProps<T extends Key$1 = string> = Omit<SelectProps$1<object>, 'childr
2013
1903
  * The selection key type is parameterized so consumers with a string-literal
2014
1904
  * union for `value` (e.g. `'r' | 'g' | 'b'`) get a typed `onSelectionChange`.
2015
1905
  */
2016
- declare function Select<T extends Key$1 = string>(props: SelectProps<T>): react_jsx_runtime.JSX.Element;
1906
+ declare function Select<T extends Key$2 = string>(props: SelectProps<T>): react_jsx_runtime.JSX.Element;
2017
1907
  /** Props for {@link SelectItem}, on top of React Aria's `ListBoxItem` props. */
2018
1908
  type SelectItemProps = Omit<ListBoxItemProps, 'className' | 'children'> & {
2019
1909
  children?: ReactNode;
@@ -2026,6 +1916,33 @@ type SelectItemProps = Omit<ListBoxItemProps, 'className' | 'children'> & {
2026
1916
  */
2027
1917
  declare function SelectItem({ children, className, textValue, ...rest }: SelectItemProps): react_jsx_runtime.JSX.Element;
2028
1918
 
1919
+ /** One row in a {@link MenuButton}'s list. */
1920
+ type MenuButtonItem<T extends string = string> = {
1921
+ value: T;
1922
+ label: ReactNode;
1923
+ isDisabled?: boolean;
1924
+ /** Plain-text form of `label`, for type-to-select and screen readers. A
1925
+ * string label supplies this itself. */
1926
+ textValue?: string;
1927
+ };
1928
+ /** Props for {@link MenuButton}. */
1929
+ type MenuButtonProps<T extends string = string> = {
1930
+ /** What the button says. It never changes to show a chosen row. */
1931
+ label: ReactNode;
1932
+ items: ReadonlyArray<MenuButtonItem<T>>;
1933
+ /** Fired with the value of the row chosen. */
1934
+ onAction: (value: T) => void;
1935
+ isDisabled?: boolean;
1936
+ className?: string;
1937
+ 'aria-label'?: string;
1938
+ } & OverlayPortalProps;
1939
+ /**
1940
+ * A button that opens a list and acts on the row chosen — "Add trial…",
1941
+ * "Load…". Unlike a {@link Select} it holds no value, so it sizes to its own
1942
+ * label rather than to its widest row.
1943
+ */
1944
+ declare function MenuButton<T extends string = string>({ label, items, onAction, isDisabled, className, 'aria-label': ariaLabel, portalContainer, }: MenuButtonProps<T>): react_jsx_runtime.JSX.Element;
1945
+
2029
1946
  /**
2030
1947
  * One option in a {@link ComboBox}'s `options` list. `textValue` is the
2031
1948
  * plain-text form used for filtering and screen readers, needed only when
@@ -2037,12 +1954,29 @@ type ComboBoxOption = {
2037
1954
  textValue?: string;
2038
1955
  isDisabled?: boolean;
2039
1956
  };
2040
- type Key = string | number;
1957
+ type Key$1 = string | number;
1958
+ /**
1959
+ * How the typed text narrows the options.
1960
+ *
1961
+ * `'contains'` is a locale-aware substring match over each option's text.
1962
+ * `'none'` shows every option given — what a list a server already filtered
1963
+ * and ranked needs, since a second pass would drop rows that do not contain
1964
+ * the query and reorder whatever survived.
1965
+ */
1966
+ type ComboBoxFilter = 'contains' | 'none' | ((textValue: string, inputValue: string) => boolean);
1967
+ /** What the user committed: an option they picked, or text they typed. */
1968
+ type ComboBoxCommit<T extends Key$1 = string> = {
1969
+ source: 'option';
1970
+ key: T;
1971
+ } | {
1972
+ source: 'text';
1973
+ text: string;
1974
+ };
2041
1975
  /**
2042
1976
  * Props for {@link ComboBox}, on top of React Aria's `ComboBox` props, with
2043
1977
  * the selection key narrowed to the option value type.
2044
1978
  */
2045
- type ComboBoxProps<T extends Key = string> = Omit<ComboBoxProps$1<object>, 'children' | 'className' | 'selectedKey' | 'defaultSelectedKey' | 'onSelectionChange'> & {
1979
+ type ComboBoxProps<T extends Key$1 = string> = Omit<ComboBoxProps$1<object>, 'children' | 'className' | 'selectedKey' | 'defaultSelectedKey' | 'onSelectionChange'> & {
2046
1980
  label?: ReactNode;
2047
1981
  description?: ReactNode;
2048
1982
  errorMessage?: ReactNode | ((v: ValidationResult) => ReactNode);
@@ -2055,6 +1989,25 @@ type ComboBoxProps<T extends Key = string> = Omit<ComboBoxProps$1<object>, 'chil
2055
1989
  defaultSelectedKey?: T;
2056
1990
  onSelectionChange?: (key: T | null) => void;
2057
1991
  emptyLabel?: ReactNode;
1992
+ /** Shown in place of `emptyLabel` while `loadError` is set. */
1993
+ errorLabel?: ReactNode;
1994
+ /**
1995
+ * How typed text narrows `options`. Defaults to `'contains'`. `'none'` also
1996
+ * keeps the popover open on an empty collection: a list the kit does not
1997
+ * filter can arrive empty from a server mid-query, and without that the
1998
+ * popover closes and `emptyLabel` is never seen.
1999
+ */
2000
+ filter?: ComboBoxFilter;
2001
+ /** Marks the options as out of date while the next set is being fetched. */
2002
+ isLoading?: boolean;
2003
+ /** A failed load, shown as `errorLabel` rather than as an empty corpus. */
2004
+ loadError?: unknown | null;
2005
+ /**
2006
+ * Fires when the user commits — Enter on the active option, a click on one,
2007
+ * or Enter on text matching none of them when `allowsCustomValue` is set.
2008
+ * Empty text commits nothing.
2009
+ */
2010
+ onCommit?: (commit: ComboBoxCommit<T>) => void;
2058
2011
  /**
2059
2012
  * `'fill'` (the default) takes the width of whatever row the combo box sits
2060
2013
  * in. `'fit'` sizes the input to its widest option, so it neither swallows a
@@ -2068,7 +2021,7 @@ type ComboBoxProps<T extends Key = string> = Omit<ComboBoxProps$1<object>, 'chil
2068
2021
  * type to filter; selection commits to `onSelectionChange`. When no value
2069
2022
  * is in the input, selection clears (key becomes null).
2070
2023
  */
2071
- declare function ComboBox<T extends Key = string>(props: ComboBoxProps<T>): react_jsx_runtime.JSX.Element;
2024
+ declare function ComboBox<T extends Key$1 = string>(props: ComboBoxProps<T>): react_jsx_runtime.JSX.Element;
2072
2025
  /** Props for {@link ComboBoxItem}, on top of React Aria's `ListBoxItem` props. */
2073
2026
  type ComboBoxItemProps = Omit<ListBoxItemProps, 'className'> & {
2074
2027
  className?: string;
@@ -2197,6 +2150,20 @@ interface Point {
2197
2150
  y: number;
2198
2151
  }
2199
2152
 
2153
+ /**
2154
+ * Tick placement for a numeric axis. Pure — no DOM, no React.
2155
+ */
2156
+ /** What a tick label formatter knows about the column it is part of. */
2157
+ interface TickFormatCtx {
2158
+ /** Places after the point that every label in the column shares. */
2159
+ decimals: number;
2160
+ /** Distance between neighboring ticks, or 0 when the ticks were given
2161
+ * explicitly and are not evenly spaced. */
2162
+ step: number;
2163
+ }
2164
+ /** Turns a tick value into its label. */
2165
+ type TickFormatter = (value: number, ctx: TickFormatCtx) => string;
2166
+
2200
2167
  /** Background grid configuration for a {@link Plot2D}. */
2201
2168
  interface GridSettings {
2202
2169
  /** Number of evenly-spaced internal grid lines per axis (excluding
@@ -2210,6 +2177,33 @@ interface AxesSettings {
2210
2177
  /** Stroke color override. When omitted, uses `var(--plot-axis)`. */
2211
2178
  color?: string;
2212
2179
  }
2180
+ /**
2181
+ * Ticks along one axis of a {@link Plot2D}: a line across the plot at each
2182
+ * tick value, and a label naming it. Every label in a column is formatted
2183
+ * to the same number of decimal places.
2184
+ */
2185
+ interface TickSettings {
2186
+ /** Tick values in model space; any outside the range are skipped.
2187
+ * Omitted = round 1/2/5 steps, as many as `minSpacing` allows at the
2188
+ * plot's current size. */
2189
+ values?: readonly number[];
2190
+ /** Smallest gap between generated ticks, in px. Default 24 on y, 64 on x. */
2191
+ minSpacing?: number;
2192
+ /** A generated tick nearer either end of the axis than this is dropped,
2193
+ * so its label stays on the plot, in px. Default 4 on y, 16 on x. */
2194
+ inset?: number;
2195
+ /** Draw a line across the plot at each tick. Default true. */
2196
+ lines?: boolean;
2197
+ /** Where labels sit: `'inside'` the plot along its left (y) or bottom (x)
2198
+ * edge, `'outside'` it past that edge in space the caller leaves free,
2199
+ * or `false` for none. Default `'inside'`. */
2200
+ labels?: 'inside' | 'outside' | false;
2201
+ /** Space between a label and the plot edge it sits against, in px.
2202
+ * Default 4. */
2203
+ gap?: number;
2204
+ /** Label text for a tick. Default {@link formatTick}. */
2205
+ format?: TickFormatter;
2206
+ }
2213
2207
  /** A pointer position given in both of the plot's coordinate systems. */
2214
2208
  interface Plot2DCoords {
2215
2209
  plot: Point;
@@ -2229,8 +2223,16 @@ interface Plot2DProps {
2229
2223
  /** Axis lines. `false` / `null` = no axes. Omitted = default-styled
2230
2224
  * axes (on). Pass AxesSettings to customize. */
2231
2225
  axes?: AxesSettings | false | null;
2226
+ /** Ticks at x values. `false` / `null` / omitted = none; `{}` = defaults. */
2227
+ xTicks?: TickSettings | false | null;
2228
+ /** Ticks at y values. `false` / `null` / omitted = none; `{}` = defaults. */
2229
+ yTicks?: TickSettings | false | null;
2232
2230
  /** Forwarded to the underlying svg. Consumer opts into focus this way. */
2233
2231
  tabIndex?: number;
2232
+ /** Default `'img'`. A plot holding focusable marks must not be an image,
2233
+ * whose children are presentational to assistive technology. */
2234
+ role?: string;
2235
+ 'aria-label'?: string;
2234
2236
  className?: string;
2235
2237
  style?: CSSProperties;
2236
2238
  /** Pointer down on the SVG. Receives both plot- and model-space coords
@@ -2263,8 +2265,8 @@ interface Plot2DHandle {
2263
2265
  readonly height: number;
2264
2266
  }
2265
2267
  /**
2266
- * An SVG plotting surface with an optional grid and axes. It draws the frame
2267
- * and owns the model-space to plot-space mapping; the plotted content is
2268
+ * An SVG plotting surface with an optional grid, axes and ticks. It draws the
2269
+ * frame and owns the model-space to plot-space mapping; the plotted content is
2268
2270
  * whatever children are passed, positioned in plot space.
2269
2271
  */
2270
2272
  declare const Plot2D: react.ForwardRefExoticComponent<Plot2DProps & react.RefAttributes<Plot2DHandle>>;
@@ -2357,6 +2359,8 @@ interface CurveEditorProps {
2357
2359
  height: number;
2358
2360
  grid?: GridSettings | false | null;
2359
2361
  axes?: AxesSettings | false | null;
2362
+ xTicks?: TickSettings | false | null;
2363
+ yTicks?: TickSettings | false | null;
2360
2364
  curve?: CurveSettings | false | null;
2361
2365
  fill?: FillSettings | false | null;
2362
2366
  hideNonInteractive?: boolean;
@@ -2398,6 +2402,8 @@ interface PointPlotterProps {
2398
2402
  height: number;
2399
2403
  grid?: GridSettings | false | null;
2400
2404
  axes?: AxesSettings | false | null;
2405
+ xTicks?: TickSettings | false | null;
2406
+ yTicks?: TickSettings | false | null;
2401
2407
  /** Minimum allowed point count. User-initiated deletion is refused
2402
2408
  * while `value.length <= minPoints`. */
2403
2409
  minPoints?: number;
@@ -2482,6 +2488,42 @@ declare function oklchToHex(L: number, C: number, Hdeg: number): string;
2482
2488
  /** Evaluates a {@link ChromaCurve} at a lightness, clamping outside its range. */
2483
2489
  declare function chromaAt(L: number, curve: ChromaCurve): number;
2484
2490
 
2491
+ type Key = string | number;
2492
+ /** An option list keyed to the value type its combo box commits. */
2493
+ type AsyncOption<T extends Key> = ComboBoxOption & {
2494
+ value: T;
2495
+ };
2496
+ /** Options for {@link useAsyncOptions}. */
2497
+ type UseAsyncOptionsProps<T extends Key> = {
2498
+ /**
2499
+ * Fetches the options for a query. The signal aborts when a later keystroke
2500
+ * supersedes this call, so a `fetch` should forward it.
2501
+ */
2502
+ load: (query: string, signal: AbortSignal) => Promise<ReadonlyArray<AsyncOption<T>>>;
2503
+ /** Quiet period before a query is sent. */
2504
+ debounceMs?: number;
2505
+ /** Shorter queries are not sent, and empty the options. */
2506
+ minLength?: number;
2507
+ };
2508
+ /** What {@link useAsyncOptions} returns, shaped to spread into a `ComboBox`. */
2509
+ type AsyncOptionsResult<T extends Key> = {
2510
+ options: ReadonlyArray<AsyncOption<T>>;
2511
+ isLoading: boolean;
2512
+ loadError: unknown | null;
2513
+ inputValue: string;
2514
+ onInputChange: (next: string) => void;
2515
+ };
2516
+ /**
2517
+ * Drives a combo box whose options come from a server: debounces the query,
2518
+ * discards responses overtaken by a later one, and reports a failed load
2519
+ * separately from an empty result.
2520
+ *
2521
+ * `options` holds the last *resolved* list and is never emptied to mean
2522
+ * "working", so the previous results stay on screen — and stay arrowable —
2523
+ * while the next request is in flight.
2524
+ */
2525
+ declare function useAsyncOptions<T extends Key = string>({ load, debounceMs, minLength, }: UseAsyncOptionsProps<T>): AsyncOptionsResult<T>;
2526
+
2485
2527
  /** One row in a reorderable list. */
2486
2528
  interface LayerListItem {
2487
2529
  id: string;
@@ -2625,5 +2667,5 @@ declare const MINUS_SIGN = "\u2212";
2625
2667
  */
2626
2668
  declare function formatNumber(value: number, options?: Intl.NumberFormatOptions): string;
2627
2669
 
2628
- export { ActionBar, ActionsBar, Badge, Button, Callout, Checkbox, ComboBox, ComboBoxItem, CurveEditor, DataGrid, Dialog, Disclosure, DisclosureRow, DragHandleGlyph, EDGE_PROFILES, Field, ICON_PATHS, Icon, Input, KeyCap, KeySequence, MINUS_SIGN, NumberField, OptionsBar, Plot2D, PointPlotter, Powerline, Radio, RadioGroup, RangeSlider, Select, SelectItem, Sidebar, SidebarPanel, Slider, Switch, Tab, TabList, TabPanel, Tabs, ToggleBar, ToolButton, ToolGroup, ToolPalette, chromaAt, detectPlatform, dlog, fieldClasses, formatNumber, formatShortcut, formatShortcutParts, inferKeycapKind, isDebugEnabled, isPrefLeaf, keyGlyph, keySpecFromKey, keySpecsFromMods, oklchToHex, paintGradientTrack, prefValueAtPath, useReorderDragList, useRovingTabIndex, visiblePrefSubtree };
2629
- export type { ActionBarProps, ActionsBarItem, ActionsBarProps, ActionsBarSize, ActionsBarVariant, AddPointMode, AnchorRenderProps, AxesSettings, BadgeProps, BadgeShape, BadgeSize, BadgeTone, BadgeVariant, BoundsCtx, BuiltInEdgeName, ButtonProps, ButtonSize, ButtonVariant, CalloutProps, CheckboxProps, ChromaCurve, ChromaCurvePoint, 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, 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, ToggleBarItem, ToggleBarProps, ToggleBarSize, ToggleBarVariant, ToolButtonProps, ToolGroupProps, ToolPaletteProps, TrackCtx, UseReorderDragListOptions, UseRovingTabIndexOptions };
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 };
@@ -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, l5 as CalloutTrigger, o as Checkbox, g2 as ComboBox, v3 as ComboBoxItem, L as CurveEditor, s2 as DataGrid, l3 as Dialog, r5 as Disclosure, i2 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, e2 as MINUS_SIGN, f2 as NumberField, r7 as OptionsBar, f3 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, Jn as chromaAt, u4 as detectPlatform, a as dlog, r3 as fieldClasses, t3 as formatNumber, d2 as formatShortcut, u5 as formatShortcutParts, o2 as inferKeycapKind, i as isDebugEnabled, t2 as isPrefLeaf, e as keyGlyph, p2 as keySpecFromKey, d as keySpecsFromMods, qn as oklchToHex, v2 as paintGradientTrack, n3 as prefValueAtPath, s as useReorderDragList, a4 as useRovingTabIndex, r4 as visiblePrefSubtree } from '../chunk-W3ECWC2K.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';
3
3
  //# sourceMappingURL=weasel-ui.js.map
4
4
  //# sourceMappingURL=weasel-ui.js.map
@@ -12,8 +12,10 @@ interface FloatingPanelProps {
12
12
  snapCorners?: readonly Corner[];
13
13
  /** Pixels in from a corner when snapped. Default 12. */
14
14
  inset?: number;
15
- /** localStorage key to remember its position under. Omit to forget on reload. */
16
- storageKey?: string;
15
+ /** Name to remember its position under, through `usePersistedState` — so it
16
+ * is remembered only inside a lab or a `<Persistence>`. Omit to forget on
17
+ * reload. */
18
+ persist?: string;
17
19
  className?: string;
18
20
  }
19
21
  /**
@@ -24,7 +26,7 @@ interface FloatingPanelProps {
24
26
  * model would be all cost. Pointer handling is therefore this component's, and
25
27
  * windease's own affordance rendering never participates.
26
28
  */
27
- declare function FloatingPanel({ children, anchor, snapCorners, inset, storageKey, className, }: FloatingPanelProps): react_jsx_runtime.JSX.Element;
29
+ declare function FloatingPanel({ children, anchor, snapCorners, inset, persist, className, }: FloatingPanelProps): react_jsx_runtime.JSX.Element;
28
30
 
29
31
  /** A live frame-rate readout, averaged over the last 30 frames. */
30
32
  declare function FpsMeter(): react_jsx_runtime.JSX.Element;
@@ -84,6 +86,51 @@ interface SidebarProps {
84
86
  * caller's to hold. */
85
87
  declare function Sidebar({ children, title, collapsed, onToggle }: SidebarProps): react_jsx_runtime.JSX.Element;
86
88
 
89
+ /** Props for `<Split>`. */
90
+ interface SplitProps {
91
+ /** The sidebar pane's contents. */
92
+ sidebar: ReactNode;
93
+ /** The content pane's contents. */
94
+ children: ReactNode;
95
+ /** Names the sidebar pane, and through it the seam. Default `'Sidebar'`. */
96
+ label?: string;
97
+ /** Extra classes on the strip, which always has `lk-split`. */
98
+ className?: string;
99
+ /** The class on the sidebar pane. */
100
+ sidebarClassName?: string;
101
+ /** The class on the content pane. */
102
+ contentClassName?: string;
103
+ /** The sidebar's current extent in pixels. Omit to leave it unpersisted: the
104
+ * seam still works, its result just does not outlive the mount. */
105
+ width?: number;
106
+ /** Where the sidebar starts before anyone drags it. */
107
+ defaultWidth?: number;
108
+ minWidth?: number;
109
+ maxWidth?: number;
110
+ /** How little the content pane may be squeezed to. Reported as the seam's
111
+ * reachable maximum, so the drag stops there rather than clamping silently. */
112
+ contentMinWidth?: number;
113
+ /** Fires through the drag, not on release: the pane is already there. */
114
+ onWidthChange?: (width: number) => void;
115
+ /**
116
+ * Fixed extent. Omit in an app — the strip measures its own box. Supply it
117
+ * where nothing measures, notably jsdom, or both panes lay out at zero.
118
+ */
119
+ viewport?: {
120
+ w: number;
121
+ h: number;
122
+ };
123
+ }
124
+ /**
125
+ * A sidebar and a content pane as a two-pane strip with a draggable seam.
126
+ *
127
+ * The seam is `stripStrategy`'s own resize affordance, so it arrives as a
128
+ * `role="separator"` carrying the reachable range, operable by pointer and by
129
+ * arrows / Home / End, and clamped against the content pane's floor rather
130
+ * than against the sidebar's alone.
131
+ */
132
+ declare function Split({ sidebar, children, label, className, sidebarClassName, contentClassName, width, defaultWidth, minWidth, maxWidth, contentMinWidth, onWidthChange, viewport, }: SplitProps): react_jsx_runtime.JSX.Element;
133
+
87
134
  /** Props for `<StatusBar>`. */
88
135
  interface StatusBarProps {
89
136
  children: ReactNode;
@@ -160,7 +207,7 @@ interface ZoomControlProps {
160
207
  /** Zoom as a log-scaled slider with an editable percentage beside it. Pair it
161
208
  * with zoom-in / zoom-out buttons in a `<Toolbar.Group>`; this component owns
162
209
  * only the continuous part. */
163
- declare function ZoomControl({ zoom, onZoomChange, onZoomCommit, min, max, className, }: ZoomControlProps): react_jsx_runtime.JSX.Element;
210
+ declare function ZoomControl({ zoom, onZoomChange, onZoomCommit, min: minProp, max: maxProp, className, }: ZoomControlProps): react_jsx_runtime.JSX.Element;
164
211
 
165
- export { FloatingPanel, FpsMeter, JobProgress, Legend, ScaleIndicator, Sidebar, StatusBar, Toolbar, ZoomControl };
166
- export type { FloatingPanelProps, JobProgressProps, LegendEntry, LegendMark, LegendProps, ScaleIndicatorProps, SidebarProps, StatusBarProps, StatusBarSectionProps, ToolbarButtonProps, ToolbarGroupProps, ToolbarProps, ZoomControlProps };
212
+ export { FloatingPanel, FpsMeter, JobProgress, Legend, ScaleIndicator, Sidebar, Split, StatusBar, Toolbar, ZoomControl };
213
+ export type { FloatingPanelProps, JobProgressProps, LegendEntry, LegendMark, LegendProps, ScaleIndicatorProps, SidebarProps, SplitProps, StatusBarProps, StatusBarSectionProps, ToolbarButtonProps, ToolbarGroupProps, ToolbarProps, ZoomControlProps };
@@ -1,7 +1,9 @@
1
- export { FloatingPanel, JobProgress, Legend, Sidebar } from '../chunk-MOM3GOVY.js';
2
- export { FpsMeter, ScaleIndicator, StatusBar, Toolbar, ZoomControl } from '../chunk-SMHP6XZ4.js';
3
- import '../chunk-SBXNQW4G.js';
4
- import '../chunk-W3ECWC2K.js';
1
+ export { FloatingPanel, JobProgress, Legend, Sidebar, Split } from '../chunk-EKIICY6X.js';
2
+ export { FpsMeter, ScaleIndicator, StatusBar, Toolbar, ZoomControl } from '../chunk-KJALCDWE.js';
3
+ import '../chunk-RWNDDKOH.js';
5
4
  import '../chunk-CQLQPQ4P.js';
5
+ import '../chunk-2YILQ7Y5.js';
6
+ import '../chunk-SBXNQW4G.js';
7
+ import '../chunk-S2SHZRD7.js';
6
8
  //# sourceMappingURL=index.js.map
7
9
  //# sourceMappingURL=index.js.map
@@ -1,12 +1,13 @@
1
- export { C as CURRENT_DOCUMENT_VERSION, L as LabStore, a as LabStoreActions, b as LabStoreContext, c as LabStoreProvider, T as TrialIdContext, d as TrialIdProvider, e as createLabStore, f as createMemoryAdapter, l as labDocumentKey, g as localStorageAdapter, n as noneAdapter, q as quarantineKey, s as sessionStorageAdapter, u as urlHashAdapter, h as useLabStore, i as useTrialId, j as useTrialState } from '../_dts/useTrialState-D6Vb3T-g.js';
2
- import { S as SerializedTrial, I as InstrumentSerializers, T as TrialRecord, U as UndoStack, a as StorageAdapter } from '../_dts/types-BP2OCcpg.js';
3
- export { C as CreateLabStoreOptions, L as LabDocument, b as LabStoreState, M as Migration, c as SavedSnapshot, d as TrialStateHandle, e as UndockedPanel, f as UndockedPanels, g as dockPanel, p as panelKey, u as undockPanel } from '../_dts/types-BP2OCcpg.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-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';
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-B9_zrHmb.js';
7
+ import '../_dts/types-Ca2LCnPq.js';
8
8
  import '@weasel-js/core';
9
9
  import '../_dts/PrefsForm.d-DDHFANkc.js';
10
+ import '../_dts/types-DJ79Tg5J.js';
10
11
 
11
12
  /** The storage key a lab writes one of its buckets under. Namespaced by
12
13
  * `storageKey` so two labs sharing an origin do not collide. */
@@ -34,17 +35,21 @@ interface SingletonExperimentProviderProps<TS, TC> {
34
35
  id: string;
35
36
  initialConfig: TC;
36
37
  initialState: TS;
37
- storage: StorageAdapter;
38
38
  storageKey: string;
39
+ /** Default: IndexedDB, or localStorage where IndexedDB will not open. */
40
+ storage?: StorageAdapter;
41
+ /** Rendered until the stored experiment has loaded. Default: nothing. */
42
+ fallback?: ReactNode;
39
43
  children: ReactNode;
40
44
  }
41
45
  /**
42
46
  * One-trial `<Lab>` substitute for single-screen experiments. Mounts
43
47
  * a `LabStoreProvider` + `TrialIdProvider` with one synthetic
44
48
  * trial, so `useTrialState` works without going through the
45
- * full `<Lab instruments={...}>` runtime.
49
+ * full `<Lab instruments={...}>` runtime. `storageKey` and `storage` are read
50
+ * once, at mount.
46
51
  */
47
- declare function SingletonExperimentProvider<TS, TC>({ id, initialConfig, initialState, storage, storageKey, children, }: SingletonExperimentProviderProps<TS, TC>): react_jsx_runtime.JSX.Element;
52
+ declare function SingletonExperimentProvider<TS, TC>({ id, initialConfig, initialState, storage, storageKey, fallback, children, }: SingletonExperimentProviderProps<TS, TC>): react_jsx_runtime.JSX.Element;
48
53
 
49
54
  export { InstrumentSerializers, SerializedTrial, SingletonExperimentProvider, StorageAdapter, TrialRecord, UndoStack, decodeUrlHash, deserializeTrials, emptyUndoStack, encodeUrlHash, labStorageKey, serializeTrials };
50
55
  export type { SingletonExperimentProviderProps };