@weasel-js/labkit 1.6.0 → 1.7.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.
- package/dist/_dts/{CanvasStackContext-DQgcH1ny.d.ts → CanvasStackContext-D2jnIwfk.d.ts} +1 -1
- package/dist/_dts/FloatingPanel-7j0IcXwz.d.ts +30 -0
- package/dist/_dts/{LayerList.d-2c9yup5Y.d.ts → LayerList.d-DiuEArKq.d.ts} +4 -4
- package/dist/_dts/PrefsRow.d-TOZ7BgD9.d.ts +79 -0
- package/dist/_dts/PropertyPanel.d-D-1paCbE.d.ts +141 -0
- package/dist/_dts/{Select.d-BchGMC2Y.d.ts → Select.d-Bensr_MT.d.ts} +15 -6
- package/dist/_dts/Stage-CCWfQQWM.d.ts +202 -0
- package/dist/_dts/index-B2Yj5aA0.d.ts +274 -0
- package/dist/_dts/{index-B0--8PEM.d.ts → index-CsYqUHD3.d.ts} +12 -13
- package/dist/_dts/{types-B7y8hX1D.d.ts → types-CRPSGFAp.d.ts} +33 -5
- package/dist/_dts/{frac-DTRq7Xpb.d.ts → types-CSm9jgol.d.ts} +700 -650
- package/dist/_dts/{useTrialState-CP4jfuKl.d.ts → useTrialState-CTZPgeZ7.d.ts} +2 -3
- package/dist/canvas/index.d.ts +40 -8
- package/dist/canvas/index.js +5 -3
- package/dist/chrome/index.d.ts +5 -6
- package/dist/chrome/index.js +9 -7
- package/dist/chunk-24W5VEJW.js +18 -0
- package/dist/chunk-24W5VEJW.js.map +1 -0
- package/dist/chunk-275JRRVD.js +728 -0
- package/dist/chunk-275JRRVD.js.map +1 -0
- package/dist/chunk-3RY6WL5T.js +38 -0
- package/dist/chunk-3RY6WL5T.js.map +1 -0
- package/dist/chunk-4LJSC7MB.js +143 -0
- package/dist/chunk-4LJSC7MB.js.map +1 -0
- package/dist/{chunk-3FI7Y4R4.js → chunk-7BO7HNGF.js} +5 -5
- package/dist/{chunk-3FI7Y4R4.js.map → chunk-7BO7HNGF.js.map} +1 -1
- package/dist/chunk-AWQG7FCC.js +19 -0
- package/dist/chunk-AWQG7FCC.js.map +1 -0
- package/dist/chunk-CZZPXUOU.js +3 -0
- package/dist/{chunk-SBXNQW4G.js.map → chunk-CZZPXUOU.js.map} +1 -1
- package/dist/{chunk-ZORVNOKX.js → chunk-FMK7UQ6V.js} +24 -145
- package/dist/chunk-FMK7UQ6V.js.map +1 -0
- package/dist/{chunk-BVL7Y574.js → chunk-FZ7YFQN7.js} +26 -10
- package/dist/chunk-FZ7YFQN7.js.map +1 -0
- package/dist/{chunk-USO6TERP.js → chunk-GOZLNM4L.js} +11 -9
- package/dist/chunk-GOZLNM4L.js.map +1 -0
- package/dist/{chunk-H5VIV7MQ.js → chunk-I5DUQ5HM.js} +88 -82
- package/dist/chunk-I5DUQ5HM.js.map +1 -0
- package/dist/chunk-J7OWWTCW.js +143 -0
- package/dist/chunk-J7OWWTCW.js.map +1 -0
- package/dist/{chunk-H6ZAOWNE.js → chunk-JVBYV6TL.js} +3 -3
- package/dist/{chunk-H6ZAOWNE.js.map → chunk-JVBYV6TL.js.map} +1 -1
- package/dist/{chunk-VQ47KWD5.js → chunk-KMJ7RWD3.js} +18 -7
- package/dist/chunk-KMJ7RWD3.js.map +1 -0
- package/dist/{chunk-ERFMC6WU.js → chunk-M7HP3FTK.js} +20 -11
- package/dist/chunk-M7HP3FTK.js.map +1 -0
- package/dist/chunk-MIM5R4ZT.js +14972 -0
- package/dist/chunk-MIM5R4ZT.js.map +1 -0
- package/dist/{chunk-HFRE4QQV.js → chunk-T5IBSPAM.js} +96 -32
- package/dist/chunk-T5IBSPAM.js.map +1 -0
- package/dist/chunk-UNAZSLWE.js +294 -0
- package/dist/chunk-UNAZSLWE.js.map +1 -0
- package/dist/{chunk-RS3HRQWU.js → chunk-WPLAANH4.js} +4 -3
- package/dist/chunk-WPLAANH4.js.map +1 -0
- package/dist/{chunk-AWH3SRPW.js → chunk-Y23G2VZL.js} +5 -37
- package/dist/chunk-Y23G2VZL.js.map +1 -0
- package/dist/{chunk-MOLIUNVH.js → chunk-YT75VYRD.js} +4 -4
- package/dist/{chunk-MOLIUNVH.js.map → chunk-YT75VYRD.js.map} +1 -1
- package/dist/chunk-ZIFPHIWZ.js +302 -0
- package/dist/chunk-ZIFPHIWZ.js.map +1 -0
- package/dist/config/index.d.ts +48 -40
- package/dist/config/index.js +4 -5
- package/dist/controls/index.d.ts +91 -7
- package/dist/controls/index.js +5 -4
- package/dist/dragdrop/index.d.ts +9 -7
- package/dist/dragdrop/index.js +3 -2
- package/dist/index.d.ts +294 -82
- package/dist/index.js +425 -402
- package/dist/index.js.map +1 -1
- package/dist/layers/index.d.ts +4 -5
- package/dist/layers/index.js +2 -1
- package/dist/loupe/index.d.ts +20 -17
- package/dist/loupe/index.js +5 -3
- package/dist/overview/index.d.ts +56 -0
- package/dist/overview/index.js +289 -0
- package/dist/overview/index.js.map +1 -0
- package/dist/passthrough/weasel-ui.d.ts +239 -69
- package/dist/passthrough/weasel-ui.js +3 -2
- package/dist/primitives/index.d.ts +5 -204
- package/dist/primitives/index.js +6 -4
- package/dist/state/index.d.ts +8 -8
- package/dist/state/index.js +4 -5
- package/dist/state/index.js.map +1 -1
- package/dist/styles.css +152 -82
- package/dist/undo/index.d.ts +4 -4
- package/package.json +17 -12
- package/src/annotations/AnnotationOverlay.tsx +2 -2
- package/src/annotations/Annotations.less +0 -10
- package/src/annotations/MarkList.tsx +4 -8
- package/src/annotations/index.ts +1 -0
- package/src/annotations/paint.test.ts +3 -14
- package/src/annotations/paint.ts +3 -19
- package/src/annotations/store.test.ts +26 -0
- package/src/annotations/store.ts +25 -6
- package/src/annotations/svgNodes.test.ts +6 -9
- package/src/annotations/svgNodes.ts +3 -3
- package/src/annotations/toolMap.test.ts +37 -2
- package/src/annotations/toolMap.ts +13 -0
- package/src/annotations/types.ts +27 -0
- package/src/canvas/AGENTS.md +9 -10
- package/src/canvas/CameraInput.test.tsx +136 -0
- package/src/canvas/CameraInput.tsx +322 -0
- package/src/canvas/CanvasStack.tsx +47 -58
- package/src/canvas/LinkedCursor.less +16 -0
- package/src/canvas/LinkedCursor.tsx +54 -0
- package/src/canvas/Stage.test.tsx +33 -4
- package/src/canvas/Stage.tsx +47 -37
- package/src/canvas/cameraRegistry.test.ts +55 -0
- package/src/canvas/cameraRegistry.ts +86 -0
- package/src/canvas/cameraView.test.ts +60 -0
- package/src/canvas/cameraView.ts +61 -0
- package/src/canvas/cameraZoom.test.ts +46 -0
- package/src/canvas/cameraZoom.ts +24 -0
- package/src/canvas/index.ts +23 -2
- package/src/canvas/sharedScope.test.tsx +94 -0
- package/src/chrome/ChromeRegions.stories.tsx +1 -0
- package/src/chrome/regions/PaletteRegion.less +0 -7
- package/src/chrome/regions/SidebarRegion.less +12 -2
- package/src/chrome/regions/SidebarRegion.test.tsx +9 -2
- package/src/config/builder.test.ts +2 -1
- package/src/config/builder.ts +15 -8
- package/src/config/entry.test.ts +3 -1
- package/src/config/fromConfigField.test.ts +14 -0
- package/src/config/fromConfigField.ts +19 -4
- package/src/config/index.ts +4 -1
- package/src/config/path.ts +2 -5
- package/src/config/resolve.ts +15 -1
- package/src/config/sectionTree.test.ts +12 -6
- package/src/config/sectionTree.ts +15 -5
- package/src/config/types.ts +34 -9
- package/src/controls/ControlPanel.less +1 -1
- package/src/controls/ControlPanel.stories.tsx +3 -2
- package/src/controls/ControlPanel.test.tsx +76 -13
- package/src/controls/ControlPanel.tsx +80 -11
- package/src/controls/inDialog.test.tsx +18 -0
- package/src/controls/inDialog.tsx +2 -10
- package/src/index.test.ts +1 -1
- package/src/index.ts +23 -5
- package/src/instrument/SineWave.smoke.test.tsx +2 -0
- package/src/instrument/types.ts +10 -1
- package/src/lab/Lab.nebula.test.tsx +11 -2
- package/src/lab/Lab.test.tsx +3 -1
- package/src/lab/Lab.tsx +87 -76
- package/src/lab/{LabFit.stories.less → LabFit.browser.test.less} +1 -1
- package/src/lab/{LabFit.stories.tsx → LabFit.browser.test.tsx} +41 -63
- package/src/lab/LabFullChrome.stories.tsx +1 -0
- package/src/lab/LabHeader.test.tsx +24 -14
- package/src/lab/LabHeader.tsx +11 -12
- package/src/lab/LabShell.less +8 -17
- package/src/lab/LabSwitcher.less +6 -6
- package/src/lab/LabZoom.test.tsx +223 -0
- package/src/lab/LabZoom.tsx +170 -0
- package/src/lab/index.ts +1 -0
- package/src/loupe/AGENTS.md +7 -6
- package/src/loupe/LoupeGestures.tsx +15 -10
- package/src/loupe/TrialLoupe.tsx +5 -5
- package/src/loupe/index.ts +1 -0
- package/src/loupe/loupeActions.ts +6 -2
- package/src/overview/AGENTS.md +38 -0
- package/src/overview/OverviewMarks.test.tsx +100 -0
- package/src/overview/OverviewMarks.tsx +93 -0
- package/src/overview/TrialOverview.less +53 -0
- package/src/overview/TrialOverview.stories.tsx +50 -0
- package/src/overview/TrialOverview.test.tsx +116 -0
- package/src/overview/TrialOverview.tsx +376 -0
- package/src/overview/index.ts +2 -0
- package/src/passthrough/weasel-ui.test.ts +2 -0
- package/src/passthrough/weasel-ui.ts +23 -4
- package/src/primitives/FloatingPanel.test.tsx +11 -0
- package/src/primitives/FloatingPanel.tsx +2 -5
- package/src/primitives/JobProgress.less +1 -1
- package/src/primitives/Legend.stories.tsx +1 -0
- package/src/primitives/Readout.browser.test.tsx +137 -0
- package/src/primitives/Readout.less +12 -0
- package/src/primitives/Readout.stories.tsx +58 -0
- package/src/primitives/Readout.test.tsx +93 -0
- package/src/primitives/Readout.tsx +56 -0
- package/src/primitives/index.ts +2 -0
- package/src/specimen/Specimen.stories.tsx +1 -0
- package/src/specimen/Specimen.tsx +21 -4
- package/src/state/Persistence.browser.test.tsx +47 -0
- package/src/state/labRecords.test.ts +4 -1
- package/src/state/store.test.ts +9 -5
- package/src/state/usePersistedState.test.tsx +1 -1
- package/src/state/useTrialState.test.tsx +1 -1
- package/src/styles.less +3 -0
- package/src/theme/Interstellar.stories.tsx +4 -6
- package/src/theme/base.less +21 -47
- package/src/theme/interstellar.test.ts +1 -1
- package/src/theme/interstellar.theme.json +10 -3
- package/src/tools/labTool.ts +6 -2
- package/src/trial/Trial.annotations.test.tsx +16 -0
- package/src/trial/Trial.less +0 -13
- package/src/trial/Trial.loupe.test.tsx +73 -1
- package/src/trial/Trial.stories.tsx +2 -0
- package/src/trial/Trial.tsx +23 -1
- package/src/trial/TrialChrome.tsx +21 -3
- package/src/trial/trialOps.test.ts +4 -4
- package/dist/_dts/PrefsRow.d-DFpPIeIC.d.ts +0 -39
- package/dist/_dts/inDialog-D5ZKGjiD.d.ts +0 -23
- package/dist/_dts/index-DINmCuLA.d.ts +0 -453
- package/dist/_dts/number.d-OeQYQoUO.d.ts +0 -28
- package/dist/_dts/usePanZoom-Bq73pwFe.d.ts +0 -117
- package/dist/chunk-2AYGEN57.js +0 -32
- package/dist/chunk-2AYGEN57.js.map +0 -1
- package/dist/chunk-AWH3SRPW.js.map +0 -1
- package/dist/chunk-BVL7Y574.js.map +0 -1
- package/dist/chunk-ERFMC6WU.js.map +0 -1
- package/dist/chunk-H5VIV7MQ.js.map +0 -1
- package/dist/chunk-HFRE4QQV.js.map +0 -1
- package/dist/chunk-RS3HRQWU.js.map +0 -1
- package/dist/chunk-SBXNQW4G.js +0 -3
- package/dist/chunk-TT5C5S6R.js +0 -368
- package/dist/chunk-TT5C5S6R.js.map +0 -1
- package/dist/chunk-USO6TERP.js.map +0 -1
- package/dist/chunk-VQ47KWD5.js.map +0 -1
- package/dist/chunk-WUJXJC5O.js +0 -14568
- package/dist/chunk-WUJXJC5O.js.map +0 -1
- package/dist/chunk-ZORVNOKX.js.map +0 -1
- package/src/canvas/usePanZoom.test.ts +0 -244
- package/src/canvas/usePanZoom.ts +0 -147
- package/src/state/Persistence.stories.tsx +0 -75
package/dist/dragdrop/index.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
export { DragGhost, DragOverlay, Palette, useDragDrop } from '../chunk-
|
|
2
|
-
import '../chunk-
|
|
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,271 @@
|
|
|
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 {
|
|
10
|
-
|
|
11
|
-
import {
|
|
12
|
-
export {
|
|
13
|
-
export {
|
|
14
|
-
|
|
15
|
-
import {
|
|
16
|
-
|
|
3
|
+
import { I as IconProps } from './_dts/Select.d-Bensr_MT.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-Bensr_MT.js';
|
|
5
|
+
import { S as SplitProps } from './_dts/index-B2Yj5aA0.js';
|
|
6
|
+
export { D as DetailList, a as DetailListLayout, b as DetailListProps, c as DetailListValues, d as DetailRow, e as DetailRowProps, f as DetailRowStatus, F as FpsMeter, J as JobProgress, g as JobProgressProps, L as Legend, h as LegendEntry, i as LegendMark, j as LegendProps, R as Readout, k as ReadoutProps, l as ReadoutRow, m as ScaleIndicator, n as ScaleIndicatorProps, o as Split, p as StatusBar, q as StatusBarProps, r as StatusBarSectionProps, T as Toolbar, s as ToolbarButtonProps, t as ToolbarGroupProps, u as ToolbarProps, Z as ZoomControl, v as ZoomControlProps } from './_dts/index-B2Yj5aA0.js';
|
|
7
|
+
export { L as LayerList, a as LayerListItem, b as LayerListProps, c as LayerMove, m as moveLayers } from './_dts/LayerList.d-DiuEArKq.js';
|
|
8
|
+
import { FillStyle, PaintKind, SceneNode, View, DrawCommand, Path, ScreenLength, StrokeAlign, MarkerRef, StyledRun, TextStyle, TextVerticalAlign, Stroke, BuiltinToolId } from '@weasel-js/core';
|
|
9
|
+
import { U as UnitTable, D as Display } from './_dts/PrefsRow.d-TOZ7BgD9.js';
|
|
10
|
+
import { StanceProps } from './passthrough/weasel-ui.js';
|
|
11
|
+
import { a as PropertyRowLayout, b as PropertyListPack } from './_dts/PropertyPanel.d-D-1paCbE.js';
|
|
12
|
+
import { PropertyMetricProps } from './passthrough/weasel-ui.js';
|
|
13
|
+
export { c as PropertyList, d as PropertyListProps, e as PropertyPanel, f as PropertyPanelProps, g as PropertyRow, h as PropertyRowProps, i as PropertyRowVariant, j as PropertySpan, k as PropertySpanProps } from './_dts/PropertyPanel.d-D-1paCbE.js';
|
|
14
|
+
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-CSm9jgol.js';
|
|
15
|
+
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-CSm9jgol.js';
|
|
16
|
+
export { C as CameraContext, a as CameraContextValue, b as CameraInput, d as CameraPublishContext, e as CameraRegistry, f as CameraRegistryContext, g as CameraScope, h as CameraView, j as CanvasStack, k as CanvasStackProps, l as Stage, m as StageProps, Z as ZoomAtOptions, n as ZoomRange, o as centerOn, p as createCameraRegistry, q as fitStage, s as screenToWorld, r as usePublishCamera, w as worldToScreen, z as zoomAt } from './_dts/Stage-CCWfQQWM.js';
|
|
17
|
+
export { C as CanvasLayerDescriptor, a as CanvasStackContext, b as CanvasStackContextValue, c as CanvasStackSurface } from './_dts/CanvasStackContext-D2jnIwfk.js';
|
|
18
|
+
import { L as LabContribution } from './_dts/index-CsYqUHD3.js';
|
|
19
|
+
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-CsYqUHD3.js';
|
|
17
20
|
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 {
|
|
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,
|
|
20
|
-
export {
|
|
21
|
+
import { b as ConfigSchema, a as ConfigField, c as ConfigRule, d as ControlRenderer } from './_dts/types-CRPSGFAp.js';
|
|
22
|
+
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-CRPSGFAp.js';
|
|
23
|
+
export { ControlPanel, inDialog, summarizeValue } from './controls/index.js';
|
|
21
24
|
import { J as JobHandle } from './_dts/types-DJ79Tg5J.js';
|
|
22
25
|
export { a as JobCapability, b as JobEvent, c as JobFailure, d as JobStatus } from './_dts/types-DJ79Tg5J.js';
|
|
23
26
|
export { UseJobOptions, useJob } from './job/index.js';
|
|
24
27
|
import { Theme, ColorList } from '@weasel-js/theme';
|
|
25
28
|
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
|
-
|
|
27
|
-
export {
|
|
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';
|
|
29
|
+
export { a as FloatingPanel, F as FloatingPanelProps } from './_dts/FloatingPanel-7j0IcXwz.js';
|
|
30
|
+
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-CTZPgeZ7.js';
|
|
29
31
|
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
32
|
export { EventBus, EventListener, clearUndo, createEventBus, emptyStack, pushSnapshot, redo, undo } from './undo/index.js';
|
|
31
33
|
import 'react-aria-components';
|
|
32
|
-
import './_dts/number.d-OeQYQoUO.js';
|
|
33
34
|
import 'windease';
|
|
34
35
|
import 'zustand/vanilla';
|
|
35
36
|
|
|
36
|
-
declare const ResetIcon: (p: IconProps) =>
|
|
37
|
-
declare const CloseIcon: (p: IconProps) =>
|
|
38
|
-
declare const PlayIcon: (p: IconProps) =>
|
|
39
|
-
declare const PauseIcon: (p: IconProps) =>
|
|
40
|
-
declare const StopIcon: (p: IconProps) =>
|
|
41
|
-
declare const StepBackIcon: (p: IconProps) =>
|
|
42
|
-
declare const StepForwardIcon: (p: IconProps) =>
|
|
43
|
-
declare const CollapseIcon: (p: IconProps) =>
|
|
44
|
-
declare const ExpandIcon: (p: IconProps) =>
|
|
37
|
+
declare const ResetIcon: (p: IconProps) => react.JSX.Element;
|
|
38
|
+
declare const CloseIcon: (p: IconProps) => react.JSX.Element;
|
|
39
|
+
declare const PlayIcon: (p: IconProps) => react.JSX.Element;
|
|
40
|
+
declare const PauseIcon: (p: IconProps) => react.JSX.Element;
|
|
41
|
+
declare const StopIcon: (p: IconProps) => react.JSX.Element;
|
|
42
|
+
declare const StepBackIcon: (p: IconProps) => react.JSX.Element;
|
|
43
|
+
declare const StepForwardIcon: (p: IconProps) => react.JSX.Element;
|
|
44
|
+
declare const CollapseIcon: (p: IconProps) => react.JSX.Element;
|
|
45
|
+
declare const ExpandIcon: (p: IconProps) => react.JSX.Element;
|
|
46
|
+
|
|
47
|
+
/** One choice of an enum field. */
|
|
48
|
+
interface PropertyOption<T extends string> {
|
|
49
|
+
value: T;
|
|
50
|
+
/** The option's name. A string also names its segment for a screen reader. */
|
|
51
|
+
label: ReactNode;
|
|
52
|
+
/** What a segment shows in place of `label` when the full one would not fit
|
|
53
|
+
* — a glyph or a letter. `label` stays the accessible name. */
|
|
54
|
+
glyph?: ReactNode;
|
|
55
|
+
/** Shown but not choosable: a value the control reports and cannot author. */
|
|
56
|
+
disabled?: boolean;
|
|
57
|
+
}
|
|
58
|
+
/** Props every kind of field shares. */
|
|
59
|
+
interface FieldBase {
|
|
60
|
+
/** The control's accessible name. A `<PropertyField>` takes it from a string
|
|
61
|
+
* `label` when this is omitted. */
|
|
62
|
+
name?: string;
|
|
63
|
+
/** The sources the field reads disagree — a multi-selection whose nodes
|
|
64
|
+
* differ. The control shows no value, in whatever form it has for that. */
|
|
65
|
+
mixed?: boolean;
|
|
66
|
+
/**
|
|
67
|
+
* The sources agree on holding nothing: whatever is in effect comes from a
|
|
68
|
+
* fallback further down. The control shows no chosen value rather than
|
|
69
|
+
* inventing one, since the next edit would write the invention back.
|
|
70
|
+
*/
|
|
71
|
+
unset?: boolean;
|
|
72
|
+
/** Class on the control element itself. */
|
|
73
|
+
className?: string;
|
|
74
|
+
/** Id for the control element, for a `<label htmlFor>` outside it. */
|
|
75
|
+
id?: string;
|
|
76
|
+
}
|
|
77
|
+
/** A boolean field. */
|
|
78
|
+
interface PropertyBooleanFieldProps extends FieldBase {
|
|
79
|
+
kind: 'boolean';
|
|
80
|
+
/** `checkbox` (default), `switch`, or `toggle` — a one-segment pressable bar. */
|
|
81
|
+
control?: 'checkbox' | 'switch' | 'toggle';
|
|
82
|
+
/** Absent reads as off. */
|
|
83
|
+
value: boolean | undefined;
|
|
84
|
+
onChange: (next: boolean) => void;
|
|
85
|
+
/** A `toggle`'s segment content. Defaults to the first letter of `name`. */
|
|
86
|
+
glyph?: ReactNode;
|
|
87
|
+
}
|
|
88
|
+
/** A number field. */
|
|
89
|
+
interface PropertyNumberFieldProps extends FieldBase {
|
|
90
|
+
kind: 'number';
|
|
91
|
+
/** `input` (default) for a typed number; `slider` for a track with an
|
|
92
|
+
* editable readout, where the range matters more than the exact value. */
|
|
93
|
+
control?: 'input' | 'slider';
|
|
94
|
+
/** Absent reads as an empty field. */
|
|
95
|
+
value: number | null | undefined;
|
|
96
|
+
/**
|
|
97
|
+
* The committed value. Given `onInput` as well, it fires once a drag ends,
|
|
98
|
+
* or on blur, Enter or a step in a typed field; on its own it fires on every
|
|
99
|
+
* move, keystroke and step. A caller wanting settled values only passes a
|
|
100
|
+
* no-op `onInput`.
|
|
101
|
+
*/
|
|
102
|
+
onChange: (next: number) => void;
|
|
103
|
+
/** The live value, fired continuously. Pass it alongside `onChange` when the
|
|
104
|
+
* write is expensive — cheap state here, the costly work there. */
|
|
105
|
+
onInput?: (next: number) => void;
|
|
106
|
+
/** A slider's track runs 0..100 where these are omitted. */
|
|
107
|
+
min?: number;
|
|
108
|
+
max?: number;
|
|
109
|
+
step?: number;
|
|
110
|
+
/**
|
|
111
|
+
* Suffix after the value. A string becomes a dim word unit (`px`); pass JSX
|
|
112
|
+
* like `<sup>°</sup>` for a symbol. Display only — the value stays a number.
|
|
113
|
+
*/
|
|
114
|
+
unit?: ReactNode;
|
|
115
|
+
/** Units a person may type into a typed field, each mapped to the factor
|
|
116
|
+
* that turns it into the unit shown: `{ mm: 0.1, cm: 1 }`. */
|
|
117
|
+
accepts?: Readonly<UnitTable>;
|
|
118
|
+
/** How the value shows, is spoken, and reads back when typed —
|
|
119
|
+
* `compact()` reads `2.00M`. A slider readout defaults to the value at
|
|
120
|
+
* `step`'s precision. */
|
|
121
|
+
display?: Display;
|
|
122
|
+
/** A slider readout's text, for what no display expresses — a derived
|
|
123
|
+
* value, a word at one end. Wins over `display`, and is spoken as shown. */
|
|
124
|
+
format?: (value: number) => ReactNode;
|
|
125
|
+
placeholder?: string;
|
|
126
|
+
/** A typed field's up and down buttons. Default `false`: a dense panel
|
|
127
|
+
* drives its numbers by typing, the arrow keys and the wheel. */
|
|
128
|
+
steppers?: boolean;
|
|
129
|
+
}
|
|
130
|
+
/** A text field. */
|
|
131
|
+
interface PropertyStringFieldProps extends FieldBase {
|
|
132
|
+
kind: 'string';
|
|
133
|
+
control?: 'input' | 'textarea';
|
|
134
|
+
/** Absent reads as an empty field. */
|
|
135
|
+
value: string | null | undefined;
|
|
136
|
+
/**
|
|
137
|
+
* The committed text. On its own it fires on every keystroke. Given
|
|
138
|
+
* `onInput` as well, the field drafts: `onInput` gets each keystroke and
|
|
139
|
+
* this fires once, on blur or Enter, and only if the text changed.
|
|
140
|
+
*/
|
|
141
|
+
onChange: (next: string) => void;
|
|
142
|
+
onInput?: (next: string) => void;
|
|
143
|
+
placeholder?: string;
|
|
144
|
+
maxLength?: number;
|
|
145
|
+
}
|
|
146
|
+
/** A choice among fixed options. */
|
|
147
|
+
interface PropertyEnumFieldProps<T extends string = string> extends FieldBase {
|
|
148
|
+
kind: 'enum';
|
|
149
|
+
/**
|
|
150
|
+
* `select` (default) is a dropdown. `radio` and `toggle` show every option
|
|
151
|
+
* at once — a radio group lists them, and a toggle is a row of segments.
|
|
152
|
+
*/
|
|
153
|
+
control?: 'select' | 'radio' | 'toggle';
|
|
154
|
+
/** Absent, or not one of `options`, chooses nothing. */
|
|
155
|
+
value: T | undefined;
|
|
156
|
+
options: ReadonlyArray<PropertyOption<T>>;
|
|
157
|
+
onChange: (next: T) => void;
|
|
158
|
+
/**
|
|
159
|
+
* Given, choosing nothing is a value of its own: a `toggle` lets the chosen
|
|
160
|
+
* segment be clicked off, and calls this. Absent, a toggle always holds one.
|
|
161
|
+
*/
|
|
162
|
+
onClear?: () => void;
|
|
163
|
+
/** Shown while no option is chosen. Defaults to "Choose option…". */
|
|
164
|
+
placeholder?: string;
|
|
165
|
+
}
|
|
166
|
+
/** A single color. */
|
|
167
|
+
interface PropertyColorFieldProps extends FieldBase {
|
|
168
|
+
kind: 'color';
|
|
169
|
+
/** `#rrggbb`, or `#rrggbbaa` when `alpha` is `true`. */
|
|
170
|
+
value: string | undefined;
|
|
171
|
+
/**
|
|
172
|
+
* The committed color. Given `onInput` as well, it fires once per gesture —
|
|
173
|
+
* the picker closing, or the opacity track let go; on its own it fires on
|
|
174
|
+
* every move. A caller wanting settled values only passes a no-op `onInput`.
|
|
175
|
+
*/
|
|
176
|
+
onChange: (next: string) => void;
|
|
177
|
+
onInput?: (next: string) => void;
|
|
178
|
+
/**
|
|
179
|
+
* Offer an opacity track. `true` keeps the alpha in `value` as `#rrggbbaa`;
|
|
180
|
+
* a number is the 0..1 alpha held apart from it, reported through
|
|
181
|
+
* `onAlphaChange` / `onAlphaInput`.
|
|
182
|
+
*/
|
|
183
|
+
alpha?: boolean | number;
|
|
184
|
+
onAlphaChange?: (next: number) => void;
|
|
185
|
+
onAlphaInput?: (next: number) => void;
|
|
186
|
+
/** Draw the opacity track inert, for a consumer that drops alpha. */
|
|
187
|
+
alphaDisabled?: boolean;
|
|
188
|
+
}
|
|
189
|
+
/** A whole paint: a solid, a gradient, a pattern, or none. */
|
|
190
|
+
interface PropertyPaintFieldProps extends FieldBase {
|
|
191
|
+
kind: 'paint';
|
|
192
|
+
/** `swatch` (default) opens the editor in a popover, for a narrow slot;
|
|
193
|
+
* `inline` draws the kind bar and its editor in place. */
|
|
194
|
+
control?: 'swatch' | 'inline';
|
|
195
|
+
/** `null` is an explicit "no paint"; `undefined` is nothing to show. */
|
|
196
|
+
value: FillStyle | null | undefined;
|
|
197
|
+
onChange: (next: FillStyle | null) => void;
|
|
198
|
+
onInput?: (next: FillStyle | null) => void;
|
|
199
|
+
/** Offer "None". Default `true`. */
|
|
200
|
+
allowNone?: boolean;
|
|
201
|
+
/** Restrict the kinds offered. Default: every registered kind. */
|
|
202
|
+
kinds?: readonly PaintKind[];
|
|
203
|
+
}
|
|
204
|
+
/** A font family, picked from the live font registry. */
|
|
205
|
+
interface PropertyFontFamilyFieldProps extends FieldBase {
|
|
206
|
+
kind: 'font-family';
|
|
207
|
+
value: string | undefined;
|
|
208
|
+
onChange: (next: string) => void;
|
|
209
|
+
/** The weight and slant the family is drawn at, so the picker names the
|
|
210
|
+
* variant that will actually paint. */
|
|
211
|
+
weight?: number;
|
|
212
|
+
fontStyle?: 'normal' | 'italic';
|
|
213
|
+
}
|
|
214
|
+
/**
|
|
215
|
+
* One field for {@link PropertyControl} and {@link PropertyField}, keyed by
|
|
216
|
+
* `kind`.
|
|
217
|
+
*/
|
|
218
|
+
type PropertyControlProps<T extends string = string> = PropertyBooleanFieldProps | PropertyNumberFieldProps | PropertyStringFieldProps | PropertyEnumFieldProps<T> | PropertyColorFieldProps | PropertyPaintFieldProps | PropertyFontFamilyFieldProps;
|
|
219
|
+
/** Row props {@link PropertyField} adds to the field it draws. */
|
|
220
|
+
interface PropertyFieldRowProps extends PropertyMetricProps {
|
|
221
|
+
label: ReactNode;
|
|
222
|
+
/**
|
|
223
|
+
* Text beside the label. On a slider it replaces the editable readout —
|
|
224
|
+
* use it when the row is not showing a number a caller could type back,
|
|
225
|
+
* such as an auto row's `auto`.
|
|
226
|
+
*/
|
|
227
|
+
readout?: ReactNode;
|
|
228
|
+
description?: string;
|
|
229
|
+
layout?: PropertyRowLayout;
|
|
230
|
+
/** Take the full width of the enclosing grid — see `<PropertyRow span>`. */
|
|
231
|
+
span?: boolean;
|
|
232
|
+
/** The row is auto — see `<PropertyRow auto>`. */
|
|
233
|
+
auto?: boolean;
|
|
234
|
+
/** Toggles `auto` from the row's label — see `<PropertyRow onAutoChange>`. */
|
|
235
|
+
onAutoChange?: (next: boolean) => void;
|
|
236
|
+
/** Class on the row. `controlClassName` reaches the control. */
|
|
237
|
+
rowClassName?: string;
|
|
238
|
+
controlClassName?: string;
|
|
239
|
+
}
|
|
240
|
+
/** Props for {@link PropertyField}: one field, and the row around it. */
|
|
241
|
+
type PropertyFieldProps<T extends string = string> = PropertyFieldRowProps & DistributiveOmit<PropertyControlProps<T>, 'className' | 'id'>;
|
|
242
|
+
type DistributiveOmit<U, K extends PropertyKey> = U extends unknown ? Omit<U, K> : never;
|
|
243
|
+
/**
|
|
244
|
+
* A labeled settings row for one field, its control chosen by `kind` (and
|
|
245
|
+
* `control`): `<PropertyField kind="number" control="slider" label="Blur" …>`.
|
|
246
|
+
*
|
|
247
|
+
* The row is a {@link PropertyRow}; the control is the one
|
|
248
|
+
* {@link PropertyControl} draws for the same props. Every schema-driven
|
|
249
|
+
* settings surface in the kit — `ControlPanel`, `PrefsForm`, `SelectionPanel`
|
|
250
|
+
* — draws its built-in kinds through that one mapping, so a kind's control
|
|
251
|
+
* is decided once.
|
|
252
|
+
*
|
|
253
|
+
* Callbacks follow the field's shape: a discrete control (a box, a choice)
|
|
254
|
+
* reports each pick; a continuous or typed one reports every change through
|
|
255
|
+
* `onChange` alone, or splits them into live `onInput` and settled
|
|
256
|
+
* `onChange` when given both. `mixed` and `unset` show a field whose sources
|
|
257
|
+
* disagree, or agree on holding nothing.
|
|
258
|
+
*/
|
|
259
|
+
declare function PropertyField<T extends string = string>(props: PropertyFieldProps<T>): react.JSX.Element;
|
|
260
|
+
/**
|
|
261
|
+
* The control for one field, with no row around it — for a cell that shares
|
|
262
|
+
* a row with others, or a surface that draws its own row. Keyed by `kind`
|
|
263
|
+
* (and `control`), the same mapping {@link PropertyField} draws.
|
|
264
|
+
*
|
|
265
|
+
* A slider brings its readout beside the track. Several elements come back
|
|
266
|
+
* as siblings rather than wrapped, so the surrounding row lays them out.
|
|
267
|
+
*/
|
|
268
|
+
declare function PropertyControl<T extends string = string>(typed: PropertyControlProps<T>): react.JSX.Element;
|
|
45
269
|
|
|
46
270
|
/** An annotation drawn over a curve plot: a shaded band across a range of x,
|
|
47
271
|
* or a vertical line at one x. */
|
|
@@ -78,7 +302,7 @@ interface CurveFieldProps {
|
|
|
78
302
|
* `CurveEditor`; consumers wanting the raw editor (2D paths,
|
|
79
303
|
* custom anchors) should import that instead.
|
|
80
304
|
*/
|
|
81
|
-
declare function CurveField({ values, min, max, step, width, height, defaults, onChange, marks, }: CurveFieldProps):
|
|
305
|
+
declare function CurveField({ values, min, max, step, width, height, defaults, onChange, marks, }: CurveFieldProps): react.JSX.Element;
|
|
82
306
|
|
|
83
307
|
/** Props for `<PropertyGroup>`. */
|
|
84
308
|
interface PropertyGroupProps extends PropertyMetricProps, StanceProps {
|
|
@@ -128,7 +352,7 @@ interface PropertyGroupProps extends PropertyMetricProps, StanceProps {
|
|
|
128
352
|
* `leading` and `actions` put a handle and controls in the title row, and the
|
|
129
353
|
* groups of a `<PropertyList>` reorder with `useReorderDragList`.
|
|
130
354
|
*/
|
|
131
|
-
declare function PropertyGroup({ title, leading, actions, description, hidden, collapsible, defaultCollapsed, collapsed, onCollapsedChange, children, className, span, pack, density, align, stance, tone, }: PropertyGroupProps):
|
|
355
|
+
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
356
|
|
|
133
357
|
/** Props for `<Subpanel>`. */
|
|
134
358
|
interface SubpanelProps extends PropertyMetricProps, StanceProps {
|
|
@@ -139,7 +363,7 @@ interface SubpanelProps extends PropertyMetricProps, StanceProps {
|
|
|
139
363
|
/** A typographic divider inside a property list: a small title flanked by a
|
|
140
364
|
* rule. Purely a heading — use `<PropertyGroup>` for a bordered section. A
|
|
141
365
|
* stance or tone colors the title and rule. */
|
|
142
|
-
declare function Subpanel({ title, children, className, density, align, stance, tone }: SubpanelProps):
|
|
366
|
+
declare function Subpanel({ title, children, className, density, align, stance, tone }: SubpanelProps): react.JSX.Element;
|
|
143
367
|
|
|
144
368
|
/** A design token as `TokenPanel` edits it. */
|
|
145
369
|
interface TokenEntry {
|
|
@@ -217,7 +441,7 @@ interface TokenPanelProps {
|
|
|
217
441
|
* for a font weight, a curve beside a `cubic-bezier()`, a swatch beside a color,
|
|
218
442
|
* and text for everything else.
|
|
219
443
|
*/
|
|
220
|
-
declare function TokenPanel({ tokens, onChange, collapsed, onCollapsedChange, scales, onScaleChange, categorize, familySize, density, className, }: TokenPanelProps):
|
|
444
|
+
declare function TokenPanel({ tokens, onChange, collapsed, onCollapsedChange, scales, onScaleChange, categorize, familySize, density, className, }: TokenPanelProps): react.JSX.Element;
|
|
221
445
|
|
|
222
446
|
/** Props for {@link Jog}. */
|
|
223
447
|
interface JogProps {
|
|
@@ -244,34 +468,7 @@ interface JogProps {
|
|
|
244
468
|
*
|
|
245
469
|
* Named for the jog of jog/shuttle — moving one frame at a time, as against running at speed.
|
|
246
470
|
*/
|
|
247
|
-
declare function Jog(props: JogProps):
|
|
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[];
|
|
471
|
+
declare function Jog(props: JogProps): react.JSX.Element;
|
|
275
472
|
|
|
276
473
|
/** What resolving a mark's appearance needs beyond the mark itself. */
|
|
277
474
|
interface MarkDrawOptions {
|
|
@@ -348,7 +545,7 @@ declare function captureTarget(args: CaptureArgs, opts?: CaptureOptions): Promis
|
|
|
348
545
|
* Reads the store through the hook the way `<MarkList>` does — the chrome
|
|
349
546
|
* context carries no instrument state and is not the route to it.
|
|
350
547
|
*/
|
|
351
|
-
declare function ExportMenu():
|
|
548
|
+
declare function ExportMenu(): react.JSX.Element | null;
|
|
352
549
|
|
|
353
550
|
/** Props for `<MarkList>`. */
|
|
354
551
|
interface MarkListProps {
|
|
@@ -363,7 +560,7 @@ interface MarkListProps {
|
|
|
363
560
|
*
|
|
364
561
|
* Reads the store through the hook, which re-renders on every mutation — so a
|
|
365
562
|
* mark drawn on a pane appears here without anything wiring the two. */
|
|
366
|
-
declare function MarkList({ meaning, config }: MarkListProps):
|
|
563
|
+
declare function MarkList({ meaning, config }: MarkListProps): react.JSX.Element;
|
|
367
564
|
|
|
368
565
|
/**
|
|
369
566
|
* Whether a stored mark still describes the picture the current config
|
|
@@ -481,10 +678,12 @@ interface SvgStroke {
|
|
|
481
678
|
* writes the stroke centered and says so through `onWarn`; the parser
|
|
482
679
|
* never sets it. */
|
|
483
680
|
align?: StrokeAlign;
|
|
484
|
-
/** `marker-start` / `marker-mid` / `marker-end
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
681
|
+
/** `marker-start` / `marker-mid` / `marker-end` as the kit's `MarkerRef`: the
|
|
682
|
+
* bare `url(#id)` key, or a key with the `size` the serializer writes into a
|
|
683
|
+
* def of its own. */
|
|
684
|
+
markerStart?: MarkerRef;
|
|
685
|
+
markerMid?: MarkerRef;
|
|
686
|
+
markerEnd?: MarkerRef;
|
|
488
687
|
}
|
|
489
688
|
/**
|
|
490
689
|
* Leaf node: a path geometry plus fill/stroke. All other v1 shapes
|
|
@@ -685,7 +884,7 @@ interface AnnotationTargetsProps {
|
|
|
685
884
|
activeToolId: string | null;
|
|
686
885
|
}
|
|
687
886
|
/** One overlay per region the instrument said accepts marks. */
|
|
688
|
-
declare function AnnotationTargets({ capability, state, config, trial, annotations, activeToolId, }: AnnotationTargetsProps):
|
|
887
|
+
declare function AnnotationTargets({ capability, state, config, trial, annotations, activeToolId, }: AnnotationTargetsProps): react.JSX.Element;
|
|
689
888
|
|
|
690
889
|
/** Which weasel tool an annotation tool drives, and what kind of mark that
|
|
691
890
|
* makes. `select` makes none. */
|
|
@@ -804,7 +1003,7 @@ declare function currentPage(path: string, pages: readonly LabPage[]): number;
|
|
|
804
1003
|
*
|
|
805
1004
|
* Pages accumulate -- a project grows a wall, a dashboard, an ingest page, a
|
|
806
1005
|
* bench -- and a tab strip is the layout that stops working first. */
|
|
807
|
-
declare function LabSwitcher({ title, pages, path, className }: LabSwitcherProps):
|
|
1006
|
+
declare function LabSwitcher({ title, pages, path, className }: LabSwitcherProps): react.JSX.Element;
|
|
808
1007
|
|
|
809
1008
|
interface LabBaseProps {
|
|
810
1009
|
/** May change while mounted. An instrument that is a different object from
|
|
@@ -853,6 +1052,9 @@ interface LabBaseProps {
|
|
|
853
1052
|
/** Offer the header's add-trial control. Default `true`; a lab that opens
|
|
854
1053
|
* trials some other way passes `false`. */
|
|
855
1054
|
addTrial?: boolean;
|
|
1055
|
+
/** Offer the header's zoom controls, which act on the focused trial's camera
|
|
1056
|
+
* and answer Mod+=, Mod+- and Mod+0. Default `true`. */
|
|
1057
|
+
zoom?: boolean;
|
|
856
1058
|
/** Tools offered lab-wide. A trial whose instrument declares none of its own
|
|
857
1059
|
* reflects and writes this slot. */
|
|
858
1060
|
tools?: readonly TrialTool[];
|
|
@@ -877,7 +1079,7 @@ type LabProps = LabBaseProps & ({
|
|
|
877
1079
|
});
|
|
878
1080
|
/** The lab runtime: opens the store, provides it, and renders one trial
|
|
879
1081
|
* 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> |
|
|
1082
|
+
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
1083
|
|
|
882
1084
|
/** Props for `<LabBoundary>`. */
|
|
883
1085
|
interface LabBoundaryProps {
|
|
@@ -892,7 +1094,7 @@ interface LabBoundaryProps {
|
|
|
892
1094
|
* For a host that shows arbitrary content inside a trial, such as a component workshop; a lab's own chrome
|
|
893
1095
|
* never needs it.
|
|
894
1096
|
*/
|
|
895
|
-
declare function LabBoundary({ children }: LabBoundaryProps):
|
|
1097
|
+
declare function LabBoundary({ children }: LabBoundaryProps): react.JSX.Element;
|
|
896
1098
|
|
|
897
1099
|
/** Props for `<LabPalette>`. */
|
|
898
1100
|
interface LabPaletteProps {
|
|
@@ -904,7 +1106,7 @@ interface LabPaletteProps {
|
|
|
904
1106
|
/** The lab's tool rail. Writes the lab's tool slot, which every trial whose
|
|
905
1107
|
* instrument declares no tools of its own resolves to. Renders nothing when
|
|
906
1108
|
* the lab contributes no tool rail. */
|
|
907
|
-
declare function LabPalette({ tools, contributions }: LabPaletteProps):
|
|
1109
|
+
declare function LabPalette({ tools, contributions }: LabPaletteProps): react.JSX.Element;
|
|
908
1110
|
|
|
909
1111
|
/** Props for `<LabRoot>`. */
|
|
910
1112
|
interface LabRootProps {
|
|
@@ -924,7 +1126,7 @@ interface LabRootProps {
|
|
|
924
1126
|
* or those components inherit whatever the host page happens to define.
|
|
925
1127
|
* Pair it with `import '@weasel-js/labkit/styles.css'`, which is what defines
|
|
926
1128
|
* the rules this element scopes. */
|
|
927
|
-
declare function LabRoot({ children, mode, className }: LabRootProps):
|
|
1129
|
+
declare function LabRoot({ children, mode, className }: LabRootProps): react.JSX.Element;
|
|
928
1130
|
|
|
929
1131
|
/** Props for `<LabShell>`. */
|
|
930
1132
|
interface LabShellProps {
|
|
@@ -949,7 +1151,17 @@ interface LabShellProps {
|
|
|
949
1151
|
/** Page frame for a lab: a titled header, a body, and an optional footer,
|
|
950
1152
|
* themed for the resolved color mode. Presentational only — use `<Lab>` when
|
|
951
1153
|
* the trial runtime is wanted too. */
|
|
952
|
-
declare function LabShell({ title, children, header, footer, mode, pages, path, documentTitle, }: LabShellProps):
|
|
1154
|
+
declare function LabShell({ title, children, header, footer, mode, pages, path, documentTitle, }: LabShellProps): react.JSX.Element;
|
|
1155
|
+
|
|
1156
|
+
/**
|
|
1157
|
+
* Zoom out, the zoom as a percentage, and zoom in, for whichever trial has the
|
|
1158
|
+
* focus. The percentage resets to actual size. They route through core's
|
|
1159
|
+
* `viewport.zoom` action, on a dispatcher of their own that listens for its
|
|
1160
|
+
* keys — Mod+=, Mod+- and Mod+0 — so the buttons and the keys are one path.
|
|
1161
|
+
* Over a trial with no camera the group stays, disabled, so the header does not
|
|
1162
|
+
* reflow as the focus moves.
|
|
1163
|
+
*/
|
|
1164
|
+
declare function LabZoom(): react.JSX.Element;
|
|
953
1165
|
|
|
954
1166
|
/** A tile's persisted extent, keyed by the id its caller gave it. Grid resizes
|
|
955
1167
|
* write `span`; `size` is here because a strategy swap would write that. */
|
|
@@ -1011,7 +1223,7 @@ interface PanelDescriptor {
|
|
|
1011
1223
|
title: string;
|
|
1012
1224
|
as: 'tile' | 'floating';
|
|
1013
1225
|
}
|
|
1014
|
-
declare function Workspace({ children, ids, panels, resizable, reorderable, onReorder, layout, onLayoutChange, gap, padding, viewport, }: WorkspaceProps):
|
|
1226
|
+
declare function Workspace({ children, ids, panels, resizable, reorderable, onReorder, layout, onLayoutChange, gap, padding, viewport, }: WorkspaceProps): react.JSX.Element;
|
|
1015
1227
|
|
|
1016
1228
|
/** The specimen's sections, in page order. */
|
|
1017
1229
|
declare const SPECIMEN_SECTIONS: readonly ["Buttons & toggles", "Fields & pickers", "Panels & property rows", "Overlays & feedback", "Lists & data", "Tool chrome", "Editors & plots", "Lab chrome"];
|
|
@@ -1023,7 +1235,7 @@ declare const SPECIMEN_SECTIONS: readonly ["Buttons & toggles", "Fields & picker
|
|
|
1023
1235
|
*/
|
|
1024
1236
|
declare function Specimen({ className }: {
|
|
1025
1237
|
className?: string;
|
|
1026
|
-
}):
|
|
1238
|
+
}): react.JSX.Element;
|
|
1027
1239
|
|
|
1028
1240
|
/** The 2D view labkit has always shipped, and what a trial gets when it names no
|
|
1029
1241
|
* other. Re-exported under its own name so a consumer can say which it means. */
|
|
@@ -1051,7 +1263,7 @@ interface TrialProps {
|
|
|
1051
1263
|
}
|
|
1052
1264
|
/** Renders one trial from the lab store: looks up its record and
|
|
1053
1265
|
* instrument, and mounts the instrument inside the trial chrome. */
|
|
1054
|
-
declare function Trial({ id, chrome, suppress }: TrialProps):
|
|
1266
|
+
declare function Trial({ id, chrome, suppress }: TrialProps): react.JSX.Element;
|
|
1055
1267
|
|
|
1056
1268
|
/** Props for `<TrialBody>`. */
|
|
1057
1269
|
interface TrialBodyProps extends Omit<SplitProps, 'sidebar' | 'children' | 'className' | 'sidebarClassName' | 'label'> {
|
|
@@ -1064,7 +1276,7 @@ interface TrialBodyProps extends Omit<SplitProps, 'sidebar' | 'children' | 'clas
|
|
|
1064
1276
|
contentClassName?: string;
|
|
1065
1277
|
}
|
|
1066
1278
|
/** A trial's sidebar and content as a `Split`, wearing the trial's classes. */
|
|
1067
|
-
declare function TrialBody({ sidebar, children, contentClassName, ...rest }: TrialBodyProps):
|
|
1279
|
+
declare function TrialBody({ sidebar, children, contentClassName, ...rest }: TrialBodyProps): react.JSX.Element;
|
|
1068
1280
|
|
|
1069
1281
|
/** The trial's loupe as its chrome sees it: a switch and its position. */
|
|
1070
1282
|
interface LoupeBindings {
|
|
@@ -1105,7 +1317,7 @@ interface TrialChromeProps {
|
|
|
1105
1317
|
/** The frame around a running instrument. Builds one chrome context, assembles
|
|
1106
1318
|
* the contributions the instrument, the runtime and the lab declare, and hands
|
|
1107
1319
|
* each region its slice. */
|
|
1108
|
-
declare function TrialChrome({ trialId, record, instrument, isLastTrial, undoBindings, job, loupe, trialChrome, chrome, suppress, activeToolId, setActiveTool, children, }: TrialChromeProps):
|
|
1320
|
+
declare function TrialChrome({ trialId, record, instrument, isLastTrial, undoBindings, job, loupe, trialChrome, chrome, suppress, activeToolId, setActiveTool, children, }: TrialChromeProps): react.JSX.Element;
|
|
1109
1321
|
|
|
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,
|
|
1111
|
-
export type { AnnotationOverlayProps, AnnotationTargetsProps, AnnotationToolInfo, CaptureArgs, CapturePlan, ComposeSvgArgs, ContentSize, CurveFieldProps, CurveMark, InstrumentSpec, JogProps, LabBoundaryProps, LabPage, LabPaletteProps, LabProps, LabRootProps, LabShellProps, LabSwitcherProps, MarkDrawOptions, MarkListProps,
|
|
1322
|
+
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, LabZoom, MarkList, MarkScene, MarkStyle, PaintableMark, PauseIcon, PlayIcon, PropertyControl, PropertyField, PropertyGroup, PropertyListPack, PropertyRowLayout, 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 };
|
|
1323
|
+
export type { AnnotationOverlayProps, AnnotationTargetsProps, AnnotationToolInfo, CaptureArgs, CapturePlan, ComposeSvgArgs, ContentSize, CurveFieldProps, CurveMark, InstrumentSpec, JogProps, LabBoundaryProps, LabPage, LabPaletteProps, LabProps, LabRootProps, LabShellProps, LabSwitcherProps, MarkDrawOptions, MarkListProps, PaneSize, PanelDescriptor, PropertyControlProps, PropertyFieldProps, PropertyGroupProps, PropertyOption, SubpanelProps, TokenCategory, TokenEntry, TokenPanelProps, TokenScale, TokenScaleRule, TrialBodyProps, TrialChromeProps, TrialLayout, TrialProps, UndoBindings, ValidationResult, ViewTransform2D, WorkspaceProps };
|