@weasel-js/labkit 1.6.0 → 1.6.1

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 (162) hide show
  1. package/dist/_dts/{CanvasStackContext-DQgcH1ny.d.ts → CanvasStackContext-Wo6OwIVM.d.ts} +1 -1
  2. package/dist/_dts/FloatingPanel-7j0IcXwz.d.ts +30 -0
  3. package/dist/_dts/{LayerList.d-2c9yup5Y.d.ts → LayerList.d-BoELAMsM.d.ts} +2 -2
  4. package/dist/_dts/{index-DINmCuLA.d.ts → PropertyField.d-D0ndfIIt.d.ts} +34 -83
  5. package/dist/_dts/{Select.d-BchGMC2Y.d.ts → Select.d-Cr8-zoup.d.ts} +4 -5
  6. package/dist/_dts/{usePanZoom-Bq73pwFe.d.ts → Stage-DWBBi8IU.d.ts} +80 -35
  7. package/dist/_dts/{index-B0--8PEM.d.ts → index-CKyX0ME_.d.ts} +12 -13
  8. package/dist/_dts/{frac-DTRq7Xpb.d.ts → types-B7yBTTF9.d.ts} +699 -649
  9. package/dist/_dts/{types-B7y8hX1D.d.ts → types-DTuViBvc.d.ts} +20 -1
  10. package/dist/_dts/{useTrialState-CP4jfuKl.d.ts → useTrialState-CMaV6UD4.d.ts} +2 -3
  11. package/dist/canvas/index.d.ts +39 -7
  12. package/dist/canvas/index.js +5 -3
  13. package/dist/chrome/index.d.ts +4 -5
  14. package/dist/chrome/index.js +8 -6
  15. package/dist/chunk-24W5VEJW.js +18 -0
  16. package/dist/chunk-24W5VEJW.js.map +1 -0
  17. package/dist/chunk-3RY6WL5T.js +38 -0
  18. package/dist/chunk-3RY6WL5T.js.map +1 -0
  19. package/dist/{chunk-H5VIV7MQ.js → chunk-4TT3PNPR.js} +60 -51
  20. package/dist/chunk-4TT3PNPR.js.map +1 -0
  21. package/dist/{chunk-ZORVNOKX.js → chunk-6FLXL3I7.js} +9 -145
  22. package/dist/chunk-6FLXL3I7.js.map +1 -0
  23. package/dist/{chunk-HFRE4QQV.js → chunk-ASOK76ZH.js} +53 -22
  24. package/dist/chunk-ASOK76ZH.js.map +1 -0
  25. package/dist/chunk-AWQG7FCC.js +19 -0
  26. package/dist/chunk-AWQG7FCC.js.map +1 -0
  27. package/dist/chunk-CGHF6RZV.js +300 -0
  28. package/dist/chunk-CGHF6RZV.js.map +1 -0
  29. package/dist/chunk-DWMSB4CA.js +228 -0
  30. package/dist/chunk-DWMSB4CA.js.map +1 -0
  31. package/dist/{chunk-USO6TERP.js → chunk-GHGO52SO.js} +11 -9
  32. package/dist/chunk-GHGO52SO.js.map +1 -0
  33. package/dist/{chunk-MOLIUNVH.js → chunk-HKV7LRHY.js} +4 -4
  34. package/dist/{chunk-MOLIUNVH.js.map → chunk-HKV7LRHY.js.map} +1 -1
  35. package/dist/{chunk-VQ47KWD5.js → chunk-IRTGUQ5O.js} +5 -4
  36. package/dist/chunk-IRTGUQ5O.js.map +1 -0
  37. package/dist/{chunk-H6ZAOWNE.js → chunk-JVBYV6TL.js} +3 -3
  38. package/dist/{chunk-H6ZAOWNE.js.map → chunk-JVBYV6TL.js.map} +1 -1
  39. package/dist/chunk-KHK5FGER.js +145 -0
  40. package/dist/chunk-KHK5FGER.js.map +1 -0
  41. package/dist/chunk-NEXR37YJ.js +144 -0
  42. package/dist/chunk-NEXR37YJ.js.map +1 -0
  43. package/dist/{chunk-BVL7Y574.js → chunk-O6FFFOHS.js} +14 -6
  44. package/dist/chunk-O6FFFOHS.js.map +1 -0
  45. package/dist/chunk-QGMOA2YE.js +731 -0
  46. package/dist/chunk-QGMOA2YE.js.map +1 -0
  47. package/dist/{chunk-ERFMC6WU.js → chunk-S4NCI32V.js} +19 -10
  48. package/dist/chunk-S4NCI32V.js.map +1 -0
  49. package/dist/{chunk-3FI7Y4R4.js → chunk-SLAQPUI4.js} +4 -4
  50. package/dist/{chunk-3FI7Y4R4.js.map → chunk-SLAQPUI4.js.map} +1 -1
  51. package/dist/{chunk-AWH3SRPW.js → chunk-TJ77A4A3.js} +3 -31
  52. package/dist/chunk-TJ77A4A3.js.map +1 -0
  53. package/dist/{chunk-WUJXJC5O.js → chunk-TYN6MLXX.js} +691 -1395
  54. package/dist/chunk-TYN6MLXX.js.map +1 -0
  55. package/dist/{chunk-RS3HRQWU.js → chunk-WPLAANH4.js} +4 -3
  56. package/dist/chunk-WPLAANH4.js.map +1 -0
  57. package/dist/config/index.d.ts +36 -35
  58. package/dist/config/index.js +4 -5
  59. package/dist/controls/index.d.ts +91 -7
  60. package/dist/controls/index.js +5 -4
  61. package/dist/dragdrop/index.d.ts +8 -6
  62. package/dist/dragdrop/index.js +3 -2
  63. package/dist/index.d.ts +50 -77
  64. package/dist/index.js +138 -254
  65. package/dist/index.js.map +1 -1
  66. package/dist/layers/index.d.ts +3 -4
  67. package/dist/layers/index.js +2 -1
  68. package/dist/loupe/index.d.ts +19 -16
  69. package/dist/loupe/index.js +5 -3
  70. package/dist/overview/index.d.ts +56 -0
  71. package/dist/overview/index.js +288 -0
  72. package/dist/overview/index.js.map +1 -0
  73. package/dist/passthrough/weasel-ui.d.ts +38 -38
  74. package/dist/passthrough/weasel-ui.js +2 -1
  75. package/dist/primitives/index.d.ts +19 -43
  76. package/dist/primitives/index.js +5 -3
  77. package/dist/state/index.d.ts +7 -7
  78. package/dist/state/index.js +4 -5
  79. package/dist/state/index.js.map +1 -1
  80. package/dist/styles.css +63 -1
  81. package/dist/undo/index.d.ts +3 -3
  82. package/package.json +13 -9
  83. package/src/annotations/index.ts +1 -0
  84. package/src/annotations/store.test.ts +26 -0
  85. package/src/annotations/store.ts +25 -6
  86. package/src/annotations/toolMap.test.ts +37 -2
  87. package/src/annotations/toolMap.ts +13 -0
  88. package/src/annotations/types.ts +27 -0
  89. package/src/canvas/AGENTS.md +8 -10
  90. package/src/canvas/CameraInput.test.tsx +136 -0
  91. package/src/canvas/CameraInput.tsx +311 -0
  92. package/src/canvas/CanvasStack.tsx +42 -58
  93. package/src/canvas/LinkedCursor.less +16 -0
  94. package/src/canvas/LinkedCursor.tsx +54 -0
  95. package/src/canvas/Stage.tsx +42 -37
  96. package/src/canvas/cameraView.test.ts +60 -0
  97. package/src/canvas/cameraView.ts +61 -0
  98. package/src/canvas/index.ts +11 -2
  99. package/src/chrome/regions/SidebarRegion.test.tsx +9 -2
  100. package/src/config/builder.ts +3 -3
  101. package/src/config/entry.test.ts +3 -1
  102. package/src/config/fromConfigField.ts +1 -0
  103. package/src/config/index.ts +4 -1
  104. package/src/config/resolve.ts +11 -1
  105. package/src/config/sectionTree.test.ts +12 -6
  106. package/src/config/sectionTree.ts +15 -5
  107. package/src/config/types.ts +21 -0
  108. package/src/controls/ControlPanel.test.tsx +12 -2
  109. package/src/controls/ControlPanel.tsx +28 -9
  110. package/src/controls/inDialog.test.tsx +18 -0
  111. package/src/controls/inDialog.tsx +2 -10
  112. package/src/index.test.ts +1 -1
  113. package/src/index.ts +8 -4
  114. package/src/instrument/SineWave.smoke.test.tsx +2 -0
  115. package/src/instrument/types.ts +10 -1
  116. package/src/lab/Lab.nebula.test.tsx +11 -2
  117. package/src/lab/Lab.test.tsx +3 -1
  118. package/src/lab/Lab.tsx +4 -4
  119. package/src/loupe/AGENTS.md +7 -6
  120. package/src/loupe/LoupeGestures.tsx +14 -9
  121. package/src/loupe/TrialLoupe.tsx +5 -5
  122. package/src/loupe/index.ts +1 -0
  123. package/src/loupe/loupeActions.ts +6 -2
  124. package/src/overview/AGENTS.md +38 -0
  125. package/src/overview/OverviewMarks.test.tsx +100 -0
  126. package/src/overview/OverviewMarks.tsx +93 -0
  127. package/src/overview/TrialOverview.less +53 -0
  128. package/src/overview/TrialOverview.stories.tsx +50 -0
  129. package/src/overview/TrialOverview.test.tsx +116 -0
  130. package/src/overview/TrialOverview.tsx +374 -0
  131. package/src/overview/index.ts +2 -0
  132. package/src/passthrough/weasel-ui.ts +7 -0
  133. package/src/specimen/Specimen.tsx +19 -2
  134. package/src/state/labRecords.test.ts +4 -1
  135. package/src/state/store.test.ts +4 -4
  136. package/src/state/useTrialState.test.tsx +1 -1
  137. package/src/styles.less +2 -0
  138. package/src/theme/Interstellar.stories.tsx +1 -5
  139. package/src/tools/labTool.ts +6 -2
  140. package/src/trial/Trial.annotations.test.tsx +16 -0
  141. package/src/trial/Trial.loupe.test.tsx +73 -1
  142. package/src/trial/Trial.stories.tsx +2 -0
  143. package/src/trial/Trial.tsx +17 -1
  144. package/src/trial/trialOps.test.ts +4 -4
  145. package/dist/_dts/inDialog-D5ZKGjiD.d.ts +0 -23
  146. package/dist/_dts/number.d-OeQYQoUO.d.ts +0 -28
  147. package/dist/chunk-2AYGEN57.js +0 -32
  148. package/dist/chunk-2AYGEN57.js.map +0 -1
  149. package/dist/chunk-AWH3SRPW.js.map +0 -1
  150. package/dist/chunk-BVL7Y574.js.map +0 -1
  151. package/dist/chunk-ERFMC6WU.js.map +0 -1
  152. package/dist/chunk-H5VIV7MQ.js.map +0 -1
  153. package/dist/chunk-HFRE4QQV.js.map +0 -1
  154. package/dist/chunk-RS3HRQWU.js.map +0 -1
  155. package/dist/chunk-TT5C5S6R.js +0 -368
  156. package/dist/chunk-TT5C5S6R.js.map +0 -1
  157. package/dist/chunk-USO6TERP.js.map +0 -1
  158. package/dist/chunk-VQ47KWD5.js.map +0 -1
  159. package/dist/chunk-WUJXJC5O.js.map +0 -1
  160. package/dist/chunk-ZORVNOKX.js.map +0 -1
  161. package/src/canvas/usePanZoom.test.ts +0 -244
  162. package/src/canvas/usePanZoom.ts +0 -147
