@weasel-js/labkit 1.4.3 → 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 (229) hide show
  1. package/README.md +13 -2
  2. package/dist/_dts/{CanvasStackContext-Dde8_1my.d.ts → CanvasStackContext-CqkxkFJW.d.ts} +1 -1
  3. package/dist/_dts/ToggleBar.d-DbHoWKIA.d.ts +116 -0
  4. package/dist/_dts/{frac-B5mB8LsJ.d.ts → frac-8R6UmlvN.d.ts} +256 -33
  5. package/dist/_dts/index-B8uu2ba7.d.ts +237 -0
  6. package/dist/_dts/{index-DelFfeV0.d.ts → index-retnAut7.d.ts} +45 -12
  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-QAGAHJKZ.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-2RQPGOQF.js → chunk-KJALCDWE.js} +9 -7
  23. package/dist/chunk-KJALCDWE.js.map +1 -0
  24. package/dist/{chunk-ISCOFAUO.js → chunk-MUKOW3TC.js} +3 -3
  25. package/dist/{chunk-ISCOFAUO.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-C42T6DJT.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-ASWKLRKJ.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 +123 -348
  53. package/dist/index.js +794 -837
  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 +169 -117
  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 +163 -62
  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/frac.test.ts +4 -4
  77. package/src/annotations/frac.ts +3 -2
  78. package/src/annotations/index.ts +1 -1
  79. package/src/annotations/paint.test.ts +2 -2
  80. package/src/annotations/paint.ts +1 -1
  81. package/src/annotations/preload.ts +6 -0
  82. package/src/annotations/store.test.ts +18 -0
  83. package/src/annotations/store.ts +7 -6
  84. package/src/annotations/svgNodes.test.ts +2 -2
  85. package/src/annotations/svgNodes.ts +1 -2
  86. package/src/annotations/toolMap.ts +3 -3
  87. package/src/annotations/types.ts +6 -3
  88. package/src/canvas/CameraWheelContext.ts +12 -0
  89. package/src/canvas/CanvasStack.test.tsx +25 -0
  90. package/src/canvas/CanvasStack.tsx +31 -4
  91. package/src/canvas/Stage.less +18 -0
  92. package/src/canvas/Stage.test.tsx +186 -0
  93. package/src/canvas/Stage.tsx +134 -0
  94. package/src/canvas/camera.test.ts +17 -2
  95. package/src/canvas/camera.ts +9 -9
  96. package/src/canvas/index.ts +4 -0
  97. package/src/canvas/usePanZoom.ts +10 -5
  98. package/src/chrome/ChromeRegions.stories.tsx +0 -3
  99. package/src/chrome/LabChrome.tsx +114 -0
  100. package/src/chrome/builtins.tsx +20 -31
  101. package/src/chrome/index.ts +15 -0
  102. package/src/chrome/labRegions.test.tsx +208 -0
  103. package/src/chrome/labTypes.ts +50 -0
  104. package/src/chrome/merge.ts +7 -9
  105. package/src/chrome/regions/PaletteRegion.test.tsx +6 -4
  106. package/src/chrome/regions/PaletteRegion.tsx +21 -9
  107. package/src/chrome/regions/SidebarRegion.tsx +25 -13
  108. package/src/chrome/regions/StatusRegion.tsx +15 -8
  109. package/src/chrome/regions/ToolbarRegion.tsx +30 -16
  110. package/src/chrome/types.ts +47 -20
  111. package/src/config/builder.test.ts +4 -0
  112. package/src/config/builder.ts +16 -10
  113. package/src/config/declarationEmit.fixture.ts +11 -0
  114. package/src/config/declarationEmit.test.ts +51 -0
  115. package/src/config/entry.test.ts +46 -0
  116. package/src/config/index.ts +13 -1
  117. package/src/config/nodeClasses.test.ts +18 -0
  118. package/src/config/types.ts +3 -1
  119. package/src/controls/ControlPanel.test.tsx +16 -0
  120. package/src/controls/ControlPanel.tsx +5 -2
  121. package/src/fake-indexeddb-auto.d.ts +5 -0
  122. package/src/index.test.ts +7 -0
  123. package/src/index.ts +39 -6
  124. package/src/instrument/serializers.test.ts +22 -0
  125. package/src/instrument/serializers.ts +11 -0
  126. package/src/instrument/types.ts +25 -1
  127. package/src/lab/Lab.less +4 -13
  128. package/src/lab/Lab.persist.test.tsx +147 -0
  129. package/src/lab/Lab.stories.tsx +0 -2
  130. package/src/lab/Lab.surface.test.tsx +66 -3
  131. package/src/lab/Lab.test.tsx +91 -17
  132. package/src/lab/Lab.tsx +337 -124
  133. package/src/lab/LabFit.stories.less +18 -0
  134. package/src/lab/LabFit.stories.tsx +219 -0
  135. package/src/lab/LabFullChrome.stories.tsx +0 -3
  136. package/src/lab/LabHeader.test.tsx +40 -9
  137. package/src/lab/LabHeader.tsx +7 -13
  138. package/src/lab/LabPalette.tsx +13 -26
  139. package/src/lab/LabShell.less +49 -12
  140. package/src/lab/LabShell.tsx +14 -2
  141. package/src/lab/LabSwitcher.less +92 -0
  142. package/src/lab/LabSwitcher.test.tsx +96 -0
  143. package/src/lab/LabSwitcher.tsx +112 -0
  144. package/src/lab/Workspace.surface.test.tsx +2 -1
  145. package/src/lab/fitCheck.test.ts +57 -0
  146. package/src/lab/fitCheck.ts +125 -0
  147. package/src/lab/index.ts +2 -0
  148. package/src/loupe/AGENTS.md +1 -1
  149. package/src/loupe/Loupe.less +1 -1
  150. package/src/loupe/canvasLens.ts +1 -1
  151. package/src/loupe/types.ts +1 -1
  152. package/src/loupe/useLoupe.test.tsx +1 -1
  153. package/src/loupe/useLoupe.ts +1 -1
  154. package/src/passthrough/weasel-ui.ts +9 -0
  155. package/src/primitives/FloatingPanel.stories.tsx +13 -1
  156. package/src/primitives/FloatingPanel.test.tsx +47 -16
  157. package/src/primitives/FloatingPanel.tsx +11 -25
  158. package/src/primitives/Split.less +14 -0
  159. package/src/primitives/Split.test.tsx +108 -0
  160. package/src/primitives/Split.tsx +159 -0
  161. package/src/primitives/ZoomControl.tsx +5 -2
  162. package/src/primitives/index.ts +2 -0
  163. package/src/state/Persistence.stories.tsx +75 -0
  164. package/src/state/Persistence.tsx +33 -0
  165. package/src/state/SingletonExperiment.test.tsx +47 -53
  166. package/src/state/SingletonExperiment.tsx +24 -13
  167. package/src/state/adapterContract.ts +116 -0
  168. package/src/state/adapters.test.ts +113 -61
  169. package/src/state/adapters.ts +328 -69
  170. package/src/state/document.test.ts +71 -96
  171. package/src/state/document.ts +66 -52
  172. package/src/state/helpers.test.ts +20 -0
  173. package/src/state/helpers.ts +16 -0
  174. package/src/state/index.ts +8 -0
  175. package/src/state/labRecords.test.ts +105 -0
  176. package/src/state/labRecords.ts +160 -0
  177. package/src/state/openLabStore.test.ts +658 -0
  178. package/src/state/openLabStore.ts +403 -0
  179. package/src/state/records.test.ts +234 -0
  180. package/src/state/records.ts +219 -0
  181. package/src/state/store.test.ts +104 -635
  182. package/src/state/store.ts +117 -158
  183. package/src/state/toolSlot.test.ts +1 -1
  184. package/src/state/types.ts +39 -15
  185. package/src/state/useOpenOnce.ts +68 -0
  186. package/src/state/usePersistedState.test.tsx +125 -0
  187. package/src/state/usePersistedState.ts +66 -0
  188. package/src/state/useTrialState.test.tsx +2 -3
  189. package/src/state/view.test.ts +49 -15
  190. package/src/state/view.ts +18 -1
  191. package/src/styles.less +3 -0
  192. package/src/surface/AGENTS.md +39 -7
  193. package/src/surface/SurfaceContext.ts +26 -3
  194. package/src/surface/index.ts +2 -0
  195. package/src/surface/useSurfaceTile.test.tsx +2 -1
  196. package/src/surface/useSurfaceTile.ts +6 -5
  197. package/src/surface/useTiledSurface.test.tsx +175 -0
  198. package/src/surface/useTiledSurface.ts +54 -5
  199. package/src/theme/Interstellar.stories.tsx +7 -7
  200. package/src/theme/base.less +4 -4
  201. package/src/theme/interstellar.test.ts +1 -1
  202. package/src/theme/interstellar.tokens.json +2 -2
  203. package/src/tools/labTool.ts +11 -0
  204. package/src/trial/Trial.annotations.persist.test.tsx +100 -58
  205. package/src/trial/Trial.annotations.test.tsx +47 -4
  206. package/src/trial/Trial.job.test.tsx +3 -3
  207. package/src/trial/Trial.less +1 -26
  208. package/src/trial/Trial.stories.tsx +1 -2
  209. package/src/trial/Trial.test.tsx +28 -4
  210. package/src/trial/Trial.trialId.test.tsx +23 -1
  211. package/src/trial/Trial.tsx +118 -38
  212. package/src/trial/TrialBody.tsx +17 -141
  213. package/src/trial/TrialChrome.tsx +7 -4
  214. package/src/trial/trialOps.ts +7 -4
  215. package/dist/_dts/types-BP2OCcpg.d.ts +0 -155
  216. package/dist/_dts/types-x92Kfeme.d.ts +0 -62
  217. package/dist/_dts/useTrialState-D6Vb3T-g.d.ts +0 -99
  218. package/dist/chunk-2RQPGOQF.js.map +0 -1
  219. package/dist/chunk-5TROQVQ2.js +0 -547
  220. package/dist/chunk-5TROQVQ2.js.map +0 -1
  221. package/dist/chunk-ASWKLRKJ.js.map +0 -1
  222. package/dist/chunk-C42T6DJT.js.map +0 -1
  223. package/dist/chunk-CTRKTLYZ.js.map +0 -1
  224. package/dist/chunk-FQMJUVHJ.js.map +0 -1
  225. package/dist/chunk-I6JCVE24.js.map +0 -1
  226. package/dist/chunk-MHAGC6VD.js +0 -7320
  227. package/dist/chunk-MHAGC6VD.js.map +0 -1
  228. package/dist/chunk-QAGAHJKZ.js.map +0 -1
  229. package/dist/chunk-TJ7QY3OC.js.map +0 -1
@@ -1,12 +1,10 @@
1
- import { E as LayerDescriptor } from '../_dts/frac-B5mB8LsJ.js';
2
- export { B as LayerCapability } from '../_dts/frac-B5mB8LsJ.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-ISCOFAUO.js';
1
+ export { LayerList } from '../chunk-MUKOW3TC.js';
2
2
  import '../chunk-SBXNQW4G.js';
3
- import '../chunk-MHAGC6VD.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-B5mB8LsJ.js';
3
- export { L as LOUPE_DEFAULTS, G as LoupeCapability, J as LoupeDeclaration, ab as resolveLoupe } from '../_dts/frac-B5mB8LsJ.js';
4
- import { c as CanvasStackSurface, C as CanvasLayerDescriptor } from '../_dts/CanvasStackContext-Dde8_1my.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,46 +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
- disabled?: boolean;
896
- loading?: boolean;
897
- leadingIcon?: ReactNode;
898
- trailingIcon?: ReactNode;
899
- fullWidth?: boolean;
900
- type?: 'button' | 'submit' | 'reset';
901
- className?: string;
902
- style?: ButtonHTMLAttributes<HTMLButtonElement>['style'];
903
- children?: ReactNode;
904
- onClick?: ButtonHTMLAttributes<HTMLButtonElement>['onClick'];
905
- };
906
- type ButtonRegular = ButtonBase & {
907
- iconOnly?: false;
908
- ariaLabel?: string;
909
- };
910
- type ButtonIconOnly = ButtonBase & {
911
- iconOnly: true;
912
- ariaLabel: string;
913
- };
914
- /**
915
- * Props for {@link Button}. Setting `iconOnly` makes `ariaLabel` required,
916
- * since an icon-only button has no text for a screen reader to announce.
917
- */
918
- type ButtonProps = ButtonRegular | ButtonIconOnly;
919
- /**
920
- * Standard button. `loading` swaps the leading icon for a spinner, marks the
921
- * button `aria-busy`, and leaves the label in place; it does not disable the
922
- * button, so pass `disabled` too if the click should be blocked.
923
- *
924
- * `ref` forwards to the underlying `<button>`.
925
- */
926
- declare const Button: react.ForwardRefExoticComponent<ButtonProps & react.RefAttributes<HTMLButtonElement>>;
927
-
928
889
  /**
929
890
  * One column of a {@link DataGrid}. `id` doubles as the default property name
930
891
  * read off each row when no `accessor` is given.
@@ -1313,72 +1274,6 @@ type SliderProps<T extends Thumb = Thumb> = {
1313
1274
  */
