@weasel-js/labkit 1.3.0-pre.0 → 1.4.0-pre.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-DtAn_3O-.d.ts +42 -0
- package/dist/_dts/DrawCommand-B3bskUsC.d.ts +564 -0
- package/dist/_dts/{PrefsForm-BYa6cWnO.d.ts → PrefsForm-BkUJZx0A.d.ts} +4 -1
- package/dist/_dts/fitViewToBounds-dZ2UDB6e.d.ts +21 -0
- package/dist/_dts/frac-Cp3NivlC.d.ts +728 -0
- package/dist/_dts/index-BDVzvRzQ.d.ts +236 -0
- package/dist/_dts/shapeKinds-Cx_rxwsa.d.ts +87 -0
- package/dist/_dts/{DrawCommand-DBB45NfN.d.ts → types-C-gh9Ap-.d.ts} +1 -582
- package/dist/_dts/{types-AHlQxBNN.d.ts → types-D6s4b7if.d.ts} +2 -2
- package/dist/_dts/{types-1Sdxy_Pv.d.ts → types-DYMaEvM5.d.ts} +26 -1
- package/dist/_dts/{useTrialState-CsGMjhu9.d.ts → useTrialState-gmMvZqPc.d.ts} +7 -2
- package/dist/canvas/index.d.ts +43 -25
- package/dist/canvas/index.js +5 -3
- package/dist/chrome/index.d.ts +9 -6
- package/dist/chrome/index.js +7 -6
- package/dist/chunk-2AYGEN57.js +32 -0
- package/dist/chunk-2AYGEN57.js.map +1 -0
- package/dist/{chunk-RVNN4CHQ.js → chunk-3P5TTTA7.js} +16 -8
- package/dist/chunk-3P5TTTA7.js.map +1 -0
- package/dist/{chunk-NS54R52R.js → chunk-3ZELRRBV.js} +45 -40
- package/dist/chunk-3ZELRRBV.js.map +1 -0
- package/dist/{chunk-HFDVGF4X.js → chunk-4EY67BKJ.js} +32 -7
- package/dist/chunk-4EY67BKJ.js.map +1 -0
- package/dist/chunk-5TCEVMPI.js +140 -0
- package/dist/chunk-5TCEVMPI.js.map +1 -0
- package/dist/{chunk-O7NVSCLN.js → chunk-6JMU56CU.js} +133 -134
- package/dist/chunk-6JMU56CU.js.map +1 -0
- package/dist/{chunk-CPUJ3QXL.js → chunk-CQLQPQ4P.js} +2 -2
- package/dist/chunk-CQLQPQ4P.js.map +1 -0
- package/dist/chunk-CTRKTLYZ.js +33 -0
- package/dist/chunk-CTRKTLYZ.js.map +1 -0
- package/dist/chunk-EQIB2PGC.js +458 -0
- package/dist/chunk-EQIB2PGC.js.map +1 -0
- package/dist/chunk-HEORBLVT.js +7128 -0
- package/dist/chunk-HEORBLVT.js.map +1 -0
- package/dist/{chunk-V7PRSIRQ.js → chunk-JDDIZSLL.js} +4 -4
- package/dist/chunk-JDDIZSLL.js.map +1 -0
- package/dist/chunk-LITE5YFB.js +669 -0
- package/dist/chunk-LITE5YFB.js.map +1 -0
- package/dist/{chunk-Z6HJ5FEM.js → chunk-ROQDRXKW.js} +732 -315
- package/dist/chunk-ROQDRXKW.js.map +1 -0
- package/dist/chunk-SBXNQW4G.js +3 -0
- package/dist/chunk-SBXNQW4G.js.map +1 -0
- package/dist/{chunk-4TMMVIDM.js → chunk-XJ6N32QP.js} +50 -6
- package/dist/chunk-XJ6N32QP.js.map +1 -0
- package/dist/chunk-YQJNT4XQ.js +293 -0
- package/dist/chunk-YQJNT4XQ.js.map +1 -0
- package/dist/controls/index.d.ts +4 -28
- package/dist/controls/index.js +3 -3
- package/dist/dragdrop/index.d.ts +50 -5
- package/dist/dragdrop/index.js +3 -1
- package/dist/index.d.ts +660 -302
- package/dist/index.js +1793 -587
- package/dist/index.js.map +1 -1
- package/dist/layers/index.d.ts +6 -5
- package/dist/layers/index.js +4 -2
- package/dist/loupe/index.d.ts +187 -0
- package/dist/loupe/index.js +7 -0
- package/dist/loupe/index.js.map +1 -0
- package/dist/passthrough/weasel-canvas.d.ts +3 -1
- package/dist/passthrough/weasel-canvas.js +1 -1
- package/dist/passthrough/weasel-ui.d.ts +151 -91
- package/dist/passthrough/weasel-ui.js +3 -2
- package/dist/primitives/index.d.ts +3 -1
- package/dist/primitives/index.js +6 -5
- package/dist/state/index.d.ts +3 -3
- package/dist/state/index.js +2 -2
- package/dist/styles.css +229 -703
- package/dist/surface/index.d.ts +18 -2
- package/dist/surface/index.js +2 -2
- package/dist/ui/layers/index.d.ts +8 -2
- package/dist/ui/layers/index.js +2 -4
- package/dist/undo/index.d.ts +5 -4
- package/package.json +14 -7
- package/src/annotations/AnnotationOverlay.tsx +205 -0
- package/src/annotations/AnnotationTargets.tsx +37 -0
- package/src/annotations/Annotations.less +129 -0
- package/src/annotations/Annotations.meaning.test.tsx +111 -0
- package/src/annotations/Annotations.overlay.test.tsx +142 -0
- package/src/annotations/AnnotationsContext.ts +49 -0
- package/src/annotations/ExportMenu.test.tsx +86 -0
- package/src/annotations/ExportMenu.tsx +182 -0
- package/src/annotations/MarkList.tsx +75 -0
- package/src/annotations/capture.test.ts +140 -0
- package/src/annotations/capture.ts +237 -0
- package/src/annotations/drawOne.test.ts +56 -0
- package/src/annotations/drawOne.ts +47 -0
- package/src/annotations/frac.test.ts +59 -0
- package/src/annotations/frac.ts +66 -0
- package/src/annotations/history.test.ts +82 -0
- package/src/annotations/history.ts +118 -0
- package/src/annotations/index.ts +37 -0
- package/src/annotations/paint.test.ts +125 -0
- package/src/annotations/paint.ts +130 -0
- package/src/annotations/staleness.test.ts +56 -0
- package/src/annotations/staleness.ts +41 -0
- package/src/annotations/store.test.ts +175 -0
- package/src/annotations/store.ts +317 -0
- package/src/annotations/svgNodes.test.ts +77 -0
- package/src/annotations/svgNodes.ts +74 -0
- package/src/annotations/toolMap.test.ts +36 -0
- package/src/annotations/toolMap.ts +54 -0
- package/src/annotations/types.ts +222 -0
- package/src/annotations/view.test.ts +37 -0
- package/src/annotations/view.ts +40 -0
- package/src/canvas/AGENTS.md +55 -5
- package/src/canvas/CanvasStack.test.tsx +27 -1
- package/src/canvas/CanvasStack.tsx +29 -4
- package/src/canvas/CanvasStackContext.ts +23 -4
- package/src/canvas/camera.test.ts +78 -0
- package/src/canvas/camera.ts +62 -0
- package/src/canvas/canvasCoords.test.ts +26 -0
- package/src/canvas/canvasCoords.ts +20 -7
- package/src/canvas/index.ts +5 -1
- package/src/canvas/useLayerScheduler.ts +7 -3
- package/src/canvas/usePanZoom.test.ts +36 -5
- package/src/canvas/usePanZoom.ts +20 -15
- package/src/canvas/worldSpec.test.ts +63 -0
- package/src/canvas/worldSpec.ts +48 -0
- package/src/chrome/builtins.test.ts +31 -1
- package/src/chrome/builtins.tsx +63 -19
- package/src/chrome/regions/PaletteRegion.test.tsx +22 -1
- package/src/chrome/regions/PaletteRegion.tsx +4 -0
- package/src/chrome/regions/SidebarRegion.tsx +37 -13
- package/src/chrome/regions/ToolbarRegion.tsx +2 -1
- package/src/chrome/regions/ViewportRegion.tsx +9 -1
- package/src/chrome/regions/regions.test.tsx +6 -1
- package/src/chrome/types.ts +20 -0
- package/src/config/builder.test.ts +7 -1
- package/src/config/builder.ts +1 -5
- package/src/config/resolve.test.ts +1 -2
- package/src/controls/ControlPanel.stories.tsx +41 -2
- package/src/controls/ControlPanel.test.tsx +69 -9
- package/src/controls/ControlPanel.tsx +106 -25
- package/src/dragdrop/DragDropRuntime.tsx +8 -2
- package/src/dragdrop/dragDrop.test.tsx +29 -2
- package/src/dragdrop/index.ts +11 -0
- package/src/index.test.ts +22 -0
- package/src/index.ts +136 -4
- package/src/instrument/SineWave.smoke.test.tsx +1 -0
- package/src/instrument/types.ts +24 -1
- package/src/lab/Lab.surface.test.tsx +162 -0
- package/src/lab/Lab.tsx +102 -17
- package/src/lab/Lab.undock.test.tsx +85 -0
- package/src/lab/LabFullChrome.stories.tsx +20 -0
- package/src/lab/LabShell.less +11 -0
- package/src/lab/Workspace.less +73 -0
- package/src/lab/Workspace.surface.test.tsx +2 -0
- package/src/lab/Workspace.tsx +97 -8
- package/src/lab/index.ts +1 -1
- package/src/lab/panelHost.ts +37 -0
- package/src/layers/AGENTS.md +1 -1
- package/src/layers/LayerList.tsx +1 -1
- package/src/loupe/AGENTS.md +49 -0
- package/src/loupe/CanvasLoupe.tsx +83 -0
- package/src/loupe/DomLoupe.tsx +62 -0
- package/src/loupe/Loupe.less +38 -0
- package/src/loupe/LoupeBubble.tsx +32 -0
- package/src/loupe/TrialLoupe.tsx +93 -0
- package/src/loupe/canvasLens.test.ts +205 -0
- package/src/loupe/canvasLens.ts +141 -0
- package/src/loupe/index.ts +19 -0
- package/src/loupe/types.test.ts +29 -0
- package/src/loupe/types.ts +90 -0
- package/src/loupe/useHostSize.ts +30 -0
- package/src/loupe/useLoupe.test.tsx +197 -0
- package/src/loupe/useLoupe.ts +189 -0
- package/src/passthrough/weasel-ui.ts +25 -17
- package/src/primitives/FloatingPanel.test.tsx +76 -1
- package/src/primitives/FloatingPanel.tsx +19 -3
- package/src/primitives/ScaleIndicator.test.tsx +7 -2
- package/src/primitives/Sidebar.less +18 -0
- package/src/primitives/Toolbar.less +8 -0
- package/src/primitives/Toolbar.tsx +5 -0
- package/src/primitives/useRovingTabIndex.test.ts +21 -0
- package/src/primitives/useRovingTabIndex.ts +26 -17
- package/src/state/document.test.ts +23 -0
- package/src/state/document.ts +14 -2
- package/src/state/index.ts +2 -0
- package/src/state/store.test.ts +24 -0
- package/src/state/store.ts +35 -1
- package/src/state/types.ts +11 -0
- package/src/state/undock.test.ts +40 -0
- package/src/state/undock.ts +39 -0
- package/src/styles.less +2 -4
- package/src/surface/SurfaceContext.ts +4 -0
- package/src/surface/index.ts +8 -3
- package/src/surface/useSurfaceTile.test.tsx +2 -0
- package/src/surface/useSurfaceTile.ts +7 -1
- package/src/surface/useTiledSurface.test.tsx +58 -0
- package/src/surface/useTiledSurface.ts +38 -3
- package/src/theme/Interstellar.stories.tsx +1 -1
- package/src/trial/Trial.annotations.persist.test.tsx +166 -0
- package/src/trial/Trial.annotations.test.tsx +121 -0
- package/src/trial/Trial.canvas.test.tsx +76 -1
- package/src/trial/Trial.config.test.tsx +3 -8
- package/src/trial/Trial.less +19 -0
- package/src/trial/Trial.loupe.test.tsx +128 -0
- package/src/trial/Trial.stories.tsx +1 -0
- package/src/trial/Trial.test.tsx +12 -0
- package/src/trial/Trial.trialId.test.tsx +36 -0
- package/src/trial/Trial.tsx +215 -40
- package/src/trial/TrialChrome.tsx +35 -0
- package/src/trial/UndockedSections.tsx +65 -0
- package/src/trial/trialOps.test.ts +21 -0
- package/src/trial/trialOps.ts +5 -3
- package/src/ui/layers/index.ts +5 -1
- package/dist/_dts/index-DgcNdEdh.d.ts +0 -314
- package/dist/chunk-4TMMVIDM.js.map +0 -1
- package/dist/chunk-CPUJ3QXL.js.map +0 -1
- package/dist/chunk-HFDVGF4X.js.map +0 -1
- package/dist/chunk-NS54R52R.js.map +0 -1
- package/dist/chunk-O2BULFHX.js +0 -152
- package/dist/chunk-O2BULFHX.js.map +0 -1
- package/dist/chunk-O7NVSCLN.js.map +0 -1
- package/dist/chunk-PO6L3NSH.js +0 -366
- package/dist/chunk-PO6L3NSH.js.map +0 -1
- package/dist/chunk-PQJ5B2U2.js +0 -27
- package/dist/chunk-PQJ5B2U2.js.map +0 -1
- package/dist/chunk-RVNN4CHQ.js.map +0 -1
- package/dist/chunk-TLGRYALP.js +0 -6151
- package/dist/chunk-TLGRYALP.js.map +0 -1
- package/dist/chunk-V7PRSIRQ.js.map +0 -1
- package/dist/chunk-Z6HJ5FEM.js.map +0 -1
- package/dist/chunk-ZZAYVX4X.js +0 -505
- package/dist/chunk-ZZAYVX4X.js.map +0 -1
- package/src/primitives/DragHandleGlyph.tsx +0 -29
- package/src/ui/format.test.ts +0 -33
- package/src/ui/format.ts +0 -30
- package/src/ui/layers/LayerStack.less +0 -143
- package/src/ui/layers/LayerStack.stories.tsx +0 -45
- package/src/ui/layers/LayerStack.test.tsx +0 -170
- package/src/ui/layers/LayerStack.tsx +0 -208
- package/src/ui/properties/CheckboxRow.stories.tsx +0 -27
- package/src/ui/properties/ColorRow.stories.tsx +0 -106
- package/src/ui/properties/CurveField.less +0 -48
- package/src/ui/properties/CurveField.stories.tsx +0 -20
- package/src/ui/properties/CurveField.test.tsx +0 -127
- package/src/ui/properties/CurveField.tsx +0 -184
- package/src/ui/properties/EffectCard.tsx +0 -324
- package/src/ui/properties/Gallery.stories.tsx +0 -178
- package/src/ui/properties/NumberRow.stories.tsx +0 -65
- package/src/ui/properties/PropertyGroup.less +0 -50
- package/src/ui/properties/PropertyGroup.stories.tsx +0 -34
- package/src/ui/properties/PropertyGroup.test.tsx +0 -33
- package/src/ui/properties/PropertyGroup.tsx +0 -45
- package/src/ui/properties/PropertyList.stories.tsx +0 -83
- package/src/ui/properties/PropertyPanel.less +0 -606
- package/src/ui/properties/PropertyPanel.stories.tsx +0 -190
- package/src/ui/properties/PropertyPanel.test.tsx +0 -193
- package/src/ui/properties/PropertyPanel.tsx +0 -469
- package/src/ui/properties/PropertyRow.stories.tsx +0 -53
- package/src/ui/properties/SelectRow.stories.tsx +0 -58
- package/src/ui/properties/SliderRow.stories.tsx +0 -74
- package/src/ui/properties/SpeechBalloonPanels.stories.tsx +0 -398
- package/src/ui/properties/TextRow.stories.tsx +0 -62
- package/src/ui/properties/ToggleRow.stories.tsx +0 -57
- package/src/ui/properties/index.ts +0 -39
- package/src/ui/properties/storyLayouts.tsx +0 -36
package/dist/layers/index.d.ts
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export {
|
|
1
|
+
import { E as LayerDescriptor } from '../_dts/frac-Cp3NivlC.js';
|
|
2
|
+
export { B as LayerCapability } from '../_dts/frac-Cp3NivlC.js';
|
|
3
3
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
4
4
|
import 'react';
|
|
5
|
-
import '../_dts/types-
|
|
6
|
-
import '../_dts/PrefsForm-
|
|
7
|
-
import '../_dts/types-
|
|
5
|
+
import '../_dts/types-D6s4b7if.js';
|
|
6
|
+
import '../_dts/PrefsForm-BkUJZx0A.js';
|
|
7
|
+
import '../_dts/types-DYMaEvM5.js';
|
|
8
8
|
import '../_dts/types-DJ79Tg5J.js';
|
|
9
|
+
import '../_dts/types-C-gh9Ap-.js';
|
|
9
10
|
|
|
10
11
|
/** Props for `<LayerList>`. */
|
|
11
12
|
interface LayerListProps {
|
package/dist/layers/index.js
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
export { LayerList } from '../chunk-
|
|
2
|
-
import '../chunk-
|
|
1
|
+
export { LayerList } from '../chunk-JDDIZSLL.js';
|
|
2
|
+
import '../chunk-SBXNQW4G.js';
|
|
3
|
+
import '../chunk-HEORBLVT.js';
|
|
4
|
+
import '../chunk-ROQDRXKW.js';
|
|
3
5
|
//# sourceMappingURL=index.js.map
|
|
4
6
|
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,187 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import { ae as LoupeMode, V as ViewTransform, W as WorldFrame, c as WorldSpec, a2 as ViewportSize, K as LoupeRenderArgs, N as ResolvedLoupe } from '../_dts/frac-Cp3NivlC.js';
|
|
3
|
+
export { L as LOUPE_DEFAULTS, G as LoupeCapability, J as LoupeDeclaration, ab as resolveLoupe } from '../_dts/frac-Cp3NivlC.js';
|
|
4
|
+
import { c as CanvasStackSurface, C as CanvasLayerDescriptor } from '../_dts/CanvasStackContext-DtAn_3O-.js';
|
|
5
|
+
import { RefObject, ReactNode } from 'react';
|
|
6
|
+
import '../_dts/types-D6s4b7if.js';
|
|
7
|
+
import '../_dts/PrefsForm-BkUJZx0A.js';
|
|
8
|
+
import '../_dts/types-DYMaEvM5.js';
|
|
9
|
+
import '../_dts/types-DJ79Tg5J.js';
|
|
10
|
+
import '../_dts/types-C-gh9Ap-.js';
|
|
11
|
+
|
|
12
|
+
/** A point on the magnified surface, in its own CSS pixels. */
|
|
13
|
+
interface LoupePoint {
|
|
14
|
+
x: number;
|
|
15
|
+
y: number;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
/** Props for `<CanvasLoupe>`. */
|
|
19
|
+
interface CanvasLoupeProps {
|
|
20
|
+
aim: LoupePoint;
|
|
21
|
+
factor: number;
|
|
22
|
+
mode: LoupeMode;
|
|
23
|
+
diameter: number;
|
|
24
|
+
/** The stack being magnified: its layers, its pixels, and its measured box. */
|
|
25
|
+
surface: CanvasStackSurface;
|
|
26
|
+
view: ViewTransform;
|
|
27
|
+
frame: WorldFrame;
|
|
28
|
+
worldSpec?: WorldSpec;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Paints a lens over a `<CanvasStack>` by re-drawing the stack's layers through
|
|
32
|
+
* a zoomed camera — so the magnified content is as sharp as the original, at
|
|
33
|
+
* any factor. `pixel` mode enlarges what the stack presented instead.
|
|
34
|
+
*/
|
|
35
|
+
declare function CanvasLoupe({ aim, factor, mode, diameter, surface, view, frame, worldSpec, }: CanvasLoupeProps): react_jsx_runtime.JSX.Element;
|
|
36
|
+
|
|
37
|
+
/** The camera a round lens of `diameter` shows a magnified region through, and
|
|
38
|
+
* the coordinate system it is read in — the instrument's own `WorldSpec`,
|
|
39
|
+
* resolved against the lens rather than the stack. */
|
|
40
|
+
interface LensCamera {
|
|
41
|
+
view: ViewTransform;
|
|
42
|
+
frame: WorldFrame;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* What a lens aimed at `aim` renders the stack's layers through.
|
|
46
|
+
*
|
|
47
|
+
* The lens is its own viewport, so the world spec resolves against its box: an
|
|
48
|
+
* instrument centred on its viewport is centred in the lens too.
|
|
49
|
+
*/
|
|
50
|
+
declare function lensCamera(aim: LoupePoint, outer: ViewTransform, outerFrame: WorldFrame, factor: number, diameter: number, worldSpec?: WorldSpec): LensCamera;
|
|
51
|
+
/** A rectangle in a backing store's own device pixels. */
|
|
52
|
+
interface SourceRect {
|
|
53
|
+
sx: number;
|
|
54
|
+
sy: number;
|
|
55
|
+
sw: number;
|
|
56
|
+
sh: number;
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* The region a pixel-mode lens copies out of a presented canvas: the `diameter
|
|
60
|
+
* / factor` CSS px around `aim`, in that canvas' backing-store pixels.
|
|
61
|
+
*/
|
|
62
|
+
declare function lensSourceRect(aim: LoupePoint, factor: number, diameter: number, dpr: number): SourceRect;
|
|
63
|
+
/**
|
|
64
|
+
* The colour a stack presents at a point: the topmost visible layer with
|
|
65
|
+
* anything opaque there, or `null` when every layer is transparent — which is
|
|
66
|
+
* the honest answer for a point showing nothing but the workspace behind.
|
|
67
|
+
*/
|
|
68
|
+
declare function sampleStack(layers: readonly CanvasLayerDescriptor[], canvases: Map<string, HTMLCanvasElement>, p: LoupePoint, dpr: number): string | null;
|
|
69
|
+
/** Redraw the stack into a lens' own canvas. `mode` decides whether the layers
|
|
70
|
+
* are re-run at the lens camera or their presented pixels are enlarged. */
|
|
71
|
+
declare function drawCanvasLens(ctx: CanvasRenderingContext2D, opts: {
|
|
72
|
+
aim: LoupePoint;
|
|
73
|
+
factor: number;
|
|
74
|
+
diameter: number;
|
|
75
|
+
dpr: number;
|
|
76
|
+
mode: 'vector' | 'pixel';
|
|
77
|
+
outer: ViewTransform;
|
|
78
|
+
outerFrame?: WorldFrame;
|
|
79
|
+
worldSpec?: WorldSpec;
|
|
80
|
+
layers: readonly CanvasLayerDescriptor[];
|
|
81
|
+
canvases: Map<string, HTMLCanvasElement>;
|
|
82
|
+
}): void;
|
|
83
|
+
|
|
84
|
+
/** Props for `<DomLoupe>`. */
|
|
85
|
+
interface DomLoupeProps {
|
|
86
|
+
aim: LoupePoint;
|
|
87
|
+
factor: number;
|
|
88
|
+
mode: LoupeMode;
|
|
89
|
+
diameter: number;
|
|
90
|
+
/** The host the instrument draws into, which the stage reproduces. */
|
|
91
|
+
size: ViewportSize;
|
|
92
|
+
/** The trial's own camera. */
|
|
93
|
+
view: ViewTransform;
|
|
94
|
+
frame?: WorldFrame;
|
|
95
|
+
state: unknown;
|
|
96
|
+
config: unknown;
|
|
97
|
+
render: (args: LoupeRenderArgs) => React.ReactNode;
|
|
98
|
+
}
|
|
99
|
+
/**
|
|
100
|
+
* Paints a lens over DOM content by asking the instrument to draw itself again
|
|
101
|
+
* at a magnified camera.
|
|
102
|
+
*
|
|
103
|
+
* The stage is a full copy of the host, so the instrument's own layout still
|
|
104
|
+
* holds; the camera is composed about the aimed point, which keeps that point
|
|
105
|
+
* where it already was, and the stage is then slid by `diameter / 2 - aim` to
|
|
106
|
+
* bring it to the middle of the lens.
|
|
107
|
+
*/
|
|
108
|
+
declare function DomLoupe({ aim, factor, mode, diameter, size, view, frame, state, config, render, }: DomLoupeProps): react_jsx_runtime.JSX.Element;
|
|
109
|
+
|
|
110
|
+
/** Props for `<LoupeBubble>`. */
|
|
111
|
+
interface LoupeBubbleProps {
|
|
112
|
+
/** Where the lens is aimed, in its container's own pixels. */
|
|
113
|
+
aim: LoupePoint;
|
|
114
|
+
diameter: number;
|
|
115
|
+
hostRef?: RefObject<HTMLDivElement | null>;
|
|
116
|
+
children: ReactNode;
|
|
117
|
+
}
|
|
118
|
+
/**
|
|
119
|
+
* The lens itself: a circle centred on the aimed point, clipping whatever a
|
|
120
|
+
* painter draws into it.
|
|
121
|
+
*
|
|
122
|
+
* It takes no pointer events, so the pan, the wheel and anything underneath
|
|
123
|
+
* keep working while it is up — and it is `aria-hidden`, since it magnifies
|
|
124
|
+
* content already on the page rather than adding any.
|
|
125
|
+
*/
|
|
126
|
+
declare function LoupeBubble({ aim, diameter, hostRef, children }: LoupeBubbleProps): react_jsx_runtime.JSX.Element;
|
|
127
|
+
|
|
128
|
+
/** Props for `<TrialLoupe>`. */
|
|
129
|
+
interface TrialLoupeProps {
|
|
130
|
+
capability: ResolvedLoupe;
|
|
131
|
+
/** Whether the trial's loupe is turned on. Hold-to-peek shows it anyway. */
|
|
132
|
+
enabled: boolean;
|
|
133
|
+
state: unknown;
|
|
134
|
+
config: unknown;
|
|
135
|
+
/** The trial's own camera. */
|
|
136
|
+
view: ViewTransform;
|
|
137
|
+
worldSpec?: WorldSpec;
|
|
138
|
+
/** The element the lens tracks. A loupe mounted inside a `<CanvasStack>`
|
|
139
|
+
* takes the stack's own element instead, and this goes unused. */
|
|
140
|
+
hostRef?: RefObject<HTMLElement | null>;
|
|
141
|
+
}
|
|
142
|
+
/**
|
|
143
|
+
* A trial's loupe, painted by whichever painter suits its content: the canvas
|
|
144
|
+
* stack it is mounted inside, or the instrument's own `render` at a magnified
|
|
145
|
+
* camera.
|
|
146
|
+
*/
|
|
147
|
+
declare function TrialLoupe({ capability, enabled, state, config, view, worldSpec, hostRef, }: TrialLoupeProps): react_jsx_runtime.JSX.Element | null;
|
|
148
|
+
|
|
149
|
+
/** Options for {@link useLoupe}. */
|
|
150
|
+
interface UseLoupeOptions {
|
|
151
|
+
capability: ResolvedLoupe;
|
|
152
|
+
/** The element the lens tracks the pointer across. */
|
|
153
|
+
hostRef: RefObject<HTMLElement | null>;
|
|
154
|
+
/** Whether the loupe is turned on. Hold-to-peek shows it regardless. */
|
|
155
|
+
enabled: boolean;
|
|
156
|
+
/** Hex colour at a host point. Omitted, the loupe reports no colour — which
|
|
157
|
+
* is the honest answer for a surface with no pixels to read. */
|
|
158
|
+
sample?: (p: LoupePoint) => string | null;
|
|
159
|
+
}
|
|
160
|
+
/** A loupe as a React view reads it. */
|
|
161
|
+
interface LoupeState {
|
|
162
|
+
/** Whether the lens should be drawn. */
|
|
163
|
+
visible: boolean;
|
|
164
|
+
/** Where it is aimed, in the host's own pixels. */
|
|
165
|
+
aim: LoupePoint;
|
|
166
|
+
factor: number;
|
|
167
|
+
mode: LoupeMode;
|
|
168
|
+
color: string | null;
|
|
169
|
+
setMode: (mode: LoupeMode) => void;
|
|
170
|
+
setFactor: (factor: number) => void;
|
|
171
|
+
/** Sample what the lens shows at a point inside it. */
|
|
172
|
+
pick: (p?: LoupePoint) => string | null;
|
|
173
|
+
}
|
|
174
|
+
/**
|
|
175
|
+
* Binds `@weasel-js/loupe`'s model to a host element and drives it from the
|
|
176
|
+
* pointer, the peek key and the wheel.
|
|
177
|
+
*
|
|
178
|
+
* These are plain listeners rather than gesture bindings because labkit trials
|
|
179
|
+
* do not route input through the dispatcher — see the loupe entry under
|
|
180
|
+
* "Selection, actions & UI panels" in `docs/TODO.md`. They are all in this one
|
|
181
|
+
* hook so that when trial input does go through it, this is the only file to
|
|
182
|
+
* rewrite.
|
|
183
|
+
*/
|
|
184
|
+
declare function useLoupe({ capability, hostRef, enabled, sample }: UseLoupeOptions): LoupeState;
|
|
185
|
+
|
|
186
|
+
export { CanvasLoupe, DomLoupe, LoupeBubble, LoupeRenderArgs, ResolvedLoupe, TrialLoupe, drawCanvasLens, lensCamera, lensSourceRect, sampleStack, useLoupe };
|
|
187
|
+
export type { CanvasLoupeProps, DomLoupeProps, LensCamera, LoupeBubbleProps, LoupeState, SourceRect, TrialLoupeProps, UseLoupeOptions };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export { CanvasLoupe, DomLoupe, LOUPE_DEFAULTS, LoupeBubble, TrialLoupe, drawCanvasLens, lensCamera, lensSourceRect, resolveLoupe, sampleStack, useLoupe } from '../chunk-EQIB2PGC.js';
|
|
2
|
+
import '../chunk-CTRKTLYZ.js';
|
|
3
|
+
import '../chunk-2AYGEN57.js';
|
|
4
|
+
import '../chunk-CQLQPQ4P.js';
|
|
5
|
+
import '../chunk-ROQDRXKW.js';
|
|
6
|
+
//# sourceMappingURL=index.js.map
|
|
7
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"index.js"}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
import { N as Node,
|
|
1
|
+
import { N as Node, P as Path, S as Scene } from '../_dts/types-C-gh9Ap-.js';
|
|
2
|
+
import { V as View, D as DrawCommand, P as PathDrawCommand } from '../_dts/DrawCommand-B3bskUsC.js';
|
|
2
3
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
3
4
|
import { Ref } from 'react';
|
|
5
|
+
import { B as Bounds, V as ViewportDims } from '../_dts/fitViewToBounds-dZ2UDB6e.js';
|
|
4
6
|
|
|
5
7
|
/**
|
|
6
8
|
* NodeShape — the **shape trait's** registry. Each trait of a node
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { FALLBACK_FIT_VIEW, MinimapCanvas, SceneViewCanvas, buildSceneViewCommands, computeFitView, computeIndicatorCommand, renderSceneToCanvas } from '../chunk-
|
|
1
|
+
export { FALLBACK_FIT_VIEW, MinimapCanvas, SceneViewCanvas, buildSceneViewCommands, computeFitView, computeIndicatorCommand, renderSceneToCanvas } from '../chunk-ROQDRXKW.js';
|
|
2
2
|
//# sourceMappingURL=weasel-canvas.js.map
|
|
3
3
|
//# sourceMappingURL=weasel-canvas.js.map
|
|
@@ -1,10 +1,15 @@
|
|
|
1
|
-
import { T as ToolPrefLeaf, a as ToolPrefGroup } from '../_dts/PrefsForm-
|
|
2
|
-
export { b as BuiltinPref, c as PrefBoolean, d as PrefBooleanControl, e as PrefColor, f as PrefCustom, g as PrefEnum, h as PrefEnumControl, i as PrefEnumEncoding, j as PrefKind, k as PrefNumber, l as PrefNumberControl, m as PrefNumberUnit, n as PrefObject, o as PrefPaint, p as PrefRenderContext, P as PrefRenderer, q as PrefString, r as PrefStringControl } from '../_dts/PrefsForm-
|
|
1
|
+
import { T as ToolPrefLeaf, a as ToolPrefGroup } from '../_dts/PrefsForm-BkUJZx0A.js';
|
|
2
|
+
export { b as BuiltinPref, c as PrefBoolean, d as PrefBooleanControl, e as PrefColor, f as PrefCustom, g as PrefEnum, h as PrefEnumControl, i as PrefEnumEncoding, j as PrefKind, k as PrefNumber, l as PrefNumberControl, m as PrefNumberUnit, n as PrefObject, o as PrefPaint, p as PrefRenderContext, P as PrefRenderer, q as PrefString, r as PrefStringControl } from '../_dts/PrefsForm-BkUJZx0A.js';
|
|
3
3
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
4
4
|
import * as react from 'react';
|
|
5
|
-
import { MutableRefObject, ReactNode, CSSProperties, ButtonHTMLAttributes, ReactElement, KeyboardEvent, PointerEvent as PointerEvent$1, RefCallback
|
|
6
|
-
|
|
7
|
-
import {
|
|
5
|
+
import { MutableRefObject, ReactNode, CSSProperties, ButtonHTMLAttributes, ReactElement, KeyboardEvent, RefObject, PointerEvent as PointerEvent$1, RefCallback } from 'react';
|
|
6
|
+
export { LayerStack, LayerStackItem, LayerStackProps } from '../ui/layers/index.js';
|
|
7
|
+
import { O as Op, a as NodeId, P as Path, S as Scene, H as History } from '../_dts/types-C-gh9Ap-.js';
|
|
8
|
+
import { V as View, D as DrawCommand } from '../_dts/DrawCommand-B3bskUsC.js';
|
|
9
|
+
import { B as Bounds } from '../_dts/fitViewToBounds-dZ2UDB6e.js';
|
|
10
|
+
import { K as KitInsertShape } from '../_dts/shapeKinds-Cx_rxwsa.js';
|
|
11
|
+
import { TextFieldProps, ValidationResult, CheckboxProps as CheckboxProps$1, SwitchProps as SwitchProps$1, TabProps as TabProps$1, TabListProps as TabListProps$1, TabPanelProps as TabPanelProps$1, TabsProps as TabsProps$1, RadioProps as RadioProps$1, RadioGroupProps as RadioGroupProps$1, NumberFieldProps as NumberFieldProps$1, SelectProps as SelectProps$1, ListBoxItemProps, ComboBoxProps as ComboBoxProps$1, SliderProps as SliderProps$1, ModalOverlayProps, DialogProps as DialogProps$1, PopoverProps } from 'react-aria-components';
|
|
12
|
+
export { DialogTrigger as CalloutTrigger } from 'react-aria-components';
|
|
8
13
|
|
|
9
14
|
/**
|
|
10
15
|
* Namespaced, opt-in console tracing. Off by default; production builds
|
|
@@ -1036,86 +1041,6 @@ interface PasteSpec {
|
|
|
1036
1041
|
* the `Action` type. */
|
|
1037
1042
|
type GestureSpec = KeySpec$1 | KeyHeldSpec | WheelSpec | ClickSpec | DoubleClickSpec | ContextMenuSpec | DragSpec | PointerDownSpec | LongPressSpec | MultiTouchSpec | MultiTouchTapSpec | DropSpec | PasteSpec;
|
|
1038
1043
|
|
|
1039
|
-
/**
|
|
1040
|
-
* The kit's built-in shape kinds — one table, every other spelling derived.
|
|
1041
|
-
*
|
|
1042
|
-
* Lives in `core/` rather than beside the shape tools because both layers ask
|
|
1043
|
-
* questions of the same set: the interactions layer decides whether
|
|
1044
|
-
* `insertAction` can paint a live preview for a kind, and the canvas layer
|
|
1045
|
-
* decides which shape tools `useBuiltinShapeTools` mounts and what
|
|
1046
|
-
* `BUNDLE_TOOLS` / `defaultNodeRouting` / `defaultNodeProperties` enumerate.
|
|
1047
|
-
*
|
|
1048
|
-
* This module imports nothing on purpose: `useBuiltinShapeTools` imports the
|
|
1049
|
-
* package barrel, so anything barrel-reachable that needs these lists at
|
|
1050
|
-
* module-evaluation time must not route through it.
|
|
1051
|
-
*/
|
|
1052
|
-
/** What the kit knows about one built-in shape kind. */
|
|
1053
|
-
interface ShapeKindDescriptor {
|
|
1054
|
-
/** Mounted as a built-in shape tool by `useBuiltinShapeTools`, and so a
|
|
1055
|
-
* member of `BuiltinShapeToolId` / `KIT_SHAPE_KINDS`. `image` is false:
|
|
1056
|
-
* `useImageTool` needs a `src` and can't be auto-mounted. */
|
|
1057
|
-
readonly tool: boolean;
|
|
1058
|
-
/** `insertAction` emits an `insertPreview` overlay for this kind, and the
|
|
1059
|
-
* dispatcher overlay layer knows how to draw it. Kinds without one still
|
|
1060
|
-
* commit; they just have no live drag preview (`pen` and `lasso` don't
|
|
1061
|
-
* route through `insertAction` at all). */
|
|
1062
|
-
readonly insertPreview: boolean;
|
|
1063
|
-
}
|
|
1064
|
-
/**
|
|
1065
|
-
* Declaration order is the enumeration order of every derived list —
|
|
1066
|
-
* `KIT_SHAPE_KINDS`, and through it `defaultNodeRouting` /
|
|
1067
|
-
* `defaultNodeProperties` / `BUNDLE_TOOLS.exhaustive`.
|
|
1068
|
-
*/
|
|
1069
|
-
declare const SHAPE_KINDS: {
|
|
1070
|
-
readonly rect: {
|
|
1071
|
-
readonly tool: true;
|
|
1072
|
-
readonly insertPreview: true;
|
|
1073
|
-
};
|
|
1074
|
-
readonly ellipse: {
|
|
1075
|
-
readonly tool: true;
|
|
1076
|
-
readonly insertPreview: true;
|
|
1077
|
-
};
|
|
1078
|
-
readonly line: {
|
|
1079
|
-
readonly tool: true;
|
|
1080
|
-
readonly insertPreview: true;
|
|
1081
|
-
};
|
|
1082
|
-
readonly polygon: {
|
|
1083
|
-
readonly tool: true;
|
|
1084
|
-
readonly insertPreview: true;
|
|
1085
|
-
};
|
|
1086
|
-
readonly star: {
|
|
1087
|
-
readonly tool: true;
|
|
1088
|
-
readonly insertPreview: true;
|
|
1089
|
-
};
|
|
1090
|
-
readonly pen: {
|
|
1091
|
-
readonly tool: true;
|
|
1092
|
-
readonly insertPreview: false;
|
|
1093
|
-
};
|
|
1094
|
-
readonly pencil: {
|
|
1095
|
-
readonly tool: true;
|
|
1096
|
-
readonly insertPreview: true;
|
|
1097
|
-
};
|
|
1098
|
-
readonly lasso: {
|
|
1099
|
-
readonly tool: true;
|
|
1100
|
-
readonly insertPreview: false;
|
|
1101
|
-
};
|
|
1102
|
-
readonly text: {
|
|
1103
|
-
readonly tool: true;
|
|
1104
|
-
readonly insertPreview: true;
|
|
1105
|
-
};
|
|
1106
|
-
readonly image: {
|
|
1107
|
-
readonly tool: false;
|
|
1108
|
-
readonly insertPreview: true;
|
|
1109
|
-
};
|
|
1110
|
-
};
|
|
1111
|
-
/** The keys of a shape-kind table whose descriptor sets `F` to `true`. */
|
|
1112
|
-
type ShapeKindsWhere<T, F extends keyof ShapeKindDescriptor> = {
|
|
1113
|
-
[K in keyof T]: T[K] extends Record<F, true> ? K : never;
|
|
1114
|
-
}[keyof T];
|
|
1115
|
-
/** The insert kinds the kit's dispatcher overlay layer knows how to render.
|
|
1116
|
-
* Consumer-defined kinds fall outside it: no live preview, commit unaffected. */
|
|
1117
|
-
type KitInsertShape = ShapeKindsWhere<typeof SHAPE_KINDS, 'insertPreview'>;
|
|
1118
|
-
|
|
1119
1044
|
/** A 2D point in either world or screen coordinates. */
|
|
1120
1045
|
interface Point2 {
|
|
1121
1046
|
x: number;
|
|
@@ -1717,10 +1642,59 @@ interface PoseProjection<TPose> {
|
|
|
1717
1642
|
supportsRotation?(pose: TPose): boolean;
|
|
1718
1643
|
}
|
|
1719
1644
|
|
|
1645
|
+
/** All easings in one bag — useful for demos / pickers. */
|
|
1646
|
+
declare const EASINGS: {
|
|
1647
|
+
readonly linear: EasingFn;
|
|
1648
|
+
readonly easeInQuad: EasingFn;
|
|
1649
|
+
readonly easeOutQuad: EasingFn;
|
|
1650
|
+
readonly easeInOutQuad: EasingFn;
|
|
1651
|
+
readonly easeInCubic: EasingFn;
|
|
1652
|
+
readonly easeOutCubic: EasingFn;
|
|
1653
|
+
readonly easeInOutCubic: EasingFn;
|
|
1654
|
+
readonly easeInQuart: EasingFn;
|
|
1655
|
+
readonly easeOutQuart: EasingFn;
|
|
1656
|
+
readonly easeInOutQuart: EasingFn;
|
|
1657
|
+
readonly easeInQuint: EasingFn;
|
|
1658
|
+
readonly easeOutQuint: EasingFn;
|
|
1659
|
+
readonly easeInOutQuint: EasingFn;
|
|
1660
|
+
readonly easeInSine: EasingFn;
|
|
1661
|
+
readonly easeOutSine: EasingFn;
|
|
1662
|
+
readonly easeInOutSine: EasingFn;
|
|
1663
|
+
readonly easeInExpo: EasingFn;
|
|
1664
|
+
readonly easeOutExpo: EasingFn;
|
|
1665
|
+
readonly easeInOutExpo: EasingFn;
|
|
1666
|
+
readonly easeInCirc: EasingFn;
|
|
1667
|
+
readonly easeOutCirc: EasingFn;
|
|
1668
|
+
readonly easeInOutCirc: EasingFn;
|
|
1669
|
+
readonly easeInBack: EasingFn;
|
|
1670
|
+
readonly easeOutBack: EasingFn;
|
|
1671
|
+
readonly easeInOutBack: EasingFn;
|
|
1672
|
+
readonly easeInElastic: EasingFn;
|
|
1673
|
+
readonly easeOutElastic: EasingFn;
|
|
1674
|
+
readonly easeInOutElastic: EasingFn;
|
|
1675
|
+
readonly easeInBounce: EasingFn;
|
|
1676
|
+
readonly easeOutBounce: EasingFn;
|
|
1677
|
+
readonly easeInOutBounce: EasingFn;
|
|
1678
|
+
};
|
|
1679
|
+
/** The name of one of the built-in easing curves. */
|
|
1680
|
+
type EasingName = keyof typeof EASINGS;
|
|
1681
|
+
|
|
1682
|
+
/** Cubic-bezier control points, CSS `cubic-bezier()` order. The curve's two
|
|
1683
|
+
* endpoints are implicit at (0,0) and (1,1). */
|
|
1684
|
+
interface BezierEasing {
|
|
1685
|
+
/** `readonly` so an `as const` preset is assignable; nothing ever writes it. */
|
|
1686
|
+
bezier: readonly [number, number, number, number];
|
|
1687
|
+
}
|
|
1688
|
+
/** An easing curve as a value: a function, the name of a built-in, or control
|
|
1689
|
+
* points. Anything an editor has to name, show or serialize must not be a bare
|
|
1690
|
+
* function, which is why the union exists. */
|
|
1691
|
+
type EasingSpec = EasingFn | EasingName | BezierEasing;
|
|
1692
|
+
|
|
1720
1693
|
/** An easing curve: maps normalized progress `t ∈ [0, 1]` to eased progress.
|
|
1721
1694
|
* Curves may leave the 0–1 range in the middle (back, elastic) but should
|
|
1722
1695
|
* pass through 0 at 0 and 1 at 1. */
|
|
1723
1696
|
type EasingFn = (t: number) => number;
|
|
1697
|
+
|
|
1724
1698
|
/** Factory interpolator: built ONCE at tween start with (from, to), the returned
|
|
1725
1699
|
* function is called with `t ∈ [0, 1]` each frame. Use for interpolators with
|
|
1726
1700
|
* expensive setup (color-space conversion, path-string parsing) — d3-interpolate's
|
|
@@ -1733,7 +1707,7 @@ interface ViewAnimationOptions {
|
|
|
1733
1707
|
/** Duration in ms. Default 250. */
|
|
1734
1708
|
ms?: number;
|
|
1735
1709
|
/** Easing curve. Default `easeOutCubic`. */
|
|
1736
|
-
easing?:
|
|
1710
|
+
easing?: EasingSpec;
|
|
1737
1711
|
/** Replace the kit's log-scale / fixed-anchor curve. */
|
|
1738
1712
|
interpolator?: InterpolatorFactory<View>;
|
|
1739
1713
|
/** Fires when the target is reached. Not called on cancel. */
|
|
@@ -3755,6 +3729,18 @@ declare function DataGrid<Row extends {
|
|
|
3755
3729
|
id: string;
|
|
3756
3730
|
}>(props: DataGridProps<Row>): react_jsx_runtime.JSX.Element;
|
|
3757
3731
|
|
|
3732
|
+
/** Props for `<DragHandleGlyph>`. */
|
|
3733
|
+
interface DragHandleGlyphProps {
|
|
3734
|
+
/** Height in px; width scales with it. Default 16. */
|
|
3735
|
+
size?: number;
|
|
3736
|
+
}
|
|
3737
|
+
/** The two-column dot grip used on anything draggable by a handle.
|
|
3738
|
+
*
|
|
3739
|
+
* Deliberately not part of the icon register: that register is outline strokes
|
|
3740
|
+
* at a fixed weight, and a grip is filled dots. Forcing it in would either
|
|
3741
|
+
* break the register's rule or produce a worse glyph. */
|
|
3742
|
+
declare function DragHandleGlyph({ size }: DragHandleGlyphProps): react_jsx_runtime.JSX.Element;
|
|
3743
|
+
|
|
3758
3744
|
/**
|
|
3759
3745
|
* Width class of a keycap: a modifier glyph, a multi-character legend that
|
|
3760
3746
|
* needs a wider chip, or a single character in a square one.
|
|
@@ -3943,6 +3929,13 @@ type Thumb = {
|
|
|
3943
3929
|
label?: string;
|
|
3944
3930
|
shape?: ThumbShape;
|
|
3945
3931
|
bounds?: [number, number] | ((ctx: BoundsCtx) => [number, number]);
|
|
3932
|
+
/**
|
|
3933
|
+
* Spoken form of `value`, published as `aria-valuetext`. Required by ARIA
|
|
3934
|
+
* whenever `value` is not the quantity the user is choosing — an index into
|
|
3935
|
+
* a value list, a log-scaled position — since `aria-valuenow` alone then
|
|
3936
|
+
* announces a number that means nothing.
|
|
3937
|
+
*/
|
|
3938
|
+
valueText?: string;
|
|
3946
3939
|
};
|
|
3947
3940
|
/**
|
|
3948
3941
|
* Passed to a thumb's `bounds` function: the full thumb list and this thumb's
|
|
@@ -3968,7 +3961,13 @@ type TrackCtx = {
|
|
|
3968
3961
|
*
|
|
3969
3962
|
* `stops` are attractors: a drag that passes within a few pixels of one lands
|
|
3970
3963
|
* on it, and the arrow keys move stop to stop. `step` still quantizes the
|
|
3971
|
-
* values between them.
|
|
3964
|
+
* values between them. Each one is drawn on the track as a mark; pass
|
|
3965
|
+
* `showStops: false` for a track whose own paint already reads as the stops.
|
|
3966
|
+
*
|
|
3967
|
+
* `trackClick: 'move-nearest'` makes a press on bare track send the closest
|
|
3968
|
+
* thumb there and continue as a drag. It is off by default because on a
|
|
3969
|
+
* multi-thumb editor a stray click would yank a stop the user was not aiming
|
|
3970
|
+
* at; `onAddThumb`, where it is set, keeps the track press.
|
|
3972
3971
|
*
|
|
3973
3972
|
* `constraint: 'ordered'` keeps thumbs from crossing each other. Supplying
|
|
3974
3973
|
* `onAddThumb` makes a click on empty track create a thumb, and supplying
|
|
@@ -3984,6 +3983,8 @@ type SliderProps<T extends Thumb = Thumb> = {
|
|
|
3984
3983
|
max: number;
|
|
3985
3984
|
step?: number;
|
|
3986
3985
|
stops?: number[];
|
|
3986
|
+
showStops?: boolean;
|
|
3987
|
+
trackClick?: 'none' | 'move-nearest';
|
|
3987
3988
|
constraint?: 'free' | 'ordered';
|
|
3988
3989
|
onAddThumb?: (atValue: number) => T | null;
|
|
3989
3990
|
onRemoveThumb?: (index: number) => boolean;
|
|
@@ -4671,8 +4672,8 @@ type RangeSliderProps = Omit<SliderProps$1, 'children' | 'className'> & {
|
|
|
4671
4672
|
};
|
|
4672
4673
|
/**
|
|
4673
4674
|
* Linear range slider on React Aria. Single-value by default; pass an array
|
|
4674
|
-
* to `value` / `defaultValue` for multi-thumb. Distinct from
|
|
4675
|
-
*
|
|
4675
|
+
* to `value` / `defaultValue` for multi-thumb. Distinct from `Slider`, which
|
|
4676
|
+
* is fully controlled and gives each thumb its own bounds and readout.
|
|
4676
4677
|
*/
|
|
4677
4678
|
declare function RangeSlider(props: RangeSliderProps): react_jsx_runtime.JSX.Element;
|
|
4678
4679
|
|
|
@@ -4704,6 +4705,65 @@ type DialogProps = Omit<ModalOverlayProps, 'children' | 'className'> & {
|
|
|
4704
4705
|
*/
|
|
4705
4706
|
declare function Dialog(props: DialogProps): react_jsx_runtime.JSX.Element;
|
|
4706
4707
|
|
|
4708
|
+
/** Accent color of a {@link Callout}'s border and arrow. */
|
|
4709
|
+
type CalloutTone = 'info' | 'warning' | 'danger';
|
|
4710
|
+
|
|
4711
|
+
/** Props for {@link Callout}, on top of React Aria's `Popover` props. */
|
|
4712
|
+
type CalloutProps = Omit<PopoverProps, 'children' | 'className' | 'isNonModal' | 'triggerRef'> & {
|
|
4713
|
+
children?: ReactNode;
|
|
4714
|
+
className?: string;
|
|
4715
|
+
/** Optional heading rendered above the body. */
|
|
4716
|
+
title?: ReactNode;
|
|
4717
|
+
/** Footer slot — typically action buttons. */
|
|
4718
|
+
footer?: ReactNode;
|
|
4719
|
+
/** Accent tone for border + arrow. Default `info`. */
|
|
4720
|
+
tone?: CalloutTone;
|
|
4721
|
+
/**
|
|
4722
|
+
* `true` — blocks interaction with the rest of the app until dismissed;
|
|
4723
|
+
* inner dialog is `role="alertdialog"`. `false` (default) — non-blocking:
|
|
4724
|
+
* the app stays interactive; Esc / outside click / close button dismiss.
|
|
4725
|
+
*/
|
|
4726
|
+
modal?: boolean;
|
|
4727
|
+
/**
|
|
4728
|
+
* Show the × button. Defaults to `!modal`. In programmatic
|
|
4729
|
+
* `triggerRef`/`anchorRect` modes the close button needs controlled open
|
|
4730
|
+
* (`isOpen` + `onOpenChange`); with only `defaultOpen` it has no open-state
|
|
4731
|
+
* setter to call and cannot close.
|
|
4732
|
+
*/
|
|
4733
|
+
showCloseButton?: boolean;
|
|
4734
|
+
/**
|
|
4735
|
+
* The user asked for this callout to go away — the × button or Escape.
|
|
4736
|
+
*
|
|
4737
|
+
* Distinct from `onOpenChange`, which a non-modal popover *also* fires when
|
|
4738
|
+
* interaction or focus merely leaves it. On a canvas that's every click on
|
|
4739
|
+
* the artwork, so a consumer that pins `isOpen` and treats `onOpenChange`
|
|
4740
|
+
* as dismissal retires messages nobody read. Use this instead: it fires
|
|
4741
|
+
* only on a deliberate act, and never on incidental focus loss.
|
|
4742
|
+
*/
|
|
4743
|
+
onDismiss?: () => void;
|
|
4744
|
+
/** Anchor to an arbitrary element (programmatic use, with `isOpen`). */
|
|
4745
|
+
triggerRef?: RefObject<Element | null>;
|
|
4746
|
+
/**
|
|
4747
|
+
* Anchor to a client-coordinate rect — e.g. a scene node's on-screen box.
|
|
4748
|
+
* The callout re-anchors whenever this rect changes, so a consumer that
|
|
4749
|
+
* recomputes it on pan, zoom, or scene edits keeps the arrow on its target.
|
|
4750
|
+
* Takes precedence over `triggerRef`.
|
|
4751
|
+
*/
|
|
4752
|
+
anchorRect?: {
|
|
4753
|
+
x: number;
|
|
4754
|
+
y: number;
|
|
4755
|
+
width: number;
|
|
4756
|
+
height: number;
|
|
4757
|
+
};
|
|
4758
|
+
};
|
|
4759
|
+
/**
|
|
4760
|
+
* Anchored callout with an arrow pointing at its source — a trigger
|
|
4761
|
+
* element, an arbitrary `triggerRef`, or a client-space `anchorRect`.
|
|
4762
|
+
* Wraps React Aria Popover + Dialog; positioning, collision flipping,
|
|
4763
|
+
* dismissal, and focus behavior come from the underlying primitives.
|
|
4764
|
+
*/
|
|
4765
|
+
declare function Callout(props: CalloutProps): react_jsx_runtime.JSX.Element;
|
|
4766
|
+
|
|
4707
4767
|
/**
|
|
4708
4768
|
* Coordinate transforms (model ↔ plot) for Plot2D. Pure / deterministic —
|
|
4709
4769
|
* no DOM, no React, no state.
|
|
@@ -5131,5 +5191,5 @@ declare const MINUS_SIGN = "\u2212";
|
|
|
5131
5191
|
*/
|
|
5132
5192
|
declare function formatNumber(value: number, options?: Intl.NumberFormatOptions): string;
|
|
5133
5193
|
|
|
5134
|
-
export { ActionBar, ActionsBar, Badge, Button, Checkbox, ComboBox, ComboBoxItem, CurveEditor, DataGrid, Dialog, EDGE_PROFILES, Field, Input, KeyCap, KeySequence, MINUS_SIGN, NumberField, OptionsBar, Plot2D, PointPlotter, Powerline, ToolPrefGroup as PrefGroup, ToolPrefLeaf as PrefLeaf, Radio, RadioGroup, RangeSlider, Select, SelectItem, Sidebar, SidebarPanel, Slider, Switch, Tab, TabList, TabPanel, Tabs, ToggleBar, ToolButton, ToolGroup, ToolPalette, chromaAt, detectPlatform, dlog, fieldClasses, formatNumber, formatShortcut, formatShortcutParts, inferKeycapKind, isDebugEnabled, isPrefLeaf, keyGlyph, keySpecFromKey, keySpecsFromMods, oklchToHex, paintGradientTrack, prefValueAtPath, useReorderDragList, useRovingTabIndex, visiblePrefSubtree };
|
|
5135
|
-
export type { ActionBarProps, ActionsBarItem, ActionsBarProps, ActionsBarSize, ActionsBarVariant, AddPointMode, AnchorRenderProps, AxesSettings, BadgeProps, BadgeShape, BadgeSize, BadgeTone, BadgeVariant, BoundsCtx, BuiltInEdgeName, ButtonProps, ButtonSize, ButtonVariant, CheckboxProps, ChromaCurve, ChromaCurvePoint, ComboBoxItemProps, ComboBoxOption, ComboBoxProps, ControlPoint, CurveDomain, CurveEditorProps, DataGridColumn, DataGridProps, DialogProps, EdgeCap, EdgeProfile, EndpointMode, FieldOrientation, FieldProps, FillSettings, GradientTrackOpts, GridSettings, InputProps, InterpolationMode, KeyCapProps, KeyCapVariant, KeySequenceProps, KeySpec, KeycapKind, LayerListItem, LogicalMod, LogicalModSpec, NumberFieldProps, OptionsBarItem, OptionsBarProps, OptionsBarSize, OptionsBarVariant, Platform, Plot2DCoords, Plot2DHandle, Plot2DProps, PointPlotterProps, PowerlineProps, PowerlineSegment, RadioGroupProps, RadioProps, RangeSliderProps, ReorderDragHandlers, ReorderDragState, RovingItem, RovingTabIndex, SelectItemProps, SelectOption, SelectProps, SidebarPanelProps, SidebarProps, SliderProps, SwitchProps, TabListProps, TabPanelProps, TabProps, TabsProps, Thumb, ThumbRenderCtx, ThumbShape, ToggleBarItem, ToggleBarProps, ToggleBarSize, ToggleBarVariant, ToolButtonProps, ToolGroupProps, ToolPaletteProps, TrackCtx, UseReorderDragListOptions, UseRovingTabIndexOptions };
|
|
5194
|
+
export { ActionBar, ActionsBar, Badge, Button, Callout, Checkbox, ComboBox, ComboBoxItem, CurveEditor, DataGrid, Dialog, DragHandleGlyph, EDGE_PROFILES, Field, Input, KeyCap, KeySequence, MINUS_SIGN, NumberField, OptionsBar, Plot2D, PointPlotter, Powerline, ToolPrefGroup as PrefGroup, ToolPrefLeaf as PrefLeaf, Radio, RadioGroup, RangeSlider, Select, SelectItem, Sidebar, SidebarPanel, Slider, Switch, Tab, TabList, TabPanel, Tabs, ToggleBar, ToolButton, ToolGroup, ToolPalette, chromaAt, detectPlatform, dlog, fieldClasses, formatNumber, formatShortcut, formatShortcutParts, inferKeycapKind, isDebugEnabled, isPrefLeaf, keyGlyph, keySpecFromKey, keySpecsFromMods, oklchToHex, paintGradientTrack, prefValueAtPath, useReorderDragList, useRovingTabIndex, visiblePrefSubtree };
|
|
5195
|
+
export type { ActionBarProps, ActionsBarItem, ActionsBarProps, ActionsBarSize, ActionsBarVariant, AddPointMode, AnchorRenderProps, AxesSettings, BadgeProps, BadgeShape, BadgeSize, BadgeTone, BadgeVariant, BoundsCtx, BuiltInEdgeName, ButtonProps, ButtonSize, ButtonVariant, CalloutProps, CheckboxProps, ChromaCurve, ChromaCurvePoint, ComboBoxItemProps, ComboBoxOption, ComboBoxProps, ControlPoint, CurveDomain, CurveEditorProps, DataGridColumn, DataGridProps, DialogProps, DragHandleGlyphProps, EdgeCap, EdgeProfile, EndpointMode, FieldOrientation, FieldProps, FillSettings, GradientTrackOpts, GridSettings, InputProps, InterpolationMode, KeyCapProps, KeyCapVariant, KeySequenceProps, KeySpec, KeycapKind, LayerListItem, LogicalMod, LogicalModSpec, NumberFieldProps, OptionsBarItem, OptionsBarProps, OptionsBarSize, OptionsBarVariant, Platform, Plot2DCoords, Plot2DHandle, Plot2DProps, PointPlotterProps, PowerlineProps, PowerlineSegment, RadioGroupProps, RadioProps, RangeSliderProps, ReorderDragHandlers, ReorderDragState, RovingItem, RovingTabIndex, SelectItemProps, SelectOption, SelectProps, SidebarPanelProps, SidebarProps, SliderProps, SwitchProps, TabListProps, TabPanelProps, TabProps, TabsProps, Thumb, ThumbRenderCtx, ThumbShape, ToggleBarItem, ToggleBarProps, ToggleBarSize, ToggleBarVariant, ToolButtonProps, ToolGroupProps, ToolPaletteProps, TrackCtx, UseReorderDragListOptions, UseRovingTabIndexOptions };
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import '../chunk-SBXNQW4G.js';
|
|
2
|
+
export { m as ActionBar, r4 as ActionsBar, It as Badge, a3 as Button, h2 as Callout, c5 as CalloutTrigger, o as Checkbox, p3 as ComboBox, m3 as ComboBoxItem, F as CurveEditor, s as DataGrid, c as Dialog, n2 as DragHandleGlyph, Je as EDGE_PROFILES, n as Field, u as Input, s2 as KeyCap, c2 as KeySequence, c3 as LayerStack, e2 as MINUS_SIGN, f as NumberField, r3 as OptionsBar, f2 as Plot2D, n5 as PointPlotter, r5 as Powerline, u2 as Radio, l as RadioGroup, l2 as RangeSlider, p as Select, h as SelectItem, n3 as Sidebar, s3 as SidebarPanel, _2 as Slider, a2 as Switch, c4 as Tab, s4 as TabList, l3 as TabPanel, o4 as Tabs, r2 as ToggleBar, o3 as ToolButton, n4 as ToolGroup, _4 as ToolPalette, In as chromaAt, u3 as detectPlatform, a as dlog, r as fieldClasses, t as formatNumber, d2 as formatShortcut, u4 as formatShortcutParts, o2 as inferKeycapKind, i as isDebugEnabled, b2 as isPrefLeaf, e as keyGlyph, p2 as keySpecFromKey, d as keySpecsFromMods, Fn as oklchToHex, v2 as paintGradientTrack, x2 as prefValueAtPath, i2 as useReorderDragList, a4 as useRovingTabIndex, S as visiblePrefSubtree } from '../chunk-HEORBLVT.js';
|
|
3
|
+
import '../chunk-ROQDRXKW.js';
|
|
3
4
|
//# sourceMappingURL=weasel-ui.js.map
|
|
4
5
|
//# sourceMappingURL=weasel-ui.js.map
|
|
@@ -113,7 +113,7 @@ declare function Toolbar({ children, 'aria-label': ariaLabel }: ToolbarProps): r
|
|
|
113
113
|
declare namespace Toolbar {
|
|
114
114
|
var Title: ({ children }: TitleProps) => react_jsx_runtime.JSX.Element;
|
|
115
115
|
var Group: ({ children, end, "aria-label": ariaLabel }: ToolbarGroupProps) => react_jsx_runtime.JSX.Element;
|
|
116
|
-
var Button: ({ children, onClick, disabled, title, "aria-label": ariaLabel, variant, iconOnly, }: ToolbarButtonProps) => react_jsx_runtime.JSX.Element;
|
|
116
|
+
var Button: ({ children, onClick, disabled, title, "aria-label": ariaLabel, variant, iconOnly, pressed, }: ToolbarButtonProps) => react_jsx_runtime.JSX.Element;
|
|
117
117
|
var Spacer: () => react_jsx_runtime.JSX.Element;
|
|
118
118
|
}
|
|
119
119
|
interface TitleProps {
|
|
@@ -138,6 +138,8 @@ interface ToolbarButtonProps {
|
|
|
138
138
|
variant?: 'default' | 'danger';
|
|
139
139
|
/** Square, for a button whose whole content is one glyph. */
|
|
140
140
|
iconOnly?: boolean;
|
|
141
|
+
/** Makes this a toggle: `aria-pressed`, and held down while true. */
|
|
142
|
+
pressed?: boolean;
|
|
141
143
|
}
|
|
142
144
|
|
|
143
145
|
/** Props for `<ZoomControl>`. */
|
package/dist/primitives/index.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
export { FloatingPanel, JobProgress, Legend, Sidebar } from '../chunk-
|
|
2
|
-
export { FpsMeter, ScaleIndicator, StatusBar, Toolbar, ZoomControl } from '../chunk-
|
|
3
|
-
import '../chunk-
|
|
4
|
-
import '../chunk-
|
|
5
|
-
import '../chunk-
|
|
1
|
+
export { FloatingPanel, JobProgress, Legend, Sidebar } from '../chunk-3P5TTTA7.js';
|
|
2
|
+
export { FpsMeter, ScaleIndicator, StatusBar, Toolbar, ZoomControl } from '../chunk-6JMU56CU.js';
|
|
3
|
+
import '../chunk-SBXNQW4G.js';
|
|
4
|
+
import '../chunk-HEORBLVT.js';
|
|
5
|
+
import '../chunk-CQLQPQ4P.js';
|
|
6
|
+
import '../chunk-ROQDRXKW.js';
|
|
6
7
|
//# sourceMappingURL=index.js.map
|
|
7
8
|
//# sourceMappingURL=index.js.map
|
package/dist/state/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { C as CURRENT_DOCUMENT_VERSION, L as LabStore, a as LabStoreActions, b as LabStoreContext, c as LabStoreProvider, T as TrialIdContext, d as TrialIdProvider, e as createLabStore, 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-
|
|
2
|
-
import { S as SerializedTrial, I as InstrumentSerializers, T as TrialRecord, U as UndoStack, a as StorageAdapter } from '../_dts/types-
|
|
3
|
-
export { C as CreateLabStoreOptions, L as LabDocument, b as LabStoreState, M as Migration, c as SavedSnapshot, d as TrialStateHandle } from '../_dts/types-
|
|
1
|
+
export { C as CURRENT_DOCUMENT_VERSION, L as LabStore, a as LabStoreActions, b as LabStoreContext, c as LabStoreProvider, T as TrialIdContext, d as TrialIdProvider, e as createLabStore, 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-gmMvZqPc.js';
|
|
2
|
+
import { S as SerializedTrial, I as InstrumentSerializers, T as TrialRecord, U as UndoStack, a as StorageAdapter } from '../_dts/types-DYMaEvM5.js';
|
|
3
|
+
export { C as CreateLabStoreOptions, L as LabDocument, b as LabStoreState, M as Migration, c as SavedSnapshot, d as TrialStateHandle, e as UndockedPanel, f as UndockedPanels, g as dockPanel, p as panelKey, u as undockPanel } from '../_dts/types-DYMaEvM5.js';
|
|
4
4
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
5
5
|
import { ReactNode } from 'react';
|
|
6
6
|
import 'zustand/vanilla';
|
package/dist/state/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { createLabStore, LabStoreProvider, TrialIdProvider } from '../chunk-
|
|
2
|
-
export { CURRENT_DOCUMENT_VERSION, LabStoreContext, LabStoreProvider, TrialIdContext, TrialIdProvider, createLabStore, createMemoryAdapter, decodeUrlHash, deserializeTrials, emptyUndoStack, encodeUrlHash, labDocumentKey, labStorageKey, localStorageAdapter, noneAdapter, quarantineKey, serializeTrials, sessionStorageAdapter, urlHashAdapter, useLabStore, useTrialId, useTrialState } from '../chunk-
|
|
1
|
+
import { createLabStore, LabStoreProvider, TrialIdProvider } from '../chunk-XJ6N32QP.js';
|
|
2
|
+
export { CURRENT_DOCUMENT_VERSION, LabStoreContext, LabStoreProvider, TrialIdContext, TrialIdProvider, createLabStore, createMemoryAdapter, decodeUrlHash, deserializeTrials, dockPanel, emptyUndoStack, encodeUrlHash, labDocumentKey, labStorageKey, localStorageAdapter, noneAdapter, panelKey, quarantineKey, serializeTrials, sessionStorageAdapter, undockPanel, urlHashAdapter, useLabStore, useTrialId, useTrialState } from '../chunk-XJ6N32QP.js';
|
|
3
3
|
import { useRef } from 'react';
|
|
4
4
|
import { jsx } from 'react/jsx-runtime';
|
|
5
5
|
|