@weasel-js/core 1.4.1 → 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 +428 -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-NU7D64RL.js → chunk-WYPSGIYS.js} +1142 -595
- 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 +128 -237
- 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-NU7D64RL.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, a as ShaderDrawCommand, c as ShaderUniform, 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
|
|
@@ -854,7 +856,7 @@ declare function withinPxRadius(dx: number, dy: number, px: number, scale: Scale
|
|
|
854
856
|
type PointerSessionCancelReason =
|
|
855
857
|
/** The browser cancelled the pointer (touch interrupted, palm rejection). */
|
|
856
858
|
'pointercancel'
|
|
857
|
-
/**
|
|
859
|
+
/** The origin left the document mid-gesture, taking capture with it. */
|
|
858
860
|
| 'lostcapture'
|
|
859
861
|
/** `cancel()` — an unmount, a window blur, Escape, a consumer's own rule. */
|
|
860
862
|
| 'aborted'
|
|
@@ -887,9 +889,10 @@ interface PointerSession {
|
|
|
887
889
|
* Listens on the origin's document rather than on the element: a captured
|
|
888
890
|
* element that is removed mid-drag stops receiving events, and every listener
|
|
889
891
|
* hung on it goes with it. Three recovery rules close the gaps a plain
|
|
890
|
-
* pointerup/pointercancel pair leaves —
|
|
891
|
-
* reporting no held button is read as
|
|
892
|
-
* fresh press on the same pointer says
|
|
892
|
+
* pointerup/pointercancel pair leaves — losing capture cancels only once the
|
|
893
|
+
* origin has left the document, a move reporting no held button is read as
|
|
894
|
+
* the release that never arrived, and a fresh press on the same pointer says
|
|
895
|
+
* the tracked one had already ended.
|
|
893
896
|
*/
|
|
894
897
|
declare function openPointerSession(origin: Element, down: PointerEvent | React.PointerEvent, cb: PointerSessionCallbacks, opts?: PointerSessionOptions): PointerSession;
|
|
895
898
|
|
|
@@ -979,10 +982,15 @@ declare function useDropZone<T extends HTMLElement>(opts: DropZoneOptions): (el:
|
|
|
979
982
|
*/
|
|
980
983
|
interface ThresholdDragOptions {
|
|
981
984
|
threshold?: number;
|
|
985
|
+
/** Element the session opens on. Defaults to `e.currentTarget`; a list must
|
|
986
|
+
* pass its container, since a grabbed row unmounting drops capture. */
|
|
987
|
+
origin?: Element;
|
|
982
988
|
onActivate?: (e: PointerEvent) => void;
|
|
983
989
|
onMove: (e: PointerEvent) => void;
|
|
984
990
|
onCommit: (e: PointerEvent) => void;
|
|
985
|
-
/** Released below the threshold
|
|
991
|
+
/** Released below the threshold — the click the press turned out to be. */
|
|
992
|
+
onClick?: (e: PointerEvent) => void;
|
|
993
|
+
/** Ended without a release: pointercancel, lost capture, or `cancel()`. */
|
|
986
994
|
onCancel?: () => void;
|
|
987
995
|
}
|
|
988
996
|
/** Handle returned by `startThresholdDrag` exposing live gesture state. */
|
|
@@ -1151,7 +1159,7 @@ declare function zoomAt(view: View, anchor: {
|
|
|
1151
1159
|
* unit): `1` is 100%, `0.1` is 10%, `8` is 800%.
|
|
1152
1160
|
*
|
|
1153
1161
|
* Every zoom path defaults from these — `zoomAt`, the `viewport.zoom` and
|
|
1154
|
-
* pinch actions, `fitViewToBounds`, `computeWheelAction
|
|
1162
|
+
* pinch actions, `fitViewToBounds`, `computeWheelAction`. They
|
|
1155
1163
|
* used to carry two disagreeing pairs, so a fit could legally land at 10x
|
|
1156
1164
|
* and the next pinch frame would clamp it back to 8x.
|
|
1157
1165
|
*/
|
|
@@ -1189,73 +1197,6 @@ interface NodeClientRect {
|
|
|
1189
1197
|
*/
|
|
1190
1198
|
declare function sceneNodeClientRect(opts: SceneNodeClientRectOpts): NodeClientRect | null;
|
|
1191
1199
|
|
|
1192
|
-
/**
|
|
1193
|
-
* @deprecated Prefer the descriptor-based viewport idiom: `<SceneCanvas>` now
|
|
1194
|
-
* registers `viewport.pan` and `viewport.zoom` action descriptors via
|
|
1195
|
-
* `useStandardActions` + `useGestureDispatcher`. Pass `useHandTool()` via
|
|
1196
|
-
* `ambient` for drag-to-pan. The former `useWheelZoomTool`,
|
|
1197
|
-
* `useKeyboardZoomTool`, and `useWheelPanTool` hooks are dissolved.
|
|
1198
|
-
* `useZoom` was the original controller-style API; it remains exported with
|
|
1199
|
-
* full test coverage but no kit-internal usage. Slated for removal in a future major.
|
|
1200
|
-
*/
|
|
1201
|
-
interface UseZoomOptions {
|
|
1202
|
-
zoom: number;
|
|
1203
|
-
setZoom: (next: number) => void;
|
|
1204
|
-
pan: {
|
|
1205
|
-
x: number;
|
|
1206
|
-
y: number;
|
|
1207
|
-
};
|
|
1208
|
-
setPan: (next: {
|
|
1209
|
-
x: number;
|
|
1210
|
-
y: number;
|
|
1211
|
-
}) => void;
|
|
1212
|
-
min?: number;
|
|
1213
|
-
max?: number;
|
|
1214
|
-
wheelStep?: number;
|
|
1215
|
-
keyStep?: number;
|
|
1216
|
-
viewport?: {
|
|
1217
|
-
width: number;
|
|
1218
|
-
height: number;
|
|
1219
|
-
};
|
|
1220
|
-
sources?: {
|
|
1221
|
-
wheel?: boolean;
|
|
1222
|
-
keys?: boolean;
|
|
1223
|
-
doubleClick?: boolean;
|
|
1224
|
-
pinch?: boolean;
|
|
1225
|
-
};
|
|
1226
|
-
wheelRequiresModifier?: boolean;
|
|
1227
|
-
}
|
|
1228
|
-
/**
|
|
1229
|
-
* @deprecated See `UseZoomOptions` deprecation note. Prefer the
|
|
1230
|
-
* descriptor-based viewport idiom.
|
|
1231
|
-
*/
|
|
1232
|
-
interface UseZoomReturn {
|
|
1233
|
-
onWheel(e: WheelEvent | React.WheelEvent): void;
|
|
1234
|
-
onKeyDown(e: KeyboardEvent | React.KeyboardEvent): void;
|
|
1235
|
-
onDoubleClick(e: MouseEvent | React.MouseEvent): void;
|
|
1236
|
-
zoomTo(level: number, focal?: {
|
|
1237
|
-
x: number;
|
|
1238
|
-
y: number;
|
|
1239
|
-
}): void;
|
|
1240
|
-
zoomBy(factor: number, focal?: {
|
|
1241
|
-
x: number;
|
|
1242
|
-
y: number;
|
|
1243
|
-
}): void;
|
|
1244
|
-
reset(): void;
|
|
1245
|
-
}
|
|
1246
|
-
/**
|
|
1247
|
-
* Wheel/key/double-click zoom with focal-point preservation; returns event handlers and `zoomTo`/`zoomBy`/`reset`.
|
|
1248
|
-
*
|
|
1249
|
-
* @deprecated Prefer the descriptor-based viewport idiom:
|
|
1250
|
-
* `<SceneCanvas>` registers `viewport.pan` and `viewport.zoom` action
|
|
1251
|
-
* descriptors automatically. Pass `useHandTool()` via `ambient` for
|
|
1252
|
-
* drag-to-pan. `useZoom` covers the same input surface but doesn't
|
|
1253
|
-
* integrate with the tool dispatcher, selection, or other gestures.
|
|
1254
|
-
* No demo, no kit-internal hook, and no app currently consumes `useZoom`;
|
|
1255
|
-
* slated for removal in a future major.
|
|
1256
|
-
*/
|
|
1257
|
-
declare function useZoom(opts: UseZoomOptions): UseZoomReturn;
|
|
1258
|
-
|
|
1259
1200
|
/**
|
|
1260
1201
|
* Compute zoom and pan that fit `contentW x contentH` (in content units)
|
|
1261
1202
|
* inside `viewportW x viewportH` (in pixels). `padRatio` is the fraction of
|
|
@@ -1997,7 +1938,8 @@ declare const viewportDragPanAction: Action & {
|
|
|
1997
1938
|
*
|
|
1998
1939
|
* ## Design notes
|
|
1999
1940
|
* The invoker switches on `params.kind`:
|
|
2000
|
-
* - `'wheel'`:
|
|
1941
|
+
* - `'wheel'`: defers to `wheelZoom` (`core/viewport/wheelHandler`), the kit's
|
|
1942
|
+
* one statement of the wheel convention, anchored at (clientX, clientY).
|
|
2001
1943
|
* The dispatcher merges wheel event data into params at dispatch time, and
|
|
2002
1944
|
* converts the wheel event's client coords to canvas-local (subtracting the
|
|
2003
1945
|
* canvas's bounding rect) before merging — `zoomAt` expects canvas-local.
|
|
@@ -2084,11 +2026,10 @@ declare const viewportZoomAction: Action & {
|
|
|
2084
2026
|
*
|
|
2085
2027
|
* ## Design notes
|
|
2086
2028
|
* The dispatcher merges wheel event data (deltaX, deltaY, clientX, clientY)
|
|
2087
|
-
* into params at dispatch time. The invoker
|
|
2088
|
-
*
|
|
2089
|
-
*
|
|
2090
|
-
*
|
|
2091
|
-
* 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.
|
|
2092
2033
|
*
|
|
2093
2034
|
* `axis` locks the pan to one axis, matching `viewport.dragPan`'s param of
|
|
2094
2035
|
* the same name, so a consumer that wants a single-axis viewport can say so
|
|
@@ -2290,7 +2231,15 @@ interface UseStandardActionsOptions {
|
|
|
2290
2231
|
pointer?: DepSchema['pointer'];
|
|
2291
2232
|
/** Currently active tool id + hotkey-hold stack. */
|
|
2292
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>;
|
|
2293
2240
|
}
|
|
2241
|
+
/** Every id `useStandardActions` registers, in registration order. */
|
|
2242
|
+
declare const KIT_STANDARD_ACTION_IDS: readonly string[];
|
|
2294
2243
|
/**
|
|
2295
2244
|
* @experimental
|
|
2296
2245
|
* Register each kit-standard dep source and action descriptor into the
|
|
@@ -2338,6 +2287,7 @@ declare function defaultCommitAdapter<TPose>(scene: Scene<unknown, string, TPose
|
|
|
2338
2287
|
getSelection: () => string[];
|
|
2339
2288
|
setSelection: (ids: string[]) => void;
|
|
2340
2289
|
getParent: (id: string) => string | null;
|
|
2290
|
+
getRemovalClosure: (ids: readonly string[]) => string[];
|
|
2341
2291
|
getChildren: (parentId: string | null) => string[];
|
|
2342
2292
|
setChildOrder: (parentId: string | null, orderedIds: string[]) => void;
|
|
2343
2293
|
setPose: (id: string, pose: TPose) => void;
|
|
@@ -2685,37 +2635,57 @@ interface VisibleRaf {
|
|
|
2685
2635
|
declare function useVisibleRaf(frame: (time: number) => void, options?: VisibleRafOptions): VisibleRaf;
|
|
2686
2636
|
|
|
2687
2637
|
/**
|
|
2688
|
-
*
|
|
2689
|
-
*
|
|
2690
|
-
*
|
|
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.
|
|
2691
2650
|
*
|
|
2692
|
-
*
|
|
2693
|
-
*
|
|
2694
|
-
* ({@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.
|
|
2695
2653
|
*/
|
|
2696
|
-
|
|
2697
|
-
|
|
2698
|
-
|
|
2699
|
-
|
|
2700
|
-
panX: number;
|
|
2701
|
-
panY: number;
|
|
2702
|
-
}
|
|
2703
|
-
/** 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. */
|
|
2704
2658
|
interface WheelInput {
|
|
2705
2659
|
deltaX: number;
|
|
2706
2660
|
deltaY: number;
|
|
2707
|
-
|
|
2708
|
-
|
|
2661
|
+
/** Zoom anchor, canvas-local: client coords minus the canvas's rect. */
|
|
2662
|
+
x: number;
|
|
2663
|
+
y: number;
|
|
2709
2664
|
shiftKey?: boolean;
|
|
2665
|
+
ctrlKey?: boolean;
|
|
2710
2666
|
metaKey?: boolean;
|
|
2711
2667
|
}
|
|
2712
|
-
/**
|
|
2713
|
-
|
|
2714
|
-
|
|
2715
|
-
|
|
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;
|
|
2716
2673
|
}
|
|
2717
|
-
/**
|
|
2718
|
-
|
|
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;
|
|
2719
2689
|
|
|
2720
2690
|
/**
|
|
2721
2691
|
* Convert client coords to element CSS-pixel coords (relative to the element's
|
|
@@ -3311,43 +3281,6 @@ declare function useHandTool(opts?: UseHandToolOptions): Tool<HandScratch | null
|
|
|
3311
3281
|
* factories and hit gating belong on those deps, not on the tool. */
|
|
3312
3282
|
declare function useTextTool(): Tool<undefined>;
|
|
3313
3283
|
|
|
3314
|
-
/** The camera a pinch acts on, and the origin its anchor is measured from. */
|
|
3315
|
-
interface PinchZoomTarget {
|
|
3316
|
-
view: View;
|
|
3317
|
-
setView: (v: View) => void;
|
|
3318
|
-
/** Client-space origin of the surface this camera paints into. */
|
|
3319
|
-
origin: {
|
|
3320
|
-
left: number;
|
|
3321
|
-
top: number;
|
|
3322
|
-
};
|
|
3323
|
-
}
|
|
3324
|
-
/** Options for `usePinchZoomTool`: the zoom limits, and whether it is wired
|
|
3325
|
-
* at all. */
|
|
3326
|
-
interface PinchZoomToolOpts {
|
|
3327
|
-
min?: number;
|
|
3328
|
-
max?: number;
|
|
3329
|
-
enabled?: boolean;
|
|
3330
|
-
/**
|
|
3331
|
-
* Which camera the anchor point belongs to. Return `null` — or omit this —
|
|
3332
|
-
* for the canvas's own. A canvas hosting several views resolves the point
|
|
3333
|
-
* here, so a pinch inside a panel zooms the panel rather than the canvas
|
|
3334
|
-
* underneath it.
|
|
3335
|
-
*/
|
|
3336
|
-
resolveTarget?: (clientX: number, clientY: number) => PinchZoomTarget | null;
|
|
3337
|
-
}
|
|
3338
|
-
/**
|
|
3339
|
-
* Two-finger pinch zoom on the canvas. Standalone hook (not a Tool record)
|
|
3340
|
-
* because it requires direct multi-pointer access on the canvas element.
|
|
3341
|
-
*
|
|
3342
|
-
* The anchor point under the gesture midpoint stays fixed on screen as the
|
|
3343
|
-
* view scales.
|
|
3344
|
-
*
|
|
3345
|
-
* @param getView Read at gesture time, not at render time: each pinch move
|
|
3346
|
-
* applies a per-frame delta to the view the previous move produced, and the
|
|
3347
|
-
* canvas does not re-render between them.
|
|
3348
|
-
*/
|
|
3349
|
-
declare function usePinchZoomTool(canvasRef: React.RefObject<HTMLElement | null>, getView: () => View, setView: (v: View) => void, opts?: PinchZoomToolOpts): void;
|
|
3350
|
-
|
|
3351
3284
|
/**
|
|
3352
3285
|
* In-progress pen anchor. `outHandle` is set when the anchor was placed via
|
|
3353
3286
|
* click-drag (smooth anchor); undefined for click-placed corners.
|
|
@@ -4457,37 +4390,6 @@ interface HierarchicalAdapter<TNode, TPose> {
|
|
|
4457
4390
|
getPose(id: string): TPose;
|
|
4458
4391
|
}
|
|
4459
4392
|
|
|
4460
|
-
/**
|
|
4461
|
-
* The consumer-facing `viewport` prop shape for `<SceneCanvas>`.
|
|
4462
|
-
*
|
|
4463
|
-
* The features it names are wired by the `viewport.*` action descriptors
|
|
4464
|
-
* (`useStandardActions` + `useGestureDispatcher`) and by SceneCanvas itself,
|
|
4465
|
-
* which derives the hand tool and the registered flag inline.
|
|
4466
|
-
*/
|
|
4467
|
-
|
|
4468
|
-
/** Which viewport interactions `<SceneCanvas>` wires up — pan inertia, pinch
|
|
4469
|
-
* zoom, wheel pan, wheel and keyboard zoom. Each may be switched off with
|
|
4470
|
-
* `false` or tuned with an options object. */
|
|
4471
|
-
interface ViewportConfig {
|
|
4472
|
-
inertia?: boolean | {
|
|
4473
|
-
friction?: number;
|
|
4474
|
-
minSpeed?: number;
|
|
4475
|
-
boundary?: 'stop' | 'bounce' | 'spring';
|
|
4476
|
-
bounds?: PanBounds;
|
|
4477
|
-
};
|
|
4478
|
-
pinchZoom?: boolean | {
|
|
4479
|
-
min?: number;
|
|
4480
|
-
max?: number;
|
|
4481
|
-
};
|
|
4482
|
-
/** Wheel pan (plain wheel → pan). Default: `true`. Set `false` to disable,
|
|
4483
|
-
* or pass a {@link WheelPanOptions} object to lock it to one axis. */
|
|
4484
|
-
pan?: boolean | WheelPanOptions;
|
|
4485
|
-
/** Wheel + keyboard zoom (Cmd+wheel, Cmd+=/-/0). Default: `true`. Set `false`
|
|
4486
|
-
* to disable, or pass a {@link ViewportZoomOptions} object to tune the wheel
|
|
4487
|
-
* trigger + scale clamp. */
|
|
4488
|
-
zoom?: boolean | ViewportZoomOptions;
|
|
4489
|
-
}
|
|
4490
|
-
|
|
4491
4393
|
/**
|
|
4492
4394
|
* The scene-tree reading methods Canvas feature-detects at draw time, as an
|
|
4493
4395
|
* *optional* mixin. A `SceneCanvasAdapter` supplies them; flat / bare-Canvas
|
|
@@ -4757,7 +4659,7 @@ interface CanvasProps<TNode extends {
|
|
|
4757
4659
|
* `setView` call passes through `clampView(next, viewBounds, {width, height})`
|
|
4758
4660
|
* before commit, keeping the visible rect inside `viewBounds`. If the visible
|
|
4759
4661
|
* rect is larger than the bounds along an axis (zoomed out past extent), that
|
|
4760
|
-
* axis is centered. Has no effect on `scale
|
|
4662
|
+
* axis is centered. Has no effect on `scale`.
|
|
4761
4663
|
*
|
|
4762
4664
|
* A viewport concern, not scene-shaped. Consumers that want the pan to stay
|
|
4763
4665
|
* inside a document page boundary should wire this with the page dimensions.
|
|
@@ -4829,21 +4731,6 @@ interface CanvasProps<TNode extends {
|
|
|
4829
4731
|
* report "no gesture in flight" and never fire.
|
|
4830
4732
|
*/
|
|
4831
4733
|
gestureSource?: GestureSource;
|
|
4832
|
-
/**
|
|
4833
|
-
* Pinch-zoom DOM listener attachment for the canvas surface. When supplied,
|
|
4834
|
-
* `<Canvas>` calls `usePinchZoomTool` with `canvasRef` so two-finger pinch
|
|
4835
|
-
* events are handled directly on the canvas element.
|
|
4836
|
-
*
|
|
4837
|
-
* Hand tool registration, wheel pan/zoom action descriptors, and keyboard
|
|
4838
|
-
* zoom shortcuts are SceneCanvas-level concerns and are NOT owned by Canvas.
|
|
4839
|
-
* Those belong with the tool registry and gesture dispatcher that live in
|
|
4840
|
-
* SceneCanvas — which is also why SceneCanvas does not pass this prop: it
|
|
4841
|
-
* drives pinch through the `viewport.pinchZoom` action instead, and both
|
|
4842
|
-
* paths at once would apply one gesture's zoom factor twice.
|
|
4843
|
-
*
|
|
4844
|
-
* When omitted, no pinch-zoom listener is attached.
|
|
4845
|
-
*/
|
|
4846
|
-
viewport?: ViewportConfig;
|
|
4847
4734
|
/**
|
|
4848
4735
|
* FillStyle applied to the full canvas surface behind the scene. Accepts the
|
|
4849
4736
|
* kit's `FillStyle` union (solid / pattern / linear-gradient / radial-gradient /
|
|
@@ -4932,6 +4819,13 @@ interface CanvasProps<TNode extends {
|
|
|
4932
4819
|
* it is not drawn. Reordering two layers means naming all of them.
|
|
4933
4820
|
*/
|
|
4934
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[];
|
|
4935
4829
|
}
|
|
4936
4830
|
|
|
4937
4831
|
/** Minimal selection contract `sceneToAdapter` needs to wire `getSelection` /
|
|
@@ -4961,6 +4855,7 @@ type SceneCanvasAdapter<TData, TLayer extends string, TPose> = MoveAdapter<Node$
|
|
|
4961
4855
|
setSelection(ids: string[]): void;
|
|
4962
4856
|
insertNode(node: Node$1<TData, TLayer, TPose>, index?: number): void;
|
|
4963
4857
|
removeNode(id: string): void;
|
|
4858
|
+
getRemovalClosure(ids: readonly string[]): string[];
|
|
4964
4859
|
applyOps(ops: Op[], label?: string): void;
|
|
4965
4860
|
snapshotSelection(ids: string[]): ClipboardSnapshot;
|
|
4966
4861
|
commitPaste(clipboard: ClipboardSnapshot, offset: {
|
|
@@ -6251,9 +6146,6 @@ declare function SceneViewCanvasInner<TData, TLayer extends string, TPose>(props
|
|
|
6251
6146
|
*/
|
|
6252
6147
|
declare const SceneViewCanvas: typeof SceneViewCanvasInner;
|
|
6253
6148
|
|
|
6254
|
-
/** Build a scene outside React. `useScene` is the usual entry point; reach for
|
|
6255
|
-
* this in tests, in headless rendering, or wherever a scene must outlive a
|
|
6256
|
-
* component. Throws if no system layers are declared. */
|
|
6257
6149
|
declare function createScene<TData, TLayer extends string, TPose = RectPose>(options: UseSceneOptions<TData, TLayer, TPose>): Scene<TData, TLayer, TPose>;
|
|
6258
6150
|
/** The scene's selection in the shape `createHistory` wants, for a consumer
|
|
6259
6151
|
* building a second History over the same scene (a modality machine, a
|
|
@@ -7569,7 +7461,7 @@ interface UseSceneTextEditReturn extends UseTextEditReturn {
|
|
|
7569
7461
|
* bubble). The handler looks up the canvas via `e.target`, hits the
|
|
7570
7462
|
* top-most text node under the cursor via `pointInTextPose`, resolves
|
|
7571
7463
|
* a caret offset via `caretIndexAt`, and starts edit on that node. */
|
|
7572
|
-
onDoubleClick: (e: MouseEvent
|
|
7464
|
+
onDoubleClick: (e: MouseEvent<HTMLElement>) => void;
|
|
7573
7465
|
}
|
|
7574
7466
|
/** Wire double-click-to-edit text on a scene: mounts a DOM editing overlay
|
|
7575
7467
|
* over the node being edited and writes the result back as an undoable op. */
|
|
@@ -7910,15 +7802,16 @@ interface DeleteArgs<TNode extends {
|
|
|
7910
7802
|
index?: number;
|
|
7911
7803
|
/** Full slot, anchor included. Written by `apply`; supersedes `index`. */
|
|
7912
7804
|
slot?: Slot;
|
|
7913
|
-
/**
|
|
7914
|
-
*
|
|
7915
|
-
* brings
|
|
7916
|
-
*
|
|
7917
|
-
*
|
|
7918
|
-
|
|
7919
|
-
|
|
7920
|
-
|
|
7921
|
-
|
|
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. */
|
|
7922
7815
|
declare function createDeleteOp<TNode extends {
|
|
7923
7816
|
id: string;
|
|
7924
7817
|
}>(args: DeleteArgs<TNode>): Op;
|
|
@@ -8294,8 +8187,9 @@ declare function pointInPath(path: Path, x: number, y: number, opts?: PointInPat
|
|
|
8294
8187
|
* Polygon-vs-axis-aligned-rect tests. Pure functions; no React/kit deps.
|
|
8295
8188
|
*
|
|
8296
8189
|
* `polygon` is a closed polyline given as an ordered vertex array; the
|
|
8297
|
-
* closing edge from `polygon[N-1]` to `polygon[0]` is implicit. Even-odd
|
|
8298
|
-
*
|
|
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`.
|
|
8299
8193
|
*/
|
|
8300
8194
|
|
|
8301
8195
|
/** A 2D point or vector. */
|
|
@@ -8308,26 +8202,23 @@ interface Vec2 {
|
|
|
8308
8202
|
* Path-vs-geometry hit-test helpers. Five pure functions covering all
|
|
8309
8203
|
* combinations of path-vs-point, path-vs-rect, and path-vs-polygon.
|
|
8310
8204
|
*
|
|
8311
|
-
* `RectPath` short-circuits to AABB arithmetic. `PolygonPath`
|
|
8312
|
-
*
|
|
8313
|
-
*
|
|
8314
|
-
*
|
|
8315
|
-
*
|
|
8316
|
-
*
|
|
8317
|
-
* For point-in-path specifically, use the existing `pointInPath` from
|
|
8318
|
-
* `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`.
|
|
8319
8210
|
*/
|
|
8320
8211
|
|
|
8321
8212
|
/** Returns true if (x, y) lies within the filled region of `path`. */
|
|
8322
|
-
declare function pathContainsPoint(path: Path, x: number, y: number): boolean;
|
|
8213
|
+
declare function pathContainsPoint(path: Path, x: number, y: number, opts?: PointInPathOptions): boolean;
|
|
8323
8214
|
/** Returns true if `rect` is entirely contained within `path`. */
|
|
8324
|
-
declare function pathContainsRect(path: Path, rect: Rect): boolean;
|
|
8215
|
+
declare function pathContainsRect(path: Path, rect: Rect, opts?: PointInPathOptions): boolean;
|
|
8325
8216
|
/** Returns true if `rect` overlaps (intersects or contains) `path`. */
|
|
8326
|
-
declare function pathIntersectsRect(path: Path, rect: Rect): boolean;
|
|
8217
|
+
declare function pathIntersectsRect(path: Path, rect: Rect, opts?: PointInPathOptions): boolean;
|
|
8327
8218
|
/** Returns true if every vertex of `polygon` lies inside `path`. */
|
|
8328
|
-
declare function pathContainsPolygon(path: Path, polygon: readonly Vec2[]): boolean;
|
|
8219
|
+
declare function pathContainsPolygon(path: Path, polygon: readonly Vec2[], opts?: PointInPathOptions): boolean;
|
|
8329
8220
|
/** Returns true if `polygon` overlaps (intersects or is contained by) `path`. */
|
|
8330
|
-
declare function pathIntersectsPolygon(path: Path, polygon: readonly Vec2[]): boolean;
|
|
8221
|
+
declare function pathIntersectsPolygon(path: Path, polygon: readonly Vec2[], opts?: PointInPathOptions): boolean;
|
|
8331
8222
|
|
|
8332
8223
|
/**
|
|
8333
8224
|
* Pure-geometry distance from a point to a path's boundary (stroke), with
|
|
@@ -10884,4 +10775,4 @@ interface InsertOverlayStyle {
|
|
|
10884
10775
|
lineWidth?: number;
|
|
10885
10776
|
}
|
|
10886
10777
|
|
|
10887
|
-
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 };
|