1314
1275
  declare function Slider<T extends Thumb = Thumb>(props: SliderProps<T>): ReactElement;
1315
1276
 
1316
- /** One segment of a {@link ToggleBar}, identified by its `value`. */
1317
- type ToggleBarItem<V extends string | number = string> = {
1318
- value: V;
1319
- label?: ReactNode;
1320
- ariaLabel?: string;
1321
- disabled?: boolean;
1322
- };
1323
- /** Segment height and type scale for a {@link ToggleBar}. */
1324
- type ToggleBarSize = 'sm' | 'md';
1325
- /** Visual treatment of a {@link ToggleBar}. */
1326
- type ToggleBarVariant = 'default' | 'minimal' | 'flat';
1327
- type CommonProps = {
1328
- ariaLabel?: string;
1329
- className?: string;
1330
- height?: number;
1331
- /** Size variant. `sm` is ~60% of the default height with reduced padding
1332
- * and font size — sized for dense surfaces like lab control panels. */
1333
- size?: ToggleBarSize;
1334
- /** Visual variant. `minimal` strips the pill track and glass treatment;
1335
- * selection becomes a flat accent. For dense diagnostic surfaces. */
1336
- variant?: ToggleBarVariant;
1337
- };
1338
- /**
1339
- * Props for {@link ToggleBar}, discriminated on `mode`. Single mode is
1340
- * controlled by one value or `null`; multiple mode by an array, and only it
1341
- * accepts `mixedValues`.
1342
- */
1343
- type ToggleBarProps<V extends string | number = string> = (CommonProps & {
1344
- mode?: 'single';
1345
- items: readonly ToggleBarItem<V>[];
1346
- value: V | null;
1347
- onChange: (next: V | null) => void;
1348
- allowDeselect?: boolean;
1349
- }) | (CommonProps & {
1350
- mode: 'multiple';
1351
- items: readonly ToggleBarItem<V>[];
1352
- value: readonly V[];
1353
- /**
1354
- * Values that are neither on nor off — the sources this bar
1355
- * aggregates disagree (a text range that is bold in part of it, a
1356
- * multi-selection whose nodes differ). Rendered `aria-pressed="mixed"`,
1357
- * the ARIA tri-state a toggle button actually has, rather than
1358
- * `SelectionPanel`'s reduced-opacity-plus-`title` workaround for
1359
- * `Switch`, which has no indeterminate state to render.
1360
- *
1361
- * `value` wins where the two lists overlap, so a caller that can't
1362
- * cheaply keep them disjoint doesn't get an ambiguous segment.
1363
- *
1364
- * Clicking a mixed segment turns it fully **on**, matching the
1365
- * everywhere-else convention (and `toggleFlagInRange`'s rule for a
1366
- * partially-styled text range) that a mixed toggle resolves toward
1367
- * the affirmative rather than clearing.
1368
- */
1369
- mixedValues?: readonly V[];
1370
- onChange: (next: V[]) => void;
1371
- });
1372
- /**
1373
- * Segmented control for choosing among a fixed set of values — one of them
1374
- * (`mode: 'single'`, the default) or any number (`mode: 'multiple'`).
1375
- *
1376
- * Single mode ignores a click on the already-selected segment unless
1377
- * `allowDeselect` is set. Arrow keys move focus without changing the value;
1378
- * Space and Enter commit.
1379
- */
1380
- declare function ToggleBar<V extends string | number = string>(props: ToggleBarProps<V>): ReactElement;
1381
-
1382
1277
  /**
1383
1278
  * One segment of an {@link OptionsBar}. Unlike `ToggleBar`, each item carries
1384
1279
  * its own selected state and its own `onChange`.
@@ -1974,12 +1869,12 @@ type SelectOption = {
1974
1869
  */
