@weasel-js/core 1.6.1 → 1.7.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/CHANGELOG.md +242 -0
- package/README.md +24 -4
- package/dist/{builtins-HWyuLzE-.d.ts → builtins-DLn2lCr_.d.ts} +578 -10
- package/dist/{chunk-BJN5ZRIJ.js → chunk-3TY6FHAF.js} +7 -4
- package/dist/chunk-3TY6FHAF.js.map +1 -0
- package/dist/{chunk-H6N2JSZ3.js → chunk-DGWNNKGD.js} +3 -3
- package/dist/{chunk-H6N2JSZ3.js.map → chunk-DGWNNKGD.js.map} +1 -1
- package/dist/{chunk-MZAIDI6D.js → chunk-G4ZGQMY7.js} +2102 -1222
- package/dist/chunk-G4ZGQMY7.js.map +1 -0
- package/dist/{chunk-HPFJUUTF.js → chunk-LU4IJ52W.js} +5 -61
- package/dist/chunk-LU4IJ52W.js.map +1 -0
- package/dist/{chunk-D4AAWR64.js → chunk-M24CLARN.js} +4 -4
- package/dist/{chunk-D4AAWR64.js.map → chunk-M24CLARN.js.map} +1 -1
- package/dist/{chunk-4RJP2N2L.js → chunk-NE27EOLP.js} +8 -5
- package/dist/chunk-NE27EOLP.js.map +1 -0
- package/dist/{chunk-DOBSZOPR.js → chunk-UPZY4ART.js} +3 -3
- package/dist/{chunk-DOBSZOPR.js.map → chunk-UPZY4ART.js.map} +1 -1
- package/dist/{chunk-RMR4QMM6.js → chunk-WPNA6L5O.js} +4 -4
- package/dist/{chunk-RMR4QMM6.js.map → chunk-WPNA6L5O.js.map} +1 -1
- package/dist/{chunk-44EWMJV2.js → chunk-XMAWPGTK.js} +5 -5
- package/dist/{chunk-44EWMJV2.js.map → chunk-XMAWPGTK.js.map} +1 -1
- package/dist/clipboard.d.ts +1 -1
- package/dist/clipboard.js +3 -3
- package/dist/clone.d.ts +2 -2
- package/dist/clone.js +3 -3
- package/dist/grid-CY5UKlZh.d.ts +98 -0
- package/dist/index.css +11 -35
- package/dist/index.css.map +1 -1
- package/dist/index.d.ts +460 -784
- package/dist/index.js +9 -9
- package/dist/insert.d.ts +2 -3
- package/dist/insert.js +1 -1
- package/dist/move.d.ts +5 -4
- package/dist/move.js +4 -4
- package/dist/move.js.map +1 -1
- package/dist/patterns-builtin.js +1 -1
- package/dist/{pointSnapToGrid-7mCcm6qG.d.ts → pointSnapToGrid-Dp2IxLGb.d.ts} +53 -60
- package/dist/renderer.css +11 -35
- package/dist/renderer.css.map +1 -1
- package/dist/renderer.d.ts +16 -8
- package/dist/renderer.js +9 -9
- package/dist/resize.d.ts +3 -3
- package/dist/resize.js +2 -2
- package/dist/routing.d.ts +1 -1
- package/dist/routing.js +1 -1
- package/dist/{types-CxC8P6W0.d.ts → types-D-9QWBy5.d.ts} +9 -6
- package/dist/{types-D_74YlWs.d.ts → types-qYpyTAiZ.d.ts} +4 -7
- package/package.json +15 -12
- package/dist/chunk-4RJP2N2L.js.map +0 -1
- package/dist/chunk-BJN5ZRIJ.js.map +0 -1
- package/dist/chunk-HPFJUUTF.js.map +0 -1
- package/dist/chunk-MZAIDI6D.js.map +0 -1
- package/dist/grid-BXdz8GF2.d.ts +0 -158
- package/dist/options-CzjxFoYZ.d.ts +0 -67
package/dist/index.d.ts
CHANGED
|
@@ -1,44 +1,48 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
2
|
import react__default, { RefObject, ReactNode, Ref, MouseEvent, ComponentType, MutableRefObject } from 'react';
|
|
3
|
-
import {
|
|
4
|
-
export {
|
|
5
|
-
import {
|
|
6
|
-
export {
|
|
7
|
-
import {
|
|
3
|
+
import { UnitValue, UnitSystem, Display, UnitEntry, Unit } from '@weasel-js/quantity';
|
|
4
|
+
export { ANGLE_RADIANS, IMPERIAL_INCHES, METRIC_MM, PIXELS, Unit, UnitEntry, UnitScale, UnitSystem, UnitValue, formatUnit, resolveUnit, unitScale } from '@weasel-js/quantity';
|
|
5
|
+
import { y as RenderLayer, z as Dims, A as Scene, B as RectPose, F as InertiaConfig, V as ViewAnimationOptions, N as Node$1, H as GestureLifecycleOptions, J as PoseComposition, K as SliceDep, L as ToolsApi, O as Tool, Q as Contribution, U as LayerHit, D as DrawCommand, X as ChromeState, Y as VertexColorChannel, Z as RedrawSource, g as ShaderProgramHandle, _ as LayerGroup, $ as InsertExtras, a0 as SerializedScene, a1 as GeometryProjection, a2 as ContentHandlerEntry, a3 as SvgIngestOptions, a4 as AnyTool, a5 as PanBounds, a6 as Animator, a7 as ColorOverrideRegistry, a8 as UseSceneOptions, a9 as SceneRegistry, aa as RegisteredOp, ab as PoseOverrides, ac as DerivedDep, ad as ViewportDims, P as PathDrawCommand, ae as ViewApi, af as Affordance, ag as AffordanceRegion, ah as AffordanceBinding, ai as CommonAffordanceScratch, T as TextDrawCommand, aj as ShaderProgram, G as GlMat3, ak as BooleansAdapter, al as UseAnimatorOptions, am as SpringPresetName, an as EasingSpec, ao as AnimationHandle, ap as SampledTrack } from './builtins-DLn2lCr_.js';
|
|
6
|
+
export { aq as AddLayerSpec, ar as AddNodeSpec, as as AnimateToBoundsOptions, at as AreaSelectDep, au as BezierEasing, av as BooleanOp, aw as BooleanOpResult, ax as ClipboardDep, ay as ClipboardIngestCtx, az as ColorOverride, aA as ColorOverrideFn, aB as ContainerNode, aC as ContributionChrome, C as CullRect, aD as CustomPaintContext, aE as DecayLoopConfig, aF as DecayOptions, aG as EASINGS, aH as EasingFn, aI as EasingName, aJ as EditAnchorsDep, E as Effect, aK as EventBooking, aL as EventBookingHandle, aM as EventTrack, aN as FitViewToBoundsOptions, a as GroupDrawCommand, aO as IDENTITY_POSE_COMPOSITION, b as ImageDrawCommand, c as ImageMinification, aP as IngestCtx, aQ as IngestionDep, aR as InsertDep, aS as Interpolate, aT as InterpolatorFactory, aU as Keyframe, aV as LassoSelectDep, aW as LayerCommandCache, aX as LayerDrawFailure, aY as LayerRecord, aZ as LayoutDep, a_ as LeafNode, a$ as LoopFactory, b0 as LoopOptions, b1 as NestedTimeline, b2 as NodeAtPointDep, b3 as PhysicsHandle, b4 as PhysicsOptions, b5 as PointerContextProvider, b6 as PointerContextValue, b7 as PointerWorldPos, b8 as PoseAdapter, b9 as PoseClosure, ba as PoseOverride, bb as RECT_POSE_COMPOSITION, bc as RIGID_POSE_COMPOSITION, R as RenderTarget, bd as ResizePolicy, be as SPRING_PRESETS, S as SPRITE_STRIDE, bf as SerializedNode, f as ShaderDrawCommand, h as ShaderUniform, bg as SnapDep, bh as SpringOptions, bi as SpringPreset, j as SpriteSheet, k as SpritesDrawCommand, bj as StaggerBuilder, bk as StaggerDelay, bl as StaggerFactory, bm as StaggerOptions, bn as StaggerPerItem, bo as StaggerSpringPoseOptions, bp as StaggerTweenOptions, bq as SvgUnpacker, br as SystemLayerRecord, bs as SystemLayerSpec, bt as TextEditDep, bu as TimelineClock, bv as TimelineEvent, bw as TimelineHandle, bx as TimelineOptions, by as TimelineTrack, bz as ToolDef, bA as Track, bB as TweenLoopOptions, bC as TweenOptions, bD as UseToolsOptions, bE as UserLayerRecord, bF as VIEW_ANIMATION_KEY, bG as ViewAnimationApi, bH as ViewChannel, bI as applyBooleanOp, bJ as asNodeId, n as blur, bK as composeRectPose, bL as composeRigidPose, bM as composeWorldPose, bN as createPointerStore, bO as cubicBezierEasing, p as cullDrawCommands, bP as decomposeRectPose, bQ as decomposeRigidPose, bR as drawLayers, bS as drawOneLayer, bT as easeIn, bU as easeInBack, bV as easeInBounce, bW as easeInCirc, bX as easeInCubic, bY as easeInElastic, bZ as easeInExpo, b_ as easeInOut, b$ as easeInOutBack, c0 as easeInOutBounce, c1 as easeInOutCirc, c2 as easeInOutCubic, c3 as easeInOutElastic, c4 as easeInOutExpo, c5 as easeInOutQuad, c6 as easeInOutQuart, c7 as easeInOutQuint, c8 as easeInOutSine, c9 as easeInQuad, ca as easeInQuart, cb as easeInQuint, cc as easeInSine, cd as easeOut, ce as easeOutBack, cf as easeOutBounce, cg as easeOutCirc, ch as easeOutCubic, ci as easeOutElastic, cj as easeOutExpo, ck as easeOutQuad, cl as easeOutQuart, cm as easeOutQuint, cn as easeOutSine, co as fitViewToBounds, q as frameRect, cp as isLayerPainted, cq as isLayerVisible, cr as linear, r as mat3, cs as rebaseLocalPose, ct as registerContentHandler, t as registerEffect, cu as resolveEasing, cv as resolveStrokeWidth, cw as subscribeToSources, cx as translateRectPose, cy as useDecayLoop, cz as usePointerContext, cA as usePointerPosition, cB as useTools, cC as useViewAnimation, cD as useViewAnimationOn, w as viewToMat3, x as vignette, cE as worldPoseLookup } from './builtins-DLn2lCr_.js';
|
|
7
|
+
import { Stroke, FillStyle, TextureHandle, GradientUnits, ColorSpace, GradStop, TilePatternSpec, GradientKind, GradientFill, MarkerKey, MarkerRef, Palette } from '@weasel-js/paint';
|
|
8
8
|
export { ColorInterpolationSpace, ColorSpace, FillStyle, GradStop, GradientFill, GradientKind, GradientUnits, HueInterpolation, KitMarkerKey, MarkerKey, MarkerRef, OklchDeg, Region, STROKE_DASH_RATIOS, ScreenLength, Stroke, StrokeAlign, StrokeDashStyle, TextureHandle, TilePatternSpec, alignedStrokeRect, contrastLineColor, dashForStrokeStyle, hexToOklchDeg, hslToSrgb, interpolateSrgb, lerpColorArray, lerpOklab, lerpOklch, linearSrgbToOklab, linearToSrgb, oklabToLinearSrgb, oklabToOklch, oklabToSrgbU8, oklchDegToHex, oklchToOklab, resolveScreenLength, srgbFloatToOklab, srgbToHsl, srgbToLinear, srgbU8ToOklab, strokeDashStyleOf } from '@weasel-js/paint';
|
|
9
|
-
import {
|
|
10
|
-
export {
|
|
11
|
-
import { CursorSpec, PaintedCursorState } from '@weasel-js/cursor';
|
|
12
|
-
export { BakeOptions, CursorGlyph, CursorGlyphName, CursorGlyphSpec, CursorSpec, PaintedCursor, PaintedCursorFrame, PaintedCursorState, ResolvedCursor, bakeCursor, createPaintedCursorState, cursorFor, resolveCursor, resolveCursorTier } from '@weasel-js/cursor';
|
|
13
|
-
import { ClaimableGesture, GestureSpec } from '@weasel-js/gestures';
|
|
14
|
-
export { ClaimableGesture, ClickSpec, DragSpec, DropSpec, GestureSpec, KeyHeldSpec, KeySpec, ModSpec, MultiTouchSpec, PasteSpec, PinchSpec, TargetSpec, WheelSpec } from '@weasel-js/gestures';
|
|
9
|
+
import { View, HitShape, HandleKind, NodeId, PointerSessionCancelReason, DeviceProfile, Bounds, Action, SelectionMode, SelectionExtendKey, SelectionApi, DepSchema, GestureBinding, ToolKeybinding, HotkeyTrigger, ModifierState, RuleCtx, Rule, IngestItem, OngoingOverlay, DebugSink, DepName, ActionsProp, OverlayRole, ResizeAnchor, Point2 } from '@weasel-js/routing';
|
|
10
|
+
export { ALWAYS, Action, ActionDeps, ActionDisabledReason, ActionDispatch, ActionEnabledResult, ActionEntry, ActionItem, ActionPresentation, ActionVariant, ActionsProp, ActionsRegistry, AffordanceHit, BindingOpts, BindingScope, BindingSource, BoundGesture, Bounds, BuildRuleCtxArgs, COARSE_TARGET_SCALE, ContributionDeps, ContributionRouting, DEFAULT_ALLOWED_CAPABILITIES, DEFAULT_DEVICE_PROFILE, DRAG_THRESHOLD_PX, DebugSink, DepName, DepRegistry, DepSchema, DetectedDeviceFacts, DeviceProfile, Dispatcher, DispatcherContext, DragSample, Eligibility, EligibilityState, GestureBinding, HandleKind, HitShape, HotkeyTrigger, ImmediateInvoker, IngestItem, InputEvent, InvocationCtx, Invoker, MatchResult, ModeShortcutHandlers, ModifierState, NEVER, NodeId, OngoingHandle, OngoingInvoker, OngoingOverlay, OverlayPosition, OverlayRole, Point2, PointerSession, PointerSessionCallbacks, PointerSessionCancelReason, PointerSessionOptions, ResizeAnchor, ResolveAllOptions, ResolveOnlyResult, ResolvedCandidate, Rule, RuleCtx, ScopedBinding, ScratchKey, ScratchStore, SelectionApi, SelectionExtendKey, SelectionMode, Selector, ToolCtx, ToolKeybinding, ToolLifecycleCtx, ToolModifiers, ToolPresentation, ToolSlot, UiOngoingControl, Point2 as Vec2, View, actionBindings, actionItems, buildDepsFromRequires, buildRuleCtx, clientToCanvas, createDepRegistry, createDispatcher, defineTool, deleteScratch, describeRule, evaluate, evaluateEnabled, getScratch, isEditableTarget, liveScope, matchesKeyBinding, modeShortcutSpec, modeShortcuts, openPointerSession, pastDragThreshold, resolveDeviceProfile, resolveParams, scopeBindings, scratchKey, setScratch, specificity } from '@weasel-js/routing';
|
|
15
11
|
import { S as SimulationNode, U as UseSimulationOptions, a as Simulation, P as PathBuilder } from './math-MCQcf_gc.js';
|
|
16
12
|
export { D as DEFAULT_ALPHA_DECAY, b as DEFAULT_ALPHA_MIN, c as DEFAULT_VELOCITY_DECAY, d as PathStation, e as PointAlongPathOptions, f as SimulationCore, g as SimulationForce, h as SimulationOptions, i as aabbCenter, j as createSimulation, k as ellipsePath, l as linePath, p as pointAlongPath, m as pointInRotatedRect, n as polygonFromPoints, o as polylineFromPoints, r as rectCorners, q as rectPath, s as regularPolygonPath, t as rotatePoint, u as rotatedRectCorners, v as starPath } from './math-MCQcf_gc.js';
|
|
17
|
-
import {
|
|
18
|
-
export { ActionsProvider,
|
|
19
|
-
import {
|
|
20
|
-
export {
|
|
13
|
+
import { Yoke } from '@weasel-js/routing/react';
|
|
14
|
+
export { ActionsProvider, ActiveToolContextProvider, ActiveToolContextProviderIfRoot, ActiveToolContextProviderProps, ActiveToolContextValue, DepRegistryProvider, DispatcherChannels, InputScope, OngoingAction, UseGestureDispatcherOptions, Yoke, useAction, useActionsRegistry, useActiveToolContext, useDepRegistry, useDepSource, useGestureDispatcher, useOngoingAction, useOptionalActiveToolContext, useOptionalDepRegistry, useYoke } from '@weasel-js/routing/react';
|
|
15
|
+
import { GestureSpec } from '@weasel-js/gestures';
|
|
16
|
+
export { ClaimableGesture, ClickSpec, DragSpec, DropSpec, GestureSpec, KeyHeldSpec, KeySpec, ModSpec, MultiTouchSpec, PasteSpec, PinchSpec, TargetSpec, WheelSpec } from '@weasel-js/gestures';
|
|
17
|
+
import { B as BoundsConstraint, P as PointSnapBehavior, R as RotateBehavior, L as LassoSelectBehavior, S as SnapStrategy, M as MoveBehavior, I as InsertBehavior } from './types-qYpyTAiZ.js';
|
|
18
|
+
export { A as ActionBehavior, b as AreaSelectOverlay, c as BehaviorMoveResult, d as BehaviorResult, C as CloneBehavior, e as CloneLayer, f as ClonePose, G as GestureContext, g as GroupTransform, h as InsertMoveResult, i as InsertOverlay, j as InsertPoint, k as InsertProposed, l as LassoSelectMoveResult, m as LassoSelectOverlay, n as LassoSelectPose, o as LassoSelectProposed, p as PointSnapContext, a as PointSnapFrame, q as PointSnapResult, r as PointerState, s as ResizeMoveResult, t as ResizeOverlay, u as ResizeProposed, v as RotateMoveResult, w as RotateOverlay, x as RotateProposed } from './types-qYpyTAiZ.js';
|
|
21
19
|
import { P as PoseDescriptor, b as RotatedPose } from './poseDescriptor-rZa9W5hJ.js';
|
|
22
20
|
export { R as RECT_POSE_DESCRIPTOR, a as ROTATED_POSE_DESCRIPTOR, p as poseDescriptorForNode, t as translatePoseViaDescriptor, v as visualBoundsViaDescriptor } from './poseDescriptor-rZa9W5hJ.js';
|
|
23
|
-
import { U as UseResizeOptions } from './pointSnapToGrid-
|
|
24
|
-
export { C as CORNER_ANCHORS, a as CornerAnchor, e as CornerEdge, b as CornerHandle, c as cornerPoint, d as cornerResizeHandles, h as hitCornerHandle, p as pointSnapToGrid } from './pointSnapToGrid-
|
|
25
|
-
import { M as MoveAdapter, A as AreaSelectAdapter, c as LassoHitMode, d as LassoSelectAdapter, R as ResizeAdapter, e as RotateAdapter, L as LayoutStrategy, f as LayerEnumerableAdapter, I as InsertAdapter, C as ClipboardSnapshot, b as LayoutDropTargetMode, O as OrderedAdapter, a as SceneAdapter, g as LayoutSnap } from './types-
|
|
26
|
-
export { h as ContainerBounds, D as DropRegion, i as DropTarget, j as LayoutChild, k as LayoutContainer, l as LayoutDragged, S as SnapTarget } from './types-
|
|
21
|
+
import { U as UseResizeOptions } from './pointSnapToGrid-Dp2IxLGb.js';
|
|
22
|
+
export { C as CORNER_ANCHORS, a as CornerAnchor, e as CornerEdge, b as CornerHandle, c as cornerPoint, d as cornerResizeHandles, f as fixedCornerOf, h as hitCornerHandle, p as pointSnapToGrid } from './pointSnapToGrid-Dp2IxLGb.js';
|
|
23
|
+
import { M as MoveAdapter, A as AreaSelectAdapter, c as LassoHitMode, d as LassoSelectAdapter, R as ResizeAdapter, e as RotateAdapter, L as LayoutStrategy, f as LayerEnumerableAdapter, I as InsertAdapter, C as ClipboardSnapshot, b as LayoutDropTargetMode, O as OrderedAdapter, a as SceneAdapter, g as LayoutSnap } from './types-D-9QWBy5.js';
|
|
24
|
+
export { h as ContainerBounds, D as DropRegion, i as DropTarget, j as LayoutChild, k as LayoutContainer, l as LayoutDragged, S as SnapTarget } from './types-D-9QWBy5.js';
|
|
25
|
+
import { U as UseMoveOptions, O as OriginProjection } from './grid-CY5UKlZh.js';
|
|
26
|
+
export { R as RECT_ORIGIN_PROJECTION, g as gridSnapStrategy, p as pointToGridCell } from './grid-CY5UKlZh.js';
|
|
27
27
|
import { a as PolygonPath, P as Path, R as RectPath } from './path-JEV2c5If.js';
|
|
28
28
|
export { b as PathFillRule } from './path-JEV2c5If.js';
|
|
29
|
+
import { PaintedCursorState, CursorSpec } from '@weasel-js/cursor';
|
|
30
|
+
export { BakeOptions, CursorGlyph, CursorGlyphName, CursorGlyphSpec, CursorSpec, PaintedCursor, PaintedCursorFrame, PaintedCursorState, ResolvedCursor, bakeCursor, createPaintedCursorState, cursorFor, resolveCursor, resolveCursorTier } from '@weasel-js/cursor';
|
|
29
31
|
import { Op, HistorySelection, CreateHistoryOptions, History } from '@weasel-js/history';
|
|
30
32
|
export * from '@weasel-js/history';
|
|
31
33
|
export { Op } from '@weasel-js/history';
|
|
34
|
+
import { ModeRegistry, ModeDecorations } from '@weasel-js/modes';
|
|
32
35
|
import { PlacementAlign, Rect, Mat3 } from '@weasel-js/geom';
|
|
33
36
|
export { DEFAULT_FLATTEN_TOLERANCE, PATH_C, PATH_CMD_LENGTHS, PATH_L, PATH_M, PATH_Q, PATH_Z, Rect, flattenCubic, flattenCubicWithArcLen, flattenQuadratic, flattenQuadraticWithArcLen, pathCommandCoordCount } from '@weasel-js/geom';
|
|
34
37
|
import { TextRenderer, TextPose, StyledRun, TextStyle, TextVerticalAlign, TextPaint } from '@weasel-js/text';
|
|
35
38
|
export { DEFAULT_TEXT_STYLE, LaidOutDecoration, LaidOutGroup, LaidOutLineBox, LaidOutOutlineGlyph, LaidOutQuad, LaidOutRuns, LayoutLine, LayoutResult, LayoutRunsOpts, MARKDOWN_RUN_GRAMMAR, MarkdownFontOptions, MeasureFn, MeasureTextBoundsOpts, MeasuredText, PositionedRun, ResolvedRun, ResolvedTextStyle, RunFlag, RunGrammar, RunMarker, RunSourceMap, SCRIPT_METRICS, StyledRun, TextAlign, TextDirection, TextLineBoxesOpts, TextPaint, TextPose, TextPoseLayout, TextPoseLayoutInput, TextRenderer, TextStyle, TextTransform, TextVerticalAlign, TransformedRunText, cachedLayoutRuns, createMarkdownRenderer, fontString, layoutMarkdown, layoutRuns, layoutTextPose, markdownToRuns, measureText, measureTextBounds, measuredWidth, resolveAlign, resolveRuns, resolveTextStyle, runsToMarkdown, runsToPlainText, textLineBoxes, textPoseLayoutInput, toRuns, transformRunTexts, verticalAlignOffset } from '@weasel-js/text';
|
|
39
|
+
import { Reflection } from '@weasel-js/registry';
|
|
40
|
+
export { Reflectable, ReflectedEntry, Reflection, RegisterOptions, Registrant, createReflectable } from '@weasel-js/registry';
|
|
36
41
|
import { G as Guide } from './types-D2tTKEU0.js';
|
|
37
42
|
export { A as AUTO_POSE_DESCRIPTOR, i as isPathLike, a as isRectPose } from './autoPoseDescriptor-_XOyF7t4.js';
|
|
38
|
-
export { U as UseInsertOptions } from './options-CzjxFoYZ.js';
|
|
39
43
|
export { UseClipboardOpsOptions, UseClipboardOpsReturn, WEASEL_CLIPBOARD_MIME, WEASEL_CLIPBOARD_MIME_WEB, buildWeaselClipboardText, embedWeaselMetadataInSvg, extractWeaselClipboardFromSvg, parseWeaselClipboardText, sniffWeaselClipboardText, useClipboardOps } from './clipboard.js';
|
|
40
44
|
export { cloneByAltDrag } from './clone.js';
|
|
41
|
-
export { FontStyle, FontVariant, LocalFontOutlinesResult, OutlineSource, OutlineStatus, OutlineVariant, canQueryLocalFonts, enableLocalFontOutlines, hasFontOutlines, isCanvasFont, listFontOutlines, outlineStatus, registerCanvasFont, registerFont, registerFontOutlines, subscribeGlyphReady, unregisterCanvasFont, unregisterFontOutlines } from '@weasel-js/font';
|
|
45
|
+
export { FontFamilyFaces, FontStyle, FontVariant, LocalFontOutlinesResult, OutlineFaceInfo, OutlineSource, OutlineStatus, OutlineVariant, canQueryLocalFonts, enableLocalFontOutlines, fontOutlineRegistry, fontRegistry, hasFontOutlines, isCanvasFont, listFontOutlines, outlineStatus, registerCanvasFont, registerFont, registerFontOutlines, subscribeGlyphReady, unregisterCanvasFont, unregisterFontOutlines } from '@weasel-js/font';
|
|
42
46
|
|
|
43
47
|
/** Pan offset (in pixels) plus per-axis zoom (pixels per content unit). */
|
|
44
48
|
interface ViewTransform {
|
|
@@ -300,490 +304,6 @@ interface UseGridCellHoverReturn {
|
|
|
300
304
|
/** Track which grid cell the pointer is over; pairs with `createCellHighlightLayer`. */
|
|
301
305
|
declare function useGridCellHover(opts: UseGridCellHoverOptions): UseGridCellHoverReturn;
|
|
302
306
|
|
|
303
|
-
interface ChromeState {
|
|
304
|
-
/** Currently selected ids. Live; reflects useSelection's React state. */
|
|
305
|
-
readonly selection: readonly NodeId[];
|
|
306
|
-
/** True when the canvas is in multi-mode AND >= 2 ids are selected. */
|
|
307
|
-
readonly multiActive: boolean;
|
|
308
|
-
/** Bounds for any selection member id. Honors active-tool overlay state
|
|
309
|
-
* (move/resize/rotate ghosts → ghost bounds; otherwise → committed
|
|
310
|
-
* pose bounds). Returns null for unknown ids or ids whose bounds aren't
|
|
311
|
-
* computable. */
|
|
312
|
-
boundsOf(id: string): Bounds | null;
|
|
313
|
-
/** Multi-union AABB when `multiActive`. Computed lazily from `boundsOf`
|
|
314
|
-
* over every selected id, expanding rotated members to the extent of
|
|
315
|
-
* their ink; null otherwise. */
|
|
316
|
-
readonly unionBounds: Bounds | null;
|
|
317
|
-
/** Active modifier state at the moment of the call. */
|
|
318
|
-
readonly modifiers: ModifierState;
|
|
319
|
-
/** True iff the node's pose-descriptor declares it can carry a rotation.
|
|
320
|
-
* Affordances consult this to decide whether to expose rotate cursors /
|
|
321
|
-
* drag-bands. Defaults to `true` when the descriptor doesn't declare
|
|
322
|
-
* (back-compat) or when the id is unknown — the rotation gesture will
|
|
323
|
-
* no-op visually for poses without AABB fields, but the affordance
|
|
324
|
-
* doesn't lie about the cursor. Optional on the interface so unit-test
|
|
325
|
-
* call sites that construct `ChromeState` by hand keep compiling;
|
|
326
|
-
* affordances should treat an absent predicate as "true". */
|
|
327
|
-
canRotate?(id: string): boolean;
|
|
328
|
-
}
|
|
329
|
-
|
|
330
|
-
/**
|
|
331
|
-
* @experimental
|
|
332
|
-
* A single interactive piece of chrome. Pure functions; the kit composes
|
|
333
|
-
* multiple affordances into a single RenderLayer per tool via
|
|
334
|
-
* `composeAffordanceLayer`.
|
|
335
|
-
*
|
|
336
|
-
* Affordances declare interactive regions in a target's *local* frame.
|
|
337
|
-
* The framework (`composeAffordanceLayer`) composes the target's bounds
|
|
338
|
-
* transform (rotation around the AABB center, when present) for both paint
|
|
339
|
-
* and hit-test, so the affordance never touches rotation, view.scale, or
|
|
340
|
-
* world↔screen math.
|
|
341
|
-
*/
|
|
342
|
-
interface Affordance {
|
|
343
|
-
/** Stable id for debug overlays + visibility maps. */
|
|
344
|
-
id: string;
|
|
345
|
-
/** Enumerate this affordance's interactive regions. Each region lives in
|
|
346
|
-
* some target id's local frame (or in the world frame when `targetId`
|
|
347
|
-
* is `null`). Returning `[]` means "no chrome for this state" (no
|
|
348
|
-
* selection, multi-mode disabled, etc.). */
|
|
349
|
-
regions(state: ChromeState): readonly AffordanceRegion[];
|
|
350
|
-
/** Optional non-interactive decoration (e.g., a leader line drawn from
|
|
351
|
-
* a bounds edge to a handle — visual only, not draggable). Receives
|
|
352
|
-
* raw state + view because the decoration may live outside any single
|
|
353
|
-
* target's local frame. Most affordances leave this undefined. */
|
|
354
|
-
decorate?(state: ChromeState, view: View): DrawCommand[];
|
|
355
|
-
}
|
|
356
|
-
/**
|
|
357
|
-
* @experimental
|
|
358
|
-
* One interactive region produced by an affordance. The framework owns
|
|
359
|
-
* the local↔world transform for `targetId` (when non-null), so `shape`,
|
|
360
|
-
* `paint.sizePx`, and `hitRadiusPx` are always specified in coordinates
|
|
361
|
-
* the affordance can reason about directly.
|
|
362
|
-
*/
|
|
363
|
-
interface AffordanceRegion<TScratch = unknown> {
|
|
364
|
-
/** Stable id, e.g. `corner-min-min`. Used for debug overlays + a11y. */
|
|
365
|
-
id: string;
|
|
366
|
-
/** Target id whose `state.boundsOf(targetId)` defines this region's
|
|
367
|
-
* local frame. `bounds.rotation` (if present) is the only transform
|
|
368
|
-
* applied — translation is the AABB origin; scale is identity. Pass
|
|
369
|
-
* `null` for affordances anchored to the viewport / world frame
|
|
370
|
-
* (identity transform). */
|
|
371
|
-
targetId: string | null;
|
|
372
|
-
/** Region geometry, expressed in the target's local frame.
|
|
373
|
-
*
|
|
374
|
-
* - `point` — circular hit (`hitRadiusPx` is screen-space).
|
|
375
|
-
* - `rect` — axis-aligned rect (target rotation applies).
|
|
376
|
-
* - `annulus` — outer ellipse minus inner rect cutout. Used for
|
|
377
|
-
* invisible zones that sit *around* the AABB (e.g. rotate-on-
|
|
378
|
-
* hover band). The outer ellipse is defined by world-space
|
|
379
|
-
* semi-axes `rx` / `ry` around `(cx, cy)`; the inner rect is the
|
|
380
|
-
* same target-local rect that defines the AABB. Hit-test:
|
|
381
|
-
* inside outer ellipse AND outside inner rect. */
|
|
382
|
-
shape: {
|
|
383
|
-
kind: 'point';
|
|
384
|
-
x: number;
|
|
385
|
-
y: number;
|
|
386
|
-
hitRadiusPx: number;
|
|
387
|
-
} | {
|
|
388
|
-
kind: 'rect';
|
|
389
|
-
x: number;
|
|
390
|
-
y: number;
|
|
391
|
-
width: number;
|
|
392
|
-
height: number;
|
|
393
|
-
} | {
|
|
394
|
-
kind: 'annulus';
|
|
395
|
-
/** Outer-ellipse center (target-local). */
|
|
396
|
-
cx: number;
|
|
397
|
-
cy: number;
|
|
398
|
-
/** Outer-ellipse semi-axes (target-local). */
|
|
399
|
-
rx: number;
|
|
400
|
-
ry: number;
|
|
401
|
-
/** Inner rect (target-local) — the cutout. Typically the
|
|
402
|
-
* selection's AABB. */
|
|
403
|
-
innerX: number;
|
|
404
|
-
innerY: number;
|
|
405
|
-
innerWidth: number;
|
|
406
|
-
innerHeight: number;
|
|
407
|
-
/** Minimum band thickness outside the inner rect, in **screen**
|
|
408
|
-
* pixels. The framework widens `rx`/`ry` to at least
|
|
409
|
-
* `innerHalfExtent + minBandPx / meanScale(view.scale)` for both
|
|
410
|
-
* paint and hit-test.
|
|
411
|
-
*
|
|
412
|
-
* This exists because the clamp has to know the view and the
|
|
413
|
-
* affordance doesn't: `ChromeState` carries no scale. Expressing the
|
|
414
|
-
* floor in world units instead (which is what the rotate ring used
|
|
415
|
-
* to do) makes the band shrink on screen as you zoom in, until the
|
|
416
|
-
* ring around a small shape is too thin to hover. */
|
|
417
|
-
minBandPx?: number;
|
|
418
|
-
};
|
|
419
|
-
/** Optional paint. World position is derived from `shape` + target
|
|
420
|
-
* transform; visual size stays in screen pixels (so handles don't
|
|
421
|
-
* warp under zoom or non-uniform scale). Omit for hit-only regions.
|
|
422
|
-
*
|
|
423
|
-
* - `square` — small fixed-size square (only valid over `point` shapes).
|
|
424
|
-
* - `annulus` — fill + stroke the annulus ring (only valid over
|
|
425
|
-
* `annulus` shapes). Uses even-odd fill rule to punch the inner-rect
|
|
426
|
-
* cutout.
|
|
427
|
-
* - `custom` — emit arbitrary draw commands; receives a {@link CustomPaintContext}. */
|
|
428
|
-
paint?: {
|
|
429
|
-
kind: 'square';
|
|
430
|
-
sizePx: number;
|
|
431
|
-
fill?: FillStyle;
|
|
432
|
-
stroke?: Stroke;
|
|
433
|
-
} | {
|
|
434
|
-
kind: 'annulus';
|
|
435
|
-
fill?: FillStyle;
|
|
436
|
-
stroke?: Stroke;
|
|
437
|
-
insetPx?: number;
|
|
438
|
-
} | {
|
|
439
|
-
kind: 'custom';
|
|
440
|
-
draw: (ctx: CustomPaintContext) => DrawCommand[];
|
|
441
|
-
};
|
|
442
|
-
/** Discriminator a press on this region reports as `AffordanceHit.kind` —
|
|
443
|
-
* the string routing specs match on (`'handle:top-left'`,
|
|
444
|
-
* `'rotate-handle'`, `'anchor:3'`). Omit for regions that only exist
|
|
445
|
-
* inside a consumer-registered layer, where the layer id is the
|
|
446
|
-
* discriminator; `buildAffordanceAt` falls back to
|
|
447
|
-
* `<affordanceId>:<regionId>`. */
|
|
448
|
-
hitKind?: string;
|
|
449
|
-
/** Cursor to show while hovering this region. Read by the hover-cursor
|
|
450
|
-
* pump in `useGestureDispatcher` via `AffordanceHit.cursor`, which
|
|
451
|
-
* `buildAffordanceAt` fills in from the region the walk landed on. */
|
|
452
|
-
cursor?: CursorSpec;
|
|
453
|
-
/** `'exclusive'` bars every binding whose target doesn't consult the
|
|
454
|
-
* affordance. Read only when the affordance is composed into a
|
|
455
|
-
* consumer-registered layer; kit chrome routes through
|
|
456
|
-
* `buildAffordanceAt`, which reports `'shared'`. */
|
|
457
|
-
strength?: 'exclusive' | 'shared';
|
|
458
|
-
/** Which gestures an exclusive claim bars. Omitted bars all of them. */
|
|
459
|
-
claimedKinds?: readonly ClaimableGesture[];
|
|
460
|
-
/** Drag binding produced when this region is hit. Lazily called so
|
|
461
|
-
* affordances don't pay binding-construction cost on every paint frame —
|
|
462
|
-
* state snapshots (e.g., capturing per-leaf poses at click time) belong
|
|
463
|
-
* inside `bind()`, not inside `regions()`. */
|
|
464
|
-
bind(): AffordanceBinding<TScratch>;
|
|
465
|
-
}
|
|
466
|
-
/** Context passed to a region's `paint.kind === 'custom'` draw callback.
|
|
467
|
-
* Provides both the world-space anchor (already transformed) and the
|
|
468
|
-
* original local shape, for affordances that want to do additional
|
|
469
|
-
* geometry themselves. */
|
|
470
|
-
interface CustomPaintContext {
|
|
471
|
-
/** World-space mapping of `shape`. For `point`, only `x`/`y` are set.
|
|
472
|
-
* For `rect`, all four fields are set. */
|
|
473
|
-
world: {
|
|
474
|
-
x: number;
|
|
475
|
-
y: number;
|
|
476
|
-
width?: number;
|
|
477
|
-
height?: number;
|
|
478
|
-
};
|
|
479
|
-
/** The original local shape (same object identity as `region.shape`). */
|
|
480
|
-
local: AffordanceRegion['shape'];
|
|
481
|
-
view: View;
|
|
482
|
-
state: ChromeState;
|
|
483
|
-
}
|
|
484
|
-
/**
|
|
485
|
-
* @experimental
|
|
486
|
-
* Result of an affordance hit — what the region computed about itself.
|
|
487
|
-
*
|
|
488
|
-
* `initialScratch` is the payload: what the region already knows (which
|
|
489
|
-
* corner, which target id) so the action that picks up the drag doesn't
|
|
490
|
-
* re-derive it. `<SceneCanvas>` reads it out of the layer hit-test and packs
|
|
491
|
-
* it into `AffordanceHit`, which flows to the matching action through
|
|
492
|
-
* `InvocationCtx.drag.affordance`.
|
|
493
|
-
*
|
|
494
|
-
* This used to also carry a `drag: DragChannel` naming the handlers the
|
|
495
|
-
* tool-routing dispatcher should wire up. Every implementation supplied a
|
|
496
|
-
* no-op stub that claimed, because the real routing had already moved to
|
|
497
|
-
* bindings; the field went with that dispatcher.
|
|
498
|
-
*/
|
|
499
|
-
interface AffordanceBinding<TScratch = unknown> {
|
|
500
|
-
initialScratch?: TScratch;
|
|
501
|
-
}
|
|
502
|
-
/**
|
|
503
|
-
* The fields `buildAffordanceAt` lifts out of a region's `initialScratch`
|
|
504
|
-
* when it turns a region hit into an `AffordanceHit`.
|
|
505
|
-
*
|
|
506
|
-
* Scratch is otherwise opaque — whatever the affordance wants to hand the
|
|
507
|
-
* action that picks up the drag. These few names are the exception: they mean
|
|
508
|
-
* the same thing to every affordance, and the actions that consume them
|
|
509
|
-
* (`resizeAction`, `rotateAction`) read them off `AffordanceHit` rather than
|
|
510
|
-
* out of scratch. An affordance that doesn't set them simply produces a hit
|
|
511
|
-
* without those fields.
|
|
512
|
-
*/
|
|
513
|
-
interface CommonAffordanceScratch {
|
|
514
|
-
/** The node (or `MULTI_RESIZE_TARGET_ID`) this chrome acts on. Becomes
|
|
515
|
-
* `AffordanceHit.targetIds`. */
|
|
516
|
-
targetId?: string;
|
|
517
|
-
/** For resize chrome: which corner stays pinned. Mirrors the kit's
|
|
518
|
-
* `ResizeAnchor`, spelled inline so `affordances/` doesn't take a type
|
|
519
|
-
* dependency on the gesture layer for one field. */
|
|
520
|
-
anchor?: {
|
|
521
|
-
x: 'min' | 'max' | 'free';
|
|
522
|
-
y: 'min' | 'max' | 'free';
|
|
523
|
-
};
|
|
524
|
-
/** World-space invariant point of the transform — the fixed corner for a
|
|
525
|
-
* resize, the pivot for a rotation. */
|
|
526
|
-
fixedPoint?: {
|
|
527
|
-
x: number;
|
|
528
|
-
y: number;
|
|
529
|
-
};
|
|
530
|
-
}
|
|
531
|
-
/**
|
|
532
|
-
* What a **registered layer's** `hitTest` returns. Extends `AffordanceBinding`
|
|
533
|
-
* so existing implementations keep typechecking; the added fields are how a
|
|
534
|
-
* consumer's own chrome says the things kit chrome says through
|
|
535
|
-
* `AffordanceRegion` — which cursor to show, and whether it owns the point
|
|
536
|
-
* outright.
|
|
537
|
-
*/
|
|
538
|
-
interface LayerHit<TScratch = unknown> extends AffordanceBinding<TScratch> {
|
|
539
|
-
/** Cursor while the pointer is over this hit. Reaches the hover-cursor
|
|
540
|
-
* pump as `AffordanceHit.cursor`, the same path kit chrome uses. */
|
|
541
|
-
cursor?: CursorSpec;
|
|
542
|
-
/** `'exclusive'` bars every binding whose target doesn't consult the
|
|
543
|
-
* affordance. Omitted means `'shared'` — today's behavior. Same name and
|
|
544
|
-
* meaning as `AffordanceHit.strength`, which it becomes. */
|
|
545
|
-
strength?: 'exclusive' | 'shared';
|
|
546
|
-
/** Which gestures an exclusive claim bars. Omitted bars all of them. */
|
|
547
|
-
claimedKinds?: readonly ClaimableGesture[];
|
|
548
|
-
}
|
|
549
|
-
|
|
550
|
-
/**
|
|
551
|
-
* Canvas size in CSS pixels — passed to `draw` for layers that anchor to
|
|
552
|
-
* canvas edges (e.g. the debug overlay's layer-list panel). The GL backend
|
|
553
|
-
* supplies it explicitly so layers don't have to know about DPR.
|
|
554
|
-
*/
|
|
555
|
-
interface Dims {
|
|
556
|
-
width: number;
|
|
557
|
-
height: number;
|
|
558
|
-
}
|
|
559
|
-
/**
|
|
560
|
-
* What a layer's `draw` threw, and which layer threw it.
|
|
561
|
-
*
|
|
562
|
-
* A `draw` runs on the frame loop, so a throw that escapes it surfaces as an
|
|
563
|
-
* uncaught `requestAnimationFrame` error on the window and takes the whole
|
|
564
|
-
* frame with it — every other layer included. One broken layer painting
|
|
565
|
-
* nothing, named in the console, is the lesser wrong.
|
|
566
|
-
*/
|
|
567
|
-
interface LayerDrawFailure {
|
|
568
|
-
layerId: string;
|
|
569
|
-
error: unknown;
|
|
570
|
-
}
|
|
571
|
-
/**
|
|
572
|
-
* Several consecutive layers composited as one.
|
|
573
|
-
*
|
|
574
|
-
* A layer's own `effects` run over that layer alone, which is the wrong
|
|
575
|
-
* picture whenever a pass reads neighboring pixels: `blur(A over B)` is not
|
|
576
|
-
* `blur(A) over blur(B)`, and it costs a buffer and a pass chain per layer. A
|
|
577
|
-
* group draws its members into one buffer, runs one chain over it, and
|
|
578
|
-
* composites the result back once.
|
|
579
|
-
*
|
|
580
|
-
* Membership is by `RenderLayer.id` — the same names `layerOrder` and
|
|
581
|
-
* `layerVisibility` use, not the `layers` map's slot keys.
|
|
582
|
-
*
|
|
583
|
-
* Only *consecutive* members share a buffer, because anything drawn between
|
|
584
|
-
* two members has to land between them. A group whose members are separated in
|
|
585
|
-
* the render order is drawn as one bracket per run, with a warning: the
|
|
586
|
-
* picture is right, the declaration almost certainly is not.
|
|
587
|
-
*
|
|
588
|
-
* This is a render-stack bracket, not a scene `ContainerNode` — it holds no
|
|
589
|
-
* ids, survives no reload, and nothing in the scene knows about it.
|
|
590
|
-
*/
|
|
591
|
-
interface LayerGroup {
|
|
592
|
-
/** Names the group in warnings; not a layer id and never drawn. */
|
|
593
|
-
id: string;
|
|
594
|
-
/**
|
|
595
|
-
* Member layer ids. Order here is ignored — the render order decides.
|
|
596
|
-
*
|
|
597
|
-
* A name claims that layer and every layer under it in the `:` namespace, so
|
|
598
|
-
* `'scene'` covers the `scene:<layerId>` layers a scene with declared layers
|
|
599
|
-
* draws as — the same set `before`/`after: 'scene'` anchors against. The
|
|
600
|
-
* separator is required: `'scene'` does not reach `scenery`. A name matching
|
|
601
|
-
* no layer being drawn is warned about rather than ignored.
|
|
602
|
-
*/
|
|
603
|
-
layers: readonly string[];
|
|
604
|
-
/**
|
|
605
|
-
* Passes over the group's combined pixels, in order. A thunk is re-read on
|
|
606
|
-
* every frame, so an animating radius costs no React render; an array is
|
|
607
|
-
* read once per frame either way.
|
|
608
|
-
*/
|
|
609
|
-
effects?: readonly Effect[] | ((view: View, dims: Dims) => readonly Effect[]);
|
|
610
|
-
/** Opacity applied to the group's composited result, not to each member. */
|
|
611
|
-
alpha?: number;
|
|
612
|
-
/** 4×5 color matrix (row-major, 20 numbers) applied to the composited
|
|
613
|
-
* result. See `GroupDrawCommand.colorMatrix`. */
|
|
614
|
-
colorMatrix?: number[];
|
|
615
|
-
}
|
|
616
|
-
/** One layer's memoized output, keyed by layer id. Owned by the canvas that
|
|
617
|
-
* calls `drawLayers`, not by `drawLayers` itself — the function is pure. */
|
|
618
|
-
type LayerCommandCache = Map<string, {
|
|
619
|
-
deps: readonly unknown[];
|
|
620
|
-
cmds: DrawCommand[];
|
|
621
|
-
}>;
|
|
622
|
-
/**
|
|
623
|
-
* A single named render sub-layer within a canvas renderer.
|
|
624
|
-
*
|
|
625
|
-
* @template TData - The data object passed to each draw call.
|
|
626
|
-
*/
|
|
627
|
-
interface RenderLayer<TData> {
|
|
628
|
-
/** Unique identifier used in visibility maps and ordering arrays. When a
|
|
629
|
-
* cache is in use, an id must identify the same logical layer across
|
|
630
|
-
* frames — reusing it for a different layer can serve cross-layer commands. */
|
|
631
|
-
id: string;
|
|
632
|
-
/** Human-readable name for UI toggles. */
|
|
633
|
-
label: string;
|
|
634
|
-
/**
|
|
635
|
-
* Emit a DrawCommand tree for the GL backend to dispatch.
|
|
636
|
-
*
|
|
637
|
-
* For world-space layers (the default), emit commands in WORLD COORDS —
|
|
638
|
-
* `drawLayers` automatically wraps them in `{ kind: 'group', transform:
|
|
639
|
-
* viewToMat3(view), ... }` before handing them to the renderer. Do NOT
|
|
640
|
-
* apply the view transform yourself.
|
|
641
|
-
*
|
|
642
|
-
* For screen-space layers (`space: 'screen'`), emit commands in CSS-pixel
|
|
643
|
-
* coords directly; `drawLayers` passes them through unchanged. If part
|
|
644
|
-
* of a screen-space layer's output needs to track the view, wrap that
|
|
645
|
-
* subset manually with `viewToMat3(view)`.
|
|
646
|
-
*/
|
|
647
|
-
draw: (data: TData, view: View, dims: Dims) => DrawCommand[];
|
|
648
|
-
/**
|
|
649
|
-
* Optional cache key. When present and a `LayerCommandCache` is supplied to
|
|
650
|
-
* `drawLayers`, the layer's previous `DrawCommand[]` is reused as long as
|
|
651
|
-
* every entry is `Object.is`-equal to the previous call's. A layer with no
|
|
652
|
-
* `deps` rebuilds on every frame.
|
|
653
|
-
*
|
|
654
|
-
* **The returned commands must be treated as immutable.** A cached tree is
|
|
655
|
-
* handed to the renderer again on later frames, so mutating a tree you
|
|
656
|
-
* previously returned corrupts the cache silently rather than erroring.
|
|
657
|
-
*
|
|
658
|
-
* **Screen-space layers are not protected against a stale `view`/`dims`
|
|
659
|
-
* the way world-space layers are** (see `space` below) — include them in
|
|
660
|
-
* `deps` if `draw` reads them.
|
|
661
|
-
*/
|
|
662
|
-
deps?: (data: TData, view: View, dims: Dims) => readonly unknown[];
|
|
663
|
-
/**
|
|
664
|
-
* Whether the layer is shown when no explicit visibility entry exists.
|
|
665
|
-
* Defaults to `true` when absent.
|
|
666
|
-
*/
|
|
667
|
-
defaultVisible?: boolean;
|
|
668
|
-
/**
|
|
669
|
-
* When true, the layer is always drawn regardless of the visibility map.
|
|
670
|
-
* Useful for layers that must never be hidden (e.g. base grid).
|
|
671
|
-
*/
|
|
672
|
-
alwaysOn?: boolean;
|
|
673
|
-
/**
|
|
674
|
-
* Coordinate space the layer draws in.
|
|
675
|
-
*
|
|
676
|
-
* - `'world'` (default): the layer's `draw` returns world-space commands;
|
|
677
|
-
* `drawLayers` wraps them in a `kind: 'group'` with `viewToMat3(view)`
|
|
678
|
-
* automatically.
|
|
679
|
-
* - `'screen'`: the layer's `draw` returns screen-space (CSS-pixel)
|
|
680
|
-
* commands; `drawLayers` passes them through unchanged. World-anchored
|
|
681
|
-
* chrome inside a screen-space layer must call `worldToScreen` or wrap
|
|
682
|
-
* the relevant subset with `viewToMat3(view)` manually.
|
|
683
|
-
*/
|
|
684
|
-
space?: 'world' | 'screen';
|
|
685
|
-
/**
|
|
686
|
-
* Full-screen passes run over this layer's own pixels before it joins the
|
|
687
|
-
* frame — a blur here blurs the world and leaves the HUD drawn above it
|
|
688
|
-
* sharp, which is the thing a CSS `filter` on the `<canvas>` cannot do.
|
|
689
|
-
*
|
|
690
|
-
* Costs nothing while empty: the renderer allocates no offscreen buffer
|
|
691
|
-
* until a layer actually declares one. See `GroupDrawCommand.effects` for
|
|
692
|
-
* what a pass may read, and {@link LayerGroup} to run one chain over
|
|
693
|
-
* several layers at once instead of one chain each.
|
|
694
|
-
*/
|
|
695
|
-
effects?: readonly Effect[];
|
|
696
|
-
/**
|
|
697
|
-
* Optional hit-test for **consumer-attached** layers.
|
|
698
|
-
*
|
|
699
|
-
* Only layers registered through `CanvasExtensionApi.registerLayer` are
|
|
700
|
-
* hit-tested: `hitTestExtras` walks them last-registered-first on
|
|
701
|
-
* pointerdown, and `<SceneCanvas>` folds the result into its `affordanceAt`
|
|
702
|
-
* thunk ahead of the kit's own selection chrome. First non-null result
|
|
703
|
-
* wins; null means "I don't claim this hit, try the next layer."
|
|
704
|
-
*
|
|
705
|
-
* Layers that reach the draw stack some other way — a `Tool.overlay`, an
|
|
706
|
-
* entry in the `layers` map — are painted but never hit-tested, so defining
|
|
707
|
-
* `hitTest` on one has no effect. (The kit's own chrome doesn't need it: it
|
|
708
|
-
* goes through `buildAffordanceAt`.)
|
|
709
|
-
*
|
|
710
|
-
* Coordinates are world-space. The `data` arg is the layer's
|
|
711
|
-
* configured data slot (same as `draw`); `view` and `dims` mirror
|
|
712
|
-
* `draw`'s arguments.
|
|
713
|
-
*/
|
|
714
|
-
hitTest?: (worldX: number, worldY: number, data: TData, view: View, dims: Dims,
|
|
715
|
-
/** Chrome-caps visibility predicate. When supplied, the layer must
|
|
716
|
-
* not return a hit from any chrome element whose id reports
|
|
717
|
-
* `false`. Absent → every element is hittable. */
|
|
718
|
-
isVisible?: (id: string) => boolean) => LayerHit | null;
|
|
719
|
-
/**
|
|
720
|
-
* Called on every pointermove when no gesture is currently captured.
|
|
721
|
-
* Lets layers (e.g. HUD widgets) track hover state without participating
|
|
722
|
-
* in the drag pipeline. Coords are world-space; the layer is responsible
|
|
723
|
-
* for any further conversion (e.g. world→screen for screen-space layers)
|
|
724
|
-
* and for its own throttling.
|
|
725
|
-
*/
|
|
726
|
-
onUncapturedMove?: (worldX: number, worldY: number, evt: PointerEvent, view: View, dims: Dims) => void;
|
|
727
|
-
/**
|
|
728
|
-
* Called when the cursor leaves the canvas element. Lets layers clear
|
|
729
|
-
* any hover state they're holding.
|
|
730
|
-
*/
|
|
731
|
-
onUncapturedLeave?: () => void;
|
|
732
|
-
}
|
|
733
|
-
/**
|
|
734
|
-
* Walk visible layers and concatenate their emitted DrawCommand arrays into
|
|
735
|
-
* one flat list, ready to feed to `WeaselRenderer.render(commands)`.
|
|
736
|
-
*
|
|
737
|
-
* Visibility resolution order:
|
|
738
|
-
* 1. `alwaysOn` — always drawn, ignores visibility map.
|
|
739
|
-
* 2. Explicit entry in `visibility` map — overrides default.
|
|
740
|
-
* 3. `layer.defaultVisible` — falls back to `true` when absent.
|
|
741
|
-
*
|
|
742
|
-
* Transform composition: world-space layers (the default; `space` unset or
|
|
743
|
-
* `'world'`) have their commands wrapped in a `kind: 'group'` with
|
|
744
|
-
* `viewToMat3(view)` before they reach the renderer. Screen-space layers
|
|
745
|
-
* (`space: 'screen'`) pass through unchanged.
|
|
746
|
-
*
|
|
747
|
-
* A layer whose `draw` throws is dropped for the frame and reported through
|
|
748
|
-
* `onLayerError` — the rest of the frame still paints.
|
|
749
|
-
*
|
|
750
|
-
* `groups` brackets runs of consecutive layers so they composite as one — see
|
|
751
|
-
* `LayerGroup`. A layer named by no group is emitted exactly as it was before
|
|
752
|
-
* groups existed, and a frame that declares none allocates nothing.
|
|
753
|
-
*/
|
|
754
|
-
declare function drawLayers<TData>(layers: RenderLayer<TData>[], data: TData, visibility: Record<string, boolean>, order: string[] | undefined, view: View | undefined, dims: Dims, cache?: LayerCommandCache, onLayerError?: (failure: LayerDrawFailure) => void, groups?: readonly LayerGroup[]): DrawCommand[];
|
|
755
|
-
/**
|
|
756
|
-
* Resolve one layer's visibility: `alwaysOn` wins, then an explicit entry in
|
|
757
|
-
* `visibility`, then `defaultVisible`, defaulting to shown.
|
|
758
|
-
*/
|
|
759
|
-
declare function isLayerVisible<TData>(layer: RenderLayer<TData>, visibility: Record<string, boolean>): boolean;
|
|
760
|
-
/**
|
|
761
|
-
* Does this layer reach the screen at all — both gates, in the order
|
|
762
|
-
* `drawLayers` applies them.
|
|
763
|
-
*
|
|
764
|
-
* **A listed `order` is the whole list**, so omission from it drops a layer
|
|
765
|
-
* that `visibility` would have shown, and `alwaysOn` does not rescue it.
|
|
766
|
-
* Hit-testing asks this, not `isLayerVisible`: a layer that is not painted
|
|
767
|
-
* but still claims pointer events is a pointer landing on nothing the user
|
|
768
|
-
* can see.
|
|
769
|
-
*/
|
|
770
|
-
declare function isLayerPainted<TData>(layer: RenderLayer<TData>, visibility: Record<string, boolean>, order: string[] | undefined): boolean;
|
|
771
|
-
/**
|
|
772
|
-
* Draw one layer and put its commands in the space its `space` declares:
|
|
773
|
-
* world-space output wrapped in a `viewToMat3(view)` group, screen-space
|
|
774
|
-
* output passed through.
|
|
775
|
-
*
|
|
776
|
-
* Anything rendering layers through a view — the canvas itself, a viewport
|
|
777
|
-
* node's inner pass — goes through here. A second copy of this rule that
|
|
778
|
-
* forgets the wrap draws world content at raw world coords, which looks
|
|
779
|
-
* plausible at the identity view and wrong everywhere else.
|
|
780
|
-
*
|
|
781
|
-
* A `draw` that throws yields no commands, and `onLayerError` is told which
|
|
782
|
-
* layer it was. The layer's cache entry goes with it, so the next frame is a
|
|
783
|
-
* real re-attempt rather than a stale tree served under fresh deps.
|
|
784
|
-
*/
|
|
785
|
-
declare function drawOneLayer<TData>(layer: RenderLayer<TData>, data: TData, view: View, dims: Dims, cache?: LayerCommandCache, onLayerError?: (failure: LayerDrawFailure) => void): DrawCommand[];
|
|
786
|
-
|
|
787
307
|
/**
|
|
788
308
|
* Grid overlay — a reusable render layer that draws a world-space grid with
|
|
789
309
|
* optional finer subdivisions and accent lines every N cells.
|
|
@@ -1497,6 +1017,9 @@ declare function meanScale(s: {
|
|
|
1497
1017
|
y: number;
|
|
1498
1018
|
}): number;
|
|
1499
1019
|
|
|
1020
|
+
/** Whether `value` is a plain object — a literal or `Object.create(null)` — from any realm. */
|
|
1021
|
+
declare function isPlainObject(value: unknown): value is Record<string, unknown>;
|
|
1022
|
+
|
|
1500
1023
|
/**
|
|
1501
1024
|
* Screen-pixel lengths in world units, per axis.
|
|
1502
1025
|
*
|
|
@@ -1624,6 +1147,7 @@ declare function useDropZone<T extends HTMLElement>(opts: DropZoneOptions): (el:
|
|
|
1624
1147
|
* and missed-release recovery, teardown — belongs to `openPointerSession`.
|
|
1625
1148
|
*/
|
|
1626
1149
|
interface ThresholdDragOptions {
|
|
1150
|
+
/** Travel, in CSS pixels, that makes the press a drag. Default `DRAG_THRESHOLD_PX`. */
|
|
1627
1151
|
threshold?: number;
|
|
1628
1152
|
/** Element the session opens on. Defaults to `e.currentTarget`; a list must
|
|
1629
1153
|
* pass its container, since a grabbed row unmounting drops capture. */
|
|
@@ -1959,10 +1483,9 @@ declare function actionShortcuts(action: Action, params?: Readonly<Record<string
|
|
|
1959
1483
|
* - `onMove`: update the in-scratch `currentDelta`, and publish the frame's
|
|
1960
1484
|
* poses as ephemeral overrides. No *document* writes, so the undo stack
|
|
1961
1485
|
* still sees one entry for the whole drag.
|
|
1962
|
-
* - `onEnd('commit')`: emit the final delta as transform ops and
|
|
1963
|
-
* them
|
|
1964
|
-
*
|
|
1965
|
-
* → exactly one undo entry for the whole drag.
|
|
1486
|
+
* - `onEnd('commit')`: emit the final delta as transform ops and commit
|
|
1487
|
+
* them as one batch (`commitGestureOps`) → at most one undo entry for the
|
|
1488
|
+
* whole drag, none when the binding's params make it transient.
|
|
1966
1489
|
* - `onEnd('cancel')`: drop the overrides — the document was never mutated,
|
|
1967
1490
|
* so the committed poses are the restoration.
|
|
1968
1491
|
*
|
|
@@ -2015,8 +1538,9 @@ declare const moveAction: Action & {
|
|
|
2015
1538
|
*
|
|
2016
1539
|
* Performs real anchor-relative resize math for rect-shaped poses. Reads
|
|
2017
1540
|
* `ctx.drag.affordance.anchor` to determine which corner is fixed, captures
|
|
2018
|
-
* start poses, applies per-frame bounds remapping, and commits
|
|
2019
|
-
* `
|
|
1541
|
+
* start poses, applies per-frame bounds remapping, and commits one batch on
|
|
1542
|
+
* end — labeled, transient and observed per the `resizePolicy` dep's
|
|
1543
|
+
* lifecycle fields.
|
|
2020
1544
|
*
|
|
2021
1545
|
* ## Behaviors / point-snap / expandIds — via the `resizePolicy` dep
|
|
2022
1546
|
*
|
|
@@ -2082,7 +1606,8 @@ declare const resizeAction: Action & {
|
|
|
2082
1606
|
* - Reads and writes poses through the `poseDescriptor` dep; a pose whose
|
|
2083
1607
|
* descriptor has no `withRotation`, or reports `supportsRotation` false, is
|
|
2084
1608
|
* left alone.
|
|
2085
|
-
* -
|
|
1609
|
+
* - Behaviors (`opts.behaviors`) see the first rotated node's turned pose; a
|
|
1610
|
+
* pose one returns from `onMove` sets the rotation for the whole selection.
|
|
2086
1611
|
* - No overlay rendering — deferred to Phase 7 overlay surface.
|
|
2087
1612
|
* - Shift-snap (15° quantum) is NOT wired in this phase — omitted deliberately
|
|
2088
1613
|
* to keep the invoker self-contained (would need to read shift from onMove ctx).
|
|
@@ -2333,7 +1858,8 @@ declare const cloneAction: Action & {
|
|
|
2333
1858
|
* `viewportDragPanAction` — ongoing Action descriptor for drag-to-pan the viewport.
|
|
2334
1859
|
*
|
|
2335
1860
|
* ## Bindings
|
|
2336
|
-
*
|
|
1861
|
+
* None of its own. The hand tool binds a drag to it, and a canvas that pans on
|
|
1862
|
+
* any unclaimed drag adds `dragPanContribution`.
|
|
2337
1863
|
*
|
|
2338
1864
|
* ## Design notes
|
|
2339
1865
|
* The drag delta from the dispatcher is in screen space (pixels). The pan
|
|
@@ -2581,25 +2107,34 @@ declare const editAnchorsAction: Action & {
|
|
|
2581
2107
|
* Implements lasso-select via the full pointermove stream (accumulated in
|
|
2582
2108
|
* `InvocationCtx.drag.points` by the dispatcher extension):
|
|
2583
2109
|
* - `start`: initializes vertex list from the drag-start world point.
|
|
2584
|
-
* - `onMove`: appends the current world point
|
|
2585
|
-
*
|
|
2110
|
+
* - `onMove`: appends the current world point, skipping one closer than
|
|
2111
|
+
* the binding's `params.minVertexSpacing` (default 2 world-px) to the
|
|
2112
|
+
* last vertex.
|
|
2586
2113
|
* - `onEnd('commit')`: performs hit-testing against the accumulated polygon.
|
|
2587
|
-
* Uses `dep.hitTestLasso(polygon,
|
|
2588
|
-
*
|
|
2114
|
+
* Uses `dep.hitTestLasso(polygon, mode)` when available — `mode` from the
|
|
2115
|
+
* binding's `params.mode`, default `'intersect'` — otherwise falls back to
|
|
2116
|
+
* the polygon's AABB via `dep.hitTestArea(bounds)`.
|
|
2589
2117
|
* Extends selection with shift, replaces otherwise.
|
|
2590
2118
|
* - `onEnd('cancel')`: no-op.
|
|
2591
2119
|
*
|
|
2120
|
+
* ## Behaviors
|
|
2121
|
+
*
|
|
2122
|
+
* `opts.behaviors` (`LassoSelectBehavior[]`) run over a `GestureContext`
|
|
2123
|
+
* whose `origin.get('gesture')` is the start pose, whose scratch holds the
|
|
2124
|
+
* vertices under `LASSO_VERTICES`, and whose adapter answers selection and
|
|
2125
|
+
* hit-testing from the `lassoSelect` dep. `onEnd` is first-non-undefined-wins:
|
|
2126
|
+
* `Op[]` is applied in place of the default selection, `null` aborts, and
|
|
2127
|
+
* all-`undefined` falls through to it.
|
|
2128
|
+
*
|
|
2592
2129
|
* ## Dep
|
|
2593
2130
|
*
|
|
2594
2131
|
* Requires `lassoSelect` dep from DepSchema:
|
|
2595
2132
|
* `{ hitTestLasso?(...), hitTestArea(...), getSelection(), setSelection(ids) }`
|
|
2596
2133
|
*
|
|
2597
|
-
* ## What this does NOT wire
|
|
2134
|
+
* ## What this does NOT wire
|
|
2598
2135
|
*
|
|
2599
|
-
* -
|
|
2600
|
-
*
|
|
2601
|
-
* - Transient vs. committed history modes — always transient (no undo entry),
|
|
2602
|
-
* matching `useLassoSelect`'s `defaultTransient: true` convention.
|
|
2136
|
+
* - Committed history — always transient (no undo entry); a behavior's ops
|
|
2137
|
+
* are applied the same way.
|
|
2603
2138
|
* - Debug sink recording.
|
|
2604
2139
|
*/
|
|
2605
2140
|
|
|
@@ -2907,7 +2442,7 @@ declare function defaultCommitAdapter<TPose>(scene: Scene<unknown, string, TPose
|
|
|
2907
2442
|
|
|
2908
2443
|
/** Options for `useResizePolicy`. Each omitted field falls back to the kit
|
|
2909
2444
|
* default. */
|
|
2910
|
-
interface UseResizePolicyOptions<TPose> {
|
|
2445
|
+
interface UseResizePolicyOptions<TPose> extends GestureLifecycleOptions {
|
|
2911
2446
|
constraints?: TPose extends Bounds ? BoundsConstraint<TPose>[] : never[];
|
|
2912
2447
|
pointSnap?: TPose extends Bounds ? PointSnapBehavior<TPose>[] : never[];
|
|
2913
2448
|
expandIds?: (ids: string[]) => string[];
|
|
@@ -3050,49 +2585,12 @@ declare function createVelocityTracker(): VelocityTracker;
|
|
|
3050
2585
|
* over the last 100ms — the throw speed a momentum decay starts from. */
|
|
3051
2586
|
declare function useVelocityTracker(): VelocityTracker;
|
|
3052
2587
|
|
|
3053
|
-
/**
|
|
3054
|
-
* Detects two-finger pinch on a canvas element.
|
|
3055
|
-
*
|
|
3056
|
-
* @param onPinch Called with the gesture midpoint in **client coordinates** and
|
|
3057
|
-
* a per-frame scale factor (ratio of current distance to previous frame's
|
|
3058
|
-
* distance, not cumulative from gesture start). With 3+ fingers, the first
|
|
3059
|
-
* two by insertion order are tracked.
|
|
3060
|
-
*/
|
|
3061
|
-
declare function usePinchGesture(canvasRef: React.RefObject<HTMLElement | null>, onPinch: (anchor: {
|
|
3062
|
-
x: number;
|
|
3063
|
-
y: number;
|
|
3064
|
-
}, scaleFactor: number) => void, enabled?: boolean): void;
|
|
3065
|
-
|
|
3066
2588
|
/**
|
|
3067
2589
|
* `InterpolatorFactory<View>` for camera animation — built once per animation,
|
|
3068
2590
|
* called with eased `t` each frame. Pass to `Animator.tween`'s `interpolator`.
|
|
3069
2591
|
*/
|
|
3070
2592
|
declare function interpolateView(from: View, to: View): (t: number) => View;
|
|
3071
2593
|
|
|
3072
|
-
/**
|
|
3073
|
-
* The routing types that carry an overlay, bound to the kit's `RenderLayer`.
|
|
3074
|
-
*
|
|
3075
|
-
* `@weasel-js/routing` never reads an overlay — it collects the live ones and
|
|
3076
|
-
* hands them back in scope order — so it leaves the element type open. What a
|
|
3077
|
-
* weasel canvas draws is a `RenderLayer`, and every kit call site should see
|
|
3078
|
-
* that rather than `unknown`, so core binds the parameter once, here, and
|
|
3079
|
-
* re-exports these names under the ones they have always had.
|
|
3080
|
-
*/
|
|
3081
|
-
|
|
3082
|
-
/** What a canvas overlay is, at this layer. */
|
|
3083
|
-
type Overlay = RenderLayer<unknown>;
|
|
3084
|
-
type Contribution = Contribution$1<Overlay>;
|
|
3085
|
-
type ContributionChrome = ContributionChrome$1<Overlay>;
|
|
3086
|
-
type Tool<TScratch = unknown> = Tool$1<TScratch, Overlay>;
|
|
3087
|
-
type AnyTool = AnyToolOf<Overlay>;
|
|
3088
|
-
type ToolDef<TScratch = void> = ToolDef$1<TScratch, Overlay>;
|
|
3089
|
-
type ViewportToolDef<TScratch = void> = ViewportToolDef$1<TScratch, Overlay>;
|
|
3090
|
-
type ToolsApi = ToolsApi$1<Overlay>;
|
|
3091
|
-
type UseToolsOptions = UseToolsOptions$1<Overlay>;
|
|
3092
|
-
declare function defineTool<TScratch = void>(def: ToolDef<TScratch>): Tool<TScratch>;
|
|
3093
|
-
declare function defineViewportTool<TScratch = void>(def: ViewportToolDef<TScratch>): Tool<TScratch>;
|
|
3094
|
-
declare const useTools: (opts: UseToolsOptions) => ToolsApi;
|
|
3095
|
-
|
|
3096
2594
|
/** Options for `useKeybindings`. */
|
|
3097
2595
|
interface UseKeybindingsOptions {
|
|
3098
2596
|
/** Skip all wiring. Useful for touch apps or test isolation. */
|
|
@@ -3104,7 +2602,7 @@ interface UseKeybindingsOptions {
|
|
|
3104
2602
|
/**
|
|
3105
2603
|
* Gate for keyboard tool activation: return false to refuse a tool the
|
|
3106
2604
|
* active mode doesn't allow. `<SceneCanvas>` wires this from
|
|
3107
|
-
* `
|
|
2605
|
+
* its `modes` registry + each tool's `eligibility.capabilities`, using the same predicate
|
|
3108
2606
|
* `ToolPalette` uses to grey a button out — so the grey-out becomes a
|
|
3109
2607
|
* guarantee rather than a hint.
|
|
3110
2608
|
*
|
|
@@ -3151,9 +2649,6 @@ interface ToolPrefBase<K extends string, Value> {
|
|
|
3151
2649
|
}
|
|
3152
2650
|
/** How a schema-driven UI should present a number pref. */
|
|
3153
2651
|
type ToolPrefNumberControl = 'input' | 'slider';
|
|
3154
|
-
/** How a schema-driven UI should show a number pref's value. `compact`
|
|
3155
|
-
* abbreviates from a thousand up, as in `2.0M`. */
|
|
3156
|
-
type ToolPrefNumberFormat = 'plain' | 'compact';
|
|
3157
2652
|
/** How a schema-driven UI should present a boolean pref. */
|
|
3158
2653
|
type ToolPrefBooleanControl = 'checkbox' | 'switch' | 'toggle';
|
|
3159
2654
|
/** How a schema-driven UI should present a string pref. */
|
|
@@ -3193,12 +2688,26 @@ interface ToolPrefNumber extends ToolPrefBase<'number', number> {
|
|
|
3193
2688
|
max?: number;
|
|
3194
2689
|
step?: number;
|
|
3195
2690
|
control?: ToolPrefNumberControl;
|
|
3196
|
-
|
|
2691
|
+
/** How the value shows, speaks and reads back when typed — `compact()`
|
|
2692
|
+
* reads `2.00M`. Presentation only: the stored value stays a number. */
|
|
2693
|
+
display?: Display;
|
|
3197
2694
|
unit?: ToolPrefNumberUnit;
|
|
3198
2695
|
}
|
|
2696
|
+
/**
|
|
2697
|
+
* Stored-value bridge for a boolean leaf whose field is not a boolean — the
|
|
2698
|
+
* flag counterpart of {@link ToolPrefEnumEncoding}. `TextStyle.fontStyle` is
|
|
2699
|
+
* the case: it stores `'italic'`, and the control is an Italic toggle.
|
|
2700
|
+
*/
|
|
2701
|
+
interface ToolPrefBooleanEncoding {
|
|
2702
|
+
/** Whether `stored` reads as on. */
|
|
2703
|
+
read: (stored: unknown, siblings: Record<string, unknown> | undefined) => boolean;
|
|
2704
|
+
/** What to store for `on`. `undefined` removes the field. */
|
|
2705
|
+
write: (on: boolean, siblings: Record<string, unknown> | undefined) => unknown;
|
|
2706
|
+
}
|
|
3199
2707
|
/** An on/off pref. */
|
|
3200
2708
|
interface ToolPrefBoolean extends ToolPrefBase<'boolean', boolean> {
|
|
3201
2709
|
control?: ToolPrefBooleanControl;
|
|
2710
|
+
encoding?: ToolPrefBooleanEncoding;
|
|
3202
2711
|
}
|
|
3203
2712
|
/** A free-text pref. */
|
|
3204
2713
|
interface ToolPrefString extends ToolPrefBase<'string', string> {
|
|
@@ -3226,8 +2735,16 @@ interface ToolPrefEnumEncoding<T extends string = string> {
|
|
|
3226
2735
|
/** What to store for `option`. `undefined` removes the field. */
|
|
3227
2736
|
write: (option: T, siblings: Record<string, unknown> | undefined) => unknown;
|
|
3228
2737
|
}
|
|
3229
|
-
/** A pref with a fixed set of labeled choices.
|
|
3230
|
-
|
|
2738
|
+
/** A pref with a fixed set of labeled choices. `default` is `undefined` only
|
|
2739
|
+
* for a {@link ToolPrefEnum.clearable} leaf, whose absence is a value. */
|
|
2740
|
+
interface ToolPrefEnum<T extends string = string> extends ToolPrefBase<'enum', T | undefined> {
|
|
2741
|
+
/**
|
|
2742
|
+
* The field may hold none of the options, and that absence is a state of
|
|
2743
|
+
* its own rather than a missing value — a script that is neither super nor
|
|
2744
|
+
* sub. A toggle control then lets the chosen segment be clicked off, which
|
|
2745
|
+
* removes the field.
|
|
2746
|
+
*/
|
|
2747
|
+
clearable?: boolean;
|
|
3231
2748
|
/** `short` is the label a segmented control uses when a full one would not
|
|
3232
2749
|
* fit — a capital or two. `icon` names a glyph in the host UI's set
|
|
3233
2750
|
* (weasel-ui resolves it against `ICON_PATHS`) and outranks `short` where
|
|
@@ -3390,11 +2907,6 @@ interface UseSelectToolOptions<TPose> {
|
|
|
3390
2907
|
/** Whether a node's `layer` reaches the screen in the view this tool picks
|
|
3391
2908
|
* for. Ignored when `pickEvery` is supplied. */
|
|
3392
2909
|
layerIsPainted?: (layer: string) => boolean;
|
|
3393
|
-
/** Move-action options. The move gesture is dispatcher-routed,
|
|
3394
|
-
* so only `behaviors` is consumed here — threaded into the move binding's
|
|
3395
|
-
* `opts.behaviors`. Other `UseMoveOptions` fields are accepted for API shape
|
|
3396
|
-
* but not read by this tool. */
|
|
3397
|
-
move?: UseMoveOptions<TPose>;
|
|
3398
2910
|
/**
|
|
3399
2911
|
* When this returns true, a Shift/Meta extend-click must NOT change the
|
|
3400
2912
|
* node selection.
|
|
@@ -3409,16 +2921,6 @@ interface UseSelectToolOptions<TPose> {
|
|
|
3409
2921
|
* clicking a different node exits edit mode as usual.
|
|
3410
2922
|
*/
|
|
3411
2923
|
extendClickLocked?: () => boolean;
|
|
3412
|
-
/** Optional debug sink. Reserved for future overlay/affordance hitbox
|
|
3413
|
-
* recording. */
|
|
3414
|
-
debug?: DebugSink;
|
|
3415
|
-
/** Reparent-on-drop behavior for drag-to-move. `'off'` (default)
|
|
3416
|
-
* preserves translate-only commits. `'top'` lands the moved nodes at
|
|
3417
|
-
* the top of the container under the drop point. `'above'` lands them
|
|
3418
|
-
* immediately above the hit sibling in z-order (falls back to `'top'`
|
|
3419
|
-
* semantics when the hit is itself a container). Requires the
|
|
3420
|
-
* `nodeAtPoint` dep to be registered (sourced by `<SceneCanvas>`). */
|
|
3421
|
-
reparentOnDrop?: 'off' | 'top' | 'above';
|
|
3422
2924
|
}
|
|
3423
2925
|
/** Intersection of the move + area-select adapter interfaces.
|
|
3424
2926
|
* Resize and rotate run through `resizeAction` / `rotateAction`. */
|
|
@@ -3429,17 +2931,96 @@ type SelectAdapter<TNode extends {
|
|
|
3429
2931
|
* - `select.pick` classifies the press (pointerDown) — it runs the tool's own
|
|
3430
2932
|
* pickBest/pickEvery so click semantics (selection replace, extend,
|
|
3431
2933
|
* deferred collapse) live in one place.
|
|
3432
|
-
* - drag
|
|
3433
|
-
* (
|
|
3434
|
-
*
|
|
3435
|
-
* -
|
|
3436
|
-
*
|
|
3437
|
-
* overlay layer (driven by areaSelectAction's `overlay()`).
|
|
2934
|
+
* - an empty drag marquees (`areaSelect`) and a click on empty clears the
|
|
2935
|
+
* selection (`clearSelection`); the marquee renders via the dispatcher
|
|
2936
|
+
* overlay layer, driven by areaSelectAction's `overlay()`.
|
|
2937
|
+
* - moving and transforming the selection are not the tool's: they are the
|
|
2938
|
+
* ambient bindings in `selectionContributions.ts`.
|
|
3438
2939
|
*/
|
|
3439
2940
|
declare function useSelectTool<TNode extends {
|
|
3440
2941
|
id: string;
|
|
3441
2942
|
}, TPose>(adapter: SelectAdapter<TNode, TPose>, options: UseSelectToolOptions<TPose>): Tool<null>;
|
|
3442
2943
|
|
|
2944
|
+
/** Option surface for the `rotate` action. */
|
|
2945
|
+
|
|
2946
|
+
/** Options for the `rotate` action. `selectionTransformBindings` threads
|
|
2947
|
+
* them into the rotation handle's binding. */
|
|
2948
|
+
interface UseRotateOptions<TPose> {
|
|
2949
|
+
/** Behaviors are typed against the pose shape; typed `never` for a pose
|
|
2950
|
+
* without a numeric `rotation`. `onMove` sees the first rotated node's
|
|
2951
|
+
* turned pose, and a pose it returns sets the rotation for the whole
|
|
2952
|
+
* selection. */
|
|
2953
|
+
behaviors?: TPose extends RotatedPose ? RotateBehavior<TPose>[] : never;
|
|
2954
|
+
/** History label for the committed rotation. Default `'Rotate'`. */
|
|
2955
|
+
rotateLabel?: string;
|
|
2956
|
+
/** Commit without an undo entry (`scene.untracked`), bypassing the
|
|
2957
|
+
* consumer `applyOps` hook. Unset, a behavior's `defaultTransient` decides. */
|
|
2958
|
+
transient?: boolean;
|
|
2959
|
+
/** Fired when the rotation starts, with the ids it turns. */
|
|
2960
|
+
onGestureStart?: (ids: string[]) => void;
|
|
2961
|
+
/** Fired once per `onGestureStart`: `true` when the rotation wrote to the
|
|
2962
|
+
* document, `false` on cancel, a behavior abort, or no net turn. */
|
|
2963
|
+
onGestureEnd?: (committed: boolean) => void;
|
|
2964
|
+
/** Multi-selection pivot mode. Default `'union'`.
|
|
2965
|
+
* - `'each'`: each item rotates around its own center.
|
|
2966
|
+
* - `'union'`: each item rotates around the selection's union center;
|
|
2967
|
+
* item centers orbit the union center while also gaining the same
|
|
2968
|
+
* rotation delta.
|
|
2969
|
+
* Has no effect on single-id gestures. */
|
|
2970
|
+
pivot?: 'each' | 'union';
|
|
2971
|
+
}
|
|
2972
|
+
|
|
2973
|
+
/**
|
|
2974
|
+
* The ambient bindings that act on the selection: moving it, cloning it, and
|
|
2975
|
+
* resizing or rotating it from its handles. They belong to the selection, not
|
|
2976
|
+
* to the select tool, so they run under any tool that does not claim the
|
|
2977
|
+
* gesture itself. `<SceneCanvas features>` installs them as the `move` and
|
|
2978
|
+
* `transform` presets.
|
|
2979
|
+
*/
|
|
2980
|
+
|
|
2981
|
+
/** Options for {@link selectionMoveContribution}. */
|
|
2982
|
+
interface SelectionMoveOptions<TPose = unknown> {
|
|
2983
|
+
/** Move-action options: `behaviors` become the move bindings'
|
|
2984
|
+
* `opts.behaviors`, everything else their `opts.params`. */
|
|
2985
|
+
move?: UseMoveOptions<TPose>;
|
|
2986
|
+
/** Reparent-on-drop behavior for drag-to-move. `'off'` (default) keeps
|
|
2987
|
+
* translate-only commits. `'top'` lands the moved nodes at the top of the
|
|
2988
|
+
* container under the drop point; `'above'` lands them immediately above the
|
|
2989
|
+
* hit sibling. Requires the `nodeAtPoint` dep (`<SceneCanvas>` sources it). */
|
|
2990
|
+
reparentOnDrop?: 'off' | 'top' | 'above';
|
|
2991
|
+
}
|
|
2992
|
+
/** Id of the entry {@link selectionMoveContribution} builds. */
|
|
2993
|
+
declare const SELECTION_MOVE_ID = "selection.move";
|
|
2994
|
+
/** Id of the entry {@link selectionTransformContribution} builds. */
|
|
2995
|
+
declare const SELECTION_TRANSFORM_ID = "selection.transform";
|
|
2996
|
+
/** Drag a body to move the selection; Alt-drag to clone it. */
|
|
2997
|
+
declare function selectionMoveBindings<TPose>(options?: SelectionMoveOptions<TPose>): GestureBinding[];
|
|
2998
|
+
/** Options for {@link selectionTransformContribution}. Resize takes its
|
|
2999
|
+
* options through the `resizePolicy` dep (`useResizePolicy`), not here. */
|
|
3000
|
+
interface SelectionTransformOptions<TPose = unknown> {
|
|
3001
|
+
/** Rotate-action options: `behaviors` become the rotate binding's
|
|
3002
|
+
* `opts.behaviors`, everything else its `opts.params`. */
|
|
3003
|
+
rotate?: UseRotateOptions<TPose>;
|
|
3004
|
+
}
|
|
3005
|
+
/** Drag a resize handle to resize the selection, the rotation handle to rotate it. */
|
|
3006
|
+
declare function selectionTransformBindings<TPose>(options?: SelectionTransformOptions<TPose>): GestureBinding[];
|
|
3007
|
+
/** An always-live entry carrying {@link selectionMoveBindings}. Add it to a
|
|
3008
|
+
* canvas's ambient list; `<SceneCanvas features={['move']}>` does. */
|
|
3009
|
+
declare function selectionMoveContribution<TPose>(options?: SelectionMoveOptions<TPose>): Contribution;
|
|
3010
|
+
/** An always-live entry carrying {@link selectionTransformBindings}. Add it
|
|
3011
|
+
* to a canvas's ambient list; `<SceneCanvas features={['transform']}>` does. */
|
|
3012
|
+
declare function selectionTransformContribution<TPose>(options?: SelectionTransformOptions<TPose>): Contribution;
|
|
3013
|
+
/** Id of the entry {@link areaSelectContribution} builds. */
|
|
3014
|
+
declare const AREA_SELECT_ID = "selection.areaSelect";
|
|
3015
|
+
/** A press on empty canvas: no hit, and not on chrome over it — the rotation
|
|
3016
|
+
* handle and the outer half of a resize handle sit off the body. */
|
|
3017
|
+
declare const onEmptyCanvas: (hit: unknown, body?: string) => boolean;
|
|
3018
|
+
/** An always-live entry that marquee-selects on a drag across empty canvas,
|
|
3019
|
+
* under any tool that does not claim the drag itself. No preset installs it:
|
|
3020
|
+
* the select tool already marquees, and a canvas that wants it under every
|
|
3021
|
+
* tool adds this to its ambient list. */
|
|
3022
|
+
declare function areaSelectContribution(): Contribution;
|
|
3023
|
+
|
|
3443
3024
|
/**
|
|
3444
3025
|
* Pick the topmost id from a body-hit list, using whatever signal the
|
|
3445
3026
|
* adapter exposes.
|
|
@@ -3523,6 +3104,14 @@ interface HandScratch {
|
|
|
3523
3104
|
*/
|
|
3524
3105
|
declare function useHandTool(opts?: UseHandToolOptions): Tool<HandScratch | null>;
|
|
3525
3106
|
|
|
3107
|
+
/** Id of the entry {@link dragPanContribution} builds. */
|
|
3108
|
+
declare const DRAG_PAN_ID = "viewport.dragPanBinding";
|
|
3109
|
+
/** An always-live entry that pans the view on a drag no tool claims. No preset
|
|
3110
|
+
* installs it: the hand tool pans, space-held or chosen, and a canvas that
|
|
3111
|
+
* should pan on a plain drag — a viewer, a map — adds this to its ambient
|
|
3112
|
+
* list. `params` are `viewport.dragPan`'s, as the hand tool passes them. */
|
|
3113
|
+
declare function dragPanContribution(params?: DragPanParams): Contribution;
|
|
3114
|
+
|
|
3526
3115
|
/** Text tool. Drag-rect insertion is owned end-to-end by the dispatcher's
|
|
3527
3116
|
* `insertAction` (kind: `'text'`); click-on-selected-text-node enters edit
|
|
3528
3117
|
* mode via the `enterTextEdit` action.
|
|
@@ -3584,10 +3173,17 @@ declare namespace useTextTool {
|
|
|
3584
3173
|
readonly default: false;
|
|
3585
3174
|
};
|
|
3586
3175
|
script: {
|
|
3587
|
-
kind:
|
|
3176
|
+
kind: "enum";
|
|
3588
3177
|
name: string;
|
|
3589
3178
|
description: string;
|
|
3179
|
+
control: "toggle";
|
|
3180
|
+
clearable: true;
|
|
3590
3181
|
default: undefined;
|
|
3182
|
+
options: {
|
|
3183
|
+
value: string;
|
|
3184
|
+
label: string;
|
|
3185
|
+
icon: string;
|
|
3186
|
+
}[];
|
|
3591
3187
|
};
|
|
3592
3188
|
textTransform: {
|
|
3593
3189
|
kind: "enum";
|
|
@@ -3918,34 +3514,22 @@ interface LinePoint {
|
|
|
3918
3514
|
*/
|
|
3919
3515
|
declare function useLineTool(): Tool<null>;
|
|
3920
3516
|
|
|
3921
|
-
/** Option surface for the `lasso-select` action.
|
|
3922
|
-
*
|
|
3923
|
-
* Lives in a sibling file (not `lassoSelect.ts`) so the type contract stays
|
|
3924
|
-
* stable even after the legacy `useLassoSelect` hook is gone.
|
|
3925
|
-
* Consumers should import from here directly; `lassoSelect.ts`
|
|
3926
|
-
* re-exports the same symbol for back-compat. */
|
|
3517
|
+
/** Option surface for the `lasso-select` action. */
|
|
3927
3518
|
|
|
3928
3519
|
/** Options for the `lasso-select` action. */
|
|
3929
3520
|
interface UseLassoSelectOptions {
|
|
3930
3521
|
behaviors?: LassoSelectBehavior[];
|
|
3931
|
-
/** When set, overrides any behavior's `defaultTransient`. */
|
|
3932
|
-
transient?: boolean;
|
|
3933
|
-
/** Label used when transient is false and the hook falls back to applyOps. Default 'Lasso select'. */
|
|
3934
|
-
label?: string;
|
|
3935
|
-
onGestureStart?: () => void;
|
|
3936
|
-
onGestureEnd?: (committed: boolean) => void;
|
|
3937
3522
|
/** Skip vertices closer than this many world-px to the previous one.
|
|
3938
3523
|
* Default 2. Set 0 to record every move sample. */
|
|
3939
3524
|
minVertexSpacing?: number;
|
|
3940
|
-
/** Optional debug sink; receives the live polygon AABB on every move. */
|
|
3941
|
-
debug?: DebugSink;
|
|
3942
3525
|
}
|
|
3943
3526
|
|
|
3944
3527
|
/** Options for `useLassoTool` — the lasso-select action's options plus the
|
|
3945
3528
|
* tool's own hit mode and activation key. */
|
|
3946
|
-
interface UseLassoToolOptions extends
|
|
3947
|
-
/** Hit mode
|
|
3948
|
-
*
|
|
3529
|
+
interface UseLassoToolOptions extends UseLassoSelectOptions {
|
|
3530
|
+
/** Hit mode for the action's own selection commit, which runs when no
|
|
3531
|
+
* behavior claims the gesture. A behavior carries its own, as
|
|
3532
|
+
* `selectFromLasso({ mode })` does. Default 'intersect'. */
|
|
3949
3533
|
mode?: LassoHitMode;
|
|
3950
3534
|
/** Override the default keybinding (`{ key: 'L' }`). Pass `null` to omit. */
|
|
3951
3535
|
keybinding?: ToolKeybinding | null;
|
|
@@ -5292,12 +4876,14 @@ type LayerSlotValue<TNode extends {
|
|
|
5292
4876
|
}, TPose> = StandardSlotConfig<TNode, TPose> | CustomLayerEntry | null;
|
|
5293
4877
|
/** The canvas's render stack, as named slots. The standard slots (grid,
|
|
5294
4878
|
* scene, selection overlay, cell highlight) can be configured, replaced with
|
|
5295
|
-
* a layer of your own, or switched off; further keys add custom layers.
|
|
4879
|
+
* a layer of your own, or switched off; further keys add custom layers.
|
|
4880
|
+
* `TSceneSlot` is what the scene slot accepts: `<SceneCanvas>` takes a
|
|
4881
|
+
* partial config and fills the rest from its defaults. */
|
|
5296
4882
|
type LayersMap<TNode extends {
|
|
5297
4883
|
id: string;
|
|
5298
|
-
}, TPose
|
|
4884
|
+
}, TPose, TSceneSlot = SceneSlotConfig<TNode, TPose>> = {
|
|
5299
4885
|
grid?: GridSlotConfig | null;
|
|
5300
|
-
scene?:
|
|
4886
|
+
scene?: TSceneSlot | null;
|
|
5301
4887
|
/** Selection-overlay slot. Canvas constructs the layer from a
|
|
5302
4888
|
* `SelectionOverlaySlotConfig`; pass a `CustomLayerEntry` (`{ layer }`) to
|
|
5303
4889
|
* supply a pre-built layer (e.g. from `<SceneCanvas>`). */
|
|
@@ -5308,7 +4894,7 @@ type LayersMap<TNode extends {
|
|
|
5308
4894
|
* is set. */
|
|
5309
4895
|
cellHighlight?: CustomLayerEntry | null;
|
|
5310
4896
|
} & {
|
|
5311
|
-
[customKey: string]: LayerSlotValue<TNode, TPose> | undefined;
|
|
4897
|
+
[customKey: string]: LayerSlotValue<TNode, TPose> | TSceneSlot | undefined;
|
|
5312
4898
|
};
|
|
5313
4899
|
/**
|
|
5314
4900
|
* What `<SceneCanvas selectionMode>` lets the canvas do to the selection.
|
|
@@ -5372,6 +4958,11 @@ interface CanvasProps<TNode extends {
|
|
|
5372
4958
|
* `subscribeFrame` callback, still waits for a frame — painting it in place
|
|
5373
4959
|
* would recurse. */
|
|
5374
4960
|
syncPaint?: boolean;
|
|
4961
|
+
/** External state the paint reads that no layer declares — typically what
|
|
4962
|
+
* an `alphaFor` consults. Each source is subscribed while mounted and
|
|
4963
|
+
* repaints the canvas when it notifies. A layer that reads outside state
|
|
4964
|
+
* declares it on `RenderLayer.subscribe` instead. */
|
|
4965
|
+
redrawOn?: readonly RedrawSource[];
|
|
5375
4966
|
/**
|
|
5376
4967
|
* Combined adapter for scene-slot rendering, bounds computation, and
|
|
5377
4968
|
* move/resize/rotate gesture math. Optional — bare-Canvas consumers that
|
|
@@ -5439,9 +5030,7 @@ interface CanvasProps<TNode extends {
|
|
|
5439
5030
|
* Requires `inputElement`: with no element of its own there is nowhere for
|
|
5440
5031
|
* pointer input, focus or the cursor to live, and nothing renders.
|
|
5441
5032
|
*
|
|
5442
|
-
* N canvases can then share one GL context and one buffer.
|
|
5443
|
-
* own `<WeaselProvider isolate>` — under a shared `<ActionsProvider>` only
|
|
5444
|
-
* the newest responds to input and the rest go silently dead.
|
|
5033
|
+
* N canvases can then share one GL context and one buffer.
|
|
5445
5034
|
*/
|
|
5446
5035
|
paintInto?: {
|
|
5447
5036
|
canvas: HTMLCanvasElement | null;
|
|
@@ -5763,44 +5352,6 @@ declare function sceneToAdapter<TData, TLayer extends string, TPose>(scene: Scen
|
|
|
5763
5352
|
*/
|
|
5764
5353
|
declare function useSceneAdapter<TData, TLayer extends string, TPose>(scene: Scene<TData, TLayer, TPose>, options?: SceneToAdapterOptions<TData, TLayer, TPose>): SceneCanvasAdapter<TData, TLayer, TPose>;
|
|
5765
5354
|
|
|
5766
|
-
/** Option surface for the `rotate` action.
|
|
5767
|
-
*
|
|
5768
|
-
* Lives in a sibling file (not `rotate.ts`) so the type contract stays stable
|
|
5769
|
-
* even after the legacy `useRotate` hook is gone.
|
|
5770
|
-
* Consumers should import from here directly; `rotate.ts` re-exports the
|
|
5771
|
-
* same symbols for back-compat. */
|
|
5772
|
-
|
|
5773
|
-
/** Options for the `rotate` action. */
|
|
5774
|
-
interface UseRotateOptions<TPose> {
|
|
5775
|
-
/** Behaviors are typed against the pose shape; the kit ships none yet
|
|
5776
|
-
* (rotation snap behaviors are deferred). For non-rect TPose, behaviors
|
|
5777
|
-
* are typed `never` for a pose without a numeric `rotation`. */
|
|
5778
|
-
behaviors?: TPose extends RotatedPose ? RotateBehavior<TPose>[] : never;
|
|
5779
|
-
rotateLabel?: string;
|
|
5780
|
-
/** Reserved; rotate is never transient in practice. Ignored. */
|
|
5781
|
-
transient?: boolean;
|
|
5782
|
-
onGestureStart?: (id: string) => void;
|
|
5783
|
-
onGestureEnd?: (committed: boolean) => void;
|
|
5784
|
-
/** Optional debug sink. When supplied, records the rotation-handle
|
|
5785
|
-
* position + circular hitbox at gesture start. Tree-shakes via
|
|
5786
|
-
* optional-chain when omitted. */
|
|
5787
|
-
debug?: DebugSink;
|
|
5788
|
-
/** World-pixel distance from the AABB top edge to the rotation handle.
|
|
5789
|
-
* Used for debug-recording the handle position. Default
|
|
5790
|
-
* `DEFAULT_ROTATION_HANDLE_DISTANCE`. */
|
|
5791
|
-
rotationHandleDistance?: number;
|
|
5792
|
-
/** Hit-test radius for the rotation handle, in screen pixels. Used for
|
|
5793
|
-
* the recorded debug hitbox circle. Default `8`. */
|
|
5794
|
-
handleHitRadius?: number;
|
|
5795
|
-
/** Multi-selection pivot mode. Default `'union'`.
|
|
5796
|
-
* - `'each'`: each item rotates around its own center.
|
|
5797
|
-
* - `'union'`: each item rotates around the selection's union center;
|
|
5798
|
-
* item centers orbit the union center while also gaining the same
|
|
5799
|
-
* rotation delta.
|
|
5800
|
-
* Has no effect on single-id gestures. */
|
|
5801
|
-
pivot?: 'each' | 'union';
|
|
5802
|
-
}
|
|
5803
|
-
|
|
5804
5355
|
/** Reads the surface's deps from inside `SurfaceContribution.attach`. */
|
|
5805
5356
|
interface ContributionDepReader {
|
|
5806
5357
|
get<K extends DepName>(name: K): DepSchema[K] | undefined;
|
|
@@ -5831,6 +5382,34 @@ interface SurfaceContribution extends Contribution {
|
|
|
5831
5382
|
*/
|
|
5832
5383
|
declare function mergeContributions<T extends SurfaceContribution>(...bundles: readonly (readonly T[])[]): T[];
|
|
5833
5384
|
|
|
5385
|
+
/**
|
|
5386
|
+
* The behavior presets `<SceneCanvas features>` composes. A bare canvas renders
|
|
5387
|
+
* its scene and keeps a selection nothing sets; every behavior beyond that is
|
|
5388
|
+
* turned on by naming a preset here.
|
|
5389
|
+
*/
|
|
5390
|
+
/** A behavior preset for `<SceneCanvas features>`. `draw` names every other
|
|
5391
|
+
* one. */
|
|
5392
|
+
type Feature = 'view' | 'pick' | 'move' | 'transform' | 'edit' | 'arrange' | 'paths' | 'ingest' | 'draw';
|
|
5393
|
+
/** Every preset except `draw`, which only abbreviates them. */
|
|
5394
|
+
type BaseFeature = Exclude<Feature, 'draw'>;
|
|
5395
|
+
/** Every preset `<SceneCanvas features>` accepts, `draw` last. */
|
|
5396
|
+
declare const SCENE_CANVAS_FEATURES: readonly Feature[];
|
|
5397
|
+
/**
|
|
5398
|
+
* The kit-standard actions each preset registers.
|
|
5399
|
+
*
|
|
5400
|
+
* Every id `useStandardActions` knows appears under exactly one preset, except
|
|
5401
|
+
* the ones in {@link TOOL_DRIVEN_ACTION_IDS}. `move` and `transform` also bring
|
|
5402
|
+
* the ambient bindings that route drags to their actions, and `pick` brings the
|
|
5403
|
+
* select tool; this table is only the registration half.
|
|
5404
|
+
*/
|
|
5405
|
+
declare const FEATURE_ACTION_IDS: Readonly<Record<BaseFeature, readonly string[]>>;
|
|
5406
|
+
/**
|
|
5407
|
+
* Kit-standard actions no preset registers: they belong to the tools that bind
|
|
5408
|
+
* them. A canvas registers each one whenever a tool it carries names it in a
|
|
5409
|
+
* binding — `insert` with any shape tool, `enterTextEdit` with the text tool.
|
|
5410
|
+
*/
|
|
5411
|
+
declare const TOOL_DRIVEN_ACTION_IDS: readonly string[];
|
|
5412
|
+
|
|
5834
5413
|
/**
|
|
5835
5414
|
* The kit's built-in shape kinds — one table, every other spelling derived.
|
|
5836
5415
|
*
|
|
@@ -5838,7 +5417,7 @@ declare function mergeContributions<T extends SurfaceContribution>(...bundles: r
|
|
|
5838
5417
|
* questions of the same set: the interactions layer decides whether
|
|
5839
5418
|
* `insertAction` can paint a live preview for a kind, and the canvas layer
|
|
5840
5419
|
* decides which shape tools `useBuiltinShapeTools` mounts and what
|
|
5841
|
-
* `
|
|
5420
|
+
* `BUILTIN_TOOL_IDS` / `defaultNodeRouting` / `defaultNodeProperties` enumerate.
|
|
5842
5421
|
*
|
|
5843
5422
|
* This module imports nothing on purpose: `useBuiltinShapeTools` imports the
|
|
5844
5423
|
* package barrel, so anything barrel-reachable that needs these lists at
|
|
@@ -5859,7 +5438,7 @@ interface ShapeKindDescriptor {
|
|
|
5859
5438
|
/**
|
|
5860
5439
|
* Declaration order is the enumeration order of every derived list —
|
|
5861
5440
|
* `KIT_SHAPE_KINDS`, and through it `defaultNodeRouting` /
|
|
5862
|
-
* `defaultNodeProperties` / `
|
|
5441
|
+
* `defaultNodeProperties` / `BUILTIN_TOOL_IDS`.
|
|
5863
5442
|
*/
|
|
5864
5443
|
declare const SHAPE_KINDS: {
|
|
5865
5444
|
readonly rect: {
|
|
@@ -6100,30 +5679,28 @@ declare function defaultDrawOne<TData, TLayer extends string, TPose>(node: Node$
|
|
|
6100
5679
|
* number they always got. Kit-internal use sites multiply by
|
|
6101
5680
|
* `DeviceProfile.targetScale`. */
|
|
6102
5681
|
declare const DEFAULT_HANDLE_SIZE: 8;
|
|
5682
|
+
/** `<SceneCanvas layers>`: a {@link LayersMap} whose scene slot may be partial,
|
|
5683
|
+
* since the defaults fill in whatever it leaves out. */
|
|
5684
|
+
type SceneCanvasLayers<TNode extends {
|
|
5685
|
+
id: string;
|
|
5686
|
+
}, TPose> = LayersMap<TNode, TPose, Partial<SceneSlotConfig<TNode, TPose>>>;
|
|
6103
5687
|
/** Built-in tool ids that aren't shape tools — the ones with no entry in
|
|
6104
5688
|
* the `core/shapeKinds` table. */
|
|
6105
5689
|
declare const NON_SHAPE_BUILTIN_TOOLS: readonly ["select", "hand"];
|
|
6106
5690
|
/** Built-in tool ids SceneCanvas knows how to mount when no `tools` prop
|
|
6107
|
-
* is supplied
|
|
5691
|
+
* is supplied, via `defaultTools`. */
|
|
6108
5692
|
type BuiltinToolId = (typeof NON_SHAPE_BUILTIN_TOOLS)[number] | BuiltinShapeToolId;
|
|
6109
|
-
/**
|
|
6110
|
-
|
|
6111
|
-
type ToolBundle = 'minimal' | 'standard' | 'exhaustive';
|
|
6112
|
-
/** Tool-id contents of each named `ToolBundle`. Public so consumers (e.g.
|
|
6113
|
-
* the Bundle Inspector) can introspect the same map SceneCanvas uses to
|
|
6114
|
-
* expand `toolBundle` without mirroring it. The `src/index.barrel.test.ts`
|
|
6115
|
-
* parity gate enforces that every `ToolBundle` id appears here with a
|
|
6116
|
-
* non-empty tool list. */
|
|
6117
|
-
declare const BUNDLE_TOOLS: Record<ToolBundle, readonly BuiltinToolId[]>;
|
|
5693
|
+
/** Every built-in tool id, shape tools included. */
|
|
5694
|
+
declare const BUILTIN_TOOL_IDS: readonly BuiltinToolId[];
|
|
6118
5695
|
/** Minimal hit descriptor passed to `onDoubleClick`. Contains the fields
|
|
6119
5696
|
* modality dispatch needs; extends as the kit's `Hit` type evolves. */
|
|
6120
5697
|
interface SceneCanvasHit {
|
|
6121
5698
|
id: string;
|
|
6122
5699
|
kind: string;
|
|
6123
5700
|
}
|
|
6124
|
-
/** Props for `<SceneCanvas>`.
|
|
6125
|
-
*
|
|
6126
|
-
*
|
|
5701
|
+
/** Props for `<SceneCanvas>`. A scene is the only thing it needs. With nothing
|
|
5702
|
+
* else it renders that scene and keeps a selection no input sets; `features`
|
|
5703
|
+
* turns behavior on by preset, and the rest configures what those turn on. */
|
|
6127
5704
|
type SceneCanvasProps<TData, TLayer extends string, TPose> = Omit<CanvasProps<Node$1<TData, TLayer, TPose>, TPose>, 'adapter' | 'moveOptions' | 'resizeOptions' | 'rotateOptions' | 'snap' | 'pickEvery' | 'boundsOf' | 'handleHitRadius' | 'selection' | 'selectionOptions' | 'tools' | 'layers' | 'onBackgroundClick' | 'getIsVisible' | 'contentVersion' | 'layerVisibility' | 'layerOrder'> & {
|
|
6128
5705
|
/** A `Scene` (typically from `useScene`) — or a `SerializedScene`
|
|
6129
5706
|
* JSON object, which SceneCanvas bakes into a Scene internally on
|
|
@@ -6144,10 +5721,11 @@ type SceneCanvasProps<TData, TLayer extends string, TPose> = Omit<CanvasProps<No
|
|
|
6144
5721
|
nodes: ReadonlyArray<unknown>;
|
|
6145
5722
|
};
|
|
6146
5723
|
/** Layer configuration. When omitted, SceneCanvas applies kit defaults
|
|
6147
|
-
* (a scene slot that paints `node.data.
|
|
6148
|
-
* selection overlay).
|
|
6149
|
-
* defaults; pass `slot: null` to suppress a
|
|
6150
|
-
|
|
5724
|
+
* (a scene slot that paints `node.data.fill` rects + a default
|
|
5725
|
+
* selection overlay). A partial scene or selection-overlay config is
|
|
5726
|
+
* spread over that slot's defaults; pass `slot: null` to suppress a
|
|
5727
|
+
* default explicitly. */
|
|
5728
|
+
layers?: SceneCanvasLayers<Node$1<TData, TLayer, TPose>, TPose>;
|
|
6151
5729
|
/** Layout strategies keyed by container node id (or a resolver). Forwarded
|
|
6152
5730
|
* to `sceneToAdapter` so `useMove`'s layout pass runs on configured
|
|
6153
5731
|
* containers (reflow on enter, reparent + reflow on commit). */
|
|
@@ -6307,25 +5885,53 @@ type SceneCanvasProps<TData, TLayer extends string, TPose> = Omit<CanvasProps<No
|
|
|
6307
5885
|
* Default `'single'`.
|
|
6308
5886
|
*/
|
|
6309
5887
|
selectionMode?: CanvasSelectionMode;
|
|
5888
|
+
/**
|
|
5889
|
+
* Behavior presets to turn on, composable in any combination. A canvas
|
|
5890
|
+
* with none renders its scene and keeps a selection (the `selection` API
|
|
5891
|
+
* works) that no input sets: no tools, no standard actions or their keys,
|
|
5892
|
+
* no clipboard, no drop or paste, and no selection chrome. The dispatcher
|
|
5893
|
+
* is still mounted, so bindings a consumer adds work.
|
|
5894
|
+
*
|
|
5895
|
+
* - `view` — wheel pan and zoom, pinch, the zoom keys, and the hand tool
|
|
5896
|
+
* (H, or hold Space). Passing `viewport` implies it.
|
|
5897
|
+
* - `pick` — the select tool, as the initial active tool and Escape's
|
|
5898
|
+
* return target: click to pick, drag on empty to marquee, click on empty
|
|
5899
|
+
* to clear; and the selection outline.
|
|
5900
|
+
* - `move` — drag a body to move it, Alt-drag to clone it. Ambient, so it
|
|
5901
|
+
* runs under any tool that does not claim the drag.
|
|
5902
|
+
* - `transform` — resize and rotation handles, drawn and bound.
|
|
5903
|
+
* - `edit` — undo/redo, delete, duplicate, group/ungroup, nudge,
|
|
5904
|
+
* select-all, Escape, cancel-gesture, cut/copy/paste, fill and stroke,
|
|
5905
|
+
* and their keys.
|
|
5906
|
+
* - `arrange` — align, distribute, reorder, flip.
|
|
5907
|
+
* - `paths` — pathfinder operations, path-edit entry and anchor editing.
|
|
5908
|
+
* - `ingest` — dropped and pasted content (Cmd/Ctrl+V arrives as a paste).
|
|
5909
|
+
* - `draw` — all of the above.
|
|
5910
|
+
*
|
|
5911
|
+
* Tools add the actions they bind — a shape tool brings `insert` — so
|
|
5912
|
+
* `defaultTools` composes with any preset. `actions` then adds, overrides
|
|
5913
|
+
* or removes on top of what the presets registered.
|
|
5914
|
+
*/
|
|
5915
|
+
features?: readonly Feature[];
|
|
6310
5916
|
/** Extra tools or overrides keyed by id, or a full `ToolsApi` takeover.
|
|
6311
5917
|
*
|
|
6312
5918
|
* **Patch form** (`Record<string, AnyTool | true | false>`): merged
|
|
6313
|
-
* into the built-in registry on top of whatever `defaultTools`
|
|
6314
|
-
* `
|
|
5919
|
+
* into the built-in registry on top of whatever `defaultTools` and
|
|
5920
|
+
* `features` already selected.
|
|
6315
5921
|
* - `true` pulls in the built-in for this id (`'pen'`, `'lasso'`,
|
|
6316
|
-
* `'hand'`, …)
|
|
6317
|
-
* for `toolBundle: 'minimal'` + `tools={{ pen: true }}`. Unknown
|
|
5922
|
+
* `'hand'`, …), the same as listing it in `defaultTools`. Unknown
|
|
6318
5923
|
* built-in ids warn in dev and are ignored.
|
|
6319
5924
|
* - `AnyTool` adds a new id or replaces an existing one
|
|
6320
5925
|
* (dev-only warning on replace).
|
|
6321
5926
|
* - `false` omits a bundled tool entirely.
|
|
6322
5927
|
* Auto-wiring (keybindings, dispatcher, action registry) still runs.
|
|
6323
5928
|
*
|
|
6324
|
-
* **Takeover form** (`ToolsApi`): the internal
|
|
6325
|
-
*
|
|
6326
|
-
*
|
|
6327
|
-
*
|
|
6328
|
-
* to opt
|
|
5929
|
+
* **Takeover form** (`ToolsApi`): the internal registry is bypassed and
|
|
5930
|
+
* this `tools` value is forwarded to Canvas as-is — the consumer owns
|
|
5931
|
+
* active-slot management, and `pick`'s select tool is theirs to supply.
|
|
5932
|
+
* Every other preset still applies. Keybindings are still auto-wired
|
|
5933
|
+
* against the supplied registry; pass `enableKeybindings={false}` to opt
|
|
5934
|
+
* out. */
|
|
6329
5935
|
tools?: ToolsApi | Record<string, AnyTool | true | false>;
|
|
6330
5936
|
/**
|
|
6331
5937
|
* Auto-wire keyboard shortcuts. Default `true`. When `false`, SceneCanvas
|
|
@@ -6358,53 +5964,43 @@ type SceneCanvasProps<TData, TLayer extends string, TPose> = Omit<CanvasProps<No
|
|
|
6358
5964
|
*/
|
|
6359
5965
|
onToolsCreated?: (tools: ToolsApi) => void;
|
|
6360
5966
|
/**
|
|
6361
|
-
*
|
|
6362
|
-
*
|
|
6363
|
-
*
|
|
6364
|
-
* `
|
|
6365
|
-
*
|
|
6366
|
-
*/
|
|
6367
|
-
toolBundle?: ToolBundle;
|
|
6368
|
-
/**
|
|
6369
|
-
* Which built-in tools SceneCanvas registers in its internal `useTools`.
|
|
6370
|
-
* Default: `['select']` (plus `'hand'` when the
|
|
6371
|
-
* `viewport` feature is on). Pass a smaller array to slim — e.g.
|
|
6372
|
-
* `['select']` for move-only. Wins over `toolBundle` when both are
|
|
6373
|
-
* passed. Ignored when the consumer supplies their own `tools` prop.
|
|
5967
|
+
* Built-in tools SceneCanvas registers in its internal `useTools`, on top
|
|
5968
|
+
* of the ones presets bring (`select` from `pick`, `hand` from `view`).
|
|
5969
|
+
* Default: none. Each tool also registers the kit actions it binds, so
|
|
5970
|
+
* `['rect']` brings `insert`. Ignored when the consumer supplies their own
|
|
5971
|
+
* `tools` prop.
|
|
6374
5972
|
*/
|
|
6375
5973
|
defaultTools?: readonly BuiltinToolId[];
|
|
6376
5974
|
/** Per-tool option overrides for the built-in shape/lasso/clone tools.
|
|
6377
5975
|
* Each entry is a narrow subset of the underlying hook's options
|
|
6378
5976
|
* surface — `lasso.mode`, `clone.cloneSelection`, etc. */
|
|
6379
5977
|
toolOptions?: BuiltinToolOptions;
|
|
6380
|
-
/** Initial active-slot tool id. Default: `'select'
|
|
6381
|
-
* registered
|
|
6382
|
-
*
|
|
6383
|
-
*
|
|
6384
|
-
*
|
|
5978
|
+
/** Initial active-slot tool id. Default: `'select'` when it is
|
|
5979
|
+
* registered, otherwise none — a canvas can run on ambient bindings
|
|
5980
|
+
* alone. Must be one of the registered tools. The lasso demo starts with
|
|
5981
|
+
* `initialActiveTool="lasso"`. Ignored when the consumer supplies their
|
|
5982
|
+
* own `tools` prop. */
|
|
6385
5983
|
initialActiveTool?: string;
|
|
6386
|
-
/** Always-on entries to register alongside the internal
|
|
6387
|
-
*
|
|
6388
|
-
*
|
|
6389
|
-
*
|
|
6390
|
-
* `tools` prop, this is ignored — wire `ambient`
|
|
6391
|
-
* `useTools` call instead. */
|
|
6392
|
-
ambient?: readonly
|
|
6393
|
-
/**
|
|
5984
|
+
/** Always-on entries to register alongside the internal tools — every one
|
|
5985
|
+
* a `SurfaceContribution`, whose views, deps, overlay, bindings, actions
|
|
5986
|
+
* and `attach` all install from this one list, and uninstall when the
|
|
5987
|
+
* entry leaves it. A tool is a contribution too, so one can go here. If
|
|
5988
|
+
* you supply your own `tools` prop, this is ignored — wire `ambient`
|
|
5989
|
+
* through your own `useTools` call instead. */
|
|
5990
|
+
ambient?: readonly SurfaceContribution[];
|
|
5991
|
+
/** Configures the `view` preset, and implies it: passing this turns
|
|
5992
|
+
* `view` on.
|
|
6394
5993
|
*
|
|
6395
5994
|
* - `inertia` and `animatedZoom` are opt-in: pass `true` for defaults or
|
|
6396
5995
|
* an object to tune. Omitted means off.
|
|
6397
5996
|
* - `pan` (wheel pan), `zoom` (Cmd+wheel + Cmd+=/-/0) and `pinchZoom`
|
|
6398
|
-
* (two-finger pinch) are
|
|
6399
|
-
*
|
|
6400
|
-
*
|
|
6401
|
-
*
|
|
6402
|
-
*
|
|
5997
|
+
* (two-finger pinch) are on under `view`; pass `false` to disable one.
|
|
5998
|
+
* All three are wired by registering the kit's `viewport.*` action
|
|
5999
|
+
* descriptors with the actions registry — disabling via the `actions`
|
|
6000
|
+
* prop (`actions: { 'viewport.wheelPan': null }`) also works and runs
|
|
6001
|
+
* after this.
|
|
6403
6002
|
*
|
|
6404
|
-
*
|
|
6405
|
-
* pan, Cmd+wheel/key zoom and pinch zoom remain wired (canvas-first
|
|
6406
|
-
* default). Pass `{ pan: false, zoom: false, pinchZoom: false }` to opt
|
|
6407
|
-
* out entirely. */
|
|
6003
|
+
* Without `view`, none of them are wired. */
|
|
6408
6004
|
viewport?: {
|
|
6409
6005
|
inertia?: boolean | {
|
|
6410
6006
|
friction?: number;
|
|
@@ -6506,10 +6102,16 @@ type SceneCanvasProps<TData, TLayer extends string, TPose> = Omit<CanvasProps<No
|
|
|
6506
6102
|
*/
|
|
6507
6103
|
views?: readonly CanvasViewProps[];
|
|
6508
6104
|
/**
|
|
6509
|
-
* Children rendered alongside the canvas
|
|
6510
|
-
*
|
|
6105
|
+
* Children rendered alongside the canvas, inside its input scope (e.g.
|
|
6106
|
+
* shortcuts overlays, probes).
|
|
6511
6107
|
*/
|
|
6512
6108
|
children?: ReactNode;
|
|
6109
|
+
/**
|
|
6110
|
+
* A yoke to join, from `useYoke()`: canvases on one yoke share the
|
|
6111
|
+
* active tool, the gesture in flight and history. Omitted, this canvas
|
|
6112
|
+
* keeps its own.
|
|
6113
|
+
*/
|
|
6114
|
+
yoke?: Yoke;
|
|
6513
6115
|
/**
|
|
6514
6116
|
* Chrome-caps visibility overrides, keyed by chrome id (`selection.outline`,
|
|
6515
6117
|
* `selection.rotation-handle`, `gesture.marquee`, …). Each entry is a
|
|
@@ -6524,20 +6126,14 @@ type SceneCanvasProps<TData, TLayer extends string, TPose> = Omit<CanvasProps<No
|
|
|
6524
6126
|
*/
|
|
6525
6127
|
chromeVisibility?: VisibilityRules;
|
|
6526
6128
|
/**
|
|
6527
|
-
*
|
|
6528
|
-
*
|
|
6529
|
-
*
|
|
6530
|
-
*
|
|
6531
|
-
*
|
|
6532
|
-
*
|
|
6533
|
-
* Threading this through enables mode-aware chrome (selection outline,
|
|
6534
|
-
* resize handles, rotation handle are off in path-edit mode) and the
|
|
6535
|
-
* dispatcher's eligibility filter in later phases.
|
|
6129
|
+
* The app's mode registry (`createModeRegistry` in `@weasel-js/modes`).
|
|
6130
|
+
* The canvas reads the active mode from it to gate chrome, tool
|
|
6131
|
+
* activation and the dispatcher's eligibility filter, repaints when it
|
|
6132
|
+
* switches, and hands every registered mode to the dev-time route-conflict
|
|
6133
|
+
* check. Omitted, the canvas behaves as the kit's normal mode and nothing
|
|
6134
|
+
* revokes anchor editing.
|
|
6536
6135
|
*/
|
|
6537
|
-
|
|
6538
|
-
id: string;
|
|
6539
|
-
allowedCapabilities: ReadonlySet<string>;
|
|
6540
|
-
};
|
|
6136
|
+
modes?: ModeRegistry;
|
|
6541
6137
|
/**
|
|
6542
6138
|
* Override detected device facts. Merged over what `matchMedia` reports;
|
|
6543
6139
|
* `targetScale` is re-derived from the merged `coarsePointer` unless you
|
|
@@ -6660,11 +6256,12 @@ declare function SceneCanvasInner<TData, TLayer extends string, TPose>(props: Sc
|
|
|
6660
6256
|
* The canvas component: renders a `Scene` and wires the interaction stack
|
|
6661
6257
|
* around it.
|
|
6662
6258
|
*
|
|
6663
|
-
*
|
|
6664
|
-
*
|
|
6665
|
-
*
|
|
6666
|
-
*
|
|
6667
|
-
*
|
|
6259
|
+
* Mounted bare it renders the scene, keeps a selection no input sets, and
|
|
6260
|
+
* runs a gesture dispatcher for whatever bindings the consumer adds. The
|
|
6261
|
+
* `features` presets turn the kit's behavior on — `features={['draw']}` is the
|
|
6262
|
+
* whole editor: tools, standard actions and their keys, selection chrome,
|
|
6263
|
+
* undo. This is the intended entry point; the lower-level primitives it
|
|
6264
|
+
* composes are not part of the public surface.
|
|
6668
6265
|
*
|
|
6669
6266
|
* Its ref exposes a `SceneCanvasApi` for the imperative operations that do not
|
|
6670
6267
|
* fit a prop (view control, hit queries, redraw requests).
|
|
@@ -7917,8 +7514,7 @@ declare function PointerProviderIfRoot({ children }: {
|
|
|
7917
7514
|
children: ReactNode;
|
|
7918
7515
|
}): react.JSX.Element;
|
|
7919
7516
|
|
|
7920
|
-
/** Mount an `<ActionsProvider>` only when none is already in scope
|
|
7921
|
-
* nesting canvases share one action registry instead of shadowing it. */
|
|
7517
|
+
/** Mount an `<ActionsProvider>` only when none is already in scope. */
|
|
7922
7518
|
declare function ActionsProviderIfRoot({ children }: {
|
|
7923
7519
|
children: ReactNode;
|
|
7924
7520
|
}): react.JSX.Element;
|
|
@@ -8011,6 +7607,33 @@ interface GateLayerOptions<TData> {
|
|
|
8011
7607
|
* without the layer knowing anything about focus. */
|
|
8012
7608
|
declare function gateLayer<TData>(opts: GateLayerOptions<TData>): RenderLayer<TData>;
|
|
8013
7609
|
|
|
7610
|
+
/** Options for {@link workspaceTintLayer}. */
|
|
7611
|
+
interface WorkspaceTintLayerOptions {
|
|
7612
|
+
registry: ModeRegistry;
|
|
7613
|
+
/** The page, in world coordinates. When given, the tint covers only the
|
|
7614
|
+
* workspace around it, each strip fading toward the page edge if the mode
|
|
7615
|
+
* names a gradient. Without it the tint covers the whole canvas. */
|
|
7616
|
+
page?: () => Rect | null;
|
|
7617
|
+
/** Opacity for every mode's tint, in place of its `workspace.intensity`. */
|
|
7618
|
+
intensity?: number;
|
|
7619
|
+
id?: string;
|
|
7620
|
+
label?: string;
|
|
7621
|
+
}
|
|
7622
|
+
/**
|
|
7623
|
+
* A screen-space layer painting the active mode's `WorkspaceVisual`: nothing in
|
|
7624
|
+
* a mode without a tint, otherwise a wash at the mode's intensity, bottom-up or
|
|
7625
|
+
* top-down when the mode names a gradient. It subscribes to the registry, so a
|
|
7626
|
+
* mode switch repaints it.
|
|
7627
|
+
*/
|
|
7628
|
+
declare function workspaceTintLayer(opts: WorkspaceTintLayerOptions): RenderLayer<unknown>;
|
|
7629
|
+
/** A world-space layer drawing a `ModeDecorations`' active painter. It
|
|
7630
|
+
* subscribes to the decorations, so a mode switch or a new painter repaints
|
|
7631
|
+
* it. */
|
|
7632
|
+
declare function modeDecorationLayer(decorations: ModeDecorations, opts?: {
|
|
7633
|
+
id?: string;
|
|
7634
|
+
label?: string;
|
|
7635
|
+
}): RenderLayer<unknown>;
|
|
7636
|
+
|
|
8014
7637
|
/**
|
|
8015
7638
|
* Z-ordered child renderer — replaces the manual `for (id of getChildren()) ...`
|
|
8016
7639
|
* pattern with a `RenderLayer` factory that consumes an `OrderedAdapter`.
|
|
@@ -8683,6 +8306,9 @@ interface UseTextEditOptions {
|
|
|
8683
8306
|
* `UseTextEditReturn.selection`.
|
|
8684
8307
|
*/
|
|
8685
8308
|
isEditorChrome?: (el: Element) => boolean;
|
|
8309
|
+
/** What Escape does to the edit: `'cancel'` (the default) drops it,
|
|
8310
|
+
* `'commit'` keeps the text as Enter would. */
|
|
8311
|
+
escape?: 'cancel' | 'commit';
|
|
8686
8312
|
}
|
|
8687
8313
|
/** Options for `useTextEdit().startEdit`. */
|
|
8688
8314
|
interface StartEditOptions {
|
|
@@ -8882,6 +8508,8 @@ interface UseSceneTextEditOptions<TData> {
|
|
|
8882
8508
|
* the character controls.
|
|
8883
8509
|
*/
|
|
8884
8510
|
isEditorChrome?: (el: Element) => boolean;
|
|
8511
|
+
/** Forwarded to `useTextEdit`: what Escape does to the edit. */
|
|
8512
|
+
escape?: 'cancel' | 'commit';
|
|
8885
8513
|
}
|
|
8886
8514
|
/** Return shape extends `UseTextEditReturn` with an `onDoubleClick`
|
|
8887
8515
|
* binding for the canvas container. Double-clicking inside a text
|
|
@@ -9127,6 +8755,19 @@ declare function isMeshGradientFill(fill: FillStyle | null | undefined): fill is
|
|
|
9127
8755
|
* `color` — a mesh seeded from a solid has to show *something* curved, or
|
|
9128
8756
|
* switching kind looks like nothing happened. */
|
|
9129
8757
|
declare function seedMeshPatch(color: string): MeshGradientFill;
|
|
8758
|
+
/**
|
|
8759
|
+
* A stop list as a mesh: one full-height band per gap between neighboring
|
|
8760
|
+
* stops, colored left to right. The bands blend exactly the way the ramp
|
|
8761
|
+
* does, so a horizontal gradient survives the switch unchanged. A zero-width
|
|
8762
|
+
* gap is a hard break and gets no band.
|
|
8763
|
+
*/
|
|
8764
|
+
declare function meshFromStops(stops: readonly GradStop[]): MeshGradientFill;
|
|
8765
|
+
/**
|
|
8766
|
+
* A mesh read as a stop list: every patch's top edge — corner 0 to corner 1 —
|
|
8767
|
+
* placed by its `x` across the mesh's horizontal extent. The inverse of
|
|
8768
|
+
* `meshFromStops`, and for any other mesh the ramp across its top.
|
|
8769
|
+
*/
|
|
8770
|
+
declare function meshStops(mesh: MeshGradientFill): GradStop[];
|
|
9130
8771
|
/**
|
|
9131
8772
|
* The `<defs>` entry for a mesh paint, in weasel's own namespace.
|
|
9132
8773
|
*
|
|
@@ -9574,6 +9215,10 @@ interface SetPathArgs {
|
|
|
9574
9215
|
* history's coalesce window. Pass an explicit key to opt out. */
|
|
9575
9216
|
declare function createSetPathOp(args: SetPathArgs): Op;
|
|
9576
9217
|
|
|
9218
|
+
/** Rebuilds an op from its serialized `args`. */
|
|
9219
|
+
type OpFactory = (args: unknown) => Op;
|
|
9220
|
+
/** Every registered op factory, keyed by op name, in registration order. */
|
|
9221
|
+
declare const opFactoryRegistry: Reflection<OpFactory>;
|
|
9577
9222
|
/** Register an op-factory builder under a stable name. The builder receives
|
|
9578
9223
|
* the serialized `args` and must return an `Op` equivalent to one freshly
|
|
9579
9224
|
* constructed at the original call site (`apply` and `invert` behave the
|
|
@@ -9781,8 +9426,8 @@ interface PointInPathOptions {
|
|
|
9781
9426
|
declare function pointInPath(path: Path, x: number, y: number, opts?: PointInPathOptions): boolean;
|
|
9782
9427
|
|
|
9783
9428
|
/**
|
|
9784
|
-
* Path-vs-geometry hit-test helpers
|
|
9785
|
-
*
|
|
9429
|
+
* Path-vs-geometry hit-test helpers: pure functions covering path-vs-point,
|
|
9430
|
+
* path-vs-rect, and path-vs-polygon in both directions.
|
|
9786
9431
|
*
|
|
9787
9432
|
* `RectPath` short-circuits to AABB arithmetic. A `PolygonPath` is treated as
|
|
9788
9433
|
* its filled region: whether a point is inside comes from `pointInPath`, so
|
|
@@ -9809,13 +9454,8 @@ declare function pathIntersectsPolygon(path: Path, polygon: readonly Point2[], o
|
|
|
9809
9454
|
* `pathContainsPoint` from `pathHitTest.ts` to get a closed-region
|
|
9810
9455
|
* pick distance (0 inside, stroke-distance outside).
|
|
9811
9456
|
*
|
|
9812
|
-
*
|
|
9813
|
-
*
|
|
9814
|
-
* curve and reduce to point-to-segment over the polyline approximation —
|
|
9815
|
-
* cheap and accurate to ~1 px for typical edit-tool sampling counts.
|
|
9816
|
-
* Quadratic beziers fall through to the cubic sampler via equivalence.
|
|
9817
|
-
*
|
|
9818
|
-
* RectPath short-circuits to AABB-perimeter math: O(1).
|
|
9457
|
+
* A polygon path defers to geom's `nearestOnPath`; a RectPath short-circuits
|
|
9458
|
+
* to AABB-perimeter math.
|
|
9819
9459
|
*/
|
|
9820
9460
|
|
|
9821
9461
|
/** Closest Euclidean distance from (px, py) to the boundary of `path`.
|
|
@@ -10069,22 +9709,37 @@ declare function decomposePath(parent: Path, world: Path): Path;
|
|
|
10069
9709
|
* single subpath comes back as a one-element array. */
|
|
10070
9710
|
declare function splitSubpaths(path: PolygonPath): PolygonPath[];
|
|
10071
9711
|
|
|
10072
|
-
/** Options for `
|
|
10073
|
-
interface
|
|
10074
|
-
/**
|
|
9712
|
+
/** Options for `splitPathBySegment`. */
|
|
9713
|
+
interface SplitBySegmentOptions {
|
|
9714
|
+
/**
|
|
9715
|
+
* Flattening tolerance for the check that decides whether contours cross
|
|
9716
|
+
* each other. Only a path whose contours do cross is flattened (see
|
|
9717
|
+
* `splitPathBySegment`).
|
|
9718
|
+
*/
|
|
10075
9719
|
flattenTolerance?: number;
|
|
10076
9720
|
}
|
|
10077
9721
|
/**
|
|
10078
|
-
* Split `path` along the finite segment a
|
|
9722
|
+
* Split `path` along the finite segment a→b into closed pieces (Knife).
|
|
10079
9723
|
*
|
|
10080
|
-
*
|
|
10081
|
-
*
|
|
10082
|
-
*
|
|
10083
|
-
*
|
|
10084
|
-
*
|
|
10085
|
-
*
|
|
9724
|
+
* Only chords the segment crosses end to end are cut: a stretch of the segment
|
|
9725
|
+
* that starts or stops inside the fill cuts nothing, and nothing beyond the
|
|
9726
|
+
* segment's ends is touched, so a concave shape splits exactly where the
|
|
9727
|
+
* stroke crosses it. Curves are split at the crossing parameters by de
|
|
9728
|
+
* Casteljau subdivision, so every piece traces the original boundary exactly
|
|
9729
|
+
* and keeps its quadratic and cubic segments; the new edges along the cut are
|
|
9730
|
+
* straight lines.
|
|
9731
|
+
*
|
|
9732
|
+
* Each connected piece the cut produces is returned as its own path, holes
|
|
9733
|
+
* included. Contours the segment misses entirely are returned together as one
|
|
9734
|
+
* final piece. A single chord that does not disconnect the shape (across a
|
|
9735
|
+
* ring, say) returns one slit piece.
|
|
9736
|
+
*
|
|
9737
|
+
* A path whose contours cross each other or themselves is first resolved into
|
|
9738
|
+
* non-overlapping rings by a polygon union, which flattens its curves.
|
|
9739
|
+
*
|
|
9740
|
+
* Returns `null` when no chord is cut.
|
|
10086
9741
|
*/
|
|
10087
|
-
declare function
|
|
9742
|
+
declare function splitPathBySegment(path: Path, a: Point, b: Point, opts?: SplitBySegmentOptions): Path[] | null;
|
|
10088
9743
|
|
|
10089
9744
|
/**
|
|
10090
9745
|
* AABB union over a heterogeneous set of `Path` poses. Returns the
|
|
@@ -10468,6 +10123,15 @@ interface PaintKindEntry {
|
|
|
10468
10123
|
colorOf(paint: FillStyle): string | undefined;
|
|
10469
10124
|
/** Editor slot. */
|
|
10470
10125
|
Editor?: ComponentType<PaintKindEditorProps>;
|
|
10126
|
+
/**
|
|
10127
|
+
* The stop list this paint reads as. With `fromStops`, it is what makes a
|
|
10128
|
+
* kind a gradient: `listGradientKinds` returns the kinds carrying both, and
|
|
10129
|
+
* `switchGradientKind` converts between any two of them through the list.
|
|
10130
|
+
*/
|
|
10131
|
+
stopsOf?(paint: FillStyle): GradStop[];
|
|
10132
|
+
/** A paint of this kind built from a stop list, in `bounds` units. The
|
|
10133
|
+
* converse of `stopsOf`; supply both or neither. */
|
|
10134
|
+
fromStops?(stops: GradStop[]): FillStyle;
|
|
10471
10135
|
/**
|
|
10472
10136
|
* Render slot: bind program, uniforms and textures for `fill` and return the
|
|
10473
10137
|
* bound program; `null` declines the paint.
|
|
@@ -10493,6 +10157,8 @@ interface PaintKindEntry {
|
|
|
10493
10157
|
*/
|
|
10494
10158
|
toSvg?(id: string, fill: FillStyle): string;
|
|
10495
10159
|
}
|
|
10160
|
+
/** Every registered paint kind, with the overrides each displaced. */
|
|
10161
|
+
declare const paintKindRegistry: Reflection<PaintKindEntry>;
|
|
10496
10162
|
/**
|
|
10497
10163
|
* A consumer's own paint, typed as a `FillStyle`.
|
|
10498
10164
|
*
|
|
@@ -10505,12 +10171,27 @@ interface PaintKindEntry {
|
|
|
10505
10171
|
declare function asPaint<T extends {
|
|
10506
10172
|
fill: string;
|
|
10507
10173
|
}>(paint: T): FillStyle;
|
|
10508
|
-
/** Register a paint kind. Returns a disposer that removes it.
|
|
10174
|
+
/** Register a paint kind. Returns a disposer that removes it. Re-registering an
|
|
10175
|
+
* existing id is an override; disposing it uncovers whatever it displaced. */
|
|
10509
10176
|
declare function registerPaintKind(entry: PaintKindEntry): () => void;
|
|
10510
10177
|
/** The entry for `kind`, or `undefined`. */
|
|
10511
10178
|
declare function getPaintKind(kind: string | undefined): PaintKindEntry | undefined;
|
|
10512
10179
|
/** Every registered kind, built-ins first, in registration order. */
|
|
10513
10180
|
declare function listPaintKinds(): readonly PaintKindEntry[];
|
|
10181
|
+
/** Every registered gradient kind — the ones that read as and build from a
|
|
10182
|
+
* stop list — in registration order. */
|
|
10183
|
+
declare function listGradientKinds(): readonly PaintKindEntry[];
|
|
10184
|
+
/**
|
|
10185
|
+
* `paint` retargeted to gradient kind `kind`, or `undefined` when either side
|
|
10186
|
+
* is not a gradient kind.
|
|
10187
|
+
*
|
|
10188
|
+
* Between two of the stop gradients this is `withGradientKind`, which carries
|
|
10189
|
+
* the geometry. Any other pair goes through the stop list — `stopsOf` on the
|
|
10190
|
+
* way out, `fromStops` on the way in — keeping `interpolate` and `opacity`.
|
|
10191
|
+
* Lossy wherever the kinds hold different information; an editor that wants a
|
|
10192
|
+
* switch to be undoable should keep the original paint.
|
|
10193
|
+
*/
|
|
10194
|
+
declare function switchGradientKind(paint: FillStyle, kind: PaintKind): FillStyle | undefined;
|
|
10514
10195
|
/** The registry entry for a paint, or `undefined` when its kind is unknown. */
|
|
10515
10196
|
declare function paintKindOf(fill: FillStyle): PaintKindEntry | undefined;
|
|
10516
10197
|
/** @internal Test helper — do not call from product code. */
|
|
@@ -10564,11 +10245,18 @@ interface MarkerEntry {
|
|
|
10564
10245
|
/** `'auto'` (default) follows the line; a number is a fixed angle in
|
|
10565
10246
|
* radians, ignoring the line — SVG's `orient="<angle>"`. */
|
|
10566
10247
|
orient?: 'auto' | number;
|
|
10248
|
+
/** The stroke fields `path` reads besides `ctx.size` — `[]` for a shape
|
|
10249
|
+
* drawn from size alone. Declared, a head is reused across stroke objects
|
|
10250
|
+
* whose listed fields are equal; omitted, only across frames that pass the
|
|
10251
|
+
* same stroke object, since `path` might read any of it. */
|
|
10252
|
+
reads?: readonly (keyof Stroke)[];
|
|
10567
10253
|
/** Emits the `<marker>` def. Consumed by `@weasel-js/svg`. */
|
|
10568
10254
|
toSvg?(id: string, entry: MarkerEntry): string;
|
|
10569
10255
|
}
|
|
10570
|
-
/**
|
|
10571
|
-
|
|
10256
|
+
/** Every registered marker, with the overrides each displaced. */
|
|
10257
|
+
declare const markerRegistry: Reflection<MarkerEntry>;
|
|
10258
|
+
/** Register a marker. Returns a disposer. Re-registering an existing id is an
|
|
10259
|
+
* override; disposing it uncovers whatever it displaced rather than deleting the key. */
|
|
10572
10260
|
declare function registerMarker(entry: MarkerEntry): () => void;
|
|
10573
10261
|
/** The entry for `key`, or `undefined`. */
|
|
10574
10262
|
declare function getMarker(key: string | undefined): MarkerEntry | undefined;
|
|
@@ -10587,15 +10275,17 @@ declare function _resetMarkersForTests(): void;
|
|
|
10587
10275
|
* line ends.
|
|
10588
10276
|
*/
|
|
10589
10277
|
|
|
10590
|
-
/** The size of one marker unit, in the same world units as `strokeWidth`.
|
|
10591
|
-
|
|
10278
|
+
/** The size of one marker unit, in the same world units as `strokeWidth`.
|
|
10279
|
+
* `scale` is the view scale a `{ px }` size resolves against, as a `{ px }`
|
|
10280
|
+
* stroke width does. */
|
|
10281
|
+
declare function resolveMarkerSize(ref: MarkerRef, strokeWidth: number, scale?: number): number;
|
|
10592
10282
|
declare function markerKeyOf(ref: MarkerRef): string;
|
|
10593
10283
|
/**
|
|
10594
10284
|
* How far back the ribbon stops for `ref`, in world units. Zero for an absent
|
|
10595
10285
|
* marker, an unregistered key, or an open head — never throws, because an
|
|
10596
10286
|
* unknown key is a data problem and dropping the head is the graceful answer.
|
|
10597
10287
|
*/
|
|
10598
|
-
declare function markerInset(ref: MarkerRef | undefined, strokeWidth: number): number;
|
|
10288
|
+
declare function markerInset(ref: MarkerRef | undefined, strokeWidth: number, scale?: number): number;
|
|
10599
10289
|
/** The start and end insets a stroke asks for. `markerMid` never insets —
|
|
10600
10290
|
* trimming at an interior vertex would cut the line in two. */
|
|
10601
10291
|
declare function strokeInsets(stroke: Stroke, strokeWidth: number): {
|
|
@@ -10642,22 +10332,6 @@ interface MarkerSiteRequest {
|
|
|
10642
10332
|
}
|
|
10643
10333
|
declare function markerSites(pl: Polyline, want: MarkerSiteRequest): MarkerSite[];
|
|
10644
10334
|
|
|
10645
|
-
/**
|
|
10646
|
-
* Turning a stroke's markers into draw commands.
|
|
10647
|
-
*
|
|
10648
|
-
* Separate `PathDrawCommand`s rather than triangles appended to the stroke
|
|
10649
|
-
* ribbon: an entry may carry a fill and an outline at once, or a paint that
|
|
10650
|
-
* differs from the line's, neither of which one mesh can express — and folding
|
|
10651
|
-
* them in would drag the whole marker vocabulary into the ribbon cache key.
|
|
10652
|
-
*/
|
|
10653
|
-
|
|
10654
|
-
/**
|
|
10655
|
-
* Every marker command for `path` under `stroke`. `strokeWidth` is the already
|
|
10656
|
-
* width-resolved stroke width; `flattenTolerance` matches what the ribbon used,
|
|
10657
|
-
* so markers land on the same flattened vertices the stroke did.
|
|
10658
|
-
*/
|
|
10659
|
-
declare function markerDrawCommands(path: Path, stroke: Stroke, strokeWidth: number, flattenTolerance: number | undefined): PathDrawCommand[];
|
|
10660
|
-
|
|
10661
10335
|
/**
|
|
10662
10336
|
* The kit's built-in stroke-marker vocabulary.
|
|
10663
10337
|
*
|
|
@@ -10868,7 +10542,8 @@ type ModKey = keyof ModifierState;
|
|
|
10868
10542
|
* ...so the gesture applies the same delta to every dragged id.
|
|
10869
10543
|
*
|
|
10870
10544
|
* The pose-shape-aware delta extraction lives here — gestures stay pose-shape
|
|
10871
|
-
* agnostic. Default projection
|
|
10545
|
+
* agnostic. Default projection reads a rect's `{x, y}` or a Path's bounds
|
|
10546
|
+
* origin, matching `gridSnapStrategy`'s own default.
|
|
10872
10547
|
* Pass `origin` for exotic poses.
|
|
10873
10548
|
*/
|
|
10874
10549
|
declare function snap<TPose>(strategy: SnapStrategy<TPose>, opts?: {
|
|
@@ -11341,10 +11016,11 @@ interface SelectFromLassoOptions {
|
|
|
11341
11016
|
/** Hit mode for `hitTestLasso`. Default 'intersect'. */
|
|
11342
11017
|
mode?: LassoHitMode;
|
|
11343
11018
|
}
|
|
11344
|
-
/**
|
|
11345
|
-
*
|
|
11346
|
-
* gesture start. Tiny / degenerate lassos behave like a click —
|
|
11347
|
-
* preserve, with shift).
|
|
11019
|
+
/** A lasso behavior (`useLassoTool({ behaviors })`): replace selection with
|
|
11020
|
+
* polygon hits in its own `mode`, or extend the existing selection when shift
|
|
11021
|
+
* is held at gesture start. Tiny / degenerate lassos behave like a click —
|
|
11022
|
+
* clear (or preserve, with shift). Hits come from the gesture adapter's
|
|
11023
|
+
* `hitTestLasso`, which under `lassoSelectAction` is the `lassoSelect` dep. */
|
|
11348
11024
|
declare function selectFromLasso(opts?: SelectFromLassoOptions): LassoSelectBehavior;
|
|
11349
11025
|
|
|
11350
11026
|
/** Edge or center the selection should align to within the selection's visual
|
|
@@ -12334,4 +12010,4 @@ interface InsertOverlayStyle {
|
|
|
12334
12010
|
lineWidth?: number;
|
|
12335
12011
|
}
|
|
12336
12012
|
|
|
12337
|
-
export { ACTION_GLYPHS, ANCHOR_HIT_BASE_PX, type ActionGlyphProps, type ActionShortcut, ActionsProviderIfRoot, type Affordance, type AffordanceBinding, type AffordanceRegion, type AffordanceRegionHit, type AlignAdapter, type AlignAnchor, AlignBottomIcon, AlignCenterXIcon, AlignCenterYIcon, type AlignEdge, AlignLeftIcon, type AlignMatchResult, type AlignMoveArgs, AlignRightIcon, AlignTopIcon, type AlignmentBehaviorBase, type AnchorHit, type AnchorScratch, type AnchorState, type AnimateOnSetPoseOptions, AnimationHandle, Animator, type AnyTool, AreaSelectAdapter, type ArrayAdapter, type ArrayAdapterConfig, ArrowIcon, BUILTIN_MARKERS, BUNDLE_TOOLS, type BakedMesh, type BindRigOptions, BooleansAdapter, BoundsConstraint, BringForwardIcon, BringToFrontIcon, type BuildChromeCtxArgs, type BuiltinShapeToolId, type BuiltinToolId, type BuiltinToolOptions, CROSSHAIR_HALO, CURVE_REPS, type CanvasExtensionApi, type CanvasFocusReturn, type CanvasHelpers, type CanvasProps, type CanvasSelectionMode, type CanvasSize, type CanvasSizeSnapshot, type CanvasSurfaceHelpers, CanvasView, type CanvasViewHandle, type CanvasViewHelpers, type CanvasViewProps, type CellHighlightLayerOpts, type ChromeCtx, type ChromeId, type ChromeState, type ClampBounds, ClipboardSnapshot, type CoalescedCtx, type ColorInterpolate, ColorOverrideRegistry, type CommonAffordanceScratch, type ComposeSelectionPoseOpts, type ComputeFitViewOptions, type Condition, ContentHandlerEntry, type Contribution, type ContributionChrome, type ContributionDepReader, CopyIcon, type CornerResizeAffordanceOptions, type CornerResizeScratch, type CreateChildrenLayerOpts, type CreateParallaxLayerOpts, type CreatePathEditingOverlayLayerOptions, type CreatePathLayerOpts, type CreatePenPreviewLayerOptions, type CreateTextLayerOpts, type CreateTiledLayerOpts, type CreateViewResolverOpts, type CreateViewportLayerOpts, CropIcon, type CrosshairRect, CursorCoordsHud, type CursorCoordsHudProps, type CurveRepKind, type CurveRepresentation, type CustomLayerEntry, type CustomPaintContext, CutIcon, type CycleHandle, type CycleVertexColorsOptions, DEFAULT_DEBUG_STROKES, DEFAULT_DEBUG_THEME, DEFAULT_FILL_COLOR, DEFAULT_GUIDE_TOLERANCE_PX, DEFAULT_HANDLE_SIZE, DEFAULT_MAX_ZOOM, DEFAULT_MIN_ZOOM, DEFAULT_PALETTE, DEFAULT_ROTATION_HANDLE_DISTANCE, DEFAULT_SHAPE_FILL, DEFAULT_STROKE_COLOR, type DebugConfig, type DebugFeature, type DebugSnapshot, type DebugStroke, type DebugStrokes, type DebugTheme, type DefaultTextData, DeleteIcon, DepRegistryProviderIfRoot, type DeriveAlignmentGuidesOptions, DerivedDep, DeviceProfileProvider, type DeviceProfileProviderProps, type Dims, type Discriminator, type DistributeAdapter, type DistributeAxis, DistributeHorizontalIcon, type DistributeMode, DistributeVerticalIcon, DivideIcon, type DragGestureController, type DragGestureCtx, type DragGestureEndCtx, type DragGesturePhase, type DragGesturePoint, type DragHandleOptions, type DragPanParams, type DragPayload, type DragRadialController, type DragRadialCtx, type DragRadialEndCtx, type DragRadialPoint, type DragRadialState, type DragRectBounds, type DragRectController, type DragRectCtx, type DragRectEndCtx, type DragRectPoint, DrawCommand, type DropZoneOptions, DuplicateIcon, EasingSpec, Effect, EllipseIcon, ExcludeIcon, EyedropperIcon, FALLBACK_FIT_VIEW, type FeedDelta, type FeedNode, type FillPoseBox, type FitTextPoseOptions, type FlagKey, FlipXIcon, FlipYIcon, type FreeformOptions, GHOST_STROKE, type GateLayerOptions, GeometryProjection, type GesturePreviewSource, type GestureSource, GlMat3, type GridLayerOpts, type GridSlotConfig, GroupIcon, Guide, type GuideSnapOptions, type GuidesLayerOpts, HANDLE_BASE_PX, HandIcon, InertiaConfig as HandToolInertiaConfig, type HandleDragEnd, type HandleDragPoint, type HeadlessCanvasLike, type HostAnchorAlign, type HostAnchorInput, type HostAnchorOffset, type HostAnchorStyle, IDENTITY_JOINT, type IconProps, ImageIcon, type ImageNodeData, type ImageRasterSize, type ImageStatus, type IndicatorStyle, InertiaConfig, InsertAdapter, InsertBehavior, InsertExtras, type InsertNodeFactory, type InsertOp, type InsertOverlayStyle, type InsertPreviewExtent, type InsertPreviewGeometry, type InsertPreviewLike, type InsertPreviewOverlay, IntersectIcon, type Joint, type JointTransform, KIT_SHAPE_KINDS, KIT_STANDARD_ACTION_IDS, type KeyModifiers, type KeyState, type KeyStateAttachOptions, type LabelOptions, LassoHitMode, LassoIcon, LassoSelectAdapter, LassoSelectBehavior, type LayerCommandCache, type LayerDrawFailure, LayerEnumerableAdapter, type LayerGroup, type LayerHit, type LayerSlotValue, type LayersMap, LayoutDropTargetMode, LayoutSnap, LayoutStrategy, type LifecycleAnimation, LineIcon, type LinePoint, type LinkedCursorOptions, MESH_BAKE_SIZE, MESH_GRADIENT_KIND, MINIMAP_CENTER, MINIMAP_PAN, MIXED, MOVE_ANCHORS, type MarkerCtx, type MarkerEntry, type MarkerPaint, type MarkerSite, type MarkerSiteRequest, type MeshGradientFill, type MeshPatch, type MeshPoint, MinimapCanvas, type MinimapCanvasProps, type MinimapContributionOptions, type MinimapFit, type Mixed, type MomentumOptions, MoveAdapter, MoveBehavior, type NestedHitOpts, type NestedHitTester, type NodeClientRect, type NodeInk, type NodeInkCtx, type NodeOverlayFrame, type NodePaintCtx, type NodeProperties, type NodePropertiesEntry, type NodeRouting, type NodeRoutingEntry, type NodeShapeEntry, type NodeSilhouetteCtx, type OpenFilePickerOptions, OrderedAdapter, OriginProjection, type OverlayPoint, type OverlayVisibilityId, PAINTED_CURSOR_LAYER_ID, PATH_ANCHOR_CHROME_ID, type PaintBindContext, type PaintKind, type PaintKindEditorProps, type PaintKindEntry, type PaintProgram, PanBounds, type ParallaxOpts, PasteIcon, Path, type PathAnchor, type PathAnchorAffordanceOptions, PathBuilder, PathDrawCommand, type PathEditingOverlayStyle, type PathInWorldPose, type PenAnchor, PenIcon, type PenPreviewStyle, type PenScratch, type PenSubpath, PencilIcon, type PencilPoint, PickHud, type PickHudProps, type PickTopMostHitAdapter, type PinchZoomOptions, type PixelRenderPlan, type PointInPathOptions, type PointInTextPoseOpts, PointSnapBehavior, PointerProviderIfRoot, type PointerSample, type PointerStylusState, PolygonIcon, PolygonPath, type PolygonPoint, type Pose, PoseComposition, PoseDescriptor, type PoseFeed, PoseOverrides, type PoseRotation, type PoseRun, type PoseRunCtx, type PoseRunStep, type PoseSource, type PosedNode, type PressureToWidthOptions, type PreviewNode, ROTATION_HANDLE_BASE_PX, type RangeStyle, type RasterImage, type RecordedBounds, type RecordedHandle, type RecordedHitbox, type RecordedLayer, type RecordedOrigin, type RecordedSnap, RectIcon, RectPath, RectPose, RedoIcon, type RegisterNodeShapeOptions, RegisteredOp, type RenderLayer, type RenderSceneToCanvasArgs, type RenderSceneToPixelsArgs, type ReorderDirection, ResizeAdapter, type ResolvableView, type ResolvedOverlay, type Rig, type RigApply, type RigApplyContext, type RigScene, RotateAdapter, RotateBehavior, RotatedPose, type RotationAffordanceOptions, type RotationHandle, type RotationScratch, type RunStylePatch, SampledTrack, type ScalarOrXY, Scene, SceneAdapter, type SceneAdapterSelection, SceneCanvas, type SceneCanvasAdapter, type SceneCanvasApi, type SceneCanvasHit, type SceneCanvasProps, Node$1 as SceneNode, type SceneNodeClientRectOpts, SceneRegistry, type SceneSlotConfig, type SceneToAdapterOptions, SceneViewCanvas, type SceneViewCanvasProps, type SceneViewDrawOne, type SceneViewLayers, type SelectAdapter, type SelectFromLassoOptions, SelectIcon, SelectionContextProvider, SelectionContextProviderIfRoot, type SelectionContextValue, type SelectionHandleStyle, type SelectionHandlesLayerOpts, type SelectionOutlineLayerOpts, type SelectionOverlayLayerOpts, type SelectionOverlaySlotConfig, SendBackwardIcon, SendToBackIcon, SerializedScene, type SetFlagResult, type SetPathFields, ShaderProgramHandle, type ShapeCoversPointOptions, type ShapeKind, type SharedAnchor, Simulation, SimulationNode, type Skeleton, type Slew, type SlewRates, SliceDep, type SnapPattern, type SnapPointOptions, SnapStrategy, type SplitByLineOptions, type SpringPoseOptions, SpringPresetName, type SpringVertexColorsOptions, type StaggerVertexColorsOptions, type StandardSlotConfig, type StandardSlotName, StarIcon, type StarPoint, type StartEditOptions, type StyleKey, type StylusData, SubtractIcon, type SurfaceContribution, SvgIngestOptions, TOOL_PREF_KINDS, TextDrawCommand, type TextEditClipRect, type TextEditScreenPose, type TextEditSelection, TextIcon, type ThresholdDragHandle, type ThresholdDragOptions, type TileBleed, type TileGridOptions, type TilePatternOpts, type TilePeriod, type TileRange, type Tool, type ToolBundle, type ToolDef, type ToolPref, type ToolPrefBoolean, type ToolPrefBooleanControl, type ToolPrefColor, type ToolPrefCustom, type ToolPrefEnum, type ToolPrefEnumControl, type ToolPrefEnumEncoding, type ToolPrefGroup, type ToolPrefKind, type ToolPrefLeaf, type ToolPrefNumber, type ToolPrefNumberControl, type ToolPrefNumberFormat, type ToolPrefNumberUnit, type ToolPrefObject, type ToolPrefPaint, type ToolPrefString, type ToolPrefStringControl, type ToolsApi, type TweenPoseOptions, type TweenVertexColorsOptions, UNION_OF_CHILDREN, UndoIcon, UngroupIcon, UnionIcon, Unit, UnitEntry, UnitSystem, UnitValue, UnknownIcon, type UseAlignOptions, type UseAlignReturn, UseAnimatorOptions, type UseArrayAdapterOptions, type UseBooleansOptions, type UseBooleansReturn, type UseCanvasFocusOptions, type UseDistributeOptions, type UseDistributeReturn, type UseDragGestureOptions, type UseDragRadialOptions, type UseDragRectOptions, type UseEyedropperToolOptions, type UseGridCellHoverOptions, type UseGridCellHoverReturn, type UseGuidesReturn, type UseHandToolOptions, type UseHandleDragOptions, type UseHandleDragReturn, type UseHostAnchorOptions, type UseHoverTrackingArgs, type UseImageToolOptions, type UseKeyStateOptions, type UseKeybindingsOptions, type UseLassoSelectOptions, type UseLassoToolOptions, UseMoveOptions, type UseNodeOverlayFrameOptions, type UsePenToolOptions, type UsePointerStylusOptions, type UsePolygonToolOptions, type UsePoseRunOptions, UseResizeOptions, type UseResizePolicyOptions, type UseRotateOptions, UseSceneOptions, type UseSceneTextEditOptions, type UseSceneTextEditReturn, type UseSceneTrivialOptions, type UseSelectToolOptions, type UseSelectionOptions, UseSimulationOptions, type UseStandardActionsOptions, type UseStarToolOptions, type UseTextEditOptions, type UseTextEditReturn, type UseToolsOptions, VERSION, type VelocityTracker, VertexColorChannel, ViewAnimationOptions, ViewApi, type ViewRect, type ViewResolver, type ViewTarget, type ViewTransform, ViewportDims, type ViewportLayer, type ViewportToolDef, type ViewportZoomAnimateOptions, type ViewportZoomOptions, type VisibilityRules, type VisibleRaf, type VisibleRafOptions, type VisibleRafTarget, WHEEL_ZOOM_STEP, WeaselProvider, type WheelInput, type WheelPanOptions, type WheelPanOpts, ZOOM_FLOOR, type ZoomBound, type ZoomClampOpts, type ZoomFactor, _resetMarkersForTests, _resetPaintKindsForTests, actionIs, actionShortcuts, alignDeltaFor, alignInsertBehavior, alignMoveBehavior, alignResizeBehavior, always, and, animateLifecycle, animateOnSetPose, annulusSemiAxes, applyOpsTo, applyStyleToRange, areaSelectAction, arrayAdapter, asPaint, axisAlignedBounds, bakeMesh, bezierCubic, bezierQuadratic, bindRig, blendPoses, boundsOfPath, buildChromeCtx, buildSceneViewCommands, canBringForward, canHover, canSendBackward, capabilityAll, capabilityIn, capabilityIs, capabilityNot, caretIndexAt, cellAt, centerRootOn, charOffsetToDomPosition, circlePath, clampView, clearSelectionAction, clipboardCopyAction, clipboardCutAction, clipboardPasteAction, cloneAction, coarsePointer, composeAffordanceLayer, composePath, composeSelectionPose, computeFitView, computeFitViewport, computeIndicatorCommand, computeWheelAction, cond, constrainTo45, containedThenNearest, cornerWeights, countPathAnchors, createCellHighlightLayer, createChildrenLayer, createCornerResizeAffordance, createDebugOverlayLayer, createDebugSink, createDeleteOp, createGridLayer, createGuidesLayer, createHistory, createInsertOp, createKeyState, createLinkedCursorContribution, createMinimapContribution, createMoveToIndexOp, createNodeProperties, createNodeRouting, createPaintedCursorLayer, createParallaxLayer, createPathAnchorAffordances, createPathEditingOverlayLayer, createPathLayer, createPenPreviewLayer, createPoseFeed, createPoseOverrides, createReorderOp, createReparentOp, createRotationAffordance, createScene, createSelectionHandlesLayer, createSelectionOutlineLayer, createSelectionOverlayLayer, createSetDataOp, createSetLayerOp, createSetPathOp, createSetSelectionOp, createSetTextOp, createSlew, createTextLayer, createTilePattern, createTiledLayer, createTransformOp, createVelocityTracker, createViewResolver, createViewportLayer, crosshairRects, cycleFill, cycleVertexColors, decomposePath, defaultCommitAdapter, defaultDrawOne, defaultLabelTextRenderer, defaultNodeProperties, defaultNodeRouting, defaultVisibilityRules, defineTool, defineViewportTool, definesFrame, deriveAlignmentGuides, deriveParallaxView, derivedDepOf, derivedPose, dispatchApplyBatch, dlog, documentPose, domPositionToCharOffset, domToRuns, drawLayers, drawOneLayer, dwarn, editAnchorsAction, effectivePose, effectiveRangeStyle, enterTextEditAction, enumerateAnchors, evalPatch, fillInPoseFrame, fillToBoundsFrame, findNodeShape, findShapeInk, findShapeSilhouette, fitTextPose, fitToBounds, fitZoom, flattenPreviews, focused, forEachCoalesced, freeform, gateLayer, gesturing, getAlpha01, getImageBitmap, getMarker, getNodeShapes, getPaintKind, getStylusData, gradientForBounds, gradientGeometry, guideSnapStrategy, hexToRgba, hitAffordanceRegions, hitAnchor, hitRotationHandle, hostAnchorCss, hostAnchorRect, hovering, hoveringSelected, imageStatus, inferredNodeProperties, inferredNodeRouting, insertAction, insertPreviewExtent, interpolateView, isBuiltinToolPref, isDebugEnabled, isGradientFill, isLayerPainted, isLayerVisible, isMeshGradientFill, isPatternSpec, isTensorPatch, isValidPatch, isVectorImageSrc, keySpecShortcut, lassoSelectAction, listMarkers, listPaintKinds, makePinchZoomAction, makeViewportWheelPanAction, makeViewportZoomAction, markerDrawCommands, markerInset, markerKeyOf, markerSites, matchAlignment, meanScale, mergeAlphaFromPrev, mergeContributions, meshBounds, meshGradientXml, minimapCenterAction, minimapPanAction, modeIn, modeIs, modeNot, modifierHeld, momentum, moveAction, multiActive, nearest, nearestWithin, nestedHitTester, never, nodeHasFlag, none, normalizeHex, normalizeView, normalizeZoom, not, nurbs, openFilePicker, or, paintAlpha, paintKindOf, paintWithAlpha, paintWithColor, parseColor, parseColorToRgba255, parseDebugFlags, patchBounds, patchCorner, pathContainsPoint, pathContainsPolygon, pathContainsRect, pathDistanceToPoint, pathDivide, pathExclude, pathFromD, pathInPoseFrame, pathInWorld, pathIntersect, pathIntersectsPolygon, pathIntersectsRect, pathOriginProjection, pathPoseDescriptor, pathSubtract, pathToAnchors, pathUnion, pickTopMostHit, pinchZoomAction, planPixelRender, pointInPath, pointInTextPose, poseRotationOf, prefUnit, pressureToWidth, pxExtent, rainbowVertexColors, rebuildOp, rectMarkerPath, registerMarker, registerNodeShape, registerOpFactory, registerPaintKind, registeredOpNames, renderLabel, renderSceneToCanvas, renderSceneToPixels, resizeAction, resolveColor, resolveFillPattern, resolveMarkerSize, resolveOverlays, resolvePatternSpec, resolvePreviews, resolveSkeleton, resolveVisibility, rgbaToHex, rigidRigApply, rotateAction, rotateAroundAABBCenter, rotatePathAround, rotationDegreesUnit, rotationHandle, roundRectPath, roundToCell, runsToDom, sampleGradientStops, sampleTrack, scaleDelta, scalePathToBounds, sceneFromJSON, sceneNodeClientRect, sceneSelectionStore, sceneToAdapter, screenToWorld, seedMeshPatch, selectFromLasso, selectionAtLeast, selectionEmpty, selectionIs, setFlagOverRange, shapeCoversPoint, slewToward, sliceAction, snap, snapPoint, solid, solidVertexColors, spiro, splitPathByLine, splitSubpaths, springPose, springVertexColors, squarePath, staggerVertexColors, startThresholdDrag, strokeInsets, strokeOf, strokeWith, styleAtRange, subscribeImageReady, textCommand, textCommandFromPose, textCommandFromRuns, tileGrid, tiledProject, toHex8, transformPath, translatePath, trimPolyline, tweenPose, tweenVertexColors, unionAABB, unionBounds, unionBoundsPath, unionOfChildren, unionOfChildrenVia, useAlign, useAnimator, useArrayAdapter, useAutoCenter, useBooleans, useBooleansAdapter, useCanvasFocus, useCanvasSize, useDeviceProfile, useDistribute, useDragGesture, useDragHandle, useDragRadial, useDragRect, useDropZone, useEllipseTool, useEyedropperTool, useGridCellHover, useGuides, useHandTool, useHandleDrag, useHostAnchor, useHoverTracking, useImageTool, useKeyState, useKeybindings, useLassoTool, useLineTool, useNodeOverlayFrame, usePenTool, usePencilTool, usePinchGesture, usePointerStylus, usePolygonTool, usePoseCompositionDepSource, usePoseDescriptorDepSource, usePoseRun, usePublishSelection, useRectTool, useResizePolicy, useRig, useScene, useSceneAdapter, useSceneTextEdit, useSelectTool, useSelection, useSelectionContext, useSimulation, useSliceDep, useStandardActions, useStarTool, useTextEdit, useTextTool, useTools, useVelocityTracker, useVisibleRaf, viewToTransform, viewZoom, viewportDragPanAction, viewportWheelPanAction, viewportZoomAction, viewportsAt, wheelPan, wheelZoom, wheelZoomFactor, when, withAlpha01, withCoord, withGradientKind, withinPxBox, withinPxRadius, worldEditToStorage, worldToScreen, zoomAt, zoomAtLeast };
|
|
12013
|
+
export { ACTION_GLYPHS, ANCHOR_HIT_BASE_PX, AREA_SELECT_ID, type ActionGlyphProps, type ActionShortcut, ActionsProviderIfRoot, Affordance, AffordanceBinding, AffordanceRegion, type AffordanceRegionHit, type AlignAdapter, type AlignAnchor, AlignBottomIcon, AlignCenterXIcon, AlignCenterYIcon, type AlignEdge, AlignLeftIcon, type AlignMatchResult, type AlignMoveArgs, AlignRightIcon, AlignTopIcon, type AlignmentBehaviorBase, type AnchorHit, type AnchorScratch, type AnchorState, type AnimateOnSetPoseOptions, AnimationHandle, Animator, AnyTool, AreaSelectAdapter, type ArrayAdapter, type ArrayAdapterConfig, ArrowIcon, BUILTIN_MARKERS, BUILTIN_TOOL_IDS, type BakedMesh, type BindRigOptions, BooleansAdapter, BoundsConstraint, BringForwardIcon, BringToFrontIcon, type BuildChromeCtxArgs, type BuiltinShapeToolId, type BuiltinToolId, type BuiltinToolOptions, CROSSHAIR_HALO, CURVE_REPS, type CanvasExtensionApi, type CanvasFocusReturn, type CanvasHelpers, type CanvasProps, type CanvasSelectionMode, type CanvasSize, type CanvasSizeSnapshot, type CanvasSurfaceHelpers, CanvasView, type CanvasViewHandle, type CanvasViewHelpers, type CanvasViewProps, type CellHighlightLayerOpts, type ChromeCtx, type ChromeId, ChromeState, type ClampBounds, ClipboardSnapshot, type CoalescedCtx, type ColorInterpolate, ColorOverrideRegistry, CommonAffordanceScratch, type ComposeSelectionPoseOpts, type ComputeFitViewOptions, type Condition, ContentHandlerEntry, Contribution, type ContributionDepReader, CopyIcon, type CornerResizeAffordanceOptions, type CornerResizeScratch, type CreateChildrenLayerOpts, type CreateParallaxLayerOpts, type CreatePathEditingOverlayLayerOptions, type CreatePathLayerOpts, type CreatePenPreviewLayerOptions, type CreateTextLayerOpts, type CreateTiledLayerOpts, type CreateViewResolverOpts, type CreateViewportLayerOpts, CropIcon, type CrosshairRect, CursorCoordsHud, type CursorCoordsHudProps, type CurveRepKind, type CurveRepresentation, type CustomLayerEntry, CutIcon, type CycleHandle, type CycleVertexColorsOptions, DEFAULT_DEBUG_STROKES, DEFAULT_DEBUG_THEME, DEFAULT_FILL_COLOR, DEFAULT_GUIDE_TOLERANCE_PX, DEFAULT_HANDLE_SIZE, DEFAULT_MAX_ZOOM, DEFAULT_MIN_ZOOM, DEFAULT_PALETTE, DEFAULT_ROTATION_HANDLE_DISTANCE, DEFAULT_SHAPE_FILL, DEFAULT_STROKE_COLOR, DRAG_PAN_ID, type DebugConfig, type DebugFeature, type DebugSnapshot, type DebugStroke, type DebugStrokes, type DebugTheme, type DefaultTextData, DeleteIcon, DepRegistryProviderIfRoot, type DeriveAlignmentGuidesOptions, DerivedDep, DeviceProfileProvider, type DeviceProfileProviderProps, Dims, type Discriminator, type DistributeAdapter, type DistributeAxis, DistributeHorizontalIcon, type DistributeMode, DistributeVerticalIcon, DivideIcon, type DragGestureController, type DragGestureCtx, type DragGestureEndCtx, type DragGesturePhase, type DragGesturePoint, type DragHandleOptions, type DragPanParams, type DragPayload, type DragRadialController, type DragRadialCtx, type DragRadialEndCtx, type DragRadialPoint, type DragRadialState, type DragRectBounds, type DragRectController, type DragRectCtx, type DragRectEndCtx, type DragRectPoint, DrawCommand, type DropZoneOptions, DuplicateIcon, EasingSpec, EllipseIcon, ExcludeIcon, EyedropperIcon, FALLBACK_FIT_VIEW, FEATURE_ACTION_IDS, type Feature, type FeedDelta, type FeedNode, type FillPoseBox, type FitTextPoseOptions, type FlagKey, FlipXIcon, FlipYIcon, type FreeformOptions, GHOST_STROKE, type GateLayerOptions, GeometryProjection, type GesturePreviewSource, type GestureSource, GlMat3, type GridLayerOpts, type GridSlotConfig, GroupIcon, Guide, type GuideSnapOptions, type GuidesLayerOpts, HANDLE_BASE_PX, HandIcon, InertiaConfig as HandToolInertiaConfig, type HandleDragEnd, type HandleDragPoint, type HeadlessCanvasLike, type HostAnchorAlign, type HostAnchorInput, type HostAnchorOffset, type HostAnchorStyle, IDENTITY_JOINT, type IconProps, ImageIcon, type ImageNodeData, type ImageRasterSize, type ImageStatus, type IndicatorStyle, InertiaConfig, InsertAdapter, InsertBehavior, InsertExtras, type InsertNodeFactory, type InsertOp, type InsertOverlayStyle, type InsertPreviewExtent, type InsertPreviewGeometry, type InsertPreviewLike, type InsertPreviewOverlay, IntersectIcon, type Joint, type JointTransform, KIT_SHAPE_KINDS, KIT_STANDARD_ACTION_IDS, type KeyModifiers, type KeyState, type KeyStateAttachOptions, type LabelOptions, LassoHitMode, LassoIcon, LassoSelectAdapter, LassoSelectBehavior, LayerEnumerableAdapter, LayerGroup, LayerHit, type LayerSlotValue, type LayersMap, LayoutDropTargetMode, LayoutSnap, LayoutStrategy, type LifecycleAnimation, LineIcon, type LinePoint, type LinkedCursorOptions, MESH_BAKE_SIZE, MESH_GRADIENT_KIND, MINIMAP_CENTER, MINIMAP_PAN, MIXED, MOVE_ANCHORS, type MarkerCtx, type MarkerEntry, type MarkerPaint, type MarkerSite, type MarkerSiteRequest, type MeshGradientFill, type MeshPatch, type MeshPoint, MinimapCanvas, type MinimapCanvasProps, type MinimapContributionOptions, type MinimapFit, type Mixed, type MomentumOptions, MoveAdapter, MoveBehavior, type NestedHitOpts, type NestedHitTester, type NodeClientRect, type NodeInk, type NodeInkCtx, type NodeOverlayFrame, type NodePaintCtx, type NodeProperties, type NodePropertiesEntry, type NodeRouting, type NodeRoutingEntry, type NodeShapeEntry, type NodeSilhouetteCtx, type OpFactory, type OpenFilePickerOptions, OrderedAdapter, OriginProjection, type OverlayPoint, type OverlayVisibilityId, PAINTED_CURSOR_LAYER_ID, PATH_ANCHOR_CHROME_ID, type PaintBindContext, type PaintKind, type PaintKindEditorProps, type PaintKindEntry, type PaintProgram, PanBounds, type ParallaxOpts, PasteIcon, Path, type PathAnchor, type PathAnchorAffordanceOptions, PathBuilder, PathDrawCommand, type PathEditingOverlayStyle, type PathInWorldPose, type PenAnchor, PenIcon, type PenPreviewStyle, type PenScratch, type PenSubpath, PencilIcon, type PencilPoint, PickHud, type PickHudProps, type PickTopMostHitAdapter, type PinchZoomOptions, type PixelRenderPlan, type PointInPathOptions, type PointInTextPoseOpts, PointSnapBehavior, PointerProviderIfRoot, type PointerSample, type PointerStylusState, PolygonIcon, PolygonPath, type PolygonPoint, type Pose, PoseComposition, PoseDescriptor, type PoseFeed, PoseOverrides, type PoseRotation, type PoseRun, type PoseRunCtx, type PoseRunStep, type PoseSource, type PosedNode, type PressureToWidthOptions, type PreviewNode, ROTATION_HANDLE_BASE_PX, type RangeStyle, type RasterImage, type RecordedBounds, type RecordedHandle, type RecordedHitbox, type RecordedLayer, type RecordedOrigin, type RecordedSnap, RectIcon, RectPath, RectPose, RedoIcon, RedrawSource, type RegisterNodeShapeOptions, RegisteredOp, RenderLayer, type RenderSceneToCanvasArgs, type RenderSceneToPixelsArgs, type ReorderDirection, ResizeAdapter, type ResolvableView, type ResolvedOverlay, type Rig, type RigApply, type RigApplyContext, type RigScene, RotateAdapter, RotateBehavior, RotatedPose, type RotationAffordanceOptions, type RotationHandle, type RotationScratch, type RunStylePatch, SCENE_CANVAS_FEATURES, SELECTION_MOVE_ID, SELECTION_TRANSFORM_ID, SampledTrack, type ScalarOrXY, Scene, SceneAdapter, type SceneAdapterSelection, SceneCanvas, type SceneCanvasAdapter, type SceneCanvasApi, type SceneCanvasHit, type SceneCanvasLayers, type SceneCanvasProps, Node$1 as SceneNode, type SceneNodeClientRectOpts, SceneRegistry, type SceneSlotConfig, type SceneToAdapterOptions, SceneViewCanvas, type SceneViewCanvasProps, type SceneViewDrawOne, type SceneViewLayers, type SelectAdapter, type SelectFromLassoOptions, SelectIcon, SelectionContextProvider, SelectionContextProviderIfRoot, type SelectionContextValue, type SelectionHandleStyle, type SelectionHandlesLayerOpts, type SelectionMoveOptions, type SelectionOutlineLayerOpts, type SelectionOverlayLayerOpts, type SelectionOverlaySlotConfig, type SelectionTransformOptions, SendBackwardIcon, SendToBackIcon, SerializedScene, type SetFlagResult, type SetPathFields, ShaderProgramHandle, type ShapeCoversPointOptions, type ShapeKind, type SharedAnchor, Simulation, SimulationNode, type Skeleton, type Slew, type SlewRates, SliceDep, type SnapPattern, type SnapPointOptions, SnapStrategy, type SplitBySegmentOptions, type SpringPoseOptions, SpringPresetName, type SpringVertexColorsOptions, type StaggerVertexColorsOptions, type StandardSlotConfig, type StandardSlotName, StarIcon, type StarPoint, type StartEditOptions, type StyleKey, type StylusData, SubtractIcon, type SurfaceContribution, SvgIngestOptions, TOOL_DRIVEN_ACTION_IDS, TOOL_PREF_KINDS, TextDrawCommand, type TextEditClipRect, type TextEditScreenPose, type TextEditSelection, TextIcon, type ThresholdDragHandle, type ThresholdDragOptions, type TileBleed, type TileGridOptions, type TilePatternOpts, type TilePeriod, type TileRange, Tool, type ToolPref, type ToolPrefBoolean, type ToolPrefBooleanControl, type ToolPrefBooleanEncoding, type ToolPrefColor, type ToolPrefCustom, type ToolPrefEnum, type ToolPrefEnumControl, type ToolPrefEnumEncoding, type ToolPrefGroup, type ToolPrefKind, type ToolPrefLeaf, type ToolPrefNumber, type ToolPrefNumberControl, type ToolPrefNumberUnit, type ToolPrefObject, type ToolPrefPaint, type ToolPrefString, type ToolPrefStringControl, ToolsApi, type TweenPoseOptions, type TweenVertexColorsOptions, UNION_OF_CHILDREN, UndoIcon, UngroupIcon, UnionIcon, UnknownIcon, type UseAlignOptions, type UseAlignReturn, UseAnimatorOptions, type UseArrayAdapterOptions, type UseBooleansOptions, type UseBooleansReturn, type UseCanvasFocusOptions, type UseDistributeOptions, type UseDistributeReturn, type UseDragGestureOptions, type UseDragRadialOptions, type UseDragRectOptions, type UseEyedropperToolOptions, type UseGridCellHoverOptions, type UseGridCellHoverReturn, type UseGuidesReturn, type UseHandToolOptions, type UseHandleDragOptions, type UseHandleDragReturn, type UseHostAnchorOptions, type UseHoverTrackingArgs, type UseImageToolOptions, type UseKeyStateOptions, type UseKeybindingsOptions, type UseLassoSelectOptions, type UseLassoToolOptions, UseMoveOptions, type UseNodeOverlayFrameOptions, type UsePenToolOptions, type UsePointerStylusOptions, type UsePolygonToolOptions, type UsePoseRunOptions, UseResizeOptions, type UseResizePolicyOptions, type UseRotateOptions, UseSceneOptions, type UseSceneTextEditOptions, type UseSceneTextEditReturn, type UseSceneTrivialOptions, type UseSelectToolOptions, type UseSelectionOptions, UseSimulationOptions, type UseStandardActionsOptions, type UseStarToolOptions, type UseTextEditOptions, type UseTextEditReturn, VERSION, type VelocityTracker, VertexColorChannel, ViewAnimationOptions, ViewApi, type ViewRect, type ViewResolver, type ViewTarget, type ViewTransform, ViewportDims, type ViewportLayer, type ViewportZoomAnimateOptions, type ViewportZoomOptions, type VisibilityRules, type VisibleRaf, type VisibleRafOptions, type VisibleRafTarget, WHEEL_ZOOM_STEP, WeaselProvider, type WheelInput, type WheelPanOptions, type WheelPanOpts, type WorkspaceTintLayerOptions, ZOOM_FLOOR, type ZoomBound, type ZoomClampOpts, type ZoomFactor, _resetMarkersForTests, _resetPaintKindsForTests, actionIs, actionShortcuts, alignDeltaFor, alignInsertBehavior, alignMoveBehavior, alignResizeBehavior, always, and, animateLifecycle, animateOnSetPose, annulusSemiAxes, applyOpsTo, applyStyleToRange, areaSelectAction, areaSelectContribution, arrayAdapter, asPaint, axisAlignedBounds, bakeMesh, bezierCubic, bezierQuadratic, bindRig, blendPoses, boundsOfPath, buildChromeCtx, buildSceneViewCommands, canBringForward, canHover, canSendBackward, capabilityAll, capabilityIn, capabilityIs, capabilityNot, caretIndexAt, cellAt, centerRootOn, charOffsetToDomPosition, circlePath, clampView, clearSelectionAction, clipboardCopyAction, clipboardCutAction, clipboardPasteAction, cloneAction, coarsePointer, composeAffordanceLayer, composePath, composeSelectionPose, computeFitView, computeFitViewport, computeIndicatorCommand, computeWheelAction, cond, constrainTo45, containedThenNearest, cornerWeights, countPathAnchors, createCellHighlightLayer, createChildrenLayer, createCornerResizeAffordance, createDebugOverlayLayer, createDebugSink, createDeleteOp, createGridLayer, createGuidesLayer, createHistory, createInsertOp, createKeyState, createLinkedCursorContribution, createMinimapContribution, createMoveToIndexOp, createNodeProperties, createNodeRouting, createPaintedCursorLayer, createParallaxLayer, createPathAnchorAffordances, createPathEditingOverlayLayer, createPathLayer, createPenPreviewLayer, createPoseFeed, createPoseOverrides, createReorderOp, createReparentOp, createRotationAffordance, createScene, createSelectionHandlesLayer, createSelectionOutlineLayer, createSelectionOverlayLayer, createSetDataOp, createSetLayerOp, createSetPathOp, createSetSelectionOp, createSetTextOp, createSlew, createTextLayer, createTilePattern, createTiledLayer, createTransformOp, createVelocityTracker, createViewResolver, createViewportLayer, crosshairRects, cycleFill, cycleVertexColors, decomposePath, defaultCommitAdapter, defaultDrawOne, defaultLabelTextRenderer, defaultNodeProperties, defaultNodeRouting, defaultVisibilityRules, definesFrame, deriveAlignmentGuides, deriveParallaxView, derivedDepOf, derivedPose, dispatchApplyBatch, dlog, documentPose, domPositionToCharOffset, domToRuns, dragPanContribution, dwarn, editAnchorsAction, effectivePose, effectiveRangeStyle, enterTextEditAction, enumerateAnchors, evalPatch, fillInPoseFrame, fillToBoundsFrame, findNodeShape, findShapeInk, findShapeSilhouette, fitTextPose, fitToBounds, fitZoom, flattenPreviews, focused, forEachCoalesced, freeform, gateLayer, gesturing, getAlpha01, getImageBitmap, getMarker, getNodeShapes, getPaintKind, getStylusData, gradientForBounds, gradientGeometry, guideSnapStrategy, hexToRgba, hitAffordanceRegions, hitAnchor, hitRotationHandle, hostAnchorCss, hostAnchorRect, hovering, hoveringSelected, imageStatus, inferredNodeProperties, inferredNodeRouting, insertAction, insertPreviewExtent, interpolateView, isBuiltinToolPref, isDebugEnabled, isGradientFill, isMeshGradientFill, isPatternSpec, isPlainObject, isTensorPatch, isValidPatch, isVectorImageSrc, keySpecShortcut, lassoSelectAction, listGradientKinds, listMarkers, listPaintKinds, makePinchZoomAction, makeViewportWheelPanAction, makeViewportZoomAction, markerInset, markerKeyOf, markerRegistry, markerSites, matchAlignment, meanScale, mergeAlphaFromPrev, mergeContributions, meshBounds, meshFromStops, meshGradientXml, meshStops, minimapCenterAction, minimapPanAction, modeDecorationLayer, modeIn, modeIs, modeNot, modifierHeld, momentum, moveAction, multiActive, nearest, nearestWithin, nestedHitTester, never, nodeHasFlag, none, normalizeHex, normalizeView, normalizeZoom, not, nurbs, onEmptyCanvas, opFactoryRegistry, openFilePicker, or, paintAlpha, paintKindOf, paintKindRegistry, paintWithAlpha, paintWithColor, parseColor, parseColorToRgba255, parseDebugFlags, patchBounds, patchCorner, pathContainsPoint, pathContainsPolygon, pathContainsRect, pathDistanceToPoint, pathDivide, pathExclude, pathFromD, pathInPoseFrame, pathInWorld, pathIntersect, pathIntersectsPolygon, pathIntersectsRect, pathOriginProjection, pathPoseDescriptor, pathSubtract, pathToAnchors, pathUnion, pickTopMostHit, pinchZoomAction, planPixelRender, pointInPath, pointInTextPose, poseRotationOf, prefUnit, pressureToWidth, pxExtent, rainbowVertexColors, rebuildOp, rectMarkerPath, registerMarker, registerNodeShape, registerOpFactory, registerPaintKind, registeredOpNames, renderLabel, renderSceneToCanvas, renderSceneToPixels, resizeAction, resolveColor, resolveFillPattern, resolveMarkerSize, resolveOverlays, resolvePatternSpec, resolvePreviews, resolveSkeleton, resolveVisibility, rgbaToHex, rigidRigApply, rotateAction, rotateAroundAABBCenter, rotatePathAround, rotationDegreesUnit, rotationHandle, roundRectPath, roundToCell, runsToDom, sampleGradientStops, sampleTrack, scaleDelta, scalePathToBounds, sceneFromJSON, sceneNodeClientRect, sceneSelectionStore, sceneToAdapter, screenToWorld, seedMeshPatch, selectFromLasso, selectionAtLeast, selectionEmpty, selectionIs, selectionMoveBindings, selectionMoveContribution, selectionTransformBindings, selectionTransformContribution, setFlagOverRange, shapeCoversPoint, slewToward, sliceAction, snap, snapPoint, solid, solidVertexColors, spiro, splitPathBySegment, splitSubpaths, springPose, springVertexColors, squarePath, staggerVertexColors, startThresholdDrag, strokeInsets, strokeOf, strokeWith, styleAtRange, subscribeImageReady, switchGradientKind, textCommand, textCommandFromPose, textCommandFromRuns, tileGrid, tiledProject, toHex8, transformPath, translatePath, trimPolyline, tweenPose, tweenVertexColors, unionAABB, unionBounds, unionBoundsPath, unionOfChildren, unionOfChildrenVia, useAlign, useAnimator, useArrayAdapter, useAutoCenter, useBooleans, useBooleansAdapter, useCanvasFocus, useCanvasSize, useDeviceProfile, useDistribute, useDragGesture, useDragHandle, useDragRadial, useDragRect, useDropZone, useEllipseTool, useEyedropperTool, useGridCellHover, useGuides, useHandTool, useHandleDrag, useHostAnchor, useHoverTracking, useImageTool, useKeyState, useKeybindings, useLassoTool, useLineTool, useNodeOverlayFrame, usePenTool, usePencilTool, usePointerStylus, usePolygonTool, usePoseCompositionDepSource, usePoseDescriptorDepSource, usePoseRun, usePublishSelection, useRectTool, useResizePolicy, useRig, useScene, useSceneAdapter, useSceneTextEdit, useSelectTool, useSelection, useSelectionContext, useSimulation, useSliceDep, useStandardActions, useStarTool, useTextEdit, useTextTool, useVelocityTracker, useVisibleRaf, viewToTransform, viewZoom, viewportDragPanAction, viewportWheelPanAction, viewportZoomAction, viewportsAt, wheelPan, wheelZoom, wheelZoomFactor, when, withAlpha01, withCoord, withGradientKind, withinPxBox, withinPxRadius, workspaceTintLayer, worldEditToStorage, worldToScreen, zoomAt, zoomAtLeast };
|