@weasel-js/labkit 1.4.4 → 1.5.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 (278) hide show
  1. package/README.md +54 -6
  2. package/dist/_dts/{CanvasStackContext-kTEZvEgE.d.ts → CanvasStackContext-CJNMS6mz.d.ts} +1 -1
  3. package/dist/_dts/{PrefsForm.d-DDHFANkc.d.ts → PrefsForm.d-DPy9I8It.d.ts} +4 -0
  4. package/dist/_dts/Select.d-Gwr8fLpK.d.ts +453 -0
  5. package/dist/_dts/{frac-z7ker2Vx.d.ts → frac-B4okC2lX.d.ts} +291 -31
  6. package/dist/_dts/{index-Blv9uQzu.d.ts → index-BNdz-tNd.d.ts} +105 -17
  7. package/dist/_dts/index-CSJoj4LC.d.ts +248 -0
  8. package/dist/_dts/{types-B9_zrHmb.d.ts → types-DzoNY1pO.d.ts} +91 -4
  9. package/dist/_dts/usePanZoom-Pzf9f2jh.d.ts +160 -0
  10. package/dist/_dts/useTrialState-uLlmaccn.d.ts +212 -0
  11. package/dist/canvas/index.d.ts +18 -129
  12. package/dist/canvas/index.js +4 -2
  13. package/dist/chrome/index.d.ts +5 -93
  14. package/dist/chrome/index.js +10 -6
  15. package/dist/chunk-7PFH3CNM.js +150 -0
  16. package/dist/chunk-7PFH3CNM.js.map +1 -0
  17. package/dist/{chunk-I6JCVE24.js → chunk-CEIUBPPW.js} +143 -17
  18. package/dist/chunk-CEIUBPPW.js.map +1 -0
  19. package/dist/chunk-EH7UEQV7.js +590 -0
  20. package/dist/chunk-EH7UEQV7.js.map +1 -0
  21. package/dist/{chunk-MOM3GOVY.js → chunk-EHGVROVV.js} +125 -27
  22. package/dist/chunk-EHGVROVV.js.map +1 -0
  23. package/dist/{chunk-TJ7QY3OC.js → chunk-ERFMC6WU.js} +160 -78
  24. package/dist/chunk-ERFMC6WU.js.map +1 -0
  25. package/dist/{chunk-CTRKTLYZ.js → chunk-H6ZAOWNE.js} +11 -11
  26. package/dist/chunk-H6ZAOWNE.js.map +1 -0
  27. package/dist/{chunk-64ZCN3DA.js → chunk-IHUVQ3TX.js} +250 -160
  28. package/dist/chunk-IHUVQ3TX.js.map +1 -0
  29. package/dist/{chunk-FQMJUVHJ.js → chunk-IJJUK4FU.js} +53 -46
  30. package/dist/chunk-IJJUK4FU.js.map +1 -0
  31. package/dist/chunk-IXTQI7JX.js +737 -0
  32. package/dist/chunk-IXTQI7JX.js.map +1 -0
  33. package/dist/{chunk-BKFVHKJH.js → chunk-MDVTK5U3.js} +4 -4
  34. package/dist/{chunk-BKFVHKJH.js.map → chunk-MDVTK5U3.js.map} +1 -1
  35. package/dist/chunk-PHK4W562.js +72 -0
  36. package/dist/chunk-PHK4W562.js.map +1 -0
  37. package/dist/chunk-PJ7WEQBJ.js +18 -0
  38. package/dist/chunk-PJ7WEQBJ.js.map +1 -0
  39. package/dist/chunk-RWNDDKOH.js +682 -0
  40. package/dist/chunk-RWNDDKOH.js.map +1 -0
  41. package/dist/chunk-T3EC2DXD.js +12628 -0
  42. package/dist/chunk-T3EC2DXD.js.map +1 -0
  43. package/dist/{chunk-SMHP6XZ4.js → chunk-UN4U4P63.js} +10 -8
  44. package/dist/chunk-UN4U4P63.js.map +1 -0
  45. package/dist/chunk-WIG6XHJ7.js +35 -0
  46. package/dist/chunk-WIG6XHJ7.js.map +1 -0
  47. package/dist/chunk-Z76KEZAX.js +15 -0
  48. package/dist/chunk-Z76KEZAX.js.map +1 -0
  49. package/dist/chunk-ZDHY47EV.js +363 -0
  50. package/dist/chunk-ZDHY47EV.js.map +1 -0
  51. package/dist/config/index.d.ts +276 -0
  52. package/dist/config/index.js +8 -0
  53. package/dist/config/index.js.map +1 -0
  54. package/dist/controls/index.d.ts +3 -4
  55. package/dist/controls/index.js +4 -3
  56. package/dist/dragdrop/index.d.ts +3 -5
  57. package/dist/index.d.ts +266 -413
  58. package/dist/index.js +1775 -2251
  59. package/dist/index.js.map +1 -1
  60. package/dist/layers/index.d.ts +4 -6
  61. package/dist/layers/index.js +2 -2
  62. package/dist/loupe/index.d.ts +69 -20
  63. package/dist/loupe/index.js +2 -2
  64. package/dist/passthrough/weasel-ui.d.ts +175 -309
  65. package/dist/passthrough/weasel-ui.js +1 -1
  66. package/dist/primitives/index.d.ts +55 -6
  67. package/dist/primitives/index.js +6 -4
  68. package/dist/state/index.d.ts +13 -8
  69. package/dist/state/index.js +18 -13
  70. package/dist/state/index.js.map +1 -1
  71. package/dist/styles.css +223 -76
  72. package/dist/surface/index.d.ts +44 -7
  73. package/dist/surface/index.js +2 -1
  74. package/dist/ui/layers/index.js +1 -1
  75. package/dist/undo/index.d.ts +3 -5
  76. package/package.json +15 -8
  77. package/src/annotations/AnnotationOverlay.tsx +56 -5
  78. package/src/annotations/Annotations.less +4 -0
  79. package/src/annotations/Annotations.overlay.test.tsx +105 -6
  80. package/src/annotations/drawOne.test.ts +1 -1
  81. package/src/annotations/drawOne.ts +2 -2
  82. package/src/annotations/paint.test.ts +2 -2
  83. package/src/annotations/paint.ts +1 -1
  84. package/src/annotations/preload.ts +6 -0
  85. package/src/annotations/store.test.ts +18 -0
  86. package/src/annotations/store.ts +5 -4
  87. package/src/annotations/svgNodes.test.ts +2 -2
  88. package/src/annotations/svgNodes.ts +1 -0
  89. package/src/annotations/toolMap.test.ts +9 -5
  90. package/src/annotations/toolMap.ts +6 -3
  91. package/src/annotations/types.ts +6 -3
  92. package/src/canvas/CameraWheelContext.ts +12 -0
  93. package/src/canvas/CanvasStack.stories.tsx +1 -1
  94. package/src/canvas/CanvasStack.test.tsx +25 -0
  95. package/src/canvas/CanvasStack.tsx +31 -4
  96. package/src/canvas/Stage.less +18 -0
  97. package/src/canvas/Stage.test.tsx +186 -0
  98. package/src/canvas/Stage.tsx +134 -0
  99. package/src/canvas/camera.test.ts +17 -2
  100. package/src/canvas/camera.ts +9 -9
  101. package/src/canvas/index.ts +4 -0
  102. package/src/canvas/usePanZoom.test.ts +28 -0
  103. package/src/canvas/usePanZoom.ts +21 -9
  104. package/src/chrome/ChromeRegions.stories.tsx +1 -4
  105. package/src/chrome/LabChrome.tsx +130 -0
  106. package/src/chrome/builtins.test.ts +1 -0
  107. package/src/chrome/builtins.tsx +21 -31
  108. package/src/chrome/index.ts +16 -0
  109. package/src/chrome/labRegions.test.tsx +208 -0
  110. package/src/chrome/labTypes.ts +50 -0
  111. package/src/chrome/merge.ts +7 -9
  112. package/src/chrome/regions/PaletteRegion.test.tsx +6 -4
  113. package/src/chrome/regions/PaletteRegion.tsx +16 -9
  114. package/src/chrome/regions/SidebarRegion.stories.tsx +44 -0
  115. package/src/chrome/regions/SidebarRegion.tsx +25 -13
  116. package/src/chrome/regions/StatusRegion.tsx +15 -8
  117. package/src/chrome/regions/ToolbarRegion.tsx +34 -16
  118. package/src/chrome/types.ts +50 -20
  119. package/src/config/auto.test.ts +12 -0
  120. package/src/config/auto.ts +15 -0
  121. package/src/config/autoConfig.test.ts +107 -0
  122. package/src/config/autoConfig.ts +153 -0
  123. package/src/config/builder.test.ts +42 -0
  124. package/src/config/builder.ts +68 -17
  125. package/src/config/declarationEmit.fixture.ts +11 -0
  126. package/src/config/declarationEmit.test.ts +51 -0
  127. package/src/config/entry.test.ts +46 -0
  128. package/src/config/index.ts +16 -1
  129. package/src/config/nodeClasses.test.ts +18 -0
  130. package/src/config/path.ts +7 -2
  131. package/src/config/resolve.test.ts +25 -0
  132. package/src/config/resolve.ts +17 -1
  133. package/src/config/types.ts +34 -2
  134. package/src/config/useResolvedConfig.ts +26 -0
  135. package/src/controls/AutoControls.stories.tsx +88 -0
  136. package/src/controls/ControlPanel.stories.tsx +42 -1
  137. package/src/controls/ControlPanel.test.tsx +530 -4
  138. package/src/controls/ControlPanel.tsx +562 -82
  139. package/src/fake-indexeddb-auto.d.ts +5 -0
  140. package/src/index.test.ts +7 -0
  141. package/src/index.ts +66 -5
  142. package/src/instrument/serializers.test.ts +22 -0
  143. package/src/instrument/serializers.ts +40 -1
  144. package/src/instrument/types.ts +25 -1
  145. package/src/lab/Lab.chrome.test.tsx +16 -0
  146. package/src/lab/Lab.less +4 -13
  147. package/src/lab/Lab.persist.test.tsx +147 -0
  148. package/src/lab/Lab.stories.tsx +1 -3
  149. package/src/lab/Lab.surface.test.tsx +71 -3
  150. package/src/lab/Lab.test.tsx +168 -16
  151. package/src/lab/Lab.tsx +434 -129
  152. package/src/lab/LabContext.ts +8 -0
  153. package/src/lab/LabFit.stories.less +18 -0
  154. package/src/lab/LabFit.stories.tsx +219 -0
  155. package/src/lab/LabFullChrome.stories.tsx +1 -4
  156. package/src/lab/LabHeader.test.tsx +40 -9
  157. package/src/lab/LabHeader.tsx +7 -14
  158. package/src/lab/LabPalette.tsx +13 -26
  159. package/src/lab/LabRoot.test.tsx +56 -0
  160. package/src/lab/LabRoot.tsx +47 -0
  161. package/src/lab/LabShell.less +73 -15
  162. package/src/lab/LabShell.stories.tsx +50 -1
  163. package/src/lab/LabShell.tsx +18 -27
  164. package/src/lab/LabSwitcher.less +18 -11
  165. package/src/lab/LabSwitcher.test.tsx +14 -9
  166. package/src/lab/LabSwitcher.tsx +8 -4
  167. package/src/lab/Workspace.less +1 -1
  168. package/src/lab/Workspace.stories.tsx +1 -1
  169. package/src/lab/Workspace.surface.test.tsx +1 -0
  170. package/src/lab/fitCheck.test.ts +57 -0
  171. package/src/lab/fitCheck.ts +125 -0
  172. package/src/lab/index.ts +2 -0
  173. package/src/layers/LayerList.stories.tsx +1 -1
  174. package/src/loupe/AGENTS.md +17 -5
  175. package/src/loupe/Loupe.less +1 -1
  176. package/src/loupe/LoupeGestures.tsx +67 -0
  177. package/src/loupe/TrialLoupe.tsx +43 -28
  178. package/src/loupe/canvasLens.ts +1 -1
  179. package/src/loupe/index.ts +4 -0
  180. package/src/loupe/loupeActions.ts +98 -0
  181. package/src/loupe/types.ts +1 -1
  182. package/src/loupe/useLoupe.test.tsx +60 -3
  183. package/src/loupe/useLoupe.ts +29 -49
  184. package/src/passthrough/weasel-ui.ts +9 -0
  185. package/src/primitives/FloatingPanel.stories.tsx +14 -2
  186. package/src/primitives/FloatingPanel.test.tsx +47 -16
  187. package/src/primitives/FloatingPanel.tsx +11 -25
  188. package/src/primitives/FpsMeter.stories.tsx +1 -1
  189. package/src/primitives/JobProgress.stories.tsx +1 -1
  190. package/src/primitives/Legend.stories.tsx +1 -1
  191. package/src/primitives/ScaleIndicator.stories.tsx +1 -1
  192. package/src/primitives/Sidebar.less +7 -0
  193. package/src/primitives/Sidebar.stories.tsx +1 -1
  194. package/src/primitives/Split.less +14 -0
  195. package/src/primitives/Split.test.tsx +133 -0
  196. package/src/primitives/Split.tsx +175 -0
  197. package/src/primitives/StatusBar.stories.tsx +1 -1
  198. package/src/primitives/Toolbar.stories.tsx +1 -1
  199. package/src/primitives/ZoomControl.tsx +5 -2
  200. package/src/primitives/index.ts +2 -0
  201. package/src/specimen/Specimen.less +95 -0
  202. package/src/specimen/Specimen.stories.tsx +13 -0
  203. package/src/specimen/Specimen.test.tsx +13 -0
  204. package/src/specimen/Specimen.tsx +888 -0
  205. package/src/state/Persistence.stories.tsx +75 -0
  206. package/src/state/Persistence.tsx +33 -0
  207. package/src/state/SingletonExperiment.test.tsx +47 -53
  208. package/src/state/SingletonExperiment.tsx +24 -13
  209. package/src/state/adapterContract.ts +116 -0
  210. package/src/state/adapters.test.ts +113 -61
  211. package/src/state/adapters.ts +328 -69
  212. package/src/state/document.test.ts +71 -96
  213. package/src/state/document.ts +66 -52
  214. package/src/state/helpers.test.ts +1 -1
  215. package/src/state/index.ts +8 -0
  216. package/src/state/labRecords.test.ts +105 -0
  217. package/src/state/labRecords.ts +160 -0
  218. package/src/state/openLabStore.test.ts +658 -0
  219. package/src/state/openLabStore.ts +403 -0
  220. package/src/state/records.test.ts +234 -0
  221. package/src/state/records.ts +219 -0
  222. package/src/state/store.test.ts +169 -635
  223. package/src/state/store.ts +146 -163
  224. package/src/state/toolSlot.test.ts +1 -1
  225. package/src/state/types.ts +65 -17
  226. package/src/state/useOpenOnce.ts +68 -0
  227. package/src/state/usePersistedState.test.tsx +125 -0
  228. package/src/state/usePersistedState.ts +66 -0
  229. package/src/state/useTrialState.test.tsx +87 -3
  230. package/src/state/useTrialState.ts +9 -1
  231. package/src/state/view.test.ts +49 -15
  232. package/src/state/view.ts +18 -1
  233. package/src/styles.less +3 -0
  234. package/src/surface/AGENTS.md +39 -7
  235. package/src/surface/SurfaceContext.ts +26 -3
  236. package/src/surface/index.ts +2 -0
  237. package/src/surface/useSurfaceTile.test.tsx +1 -0
  238. package/src/surface/useSurfaceTile.ts +6 -5
  239. package/src/surface/useTiledSurface.test.tsx +231 -1
  240. package/src/surface/useTiledSurface.ts +76 -15
  241. package/src/theme/Interstellar.stories.tsx +9 -9
  242. package/src/theme/interstellar.test.ts +17 -6
  243. package/src/theme/interstellar.theme.json +180 -0
  244. package/src/theme/interstellar.ts +8 -5
  245. package/src/tools/labTool.ts +11 -0
  246. package/src/trial/Trial.annotations.persist.test.tsx +100 -58
  247. package/src/trial/Trial.annotations.test.tsx +59 -7
  248. package/src/trial/Trial.canvas.test.tsx +32 -0
  249. package/src/trial/Trial.config.test.tsx +75 -2
  250. package/src/trial/Trial.job.test.tsx +3 -3
  251. package/src/trial/Trial.less +5 -26
  252. package/src/trial/Trial.stories.tsx +5 -3
  253. package/src/trial/Trial.test.tsx +31 -4
  254. package/src/trial/Trial.trialId.test.tsx +23 -1
  255. package/src/trial/Trial.tsx +139 -52
  256. package/src/trial/TrialBody.tsx +17 -141
  257. package/src/trial/TrialChrome.tsx +24 -7
  258. package/src/trial/trialOps.test.ts +101 -1
  259. package/src/trial/trialOps.ts +67 -7
  260. package/dist/_dts/types-BP2OCcpg.d.ts +0 -155
  261. package/dist/_dts/types-x92Kfeme.d.ts +0 -62
  262. package/dist/_dts/useTrialState-D6Vb3T-g.d.ts +0 -99
  263. package/dist/chunk-2P6PP5N4.js +0 -553
  264. package/dist/chunk-2P6PP5N4.js.map +0 -1
  265. package/dist/chunk-64ZCN3DA.js.map +0 -1
  266. package/dist/chunk-CTRKTLYZ.js.map +0 -1
  267. package/dist/chunk-E44SU6XS.js +0 -50
  268. package/dist/chunk-E44SU6XS.js.map +0 -1
  269. package/dist/chunk-FQMJUVHJ.js.map +0 -1
  270. package/dist/chunk-I6JCVE24.js.map +0 -1
  271. package/dist/chunk-MOM3GOVY.js.map +0 -1
  272. package/dist/chunk-SMHP6XZ4.js.map +0 -1
  273. package/dist/chunk-TJ7QY3OC.js.map +0 -1
  274. package/dist/chunk-U3IYHIAE.js +0 -343
  275. package/dist/chunk-U3IYHIAE.js.map +0 -1
  276. package/dist/chunk-W3ECWC2K.js +0 -7335
  277. package/dist/chunk-W3ECWC2K.js.map +0 -1
  278. package/src/theme/interstellar.tokens.json +0 -61
