@weasel-js/labkit 1.5.1 → 1.6.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 (160) hide show
  1. package/README.md +3 -7
  2. package/dist/_dts/{CanvasStackContext-CJNMS6mz.d.ts → CanvasStackContext-DQgcH1ny.d.ts} +1 -1
  3. package/dist/_dts/LayerList.d-2c9yup5Y.d.ts +83 -0
  4. package/dist/_dts/{PrefsForm.d-DPy9I8It.d.ts → PrefsRow.d-DFpPIeIC.d.ts} +16 -1
  5. package/dist/_dts/{Select.d-Gwr8fLpK.d.ts → Select.d-BchGMC2Y.d.ts} +129 -12
  6. package/dist/_dts/{frac-B4okC2lX.d.ts → frac-DTRq7Xpb.d.ts} +31 -13
  7. package/dist/_dts/inDialog-D5ZKGjiD.d.ts +23 -0
  8. package/dist/_dts/{index-CSJoj4LC.d.ts → index-B0--8PEM.d.ts} +5 -4
  9. package/dist/_dts/index-DINmCuLA.d.ts +453 -0
  10. package/dist/_dts/number.d-OeQYQoUO.d.ts +28 -0
  11. package/dist/_dts/{types-DzoNY1pO.d.ts → types-B7y8hX1D.d.ts} +6 -6
  12. package/dist/_dts/{usePanZoom-Pzf9f2jh.d.ts → usePanZoom-Bq73pwFe.d.ts} +4 -47
  13. package/dist/_dts/{useTrialState-uLlmaccn.d.ts → useTrialState-CP4jfuKl.d.ts} +1 -1
  14. package/dist/canvas/index.d.ts +6 -5
  15. package/dist/canvas/index.js +1 -1
  16. package/dist/chrome/index.d.ts +5 -4
  17. package/dist/chrome/index.js +7 -7
  18. package/dist/chunk-2RVCB2PT.js +3 -0
  19. package/dist/chunk-2RVCB2PT.js.map +1 -0
  20. package/dist/{chunk-UN4U4P63.js → chunk-3FI7Y4R4.js} +9 -9
  21. package/dist/chunk-3FI7Y4R4.js.map +1 -0
  22. package/dist/{chunk-7PFH3CNM.js → chunk-AWH3SRPW.js} +31 -5
  23. package/dist/chunk-AWH3SRPW.js.map +1 -0
  24. package/dist/{chunk-ZDHY47EV.js → chunk-BVL7Y574.js} +25 -9
  25. package/dist/chunk-BVL7Y574.js.map +1 -0
  26. package/dist/{chunk-IHUVQ3TX.js → chunk-H5VIV7MQ.js} +31 -27
  27. package/dist/chunk-H5VIV7MQ.js.map +1 -0
  28. package/dist/chunk-HFRE4QQV.js +400 -0
  29. package/dist/chunk-HFRE4QQV.js.map +1 -0
  30. package/dist/{chunk-IXTQI7JX.js → chunk-MOLIUNVH.js} +4 -4
  31. package/dist/{chunk-IXTQI7JX.js.map → chunk-MOLIUNVH.js.map} +1 -1
  32. package/dist/{chunk-CEIUBPPW.js → chunk-TT5C5S6R.js} +3 -86
  33. package/dist/chunk-TT5C5S6R.js.map +1 -0
  34. package/dist/chunk-USO6TERP.js +90 -0
  35. package/dist/chunk-USO6TERP.js.map +1 -0
  36. package/dist/{chunk-PHK4W562.js → chunk-VQ47KWD5.js} +3 -3
  37. package/dist/{chunk-PHK4W562.js.map → chunk-VQ47KWD5.js.map} +1 -1
  38. package/dist/chunk-WUJXJC5O.js +14568 -0
  39. package/dist/chunk-WUJXJC5O.js.map +1 -0
  40. package/dist/{chunk-EHGVROVV.js → chunk-ZORVNOKX.js} +6 -25
  41. package/dist/chunk-ZORVNOKX.js.map +1 -0
  42. package/dist/config/index.d.ts +53 -11
  43. package/dist/config/index.js +5 -5
  44. package/dist/controls/index.d.ts +6 -3
  45. package/dist/controls/index.js +4 -4
  46. package/dist/dragdrop/index.d.ts +4 -3
  47. package/dist/index.d.ts +139 -114
  48. package/dist/index.js +470 -479
  49. package/dist/index.js.map +1 -1
  50. package/dist/layers/index.d.ts +6 -35
  51. package/dist/layers/index.js +2 -3
  52. package/dist/loupe/index.d.ts +6 -5
  53. package/dist/passthrough/weasel-ui.d.ts +421 -215
  54. package/dist/passthrough/weasel-ui.js +1 -1
  55. package/dist/primitives/index.d.ts +2 -13
  56. package/dist/primitives/index.js +4 -4
  57. package/dist/state/index.d.ts +6 -5
  58. package/dist/state/index.js +5 -5
  59. package/dist/styles.css +410 -190
  60. package/dist/undo/index.d.ts +4 -3
  61. package/package.json +9 -13
  62. package/src/annotations/frac.test.ts +7 -0
  63. package/src/annotations/paint.test.ts +21 -0
  64. package/src/annotations/paint.ts +12 -0
  65. package/src/annotations/store.test.ts +31 -0
  66. package/src/annotations/types.ts +3 -2
  67. package/src/canvas/Stage.test.tsx +18 -0
  68. package/src/canvas/index.ts +0 -9
  69. package/src/chrome/labTypes.ts +1 -1
  70. package/src/chrome/regions/PaletteRegion.test.tsx +18 -0
  71. package/src/chrome/regions/PaletteRegion.tsx +5 -4
  72. package/src/chrome/regions/SidebarRegion.less +197 -0
  73. package/src/chrome/regions/SidebarRegion.test.tsx +20 -0
  74. package/src/chrome/regions/SidebarRegion.tsx +7 -2
  75. package/src/chrome/regions/TitleBarRegion.tsx +1 -1
  76. package/src/chrome/types.ts +13 -4
  77. package/src/config/autoConfig.ts +2 -2
  78. package/src/config/builder.ts +23 -5
  79. package/src/config/entry.test.ts +8 -0
  80. package/src/config/index.ts +2 -0
  81. package/src/config/rules.ts +2 -0
  82. package/src/config/sectionTree.test.ts +146 -0
  83. package/src/config/sectionTree.ts +124 -0
  84. package/src/config/types.ts +4 -4
  85. package/src/controls/AutoControls.stories.tsx +6 -6
  86. package/src/controls/ControlPanel.less +27 -0
  87. package/src/controls/ControlPanel.stories.tsx +95 -1
  88. package/src/controls/ControlPanel.test.tsx +82 -112
  89. package/src/controls/ControlPanel.tsx +159 -396
  90. package/src/controls/inDialog.test.tsx +82 -0
  91. package/src/controls/inDialog.tsx +46 -0
  92. package/src/controls/index.ts +1 -0
  93. package/src/index.test.ts +0 -2
  94. package/src/index.ts +14 -35
  95. package/src/instrument/types.ts +5 -2
  96. package/src/lab/Lab.nebula.test.tsx +31 -0
  97. package/src/lab/Lab.tsx +57 -18
  98. package/src/lab/LabBoundary.test.tsx +66 -0
  99. package/src/lab/LabBoundary.tsx +56 -0
  100. package/src/lab/LabHeader.tsx +4 -23
  101. package/src/lab/LabRoot.tsx +2 -3
  102. package/src/lab/LabShell.less +0 -1
  103. package/src/lab/LabShell.stories.tsx +15 -0
  104. package/src/lab/LabShell.test.tsx +18 -0
  105. package/src/lab/LabShell.tsx +14 -1
  106. package/src/lab/LabSwitcher.less +1 -1
  107. package/src/lab/LabSwitcher.test.tsx +41 -0
  108. package/src/lab/LabSwitcher.tsx +30 -8
  109. package/src/lab/index.ts +1 -0
  110. package/src/layers/AGENTS.md +18 -74
  111. package/src/layers/index.ts +4 -2
  112. package/src/passthrough/weasel-ui.ts +25 -10
  113. package/src/primitives/FpsMeter.less +6 -1
  114. package/src/primitives/FpsMeter.test.tsx +12 -4
  115. package/src/primitives/FpsMeter.tsx +6 -1
  116. package/src/primitives/JobProgress.stories.tsx +1 -1
  117. package/src/primitives/StatusBar.less +6 -0
  118. package/src/primitives/index.ts +0 -2
  119. package/src/specimen/Specimen.tsx +42 -56
  120. package/src/state/types.ts +8 -2
  121. package/src/state/view.test.ts +4 -4
  122. package/src/styles.less +4 -2
  123. package/src/theme/Interstellar.stories.tsx +8 -9
  124. package/src/theme/base.less +3 -20
  125. package/src/theme/interstellar.test.ts +6 -3
  126. package/src/theme/interstellar.theme.json +0 -56
  127. package/src/theme/interstellar.ts +2 -2
  128. package/src/trial/Trial.canvas.test.tsx +9 -5
  129. package/src/trial/Trial.config.test.tsx +1 -1
  130. package/src/trial/Trial.tsx +30 -8
  131. package/dist/_dts/index-BNdz-tNd.d.ts +0 -423
  132. package/dist/chunk-7PFH3CNM.js.map +0 -1
  133. package/dist/chunk-CEIUBPPW.js.map +0 -1
  134. package/dist/chunk-EH7UEQV7.js +0 -590
  135. package/dist/chunk-EH7UEQV7.js.map +0 -1
  136. package/dist/chunk-EHGVROVV.js.map +0 -1
  137. package/dist/chunk-IHUVQ3TX.js.map +0 -1
  138. package/dist/chunk-MDVTK5U3.js +0 -170
  139. package/dist/chunk-MDVTK5U3.js.map +0 -1
  140. package/dist/chunk-PJ7WEQBJ.js +0 -18
  141. package/dist/chunk-PJ7WEQBJ.js.map +0 -1
  142. package/dist/chunk-T3EC2DXD.js +0 -12628
  143. package/dist/chunk-T3EC2DXD.js.map +0 -1
  144. package/dist/chunk-UN4U4P63.js.map +0 -1
  145. package/dist/chunk-ZDHY47EV.js.map +0 -1
  146. package/dist/ui/layers/index.d.ts +0 -66
  147. package/dist/ui/layers/index.js +0 -3
  148. package/dist/ui/layers/index.js.map +0 -1
  149. package/src/canvas/useOrbit.test.ts +0 -167
  150. package/src/canvas/useOrbit.ts +0 -156
  151. package/src/lab/useSystemMode.ts +0 -30
  152. package/src/layers/LayerList.less +0 -93
  153. package/src/layers/LayerList.stories.tsx +0 -66
  154. package/src/layers/LayerList.test.tsx +0 -232
  155. package/src/layers/LayerList.tsx +0 -268
  156. package/src/primitives/Sidebar.less +0 -112
  157. package/src/primitives/Sidebar.stories.tsx +0 -38
  158. package/src/primitives/Sidebar.test.tsx +0 -74
  159. package/src/primitives/Sidebar.tsx +0 -35
  160. package/src/ui/layers/index.ts +0 -5
