@weasel-js/labkit 1.4.2 → 1.4.3
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 +20 -2
- package/dist/_dts/{CanvasStackContext-kjILVnPj.d.ts → CanvasStackContext-Dde8_1my.d.ts} +1 -1
- package/dist/_dts/{PrefsForm.d-CgxUequc.d.ts → PrefsForm.d-DDHFANkc.d.ts} +1 -1
- package/dist/_dts/{frac-A4R6v4ld.d.ts → frac-B5mB8LsJ.d.ts} +7 -4
- package/dist/_dts/{index-CsU9WhjM.d.ts → index-DelFfeV0.d.ts} +15 -7
- package/dist/_dts/types-B9_zrHmb.d.ts +166 -0
- package/dist/_dts/{types-BbXpvQa8.d.ts → types-BP2OCcpg.d.ts} +21 -3
- package/dist/_dts/types-x92Kfeme.d.ts +62 -0
- package/dist/_dts/{useTrialState-DKjqpv20.d.ts → useTrialState-D6Vb3T-g.d.ts} +7 -7
- package/dist/canvas/index.d.ts +9 -8
- package/dist/canvas/index.js +1 -2
- package/dist/chrome/index.d.ts +7 -6
- package/dist/chrome/index.js +5 -5
- package/dist/{chunk-UTOEDPNU.js → chunk-2RQPGOQF.js} +7 -6
- package/dist/chunk-2RQPGOQF.js.map +1 -0
- package/dist/{chunk-ULDW42CR.js → chunk-5TROQVQ2.js} +25 -21
- package/dist/chunk-5TROQVQ2.js.map +1 -0
- package/dist/{chunk-XKENZTNE.js → chunk-ASWKLRKJ.js} +65 -49
- package/dist/chunk-ASWKLRKJ.js.map +1 -0
- package/dist/{chunk-W2FJR5FF.js → chunk-C42T6DJT.js} +74 -76
- package/dist/chunk-C42T6DJT.js.map +1 -0
- package/dist/chunk-E44SU6XS.js +50 -0
- package/dist/chunk-E44SU6XS.js.map +1 -0
- package/dist/{chunk-WS6ZRV75.js → chunk-FQMJUVHJ.js} +3 -3
- package/dist/{chunk-WS6ZRV75.js.map → chunk-FQMJUVHJ.js.map} +1 -1
- package/dist/{chunk-FJG4PHTL.js → chunk-I6JCVE24.js} +3 -3
- package/dist/chunk-I6JCVE24.js.map +1 -0
- package/dist/{chunk-NSOVI3AZ.js → chunk-ISCOFAUO.js} +6 -6
- package/dist/{chunk-NSOVI3AZ.js.map → chunk-ISCOFAUO.js.map} +1 -1
- package/dist/chunk-MHAGC6VD.js +7320 -0
- package/dist/chunk-MHAGC6VD.js.map +1 -0
- package/dist/{chunk-UDXOYZEC.js → chunk-QAGAHJKZ.js} +4 -4
- package/dist/{chunk-UDXOYZEC.js.map → chunk-QAGAHJKZ.js.map} +1 -1
- package/dist/{chunk-TN7YSJVU.js → chunk-RS3HRQWU.js} +3 -3
- package/dist/{chunk-TN7YSJVU.js.map → chunk-RS3HRQWU.js.map} +1 -1
- package/dist/{chunk-D5KQ5OY6.js → chunk-TJ7QY3OC.js} +3 -3
- package/dist/{chunk-D5KQ5OY6.js.map → chunk-TJ7QY3OC.js.map} +1 -1
- package/dist/controls/index.d.ts +5 -4
- package/dist/controls/index.js +3 -3
- package/dist/dragdrop/index.d.ts +6 -5
- package/dist/dragdrop/index.js +1 -2
- package/dist/index.d.ts +90 -23
- package/dist/index.js +199 -117
- package/dist/index.js.map +1 -1
- package/dist/layers/index.d.ts +7 -6
- package/dist/layers/index.js +2 -3
- package/dist/loupe/index.d.ts +8 -7
- package/dist/loupe/index.js +1 -2
- package/dist/passthrough/weasel-canvas.d.ts +1 -3
- package/dist/passthrough/weasel-canvas.js +1 -1
- package/dist/passthrough/weasel-canvas.js.map +1 -1
- package/dist/passthrough/weasel-ui.d.ts +88 -20
- package/dist/passthrough/weasel-ui.js +1 -2
- package/dist/primitives/index.js +3 -4
- package/dist/state/index.d.ts +6 -3
- package/dist/state/index.js +3 -2
- package/dist/state/index.js.map +1 -1
- package/dist/styles.css +2 -2
- package/dist/surface/index.js +1 -2
- package/dist/ui/layers/index.js +1 -2
- package/dist/undo/index.d.ts +6 -6
- package/package.json +7 -7
- package/src/annotations/ExportMenu.test.tsx +16 -0
- package/src/annotations/ExportMenu.tsx +0 -5
- package/src/config/builder.test.ts +56 -2
- package/src/config/builder.ts +73 -13
- package/src/config/index.ts +16 -1
- package/src/config/path.test.ts +109 -0
- package/src/config/path.ts +76 -0
- package/src/config/resolve.test.ts +93 -2
- package/src/config/resolve.ts +72 -29
- package/src/config/types.ts +99 -9
- package/src/config/visible.ts +6 -4
- package/src/controls/ControlPanel.stories.tsx +38 -4
- package/src/controls/ControlPanel.test.tsx +114 -0
- package/src/controls/ControlPanel.tsx +99 -50
- package/src/index.ts +16 -1
- package/src/instrument/serializers.ts +36 -0
- package/src/instrument/types.ts +4 -2
- package/src/lab/Lab.test.tsx +29 -1
- package/src/lab/Lab.tsx +10 -1
- package/src/lab/LabShell.test.tsx +8 -0
- package/src/lab/LabShell.tsx +3 -1
- package/src/primitives/ZoomControl.less +6 -2
- package/src/primitives/ZoomControl.tsx +1 -0
- package/src/state/helpers.ts +1 -1
- package/src/state/store.test.ts +155 -1
- package/src/state/store.ts +30 -24
- package/src/state/types.ts +24 -3
- package/src/state/useTrialState.ts +1 -1
- package/src/trial/Trial.config.test.tsx +44 -0
- package/src/trial/Trial.tsx +3 -3
- package/src/trial/TrialChrome.tsx +10 -5
- package/src/trial/trialOps.ts +4 -8
- package/dist/_dts/types-lg4TSCb2.d.ts +0 -164
- package/dist/_dts/weasel-canvas-FJTFi3ZZ.d.ts +0 -5041
- package/dist/chunk-54ZWZ5FQ.js +0 -29997
- package/dist/chunk-54ZWZ5FQ.js.map +0 -1
- package/dist/chunk-FJG4PHTL.js.map +0 -1
- package/dist/chunk-ISSVF5PT.js +0 -7263
- package/dist/chunk-ISSVF5PT.js.map +0 -1
- package/dist/chunk-ULDW42CR.js.map +0 -1
- package/dist/chunk-UTOEDPNU.js.map +0 -1
- package/dist/chunk-W2FJR5FF.js.map +0 -1
- package/dist/chunk-XKENZTNE.js.map +0 -1
package/dist/layers/index.d.ts
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import { E as LayerDescriptor } from '../_dts/frac-
|
|
2
|
-
export { B as LayerCapability } from '../_dts/frac-
|
|
1
|
+
import { E as LayerDescriptor } from '../_dts/frac-B5mB8LsJ.js';
|
|
2
|
+
export { B as LayerCapability } from '../_dts/frac-B5mB8LsJ.js';
|
|
3
3
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
4
4
|
import 'react';
|
|
5
|
-
import '../_dts/types-
|
|
6
|
-
import '
|
|
7
|
-
import '../_dts/PrefsForm.d-
|
|
8
|
-
import '../_dts/types-
|
|
5
|
+
import '../_dts/types-B9_zrHmb.js';
|
|
6
|
+
import '@weasel-js/core';
|
|
7
|
+
import '../_dts/PrefsForm.d-DDHFANkc.js';
|
|
8
|
+
import '../_dts/types-x92Kfeme.js';
|
|
9
|
+
import '../_dts/types-BP2OCcpg.js';
|
|
9
10
|
import '../_dts/types-DJ79Tg5J.js';
|
|
10
11
|
|
|
11
12
|
/** A layer that may itself contain layers. A plain `LayerDescriptor` is one
|
package/dist/layers/index.js
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
export { LayerList } from '../chunk-
|
|
1
|
+
export { LayerList } from '../chunk-ISCOFAUO.js';
|
|
2
2
|
import '../chunk-SBXNQW4G.js';
|
|
3
|
-
import '../chunk-
|
|
4
|
-
import '../chunk-54ZWZ5FQ.js';
|
|
3
|
+
import '../chunk-MHAGC6VD.js';
|
|
5
4
|
//# sourceMappingURL=index.js.map
|
|
6
5
|
//# sourceMappingURL=index.js.map
|
package/dist/loupe/index.d.ts
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import { ae as LoupePoint, af as LoupeMode, V as ViewTransform, W as WorldFrame, c as WorldSpec, a2 as ViewportSize, K as LoupeRenderArgs, N as ResolvedLoupe } from '../_dts/frac-
|
|
3
|
-
export { L as LOUPE_DEFAULTS, G as LoupeCapability, J as LoupeDeclaration, ab as resolveLoupe } from '../_dts/frac-
|
|
4
|
-
import { c as CanvasStackSurface, C as CanvasLayerDescriptor } from '../_dts/CanvasStackContext-
|
|
2
|
+
import { ae as LoupePoint, af as LoupeMode, V as ViewTransform, W as WorldFrame, c as WorldSpec, a2 as ViewportSize, K as LoupeRenderArgs, N as ResolvedLoupe } from '../_dts/frac-B5mB8LsJ.js';
|
|
3
|
+
export { L as LOUPE_DEFAULTS, G as LoupeCapability, J as LoupeDeclaration, ab as resolveLoupe } from '../_dts/frac-B5mB8LsJ.js';
|
|
4
|
+
import { c as CanvasStackSurface, C as CanvasLayerDescriptor } from '../_dts/CanvasStackContext-Dde8_1my.js';
|
|
5
5
|
import { RefObject, ReactNode } from 'react';
|
|
6
|
-
import '../_dts/types-
|
|
7
|
-
import '
|
|
8
|
-
import '../_dts/PrefsForm.d-
|
|
9
|
-
import '../_dts/types-
|
|
6
|
+
import '../_dts/types-B9_zrHmb.js';
|
|
7
|
+
import '@weasel-js/core';
|
|
8
|
+
import '../_dts/PrefsForm.d-DDHFANkc.js';
|
|
9
|
+
import '../_dts/types-x92Kfeme.js';
|
|
10
|
+
import '../_dts/types-BP2OCcpg.js';
|
|
10
11
|
import '../_dts/types-DJ79Tg5J.js';
|
|
11
12
|
|
|
12
13
|
/** Props for `<CanvasLoupe>`. */
|
package/dist/loupe/index.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
export { CanvasLoupe, DomLoupe, LOUPE_DEFAULTS, LoupeBubble, TrialLoupe, drawCanvasLens, lensCamera, lensSourceRect, resolveLoupe, sampleStack, useLoupe } from '../chunk-
|
|
1
|
+
export { CanvasLoupe, DomLoupe, LOUPE_DEFAULTS, LoupeBubble, TrialLoupe, drawCanvasLens, lensCamera, lensSourceRect, resolveLoupe, sampleStack, useLoupe } from '../chunk-TJ7QY3OC.js';
|
|
2
2
|
import '../chunk-CTRKTLYZ.js';
|
|
3
3
|
import '../chunk-2AYGEN57.js';
|
|
4
4
|
import '../chunk-CQLQPQ4P.js';
|
|
5
|
-
import '../chunk-54ZWZ5FQ.js';
|
|
6
5
|
//# sourceMappingURL=index.js.map
|
|
7
6
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,3 +1 @@
|
|
|
1
|
-
export {
|
|
2
|
-
import 'react';
|
|
3
|
-
import 'react/jsx-runtime';
|
|
1
|
+
export { ComputeFitViewOptions, FALLBACK_FIT_VIEW, IndicatorStyle, MinimapCanvas, MinimapCanvasProps, MinimapFit, SceneViewCanvas, SceneViewCanvasProps, SceneViewDrawOne, buildSceneViewCommands, computeFitView, computeIndicatorCommand, renderSceneToCanvas } from '@weasel-js/core';
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { FALLBACK_FIT_VIEW, MinimapCanvas, SceneViewCanvas, buildSceneViewCommands, computeFitView, computeIndicatorCommand, renderSceneToCanvas } from '
|
|
1
|
+
export { FALLBACK_FIT_VIEW, MinimapCanvas, SceneViewCanvas, buildSceneViewCommands, computeFitView, computeIndicatorCommand, renderSceneToCanvas } from '@weasel-js/core';
|
|
2
2
|
//# sourceMappingURL=weasel-canvas.js.map
|
|
3
3
|
//# sourceMappingURL=weasel-canvas.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":[],"names":[],"mappings":"","file":"weasel-canvas.js"}
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"weasel-canvas.js","sourcesContent":[]}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import {
|
|
3
|
-
export {
|
|
2
|
+
import { ToolPrefLeaf, ToolPrefGroup, ToolsApi } from '@weasel-js/core';
|
|
3
|
+
export { ToolPref as BuiltinPref, ToolPrefBoolean as PrefBoolean, ToolPrefBooleanControl as PrefBooleanControl, ToolPrefColor as PrefColor, ToolPrefCustom as PrefCustom, ToolPrefEnum as PrefEnum, ToolPrefEnumControl as PrefEnumControl, ToolPrefEnumEncoding as PrefEnumEncoding, ToolPrefGroup as PrefGroup, ToolPrefKind as PrefKind, ToolPrefLeaf as PrefLeaf, ToolPrefNumber as PrefNumber, ToolPrefNumberControl as PrefNumberControl, ToolPrefNumberUnit as PrefNumberUnit, ToolPrefObject as PrefObject, ToolPrefPaint as PrefPaint, ToolPrefString as PrefString, ToolPrefStringControl as PrefStringControl } from '@weasel-js/core';
|
|
4
4
|
import * as react from 'react';
|
|
5
5
|
import { ReactNode, CSSProperties, ButtonHTMLAttributes, ReactElement, KeyboardEvent, RefObject, PointerEvent, RefCallback } from 'react';
|
|
6
6
|
export { LayerStack, LayerStackItem, LayerStackProps } from '../ui/layers/index.js';
|
|
7
|
-
export { a as PrefRenderContext, P as PrefRenderer } from '../_dts/PrefsForm.d-
|
|
7
|
+
export { a as PrefRenderContext, P as PrefRenderer } from '../_dts/PrefsForm.d-DDHFANkc.js';
|
|
8
8
|
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';
|
|
9
9
|
export { DialogTrigger as CalloutTrigger } from 'react-aria-components';
|
|
10
10
|
|
|
@@ -136,18 +136,6 @@ declare function Icon({ name, className, size, label }: IconProps & {
|
|
|
136
136
|
name: IconName;
|
|
137
137
|
}): react_jsx_runtime.JSX.Element;
|
|
138
138
|
|
|
139
|
-
/** Holds the set of available modes and which one is active, and notifies
|
|
140
|
-
* subscribers when that changes. `getVersion` is a monotonic counter for
|
|
141
|
-
* render-cache invalidation. Unknown mode ids throw rather than being
|
|
142
|
-
* ignored. */
|
|
143
|
-
interface ModeRegistry {
|
|
144
|
-
current(): ModeDefinition;
|
|
145
|
-
setMode(id: string): void;
|
|
146
|
-
byId(id: string): ModeDefinition;
|
|
147
|
-
getVersion(): number;
|
|
148
|
-
subscribe(listener: () => void): () => void;
|
|
149
|
-
}
|
|
150
|
-
|
|
151
139
|
/** Props for {@link ActionBar}. */
|
|
152
140
|
interface ActionBarProps {
|
|
153
141
|
/** Group key — only actions with `action.group === group` are rendered. */
|
|
@@ -1649,6 +1637,67 @@ interface ToolGroupProps {
|
|
|
1649
1637
|
*/
|
|
1650
1638
|
declare function ToolGroup(props: ToolGroupProps): react_jsx_runtime.JSX.Element;
|
|
1651
1639
|
|
|
1640
|
+
/** The full vocabulary of capability tags shipped in the default preset.
|
|
1641
|
+
* Apps and other consumers can add their own tags; this list is what
|
|
1642
|
+
* `weasel-modes` itself uses. */
|
|
1643
|
+
declare const ALL_TAGS: readonly ["navigation", "creates-selection", "creates-paths", "creates-shapes", "creates-text", "edits-anchors", "edits-text", "transforms-selection", "samples-color", "applies-fill", "edits-page"];
|
|
1644
|
+
/** One capability a tool or contribution declares, and a mode allows. Any
|
|
1645
|
+
* string is accepted so apps can add tags of their own; `ALL_TAGS` is the
|
|
1646
|
+
* set this package ships. */
|
|
1647
|
+
type CapabilityTag = (typeof ALL_TAGS)[number] | (string & {});
|
|
1648
|
+
|
|
1649
|
+
/** How a mode tints the workspace — the area around the page — so the user
|
|
1650
|
+
* can see at a glance which mode is active. */
|
|
1651
|
+
interface WorkspaceVisual {
|
|
1652
|
+
tint?: string;
|
|
1653
|
+
gradient?: 'top-down' | 'bottom-up';
|
|
1654
|
+
intensity?: number;
|
|
1655
|
+
}
|
|
1656
|
+
/**
|
|
1657
|
+
* A mode: an app-level editing context that narrows which tools are usable and
|
|
1658
|
+
* how the workspace looks. Tools live inside modes; a tool is never "in" one.
|
|
1659
|
+
*
|
|
1660
|
+
* `kind` picks the lifecycle. A `soft` mode (path-edit, isolation, text-edit)
|
|
1661
|
+
* is a scoped context with no commit ceremony — every edit inside it is
|
|
1662
|
+
* independently undoable and `exit` is non-destructive. A `strict` mode
|
|
1663
|
+
* (free-transform, crop) is a transaction: the whole session collapses to one
|
|
1664
|
+
* undoable step and leaving requires an explicit `commit` or `cancel`.
|
|
1665
|
+
*/
|
|
1666
|
+
interface ModeDefinition {
|
|
1667
|
+
id: string;
|
|
1668
|
+
kind: 'soft' | 'strict';
|
|
1669
|
+
/** Capability tags this mode allows beyond IMPLICIT_TAGS. */
|
|
1670
|
+
allows: CapabilityTag[];
|
|
1671
|
+
/** When true, out-of-target objects dim at the renderer layer. */
|
|
1672
|
+
scoping: boolean;
|
|
1673
|
+
workspace?: WorkspaceVisual;
|
|
1674
|
+
entry?: {
|
|
1675
|
+
shortcut?: string;
|
|
1676
|
+
trigger?: 'double-click-target';
|
|
1677
|
+
};
|
|
1678
|
+
exit?: {
|
|
1679
|
+
shortcut?: string;
|
|
1680
|
+
};
|
|
1681
|
+
commit?: {
|
|
1682
|
+
shortcut?: string;
|
|
1683
|
+
};
|
|
1684
|
+
cancel?: {
|
|
1685
|
+
shortcut?: string;
|
|
1686
|
+
};
|
|
1687
|
+
}
|
|
1688
|
+
|
|
1689
|
+
/** Holds the set of available modes and which one is active, and notifies
|
|
1690
|
+
* subscribers when that changes. `getVersion` is a monotonic counter for
|
|
1691
|
+
* render-cache invalidation. Unknown mode ids throw rather than being
|
|
1692
|
+
* ignored. */
|
|
1693
|
+
interface ModeRegistry {
|
|
1694
|
+
current(): ModeDefinition;
|
|
1695
|
+
setMode(id: string): void;
|
|
1696
|
+
byId(id: string): ModeDefinition;
|
|
1697
|
+
getVersion(): number;
|
|
1698
|
+
subscribe(listener: () => void): () => void;
|
|
1699
|
+
}
|
|
1700
|
+
|
|
1652
1701
|
interface ShortcutInput {
|
|
1653
1702
|
key: string | readonly string[];
|
|
1654
1703
|
mod?: boolean;
|
|
@@ -1899,6 +1948,19 @@ declare const NumberField: react.ForwardRefExoticComponent<Omit<NumberFieldProps
|
|
|
1899
1948
|
className?: string;
|
|
1900
1949
|
} & react.RefAttributes<HTMLInputElement>>;
|
|
1901
1950
|
|
|
1951
|
+
/** The `portalContainer` prop every weasel overlay accepts. */
|
|
1952
|
+
interface OverlayPortalProps {
|
|
1953
|
+
/**
|
|
1954
|
+
* Where the overlay's portal mounts. Defaults to the nearest ancestor of
|
|
1955
|
+
* the overlay's own position that carries a weasel theme, so the overlay
|
|
1956
|
+
* resolves the same `--wzl-*` tokens as the control it belongs to. Pass
|
|
1957
|
+
* `null` for `document.body`.
|
|
1958
|
+
*/
|
|
1959
|
+
portalContainer?: Element | null;
|
|
1960
|
+
}
|
|
1961
|
+
/** React Aria props minus the portal key a weasel overlay owns. */
|
|
1962
|
+
type WithoutPortalTarget<T> = Omit<T, 'UNSTABLE_portalContainer'>;
|
|
1963
|
+
|
|
1902
1964
|
/** One option in a {@link Select}'s `options` list. */
|
|
1903
1965
|
type SelectOption = {
|
|
1904
1966
|
value: string;
|
|
@@ -1937,7 +1999,7 @@ type SelectProps<T extends Key$1 = string> = Omit<SelectProps$1<object>, 'childr
|
|
|
1937
1999
|
*/
|
|
1938
2000
|
width?: 'fill' | 'fit';
|
|
1939
2001
|
className?: string;
|
|
1940
|
-
};
|
|
2002
|
+
} & OverlayPortalProps;
|
|
1941
2003
|
/**
|
|
1942
2004
|
* Form select wrapping React Aria's Select. Pass either `options` for a
|
|
1943
2005
|
* quick declarative render or `children` of `<SelectItem>` for control over
|
|
@@ -1988,8 +2050,14 @@ type ComboBoxProps<T extends Key = string> = Omit<ComboBoxProps$1<object>, 'chil
|
|
|
1988
2050
|
defaultSelectedKey?: T;
|
|
1989
2051
|
onSelectionChange?: (key: T | null) => void;
|
|
1990
2052
|
emptyLabel?: ReactNode;
|
|
2053
|
+
/**
|
|
2054
|
+
* `'fill'` (the default) takes the width of whatever row the combo box sits
|
|
2055
|
+
* in. `'fit'` sizes the input to its widest option, so it neither swallows a
|
|
2056
|
+
* toolbar's slack nor cuts a selection off once one is made.
|
|
2057
|
+
*/
|
|
2058
|
+
width?: 'fill' | 'fit';
|
|
1991
2059
|
className?: string;
|
|
1992
|
-
};
|
|
2060
|
+
} & OverlayPortalProps;
|
|
1993
2061
|
/**
|
|
1994
2062
|
* Filterable single-select wrapping React Aria's ComboBox. The user can
|
|
1995
2063
|
* type to filter; selection commits to `onSelectionChange`. When no value
|
|
@@ -2021,7 +2089,7 @@ type RangeSliderProps = Omit<SliderProps$1, 'children' | 'className'> & {
|
|
|
2021
2089
|
declare function RangeSlider(props: RangeSliderProps): react_jsx_runtime.JSX.Element;
|
|
2022
2090
|
|
|
2023
2091
|
/** Props for {@link Dialog}, on top of React Aria's `ModalOverlay` props. */
|
|
2024
|
-
type DialogProps = Omit<ModalOverlayProps
|
|
2092
|
+
type DialogProps = Omit<WithoutPortalTarget<ModalOverlayProps>, 'children' | 'className'> & OverlayPortalProps & {
|
|
2025
2093
|
/** Heading rendered in the dialog's default header. Omit when supplying
|
|
2026
2094
|
* a custom `header` slot via children. */
|
|
2027
2095
|
title?: ReactNode;
|
|
@@ -2052,7 +2120,7 @@ declare function Dialog(props: DialogProps): react_jsx_runtime.JSX.Element;
|
|
|
2052
2120
|
type CalloutTone = 'info' | 'warning' | 'danger';
|
|
2053
2121
|
|
|
2054
2122
|
/** Props for {@link Callout}, on top of React Aria's `Popover` props. */
|
|
2055
|
-
type CalloutProps = Omit<PopoverProps
|
|
2123
|
+
type CalloutProps = Omit<WithoutPortalTarget<PopoverProps>, 'children' | 'className' | 'isNonModal' | 'triggerRef'> & OverlayPortalProps & {
|
|
2056
2124
|
children?: ReactNode;
|
|
2057
2125
|
className?: string;
|
|
2058
2126
|
/** Optional heading rendered above the body. */
|
|
@@ -2547,5 +2615,5 @@ declare const MINUS_SIGN = "\u2212";
|
|
|
2547
2615
|
*/
|
|
2548
2616
|
declare function formatNumber(value: number, options?: Intl.NumberFormatOptions): string;
|
|
2549
2617
|
|
|
2550
|
-
export { ActionBar, ActionsBar, Badge, Button, Callout, Checkbox, ComboBox, ComboBoxItem, CurveEditor, DataGrid, Dialog, Disclosure, DisclosureRow, DragHandleGlyph, EDGE_PROFILES, Field, ICON_PATHS, Icon, Input, KeyCap, KeySequence, MINUS_SIGN, NumberField, OptionsBar, Plot2D, PointPlotter, Powerline,
|
|
2618
|
+
export { ActionBar, ActionsBar, Badge, Button, Callout, Checkbox, ComboBox, ComboBoxItem, CurveEditor, DataGrid, Dialog, Disclosure, DisclosureRow, DragHandleGlyph, EDGE_PROFILES, Field, ICON_PATHS, Icon, Input, KeyCap, KeySequence, MINUS_SIGN, NumberField, OptionsBar, Plot2D, PointPlotter, Powerline, 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 };
|
|
2551
2619
|
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, DisclosureDirection, DisclosureProps, DisclosureRowProps, DragHandleGlyphProps, EdgeCap, EdgeProfile, EndpointMode, FieldOrientation, FieldProps, FillSettings, GradientTrackOpts, GridSettings, IconName, IconProps, 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,5 +1,4 @@
|
|
|
1
1
|
import '../chunk-SBXNQW4G.js';
|
|
2
|
-
export { m as ActionBar,
|
|
3
|
-
import '../chunk-54ZWZ5FQ.js';
|
|
2
|
+
export { m as ActionBar, r8 as ActionsBar, Lt as Badge, a3 as Button, g3 as Callout, l5 as CalloutTrigger, o as Checkbox, g2 as ComboBox, v3 as ComboBoxItem, L as CurveEditor, s2 as DataGrid, l3 as Dialog, r5 as Disclosure, i2 as DisclosureRow, n4 as DragHandleGlyph, Je as EDGE_PROFILES, n2 as Field, t as ICON_PATHS, r as Icon, u2 as Input, s3 as KeyCap, c2 as KeySequence, c3 as LayerStack, e2 as MINUS_SIGN, f2 as NumberField, r7 as OptionsBar, f3 as Plot2D, n7 as PointPlotter, r9 as Powerline, u3 as Radio, l as RadioGroup, l2 as RangeSlider, g as Select, b2 as SelectItem, n5 as Sidebar, s4 as SidebarPanel, y2 as Slider, a2 as Switch, c4 as Tab, s5 as TabList, l4 as TabPanel, o4 as Tabs, r6 as ToggleBar, o3 as ToolButton, n6 as ToolGroup, _2 as ToolPalette, Jn as chromaAt, u4 as detectPlatform, a as dlog, r3 as fieldClasses, t3 as formatNumber, d2 as formatShortcut, u5 as formatShortcutParts, o2 as inferKeycapKind, i as isDebugEnabled, t2 as isPrefLeaf, e as keyGlyph, p2 as keySpecFromKey, d as keySpecsFromMods, qn as oklchToHex, v2 as paintGradientTrack, n3 as prefValueAtPath, s as useReorderDragList, a4 as useRovingTabIndex, r4 as visiblePrefSubtree } from '../chunk-MHAGC6VD.js';
|
|
4
3
|
//# sourceMappingURL=weasel-ui.js.map
|
|
5
4
|
//# sourceMappingURL=weasel-ui.js.map
|
package/dist/primitives/index.js
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
export { FloatingPanel, JobProgress, Legend, Sidebar } from '../chunk-
|
|
2
|
-
export { FpsMeter, ScaleIndicator, StatusBar, Toolbar, ZoomControl } from '../chunk-
|
|
1
|
+
export { FloatingPanel, JobProgress, Legend, Sidebar } from '../chunk-QAGAHJKZ.js';
|
|
2
|
+
export { FpsMeter, ScaleIndicator, StatusBar, Toolbar, ZoomControl } from '../chunk-2RQPGOQF.js';
|
|
3
3
|
import '../chunk-SBXNQW4G.js';
|
|
4
|
-
import '../chunk-
|
|
4
|
+
import '../chunk-MHAGC6VD.js';
|
|
5
5
|
import '../chunk-CQLQPQ4P.js';
|
|
6
|
-
import '../chunk-54ZWZ5FQ.js';
|
|
7
6
|
//# sourceMappingURL=index.js.map
|
|
8
7
|
//# sourceMappingURL=index.js.map
|
package/dist/state/index.d.ts
CHANGED
|
@@ -1,9 +1,12 @@
|
|
|
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, e as UndockedPanel, f as UndockedPanels, g as dockPanel, p as panelKey, u as undockPanel } 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-D6Vb3T-g.js';
|
|
2
|
+
import { S as SerializedTrial, I as InstrumentSerializers, T as TrialRecord, U as UndoStack, a as StorageAdapter } from '../_dts/types-BP2OCcpg.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-BP2OCcpg.js';
|
|
4
4
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
5
5
|
import { ReactNode } from 'react';
|
|
6
6
|
import 'zustand/vanilla';
|
|
7
|
+
import '../_dts/types-B9_zrHmb.js';
|
|
8
|
+
import '@weasel-js/core';
|
|
9
|
+
import '../_dts/PrefsForm.d-DDHFANkc.js';
|
|
7
10
|
|
|
8
11
|
/** The storage key a lab writes one of its buckets under. Namespaced by
|
|
9
12
|
* `storageKey` so two labs sharing an origin do not collide. */
|
package/dist/state/index.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { createLabStore } from '../chunk-
|
|
2
|
-
export { CURRENT_DOCUMENT_VERSION, createLabStore, createMemoryAdapter, decodeUrlHash, deserializeTrials, dockPanel, emptyUndoStack, encodeUrlHash, labDocumentKey, labStorageKey, localStorageAdapter, noneAdapter, panelKey, quarantineKey, serializeTrials, sessionStorageAdapter, undockPanel, urlHashAdapter, useTrialState } from '../chunk-
|
|
1
|
+
import { createLabStore } from '../chunk-5TROQVQ2.js';
|
|
2
|
+
export { CURRENT_DOCUMENT_VERSION, createLabStore, createMemoryAdapter, decodeUrlHash, deserializeTrials, dockPanel, emptyUndoStack, encodeUrlHash, labDocumentKey, labStorageKey, localStorageAdapter, noneAdapter, panelKey, quarantineKey, serializeTrials, sessionStorageAdapter, undockPanel, urlHashAdapter, useTrialState } from '../chunk-5TROQVQ2.js';
|
|
3
3
|
import { LabStoreProvider, TrialIdProvider } from '../chunk-2YILQ7Y5.js';
|
|
4
4
|
export { LabStoreContext, LabStoreProvider, TrialIdContext, TrialIdProvider, useLabStore, useTrialId } from '../chunk-2YILQ7Y5.js';
|
|
5
|
+
import '../chunk-E44SU6XS.js';
|
|
5
6
|
import { useRef } from 'react';
|
|
6
7
|
import { jsx } from 'react/jsx-runtime';
|
|
7
8
|
|
package/dist/state/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/state/SingletonExperiment.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../../src/state/SingletonExperiment.tsx"],"names":[],"mappings":";;;;;;;;AAKA,IAAM,oBAAA,GAAuB,eAAA;AAoBtB,SAAS,2BAAA,CAAoC;AAAA,EAClD,EAAA;AAAA,EACA,aAAA;AAAA,EACA,YAAA;AAAA,EACA,OAAA;AAAA,EACA,UAAA;AAAA,EACA;AACF,CAAA,EAA6C;AAC3C,EAAA,MAAM,QAAA,GAAW,OAAwB,IAAI,CAAA;AAC7C,EAAA,IAAI,QAAA,CAAS,YAAY,IAAA,EAAM;AAC7B,IAAA,MAAM,KAAA,GAAQ,cAAA,CAAe,EAAE,UAAA,EAAY,SAAS,CAAA;AACpD,IAAA,IAAI,CAAC,KAAA,CAAM,QAAA,EAAS,CAAE,MAAA,CAAO,IAAA,CAAK,CAAC,CAAA,KAAM,CAAA,CAAE,EAAA,KAAO,EAAE,CAAA,EAAG;AACrD,MAAA,KAAA,CAAM,QAAA,GAAW,QAAA,CAAS;AAAA,QACxB,EAAA;AAAA,QACA,cAAA,EAAgB,oBAAA;AAAA,QAChB,MAAA,EAAQ,aAAA;AAAA,QACR,KAAA,EAAO,YAAA;AAAA,QACP,IAAA,EAAM,EAAE,IAAA,EAAM,CAAA,EAAG,GAAA,EAAK,EAAE,CAAA,EAAG,CAAA,EAAG,CAAA,EAAG,CAAA,EAAE;AAAE,OACtC,CAAA;AAAA,IACH;AACA,IAAA,QAAA,CAAS,OAAA,GAAU,KAAA;AAAA,EACrB;AACA,EAAA,uBACE,GAAA,CAAC,gBAAA,EAAA,EAAiB,KAAA,EAAO,QAAA,CAAS,OAAA,EAChC,8BAAC,eAAA,EAAA,EAAgB,OAAA,EAAS,EAAA,EAAK,QAAA,EAAS,CAAA,EAC1C,CAAA;AAEJ","file":"index.js","sourcesContent":["import { type ReactNode, useRef } from 'react';\nimport { LabStoreProvider, TrialIdProvider } from './context';\nimport { createLabStore, type LabStore } from './store';\nimport type { StorageAdapter } from './types';\n\nconst SINGLETON_INSTRUMENT = '__singleton__';\n\n/** Props for `<SingletonExperimentProvider>`. */\nexport interface SingletonExperimentProviderProps<TS, TC> {\n /** Stable id for the synthetic trial; also doubles as the\n * TrialIdContext value. */\n id: string;\n initialConfig: TC;\n initialState: TS;\n storage: StorageAdapter;\n storageKey: string;\n children: ReactNode;\n}\n\n/**\n * One-trial `<Lab>` substitute for single-screen experiments. Mounts\n * a `LabStoreProvider` + `TrialIdProvider` with one synthetic\n * trial, so `useTrialState` works without going through the\n * full `<Lab instruments={...}>` runtime.\n */\nexport function SingletonExperimentProvider<TS, TC>({\n id,\n initialConfig,\n initialState,\n storage,\n storageKey,\n children,\n}: SingletonExperimentProviderProps<TS, TC>) {\n const storeRef = useRef<LabStore | null>(null);\n if (storeRef.current === null) {\n const store = createLabStore({ storageKey, storage });\n if (!store.getState().trials.some((w) => w.id === id)) {\n store.getState().addTrial({\n id,\n instrumentName: SINGLETON_INSTRUMENT,\n config: initialConfig,\n state: initialState,\n view: { zoom: 1, pan: { x: 0, y: 0 } },\n });\n }\n storeRef.current = store;\n }\n return (\n <LabStoreProvider store={storeRef.current}>\n <TrialIdProvider trialId={id}>{children}</TrialIdProvider>\n </LabStoreProvider>\n );\n}\n"]}
|