@weasel-js/core 1.5.0 → 1.5.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 +363 -0
- package/dist/autoPoseDescriptor-Dr6CwNZK.d.ts +26 -0
- package/dist/{chunk-UCPV7JXC.js → chunk-3LPQ2XZG.js} +4 -159
- package/dist/chunk-3LPQ2XZG.js.map +1 -0
- package/dist/{chunk-MG7OXCAI.js → chunk-GREL4MVO.js} +2276 -1485
- package/dist/chunk-GREL4MVO.js.map +1 -0
- package/dist/chunk-HAGOFNP5.js +162 -0
- package/dist/chunk-HAGOFNP5.js.map +1 -0
- package/dist/chunk-LXJDWBEL.js +318 -0
- package/dist/chunk-LXJDWBEL.js.map +1 -0
- package/dist/{chunk-BDWAA634.js → chunk-P6MGECVO.js} +3 -3
- package/dist/{chunk-BDWAA634.js.map → chunk-P6MGECVO.js.map} +1 -1
- package/dist/{chunk-MQI4PIX3.js → chunk-XXQ6FLCJ.js} +3 -3
- package/dist/{chunk-MQI4PIX3.js.map → chunk-XXQ6FLCJ.js.map} +1 -1
- package/dist/clipboard.d.ts +1 -1
- package/dist/clone.d.ts +2 -2
- package/dist/{depSchema-nMqj_qTM.d.ts → depSchema-BubKMv-2.d.ts} +67 -78
- package/dist/{grid-BrIa38gG.d.ts → grid-Z_Af3vTl.d.ts} +1 -1
- package/dist/index.d.ts +647 -382
- package/dist/index.js +6 -4
- package/dist/insert.d.ts +3 -3
- package/dist/insert.js +2 -1
- package/dist/insert.js.map +1 -1
- package/dist/math-E3rZn4bR.d.ts +282 -0
- package/dist/math.d.ts +5 -0
- package/dist/math.js +4 -0
- package/dist/math.js.map +1 -0
- package/dist/move.d.ts +4 -4
- package/dist/move.js +3 -2
- package/dist/move.js.map +1 -1
- package/dist/{options-BDyCnrp8.d.ts → options-BPcmwYk7.d.ts} +1 -1
- package/dist/{autoPoseDescriptor-CvjflWJK.d.ts → pointSnapToGrid-CgcK2R_I.d.ts} +2 -26
- package/dist/{poseDescriptor-CGOgIgf8.d.ts → poseDescriptor-PgfVKfa0.d.ts} +1 -1
- package/dist/renderer.d.ts +5 -6
- package/dist/renderer.js +6 -4
- package/dist/resize.d.ts +5 -4
- package/dist/resize.js +3 -2
- package/dist/{types-DMyo7dnM.d.ts → types-BHGdrOcu.d.ts} +1 -1
- package/dist/{types-DtjCJA5r.d.ts → types-BdaK9PcP.d.ts} +1 -1
- package/package.json +14 -10
- package/dist/chunk-MG7OXCAI.js.map +0 -1
- package/dist/chunk-UCPV7JXC.js.map +0 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,37 +1,40 @@
|
|
|
1
1
|
import * as React$1 from 'react';
|
|
2
|
-
import React__default, { RefObject, ReactNode, Ref, MouseEvent, ComponentType
|
|
3
|
-
import { a as UnitValue, b as UnitSystem, c 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, f as formatUnit, g as gridSnapStrategy, p as pointToGridCell, r as resolveUnit } from './grid-
|
|
2
|
+
import React__default, { RefObject, ReactNode, Ref, MutableRefObject, MouseEvent, ComponentType } from 'react';
|
|
3
|
+
import { a as UnitValue, b as UnitSystem, c as Unit, U as UseMoveOptions, O as OriginProjection } from './grid-Z_Af3vTl.js';
|
|
4
|
+
export { A as ANGLE_RADIANS, I as IMPERIAL_INCHES, M as METRIC_MM, P as PIXELS, R as RECT_ORIGIN_PROJECTION, f as formatUnit, g as gridSnapStrategy, p as pointToGridCell, r as resolveUnit } from './grid-Z_Af3vTl.js';
|
|
5
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, HitShape, HandleKind, DebugSink, ToolKeybinding, HotkeyTrigger, RuleCtx, Rule, IngestItem, OngoingOverlay, ActionsProp, OverlayRole, ResizeAnchor } from '@weasel-js/routing';
|
|
6
6
|
export { ALWAYS, Action, ActionDeps, ActionDisabledReason, ActionDispatch, ActionEnabledResult, ActionEntry, ActionPresentation, 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, View, actionBindings, buildRuleCtx, clientToCanvas, createDispatcher, deleteScratch, describeRule, evaluate, evaluateEnabled, getScratch, isEditableTarget, liveScope, matchesKeyBinding, mergeContributions, openPointerSession, resolveDeviceProfile, resolveParams, scopeBindings, scratchKey, setScratch, specificity } from '@weasel-js/routing';
|
|
7
|
-
import { FillStyle, Stroke, TextureHandle, TilePatternSpec, GradientKind, GradStop, GradientFill,
|
|
8
|
-
export { FillStyle, GradStop, GradientFill, GradientKind, GradientUnits, KitMarkerKey, MarkerKey, MarkerRef, Region, STROKE_DASH_RATIOS, Stroke, StrokeAlign, StrokeDashStyle, TextureHandle, TilePatternSpec, alignedStrokeRect, dashForStrokeStyle, strokeDashStyleOf } from '@weasel-js/paint';
|
|
9
|
-
import { D as DrawCommand, E as Effect,
|
|
10
|
-
export {
|
|
7
|
+
import { FillStyle, Stroke, TextureHandle, GradientUnits, ColorSpace, TilePatternSpec, GradientKind, GradStop, GradientFill, MarkerKey, MarkerRef } from '@weasel-js/paint';
|
|
8
|
+
export { ColorSpace, FillStyle, GradStop, GradientFill, GradientKind, GradientUnits, KitMarkerKey, MarkerKey, MarkerRef, Region, STROKE_DASH_RATIOS, ScreenLength, Stroke, StrokeAlign, StrokeDashStyle, TextureHandle, TilePatternSpec, alignedStrokeRect, dashForStrokeStyle, lerpColorArray, lerpOklab, lerpOklch, oklabToOklch, oklabToSrgbU8, oklchToOklab, resolveScreenLength, srgbU8ToOklab, strokeDashStyleOf } from '@weasel-js/paint';
|
|
9
|
+
import { D as DrawCommand, E as Effect, w as Scene, x as RectPose, y as InertiaConfig, z as ViewAnimationOptions, N as Node$1, A as PoseComposition, B as SliceDep, F as VertexColorChannel, f as ShaderProgramHandle, H as InsertExtras, J as SerializedScene, K as GeometryProjection, L as ContentHandlerEntry, O as SvgIngestOptions, Q as PanBounds, U as Animator, X as ColorOverrideRegistry, Y as UseSceneOptions, Z as SceneRegistry, _ as RegisteredOp, $ as PoseOverrides, a0 as DerivedDep, a1 as ViewportDims, P as PathDrawCommand, T as TextDrawCommand, a2 as ShaderProgram, c as Mat3$1, a3 as BooleansAdapter, a4 as UseAnimatorOptions, a5 as SpringPresetName, a6 as EasingSpec, a7 as AnimationHandle, a8 as SampledTrack } from './depSchema-BubKMv-2.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, G as GroupDrawCommand, av as IDENTITY_POSE_COMPOSITION, a as ImageDrawCommand, b 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 PoseAdapter, aN as PoseClosure, aO as PoseOverride, aP as RECT_POSE_COMPOSITION, aQ as RIGID_POSE_COMPOSITION, R as RenderTarget, aR as ResizePolicy, aS as SPRING_PRESETS, S as SPRITE_STRIDE, aT as SerializedNode, e as ShaderDrawCommand, g as ShaderUniform, aU as SnapDep, aV as SpringOptions, aW as SpringPreset, i as SpriteSheet, j as SpritesDrawCommand, aX as StaggerBuilder, aY as StaggerDelay, aZ as StaggerFactory, a_ as StaggerOptions, a$ as StaggerPerItem, b0 as StaggerSpringPoseOptions, b1 as StaggerTweenOptions, b2 as SvgUnpacker, b3 as SystemLayerRecord, b4 as SystemLayerSpec, b5 as TextEditDep, b6 as TimelineClock, b7 as TimelineEvent, b8 as TimelineHandle, b9 as TimelineOptions, ba as TimelineTrack, bb as Track, bc as TweenLoopOptions, bd as TweenOptions, be as UserLayerRecord, bf as VIEW_ANIMATION_KEY, bg as ViewAnimationApi, bh as ViewApi, bi as ViewChannel, bj as applyBooleanOp, bk as asNodeId, m as blur, bl as composeRectPose, bm as composeRigidPose, bn as composeWorldPose, bo as cubicBezierEasing, o as cullDrawCommands, bp as decomposeRectPose, bq as decomposeRigidPose, br as easeIn, bs as easeInBack, bt as easeInBounce, bu as easeInCirc, bv as easeInCubic, bw as easeInElastic, bx as easeInExpo, by as easeInOut, bz as easeInOutBack, bA as easeInOutBounce, bB as easeInOutCirc, bC as easeInOutCubic, bD as easeInOutElastic, bE as easeInOutExpo, bF as easeInOutQuad, bG as easeInOutQuart, bH as easeInOutQuint, bI as easeInOutSine, bJ as easeInQuad, bK as easeInQuart, bL as easeInQuint, bM as easeInSine, bN as easeOut, bO as easeOutBack, bP as easeOutBounce, bQ as easeOutCirc, bR as easeOutCubic, bS as easeOutElastic, bT as easeOutExpo, bU as easeOutQuad, bV as easeOutQuart, bW as easeOutQuint, bX as easeOutSine, bY as fitViewToBounds, p as frameRect, bZ as linear, q as mat3, b_ as rebaseLocalPose, b$ as registerContentHandler, r as registerEffect, c0 as resolveEasing, c1 as resolveStrokeWidth, c2 as translateRectPose, c3 as useDecayLoop, c4 as useViewAnimation, c5 as useViewAnimationOn, v as viewToMat3, u as vignette, c6 as worldPoseLookup } from './depSchema-BubKMv-2.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, TargetSpec, WheelSpec } from '@weasel-js/gestures';
|
|
15
|
+
import { S as SimulationNode, U as UseSimulationOptions, a as Simulation, V as Vec2, P as PathBuilder } from './math-E3rZn4bR.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-E3rZn4bR.js';
|
|
15
17
|
import { ToolsApi as ToolsApi$1, UseToolsOptions as UseToolsOptions$1 } from '@weasel-js/routing/react';
|
|
16
|
-
export { ActionsProvider, ActionsScope, ActiveToolContextProvider, ActiveToolContextProviderIfRoot, ActiveToolContextProviderProps, ActiveToolContextValue, DepRegistry, DepRegistryProvider, UseGestureDispatcherOptions, useAction, useActionsRegistry, useActiveToolContext, useDepRegistry, useDepSource, useGestureDispatcher, useOptionalActiveToolContext, useOptionalDepRegistry } from '@weasel-js/routing/react';
|
|
17
|
-
import { B as BoundsConstraint, P as PointSnapBehavior, L as LassoSelectBehavior, R as RotateBehavior, S as SnapStrategy, M as MoveBehavior, I as InsertBehavior } from './types-
|
|
18
|
-
export { A as ActionBehavior, b as AreaSelectOverlay, c as BehaviorMoveResult, d as BehaviorResult, C as CloneBehavior, e as CloneLayer, f as ClonePose, G as GestureContext, g as GroupTransform, h as InsertMoveResult, i as InsertOverlay, j as InsertPoint, k as InsertProposed, l as LassoSelectMoveResult, m as LassoSelectOverlay, n as LassoSelectPose, o as LassoSelectProposed, p as PointSnapContext, a as PointSnapFrame, q as PointSnapResult, r as PointerState, s as ResizeMoveResult, t as ResizeOverlay, u as ResizeProposed, v as RotateMoveResult, w as RotateOverlay, x as RotateProposed } from './types-
|
|
19
|
-
import { P as PoseDescriptor, c as PolygonPath, a as Path, d as RotatedPose, e as
|
|
20
|
-
export { R as RECT_POSE_DESCRIPTOR, b as ROTATED_POSE_DESCRIPTOR, p as poseDescriptorForNode, t as translatePoseViaDescriptor, v as visualBoundsViaDescriptor } from './poseDescriptor-
|
|
21
|
-
import { U as UseResizeOptions } from './
|
|
22
|
-
export {
|
|
23
|
-
import { M as MoveAdapter, A as AreaSelectAdapter,
|
|
24
|
-
export { g as ContainerBounds, D as DropTarget, h as LayoutChild, i as LayoutContainer, j as LayoutDragged, S as SnapTarget } from './types-
|
|
18
|
+
export { ActionsProvider, ActionsScope, ActiveToolContextProvider, ActiveToolContextProviderIfRoot, ActiveToolContextProviderProps, ActiveToolContextValue, DepRegistry, DepRegistryProvider, DispatcherChannels, UseGestureDispatcherOptions, useAction, useActionsRegistry, useActiveToolContext, useDepRegistry, useDepSource, useGestureDispatcher, useOptionalActiveToolContext, useOptionalDepRegistry } from '@weasel-js/routing/react';
|
|
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-BHGdrOcu.js';
|
|
20
|
+
export { A as ActionBehavior, b as AreaSelectOverlay, c as BehaviorMoveResult, d as BehaviorResult, C as CloneBehavior, e as CloneLayer, f as ClonePose, G as GestureContext, g as GroupTransform, h as InsertMoveResult, i as InsertOverlay, j as InsertPoint, k as InsertProposed, l as LassoSelectMoveResult, m as LassoSelectOverlay, n as LassoSelectPose, o as LassoSelectProposed, p as PointSnapContext, a as PointSnapFrame, q as PointSnapResult, r as PointerState, s as ResizeMoveResult, t as ResizeOverlay, u as ResizeProposed, v as RotateMoveResult, w as RotateOverlay, x as RotateProposed } from './types-BHGdrOcu.js';
|
|
21
|
+
import { P as PoseDescriptor, c as PolygonPath, a as Path, d as RotatedPose, e as RectPath } from './poseDescriptor-PgfVKfa0.js';
|
|
22
|
+
export { f as PathFillRule, R as RECT_POSE_DESCRIPTOR, b as ROTATED_POSE_DESCRIPTOR, p as poseDescriptorForNode, t as translatePoseViaDescriptor, v as visualBoundsViaDescriptor } from './poseDescriptor-PgfVKfa0.js';
|
|
23
|
+
import { U as UseResizeOptions } from './pointSnapToGrid-CgcK2R_I.js';
|
|
24
|
+
export { C as CORNER_ANCHORS, a as CornerAnchor, e as CornerEdge, b as CornerHandle, c as cornerPoint, d as cornerResizeHandles, h as hitCornerHandle, p as pointSnapToGrid } from './pointSnapToGrid-CgcK2R_I.js';
|
|
25
|
+
import { M as MoveAdapter, A as AreaSelectAdapter, b as LassoHitMode, c as LassoSelectAdapter, R as ResizeAdapter, d as RotateAdapter, L as LayoutStrategy, e as LayerEnumerableAdapter, I as InsertAdapter, C as ClipboardSnapshot, O as OrderedAdapter, a as SceneAdapter, f as LayoutSnap } from './types-BdaK9PcP.js';
|
|
26
|
+
export { g as ContainerBounds, D as DropTarget, h as LayoutChild, i as LayoutContainer, j as LayoutDragged, S as SnapTarget } from './types-BdaK9PcP.js';
|
|
25
27
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
26
28
|
import { Op, HistorySelection, CreateHistoryOptions, History } from '@weasel-js/history';
|
|
27
29
|
export * from '@weasel-js/history';
|
|
28
30
|
export { Op } from '@weasel-js/history';
|
|
29
31
|
import { PlacementAlign, Rect, Mat3 } from '@weasel-js/geom';
|
|
30
32
|
export { DEFAULT_FLATTEN_TOLERANCE, PATH_C, PATH_CMD_LENGTHS, PATH_L, PATH_M, PATH_Q, PATH_Z, Rect, flattenCubic, flattenCubicWithArcLen, flattenQuadratic, flattenQuadraticWithArcLen, pathCommandCoordCount } from '@weasel-js/geom';
|
|
31
|
-
import { TextRenderer, TextPose, StyledRun, TextStyle,
|
|
33
|
+
import { TextRenderer, TextPose, StyledRun, TextStyle, TextVerticalAlign, TextPaint } from '@weasel-js/text';
|
|
32
34
|
export { DEFAULT_TEXT_STYLE, LaidOutDecoration, LaidOutGroup, LaidOutLineBox, LaidOutOutlineGlyph, LaidOutQuad, LaidOutRuns, LayoutLine, LayoutResult, LayoutRunsOpts, MARKDOWN_RUN_GRAMMAR, MarkdownFontOptions, MeasureFn, MeasureTextBoundsOpts, MeasuredText, PositionedRun, ResolvedRun, ResolvedTextStyle, RunFlag, RunGrammar, RunMarker, SCRIPT_METRICS, StyledRun, TextAlign, TextDirection, TextLineBoxesOpts, TextPaint, TextPose, TextPoseLayout, TextPoseLayoutInput, TextRenderer, TextStyle, TextVerticalAlign, cachedLayoutRuns, createMarkdownRenderer, fontString, layoutMarkdown, layoutRuns, layoutTextPose, markdownToRuns, measureText, measureTextBounds, measuredWidth, resolveAlign, resolveRuns, resolveTextStyle, runsToMarkdown, runsToPlainText, textLineBoxes, textPoseLayoutInput, toRuns, verticalAlignOffset } from '@weasel-js/text';
|
|
33
35
|
import { G as Guide } from './types-D2tTKEU0.js';
|
|
34
|
-
export {
|
|
36
|
+
export { A as AUTO_POSE_DESCRIPTOR, i as isPathLike, a as isRectPose } from './autoPoseDescriptor-Dr6CwNZK.js';
|
|
37
|
+
export { U as UseInsertOptions } from './options-BPcmwYk7.js';
|
|
35
38
|
export { UseClipboardOpsOptions, UseClipboardOpsReturn, WEASEL_CLIPBOARD_MIME, WEASEL_CLIPBOARD_MIME_WEB, buildWeaselClipboardText, embedWeaselMetadataInSvg, extractWeaselClipboardFromSvg, parseWeaselClipboardText, sniffWeaselClipboardText, useClipboardOps } from './clipboard.js';
|
|
36
39
|
export { cloneByAltDrag } from './clone.js';
|
|
37
40
|
export { FontVariant, LocalFontOutlinesResult, OutlineFontStyle, OutlineSource, OutlineStatus, OutlineVariant, canQueryLocalFonts, enableLocalFontOutlines, hasFontOutlines, isCanvasFont, listFontOutlines, outlineStatus, registerCanvasFont, registerFont, registerFontOutlines, subscribeGlyphReady, unregisterCanvasFont, unregisterFontOutlines } from '@weasel-js/font';
|
|
@@ -464,7 +467,15 @@ interface LayerDrawFailure {
|
|
|
464
467
|
interface LayerGroup {
|
|
465
468
|
/** Names the group in warnings; not a layer id and never drawn. */
|
|
466
469
|
id: string;
|
|
467
|
-
/**
|
|
470
|
+
/**
|
|
471
|
+
* Member layer ids. Order here is ignored — the render order decides.
|
|
472
|
+
*
|
|
473
|
+
* A name claims that layer and every layer under it in the `:` namespace, so
|
|
474
|
+
* `'scene'` covers the `scene:<layerId>` layers a scene with declared layers
|
|
475
|
+
* draws as — the same set `before`/`after: 'scene'` anchors against. The
|
|
476
|
+
* separator is required: `'scene'` does not reach `scenery`. A name matching
|
|
477
|
+
* no layer being drawn is warned about rather than ignored.
|
|
478
|
+
*/
|
|
468
479
|
layers: readonly string[];
|
|
469
480
|
/**
|
|
470
481
|
* Passes over the group's combined pixels, in order. A thunk is re-read on
|
|
@@ -989,128 +1000,87 @@ interface CreateParallaxLayerOpts<TData> extends ParallaxOpts {
|
|
|
989
1000
|
declare function createParallaxLayer<TData>(opts: CreateParallaxLayerOpts<TData>): RenderLayer<TData>;
|
|
990
1001
|
|
|
991
1002
|
/**
|
|
992
|
-
*
|
|
993
|
-
*
|
|
1003
|
+
* Which copies of a periodic lattice a visible range touches.
|
|
1004
|
+
*
|
|
1005
|
+
* A tiled layer's content is authored once, in the cell `[0, period)`, and the
|
|
1006
|
+
* lattice repeats it at every multiple of `period`. This answers the only
|
|
1007
|
+
* question drawing it needs: the integer copies `k` whose cell overlaps
|
|
1008
|
+
* `[visStart, visEnd]`. Copy `k` draws the authored content shifted by
|
|
1009
|
+
* `k * period`.
|
|
994
1010
|
*
|
|
995
|
-
*
|
|
1011
|
+
* `bleed` is how far the content reaches outside its own cell, in world
|
|
1012
|
+
* units — the printing term, and the same idea. Content that overhangs by
|
|
1013
|
+
* more than it declares pops in at the edge of the view instead of scrolling
|
|
1014
|
+
* in.
|
|
996
1015
|
*/
|
|
997
|
-
interface
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
/** Pin x to this value when non-null. The integrator skips x/vx for the node. */
|
|
1003
|
-
fx?: number | null;
|
|
1004
|
-
fy?: number | null;
|
|
1005
|
-
/** Array index, written by `initialize`. Some forces (e.g. forceLink) rely on it. */
|
|
1006
|
-
index?: number;
|
|
1016
|
+
interface TileRange {
|
|
1017
|
+
/** First copy index, inclusive. */
|
|
1018
|
+
from: number;
|
|
1019
|
+
/** Last copy index, inclusive. `to < from` means nothing is visible. */
|
|
1020
|
+
to: number;
|
|
1007
1021
|
}
|
|
1022
|
+
declare function tiledProject(visStart: number, visEnd: number, period: number, bleed?: number): TileRange;
|
|
1023
|
+
|
|
1008
1024
|
/**
|
|
1009
|
-
*
|
|
1010
|
-
*
|
|
1011
|
-
*
|
|
1025
|
+
* How far apart the copies sit, in world units. A bare number wraps the x
|
|
1026
|
+
* axis only — the side-scrolling backdrop this is usually reached for.
|
|
1027
|
+
* `{ x, y }` wraps both; naming one key wraps that axis alone.
|
|
1028
|
+
*
|
|
1029
|
+
* The period names the axes, so there is no separate `axis` option: two ways
|
|
1030
|
+
* to say which axes wrap is one way for them to disagree.
|
|
1012
1031
|
*/
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
}
|
|
1017
|
-
/**
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1032
|
+
type TilePeriod = number | {
|
|
1033
|
+
x?: number;
|
|
1034
|
+
y?: number;
|
|
1035
|
+
};
|
|
1036
|
+
/** How far the content reaches outside its own cell, in world units. */
|
|
1037
|
+
type TileBleed = number | {
|
|
1038
|
+
x?: number;
|
|
1039
|
+
y?: number;
|
|
1040
|
+
};
|
|
1041
|
+
/** Options for {@link createTiledLayer}. */
|
|
1042
|
+
interface CreateTiledLayerOpts<TData> {
|
|
1043
|
+
id: string;
|
|
1044
|
+
label: string;
|
|
1045
|
+
/** Layers redrawn once per visible copy. */
|
|
1046
|
+
source: RenderLayer<TData>[];
|
|
1047
|
+
/**
|
|
1048
|
+
* The lattice. A function is read per draw, so the period can follow the
|
|
1049
|
+
* camera or the canvas — "one screen wide" is a period, not a constant.
|
|
1050
|
+
*/
|
|
1051
|
+
period: TilePeriod | ((view: View, dims: Dims) => TilePeriod);
|
|
1052
|
+
/**
|
|
1053
|
+
* How far the source's content reaches outside the cell `[0, period)`, in
|
|
1054
|
+
* world units. Content that overhangs by more than it declares pops in at
|
|
1055
|
+
* the edge of the view instead of scrolling in. Default 0.
|
|
1056
|
+
*/
|
|
1057
|
+
bleed?: TileBleed;
|
|
1027
1058
|
}
|
|
1028
1059
|
/**
|
|
1029
|
-
*
|
|
1030
|
-
*
|
|
1031
|
-
*
|
|
1032
|
-
*
|
|
1033
|
-
*
|
|
1034
|
-
*
|
|
1035
|
-
*
|
|
1036
|
-
*
|
|
1037
|
-
*
|
|
1038
|
-
*
|
|
1039
|
-
*
|
|
1040
|
-
*
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
alphaDecay(value: number): this;
|
|
1052
|
-
alphaMin(): number;
|
|
1053
|
-
alphaMin(value: number): this;
|
|
1054
|
-
velocityDecay(): number;
|
|
1055
|
-
velocityDecay(value: number): this;
|
|
1056
|
-
/**
|
|
1057
|
-
* Run the tick body synchronously `iterations` times. Does NOT fire
|
|
1058
|
-
* onTick or onEnd (matches d3-force). Used for offscreen pre-warm and tests.
|
|
1059
|
-
*/
|
|
1060
|
-
tick(iterations?: number): this;
|
|
1061
|
-
isSettled(): boolean;
|
|
1062
|
-
}
|
|
1063
|
-
/** A {@link SimulationCore} running on a frame loop. */
|
|
1064
|
-
interface Simulation<TNode extends SimulationNode> extends SimulationCore<TNode> {
|
|
1065
|
-
/** Resume the RAF loop. If alpha < alphaMin, reset alpha to 1. */
|
|
1066
|
-
restart(): this;
|
|
1067
|
-
/** Cancel the RAF loop. Does not change alpha. */
|
|
1068
|
-
stop(): this;
|
|
1069
|
-
}
|
|
1070
|
-
/** What {@link SimulationCore} needs: the nodes, the forces acting on them,
|
|
1071
|
-
* and the cooling schedule. {@link UseSimulationOptions} adds the loop's. */
|
|
1072
|
-
interface SimulationOptions<TNode extends SimulationNode> {
|
|
1073
|
-
/** Mutable array of nodes. Kit + forces mutate vx/vy/x/y in place. */
|
|
1074
|
-
nodes: TNode[];
|
|
1075
|
-
/** Forces applied per tick. Each may implement `initialize` for setup. */
|
|
1076
|
-
forces?: SimulationForce<TNode>[];
|
|
1077
|
-
/** Initial alpha. Default 1. */
|
|
1078
|
-
alpha?: number;
|
|
1079
|
-
/** Settle threshold. When alpha drops below and alphaTarget is 0, onEnd fires. Default 0.001. */
|
|
1080
|
-
alphaMin?: number;
|
|
1081
|
-
/** Per-tick decay rate toward alphaTarget. Default 1 - 0.001^(1/300) ≈ 0.0228. */
|
|
1082
|
-
alphaDecay?: number;
|
|
1083
|
-
/** Target alpha. Set above alphaMin to keep sim warm (e.g. during drag). Default 0. */
|
|
1084
|
-
alphaTarget?: number;
|
|
1085
|
-
/** Friction multiplier on velocity per tick: vx *= (1 - velocityDecay). Default 0.4. */
|
|
1086
|
-
velocityDecay?: number;
|
|
1087
|
-
/** Handed to each force's `initialize`. Default `Math.random`; pass a seeded
|
|
1088
|
-
* source to make a run reproducible. */
|
|
1089
|
-
random?: () => number;
|
|
1090
|
-
}
|
|
1091
|
-
/** Default alpha decay: such that alpha drops from 1 to alphaMin (0.001) in 300 ticks. */
|
|
1092
|
-
declare const DEFAULT_ALPHA_DECAY: number;
|
|
1093
|
-
/** Alpha below which a cooling simulation is considered settled. */
|
|
1094
|
-
declare const DEFAULT_ALPHA_MIN = 0.001;
|
|
1095
|
-
/** Fraction of velocity shed each tick — friction. Higher settles sooner and
|
|
1096
|
-
* overshoots less. */
|
|
1097
|
-
declare const DEFAULT_VELOCITY_DECAY = 0.4;
|
|
1098
|
-
|
|
1099
|
-
/**
|
|
1100
|
-
* The integrator, with no clock attached.
|
|
1101
|
-
*
|
|
1102
|
-
* Velocity-Verlet over a pluggable force list, contract-compatible with
|
|
1103
|
-
* d3-force so d3's own bundled forces drop in untranslated. Nothing here
|
|
1104
|
-
* advances time: `tick()` is the only thing that moves a node, and the caller
|
|
1105
|
-
* decides how often to call it. `useSimulation` calls it once a frame; a
|
|
1106
|
-
* layout pass calls it a few hundred times in one go and reads the result.
|
|
1107
|
-
*
|
|
1108
|
-
* Splitting it out is what lets a *pure* function run a relaxation — a React
|
|
1109
|
-
* hook cannot, and the alternative was a second integrator drifting away from
|
|
1110
|
-
* this one.
|
|
1060
|
+
* Wrap source RenderLayers in a periodic lattice: the content is authored
|
|
1061
|
+
* once, in the cell `[0, period)`, and every copy of it the view can see is
|
|
1062
|
+
* drawn. Panning in either direction keeps producing copies, so the content
|
|
1063
|
+
* loops seamlessly with no state and no wrap-around bookkeeping.
|
|
1064
|
+
*
|
|
1065
|
+
* Each copy draws the source through a view shifted by `-k * period`, so a
|
|
1066
|
+
* source that culls against the view it is handed culls per copy and never
|
|
1067
|
+
* learns it is being tiled. The copy's commands are then translated by
|
|
1068
|
+
* `+k * period` in world space.
|
|
1069
|
+
*
|
|
1070
|
+
* The lattice is per layer, not per shape. Content on two different periods
|
|
1071
|
+
* is two tiled layers stacked, which keeps each source ignorant of the other
|
|
1072
|
+
* — a per-shape period would move the lattice into the source and make the
|
|
1073
|
+
* wrapper unable to cull.
|
|
1074
|
+
*
|
|
1075
|
+
* The plane is `space: 'world'`, which is what lets it be a `source` of
|
|
1076
|
+
* `createParallaxLayer`: the parallax plane hands it the derived inner view,
|
|
1077
|
+
* the lattice resolves against that, and the copies ride the plane.
|
|
1078
|
+
*
|
|
1079
|
+
* **A `space: 'screen'` source is drawn once, untiled** — it ignores the view
|
|
1080
|
+
* by definition, so every copy would land on top of the last. Same constraint
|
|
1081
|
+
* `createParallaxLayer` carries.
|
|
1111
1082
|
*/
|
|
1112
|
-
|
|
1113
|
-
declare function createSimulation<TNode extends SimulationNode>(opts: SimulationOptions<TNode>): SimulationCore<TNode>;
|
|
1083
|
+
declare function createTiledLayer<TData>(opts: CreateTiledLayerOpts<TData>): RenderLayer<TData>;
|
|
1114
1084
|
|
|
1115
1085
|
/**
|
|
1116
1086
|
* Continuous N-body simulation primitive: `createSimulation`'s integrator on a
|
|
@@ -1753,6 +1723,66 @@ declare function computeFitViewport(viewportW: number, viewportH: number, conten
|
|
|
1753
1723
|
*/
|
|
1754
1724
|
declare function useAutoCenter(width: number, height: number, contentW: number, contentH: number, setZoom: (z: number) => void, setPan: (x: number, y: number) => void): void;
|
|
1755
1725
|
|
|
1726
|
+
/**
|
|
1727
|
+
* Which physical keys are down right now — the poll a game loop or character
|
|
1728
|
+
* controller reads each step. This is raw input state, not routing: it sees
|
|
1729
|
+
* every key whether or not a binding claims it, and a binding claiming a key
|
|
1730
|
+
* does not hide it from here.
|
|
1731
|
+
*/
|
|
1732
|
+
interface KeyModifiers {
|
|
1733
|
+
shift: boolean;
|
|
1734
|
+
ctrl: boolean;
|
|
1735
|
+
alt: boolean;
|
|
1736
|
+
meta: boolean;
|
|
1737
|
+
}
|
|
1738
|
+
interface KeyStateAttachOptions {
|
|
1739
|
+
/** Ignore presses whose target is an input, textarea or contenteditable
|
|
1740
|
+
* element. Their releases are always taken. Default `true`. */
|
|
1741
|
+
skipInEditable?: boolean;
|
|
1742
|
+
/** `KeyboardEvent.code`s whose keydown and keyup have their default
|
|
1743
|
+
* prevented — the keys a game owns, so Space and the arrows stop scrolling
|
|
1744
|
+
* the page. */
|
|
1745
|
+
preventDefault?: readonly string[];
|
|
1746
|
+
}
|
|
1747
|
+
interface KeyState {
|
|
1748
|
+
/** Whether any of these physical keys, by `KeyboardEvent.code`
|
|
1749
|
+
* (`'KeyA'`, `'Space'`, `'ArrowLeft'`), is down. Codes name positions, so
|
|
1750
|
+
* WASD stays in place on any layout. */
|
|
1751
|
+
isDown(code: string | readonly string[]): boolean;
|
|
1752
|
+
/** Whether a key down produced any of these `KeyboardEvent.key` values when
|
|
1753
|
+
* it was pressed. Single characters compare case-insensitively. */
|
|
1754
|
+
isKeyDown(key: string | readonly string[]): boolean;
|
|
1755
|
+
/** Whether any of these codes was freshly pressed since it was last taken;
|
|
1756
|
+
* clears them. Autorepeat is not a press. A press is taken once, so two
|
|
1757
|
+
* readers of the same code see it once between them. */
|
|
1758
|
+
take(code: string | readonly string[]): boolean;
|
|
1759
|
+
/** Every code down. The set is live — copy it to keep it. */
|
|
1760
|
+
codes(): ReadonlySet<string>;
|
|
1761
|
+
modifiers(): KeyModifiers;
|
|
1762
|
+
/** Called on every change of what is down. Returns the unsubscribe. */
|
|
1763
|
+
subscribe(listener: () => void): () => void;
|
|
1764
|
+
/** Mark everything up and drop untaken presses. */
|
|
1765
|
+
release(): void;
|
|
1766
|
+
/**
|
|
1767
|
+
* Listen on `target` — `window`, or an element whose subtree has focus.
|
|
1768
|
+
* Everything is released when the keyups can no longer arrive: the window
|
|
1769
|
+
* blurs, the document hides, focus leaves an element target, or Meta is
|
|
1770
|
+
* released (macOS delivers no keyup for a key released while Cmd is held).
|
|
1771
|
+
* Returns the detach, which also releases.
|
|
1772
|
+
*/
|
|
1773
|
+
attach(target: Window | HTMLElement, options?: KeyStateAttachOptions): () => void;
|
|
1774
|
+
}
|
|
1775
|
+
declare function createKeyState(): KeyState;
|
|
1776
|
+
|
|
1777
|
+
interface UseKeyStateOptions extends KeyStateAttachOptions {
|
|
1778
|
+
/** Scope the poll to keys typed while focus is inside this element — a
|
|
1779
|
+
* canvas host, say. Omit it to poll the whole window. */
|
|
1780
|
+
target?: RefObject<HTMLElement | null>;
|
|
1781
|
+
}
|
|
1782
|
+
/** A {@link KeyState} attached for the component's lifetime. Its identity is
|
|
1783
|
+
* stable; read it from a frame loop rather than rendering from it. */
|
|
1784
|
+
declare function useKeyState(options?: UseKeyStateOptions): KeyState;
|
|
1785
|
+
|
|
1756
1786
|
/**
|
|
1757
1787
|
* Project an action's keyboard bindings into the shape a shortcut chip
|
|
1758
1788
|
* renders from (`formatShortcut` / `formatShortcutParts` in
|
|
@@ -2678,8 +2708,6 @@ interface UseStandardActionsOptions {
|
|
|
2678
2708
|
scene?: DepSchema['scene'];
|
|
2679
2709
|
/** Undo/redo history bound to the current scene. */
|
|
2680
2710
|
history?: DepSchema['history'];
|
|
2681
|
-
/** Canvas pointer position in world space. */
|
|
2682
|
-
pointer?: DepSchema['pointer'];
|
|
2683
2711
|
/** Currently active tool id + hotkey-hold stack. */
|
|
2684
2712
|
activeTool?: DepSchema['activeTool'];
|
|
2685
2713
|
/**
|
|
@@ -3365,7 +3393,7 @@ interface UseSelectToolOptions<TPose> {
|
|
|
3365
3393
|
reparentOnDrop?: 'off' | 'top' | 'above';
|
|
3366
3394
|
}
|
|
3367
3395
|
/** Intersection of the move + area-select adapter interfaces.
|
|
3368
|
-
* Resize
|
|
3396
|
+
* Resize and rotate run through `resizeAction` / `rotateAction`. */
|
|
3369
3397
|
type SelectAdapter<TNode extends {
|
|
3370
3398
|
id: string;
|
|
3371
3399
|
}, TPose> = MoveAdapter<TNode, TPose> & AreaSelectAdapter;
|
|
@@ -3384,53 +3412,6 @@ declare function useSelectTool<TNode extends {
|
|
|
3384
3412
|
id: string;
|
|
3385
3413
|
}, TPose>(adapter: SelectAdapter<TNode, TPose>, options: UseSelectToolOptions<TPose>): Tool<null>;
|
|
3386
3414
|
|
|
3387
|
-
/** Options for `useRotateTool` — mostly the placement of the rotation
|
|
3388
|
-
* handle's hover band. */
|
|
3389
|
-
interface UseRotateToolOptions<TNode extends {
|
|
3390
|
-
id: string;
|
|
3391
|
-
}, _TPose> {
|
|
3392
|
-
/** Legacy `useRotate` options surface. Ignored now —
|
|
3393
|
-
* rotation flows through `rotateAction`, whose option surface is
|
|
3394
|
-
* configured at the action-registration level. Kept on the type for
|
|
3395
|
-
* backwards-compat with consumers (notably `SceneCanvas`'s
|
|
3396
|
-
* `rotateOptions`) that still pass a value. */
|
|
3397
|
-
rotate?: unknown;
|
|
3398
|
-
/** Minimum thickness of the rotate band outside the selection AABB, in
|
|
3399
|
-
* screen px. Defaults to {@link ROTATION_HANDLE_BASE_PX}; `<SceneCanvas>`
|
|
3400
|
-
* passes the device-scaled value. */
|
|
3401
|
-
rotationHandleDistance?: number;
|
|
3402
|
-
/** World-space bounds lookup. Required for the rotation affordance hit-test
|
|
3403
|
-
* in consumers that wire a `boundsOf` source separately from the
|
|
3404
|
-
* ChromeState-driven affordance pipeline. Retained for parity with
|
|
3405
|
-
* `useResizeTool`; the rotation affordance itself reads bounds via the
|
|
3406
|
-
* dispatcher-supplied ChromeState. */
|
|
3407
|
-
boundsOf?: (id: string) => Bounds | null;
|
|
3408
|
-
/** Live selection ids — retained for parity with `useResizeTool` /
|
|
3409
|
-
* `useSelectTool` option surfaces. The dispatcher-path `rotateAction`
|
|
3410
|
-
* reads selection from its own `InvocationCtx`, so this tool no longer
|
|
3411
|
-
* forwards selection into the rotation gesture itself. */
|
|
3412
|
-
getSelection?: () => string[];
|
|
3413
|
-
/** Node lookup — retained for parity with `useSelectTool` and for future
|
|
3414
|
-
* ghost-render wiring. The rotation affordance does not need it directly. */
|
|
3415
|
-
getNode?: (id: string) => TNode | null;
|
|
3416
|
-
}
|
|
3417
|
-
/** Rotate-only Tool. Owns the rotation-handle affordance render layer; the
|
|
3418
|
-
* gesture itself flows through `rotateAction` (declarative binding in
|
|
3419
|
-
* `useSelectTool.bindings` keyed on the `rotate-handle` affordance hit
|
|
3420
|
-
* kind) → dispatcher → preview surface → scene commit.
|
|
3421
|
-
*
|
|
3422
|
-
* The legacy `useRotate` hook is removed — the affordance no
|
|
3423
|
-
* longer wraps each region's drag channel; the unwrapped affordance is
|
|
3424
|
-
* used purely for the paint + hit-test surface. The dispatcher's
|
|
3425
|
-
* `affordanceAt` pipeline produces `rotate-handle` hits independently
|
|
3426
|
-
* (see `src/canvas/affordanceAt.ts`), which the `useSelectTool` rotate
|
|
3427
|
-
* binding then routes to `rotateAction`. */
|
|
3428
|
-
declare function useRotateTool<TNode extends {
|
|
3429
|
-
id: string;
|
|
3430
|
-
}, _TPose>(adapter: RotateAdapter<TNode, _TPose>, options: UseRotateToolOptions<TNode, _TPose>): Tool<unknown> & {
|
|
3431
|
-
overlay: RenderLayer<unknown>;
|
|
3432
|
-
};
|
|
3433
|
-
|
|
3434
3415
|
/**
|
|
3435
3416
|
* Pick the topmost id from a body-hit list, using whatever signal the
|
|
3436
3417
|
* adapter exposes.
|
|
@@ -3558,9 +3539,11 @@ interface PenSubpath {
|
|
|
3558
3539
|
* so click-by-click state survives gesture boundaries and the preview layer
|
|
3559
3540
|
* can read the same object.
|
|
3560
3541
|
*
|
|
3561
|
-
* ## The pen
|
|
3542
|
+
* ## The pen draws paths; it does not reshape them
|
|
3562
3543
|
*
|
|
3563
|
-
*
|
|
3544
|
+
* It draws new nodes, and extends an existing node's open subpath from one
|
|
3545
|
+
* of its ends (see `continuing`). Reshaping an existing path is anchor
|
|
3546
|
+
* editing: double-click a path to
|
|
3564
3547
|
* enter edit mode, then use the `editAnchors` / `insertPathAnchor` /
|
|
3565
3548
|
* `nudgeAnchors` / `deleteAnchors` / `marqueeAnchors` / `cutPathAtAnchor`
|
|
3566
3549
|
* Actions.
|
|
@@ -3583,6 +3566,22 @@ interface PenScratch {
|
|
|
3583
3566
|
} | null;
|
|
3584
3567
|
draggingHandleAt: number | null;
|
|
3585
3568
|
closeHintActive: boolean;
|
|
3569
|
+
/** Set while the pen is extending an existing node's open subpath rather
|
|
3570
|
+
* than drawing a new node. `current` then starts as that subpath (turned
|
|
3571
|
+
* around when it was picked up by its first anchor), and the commit
|
|
3572
|
+
* writes back into the node. */
|
|
3573
|
+
continuing: PenContinuation | null;
|
|
3574
|
+
}
|
|
3575
|
+
/** Which existing subpath the pen picked up, and the node's path as it was. */
|
|
3576
|
+
interface PenContinuation {
|
|
3577
|
+
id: string;
|
|
3578
|
+
/** Index of the picked-up subpath within `original`. */
|
|
3579
|
+
sub: number;
|
|
3580
|
+
/** True when it was picked up by its first anchor, so `current` runs
|
|
3581
|
+
* backwards and is turned around again on commit. */
|
|
3582
|
+
reversed: boolean;
|
|
3583
|
+
/** The node's path in world coords at pick-up. */
|
|
3584
|
+
original: PolygonPath;
|
|
3586
3585
|
}
|
|
3587
3586
|
/** Options for `usePenTool`: how a finished path becomes a pose, where it is
|
|
3588
3587
|
* inserted, and when a closed subpath commits. */
|
|
@@ -3608,6 +3607,10 @@ interface UsePenToolOptions<TPose> {
|
|
|
3608
3607
|
* Measured as a screen-space circle, so it stays round under non-uniform
|
|
3609
3608
|
* zoom; aligns with `useSelectTool.handleHitRadius`. */
|
|
3610
3609
|
closeHitRadius?: number;
|
|
3610
|
+
/** Screen-px radius within which a placed anchor lands exactly on an
|
|
3611
|
+
* existing path's anchor. Default `8`; `0` turns it off. Takes precedence
|
|
3612
|
+
* over `snapPoint`, which applies only when no anchor is in range. */
|
|
3613
|
+
anchorSnapRadius?: number;
|
|
3611
3614
|
/** Optional point snapper applied to every world-space coordinate the
|
|
3612
3615
|
* pen records or previews — anchor positions (corner clicks, smooth-
|
|
3613
3616
|
* drag base point), the rubber-band cursor, and the outgoing-handle
|
|
@@ -3874,7 +3877,7 @@ declare function useStarTool<TNode extends {
|
|
|
3874
3877
|
* array to `insertAction`, which forwards it as the `pencil` insert
|
|
3875
3878
|
* extras' `samples`. A consumer that wants pressure-driven
|
|
3876
3879
|
* `Stroke.vertexWidths` reads it off the samples in its own `insert` dep
|
|
3877
|
-
* (`useDepSource('insert', …)`) — see `apps/site/demos/
|
|
3880
|
+
* (`useDepSource('insert', …)`) — see `apps/site/demos/StrokeAndFillDemo.tsx`.
|
|
3878
3881
|
*/
|
|
3879
3882
|
interface PencilPoint {
|
|
3880
3883
|
x: number;
|
|
@@ -4102,8 +4105,8 @@ declare function resolveVisibility(consumer: VisibilityRules | undefined, ctx: C
|
|
|
4102
4105
|
* Sources are passed as plain getters / values rather than the live
|
|
4103
4106
|
* objects they come from. This keeps `chrome-caps` from depending on
|
|
4104
4107
|
* React, the dispatcher's concrete type, or `ChromeState`'s bounds
|
|
4105
|
-
* machinery — the same builder works from a test harness, a
|
|
4106
|
-
*
|
|
4108
|
+
* machinery — the same builder works from a test harness, a forge
|
|
4109
|
+
* story, or `<SceneCanvas>`.
|
|
4107
4110
|
*/
|
|
4108
4111
|
|
|
4109
4112
|
/** The pieces of live canvas state a `ChromeCtx` is assembled from. */
|
|
@@ -5085,6 +5088,18 @@ interface SceneSlotConfig<TNode extends {
|
|
|
5085
5088
|
* The move-overlay ghost (drag preview) is not post-processed.
|
|
5086
5089
|
*/
|
|
5087
5090
|
postProcess?: (cmds: DrawCommand[], view: View, dims: Dims) => DrawCommand[];
|
|
5091
|
+
/**
|
|
5092
|
+
* Drop commands that cannot reach the view before they reach the renderer,
|
|
5093
|
+
* so an off-screen node costs its painter and nothing after. Applied last,
|
|
5094
|
+
* after `postProcess`, to the `dims` rectangle under `view`; see
|
|
5095
|
+
* `cullDrawCommands` for what it can and cannot bound.
|
|
5096
|
+
*
|
|
5097
|
+
* Off by default because it makes the layer's world-space output depend on
|
|
5098
|
+
* the view: anything that draws this layer once and shows the result under
|
|
5099
|
+
* another view — a cache keyed without `view`, a consumer re-wrapping the
|
|
5100
|
+
* commands — would show the first view's cull.
|
|
5101
|
+
*/
|
|
5102
|
+
cull?: boolean;
|
|
5088
5103
|
}
|
|
5089
5104
|
/** Selection-overlay slot config — passed through to `createSelectionOverlayLayer`,
|
|
5090
5105
|
* minus the `getSelection`/`getPose` Canvas wires automatically. */
|
|
@@ -5156,6 +5171,12 @@ interface CanvasProps<TNode extends {
|
|
|
5156
5171
|
* same contract the headless `renderSceneToPixels` path follows (that
|
|
5157
5172
|
* path never reads ambient density at all). */
|
|
5158
5173
|
dpr?: number;
|
|
5174
|
+
/** Flatness tolerance for curve tessellation, in world units. Forwarded to
|
|
5175
|
+
* `WeaselRendererOptions.flattenTolerance`. Leave unset for the cached
|
|
5176
|
+
* default (`DEFAULT_FLATTEN_TOLERANCE`, 0.5); a scene whose world unit is
|
|
5177
|
+
* not a pixel — feet, inches, millimetres — needs a value scaled to its
|
|
5178
|
+
* unit or sub-unit curves flatten to a handful of vertices. */
|
|
5179
|
+
flattenTolerance?: number;
|
|
5159
5180
|
/** The version of whatever content this canvas draws, sampled at paint time
|
|
5160
5181
|
* and reported by {@link CanvasExtensionApi.getPaintedVersion}.
|
|
5161
5182
|
* `<SceneCanvas>` wires this to `scene.getVersion`. Chrome that must not
|
|
@@ -5491,6 +5512,8 @@ type SceneCanvasAdapter<TData, TLayer extends string, TPose> = MoveAdapter<Node$
|
|
|
5491
5512
|
setSelection(ids: string[]): void;
|
|
5492
5513
|
insertNode(node: Node$1<TData, TLayer, TPose>, index?: number): void;
|
|
5493
5514
|
removeNode(id: string): void;
|
|
5515
|
+
/** Replace a node's `data` — what a `setData` op writes through. */
|
|
5516
|
+
setData(id: string, data: TData): void;
|
|
5494
5517
|
getRemovalClosure(ids: readonly string[]): string[];
|
|
5495
5518
|
applyOps(ops: Op[], label?: string): void;
|
|
5496
5519
|
snapshotSelection(ids: string[]): ClipboardSnapshot;
|
|
@@ -5869,7 +5892,7 @@ declare function defaultDrawOne<TData, TLayer extends string, TPose>(node: Node$
|
|
|
5869
5892
|
declare const DEFAULT_HANDLE_SIZE: 8;
|
|
5870
5893
|
/** Built-in tool ids that aren't shape tools — the ones with no entry in
|
|
5871
5894
|
* the `core/shapeKinds` table. */
|
|
5872
|
-
declare const NON_SHAPE_BUILTIN_TOOLS: readonly ["select", "
|
|
5895
|
+
declare const NON_SHAPE_BUILTIN_TOOLS: readonly ["select", "hand"];
|
|
5873
5896
|
/** Built-in tool ids SceneCanvas knows how to mount when no `tools` prop
|
|
5874
5897
|
* is supplied. Pass a subset via `defaultTools` to slim the registered set. */
|
|
5875
5898
|
type BuiltinToolId = (typeof NON_SHAPE_BUILTIN_TOOLS)[number] | BuiltinShapeToolId;
|
|
@@ -6079,7 +6102,7 @@ type SceneCanvasProps<TData, TLayer extends string, TPose> = Omit<CanvasProps<No
|
|
|
6079
6102
|
* into the built-in registry on top of whatever `defaultTools` /
|
|
6080
6103
|
* `toolBundle` already selected.
|
|
6081
6104
|
* - `true` pulls in the built-in for this id (`'pen'`, `'lasso'`,
|
|
6082
|
-
* `'
|
|
6105
|
+
* `'hand'`, …) even when it's outside the active tier — useful
|
|
6083
6106
|
* for `toolBundle: 'minimal'` + `tools={{ pen: true }}`. Unknown
|
|
6084
6107
|
* built-in ids warn in dev and are ignored.
|
|
6085
6108
|
* - `AnyTool` adds a new id or replaces an existing one
|
|
@@ -6125,8 +6148,7 @@ type SceneCanvasProps<TData, TLayer extends string, TPose> = Omit<CanvasProps<No
|
|
|
6125
6148
|
onToolsCreated?: (tools: ToolsApi) => void;
|
|
6126
6149
|
/**
|
|
6127
6150
|
* Named preset for the built-in tool set: `'minimal'` (select + hand),
|
|
6128
|
-
* `'standard'` (select +
|
|
6129
|
-
* line + pencil), or `'exhaustive'` (every built-in including polygon,
|
|
6151
|
+
* `'standard'` (select + hand + rect + ellipse + line), or `'exhaustive'` (every built-in including polygon,
|
|
6130
6152
|
* star, lasso, text, clone). When set, defines the starting set;
|
|
6131
6153
|
* `defaultTools` (if also passed) overrides it. Ignored when the
|
|
6132
6154
|
* consumer supplies their own `tools` prop.
|
|
@@ -6134,7 +6156,7 @@ type SceneCanvasProps<TData, TLayer extends string, TPose> = Omit<CanvasProps<No
|
|
|
6134
6156
|
toolBundle?: ToolBundle;
|
|
6135
6157
|
/**
|
|
6136
6158
|
* Which built-in tools SceneCanvas registers in its internal `useTools`.
|
|
6137
|
-
* Default: `['select'
|
|
6159
|
+
* Default: `['select']` (plus `'hand'` when the
|
|
6138
6160
|
* `viewport` feature is on). Pass a smaller array to slim — e.g.
|
|
6139
6161
|
* `['select']` for move-only. Wins over `toolBundle` when both are
|
|
6140
6162
|
* passed. Ignored when the consumer supplies their own `tools` prop.
|
|
@@ -6326,6 +6348,12 @@ type SceneCanvasProps<TData, TLayer extends string, TPose> = Omit<CanvasProps<No
|
|
|
6326
6348
|
* to `<Canvas shaders={...} />`. See `CanvasProps.shaders` for details.
|
|
6327
6349
|
*/
|
|
6328
6350
|
shaders?: ShaderProgramHandle[];
|
|
6351
|
+
/**
|
|
6352
|
+
* Flatness tolerance for curve tessellation, in world units. Forwarded
|
|
6353
|
+
* directly to `<Canvas flattenTolerance={...} />`. See
|
|
6354
|
+
* `CanvasProps.flattenTolerance` for details.
|
|
6355
|
+
*/
|
|
6356
|
+
flattenTolerance?: number;
|
|
6329
6357
|
/**
|
|
6330
6358
|
* FillStyle applied to the full canvas behind the scene. Accepts the kit's
|
|
6331
6359
|
* `FillStyle` union (solid / pattern / linear-gradient / radial-gradient /
|
|
@@ -7173,12 +7201,15 @@ declare function derivedPose<TPose>(source: PoseSource<TPose>, node: PosedNode<T
|
|
|
7173
7201
|
declare function derivedDepOf<TPose>(source: PoseSource<TPose>, id: NodeId): DerivedDep<TPose> | undefined;
|
|
7174
7202
|
/**
|
|
7175
7203
|
* The pose the *document* says `node` is at: derived when it derives, else
|
|
7176
|
-
* authored. `effectivePose` minus the override step
|
|
7204
|
+
* authored. `effectivePose` minus the override step, at every link of the
|
|
7205
|
+
* dependency chain — a derived node's document pose holds still while
|
|
7206
|
+
* something it derives from is being dragged.
|
|
7177
7207
|
*
|
|
7178
7208
|
* For a reader that must not see an in-flight gesture — an action capturing
|
|
7179
|
-
* the `from` of a transform op, a placement computed against a sibling
|
|
7180
|
-
* derived pose belongs here and an override does not:
|
|
7181
|
-
* document means, an override is what one gesture is
|
|
7209
|
+
* the `from` of a transform op, a placement computed against a sibling, the
|
|
7210
|
+
* minimap's framing. A derived pose belongs here and an override does not:
|
|
7211
|
+
* derivation is what the document means, an override is what one gesture is
|
|
7212
|
+
* currently showing.
|
|
7182
7213
|
*/
|
|
7183
7214
|
declare function documentPose<TPose>(source: PoseSource<TPose>, node: PosedNode<TPose>): TPose;
|
|
7184
7215
|
/**
|
|
@@ -7520,6 +7551,58 @@ declare function SelectionContextProviderIfRoot({ children, }: {
|
|
|
7520
7551
|
*/
|
|
7521
7552
|
declare function usePublishSelection(ids: readonly NodeId[], kinds?: readonly (string | undefined)[]): void;
|
|
7522
7553
|
|
|
7554
|
+
/**
|
|
7555
|
+
* @experimental
|
|
7556
|
+
* PointerContext — a tiny ambient context that publishes the world-space
|
|
7557
|
+
* position of the canvas pointer, refreshed on every `pointermove` over
|
|
7558
|
+
* the canvas. Cleared (set to `null`) on `pointerleave`.
|
|
7559
|
+
*
|
|
7560
|
+
* Why ref-based and not state-based: cursor moves fire dozens of times per
|
|
7561
|
+
* second; routing those through React state would re-render every consumer
|
|
7562
|
+
* in the tree. The context exposes a stable `pointerRef` whose `.current`
|
|
7563
|
+
* is mutated directly by the publisher, plus a thunk `getDropPoint()` that
|
|
7564
|
+
* reads it on demand. Consumers (e.g. `useClipboard`) pull via the thunk
|
|
7565
|
+
* inside their callbacks — no subscription, no re-render.
|
|
7566
|
+
*
|
|
7567
|
+
* `<SceneCanvas>` publishes automatically. `useClipboardOps` consumes when
|
|
7568
|
+
* the caller didn't pass an explicit `getDropPoint` option. Other future
|
|
7569
|
+
* hit-on-cursor consumers (drop-zone hover, context-menu anchor) can reuse
|
|
7570
|
+
* the same context.
|
|
7571
|
+
*/
|
|
7572
|
+
|
|
7573
|
+
/** @experimental World-space pointer position, or `null` when the pointer
|
|
7574
|
+
* isn't over the publishing canvas. */
|
|
7575
|
+
type PointerWorldPos = {
|
|
7576
|
+
worldX: number;
|
|
7577
|
+
worldY: number;
|
|
7578
|
+
} | null;
|
|
7579
|
+
/** @experimental */
|
|
7580
|
+
interface PointerContextValue {
|
|
7581
|
+
/** Live ref — mutate to publish, read for the latest snapshot. The
|
|
7582
|
+
* identity is stable for the lifetime of the provider. */
|
|
7583
|
+
readonly pointerRef: MutableRefObject<PointerWorldPos>;
|
|
7584
|
+
/** Convenience thunk equivalent to `() => pointerRef.current`. Stable
|
|
7585
|
+
* identity for the lifetime of the provider; safe to pass to hooks. */
|
|
7586
|
+
readonly getDropPoint: () => PointerWorldPos;
|
|
7587
|
+
}
|
|
7588
|
+
/**
|
|
7589
|
+
* @experimental
|
|
7590
|
+
* Wrap the part of the React tree that should share a pointer-position
|
|
7591
|
+
* context. Usually placed at the demo / app root, alongside
|
|
7592
|
+
* `<ActionsProvider>` and `<SelectionContextProvider>`.
|
|
7593
|
+
*
|
|
7594
|
+
* Most consumers don't need to mount this directly — `<SceneCanvas>` mounts
|
|
7595
|
+
* an internal provider when no parent provider is in scope, so child hooks
|
|
7596
|
+
* (`useClipboard` without an explicit `getDropPoint`) read the canvas's
|
|
7597
|
+
* tracked pointer for free.
|
|
7598
|
+
*/
|
|
7599
|
+
declare function PointerContextProvider({ children }: {
|
|
7600
|
+
children: ReactNode;
|
|
7601
|
+
}): ReactNode;
|
|
7602
|
+
/** @experimental Read the surrounding pointer-context value, or `null` when
|
|
7603
|
+
* no provider is in scope. */
|
|
7604
|
+
declare function usePointerContext(): PointerContextValue | null;
|
|
7605
|
+
|
|
7523
7606
|
/** Mount a `<PointerContextProvider>` only when none is already in scope. */
|
|
7524
7607
|
declare function PointerProviderIfRoot({ children }: {
|
|
7525
7608
|
children: ReactNode;
|
|
@@ -8189,6 +8272,12 @@ interface TextEditScreenPose {
|
|
|
8189
8272
|
fontSize: number;
|
|
8190
8273
|
/** Effective on-screen line height multiplier (defaults to style.lineHeight). */
|
|
8191
8274
|
lineHeight?: number;
|
|
8275
|
+
/**
|
|
8276
|
+
* Where the text sits within `height`, as the canvas places it. `'center'`
|
|
8277
|
+
* and `'bottom'` size the overlay to its own content and offset it by the
|
|
8278
|
+
* slack, re-measured as typing changes the line count. Default `'top'`.
|
|
8279
|
+
*/
|
|
8280
|
+
verticalAlign?: TextVerticalAlign;
|
|
8192
8281
|
/**
|
|
8193
8282
|
* CSS scale applied to the overlay (`transform: scale(zoom)`, anchored at
|
|
8194
8283
|
* its top-left). Every other size on this pose, and every typographic
|
|
@@ -8500,6 +8589,20 @@ interface UseSceneTextEditReturn extends UseTextEditReturn {
|
|
|
8500
8589
|
* over the node being edited and writes the result back as an undoable op. */
|
|
8501
8590
|
declare function useSceneTextEdit<TData extends DefaultTextData, TLayer extends string, TPose extends RectPose = RectPose>(scene: Scene<TData, TLayer, TPose>, container: HTMLElement | null, options?: UseSceneTextEditOptions<TData>): UseSceneTextEditReturn;
|
|
8502
8591
|
|
|
8592
|
+
/**
|
|
8593
|
+
* What is actually rendering across a range: `range` (from `styleAtRange`,
|
|
8594
|
+
* or `useTextEdit`'s `rangeStyle`) resolved against the node's own `style`
|
|
8595
|
+
* and `paint`, as the canvas resolves runs. `null` reads the node alone.
|
|
8596
|
+
*
|
|
8597
|
+
* Flags are additive — a run can turn one on, never off — so a node flag
|
|
8598
|
+
* makes the flag `true` across the range, `MIXED` runs included. Every other
|
|
8599
|
+
* key is the run's value where the range sets one, otherwise the node's.
|
|
8600
|
+
* The node level is resolved first, so the result has a value for every
|
|
8601
|
+
* key but the run-only ones, and for `fill` unless the node is unfilled.
|
|
8602
|
+
* A node's weight reads as bold at 600 and above, as `nodeHasFlag` does.
|
|
8603
|
+
*/
|
|
8604
|
+
declare function effectiveRangeStyle(range: RangeStyle | null, style: TextStyle | undefined, paint?: TextPaint): RangeStyle;
|
|
8605
|
+
|
|
8503
8606
|
/**
|
|
8504
8607
|
* Build a `TextDrawCommand`. `textCommandFromPose` is the command for a text
|
|
8505
8608
|
* node — what `kit:text` and `createTextLayer` both emit. `textCommand` takes
|
|
@@ -8512,20 +8615,25 @@ declare function useSceneTextEdit<TData extends DefaultTextData, TLayer extends
|
|
|
8512
8615
|
*
|
|
8513
8616
|
* `paint` is the node's `data.fill` / `data.stroke`. A caller with no node —
|
|
8514
8617
|
* a HUD widget, a debug overlay — states its color on the run instead.
|
|
8618
|
+
*
|
|
8619
|
+
* `scale` is the view scale a `{ px }` `fontSize` or `letterSpacing` resolves
|
|
8620
|
+
* against — for a world-space layer, the mean of `view.scale.x` and
|
|
8621
|
+
* `view.scale.y`. It has to be applied here and not at draw time, because a
|
|
8622
|
+
* screen-pixel size moves the glyph advances and so the wrap points.
|
|
8515
8623
|
*/
|
|
8516
8624
|
|
|
8517
|
-
declare function textCommandFromRuns(x: number, y: number, runs: readonly StyledRun[], style?: TextStyle, maxWidth?: number, height?: number, verticalAlign?: TextVerticalAlign, paint?: TextPaint, width?: number): DrawCommand;
|
|
8625
|
+
declare function textCommandFromRuns(x: number, y: number, runs: readonly StyledRun[], style?: TextStyle, maxWidth?: number, height?: number, verticalAlign?: TextVerticalAlign, paint?: TextPaint, width?: number, scale?: number): DrawCommand;
|
|
8518
8626
|
/** Build a draw command for a single unstyled string. Text is laid out with
|
|
8519
8627
|
* the registered font's metrics, wrapped at `maxWidth`, aligned across
|
|
8520
8628
|
* `width` (default `maxWidth`) and within `height` when `verticalAlign` is
|
|
8521
8629
|
* given. */
|
|
8522
|
-
declare function textCommand(x: number, y: number, text: string, style?: TextStyle, maxWidth?: number, height?: number, verticalAlign?: TextVerticalAlign, paint?: TextPaint, width?: number): DrawCommand;
|
|
8630
|
+
declare function textCommand(x: number, y: number, text: string, style?: TextStyle, maxWidth?: number, height?: number, verticalAlign?: TextVerticalAlign, paint?: TextPaint, width?: number, scale?: number): DrawCommand;
|
|
8523
8631
|
/**
|
|
8524
8632
|
* The draw command for a text pose. Its wrap width, alignment box and runs
|
|
8525
8633
|
* come from `textPoseLayoutInput`, so the renderer lays it out into exactly
|
|
8526
8634
|
* the lines `layoutTextPose` reports for the same pose.
|
|
8527
8635
|
*/
|
|
8528
|
-
declare function textCommandFromPose(pose: TextPose): TextDrawCommand;
|
|
8636
|
+
declare function textCommandFromPose(pose: TextPose, scale?: number): TextDrawCommand;
|
|
8529
8637
|
|
|
8530
8638
|
/**
|
|
8531
8639
|
* Pure DOM ↔ `StyledRun[]` serializers for the contenteditable overlay
|
|
@@ -8594,6 +8702,178 @@ interface TilePatternOpts {
|
|
|
8594
8702
|
*/
|
|
8595
8703
|
declare function createTilePattern(opts: TilePatternOpts): TextureHandle | null;
|
|
8596
8704
|
|
|
8705
|
+
/**
|
|
8706
|
+
* Coons and tensor-product patch surfaces — PDF's shading types 6 and 7, as
|
|
8707
|
+
* pure geometry.
|
|
8708
|
+
*
|
|
8709
|
+
* A patch is a curved quadrilateral: four cubic Bézier edges and a color at
|
|
8710
|
+
* each corner. The interior is what the edges imply — a Coons patch reads it
|
|
8711
|
+
* off the boundary alone; a tensor patch adds four interior control points
|
|
8712
|
+
* that pull it around. Both evaluate at a `(u, v)` in the unit square, which
|
|
8713
|
+
* is what lets the renderer subdivide a patch into as many triangles as it
|
|
8714
|
+
* wants without the patch knowing.
|
|
8715
|
+
*
|
|
8716
|
+
* Nothing here touches GL, a color string, or a scene. `evalPatch` is the
|
|
8717
|
+
* whole contract.
|
|
8718
|
+
*/
|
|
8719
|
+
/** A point in the patch's own space. */
|
|
8720
|
+
interface MeshPoint {
|
|
8721
|
+
x: number;
|
|
8722
|
+
y: number;
|
|
8723
|
+
}
|
|
8724
|
+
/**
|
|
8725
|
+
* One patch.
|
|
8726
|
+
*
|
|
8727
|
+
* `points` walks the boundary: corner 0, the two control points of the edge
|
|
8728
|
+
* leaving it, corner 1, its two, and so on — twelve points, ending with the
|
|
8729
|
+
* two controls that return to corner 0. A tensor patch appends its four
|
|
8730
|
+
* interior points, in the order `(1,1)`, `(1,2)`, `(2,2)`, `(2,1)` of the
|
|
8731
|
+
* bicubic control net, which is PDF's own order.
|
|
8732
|
+
*
|
|
8733
|
+
* Twelve points is a Coons patch and sixteen is a tensor patch; there is no
|
|
8734
|
+
* flag, because the count already says which it is.
|
|
8735
|
+
*
|
|
8736
|
+
* `colors` are the corner colors in the same walk order, as whatever color
|
|
8737
|
+
* form the caller resolves — the renderer hands premultiplied RGBA in, the
|
|
8738
|
+
* serializer hands CSS strings.
|
|
8739
|
+
*/
|
|
8740
|
+
interface MeshPatch<TColor = string> {
|
|
8741
|
+
points: readonly MeshPoint[];
|
|
8742
|
+
colors: readonly [TColor, TColor, TColor, TColor];
|
|
8743
|
+
}
|
|
8744
|
+
/** Corner `i` of the boundary walk. */
|
|
8745
|
+
declare function patchCorner(patch: MeshPatch<unknown>, i: number): MeshPoint;
|
|
8746
|
+
/** `true` when the patch carries the four interior points a tensor patch adds. */
|
|
8747
|
+
declare function isTensorPatch(patch: MeshPatch<unknown>): boolean;
|
|
8748
|
+
/** A patch is twelve boundary points, or sixteen with the interior. Anything
|
|
8749
|
+
* else cannot be evaluated, and saying so here beats painting nonsense. */
|
|
8750
|
+
declare function isValidPatch(patch: MeshPatch<unknown>): boolean;
|
|
8751
|
+
/**
|
|
8752
|
+
* The patch surface at `(u, v)`, both in `0..1`.
|
|
8753
|
+
*
|
|
8754
|
+
* `u` runs along the edge leaving corner 0 and `v` along the edge leaving
|
|
8755
|
+
* corner 1, so `(0,0)` is corner 0, `(1,0)` corner 1, `(1,1)` corner 2 and
|
|
8756
|
+
* `(0,1)` corner 3 — the same walk `colors` is in.
|
|
8757
|
+
*/
|
|
8758
|
+
declare function evalPatch(patch: MeshPatch<unknown>, u: number, v: number): MeshPoint;
|
|
8759
|
+
/**
|
|
8760
|
+
* The four corner weights at `(u, v)` — bilinear, in the corner walk order.
|
|
8761
|
+
*
|
|
8762
|
+
* Color is separate from position on purpose: it interpolates in whatever
|
|
8763
|
+
* space the caller chose, which is not a thing the surface can do for it.
|
|
8764
|
+
*/
|
|
8765
|
+
declare function cornerWeights(u: number, v: number): [number, number, number, number];
|
|
8766
|
+
/** Axis-aligned bounds of a patch, sampled on a grid. Control points alone
|
|
8767
|
+
* bound a Bézier but not tightly, and a mesh paint is baked into a texture
|
|
8768
|
+
* sized from this — a loose box wastes texels on every side. */
|
|
8769
|
+
declare function patchBounds(patch: MeshPatch<unknown>, steps?: number): {
|
|
8770
|
+
x: number;
|
|
8771
|
+
y: number;
|
|
8772
|
+
width: number;
|
|
8773
|
+
height: number;
|
|
8774
|
+
};
|
|
8775
|
+
|
|
8776
|
+
/**
|
|
8777
|
+
* The `mesh-gradient` paint kind — PDF's shading types 6 and 7 as a registered
|
|
8778
|
+
* paint.
|
|
8779
|
+
*
|
|
8780
|
+
* A mesh gradient is a set of curved quadrilateral patches, each with a color
|
|
8781
|
+
* at every corner. It is the paint SVG tried to standardize as
|
|
8782
|
+
* `<meshgradient>` and abandoned, and the one PDF has had since 1993; what it
|
|
8783
|
+
* buys over the three gradients is a color field that bends, so a highlight
|
|
8784
|
+
* can follow a form instead of running straight across it.
|
|
8785
|
+
*
|
|
8786
|
+
* This is a registered kind rather than a sixth branch in the renderer, and
|
|
8787
|
+
* deliberately: it uses only the slots `registerPaintKind` gives a consumer, so
|
|
8788
|
+
* whatever it can do, a consumer's own kind can do too. Its one concession is
|
|
8789
|
+
* living in this package, because that is where the shader registry is.
|
|
8790
|
+
*
|
|
8791
|
+
* `docs/proposals/2026-09-17-paint-kinds-beyond-svg.md` is the design.
|
|
8792
|
+
*/
|
|
8793
|
+
|
|
8794
|
+
/**
|
|
8795
|
+
* A mesh gradient paint.
|
|
8796
|
+
*
|
|
8797
|
+
* `patches` are in the space `units` names, the same way a gradient's
|
|
8798
|
+
* geometry is — under `'bounds'` every point is a fraction of the painted
|
|
8799
|
+
* node's box, which is what lets the paint survive a resize.
|
|
8800
|
+
*
|
|
8801
|
+
* `interpolate` is the space corner colors blend through, matching the three
|
|
8802
|
+
* gradients. It is more visible here than there: a mesh blends in two
|
|
8803
|
+
* directions at once, so an sRGB blend's muddy middle covers area rather than
|
|
8804
|
+
* a line.
|
|
8805
|
+
*/
|
|
8806
|
+
interface MeshGradientFill {
|
|
8807
|
+
fill: 'mesh-gradient';
|
|
8808
|
+
patches: MeshPatch[];
|
|
8809
|
+
units?: GradientUnits;
|
|
8810
|
+
interpolate?: ColorSpace;
|
|
8811
|
+
opacity?: number;
|
|
8812
|
+
}
|
|
8813
|
+
/** The kind's id, as `FillStyle['fill']` carries it. */
|
|
8814
|
+
declare const MESH_GRADIENT_KIND = "mesh-gradient";
|
|
8815
|
+
/** A mesh paint, narrowed. */
|
|
8816
|
+
declare function isMeshGradientFill(fill: FillStyle | null | undefined): fill is FillStyle & MeshGradientFill;
|
|
8817
|
+
/** A one-patch square covering the unit box, its four corners four readings of
|
|
8818
|
+
* `color` — a mesh seeded from a solid has to show *something* curved, or
|
|
8819
|
+
* switching kind looks like nothing happened. */
|
|
8820
|
+
declare function seedMeshPatch(color: string): MeshGradientFill;
|
|
8821
|
+
/**
|
|
8822
|
+
* The `<defs>` entry for a mesh paint, in weasel's own namespace.
|
|
8823
|
+
*
|
|
8824
|
+
* Not SVG's abandoned `<meshgradient>`: that vocabulary only reaches Coons
|
|
8825
|
+
* patches, shares patch edges implicitly — a reader that gets the sharing
|
|
8826
|
+
* wrong tears the surface rather than failing outright — and has exactly one
|
|
8827
|
+
* implementation in the world. Ours writes every patch's points in full.
|
|
8828
|
+
* `@weasel-js/svg` puts the paint fallback color beside the reference, so a
|
|
8829
|
+
* foreign renderer paints flat instead of nothing.
|
|
8830
|
+
*/
|
|
8831
|
+
declare function meshGradientXml(id: string, mesh: MeshGradientFill): string;
|
|
8832
|
+
|
|
8833
|
+
/**
|
|
8834
|
+
* A mesh paint baked into one RGBA bitmap.
|
|
8835
|
+
*
|
|
8836
|
+
* A patch is a surface over `(u, v)`, but a paint has to answer "what color is
|
|
8837
|
+
* this fragment", which is the inverse question — and inverting a bicubic is
|
|
8838
|
+
* Newton iteration per fragment. Every renderer that draws these instead
|
|
8839
|
+
* subdivides the patch into small quads and rasterizes them forward, which is
|
|
8840
|
+
* what this does, once per paint, into a texture the shader then samples. The
|
|
8841
|
+
* cost is a texture and a resolution; the gain is that the paint composes with
|
|
8842
|
+
* every fill the renderer already knows how to draw, clipping included.
|
|
8843
|
+
*
|
|
8844
|
+
* The bitmap is straight (non-premultiplied) RGBA, matching the ramp atlas;
|
|
8845
|
+
* the fragment shader premultiplies.
|
|
8846
|
+
*/
|
|
8847
|
+
|
|
8848
|
+
/** Texels on a side of a baked mesh. A mesh gradient is smooth by
|
|
8849
|
+
* construction, so this is about how large it is drawn, not how detailed it
|
|
8850
|
+
* is; 256 covers a paint at typical shape sizes without a visible step. */
|
|
8851
|
+
declare const MESH_BAKE_SIZE = 256;
|
|
8852
|
+
/** The box a bake covers, in the paint's own space. */
|
|
8853
|
+
interface MeshBox {
|
|
8854
|
+
x: number;
|
|
8855
|
+
y: number;
|
|
8856
|
+
width: number;
|
|
8857
|
+
height: number;
|
|
8858
|
+
}
|
|
8859
|
+
interface BakedMesh {
|
|
8860
|
+
/** `MESH_BAKE_SIZE` square, straight RGBA. */
|
|
8861
|
+
pixels: Uint8ClampedArray;
|
|
8862
|
+
size: number;
|
|
8863
|
+
/** Where the bitmap sits in paint space, which is what the shader maps a
|
|
8864
|
+
* fragment through. */
|
|
8865
|
+
box: MeshBox;
|
|
8866
|
+
}
|
|
8867
|
+
/** The union of every patch's bounds, or `null` when nothing is drawable. */
|
|
8868
|
+
declare function meshBounds(patches: readonly MeshPatch[]): MeshBox | null;
|
|
8869
|
+
/**
|
|
8870
|
+
* Rasterize `patches` into a square bitmap covering their union.
|
|
8871
|
+
*
|
|
8872
|
+
* Returns `null` when no patch is drawable, which is the caller's cue to paint
|
|
8873
|
+
* nothing rather than a blank square.
|
|
8874
|
+
*/
|
|
8875
|
+
declare function bakeMesh(patches: readonly MeshPatch[], space?: ColorSpace, size?: number): BakedMesh | null;
|
|
8876
|
+
|
|
8597
8877
|
/**
|
|
8598
8878
|
* `TilePatternSpec` → `TextureHandle`. The bridge between the serializable
|
|
8599
8879
|
* half of a pattern paint and the GL texture that paints it.
|
|
@@ -8640,7 +8920,7 @@ declare function isGradientFill(fill: FillStyle | null | undefined): fill is Gra
|
|
|
8640
8920
|
*
|
|
8641
8921
|
* Returns transparent black for an empty list.
|
|
8642
8922
|
*/
|
|
8643
|
-
declare function sampleGradientStops(stops: readonly GradStop[], t: number): string;
|
|
8923
|
+
declare function sampleGradientStops(stops: readonly GradStop[], t: number, space?: ColorSpace): string;
|
|
8644
8924
|
/**
|
|
8645
8925
|
* Retarget a gradient to a different kind, preserving stops, `units` and
|
|
8646
8926
|
* `opacity`, and carrying the geometry across as faithfully as the kinds
|
|
@@ -9064,86 +9344,38 @@ type DerivePose<TPose> = (node: {
|
|
|
9064
9344
|
declare function unionOfChildrenVia<TPose>(descriptor: PoseDescriptor<TPose>): DerivePose<TPose>;
|
|
9065
9345
|
|
|
9066
9346
|
/**
|
|
9067
|
-
*
|
|
9068
|
-
* encoding behind move/line/curve/close calls and a final `build()`. Use
|
|
9069
|
-
* this to construct paths in tests and demos; production callers that need
|
|
9070
|
-
* to mutate large paths in place should reach for the raw arrays directly.
|
|
9347
|
+
* Ergonomic builders for tiny shape paths used by chrome / overlays / markers.
|
|
9071
9348
|
*
|
|
9072
|
-
*
|
|
9349
|
+
* These don't expand the `DrawCommand` union — they all return `PolygonPath`,
|
|
9350
|
+
* which `PathDrawCommand.path` already accepts. The wins are:
|
|
9351
|
+
* - One place owns the math (`circlePath`'s segment loop, `squarePath`'s
|
|
9352
|
+
* corner unrolling), so consumers don't reinvent it.
|
|
9353
|
+
* - Default segment counts can be tuned in one place if "circles look
|
|
9354
|
+
* facety" feedback ever surfaces.
|
|
9073
9355
|
*
|
|
9074
|
-
*
|
|
9075
|
-
*
|
|
9356
|
+
* Not appropriate for *user-drawn* shapes (those have a pose and live in the
|
|
9357
|
+
* scene). Use these for selection chrome, anchor markers, rubber-band rects,
|
|
9358
|
+
* and similar transient/decorative geometry.
|
|
9076
9359
|
*/
|
|
9077
9360
|
|
|
9078
|
-
/**
|
|
9079
|
-
|
|
9080
|
-
|
|
9081
|
-
|
|
9082
|
-
|
|
9083
|
-
|
|
9084
|
-
|
|
9085
|
-
|
|
9086
|
-
|
|
9087
|
-
|
|
9088
|
-
|
|
9089
|
-
|
|
9090
|
-
|
|
9091
|
-
|
|
9092
|
-
|
|
9093
|
-
|
|
9094
|
-
|
|
9095
|
-
|
|
9096
|
-
/** Cubic bezier to (x, y) with control points (x1, y1) and (x2, y2). */
|
|
9097
|
-
curveTo(x1: number, y1: number, x2: number, y2: number, x: number, y: number): this;
|
|
9098
|
-
/** Quadratic bezier to (x, y) with control point (x1, y1). */
|
|
9099
|
-
quadTo(x1: number, y1: number, x: number, y: number): this;
|
|
9100
|
-
close(): this;
|
|
9101
|
-
build(): PolygonPath;
|
|
9102
|
-
}
|
|
9103
|
-
/** Construct a `RectPath` (the fast-path subtype). */
|
|
9104
|
-
declare function rectPath(x: number, y: number, width: number, height: number): RectPath;
|
|
9105
|
-
/** Build an open polyline from a flat list of points — the same geometry as
|
|
9106
|
-
* {@link polygonFromPoints} without the closing edge. A freehand stroke and a
|
|
9107
|
-
* measurement line want this; a region wants the closed one. */
|
|
9108
|
-
declare function polylineFromPoints(points: readonly {
|
|
9109
|
-
x: number;
|
|
9110
|
-
y: number;
|
|
9111
|
-
}[]): PolygonPath | RectPath;
|
|
9112
|
-
/** Build a closed polygon from a flat list of points. */
|
|
9113
|
-
declare function polygonFromPoints(points: readonly {
|
|
9114
|
-
x: number;
|
|
9115
|
-
y: number;
|
|
9116
|
-
}[], opts?: {
|
|
9117
|
-
fillRule?: PathFillRule;
|
|
9118
|
-
}): PolygonPath;
|
|
9119
|
-
/** Closed ellipse inscribed in `bounds`, as a 4-cubic-Bezier `PolygonPath`.
|
|
9120
|
-
* Matches the geometry `useEllipseTool`'s overlay paints. */
|
|
9121
|
-
declare function ellipsePath(bounds: {
|
|
9122
|
-
x: number;
|
|
9123
|
-
y: number;
|
|
9124
|
-
width: number;
|
|
9125
|
-
height: number;
|
|
9126
|
-
}): PolygonPath;
|
|
9127
|
-
/** Closed regular n-gon centered at `center`, circumscribed by `radius`.
|
|
9128
|
-
* `rotation` is in radians; default 0 puts the first vertex on the +x axis. */
|
|
9129
|
-
declare function regularPolygonPath(center: {
|
|
9130
|
-
x: number;
|
|
9131
|
-
y: number;
|
|
9132
|
-
}, radius: number, sides: number, rotation?: number): PolygonPath;
|
|
9133
|
-
/** Closed n-pointed star centered at `center`, alternating `outerRadius` and
|
|
9134
|
-
* `innerRadius` (default `outerRadius / 2`). `rotation` is in radians. */
|
|
9135
|
-
declare function starPath(center: {
|
|
9136
|
-
x: number;
|
|
9137
|
-
y: number;
|
|
9138
|
-
}, outerRadius: number, points?: number, innerRadius?: number, rotation?: number): PolygonPath;
|
|
9139
|
-
/** Open 2-vertex polyline from `a` to `b` — strokeable, not fillable. */
|
|
9140
|
-
declare function linePath(a: {
|
|
9141
|
-
x: number;
|
|
9142
|
-
y: number;
|
|
9143
|
-
}, b: {
|
|
9144
|
-
x: number;
|
|
9145
|
-
y: number;
|
|
9146
|
-
}): PolygonPath;
|
|
9361
|
+
/**
|
|
9362
|
+
* N-segment polygon approximation of a circle. Default 32 segments → max
|
|
9363
|
+
* radial deviation of ≈0.005·r (≈0.05 px at r=10). Bump higher for large
|
|
9364
|
+
* filled circles where the facets become visible; the default is fine for
|
|
9365
|
+
* the handle-dot / anchor-dot scale we use everywhere.
|
|
9366
|
+
*/
|
|
9367
|
+
declare function circlePath(cx: number, cy: number, r: number, segments?: number): PolygonPath;
|
|
9368
|
+
/** Axis-aligned square centred at (cx, cy) with side length `size`. */
|
|
9369
|
+
declare function squarePath(cx: number, cy: number, size: number): PolygonPath;
|
|
9370
|
+
/** Axis-aligned rectangle. Top-left at (x, y), width/height as given. */
|
|
9371
|
+
declare function rectMarkerPath(x: number, y: number, width: number, height: number): PolygonPath;
|
|
9372
|
+
/**
|
|
9373
|
+
* Axis-aligned rounded rectangle. Top-left at (x, y); `r` is clamped to half
|
|
9374
|
+
* the shorter side. Each corner is `cornerSamples` line segments, matching
|
|
9375
|
+
* `circlePath`'s polygonal approximation — the default 8 gives the same
|
|
9376
|
+
* angular resolution as `circlePath`'s 32.
|
|
9377
|
+
*/
|
|
9378
|
+
declare function roundRectPath(x: number, y: number, width: number, height: number, r: number, cornerSamples?: number): PolygonPath;
|
|
9147
9379
|
|
|
9148
9380
|
/**
|
|
9149
9381
|
* AABB bounds of a `Path`. Returned as `RectPath` for direct reuse with the
|
|
@@ -9239,21 +9471,6 @@ interface PointInPathOptions {
|
|
|
9239
9471
|
/** Filled-region hit-test for a `Path`. Rect short-circuits to AABB; polygons run ray-cast / winding per `fillRule`. */
|
|
9240
9472
|
declare function pointInPath(path: Path, x: number, y: number, opts?: PointInPathOptions): boolean;
|
|
9241
9473
|
|
|
9242
|
-
/**
|
|
9243
|
-
* Polygon-vs-axis-aligned-rect tests. Pure functions; no React/kit deps.
|
|
9244
|
-
*
|
|
9245
|
-
* `polygon` is a closed polyline given as an ordered vertex array; the
|
|
9246
|
-
* closing edge from `polygon[N-1]` to `polygon[0]` is implicit. Even-odd fill
|
|
9247
|
-
* rule, and one contour only — a path with holes or curves goes through
|
|
9248
|
-
* `pathHitTest`, which reads its `fillRule`.
|
|
9249
|
-
*/
|
|
9250
|
-
|
|
9251
|
-
/** A 2D point or vector. */
|
|
9252
|
-
interface Vec2 {
|
|
9253
|
-
x: number;
|
|
9254
|
-
y: number;
|
|
9255
|
-
}
|
|
9256
|
-
|
|
9257
9474
|
/**
|
|
9258
9475
|
* Path-vs-geometry hit-test helpers. Five pure functions covering all
|
|
9259
9476
|
* combinations of path-vs-point, path-vs-rect, and path-vs-polygon.
|
|
@@ -9298,35 +9515,6 @@ declare function pathIntersectsPolygon(path: Path, polygon: readonly Vec2[], opt
|
|
|
9298
9515
|
* combine with `pathContainsPoint` at the call site. */
|
|
9299
9516
|
declare function pathDistanceToPoint(path: Path, px: number, py: number): number;
|
|
9300
9517
|
|
|
9301
|
-
/**
|
|
9302
|
-
* A station along a path: where it is at a fraction of its length, and which
|
|
9303
|
-
* way it is heading there.
|
|
9304
|
-
*
|
|
9305
|
-
* For anything positioned *along* geometry rather than beside it — a label on a
|
|
9306
|
-
* routed edge, a tick on a curve, a badge near an arrowhead. Curves are
|
|
9307
|
-
* flattened first, so the fraction is arc length along the drawn shape rather
|
|
9308
|
-
* than a curve parameter, which is what makes 0.5 look like the middle.
|
|
9309
|
-
*/
|
|
9310
|
-
|
|
9311
|
-
interface PathStation {
|
|
9312
|
-
point: Vec2;
|
|
9313
|
-
/** Unit vector along the path at `point`, pointing toward the end. */
|
|
9314
|
-
tangent: Vec2;
|
|
9315
|
-
}
|
|
9316
|
-
interface PointAlongPathOptions {
|
|
9317
|
-
/** Curve flattening tolerance, in world units. Default 0.5. */
|
|
9318
|
-
flattenTolerance?: number;
|
|
9319
|
-
}
|
|
9320
|
-
/**
|
|
9321
|
-
* Where `path` is at `t` of its total length, and its heading there.
|
|
9322
|
-
*
|
|
9323
|
-
* `t` is clamped to 0..1. Subpaths are measured in order and treated as one
|
|
9324
|
-
* run, the way a browser measures a whole `<path>`. Returns `null` for a path
|
|
9325
|
-
* with no points at all; a path of zero length answers at its single point,
|
|
9326
|
-
* heading along +X.
|
|
9327
|
-
*/
|
|
9328
|
-
declare function pointAlongPath(path: Path, t: number, opts?: PointAlongPathOptions): PathStation | null;
|
|
9329
|
-
|
|
9330
9518
|
/**
|
|
9331
9519
|
* In-place and copy-out path transforms. Translation is the most common —
|
|
9332
9520
|
* called every pointermove during a drag — so the polygon variant mutates
|
|
@@ -9947,8 +10135,12 @@ interface PaintBindContext {
|
|
|
9947
10135
|
* unit, and return the `v` the ramp's own row sits at — every ramp in a
|
|
9948
10136
|
* frame shares one texture, so a paint must sample at the returned `v` and
|
|
9949
10137
|
* not at a constant.
|
|
10138
|
+
*
|
|
10139
|
+
* `space` is the blend the stops are baked through, defaulting to `'rgb'`.
|
|
10140
|
+
* It is part of the atlas key, so the same stops under two spaces take two
|
|
10141
|
+
* rows rather than colliding.
|
|
9950
10142
|
*/
|
|
9951
|
-
bindRamp(stops: GradStop[], unit: number): number;
|
|
10143
|
+
bindRamp(stops: GradStop[], unit: number, space?: ColorSpace): number;
|
|
9952
10144
|
}
|
|
9953
10145
|
/**
|
|
9954
10146
|
* One paint kind.
|
|
@@ -9987,7 +10179,15 @@ interface PaintKindEntry {
|
|
|
9987
10179
|
inPoseFrame?(fill: FillStyle, box: FillPoseBox): FillStyle;
|
|
9988
10180
|
/** The inverse. Required whenever `inPoseFrame` is supplied. */
|
|
9989
10181
|
toBoundsFrame?(fill: FillStyle, box: FillPoseBox): FillStyle;
|
|
9990
|
-
/**
|
|
10182
|
+
/**
|
|
10183
|
+
* The `<defs>` entry backing a `url(#id)` reference.
|
|
10184
|
+
*
|
|
10185
|
+
* SVG has paint servers for two gradients and a pattern and nothing else, so
|
|
10186
|
+
* a kind beyond those has no element to target: write a foreign-namespaced
|
|
10187
|
+
* one under the `wzl:` prefix `@weasel-js/svg` declares on the root whenever
|
|
10188
|
+
* a document holds such a paint. That package emits the fallback color
|
|
10189
|
+
* beside the reference on its own, from `colorOf`.
|
|
10190
|
+
*/
|
|
9991
10191
|
toSvg?(id: string, fill: FillStyle): string;
|
|
9992
10192
|
}
|
|
9993
10193
|
/**
|
|
@@ -10559,32 +10759,6 @@ declare function alignInsertBehavior<TPose>(args: AlignmentBehaviorBase): Insert
|
|
|
10559
10759
|
* candidates. The pinned (anchor) edge stays fixed. Publishes the line(s). */
|
|
10560
10760
|
declare function alignResizeBehavior<TPose extends Bounds>(args: AlignmentBehaviorBase): BoundsConstraint<TPose>;
|
|
10561
10761
|
|
|
10562
|
-
/** AABB center of an unrotated rect — the canonical rotation pivot. */
|
|
10563
|
-
declare function aabbCenter(bounds: Bounds): {
|
|
10564
|
-
x: number;
|
|
10565
|
-
y: number;
|
|
10566
|
-
};
|
|
10567
|
-
/** Rotate `(px, py)` by `angle` (radians) around `(cx, cy)`. */
|
|
10568
|
-
declare function rotatePoint(px: number, py: number, cx: number, cy: number, angle: number): {
|
|
10569
|
-
x: number;
|
|
10570
|
-
y: number;
|
|
10571
|
-
};
|
|
10572
|
-
/** Four corners of an unrotated rect, in TL/TR/BR/BL order. */
|
|
10573
|
-
declare function rectCorners(bounds: Bounds): {
|
|
10574
|
-
x: number;
|
|
10575
|
-
y: number;
|
|
10576
|
-
}[];
|
|
10577
|
-
/** Four corners of a rotated rect (rotation around AABB center), in
|
|
10578
|
-
* TL/TR/BR/BL order. Useful for selection-overlay rendering. */
|
|
10579
|
-
declare function rotatedRectCorners(pose: RotatedPose): {
|
|
10580
|
-
x: number;
|
|
10581
|
-
y: number;
|
|
10582
|
-
}[];
|
|
10583
|
-
/** Hit-test a world point against a rotated rect (rotation around AABB
|
|
10584
|
-
* center). Standard pattern: invert the rotation and AABB-test in the
|
|
10585
|
-
* rect's local frame. */
|
|
10586
|
-
declare function pointInRotatedRect(pose: RotatedPose, worldX: number, worldY: number): boolean;
|
|
10587
|
-
|
|
10588
10762
|
/** Default world-space distance from the rect's top edge to the rotation
|
|
10589
10763
|
* handle's center. Matches the demo's visual default; consumers can
|
|
10590
10764
|
* override per-call. Unscaled — kit-internal use sites multiply by
|
|
@@ -11232,35 +11406,34 @@ interface MomentumOptions {
|
|
|
11232
11406
|
*/
|
|
11233
11407
|
declare function momentum<TPose>(opts: MomentumOptions): MoveBehavior<TPose>;
|
|
11234
11408
|
|
|
11235
|
-
/**
|
|
11236
|
-
|
|
11237
|
-
|
|
11238
|
-
|
|
11239
|
-
|
|
11240
|
-
|
|
11241
|
-
|
|
11242
|
-
|
|
11243
|
-
|
|
11244
|
-
|
|
11245
|
-
|
|
11246
|
-
|
|
11247
|
-
|
|
11248
|
-
|
|
11249
|
-
*
|
|
11250
|
-
*
|
|
11251
|
-
|
|
11252
|
-
|
|
11253
|
-
|
|
11254
|
-
|
|
11255
|
-
|
|
11256
|
-
|
|
11257
|
-
|
|
11258
|
-
*
|
|
11259
|
-
|
|
11260
|
-
|
|
11261
|
-
|
|
11262
|
-
|
|
11263
|
-
declare function lerpColorArray(from: readonly number[], to: readonly number[], t: number, space?: ColorSpace): number[];
|
|
11409
|
+
/** Most a slewed value may change per second, in its own units, in each
|
|
11410
|
+
* direction. A direction left out is unlimited: the value jumps to a target
|
|
11411
|
+
* on that side. `0` holds the value where it is. */
|
|
11412
|
+
interface SlewRates {
|
|
11413
|
+
rise?: number;
|
|
11414
|
+
fall?: number;
|
|
11415
|
+
}
|
|
11416
|
+
/**
|
|
11417
|
+
* One step of a slew limiter: `value` moved toward `target` by at most the
|
|
11418
|
+
* rate for that direction times `dt` seconds, landing on `target` rather than
|
|
11419
|
+
* passing it. A fast `rise` with a slow `fall` is an attack/release envelope.
|
|
11420
|
+
*/
|
|
11421
|
+
declare function slewToward(value: number, target: number, dt: number, rates: SlewRates): number;
|
|
11422
|
+
/** A value that follows `target` at limited rates. Both fields are writable:
|
|
11423
|
+
* set `target` to steer it, or write `value` to jump it and let it slew on
|
|
11424
|
+
* from there. Nothing moves until `step` is called. */
|
|
11425
|
+
interface Slew {
|
|
11426
|
+
value: number;
|
|
11427
|
+
target: number;
|
|
11428
|
+
/** Advance `dt` seconds and return the new value. */
|
|
11429
|
+
step(dt: number): number;
|
|
11430
|
+
}
|
|
11431
|
+
/** A stateful {@link slewToward}. `target` defaults to `value`, so a new slew
|
|
11432
|
+
* is at rest. */
|
|
11433
|
+
declare function createSlew(options?: SlewRates & {
|
|
11434
|
+
value?: number;
|
|
11435
|
+
target?: number;
|
|
11436
|
+
}): Slew;
|
|
11264
11437
|
|
|
11265
11438
|
/**
|
|
11266
11439
|
* Color interpolator: receives two flat RGBA float arrays (values in
|
|
@@ -11434,6 +11607,77 @@ declare const IDENTITY_JOINT: JointTransform;
|
|
|
11434
11607
|
*/
|
|
11435
11608
|
declare function blendPoses(poses: Pose[], weights: number[]): Pose;
|
|
11436
11609
|
|
|
11610
|
+
/** The part of a scene a rig writes to. */
|
|
11611
|
+
interface RigScene<TPose> {
|
|
11612
|
+
get(id: NodeId): {
|
|
11613
|
+
pose: TPose;
|
|
11614
|
+
} | undefined;
|
|
11615
|
+
readonly overrides: PoseOverrides<TPose>;
|
|
11616
|
+
setPose(id: NodeId, pose: TPose): void;
|
|
11617
|
+
batch<T>(label: string, fn: () => T): T;
|
|
11618
|
+
}
|
|
11619
|
+
interface RigApplyContext<TPose> {
|
|
11620
|
+
joint: string;
|
|
11621
|
+
node: NodeId;
|
|
11622
|
+
/** The node's document pose when the rig was bound — where it sits at the
|
|
11623
|
+
* bind pose. */
|
|
11624
|
+
rest: TPose;
|
|
11625
|
+
/** The joint's world transform at the bind pose. */
|
|
11626
|
+
restWorld: Mat3$1;
|
|
11627
|
+
/** `world * inverse(restWorld)`: the motion since the bind pose, in world
|
|
11628
|
+
* space. Carrying `rest` by it is what welding the node to the joint means. */
|
|
11629
|
+
fromRest: Mat3$1;
|
|
11630
|
+
}
|
|
11631
|
+
/** Turns a joint's world transform into a pose for one bound node. The only
|
|
11632
|
+
* part of a rig that knows the scene's pose shape. */
|
|
11633
|
+
type RigApply<TPose> = (world: Mat3$1, ctx: RigApplyContext<TPose>) => TPose;
|
|
11634
|
+
interface BindRigOptions<TPose> {
|
|
11635
|
+
scene: RigScene<TPose>;
|
|
11636
|
+
skeleton: Skeleton;
|
|
11637
|
+
/** Joint name → the node or nodes that ride it. Each node keeps the offset
|
|
11638
|
+
* from its joint that it has at the bind pose. */
|
|
11639
|
+
bindings: Readonly<Record<string, NodeId | readonly NodeId[]>>;
|
|
11640
|
+
/** Default: {@link rigidRigApply} over `descriptor`. */
|
|
11641
|
+
apply?: RigApply<TPose>;
|
|
11642
|
+
/** The descriptor the default `apply` reads and writes poses through.
|
|
11643
|
+
* Default `AUTO_POSE_DESCRIPTOR`. */
|
|
11644
|
+
descriptor?: PoseDescriptor<TPose>;
|
|
11645
|
+
}
|
|
11646
|
+
interface Rig {
|
|
11647
|
+
readonly skeleton: Skeleton;
|
|
11648
|
+
/**
|
|
11649
|
+
* Resolve `pose` and move every bound node to it, through the scene's pose
|
|
11650
|
+
* overrides — no history entry, no document write, no version bump — then
|
|
11651
|
+
* commit them. The per-frame write. `root` places the rig in the world, and
|
|
11652
|
+
* may mirror it.
|
|
11653
|
+
*/
|
|
11654
|
+
pose(pose: Pose, root?: Mat3$1): void;
|
|
11655
|
+
/** The joint world transforms the last `pose` resolved, root applied. */
|
|
11656
|
+
world(): ReadonlyMap<string, Mat3$1>;
|
|
11657
|
+
/** Write the current frame into the bound nodes' document poses as one
|
|
11658
|
+
* undo entry, and drop the overrides. Later frames stay relative to the
|
|
11659
|
+
* bind-time rest, so baking does not compound. */
|
|
11660
|
+
bake(label?: string): void;
|
|
11661
|
+
/** Drop the overrides; the nodes show their document poses again until the
|
|
11662
|
+
* next `pose`. */
|
|
11663
|
+
release(): void;
|
|
11664
|
+
}
|
|
11665
|
+
/**
|
|
11666
|
+
* Carries a node rigidly with its joint: the rest pose's center moves by
|
|
11667
|
+
* `fromRest`, and its rotation turns with the rest pose's x-axis. Scale in the
|
|
11668
|
+
* joint chain moves positions but not sizes — the pose model holds no shear,
|
|
11669
|
+
* and a sized pose under anisotropic scale would need one. Write an `apply`
|
|
11670
|
+
* that reads `world` to size nodes from joint scale.
|
|
11671
|
+
*/
|
|
11672
|
+
declare function rigidRigApply<TPose>(descriptor: PoseDescriptor<TPose>): RigApply<TPose>;
|
|
11673
|
+
/**
|
|
11674
|
+
* Bind a skeleton's joints to scene nodes. Nodes are written in world space
|
|
11675
|
+
* and the rig resolves its own hierarchy, so bound nodes are best left
|
|
11676
|
+
* unparented, or under containers whose pose does not compose into theirs;
|
|
11677
|
+
* the scene's tree stays free to order and group them for drawing.
|
|
11678
|
+
*/
|
|
11679
|
+
declare function bindRig<TPose>(options: BindRigOptions<TPose>): Rig;
|
|
11680
|
+
|
|
11437
11681
|
/**
|
|
11438
11682
|
* Resolve every joint's world transform by walking the skeleton once and
|
|
11439
11683
|
* composing each joint onto its already-resolved parent.
|
|
@@ -11445,6 +11689,13 @@ declare function blendPoses(poses: Pose[], weights: number[]): Pose;
|
|
|
11445
11689
|
*/
|
|
11446
11690
|
declare function resolveSkeleton(skeleton: Skeleton, pose: Pose): Map<string, Mat3$1>;
|
|
11447
11691
|
|
|
11692
|
+
/**
|
|
11693
|
+
* A {@link Rig} bound for the component's lifetime, its overrides dropped on
|
|
11694
|
+
* unmount. Rebinds — re-reading every node's rest pose — whenever an option's
|
|
11695
|
+
* identity changes, so hoist or memoize `skeleton` and `bindings`.
|
|
11696
|
+
*/
|
|
11697
|
+
declare function useRig<TPose>(options: BindRigOptions<TPose>): Rig;
|
|
11698
|
+
|
|
11448
11699
|
/** Snap policy that never picks a target — every drop is rejected, which is
|
|
11449
11700
|
* what a free-form container wants. */
|
|
11450
11701
|
declare function none<TPose>(): LayoutSnap<TPose>;
|
|
@@ -11505,10 +11756,24 @@ interface TileGridOptions<TPose> {
|
|
|
11505
11756
|
width: number;
|
|
11506
11757
|
height: number;
|
|
11507
11758
|
}, dragged: TPose): TPose;
|
|
11759
|
+
/** Optional: the point that decides which cell a child occupies — a child
|
|
11760
|
+
* occupies the cell containing it. Default reads `x`/`y` plus half of
|
|
11761
|
+
* `width`/`height` when the pose has them, which is the center of a
|
|
11762
|
+
* `RectPose` and the point itself for a point pose. */
|
|
11763
|
+
centerOf?(pose: TPose): {
|
|
11764
|
+
x: number;
|
|
11765
|
+
y: number;
|
|
11766
|
+
};
|
|
11508
11767
|
}
|
|
11509
|
-
/**
|
|
11510
|
-
*
|
|
11511
|
-
*
|
|
11768
|
+
/**
|
|
11769
|
+
* Layout strategy that arranges children into a fixed grid of cells, one
|
|
11770
|
+
* child per cell, and the container holds at most `cols × rows` children.
|
|
11771
|
+
*
|
|
11772
|
+
* A child occupies the cell its pose sits in (see `centerOf`). A drag from
|
|
11773
|
+
* inside the container swaps with the child in the cell it lands on; a drop
|
|
11774
|
+
* from outside is offered only the free cells, so it lands in the nearest
|
|
11775
|
+
* free one and a full grid rejects it.
|
|
11776
|
+
*/
|
|
11512
11777
|
declare function tileGrid<TPose>(opts: TileGridOptions<TPose>): LayoutStrategy<TPose>;
|
|
11513
11778
|
|
|
11514
11779
|
/** Which points within a container a child can snap to. */
|
|
@@ -11699,4 +11964,4 @@ interface InsertOverlayStyle {
|
|
|
11699
11964
|
lineWidth?: number;
|
|
11700
11965
|
}
|
|
11701
11966
|
|
|
11702
|
-
export { ANCHOR_HIT_BASE_PX, type ActionShortcut, ActionsProviderIfRoot, type Affordance, type AffordanceBinding, type AffordanceRegion, type AffordanceRegionHit, type AlignAdapter, type AlignAnchor, type AlignEdge, type AlignMatchResult, type AlignMoveArgs, type AlignmentBehaviorBase, type AnchorHit, type AnchorScratch, type AnchorState, type AnimateOnSetPoseOptions, AnimationHandle, Animator, type AnyTool, AreaSelectAdapter, type ArrayAdapter, type ArrayAdapterConfig, ArrowIcon, BUILTIN_MARKERS, BUNDLE_TOOLS, BooleansAdapter, BoundsConstraint, 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 ColorSpace, type CommonAffordanceScratch, type ComposeSelectionPoseOpts, type ComputeFitViewOptions, type Condition, ContentHandlerEntry, type Contribution, type ContributionChrome, type CornerResizeAffordanceOptions, type CornerResizeScratch, type CreateChildrenLayerOpts, type CreateParallaxLayerOpts, type CreatePathEditingOverlayLayerOptions, type CreatePathLayerOpts, type CreatePenPreviewLayerOptions, type CreateTextLayerOpts, type CreateViewResolverOpts, type CreateViewportLayerOpts, CropIcon, CursorCoordsHud, type CursorCoordsHudProps, type CurveRepKind, type CurveRepresentation, type CustomLayerEntry, type CustomPaintContext, type CycleHandle, type CycleVertexColorsOptions, DEFAULT_ALPHA_DECAY, DEFAULT_ALPHA_MIN, 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, DEFAULT_VELOCITY_DECAY, type DebugConfig, type DebugFeature, type DebugSnapshot, type DebugStroke, type DebugStrokes, type DebugTheme, type DefaultTextData, DepRegistryProviderIfRoot, type DeriveAlignmentGuidesOptions, DerivedDep, DeviceProfileProvider, type DeviceProfileProviderProps, type Dims, type Discriminator, type DistributeAdapter, type DistributeAxis, type DistributeMode, 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, EasingSpec, Effect, EllipseIcon, ExcludeIcon, EyedropperIcon, FALLBACK_FIT_VIEW, type FeedDelta, type FeedNode, type FillPoseBox, type FitTextPoseOptions, type FlagKey, type FreeformOptions, GHOST_STROKE, type GateLayerOptions, GeometryProjection, type GesturePreviewSource, type GestureSource, type GridLayerOpts, type GridSlotConfig, 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 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 LabelOptions, LassoHitMode, LassoIcon, LassoSelectAdapter, LassoSelectBehavior, type LayerCommandCache, type LayerDrawFailure, LayerEnumerableAdapter, type LayerGroup, type LayerHit, type LayerSlotValue, type LayersMap, LayoutSnap, LayoutStrategy, type LifecycleAnimation, LineIcon, type LinePoint, MIXED, MOVE_ANCHORS, type MarkerCtx, type MarkerEntry, type MarkerPaint, type MarkerSite, type MarkerSiteRequest, Mat3$1 as Mat3, 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, Path, type PathAnchor, type PathAnchorAffordanceOptions, PathBuilder, PathDrawCommand, type PathEditingOverlayStyle, PathFillRule, type PathInWorldPose, type PathStation, type PenAnchor, PenIcon, type PenPreviewStyle, type PenScratch, type PenSubpath, PencilIcon, type PencilPoint, PickHud, type PickHudProps, type PickTopMostHitAdapter, type PinchZoomOptions, type PixelRenderPlan, type PointAlongPathOptions, 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, type Pt, ROTATION_HANDLE_BASE_PX, type RangeStyle, type RasterImage, type RecordedBounds, type RecordedHandle, type RecordedHitbox, type RecordedLayer, type RecordedOrigin, type RecordedSnap, RectIcon, RectPath, RectPose, type RegisterNodeShapeOptions, RegisteredOp, type RenderLayer, type RenderSceneToCanvasArgs, type RenderSceneToPixelsArgs, type ReorderDirection, ResizeAdapter, type ResolvableView, type ResolvedOverlay, 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, SerializedScene, type SetFlagResult, type SetPathFields, ShaderProgramHandle, type ShapeCoversPointOptions, type SharedAnchor, type Simulation, type SimulationCore, type SimulationForce, type SimulationNode, type SimulationOptions, type Skeleton, 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 TileGridOptions, type TilePatternOpts, 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, UnionIcon, Unit, 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 UseKeybindingsOptions, type UseLassoSelectOptions, type UseLassoToolOptions, UseMoveOptions, type UseNodeOverlayFrameOptions, type UsePenToolOptions, type UsePointerStylusOptions, type UsePolygonToolOptions, type UsePoseRunOptions, UseResizeOptions, type UseResizePolicyOptions, type UseRotateOptions, type UseRotateToolOptions, UseSceneOptions, type UseSceneTextEditOptions, type UseSceneTextEditReturn, type UseSceneTrivialOptions, type UseSelectToolOptions, type UseSelectionOptions, type UseSimulationOptions, type UseStandardActionsOptions, type UseStarToolOptions, type UseTextEditOptions, type UseTextEditReturn, type UseToolsOptions, VERSION, type Vec2, 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, aabbCenter, actionIs, actionShortcuts, alignDeltaFor, alignInsertBehavior, alignMoveBehavior, alignResizeBehavior, always, and, animateLifecycle, animateOnSetPose, annulusSemiAxes, applyOpsTo, applyStyleToRange, areaSelectAction, arrayAdapter, asPaint, axisAlignedBounds, bezierCubic, bezierQuadratic, blendPoses, boundsOfPath, buildChromeCtx, buildSceneViewCommands, canBringForward, canHover, canSendBackward, capabilityAll, capabilityIn, capabilityIs, capabilityNot, caretIndexAt, cellAt, charOffsetToDomPosition, clampView, clearSelectionAction, clipboardCopyAction, clipboardCutAction, cloneAction, coarsePointer, composeAffordanceLayer, composePath, composeSelectionPose, computeFitView, computeFitViewport, computeIndicatorCommand, computeWheelAction, cond, constrainTo45, containedThenNearest, countPathAnchors, createCellHighlightLayer, createChildrenLayer, createCornerResizeAffordance, createDebugOverlayLayer, createDebugSink, createDeleteOp, createGridLayer, createGuidesLayer, createHistory, createInsertOp, createMoveToIndexOp, createNodeProperties, createNodeRouting, createPaintedCursorLayer, createParallaxLayer, createPathAnchorAffordances, createPathEditingOverlayLayer, createPathLayer, createPenPreviewLayer, createPoseFeed, createPoseOverrides, createReorderOp, createReparentOp, createRotationAffordance, createScene, createSelectionHandlesLayer, createSelectionOutlineLayer, createSelectionOverlayLayer, createSetDataOp, createSetLayerOp, createSetPathOp, createSetSelectionOp, createSetTextOp, createSimulation, createTextLayer, createTilePattern, createTransformOp, createVelocityTracker, createViewResolver, createViewportLayer, cycleVertexColors, decomposePath, defaultCommitAdapter, defaultDrawOne, defaultLabelTextRenderer, defaultNodeProperties, defaultNodeRouting, defaultVisibilityRules, defineTool, defineViewportTool, deriveAlignmentGuides, deriveParallaxView, derivedDepOf, derivedPose, dispatchApplyBatch, dlog, documentPose, domPositionToCharOffset, domToRuns, drawLayers, drawOneLayer, dwarn, editAnchorsAction, effectivePose, ellipsePath, enterTextEditAction, enumerateAnchors, 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, isPatternSpec, keySpecShortcut, lassoSelectAction, lerpColorArray, lerpOklab, lerpOklch, linePath, listMarkers, listPaintKinds, makePinchZoomAction, makeViewportWheelPanAction, makeViewportZoomAction, markerDrawCommands, markerInset, markerKeyOf, markerSites, matchAlignment, meanScale, mergeAlphaFromPrev, modeIn, modeIs, modeNot, modifierHeld, momentum, moveAction, multiActive, nearest, nearestWithin, nestedHitTester, never, nodeHasFlag, none, normalizeHex, normalizeView, normalizeZoom, not, nurbs, oklabToOklch, oklabToSrgbU8, oklchToOklab, openFilePicker, or, paintAlpha, paintKindOf, paintWithAlpha, paintWithColor, parseColor, parseColorToRgba255, parseDebugFlags, pathContainsPoint, pathContainsPolygon, pathContainsRect, pathDistanceToPoint, pathDivide, pathExclude, pathFromD, pathInPoseFrame, pathInWorld, pathIntersect, pathIntersectsPolygon, pathIntersectsRect, pathOriginProjection, pathPoseDescriptor, pathSubtract, pathToAnchors, pathUnion, pickTopMostHit, pinchZoomAction, planPixelRender, pointAlongPath, pointInPath, pointInRotatedRect, pointInTextPose, polygonFromPoints, polylineFromPoints, poseRotationOf, prefUnit, pressureToWidth, pxExtent, rainbowVertexColors, rebuildOp, rectCorners, rectPath, registerMarker, registerNodeShape, registerOpFactory, registerPaintKind, registeredOpNames, regularPolygonPath, renderLabel, renderSceneToCanvas, renderSceneToPixels, resizeAction, resolveColor, resolveFillPattern, resolveMarkerSize, resolveOverlays, resolvePatternSpec, resolvePreviews, resolveSkeleton, resolveVisibility, rgbaToHex, rotateAction, rotateAroundAABBCenter, rotatePathAround, rotatePoint, rotatedRectCorners, rotationDegreesUnit, rotationHandle, roundToCell, runsToDom, sampleGradientStops, sampleTrack, scaleDelta, scalePathToBounds, sceneFromJSON, sceneNodeClientRect, sceneSelectionStore, sceneToAdapter, screenToWorld, selectFromLasso, selectionAtLeast, selectionEmpty, selectionIs, setFlagOverRange, shapeCoversPoint, sliceAction, snap, snapPoint, solid, solidVertexColors, spiro, splitPathByLine, splitSubpaths, springPose, springVertexColors, srgbU8ToOklab, staggerVertexColors, starPath, startThresholdDrag, strokeInsets, strokeOf, strokeWith, styleAtRange, subscribeImageReady, textCommand, textCommandFromPose, textCommandFromRuns, tileGrid, toHex8, transformPath, translatePath, translatePolygonInPlace, 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, useKeybindings, useLassoTool, useLineTool, useNodeOverlayFrame, usePenTool, usePencilTool, usePinchGesture, usePointerStylus, usePolygonTool, usePoseCompositionDepSource, usePoseDescriptorDepSource, usePoseRun, usePublishSelection, useRectTool, useResizePolicy, useRotateTool, 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 };
|
|
11967
|
+
export { ANCHOR_HIT_BASE_PX, type ActionShortcut, ActionsProviderIfRoot, type Affordance, type AffordanceBinding, type AffordanceRegion, type AffordanceRegionHit, type AlignAdapter, type AlignAnchor, type AlignEdge, type AlignMatchResult, type AlignMoveArgs, 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, 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, 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, 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, DepRegistryProviderIfRoot, type DeriveAlignmentGuidesOptions, DerivedDep, DeviceProfileProvider, type DeviceProfileProviderProps, type Dims, type Discriminator, type DistributeAdapter, type DistributeAxis, type DistributeMode, 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, EasingSpec, Effect, EllipseIcon, ExcludeIcon, EyedropperIcon, FALLBACK_FIT_VIEW, type FeedDelta, type FeedNode, type FillPoseBox, type FitTextPoseOptions, type FlagKey, type FreeformOptions, GHOST_STROKE, type GateLayerOptions, GeometryProjection, type GesturePreviewSource, type GestureSource, type GridLayerOpts, type GridSlotConfig, 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 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, 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, Mat3$1 as Mat3, 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, 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, type Pt, ROTATION_HANDLE_BASE_PX, type RangeStyle, type RasterImage, type RecordedBounds, type RecordedHandle, type RecordedHitbox, type RecordedLayer, type RecordedOrigin, type RecordedSnap, RectIcon, RectPath, RectPose, 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, SerializedScene, type SetFlagResult, type SetPathFields, ShaderProgramHandle, type ShapeCoversPointOptions, 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, UnionIcon, Unit, 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, Vec2, 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, 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, cycleVertexColors, decomposePath, defaultCommitAdapter, defaultDrawOne, defaultLabelTextRenderer, defaultNodeProperties, defaultNodeRouting, defaultVisibilityRules, defineTool, defineViewportTool, 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, 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, translatePolygonInPlace, 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 };
|