@@ -1,4 +1,4 @@
1
1
  import '../chunk-SBXNQW4G.js';
2
- export { m as ActionBar, r8 as ActionsBar, Lt as Badge, a5 as Button, g3 as Callout, l8 as CalloutTrigger, o2 as Checkbox, y2 as ComboBox, S3 as ComboBoxItem, L2 as CurveEditor, s2 as DataGrid, l5 as Dialog, r6 as Disclosure, i3 as DisclosureRow, n4 as DragHandleGlyph, Je as EDGE_PROFILES, n2 as Field, t as ICON_PATHS, o as Icon, u2 as Input, s3 as KeyCap, c3 as KeySequence, c4 as LayerStack, e as MINUS_SIGN, l7 as MenuButton, g2 as NumberField, r7 as OptionsBar, w2 as Plot2D, n8 as PointPlotter, r10 as Powerline, u3 as Radio, l3 as RadioGroup, l4 as RangeSlider, g as Select, b3 as SelectItem, n5 as Sidebar, s4 as SidebarPanel, b2 as Slider, a4 as Switch, c6 as Tab, s5 as TabList, l6 as TabPanel, o5 as Tabs, r3 as ToggleBar, o4 as ToolButton, n7 as ToolGroup, _2 as ToolPalette, Ar as chromaAt, u4 as detectPlatform, a as dlog, r4 as fieldClasses, t2 as formatNumber, d2 as formatShortcut, u5 as formatShortcutParts, o3 as inferKeycapKind, i as isDebugEnabled, n3 as isPrefLeaf, e3 as keyGlyph, p2 as keySpecFromKey, d as keySpecsFromMods, kr as oklchToHex, v2 as paintGradientTrack, r5 as prefValueAtPath, jr as useAsyncOptions, s as useReorderDragList, a3 as useRovingTabIndex, i2 as visiblePrefSubtree } from '../chunk-T3EC2DXD.js';
2
+ export { v as ActionBar, Ht as Badge, c as Button, a7 as ButtonBar, g2 as Callout, u6 as CalloutTrigger, o2 as Checkbox, s3 as ColorModeControl, y2 as ComboBox, S3 as ComboBoxItem, L as CurveEditor, f as DataGrid, u3 as Dialog, i3 as Disclosure, r as DisclosureMark, a2 as DisclosureRow, a3 as DragGhost, n4 as DragHandleGlyph, Qe as EDGE_PROFILES, n5 as Field, n as ICON_PATHS, l as Icon, u4 as Input, f2 as KeyCap, p as KeySequence, D as LayerList, s2 as ListEditor, e2 as MINUS_SIGN, d2 as MenuButton, g as NumberField, r3 as OptionsBar, w as Plot2D, n9 as PointPlotter, r4 as Powerline, F2 as PrefsDialog, A2 as PrefsForm, u5 as Radio, l5 as RadioGroup, l8 as RangeSlider, T2 as Select, L2 as SelectItem, n6 as Sidebar, s5 as SidebarPanel, b as Slider, a6 as Switch, c5 as Tab, s6 as TabList, l7 as TabPanel, o4 as Tabs, a5 as ToggleBar, o3 as ToolButton, n8 as ToolGroup, h as ToolPalette, Z2 as chromaAt, o as detectPlatform, a as dlog, r2 as fieldClasses, t2 as formatNumber, n2 as formatShortcut, t as formatShortcutParts, d as inferKeycapKind, i as isDebugEnabled, s4 as isPrefLeaf, e as keyGlyph, l3 as keySpecFromKey, s as keySpecsFromMods, m2 as keySpecsFromShortcut, S2 as moveLayers, X2 as oklchToHex, v2 as paintGradientTrack, c2 as prefValueAtPath, wi as useAsyncOptions, u2 as useReorderDragList, a4 as useRovingTabIndex, l6 as visiblePrefSubtree } from '../chunk-WUJXJC5O.js';
3
3
  //# sourceMappingURL=weasel-ui.js.map
