@weasel-js/labkit 1.4.0-pre.1 → 1.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_dts/{CanvasStackContext-LnCfqNBA.d.ts → CanvasStackContext-BIRUVVGH.d.ts} +1 -1
- package/dist/_dts/PrefsForm.d-CgxUequc.d.ts +20 -0
- package/dist/_dts/{frac-C-2c72Ij.d.ts → frac-X7mWgd7y.d.ts} +10 -4
- package/dist/_dts/{index-BDVzvRzQ.d.ts → index-FEa1MudK.d.ts} +8 -2
- package/dist/_dts/{types-DYMaEvM5.d.ts → types-ChVJJHvk.d.ts} +3 -0
- package/dist/_dts/{types-D6s4b7if.d.ts → types-lg4TSCb2.d.ts} +3 -1
- package/dist/_dts/{useTrialState-gmMvZqPc.d.ts → useTrialState-Cdm13fvl.d.ts} +2 -1
- package/dist/_dts/weasel-canvas-FJTFi3ZZ.d.ts +5041 -0
- package/dist/canvas/index.d.ts +16 -16
- package/dist/canvas/index.js +2 -2
- package/dist/chrome/index.d.ts +6 -6
- package/dist/chrome/index.js +5 -5
- package/dist/chunk-2YILQ7Y5.js +33 -0
- package/dist/chunk-2YILQ7Y5.js.map +1 -0
- package/dist/{chunk-TO2FUOKF.js → chunk-53AZ2O2N.js} +16 -13
- package/dist/chunk-53AZ2O2N.js.map +1 -0
- package/dist/{chunk-QB5SM4BM.js → chunk-7TRFMIWX.js} +55 -41
- package/dist/chunk-7TRFMIWX.js.map +1 -0
- package/dist/{chunk-6OEYTYML.js → chunk-BMQWLKOL.js} +15 -15
- package/dist/chunk-BMQWLKOL.js.map +1 -0
- package/dist/{chunk-M75ZU6ZZ.js → chunk-D7QIPGEB.js} +3 -3
- package/dist/{chunk-M75ZU6ZZ.js.map → chunk-D7QIPGEB.js.map} +1 -1
- package/dist/{chunk-L5QJOOLV.js → chunk-DG2IFMLA.js} +1309 -273
- package/dist/chunk-DG2IFMLA.js.map +1 -0
- package/dist/{chunk-LN6JDUGB.js → chunk-HXXTULDN.js} +2 -2
- package/dist/{chunk-LN6JDUGB.js.map → chunk-HXXTULDN.js.map} +1 -1
- package/dist/{chunk-RBGKL7NF.js → chunk-J6SBFZYT.js} +1807 -1814
- package/dist/chunk-J6SBFZYT.js.map +1 -0
- package/dist/{chunk-XJ6N32QP.js → chunk-LJSIUFYD.js} +14 -30
- package/dist/chunk-LJSIUFYD.js.map +1 -0
- package/dist/{chunk-AE5CNVRU.js → chunk-MIT3ISW4.js} +37 -31
- package/dist/chunk-MIT3ISW4.js.map +1 -0
- package/dist/{chunk-HHGVISVZ.js → chunk-MSR7EVS6.js} +7 -5
- package/dist/chunk-MSR7EVS6.js.map +1 -0
- package/dist/{chunk-ESIQNQ6K.js → chunk-OFCBEZMU.js} +12 -6
- package/dist/chunk-OFCBEZMU.js.map +1 -0
- package/dist/{chunk-HMFODCOX.js → chunk-PP7ZWAMV.js} +83 -75
- package/dist/chunk-PP7ZWAMV.js.map +1 -0
- package/dist/{chunk-E2UQVZ44.js → chunk-RLOXQZW3.js} +3 -3
- package/dist/{chunk-E2UQVZ44.js.map → chunk-RLOXQZW3.js.map} +1 -1
- package/dist/controls/index.d.ts +4 -3
- package/dist/controls/index.js +3 -3
- package/dist/dragdrop/index.d.ts +5 -5
- package/dist/dragdrop/index.js +2 -2
- package/dist/index.d.ts +57 -77
- package/dist/index.js +308 -161
- package/dist/index.js.map +1 -1
- package/dist/job/index.js +1 -1
- package/dist/layers/index.d.ts +6 -6
- package/dist/layers/index.js +3 -3
- package/dist/loupe/index.d.ts +7 -13
- package/dist/loupe/index.js +2 -2
- package/dist/passthrough/weasel-canvas.d.ts +3 -343
- package/dist/passthrough/weasel-canvas.js +1 -1
- package/dist/passthrough/weasel-ui.d.ts +141 -2866
- package/dist/passthrough/weasel-ui.js +2 -2
- package/dist/primitives/index.js +4 -4
- package/dist/state/index.d.ts +3 -3
- package/dist/state/index.js +4 -2
- package/dist/state/index.js.map +1 -1
- package/dist/styles.css +74 -5
- package/dist/surface/index.d.ts +17 -2
- package/dist/surface/index.js +3 -2
- package/dist/ui/layers/index.js +2 -2
- package/dist/undo/index.d.ts +6 -5
- package/package.json +8 -8
- package/src/annotations/AnnotationOverlay.tsx +10 -6
- package/src/annotations/Annotations.less +6 -0
- package/src/annotations/Annotations.overlay.test.tsx +113 -0
- package/src/annotations/MarkList.tsx +3 -2
- package/src/canvas/CanvasStack.tsx +8 -13
- package/src/canvas/useOrbit.test.ts +93 -1
- package/src/canvas/useOrbit.ts +41 -34
- package/src/canvas/usePanZoom.test.ts +102 -1
- package/src/canvas/usePanZoom.ts +54 -36
- package/src/config/builder.test.ts +5 -0
- package/src/config/builder.ts +6 -0
- package/src/config/types.ts +1 -0
- package/src/controls/ControlPanel.test.tsx +23 -0
- package/src/controls/ControlPanel.tsx +3 -0
- package/src/job/useJob.ts +1 -1
- package/src/lab/Lab.surface.test.tsx +8 -3
- package/src/lab/LabHeader.test.tsx +12 -0
- package/src/lab/LabHeader.tsx +16 -6
- package/src/lab/Workspace.tsx +1 -1
- package/src/layers/LayerList.test.tsx +72 -1
- package/src/layers/LayerList.tsx +40 -32
- package/src/passthrough/weasel-ui.test.ts +9 -0
- package/src/passthrough/weasel-ui.ts +4 -0
- package/src/primitives/FloatingPanel.test.tsx +82 -0
- package/src/primitives/FloatingPanel.tsx +59 -41
- package/src/primitives/ZoomControl.tsx +2 -0
- package/src/state/store.ts +10 -0
- package/src/state/types.ts +3 -0
- package/src/surface/AGENTS.md +11 -1
- package/src/surface/index.ts +7 -1
- package/src/surface/useSurfaceTile.ts +20 -2
- package/src/surface/useTiledSurface.ts +4 -1
- package/src/theme/Interstellar.stories.tsx +4 -3
- package/src/theme/base.less +39 -1
- package/src/trial/Trial.less +27 -5
- package/src/trial/TrialBody.test.tsx +67 -0
- package/src/trial/TrialBody.tsx +155 -0
- package/src/trial/TrialChrome.tsx +18 -10
- package/src/trial/index.ts +2 -0
- package/dist/_dts/DrawCommand-B3bskUsC.d.ts +0 -564
- package/dist/_dts/PrefsForm-BkUJZx0A.d.ts +0 -204
- package/dist/_dts/fitViewToBounds-dZ2UDB6e.d.ts +0 -21
- package/dist/_dts/shapeKinds-Cx_rxwsa.d.ts +0 -87
- package/dist/_dts/types-C-gh9Ap-.d.ts +0 -695
- package/dist/chunk-6OEYTYML.js.map +0 -1
- package/dist/chunk-AE5CNVRU.js.map +0 -1
- package/dist/chunk-ESIQNQ6K.js.map +0 -1
- package/dist/chunk-HHGVISVZ.js.map +0 -1
- package/dist/chunk-HMFODCOX.js.map +0 -1
- package/dist/chunk-L5QJOOLV.js.map +0 -1
- package/dist/chunk-QB5SM4BM.js.map +0 -1
- package/dist/chunk-RBGKL7NF.js.map +0 -1
- package/dist/chunk-TO2FUOKF.js.map +0 -1
- package/dist/chunk-XJ6N32QP.js.map +0 -1
package/dist/index.d.ts
CHANGED
|
@@ -2,92 +2,30 @@ export { LayerStack, LayerStackItem, LayerStackProps } from './ui/layers/index.j
|
|
|
2
2
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
3
3
|
import * as react from 'react';
|
|
4
4
|
import { ReactNode } from 'react';
|
|
5
|
-
export { C as CheckboxRow, a as CheckboxRowProps, b as ColorRow, c as ColorRowProps, d as ControlPanel, N as NumberRow, e as NumberRowProps, P as PropertyList, f as PropertyListPack, 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, S as SelectRow, q as SelectRowProps, r as SliderRow, s as SliderRowProps, T as TextRow, t as TextRowProps, u as ToggleRow, v as ToggleRowProps } from './_dts/index-
|
|
6
|
-
import { N as Node, P as Path } from './_dts/
|
|
7
|
-
import {
|
|
8
|
-
|
|
9
|
-
export { n as Annotation, o as AnnotationInit, p as AnnotationPatch, q as AnnotationQuery, r as AnnotationStatus, s as AnnotationStoreOptions, t as AnnotationTargetInfo, u as CanvasCapability, v as CanvasLayer, w as CaptureDeps, x as DEFAULT_FRAME, b as DragDropCapability, D as DragFeedback, F as FracPoint, y as FracRect, H as HitResult, z as IconComponent, L as LOUPE_DEFAULTS, B as LayerCapability, E as LayerDescriptor, G as LoupeCapability, J as LoupeDeclaration, K as LoupeRenderArgs, P as PaletteItem, a as Point, R as RenderContext, N as ResolvedLoupe, S as SerializedAnnotations, O as SidebarSection, Q as StatusReadout, U as SystemEvent, X as ToolCapability, Y as ToolItem, Z as ToolbarItem, _ as TrialChromeContext, $ as TrialRegion, a0 as UndoCapability, a1 as ViewportControl, a2 as ViewportSize, W as WorldFrame, c as WorldSpec, a3 as annotationsFromJSON, a4 as applyCamera, a5 as createAnnotationScene, a6 as createAnnotationStore, a7 as fracContains, a8 as fracIntersects, a9 as fracToWorld, aa as resolveFrame, ab as resolveLoupe, ac as roundFrac, ad as worldToFrac } from './_dts/frac-C-2c72Ij.js';
|
|
10
|
-
import { B as BuiltinShapeToolId } from './_dts/shapeKinds-Cx_rxwsa.js';
|
|
5
|
+
export { C as CheckboxRow, a as CheckboxRowProps, b as ColorRow, c as ColorRowProps, d as ControlPanel, N as NumberRow, e as NumberRowProps, P as PropertyList, f as PropertyListPack, 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, S as SelectRow, q as SelectRowProps, r as SliderRow, s as SliderRowProps, T as TextRow, t as TextRowProps, u as ToggleRow, v as ToggleRowProps } from './_dts/index-FEa1MudK.js';
|
|
6
|
+
import { D as DrawCommand, N as Node, V as View, P as Path, F as FillStyle, b as StyledRun, c as TextStyle, d as Stroke, B as BuiltinToolId, T as ToolPrefLeaf } from './_dts/weasel-canvas-FJTFi3ZZ.js';
|
|
7
|
+
import { d as WorldRect, A as AnnotationData, e as AnnotationMeaning, M as MarkScene, C as CaptureSource, f as CaptureOptions, g as CaptureResult, h as AnnotationTarget, i as AnnotationsApi, j as AnnotationsCapability, T as TrialTool, k as AnnotationKind, V as ViewTransform, I as Instrument, l as InstrumentList, m as TrialContribution } from './_dts/frac-X7mWgd7y.js';
|
|
8
|
+
export { n as Annotation, o as AnnotationInit, p as AnnotationPatch, q as AnnotationQuery, r as AnnotationStatus, s as AnnotationStoreOptions, t as AnnotationTargetInfo, u as CanvasCapability, v as CanvasLayer, w as CaptureDeps, x as DEFAULT_FRAME, b as DragDropCapability, D as DragFeedback, F as FracPoint, y as FracRect, H as HitResult, z as IconComponent, L as LOUPE_DEFAULTS, B as LayerCapability, E as LayerDescriptor, G as LoupeCapability, J as LoupeDeclaration, K as LoupeRenderArgs, P as PaletteItem, a as Point, R as RenderContext, N as ResolvedLoupe, S as SerializedAnnotations, O as SidebarSection, Q as StatusReadout, U as SystemEvent, X as ToolCapability, Y as ToolItem, Z as ToolbarItem, _ as TrialChromeContext, $ as TrialRegion, a0 as UndoCapability, a1 as ViewportControl, a2 as ViewportSize, W as WorldFrame, c as WorldSpec, a3 as annotationsFromJSON, a4 as applyCamera, a5 as createAnnotationScene, a6 as createAnnotationStore, a7 as fracContains, a8 as fracIntersects, a9 as fracToWorld, aa as resolveFrame, ab as resolveLoupe, ac as roundFrac, ad as worldToFrac } from './_dts/frac-X7mWgd7y.js';
|
|
11
9
|
export { CanvasStack, CanvasStackProps, OrbitHandlers, OrbitView, PITCH_LIMIT, PanZoomHandlers, UseOrbitOptions, UsePanZoomOptions, Vec3, ZoomAtOptions, centerOn, clampPitch, orbitAfterDrag, orbitAfterWheel, screenToWorld, useOrbit, usePanZoom, worldToScreen, wrapYaw, zoomAt } from './canvas/index.js';
|
|
12
|
-
export { C as CanvasLayerDescriptor, a as CanvasStackContext, b as CanvasStackContextValue, c as CanvasStackSurface } from './_dts/CanvasStackContext-
|
|
10
|
+
export { C as CanvasLayerDescriptor, a as CanvasStackContext, b as CanvasStackContextValue, c as CanvasStackSurface } from './_dts/CanvasStackContext-BIRUVVGH.js';
|
|
13
11
|
export { PaletteRegion, PaletteRegionProps, SidebarRegion, SidebarRegionProps, StatusRegion, StatusRegionProps, TitleBarRegion, TitleBarRegionProps, ToolbarRegion, ToolbarRegionProps, ViewportRegion, ViewportRegionProps, builtinContributions, mergeContributions, suppressContributions } from './chrome/index.js';
|
|
14
|
-
import {
|
|
15
|
-
|
|
16
|
-
export { g as CheckboxField, h as ColorField, i as ConfigFieldBase, j as ConfigFieldType, k as ConfigOf, l as NodeValue, m as NumberField, S as SectionSpec, n as SelectField, o as SelectOption, p as SliderField, T as TextField } from './_dts/types-D6s4b7if.js';
|
|
12
|
+
import { b as ConfigNode, A as Annotations, N as NodeOptions, c as ControlRenderer, d as ConfigOption, a as ConfigSchema, I as InferConfig, C as ConfigField, R as ResolvedConfig, e as ConfigRule, L as LeafPatch, f as ConfigRuleContext } from './_dts/types-lg4TSCb2.js';
|
|
13
|
+
export { g as CheckboxField, h as ColorField, i as ConfigFieldBase, j as ConfigFieldType, k as ConfigOf, l as NodeValue, m as NumberField, S as SectionSpec, n as SelectField, o as SelectOption, p as SliderField, T as TextField } from './_dts/types-lg4TSCb2.js';
|
|
17
14
|
import { J as JobHandle } from './_dts/types-DJ79Tg5J.js';
|
|
18
15
|
export { a as JobCapability, b as JobEvent, c as JobFailure, d as JobStatus } from './_dts/types-DJ79Tg5J.js';
|
|
19
16
|
export { UseJobOptions, useJob } from './job/index.js';
|
|
20
|
-
import { a as StorageAdapter, h as LabMode, T as TrialRecord, c as SavedSnapshot } from './_dts/types-
|
|
21
|
-
export { C as CreateLabStoreOptions, L as LabDocument, b as LabStoreState, S as SerializedTrial, d as TrialStateHandle, U as UndoStack, e as UndockedPanel, f as UndockedPanels, g as dockPanel, p as panelKey, u as undockPanel } from './_dts/types-
|
|
17
|
+
import { a as StorageAdapter, h as LabMode, T as TrialRecord, c as SavedSnapshot } from './_dts/types-ChVJJHvk.js';
|
|
18
|
+
export { C as CreateLabStoreOptions, L as LabDocument, b as LabStoreState, S as SerializedTrial, d as TrialStateHandle, U as UndoStack, e as UndockedPanel, f as UndockedPanels, g as dockPanel, p as panelKey, u as undockPanel } from './_dts/types-ChVJJHvk.js';
|
|
22
19
|
export { LayerList, LayerListProps } from './layers/index.js';
|
|
23
20
|
export { CanvasLoupe, CanvasLoupeProps, DomLoupe, DomLoupeProps, LensCamera, LoupeBubble, LoupeBubbleProps, LoupeState, SourceRect, TrialLoupe, TrialLoupeProps, UseLoupeOptions, drawCanvasLens, lensCamera, lensSourceRect, sampleStack, useLoupe } from './loupe/index.js';
|
|
24
21
|
export { FloatingPanel, FloatingPanelProps, FpsMeter, JobProgress, JobProgressProps, Legend, LegendEntry, LegendMark, LegendProps, ScaleIndicator, ScaleIndicatorProps, Sidebar, SidebarProps, StatusBar, StatusBarProps, StatusBarSectionProps, Toolbar, ToolbarButtonProps, ToolbarGroupProps, ToolbarProps, ZoomControl, ZoomControlProps } from './primitives/index.js';
|
|
25
|
-
export { C as CURRENT_DOCUMENT_VERSION, b as LabStoreContext, c as LabStoreProvider, T as TrialIdContext, d as TrialIdProvider, f as createMemoryAdapter, l as labDocumentKey, g as localStorageAdapter, n as noneAdapter, q as quarantineKey, s as sessionStorageAdapter, u as urlHashAdapter, h as useLabStore, i as useTrialId, j as useTrialState } from './_dts/useTrialState-
|
|
26
|
-
export { Box, Rect, SurfaceCanvasContext, SurfaceContext, SurfaceFrame, SurfaceHandle, TilePainter, UseTiledSurfaceOptions, composeRects, rectsEqual, toDeviceRect, useSurface, useSurfaceCanvas, useSurfaceOptional, useSurfaceTile, useTiledSurface } from './surface/index.js';
|
|
22
|
+
export { C as CURRENT_DOCUMENT_VERSION, b as LabStoreContext, c as LabStoreProvider, T as TrialIdContext, d as TrialIdProvider, f as createMemoryAdapter, l as labDocumentKey, g as localStorageAdapter, n as noneAdapter, q as quarantineKey, s as sessionStorageAdapter, u as urlHashAdapter, h as useLabStore, i as useTrialId, j as useTrialState } from './_dts/useTrialState-Cdm13fvl.js';
|
|
23
|
+
export { Box, Rect, SurfaceCanvasContext, SurfaceContext, SurfaceFrame, SurfaceHandle, TilePainter, UseTiledSurfaceOptions, composeRects, rectsEqual, toDeviceRect, useSurface, useSurfaceCanvas, useSurfaceOptional, useSurfaceTile, useTileId, useTiledSurface } from './surface/index.js';
|
|
27
24
|
export { EventBus, EventListener, clearUndo, createEventBus, emptyStack, pushSnapshot, redo, undo } from './undo/index.js';
|
|
25
|
+
import './_dts/PrefsForm.d-CgxUequc.js';
|
|
28
26
|
import 'windease';
|
|
29
27
|
import 'zustand/vanilla';
|
|
30
28
|
|
|
31
|
-
/**
|
|
32
|
-
* Canonical inline-styling primitive for text nodes. A node's text is
|
|
33
|
-
* either a plain `string` (treated as a single-run, default-styled fragment)
|
|
34
|
-
* or `StyledRun[]` for rich content. `toRuns` is the funnel that normalizes
|
|
35
|
-
* either form into the array shape used by the renderer.
|
|
36
|
-
*
|
|
37
|
-
* Every field except `text` is optional; missing fields fall back to the
|
|
38
|
-
* node-level `TextStyle`. `bold`/`italic` are toggles; richer weight axes
|
|
39
|
-
* (300/500/900) are out of scope for slice 1.
|
|
40
|
-
*/
|
|
41
|
-
|
|
42
|
-
/** A span of text with its own styling, as authored. Fields left absent
|
|
43
|
-
* inherit from the node's text style — this is the difference between a run
|
|
44
|
-
* and a fully resolved one. */
|
|
45
|
-
interface StyledRun {
|
|
46
|
-
text: string;
|
|
47
|
-
bold?: boolean;
|
|
48
|
-
italic?: boolean;
|
|
49
|
-
fontFamily?: string;
|
|
50
|
-
fontSize?: number;
|
|
51
|
-
fill?: FillStyle;
|
|
52
|
-
/** Outline over this run's glyphs. Overrides the node's own `data.stroke`;
|
|
53
|
-
* absent inherits it. Only painted on the outline tier. */
|
|
54
|
-
stroke?: Stroke;
|
|
55
|
-
letterSpacing?: number;
|
|
56
|
-
underline?: boolean;
|
|
57
|
-
strikethrough?: boolean;
|
|
58
|
-
/** Draw a rule above this run's ascent. Additive over the node style. */
|
|
59
|
-
overline?: boolean;
|
|
60
|
-
/**
|
|
61
|
-
* Set this run as a superscript or subscript — a raised or lowered baseline
|
|
62
|
-
* and a smaller size together, which is the pair `<sup>` and `<sub>` imply.
|
|
63
|
-
*
|
|
64
|
-
* A preset over the two primitives below, not a third mechanism: it supplies
|
|
65
|
-
* a `baselineShift` and a `fontScale`, and naming either of those directly
|
|
66
|
-
* overrides that half while leaving the other alone. The numbers are in
|
|
67
|
-
* {@link SCRIPT_METRICS}.
|
|
68
|
-
*/
|
|
69
|
-
script?: 'super' | 'sub';
|
|
70
|
-
/**
|
|
71
|
-
* Raise (positive) or lower (negative) this run off the line's shared
|
|
72
|
-
* baseline, in ems of the *inherited* font size — so a run's rise does not
|
|
73
|
-
* shrink along with the run when `fontScale` also applies.
|
|
74
|
-
*/
|
|
75
|
-
baselineShift?: number;
|
|
76
|
-
/**
|
|
77
|
-
* Multiplier on the inherited font size. The relative counterpart to
|
|
78
|
-
* `fontSize`, which pins an absolute size and wins over this when both are
|
|
79
|
-
* present.
|
|
80
|
-
*/
|
|
81
|
-
fontScale?: number;
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
/** Built-in tool ids that aren't shape tools — the ones with no entry in
|
|
85
|
-
* the `core/shapeKinds` table. */
|
|
86
|
-
declare const NON_SHAPE_BUILTIN_TOOLS: readonly ["select", "rotate", "hand"];
|
|
87
|
-
/** Built-in tool ids SceneCanvas knows how to mount when no `tools` prop
|
|
88
|
-
* is supplied. Pass a subset via `defaultTools` to slim the registered set. */
|
|
89
|
-
type BuiltinToolId = (typeof NON_SHAPE_BUILTIN_TOOLS)[number] | BuiltinShapeToolId;
|
|
90
|
-
|
|
91
29
|
/** An annotation drawn over a curve plot: a shaded band across a range of x,
|
|
92
30
|
* or a vertical line at one x. */
|
|
93
31
|
type CurveMark = {
|
|
@@ -679,6 +617,9 @@ declare class NumberNode extends BaseNode<number> {
|
|
|
679
617
|
/** Bound the value. A number with both bounds renders as a slider. */
|
|
680
618
|
range(min: number, max: number): this;
|
|
681
619
|
step(step: number): this;
|
|
620
|
+
/** A display suffix for the value — `'px'`, `'ms'`, `'°'`. Presentation only:
|
|
621
|
+
* it is never parsed, and the stored value stays a plain number. */
|
|
622
|
+
suffix(suffix: string): this;
|
|
682
623
|
/** Force a slider even without both bounds. */
|
|
683
624
|
slider(): this;
|
|
684
625
|
/** Force a typed input even when both bounds are set. */
|
|
@@ -1012,7 +953,6 @@ interface RawToken {
|
|
|
1012
953
|
/** A token graph flattened to one level, keyed by token name (no `--wzl-`
|
|
1013
954
|
* prefix). Still unresolved — see `ResolvedTokenMap` for the output side. */
|
|
1014
955
|
type FlatTokens = Record<string, RawToken>;
|
|
1015
|
-
|
|
1016
956
|
/**
|
|
1017
957
|
* A theme: a named set of design tokens, organized into a mode-invariant layer
|
|
1018
958
|
* plus one layer per mode (light, dark, …), optionally extending another theme.
|
|
@@ -1048,6 +988,46 @@ interface TrialProps {
|
|
|
1048
988
|
* instrument, and mounts the instrument inside the trial chrome. */
|
|
1049
989
|
declare function Trial({ id, chrome, suppress }: TrialProps): react_jsx_runtime.JSX.Element;
|
|
1050
990
|
|
|
991
|
+
/** Props for `<TrialBody>`. */
|
|
992
|
+
interface TrialBodyProps {
|
|
993
|
+
/** The sidebar region's sections. */
|
|
994
|
+
sidebar: ReactNode;
|
|
995
|
+
/** The instrument's own output. */
|
|
996
|
+
children: ReactNode;
|
|
997
|
+
/** Extra class on the content pane — `Trial` marks a canvas instrument's
|
|
998
|
+
* well flush. */
|
|
999
|
+
contentClassName?: string;
|
|
1000
|
+
/** The sidebar's current extent in pixels. Omit for an unpersisted lab: the
|
|
1001
|
+
* seam still works, its result just does not outlive the mount. */
|
|
1002
|
+
width?: number;
|
|
1003
|
+
/** Where the sidebar starts before anyone drags it. */
|
|
1004
|
+
defaultWidth?: number;
|
|
1005
|
+
minWidth?: number;
|
|
1006
|
+
maxWidth?: number;
|
|
1007
|
+
/** How little the instrument may be squeezed to. Reported as the seam's
|
|
1008
|
+
* reachable maximum, so the drag stops there rather than clamping silently. */
|
|
1009
|
+
contentMinWidth?: number;
|
|
1010
|
+
/** Fires through the drag, not on release: the pane is already there. */
|
|
1011
|
+
onWidthChange?: (width: number) => void;
|
|
1012
|
+
/**
|
|
1013
|
+
* Fixed extent. Omit in an app — the strip measures its own box. Supply it
|
|
1014
|
+
* where nothing measures, notably jsdom, or both panes lay out at zero.
|
|
1015
|
+
*/
|
|
1016
|
+
viewport?: {
|
|
1017
|
+
w: number;
|
|
1018
|
+
h: number;
|
|
1019
|
+
};
|
|
1020
|
+
}
|
|
1021
|
+
/**
|
|
1022
|
+
* A trial's sidebar and content as a two-pane strip with a draggable seam.
|
|
1023
|
+
*
|
|
1024
|
+
* The seam is `stripStrategy`'s own resize affordance, so it arrives as a
|
|
1025
|
+
* `role="separator"` carrying the reachable range, operable by pointer and by
|
|
1026
|
+
* arrows / Home / End, and clamped against the content pane's floor rather
|
|
1027
|
+
* than against the sidebar's alone.
|
|
1028
|
+
*/
|
|
1029
|
+
declare function TrialBody({ sidebar, children, contentClassName, width, defaultWidth, minWidth, maxWidth, contentMinWidth, onWidthChange, viewport, }: TrialBodyProps): react_jsx_runtime.JSX.Element;
|
|
1030
|
+
|
|
1051
1031
|
/** The trial's loupe as its chrome sees it: a switch and its position. */
|
|
1052
1032
|
interface LoupeBindings {
|
|
1053
1033
|
on: boolean;
|
|
@@ -1108,5 +1088,5 @@ declare function resetTrial(trials: TrialRecord[], id: string, instruments: Inst
|
|
|
1108
1088
|
*/
|
|
1109
1089
|
declare function reorderTrials(trials: TrialRecord[], ids: readonly string[]): TrialRecord[];
|
|
1110
1090
|
|
|
1111
|
-
export { ANNOTATION_TOOLS, ANNOTATION_WEASEL_TOOLS, AnnotationData, AnnotationKind, AnnotationMeaning, AnnotationOverlay, AnnotationTarget, AnnotationTargets, Annotations, AnnotationsApi, AnnotationsCapability, AnnotationsContext, CaptureOptions, CaptureResult, CaptureSource, ConfigField, ConfigNode, ConfigOption, ConfigRule, ConfigRuleContext, ConfigSchema, ControlRenderer, CurveField, DEFAULT_VIEW, EffectCard, EffectCardList, ExportMenu, InferConfig, Instrument, InstrumentList, JobHandle, Lab, LabContext, LabMode, LabPalette, LabShell, LeafPatch, MarkList, MarkScene, NodeOptions, PropertyGroup, ResolvedConfig, SavedSnapshot, StorageAdapter, Subpanel, Trial, TrialChrome, TrialContribution, TrialRecord, TrialTool, ViewTransform, Workspace, WorldRect, addTrial, annotationToolInfo, applyRules, as2DView, builtinRules, capturePlan, captureTarget, cloneTrial, closeTrial, composeCaptureSvg, createMarkDrawOne, defineInstrument, f, fitView, fromConfigFields, fromWeaselView, interstellarTheme, isLeafVisible, isStale, markCommands, markSvgNodes, reorderTrials, resetTrial, resolveConfigSchema, resolveMarkStyle, seenFrom, titleCase, toWeaselView, useAnnotations, useAnnotationsOptional, useConfigSchema, useLabContext, validateConfigSchema };
|
|
1112
|
-
export type { AnnotationOverlayProps, AnnotationTargetsProps, AnnotationToolInfo, CaptureArgs, CapturePlan, ComposeSvgArgs, ContentSize, CurveFieldProps, CurveMark, EffectCardListItem, EffectCardListProps, EffectCardProps, InstrumentSpec, LabContextValue, LabPaletteProps, LabProps, LabShellProps, MarkDrawOptions, MarkListProps, MarkStyle, PaintableMark, PaneSize, PanelDescriptor, PropertyGroupProps, SubpanelProps, TrialChromeProps, TrialLayout, TrialProps, UndoBindings, ValidationResult, ViewTransform2D, WorkspaceProps };
|
|
1091
|
+
export { ANNOTATION_TOOLS, ANNOTATION_WEASEL_TOOLS, AnnotationData, AnnotationKind, AnnotationMeaning, AnnotationOverlay, AnnotationTarget, AnnotationTargets, Annotations, AnnotationsApi, AnnotationsCapability, AnnotationsContext, CaptureOptions, CaptureResult, CaptureSource, ConfigField, ConfigNode, ConfigOption, ConfigRule, ConfigRuleContext, ConfigSchema, ControlRenderer, CurveField, DEFAULT_VIEW, EffectCard, EffectCardList, ExportMenu, InferConfig, Instrument, InstrumentList, JobHandle, Lab, LabContext, LabMode, LabPalette, LabShell, LeafPatch, MarkList, MarkScene, NodeOptions, PropertyGroup, ResolvedConfig, SavedSnapshot, StorageAdapter, Subpanel, Trial, TrialBody, TrialChrome, TrialContribution, TrialRecord, TrialTool, ViewTransform, Workspace, WorldRect, addTrial, annotationToolInfo, applyRules, as2DView, builtinRules, capturePlan, captureTarget, cloneTrial, closeTrial, composeCaptureSvg, createMarkDrawOne, defineInstrument, f, fitView, fromConfigFields, fromWeaselView, interstellarTheme, isLeafVisible, isStale, markCommands, markSvgNodes, reorderTrials, resetTrial, resolveConfigSchema, resolveMarkStyle, seenFrom, titleCase, toWeaselView, useAnnotations, useAnnotationsOptional, useConfigSchema, useLabContext, validateConfigSchema };
|
|
1092
|
+
export type { AnnotationOverlayProps, AnnotationTargetsProps, AnnotationToolInfo, CaptureArgs, CapturePlan, ComposeSvgArgs, ContentSize, CurveFieldProps, CurveMark, EffectCardListItem, EffectCardListProps, EffectCardProps, InstrumentSpec, LabContextValue, LabPaletteProps, LabProps, LabShellProps, MarkDrawOptions, MarkListProps, MarkStyle, PaintableMark, PaneSize, PanelDescriptor, PropertyGroupProps, SubpanelProps, TrialBodyProps, TrialChromeProps, TrialLayout, TrialProps, UndoBindings, ValidationResult, ViewTransform2D, WorkspaceProps };
|