@@ -1,4 +1,5 @@
1
- import { resolveFrame, screenToWorld } from './chunk-2AYGEN57.js';
1
+ import { screenToWorld } from './chunk-AWQG7FCC.js';
2
+ import { resolveFrame } from './chunk-24W5VEJW.js';
2
3
  import { useState, useEffect, useRef, useCallback } from 'react';
3
4
  import { createPortal } from 'react-dom';
4
5
  import { jsx } from 'react/jsx-runtime';
@@ -138,5 +139,5 @@ function Palette({ items, onDragStart, className }) {
138
139
  }
139
140
 
140
141
  export { DragGhost, DragOverlay, Palette, useDragDrop };
141
- //# sourceMappingURL=chunk-RS3HRQWU.js.map
142
- //# sourceMappingURL=chunk-RS3HRQWU.js.map
142
+ //# sourceMappingURL=chunk-WPLAANH4.js.map
143
+ //# sourceMappingURL=chunk-WPLAANH4.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/dragdrop/DragGhost.tsx","../src/dragdrop/DragDropRuntime.tsx","../src/dragdrop/Palette.tsx"],"names":["useState","useEffect","jsx"],"mappings":";;;;;;;AASO,SAAS,SAAA,CAAU,EAAE,IAAA,EAAM,SAAA,EAAU,EAAuC;AACjF,EAAA,MAAM,CAAC,OAAA,EAAS,UAAU,CAAA,GAAI,SAAS,KAAK,CAAA;AAC5C,EAAA,SAAA,CAAU,MAAM,UAAA,CAAW,IAAI,CAAA,EAAG,EAAE,CAAA;AACpC,EAAA,IAAI,CAAC,OAAA,IAAW,OAAO,QAAA,KAAa,aAAa,OAAO,IAAA;AACxD,EAAA,MAAM,KAAA,GAAQ;AAAA,IACZ,IAAA,EAAM,CAAA,EAAG,SAAA,CAAU,CAAA,GAAI,EAAE,CAAA,EAAA,CAAA;AAAA,IACzB,GAAA,EAAK,CAAA,EAAG,SAAA,CAAU,CAAA,GAAI,EAAE,CAAA,EAAA;AAAA,GAC1B;AACA,EAAA,OAAO,YAAA;AAAA,oBACL,GAAA,CAAC,KAAA,EAAA,EAAI,SAAA,EAAU,eAAA,EAAgB,KAAA,EAC7B,QAAA,kBAAA,GAAA,CAAC,MAAA,EAAA,EAAK,SAAA,EAAU,sBAAA,EAAwB,QAAA,EAAA,IAAA,CAAK,KAAA,EAAM,CAAA,EACrD,CAAA;AAAA,IACA,QAAA,CAAS;AAAA,GACX;AACF;ACqBO,SAAS,WAAA,CAAoB;AAAA,EAClC,UAAA;AAAA,EACA,kBAAA;AAAA,EACA,IAAA;AAAA,EACA,KAAA;AAAA,EACA,MAAA;AAAA,EACA,QAAA;AAAA,EACA,IAAA;AAAA,EACA;AACF,CAAA,EAA+C;AAC7C,EAAA,M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,CAAM,GAAA,CAAI,CAAC,yBACVA,GAAAA;AAAA,IAAC,QAAA;AAAA,IAAA;AAAA,MACC,IAAA,EAAK,QAAA;AAAA,MAEL,SAAA,EAAU,kBAAA;AAAA,MACV,aAAA,EAAe,CAAC,CAAA,KAAM;AACpB,QAAA,CAAA,CAAE,cAAA,EAAe;AACjB,QAAA,WAAA,CAAY,MAAM,CAAC,CAAA;AAAA,MACrB,CAAA;AAAA,MAEA,0BAAAA,GAAAA,CAAC,MAAA,EAAA,EAAK,SAAA,EAAU,mBAAA,EAAqB,eAAK,KAAA,EAAM;AAAA,KAAA;AAAA,IAP3C,IAAA,CAAK;AAAA,GASb,CAAA,EACH,CAAA;AAEJ","file":"chunk-WPLAANH4.js","sourcesContent":["import { type ReactPortal, useEffect, useState } from 'react';\nimport { createPortal } from 'react-dom';\nimport type { PaletteItem, Point } from '../instrument/types';\n\nexport interface DragGhostProps {\n item: PaletteItem;\n screenPos: Point;\n}\n\nexport function DragGhost({ item, screenPos }: DragGhostProps): ReactPortal | null {\n const [mounted, setMounted] = useState(false);\n useEffect(() => setMounted(true), []);\n if (!mounted || typeof document === 'undefined') return null;\n const style = {\n left: `${screenPos.x + 12}px`,\n top: `${screenPos.y + 12}px`,\n };\n return createPortal(\n <div className=\"lk-drag-ghost\" style={style}>\n <span className=\"lk-drag-ghost__label\">{item.label}</span>\n </div>,\n document.body,\n );\n}\n","import { openPointerSession, type PointerSession, useVisibleRaf } from '@weasel-js/core';\nimport {\n type PointerEvent as ReactPointerEvent,\n type RefObject,\n useCallback,\n useEffect,\n useRef,\n useState,\n} from 'react';\nimport { screenToWorld } from '../canvas/canvasCoords';\nimport { resolveFrame, type WorldSpec } from '../canvas/worldSpec';\nimport type {\n DragDropCapability,\n DragFeedback,\n PaletteItem,\n Point,\n ViewTransform,\n} from '../instrument/types';\nimport { DragGhost } from './DragGhost';\n\nexport interface DragState {\n item: PaletteItem;\n screenPos: Point;\n feedback: DragFeedback | null;\n}\n\nexport interface UseDragDropArgs<TS, TC> {\n capability: DragDropCapability<TS, TC>;\n canvasContainerRef: RefObject<HTMLElement | null>;\n view: ViewTransform;\n /** The instrument's coordinate system, resolved against the container each\n * time a screen point is converted — the container is what knows its size. */\n worldSpec?: WorldSpec;\n state: TS;\n config: TC;\n setState: (next: TS | ((prev: TS) => TS)) => void;\n emit: (event: string) => void;\n}\n\nexport interface UseDragDropResult {\n drag: DragState | null;\n startDrag: (item: PaletteItem, e: ReactPointerEvent) => void;\n}\n\nexport function useDragDrop<TS, TC>({\n capability,\n canvasContainerRef,\n view,\n state,\n config,\n setState,\n emit,\n worldSpec,\n}: UseDragDropArgs<TS, TC>): UseDragDropResult {\n const [drag, setDrag] = useState<DragState | null>(null);\n const dragRef = useRef<DragState | null>(null);\n dragRef.current = drag;\n /** The move the next frame will resolve. Doubles as the throttle's flag:\n * non-null means a frame is already queued. */\n const pendingPos = useRef<Point | null>(null);\n const sessionRef = useRef<PointerSession | null>(null);\n\n /** A session keeps the closure it was opened with, so everything the drop\n * reads has to come from here rather than from that closure. */\n const liveRef = useRef({ capability, state, config, setState, emit, view, worldSpec });\n liveRef.current = { capability, state, config, setState, emit, view, worldSpec };\n\n const isOverCanvas = useCallback(\n (screenPos: Point): boolean => {\n const el = canvasContainerRef.current;\n if (!el) return false;\n const r = el.getBoundingClientRect();\n return (\n screenPos.x >= r.left &&\n screenPos.x <= r.right &&\n screenPos.y >= r.top &&\n screenPos.y <= r.bottom\n );\n },\n [canvasContainerRef],\n );\n\n const screenToWorldFromContainer = useCallback(\n (screenPos: Point): Point | null => {\n const el = canvasContainerRef.current;\n if (!el) return null;\n const r = el.getBoundingClientRect();\n const frame = resolveFrame(liveRef.current.worldSpec, { width: r.width, height: r.height });\n return screenToWorld(\n { x: screenPos.x - r.left, y: screenPos.y - r.top },\n liveRef.current.view,\n frame,\n );\n },\n [canvasContainerRef],\n );\n\n const frameLoop = useVisibleRaf(() => {\n const screenPos = pendingPos.current;\n pendingPos.current = null;\n const active = dragRef.current;\n if (!active || !screenPos) return;\n const live = liveRef.current;\n let feedback: DragFeedback | null = null;\n if (live.capability.onDragOver && isOverCanvas(screenPos)) {\n const world = screenToWorldFromContainer(screenPos);\n if (world) feedback = live.capability.onDragOver(world, active.item, live.state, live.config);\n }\n setDrag({ ...active, screenPos, feedback });\n });\n\n const clearDrag = useCallback(() => {\n pendingPos.current = null;\n frameLoop.cancel();\n sessionRef.current = null;\n dragRef.current = null;\n setDrag(null);\n }, [frameLoop]);\n\n const startDrag = useCallback(\n (item: PaletteItem, e: ReactPointerEvent) => {\n if (sessionRef.current) return;\n const next: DragState = { item, screenPos: { x: e.clientX, y: e.clientY }, feedback: null };\n dragRef.current = next;\n setDrag(next);\n sessionRef.current = openPointerSession(e.currentTarget, e, {\n onMove: (ev) => {\n const screenPos = { x: ev.clientX, y: ev.clientY };\n const current = dragRef.current;\n if (!current) return;\n if (pendingPos.current !== null) {\n // A frame is already queued: keep the ghost under the cursor and\n // let that frame probe the drop target from the newest position.\n pendingPos.current = screenPos;\n dragRef.current = { ...current, screenPos };\n setDrag(dragRef.current);\n return;\n }\n pendingPos.current = screenPos;\n frameLoop.request();\n },\n onEnd: (ev) => {\n const screenPos = { x: ev.clientX, y: ev.clientY };\n const active = dragRef.current;\n clearDrag();\n if (!active || !isOverCanvas(screenPos)) return;\n const world = screenToWorldFromContainer(screenPos);\n if (!world) return;\n const live = liveRef.current;\n live.setState(live.capability.onDrop(world, active.item, live.state, live.config));\n live.emit('canvas.itemAdded');\n },\n // An interrupted gesture never named a destination, so it drops nothing.\n onCancel: clearDrag,\n });\n },\n [clearDrag, frameLoop, isOverCanvas, screenToWorldFromContainer],\n );\n\n useEffect(() => () => sessionRef.current?.cancel(), []);\n\n return { drag, startDrag };\n}\n\nexport interface DragOverlayProps {\n drag: DragState | null;\n}\n\nexport function DragOverlay({ drag }: DragOverlayProps) {\n if (!drag) return null;\n return <DragGhost item={drag.item} screenPos={drag.screenPos} />;\n}\n","import type { PointerEvent as ReactPointerEvent } from 'react';\nimport type { PaletteItem } from '../instrument/types';\n\nexport interface PaletteProps {\n items: PaletteItem[];\n onDragStart: (item: PaletteItem, e: ReactPointerEvent) => void;\n className?: string;\n}\n\nexport function Palette({ items, onDragStart, className }: PaletteProps) {\n return (\n <div className={className ? `lk-palette ${className}` : 'lk-palette'}>\n {items.map((item) => (\n <button\n type=\"button\"\n key={item.id}\n className=\"lk-palette__item\"\n onPointerDown={(e) => {\n e.preventDefault();\n onDragStart(item, e);\n }}\n >\n <span className=\"lk-palette__label\">{item.label}</span>\n </button>\n ))}\n </div>\n );\n}\n"]}
@@ -1,9 +1,10 @@
1
- import { a2 as Auto, O as Instrument } from '../_dts/frac-DTRq7Xpb.js';
2
- export { ax as auto, aD as isAuto } from '../_dts/frac-DTRq7Xpb.js';
3
- import { R as ResolvedConfig, l as ConfigNode, A as Annotations, N as NodeOptions, v as SectionOption, C as ControlRenderer, n as ConfigOption, p as ConfigShape, h as ConfigBranch, B as BranchAnnotations, e as BranchOptions, c as ConfigSchema, I as InferConfig, i as ConfigEntry, b as ConfigField, d as ConfigRule, L as LeafPatch, o as ConfigRuleContext } from '../_dts/types-B7y8hX1D.js';
4
- export { m as ConfigOf, a as ConfigPath, E as EntryValue, q as NodeValue, S as SectionSpec, V as ValueAtPath } from '../_dts/types-B7y8hX1D.js';
1
+ import { a5 as Auto } from '../_dts/types-B7yBTTF9.js';
2
+ import { Instrument } from '../index.js';
3
+ export { aC as auto, aI as isAuto } from '../_dts/types-B7yBTTF9.js';
4
+ import { R as ResolvedConfig, l as ConfigNode, A as Annotations, N as NodeOptions, S as SectionOption, d as ControlRenderer, I as InDialogOptions, n as ConfigOption, p as ConfigShape, h as ConfigBranch, B as BranchAnnotations, e as BranchOptions, b as ConfigSchema, q as InferConfig, i as ConfigEntry, c as ConfigRule, L as LeafPatch, o as ConfigRuleContext } from '../_dts/types-DTuViBvc.js';
5
+ import { ConfigField } from '../controls/index.js';
6
+ export { m as ConfigOf, C as ConfigPath, D as DialogSpec, E as EntryValue, r as NodeValue, t as SectionSpec, V as ValueAtPath } from '../_dts/types-DTuViBvc.js';
5
7
  import { ToolPrefNumberFormat, ToolPrefNumberUnit, ToolPrefLeaf, ToolPrefGroup } from '@weasel-js/core';
