@weasel-js/labkit 1.5.0 → 1.5.2
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/README.md +41 -4
- package/dist/_dts/{CanvasStackContext-CqkxkFJW.d.ts → CanvasStackContext-CMMo180l.d.ts} +1 -1
- package/dist/_dts/{PrefsForm.d-DDHFANkc.d.ts → PrefsForm.d-DPy9I8It.d.ts} +4 -0
- package/dist/_dts/Select.d-ZTiwzYyT.d.ts +479 -0
- package/dist/_dts/{frac-8R6UmlvN.d.ts → frac-B4hFJMiN.d.ts} +54 -6
- package/dist/_dts/{index-retnAut7.d.ts → index-8LiKe3A-.d.ts} +77 -10
- package/dist/_dts/{index-B8uu2ba7.d.ts → index-DlKolEIZ.d.ts} +20 -8
- package/dist/_dts/{types-Ca2LCnPq.d.ts → types-Db-3NNk1.d.ts} +28 -4
- package/dist/_dts/{usePanZoom-nS798rOF.d.ts → usePanZoom-SSTZe410.d.ts} +4 -47
- package/dist/_dts/{useTrialState-jcx_TdU6.d.ts → useTrialState-pnAE-UBD.d.ts} +1 -1
- package/dist/canvas/index.d.ts +5 -5
- package/dist/canvas/index.js +1 -1
- package/dist/chrome/index.d.ts +4 -4
- package/dist/chrome/index.js +7 -7
- package/dist/chunk-6BUQ77ZV.js +18 -0
- package/dist/chunk-6BUQ77ZV.js.map +1 -0
- package/dist/{chunk-KJALCDWE.js → chunk-753Y6HE6.js} +9 -9
- package/dist/chunk-753Y6HE6.js.map +1 -0
- package/dist/{chunk-6ZDGOZQV.js → chunk-A2ACAGW6.js} +72 -20
- package/dist/chunk-A2ACAGW6.js.map +1 -0
- package/dist/{chunk-NS64DXMN.js → chunk-CKUKF72R.js} +44 -21
- package/dist/chunk-CKUKF72R.js.map +1 -0
- package/dist/{chunk-MUKOW3TC.js → chunk-D35PFTS7.js} +4 -4
- package/dist/{chunk-MUKOW3TC.js.map → chunk-D35PFTS7.js.map} +1 -1
- package/dist/{chunk-UU3NJO6N.js → chunk-EMXAIRUJ.js} +3 -3
- package/dist/{chunk-UU3NJO6N.js.map → chunk-EMXAIRUJ.js.map} +1 -1
- package/dist/{chunk-ZPH5WTWF.js → chunk-ERFMC6WU.js} +142 -66
- package/dist/chunk-ERFMC6WU.js.map +1 -0
- package/dist/chunk-FKLT3ITC.js +590 -0
- package/dist/chunk-FKLT3ITC.js.map +1 -0
- package/dist/{chunk-QLSV2N3G.js → chunk-IJJUK4FU.js} +25 -13
- package/dist/chunk-IJJUK4FU.js.map +1 -0
- package/dist/{chunk-EKIICY6X.js → chunk-KJCUERQF.js} +37 -25
- package/dist/chunk-KJCUERQF.js.map +1 -0
- package/dist/chunk-LASCBWW7.js +13456 -0
- package/dist/chunk-LASCBWW7.js.map +1 -0
- package/dist/{chunk-67SJLMC7.js → chunk-LRI3MBGR.js} +45 -12
- package/dist/chunk-LRI3MBGR.js.map +1 -0
- package/dist/chunk-REOBGYMC.js +150 -0
- package/dist/chunk-REOBGYMC.js.map +1 -0
- package/dist/{chunk-PGETSEDK.js → chunk-TT5C5S6R.js} +11 -90
- package/dist/chunk-TT5C5S6R.js.map +1 -0
- package/dist/{chunk-NDRYLVOW.js → chunk-Z76KEZAX.js} +2 -2
- package/dist/chunk-Z76KEZAX.js.map +1 -0
- package/dist/config/index.d.ts +62 -19
- package/dist/config/index.js +6 -4
- package/dist/controls/index.d.ts +3 -3
- package/dist/controls/index.js +4 -4
- package/dist/dragdrop/index.d.ts +3 -3
- package/dist/index.d.ts +230 -62
- package/dist/index.js +1367 -1698
- package/dist/index.js.map +1 -1
- package/dist/layers/index.d.ts +4 -4
- package/dist/layers/index.js +2 -2
- package/dist/loupe/index.d.ts +67 -16
- package/dist/loupe/index.js +1 -1
- package/dist/passthrough/weasel-ui.d.ts +57 -230
- package/dist/passthrough/weasel-ui.js +1 -1
- package/dist/primitives/index.d.ts +3 -1
- package/dist/primitives/index.js +3 -3
- package/dist/state/index.d.ts +5 -5
- package/dist/state/index.js +5 -3
- package/dist/state/index.js.map +1 -1
- package/dist/styles.css +266 -57
- package/dist/surface/index.js +1 -1
- package/dist/ui/layers/index.js +1 -1
- package/dist/undo/index.d.ts +3 -3
- package/package.json +9 -9
- package/src/annotations/AnnotationOverlay.tsx +3 -0
- package/src/annotations/Annotations.less +4 -0
- package/src/annotations/Annotations.overlay.test.tsx +20 -0
- package/src/annotations/svgNodes.ts +1 -0
- package/src/annotations/toolMap.test.ts +9 -5
- package/src/annotations/toolMap.ts +3 -0
- package/src/canvas/CanvasStack.stories.tsx +1 -1
- package/src/canvas/index.ts +0 -9
- package/src/canvas/usePanZoom.test.ts +28 -0
- package/src/canvas/usePanZoom.ts +11 -4
- package/src/chrome/ChromeRegions.stories.tsx +1 -1
- package/src/chrome/LabChrome.tsx +21 -5
- package/src/chrome/builtins.test.ts +1 -0
- package/src/chrome/builtins.tsx +1 -0
- package/src/chrome/index.ts +1 -0
- package/src/chrome/labTypes.ts +3 -3
- package/src/chrome/regions/PaletteRegion.test.tsx +18 -0
- package/src/chrome/regions/PaletteRegion.tsx +6 -10
- package/src/chrome/regions/SidebarRegion.stories.tsx +44 -0
- package/src/chrome/regions/TitleBarRegion.tsx +1 -1
- package/src/chrome/regions/ToolbarRegion.tsx +11 -7
- package/src/chrome/types.ts +11 -2
- package/src/config/auto.test.ts +12 -0
- package/src/config/auto.ts +15 -0
- package/src/config/autoConfig.test.ts +107 -0
- package/src/config/autoConfig.ts +153 -0
- package/src/config/builder.test.ts +38 -0
- package/src/config/builder.ts +55 -11
- package/src/config/index.ts +3 -0
- package/src/config/path.ts +7 -2
- package/src/config/resolve.test.ts +25 -0
- package/src/config/resolve.ts +17 -1
- package/src/config/types.ts +32 -2
- package/src/config/useResolvedConfig.ts +26 -0
- package/src/controls/AutoControls.stories.tsx +88 -0
- package/src/controls/ControlPanel.less +23 -0
- package/src/controls/ControlPanel.stories.tsx +83 -1
- package/src/controls/ControlPanel.test.tsx +457 -4
- package/src/controls/ControlPanel.tsx +534 -73
- package/src/index.test.ts +0 -2
- package/src/index.ts +33 -11
- package/src/instrument/serializers.ts +29 -1
- package/src/lab/Lab.chrome.test.tsx +16 -0
- package/src/lab/Lab.stories.tsx +1 -1
- package/src/lab/Lab.surface.test.tsx +7 -2
- package/src/lab/Lab.test.tsx +79 -1
- package/src/lab/Lab.tsx +124 -16
- package/src/lab/LabContext.ts +8 -0
- package/src/lab/LabFit.stories.tsx +4 -4
- package/src/lab/LabFullChrome.stories.tsx +1 -1
- package/src/lab/LabHeader.tsx +0 -1
- package/src/lab/LabRoot.test.tsx +56 -0
- package/src/lab/LabRoot.tsx +47 -0
- package/src/lab/LabShell.less +24 -3
- package/src/lab/LabShell.stories.tsx +50 -1
- package/src/lab/LabShell.tsx +18 -27
- package/src/lab/LabSwitcher.less +10 -10
- package/src/lab/LabSwitcher.test.tsx +14 -9
- package/src/lab/LabSwitcher.tsx +8 -4
- package/src/lab/Workspace.less +1 -1
- package/src/lab/Workspace.stories.tsx +1 -1
- package/src/lab/Workspace.surface.test.tsx +1 -1
- package/src/lab/index.ts +2 -0
- package/src/layers/LayerList.less +1 -1
- package/src/layers/LayerList.stories.tsx +2 -2
- package/src/loupe/AGENTS.md +16 -4
- package/src/loupe/LoupeGestures.tsx +67 -0
- package/src/loupe/TrialLoupe.tsx +43 -28
- package/src/loupe/index.ts +4 -0
- package/src/loupe/loupeActions.ts +98 -0
- package/src/loupe/useLoupe.test.tsx +59 -2
- package/src/loupe/useLoupe.ts +28 -48
- package/src/passthrough/weasel-ui.ts +3 -3
- package/src/primitives/FloatingPanel.stories.tsx +1 -1
- package/src/primitives/FpsMeter.less +6 -1
- package/src/primitives/FpsMeter.stories.tsx +1 -1
- package/src/primitives/FpsMeter.test.tsx +12 -4
- package/src/primitives/FpsMeter.tsx +6 -1
- package/src/primitives/JobProgress.stories.tsx +2 -2
- package/src/primitives/Legend.stories.tsx +1 -1
- package/src/primitives/ScaleIndicator.stories.tsx +1 -1
- package/src/primitives/Sidebar.less +7 -0
- package/src/primitives/Sidebar.stories.tsx +1 -1
- package/src/primitives/Split.test.tsx +25 -0
- package/src/primitives/Split.tsx +36 -20
- package/src/primitives/StatusBar.less +6 -0
- package/src/primitives/StatusBar.stories.tsx +1 -1
- package/src/primitives/Toolbar.stories.tsx +1 -1
- package/src/specimen/Specimen.less +95 -0
- package/src/specimen/Specimen.stories.tsx +13 -0
- package/src/specimen/Specimen.test.tsx +13 -0
- package/src/specimen/Specimen.tsx +888 -0
- package/src/state/Persistence.stories.tsx +4 -4
- package/src/state/store.test.ts +65 -0
- package/src/state/store.ts +32 -8
- package/src/state/types.ts +31 -2
- package/src/state/useTrialState.test.tsx +85 -0
- package/src/state/useTrialState.ts +9 -1
- package/src/state/view.test.ts +4 -4
- package/src/styles.less +1 -0
- package/src/surface/index.ts +1 -1
- package/src/surface/useSurfaceTile.test.tsx +1 -1
- package/src/surface/useTiledSurface.test.tsx +65 -10
- package/src/surface/useTiledSurface.ts +23 -11
- package/src/theme/Interstellar.stories.tsx +2 -2
- package/src/theme/interstellar.test.ts +16 -5
- package/src/theme/interstellar.theme.json +180 -0
- package/src/theme/interstellar.ts +8 -5
- package/src/tools/labTool.ts +3 -3
- package/src/trial/Trial.annotations.test.tsx +13 -4
- package/src/trial/Trial.canvas.test.tsx +36 -0
- package/src/trial/Trial.config.test.tsx +75 -2
- package/src/trial/Trial.less +4 -0
- package/src/trial/Trial.stories.tsx +4 -1
- package/src/trial/Trial.test.tsx +3 -0
- package/src/trial/Trial.tsx +21 -14
- package/src/trial/TrialChrome.tsx +17 -3
- package/src/trial/trialOps.test.ts +101 -1
- package/src/trial/trialOps.ts +62 -4
- package/dist/_dts/ToggleBar.d-DbHoWKIA.d.ts +0 -116
- package/dist/chunk-67SJLMC7.js.map +0 -1
- package/dist/chunk-6ZDGOZQV.js.map +0 -1
- package/dist/chunk-E44SU6XS.js +0 -50
- package/dist/chunk-E44SU6XS.js.map +0 -1
- package/dist/chunk-EKIICY6X.js.map +0 -1
- package/dist/chunk-KJALCDWE.js.map +0 -1
- package/dist/chunk-NDRYLVOW.js.map +0 -1
- package/dist/chunk-NS64DXMN.js.map +0 -1
- package/dist/chunk-PGETSEDK.js.map +0 -1
- package/dist/chunk-QLSV2N3G.js.map +0 -1
- package/dist/chunk-S2SHZRD7.js +0 -7681
- package/dist/chunk-S2SHZRD7.js.map +0 -1
- package/dist/chunk-TQBBYTAF.js +0 -280
- package/dist/chunk-TQBBYTAF.js.map +0 -1
- package/dist/chunk-ZPH5WTWF.js.map +0 -1
- package/src/canvas/useOrbit.test.ts +0 -167
- package/src/canvas/useOrbit.ts +0 -156
- package/src/theme/interstellar.tokens.json +0 -61
package/dist/index.d.ts
CHANGED
|
@@ -1,34 +1,47 @@
|
|
|
1
|
-
export { B as Button, a as ButtonProps, b as ButtonSize, c as ButtonVariant, T as ToggleBar, d as ToggleBarItem, e as ToggleBarProps, f as ToggleBarSize, g as ToggleBarVariant } from './_dts/ToggleBar.d-DbHoWKIA.js';
|
|
2
|
-
export { LayerStack, LayerStackItem, LayerStackProps } from './ui/layers/index.js';
|
|
3
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import { I as IconProps } from './_dts/Select.d-ZTiwzYyT.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-ZTiwzYyT.js';
|
|
4
|
+
export { LayerStack, LayerStackItem, LayerStackProps } from './ui/layers/index.js';
|
|
4
5
|
import * as react from 'react';
|
|
5
6
|
import { ReactNode } from 'react';
|
|
6
|
-
import { P as PropertyMetricProps, a as PropertyListPack } from './_dts/index-
|
|
7
|
-
export { C as CheckboxRow, b as CheckboxRowProps, c as ColorRow, d as ColorRowProps, e as ControlPanel, N as NumberRow, f as NumberRowProps, g as PropertyList, h as PropertyListProps, i as PropertyOption, j as PropertyPanel, k as PropertyPanelProps, l as PropertyRow, m as PropertyRowLayout, n as PropertyRowProps, o as PropertyRowVariant, p as PropertySpan, q as PropertySpanProps, S as SelectRow, r as SelectRowProps, s as SliderRow, t as SliderRowProps, T as TextRow, u as TextRowProps, v as ToggleRow, w as ToggleRowProps } from './_dts/index-
|
|
8
|
-
import { DrawCommand, SceneNode, View, Path, FillStyle, StyledRun, TextStyle, Stroke, BuiltinToolId } from '@weasel-js/core';
|
|
9
|
-
import { t as WorldRect, A as AnnotationData, v as AnnotationMeaning, w as MarkScene, x as CaptureSource, y as CaptureOptions, z as CaptureResult, B as AnnotationTarget, E as AnnotationsApi, F as AnnotationsCapability, G as TrialInfo, H as TrialTool, J as AnnotationKind, k as ViewTransform, K as Instrument, q as InstrumentList, o as LabMode, N as TrialContribution, c as StorageAdapter, T as TrialRecord } from './_dts/frac-
|
|
10
|
-
export {
|
|
11
|
-
export { C as CanvasStack, a as CanvasStackProps,
|
|
12
|
-
export { C as CanvasLayerDescriptor, a as CanvasStackContext, b as CanvasStackContextValue, c as CanvasStackSurface } from './_dts/CanvasStackContext-
|
|
13
|
-
import { L as LabContribution } from './_dts/index-
|
|
14
|
-
export { A as AddTrialOptions, a as
|
|
15
|
-
export { BaseNode, BooleanNode, ColorNode, CustomNode, EnumNode, GroupNode, NumberNode, StringNode, ValueNode, applyRules, builtinRules, f, fillConfigDefaults, fromConfigFields, hasConfigPath, isConfigBranch, isLeafVisible, resolveConfigSchema, schemaNodeAtPath, titleCase, useConfigSchema, valueAtPath, withValueAtPath } from './config/index.js';
|
|
16
|
-
import { b as ConfigSchema, a as ConfigField, c as ConfigRule, d as ControlRenderer } from './_dts/types-
|
|
17
|
-
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, 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-
|
|
7
|
+
import { P as PropertyMetricProps, a as PropertyListPack } from './_dts/index-8LiKe3A-.js';
|
|
8
|
+
export { C as CheckboxRow, b as CheckboxRowProps, c as ColorRow, d as ColorRowProps, e as ControlPanel, N as NumberRow, f as NumberRowProps, g as PropertyList, h as PropertyListProps, i as PropertyOption, j as PropertyPanel, k as PropertyPanelProps, l as PropertyRow, m as PropertyRowLayout, n as PropertyRowProps, o as PropertyRowVariant, p as PropertySpan, q as PropertySpanProps, S as SelectRow, r as SelectRowProps, s as SliderRow, t as SliderRowProps, T as TextRow, u as TextRowProps, v as ToggleRow, w as ToggleRowProps } from './_dts/index-8LiKe3A-.js';
|
|
9
|
+
import { DrawCommand, SceneNode, View, Path, FillStyle, ScreenLength, StrokeAlign, StyledRun, TextStyle, TextVerticalAlign, Stroke, BuiltinToolId } from '@weasel-js/core';
|
|
10
|
+
import { t as WorldRect, A as AnnotationData, v as AnnotationMeaning, w as MarkScene, x as CaptureSource, y as CaptureOptions, z as CaptureResult, B as AnnotationTarget, E as AnnotationsApi, F as AnnotationsCapability, G as TrialInfo, H as TrialTool, J as AnnotationKind, k as ViewTransform, K as Instrument, q as InstrumentList, o as LabMode, N as LabDensity, O as TrialContribution, c as StorageAdapter, T as TrialRecord } from './_dts/frac-B4hFJMiN.js';
|
|
11
|
+
export { Q as Annotation, R as AnnotationInit, X as AnnotationPatch, Y as AnnotationQuery, Z as AnnotationStatus, _ as AnnotationStoreOptions, $ as AnnotationTargetInfo, a0 as Auto, a1 as CanvasCapability, a2 as CanvasLayer, a3 as CaptureDeps, a4 as ContributionBase, C as CreateLabStoreOptions, D as DEFAULT_FRAME, n as DragDropCapability, m as DragFeedback, a5 as FracPoint, a6 as FracRect, a7 as HitResult, a8 as IconComponent, a9 as LOUPE_DEFAULTS, L as LabDocument, d as LabStoreState, aa as LayerCapability, ab as LayerDescriptor, ac as LoupeCapability, ad as LoupeDeclaration, ae as LoupeRenderArgs, P as PaletteItem, l as Point, af as RegionContribution, ag as RenderContext, ah as ResolvedLoupe, e as SavedSnapshot, ai as SerializedAnnotations, S as SerializedTrial, aj as SidebarSection, ak as SidebarSlotContext, al as StageCapability, am as StatusReadout, f as StorageChange, an as SystemEvent, ao as ToolCapability, ap as ToolItem, aq as ToolSlotContext, ar as ToolbarItem, as as TrialChromeContext, at as TrialRegion, g as TrialStateHandle, au as UndoCapability, U as UndoStack, h as UndockedPanel, i as UndockedPanels, av as ViewportControl, V as ViewportSize, W as WorldFrame, a as WorldSpec, aw as annotationsFromJSON, b as applyCamera, ax as auto, ay as createAnnotationScene, az as createAnnotationStore, j 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-B4hFJMiN.js';
|
|
12
|
+
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-SSTZe410.js';
|
|
13
|
+
export { C as CanvasLayerDescriptor, a as CanvasStackContext, b as CanvasStackContextValue, c as CanvasStackSurface } from './_dts/CanvasStackContext-CMMo180l.js';
|
|
14
|
+
import { L as LabContribution } from './_dts/index-DlKolEIZ.js';
|
|
15
|
+
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-DlKolEIZ.js';
|
|
16
|
+
export { BaseNode, BooleanNode, ColorNode, CustomNode, EnumNode, GroupNode, NumberNode, StringNode, ValueNode, applyRules, autoPathsOf, builtinRules, f, fillConfigDefaults, fromConfigFields, hasConfigPath, isConfigBranch, isLeafVisible, resolveAutoConfig, resolveConfigSchema, schemaNodeAtPath, titleCase, useConfigSchema, useResolvedConfig, valueAtPath, withValueAtPath } from './config/index.js';
|
|
17
|
+
import { b as ConfigSchema, a as ConfigField, c as ConfigRule, d as ControlRenderer } from './_dts/types-Db-3NNk1.js';
|
|
18
|
+
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, 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-Db-3NNk1.js';
|
|
18
19
|
import { J as JobHandle } from './_dts/types-DJ79Tg5J.js';
|
|
19
20
|
export { a as JobCapability, b as JobEvent, c as JobFailure, d as JobStatus } from './_dts/types-DJ79Tg5J.js';
|
|
20
21
|
export { UseJobOptions, useJob } from './job/index.js';
|
|
21
22
|
export { LayerList, LayerListProps, LayerTreeNode } from './layers/index.js';
|
|
22
|
-
export { CanvasLoupe, CanvasLoupeProps, DomLoupe, DomLoupeProps, LensCamera, LoupeBubble, LoupeBubbleProps, LoupeState, SourceRect, TrialLoupe, TrialLoupeProps, UseLoupeOptions, drawCanvasLens, lensCamera, lensSourceRect, sampleStack, useLoupe } from './loupe/index.js';
|
|
23
|
+
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';
|
|
23
24
|
import { SplitProps } from './primitives/index.js';
|
|
24
25
|
export { FloatingPanel, FloatingPanelProps, FpsMeter, JobProgress, JobProgressProps, Legend, LegendEntry, LegendMark, LegendProps, ScaleIndicator, ScaleIndicatorProps, Sidebar, SidebarProps, Split, StatusBar, StatusBarProps, StatusBarSectionProps, Toolbar, ToolbarButtonProps, ToolbarGroupProps, ToolbarProps, ZoomControl, ZoomControlProps } from './primitives/index.js';
|
|
25
|
-
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-
|
|
26
|
+
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-pnAE-UBD.js';
|
|
26
27
|
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';
|
|
28
|
+
import { Theme } from '@weasel-js/theme';
|
|
27
29
|
export { EventBus, EventListener, clearUndo, createEventBus, emptyStack, pushSnapshot, redo, undo } from './undo/index.js';
|
|
28
|
-
import '
|
|
30
|
+
import 'react-aria-components';
|
|
31
|
+
import './_dts/PrefsForm.d-DPy9I8It.js';
|
|
29
32
|
import 'windease';
|
|
30
33
|
import 'zustand/vanilla';
|
|
31
34
|
|
|
35
|
+
declare const ResetIcon: (p: IconProps) => react_jsx_runtime.JSX.Element;
|
|
36
|
+
declare const CloseIcon: (p: IconProps) => react_jsx_runtime.JSX.Element;
|
|
37
|
+
declare const PlayIcon: (p: IconProps) => react_jsx_runtime.JSX.Element;
|
|
38
|
+
declare const PauseIcon: (p: IconProps) => react_jsx_runtime.JSX.Element;
|
|
39
|
+
declare const StopIcon: (p: IconProps) => react_jsx_runtime.JSX.Element;
|
|
40
|
+
declare const StepBackIcon: (p: IconProps) => react_jsx_runtime.JSX.Element;
|
|
41
|
+
declare const StepForwardIcon: (p: IconProps) => react_jsx_runtime.JSX.Element;
|
|
42
|
+
declare const CollapseIcon: (p: IconProps) => react_jsx_runtime.JSX.Element;
|
|
43
|
+
declare const ExpandIcon: (p: IconProps) => react_jsx_runtime.JSX.Element;
|
|
44
|
+
|
|
32
45
|
/** An annotation drawn over a curve plot: a shaded band across a range of x,
|
|
33
46
|
* or a vertical line at one x. */
|
|
34
47
|
type CurveMark = {
|
|
@@ -137,6 +150,9 @@ declare function EffectCardList<T extends EffectCardListItem>({ items, renderIte
|
|
|
137
150
|
interface PropertyGroupProps extends PropertyMetricProps {
|
|
138
151
|
/** Title rendered between two rules at the top of the group. */
|
|
139
152
|
title: ReactNode;
|
|
153
|
+
/** Help text for the whole group, drawn under the title and above the
|
|
154
|
+
* rows. `<PropertyRow description>` covers the per-row case. */
|
|
155
|
+
description?: ReactNode;
|
|
140
156
|
/** When true the group renders nothing — useful for conditional sections. */
|
|
141
157
|
hidden?: boolean;
|
|
142
158
|
/**
|
|
@@ -156,6 +172,9 @@ interface PropertyGroupProps extends PropertyMetricProps {
|
|
|
156
172
|
onCollapsedChange?: (next: boolean) => void;
|
|
157
173
|
children: ReactNode;
|
|
158
174
|
className?: string;
|
|
175
|
+
/** Take the whole width of a packed grid, like `<PropertyRow span>`: a group
|
|
176
|
+
* lays its own rows out, so half a column leaves them overlapping. */
|
|
177
|
+
span?: boolean;
|
|
159
178
|
/** How rows pack into the 2-column grid — see `<PropertyList pack>`. */
|
|
160
179
|
pack?: PropertyListPack;
|
|
161
180
|
}
|
|
@@ -167,7 +186,112 @@ interface PropertyGroupProps extends PropertyMetricProps {
|
|
|
167
186
|
* A collapsible group keeps its rows mounted and hides them, so a control's
|
|
168
187
|
* local state survives being folded away.
|
|
169
188
|
*/
|
|
170
|
-
declare function PropertyGroup({ title, hidden, collapsible, defaultCollapsed, collapsed, onCollapsedChange, children, className, pack, density, align, }: PropertyGroupProps): react_jsx_runtime.JSX.Element | null;
|
|
189
|
+
declare function PropertyGroup({ title, description, hidden, collapsible, defaultCollapsed, collapsed, onCollapsedChange, children, className, span, pack, density, align, }: PropertyGroupProps): react_jsx_runtime.JSX.Element | null;
|
|
190
|
+
|
|
191
|
+
/** A design token as `TokenPanel` edits it. */
|
|
192
|
+
interface TokenEntry {
|
|
193
|
+
/** The custom property, e.g. `--wzl-gray-50`. */
|
|
194
|
+
name: string;
|
|
195
|
+
/** A DTCG type name. A type the panel has no control for edits as text. */
|
|
196
|
+
type: string;
|
|
197
|
+
/** Tokens sharing a group sit together; a color group large enough draws as one row of swatches. */
|
|
198
|
+
group: string;
|
|
199
|
+
value: string;
|
|
200
|
+
/** Whether `value` overrides the token's own, which offers Reset. */
|
|
201
|
+
overridden?: boolean;
|
|
202
|
+
description?: string;
|
|
203
|
+
}
|
|
204
|
+
/** How a scale's steps follow from its base: one multiplier per step, a constant ratio, or a constant step. */
|
|
205
|
+
type TokenScaleRule = {
|
|
206
|
+
kind: 'factors';
|
|
207
|
+
factors: readonly number[];
|
|
208
|
+
} | {
|
|
209
|
+
kind: 'ratio';
|
|
210
|
+
ratio: number;
|
|
211
|
+
} | {
|
|
212
|
+
kind: 'step';
|
|
213
|
+
step: number;
|
|
214
|
+
};
|
|
215
|
+
/** A group whose steps are generated from a base, so the panel edits the base and the rule rather than each step. */
|
|
216
|
+
interface TokenScale {
|
|
217
|
+
/** The generated tokens, smallest first. Anything else in the group draws as an ordinary step. */
|
|
218
|
+
tokens: readonly string[];
|
|
219
|
+
base: number;
|
|
220
|
+
rule: TokenScaleRule;
|
|
221
|
+
}
|
|
222
|
+
/**
|
|
223
|
+
* The same scale under another rule, fitted to the amounts its steps have now.
|
|
224
|
+
* A ratio or step counts from the first step, so switching to one moves the
|
|
225
|
+
* base there.
|
|
226
|
+
*/
|
|
227
|
+
declare function refitScale(scale: TokenScale, kind: TokenScaleRule['kind'], amounts: readonly number[]): TokenScale;
|
|
228
|
+
type TokenCategory = 'color' | 'type' | 'size' | 'motion' | 'depth' | 'other';
|
|
229
|
+
/** A DTCG type read off the shape of a value, for a token that arrives without one. `'string'` when nothing fits. */
|
|
230
|
+
declare function inferTokenType(value: string): string;
|
|
231
|
+
|
|
232
|
+
type OnChange = (name: string, value: string | null) => void;
|
|
233
|
+
/** Props for `<TokenPanel>`. */
|
|
234
|
+
interface TokenPanelProps {
|
|
235
|
+
tokens: readonly TokenEntry[];
|
|
236
|
+
/** A token's new value, or null to drop its override. Keep it stable: rows re-render only when it or their token changes. */
|
|
237
|
+
onChange: OnChange;
|
|
238
|
+
/** Sections held closed, by category. Omit to let the panel keep that state itself. */
|
|
239
|
+
collapsed?: Readonly<Partial<Record<TokenCategory, boolean>>>;
|
|
240
|
+
onCollapsedChange?: (category: TokenCategory, collapsed: boolean) => void;
|
|
241
|
+
/** Groups generated from a base, by group name. Such a group edits its base and rule above its steps. */
|
|
242
|
+
scales?: Readonly<Record<string, TokenScale>>;
|
|
243
|
+
/** A scale's new base or rule. The panel does not regenerate the steps; the consumer does, through `onChange`. */
|
|
244
|
+
onScaleChange?: (group: string, scale: TokenScale) => void;
|
|
245
|
+
/** Files a token under a section. Defaults to `tokenCategory`. */
|
|
246
|
+
categorize?: (token: TokenEntry) => TokenCategory;
|
|
247
|
+
/** The fewest colors, or sizes, sharing a group that draw as one row of swatches or one grid of steps. Default 3. */
|
|
248
|
+
familySize?: number;
|
|
249
|
+
/**
|
|
250
|
+
* Row layout. `tight` puts a token on one line — name, control, Reset — with the
|
|
251
|
+
* names on a fixed rail so the values read down the panel as a column, and caps
|
|
252
|
+
* the field rather than letting it span the panel. Default `normal` stacks the
|
|
253
|
+
* control under its name.
|
|
254
|
+
*/
|
|
255
|
+
density?: 'tight' | 'normal';
|
|
256
|
+
className?: string;
|
|
257
|
+
}
|
|
258
|
+
/**
|
|
259
|
+
* Edits a set of design tokens by type: collapsible sections by category, a
|
|
260
|
+
* color group drawn as one row of swatches sized to fit, a group of sizes drawn
|
|
261
|
+
* as one grid of numbers labeled by step — with its base and rule above it when
|
|
262
|
+
* `scales` says how it is generated — and a control for each
|
|
263
|
+
* type — a number with its unit for dimensions and durations, the nine weights
|
|
264
|
+
* for a font weight, a curve beside a `cubic-bezier()`, a swatch beside a color,
|
|
265
|
+
* and text for everything else.
|
|
266
|
+
*/
|
|
267
|
+
declare function TokenPanel({ tokens, onChange, collapsed, onCollapsedChange, scales, onScaleChange, categorize, familySize, density, className, }: TokenPanelProps): react_jsx_runtime.JSX.Element;
|
|
268
|
+
|
|
269
|
+
/** Props for {@link Jog}. */
|
|
270
|
+
interface JogProps {
|
|
271
|
+
/** Which step is showing, 0-based. */
|
|
272
|
+
index: number;
|
|
273
|
+
/** How many steps there are. */
|
|
274
|
+
count: number;
|
|
275
|
+
playing: boolean;
|
|
276
|
+
onPlay: (playing: boolean) => void;
|
|
277
|
+
/** Move one step, back or forward. */
|
|
278
|
+
onStep: (by: -1 | 1) => void;
|
|
279
|
+
/** Jump to a step. Left out, no scrubber is drawn. */
|
|
280
|
+
onScrub?: (index: number) => void;
|
|
281
|
+
/** What one step is called, for the spoken labels. Defaults to `Step`. */
|
|
282
|
+
unit?: string;
|
|
283
|
+
/** Drawn after the readout — a beat's caption, a snapshot's date. */
|
|
284
|
+
caption?: ReactNode;
|
|
285
|
+
className?: string;
|
|
286
|
+
}
|
|
287
|
+
/**
|
|
288
|
+
* Transport for something counted rather than timed: beat 3 of 24, not 4.20s of 12.00s.
|
|
289
|
+
* `<Transport>` is the continuous-time one, and wants a playhead in milliseconds, a rate and
|
|
290
|
+
* a loop, none of which a list of steps has.
|
|
291
|
+
*
|
|
292
|
+
* Named for the jog of jog/shuttle — moving one frame at a time, as against running at speed.
|
|
293
|
+
*/
|
|
294
|
+
declare function Jog(props: JogProps): react_jsx_runtime.JSX.Element;
|
|
171
295
|
|
|
172
296
|
/** The subset of a mark's scene node this needs: where it is, and what it is. */
|
|
173
297
|
interface PaintableMark {
|
|
@@ -307,6 +431,8 @@ declare function seenFrom(config: unknown, keys: readonly string[]): Record<stri
|
|
|
307
431
|
*/
|
|
308
432
|
declare function isStale(seen: Readonly<Record<string, unknown>> | undefined, config: unknown, keys: readonly string[]): boolean;
|
|
309
433
|
|
|
434
|
+
type Mat3 = readonly [number, number, number, number, number, number];
|
|
435
|
+
|
|
310
436
|
/**
|
|
311
437
|
* Public types for `@weasel-js/svg`. The package exposes a flat,
|
|
312
438
|
* discriminated-union node model (`SvgNode`) that mirrors the SVG element
|
|
@@ -354,10 +480,14 @@ interface NamespacedElement {
|
|
|
354
480
|
children?: Record<string, NamespacedElement[]>;
|
|
355
481
|
}
|
|
356
482
|
/**
|
|
357
|
-
* 2x3 affine matrix in
|
|
358
|
-
*
|
|
483
|
+
* 2x3 affine matrix in SVG's `matrix(a b c d e f)` order, mapping
|
|
484
|
+
* `[x', y'] = [a*x + c*y + e, b*x + d*y + f]`.
|
|
485
|
+
*
|
|
486
|
+
* The same order the kernel's affine tier uses, so this is that type under
|
|
487
|
+
* the name the SVG spec gives it — not a parallel one. An `SvgGroupNode`'s
|
|
488
|
+
* transform and a geom `Mat3` are interchangeable without a conversion.
|
|
359
489
|
*/
|
|
360
|
-
type Matrix =
|
|
490
|
+
type Matrix = Mat3;
|
|
361
491
|
/**
|
|
362
492
|
* FillStyle description in the SVG sense — either explicit `none`, a solid
|
|
363
493
|
* color, or a reference to a weasel-native gradient `FillStyle`. Solid colors
|
|
@@ -378,11 +508,9 @@ type SvgPaint = {
|
|
|
378
508
|
interface SvgStroke {
|
|
379
509
|
paint: SvgPaint;
|
|
380
510
|
/** World units, or `{ px }` for a width that holds its rendered thickness
|
|
381
|
-
* however the document is scaled — SVG's `vector-effect="non-scaling-stroke"
|
|
382
|
-
*
|
|
383
|
-
width:
|
|
384
|
-
px: number;
|
|
385
|
-
};
|
|
511
|
+
* however the document is scaled — SVG's `vector-effect="non-scaling-stroke"`.
|
|
512
|
+
* Literally the kit's own unit, not a second spelling of it. */
|
|
513
|
+
width: ScreenLength;
|
|
386
514
|
opacity?: number;
|
|
387
515
|
/** `stroke-linecap`. Default per SVG spec is `'butt'`. */
|
|
388
516
|
cap?: 'butt' | 'round' | 'square';
|
|
@@ -396,6 +524,10 @@ interface SvgStroke {
|
|
|
396
524
|
* attribute may render with longer miters than the source SVG intended.
|
|
397
525
|
*/
|
|
398
526
|
miterLimit?: number;
|
|
527
|
+
/** The kit stroke's `align`. SVG has no stroke alignment, so the serializer
|
|
528
|
+
* writes the stroke centered and says so through `onWarn`; the parser
|
|
529
|
+
* never sets it. */
|
|
530
|
+
align?: StrokeAlign;
|
|
399
531
|
/** `marker-start` / `marker-mid` / `marker-end`, as the bare `url(#id)` key. */
|
|
400
532
|
markerStart?: string;
|
|
401
533
|
markerMid?: string;
|
|
@@ -431,6 +563,12 @@ interface SvgGroupNode {
|
|
|
431
563
|
kind: 'group';
|
|
432
564
|
children: SvgNode[];
|
|
433
565
|
transform?: Matrix;
|
|
566
|
+
/** Clips the group's contents. Serializes to a `<clipPath>` def plus
|
|
567
|
+
* `clip-path="url(#id)"`, and lives in the same space as `children` —
|
|
568
|
+
* SVG applies the group's own `transform` to the clip as well.
|
|
569
|
+
* A `<clipPath>` of more than one shape parses back as no clip: SVG
|
|
570
|
+
* unions them and a `Path` holds one outline. */
|
|
571
|
+
clip?: Path;
|
|
434
572
|
opacity?: number;
|
|
435
573
|
/** Opaque per-element bag for declared namespaces. See `NamespaceMeta`. */
|
|
436
574
|
meta?: NamespaceMeta;
|
|
@@ -464,6 +602,10 @@ interface SvgTextNode {
|
|
|
464
602
|
runs?: StyledRun[];
|
|
465
603
|
/** Node-wide typography. Defaults applied at render time via `resolveTextStyle`. */
|
|
466
604
|
style?: TextStyle;
|
|
605
|
+
/** Where the laid-out text sits inside the box — `kit:text`'s
|
|
606
|
+
* `data.verticalAlign`. SVG text has no box to align in, so this rides in
|
|
607
|
+
* `data-weasel-vertical-align` and other readers draw the text top-aligned. */
|
|
608
|
+
verticalAlign?: TextVerticalAlign;
|
|
467
609
|
/**
|
|
468
610
|
* Node-wide glyph paint, the `FillStyle` / `Stroke` a kit text node holds
|
|
469
611
|
* in `data.fill` / `data.stroke`. Not `SvgPaint`, which is the path
|
|
@@ -491,6 +633,12 @@ interface SvgTextNode {
|
|
|
491
633
|
* a reference and only resolves when something downstream loads it.
|
|
492
634
|
*
|
|
493
635
|
* SVG's `preserveAspectRatio` is not modeled; the box is taken literally.
|
|
636
|
+
*
|
|
637
|
+
* With a `source` rect or a flip, the element is written as a `<g
|
|
638
|
+
* data-weasel-image>` holding a nested `<svg>` viewport at the box, whose
|
|
639
|
+
* `viewBox` is the source window over a unit-square `<image>` — plain SVG 1.1,
|
|
640
|
+
* which any reader crops and mirrors the same way, and which `parseSvg` reads
|
|
641
|
+
* back as one image node.
|
|
494
642
|
*/
|
|
495
643
|
interface SvgImageNode {
|
|
496
644
|
kind: 'image';
|
|
@@ -499,6 +647,20 @@ interface SvgImageNode {
|
|
|
499
647
|
y: number;
|
|
500
648
|
width: number;
|
|
501
649
|
height: number;
|
|
650
|
+
/** The part of the bitmap drawn into the box, as fractions of the bitmap's
|
|
651
|
+
* width and height from its top-left. Omitted draws the whole bitmap.
|
|
652
|
+
* Fractions rather than bitmap pixels because this package never decodes
|
|
653
|
+
* the image, so it cannot know its size. */
|
|
654
|
+
source?: {
|
|
655
|
+
x: number;
|
|
656
|
+
y: number;
|
|
657
|
+
width: number;
|
|
658
|
+
height: number;
|
|
659
|
+
};
|
|
660
|
+
/** Mirror the drawn region within the box, as `ImageDrawCommand` does. The
|
|
661
|
+
* box does not move. */
|
|
662
|
+
flipX?: boolean;
|
|
663
|
+
flipY?: boolean;
|
|
502
664
|
/** Element-level opacity (`opacity="..."`), 0..1. */
|
|
503
665
|
opacity?: number;
|
|
504
666
|
/** Element-level rotation in **radians**, pivoting around the unrotated
|
|
@@ -693,6 +855,10 @@ interface LabBaseProps {
|
|
|
693
855
|
instruments: InstrumentList;
|
|
694
856
|
defaultInstrument: string;
|
|
695
857
|
mode?: LabMode;
|
|
858
|
+
/** How much room the lab's chrome takes. Default `'comfortable'`; a lab whose
|
|
859
|
+
* window is the whole app, rather than a panel beside one, reads better at
|
|
860
|
+
* `'roomy'`. The trials' own contents are unaffected. */
|
|
861
|
+
density?: LabDensity;
|
|
696
862
|
/** Rendered while a stored lab loads. Default: the lab's empty shell. */
|
|
697
863
|
fallback?: ReactNode;
|
|
698
864
|
/**
|
|
@@ -748,7 +914,7 @@ type LabProps = LabBaseProps & ({
|
|
|
748
914
|
});
|
|
749
915
|
/** The lab runtime: opens the store, provides it, and renders one trial
|
|
750
916
|
* per record in a grid. Each trial runs one of `instruments`. */
|
|
751
|
-
declare function Lab(props: LabProps): react_jsx_runtime.JSX.Element;
|
|
917
|
+
declare function Lab(props: LabProps): string | number | bigint | boolean | react_jsx_runtime.JSX.Element | Iterable<ReactNode> | Promise<string | number | bigint | boolean | react.ReactPortal | react.ReactElement<unknown, string | react.JSXElementConstructor<any>> | Iterable<ReactNode> | null | undefined> | null;
|
|
752
918
|
|
|
753
919
|
/** Props for `<LabPalette>`. */
|
|
754
920
|
interface LabPaletteProps {
|
|
@@ -762,6 +928,26 @@ interface LabPaletteProps {
|
|
|
762
928
|
* the lab contributes no tool rail. */
|
|
763
929
|
declare function LabPalette({ tools, contributions }: LabPaletteProps): react_jsx_runtime.JSX.Element;
|
|
764
930
|
|
|
931
|
+
/** Props for `<LabRoot>`. */
|
|
932
|
+
interface LabRootProps {
|
|
933
|
+
children: ReactNode;
|
|
934
|
+
/** Color mode. "auto" (default) follows prefers-color-scheme. */
|
|
935
|
+
mode?: LabMode;
|
|
936
|
+
/** Added after `lk-root` on the same element. */
|
|
937
|
+
className?: string;
|
|
938
|
+
}
|
|
939
|
+
/** The element every labkit component expects above it: `.lk-root`, which
|
|
940
|
+
* carries the design tokens, the font stack, the box-sizing reset and the
|
|
941
|
+
* element defaults a lab's bare markup is styled by, plus a theme when the
|
|
942
|
+
* app has not already applied one.
|
|
943
|
+
*
|
|
944
|
+
* `<LabShell>` and `<Lab>` render this themselves. Mount it by hand around a
|
|
945
|
+
* labkit piece used on its own — a bare `<Workspace>` or `<ControlPanel>` —
|
|
946
|
+
* or those components inherit whatever the host page happens to define.
|
|
947
|
+
* Pair it with `import '@weasel-js/labkit/styles.css'`, which is what defines
|
|
948
|
+
* the rules this element scopes. */
|
|
949
|
+
declare function LabRoot({ children, mode, className }: LabRootProps): react_jsx_runtime.JSX.Element;
|
|
950
|
+
|
|
765
951
|
/** Props for `<LabShell>`. */
|
|
766
952
|
interface LabShellProps {
|
|
767
953
|
title: string;
|
|
@@ -782,7 +968,7 @@ interface LabShellProps {
|
|
|
782
968
|
/** Page frame for a lab: a titled header, a body, and an optional footer,
|
|
783
969
|
* themed for the resolved color mode. Presentational only — use `<Lab>` when
|
|
784
970
|
* the trial runtime is wanted too. */
|
|
785
|
-
declare function LabShell({ title, children, header, footer, mode, pages, path }: LabShellProps): react_jsx_runtime.JSX.Element;
|
|
971
|
+
declare function LabShell({ title, children, header, footer, mode, pages, path, }: LabShellProps): react_jsx_runtime.JSX.Element;
|
|
786
972
|
|
|
787
973
|
/** A tile's persisted extent, keyed by the id its caller gave it. Grid resizes
|
|
788
974
|
* write `span`; `size` is here because a strategy swap would write that. */
|
|
@@ -846,6 +1032,18 @@ interface PanelDescriptor {
|
|
|
846
1032
|
}
|
|
847
1033
|
declare function Workspace({ children, ids, panels, resizable, reorderable, onReorder, layout, onLayoutChange, gap, padding, viewport, }: WorkspaceProps): react_jsx_runtime.JSX.Element;
|
|
848
1034
|
|
|
1035
|
+
/** The specimen's sections, in page order. */
|
|
1036
|
+
declare const SPECIMEN_SECTIONS: readonly ["Buttons & toggles", "Fields & pickers", "Panels & property rows", "Overlays & feedback", "Lists & data", "Tool chrome", "Editors & plots", "Lab chrome"];
|
|
1037
|
+
/**
|
|
1038
|
+
* One page of the kit's controls and chrome, each in a small working state: a
|
|
1039
|
+
* preview surface for a theme, where every token has something on screen that
|
|
1040
|
+
* reads it. Popovers, dialogs and toasts portal into the page itself, so they
|
|
1041
|
+
* take whatever theme the page is under.
|
|
1042
|
+
*/
|
|
1043
|
+
declare function Specimen({ className }: {
|
|
1044
|
+
className?: string;
|
|
1045
|
+
}): react_jsx_runtime.JSX.Element;
|
|
1046
|
+
|
|
849
1047
|
/** The 2D view labkit has always shipped, and what a trial gets when it names no
|
|
850
1048
|
* other. Re-exported under its own name so a consumer can say which it means. */
|
|
851
1049
|
type ViewTransform2D = ViewTransform;
|
|
@@ -854,40 +1052,10 @@ declare const DEFAULT_VIEW: ViewTransform2D;
|
|
|
854
1052
|
* zoom chrome, `CanvasStack` — asks for it and handles not getting it. */
|
|
855
1053
|
declare function as2DView(view: unknown): ViewTransform2D | null;
|
|
856
1054
|
|
|
857
|
-
type TokenValue = string | number | readonly (string | number)[];
|
|
858
|
-
/**
|
|
859
|
-
* A single design token as authored, before aliases are resolved: a DTCG-shaped
|
|
860
|
-
* `{ type, value }` pair where `value` may still be a `{ref}` to another token.
|
|
861
|
-
*/
|
|
862
|
-
interface RawToken {
|
|
863
|
-
readonly type: string;
|
|
864
|
-
readonly value: TokenValue;
|
|
865
|
-
/** Render the referenced color at this alpha, 0–1. */
|
|
866
|
-
readonly alpha?: number | undefined;
|
|
867
|
-
readonly description?: string | undefined;
|
|
868
|
-
}
|
|
869
|
-
/** A token graph flattened to one level, keyed by token name (no `--wzl-`
|
|
870
|
-
* prefix). Still unresolved — see `ResolvedTokenMap` for the output side. */
|
|
871
|
-
type FlatTokens = Record<string, RawToken>;
|
|
872
|
-
/**
|
|
873
|
-
* A theme: a named set of design tokens, organized into a mode-invariant layer
|
|
874
|
-
* plus one layer per mode (light, dark, …), optionally extending another theme.
|
|
875
|
-
* Tokens are held unresolved — aliases between them are collapsed later by
|
|
876
|
-
* `resolveTheme`, so an override of a base primitive still reaches everything
|
|
877
|
-
* that references it.
|
|
878
|
-
*/
|
|
879
|
-
interface Theme {
|
|
880
|
-
readonly name: string;
|
|
881
|
-
readonly extends: Theme | null;
|
|
882
|
-
readonly defaultMode: string;
|
|
883
|
-
readonly tokens: FlatTokens;
|
|
884
|
-
readonly modes: Readonly<Record<string, FlatTokens>>;
|
|
885
|
-
}
|
|
886
|
-
|
|
887
1055
|
/**
|
|
888
1056
|
* labkit's theme: a cosmic dark and a warm parchment light, extending the
|
|
889
|
-
* built-in weasel theme.
|
|
890
|
-
*
|
|
1057
|
+
* built-in weasel theme. A pins-only theme definition: nothing in it is
|
|
1058
|
+
* derived, so it loads without the engine.
|
|
891
1059
|
*/
|
|
892
1060
|
declare const interstellarTheme: Theme;
|
|
893
1061
|
|
|
@@ -958,5 +1126,5 @@ interface TrialChromeProps {
|
|
|
958
1126
|
* each region its slice. */
|
|
959
1127
|
declare function TrialChrome({ trialId, record, instrument, isLastTrial, undoBindings, job, loupe, trialChrome, chrome, suppress, activeToolId, setActiveTool, children, }: TrialChromeProps): react_jsx_runtime.JSX.Element;
|
|
960
1128
|
|
|
961
|
-
export { ANNOTATION_TOOLS, ANNOTATION_WEASEL_TOOLS, AnnotationData, AnnotationKind, AnnotationMeaning, AnnotationOverlay, AnnotationTarget, AnnotationTargets, AnnotationsApi, AnnotationsCapability, AnnotationsContext, CaptureOptions, CaptureResult, CaptureSource, ConfigField, ConfigRule, ConfigSchema, ControlRenderer, CurveField, DEFAULT_VIEW, EffectCard, EffectCardList, ExportMenu, Instrument, InstrumentList, JobHandle, Lab, LabContribution, LabMode, LabPalette, LabShell, LabSwitcher, MarkList, MarkScene, PropertyGroup, PropertyListPack, SplitProps, StorageAdapter, Subpanel, Trial, TrialBody, TrialChrome, TrialContribution, TrialInfo, TrialRecord, TrialTool, ViewTransform, Workspace, WorldRect, annotationToolInfo, as2DView, capturePlan, captureTarget, composeCaptureSvg, createMarkDrawOne, currentPage, defineInstrument, fitView, fromWeaselView, interstellarTheme, isStale, markCommands, markSvgNodes, resolveMarkStyle, seenFrom, toWeaselView, useAnnotations, useAnnotationsOptional, validateConfigSchema };
|
|
962
|
-
export type { AnnotationOverlayProps, AnnotationTargetsProps, AnnotationToolInfo, CaptureArgs, CapturePlan, ComposeSvgArgs, ContentSize, CurveFieldProps, CurveMark, EffectCardListItem, EffectCardListProps, EffectCardProps, InstrumentSpec, LabPage, LabPaletteProps, LabProps, LabShellProps, LabSwitcherProps, MarkDrawOptions, MarkListProps, MarkStyle, PaintableMark, PaneSize, PanelDescriptor, PropertyGroupProps, SubpanelProps, TrialBodyProps, TrialChromeProps, TrialLayout, TrialProps, UndoBindings, ValidationResult, ViewTransform2D, WorkspaceProps };
|
|
1129
|
+
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, EffectCard, EffectCardList, ExpandIcon, ExportMenu, IconProps, Instrument, InstrumentList, JobHandle, Jog, Lab, 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 };
|
|
1130
|
+
export type { AnnotationOverlayProps, AnnotationTargetsProps, AnnotationToolInfo, CaptureArgs, CapturePlan, ComposeSvgArgs, ContentSize, CurveFieldProps, CurveMark, EffectCardListItem, EffectCardListProps, EffectCardProps, InstrumentSpec, JogProps, 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 };
|