@weasel-js/labkit 1.5.2 → 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 (139) hide show
  1. package/README.md +3 -7
  2. package/dist/_dts/{CanvasStackContext-CMMo180l.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-ZTiwzYyT.d.ts → Select.d-BchGMC2Y.d.ts} +102 -11
  6. package/dist/_dts/{frac-B4hFJMiN.d.ts → frac-DTRq7Xpb.d.ts} +18 -10
  7. package/dist/_dts/inDialog-D5ZKGjiD.d.ts +23 -0
  8. package/dist/_dts/{index-DlKolEIZ.d.ts → index-B0--8PEM.d.ts} +2 -2
  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-Db-3NNk1.d.ts → types-B7y8hX1D.d.ts} +2 -2
  12. package/dist/_dts/{usePanZoom-SSTZe410.d.ts → usePanZoom-Bq73pwFe.d.ts} +2 -2
  13. package/dist/_dts/{useTrialState-pnAE-UBD.d.ts → useTrialState-CP4jfuKl.d.ts} +1 -1
  14. package/dist/canvas/index.d.ts +6 -5
  15. package/dist/chrome/index.d.ts +5 -4
  16. package/dist/chrome/index.js +7 -7
  17. package/dist/chunk-2RVCB2PT.js +3 -0
  18. package/dist/chunk-2RVCB2PT.js.map +1 -0
  19. package/dist/{chunk-753Y6HE6.js → chunk-3FI7Y4R4.js} +4 -4
  20. package/dist/chunk-3FI7Y4R4.js.map +1 -0
  21. package/dist/{chunk-REOBGYMC.js → chunk-AWH3SRPW.js} +31 -5
  22. package/dist/chunk-AWH3SRPW.js.map +1 -0
  23. package/dist/{chunk-A2ACAGW6.js → chunk-BVL7Y574.js} +22 -5
  24. package/dist/chunk-BVL7Y574.js.map +1 -0
  25. package/dist/{chunk-CKUKF72R.js → chunk-H5VIV7MQ.js} +26 -22
  26. package/dist/chunk-H5VIV7MQ.js.map +1 -0
  27. package/dist/chunk-HFRE4QQV.js +400 -0
  28. package/dist/chunk-HFRE4QQV.js.map +1 -0
  29. package/dist/{chunk-LRI3MBGR.js → chunk-MOLIUNVH.js} +4 -4
  30. package/dist/{chunk-LRI3MBGR.js.map → chunk-MOLIUNVH.js.map} +1 -1
  31. package/dist/chunk-USO6TERP.js +90 -0
  32. package/dist/chunk-USO6TERP.js.map +1 -0
  33. package/dist/{chunk-EMXAIRUJ.js → chunk-VQ47KWD5.js} +3 -3
  34. package/dist/{chunk-EMXAIRUJ.js.map → chunk-VQ47KWD5.js.map} +1 -1
  35. package/dist/chunk-WUJXJC5O.js +14568 -0
  36. package/dist/chunk-WUJXJC5O.js.map +1 -0
  37. package/dist/{chunk-KJCUERQF.js → chunk-ZORVNOKX.js} +6 -25
  38. package/dist/chunk-ZORVNOKX.js.map +1 -0
  39. package/dist/config/index.d.ts +50 -7
  40. package/dist/config/index.js +5 -5
  41. package/dist/controls/index.d.ts +6 -3
  42. package/dist/controls/index.js +4 -4
  43. package/dist/dragdrop/index.d.ts +4 -3
  44. package/dist/index.d.ts +83 -102
  45. package/dist/index.js +430 -458
  46. package/dist/index.js.map +1 -1
  47. package/dist/layers/index.d.ts +6 -35
  48. package/dist/layers/index.js +2 -3
  49. package/dist/loupe/index.d.ts +6 -5
  50. package/dist/passthrough/weasel-ui.d.ts +407 -204
  51. package/dist/passthrough/weasel-ui.js +1 -1
  52. package/dist/primitives/index.d.ts +2 -13
  53. package/dist/primitives/index.js +4 -4
  54. package/dist/state/index.d.ts +6 -5
  55. package/dist/state/index.js +5 -5
  56. package/dist/styles.css +298 -174
  57. package/dist/undo/index.d.ts +4 -3
  58. package/package.json +9 -13
  59. package/src/annotations/frac.test.ts +7 -0
  60. package/src/annotations/paint.test.ts +21 -0
  61. package/src/annotations/paint.ts +12 -0
  62. package/src/annotations/store.test.ts +31 -0
  63. package/src/annotations/types.ts +3 -2
  64. package/src/canvas/Stage.test.tsx +18 -0
  65. package/src/chrome/regions/SidebarRegion.less +197 -0
  66. package/src/chrome/regions/SidebarRegion.test.tsx +20 -0
  67. package/src/chrome/regions/SidebarRegion.tsx +7 -2
  68. package/src/chrome/types.ts +5 -2
  69. package/src/config/autoConfig.ts +2 -2
  70. package/src/config/builder.ts +20 -1
  71. package/src/config/entry.test.ts +8 -0
  72. package/src/config/index.ts +2 -0
  73. package/src/config/rules.ts +2 -0
  74. package/src/config/sectionTree.test.ts +146 -0
  75. package/src/config/sectionTree.ts +124 -0
  76. package/src/controls/ControlPanel.less +4 -0
  77. package/src/controls/ControlPanel.stories.tsx +55 -2
  78. package/src/controls/ControlPanel.test.tsx +30 -3
  79. package/src/controls/ControlPanel.tsx +116 -337
  80. package/src/controls/inDialog.test.tsx +82 -0
  81. package/src/controls/inDialog.tsx +46 -0
  82. package/src/controls/index.ts +1 -0
  83. package/src/index.ts +11 -26
  84. package/src/instrument/types.ts +5 -2
  85. package/src/lab/Lab.nebula.test.tsx +31 -0
  86. package/src/lab/Lab.tsx +38 -15
  87. package/src/lab/LabBoundary.test.tsx +66 -0
  88. package/src/lab/LabBoundary.tsx +56 -0
  89. package/src/lab/LabHeader.tsx +4 -23
  90. package/src/lab/LabRoot.tsx +2 -3
  91. package/src/lab/LabShell.less +0 -1
  92. package/src/lab/LabShell.stories.tsx +15 -0
  93. package/src/lab/LabShell.test.tsx +18 -0
  94. package/src/lab/LabShell.tsx +14 -1
  95. package/src/lab/LabSwitcher.less +1 -1
  96. package/src/lab/LabSwitcher.test.tsx +41 -0
  97. package/src/lab/LabSwitcher.tsx +30 -8
  98. package/src/lab/index.ts +1 -0
  99. package/src/layers/AGENTS.md +18 -74
  100. package/src/layers/index.ts +4 -2
  101. package/src/passthrough/weasel-ui.ts +25 -10
  102. package/src/primitives/index.ts +0 -2
  103. package/src/specimen/Specimen.tsx +42 -56
  104. package/src/state/types.ts +2 -1
  105. package/src/styles.less +4 -2
  106. package/src/theme/Interstellar.stories.tsx +8 -9
  107. package/src/theme/base.less +3 -20
  108. package/src/theme/interstellar.test.ts +6 -3
  109. package/src/theme/interstellar.theme.json +0 -56
  110. package/src/theme/interstellar.ts +2 -2
  111. package/src/trial/Trial.canvas.test.tsx +1 -1
  112. package/src/trial/Trial.tsx +30 -8
  113. package/dist/_dts/index-8LiKe3A-.d.ts +0 -410
  114. package/dist/chunk-6BUQ77ZV.js +0 -18
  115. package/dist/chunk-6BUQ77ZV.js.map +0 -1
  116. package/dist/chunk-753Y6HE6.js.map +0 -1
  117. package/dist/chunk-A2ACAGW6.js.map +0 -1
  118. package/dist/chunk-CKUKF72R.js.map +0 -1
  119. package/dist/chunk-D35PFTS7.js +0 -170
  120. package/dist/chunk-D35PFTS7.js.map +0 -1
  121. package/dist/chunk-FKLT3ITC.js +0 -590
  122. package/dist/chunk-FKLT3ITC.js.map +0 -1
  123. package/dist/chunk-KJCUERQF.js.map +0 -1
  124. package/dist/chunk-LASCBWW7.js +0 -13456
  125. package/dist/chunk-LASCBWW7.js.map +0 -1
  126. package/dist/chunk-REOBGYMC.js.map +0 -1
  127. package/dist/ui/layers/index.d.ts +0 -66
  128. package/dist/ui/layers/index.js +0 -3
  129. package/dist/ui/layers/index.js.map +0 -1
  130. package/src/lab/useSystemMode.ts +0 -30
  131. package/src/layers/LayerList.less +0 -93
  132. package/src/layers/LayerList.stories.tsx +0 -66
  133. package/src/layers/LayerList.test.tsx +0 -232
  134. package/src/layers/LayerList.tsx +0 -268
  135. package/src/primitives/Sidebar.less +0 -112
  136. package/src/primitives/Sidebar.stories.tsx +0 -38
  137. package/src/primitives/Sidebar.test.tsx +0 -74
  138. package/src/primitives/Sidebar.tsx +0 -35
  139. 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, g2 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, n3 as Field, t as ICON_PATHS, o as Icon, u2 as Input, s3 as KeyCap, c3 as KeySequence, c4 as LayerStack, e2 as MINUS_SIGN, l7 as MenuButton, g as NumberField, r7 as OptionsBar, w2 as Plot2D, n8 as PointPlotter, r9 as Powerline, u3 as Radio, l3 as RadioGroup, l4 as RangeSlider, b2 as Select, k as SelectItem, n5 as Sidebar, s4 as SidebarPanel, b3 as Slider, a3 as Switch, c7 as Tab, s5 as TabList, l6 as TabPanel, o5 as Tabs, r5 as ToggleBar, o4 as ToolButton, n7 as ToolGroup, _2 as ToolPalette, kr 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, n2 as isPrefLeaf, e3 as keyGlyph, p2 as keySpecFromKey, d as keySpecsFromMods, Or as oklchToHex, v2 as paintGradientTrack, r2 as prefValueAtPath, Ar as useAsyncOptions, s as useReorderDragList, a4 as useRovingTabIndex, i2 as visiblePrefSubtree } from '../chunk-LASCBWW7.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-KJCUERQF.js';
2
- export { FpsMeter, ScaleIndicator, StatusBar, Toolbar, ZoomControl } from '../chunk-753Y6HE6.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-LASCBWW7.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-pnAE-UBD.js';
2
- import { S as SerializedTrial, I as InstrumentSerializers, T as TrialRecord, U as UndoStack, c as StorageAdapter } from '../_dts/frac-B4hFJMiN.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-B4hFJMiN.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-Db-3NNk1.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-LRI3MBGR.js';
2
- export { CURRENT_DOCUMENT_VERSION, createLabStore, dockPanel, labDocumentKey, openLabStore, panelKey, quarantineKey, undockPanel, useTrialState } from '../chunk-LRI3MBGR.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-A2ACAGW6.js';
6
- import '../chunk-REOBGYMC.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-LASCBWW7.js';
9
+ import '../chunk-WUJXJC5O.js';
10
10
  import { jsx, Fragment } from 'react/jsx-runtime';
11
11
 
12
12
  var SINGLETON_INSTRUMENT = "__singleton__";