1975
1870
  textValue?: string;
1976
1871
  };
1977
- type Key$1 = string | number;
1872
+ type Key$2 = string | number;
1978
1873
  /**
1979
1874
  * Props for {@link Select}, on top of React Aria's `Select` props, with the
1980
1875
  * selection key narrowed to the option value type.
1981
1876
  */
1982
- 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'> & {
1983
1878
  label?: ReactNode;
1984
1879
  description?: ReactNode;
1985
1880
  errorMessage?: ReactNode | ((v: ValidationResult) => ReactNode);
@@ -2008,7 +1903,7 @@ type SelectProps<T extends Key$1 = string> = Omit<SelectProps$1<object>, 'childr
2008
1903
  * The selection key type is parameterized so consumers with a string-literal
2009
1904
  * union for `value` (e.g. `'r' | 'g' | 'b'`) get a typed `onSelectionChange`.
2010
1905
  */
2011
- 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;
2012
1907
  /** Props for {@link SelectItem}, on top of React Aria's `ListBoxItem` props. */
2013
1908
  type SelectItemProps = Omit<ListBoxItemProps, 'className' | 'children'> & {
2014
1909
  children?: ReactNode;
@@ -2021,6 +1916,33 @@ type SelectItemProps = Omit<ListBoxItemProps, 'className' | 'children'> & {
2021
1916
  */
2022
1917
  declare function SelectItem({ children, className, textValue, ...rest }: SelectItemProps): react_jsx_runtime.JSX.Element;
2023
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
+
2024
1946
  /**
2025
1947
  * One option in a {@link ComboBox}'s `options` list. `textValue` is the
2026
1948
  * plain-text form used for filtering and screen readers, needed only when
@@ -2032,12 +1954,29 @@ type ComboBoxOption = {
2032
1954
  textValue?: string;
2033
1955
  isDisabled?: boolean;
2034
1956
  };
2035
- 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
+ };
2036
1975
  /**
2037
1976
  * Props for {@link ComboBox}, on top of React Aria's `ComboBox` props, with
2038
1977
  * the selection key narrowed to the option value type.
2039
1978
  */
2040
- 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'> & {
2041
1980
  label?: ReactNode;
2042
1981
  description?: ReactNode;
2043
1982
  errorMessage?: ReactNode | ((v: ValidationResult) => ReactNode);
@@ -2050,6 +1989,25 @@ type ComboBoxProps<T extends Key = string> = Omit<ComboBoxProps$1<object>, 'chil
2050
1989
  defaultSelectedKey?: T;
2051
1990
  onSelectionChange?: (key: T | null) => void;
2052
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;
2053
2011
  /**
2054
2012
  * `'fill'` (the default) takes the width of whatever row the combo box sits
2055
2013
  * in. `'fit'` sizes the input to its widest option, so it neither swallows a
@@ -2063,7 +2021,7 @@ type ComboBoxProps<T extends Key = string> = Omit<ComboBoxProps$1<object>, 'chil
2063
2021
  * type to filter; selection commits to `onSelectionChange`. When no value
2064
2022
  * is in the input, selection clears (key becomes null).
2065
2023
  */
2066
- 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;
2067
2025
  /** Props for {@link ComboBoxItem}, on top of React Aria's `ListBoxItem` props. */
2068
2026
  type ComboBoxItemProps = Omit<ListBoxItemProps, 'className'> & {
2069
2027
  className?: string;
@@ -2085,6 +2043,11 @@ type RangeSliderProps = Omit<SliderProps$1, 'children' | 'className'> & {
2085
2043
  * Linear range slider on React Aria. Single-value by default; pass an array
2086
2044
  * to `value` / `defaultValue` for multi-thumb. Distinct from `Slider`, which
2087
2045
  * is fully controlled and gives each thumb its own bounds and readout.
2046
+ *
2047
+ * The root is a column flex container and the track stretches to it, so
2048
+ * `align-items` on the root or on a wrapper that replaces it governs the
2049
+ * *horizontal* axis here and collapses the track to its content width. Style
2050
+ * the wrapper around one, not the root.
2088
2051
  */
2089
2052
  declare function RangeSlider(props: RangeSliderProps): react_jsx_runtime.JSX.Element;
2090
2053
 
@@ -2187,6 +2150,20 @@ interface Point {
2187
2150
  y: number;
2188
2151
  }
2189
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
+
2190
2167
  /** Background grid configuration for a {@link Plot2D}. */
2191
2168
  interface GridSettings {
2192
2169
  /** Number of evenly-spaced internal grid lines per axis (excluding
@@ -2200,6 +2177,33 @@ interface AxesSettings {
2200
2177
  /** Stroke color override. When omitted, uses `var(--plot-axis)`. */
2201
2178
  color?: string;
2202
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
+ }
2203
2207
  /** A pointer position given in both of the plot's coordinate systems. */
2204
2208
  interface Plot2DCoords {
2205
2209
  plot: Point;
@@ -2219,8 +2223,16 @@ interface Plot2DProps {
2219
2223
  /** Axis lines. `false` / `null` = no axes. Omitted = default-styled
2220
2224
  * axes (on). Pass AxesSettings to customize. */
2221
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;
2222
2230
  /** Forwarded to the underlying svg. Consumer opts into focus this way. */
2223
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;
2224
2236
  className?: string;
2225
2237
  style?: CSSProperties;
2226
2238
  /** Pointer down on the SVG. Receives both plot- and model-space coords
@@ -2253,8 +2265,8 @@ interface Plot2DHandle {
2253
2265
  readonly height: number;
2254
2266
  }
2255
2267
  /**
2256
- * An SVG plotting surface with an optional grid and axes. It draws the frame
2257
- * 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
2258
2270
  * whatever children are passed, positioned in plot space.
2259
2271
  */
2260
2272
  declare const Plot2D: react.ForwardRefExoticComponent<Plot2DProps & react.RefAttributes<Plot2DHandle>>;
@@ -2347,6 +2359,8 @@ interface CurveEditorProps {
2347
2359
  height: number;
2348
2360
  grid?: GridSettings | false | null;
2349
2361
  axes?: AxesSettings | false | null;
2362
+ xTicks?: TickSettings | false | null;
2363
+ yTicks?: TickSettings | false | null;
2350
2364
  curve?: CurveSettings | false | null;
2351
2365
  fill?: FillSettings | false | null;
2352
2366
  hideNonInteractive?: boolean;
@@ -2388,6 +2402,8 @@ interface PointPlotterProps {
2388
2402
  height: number;
2389
2403
  grid?: GridSettings | false | null;
2390
2404
  axes?: AxesSettings | false | null;
2405
+ xTicks?: TickSettings | false | null;
2406
+ yTicks?: TickSettings | false | null;
2391
2407
  /** Minimum allowed point count. User-initiated deletion is refused
2392
2408
  * while `value.length <= minPoints`. */
2393
2409
  minPoints?: number;
@@ -2472,6 +2488,42 @@ declare function oklchToHex(L: number, C: number, Hdeg: number): string;
2472
2488
  /** Evaluates a {@link ChromaCurve} at a lightness, clamping outside its range. */
2473
2489
  declare function chromaAt(L: number, curve: ChromaCurve): number;
2474
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
+
2475
2527
  /** One row in a reorderable list. */
2476
2528
  interface LayerListItem {
2477
2529
  id: string;
@@ -2615,5 +2667,5 @@ declare const MINUS_SIGN = "\u2212";
2615
2667
  */
2616
2668
  declare function formatNumber(value: number, options?: Intl.NumberFormatOptions): string;
2617
2669
 
2618
- 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 };
2619
- 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-MHAGC6VD.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-QAGAHJKZ.js';
2
- export { FpsMeter, ScaleIndicator, StatusBar, Toolbar, ZoomControl } from '../chunk-2RQPGOQF.js';
3
- import '../chunk-SBXNQW4G.js';
4
- import '../chunk-MHAGC6VD.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 };