@@ -1,12 +1,10 @@
1
- import { E as LayerDescriptor } from '../_dts/frac-z7ker2Vx.js';
2
- export { B as LayerCapability } from '../_dts/frac-z7ker2Vx.js';
1
+ import { aa as LayerDescriptor } from '../_dts/frac-B4okC2lX.js';
2
+ export { a9 as LayerCapability } from '../_dts/frac-B4okC2lX.js';
3
3
  import * as react_jsx_runtime from 'react/jsx-runtime';
4
4
  import 'react';
5
- import '../_dts/types-B9_zrHmb.js';
5
+ import '../_dts/types-DzoNY1pO.js';
6
6
  import '@weasel-js/core';
7
- import '../_dts/PrefsForm.d-DDHFANkc.js';
8
- import '../_dts/types-x92Kfeme.js';
9
- import '../_dts/types-BP2OCcpg.js';
7
+ import '../_dts/PrefsForm.d-DPy9I8It.js';
10
8
  import '../_dts/types-DJ79Tg5J.js';
11
9
 
12
10
  /** A layer that may itself contain layers. A plain `LayerDescriptor` is one
@@ -1,5 +1,5 @@
1
- export { LayerList } from '../chunk-BKFVHKJH.js';
1
+ export { LayerList } from '../chunk-MDVTK5U3.js';
2
2
  import '../chunk-SBXNQW4G.js';
3
- import '../chunk-W3ECWC2K.js';
3
+ import '../chunk-T3EC2DXD.js';
4
4
  //# sourceMappingURL=index.js.map
5
5
  //# sourceMappingURL=index.js.map
@@ -1,13 +1,11 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import { ae as LoupePoint, af as LoupeMode, V as ViewTransform, W as WorldFrame, c as WorldSpec, a2 as ViewportSize, K as LoupeRenderArgs, N as ResolvedLoupe } from '../_dts/frac-z7ker2Vx.js';
3
- export { L as LOUPE_DEFAULTS, G as LoupeCapability, J as LoupeDeclaration, ab as resolveLoupe } from '../_dts/frac-z7ker2Vx.js';
4
- import { c as CanvasStackSurface, C as CanvasLayerDescriptor } from '../_dts/CanvasStackContext-kTEZvEgE.js';
2
+ import { aG as LoupePoint, aH as LoupeMode, k as ViewTransform, W as WorldFrame, a as WorldSpec, V as ViewportSize, ad as LoupeRenderArgs, ag as ResolvedLoupe } from '../_dts/frac-B4okC2lX.js';
3
+ export { a8 as LOUPE_DEFAULTS, ab as LoupeCapability, ac as LoupeDeclaration, aD as resolveLoupe } from '../_dts/frac-B4okC2lX.js';
4
+ import { c as CanvasStackSurface, C as CanvasLayerDescriptor } from '../_dts/CanvasStackContext-CJNMS6mz.js';
5
5
  import { RefObject, ReactNode } from 'react';
6
- import '../_dts/types-B9_zrHmb.js';
7
- import '@weasel-js/core';
8
- import '../_dts/PrefsForm.d-DDHFANkc.js';
9
- import '../_dts/types-x92Kfeme.js';
10
- import '../_dts/types-BP2OCcpg.js';
6
+ import { Action } from '@weasel-js/core';
7
+ import '../_dts/types-DzoNY1pO.js';
8
+ import '../_dts/PrefsForm.d-DPy9I8It.js';
11
9
  import '../_dts/types-DJ79Tg5J.js';
12
10
 
13
11
  /** Props for `<CanvasLoupe>`. */