4
4
  //# sourceMappingURL=weasel-ui.js.map
@@ -75,17 +75,6 @@ interface ScaleIndicatorProps {
75
75
  * unless one is passed. */
76
76
  declare function ScaleIndicator({ zoom, pixelsPerUnit, unit, targetWidth, }: ScaleIndicatorProps): react_jsx_runtime.JSX.Element;
77
77
 
78
- /** Props for `<Sidebar>`. */
79
- interface SidebarProps {
80
- children: ReactNode;
81
- title?: string;
82
- collapsed?: boolean;
83
- onToggle?: () => void;
84
- }
85
- /** A collapsible side panel with an optional title. Collapse state is the
86
- * caller's to hold. */
87
- declare function Sidebar({ children, title, collapsed, onToggle }: SidebarProps): react_jsx_runtime.JSX.Element;
88
-
89
78
  /** Props for `<Split>`. */
90
79
  interface SplitProps {
91
80
  /** The sidebar pane's contents. */
@@ -211,5 +200,5 @@ interface ZoomControlProps {
211
200
  * only the continuous part. */
212
201
  declare function ZoomControl({ zoom, onZoomChange, onZoomCommit, min: minProp, max: maxProp, className, }: ZoomControlProps): react_jsx_runtime.JSX.Element;
213
202
 
214
- export { FloatingPanel, FpsMeter, JobProgress, Legend, ScaleIndicator, Sidebar, Split, StatusBar, Toolbar, ZoomControl };
215
- export type { FloatingPanelProps, JobProgressProps, LegendEntry, LegendMark, LegendProps, ScaleIndicatorProps, SidebarProps, SplitProps, StatusBarProps, StatusBarSectionProps, ToolbarButtonProps, ToolbarGroupProps, ToolbarProps, ZoomControlProps };
203
+ export { FloatingPanel, FpsMeter, JobProgress, Legend, ScaleIndicator, Split, StatusBar, Toolbar, ZoomControl };
204
+ export type { FloatingPanelProps, JobProgressProps, LegendEntry, LegendMark, LegendProps, ScaleIndicatorProps, SplitProps, StatusBarProps, StatusBarSectionProps, ToolbarButtonProps, ToolbarGroupProps, ToolbarProps, ZoomControlProps };
@@ -1,9 +1,9 @@
1
- export { FloatingPanel, JobProgress, Legend, Sidebar, Split } from '../chunk-EHGVROVV.js';
2
- export { FpsMeter, ScaleIndicator, StatusBar, Toolbar, ZoomControl } from '../chunk-UN4U4P63.js';
1
+ export { FloatingPanel, JobProgress, Legend, Split } from '../chunk-ZORVNOKX.js';
2
+ export { FpsMeter, ScaleIndicator, StatusBar, Toolbar, ZoomControl } from '../chunk-3FI7Y4R4.js';
3
+ import '../chunk-SBXNQW4G.js';
3
4
  import '../chunk-RWNDDKOH.js';
4
5
  import '../chunk-CQLQPQ4P.js';
5
6
  import '../chunk-2YILQ7Y5.js';
6
- import '../chunk-SBXNQW4G.js';
7
- import '../chunk-T3EC2DXD.js';
7
+ import '../chunk-WUJXJC5O.js';
8
8
  //# sourceMappingURL=index.js.map
9
9
  //# sourceMappingURL=index.js.map
@@ -1,12 +1,13 @@
1
- export { C as CURRENT_DOCUMENT_VERSION, I as IndexedDbAdapterOptions, L as LabStore, a as LabStoreActions, b as LabStoreContext, c as LabStoreProvider, O as OpenLabStoreOptions, d as OpenedLabStore, P as PersistedStateOptions, e as Persistence, f as PersistenceProps, R as RecordCache, g as RecordChange, T as TrialIdContext, h as TrialIdProvider, i as createIndexedDbAdapter, j as createLabStore, k as createMemoryAdapter, l as indexedDbAdapter, m as labDocumentKey, n as localStorageAdapter, o as noneAdapter, p as openLabStore, q as quarantineKey, s as sessionStorageAdapter, u as urlHashAdapter, r as useLabStore, t as usePersistedState, v as useTrialId, w as useTrialState } from '../_dts/useTrialState-uLlmaccn.js';
2
- import { S as SerializedTrial, I as InstrumentSerializers, T as TrialRecord, U as UndoStack, c as StorageAdapter } from '../_dts/frac-B4okC2lX.js';
3
- export { C as CreateLabStoreOptions, L as LabDocument, d as LabStoreState, M as Migration, e as SavedSnapshot, f as StorageChange, g as TrialStateHandle, h as UndockedPanel, i as UndockedPanels, j as dockPanel, p as panelKey, u as undockPanel } from '../_dts/frac-B4okC2lX.js';
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-CP4jfuKl.js';
2
+ import { S as SerializedTrial, I as InstrumentSerializers, T as TrialRecord, U as UndoStack, d as StorageAdapter } from '../_dts/frac-DTRq7Xpb.js';
3
+ export { C as CreateLabStoreOptions, e as LabDocument, f as LabStoreState, M as Migration, g as SavedSnapshot, h as StorageChange, i as TrialStateHandle, j as UndockedPanel, k as UndockedPanels, l as dockPanel, p as panelKey, u as undockPanel } from '../_dts/frac-DTRq7Xpb.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-DzoNY1pO.js';
7
+ import '../_dts/PrefsRow.d-DFpPIeIC.js';
8
+ import '@weasel-js/theme';
8
9
  import '@weasel-js/core';
9
- import '../_dts/PrefsForm.d-DPy9I8It.js';
10
+ import '../_dts/types-B7y8hX1D.js';
10
11
  import '../_dts/types-DJ79Tg5J.js';
11
12
 
12
13
  /** The storage key a lab writes one of its buckets under. Namespaced by
@@ -1,12 +1,12 @@
1
- import { openLabStore } from '../chunk-IXTQI7JX.js';
2
- export { CURRENT_DOCUMENT_VERSION, createLabStore, dockPanel, labDocumentKey, openLabStore, panelKey, quarantineKey, undockPanel, useTrialState } from '../chunk-IXTQI7JX.js';
1
+ import { openLabStore } from '../chunk-MOLIUNVH.js';
2
+ export { CURRENT_DOCUMENT_VERSION, createLabStore, dockPanel, labDocumentKey, openLabStore, panelKey, quarantineKey, undockPanel, useTrialState } from '../chunk-MOLIUNVH.js';
3
3
  import { useWarnIgnoredChange, useOpenOnce, defaultStorage, PersistenceContext } from '../chunk-RWNDDKOH.js';
4
4
  export { Persistence, createIndexedDbAdapter, createMemoryAdapter, decodeUrlHash, deserializeTrials, emptyUndoStack, encodeUrlHash, indexedDbAdapter, labStorageKey, localStorageAdapter, noneAdapter, serializeTrials, sessionStorageAdapter, urlHashAdapter, usePersistedState } from '../chunk-RWNDDKOH.js';
5
- import '../chunk-ZDHY47EV.js';
6
- import '../chunk-7PFH3CNM.js';
5
+ import '../chunk-BVL7Y574.js';
6
+ import '../chunk-AWH3SRPW.js';
7
7
  import { LabStoreProvider, TrialIdProvider } from '../chunk-2YILQ7Y5.js';
8
8
  export { LabStoreContext, LabStoreProvider, TrialIdContext, TrialIdProvider, useLabStore, useTrialId } from '../chunk-2YILQ7Y5.js';
9
- import '../chunk-T3EC2DXD.js';
9
+ import '../chunk-WUJXJC5O.js';
10
10
  import { jsx, Fragment } from 'react/jsx-runtime';
11
11
 
12
12
  var SINGLETON_INSTRUMENT = "__singleton__";