@weasel-js/core 1.6.0 → 1.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +24 -0
- package/dist/{depSchema-BhgZc0-Q.d.ts → builtins-HWyuLzE-.d.ts} +132 -60
- package/dist/{chunk-THCSDHII.js → chunk-MZAIDI6D.js} +368 -59
- package/dist/chunk-MZAIDI6D.js.map +1 -0
- package/dist/{chunk-T3UQ3F6R.js → chunk-RMR4QMM6.js} +45 -11
- package/dist/chunk-RMR4QMM6.js.map +1 -0
- package/dist/clipboard.js +1 -1
- package/dist/index.d.ts +401 -313
- package/dist/index.js +2 -2
- package/dist/math.d.ts +1 -1
- package/dist/move.d.ts +2 -2
- package/dist/renderer.d.ts +3 -2
- package/dist/renderer.js +2 -2
- package/package.json +10 -10
- package/dist/chunk-T3UQ3F6R.js.map +0 -1
- package/dist/chunk-THCSDHII.js.map +0 -1
- package/dist/{grid-Dx2gQbNv.d.ts → grid-BXdz8GF2.d.ts} +27 -27
- package/dist/{math-DRa6HBBs.d.ts → math-MCQcf_gc.d.ts} +111 -111
package/dist/index.d.ts
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import
|
|
3
|
-
import { a as UnitValue, b as UnitSystem, c as UnitEntry, d as Unit, U as UseMoveOptions, O as OriginProjection } from './grid-
|
|
4
|
-
export { A as ANGLE_RADIANS, I as IMPERIAL_INCHES, M as METRIC_MM, P as PIXELS, R as RECT_ORIGIN_PROJECTION, e as UnitScale, f as formatUnit, g as gridSnapStrategy, p as pointToGridCell, r as resolveUnit, u as unitScale } from './grid-
|
|
5
|
-
import { View, NodeId, Bounds, ModifierState, PointerSessionCancelReason, DeviceProfile, Action, SelectionMode, SelectionExtendKey, SelectionApi, DepSchema, AnyToolOf, Contribution as Contribution$1, ContributionChrome as ContributionChrome$1, Tool as Tool$1, ToolDef as ToolDef$1, ViewportToolDef as ViewportToolDef$1,
|
|
6
|
-
export { ALWAYS, Action, ActionDeps, ActionDisabledReason, ActionDispatch, ActionEnabledResult, ActionEntry, ActionItem, ActionPresentation, ActionVariant, ActionsProp, ActionsRegistry, AffordanceHit, BindingOpts, BindingScope, BindingSource, BoundGesture, Bounds, BuildRuleCtxArgs, COARSE_TARGET_SCALE, ContributionRouting, DEFAULT_ALLOWED_CAPABILITIES, DEFAULT_DEVICE_PROFILE, DebugSink, DepName, DepSchema, DetectedDeviceFacts, DeviceProfile, Dispatcher, DispatcherContext, DragSample, Eligibility, EligibilityState, GestureBinding, HandleKind, HitShape, HotkeyTrigger, ImmediateInvoker, IngestItem, InputEvent, InvocationCtx, Invoker, MatchResult, 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, ToolModifiers, ToolPresentation, ToolSlot, UiOngoingControl, Point2 as Vec2, View, actionBindings, actionItems, buildDepsFromRequires, buildRuleCtx, clientToCanvas, createDispatcher, deleteScratch, describeRule, evaluate, evaluateEnabled, getScratch, isEditableTarget, liveScope, matchesKeyBinding,
|
|
1
|
+
import * as react from 'react';
|
|
2
|
+
import react__default, { RefObject, ReactNode, Ref, MouseEvent, ComponentType, MutableRefObject } from 'react';
|
|
3
|
+
import { a as UnitValue, b as UnitSystem, c as UnitEntry, d as Unit, U as UseMoveOptions, O as OriginProjection } from './grid-BXdz8GF2.js';
|
|
4
|
+
export { A as ANGLE_RADIANS, I as IMPERIAL_INCHES, M as METRIC_MM, P as PIXELS, R as RECT_ORIGIN_PROJECTION, e as UnitScale, f as formatUnit, g as gridSnapStrategy, p as pointToGridCell, r as resolveUnit, u as unitScale } from './grid-BXdz8GF2.js';
|
|
5
|
+
import { View, HitShape, HandleKind, NodeId, Bounds, ModifierState, PointerSessionCancelReason, DeviceProfile, Action, SelectionMode, SelectionExtendKey, SelectionApi, DepSchema, AnyToolOf, Contribution as Contribution$1, ContributionChrome as ContributionChrome$1, Tool as Tool$1, ToolDef as ToolDef$1, ViewportToolDef as ViewportToolDef$1, DebugSink, ToolKeybinding, HotkeyTrigger, RuleCtx, Rule, IngestItem, OngoingOverlay, DepName, ActionsProp, OverlayRole, ResizeAnchor, Point2 } from '@weasel-js/routing';
|
|
6
|
+
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, DebugSink, DepName, DepSchema, DetectedDeviceFacts, DeviceProfile, Dispatcher, DispatcherContext, DragSample, Eligibility, EligibilityState, GestureBinding, HandleKind, HitShape, HotkeyTrigger, ImmediateInvoker, IngestItem, InputEvent, InvocationCtx, Invoker, MatchResult, 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, ToolModifiers, ToolPresentation, ToolSlot, UiOngoingControl, Point2 as Vec2, View, actionBindings, actionItems, buildDepsFromRequires, buildRuleCtx, clientToCanvas, createDispatcher, deleteScratch, describeRule, evaluate, evaluateEnabled, getScratch, isEditableTarget, liveScope, matchesKeyBinding, openPointerSession, resolveDeviceProfile, resolveParams, scopeBindings, scratchKey, setScratch, specificity } from '@weasel-js/routing';
|
|
7
7
|
import { FillStyle, Stroke, TextureHandle, GradientUnits, ColorSpace, TilePatternSpec, GradientKind, GradStop, 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 { D as DrawCommand, E as Effect, w as Scene, x as RectPose, y as InertiaConfig, V as ViewAnimationOptions, N as Node$1, z as PoseComposition, A as SliceDep, B as VertexColorChannel, f as ShaderProgramHandle, F as InsertExtras, H as SerializedScene, J as GeometryProjection, K as ContentHandlerEntry, L as SvgIngestOptions, O as PanBounds, Q as Animator, U as ColorOverrideRegistry, X as UseSceneOptions, Y as SceneRegistry, Z as RegisteredOp, _ as PoseOverrides, $ as DerivedDep, a0 as ViewportDims, P as PathDrawCommand, T as TextDrawCommand,
|
|
10
|
-
export {
|
|
9
|
+
import { D as DrawCommand, E as Effect, w as Scene, x as RectPose, y as InertiaConfig, V as ViewAnimationOptions, N as Node$1, z as PoseComposition, A as SliceDep, B as VertexColorChannel, f as ShaderProgramHandle, F as InsertExtras, H as SerializedScene, J as GeometryProjection, K as ContentHandlerEntry, L as SvgIngestOptions, O as PanBounds, Q as Animator, U as ColorOverrideRegistry, X as UseSceneOptions, Y as SceneRegistry, Z as RegisteredOp, _ as PoseOverrides, $ as DerivedDep, a0 as ViewportDims, P as PathDrawCommand, a1 as ViewApi, T as TextDrawCommand, a2 as ShaderProgram, G as GlMat3, a3 as BooleansAdapter, a4 as UseAnimatorOptions, a5 as SpringPresetName, a6 as EasingSpec, a7 as AnimationHandle, a8 as SampledTrack } from './builtins-HWyuLzE-.js';
|
|
10
|
+
export { a9 as AddLayerSpec, aa as AddNodeSpec, ab as AnimateToBoundsOptions, ac as AreaSelectDep, ad as BezierEasing, ae as BooleanOp, af as BooleanOpResult, ag as ClipboardDep, ah as ClipboardIngestCtx, ai as ColorOverride, aj as ColorOverrideFn, ak as ContainerNode, C as CullRect, al as DecayLoopConfig, am as DecayOptions, an as EASINGS, ao as EasingFn, ap as EasingName, aq as EditAnchorsDep, ar as EventBooking, as as EventBookingHandle, at as EventTrack, au as FitViewToBoundsOptions, a as GroupDrawCommand, av as IDENTITY_POSE_COMPOSITION, b as ImageDrawCommand, c as ImageMinification, aw as IngestCtx, ax as IngestionDep, ay as InsertDep, az as Interpolate, aA as InterpolatorFactory, aB as Keyframe, aC as LassoSelectDep, aD as LayerRecord, aE as LayoutDep, aF as LeafNode, aG as LoopFactory, aH as LoopOptions, aI as NestedTimeline, aJ as NodeAtPointDep, aK as PhysicsHandle, aL as PhysicsOptions, aM as PointerContextProvider, aN as PointerContextValue, aO as PointerWorldPos, aP as PoseAdapter, aQ as PoseClosure, aR as PoseOverride, aS as RECT_POSE_COMPOSITION, aT as RIGID_POSE_COMPOSITION, R as RenderTarget, aU as ResizePolicy, aV as SPRING_PRESETS, S as SPRITE_STRIDE, aW as SerializedNode, e as ShaderDrawCommand, g as ShaderUniform, aX as SnapDep, aY as SpringOptions, aZ as SpringPreset, i as SpriteSheet, j as SpritesDrawCommand, a_ as StaggerBuilder, a$ as StaggerDelay, b0 as StaggerFactory, b1 as StaggerOptions, b2 as StaggerPerItem, b3 as StaggerSpringPoseOptions, b4 as StaggerTweenOptions, b5 as SvgUnpacker, b6 as SystemLayerRecord, b7 as SystemLayerSpec, b8 as TextEditDep, b9 as TimelineClock, ba as TimelineEvent, bb as TimelineHandle, bc as TimelineOptions, bd as TimelineTrack, be as Track, bf as TweenLoopOptions, bg as TweenOptions, bh as UserLayerRecord, bi as VIEW_ANIMATION_KEY, bj as ViewAnimationApi, bk as ViewChannel, bl as applyBooleanOp, bm as asNodeId, m as blur, bn as composeRectPose, bo as composeRigidPose, bp as composeWorldPose, bq as createPointerStore, br as cubicBezierEasing, o as cullDrawCommands, bs as decomposeRectPose, bt as decomposeRigidPose, bu as easeIn, bv as easeInBack, bw as easeInBounce, bx as easeInCirc, by as easeInCubic, bz as easeInElastic, bA as easeInExpo, bB as easeInOut, bC as easeInOutBack, bD as easeInOutBounce, bE as easeInOutCirc, bF as easeInOutCubic, bG as easeInOutElastic, bH as easeInOutExpo, bI as easeInOutQuad, bJ as easeInOutQuart, bK as easeInOutQuint, bL as easeInOutSine, bM as easeInQuad, bN as easeInQuart, bO as easeInQuint, bP as easeInSine, bQ as easeOut, bR as easeOutBack, bS as easeOutBounce, bT as easeOutCirc, bU as easeOutCubic, bV as easeOutElastic, bW as easeOutExpo, bX as easeOutQuad, bY as easeOutQuart, bZ as easeOutQuint, b_ as easeOutSine, b$ as fitViewToBounds, p as frameRect, c0 as linear, q as mat3, c1 as rebaseLocalPose, c2 as registerContentHandler, r as registerEffect, c3 as resolveEasing, c4 as resolveStrokeWidth, c5 as translateRectPose, c6 as useDecayLoop, c7 as usePointerContext, c8 as usePointerPosition, c9 as useViewAnimation, ca as useViewAnimationOn, v as viewToMat3, u as vignette, cb as worldPoseLookup } from './builtins-HWyuLzE-.js';
|
|
11
11
|
import { CursorSpec, PaintedCursorState } from '@weasel-js/cursor';
|
|
12
12
|
export { BakeOptions, CursorGlyph, CursorGlyphName, CursorGlyphSpec, CursorSpec, PaintedCursor, PaintedCursorFrame, PaintedCursorState, ResolvedCursor, bakeCursor, createPaintedCursorState, cursorFor, resolveCursor, resolveCursorTier } from '@weasel-js/cursor';
|
|
13
13
|
import { ClaimableGesture, GestureSpec } from '@weasel-js/gestures';
|
|
14
14
|
export { ClaimableGesture, ClickSpec, DragSpec, DropSpec, GestureSpec, KeyHeldSpec, KeySpec, ModSpec, MultiTouchSpec, PasteSpec, PinchSpec, TargetSpec, WheelSpec } from '@weasel-js/gestures';
|
|
15
|
-
import { S as SimulationNode, U as UseSimulationOptions, a as Simulation, P as PathBuilder } from './math-
|
|
16
|
-
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-
|
|
15
|
+
import { S as SimulationNode, U as UseSimulationOptions, a as Simulation, P as PathBuilder } from './math-MCQcf_gc.js';
|
|
16
|
+
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
17
|
import { ToolsApi as ToolsApi$1, UseToolsOptions as UseToolsOptions$1 } from '@weasel-js/routing/react';
|
|
18
18
|
export { ActionsProvider, ActionsScope, ActiveToolContextProvider, ActiveToolContextProviderIfRoot, ActiveToolContextProviderProps, ActiveToolContextValue, DepRegistry, DepRegistryProvider, DispatcherChannels, OngoingAction, UseGestureDispatcherOptions, useAction, useActionsRegistry, useActiveToolContext, useDepRegistry, useDepSource, useGestureDispatcher, useOngoingAction, useOptionalActiveToolContext, useOptionalDepRegistry } from '@weasel-js/routing/react';
|
|
19
19
|
import { B as BoundsConstraint, P as PointSnapBehavior, L as LassoSelectBehavior, R as RotateBehavior, S as SnapStrategy, M as MoveBehavior, I as InsertBehavior } from './types-D_74YlWs.js';
|
|
@@ -26,7 +26,6 @@ import { M as MoveAdapter, A as AreaSelectAdapter, c as LassoHitMode, d as Lasso
|
|
|
26
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-CxC8P6W0.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 * as react_jsx_runtime from 'react/jsx-runtime';
|
|
30
29
|
import { Op, HistorySelection, CreateHistoryOptions, History } from '@weasel-js/history';
|
|
31
30
|
export * from '@weasel-js/history';
|
|
32
31
|
export { Op } from '@weasel-js/history';
|
|
@@ -41,6 +40,185 @@ export { UseClipboardOpsOptions, UseClipboardOpsReturn, WEASEL_CLIPBOARD_MIME, W
|
|
|
41
40
|
export { cloneByAltDrag } from './clone.js';
|
|
42
41
|
export { FontStyle, FontVariant, LocalFontOutlinesResult, OutlineSource, OutlineStatus, OutlineVariant, canQueryLocalFonts, enableLocalFontOutlines, hasFontOutlines, isCanvasFont, listFontOutlines, outlineStatus, registerCanvasFont, registerFont, registerFontOutlines, subscribeGlyphReady, unregisterCanvasFont, unregisterFontOutlines } from '@weasel-js/font';
|
|
43
42
|
|
|
43
|
+
/** Pan offset (in pixels) plus per-axis zoom (pixels per content unit). */
|
|
44
|
+
interface ViewTransform {
|
|
45
|
+
panX: number;
|
|
46
|
+
panY: number;
|
|
47
|
+
zoom: {
|
|
48
|
+
x: number;
|
|
49
|
+
y: number;
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
/** Project a world-space point to screen-space pixels through a `ViewTransform`. */
|
|
53
|
+
declare function worldToScreen(worldX: number, worldY: number, view: ViewTransform): [number, number];
|
|
54
|
+
/** Inverse of `worldToScreen` — recover the world-space point under a screen-space pixel. */
|
|
55
|
+
declare function screenToWorld(screenX: number, screenY: number, view: ViewTransform): [number, number];
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* Input convenience for zoom primitives. A `number` is treated as a
|
|
59
|
+
* uniform factor applied to both axes; a `{x, y}` vector applies
|
|
60
|
+
* per-axis factors.
|
|
61
|
+
*/
|
|
62
|
+
type ZoomFactor = number | {
|
|
63
|
+
x: number;
|
|
64
|
+
y: number;
|
|
65
|
+
};
|
|
66
|
+
/**
|
|
67
|
+
* Input convenience for zoom-clamp ranges. A `number` is applied as the
|
|
68
|
+
* same bound on both axes; a `{x, y}` vector applies per-axis bounds.
|
|
69
|
+
*/
|
|
70
|
+
type ZoomBound = number | {
|
|
71
|
+
x: number;
|
|
72
|
+
y: number;
|
|
73
|
+
};
|
|
74
|
+
/**
|
|
75
|
+
* Bridge `View` into the legacy `ViewTransform` shape so chrome can keep
|
|
76
|
+
* calling `worldToScreen` / `screenToWorld`. `View` and `ViewTransform`
|
|
77
|
+
* use opposite sign conventions for the translation half (`view.x` is
|
|
78
|
+
* camera position; `panX` is canvas translation), so the adapter flips
|
|
79
|
+
* the sign and multiplies by per-axis scale.
|
|
80
|
+
*/
|
|
81
|
+
declare function viewToTransform(view: View): ViewTransform;
|
|
82
|
+
/**
|
|
83
|
+
* How far `view` is zoomed in, as one number — the geometric mean of its two
|
|
84
|
+
* axes, so a uniform view reports its own scale and a stretched one reports
|
|
85
|
+
* the scale that covers the same area.
|
|
86
|
+
*
|
|
87
|
+
* What a `RuleCtx` carries, because the only rule that asks about the
|
|
88
|
+
* viewport asks for a threshold rather than a camera.
|
|
89
|
+
*/
|
|
90
|
+
declare function viewZoom(view: View): number;
|
|
91
|
+
/**
|
|
92
|
+
* `view` inside the invariant {@link View} documents: a zero or non-finite
|
|
93
|
+
* scale axis becomes `ZOOM_FLOOR`, a negative one keeps its sign, and a
|
|
94
|
+
* non-finite translation becomes 0. Returns `view` itself when it already
|
|
95
|
+
* holds, so a valid view keeps its identity.
|
|
96
|
+
*/
|
|
97
|
+
declare function normalizeView(view: View): View;
|
|
98
|
+
|
|
99
|
+
/**
|
|
100
|
+
* `DebugSink`, `HitShape` and `HandleKind` are declared in
|
|
101
|
+
* `@weasel-js/routing` — `ToolCtx.debug` carries a sink, so routing has to
|
|
102
|
+
* name the type. Re-exported here, beside the overlay that reads one.
|
|
103
|
+
*/
|
|
104
|
+
|
|
105
|
+
/** One bit per debug feature; absent keys are off. */
|
|
106
|
+
interface DebugConfig {
|
|
107
|
+
hitboxes?: boolean;
|
|
108
|
+
handles?: boolean;
|
|
109
|
+
bounds?: boolean;
|
|
110
|
+
origins?: boolean;
|
|
111
|
+
snap?: boolean;
|
|
112
|
+
layers?: boolean;
|
|
113
|
+
/** Render each tracked node's id as a label at the top-left of its
|
|
114
|
+
* bounds. Pulls from the same `recordBounds` stream `bounds` uses, so
|
|
115
|
+
* no extra sink calls are required to enable. */
|
|
116
|
+
ids?: boolean;
|
|
117
|
+
/** Rolling FPS counter rendered in the top-left corner of the canvas.
|
|
118
|
+
* Tracks the rate at which the debug overlay's draw callback runs;
|
|
119
|
+
* this matches the canvas's effective repaint rate. */
|
|
120
|
+
fps?: boolean;
|
|
121
|
+
/** Optional per-feature color overrides; falls back to the default theme. */
|
|
122
|
+
theme?: Partial<DebugTheme>;
|
|
123
|
+
/** Optional per-feature line-width / dash overrides; falls back to
|
|
124
|
+
* {@link DEFAULT_DEBUG_STROKES}. */
|
|
125
|
+
strokes?: Partial<DebugStrokes>;
|
|
126
|
+
}
|
|
127
|
+
/** The name of one debug-overlay feature — the keys of {@link DebugConfig}
|
|
128
|
+
* that toggle a visualization. */
|
|
129
|
+
type DebugFeature = 'hitboxes' | 'handles' | 'bounds' | 'origins' | 'snap' | 'layers' | 'ids' | 'fps';
|
|
130
|
+
/** Colors the debug overlay draws with, one entry per feature. */
|
|
131
|
+
interface DebugTheme {
|
|
132
|
+
hitboxFill: string;
|
|
133
|
+
hitboxStroke: string;
|
|
134
|
+
handle: string;
|
|
135
|
+
bounds: string;
|
|
136
|
+
origin: string;
|
|
137
|
+
snap: string;
|
|
138
|
+
layerText: string;
|
|
139
|
+
layerTextBg: string;
|
|
140
|
+
/** Color for the per-node id label rendered when `config.ids` is on. */
|
|
141
|
+
idText: string;
|
|
142
|
+
/** Foreground / background for the FPS panel. */
|
|
143
|
+
fpsText: string;
|
|
144
|
+
fpsTextBg: string;
|
|
145
|
+
}
|
|
146
|
+
/** Line width and dash pattern for one stroked debug feature. An empty (or
|
|
147
|
+
* omitted) `dash` is a solid line. */
|
|
148
|
+
interface DebugStroke {
|
|
149
|
+
width: number;
|
|
150
|
+
dash?: readonly number[];
|
|
151
|
+
}
|
|
152
|
+
/** The stroked half of the debug overlay's appearance, split from
|
|
153
|
+
* {@link DebugTheme} because only some features draw a line at all — text
|
|
154
|
+
* panels and filled origin dots take color and nothing else. */
|
|
155
|
+
interface DebugStrokes {
|
|
156
|
+
hitbox: DebugStroke;
|
|
157
|
+
bounds: DebugStroke;
|
|
158
|
+
handle: DebugStroke;
|
|
159
|
+
/** Rejected snap candidates only; accepted ones paint as a filled dot. */
|
|
160
|
+
snap: DebugStroke;
|
|
161
|
+
}
|
|
162
|
+
/** A hit region tested during the current frame. */
|
|
163
|
+
interface RecordedHitbox {
|
|
164
|
+
id: string;
|
|
165
|
+
kind: 'body' | 'handle' | 'rotation' | 'anchor';
|
|
166
|
+
shape: HitShape;
|
|
167
|
+
}
|
|
168
|
+
/** A handle drawn during the current frame, and where. */
|
|
169
|
+
interface RecordedHandle {
|
|
170
|
+
id: string;
|
|
171
|
+
position: {
|
|
172
|
+
x: number;
|
|
173
|
+
y: number;
|
|
174
|
+
};
|
|
175
|
+
kind: HandleKind;
|
|
176
|
+
}
|
|
177
|
+
/** A node's bounds as computed during the current frame. */
|
|
178
|
+
interface RecordedBounds {
|
|
179
|
+
id: string;
|
|
180
|
+
bounds: {
|
|
181
|
+
x: number;
|
|
182
|
+
y: number;
|
|
183
|
+
width: number;
|
|
184
|
+
height: number;
|
|
185
|
+
};
|
|
186
|
+
}
|
|
187
|
+
/** A node's transform origin as used during the current frame. */
|
|
188
|
+
interface RecordedOrigin {
|
|
189
|
+
id: string;
|
|
190
|
+
point: {
|
|
191
|
+
x: number;
|
|
192
|
+
y: number;
|
|
193
|
+
};
|
|
194
|
+
}
|
|
195
|
+
/** A snap candidate considered during the current gesture, and whether it
|
|
196
|
+
* won. Unlike the other records these survive across frames, until the
|
|
197
|
+
* gesture ends. */
|
|
198
|
+
interface RecordedSnap {
|
|
199
|
+
point: {
|
|
200
|
+
x: number;
|
|
201
|
+
y: number;
|
|
202
|
+
};
|
|
203
|
+
accepted: boolean;
|
|
204
|
+
}
|
|
205
|
+
/** A render layer that drew during the current frame. */
|
|
206
|
+
interface RecordedLayer {
|
|
207
|
+
id: string;
|
|
208
|
+
label: string;
|
|
209
|
+
space: 'world' | 'screen';
|
|
210
|
+
index: number;
|
|
211
|
+
}
|
|
212
|
+
/** Everything the sink collected, ready for the overlay to draw. */
|
|
213
|
+
interface DebugSnapshot {
|
|
214
|
+
hitboxes: RecordedHitbox[];
|
|
215
|
+
handles: RecordedHandle[];
|
|
216
|
+
bounds: RecordedBounds[];
|
|
217
|
+
origins: RecordedOrigin[];
|
|
218
|
+
snap: RecordedSnap[];
|
|
219
|
+
layers: RecordedLayer[];
|
|
220
|
+
}
|
|
221
|
+
|
|
44
222
|
/**
|
|
45
223
|
* The kit version a build was compiled from, so an app can report what it is
|
|
46
224
|
* running. Substituted at build time — by `tsup.config.ts` for the published
|
|
@@ -64,20 +242,6 @@ declare const VERSION: string;
|
|
|
64
242
|
/** Round `value` to the nearest multiple of `cellSize`. Returns 0 when the result would be -0. */
|
|
65
243
|
declare function roundToCell(value: number, cellSize: number): number;
|
|
66
244
|
|
|
67
|
-
/** Pan offset (in pixels) plus per-axis zoom (pixels per content unit). */
|
|
68
|
-
interface ViewTransform {
|
|
69
|
-
panX: number;
|
|
70
|
-
panY: number;
|
|
71
|
-
zoom: {
|
|
72
|
-
x: number;
|
|
73
|
-
y: number;
|
|
74
|
-
};
|
|
75
|
-
}
|
|
76
|
-
/** Project a world-space point to screen-space pixels through a `ViewTransform`. */
|
|
77
|
-
declare function worldToScreen(worldX: number, worldY: number, view: ViewTransform): [number, number];
|
|
78
|
-
/** Inverse of `worldToScreen` — recover the world-space point under a screen-space pixel. */
|
|
79
|
-
declare function screenToWorld(screenX: number, screenY: number, view: ViewTransform): [number, number];
|
|
80
|
-
|
|
81
245
|
/**
|
|
82
246
|
* Pointer-tracking glue that turns hover position into a grid cell, suitable
|
|
83
247
|
* for dropping straight into `createCellHighlightLayer({ getCell })`. Pairs
|
|
@@ -136,48 +300,6 @@ interface UseGridCellHoverReturn {
|
|
|
136
300
|
/** Track which grid cell the pointer is over; pairs with `createCellHighlightLayer`. */
|
|
137
301
|
declare function useGridCellHover(opts: UseGridCellHoverOptions): UseGridCellHoverReturn;
|
|
138
302
|
|
|
139
|
-
/**
|
|
140
|
-
* Input convenience for zoom primitives. A `number` is treated as a
|
|
141
|
-
* uniform factor applied to both axes; a `{x, y}` vector applies
|
|
142
|
-
* per-axis factors.
|
|
143
|
-
*/
|
|
144
|
-
type ZoomFactor = number | {
|
|
145
|
-
x: number;
|
|
146
|
-
y: number;
|
|
147
|
-
};
|
|
148
|
-
/**
|
|
149
|
-
* Input convenience for zoom-clamp ranges. A `number` is applied as the
|
|
150
|
-
* same bound on both axes; a `{x, y}` vector applies per-axis bounds.
|
|
151
|
-
*/
|
|
152
|
-
type ZoomBound = number | {
|
|
153
|
-
x: number;
|
|
154
|
-
y: number;
|
|
155
|
-
};
|
|
156
|
-
/**
|
|
157
|
-
* Bridge `View` into the legacy `ViewTransform` shape so chrome can keep
|
|
158
|
-
* calling `worldToScreen` / `screenToWorld`. `View` and `ViewTransform`
|
|
159
|
-
* use opposite sign conventions for the translation half (`view.x` is
|
|
160
|
-
* camera position; `panX` is canvas translation), so the adapter flips
|
|
161
|
-
* the sign and multiplies by per-axis scale.
|
|
162
|
-
*/
|
|
163
|
-
declare function viewToTransform(view: View): ViewTransform;
|
|
164
|
-
/**
|
|
165
|
-
* How far `view` is zoomed in, as one number — the geometric mean of its two
|
|
166
|
-
* axes, so a uniform view reports its own scale and a stretched one reports
|
|
167
|
-
* the scale that covers the same area.
|
|
168
|
-
*
|
|
169
|
-
* What a `RuleCtx` carries, because the only rule that asks about the
|
|
170
|
-
* viewport asks for a threshold rather than a camera.
|
|
171
|
-
*/
|
|
172
|
-
declare function viewZoom(view: View): number;
|
|
173
|
-
/**
|
|
174
|
-
* `view` inside the invariant {@link View} documents: a zero or non-finite
|
|
175
|
-
* scale axis becomes `ZOOM_FLOOR`, a negative one keeps its sign, and a
|
|
176
|
-
* non-finite translation becomes 0. Returns `view` itself when it already
|
|
177
|
-
* holds, so a valid view keeps its identity.
|
|
178
|
-
*/
|
|
179
|
-
declare function normalizeView(view: View): View;
|
|
180
|
-
|
|
181
303
|
interface ChromeState {
|
|
182
304
|
/** Currently selected ids. Live; reflects useSelection's React state. */
|
|
183
305
|
readonly selection: readonly NodeId[];
|
|
@@ -1610,7 +1732,7 @@ interface DeviceProfileProviderProps {
|
|
|
1610
1732
|
* Publish one resolved profile to a subtree. `<SceneCanvas>` renders this so
|
|
1611
1733
|
* overlays, affordances, and consumer chrome all read the same object.
|
|
1612
1734
|
*/
|
|
1613
|
-
declare function DeviceProfileProvider({ value, children }: DeviceProfileProviderProps):
|
|
1735
|
+
declare function DeviceProfileProvider({ value, children }: DeviceProfileProviderProps): react.FunctionComponentElement<react.ProviderProps<DeviceProfile | null>>;
|
|
1614
1736
|
|
|
1615
1737
|
/**
|
|
1616
1738
|
* Compute the largest uniform zoom (px per content-unit) that fits a content
|
|
@@ -3216,129 +3338,6 @@ interface ToolPrefGroup {
|
|
|
3216
3338
|
children: Record<string, ToolPrefLeaf | ToolPrefGroup>;
|
|
3217
3339
|
}
|
|
3218
3340
|
|
|
3219
|
-
/**
|
|
3220
|
-
* `DebugSink`, `HitShape` and `HandleKind` are declared in
|
|
3221
|
-
* `@weasel-js/routing` — `ToolCtx.debug` carries a sink, so routing has to
|
|
3222
|
-
* name the type. Re-exported here, beside the overlay that reads one.
|
|
3223
|
-
*/
|
|
3224
|
-
|
|
3225
|
-
/** One bit per debug feature; absent keys are off. */
|
|
3226
|
-
interface DebugConfig {
|
|
3227
|
-
hitboxes?: boolean;
|
|
3228
|
-
handles?: boolean;
|
|
3229
|
-
bounds?: boolean;
|
|
3230
|
-
origins?: boolean;
|
|
3231
|
-
snap?: boolean;
|
|
3232
|
-
layers?: boolean;
|
|
3233
|
-
/** Render each tracked node's id as a label at the top-left of its
|
|
3234
|
-
* bounds. Pulls from the same `recordBounds` stream `bounds` uses, so
|
|
3235
|
-
* no extra sink calls are required to enable. */
|
|
3236
|
-
ids?: boolean;
|
|
3237
|
-
/** Rolling FPS counter rendered in the top-left corner of the canvas.
|
|
3238
|
-
* Tracks the rate at which the debug overlay's draw callback runs;
|
|
3239
|
-
* this matches the canvas's effective repaint rate. */
|
|
3240
|
-
fps?: boolean;
|
|
3241
|
-
/** Optional per-feature color overrides; falls back to the default theme. */
|
|
3242
|
-
theme?: Partial<DebugTheme>;
|
|
3243
|
-
/** Optional per-feature line-width / dash overrides; falls back to
|
|
3244
|
-
* {@link DEFAULT_DEBUG_STROKES}. */
|
|
3245
|
-
strokes?: Partial<DebugStrokes>;
|
|
3246
|
-
}
|
|
3247
|
-
/** The name of one debug-overlay feature — the keys of {@link DebugConfig}
|
|
3248
|
-
* that toggle a visualization. */
|
|
3249
|
-
type DebugFeature = 'hitboxes' | 'handles' | 'bounds' | 'origins' | 'snap' | 'layers' | 'ids' | 'fps';
|
|
3250
|
-
/** Colors the debug overlay draws with, one entry per feature. */
|
|
3251
|
-
interface DebugTheme {
|
|
3252
|
-
hitboxFill: string;
|
|
3253
|
-
hitboxStroke: string;
|
|
3254
|
-
handle: string;
|
|
3255
|
-
bounds: string;
|
|
3256
|
-
origin: string;
|
|
3257
|
-
snap: string;
|
|
3258
|
-
layerText: string;
|
|
3259
|
-
layerTextBg: string;
|
|
3260
|
-
/** Color for the per-node id label rendered when `config.ids` is on. */
|
|
3261
|
-
idText: string;
|
|
3262
|
-
/** Foreground / background for the FPS panel. */
|
|
3263
|
-
fpsText: string;
|
|
3264
|
-
fpsTextBg: string;
|
|
3265
|
-
}
|
|
3266
|
-
/** Line width and dash pattern for one stroked debug feature. An empty (or
|
|
3267
|
-
* omitted) `dash` is a solid line. */
|
|
3268
|
-
interface DebugStroke {
|
|
3269
|
-
width: number;
|
|
3270
|
-
dash?: readonly number[];
|
|
3271
|
-
}
|
|
3272
|
-
/** The stroked half of the debug overlay's appearance, split from
|
|
3273
|
-
* {@link DebugTheme} because only some features draw a line at all — text
|
|
3274
|
-
* panels and filled origin dots take color and nothing else. */
|
|
3275
|
-
interface DebugStrokes {
|
|
3276
|
-
hitbox: DebugStroke;
|
|
3277
|
-
bounds: DebugStroke;
|
|
3278
|
-
handle: DebugStroke;
|
|
3279
|
-
/** Rejected snap candidates only; accepted ones paint as a filled dot. */
|
|
3280
|
-
snap: DebugStroke;
|
|
3281
|
-
}
|
|
3282
|
-
/** A hit region tested during the current frame. */
|
|
3283
|
-
interface RecordedHitbox {
|
|
3284
|
-
id: string;
|
|
3285
|
-
kind: 'body' | 'handle' | 'rotation' | 'anchor';
|
|
3286
|
-
shape: HitShape;
|
|
3287
|
-
}
|
|
3288
|
-
/** A handle drawn during the current frame, and where. */
|
|
3289
|
-
interface RecordedHandle {
|
|
3290
|
-
id: string;
|
|
3291
|
-
position: {
|
|
3292
|
-
x: number;
|
|
3293
|
-
y: number;
|
|
3294
|
-
};
|
|
3295
|
-
kind: HandleKind;
|
|
3296
|
-
}
|
|
3297
|
-
/** A node's bounds as computed during the current frame. */
|
|
3298
|
-
interface RecordedBounds {
|
|
3299
|
-
id: string;
|
|
3300
|
-
bounds: {
|
|
3301
|
-
x: number;
|
|
3302
|
-
y: number;
|
|
3303
|
-
width: number;
|
|
3304
|
-
height: number;
|
|
3305
|
-
};
|
|
3306
|
-
}
|
|
3307
|
-
/** A node's transform origin as used during the current frame. */
|
|
3308
|
-
interface RecordedOrigin {
|
|
3309
|
-
id: string;
|
|
3310
|
-
point: {
|
|
3311
|
-
x: number;
|
|
3312
|
-
y: number;
|
|
3313
|
-
};
|
|
3314
|
-
}
|
|
3315
|
-
/** A snap candidate considered during the current gesture, and whether it
|
|
3316
|
-
* won. Unlike the other records these survive across frames, until the
|
|
3317
|
-
* gesture ends. */
|
|
3318
|
-
interface RecordedSnap {
|
|
3319
|
-
point: {
|
|
3320
|
-
x: number;
|
|
3321
|
-
y: number;
|
|
3322
|
-
};
|
|
3323
|
-
accepted: boolean;
|
|
3324
|
-
}
|
|
3325
|
-
/** A render layer that drew during the current frame. */
|
|
3326
|
-
interface RecordedLayer {
|
|
3327
|
-
id: string;
|
|
3328
|
-
label: string;
|
|
3329
|
-
space: 'world' | 'screen';
|
|
3330
|
-
index: number;
|
|
3331
|
-
}
|
|
3332
|
-
/** Everything the sink collected, ready for the overlay to draw. */
|
|
3333
|
-
interface DebugSnapshot {
|
|
3334
|
-
hitboxes: RecordedHitbox[];
|
|
3335
|
-
handles: RecordedHandle[];
|
|
3336
|
-
bounds: RecordedBounds[];
|
|
3337
|
-
origins: RecordedOrigin[];
|
|
3338
|
-
snap: RecordedSnap[];
|
|
3339
|
-
layers: RecordedLayer[];
|
|
3340
|
-
}
|
|
3341
|
-
|
|
3342
3341
|
/** Options for `useSelectTool`: how a point resolves to nodes, how a click
|
|
3343
3342
|
* chooses among them, and the appearance of the marquee. */
|
|
3344
3343
|
interface UseSelectToolOptions<TPose> {
|
|
@@ -4798,6 +4797,13 @@ interface CanvasSurfaceHelpers {
|
|
|
4798
4797
|
* are split so a per-view set can be built independently of the surface's,
|
|
4799
4798
|
* not to make layers ask for one. */
|
|
4800
4799
|
interface CanvasHelpers<TPose> extends CanvasViewHelpers<TPose>, CanvasSurfaceHelpers {
|
|
4800
|
+
/**
|
|
4801
|
+
* The view this draw is for: a `<CanvasView>` id, or `null` for the
|
|
4802
|
+
* surface's own camera. One layer array paints every view, so a layer that
|
|
4803
|
+
* belongs in some views and not others — a minimap's indicator — declines
|
|
4804
|
+
* the rest by this id.
|
|
4805
|
+
*/
|
|
4806
|
+
readonly viewId: string | null;
|
|
4801
4807
|
}
|
|
4802
4808
|
|
|
4803
4809
|
/**
|
|
@@ -5449,14 +5455,14 @@ interface CanvasProps<TNode extends {
|
|
|
5449
5455
|
*/
|
|
5450
5456
|
inputElement?: HTMLElement | null;
|
|
5451
5457
|
className?: string;
|
|
5452
|
-
style?:
|
|
5458
|
+
style?: react__default.CSSProperties;
|
|
5453
5459
|
tabIndex?: number;
|
|
5454
5460
|
/** Fired when the canvas element gains focus. The canvas is focusable by
|
|
5455
5461
|
* default (`tabIndex` 0), so consumers driving focus-dependent chrome —
|
|
5456
5462
|
* a focus ring, a "keyboard shortcuts active" hint — need to observe it. */
|
|
5457
|
-
onFocus?:
|
|
5463
|
+
onFocus?: react__default.FocusEventHandler<HTMLCanvasElement>;
|
|
5458
5464
|
/** Fired when the canvas element loses focus. */
|
|
5459
|
-
onBlur?:
|
|
5465
|
+
onBlur?: react__default.FocusEventHandler<HTMLCanvasElement>;
|
|
5460
5466
|
/**
|
|
5461
5467
|
* When `true` (default), the canvas element receives focus on `pointerdown`
|
|
5462
5468
|
* so keyboard events (tool hotkeys, undo/redo) are captured without a
|
|
@@ -5506,7 +5512,7 @@ interface CanvasProps<TNode extends {
|
|
|
5506
5512
|
* Useful for custom layers that render scene content outside of the standard
|
|
5507
5513
|
* slot system and need to stay in sync with gesture previews.
|
|
5508
5514
|
*/
|
|
5509
|
-
helpersRef?:
|
|
5515
|
+
helpersRef?: react__default.MutableRefObject<CanvasHelpers<TPose> | null>;
|
|
5510
5516
|
/**
|
|
5511
5517
|
* Debug overlay configuration.
|
|
5512
5518
|
* - `undefined` (default): read `?debug=…` from the URL.
|
|
@@ -5520,7 +5526,7 @@ interface CanvasProps<TNode extends {
|
|
|
5520
5526
|
debug?: DebugConfig | false;
|
|
5521
5527
|
/** Test-only escape hatch: writes the live debug sink to this ref so tests
|
|
5522
5528
|
* can call `snapshot()` after a render. No effect when debug is off. */
|
|
5523
|
-
debugSinkRef?:
|
|
5529
|
+
debugSinkRef?: react__default.MutableRefObject<(DebugSink & {
|
|
5524
5530
|
snapshot(): DebugSnapshot;
|
|
5525
5531
|
}) | null>;
|
|
5526
5532
|
/**
|
|
@@ -5795,6 +5801,36 @@ interface UseRotateOptions<TPose> {
|
|
|
5795
5801
|
pivot?: 'each' | 'union';
|
|
5796
5802
|
}
|
|
5797
5803
|
|
|
5804
|
+
/** Reads the surface's deps from inside `SurfaceContribution.attach`. */
|
|
5805
|
+
interface ContributionDepReader {
|
|
5806
|
+
get<K extends DepName>(name: K): DepSchema[K] | undefined;
|
|
5807
|
+
}
|
|
5808
|
+
/**
|
|
5809
|
+
* A feature a surface installs in one step. Every role is optional: `bindings`,
|
|
5810
|
+
* `actions`, `deps`, `overlay` and `presentation` from `Contribution`, plus
|
|
5811
|
+
* the two below. Installing it installs every role it declares, and removing
|
|
5812
|
+
* it removes them.
|
|
5813
|
+
*/
|
|
5814
|
+
interface SurfaceContribution extends Contribution {
|
|
5815
|
+
/** Views this entry adds to the surface, as `<SceneCanvas views>` takes. */
|
|
5816
|
+
views?: readonly CanvasViewProps[];
|
|
5817
|
+
/**
|
|
5818
|
+
* Runs once the surface mounts; returns its teardown. For what the roles
|
|
5819
|
+
* above cannot say — a registered (hit-testable) layer, a subscription.
|
|
5820
|
+
*
|
|
5821
|
+
* Keyed by the function's identity, so a contribution built once (in a
|
|
5822
|
+
* `useMemo`, or at module scope) attaches once however often the host
|
|
5823
|
+
* re-renders.
|
|
5824
|
+
*/
|
|
5825
|
+
attach?: (api: CanvasExtensionApi, deps: ContributionDepReader) => () => void;
|
|
5826
|
+
}
|
|
5827
|
+
/**
|
|
5828
|
+
* Concatenate contribution bundles into one registry, preserving order. Throws
|
|
5829
|
+
* on a duplicate entry id, dep name or view id — two features answering for
|
|
5830
|
+
* the same name is a bug in whichever was added second.
|
|
5831
|
+
*/
|
|
5832
|
+
declare function mergeContributions<T extends SurfaceContribution>(...bundles: readonly (readonly T[])[]): T[];
|
|
5833
|
+
|
|
5798
5834
|
/**
|
|
5799
5835
|
* The kit's built-in shape kinds — one table, every other spelling derived.
|
|
5800
5836
|
*
|
|
@@ -6347,11 +6383,13 @@ type SceneCanvasProps<TData, TLayer extends string, TPose> = Omit<CanvasProps<No
|
|
|
6347
6383
|
* lasso demo starts with `initialActiveTool="lasso"`. Ignored when the
|
|
6348
6384
|
* consumer supplies their own `tools` prop. */
|
|
6349
6385
|
initialActiveTool?: string;
|
|
6350
|
-
/** Always-on
|
|
6351
|
-
*
|
|
6352
|
-
*
|
|
6353
|
-
*
|
|
6354
|
-
|
|
6386
|
+
/** Always-on entries to register alongside the internal default select:
|
|
6387
|
+
* tools, and features written as a `SurfaceContribution` — whose views,
|
|
6388
|
+
* deps, overlay, bindings, actions and `attach` all install from this one
|
|
6389
|
+
* list, and uninstall when the entry leaves it. If you supply your own
|
|
6390
|
+
* `tools` prop, this is ignored — wire `ambient` through your own
|
|
6391
|
+
* `useTools` call instead. */
|
|
6392
|
+
ambient?: readonly (AnyTool | SurfaceContribution)[];
|
|
6355
6393
|
/** Viewport feature wiring.
|
|
6356
6394
|
*
|
|
6357
6395
|
* - `inertia` and `animatedZoom` are opt-in: pass `true` for defaults or
|
|
@@ -6617,7 +6655,7 @@ type SceneCanvasProps<TData, TLayer extends string, TPose> = Omit<CanvasProps<No
|
|
|
6617
6655
|
*/
|
|
6618
6656
|
onDoubleClick?: (hit: SceneCanvasHit | null) => void;
|
|
6619
6657
|
};
|
|
6620
|
-
declare function SceneCanvasInner<TData, TLayer extends string, TPose>(props: SceneCanvasProps<TData, TLayer, TPose>, ref:
|
|
6658
|
+
declare function SceneCanvasInner<TData, TLayer extends string, TPose>(props: SceneCanvasProps<TData, TLayer, TPose>, ref: react__default.ForwardedRef<SceneCanvasApi>): react__default.JSX.Element;
|
|
6621
6659
|
/**
|
|
6622
6660
|
* The canvas component: renders a `Scene` and wires the interaction stack
|
|
6623
6661
|
* around it.
|
|
@@ -6632,7 +6670,7 @@ declare function SceneCanvasInner<TData, TLayer extends string, TPose>(props: Sc
|
|
|
6632
6670
|
* fit a prop (view control, hit queries, redraw requests).
|
|
6633
6671
|
*/
|
|
6634
6672
|
declare const SceneCanvas: <TData, TLayer extends string, TPose>(props: SceneCanvasProps<TData, TLayer, TPose> & {
|
|
6635
|
-
ref?:
|
|
6673
|
+
ref?: react__default.Ref<SceneCanvasApi>;
|
|
6636
6674
|
}) => ReturnType<typeof SceneCanvasInner>;
|
|
6637
6675
|
|
|
6638
6676
|
/** Which of the host's edges the panel is held against, per axis. */
|
|
@@ -6730,7 +6768,7 @@ interface CursorCoordsHudProps {
|
|
|
6730
6768
|
}
|
|
6731
6769
|
/** Debug overlay showing the pointer's client and world coordinates and the
|
|
6732
6770
|
* current frame rate, pinned to the canvas's top-right corner. */
|
|
6733
|
-
declare function CursorCoordsHud({ canvasRef, anchorRef, viewRef, offset }: CursorCoordsHudProps):
|
|
6771
|
+
declare function CursorCoordsHud({ canvasRef, anchorRef, viewRef, offset }: CursorCoordsHudProps): react.JSX.Element | null;
|
|
6734
6772
|
|
|
6735
6773
|
/** Props for `<PickHud>`. */
|
|
6736
6774
|
interface PickHudProps {
|
|
@@ -6754,7 +6792,7 @@ interface PickHudProps {
|
|
|
6754
6792
|
}
|
|
6755
6793
|
/** Debug overlay listing every node under the pointer, with the one a click
|
|
6756
6794
|
* would actually select shown in bold. */
|
|
6757
|
-
declare function PickHud({ canvasRef, anchorRef, viewRef, pickEvery, pickBest, offset }: PickHudProps):
|
|
6795
|
+
declare function PickHud({ canvasRef, anchorRef, viewRef, pickEvery, pickBest, offset }: PickHudProps): react.JSX.Element | null;
|
|
6758
6796
|
|
|
6759
6797
|
/**
|
|
6760
6798
|
* imageCache — the kit's per-`src` image loader + cache.
|
|
@@ -7122,9 +7160,7 @@ declare function resolveOverlays(overlays: Iterable<OngoingOverlay>): ResolvedOv
|
|
|
7122
7160
|
* (`<SceneViewCanvas>` / `<MinimapCanvas>`). Given a `<canvas>`, a `Scene`,
|
|
7123
7161
|
* a `View`, and a per-node `drawOne`, render one frame.
|
|
7124
7162
|
*
|
|
7125
|
-
*
|
|
7126
|
-
* (`docs/superpowers/specs/2026-05-31-detached-minimap-design.md`). The full
|
|
7127
|
-
* `<SceneCanvas>` render pipeline does much more than this (slots, layer
|
|
7163
|
+
* The full `<SceneCanvas>` render pipeline does much more than this (slots, layer
|
|
7128
7164
|
* ordering, debug sinks, tool overlays). The helper deliberately re-implements
|
|
7129
7165
|
* the small subset needed for a non-interactive scene view rather than
|
|
7130
7166
|
* refactoring `<SceneCanvas>` to share code — the spec calls for that
|
|
@@ -7279,7 +7315,7 @@ interface SceneViewCanvasProps<TData, TLayer extends string, TPose> {
|
|
|
7279
7315
|
* pointer listeners or call `toBlob` for snapshots through this. */
|
|
7280
7316
|
canvasRef?: Ref<HTMLCanvasElement>;
|
|
7281
7317
|
}
|
|
7282
|
-
declare function SceneViewCanvasInner<TData, TLayer extends string, TPose>(props: SceneViewCanvasProps<TData, TLayer, TPose>):
|
|
7318
|
+
declare function SceneViewCanvasInner<TData, TLayer extends string, TPose>(props: SceneViewCanvasProps<TData, TLayer, TPose>): react.JSX.Element;
|
|
7283
7319
|
/**
|
|
7284
7320
|
* Pointer-inert read-only scene view. See `SceneViewCanvasProps` for the
|
|
7285
7321
|
* full surface and the module docstring for the rendering model.
|
|
@@ -7600,17 +7636,121 @@ interface MinimapCanvasProps<TData, TLayer extends string, TPose> {
|
|
|
7600
7636
|
className?: string;
|
|
7601
7637
|
/** Forwarded ref to the underlying `<canvas>`. */
|
|
7602
7638
|
canvasRef?: Ref<HTMLCanvasElement>;
|
|
7639
|
+
/** The view id this minimap publishes its pointer under. Default
|
|
7640
|
+
* `'minimap'`. */
|
|
7641
|
+
id?: string;
|
|
7603
7642
|
}
|
|
7604
|
-
declare function MinimapCanvasInner<TData, TLayer extends string, TPose>(props: MinimapCanvasProps<TData, TLayer, TPose>): react_jsx_runtime.JSX.Element;
|
|
7605
7643
|
/**
|
|
7606
7644
|
* Opinionated minimap. See `MinimapCanvasProps` for the full surface and
|
|
7607
|
-
* the module docstring for the rendering /
|
|
7645
|
+
* the module docstring for the rendering / input model.
|
|
7646
|
+
*
|
|
7647
|
+
* Its dispatcher, actions and deps are its own, so it never competes with
|
|
7648
|
+
* the main canvas for input. The pointer store is shared when one is in scope.
|
|
7608
7649
|
*
|
|
7609
7650
|
* `forwardRef` is not used because the component is generic over
|
|
7610
7651
|
* `<TData, TLayer, TPose>` and React's `forwardRef` erases generics. The
|
|
7611
7652
|
* `canvasRef` prop is the plain-prop equivalent.
|
|
7612
7653
|
*/
|
|
7613
|
-
declare
|
|
7654
|
+
declare function MinimapCanvas<TData, TLayer extends string, TPose>(props: MinimapCanvasProps<TData, TLayer, TPose>): react.JSX.Element;
|
|
7655
|
+
|
|
7656
|
+
/**
|
|
7657
|
+
* A minimap over a `<SceneCanvas>`, written as one `SurfaceContribution`: a
|
|
7658
|
+
* view through a fit camera, the pan that moves the main camera from inside
|
|
7659
|
+
* it, the visible-rect indicator, and a linked crosshair.
|
|
7660
|
+
*/
|
|
7661
|
+
|
|
7662
|
+
/** Options for {@link createLinkedCursorContribution}. */
|
|
7663
|
+
interface LinkedCursorOptions {
|
|
7664
|
+
/** Entry id. Default `'linked-cursor'`. */
|
|
7665
|
+
id?: string;
|
|
7666
|
+
/** Views on this surface the crosshair may paint in. Default `[null]`, the
|
|
7667
|
+
* surface's own camera — the main canvas beside a detached minimap. */
|
|
7668
|
+
views?: readonly (string | null)[];
|
|
7669
|
+
}
|
|
7670
|
+
/**
|
|
7671
|
+
* The linked crosshair alone: this surface paints the pointer's position
|
|
7672
|
+
* whenever the pointer is over some other view — another surface under the
|
|
7673
|
+
* same `<PointerContextProvider>`, such as a detached `<MinimapCanvas>`.
|
|
7674
|
+
*
|
|
7675
|
+
* A surface carrying `createMinimapContribution` already has one, in both its
|
|
7676
|
+
* views; this is for a surface without.
|
|
7677
|
+
*/
|
|
7678
|
+
declare function createLinkedCursorContribution(opts?: LinkedCursorOptions): SurfaceContribution;
|
|
7679
|
+
/** Options for {@link createMinimapContribution}. */
|
|
7680
|
+
interface MinimapContributionOptions<TData = unknown, TLayer extends string = string, TPose = unknown> {
|
|
7681
|
+
/** View and entry id. Default `'minimap'`. */
|
|
7682
|
+
id?: string;
|
|
7683
|
+
/** Where the minimap paints, in CSS pixels from the canvas top-left. A
|
|
7684
|
+
* function is re-read every frame, so it can follow the canvas's size. */
|
|
7685
|
+
rect: ViewRect | ((outer: View, dims: Dims) => ViewRect);
|
|
7686
|
+
/** What the minimap frames. Default `'scene'`, the union of leaf poses. */
|
|
7687
|
+
fit?: MinimapFit<TData, TLayer, TPose>;
|
|
7688
|
+
/** The surface layers the minimap paints. Default: all of them. */
|
|
7689
|
+
layers?: (surface: readonly RenderLayer<unknown>[]) => readonly RenderLayer<unknown>[];
|
|
7690
|
+
/** Ground painted before the minimap's layers, so the main canvas does not
|
|
7691
|
+
* show through. */
|
|
7692
|
+
background?: string;
|
|
7693
|
+
/** The visible-rect indicator's stroke. */
|
|
7694
|
+
indicatorStyle?: IndicatorStyle;
|
|
7695
|
+
}
|
|
7696
|
+
/**
|
|
7697
|
+
* A minimap inside a `<SceneCanvas>`, installed with one entry:
|
|
7698
|
+
*
|
|
7699
|
+
* ```tsx
|
|
7700
|
+
* const minimap = useMemo(() => createMinimapContribution({ rect: { x: 8, y: 8, w: 160, h: 110 } }), []);
|
|
7701
|
+
* <SceneCanvas ambient={[minimap]} … />
|
|
7702
|
+
* ```
|
|
7703
|
+
*
|
|
7704
|
+
* Press in it to center the main camera on that point, drag to keep it there.
|
|
7705
|
+
* It shows the main camera's visible rect, and a crosshair where the pointer is
|
|
7706
|
+
* over the other view. Build it once — each instance keeps the live state its
|
|
7707
|
+
* layers read.
|
|
7708
|
+
*/
|
|
7709
|
+
declare function createMinimapContribution<TData = unknown, TLayer extends string = string, TPose = unknown>(opts: MinimapContributionOptions<TData, TLayer, TPose>): SurfaceContribution;
|
|
7710
|
+
|
|
7711
|
+
/**
|
|
7712
|
+
* The minimap's input: press to recenter the main camera on a world point,
|
|
7713
|
+
* drag to keep it there. Both read `rootView` — never `view`, which inside the
|
|
7714
|
+
* minimap's own view answers the minimap's camera.
|
|
7715
|
+
*/
|
|
7716
|
+
|
|
7717
|
+
declare const MINIMAP_CENTER = "minimap.center";
|
|
7718
|
+
declare const MINIMAP_PAN = "minimap.pan";
|
|
7719
|
+
/** Move `root` so world point (`x`, `y`) sits at the center of its host,
|
|
7720
|
+
* keeping its scale. A no-op while the host is unmeasured. */
|
|
7721
|
+
declare function centerRootOn(root: ViewApi, x: number, y: number): void;
|
|
7722
|
+
/** Recenter the main camera on the pressed world point. */
|
|
7723
|
+
declare function minimapCenterAction(): Action;
|
|
7724
|
+
/** Keep the main camera centered on the pointer's world point while dragging.
|
|
7725
|
+
* Pair it with `minimap.center` on `pointerDown`, which handles the press.
|
|
7726
|
+
* A recenter lands the moment it is computed, so there is nothing to commit
|
|
7727
|
+
* and a cancel ends where a release does. */
|
|
7728
|
+
declare function minimapPanAction(): Action;
|
|
7729
|
+
|
|
7730
|
+
/**
|
|
7731
|
+
* The minimap's chrome: the main camera's visible rect, drawn in the minimap,
|
|
7732
|
+
* and the linked crosshair, drawn in every view the pointer is not over.
|
|
7733
|
+
*/
|
|
7734
|
+
|
|
7735
|
+
/** The halo's color: dark enough to separate the accent from any content. */
|
|
7736
|
+
declare const CROSSHAIR_HALO = "rgba(0, 0, 0, 0.6)";
|
|
7737
|
+
/** An axis-aligned rect, `{ x, y, w, h }`. */
|
|
7738
|
+
interface CrosshairRect {
|
|
7739
|
+
x: number;
|
|
7740
|
+
y: number;
|
|
7741
|
+
w: number;
|
|
7742
|
+
h: number;
|
|
7743
|
+
}
|
|
7744
|
+
/**
|
|
7745
|
+
* The linked crosshair at (`x`, `y`) as rects in the caller's units, where one
|
|
7746
|
+
* screen pixel is `unitsPerPx` of them: four halo rects to paint first, then
|
|
7747
|
+
* four bars. A painter with no weasel renderer — a 2D canvas — draws the same
|
|
7748
|
+
* crosshair from these.
|
|
7749
|
+
*/
|
|
7750
|
+
declare function crosshairRects(x: number, y: number, unitsPerPx: number): {
|
|
7751
|
+
halo: CrosshairRect[];
|
|
7752
|
+
bars: CrosshairRect[];
|
|
7753
|
+
};
|
|
7614
7754
|
|
|
7615
7755
|
/** Plain RGBA raster — structurally `ImageData`-compatible ({ width, height,
|
|
7616
7756
|
* data }), deliberately free of printer/dpi/physical-unit concepts. */
|
|
@@ -7772,74 +7912,22 @@ declare function SelectionContextProviderIfRoot({ children, }: {
|
|
|
7772
7912
|
*/
|
|
7773
7913
|
declare function usePublishSelection(ids: readonly NodeId[], kinds?: readonly (string | undefined)[]): void;
|
|
7774
7914
|
|
|
7775
|
-
/**
|
|
7776
|
-
* @experimental
|
|
7777
|
-
* PointerContext — a tiny ambient context that publishes the world-space
|
|
7778
|
-
* position of the canvas pointer, refreshed on every `pointermove` over
|
|
7779
|
-
* the canvas. Cleared (set to `null`) on `pointerleave`.
|
|
7780
|
-
*
|
|
7781
|
-
* Why ref-based and not state-based: cursor moves fire dozens of times per
|
|
7782
|
-
* second; routing those through React state would re-render every consumer
|
|
7783
|
-
* in the tree. The context exposes a stable `pointerRef` whose `.current`
|
|
7784
|
-
* is mutated directly by the publisher, plus a thunk `getDropPoint()` that
|
|
7785
|
-
* reads it on demand. Consumers (e.g. `useClipboard`) pull via the thunk
|
|
7786
|
-
* inside their callbacks — no subscription, no re-render.
|
|
7787
|
-
*
|
|
7788
|
-
* `<SceneCanvas>` publishes automatically. `useClipboardOps` consumes when
|
|
7789
|
-
* the caller didn't pass an explicit `getDropPoint` option. Other future
|
|
7790
|
-
* hit-on-cursor consumers (drop-zone hover, context-menu anchor) can reuse
|
|
7791
|
-
* the same context.
|
|
7792
|
-
*/
|
|
7793
|
-
|
|
7794
|
-
/** @experimental World-space pointer position, or `null` when the pointer
|
|
7795
|
-
* isn't over the publishing canvas. */
|
|
7796
|
-
type PointerWorldPos = {
|
|
7797
|
-
worldX: number;
|
|
7798
|
-
worldY: number;
|
|
7799
|
-
} | null;
|
|
7800
|
-
/** @experimental */
|
|
7801
|
-
interface PointerContextValue {
|
|
7802
|
-
/** Live ref — mutate to publish, read for the latest snapshot. The
|
|
7803
|
-
* identity is stable for the lifetime of the provider. */
|
|
7804
|
-
readonly pointerRef: MutableRefObject<PointerWorldPos>;
|
|
7805
|
-
/** Convenience thunk equivalent to `() => pointerRef.current`. Stable
|
|
7806
|
-
* identity for the lifetime of the provider; safe to pass to hooks. */
|
|
7807
|
-
readonly getDropPoint: () => PointerWorldPos;
|
|
7808
|
-
}
|
|
7809
|
-
/**
|
|
7810
|
-
* @experimental
|
|
7811
|
-
* Wrap the part of the React tree that should share a pointer-position
|
|
7812
|
-
* context. Usually placed at the demo / app root, alongside
|
|
7813
|
-
* `<ActionsProvider>` and `<SelectionContextProvider>`.
|
|
7814
|
-
*
|
|
7815
|
-
* Most consumers don't need to mount this directly — `<SceneCanvas>` mounts
|
|
7816
|
-
* an internal provider when no parent provider is in scope, so child hooks
|
|
7817
|
-
* (`useClipboard` without an explicit `getDropPoint`) read the canvas's
|
|
7818
|
-
* tracked pointer for free.
|
|
7819
|
-
*/
|
|
7820
|
-
declare function PointerContextProvider({ children }: {
|
|
7821
|
-
children: ReactNode;
|
|
7822
|
-
}): ReactNode;
|
|
7823
|
-
/** @experimental Read the surrounding pointer-context value, or `null` when
|
|
7824
|
-
* no provider is in scope. */
|
|
7825
|
-
declare function usePointerContext(): PointerContextValue | null;
|
|
7826
|
-
|
|
7827
7915
|
/** Mount a `<PointerContextProvider>` only when none is already in scope. */
|
|
7828
7916
|
declare function PointerProviderIfRoot({ children }: {
|
|
7829
7917
|
children: ReactNode;
|
|
7830
|
-
}):
|
|
7918
|
+
}): react.JSX.Element;
|
|
7831
7919
|
|
|
7832
7920
|
/** Mount an `<ActionsProvider>` only when none is already in scope, so
|
|
7833
7921
|
* nesting canvases share one action registry instead of shadowing it. */
|
|
7834
7922
|
declare function ActionsProviderIfRoot({ children }: {
|
|
7835
7923
|
children: ReactNode;
|
|
7836
|
-
}):
|
|
7924
|
+
}): react.JSX.Element;
|
|
7837
7925
|
|
|
7838
7926
|
/** Mount a `<DepRegistryProvider>` only when none is already in scope, so a
|
|
7839
7927
|
* consumer's dep sources are not shadowed by a nested canvas. */
|
|
7840
7928
|
declare function DepRegistryProviderIfRoot({ children }: {
|
|
7841
7929
|
children: ReactNode;
|
|
7842
|
-
}):
|
|
7930
|
+
}): react.JSX.Element;
|
|
7843
7931
|
|
|
7844
7932
|
interface WeaselProviderProps {
|
|
7845
7933
|
children: ReactNode;
|
|
@@ -7864,7 +7952,7 @@ interface WeaselProviderProps {
|
|
|
7864
7952
|
* state has to be shared by things outside a canvas: a toolbar, a property
|
|
7865
7953
|
* panel, or two canvases that should agree on the selection.
|
|
7866
7954
|
*/
|
|
7867
|
-
declare function WeaselProvider({ children, isolate }: WeaselProviderProps):
|
|
7955
|
+
declare function WeaselProvider({ children, isolate }: WeaselProviderProps): react.JSX.Element;
|
|
7868
7956
|
|
|
7869
7957
|
/** Options for `useCanvasFocus`. */
|
|
7870
7958
|
interface UseCanvasFocusOptions {
|
|
@@ -12075,32 +12163,32 @@ interface IconProps {
|
|
|
12075
12163
|
/** Classic cursor-arrow shape — filled silhouette pointing top-left to
|
|
12076
12164
|
* bottom-right with the diagonal "tail" along the lower edge. Used for
|
|
12077
12165
|
* `useSelectTool`. */
|
|
12078
|
-
declare function SelectIcon({ className, size }: IconProps):
|
|
12166
|
+
declare function SelectIcon({ className, size }: IconProps): react.JSX.Element;
|
|
12079
12167
|
|
|
12080
12168
|
/** Freeform marquee — outlined irregular loop with a short tail
|
|
12081
12169
|
* suggesting "the lasso closed where you released the pointer." Used
|
|
12082
12170
|
* for `useLassoTool`. */
|
|
12083
|
-
declare function LassoIcon({ className, size }: IconProps):
|
|
12171
|
+
declare function LassoIcon({ className, size }: IconProps): react.JSX.Element;
|
|
12084
12172
|
|
|
12085
12173
|
/** Outlined rectangle with a small crosshair at the upper-left corner,
|
|
12086
12174
|
* signaling "this is a drawing tool, not just a shape." Used for the
|
|
12087
12175
|
* rectangle insertion tool (`useInsertTool` today, future `useRectTool`). */
|
|
12088
|
-
declare function RectIcon({ className, size }: IconProps):
|
|
12176
|
+
declare function RectIcon({ className, size }: IconProps): react.JSX.Element;
|
|
12089
12177
|
|
|
12090
12178
|
/** Outlined ellipse. Used for the ellipse insertion tool. */
|
|
12091
|
-
declare function EllipseIcon({ className, size }: IconProps):
|
|
12179
|
+
declare function EllipseIcon({ className, size }: IconProps): react.JSX.Element;
|
|
12092
12180
|
|
|
12093
12181
|
/** Framed picture with a sun and mountain — the conventional "image" glyph.
|
|
12094
12182
|
* Used for the image insertion tool (`useImageTool`). */
|
|
12095
|
-
declare function ImageIcon({ className, size }: IconProps):
|
|
12183
|
+
declare function ImageIcon({ className, size }: IconProps): react.JSX.Element;
|
|
12096
12184
|
|
|
12097
12185
|
/** Eyedropper — diagonal stem running from upper-right (bulb) to
|
|
12098
12186
|
* lower-left (tip), with a small squared bulb cap at the top. Used
|
|
12099
12187
|
* for the eyedropper / color-picker tool. */
|
|
12100
|
-
declare function EyedropperIcon({ className, size }: IconProps):
|
|
12188
|
+
declare function EyedropperIcon({ className, size }: IconProps): react.JSX.Element;
|
|
12101
12189
|
|
|
12102
12190
|
/** Diagonal line. Used for the line insertion tool. */
|
|
12103
|
-
declare function LineIcon({ className, size }: IconProps):
|
|
12191
|
+
declare function LineIcon({ className, size }: IconProps): react.JSX.Element;
|
|
12104
12192
|
|
|
12105
12193
|
/** `LineIcon`'s diagonal with a filled head, so the two read as one tool with
|
|
12106
12194
|
* and without the marker. Used for the arrow insertion tool.
|
|
@@ -12109,82 +12197,82 @@ declare function LineIcon({ className, size }: IconProps): react_jsx_runtime.JSX
|
|
|
12109
12197
|
* under antialiasing and the notch disappears, leaving a blob. Its base
|
|
12110
12198
|
* corners are `tip ∓ 5.6·d ± 2.1·d⊥` — computed, and the shaft stops half a
|
|
12111
12199
|
* unit inside the base so its round cap hides under the fill. */
|
|
12112
|
-
declare function ArrowIcon({ className, size }: IconProps):
|
|
12200
|
+
declare function ArrowIcon({ className, size }: IconProps): react.JSX.Element;
|
|
12113
12201
|
|
|
12114
12202
|
/** Outlined hexagon. Used for the polygon insertion tool. */
|
|
12115
|
-
declare function PolygonIcon({ className, size }: IconProps):
|
|
12203
|
+
declare function PolygonIcon({ className, size }: IconProps): react.JSX.Element;
|
|
12116
12204
|
|
|
12117
12205
|
/** Outlined five-point star. Used for the star insertion tool. */
|
|
12118
|
-
declare function StarIcon({ className, size }: IconProps):
|
|
12206
|
+
declare function StarIcon({ className, size }: IconProps): react.JSX.Element;
|
|
12119
12207
|
|
|
12120
12208
|
/** Slanted pencil pointing toward the upper-right corner. Used for the
|
|
12121
12209
|
* freehand pencil insertion tool. */
|
|
12122
|
-
declare function PencilIcon({ className, size }: IconProps):
|
|
12210
|
+
declare function PencilIcon({ className, size }: IconProps): react.JSX.Element;
|
|
12123
12211
|
|
|
12124
12212
|
/** Serif "T" — top bar + stem + small bottom serif. Used for
|
|
12125
12213
|
* `useTextTool`. Visually consistent with the layer-list text icon. */
|
|
12126
|
-
declare function TextIcon({ className, size }: IconProps):
|
|
12214
|
+
declare function TextIcon({ className, size }: IconProps): react.JSX.Element;
|
|
12127
12215
|
|
|
12128
12216
|
/** Pen nib — angled filled body with a pointed tip and a small ink dot
|
|
12129
12217
|
* at the very tip, plus a short "control" handle extending out the
|
|
12130
12218
|
* back. Used for `usePenTool`. */
|
|
12131
|
-
declare function PenIcon({ className, size }: IconProps):
|
|
12219
|
+
declare function PenIcon({ className, size }: IconProps): react.JSX.Element;
|
|
12132
12220
|
|
|
12133
12221
|
/** Open hand — rounded palm with four upward fingers (variable length)
|
|
12134
12222
|
* and a thumb stub. Used for `useHandTool` (viewport pan). */
|
|
12135
|
-
declare function HandIcon({ className, size }: IconProps):
|
|
12223
|
+
declare function HandIcon({ className, size }: IconProps): react.JSX.Element;
|
|
12136
12224
|
|
|
12137
12225
|
/** Placeholder for tools without `presentation.icon`. A circle with "?"
|
|
12138
12226
|
* inside — readable, debuggable, not hidden. */
|
|
12139
|
-
declare function UnknownIcon({ className, size }: IconProps):
|
|
12227
|
+
declare function UnknownIcon({ className, size }: IconProps): react.JSX.Element;
|
|
12140
12228
|
|
|
12141
12229
|
/** Icon for the union operation: two overlapping circles merged into one filled shape. */
|
|
12142
|
-
declare function UnionIcon():
|
|
12230
|
+
declare function UnionIcon(): react.JSX.Element;
|
|
12143
12231
|
/** Icon for the intersect operation: only the overlap of two circles filled. */
|
|
12144
|
-
declare function IntersectIcon():
|
|
12232
|
+
declare function IntersectIcon(): react.JSX.Element;
|
|
12145
12233
|
/** Icon for the subtract operation: the front circle removed from the back one. */
|
|
12146
|
-
declare function SubtractIcon():
|
|
12234
|
+
declare function SubtractIcon(): react.JSX.Element;
|
|
12147
12235
|
/** Icon for the exclude operation: both circles filled except their overlap. */
|
|
12148
|
-
declare function ExcludeIcon():
|
|
12236
|
+
declare function ExcludeIcon(): react.JSX.Element;
|
|
12149
12237
|
/** Icon for the divide operation: two circles split into their separate regions. */
|
|
12150
|
-
declare function DivideIcon():
|
|
12238
|
+
declare function DivideIcon(): react.JSX.Element;
|
|
12151
12239
|
/** Icon for the crop operation: the back shape clipped to the front one. */
|
|
12152
|
-
declare function CropIcon():
|
|
12240
|
+
declare function CropIcon(): react.JSX.Element;
|
|
12153
12241
|
|
|
12154
12242
|
/** Cut: scissors. */
|
|
12155
|
-
declare function CutIcon():
|
|
12243
|
+
declare function CutIcon(): react.JSX.Element;
|
|
12156
12244
|
/** Copy: a document peeking out behind another. */
|
|
12157
|
-
declare function CopyIcon():
|
|
12245
|
+
declare function CopyIcon(): react.JSX.Element;
|
|
12158
12246
|
/** Paste: a clipboard with a filled clip. */
|
|
12159
|
-
declare function PasteIcon():
|
|
12247
|
+
declare function PasteIcon(): react.JSX.Element;
|
|
12160
12248
|
/** Duplicate: the source outlined, the copy filled. */
|
|
12161
|
-
declare function DuplicateIcon():
|
|
12249
|
+
declare function DuplicateIcon(): react.JSX.Element;
|
|
12162
12250
|
/** Group: corner brackets framing two filled rects. */
|
|
12163
|
-
declare function GroupIcon():
|
|
12251
|
+
declare function GroupIcon(): react.JSX.Element;
|
|
12164
12252
|
/** Ungroup: two filled rects escaping a frame broken to two dashed corners. */
|
|
12165
|
-
declare function UngroupIcon():
|
|
12253
|
+
declare function UngroupIcon(): react.JSX.Element;
|
|
12166
12254
|
/** Bring forward: two stacked rects, the front one filled. */
|
|
12167
|
-
declare function BringForwardIcon():
|
|
12255
|
+
declare function BringForwardIcon(): react.JSX.Element;
|
|
12168
12256
|
/** Bring to front: three stacked rects, the frontmost filled. */
|
|
12169
|
-
declare function BringToFrontIcon():
|
|
12257
|
+
declare function BringToFrontIcon(): react.JSX.Element;
|
|
12170
12258
|
/** Send backward: two stacked rects, the rear one filled. */
|
|
12171
|
-
declare function SendBackwardIcon():
|
|
12259
|
+
declare function SendBackwardIcon(): react.JSX.Element;
|
|
12172
12260
|
/** Send to back: three stacked rects, the rearmost filled. */
|
|
12173
|
-
declare function SendToBackIcon():
|
|
12261
|
+
declare function SendToBackIcon(): react.JSX.Element;
|
|
12174
12262
|
/** Flip horizontal: an outlined and a filled chevron either side of a dashed vertical axis. */
|
|
12175
|
-
declare function FlipXIcon():
|
|
12263
|
+
declare function FlipXIcon(): react.JSX.Element;
|
|
12176
12264
|
/** Flip vertical: an outlined and a filled chevron either side of a dashed horizontal axis. */
|
|
12177
|
-
declare function FlipYIcon():
|
|
12265
|
+
declare function FlipYIcon(): react.JSX.Element;
|
|
12178
12266
|
|
|
12179
|
-
declare function AlignLeftIcon():
|
|
12180
|
-
declare function AlignRightIcon():
|
|
12181
|
-
declare function AlignTopIcon():
|
|
12182
|
-
declare function AlignBottomIcon():
|
|
12183
|
-
declare function AlignCenterXIcon():
|
|
12184
|
-
declare function AlignCenterYIcon():
|
|
12267
|
+
declare function AlignLeftIcon(): react.JSX.Element;
|
|
12268
|
+
declare function AlignRightIcon(): react.JSX.Element;
|
|
12269
|
+
declare function AlignTopIcon(): react.JSX.Element;
|
|
12270
|
+
declare function AlignBottomIcon(): react.JSX.Element;
|
|
12271
|
+
declare function AlignCenterXIcon(): react.JSX.Element;
|
|
12272
|
+
declare function AlignCenterYIcon(): react.JSX.Element;
|
|
12185
12273
|
|
|
12186
|
-
declare function DistributeHorizontalIcon():
|
|
12187
|
-
declare function DistributeVerticalIcon():
|
|
12274
|
+
declare function DistributeHorizontalIcon(): react.JSX.Element;
|
|
12275
|
+
declare function DistributeVerticalIcon(): react.JSX.Element;
|
|
12188
12276
|
|
|
12189
12277
|
/**
|
|
12190
12278
|
* @experimental
|
|
@@ -12201,11 +12289,11 @@ interface ActionGlyphProps extends IconProps {
|
|
|
12201
12289
|
fillOpacity?: number;
|
|
12202
12290
|
}
|
|
12203
12291
|
/** @experimental Undo: a straight run returning in a half circle, arrowhead on the run. */
|
|
12204
|
-
declare function UndoIcon(p: ActionGlyphProps):
|
|
12292
|
+
declare function UndoIcon(p: ActionGlyphProps): react.JSX.Element;
|
|
12205
12293
|
/** @experimental Redo: the undo glyph mirrored. */
|
|
12206
|
-
declare function RedoIcon(p: ActionGlyphProps):
|
|
12294
|
+
declare function RedoIcon(p: ActionGlyphProps): react.JSX.Element;
|
|
12207
12295
|
/** @experimental Delete: a lidded trash can. */
|
|
12208
|
-
declare function DeleteIcon(p: ActionGlyphProps):
|
|
12296
|
+
declare function DeleteIcon(p: ActionGlyphProps): react.JSX.Element;
|
|
12209
12297
|
|
|
12210
12298
|
/**
|
|
12211
12299
|
* @experimental
|
|
@@ -12246,4 +12334,4 @@ interface InsertOverlayStyle {
|
|
|
12246
12334
|
lineWidth?: number;
|
|
12247
12335
|
}
|
|
12248
12336
|
|
|
12249
|
-
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, 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, CopyIcon, type CornerResizeAffordanceOptions, type CornerResizeScratch, type CreateChildrenLayerOpts, type CreateParallaxLayerOpts, type CreatePathEditingOverlayLayerOptions, type CreatePathLayerOpts, type CreatePenPreviewLayerOptions, type CreateTextLayerOpts, type CreateTiledLayerOpts, type CreateViewResolverOpts, type CreateViewportLayerOpts, CropIcon, 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, MESH_BAKE_SIZE, MESH_GRADIENT_KIND, MIXED, MOVE_ANCHORS, type MarkerCtx, type MarkerEntry, type MarkerPaint, type MarkerSite, type MarkerSiteRequest, type MeshGradientFill, type MeshPatch, type MeshPoint, MinimapCanvas, type MinimapCanvasProps, 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, PointerContextProvider, type PointerContextValue, PointerProviderIfRoot, type PointerSample, type PointerStylusState, type PointerWorldPos, 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, 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, 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, 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, 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, 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, meshBounds, meshGradientXml, 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, usePointerContext, 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 };
|
|
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 };
|