@@ -56,7 +54,7 @@ interface SourceRect {
56
54
  */
57
55
  declare function lensSourceRect(aim: LoupePoint, factor: number, diameter: number, dpr: number): SourceRect;
58
56
  /**
59
- * The colour a stack presents at a point: the topmost visible layer with
57
+ * The color a stack presents at a point: the topmost visible layer with
60
58
  * anything opaque there, or `null` when every layer is transparent — which is
61
59
  * the honest answer for a point showing nothing but the workspace behind.
62
60
  */
@@ -120,6 +118,53 @@ interface LoupeBubbleProps {
120
118
  */
121
119
  declare function LoupeBubble({ aim, diameter, hostRef, children }: LoupeBubbleProps): react_jsx_runtime.JSX.Element;
122
120
 
121
+ /**
122
+ * The loupe's two bindable interactions, as `Action` descriptors the gesture
123
+ * dispatcher routes: hold a key to peek, and walk the magnification with the
124
+ * wheel.
125
+ *
126
+ * Free of React so the routing can be tested without a DOM.
127
+ */
128
+
129
+ /** Canonical id of the hold-to-peek action. */
130
+ declare const LOUPE_PEEK_ID = "loupe.peek";
131
+ /** Canonical id of the wheel-magnify action. */
132
+ declare const LOUPE_MAGNIFY_ID = "loupe.magnify";
133
+ /** What the actions do to a live loupe. Every member is read through the
134
+ * object on each invocation, so one stable instance serves the life of the
135
+ * registration. */
136
+ interface LoupeInputApi {
137
+ /** Whether the lens is up. The wheel belongs to the loupe only while it is;
138
+ * otherwise `loupe.magnify` declines and the dispatcher leaves the event
139
+ * unhandled, which is what hands it back to the lab's own pan/zoom. */
140
+ shown: () => boolean;
141
+ /** Raise or drop the hold-to-peek flag. */
142
+ setPeeking: (on: boolean) => void;
143
+ /** Multiply the magnification by one wheel notch of `deltaY`. */
144
+ magnifyBy: (deltaY: number) => void;
145
+ }
146
+ /**
147
+ * Build the loupe's actions. `peekKey` is a `KeyboardEvent.key`; passing
148
+ * `null` omits `loupe.peek` entirely rather than registering a binding no key
149
+ * can match.
150
+ */
151
+ declare function createLoupeActions(input: LoupeInputApi, peekKey: string | null): readonly Action[];
152
+
153
+ /** Props for `<LoupeGestures>`. */
154
+ interface LoupeGesturesProps {
155
+ /** The element the dispatcher listens on — the same one the lens tracks. */
156
+ hostRef: RefObject<HTMLElement | null>;
157
+ input: LoupeInputApi;
158
+ /** `KeyboardEvent.key` for hold-to-peek, or `null` for no peek binding. */
159
+ peekKey: string | null;
160
+ }
161
+ /**
162
+ * The loupe's input, routed. Render it inside a `<WeaselProvider isolate>` —
163
+ * with no registry in scope it renders nothing rather than registering
164
+ * actions that could never fire.
165
+ */
166
+ declare function LoupeGestures(props: LoupeGesturesProps): react_jsx_runtime.JSX.Element | null;
167
+
123
168
  /** Props for `<TrialLoupe>`. */
124
169
  interface TrialLoupeProps {
125
170
  capability: ResolvedLoupe;
@@ -139,7 +184,7 @@ interface TrialLoupeProps {
139
184
  * stack it is mounted inside, or the instrument's own `render` at a magnified
140
185
  * camera.
141
186
  */
142
- declare function TrialLoupe({ capability, enabled, state, config, view, worldSpec, hostRef, }: TrialLoupeProps): react_jsx_runtime.JSX.Element | null;
187
+ declare function TrialLoupe({ capability, enabled, state, config, view, worldSpec, hostRef, }: TrialLoupeProps): react_jsx_runtime.JSX.Element;
143
188
 
144
189
  /** Options for {@link useLoupe}. */
145
190
  interface UseLoupeOptions {
@@ -148,7 +193,7 @@ interface UseLoupeOptions {
148
193
  hostRef: RefObject<HTMLElement | null>;
149
194
  /** Whether the loupe is turned on. Hold-to-peek shows it regardless. */
150
195
  enabled: boolean;
151
- /** Hex colour at a host point. Omitted, the loupe reports no colour — which
196
+ /** Hex color at a host point. Omitted, the loupe reports no color — which
152
197
  * is the honest answer for a surface with no pixels to read. */
153
198
  sample?: (p: LoupePoint) => string | null;
154
199
  }
@@ -165,18 +210,22 @@ interface LoupeState {
165
210
  setFactor: (factor: number) => void;
166
211
  /** Sample what the lens shows at a point inside it. */
167
212
  pick: (p?: LoupePoint) => string | null;
213
+ /** What `<LoupeGestures>` drives the lens through. Stable for the life of
214
+ * the hook, so registering the actions on it does not churn. */
215
+ input: LoupeInputApi;
168
216
  }
169
217
  /**
170
- * Binds `@weasel-js/loupe`'s model to a host element and drives it from the
171
- * pointer, the peek key and the wheel.
218
+ * Binds `@weasel-js/loupe`'s model to a host element and tracks the pointer
219
+ * across it.
172
220
  *
173
- * These are plain listeners rather than gesture bindings because labkit trials
174
- * do not route input through the dispatcher — see the loupe entry under
175
- * "Selection, actions & UI panels" in `docs/TODO.md`. They are all in this one
176
- * hook so that when trial input does go through it, this is the only file to
177
- * rewrite.
221
+ * The peek key and the wheel are not here: they are `loupe.peek` and
222
+ * `loupe.magnify`, routed through the gesture dispatcher that
223
+ * `<LoupeGestures>` mounts on the same host. Aiming stays a plain listener
224
+ * because a hover is not a gesture the grammar names — `GESTURE_DESCRIPTORS`
225
+ * has no continuous-motion entry, and inventing one to carry the lens' aim
226
+ * would be an input taxonomy change, not a loupe change.
178
227
  */
179
228
  declare function useLoupe({ capability, hostRef, enabled, sample }: UseLoupeOptions): LoupeState;
180
229
 
181
- export { CanvasLoupe, DomLoupe, LoupeBubble, LoupeRenderArgs, ResolvedLoupe, TrialLoupe, drawCanvasLens, lensCamera, lensSourceRect, sampleStack, useLoupe };
182
- export type { CanvasLoupeProps, DomLoupeProps, LensCamera, LoupeBubbleProps, LoupeState, SourceRect, TrialLoupeProps, UseLoupeOptions };
230
+ export { CanvasLoupe, DomLoupe, LOUPE_MAGNIFY_ID, LOUPE_PEEK_ID, LoupeBubble, LoupeGestures, LoupeRenderArgs, ResolvedLoupe, TrialLoupe, createLoupeActions, drawCanvasLens, lensCamera, lensSourceRect, sampleStack, useLoupe };
231
+ export type { CanvasLoupeProps, DomLoupeProps, LensCamera, LoupeBubbleProps, LoupeGesturesProps, LoupeInputApi, LoupeState, SourceRect, TrialLoupeProps, UseLoupeOptions };
@@ -1,5 +1,5 @@
1
- export { CanvasLoupe, DomLoupe, LOUPE_DEFAULTS, LoupeBubble, TrialLoupe, drawCanvasLens, lensCamera, lensSourceRect, resolveLoupe, sampleStack, useLoupe } from '../chunk-TJ7QY3OC.js';
2
- import '../chunk-CTRKTLYZ.js';
1
+ export { CanvasLoupe, DomLoupe, LOUPE_DEFAULTS, LOUPE_MAGNIFY_ID, LOUPE_PEEK_ID, LoupeBubble, LoupeGestures, TrialLoupe, createLoupeActions, drawCanvasLens, lensCamera, lensSourceRect, resolveLoupe, sampleStack, useLoupe } from '../chunk-ERFMC6WU.js';
2
+ import '../chunk-H6ZAOWNE.js';
3
3
  import '../chunk-2AYGEN57.js';
4
4
  import '../chunk-CQLQPQ4P.js';
5
5
  //# sourceMappingURL=index.js.map