@weasel-js/core 1.4.2 → 1.4.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +375 -0
- package/dist/{DrawCommand-Ch8W63oQ.d.ts → DrawCommand-CD-ug3d9.d.ts} +45 -1
- package/dist/{stroke-Dq8nL4A2.d.ts → builtins-CtGORLCG.d.ts} +51 -2
- package/dist/{chunk-2KKYDDDD.js → chunk-4RJP2N2L.js} +43 -21
- package/dist/chunk-4RJP2N2L.js.map +1 -0
- package/dist/{chunk-MXFSHJOM.js → chunk-D4AAWR64.js} +4 -4
- package/dist/{chunk-MXFSHJOM.js.map → chunk-D4AAWR64.js.map} +1 -1
- package/dist/{chunk-ZB7UYJVG.js → chunk-DOBSZOPR.js} +3 -3
- package/dist/{chunk-ZB7UYJVG.js.map → chunk-DOBSZOPR.js.map} +1 -1
- package/dist/{chunk-TORKRNFY.js → chunk-LEURURX3.js} +68 -5
- package/dist/chunk-LEURURX3.js.map +1 -0
- package/dist/{chunk-Y5KS66G7.js → chunk-ORZNKVXM.js} +3 -3
- package/dist/{chunk-Y5KS66G7.js.map → chunk-ORZNKVXM.js.map} +1 -1
- package/dist/{chunk-67KE7SDP.js → chunk-T3UQ3F6R.js} +4 -4
- package/dist/{chunk-67KE7SDP.js.map → chunk-T3UQ3F6R.js.map} +1 -1
- package/dist/{chunk-KIVJXUYE.js → chunk-WYPSGIYS.js} +1058 -503
- package/dist/chunk-WYPSGIYS.js.map +1 -0
- package/dist/clipboard.d.ts +2 -2
- package/dist/clipboard.js +3 -3
- package/dist/clone.d.ts +2 -2
- package/dist/clone.js +3 -3
- package/dist/{geometry-Dtt_k6Dq.d.ts → geometry-CHR36Ub_.d.ts} +3 -3
- package/dist/{grid-nnXU4VjN.d.ts → grid-Bw8cSde-.d.ts} +1 -1
- package/dist/index.d.ts +117 -232
- package/dist/index.js +7 -7
- package/dist/insert.d.ts +3 -3
- package/dist/move.d.ts +4 -4
- package/dist/move.js +2 -2
- package/dist/{options-CdFl510T.d.ts → options-DYfUlZxk.d.ts} +1 -1
- package/dist/{pointSnapToGrid-Dmthv94u.d.ts → pointSnapToGrid-D1bRdq-j.d.ts} +2 -2
- package/dist/{registry-BwY_DxJM.d.ts → registry-DnoTWGED.d.ts} +98 -8
- package/dist/renderer.d.ts +32 -4
- package/dist/renderer.js +7 -7
- package/dist/resize.d.ts +4 -4
- package/dist/routing.d.ts +6 -6
- package/dist/routing.js +1 -1
- package/dist/{types-miXHGrZM.d.ts → types-BJqsTlXl.d.ts} +1 -1
- package/dist/{types-XBcDEp3Y.d.ts → types-CoVTbo_y.d.ts} +9 -0
- package/dist/{types-DIQAisSG.d.ts → types-H7o6MaPo.d.ts} +20 -1
- package/package.json +9 -9
- package/dist/chunk-2KKYDDDD.js.map +0 -1
- package/dist/chunk-KIVJXUYE.js.map +0 -1
- package/dist/chunk-TORKRNFY.js.map +0 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,33 +1,33 @@
|
|
|
1
1
|
import * as React$1 from 'react';
|
|
2
|
-
import React__default, { RefObject, ReactNode, Ref, MouseEvent
|
|
2
|
+
import React__default, { RefObject, ReactNode, Ref, MouseEvent, ComponentType, MutableRefObject } from 'react';
|
|
3
3
|
import { a as ViewTransform, V as View, Z as ZoomBound, b as ZoomFactor } from './view-DSQgxBJB.js';
|
|
4
4
|
export { s as screenToWorld, v as viewToTransform, w as worldToScreen } from './view-DSQgxBJB.js';
|
|
5
|
-
import { a as UnitValue, b as UnitSystem, U as UseMoveOptions, O as OriginProjection } from './grid-
|
|
6
|
-
export { I as IMPERIAL_INCHES, M as METRIC_MM, P as PIXELS, R as RECT_ORIGIN_PROJECTION, c as Unit, f as formatUnit, g as gridSnapStrategy, p as pointToGridCell, r as resolveUnit } from './grid-
|
|
7
|
-
import { R as RenderLayer, D as Dims, a as DeviceProfile, b as DetectedDeviceFacts, C as Condition, c as Rule, d as RuleCtx, V as VisibilityRules, e as ChromeCtx, f as ChromeId, A as Action, I as InertiaConfig, g as ViewAnimationOptions, h as DepSchema, S as SliceDep, i as ActionsRegistry, T as Tool, j as AffordanceHit, k as Dispatcher, l as ToolDef, m as ViewportToolDef, n as AnyTool, O as OverlayPosition, o as ToolKeybinding, H as HotkeyTrigger, L as LayerHit, p as OngoingOverlay, q as ChromeState,
|
|
8
|
-
export {
|
|
5
|
+
import { a as UnitValue, b as UnitSystem, U as UseMoveOptions, O as OriginProjection } from './grid-Bw8cSde-.js';
|
|
6
|
+
export { I as IMPERIAL_INCHES, M as METRIC_MM, P as PIXELS, R as RECT_ORIGIN_PROJECTION, c as Unit, f as formatUnit, g as gridSnapStrategy, p as pointToGridCell, r as resolveUnit } from './grid-Bw8cSde-.js';
|
|
7
|
+
import { R as RenderLayer, D as Dims, a as DeviceProfile, b as DetectedDeviceFacts, C as Condition, c as Rule, d as RuleCtx, V as VisibilityRules, e as ChromeCtx, f as ChromeId, A as Action, I as InertiaConfig, g as ViewAnimationOptions, h as DepSchema, S as SliceDep, i as ActionsRegistry, T as Tool, j as AffordanceHit, k as Dispatcher, l as ToolDef, m as ViewportToolDef, n as AnyTool, O as OverlayPosition, o as ToolKeybinding, H as HotkeyTrigger, L as LayerHit, p as OngoingOverlay, q as ChromeState, r as SelectionApi, s as LayerGroup, U as UseSelectionOptions, t as InsertExtras, B as BuiltinShapeToolId, G as GeometryProjection, u as ContentHandlerEntry, v as SvgIngestOptions, P as PanBounds, w as ActionsProp, x as Animator, y as Affordance, z as AffordanceRegion, E as AffordanceBinding, F as CommonAffordanceScratch, J as ColorOverrideRegistry, K as BooleansAdapter, M as UseAnimatorOptions, N as SpringPresetName, Q as EasingSpec, W as AnimationHandle, X as VertexColorChannel, Y as SampledTrack, Z as Eligibility, _ as BindingScope, $ as Contribution, a0 as ScopedBinding } from './registry-DnoTWGED.js';
|
|
8
|
+
export { a1 as ALWAYS, a2 as ActionDeps, a3 as ActionDisabledReason, a4 as ActionEnabledResult, a5 as ActionEntry, a6 as ActionsProvider, a7 as ActionsScope, a8 as ActiveToolContextProvider, a9 as ActiveToolContextProviderIfRoot, aa as ActiveToolContextProviderProps, ab as ActiveToolContextValue, ac as AnimateToBoundsOptions, ad as AreaSelectDep, ae as BezierEasing, af as BindingOpts, ag as BooleanOp, ah as BooleanOpResult, ai as BoundGesture, aj as BuildRuleCtxArgs, ak as ClaimableGesture, al as ClipboardDep, am as ClipboardIngestCtx, an as ColorOverride, ao as ColorOverrideFn, ap as CustomPaintContext, aq as DecayLoopConfig, ar as DecayOptions, as as DepName, at as DepRegistry, au as DepRegistryProvider, av as DispatcherContext, aw as DragSample, ax as EASINGS, ay as EasingFn, az as EasingName, aA as EditAnchorsDep, aB as EventTrack, aC as GestureBinding, aD as IDENTITY_POSE_COMPOSITION, aE as ImmediateInvoker, aF as IngestCtx, aG as IngestionDep, aH as InsertDep, aI as Interpolate, aJ as InterpolatorFactory, aK as InvocationCtx, aL as Invoker, aM as KIT_SHAPE_KINDS, aN as Keyframe, aO as LassoSelectDep, aP as LayerCommandCache, aQ as LayerDrawFailure, aR as LayoutDep, aS as LoopFactory, aT as LoopOptions, aU as MatchResult, aV as NEVER, aW as NestedTimeline, aX as NodeAtPointDep, aY as OngoingHandle, aZ as OngoingInvoker, a_ as PhysicsHandle, a$ as PhysicsOptions, b0 as Point2, b1 as PointerContextProvider, b2 as PointerContextValue, b3 as PointerWorldPos, b4 as PoseAdapter, b5 as PoseComposition, b6 as ResizePolicy, b7 as ResolveAllOptions, b8 as ResolveOnlyResult, b9 as ResolvedCandidate, ba as SPRING_PRESETS, bb as SelectionExtendKey, bc as SelectionMode, bd as Selector, be as SnapDep, bf as SpringOptions, bg as SpringPreset, bh as StaggerBuilder, bi as StaggerDelay, bj as StaggerFactory, bk as StaggerOptions, bl as StaggerPerItem, bm as StaggerSpringPoseOptions, bn as StaggerTweenOptions, bo as SvgUnpacker, bp as TextEditDep, bq as TimelineHandle, br as TimelineOptions, bs as TimelineTrack, bt as ToolCtx, bu as ToolModifiers, bv as ToolPresentation, bw as ToolSlot, bx as Track, by as TweenLoopOptions, bz as TweenOptions, bA as UiOngoingControl, bB as VIEW_ANIMATION_KEY, bC as ViewAnimationApi, bD as ViewApi, bE as ViewChannel, bF as actionBindings, bG as applyBooleanOp, bH as buildRuleCtx, bI as clipboardCopyAction, bJ as clipboardCutAction, bK as composeRectPose, bL as composeWorldPose, bM as createDispatcher, bN as cubicBezierEasing, bO as decomposeRectPose, bP as describeRule, bQ as drawLayers, bR as drawOneLayer, bS as easeIn, bT as easeInBack, bU as easeInBounce, bV as easeInCirc, bW as easeInCubic, bX as easeInElastic, bY as easeInExpo, bZ as easeInOut, b_ as easeInOutBack, b$ as easeInOutBounce, c0 as easeInOutCirc, c1 as easeInOutCubic, c2 as easeInOutElastic, c3 as easeInOutExpo, c4 as easeInOutQuad, c5 as easeInOutQuart, c6 as easeInOutQuint, c7 as easeInOutSine, c8 as easeInQuad, c9 as easeInQuart, ca as easeInQuint, cb as easeInSine, cc as easeOut, cd as easeOutBack, ce as easeOutBounce, cf as easeOutCirc, cg as easeOutCubic, ch as easeOutElastic, ci as easeOutExpo, cj as easeOutQuad, ck as easeOutQuart, cl as easeOutQuint, cm as easeOutSine, cn as enterTextEditAction, co as evaluate, cp as evaluateEnabled, cq as isLayerPainted, cr as isLayerVisible, cs as linear, ct as rebaseLocalPose, cu as registerContentHandler, cv as resolveEasing, cw as resolveParams, cx as sliceAction, cy as specificity, cz as translateRectPose, cA as useAction, cB as useActionsRegistry, cC as useActiveToolContext, cD as useDecayLoop, cE as useDepRegistry, cF as useDepSource, cG as useOptionalActiveToolContext, cH as useOptionalDepRegistry, cI as usePointerContext, cJ as useSelection, cK as useViewAnimation, cL as worldPoseLookup } from './registry-DnoTWGED.js';
|
|
9
9
|
import { Stroke, FillStyle, TextureHandle, TilePatternSpec, GradientKind, GradStop, GradientFill, GradientUnits, MarkerKey, MarkerRef } from '@weasel-js/paint';
|
|
10
10
|
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';
|
|
11
|
-
import { R as RectPose, S as Scene, N as NodeId, a as Node$1, b as SerializedScene, U as UseSceneOptions, c as SceneRegistry, d as RegisteredOp } from './types-
|
|
12
|
-
export { A as AddLayerSpec, e as AddNodeSpec, C as ContainerNode, L as LayerRecord, f as LeafNode, P as PoseOverride, g as PoseOverrides, h as SerializedNode, i as SystemLayerRecord, j as SystemLayerSpec, k as UserLayerRecord, l as asNodeId } from './types-
|
|
13
|
-
import { B as Bounds, P as PoseProjection, V as ViewportDims } from './geometry-
|
|
14
|
-
export { F as FitViewToBoundsOptions, R as RECT_POSE_DESCRIPTOR, a as ROTATED_POSE_DESCRIPTOR, f as fitViewToBounds } from './geometry-
|
|
11
|
+
import { R as RectPose, S as Scene, N as NodeId, a as Node$1, b as SerializedScene, U as UseSceneOptions, c as SceneRegistry, d as RegisteredOp } from './types-H7o6MaPo.js';
|
|
12
|
+
export { A as AddLayerSpec, e as AddNodeSpec, C as ContainerNode, L as LayerRecord, f as LeafNode, P as PoseOverride, g as PoseOverrides, h as SerializedNode, i as SystemLayerRecord, j as SystemLayerSpec, k as UserLayerRecord, l as asNodeId } from './types-H7o6MaPo.js';
|
|
13
|
+
import { B as Bounds, P as PoseProjection, V as ViewportDims } from './geometry-CHR36Ub_.js';
|
|
14
|
+
export { F as FitViewToBoundsOptions, R as RECT_POSE_DESCRIPTOR, a as ROTATED_POSE_DESCRIPTOR, f as fitViewToBounds } from './geometry-CHR36Ub_.js';
|
|
15
15
|
import { GestureSpec, BodyClassification, IngestItem } from '@weasel-js/gestures';
|
|
16
16
|
export { ClickSpec, DragSpec, DropSpec, GestureSpec, IngestItem, InputEvent, KeyHeldSpec, KeySpec, ModSpec, MultiTouchSpec, PasteSpec, TargetSpec, WheelSpec } from '@weasel-js/gestures';
|
|
17
|
-
import { M as ModifierState, R as ResizePose, B as BoundsConstraint, P as PointSnapBehavior, L as LassoSelectBehavior, a as RotatedPose, e as RotateBehavior, S as SnapStrategy, c as ResizeAnchor, b as MoveBehavior, I as InsertBehavior } from './types-
|
|
18
|
-
export { A as ActionBehavior, f as AreaSelectOverlay, g as BehaviorMoveResult, h as BehaviorResult, C as CloneBehavior, i as CloneLayer, j as ClonePose, G as GestureContext, k as GroupTransform, l as InsertMoveResult, m as InsertOverlay, n as InsertPoint, o as InsertProposed, p as LassoSelectMoveResult, q as LassoSelectOverlay, r as LassoSelectPose, s as LassoSelectProposed, t as PointSnapContext, d as PointSnapFrame, u as PointSnapResult, v as PointerState, w as ResizeMoveResult, x as ResizeOverlay, y as ResizeProposed, z as RotateMoveResult, D as RotateOverlay, E as RotateProposed } from './types-
|
|
19
|
-
import { U as UseResizeOptions } from './pointSnapToGrid-
|
|
20
|
-
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-
|
|
17
|
+
import { M as ModifierState, R as ResizePose, B as BoundsConstraint, P as PointSnapBehavior, L as LassoSelectBehavior, a as RotatedPose, e as RotateBehavior, S as SnapStrategy, c as ResizeAnchor, b as MoveBehavior, I as InsertBehavior } from './types-BJqsTlXl.js';
|
|
18
|
+
export { A as ActionBehavior, f as AreaSelectOverlay, g as BehaviorMoveResult, h as BehaviorResult, C as CloneBehavior, i as CloneLayer, j as ClonePose, G as GestureContext, k as GroupTransform, l as InsertMoveResult, m as InsertOverlay, n as InsertPoint, o as InsertProposed, p as LassoSelectMoveResult, q as LassoSelectOverlay, r as LassoSelectPose, s as LassoSelectProposed, t as PointSnapContext, d as PointSnapFrame, u as PointSnapResult, v as PointerState, w as ResizeMoveResult, x as ResizeOverlay, y as ResizeProposed, z as RotateMoveResult, D as RotateOverlay, E as RotateProposed } from './types-BJqsTlXl.js';
|
|
19
|
+
import { U as UseResizeOptions } from './pointSnapToGrid-D1bRdq-j.js';
|
|
20
|
+
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-D1bRdq-j.js';
|
|
21
21
|
import { ResolvedCursor, CursorSpec } from '@weasel-js/cursor';
|
|
22
22
|
export { BakeOptions, CursorGlyph, CursorGlyphName, CursorGlyphSpec, CursorSpec, ResolvedCursor, bakeCursor, cursorFor, resolveCursor, resolveCursorTier } from '@weasel-js/cursor';
|
|
23
|
-
import { M as MoveAdapter, A as AreaSelectAdapter, R as RotateAdapter, b as LassoHitMode, c as LassoSelectAdapter, d as ResizeAdapter, L as LayoutStrategy, e as LayerEnumerableAdapter, I as InsertAdapter, C as ClipboardSnapshot, O as OrderedAdapter, a as SceneAdapter, f as LayoutSnap } from './types-
|
|
24
|
-
export { g as ContainerBounds, D as DropTarget, h as LayoutChild, i as LayoutContainer, j as LayoutDragged, S as SnapTarget } from './types-
|
|
23
|
+
import { M as MoveAdapter, A as AreaSelectAdapter, R as RotateAdapter, b as LassoHitMode, c as LassoSelectAdapter, d as ResizeAdapter, L as LayoutStrategy, e as LayerEnumerableAdapter, I as InsertAdapter, C as ClipboardSnapshot, O as OrderedAdapter, a as SceneAdapter, f as LayoutSnap } from './types-CoVTbo_y.js';
|
|
24
|
+
export { g as ContainerBounds, D as DropTarget, h as LayoutChild, i as LayoutContainer, j as LayoutDragged, S as SnapTarget } from './types-CoVTbo_y.js';
|
|
25
25
|
import { D as DebugSink, a as DebugConfig, b as DebugSnapshot, c as DebugStrokes, d as DebugTheme } from './types-BHK2dkMu.js';
|
|
26
26
|
export { e as DebugFeature, f as DebugStroke, H as HandleKind, g as HitShape, R as RecordedBounds, h as RecordedHandle, i as RecordedHitbox, j as RecordedLayer, k as RecordedOrigin, l as RecordedSnap } from './types-BHK2dkMu.js';
|
|
27
27
|
import { a as PolygonPath, P as Path, b as PathFillRule, R as RectPath } from './path-JEV2c5If.js';
|
|
28
28
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
29
|
-
import { D as DrawCommand, b as ShaderProgramHandle, P as PathDrawCommand, M as Mat3$1 } from './DrawCommand-
|
|
30
|
-
export { G as GroupDrawCommand, I as ImageDrawCommand, S as SPRITE_STRIDE, a as ShaderDrawCommand, c as ShaderUniform, e as SpritesDrawCommand, T as TextDrawCommand, m as mat3 } from './DrawCommand-
|
|
29
|
+
import { D as DrawCommand, b as ShaderProgramHandle, P as PathDrawCommand, M as Mat3$1 } from './DrawCommand-CD-ug3d9.js';
|
|
30
|
+
export { E as Effect, G as GroupDrawCommand, I as ImageDrawCommand, S as SPRITE_STRIDE, a as ShaderDrawCommand, c as ShaderUniform, e as SpritesDrawCommand, T as TextDrawCommand, m as mat3, r as registerEffect } from './DrawCommand-CD-ug3d9.js';
|
|
31
31
|
import { Op, HistorySelection, CreateHistoryOptions, History } from '@weasel-js/history';
|
|
32
32
|
export * from '@weasel-js/history';
|
|
33
33
|
export { Op } from '@weasel-js/history';
|
|
@@ -35,10 +35,10 @@ import { PlacementAlign, Rect, Mat3 } from '@weasel-js/geom';
|
|
|
35
35
|
export { PATH_C, PATH_CMD_LENGTHS, PATH_L, PATH_M, PATH_Q, PATH_Z, Rect, pathCommandCoordCount } from '@weasel-js/geom';
|
|
36
36
|
import { TextRenderer, TextPose, StyledRun, TextStyle, TextPaint, TextVerticalAlign } from '@weasel-js/text';
|
|
37
37
|
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, TextRenderer, TextStyle, TextVerticalAlign, cachedLayoutRuns, createMarkdownRenderer, fontString, layoutMarkdown, layoutRuns, markdownToRuns, measureText, measureTextBounds, measuredWidth, resolveAlign, resolveRuns, resolveTextStyle, runsToMarkdown, runsToPlainText, textLineBoxes, toRuns, verticalAlignOffset } from '@weasel-js/text';
|
|
38
|
-
import {
|
|
39
|
-
export { a as ImageMinification, R as RenderTarget, b as SpriteSheet,
|
|
38
|
+
import { i as ShaderProgram } from './builtins-CtGORLCG.js';
|
|
39
|
+
export { a as ImageMinification, R as RenderTarget, b as SpriteSheet, e as blur, g as frameRect, r as resolveStrokeWidth, v as viewToMat3, h as vignette } from './builtins-CtGORLCG.js';
|
|
40
40
|
import { G as Guide } from './types-D2tTKEU0.js';
|
|
41
|
-
export { U as UseInsertOptions } from './options-
|
|
41
|
+
export { U as UseInsertOptions } from './options-DYfUlZxk.js';
|
|
42
42
|
export { UseClipboardOpsOptions, UseClipboardOpsReturn, WEASEL_CLIPBOARD_MIME, WEASEL_CLIPBOARD_MIME_WEB, buildWeaselClipboardText, embedWeaselMetadataInSvg, extractWeaselClipboardFromSvg, parseWeaselClipboardText, sniffWeaselClipboardText, useClipboardOps } from './clipboard.js';
|
|
43
43
|
export { cloneByAltDrag } from './clone.js';
|
|
44
44
|
export { FontVariant, LocalFontOutlinesResult, OutlineFontStyle, OutlineSource, OutlineStatus, OutlineVariant, canQueryLocalFonts, enableLocalFontOutlines, hasFontOutlines, isCanvasFont, listFontOutlines, outlineStatus, registerCanvasFont, registerFont, registerFontOutlines, subscribeGlyphReady, unregisterCanvasFont, unregisterFontOutlines } from '@weasel-js/font';
|
|
@@ -442,9 +442,11 @@ interface CreateParallaxLayerOpts<TData> extends ParallaxOpts {
|
|
|
442
442
|
}
|
|
443
443
|
/**
|
|
444
444
|
* Wrap source RenderLayers in a parallax plane. The plane's inner view is
|
|
445
|
-
* derived from the camera view per {@link deriveParallaxView}; source
|
|
446
|
-
*
|
|
447
|
-
*
|
|
445
|
+
* derived from the camera view per {@link deriveParallaxView}; each source
|
|
446
|
+
* layer is drawn through it by `drawOneLayer`, so a `space: 'world'` source
|
|
447
|
+
* gets the inner view's transform and a `space: 'screen'` one does not. The
|
|
448
|
+
* plane itself is emitted as `space: 'screen'` — its children already carry
|
|
449
|
+
* whatever transform they need, and the outer Canvas must add none.
|
|
448
450
|
*
|
|
449
451
|
* **Cosmetic only (v1):** pointer events still target the outer view.
|
|
450
452
|
* Objects on parallax planes are paint, not clickable scene nodes. Use the
|
|
@@ -1157,7 +1159,7 @@ declare function zoomAt(view: View, anchor: {
|
|
|
1157
1159
|
* unit): `1` is 100%, `0.1` is 10%, `8` is 800%.
|
|
1158
1160
|
*
|
|
1159
1161
|
* Every zoom path defaults from these — `zoomAt`, the `viewport.zoom` and
|
|
1160
|
-
* pinch actions, `fitViewToBounds`, `computeWheelAction
|
|
1162
|
+
* pinch actions, `fitViewToBounds`, `computeWheelAction`. They
|
|
1161
1163
|
* used to carry two disagreeing pairs, so a fit could legally land at 10x
|
|
1162
1164
|
* and the next pinch frame would clamp it back to 8x.
|
|
1163
1165
|
*/
|
|
@@ -1195,73 +1197,6 @@ interface NodeClientRect {
|
|
|
1195
1197
|
*/
|
|
1196
1198
|
declare function sceneNodeClientRect(opts: SceneNodeClientRectOpts): NodeClientRect | null;
|
|
1197
1199
|
|
|
1198
|
-
/**
|
|
1199
|
-
* @deprecated Prefer the descriptor-based viewport idiom: `<SceneCanvas>` now
|
|
1200
|
-
* registers `viewport.pan` and `viewport.zoom` action descriptors via
|
|
1201
|
-
* `useStandardActions` + `useGestureDispatcher`. Pass `useHandTool()` via
|
|
1202
|
-
* `ambient` for drag-to-pan. The former `useWheelZoomTool`,
|
|
1203
|
-
* `useKeyboardZoomTool`, and `useWheelPanTool` hooks are dissolved.
|
|
1204
|
-
* `useZoom` was the original controller-style API; it remains exported with
|
|
1205
|
-
* full test coverage but no kit-internal usage. Slated for removal in a future major.
|
|
1206
|
-
*/
|
|
1207
|
-
interface UseZoomOptions {
|
|
1208
|
-
zoom: number;
|
|
1209
|
-
setZoom: (next: number) => void;
|
|
1210
|
-
pan: {
|
|
1211
|
-
x: number;
|
|
1212
|
-
y: number;
|
|
1213
|
-
};
|
|
1214
|
-
setPan: (next: {
|
|
1215
|
-
x: number;
|
|
1216
|
-
y: number;
|
|
1217
|
-
}) => void;
|
|
1218
|
-
min?: number;
|
|
1219
|
-
max?: number;
|
|
1220
|
-
wheelStep?: number;
|
|
1221
|
-
keyStep?: number;
|
|
1222
|
-
viewport?: {
|
|
1223
|
-
width: number;
|
|
1224
|
-
height: number;
|
|
1225
|
-
};
|
|
1226
|
-
sources?: {
|
|
1227
|
-
wheel?: boolean;
|
|
1228
|
-
keys?: boolean;
|
|
1229
|
-
doubleClick?: boolean;
|
|
1230
|
-
pinch?: boolean;
|
|
1231
|
-
};
|
|
1232
|
-
wheelRequiresModifier?: boolean;
|
|
1233
|
-
}
|
|
1234
|
-
/**
|
|
1235
|
-
* @deprecated See `UseZoomOptions` deprecation note. Prefer the
|
|
1236
|
-
* descriptor-based viewport idiom.
|
|
1237
|
-
*/
|
|
1238
|
-
interface UseZoomReturn {
|
|
1239
|
-
onWheel(e: WheelEvent | React.WheelEvent): void;
|
|
1240
|
-
onKeyDown(e: KeyboardEvent | React.KeyboardEvent): void;
|
|
1241
|
-
onDoubleClick(e: MouseEvent | React.MouseEvent): void;
|
|
1242
|
-
zoomTo(level: number, focal?: {
|
|
1243
|
-
x: number;
|
|
1244
|
-
y: number;
|
|
1245
|
-
}): void;
|
|
1246
|
-
zoomBy(factor: number, focal?: {
|
|
1247
|
-
x: number;
|
|
1248
|
-
y: number;
|
|
1249
|
-
}): void;
|
|
1250
|
-
reset(): void;
|
|
1251
|
-
}
|
|
1252
|
-
/**
|
|
1253
|
-
* Wheel/key/double-click zoom with focal-point preservation; returns event handlers and `zoomTo`/`zoomBy`/`reset`.
|
|
1254
|
-
*
|
|
1255
|
-
* @deprecated Prefer the descriptor-based viewport idiom:
|
|
1256
|
-
* `<SceneCanvas>` registers `viewport.pan` and `viewport.zoom` action
|
|
1257
|
-
* descriptors automatically. Pass `useHandTool()` via `ambient` for
|
|
1258
|
-
* drag-to-pan. `useZoom` covers the same input surface but doesn't
|
|
1259
|
-
* integrate with the tool dispatcher, selection, or other gestures.
|
|
1260
|
-
* No demo, no kit-internal hook, and no app currently consumes `useZoom`;
|
|
1261
|
-
* slated for removal in a future major.
|
|
1262
|
-
*/
|
|
1263
|
-
declare function useZoom(opts: UseZoomOptions): UseZoomReturn;
|
|
1264
|
-
|
|
1265
1200
|
/**
|
|
1266
1201
|
* Compute zoom and pan that fit `contentW x contentH` (in content units)
|
|
1267
1202
|
* inside `viewportW x viewportH` (in pixels). `padRatio` is the fraction of
|
|
@@ -2003,7 +1938,8 @@ declare const viewportDragPanAction: Action & {
|
|
|
2003
1938
|
*
|
|
2004
1939
|
* ## Design notes
|
|
2005
1940
|
* The invoker switches on `params.kind`:
|
|
2006
|
-
* - `'wheel'`:
|
|
1941
|
+
* - `'wheel'`: defers to `wheelZoom` (`core/viewport/wheelHandler`), the kit's
|
|
1942
|
+
* one statement of the wheel convention, anchored at (clientX, clientY).
|
|
2007
1943
|
* The dispatcher merges wheel event data into params at dispatch time, and
|
|
2008
1944
|
* converts the wheel event's client coords to canvas-local (subtracting the
|
|
2009
1945
|
* canvas's bounding rect) before merging — `zoomAt` expects canvas-local.
|
|
@@ -2090,11 +2026,10 @@ declare const viewportZoomAction: Action & {
|
|
|
2090
2026
|
*
|
|
2091
2027
|
* ## Design notes
|
|
2092
2028
|
* The dispatcher merges wheel event data (deltaX, deltaY, clientX, clientY)
|
|
2093
|
-
* into params at dispatch time. The invoker
|
|
2094
|
-
*
|
|
2095
|
-
*
|
|
2096
|
-
*
|
|
2097
|
-
* one screen-pixel pan at any zoom level.
|
|
2029
|
+
* into params at dispatch time. The invoker reads them from the params bag
|
|
2030
|
+
* and defers to `wheelPan` (`core/viewport/wheelHandler`), the kit's one
|
|
2031
|
+
* statement of the wheel convention — which divides the delta by `view.scale`
|
|
2032
|
+
* so one screen-pixel scroll is one screen-pixel pan at any zoom.
|
|
2098
2033
|
*
|
|
2099
2034
|
* `axis` locks the pan to one axis, matching `viewport.dragPan`'s param of
|
|
2100
2035
|
* the same name, so a consumer that wants a single-axis viewport can say so
|
|
@@ -2296,7 +2231,15 @@ interface UseStandardActionsOptions {
|
|
|
2296
2231
|
pointer?: DepSchema['pointer'];
|
|
2297
2232
|
/** Currently active tool id + hotkey-hold stack. */
|
|
2298
2233
|
activeTool?: DepSchema['activeTool'];
|
|
2234
|
+
/**
|
|
2235
|
+
* Ids of kit-standard actions to leave unregistered, so a consumer can bind
|
|
2236
|
+
* its own. Ids that name no kit action are ignored;
|
|
2237
|
+
* `KIT_STANDARD_ACTION_IDS` is the full list.
|
|
2238
|
+
*/
|
|
2239
|
+
exclude?: Iterable<string>;
|
|
2299
2240
|
}
|
|
2241
|
+
/** Every id `useStandardActions` registers, in registration order. */
|
|
2242
|
+
declare const KIT_STANDARD_ACTION_IDS: readonly string[];
|
|
2300
2243
|
/**
|
|
2301
2244
|
* @experimental
|
|
2302
2245
|
* Register each kit-standard dep source and action descriptor into the
|
|
@@ -2344,6 +2287,7 @@ declare function defaultCommitAdapter<TPose>(scene: Scene<unknown, string, TPose
|
|
|
2344
2287
|
getSelection: () => string[];
|
|
2345
2288
|
setSelection: (ids: string[]) => void;
|
|
2346
2289
|
getParent: (id: string) => string | null;
|
|
2290
|
+
getRemovalClosure: (ids: readonly string[]) => string[];
|
|
2347
2291
|
getChildren: (parentId: string | null) => string[];
|
|
2348
2292
|
setChildOrder: (parentId: string | null, orderedIds: string[]) => void;
|
|
2349
2293
|
setPose: (id: string, pose: TPose) => void;
|
|
@@ -2691,37 +2635,57 @@ interface VisibleRaf {
|
|
|
2691
2635
|
declare function useVisibleRaf(frame: (time: number) => void, options?: VisibleRafOptions): VisibleRaf;
|
|
2692
2636
|
|
|
2693
2637
|
/**
|
|
2694
|
-
*
|
|
2695
|
-
*
|
|
2696
|
-
*
|
|
2638
|
+
* The kit's one wheel convention, as pure functions over `View`.
|
|
2639
|
+
*
|
|
2640
|
+
* ## Modifiers
|
|
2641
|
+
* - bare wheel → pan
|
|
2642
|
+
* - shift+wheel → horizontal pan (mouse wheels emit only `deltaY`)
|
|
2643
|
+
* - Cmd/Ctrl+wheel → zoom, anchored under the pointer. Ctrl also covers the
|
|
2644
|
+
* trackpad pinch, which browsers deliver as ctrl+wheel.
|
|
2645
|
+
*
|
|
2646
|
+
* ## Coordinates
|
|
2647
|
+
* `View.x` / `View.y` are world-space, so a pan delta — screen pixels, as the
|
|
2648
|
+
* DOM reports them — is divided by `View.scale` before it lands. The zoom
|
|
2649
|
+
* anchor is canvas-local: client coords minus the canvas's bounding rect.
|
|
2697
2650
|
*
|
|
2698
|
-
*
|
|
2699
|
-
*
|
|
2700
|
-
* ({@link DEFAULT_MIN_ZOOM} – {@link DEFAULT_MAX_ZOOM}).
|
|
2651
|
+
* `viewport.wheelPan` and `viewport.zoom` are the wired form of these, and
|
|
2652
|
+
* call them rather than restating the math.
|
|
2701
2653
|
*/
|
|
2702
|
-
|
|
2703
|
-
|
|
2704
|
-
|
|
2705
|
-
|
|
2706
|
-
panX: number;
|
|
2707
|
-
panY: number;
|
|
2708
|
-
}
|
|
2709
|
-
/** Wheel-event input, decoupled from the DOM `WheelEvent` shape for testability. */
|
|
2654
|
+
|
|
2655
|
+
/** Multiplicative zoom applied per 100 px of wheel `deltaY`. */
|
|
2656
|
+
declare const WHEEL_ZOOM_STEP = 1.1;
|
|
2657
|
+
/** A wheel event, decoupled from the DOM `WheelEvent` shape for testability. */
|
|
2710
2658
|
interface WheelInput {
|
|
2711
2659
|
deltaX: number;
|
|
2712
2660
|
deltaY: number;
|
|
2713
|
-
|
|
2714
|
-
|
|
2661
|
+
/** Zoom anchor, canvas-local: client coords minus the canvas's rect. */
|
|
2662
|
+
x: number;
|
|
2663
|
+
y: number;
|
|
2715
2664
|
shiftKey?: boolean;
|
|
2665
|
+
ctrlKey?: boolean;
|
|
2716
2666
|
metaKey?: boolean;
|
|
2717
2667
|
}
|
|
2718
|
-
/**
|
|
2719
|
-
|
|
2720
|
-
|
|
2721
|
-
|
|
2668
|
+
/** Which axes a wheel pan is allowed to move, and whether `deltaY` is routed
|
|
2669
|
+
* into the x axis (shift+wheel). An axis lock outranks `swapAxis`. */
|
|
2670
|
+
interface WheelPanOpts {
|
|
2671
|
+
axis?: 'both' | 'x' | 'y';
|
|
2672
|
+
swapAxis?: boolean;
|
|
2722
2673
|
}
|
|
2723
|
-
/**
|
|
2724
|
-
|
|
2674
|
+
/** Zoom multiplier for one wheel sample. Reciprocal in `deltaY`, so scrolling
|
|
2675
|
+
* a distance and back returns to the scale you started from. */
|
|
2676
|
+
declare function wheelZoomFactor(deltaY: number): number;
|
|
2677
|
+
/** Zoom one wheel sample about `anchor` (canvas-local pixels). */
|
|
2678
|
+
declare function wheelZoom(view: View, anchor: {
|
|
2679
|
+
x: number;
|
|
2680
|
+
y: number;
|
|
2681
|
+
}, deltaY: number, clamp?: ZoomClampOpts): View;
|
|
2682
|
+
/** Pan by one wheel sample. `delta` is in screen pixels. */
|
|
2683
|
+
declare function wheelPan(view: View, delta: {
|
|
2684
|
+
deltaX: number;
|
|
2685
|
+
deltaY: number;
|
|
2686
|
+
}, opts?: WheelPanOpts): View;
|
|
2687
|
+
/** Pure reducer: the whole wheel convention in one call. */
|
|
2688
|
+
declare function computeWheelAction(view: View, input: WheelInput, clamp?: ZoomClampOpts, opts?: Pick<WheelPanOpts, 'axis'>): View;
|
|
2725
2689
|
|
|
2726
2690
|
/**
|
|
2727
2691
|
* Convert client coords to element CSS-pixel coords (relative to the element's
|
|
@@ -3317,43 +3281,6 @@ declare function useHandTool(opts?: UseHandToolOptions): Tool<HandScratch | null
|
|
|
3317
3281
|
* factories and hit gating belong on those deps, not on the tool. */
|
|
3318
3282
|
declare function useTextTool(): Tool<undefined>;
|
|
3319
3283
|
|
|
3320
|
-
/** The camera a pinch acts on, and the origin its anchor is measured from. */
|
|
3321
|
-
interface PinchZoomTarget {
|
|
3322
|
-
view: View;
|
|
3323
|
-
setView: (v: View) => void;
|
|
3324
|
-
/** Client-space origin of the surface this camera paints into. */
|
|
3325
|
-
origin: {
|
|
3326
|
-
left: number;
|
|
3327
|
-
top: number;
|
|
3328
|
-
};
|
|
3329
|
-
}
|
|
3330
|
-
/** Options for `usePinchZoomTool`: the zoom limits, and whether it is wired
|
|
3331
|
-
* at all. */
|
|
3332
|
-
interface PinchZoomToolOpts {
|
|
3333
|
-
min?: number;
|
|
3334
|
-
max?: number;
|
|
3335
|
-
enabled?: boolean;
|
|
3336
|
-
/**
|
|
3337
|
-
* Which camera the anchor point belongs to. Return `null` — or omit this —
|
|
3338
|
-
* for the canvas's own. A canvas hosting several views resolves the point
|
|
3339
|
-
* here, so a pinch inside a panel zooms the panel rather than the canvas
|
|
3340
|
-
* underneath it.
|
|
3341
|
-
*/
|
|
3342
|
-
resolveTarget?: (clientX: number, clientY: number) => PinchZoomTarget | null;
|
|
3343
|
-
}
|
|
3344
|
-
/**
|
|
3345
|
-
* Two-finger pinch zoom on the canvas. Standalone hook (not a Tool record)
|
|
3346
|
-
* because it requires direct multi-pointer access on the canvas element.
|
|
3347
|
-
*
|
|
3348
|
-
* The anchor point under the gesture midpoint stays fixed on screen as the
|
|
3349
|
-
* view scales.
|
|
3350
|
-
*
|
|
3351
|
-
* @param getView Read at gesture time, not at render time: each pinch move
|
|
3352
|
-
* applies a per-frame delta to the view the previous move produced, and the
|
|
3353
|
-
* canvas does not re-render between them.
|
|
3354
|
-
*/
|
|
3355
|
-
declare function usePinchZoomTool(canvasRef: React.RefObject<HTMLElement | null>, getView: () => View, setView: (v: View) => void, opts?: PinchZoomToolOpts): void;
|
|
3356
|
-
|
|
3357
3284
|
/**
|
|
3358
3285
|
* In-progress pen anchor. `outHandle` is set when the anchor was placed via
|
|
3359
3286
|
* click-drag (smooth anchor); undefined for click-placed corners.
|
|
@@ -4463,37 +4390,6 @@ interface HierarchicalAdapter<TNode, TPose> {
|
|
|
4463
4390
|
getPose(id: string): TPose;
|
|
4464
4391
|
}
|
|
4465
4392
|
|
|
4466
|
-
/**
|
|
4467
|
-
* The consumer-facing `viewport` prop shape for `<SceneCanvas>`.
|
|
4468
|
-
*
|
|
4469
|
-
* The features it names are wired by the `viewport.*` action descriptors
|
|
4470
|
-
* (`useStandardActions` + `useGestureDispatcher`) and by SceneCanvas itself,
|
|
4471
|
-
* which derives the hand tool and the registered flag inline.
|
|
4472
|
-
*/
|
|
4473
|
-
|
|
4474
|
-
/** Which viewport interactions `<SceneCanvas>` wires up — pan inertia, pinch
|
|
4475
|
-
* zoom, wheel pan, wheel and keyboard zoom. Each may be switched off with
|
|
4476
|
-
* `false` or tuned with an options object. */
|
|
4477
|
-
interface ViewportConfig {
|
|
4478
|
-
inertia?: boolean | {
|
|
4479
|
-
friction?: number;
|
|
4480
|
-
minSpeed?: number;
|
|
4481
|
-
boundary?: 'stop' | 'bounce' | 'spring';
|
|
4482
|
-
bounds?: PanBounds;
|
|
4483
|
-
};
|
|
4484
|
-
pinchZoom?: boolean | {
|
|
4485
|
-
min?: number;
|
|
4486
|
-
max?: number;
|
|
4487
|
-
};
|
|
4488
|
-
/** Wheel pan (plain wheel → pan). Default: `true`. Set `false` to disable,
|
|
4489
|
-
* or pass a {@link WheelPanOptions} object to lock it to one axis. */
|
|
4490
|
-
pan?: boolean | WheelPanOptions;
|
|
4491
|
-
/** Wheel + keyboard zoom (Cmd+wheel, Cmd+=/-/0). Default: `true`. Set `false`
|
|
4492
|
-
* to disable, or pass a {@link ViewportZoomOptions} object to tune the wheel
|
|
4493
|
-
* trigger + scale clamp. */
|
|
4494
|
-
zoom?: boolean | ViewportZoomOptions;
|
|
4495
|
-
}
|
|
4496
|
-
|
|
4497
4393
|
/**
|
|
4498
4394
|
* The scene-tree reading methods Canvas feature-detects at draw time, as an
|
|
4499
4395
|
* *optional* mixin. A `SceneCanvasAdapter` supplies them; flat / bare-Canvas
|
|
@@ -4763,7 +4659,7 @@ interface CanvasProps<TNode extends {
|
|
|
4763
4659
|
* `setView` call passes through `clampView(next, viewBounds, {width, height})`
|
|
4764
4660
|
* before commit, keeping the visible rect inside `viewBounds`. If the visible
|
|
4765
4661
|
* rect is larger than the bounds along an axis (zoomed out past extent), that
|
|
4766
|
-
* axis is centered. Has no effect on `scale
|
|
4662
|
+
* axis is centered. Has no effect on `scale`.
|
|
4767
4663
|
*
|
|
4768
4664
|
* A viewport concern, not scene-shaped. Consumers that want the pan to stay
|
|
4769
4665
|
* inside a document page boundary should wire this with the page dimensions.
|
|
@@ -4835,21 +4731,6 @@ interface CanvasProps<TNode extends {
|
|
|
4835
4731
|
* report "no gesture in flight" and never fire.
|
|
4836
4732
|
*/
|
|
4837
4733
|
gestureSource?: GestureSource;
|
|
4838
|
-
/**
|
|
4839
|
-
* Pinch-zoom DOM listener attachment for the canvas surface. When supplied,
|
|
4840
|
-
* `<Canvas>` calls `usePinchZoomTool` with `canvasRef` so two-finger pinch
|
|
4841
|
-
* events are handled directly on the canvas element.
|
|
4842
|
-
*
|
|
4843
|
-
* Hand tool registration, wheel pan/zoom action descriptors, and keyboard
|
|
4844
|
-
* zoom shortcuts are SceneCanvas-level concerns and are NOT owned by Canvas.
|
|
4845
|
-
* Those belong with the tool registry and gesture dispatcher that live in
|
|
4846
|
-
* SceneCanvas — which is also why SceneCanvas does not pass this prop: it
|
|
4847
|
-
* drives pinch through the `viewport.pinchZoom` action instead, and both
|
|
4848
|
-
* paths at once would apply one gesture's zoom factor twice.
|
|
4849
|
-
*
|
|
4850
|
-
* When omitted, no pinch-zoom listener is attached.
|
|
4851
|
-
*/
|
|
4852
|
-
viewport?: ViewportConfig;
|
|
4853
4734
|
/**
|
|
4854
4735
|
* FillStyle applied to the full canvas surface behind the scene. Accepts the
|
|
4855
4736
|
* kit's `FillStyle` union (solid / pattern / linear-gradient / radial-gradient /
|
|
@@ -4938,6 +4819,13 @@ interface CanvasProps<TNode extends {
|
|
|
4938
4819
|
* it is not drawn. Reordering two layers means naming all of them.
|
|
4939
4820
|
*/
|
|
4940
4821
|
layerOrder?: string[];
|
|
4822
|
+
/**
|
|
4823
|
+
* Runs of consecutive layers that composite as one — the surface for
|
|
4824
|
+
* blurring the world while the chrome above it stays sharp. Members are
|
|
4825
|
+
* named by layer id, and a layer in no group draws exactly as it did
|
|
4826
|
+
* before. See {@link LayerGroup}.
|
|
4827
|
+
*/
|
|
4828
|
+
layerGroups?: readonly LayerGroup[];
|
|
4941
4829
|
}
|
|
4942
4830
|
|
|
4943
4831
|
/** Minimal selection contract `sceneToAdapter` needs to wire `getSelection` /
|
|
@@ -4967,6 +4855,7 @@ type SceneCanvasAdapter<TData, TLayer extends string, TPose> = MoveAdapter<Node$
|
|
|
4967
4855
|
setSelection(ids: string[]): void;
|
|
4968
4856
|
insertNode(node: Node$1<TData, TLayer, TPose>, index?: number): void;
|
|
4969
4857
|
removeNode(id: string): void;
|
|
4858
|
+
getRemovalClosure(ids: readonly string[]): string[];
|
|
4970
4859
|
applyOps(ops: Op[], label?: string): void;
|
|
4971
4860
|
snapshotSelection(ids: string[]): ClipboardSnapshot;
|
|
4972
4861
|
commitPaste(clipboard: ClipboardSnapshot, offset: {
|
|
@@ -6257,9 +6146,6 @@ declare function SceneViewCanvasInner<TData, TLayer extends string, TPose>(props
|
|
|
6257
6146
|
*/
|
|
6258
6147
|
declare const SceneViewCanvas: typeof SceneViewCanvasInner;
|
|
6259
6148
|
|
|
6260
|
-
/** Build a scene outside React. `useScene` is the usual entry point; reach for
|
|
6261
|
-
* this in tests, in headless rendering, or wherever a scene must outlive a
|
|
6262
|
-
* component. Throws if no system layers are declared. */
|
|
6263
6149
|
declare function createScene<TData, TLayer extends string, TPose = RectPose>(options: UseSceneOptions<TData, TLayer, TPose>): Scene<TData, TLayer, TPose>;
|
|
6264
6150
|
/** The scene's selection in the shape `createHistory` wants, for a consumer
|
|
6265
6151
|
* building a second History over the same scene (a modality machine, a
|
|
@@ -7575,7 +7461,7 @@ interface UseSceneTextEditReturn extends UseTextEditReturn {
|
|
|
7575
7461
|
* bubble). The handler looks up the canvas via `e.target`, hits the
|
|
7576
7462
|
* top-most text node under the cursor via `pointInTextPose`, resolves
|
|
7577
7463
|
* a caret offset via `caretIndexAt`, and starts edit on that node. */
|
|
7578
|
-
onDoubleClick: (e: MouseEvent
|
|
7464
|
+
onDoubleClick: (e: MouseEvent<HTMLElement>) => void;
|
|
7579
7465
|
}
|
|
7580
7466
|
/** Wire double-click-to-edit text on a scene: mounts a DOM editing overlay
|
|
7581
7467
|
* over the node being edited and writes the result back as an undoable op. */
|
|
@@ -7916,15 +7802,16 @@ interface DeleteArgs<TNode extends {
|
|
|
7916
7802
|
index?: number;
|
|
7917
7803
|
/** Full slot, anchor included. Written by `apply`; supersedes `index`. */
|
|
7918
7804
|
slot?: Slot;
|
|
7919
|
-
/**
|
|
7920
|
-
*
|
|
7921
|
-
* brings
|
|
7922
|
-
*
|
|
7923
|
-
*
|
|
7924
|
-
|
|
7925
|
-
|
|
7926
|
-
|
|
7927
|
-
|
|
7805
|
+
/** Everything `removeNode` takes, `node` itself included — its subtree, and
|
|
7806
|
+
* whatever else the adapter cascades. An inverse that re-inserts `node`
|
|
7807
|
+
* alone brings a container back empty and leaves every dependent deleted.
|
|
7808
|
+
* Ordered so a node's parent precedes it, which is the order they have to
|
|
7809
|
+
* be re-inserted in. Captured on apply; mirrored into the serialized args so
|
|
7810
|
+
* a rebuilt op can invert without having run. */
|
|
7811
|
+
cascaded?: Placed<TNode>[];
|
|
7812
|
+
}
|
|
7813
|
+
/** Op: remove `node` and everything the adapter cascades with it; inverts to a
|
|
7814
|
+
* re-insert of the whole set at its captured slots. */
|
|
7928
7815
|
declare function createDeleteOp<TNode extends {
|
|
7929
7816
|
id: string;
|
|
7930
7817
|
}>(args: DeleteArgs<TNode>): Op;
|
|
@@ -8300,8 +8187,9 @@ declare function pointInPath(path: Path, x: number, y: number, opts?: PointInPat
|
|
|
8300
8187
|
* Polygon-vs-axis-aligned-rect tests. Pure functions; no React/kit deps.
|
|
8301
8188
|
*
|
|
8302
8189
|
* `polygon` is a closed polyline given as an ordered vertex array; the
|
|
8303
|
-
* closing edge from `polygon[N-1]` to `polygon[0]` is implicit. Even-odd
|
|
8304
|
-
*
|
|
8190
|
+
* closing edge from `polygon[N-1]` to `polygon[0]` is implicit. Even-odd fill
|
|
8191
|
+
* rule, and one contour only — a path with holes or curves goes through
|
|
8192
|
+
* `pathHitTest`, which reads its `fillRule`.
|
|
8305
8193
|
*/
|
|
8306
8194
|
|
|
8307
8195
|
/** A 2D point or vector. */
|
|
@@ -8314,26 +8202,23 @@ interface Vec2 {
|
|
|
8314
8202
|
* Path-vs-geometry hit-test helpers. Five pure functions covering all
|
|
8315
8203
|
* combinations of path-vs-point, path-vs-rect, and path-vs-polygon.
|
|
8316
8204
|
*
|
|
8317
|
-
* `RectPath` short-circuits to AABB arithmetic. `PolygonPath`
|
|
8318
|
-
*
|
|
8319
|
-
*
|
|
8320
|
-
*
|
|
8321
|
-
*
|
|
8322
|
-
*
|
|
8323
|
-
* For point-in-path specifically, use the existing `pointInPath` from
|
|
8324
|
-
* `hitTest.ts` which handles beziers and fill rules correctly.
|
|
8205
|
+
* `RectPath` short-circuits to AABB arithmetic. A `PolygonPath` is treated as
|
|
8206
|
+
* its filled region: whether a point is inside comes from `pointInPath`, so
|
|
8207
|
+
* beziers are flattened and `fillRule` is honored, and every closed subpath
|
|
8208
|
+
* counts — the hole of a donut is not part of the shape under `evenodd`. Open
|
|
8209
|
+
* subpaths enclose no area and are ignored, matching `pointInPath`.
|
|
8325
8210
|
*/
|
|
8326
8211
|
|
|
8327
8212
|
/** Returns true if (x, y) lies within the filled region of `path`. */
|
|
8328
|
-
declare function pathContainsPoint(path: Path, x: number, y: number): boolean;
|
|
8213
|
+
declare function pathContainsPoint(path: Path, x: number, y: number, opts?: PointInPathOptions): boolean;
|
|
8329
8214
|
/** Returns true if `rect` is entirely contained within `path`. */
|
|
8330
|
-
declare function pathContainsRect(path: Path, rect: Rect): boolean;
|
|
8215
|
+
declare function pathContainsRect(path: Path, rect: Rect, opts?: PointInPathOptions): boolean;
|
|
8331
8216
|
/** Returns true if `rect` overlaps (intersects or contains) `path`. */
|
|
8332
|
-
declare function pathIntersectsRect(path: Path, rect: Rect): boolean;
|
|
8217
|
+
declare function pathIntersectsRect(path: Path, rect: Rect, opts?: PointInPathOptions): boolean;
|
|
8333
8218
|
/** Returns true if every vertex of `polygon` lies inside `path`. */
|
|
8334
|
-
declare function pathContainsPolygon(path: Path, polygon: readonly Vec2[]): boolean;
|
|
8219
|
+
declare function pathContainsPolygon(path: Path, polygon: readonly Vec2[], opts?: PointInPathOptions): boolean;
|
|
8335
8220
|
/** Returns true if `polygon` overlaps (intersects or is contained by) `path`. */
|
|
8336
|
-
declare function pathIntersectsPolygon(path: Path, polygon: readonly Vec2[]): boolean;
|
|
8221
|
+
declare function pathIntersectsPolygon(path: Path, polygon: readonly Vec2[], opts?: PointInPathOptions): boolean;
|
|
8337
8222
|
|
|
8338
8223
|
/**
|
|
8339
8224
|
* Pure-geometry distance from a point to a path's boundary (stroke), with
|
|
@@ -10890,4 +10775,4 @@ interface InsertOverlayStyle {
|
|
|
10890
10775
|
lineWidth?: number;
|
|
10891
10776
|
}
|
|
10892
10777
|
|
|
10893
|
-
export { ANCHOR_HIT_BASE_PX, Action, type ActionShortcut, ActionsProp, ActionsProviderIfRoot, ActionsRegistry, Affordance, AffordanceBinding, AffordanceHit, AffordanceRegion, type AffordanceRegionHit, type AlignAdapter, type AlignAnchor, type AlignBounds, type AlignBoundsProjection, type AlignEdge, type AlignMatchResult, type AlignMoveArgs, type AlignmentBehaviorBase, type AnchorHit, type AnchorScratch, type AnchorState, type AnimateOnSetPoseOptions, AnimationHandle, Animator, AnyTool, AreaSelectAdapter, type ArrayAdapter, type ArrayAdapterConfig, ArrowIcon, BUILTIN_MARKERS, BUNDLE_TOOLS, BindingScope, BooleansAdapter, Bounds, BoundsConstraint, type BuildChromeCtxArgs, BuiltinShapeToolId, type BuiltinToolId, type BuiltinToolOptions, COARSE_TARGET_SCALE, CURVE_REPS, type CanvasExtensionApi, type CanvasFocusReturn, type CanvasHelpers, type CanvasProps, type CanvasSelectionMode, type CanvasSize, type CanvasSizeSnapshot, type CanvasSurfaceHelpers, CanvasView, type CanvasViewHelpers, type CanvasViewProps, type CaretIndexAtOpts, type CellHighlightLayerOpts, ChromeCtx, ChromeId, ChromeState, type ClampBounds, ClipboardSnapshot, type CoalescedCtx, type ColorInterpolate, ColorOverrideRegistry, type ColorSpace, CommonAffordanceScratch, type ComposeSelectionPoseOpts, type ComputeFitViewOptions, Condition, ContentHandlerEntry, Contribution, 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 CycleHandle, type CycleVertexColorsOptions, DEFAULT_ALPHA_DECAY, DEFAULT_ALPHA_MIN, DEFAULT_DEBUG_STROKES, DEFAULT_DEBUG_THEME, DEFAULT_DEVICE_PROFILE, DEFAULT_FILL_COLOR, DEFAULT_FLATTEN_TOLERANCE, 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, DebugConfig, DebugSink, DebugSnapshot, DebugStrokes, DebugTheme, type DefaultTextData, DepRegistryProviderIfRoot, DepSchema, type DeriveAlignmentGuidesOptions, DetectedDeviceFacts, DeviceProfile, DeviceProfileProvider, type DeviceProfileProviderProps, Dims, type Discriminator, Dispatcher, 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, Eligibility, type EligibilityState, EllipseIcon, ExcludeIcon, EyedropperIcon, FALLBACK_FIT_VIEW, 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, HotkeyTrigger, IDENTITY_JOINT, type IconProps, ImageIcon, type ImageNodeData, type ImageStatus, type IndicatorStyle, InertiaConfig, InsertAdapter, InsertBehavior, InsertExtras, type InsertNodeFactory, type InsertOp, type InsertOverlayStyle, IntersectIcon, type Joint, type JointTransform, type LabelOptions, LassoHitMode, LassoIcon, LassoSelectAdapter, LassoSelectBehavior, LayerEnumerableAdapter, 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, ModifierState, type MomentumOptions, MoveAdapter, MoveBehavior, type NestedHitOpts, type NestedHitTester, type NodeClientRect, NodeId, type NodeInk, type NodeInkCtx, type NodeOverlayFrame, type NodePaintCtx, type NodeProperties, type NodePropertiesEntry, type NodeRouting, type NodeRoutingEntry, type NodeShapeEntry, type NodeSilhouetteCtx, OngoingOverlay, type OpenFilePickerOptions, OrderedAdapter, OriginProjection, type OverlayPoint, OverlayPosition, PAINTED_CURSOR_LAYER_ID, PATH_ANCHOR_CHROME_ID, type PaintBindContext, type PaintKind, type PaintKindEditorProps, type PaintKindEntry, type PaintProgram, type PaintedCursor, type PaintedCursorFrame, type PaintedCursorState, PanBounds, type ParallaxOpts, Path, type PathAnchor, type PathAnchorAffordanceOptions, PathBuilder, PathDrawCommand, type PathEditingOverlayStyle, PathFillRule, type PathInWorldPose, type PenAnchor, PenIcon, type PenPreviewStyle, type PenScratch, type PenSubpath, PencilIcon, type PencilPoint, PickHud, type PickHudProps, type PickTopMostHitAdapter, type PinchZoomOptions, type PinchZoomToolOpts, type PixelRenderPlan, type PointInPathOptions, type PointInTextPoseOpts, PointSnapBehavior, PointerProviderIfRoot, type PointerSample, type PointerSession, type PointerSessionCallbacks, type PointerSessionCancelReason, type PointerSessionOptions, type PointerStylusState, PolygonIcon, PolygonPath, type PolygonPoint, type Pose, PoseProjection, type PoseRotation, type PressureToWidthOptions, type Pt, RECT_ALIGN_PROJECTION, ROTATION_HANDLE_BASE_PX, type RangeStyle, type RasterImage, RectIcon, RectPath, RectPose, type RegisterNodeShapeOptions, RegisteredOp, RenderLayer, type RenderSceneToCanvasArgs, type RenderSceneToPixelsArgs, type ReorderDirection, ResizeAdapter, ResizeAnchor, ResizePose, type ResolvableView, RotateAdapter, RotateBehavior, type RotateGeometry, RotatedPose, type RotationAffordanceOptions, type RotationHandle, type RotationScratch, Rule, RuleCtx, 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, ScopedBinding, type ScratchKey, type ScratchStore, type SelectAdapter, type SelectFromLassoOptions, SelectIcon, SelectionApi, 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 SimulationForce, type SimulationNode, 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, type TextEditScreenPose, type TextEditSelection, TextIcon, type ThresholdDragHandle, type ThresholdDragOptions, type TileGridOptions, type TilePatternOpts, Tool, type ToolBundle, ToolDef, ToolKeybinding, 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 ToolPrefNumberUnit, type ToolPrefObject, type ToolPrefPaint, type ToolPrefString, type ToolPrefStringControl, type ToolsApi, type TweenPoseOptions, type TweenVertexColorsOptions, UnionIcon, 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 UseGestureDispatcherOptions, 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, UseResizeOptions, type UseResizePolicyOptions, type UseRotateOptions, type UseRotateToolOptions, UseSceneOptions, type UseSceneTextEditOptions, type UseSceneTextEditReturn, type UseSceneTrivialOptions, type UseSelectToolOptions, UseSelectionOptions, type UseSimulationOptions, type UseStandardActionsOptions, type UseStarToolOptions, type UseTextEditOptions, type UseTextEditReturn, type UseToolsOptions, type UseZoomOptions, type UseZoomReturn, VERSION, type Vec2, type VelocityTracker, VertexColorChannel, View, ViewAnimationOptions, type ViewRect, type ViewResolver, type ViewTarget, ViewTransform, type ViewportConfig, ViewportDims, type ViewportLayer, ViewportToolDef, type ViewportZoomAnimateOptions, type ViewportZoomOptions, VisibilityRules, type VisibleRaf, type VisibleRafOptions, type VisibleRafTarget, WeaselProvider, type WheelInput, type WheelPanOptions, type WheelState, ZoomBound, type ZoomBounds, type ZoomClampOpts, 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, clientToCanvas, 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, createPaintedCursorState, createParallaxLayer, createPathAnchorAffordances, createPathEditingOverlayLayer, createPathLayer, createPenPreviewLayer, createReorderOp, createReparentOp, createRotationAffordance, createScene, createSelectionHandlesLayer, createSelectionOutlineLayer, createSelectionOverlayLayer, createSetDataOp, createSetLayerOp, createSetPathOp, createSetSelectionOp, createSetTextOp, createTextLayer, createTilePattern, createTransformOp, createVelocityTracker, createViewResolver, createViewportLayer, cycleVertexColors, decomposePath, defaultCommitAdapter, defaultDrawOne, defaultLabelTextRenderer, defaultNodeProperties, defaultNodeRouting, defaultVisibilityRules, defineTool, defineViewportTool, deleteScratch, deriveAlignmentGuides, deriveParallaxView, dispatchApplyBatch, dlog, domPositionToCharOffset, domToRuns, dwarn, editAnchorsAction, ellipsePath, enumerateAnchors, fillInPoseFrame, fillToBoundsFrame, findNodeShape, findShapeInk, findShapeSilhouette, fitTextPose, fitToBounds, fitZoom, flattenCubic, flattenCubicWithArcLen, flattenQuadratic, flattenQuadraticWithArcLen, focused, forEachCoalesced, freeform, gateLayer, gesturing, getAlpha01, getImageBitmap, getMarker, getNodeShapes, getPaintKind, getScratch, getStylusData, gradientForBounds, gradientGeometry, guideSnapStrategy, hexToRgba, hitAffordanceRegions, hitAnchor, hitRotationHandle, hostAnchorCss, hostAnchorRect, hovering, hoveringSelected, imageStatus, inferredNodeProperties, inferredNodeRouting, insertAction, interpolateView, isBuiltinToolPref, isDebugEnabled, isEditableTarget, isGradientFill, isPatternSpec, keySpecShortcut, lassoSelectAction, lerpColorArray, lerpOklab, lerpOklch, linePath, listMarkers, listPaintKinds, liveScope, makePinchZoomAction, makeViewportWheelPanAction, makeViewportZoomAction, markerDrawCommands, markerInset, markerKeyOf, markerSites, matchAlignment, matchesKeyBinding, meanScale, mergeAlphaFromPrev, mergeContributions, modeIn, modeIs, modeNot, modifierHeld, momentum, moveAction, multiActive, nearest, nearestWithin, nestedHitTester, never, nodeHasFlag, none, normalizeHex, not, nurbs, oklabToOklch, oklabToSrgbU8, oklchToOklab, openFilePicker, openPointerSession, 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, pointInPath, pointInRotatedRect, pointInTextPose, polygonFromPoints, polylineFromPoints, poseRotationOf, pressureToWidth, pxExtent, rainbowVertexColors, rebuildOp, rectCorners, rectPath, registerMarker, registerNodeShape, registerOpFactory, registerPaintKind, registeredOpNames, regularPolygonPath, renderLabel, renderSceneToCanvas, renderSceneToPixels, resizeAction, resolveColor, resolveDeviceProfile, resolveFillPattern, resolveMarkerSize, resolvePatternSpec, resolveSkeleton, resolveVisibility, rgbaToHex, rotateAction, rotateAroundAABBCenter, rotatePathAround, rotatePoint, rotatedRectCorners, rotationDegreesUnit, rotationHandle, roundToCell, runsToDom, sampleGradientStops, sampleTrack, scaleDelta, scalePathToBounds, sceneFromJSON, sceneNodeClientRect, sceneSelectionStore, sceneToAdapter, scopeBindings, scratchKey, selectFromLasso, selectionAtLeast, selectionEmpty, selectionIs, setFlagOverRange, setScratch, shapeCoversPoint, snap, snapPoint, solid, solidVertexColors, spiro, splitPathByLine, splitSubpaths, springPose, springVertexColors, srgbU8ToOklab, staggerVertexColors, starPath, startThresholdDrag, strokeInsets, strokeOf, strokeWith, styleAtRange, subscribeImageReady, textCommand, textCommandFromRuns, tileGrid, toHex8, transformPath, translatePath, translatePolygonInPlace, translatePoseViaDescriptor, trimPolyline, tweenPose, tweenVertexColors, unionAABB, unionBounds, unionBoundsPath, useAlign, useAnimator, useArrayAdapter, useAutoCenter, useBooleans, useBooleansAdapter, useCanvasFocus, useCanvasSize, useDeviceProfile, useDistribute, useDragGesture, useDragHandle, useDragRadial, useDragRect, useDropZone, useEllipseTool, useEyedropperTool, useGestureDispatcher, useGridCellHover, useGuides, useHandTool, useHandleDrag, useHostAnchor, useHoverTracking, useImageTool, useKeybindings, useLassoTool, useLineTool, useNodeOverlayFrame, usePenTool, usePencilTool, usePinchGesture, usePinchZoomTool, usePointerStylus, usePolygonTool, usePublishSelection, useRectTool, useResizePolicy, useRotateTool, useScene, useSceneAdapter, useSceneTextEdit, useSelectTool, useSelectionContext, useSimulation, useSliceDep, useStandardActions, useStarTool, useTextEdit, useTextTool, useTools, useVelocityTracker, useVisibleRaf, useZoom, viewportDragPanAction, viewportWheelPanAction, viewportZoomAction, viewportsAt, visualBoundsViaDescriptor, when, withAlpha01, withCoord, withGradientKind, withinPxBox, withinPxRadius, worldEditToStorage, zoomAt, zoomAtLeast };
|
|
10778
|
+
export { ANCHOR_HIT_BASE_PX, Action, type ActionShortcut, ActionsProp, ActionsProviderIfRoot, ActionsRegistry, Affordance, AffordanceBinding, AffordanceHit, AffordanceRegion, type AffordanceRegionHit, type AlignAdapter, type AlignAnchor, type AlignBounds, type AlignBoundsProjection, type AlignEdge, type AlignMatchResult, type AlignMoveArgs, type AlignmentBehaviorBase, type AnchorHit, type AnchorScratch, type AnchorState, type AnimateOnSetPoseOptions, AnimationHandle, Animator, AnyTool, AreaSelectAdapter, type ArrayAdapter, type ArrayAdapterConfig, ArrowIcon, BUILTIN_MARKERS, BUNDLE_TOOLS, BindingScope, BooleansAdapter, Bounds, BoundsConstraint, type BuildChromeCtxArgs, BuiltinShapeToolId, type BuiltinToolId, type BuiltinToolOptions, COARSE_TARGET_SCALE, CURVE_REPS, type CanvasExtensionApi, type CanvasFocusReturn, type CanvasHelpers, type CanvasProps, type CanvasSelectionMode, type CanvasSize, type CanvasSizeSnapshot, type CanvasSurfaceHelpers, CanvasView, type CanvasViewHelpers, type CanvasViewProps, type CaretIndexAtOpts, type CellHighlightLayerOpts, ChromeCtx, ChromeId, ChromeState, type ClampBounds, ClipboardSnapshot, type CoalescedCtx, type ColorInterpolate, ColorOverrideRegistry, type ColorSpace, CommonAffordanceScratch, type ComposeSelectionPoseOpts, type ComputeFitViewOptions, Condition, ContentHandlerEntry, Contribution, 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 CycleHandle, type CycleVertexColorsOptions, DEFAULT_ALPHA_DECAY, DEFAULT_ALPHA_MIN, DEFAULT_DEBUG_STROKES, DEFAULT_DEBUG_THEME, DEFAULT_DEVICE_PROFILE, DEFAULT_FILL_COLOR, DEFAULT_FLATTEN_TOLERANCE, 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, DebugConfig, DebugSink, DebugSnapshot, DebugStrokes, DebugTheme, type DefaultTextData, DepRegistryProviderIfRoot, DepSchema, type DeriveAlignmentGuidesOptions, DetectedDeviceFacts, DeviceProfile, DeviceProfileProvider, type DeviceProfileProviderProps, Dims, type Discriminator, Dispatcher, 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, Eligibility, type EligibilityState, EllipseIcon, ExcludeIcon, EyedropperIcon, FALLBACK_FIT_VIEW, 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, HotkeyTrigger, IDENTITY_JOINT, type IconProps, ImageIcon, type ImageNodeData, type ImageStatus, type IndicatorStyle, InertiaConfig, InsertAdapter, InsertBehavior, InsertExtras, type InsertNodeFactory, type InsertOp, type InsertOverlayStyle, IntersectIcon, type Joint, type JointTransform, KIT_STANDARD_ACTION_IDS, type LabelOptions, LassoHitMode, LassoIcon, LassoSelectAdapter, LassoSelectBehavior, LayerEnumerableAdapter, LayerGroup, 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, ModifierState, type MomentumOptions, MoveAdapter, MoveBehavior, type NestedHitOpts, type NestedHitTester, type NodeClientRect, NodeId, type NodeInk, type NodeInkCtx, type NodeOverlayFrame, type NodePaintCtx, type NodeProperties, type NodePropertiesEntry, type NodeRouting, type NodeRoutingEntry, type NodeShapeEntry, type NodeSilhouetteCtx, OngoingOverlay, type OpenFilePickerOptions, OrderedAdapter, OriginProjection, type OverlayPoint, OverlayPosition, PAINTED_CURSOR_LAYER_ID, PATH_ANCHOR_CHROME_ID, type PaintBindContext, type PaintKind, type PaintKindEditorProps, type PaintKindEntry, type PaintProgram, type PaintedCursor, type PaintedCursorFrame, type PaintedCursorState, PanBounds, type ParallaxOpts, Path, type PathAnchor, type PathAnchorAffordanceOptions, PathBuilder, PathDrawCommand, type PathEditingOverlayStyle, PathFillRule, type PathInWorldPose, type PenAnchor, PenIcon, type PenPreviewStyle, type PenScratch, type PenSubpath, PencilIcon, type PencilPoint, PickHud, type PickHudProps, type PickTopMostHitAdapter, type PinchZoomOptions, type PixelRenderPlan, type PointInPathOptions, type PointInTextPoseOpts, PointSnapBehavior, PointerProviderIfRoot, type PointerSample, type PointerSession, type PointerSessionCallbacks, type PointerSessionCancelReason, type PointerSessionOptions, type PointerStylusState, PolygonIcon, PolygonPath, type PolygonPoint, type Pose, PoseProjection, type PoseRotation, type PressureToWidthOptions, type Pt, RECT_ALIGN_PROJECTION, ROTATION_HANDLE_BASE_PX, type RangeStyle, type RasterImage, RectIcon, RectPath, RectPose, type RegisterNodeShapeOptions, RegisteredOp, RenderLayer, type RenderSceneToCanvasArgs, type RenderSceneToPixelsArgs, type ReorderDirection, ResizeAdapter, ResizeAnchor, ResizePose, type ResolvableView, RotateAdapter, RotateBehavior, type RotateGeometry, RotatedPose, type RotationAffordanceOptions, type RotationHandle, type RotationScratch, Rule, RuleCtx, 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, ScopedBinding, type ScratchKey, type ScratchStore, type SelectAdapter, type SelectFromLassoOptions, SelectIcon, SelectionApi, 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 SimulationForce, type SimulationNode, 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, type TextEditScreenPose, type TextEditSelection, TextIcon, type ThresholdDragHandle, type ThresholdDragOptions, type TileGridOptions, type TilePatternOpts, Tool, type ToolBundle, ToolDef, ToolKeybinding, 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 ToolPrefNumberUnit, type ToolPrefObject, type ToolPrefPaint, type ToolPrefString, type ToolPrefStringControl, type ToolsApi, type TweenPoseOptions, type TweenVertexColorsOptions, UnionIcon, 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 UseGestureDispatcherOptions, 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, UseResizeOptions, type UseResizePolicyOptions, type UseRotateOptions, type UseRotateToolOptions, UseSceneOptions, type UseSceneTextEditOptions, type UseSceneTextEditReturn, type UseSceneTrivialOptions, type UseSelectToolOptions, UseSelectionOptions, type UseSimulationOptions, type UseStandardActionsOptions, type UseStarToolOptions, type UseTextEditOptions, type UseTextEditReturn, type UseToolsOptions, VERSION, type Vec2, type VelocityTracker, VertexColorChannel, View, ViewAnimationOptions, type ViewRect, type ViewResolver, type ViewTarget, ViewTransform, ViewportDims, type ViewportLayer, ViewportToolDef, type ViewportZoomAnimateOptions, type ViewportZoomOptions, VisibilityRules, type VisibleRaf, type VisibleRafOptions, type VisibleRafTarget, WHEEL_ZOOM_STEP, WeaselProvider, type WheelInput, type WheelPanOptions, type WheelPanOpts, ZoomBound, type ZoomClampOpts, 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, clientToCanvas, 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, createPaintedCursorState, createParallaxLayer, createPathAnchorAffordances, createPathEditingOverlayLayer, createPathLayer, createPenPreviewLayer, createReorderOp, createReparentOp, createRotationAffordance, createScene, createSelectionHandlesLayer, createSelectionOutlineLayer, createSelectionOverlayLayer, createSetDataOp, createSetLayerOp, createSetPathOp, createSetSelectionOp, createSetTextOp, createTextLayer, createTilePattern, createTransformOp, createVelocityTracker, createViewResolver, createViewportLayer, cycleVertexColors, decomposePath, defaultCommitAdapter, defaultDrawOne, defaultLabelTextRenderer, defaultNodeProperties, defaultNodeRouting, defaultVisibilityRules, defineTool, defineViewportTool, deleteScratch, deriveAlignmentGuides, deriveParallaxView, dispatchApplyBatch, dlog, domPositionToCharOffset, domToRuns, dwarn, editAnchorsAction, ellipsePath, enumerateAnchors, fillInPoseFrame, fillToBoundsFrame, findNodeShape, findShapeInk, findShapeSilhouette, fitTextPose, fitToBounds, fitZoom, flattenCubic, flattenCubicWithArcLen, flattenQuadratic, flattenQuadraticWithArcLen, focused, forEachCoalesced, freeform, gateLayer, gesturing, getAlpha01, getImageBitmap, getMarker, getNodeShapes, getPaintKind, getScratch, getStylusData, gradientForBounds, gradientGeometry, guideSnapStrategy, hexToRgba, hitAffordanceRegions, hitAnchor, hitRotationHandle, hostAnchorCss, hostAnchorRect, hovering, hoveringSelected, imageStatus, inferredNodeProperties, inferredNodeRouting, insertAction, interpolateView, isBuiltinToolPref, isDebugEnabled, isEditableTarget, isGradientFill, isPatternSpec, keySpecShortcut, lassoSelectAction, lerpColorArray, lerpOklab, lerpOklch, linePath, listMarkers, listPaintKinds, liveScope, makePinchZoomAction, makeViewportWheelPanAction, makeViewportZoomAction, markerDrawCommands, markerInset, markerKeyOf, markerSites, matchAlignment, matchesKeyBinding, meanScale, mergeAlphaFromPrev, mergeContributions, modeIn, modeIs, modeNot, modifierHeld, momentum, moveAction, multiActive, nearest, nearestWithin, nestedHitTester, never, nodeHasFlag, none, normalizeHex, not, nurbs, oklabToOklch, oklabToSrgbU8, oklchToOklab, openFilePicker, openPointerSession, 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, pointInPath, pointInRotatedRect, pointInTextPose, polygonFromPoints, polylineFromPoints, poseRotationOf, pressureToWidth, pxExtent, rainbowVertexColors, rebuildOp, rectCorners, rectPath, registerMarker, registerNodeShape, registerOpFactory, registerPaintKind, registeredOpNames, regularPolygonPath, renderLabel, renderSceneToCanvas, renderSceneToPixels, resizeAction, resolveColor, resolveDeviceProfile, resolveFillPattern, resolveMarkerSize, resolvePatternSpec, resolveSkeleton, resolveVisibility, rgbaToHex, rotateAction, rotateAroundAABBCenter, rotatePathAround, rotatePoint, rotatedRectCorners, rotationDegreesUnit, rotationHandle, roundToCell, runsToDom, sampleGradientStops, sampleTrack, scaleDelta, scalePathToBounds, sceneFromJSON, sceneNodeClientRect, sceneSelectionStore, sceneToAdapter, scopeBindings, scratchKey, selectFromLasso, selectionAtLeast, selectionEmpty, selectionIs, setFlagOverRange, setScratch, shapeCoversPoint, snap, snapPoint, solid, solidVertexColors, spiro, splitPathByLine, splitSubpaths, springPose, springVertexColors, srgbU8ToOklab, staggerVertexColors, starPath, startThresholdDrag, strokeInsets, strokeOf, strokeWith, styleAtRange, subscribeImageReady, textCommand, textCommandFromRuns, tileGrid, toHex8, transformPath, translatePath, translatePolygonInPlace, translatePoseViaDescriptor, trimPolyline, tweenPose, tweenVertexColors, unionAABB, unionBounds, unionBoundsPath, useAlign, useAnimator, useArrayAdapter, useAutoCenter, useBooleans, useBooleansAdapter, useCanvasFocus, useCanvasSize, useDeviceProfile, useDistribute, useDragGesture, useDragHandle, useDragRadial, useDragRect, useDropZone, useEllipseTool, useEyedropperTool, useGestureDispatcher, useGridCellHover, useGuides, useHandTool, useHandleDrag, useHostAnchor, useHoverTracking, useImageTool, useKeybindings, useLassoTool, useLineTool, useNodeOverlayFrame, usePenTool, usePencilTool, usePinchGesture, usePointerStylus, usePolygonTool, usePublishSelection, useRectTool, useResizePolicy, useRotateTool, useScene, useSceneAdapter, useSceneTextEdit, useSelectTool, useSelectionContext, useSimulation, useSliceDep, useStandardActions, useStarTool, useTextEdit, useTextTool, useTools, useVelocityTracker, useVisibleRaf, viewportDragPanAction, viewportWheelPanAction, viewportZoomAction, viewportsAt, visualBoundsViaDescriptor, wheelPan, wheelZoom, wheelZoomFactor, when, withAlpha01, withCoord, withGradientKind, withinPxBox, withinPxRadius, worldEditToStorage, zoomAt, zoomAtLeast };
|