@weasel-js/labkit 1.7.3 → 1.8.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/README.md +24 -0
- package/dist/_dts/{CanvasStackContext-Cjy6I-Iv.d.ts → CanvasStackContext-B05ZM04l.d.ts} +3 -1
- package/dist/_dts/{Stage-D6t7o0pF.d.ts → Stage-CIJlbjrE.d.ts} +5 -3
- package/dist/_dts/{index-DCMA4Fy1.d.ts → index-8geQNQet.d.ts} +84 -12
- package/dist/_dts/{index-BTmaRy6a.d.ts → index-DRi3V5sN.d.ts} +6 -4
- package/dist/_dts/{types-BUBSIZuV.d.ts → types-DUfQ0isU.d.ts} +5 -1
- package/dist/_dts/{useTrialState-Bh8bzFgE.d.ts → useTrialState-Ar0AFpCe.d.ts} +94 -87
- package/dist/canvas/index.d.ts +5 -5
- package/dist/canvas/index.js +2 -2
- package/dist/chrome/index.d.ts +3 -3
- package/dist/chrome/index.js +7 -7
- package/dist/{chunk-HBGH344L.js → chunk-4RCVWX4M.js} +55 -18
- package/dist/chunk-4RCVWX4M.js.map +1 -0
- package/dist/{chunk-WIG6XHJ7.js → chunk-6IIKLXBZ.js} +13 -4
- package/dist/chunk-6IIKLXBZ.js.map +1 -0
- package/dist/{chunk-F4ACIK7Z.js → chunk-6Q6ACJ3H.js} +3 -3
- package/dist/{chunk-F4ACIK7Z.js.map → chunk-6Q6ACJ3H.js.map} +1 -1
- package/dist/{chunk-PMLZP7RT.js → chunk-7ALJOVGP.js} +5 -9
- package/dist/chunk-7ALJOVGP.js.map +1 -0
- package/dist/{chunk-XE5HJOPL.js → chunk-7FMZT2WL.js} +3 -3
- package/dist/{chunk-XE5HJOPL.js.map → chunk-7FMZT2WL.js.map} +1 -1
- package/dist/{chunk-XVUKDSYV.js → chunk-AVOILDN2.js} +2 -2
- package/dist/{chunk-XVUKDSYV.js.map → chunk-AVOILDN2.js.map} +1 -1
- package/dist/{chunk-2N7UBSS2.js → chunk-J5MDJEOZ.js} +3 -3
- package/dist/{chunk-2N7UBSS2.js.map → chunk-J5MDJEOZ.js.map} +1 -1
- package/dist/{chunk-LPGBC63T.js → chunk-KHB3KRRQ.js} +7 -7
- package/dist/chunk-KHB3KRRQ.js.map +1 -0
- package/dist/{chunk-IBVRMHW5.js → chunk-NHIO2O3O.js} +31 -30
- package/dist/chunk-NHIO2O3O.js.map +1 -0
- package/dist/{chunk-EESJUSYR.js → chunk-QMAY74TP.js} +56 -5
- package/dist/chunk-QMAY74TP.js.map +1 -0
- package/dist/{chunk-4X44DMRS.js → chunk-RN7T7OBO.js} +46 -24
- package/dist/chunk-RN7T7OBO.js.map +1 -0
- package/dist/{chunk-4TJ34FXA.js → chunk-RXO5UEGT.js} +5 -12
- package/dist/chunk-RXO5UEGT.js.map +1 -0
- package/dist/{chunk-E6NARGU7.js → chunk-SQX35X5V.js} +3 -3
- package/dist/{chunk-E6NARGU7.js.map → chunk-SQX35X5V.js.map} +1 -1
- package/dist/{chunk-YCFKW5RX.js → chunk-T5OEUNCB.js} +16 -2
- package/dist/chunk-T5OEUNCB.js.map +1 -0
- package/dist/{chunk-RL2LOLNI.js → chunk-UX66USTN.js} +2 -2
- package/dist/chunk-UX66USTN.js.map +1 -0
- package/dist/{chunk-IRMPZIYU.js → chunk-V4SMGEYY.js} +6732 -6507
- package/dist/chunk-V4SMGEYY.js.map +1 -0
- package/dist/{chunk-E23Q6A3Y.js → chunk-VCK5T6EP.js} +3 -3
- package/dist/{chunk-E23Q6A3Y.js.map → chunk-VCK5T6EP.js.map} +1 -1
- package/dist/{chunk-T6DLGEJB.js → chunk-XWR2P6MR.js} +23 -6
- package/dist/chunk-XWR2P6MR.js.map +1 -0
- package/dist/{chunk-XSJJTXNA.js → chunk-YZA73U4A.js} +19 -19
- package/dist/chunk-YZA73U4A.js.map +1 -0
- package/dist/config/index.d.ts +12 -5
- package/dist/config/index.js +2 -2
- package/dist/controls/index.d.ts +2 -2
- package/dist/controls/index.js +5 -5
- package/dist/dragdrop/index.d.ts +2 -2
- package/dist/dragdrop/index.js +2 -2
- package/dist/index.d.ts +158 -16
- package/dist/index.js +1036 -415
- package/dist/index.js.map +1 -1
- package/dist/layers/index.d.ts +2 -2
- package/dist/layers/index.js +3 -3
- package/dist/loupe/index.d.ts +176 -28
- package/dist/loupe/index.js +547 -141
- package/dist/loupe/index.js.map +1 -1
- package/dist/overview/index.d.ts +1 -1
- package/dist/overview/index.js +5 -5
- package/dist/passthrough/weasel-ui.js +3 -3
- package/dist/primitives/index.d.ts +4 -19
- package/dist/primitives/index.js +7 -7
- package/dist/state/index.d.ts +6 -8
- package/dist/state/index.js +5 -5
- package/dist/styles.css +181 -44
- package/dist/surface/index.d.ts +20 -1
- package/dist/surface/index.js +2 -2
- package/dist/undo/index.d.ts +19 -8
- package/dist/undo/index.js +1 -1
- package/package.json +11 -11
- package/src/annotations/AnnotationOverlay.abandon.test.tsx +4 -0
- package/src/annotations/AnnotationOverlay.tsx +10 -1
- package/src/annotations/Annotations.less +2 -0
- package/src/annotations/Annotations.overlay.test.tsx +29 -0
- package/src/canvas/CanvasStack.test.tsx +35 -0
- package/src/canvas/CanvasStack.tsx +12 -1
- package/src/canvas/useLayerScheduler.ts +14 -0
- package/src/chrome/builtins.test.ts +14 -0
- package/src/chrome/builtins.tsx +17 -2
- package/src/chrome/regions/StatusRegion.tsx +20 -14
- package/src/chrome/regions/regions.test.tsx +28 -0
- package/src/chrome/types.ts +8 -0
- package/src/clock/clock.browser.test.less +5 -0
- package/src/clock/clock.browser.test.tsx +77 -0
- package/src/clock/clock.integration.test.tsx +95 -0
- package/src/clock/clockRegistry.test.ts +33 -0
- package/src/clock/clockRegistry.ts +46 -0
- package/src/clock/hooks.ts +44 -0
- package/src/clock/index.ts +2 -0
- package/src/clock/trialClock.test.ts +265 -0
- package/src/clock/trialClock.ts +245 -0
- package/src/clock/useClockLoop.ts +45 -0
- package/src/config/builder.ts +11 -1
- package/src/config/resolve.test.ts +12 -0
- package/src/config/resolve.ts +5 -0
- package/src/config/types.ts +5 -1
- package/src/controls/ControlMatrix.test.tsx +10 -0
- package/src/controls/ControlMatrix.tsx +110 -58
- package/src/controls/ControlPanel.test.tsx +30 -0
- package/src/index.ts +3 -2
- package/src/instrument/types.ts +21 -1
- package/src/lab/Lab.chrome.test.tsx +8 -1
- package/src/lab/Lab.presentation.test.tsx +113 -0
- package/src/lab/Lab.surface.test.tsx +20 -9
- package/src/lab/Lab.tsx +132 -257
- package/src/lab/LabLightbox.browser.test.less +17 -0
- package/src/lab/LabLightbox.browser.test.tsx +216 -0
- package/src/lab/LabShell.less +10 -3
- package/src/lab/LabSurface.tsx +129 -0
- package/src/lab/Workspace.stories.tsx +18 -0
- package/src/lab/Workspace.surface.test.tsx +4 -0
- package/src/lab/Workspace.test.tsx +37 -1
- package/src/lab/Workspace.tsx +34 -6
- package/src/lab/index.ts +2 -0
- package/src/lab/nebula.ts +30 -0
- package/src/lab/openLab.test.ts +81 -0
- package/src/lab/openLab.ts +119 -0
- package/src/lab/presentation.browser.test.less +5 -0
- package/src/lab/presentation.browser.test.tsx +119 -0
- package/src/lab/presentation.less +64 -0
- package/src/lab/presentation.tsx +47 -0
- package/src/lab/useFocusPick.ts +43 -0
- package/src/lightbox/Lightbox.browser.test.less +14 -0
- package/src/lightbox/Lightbox.browser.test.tsx +113 -0
- package/src/lightbox/Lightbox.less +128 -0
- package/src/lightbox/Lightbox.test.tsx +195 -0
- package/src/lightbox/Lightbox.tsx +205 -0
- package/src/lightbox/LightboxContext.ts +38 -0
- package/src/lightbox/LightboxLayers.tsx +40 -0
- package/src/lightbox/index.ts +8 -0
- package/src/lightbox/modal.ts +94 -0
- package/src/loupe/AGENTS.md +40 -2
- package/src/loupe/CanvasLoupe.tsx +5 -4
- package/src/loupe/DomLoupe.tsx +7 -5
- package/src/loupe/Loupe.less +15 -0
- package/src/loupe/LoupeBubble.tsx +35 -13
- package/src/loupe/SourceLoupe.browser.test.tsx +204 -0
- package/src/loupe/SourceLoupe.tsx +60 -0
- package/src/loupe/TrialLoupe.browser.test.tsx +342 -0
- package/src/loupe/TrialLoupe.tsx +126 -28
- package/src/loupe/canvasLens.ts +20 -17
- package/src/loupe/index.ts +26 -2
- package/src/loupe/sourceLens.test.ts +65 -0
- package/src/loupe/sourceLens.ts +97 -0
- package/src/loupe/types.test.ts +6 -0
- package/src/loupe/types.ts +109 -7
- package/src/loupe/useLoupe.test.tsx +188 -3
- package/src/loupe/useLoupe.ts +106 -11
- package/src/primitives/index.ts +2 -2
- package/src/specimen/Specimen.tsx +0 -7
- package/src/state/helpers.test.ts +4 -11
- package/src/state/helpers.ts +2 -8
- package/src/state/index.ts +0 -2
- package/src/state/openLabStore.test.ts +10 -8
- package/src/state/openLabStore.ts +1 -1
- package/src/state/store.test.ts +2 -2
- package/src/state/store.ts +15 -16
- package/src/state/types.ts +9 -9
- package/src/styles.less +2 -1
- package/src/surface/AGENTS.md +13 -0
- package/src/surface/index.ts +1 -0
- package/src/surface/useSurfaceTile.test.tsx +4 -0
- package/src/surface/useSurfaceTile.ts +17 -1
- package/src/surface/useTiledSurface.test.tsx +65 -0
- package/src/surface/useTiledSurface.ts +68 -1
- package/src/theme/interstellar.theme.json +0 -14
- package/src/trial/Trial.stories.tsx +0 -1
- package/src/trial/Trial.test.tsx +40 -3
- package/src/trial/Trial.tsx +87 -43
- package/src/trial/TrialChrome.tsx +20 -2
- package/src/trial/trialOps.test.ts +1 -2
- package/src/trial/trialOps.ts +2 -3
- package/src/undo/stateOp.ts +21 -0
- package/src/undo/undoStack.ts +18 -6
- package/dist/chunk-4TJ34FXA.js.map +0 -1
- package/dist/chunk-4X44DMRS.js.map +0 -1
- package/dist/chunk-EESJUSYR.js.map +0 -1
- package/dist/chunk-HBGH344L.js.map +0 -1
- package/dist/chunk-IBVRMHW5.js.map +0 -1
- package/dist/chunk-IRMPZIYU.js.map +0 -1
- package/dist/chunk-LPGBC63T.js.map +0 -1
- package/dist/chunk-PMLZP7RT.js.map +0 -1
- package/dist/chunk-RL2LOLNI.js.map +0 -1
- package/dist/chunk-T6DLGEJB.js.map +0 -1
- package/dist/chunk-WIG6XHJ7.js.map +0 -1
- package/dist/chunk-XSJJTXNA.js.map +0 -1
- package/dist/chunk-YCFKW5RX.js.map +0 -1
- package/src/primitives/StatusBar.less +0 -34
- package/src/primitives/StatusBar.stories.tsx +0 -24
- package/src/primitives/StatusBar.test.tsx +0 -25
- package/src/primitives/StatusBar.tsx +0 -28
package/dist/index.d.ts
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
export { Button, ButtonProps, ButtonSize, ButtonVariant, CloseIcon, CollapseIcon, CurveField, CurveFieldProps, CurveMark, DetailList, DetailListLayout, DetailListProps, DetailListValues, DetailRow, DetailRowProps, DetailRowStatus, ExpandIcon, Icon, IconProps, Input, InputProps, Jog, JogProps, LayerList, LayerListItem, LayerListProps, LayerMove, PauseIcon, PlayIcon, PropertyControl, PropertyControlProps, PropertyField, PropertyFieldProps, PropertyGroup, PropertyGroupProps, PropertyList, PropertyListPack, PropertyListProps, PropertyOption, PropertyPanel, PropertyPanelProps, PropertyRow, PropertyRowLayout, PropertyRowProps, PropertyRowVariant, PropertySpan, PropertySpanProps, ResetIcon, Select, SelectProps, StepBackIcon, StepForwardIcon, StopIcon, Subpanel, SubpanelProps, ToggleBar, ToggleBarItem, ToggleBarProps, ToggleBarSize, ToggleBarVariant, TokenCategory, TokenEntry, TokenPanel, TokenPanelProps, TokenScale, TokenScaleRule, inferTokenType, moveLayers, refitScale } from '@weasel-js/ui';
|
|
1
|
+
export { Button, ButtonProps, ButtonSize, ButtonVariant, CloseIcon, CollapseIcon, CurveField, CurveFieldProps, CurveMark, DetailList, DetailListLayout, DetailListProps, DetailListValues, DetailRow, DetailRowProps, DetailRowStatus, ExpandIcon, Icon, IconProps, Input, InputProps, Jog, JogProps, LayerList, LayerListItem, LayerListProps, LayerMove, PauseIcon, PlayIcon, PropertyControl, PropertyControlProps, PropertyField, PropertyFieldProps, PropertyGroup, PropertyGroupProps, PropertyList, PropertyListPack, PropertyListProps, PropertyOption, PropertyPanel, PropertyPanelProps, PropertyRow, PropertyRowLayout, PropertyRowProps, PropertyRowVariant, PropertySpan, PropertySpanProps, ResetIcon, Select, SelectProps, StatusBar, StatusBarItem, StatusBarItemProps, StatusBarProps, StatusBarSpacer, StepBackIcon, StepForwardIcon, StopIcon, Subpanel, SubpanelProps, ToggleBar, ToggleBarItem, ToggleBarProps, ToggleBarSize, ToggleBarVariant, TokenCategory, TokenEntry, TokenPanel, TokenPanelProps, TokenScale, TokenScaleRule, inferTokenType, moveLayers, refitScale } from '@weasel-js/ui';
|
|
2
2
|
import { SceneNode, View, DrawCommand, BuiltinToolId } from '@weasel-js/core';
|
|
3
|
-
import { A as AnnotationMeaning,
|
|
4
|
-
export { X as Annotation, Y as AnnotationInit, Z as AnnotationPatch, _ as AnnotationQuery, $ as AnnotationSelectionMode, a0 as AnnotationStatus, a1 as AnnotationStoreOptions, a2 as AnnotationTargetInfo, a3 as AnnotationToolId, a4 as Auto, a5 as CanvasCapability, a6 as CanvasLayer, a7 as CaptureDeps, a8 as ContributionBase, C as CreateLabStoreOptions, D as DEFAULT_FRAME,
|
|
3
|
+
import { A as AnnotationMeaning, s as AnnotationData, t as WorldRect, v as MarkStyle, w as MarkScene, x as CaptureSource, y as CaptureOptions, z as CaptureResult, B as PaintableMark, E as AnnotationTarget, F as AnnotationsApi, G as AnnotationsCapability, H as TrialInfo, J as TrialTool, K as AnnotationKind, a as ViewTransform, N as TrialClock, O as Instrument, o as InstrumentList, n as LabMode, Q as LabDensity, R as TrialContribution, T as TrialRecord, c as StorageAdapter } from './_dts/index-8geQNQet.js';
|
|
4
|
+
export { X as Annotation, Y as AnnotationInit, Z as AnnotationPatch, _ as AnnotationQuery, $ as AnnotationSelectionMode, a0 as AnnotationStatus, a1 as AnnotationStoreOptions, a2 as AnnotationTargetInfo, a3 as AnnotationToolId, a4 as Auto, a5 as CanvasCapability, a6 as CanvasLayer, a7 as CaptureDeps, a8 as ClockCapability, a9 as ContributionBase, C as CreateLabStoreOptions, D as DEFAULT_FRAME, m as DragDropCapability, l as DragFeedback, aa as FracPoint, ab as FracRect, ac as HitResult, ad as IconComponent, L as LabDocument, d as LabStoreState, ae as LayerCapability, af as LayerDescriptor, k as PaletteItem, P as Point, ag as RegionContribution, ah as RenderContext, e as SavedSnapshot, ai as SerializedAnnotations, S as SerializedTrial, aj as SidebarSection, ak as SidebarSlotContext, al as StageCapability, am as StatusReadout, f as StorageChange, an as SystemEvent, ao as ToolCapability, ap as ToolItem, aq as ToolSlotContext, ar as ToolbarItem, as as TrialChromeContext, at as TrialRegion, g as TrialStateHandle, au as UndoCapability, U as UndockedPanel, h as UndockedPanels, av as ViewportControl, V as ViewportSize, W as WorldFrame, b as WorldSpec, aw as annotationsFromJSON, j as applyCamera, ax as auto, ay as createAnnotationScene, az as createAnnotationStore, i as dockPanel, aA as fracContains, aB as fracEncloses, aC as fracToWorld, aD as isAuto, aE as markCommands, p as panelKey, r as resolveFrame, aF as roundFrac, u as undockPanel, aG as worldToFrac } from './_dts/index-8geQNQet.js';
|
|
5
5
|
import * as react from 'react';
|
|
6
6
|
import { ReactNode } from 'react';
|
|
7
7
|
import { SvgNode } from '@weasel-js/svg';
|
|
8
|
-
export { C as CameraContext, a as CameraContextValue, b as CameraInput, d as CameraPublishContext, e as CameraRegistry, f as CameraRegistryContext, g as CameraScope, h as CameraView, j as CanvasStack, k as CanvasStackProps, l as Stage, m as StageProps, Z as ZoomAtOptions, n as ZoomRange, o as centerOn, p as createCameraRegistry, q as fitStage, s as screenToWorld, r as usePublishCamera, w as worldToScreen, z as zoomAt } from './_dts/Stage-
|
|
9
|
-
export { C as CanvasLayerDescriptor, a as CanvasStackContext, b as CanvasStackContextValue, c as CanvasStackSurface } from './_dts/CanvasStackContext-
|
|
10
|
-
import { L as LabContribution } from './_dts/index-
|
|
11
|
-
export { A as AddTrialOptions, a as LabAsideRegion, b as LabChromeContext, c as LabContext, d as LabContextValue, e as LabFooterRegion, f as LabHeaderRegion, g as LabRegion, h as LabRegionProps, i as LabSidebarRegion, P as PaletteRegion, j as PaletteRegionProps, S as SidebarRegion, k as SidebarRegionProps, l as StatusRegion, m as StatusRegionProps, T as TRANSIENT_BUILTINS, n as TitleBarPlacement, o as TitleBarRegion, p as TitleBarRegionProps, q as ToolbarRegion, r as ToolbarRegionProps, V as ViewportRegion, s as ViewportRegionProps, t as addTrial, u as builtinContributions, v as cloneTrial, w as closeTrial, x as contributionsIn, y as labContributions, z as mergeContributions, B as reorderTrials, C as resetTrial, D as suppressContributions, E as toolContributions, F as useLabChromeContext, G as useLabContext } from './_dts/index-
|
|
8
|
+
export { C as CameraContext, a as CameraContextValue, b as CameraInput, d as CameraPublishContext, e as CameraRegistry, f as CameraRegistryContext, g as CameraScope, h as CameraView, j as CanvasStack, k as CanvasStackProps, l as Stage, m as StageProps, Z as ZoomAtOptions, n as ZoomRange, o as centerOn, p as createCameraRegistry, q as fitStage, s as screenToWorld, r as usePublishCamera, w as worldToScreen, z as zoomAt } from './_dts/Stage-CIJlbjrE.js';
|
|
9
|
+
export { C as CanvasLayerDescriptor, a as CanvasStackContext, b as CanvasStackContextValue, c as CanvasStackSurface } from './_dts/CanvasStackContext-B05ZM04l.js';
|
|
10
|
+
import { L as LabContribution } from './_dts/index-DRi3V5sN.js';
|
|
11
|
+
export { A as AddTrialOptions, a as LabAsideRegion, b as LabChromeContext, c as LabContext, d as LabContextValue, e as LabFooterRegion, f as LabHeaderRegion, g as LabRegion, h as LabRegionProps, i as LabSidebarRegion, P as PaletteRegion, j as PaletteRegionProps, S as SidebarRegion, k as SidebarRegionProps, l as StatusRegion, m as StatusRegionProps, T as TRANSIENT_BUILTINS, n as TitleBarPlacement, o as TitleBarRegion, p as TitleBarRegionProps, q as ToolbarRegion, r as ToolbarRegionProps, V as ViewportRegion, s as ViewportRegionProps, t as addTrial, u as builtinContributions, v as cloneTrial, w as closeTrial, x as contributionsIn, y as labContributions, z as mergeContributions, B as reorderTrials, C as resetTrial, D as suppressContributions, E as toolContributions, F as useLabChromeContext, G as useLabContext } from './_dts/index-DRi3V5sN.js';
|
|
12
12
|
export { BaseNode, BooleanNode, ColorNode, CustomNode, EnumNode, GroupNode, ListNode, NumberNode, SectionTree, StringNode, ValueNode, applyRules, autoPathsOf, builtinRules, f, fillConfigDefaults, fromConfigFields, hasConfigPath, isConfigBranch, isLeafVisible, resolveAutoConfig, resolveConfigSchema, schemaNodeAtPath, sectionTree, titleCase, useConfigSchema, useResolvedConfig, valueAtPath, withValueAtPath } from './config/index.js';
|
|
13
|
-
import { C as ConfigSchema, a as ConfigField, b as ConfigRule, c as ControlRenderer } from './_dts/types-
|
|
14
|
-
export { A as Annotations, B as BranchAnnotations, d as BranchOptions, e as CheckboxField, f as ColorField, g as ConfigBranch, h as ConfigEntry, i as ConfigFieldBase, j as ConfigFieldType, k as ConfigNode, l as ConfigOf, m as ConfigOption, n as ConfigPath, o as ConfigRuleContext, p as ConfigShape, D as DialogSpec, E as EntryValue, I as InDialogOptions, q as InferConfig, L as LeafPatch, N as NodeOptions, r as NodeValue, s as NumberField, R as ResolvedConfig, S as SectionOption, t as SectionSpec, u as SelectField, v as SelectOption, w as SliderField, T as TextField, V as ValueAtPath } from './_dts/types-
|
|
13
|
+
import { C as ConfigSchema, a as ConfigField, b as ConfigRule, c as ControlRenderer } from './_dts/types-DUfQ0isU.js';
|
|
14
|
+
export { A as Annotations, B as BranchAnnotations, d as BranchOptions, e as CheckboxField, f as ColorField, g as ConfigBranch, h as ConfigEntry, i as ConfigFieldBase, j as ConfigFieldType, k as ConfigNode, l as ConfigOf, m as ConfigOption, n as ConfigPath, o as ConfigRuleContext, p as ConfigShape, D as DialogSpec, E as EntryValue, I as InDialogOptions, q as InferConfig, L as LeafPatch, N as NodeOptions, r as NodeValue, s as NumberField, R as ResolvedConfig, S as SectionOption, t as SectionSpec, u as SelectField, v as SelectOption, w as SliderField, T as TextField, V as ValueAtPath } from './_dts/types-DUfQ0isU.js';
|
|
15
15
|
export { ControlMatrix, ControlMatrixColumn, ControlMatrixProps, ControlMatrixRow, ControlPanel, inDialog, summarizeValue } from './controls/index.js';
|
|
16
16
|
import { J as JobHandle } from './_dts/types-DJ79Tg5J.js';
|
|
17
17
|
export { a as JobCapability, b as JobEvent, c as JobFailure, d as JobStatus } from './_dts/types-DJ79Tg5J.js';
|
|
@@ -19,10 +19,10 @@ export { UseJobOptions, useJob } from './job/index.js';
|
|
|
19
19
|
import { Theme, ColorList } from '@weasel-js/theme';
|
|
20
20
|
export { a as FloatingPanel, F as FloatingPanelProps } from './_dts/FloatingPanel-7j0IcXwz.js';
|
|
21
21
|
import { SplitProps } from './primitives/index.js';
|
|
22
|
-
export { FpsMeter, JobProgress, JobProgressProps, Legend, LegendEntry, LegendMark, LegendProps, Readout, ReadoutProps, ReadoutRow, ScaleIndicator, ScaleIndicatorProps, Split,
|
|
23
|
-
export { C as CURRENT_DOCUMENT_VERSION, I as IndexedDbAdapterOptions, b as LabStoreContext, c as LabStoreProvider, O as OpenLabStoreOptions, d as OpenedLabStore, P as PersistedStateOptions, e as Persistence, f as PersistenceProps, R as RecordCache, g as RecordChange, T as TrialIdContext, h as TrialIdProvider, i as createIndexedDbAdapter, k as createMemoryAdapter, l as indexedDbAdapter, m as labDocumentKey, n as localStorageAdapter, o as noneAdapter, p as openLabStore, q as quarantineKey, s as sessionStorageAdapter, u as urlHashAdapter, r as useLabStore, t as usePersistedState, v as useTrialId, w as useTrialState } from './_dts/useTrialState-
|
|
24
|
-
export { Box, Rect, SurfaceCanvasContext, SurfaceCanvases, SurfaceClear, SurfaceContext, SurfaceFrame, SurfaceHandle, SurfaceLayer, TilePainter, UseTiledSurfaceOptions, composeRects, toDeviceRect, useSurface, useSurfaceCanvas, useSurfaceOptional, useSurfaceTile, useTileId, useTiledSurface } from './surface/index.js';
|
|
25
|
-
export { EventBus, EventListener, clearUndo, createEventBus, emptyStack, pushSnapshot, redo, undo } from './undo/index.js';
|
|
22
|
+
export { FpsMeter, JobProgress, JobProgressProps, Legend, LegendEntry, LegendMark, LegendProps, Readout, ReadoutProps, ReadoutRow, ScaleIndicator, ScaleIndicatorProps, Split, Toolbar, ToolbarButtonProps, ToolbarGroupProps, ToolbarProps, ZoomControl, ZoomControlProps } from './primitives/index.js';
|
|
23
|
+
export { C as CURRENT_DOCUMENT_VERSION, I as IndexedDbAdapterOptions, b as LabStoreContext, c as LabStoreProvider, O as OpenLabStoreOptions, d as OpenedLabStore, P as PersistedStateOptions, e as Persistence, f as PersistenceProps, R as RecordCache, g as RecordChange, T as TrialIdContext, h as TrialIdProvider, i as createIndexedDbAdapter, k as createMemoryAdapter, l as indexedDbAdapter, m as labDocumentKey, n as localStorageAdapter, o as noneAdapter, p as openLabStore, q as quarantineKey, s as sessionStorageAdapter, u as urlHashAdapter, r as useLabStore, t as usePersistedState, v as useTrialId, w as useTrialState } from './_dts/useTrialState-Ar0AFpCe.js';
|
|
24
|
+
export { Box, Rect, SurfaceCanvasContext, SurfaceCanvases, SurfaceClear, SurfaceContext, SurfaceFrame, SurfaceHandle, SurfaceLayer, TilePainter, UseTiledSurfaceOptions, composeRects, toDeviceRect, useSurface, useSurfaceCanvas, useSurfaceOptional, useSurfaceTile, useTileId, useTileInScope, useTiledSurface } from './surface/index.js';
|
|
25
|
+
export { EventBus, EventListener, UndoStack, clearUndo, createEventBus, emptyStack, pushSnapshot, redo, undo } from './undo/index.js';
|
|
26
26
|
import '@weasel-js/geom';
|
|
27
27
|
import '@weasel-js/quantity';
|
|
28
28
|
import 'windease';
|
|
@@ -243,6 +243,20 @@ declare function fromWeaselView(v: View): ViewTransform;
|
|
|
243
243
|
*/
|
|
244
244
|
declare function fitView(content: ContentSize, pane: PaneSize): ViewTransform;
|
|
245
245
|
|
|
246
|
+
/**
|
|
247
|
+
* A trial's clock: `trialId`'s, else the one of the trial this renders inside,
|
|
248
|
+
* else the lab's focused trial's. `null` when that trial declares no clock.
|
|
249
|
+
* Re-renders on rate, seek and loop changes, never per frame — read `elapsed`
|
|
250
|
+
* per frame through {@link useClockFrame}.
|
|
251
|
+
*/
|
|
252
|
+
declare function useTrialClock(trialId?: string): TrialClock | null;
|
|
253
|
+
/**
|
|
254
|
+
* Run `fn` after each frame the clock of the trial this renders inside moves,
|
|
255
|
+
* with its `elapsed` and `pass`, outside React's render — for a renderer that
|
|
256
|
+
* draws imperatively, or text that changes every frame written into a ref.
|
|
257
|
+
*/
|
|
258
|
+
declare function useClockFrame(fn: (elapsed: number, pass: number) => void): void;
|
|
259
|
+
|
|
246
260
|
/** An instrument as it is written: either the legacy `defaultConfig` (plus an
|
|
247
261
|
* optional `configSchema`), or a `config` schema that supplies both. */
|
|
248
262
|
type InstrumentSpec<TS, TC, TItem = unknown> = Instrument<TS, TC, TItem> | (Omit<Instrument<TS, TC, TItem>, 'defaultConfig'> & {
|
|
@@ -321,6 +335,17 @@ declare function currentPage(path: string, pages: readonly LabPage[]): number;
|
|
|
321
335
|
* bench -- and a tab strip is the layout that stops working first. */
|
|
322
336
|
declare function LabSwitcher({ title, pages, path, className }: LabSwitcherProps): react.JSX.Element;
|
|
323
337
|
|
|
338
|
+
/** The trial a presented lab opens on. `config` is overlaid on the
|
|
339
|
+
* instrument's defaults the way `addTrial`'s is, so Reset returns to it;
|
|
340
|
+
* `state` and `view` replace what that config would give. */
|
|
341
|
+
interface PresentationSeed<TC = Record<string, unknown>, TS = unknown, TV = unknown> {
|
|
342
|
+
/** Default: the lab's `defaultInstrument`. */
|
|
343
|
+
instrument?: string;
|
|
344
|
+
config?: Partial<TC>;
|
|
345
|
+
state?: TS;
|
|
346
|
+
view?: TV;
|
|
347
|
+
}
|
|
348
|
+
|
|
324
349
|
interface LabBaseProps {
|
|
325
350
|
/** May change while mounted. An instrument that is a different object from
|
|
326
351
|
* the last render counts as replaced and its open trials' configs are
|
|
@@ -365,6 +390,10 @@ interface LabBaseProps {
|
|
|
365
390
|
labChrome?: readonly LabContribution[];
|
|
366
391
|
/** Built-in contribution ids to drop. Throws on an id that is not there. */
|
|
367
392
|
suppress?: readonly string[];
|
|
393
|
+
/** Whether a double-click on a trial also opens it in its lightbox, beside
|
|
394
|
+
* the title bar's expand toggle every trial has. Off by default; a
|
|
395
|
+
* function decides per trial, by its record. */
|
|
396
|
+
expandOnDoubleClick?: boolean | ((trial: TrialRecord) => boolean);
|
|
368
397
|
/** Offer the header's add-trial control. Default `true`; a lab that opens
|
|
369
398
|
* trials some other way passes `false`. */
|
|
370
399
|
addTrial?: boolean;
|
|
@@ -382,6 +411,15 @@ interface LabBaseProps {
|
|
|
382
411
|
* Keys are config paths (checked first) or leaf kinds. Memoize or hoist. */
|
|
383
412
|
controls?: Record<string, ControlRenderer>;
|
|
384
413
|
children?: ReactNode;
|
|
414
|
+
/** Start presenting: one trial, opened on `seed`, without the lab's chrome or
|
|
415
|
+
* its own. `?present` in the page's URL does the same. Read once, at mount.
|
|
416
|
+
* A stored lab presents from its own records, under `storageKey` +
|
|
417
|
+
* `':present'`, so an embed never shows or changes the full lab's trials. */
|
|
418
|
+
present?: boolean;
|
|
419
|
+
/** The trial a lab that starts presenting opens on. A store that already
|
|
420
|
+
* holds a trial opened on this same seed keeps it; a changed seed replaces
|
|
421
|
+
* it. Ignored unless the lab starts presenting. */
|
|
422
|
+
seed?: PresentationSeed;
|
|
385
423
|
}
|
|
386
424
|
/** Props for `<Lab>`. With a `storageKey` the lab persists — to IndexedDB
|
|
387
425
|
* unless `storage` names another substrate — and both are read once, at
|
|
@@ -479,6 +517,16 @@ declare function LabShell({ title, children, header, footer, mode, pages, path,
|
|
|
479
517
|
*/
|
|
480
518
|
declare function LabZoom(): react.JSX.Element;
|
|
481
519
|
|
|
520
|
+
/** A lab's presentation mode: one trial, without the lab's chrome or its own. */
|
|
521
|
+
interface Presentation {
|
|
522
|
+
active: boolean;
|
|
523
|
+
/** Present the focused trial. Escape returns to the workspace. */
|
|
524
|
+
enter(): void;
|
|
525
|
+
exit(): void;
|
|
526
|
+
}
|
|
527
|
+
/** The presentation mode of the `<Lab>` around the caller. */
|
|
528
|
+
declare function usePresentation(): Presentation;
|
|
529
|
+
|
|
482
530
|
/** A tile's persisted extent, keyed by the id its caller gave it. Grid resizes
|
|
483
531
|
* write `span`; `size` is here because a strategy swap would write that. */
|
|
484
532
|
type TrialLayout = Record<string, {
|
|
@@ -523,6 +571,19 @@ interface WorkspaceProps {
|
|
|
523
571
|
* floating zone above it. The body is portaled in by the trial that owns
|
|
524
572
|
* it, so all this renders is the frame and the host. */
|
|
525
573
|
panels?: readonly PanelDescriptor[];
|
|
574
|
+
/**
|
|
575
|
+
* Whether a tile can open in a `<Lightbox>` — shown large over the page from
|
|
576
|
+
* the expand button in its corner — without being remounted. On by default;
|
|
577
|
+
* `false` turns it off for every tile, and a function decides per tile id.
|
|
578
|
+
*/
|
|
579
|
+
lightbox?: boolean | ((id: string) => boolean);
|
|
580
|
+
/**
|
|
581
|
+
* Whether a double-click on a tile's content also opens its lightbox. Off by
|
|
582
|
+
* default, since most content has its own use for a double-click; give it
|
|
583
|
+
* to a tile whose content has none, such as an image, with a function of
|
|
584
|
+
* the tile id.
|
|
585
|
+
*/
|
|
586
|
+
expandOnDoubleClick?: boolean | ((id: string) => boolean);
|
|
526
587
|
/**
|
|
527
588
|
* Fixed tiling extent. Omit in an app — the grid measures its own box. Supply
|
|
528
589
|
* it where nothing measures, notably jsdom: at a zero measurement the grid
|
|
@@ -554,7 +615,88 @@ interface PanelDescriptor {
|
|
|
554
615
|
* the trial that owns it, which is what keeps a torn-out section inside its
|
|
555
616
|
* trial's React tree instead of rebuilding it as a sibling.
|
|
556
617
|
*/
|
|
557
|
-
declare function Workspace({ children, ids, panels, resizable, reorderable, onReorder, layout, onLayoutChange, gap, padding, viewport, }: WorkspaceProps): react.JSX.Element;
|
|
618
|
+
declare function Workspace({ children, ids, panels, resizable, reorderable, onReorder, layout, onLayoutChange, gap, padding, viewport, lightbox, expandOnDoubleClick, }: WorkspaceProps): react.JSX.Element;
|
|
619
|
+
|
|
620
|
+
/** Props for `<Lightbox>`. */
|
|
621
|
+
interface LightboxProps {
|
|
622
|
+
children: ReactNode;
|
|
623
|
+
/** Names the expanded view for assistive tech. */
|
|
624
|
+
label?: string;
|
|
625
|
+
/** Turns the lightbox off: no expand button, no double-click, and an open
|
|
626
|
+
* one closes. The content stays mounted either way. */
|
|
627
|
+
disabled?: boolean;
|
|
628
|
+
/** Let a double-click on the content open it, and another close it. Off by
|
|
629
|
+
* default — the expand button is always there; a double-click is for
|
|
630
|
+
* content that has no other use for one, such as an image. */
|
|
631
|
+
expandOnDoubleClick?: boolean;
|
|
632
|
+
/** Controlled open state. Omit to let the lightbox keep its own. */
|
|
633
|
+
expanded?: boolean;
|
|
634
|
+
onExpandedChange?: (expanded: boolean) => void;
|
|
635
|
+
/** Extra class on the outer element. */
|
|
636
|
+
className?: string;
|
|
637
|
+
}
|
|
638
|
+
/**
|
|
639
|
+
* Shows its content large, over a dimmed page, from the expand button in its
|
|
640
|
+
* corner — or a double-click, where `expandOnDoubleClick` asks for one —
|
|
641
|
+
* without remounting it. The same element is lifted into the browser's top
|
|
642
|
+
* layer (`popover="manual"`), so a WebGL context or a scene inside keeps
|
|
643
|
+
* running and sees only a bigger box: anything sizing itself from a
|
|
644
|
+
* `ResizeObserver` follows on its own. The top layer also escapes an
|
|
645
|
+
* ancestor's transform, clipping, and stacking.
|
|
646
|
+
*
|
|
647
|
+
* Layers declared by a `<LightboxLayers>` above are lifted around it, and a
|
|
648
|
+
* labkit surface above is scoped to it while it is open, so pixels drawn for
|
|
649
|
+
* the content from outside it come along.
|
|
650
|
+
*
|
|
651
|
+
* Escape, a click on the dimmed margin, the close button, or another
|
|
652
|
+
* double-click where those open it closes it, and focus returns to wherever it
|
|
653
|
+
* was. A double-click on a control, inside `[data-lk-lightbox-ignore]`, or one
|
|
654
|
+
* a handler further in called `preventDefault()` on does not open it.
|
|
655
|
+
*/
|
|
656
|
+
declare function Lightbox({ children, label, disabled, expandOnDoubleClick, expanded: expandedProp, onExpandedChange, className, }: LightboxProps): react.JSX.Element;
|
|
657
|
+
|
|
658
|
+
/** What a `<Lightbox>` offers the content inside it. */
|
|
659
|
+
interface LightboxApi {
|
|
660
|
+
/** Whether the content is showing in the lightbox right now. */
|
|
661
|
+
expanded: boolean;
|
|
662
|
+
open: () => void;
|
|
663
|
+
close: () => void;
|
|
664
|
+
toggle: () => void;
|
|
665
|
+
}
|
|
666
|
+
/** The nearest `<Lightbox>`, or `null` outside one. Reading it changes
|
|
667
|
+
* nothing; see `useLightboxControl` to replace the default expand button. */
|
|
668
|
+
declare function useLightbox(): LightboxApi | null;
|
|
669
|
+
/**
|
|
670
|
+
* The nearest `<Lightbox>`, for a component that draws its own expand
|
|
671
|
+
* control: while a caller is mounted, the lightbox hides its default corner
|
|
672
|
+
* button so the tile does not offer two. `<Trial>` uses this to put the
|
|
673
|
+
* control in its title bar.
|
|
674
|
+
*/
|
|
675
|
+
declare function useLightboxControl(): LightboxApi | null;
|
|
676
|
+
|
|
677
|
+
/** Elements a lightbox lifts with it, in top-layer order around itself. A
|
|
678
|
+
* null entry is skipped, so a ref that has not landed yet can be passed as
|
|
679
|
+
* it is. */
|
|
680
|
+
interface LightboxLayerSet {
|
|
681
|
+
below: readonly (HTMLElement | null)[];
|
|
682
|
+
above: readonly (HTMLElement | null)[];
|
|
683
|
+
}
|
|
684
|
+
/** Props for `<LightboxLayers>`. Keep the arrays stable across renders. */
|
|
685
|
+
interface LightboxLayersProps extends Partial<LightboxLayerSet> {
|
|
686
|
+
children: ReactNode;
|
|
687
|
+
}
|
|
688
|
+
/**
|
|
689
|
+
* Declares layers that belong to every lightbox below it: something drawn
|
|
690
|
+
* for the content from outside it, such as a shared buffer the tiles paint
|
|
691
|
+
* into. An open lightbox lifts each `below` layer, then itself, then each
|
|
692
|
+
* `above` layer into the top layer, each covering the window, so they keep
|
|
693
|
+
* stacking as they did. A layer is measured against the window while lifted,
|
|
694
|
+
* so whatever positions things inside it must re-measure — a labkit surface
|
|
695
|
+
* whose container is one of the layers does.
|
|
696
|
+
*/
|
|
697
|
+
declare function LightboxLayers({ below, above, children }: LightboxLayersProps): react.JSX.Element;
|
|
698
|
+
/** The layers declared above, or none. */
|
|
699
|
+
declare function useLightboxLayers(): LightboxLayerSet;
|
|
558
700
|
|
|
559
701
|
/** The specimen's sections, in page order. */
|
|
560
702
|
declare const SPECIMEN_SECTIONS: readonly ["Buttons & toggles", "Fields & pickers", "Panels & property rows", "Overlays & feedback", "Lists & data", "Tool chrome", "Editors & plots", "Lab chrome"];
|
|
@@ -665,5 +807,5 @@ interface TrialChromeProps {
|
|
|
665
807
|
* each region its slice. */
|
|
666
808
|
declare function TrialChrome({ trialId, record, instrument, isLastTrial, undoBindings, job, loupe, trialChrome, chrome, suppress, activeToolId, setActiveTool, children, }: TrialChromeProps): react.JSX.Element;
|
|
667
809
|
|
|
668
|
-
export { ANNOTATION_TOOLS, ANNOTATION_WEASEL_TOOLS, AnnotationData, AnnotationKind, AnnotationMeaning, AnnotationOverlay, AnnotationTarget, AnnotationTargets, AnnotationsApi, AnnotationsCapability, AnnotationsContext, CaptureOptions, CaptureResult, CaptureSource, ConfigField, ConfigRule, ConfigSchema, ControlRenderer, DEFAULT_VIEW, ExportMenu, Instrument, InstrumentList, JobHandle, Lab, LabBoundary, LabContribution, LabDensity, LabMode, LabPalette, LabRoot, LabShell, LabSwitcher, LabZoom, LoupeSwitchContext, MarkList, MarkScene, MarkStyle, PaintableMark, SPECIMEN_SECTIONS, Specimen, SplitProps, StorageAdapter, Trial, TrialBody, TrialChrome, TrialContribution, TrialInfo, TrialRecord, TrialTool, ViewTransform, Workspace, WorldRect, annotationToolInfo, as2DView, capturePlan, captureTarget, composeCaptureSvg, createMarkDrawOne, currentPage, defineInstrument, fitView, fromWeaselView, interstellarTheme, isStale, markSvgNodes, resolveMarkStyle, seenFrom, toWeaselView, useAnnotations, useAnnotationsOptional, validateConfigSchema };
|
|
669
|
-
export type { AnnotationOverlayProps, AnnotationTargetsProps, AnnotationToolInfo, CaptureArgs, CapturePlan, ComposeSvgArgs, ContentSize, InstrumentSpec, LabBoundaryProps, LabPage, LabPaletteProps, LabProps, LabRootProps, LabShellProps, LabSwitcherProps, LoupeSwitch, MarkDrawOptions, MarkListProps, PaneSize, PanelDescriptor, TrialBodyProps, TrialChromeProps, TrialLayout, TrialProps, UndoBindings, ValidationResult, ViewTransform2D, WorkspaceProps };
|
|
810
|
+
export { ANNOTATION_TOOLS, ANNOTATION_WEASEL_TOOLS, AnnotationData, AnnotationKind, AnnotationMeaning, AnnotationOverlay, AnnotationTarget, AnnotationTargets, AnnotationsApi, AnnotationsCapability, AnnotationsContext, CaptureOptions, CaptureResult, CaptureSource, ConfigField, ConfigRule, ConfigSchema, ControlRenderer, DEFAULT_VIEW, ExportMenu, Instrument, InstrumentList, JobHandle, Lab, LabBoundary, LabContribution, LabDensity, LabMode, LabPalette, LabRoot, LabShell, LabSwitcher, LabZoom, Lightbox, LightboxLayers, LoupeSwitchContext, MarkList, MarkScene, MarkStyle, PaintableMark, SPECIMEN_SECTIONS, Specimen, SplitProps, StorageAdapter, Trial, TrialBody, TrialChrome, TrialClock, TrialContribution, TrialInfo, TrialRecord, TrialTool, ViewTransform, Workspace, WorldRect, annotationToolInfo, as2DView, capturePlan, captureTarget, composeCaptureSvg, createMarkDrawOne, currentPage, defineInstrument, fitView, fromWeaselView, interstellarTheme, isStale, markSvgNodes, resolveMarkStyle, seenFrom, toWeaselView, useAnnotations, useAnnotationsOptional, useClockFrame, useLightbox, useLightboxControl, useLightboxLayers, usePresentation, useTrialClock, validateConfigSchema };
|
|
811
|
+
export type { AnnotationOverlayProps, AnnotationTargetsProps, AnnotationToolInfo, CaptureArgs, CapturePlan, ComposeSvgArgs, ContentSize, InstrumentSpec, LabBoundaryProps, LabPage, LabPaletteProps, LabProps, LabRootProps, LabShellProps, LabSwitcherProps, LightboxApi, LightboxLayerSet, LightboxLayersProps, LightboxProps, LoupeSwitch, MarkDrawOptions, MarkListProps, PaneSize, PanelDescriptor, Presentation, PresentationSeed, TrialBodyProps, TrialChromeProps, TrialLayout, TrialProps, UndoBindings, ValidationResult, ViewTransform2D, WorkspaceProps };
|