6
- import { I as InDialogOptions } from '../_dts/inDialog-D5ZKGjiD.js';
7
8
  import 'react';
8
9
  import '../_dts/PrefsRow.d-DFpPIeIC.js';
9
10
  import '@weasel-js/theme';
@@ -205,35 +206,6 @@ declare const f: {
205
206
  */
206
207
  declare function fromConfigFields(fields: readonly ConfigField[]): ResolvedConfig;
207
208
 
208
- /**
209
- * A resolved schema rearranged so its sections are groups.
210
- *
211
- * `PrefsForm`'s rail navigates the schema tree — top-level groups are its
212
- * items, their group children indent under them. A resolved schema keeps its
213
- * sections beside the tree instead, so a flat schema's rail comes out as one
214
- * unnamed item however many headings the panel draws. This puts the sections
215
- * where the rail looks for them.
216
- */
217
- interface SectionTree {
218
- /** The rail's schema. Top-level children are the schema's root sections,
219
- * followed by any root node no section claimed. */
220
- group: ToolPrefGroup;
221
- /** `config` renested to mirror `group` — the value tree `PrefsForm` takes. */
222
- values: Record<string, unknown>;
223
- /** The config path a path within `group` stands for. */
224
- pathAt: (railPath: string) => string;
225
- }
226
- /**
227
- * Turn a resolved schema's root sections into the top level of a `PrefGroup`,
228
- * for `PrefsForm`'s rail layout.
229
- *
230
- * A section naming a group brings that group in whole, so it lands as an
231
- * indented rail item; a section naming a leaf drops it loose into the
232
- * section's own pane. Sections nested under a group are left alone — they
233
- * bucket rows inside a pane, which is the panel's job and not the rail's.
234
- */
235
- declare function sectionTree(resolved: ResolvedConfig, config: Record<string, unknown>, showHidden?: boolean): SectionTree;
236
-
237
209
  /** The value at a dotted path. `undefined` when a segment is missing or the
238
210
  * walk hits something that is not a record. */
239
211
  declare function valueAtPath(config: unknown, path: string): unknown;
@@ -285,6 +257,35 @@ declare const builtinRules: readonly ConfigRule[];
285
257
  */
286
258
  declare function applyRules(seed: LeafPatch, ctx: Omit<ConfigRuleContext, 'leaf'>, rules: readonly ConfigRule[]): LeafPatch;
287
259
 
260
+ /**
261
+ * A resolved schema rearranged so its sections are groups.
262
+ *
263
+ * `PrefsForm`'s rail navigates the schema tree — top-level groups are its
264
+ * items, their group children indent under them. A resolved schema keeps its
265
+ * sections beside the tree instead, so a flat schema's rail comes out as one
266
+ * unnamed item however many headings the panel draws. This puts the sections
267
+ * where the rail looks for them.
268
+ */
269
+ interface SectionTree {
270
+ /** The rail's schema. Top-level children are the schema's root sections,
271
+ * followed by any root node no section claimed. */
272
+ group: ToolPrefGroup;
273
+ /** `config` renested to mirror `group` — the value tree `PrefsForm` takes. */
274
+ values: Record<string, unknown>;
275
+ /** The config path a path within `group` stands for. */
276
+ pathAt: (railPath: string) => string;
277
+ }
278
+ /**
279
+ * Turn a resolved schema's root sections into the top level of a `PrefGroup`,
280
+ * for `PrefsForm`'s rail layout.
281
+ *
282
+ * A section naming a group brings that group in whole, so it lands as an
283
+ * indented rail item; a section naming a leaf drops it loose into the
284
+ * section's own pane. Sections nested under a group are left alone — they
285
+ * bucket rows inside a pane, which is the panel's job and not the rail's.
286
+ */
287
+ declare function sectionTree(resolved: ResolvedConfig, config: Record<string, unknown>, showHidden?: boolean): SectionTree;
288
+
288
289
  /**
289
290
  * An instrument's controls, resolved against the surrounding lab's rules.
290
291
  *
@@ -314,5 +315,5 @@ declare function useResolvedConfig<TC>(schema: ResolvedConfig | undefined, confi
314
315
  */
315
316
  declare function isLeafVisible(resolved: ResolvedConfig, path: string, config: Record<string, unknown>, showHidden?: boolean): boolean;
316
317
 
317
- export { Annotations, Auto, BaseNode, BooleanNode, BranchAnnotations, BranchOptions, ColorNode, ConfigBranch, ConfigEntry, ConfigNode, ConfigOption, ConfigRule, ConfigRuleContext, ConfigSchema, ConfigShape, ControlRenderer, CustomNode, EnumNode, GroupNode, InferConfig, LeafPatch, ListNode, NodeOptions, NumberNode, ResolvedConfig, StringNode, ValueNode, applyRules, autoPathsOf, builtinRules, f, fillConfigDefaults, fromConfigFields, hasConfigPath, isConfigBranch, isLeafVisible, resolveAutoConfig, resolveConfigSchema, schemaNodeAtPath, sectionTree, titleCase, useConfigSchema, useResolvedConfig, valueAtPath, withValueAtPath };
318
+ export { Annotations, Auto, BaseNode, BooleanNode, BranchAnnotations, BranchOptions, ColorNode, ConfigBranch, ConfigEntry, ConfigNode, ConfigOption, ConfigRule, ConfigRuleContext, ConfigSchema, ConfigShape, ControlRenderer, CustomNode, EnumNode, GroupNode, InDialogOptions, InferConfig, LeafPatch, ListNode, NodeOptions, NumberNode, ResolvedConfig, SectionOption, StringNode, ValueNode, applyRules, autoPathsOf, builtinRules, f, fillConfigDefaults, fromConfigFields, hasConfigPath, isConfigBranch, isLeafVisible, resolveAutoConfig, resolveConfigSchema, schemaNodeAtPath, sectionTree, titleCase, useConfigSchema, useResolvedConfig, valueAtPath, withValueAtPath };
318
319
  export type { SectionTree };
@@ -1,8 +1,7 @@
1
- export { sectionTree, useConfigSchema } from '../chunk-USO6TERP.js';
1
+ export { sectionTree, useConfigSchema } from '../chunk-GHGO52SO.js';
2
2
  import '../chunk-Z76KEZAX.js';
3
- export { BaseNode, BooleanNode, ColorNode, CustomNode, EnumNode, GroupNode, ListNode, NumberNode, StringNode, ValueNode, applyRules, builtinRules, f, isConfigBranch, resolveConfigSchema, titleCase, useResolvedConfig } from '../chunk-BVL7Y574.js';
4
- export { fromConfigFields, isLeafVisible } from '../chunk-VQ47KWD5.js';
5
- export { auto, autoPathsOf, fillConfigDefaults, hasConfigPath, isAuto, resolveAutoConfig, schemaNodeAtPath, valueAtPath, withValueAtPath } from '../chunk-AWH3SRPW.js';
6
- import '../chunk-WUJXJC5O.js';
3
+ export { BaseNode, BooleanNode, ColorNode, CustomNode, EnumNode, GroupNode, ListNode, NumberNode, StringNode, ValueNode, applyRules, builtinRules, f, isConfigBranch, resolveConfigSchema, titleCase, useResolvedConfig } from '../chunk-O6FFFOHS.js';
4
+ export { fromConfigFields, isLeafVisible } from '../chunk-IRTGUQ5O.js';
5
+ export { auto, autoPathsOf, fillConfigDefaults, hasConfigPath, isAuto, resolveAutoConfig, schemaNodeAtPath, valueAtPath, withValueAtPath } from '../chunk-TJ77A4A3.js';
7
6
  //# sourceMappingURL=index.js.map
8
7
  //# sourceMappingURL=index.js.map
@@ -1,9 +1,93 @@
1
- export { C as ControlPanel } from '../_dts/index-DINmCuLA.js';
2
- export { I as InDialogOptions, i as inDialog, s as summarizeValue } from '../_dts/inDialog-D5ZKGjiD.js';
3
- export { f as CheckboxField, g as ColorField, b as ConfigField, k as ConfigFieldType, r as NumberField, s as SelectField, t as SelectOption, u as SliderField, T as TextField } from '../_dts/types-B7y8hX1D.js';
4
- import 'react/jsx-runtime';
5
- import 'react';
6
- import '../_dts/PrefsRow.d-DFpPIeIC.js';
1
+ import * as react from 'react';
2
+ import { ReactNode } from 'react';
3
+ import { StanceProps } from '../passthrough/weasel-ui.js';
4
+ import { PropertyRowLayout } from '../index.js';
5
+ import { PropertyDensity, PropertyAlign } from '../passthrough/weasel-ui.js';
6
+ import { a as ConfigField, I as InDialogOptions } from '../_dts/types-DTuViBvc.js';
7
+ import { ResolvedConfig, ControlRenderer } from '../config/index.js';
8
+ export { f as CheckboxField, g as ColorField, k as ConfigFieldType, s as NumberField, u as SelectField, v as SelectOption, w as SliderField, T as TextField } from '../_dts/types-DTuViBvc.js';
7
9
  import '@weasel-js/theme';
8
10
  import '@weasel-js/core';
9
- import '../_dts/number.d-OeQYQoUO.js';
11
+
12
+ /** How a panel packs its rows into the two-column property grid.
13
+ * - `'auto'`: narrow controls (numbers, checkboxes, dropdowns, colors) sit
14
+ * two per row; the ones that need the width — text, sliders, segmented
15
+ * toggles — span it.
16
+ * - `'pairs'`: every row pairs. A control that needs the full width says so
17
+ * itself, with `<PropertyRow span>`.
18
+ * - `'one-up'`: one control per row, colors excepted.
19
+ */
20
+ type ControlPack = 'auto' | 'pairs' | 'one-up';
21
+ interface ControlPanelProps<TC extends Record<string, unknown>> extends StanceProps {
22
+ /** The instrument's resolved config schema. */
23
+ schema?: ResolvedConfig;
24
+ /** @deprecated Pass `schema`. A field list is adapted into one internally. */
25
+ fields?: ConfigField[];
26
+ config: TC;
27
+ /** Writes one value. The path is dotted for a leaf inside an `f.group`, and
28
+ * the bare key for one at the root. */
29
+ setConfig: (path: string, value: unknown) => void;
30
+ /**
31
+ * Control overrides and app-defined kinds, PrefsForm-style. Keys are config
32
+ * paths (checked first) or leaf kinds. A renderer returning `null` collapses
33
+ * the row; entries override the built-in rows on collision.
34
+ */
35
+ renderers?: Record<string, ControlRenderer>;
36
+ /** How rows pack into the two-column grid. Defaults to `'pairs'`. */
37
+ pack?: ControlPack;
38
+ /**
39
+ * Where a row's label sits relative to its control. Unset takes each row's
40
+ * own orientation — `block` (label above, which is what leaves a paired row
41
+ * room for its value) for most, `inline` for colors and checkboxes.
42
+ */
43
+ layout?: PropertyRowLayout;
44
+ /** Room the rows get. Passed straight to the property list. */
45
+ density?: PropertyDensity;
46
+ /** Cross-axis alignment of an inline row's label and control. */
47
+ align?: PropertyAlign;
48
+ /**
49
+ * Fold each section away behind a twisty, starting `'open'` or `'closed'`.
50
+ * Unset draws the heading alone, as the panel always has — unless a section
51
+ * in the schema declares how it opens, which makes that section foldable on
52
+ * its own and outranks this for that one section.
53
+ */
54
+ collapse?: 'open' | 'closed';
55
+ /**
56
+ * Which sections are folded, keyed as `onCollapse` reports them. Given, the
57
+ * panel keeps no state of its own: every toggle arrives at `onCollapse`
58
+ * instead, which is where a lab that remembers a trial's sections writes
59
+ * them.
60
+ */
61
+ collapsed?: Readonly<Record<string, boolean>>;
62
+ /** A fold moved. The key is a section's label — prefixed by its group's
63
+ * dotted path when the section sits inside one — or a group's own path. */
64
+ onCollapse?: (key: string, collapsed: boolean) => void;
65
+ /** Dotted paths currently unpinned. A row in this set hides its control and
66
+ * reads out `auto`, and clicking its label writes the sentinel back through
67
+ * `setConfig`. Omitted, the panel keeps the set itself: the labels still
68
+ * toggle and the sentinel never reaches `setConfig`, which would otherwise
69
+ * store it as the row's value. */
70
+ auto?: ReadonlySet<string>;
71
+ /** Draw leaves marked `hidden`. */
72
+ showHidden?: boolean;
73
+ /** Heads the panel. With `title`, `stance` or `tone` given, the rows sit in a
74
+ * `<PropertyPanel>` carrying them; with none, they are the bare list. */
75
+ title?: ReactNode;
76
+ className?: string;
77
+ }
78
+ /** Render an instrument's config schema as a stack of controls, each writing
79
+ * back through `setConfig`. Built on the property rows, so a lab's controls
80
+ * are the same aligned, themed rows the rest of the kit uses. */
81
+ declare function ControlPanel<TC extends Record<string, unknown>>({ schema, fields, config, setConfig, renderers, pack, layout, density, align, collapse, collapsed, onCollapse, auto: given, showHidden, title, stance, tone, className, }: ControlPanelProps<TC>): react.JSX.Element;
82
+
83
+ /** The one-line summary a dialog row shows when it is given none. */
84
+ declare function summarizeValue(value: unknown): string;
85
+ /**
86
+ * Moves a control into a modal: the row becomes a button showing a summary of
87
+ * the value, and the button opens a dialog whose body is `body`, handed the
88
+ * same context a row renderer gets. For a leaf whose editor will never fit a
89
+ * sidebar row.
90
+ */
91
+ declare function inDialog(body: ControlRenderer, opts?: InDialogOptions): ControlRenderer;
92
+
93
+ export { ConfigField, ControlPanel, InDialogOptions, inDialog, summarizeValue };
@@ -1,6 +1,7 @@
1
- export { ControlPanel } from '../chunk-HFRE4QQV.js';
2
- import '../chunk-VQ47KWD5.js';
3
- export { inDialog, summarizeValue } from '../chunk-AWH3SRPW.js';
4
- import '../chunk-WUJXJC5O.js';
1
+ export { ControlPanel, inDialog, summarizeValue } from '../chunk-ASOK76ZH.js';
2
+ import '../chunk-IRTGUQ5O.js';
3
+ import '../chunk-TJ77A4A3.js';
4
+ import '../chunk-TYN6MLXX.js';
5
+ import '../chunk-QGMOA2YE.js';
5
6
  //# sourceMappingURL=index.js.map
6
7
  //# sourceMappingURL=index.js.map
@@ -1,10 +1,12 @@
1
- import { P as PaletteItem, n as Point, o as DragFeedback, q as DragDropCapability, m as ViewTransform, b as WorldSpec } from '../_dts/frac-DTRq7Xpb.js';
2
- import * as react_jsx_runtime from 'react/jsx-runtime';
1
+ import { n as PaletteItem, o as DragFeedback, q as DragDropCapability } from '../_dts/types-B7yBTTF9.js';
2
+ import { WorldSpec } from '../canvas/index.js';
3
+ import { Point, ViewTransform } from '../index.js';
4
+ import * as react from 'react';
3
5
  import { RefObject, PointerEvent, ReactPortal } from 'react';
6
+ import '@weasel-js/core';
4
7
  import '../_dts/PrefsRow.d-DFpPIeIC.js';
5
8
  import '@weasel-js/theme';
6
- import '@weasel-js/core';
7
- import '../_dts/types-B7y8hX1D.js';
9
+ import '../_dts/types-DTuViBvc.js';
8
10
  import '../_dts/types-DJ79Tg5J.js';
9
11
 
10
12
  interface DragState {
@@ -32,7 +34,7 @@ declare function useDragDrop<TS, TC>({ capability, canvasContainerRef, view, sta
32
34
  interface DragOverlayProps {
33
35
  drag: DragState | null;
34
36
  }
35
- declare function DragOverlay({ drag }: DragOverlayProps): react_jsx_runtime.JSX.Element | null;
37
+ declare function DragOverlay({ drag }: DragOverlayProps): react.JSX.Element | null;
36
38
 
37
39
  interface DragGhostProps {
38
40
  item: PaletteItem;
@@ -45,7 +47,7 @@ interface PaletteProps {
45
47
  onDragStart: (item: PaletteItem, e: PointerEvent) => void;
46
48
  className?: string;
47
49
  }
48
- declare function Palette({ items, onDragStart, className }: PaletteProps): react_jsx_runtime.JSX.Element;
50
+ declare function Palette({ items, onDragStart, className }: PaletteProps): react.JSX.Element;
49
51
 
50
52
  export { DragDropCapability, DragFeedback, DragGhost, DragOverlay, Palette, PaletteItem, useDragDrop };
51
53
  export type { DragGhostProps, DragOverlayProps, DragState, PaletteProps, UseDragDropArgs, UseDragDropResult };
@@ -1,4 +1,5 @@
1
- export { DragGhost, DragOverlay, Palette, useDragDrop } from '../chunk-RS3HRQWU.js';
2
- import '../chunk-2AYGEN57.js';
1
+ export { DragGhost, DragOverlay, Palette, useDragDrop } from '../chunk-WPLAANH4.js';
2
+ import '../chunk-AWQG7FCC.js';
3
+ import '../chunk-24W5VEJW.js';
3
4
  //# sourceMappingURL=index.js.map
4
5
  //# sourceMappingURL=index.js.map
package/dist/index.d.ts CHANGED
@@ -1,47 +1,47 @@
1
- import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import { I as IconProps } from './_dts/Select.d-BchGMC2Y.js';
3
- export { B as Button, a as ButtonProps, b as ButtonSize, c as ButtonVariant, d as Icon, e as Input, f as InputProps, S as Select, g as SelectProps, T as ToggleBar, h as ToggleBarItem, i as ToggleBarProps, j as ToggleBarSize, k as ToggleBarVariant } from './_dts/Select.d-BchGMC2Y.js';
4
- export { L as LayerList, a as LayerListItem, b as LayerListProps, c as LayerMove, m as moveLayers } from './_dts/LayerList.d-2c9yup5Y.js';
5
- import { P as PropertyMetricProps, a as PropertyListPack } from './_dts/index-DINmCuLA.js';
6
- export { C as ControlPanel, b as PropertyControl, c as PropertyControlProps, d as PropertyField, e as PropertyFieldProps, f as PropertyList, g as PropertyListProps, h as PropertyOption, i as PropertyPanel, j as PropertyPanelProps, k as PropertyRow, l as PropertyRowLayout, m as PropertyRowProps, n as PropertyRowVariant, o as PropertySpan, p as PropertySpanProps } from './_dts/index-DINmCuLA.js';
7
1
  import * as react from 'react';
8
2
  import { ReactNode } from 'react';
9
- import { S as StanceProps } from './_dts/PrefsRow.d-DFpPIeIC.js';
10
- import { DrawCommand, SceneNode, View, Path, FillStyle, ScreenLength, StrokeAlign, StyledRun, TextStyle, TextVerticalAlign, Stroke, BuiltinToolId } from '@weasel-js/core';
11
- import { w as WorldRect, A as AnnotationData, x as AnnotationMeaning, y as MarkScene, z as CaptureSource, B as CaptureOptions, E as CaptureResult, F as AnnotationTarget, G as AnnotationsApi, H as AnnotationsCapability, J as TrialInfo, K as TrialTool, N as AnnotationKind, m as ViewTransform, O as Instrument, t as InstrumentList, s as LabMode, Q as LabDensity, R as TrialContribution, d as StorageAdapter, T as TrialRecord } from './_dts/frac-DTRq7Xpb.js';
12
- export { X as Annotation, Y as AnnotationInit, Z as AnnotationPatch, _ as AnnotationQuery, $ as AnnotationStatus, a0 as AnnotationStoreOptions, a1 as AnnotationTargetInfo, a2 as Auto, a3 as CanvasCapability, a4 as CanvasLayer, a5 as CaptureDeps, a6 as ContributionBase, C as CreateLabStoreOptions, D as DEFAULT_FRAME, q as DragDropCapability, o as DragFeedback, a7 as FracPoint, a8 as FracRect, a9 as HitResult, aa as IconComponent, ab as LOUPE_DEFAULTS, e as LabDocument, f as LabStoreState, L as LayerCapability, a as LayerDescriptor, ac as LoupeCapability, ad as LoupeDeclaration, ae as LoupeRenderArgs, P as PaletteItem, n as Point, af as RegionContribution, ag as RenderContext, ah as ResolvedLoupe, g as SavedSnapshot, ai as SerializedAnnotations, S as SerializedTrial, aj as SidebarSection, ak as SidebarSlotContext, al as StageCapability, am as StatusReadout, h as StorageChange, an as SystemEvent, ao as ToolCapability, ap as ToolItem, aq as ToolSlotContext, ar as ToolbarItem, as as TrialChromeContext, at as TrialRegion, i as TrialStateHandle, au as UndoCapability, U as UndoStack, j as UndockedPanel, k as UndockedPanels, av as ViewportControl, V as ViewportSize, W as WorldFrame, b as WorldSpec, aw as annotationsFromJSON, c as applyCamera, ax as auto, ay as createAnnotationScene, az as createAnnotationStore, l as dockPanel, aA as fracContains, aB as fracEncloses, aC as fracToWorld, aD as isAuto, p as panelKey, r as resolveFrame, aE as resolveLoupe, aF as roundFrac, u as undockPanel, aG as worldToFrac } from './_dts/frac-DTRq7Xpb.js';
13
- export { C as CanvasStack, a as CanvasStackProps, P as PanZoomHandlers, S as Stage, b as StageProps, U as UsePanZoomOptions, Z as ZoomAtOptions, c as centerOn, f as fitStage, s as screenToWorld, u as usePanZoom, w as worldToScreen, z as zoomAt } from './_dts/usePanZoom-Bq73pwFe.js';
14
- export { C as CanvasLayerDescriptor, a as CanvasStackContext, b as CanvasStackContextValue, c as CanvasStackSurface } from './_dts/CanvasStackContext-DQgcH1ny.js';
15
- import { L as LabContribution } from './_dts/index-B0--8PEM.js';
16
- export { A as AddTrialOptions, a as LabAsideRegion, b as LabChromeContext, c as LabContext, d as LabContextValue, e as LabFooterRegion, f as LabHeaderRegion, g as LabRegion, h as LabRegionProps, i as LabSidebarRegion, P as PaletteRegion, j as PaletteRegionProps, S as SidebarRegion, k as SidebarRegionProps, l as StatusRegion, m as StatusRegionProps, T as TitleBarPlacement, n as TitleBarRegion, o as TitleBarRegionProps, p as ToolbarRegion, q as ToolbarRegionProps, V as ViewportRegion, r as ViewportRegionProps, s as addTrial, t as builtinContributions, u as cloneTrial, v as closeTrial, w as contributionsIn, x as labContributions, y as mergeContributions, z as reorderTrials, B as resetTrial, C as suppressContributions, D as toolContributions, E as useLabChromeContext, F as useLabContext } from './_dts/index-B0--8PEM.js';
3
+ import { I as IconProps } from './_dts/Select.d-Cr8-zoup.js';
4
+ export { B as Button, a as ButtonProps, b as ButtonSize, c as ButtonVariant, d as Icon, e as Input, f as InputProps, S as Select, g as SelectProps, T as ToggleBar, h as ToggleBarItem, i as ToggleBarProps, j as ToggleBarSize, k as ToggleBarVariant } from './_dts/Select.d-Cr8-zoup.js';
5
+ export { L as LayerList, a as LayerListItem, b as LayerListProps, c as LayerMove, m as moveLayers } from './_dts/LayerList.d-BoELAMsM.js';
6
+ import { a as PropertyListPack } from './_dts/PropertyField.d-D0ndfIIt.js';
7
+ import { PropertyMetricProps } from './passthrough/weasel-ui.js';
8
+ export { b as PropertyControl, c as PropertyControlProps, d as PropertyField, e as PropertyFieldProps, f as PropertyList, g as PropertyListProps, h as PropertyOption, i as PropertyPanel, j as PropertyPanelProps, k as PropertyRow, l as PropertyRowLayout, m as PropertyRowProps, n as PropertyRowVariant, o as PropertySpan, p as PropertySpanProps } from './_dts/PropertyField.d-D0ndfIIt.js';
9
+ import { StanceProps } from './passthrough/weasel-ui.js';
10
+ import { SceneNode, View, DrawCommand, Path, FillStyle, ScreenLength, StrokeAlign, StyledRun, TextStyle, TextVerticalAlign, Stroke, BuiltinToolId } from '@weasel-js/core';
11
+ import { A as AnnotationMeaning, w as AnnotationData, x as WorldRect, y as MarkStyle, z as MarkScene, B as CaptureSource, E as CaptureOptions, F as CaptureResult, G as PaintableMark, H as AnnotationTarget, J as AnnotationsApi, K as AnnotationsCapability, N as TrialInfo, O as TrialTool, Q as AnnotationKind, b as ViewTransform, R as Instrument, t as InstrumentList, s as LabMode, X as LabDensity, Y as TrialContribution, c as StorageAdapter, T as TrialRecord } from './_dts/types-B7yBTTF9.js';
12
+ export { Z as Annotation, _ as AnnotationInit, $ as AnnotationPatch, a0 as AnnotationQuery, a1 as AnnotationStatus, a2 as AnnotationStoreOptions, a3 as AnnotationTargetInfo, a4 as AnnotationToolId, a5 as Auto, a6 as CanvasCapability, a7 as CanvasLayer, a8 as CaptureDeps, a9 as ContributionBase, C as CreateLabStoreOptions, D as DEFAULT_FRAME, q as DragDropCapability, o as DragFeedback, aa as FracPoint, ab as FracRect, ac as HitResult, ad as IconComponent, ae as LOUPE_DEFAULTS, d as LabDocument, e as LabStoreState, L as LayerCapability, a as LayerDescriptor, af as LoupeCapability, ag as LoupeDeclaration, ah as LoupeMode, ai as LoupePoint, aj as LoupeRenderArgs, n as PaletteItem, P as Point, ak as RegionContribution, al as RenderContext, am as ResolvedLoupe, f as SavedSnapshot, an as SerializedAnnotations, S as SerializedTrial, ao as SidebarSection, ap as SidebarSlotContext, aq as StageCapability, ar as StatusReadout, g as StorageChange, as as SystemEvent, at as ToolCapability, au as ToolItem, av as ToolSlotContext, aw as ToolbarItem, ax as TrialChromeContext, ay as TrialRegion, h as TrialStateHandle, az as UndoCapability, U as UndoStack, i as UndockedPanel, j as UndockedPanels, aA as ViewportControl, V as ViewportSize, W as WorldFrame, l as WorldSpec, aB as annotationsFromJSON, m as applyCamera, aC as auto, aD as createAnnotationScene, aE as createAnnotationStore, k as dockPanel, aF as fracContains, aG as fracEncloses, aH as fracToWorld, aI as isAuto, aJ as markCommands, p as panelKey, r as resolveFrame, aK as resolveLoupe, aL as roundFrac, u as undockPanel, aM as worldToFrac } from './_dts/types-B7yBTTF9.js';
13
+ export { C as CameraContext, a as CameraContextValue, b as CameraInput, d as CameraScope, g as CanvasStack, h as CanvasStackProps, i as Stage, j as StageProps, Z as ZoomAtOptions, k as centerOn, l as fitStage, s as screenToWorld, w as worldToScreen, z as zoomAt } from './_dts/Stage-DWBBi8IU.js';
14
+ export { C as CanvasLayerDescriptor, a as CanvasStackContext, b as CanvasStackContextValue, c as CanvasStackSurface } from './_dts/CanvasStackContext-Wo6OwIVM.js';
15
+ import { L as LabContribution } from './_dts/index-CKyX0ME_.js';
16
+ export { A as AddTrialOptions, a as LabAsideRegion, b as LabChromeContext, c as LabContext, d as LabContextValue, e as LabFooterRegion, f as LabHeaderRegion, g as LabRegion, h as LabRegionProps, i as LabSidebarRegion, P as PaletteRegion, j as PaletteRegionProps, S as SidebarRegion, k as SidebarRegionProps, l as StatusRegion, m as StatusRegionProps, T as TitleBarPlacement, n as TitleBarRegion, o as TitleBarRegionProps, p as ToolbarRegion, q as ToolbarRegionProps, V as ViewportRegion, r as ViewportRegionProps, s as addTrial, t as builtinContributions, u as cloneTrial, v as closeTrial, w as contributionsIn, x as labContributions, y as mergeContributions, z as reorderTrials, B as resetTrial, C as suppressContributions, D as toolContributions, E as useLabChromeContext, F as useLabContext } from './_dts/index-CKyX0ME_.js';
17
17
  export { BaseNode, BooleanNode, ColorNode, CustomNode, EnumNode, GroupNode, ListNode, NumberNode, SectionTree, StringNode, ValueNode, applyRules, autoPathsOf, builtinRules, f, fillConfigDefaults, fromConfigFields, hasConfigPath, isConfigBranch, isLeafVisible, resolveAutoConfig, resolveConfigSchema, schemaNodeAtPath, sectionTree, titleCase, useConfigSchema, useResolvedConfig, valueAtPath, withValueAtPath } from './config/index.js';
18
- import { c as ConfigSchema, b as ConfigField, d as ConfigRule, C as ControlRenderer } from './_dts/types-B7y8hX1D.js';
19
- export { A as Annotations, B as BranchAnnotations, e as BranchOptions, f as CheckboxField, g as ColorField, h as ConfigBranch, i as ConfigEntry, j as ConfigFieldBase, k as ConfigFieldType, l as ConfigNode, m as ConfigOf, n as ConfigOption, a as ConfigPath, o as ConfigRuleContext, p as ConfigShape, E as EntryValue, I as InferConfig, L as LeafPatch, N as NodeOptions, q as NodeValue, r as NumberField, R as ResolvedConfig, S as SectionSpec, s as SelectField, t as SelectOption, u as SliderField, T as TextField, V as ValueAtPath } from './_dts/types-B7y8hX1D.js';
20
- export { I as InDialogOptions, i as inDialog, s as summarizeValue } from './_dts/inDialog-D5ZKGjiD.js';
18
+ import { b as ConfigSchema, a as ConfigField, c as ConfigRule, d as ControlRenderer } from './_dts/types-DTuViBvc.js';
19
+ export { A as Annotations, B as BranchAnnotations, e as BranchOptions, f as CheckboxField, g as ColorField, h as ConfigBranch, i as ConfigEntry, j as ConfigFieldBase, k as ConfigFieldType, l as ConfigNode, m as ConfigOf, n as ConfigOption, C as ConfigPath, o as ConfigRuleContext, p as ConfigShape, D as DialogSpec, E as EntryValue, I as InDialogOptions, q as InferConfig, L as LeafPatch, N as NodeOptions, r as NodeValue, s as NumberField, R as ResolvedConfig, S as SectionOption, t as SectionSpec, u as SelectField, v as SelectOption, w as SliderField, T as TextField, V as ValueAtPath } from './_dts/types-DTuViBvc.js';
20
+ export { ControlPanel, inDialog, summarizeValue } from './controls/index.js';
21
21
  import { J as JobHandle } from './_dts/types-DJ79Tg5J.js';
22
22
  export { a as JobCapability, b as JobEvent, c as JobFailure, d as JobStatus } from './_dts/types-DJ79Tg5J.js';
23
23
  export { UseJobOptions, useJob } from './job/index.js';
24
24
  import { Theme, ColorList } from '@weasel-js/theme';
25
25
  export { CanvasLoupe, CanvasLoupeProps, DomLoupe, DomLoupeProps, LOUPE_MAGNIFY_ID, LOUPE_PEEK_ID, LensCamera, LoupeBubble, LoupeBubbleProps, LoupeGestures, LoupeGesturesProps, LoupeInputApi, LoupeState, SourceRect, TrialLoupe, TrialLoupeProps, UseLoupeOptions, createLoupeActions, drawCanvasLens, lensCamera, lensSourceRect, sampleStack, useLoupe } from './loupe/index.js';
26
+ export { a as FloatingPanel, F as FloatingPanelProps } from './_dts/FloatingPanel-7j0IcXwz.js';
26
27
  import { SplitProps } from './primitives/index.js';
27
- export { FloatingPanel, FloatingPanelProps, FpsMeter, JobProgress, JobProgressProps, Legend, LegendEntry, LegendMark, LegendProps, ScaleIndicator, ScaleIndicatorProps, Split, StatusBar, StatusBarProps, StatusBarSectionProps, Toolbar, ToolbarButtonProps, ToolbarGroupProps, ToolbarProps, ZoomControl, ZoomControlProps } from './primitives/index.js';
28
- export { C as CURRENT_DOCUMENT_VERSION, I as IndexedDbAdapterOptions, 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, 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';
28
+ export { FpsMeter, JobProgress, JobProgressProps, Legend, LegendEntry, LegendMark, LegendProps, ScaleIndicator, ScaleIndicatorProps, Split, StatusBar, StatusBarProps, StatusBarSectionProps, Toolbar, ToolbarButtonProps, ToolbarGroupProps, ToolbarProps, ZoomControl, ZoomControlProps } from './primitives/index.js';
29
+ export { C as CURRENT_DOCUMENT_VERSION, I as IndexedDbAdapterOptions, 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, 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-CMaV6UD4.js';
29
30
  export { Box, Rect, SurfaceCanvasContext, SurfaceCanvases, SurfaceClear, SurfaceContext, SurfaceFrame, SurfaceHandle, SurfaceLayer, TilePainter, UseTiledSurfaceOptions, composeRects, rectsEqual, toDeviceRect, useSurface, useSurfaceCanvas, useSurfaceOptional, useSurfaceTile, useTileId, useTiledSurface } from './surface/index.js';
30
31
  export { EventBus, EventListener, clearUndo, createEventBus, emptyStack, pushSnapshot, redo, undo } from './undo/index.js';
31
32
  import 'react-aria-components';
32
- import './_dts/number.d-OeQYQoUO.js';
33
33
  import 'windease';
34
34
  import 'zustand/vanilla';
35
35
 
36
- declare const ResetIcon: (p: IconProps) => react_jsx_runtime.JSX.Element;
37
- declare const CloseIcon: (p: IconProps) => react_jsx_runtime.JSX.Element;
38
- declare const PlayIcon: (p: IconProps) => react_jsx_runtime.JSX.Element;
39
- declare const PauseIcon: (p: IconProps) => react_jsx_runtime.JSX.Element;
40
- declare const StopIcon: (p: IconProps) => react_jsx_runtime.JSX.Element;
41
- declare const StepBackIcon: (p: IconProps) => react_jsx_runtime.JSX.Element;
42
- declare const StepForwardIcon: (p: IconProps) => react_jsx_runtime.JSX.Element;
43
- declare const CollapseIcon: (p: IconProps) => react_jsx_runtime.JSX.Element;
44
- declare const ExpandIcon: (p: IconProps) => react_jsx_runtime.JSX.Element;
36
+ declare const ResetIcon: (p: IconProps) => react.JSX.Element;
37
+ declare const CloseIcon: (p: IconProps) => react.JSX.Element;
38
+ declare const PlayIcon: (p: IconProps) => react.JSX.Element;
39
+ declare const PauseIcon: (p: IconProps) => react.JSX.Element;
40
+ declare const StopIcon: (p: IconProps) => react.JSX.Element;
41
+ declare const StepBackIcon: (p: IconProps) => react.JSX.Element;
42
+ declare const StepForwardIcon: (p: IconProps) => react.JSX.Element;
43
+ declare const CollapseIcon: (p: IconProps) => react.JSX.Element;
44
+ declare const ExpandIcon: (p: IconProps) => react.JSX.Element;
45
45
 
46
46
  /** An annotation drawn over a curve plot: a shaded band across a range of x,
47
47
  * or a vertical line at one x. */
@@ -78,7 +78,7 @@ interface CurveFieldProps {
78
78
  * `CurveEditor`; consumers wanting the raw editor (2D paths,
79
79
  * custom anchors) should import that instead.
80
80
  */
81
- declare function CurveField({ values, min, max, step, width, height, defaults, onChange, marks, }: CurveFieldProps): react_jsx_runtime.JSX.Element;
81
+ declare function CurveField({ values, min, max, step, width, height, defaults, onChange, marks, }: CurveFieldProps): react.JSX.Element;
82
82
 
83
83
  /** Props for `<PropertyGroup>`. */
84
84
  interface PropertyGroupProps extends PropertyMetricProps, StanceProps {
@@ -128,7 +128,7 @@ interface PropertyGroupProps extends PropertyMetricProps, StanceProps {
128
128
  * `leading` and `actions` put a handle and controls in the title row, and the
129
129
  * groups of a `<PropertyList>` reorder with `useReorderDragList`.
130
130
  */
131
- declare function PropertyGroup({ title, leading, actions, description, hidden, collapsible, defaultCollapsed, collapsed, onCollapsedChange, children, className, span, pack, density, align, stance, tone, }: PropertyGroupProps): react_jsx_runtime.JSX.Element | null;
131
+ declare function PropertyGroup({ title, leading, actions, description, hidden, collapsible, defaultCollapsed, collapsed, onCollapsedChange, children, className, span, pack, density, align, stance, tone, }: PropertyGroupProps): react.JSX.Element | null;
132
132
 
133
133
  /** Props for `<Subpanel>`. */
134
134
  interface SubpanelProps extends PropertyMetricProps, StanceProps {
@@ -139,7 +139,7 @@ interface SubpanelProps extends PropertyMetricProps, StanceProps {
139
139
  /** A typographic divider inside a property list: a small title flanked by a
140
140
  * rule. Purely a heading — use `<PropertyGroup>` for a bordered section. A
141
141
  * stance or tone colors the title and rule. */
142
- declare function Subpanel({ title, children, className, density, align, stance, tone }: SubpanelProps): react_jsx_runtime.JSX.Element;
142
+ declare function Subpanel({ title, children, className, density, align, stance, tone }: SubpanelProps): react.JSX.Element;
143
143
 
144
144
  /** A design token as `TokenPanel` edits it. */
145
145
  interface TokenEntry {
@@ -217,7 +217,7 @@ interface TokenPanelProps {
217
217
  * for a font weight, a curve beside a `cubic-bezier()`, a swatch beside a color,
218
218
  * and text for everything else.
219
219
  */
220
- declare function TokenPanel({ tokens, onChange, collapsed, onCollapsedChange, scales, onScaleChange, categorize, familySize, density, className, }: TokenPanelProps): react_jsx_runtime.JSX.Element;
220
+ declare function TokenPanel({ tokens, onChange, collapsed, onCollapsedChange, scales, onScaleChange, categorize, familySize, density, className, }: TokenPanelProps): react.JSX.Element;
221
221
 
222
222
  /** Props for {@link Jog}. */
223
223
  interface JogProps {
@@ -244,34 +244,7 @@ interface JogProps {
244
244
  *
245
245
  * Named for the jog of jog/shuttle — moving one frame at a time, as against running at speed.
246
246
  */
247
- declare function Jog(props: JogProps): react_jsx_runtime.JSX.Element;
248
-
249
- /** The subset of a mark's scene node this needs: where it is, and what it is. */
250
- interface PaintableMark {
251
- pose: WorldRect;
252
- data: AnnotationData;
253
- }
254
- /** How a mark is drawn, as opposed to where. Resolved by the overlay from the
255
- * instrument's vocabulary and the mark's own staleness. */
256
- interface MarkStyle {
257
- /** The status's color, or the default. */
258
- color?: string;
259
- /** A mark whose stored position no longer describes the picture. Drawn
260
- * dashed rather than hidden: it still describes *something*, and dropping
261
- * it would lose it. */
262
- stale?: boolean;
263
- }
264
- /**
265
- * What one mark draws, in its target's world.
266
- *
267
- * Pure: a node and the target's content box in, draw commands out. Geometry
268
- * that a bounding box cannot describe — a line's ends, a stroke's path — comes
269
- * from `data.points`, which is in fractions like the bounds.
270
- */
271
- declare function markCommands(m: PaintableMark, content: {
272
- w: number;
273
- h: number;
274
- }, style?: MarkStyle): DrawCommand[];
247
+ declare function Jog(props: JogProps): react.JSX.Element;
275
248
 
276
249
  /** What resolving a mark's appearance needs beyond the mark itself. */
277
250
  interface MarkDrawOptions {
@@ -348,7 +321,7 @@ declare function captureTarget(args: CaptureArgs, opts?: CaptureOptions): Promis
348
321
  * Reads the store through the hook the way `<MarkList>` does — the chrome
349
322
  * context carries no instrument state and is not the route to it.
350
323
  */
351
- declare function ExportMenu(): react_jsx_runtime.JSX.Element | null;
324
+ declare function ExportMenu(): react.JSX.Element | null;
352
325
 
353
326
  /** Props for `<MarkList>`. */
354
327
  interface MarkListProps {
@@ -363,7 +336,7 @@ interface MarkListProps {
363
336
  *
364
337
  * Reads the store through the hook, which re-renders on every mutation — so a
365
338
  * mark drawn on a pane appears here without anything wiring the two. */
366
- declare function MarkList({ meaning, config }: MarkListProps): react_jsx_runtime.JSX.Element;
339
+ declare function MarkList({ meaning, config }: MarkListProps): react.JSX.Element;
367
340
 
368
341
  /**
369
342
  * Whether a stored mark still describes the picture the current config
@@ -685,7 +658,7 @@ interface AnnotationTargetsProps {
685
658
  activeToolId: string | null;
686
659
  }
687
660
  /** One overlay per region the instrument said accepts marks. */
688
- declare function AnnotationTargets({ capability, state, config, trial, annotations, activeToolId, }: AnnotationTargetsProps): react_jsx_runtime.JSX.Element;
661
+ declare function AnnotationTargets({ capability, state, config, trial, annotations, activeToolId, }: AnnotationTargetsProps): react.JSX.Element;
689
662
 
690
663
  /** Which weasel tool an annotation tool drives, and what kind of mark that
691
664
  * makes. `select` makes none. */
@@ -804,7 +777,7 @@ declare function currentPage(path: string, pages: readonly LabPage[]): number;
804
777
  *
805
778
  * Pages accumulate -- a project grows a wall, a dashboard, an ingest page, a
806
779
  * bench -- and a tab strip is the layout that stops working first. */
807
- declare function LabSwitcher({ title, pages, path, className }: LabSwitcherProps): react_jsx_runtime.JSX.Element;
780
+ declare function LabSwitcher({ title, pages, path, className }: LabSwitcherProps): react.JSX.Element;
808
781
 
809
782
  interface LabBaseProps {
810
783
  /** May change while mounted. An instrument that is a different object from
@@ -877,7 +850,7 @@ type LabProps = LabBaseProps & ({
877
850
  });
878
851
  /** The lab runtime: opens the store, provides it, and renders one trial
879
852
  * per record in a grid. Each trial runs one of `instruments`. */
880
- declare function Lab(props: LabProps): string | number | bigint | boolean | Iterable<ReactNode> | Promise<string | number | bigint | boolean | react.ReactPortal | react.ReactElement<unknown, string | react.JSXElementConstructor<any>> | Iterable<ReactNode> | null | undefined> | react_jsx_runtime.JSX.Element | null;
853
+ declare function Lab(props: LabProps): string | number | bigint | boolean | Iterable<ReactNode> | Promise<string | number | bigint | boolean | react.ReactPortal | react.ReactElement<unknown, string | react.JSXElementConstructor<any>> | Iterable<ReactNode> | null | undefined> | react.JSX.Element | null;
881
854
 
882
855
  /** Props for `<LabBoundary>`. */
883
856
  interface LabBoundaryProps {
@@ -892,7 +865,7 @@ interface LabBoundaryProps {
892
865
  * For a host that shows arbitrary content inside a trial, such as a component workshop; a lab's own chrome
893
866
  * never needs it.
894
867
  */
895
- declare function LabBoundary({ children }: LabBoundaryProps): react_jsx_runtime.JSX.Element;
868
+ declare function LabBoundary({ children }: LabBoundaryProps): react.JSX.Element;
896
869
 
897
870
  /** Props for `<LabPalette>`. */
898
871
  interface LabPaletteProps {
@@ -904,7 +877,7 @@ interface LabPaletteProps {
904
877
  /** The lab's tool rail. Writes the lab's tool slot, which every trial whose
905
878
  * instrument declares no tools of its own resolves to. Renders nothing when
906
879
  * the lab contributes no tool rail. */
907
- declare function LabPalette({ tools, contributions }: LabPaletteProps): react_jsx_runtime.JSX.Element;
880
+ declare function LabPalette({ tools, contributions }: LabPaletteProps): react.JSX.Element;
908
881
 
909
882
  /** Props for `<LabRoot>`. */
910
883
  interface LabRootProps {
@@ -924,7 +897,7 @@ interface LabRootProps {
924
897
  * or those components inherit whatever the host page happens to define.
925
898
  * Pair it with `import '@weasel-js/labkit/styles.css'`, which is what defines
926
899
  * the rules this element scopes. */
927
- declare function LabRoot({ children, mode, className }: LabRootProps): react_jsx_runtime.JSX.Element;
900
+ declare function LabRoot({ children, mode, className }: LabRootProps): react.JSX.Element;
928
901
 
929
902
  /** Props for `<LabShell>`. */
930
903
  interface LabShellProps {
@@ -949,7 +922,7 @@ interface LabShellProps {
949
922
  /** Page frame for a lab: a titled header, a body, and an optional footer,
950
923
  * themed for the resolved color mode. Presentational only — use `<Lab>` when
951
924
  * the trial runtime is wanted too. */
952
- declare function LabShell({ title, children, header, footer, mode, pages, path, documentTitle, }: LabShellProps): react_jsx_runtime.JSX.Element;
925
+ declare function LabShell({ title, children, header, footer, mode, pages, path, documentTitle, }: LabShellProps): react.JSX.Element;
953
926
 
954
927
  /** A tile's persisted extent, keyed by the id its caller gave it. Grid resizes
955
928
  * write `span`; `size` is here because a strategy swap would write that. */
@@ -1011,7 +984,7 @@ interface PanelDescriptor {
1011
984
  title: string;
1012
985
  as: 'tile' | 'floating';
1013
986
  }
1014
- declare function Workspace({ children, ids, panels, resizable, reorderable, onReorder, layout, onLayoutChange, gap, padding, viewport, }: WorkspaceProps): react_jsx_runtime.JSX.Element;
987
+ declare function Workspace({ children, ids, panels, resizable, reorderable, onReorder, layout, onLayoutChange, gap, padding, viewport, }: WorkspaceProps): react.JSX.Element;
1015
988
 
1016
989
  /** The specimen's sections, in page order. */
1017
990
  declare const SPECIMEN_SECTIONS: readonly ["Buttons & toggles", "Fields & pickers", "Panels & property rows", "Overlays & feedback", "Lists & data", "Tool chrome", "Editors & plots", "Lab chrome"];
@@ -1023,7 +996,7 @@ declare const SPECIMEN_SECTIONS: readonly ["Buttons & toggles", "Fields & picker
1023
996
  */
1024
997
  declare function Specimen({ className }: {
1025
998
  className?: string;
1026
- }): react_jsx_runtime.JSX.Element;
999
+ }): react.JSX.Element;
1027
1000
 
1028
1001
  /** The 2D view labkit has always shipped, and what a trial gets when it names no
1029
1002
  * other. Re-exported under its own name so a consumer can say which it means. */
@@ -1051,7 +1024,7 @@ interface TrialProps {
1051
1024
  }
1052
1025
  /** Renders one trial from the lab store: looks up its record and
1053
1026
  * instrument, and mounts the instrument inside the trial chrome. */
1054
- declare function Trial({ id, chrome, suppress }: TrialProps): react_jsx_runtime.JSX.Element;
1027
+ declare function Trial({ id, chrome, suppress }: TrialProps): react.JSX.Element;
1055
1028
 
1056
1029
  /** Props for `<TrialBody>`. */
1057
1030
  interface TrialBodyProps extends Omit<SplitProps, 'sidebar' | 'children' | 'className' | 'sidebarClassName' | 'label'> {
@@ -1064,7 +1037,7 @@ interface TrialBodyProps extends Omit<SplitProps, 'sidebar' | 'children' | 'clas
1064
1037
  contentClassName?: string;
1065
1038
  }
1066
1039
  /** A trial's sidebar and content as a `Split`, wearing the trial's classes. */
1067
- declare function TrialBody({ sidebar, children, contentClassName, ...rest }: TrialBodyProps): react_jsx_runtime.JSX.Element;
1040
+ declare function TrialBody({ sidebar, children, contentClassName, ...rest }: TrialBodyProps): react.JSX.Element;
1068
1041
 
1069
1042
  /** The trial's loupe as its chrome sees it: a switch and its position. */
1070
1043
  interface LoupeBindings {
@@ -1105,7 +1078,7 @@ interface TrialChromeProps {
1105
1078
  /** The frame around a running instrument. Builds one chrome context, assembles
1106
1079
  * the contributions the instrument, the runtime and the lab declare, and hands
1107
1080
  * each region its slice. */
1108
- declare function TrialChrome({ trialId, record, instrument, isLastTrial, undoBindings, job, loupe, trialChrome, chrome, suppress, activeToolId, setActiveTool, children, }: TrialChromeProps): react_jsx_runtime.JSX.Element;
1081
+ declare function TrialChrome({ trialId, record, instrument, isLastTrial, undoBindings, job, loupe, trialChrome, chrome, suppress, activeToolId, setActiveTool, children, }: TrialChromeProps): react.JSX.Element;
1109
1082
 
1110
- export { ANNOTATION_TOOLS, ANNOTATION_WEASEL_TOOLS, AnnotationData, AnnotationKind, AnnotationMeaning, AnnotationOverlay, AnnotationTarget, AnnotationTargets, AnnotationsApi, AnnotationsCapability, AnnotationsContext, CaptureOptions, CaptureResult, CaptureSource, CloseIcon, CollapseIcon, ConfigField, ConfigRule, ConfigSchema, ControlRenderer, CurveField, DEFAULT_VIEW, ExpandIcon, ExportMenu, IconProps, Instrument, InstrumentList, JobHandle, Jog, Lab, LabBoundary, LabContribution, LabDensity, LabMode, LabPalette, LabRoot, LabShell, LabSwitcher, MarkList, MarkScene, PauseIcon, PlayIcon, PropertyGroup, PropertyListPack, ResetIcon, SPECIMEN_SECTIONS, Specimen, SplitProps, StepBackIcon, StepForwardIcon, StopIcon, StorageAdapter, Subpanel, TokenPanel, Trial, TrialBody, TrialChrome, TrialContribution, TrialInfo, TrialRecord, TrialTool, ViewTransform, Workspace, WorldRect, annotationToolInfo, as2DView, capturePlan, captureTarget, composeCaptureSvg, createMarkDrawOne, currentPage, defineInstrument, fitView, fromWeaselView, inferTokenType, interstellarTheme, isStale, markCommands, markSvgNodes, refitScale, resolveMarkStyle, seenFrom, toWeaselView, useAnnotations, useAnnotationsOptional, validateConfigSchema };
1111
- export type { AnnotationOverlayProps, AnnotationTargetsProps, AnnotationToolInfo, CaptureArgs, CapturePlan, ComposeSvgArgs, ContentSize, CurveFieldProps, CurveMark, InstrumentSpec, JogProps, LabBoundaryProps, LabPage, LabPaletteProps, LabProps, LabRootProps, LabShellProps, LabSwitcherProps, MarkDrawOptions, MarkListProps, MarkStyle, PaintableMark, PaneSize, PanelDescriptor, PropertyGroupProps, SubpanelProps, TokenCategory, TokenEntry, TokenPanelProps, TokenScale, TokenScaleRule, TrialBodyProps, TrialChromeProps, TrialLayout, TrialProps, UndoBindings, ValidationResult, ViewTransform2D, WorkspaceProps };
1083
+ export { ANNOTATION_TOOLS, ANNOTATION_WEASEL_TOOLS, AnnotationData, AnnotationKind, AnnotationMeaning, AnnotationOverlay, AnnotationTarget, AnnotationTargets, AnnotationsApi, AnnotationsCapability, AnnotationsContext, CaptureOptions, CaptureResult, CaptureSource, CloseIcon, CollapseIcon, ConfigField, ConfigRule, ConfigSchema, ControlRenderer, CurveField, DEFAULT_VIEW, ExpandIcon, ExportMenu, IconProps, Instrument, InstrumentList, JobHandle, Jog, Lab, LabBoundary, LabContribution, LabDensity, LabMode, LabPalette, LabRoot, LabShell, LabSwitcher, MarkList, MarkScene, MarkStyle, PaintableMark, PauseIcon, PlayIcon, PropertyGroup, PropertyListPack, ResetIcon, SPECIMEN_SECTIONS, Specimen, SplitProps, StepBackIcon, StepForwardIcon, StopIcon, StorageAdapter, Subpanel, TokenPanel, Trial, TrialBody, TrialChrome, TrialContribution, TrialInfo, TrialRecord, TrialTool, ViewTransform, Workspace, WorldRect, annotationToolInfo, as2DView, capturePlan, captureTarget, composeCaptureSvg, createMarkDrawOne, currentPage, defineInstrument, fitView, fromWeaselView, inferTokenType, interstellarTheme, isStale, markSvgNodes, refitScale, resolveMarkStyle, seenFrom, toWeaselView, useAnnotations, useAnnotationsOptional, validateConfigSchema };
1084
+ export type { AnnotationOverlayProps, AnnotationTargetsProps, AnnotationToolInfo, CaptureArgs, CapturePlan, ComposeSvgArgs, ContentSize, CurveFieldProps, CurveMark, InstrumentSpec, JogProps, LabBoundaryProps, LabPage, LabPaletteProps, LabProps, LabRootProps, LabShellProps, LabSwitcherProps, MarkDrawOptions, MarkListProps, PaneSize, PanelDescriptor, PropertyGroupProps, SubpanelProps, TokenCategory, TokenEntry, TokenPanelProps, TokenScale, TokenScaleRule, TrialBodyProps, TrialChromeProps, TrialLayout, TrialProps, UndoBindings, ValidationResult, ViewTransform2D, WorkspaceProps };