@weasel-js/core 1.10.0 → 1.10.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +168 -0
- package/README.md +33 -0
- package/dist/affordances/composeAffordanceLayer.js +21 -21
- package/dist/affordances/composeAffordanceLayer.js.map +1 -1
- package/dist/affordances/hitAffordanceRegions.js +48 -32
- package/dist/affordances/hitAffordanceRegions.js.map +1 -1
- package/dist/affordances/pathAnchors.js +50 -28
- package/dist/affordances/pathAnchors.js.map +1 -1
- package/dist/affordances/rotateCursor.js +12 -0
- package/dist/affordances/rotateCursor.js.map +1 -0
- package/dist/affordances/rotationHandle.js +40 -43
- package/dist/affordances/rotationHandle.js.map +1 -1
- package/dist/animation/rig/rigNode.js +9 -3
- package/dist/animation/rig/rigNode.js.map +1 -1
- package/dist/animation/rig/rigSeat.js +46 -13
- package/dist/animation/rig/rigSeat.js.map +1 -1
- package/dist/animation/rig/skinBinding.js +22 -14
- package/dist/animation/rig/skinBinding.js.map +1 -1
- package/dist/barrel/canvas.js +29 -28
- package/dist/barrel/interactions.js +33 -32
- package/dist/barrel/paths.js +11 -10
- package/dist/barrel/routing.js +49 -48
- package/dist/barrel/scene.js +10 -10
- package/dist/barrel/viewport.js +24 -21
- package/dist/canvas/Canvas.js +6 -17
- package/dist/canvas/Canvas.js.map +1 -1
- package/dist/canvas/CanvasView.js +34 -37
- package/dist/canvas/CanvasView.js.map +1 -1
- package/dist/canvas/CursorCoordsHud.js +3 -3
- package/dist/canvas/CursorCoordsHud.js.map +1 -1
- package/dist/canvas/DrawCanvas.js +3 -3
- package/dist/canvas/DrawCanvas.js.map +1 -1
- package/dist/canvas/SceneCanvas/PointerProviderIfRoot.js +24 -23
- package/dist/canvas/SceneCanvas/PointerProviderIfRoot.js.map +1 -1
- package/dist/canvas/SceneCanvas/StandardActionsRegistrar.js +40 -49
- package/dist/canvas/SceneCanvas/StandardActionsRegistrar.js.map +1 -1
- package/dist/canvas/SceneCanvas/defaultNodeProperties.js +297 -259
- package/dist/canvas/SceneCanvas/defaultNodeProperties.js.map +1 -1
- package/dist/canvas/SceneCanvas/features.js +3 -24
- package/dist/canvas/SceneCanvas/features.js.map +1 -1
- package/dist/canvas/SceneCanvas/insertPreviewCommands.js +97 -0
- package/dist/canvas/SceneCanvas/insertPreviewCommands.js.map +1 -0
- package/dist/canvas/SceneCanvas/poseGeometry.js.map +1 -1
- package/dist/canvas/SceneCanvas/props.js.map +1 -1
- package/dist/canvas/SceneCanvas/scenePointQuery.js +50 -0
- package/dist/canvas/SceneCanvas/scenePointQuery.js.map +1 -0
- package/dist/canvas/SceneCanvas/shapeGeneratorProperties.js +52 -0
- package/dist/canvas/SceneCanvas/shapeGeneratorProperties.js.map +1 -0
- package/dist/canvas/SceneCanvas/useActionTunings.js +17 -0
- package/dist/canvas/SceneCanvas/useActionTunings.js.map +1 -0
- package/dist/canvas/SceneCanvas/useCanvasCamera.js +37 -29
- package/dist/canvas/SceneCanvas/useCanvasCamera.js.map +1 -1
- package/dist/canvas/SceneCanvas/useCanvasDispatcher.js +11 -11
- package/dist/canvas/SceneCanvas/useCanvasDispatcher.js.map +1 -1
- package/dist/canvas/SceneCanvas/useDispatcherOverlayLayer.js +45 -109
- package/dist/canvas/SceneCanvas/useDispatcherOverlayLayer.js.map +1 -1
- package/dist/canvas/SceneCanvas/usePreviewGhostLayer.js +49 -41
- package/dist/canvas/SceneCanvas/usePreviewGhostLayer.js.map +1 -1
- package/dist/canvas/SceneCanvas/useSceneSelectTool.js +64 -96
- package/dist/canvas/SceneCanvas/useSceneSelectTool.js.map +1 -1
- package/dist/canvas/SceneCanvas/worldPointAt.js +3 -4
- package/dist/canvas/SceneCanvas/worldPointAt.js.map +1 -1
- package/dist/canvas/SceneCanvas.js +77 -80
- package/dist/canvas/SceneCanvas.js.map +1 -1
- package/dist/canvas/SceneViewCanvas.js +3 -3
- package/dist/canvas/SceneViewCanvas.js.map +1 -1
- package/dist/canvas/SurfaceCanvas.js +40 -0
- package/dist/canvas/SurfaceCanvas.js.map +1 -0
- package/dist/canvas/adapterDerivedPath.js +13 -13
- package/dist/canvas/adapterDerivedPath.js.map +1 -1
- package/dist/canvas/adapterPickSource.js +34 -0
- package/dist/canvas/adapterPickSource.js.map +1 -0
- package/dist/canvas/affordanceAt.js +1 -1
- package/dist/canvas/affordanceAt.js.map +1 -1
- package/dist/canvas/buildSceneLayer.js.map +1 -1
- package/dist/canvas/buildSceneTree.js +56 -34
- package/dist/canvas/buildSceneTree.js.map +1 -1
- package/dist/canvas/copiesAbove.js +27 -0
- package/dist/canvas/copiesAbove.js.map +1 -0
- package/dist/canvas/defaultDrawOne.js +24 -23
- package/dist/canvas/defaultDrawOne.js.map +1 -1
- package/dist/canvas/deps/editAnchors.js +45 -50
- package/dist/canvas/deps/editAnchors.js.map +1 -1
- package/dist/canvas/deps/hitTestArea.js +30 -15
- package/dist/canvas/deps/hitTestArea.js.map +1 -1
- package/dist/canvas/deps/insert.js +134 -100
- package/dist/canvas/deps/insert.js.map +1 -1
- package/dist/canvas/deps/layout.js +9 -15
- package/dist/canvas/deps/layout.js.map +1 -1
- package/dist/canvas/derivedPath.js +53 -29
- package/dist/canvas/derivedPath.js.map +1 -1
- package/dist/canvas/insertPreviewExtent.js +33 -31
- package/dist/canvas/insertPreviewExtent.js.map +1 -1
- package/dist/canvas/overChildren.js +29 -0
- package/dist/canvas/overChildren.js.map +1 -0
- package/dist/canvas/paintedCursorLayer.js.map +1 -1
- package/dist/canvas/pickReach.js +23 -0
- package/dist/canvas/pickReach.js.map +1 -0
- package/dist/canvas/pickWalk.js +51 -80
- package/dist/canvas/pickWalk.js.map +1 -1
- package/dist/canvas/sceneAdapter.js +14 -35
- package/dist/canvas/sceneAdapter.js.map +1 -1
- package/dist/canvas/sceneSlotWiring.js +11 -10
- package/dist/canvas/sceneSlotWiring.js.map +1 -1
- package/dist/canvas/sceneViewRender.js +38 -44
- package/dist/canvas/sceneViewRender.js.map +1 -1
- package/dist/canvas/useCanvasView.js +42 -44
- package/dist/canvas/useCanvasView.js.map +1 -1
- package/dist/canvas/useSceneAdapter.js +22 -0
- package/dist/canvas/useSceneAdapter.js.map +1 -0
- package/dist/canvas/useSurfaceInput.js +13 -16
- package/dist/canvas/useSurfaceInput.js.map +1 -1
- package/dist/canvas/viewRegistry.js +31 -23
- package/dist/canvas/viewRegistry.js.map +1 -1
- package/dist/canvas/wrapNodeOutput.js +7 -2
- package/dist/canvas/wrapNodeOutput.js.map +1 -1
- package/dist/clipboard.d.ts +1 -1
- package/dist/{clone-2a5hVbBd.d.ts → clone-C0eADtS0.d.ts} +13 -13
- package/dist/clone.d.ts +2 -2
- package/dist/core/geometry/poseDescriptor.js +49 -23
- package/dist/core/geometry/poseDescriptor.js.map +1 -1
- package/dist/core/geometry/regionHit.js +2 -2
- package/dist/core/geometry/regionHit.js.map +1 -1
- package/dist/core/geometry/targetFrame.js.map +1 -1
- package/dist/core/layers/children.js +1 -3
- package/dist/core/layers/children.js.map +1 -1
- package/dist/core/ops/create.js +2 -2
- package/dist/core/ops/create.js.map +1 -1
- package/dist/core/ops/delete.js +19 -23
- package/dist/core/ops/delete.js.map +1 -1
- package/dist/core/ops/reorder/index.js +3 -7
- package/dist/core/ops/reorder/index.js.map +1 -1
- package/dist/core/ops/reorder/setChildOrder.js +2 -4
- package/dist/core/ops/reorder/setChildOrder.js.map +1 -1
- package/dist/core/ops/reparent.js +0 -1
- package/dist/core/ops/reparent.js.map +1 -1
- package/dist/core/ops/slot.js +3 -6
- package/dist/core/ops/slot.js.map +1 -1
- package/dist/core/pages/fitViewToPage.js +15 -0
- package/dist/core/pages/fitViewToPage.js.map +1 -0
- package/dist/core/pages/pages.js +65 -0
- package/dist/core/pages/pages.js.map +1 -0
- package/dist/core/pages/pagesLayer.js +27 -0
- package/dist/core/pages/pagesLayer.js.map +1 -0
- package/dist/core/paint/meshKindLazy.js +2 -2
- package/dist/core/paint/meshKindLazy.js.map +1 -1
- package/dist/core/scene/NodeProperties.js.map +1 -1
- package/dist/core/scene/composeFrame.js.map +1 -1
- package/dist/core/scene/composePose.js +58 -20
- package/dist/core/scene/composePose.js.map +1 -1
- package/dist/core/scene/effectivePose.js +5 -1
- package/dist/core/scene/effectivePose.js.map +1 -1
- package/dist/core/scene/historyFacade.js +19 -13
- package/dist/core/scene/historyFacade.js.map +1 -1
- package/dist/core/scene/nodeFnFields.js +7 -0
- package/dist/core/scene/nodeFnFields.js.map +1 -1
- package/dist/core/scene/outerOps.js +2 -1
- package/dist/core/scene/outerOps.js.map +1 -1
- package/dist/core/scene/reconcileSpecs.js +1 -1
- package/dist/core/scene/reconcileSpecs.js.map +1 -1
- package/dist/core/scene/sceneRecording.js +2 -1
- package/dist/core/scene/sceneRecording.js.map +1 -1
- package/dist/core/scene/types.js.map +1 -1
- package/dist/core/viewport/screenSlop.js.map +1 -1
- package/dist/core/viewport/useDecayLoop.js +28 -30
- package/dist/core/viewport/useDecayLoop.js.map +1 -1
- package/dist/core/viewport/useNodeOverlayFrame.js.map +1 -1
- package/dist/core/viewport/useViewAnimation.js +70 -69
- package/dist/core/viewport/useViewAnimation.js.map +1 -1
- package/dist/core/viewport/view.js +8 -5
- package/dist/core/viewport/view.js.map +1 -1
- package/dist/core/viewport/zoomAt.js +11 -2
- package/dist/core/viewport/zoomAt.js.map +1 -1
- package/dist/{cornerHandles-BEshc4z3.d.ts → cornerHandles-BSKbyuvQ.d.ts} +1 -1
- package/dist/features/paths/editablePath.js +24 -8
- package/dist/features/paths/editablePath.js.map +1 -1
- package/dist/features/paths/index.js +4 -4
- package/dist/features/paths/shapeGenerator.js +89 -0
- package/dist/features/paths/shapeGenerator.js.map +1 -0
- package/dist/features/paths/usePathEdit.js +13 -13
- package/dist/features/poseRun/usePoseRun.js +25 -25
- package/dist/features/poseRun/usePoseRun.js.map +1 -1
- package/dist/features/text/useSceneTextEdit.js +82 -64
- package/dist/features/text/useSceneTextEdit.js.map +1 -1
- package/dist/features/viewports/viewResolver.js +28 -24
- package/dist/features/viewports/viewResolver.js.map +1 -1
- package/dist/icons/SliceIcon.js +24 -0
- package/dist/icons/SliceIcon.js.map +1 -0
- package/dist/index.d.ts +956 -581
- package/dist/index.js +260 -251
- package/dist/interactions/actions/align/align.js +9 -9
- package/dist/interactions/actions/align/align.js.map +1 -1
- package/dist/interactions/actions/booleans/booleans.js +18 -18
- package/dist/interactions/actions/booleans/booleans.js.map +1 -1
- package/dist/interactions/actions/booleans/operands.js.map +1 -1
- package/dist/interactions/actions/clone/action.js +35 -30
- package/dist/interactions/actions/clone/action.js.map +1 -1
- package/dist/interactions/actions/defaults/anchorEditing.js +56 -59
- package/dist/interactions/actions/defaults/anchorEditing.js.map +1 -1
- package/dist/interactions/actions/defaults/anchorHandles.js +42 -0
- package/dist/interactions/actions/defaults/anchorHandles.js.map +1 -0
- package/dist/interactions/actions/defaults/anchorJoin.js +92 -0
- package/dist/interactions/actions/defaults/anchorJoin.js.map +1 -0
- package/dist/interactions/actions/defaults/bendSegment.js +46 -0
- package/dist/interactions/actions/defaults/bendSegment.js.map +1 -0
- package/dist/interactions/actions/defaults/copySubtree.js +1 -1
- package/dist/interactions/actions/defaults/copySubtree.js.map +1 -1
- package/dist/interactions/actions/defaults/duplicate.js +32 -17
- package/dist/interactions/actions/defaults/duplicate.js.map +1 -1
- package/dist/interactions/actions/defaults/enterPathEdit.js +19 -7
- package/dist/interactions/actions/defaults/enterPathEdit.js.map +1 -1
- package/dist/interactions/actions/defaults/icons/anchorIcons.js +75 -0
- package/dist/interactions/actions/defaults/icons/anchorIcons.js.map +1 -0
- package/dist/interactions/actions/defaults/icons/editIcons.js +35 -8
- package/dist/interactions/actions/defaults/icons/editIcons.js.map +1 -1
- package/dist/interactions/actions/defaults/insertPathAnchor.js +16 -31
- package/dist/interactions/actions/defaults/insertPathAnchor.js.map +1 -1
- package/dist/interactions/actions/defaults/nudge.js +28 -23
- package/dist/interactions/actions/defaults/nudge.js.map +1 -1
- package/dist/interactions/actions/defaults/pinchZoom.js +29 -29
- package/dist/interactions/actions/defaults/pinchZoom.js.map +1 -1
- package/dist/interactions/actions/defaults/segmentUnder.js +22 -0
- package/dist/interactions/actions/defaults/segmentUnder.js.map +1 -0
- package/dist/interactions/actions/defaults/viewportZoom.js +82 -79
- package/dist/interactions/actions/defaults/viewportZoom.js.map +1 -1
- package/dist/interactions/actions/distribute/distribute.js +8 -8
- package/dist/interactions/actions/distribute/distribute.js.map +1 -1
- package/dist/interactions/actions/edit-anchors/action.js +58 -55
- package/dist/interactions/actions/edit-anchors/action.js.map +1 -1
- package/dist/interactions/actions/edit-anchors/preview.js +26 -0
- package/dist/interactions/actions/edit-anchors/preview.js.map +1 -0
- package/dist/interactions/actions/edit-anchors/symmetry.js +11 -0
- package/dist/interactions/actions/edit-anchors/symmetry.js.map +1 -0
- package/dist/interactions/actions/flip/action.js.map +1 -1
- package/dist/interactions/actions/geometryProjection.js.map +1 -1
- package/dist/interactions/actions/insert/action.js +37 -30
- package/dist/interactions/actions/insert/action.js.map +1 -1
- package/dist/interactions/actions/insert/frame.js +9 -2
- package/dist/interactions/actions/insert/frame.js.map +1 -1
- package/dist/interactions/actions/insert/repositionAction.js +31 -0
- package/dist/interactions/actions/insert/repositionAction.js.map +1 -0
- package/dist/interactions/actions/lasso-select/action.js +32 -32
- package/dist/interactions/actions/move/action.js +29 -25
- package/dist/interactions/actions/move/action.js.map +1 -1
- package/dist/interactions/actions/move/behaviors/snapToContainer.js +12 -6
- package/dist/interactions/actions/move/behaviors/snapToContainer.js.map +1 -1
- package/dist/interactions/actions/move/capture.js +32 -23
- package/dist/interactions/actions/move/capture.js.map +1 -1
- package/dist/interactions/actions/move/frame.js +2 -14
- package/dist/interactions/actions/move/frame.js.map +1 -1
- package/dist/interactions/actions/move/session.js +1 -1
- package/dist/interactions/actions/move/session.js.map +1 -1
- package/dist/interactions/actions/move/translate.js.map +1 -1
- package/dist/interactions/actions/outlines/createOutlines.js.map +1 -1
- package/dist/interactions/actions/outlines/replaceWithPaths.js +13 -13
- package/dist/interactions/actions/outlines/replaceWithPaths.js.map +1 -1
- package/dist/interactions/actions/outlines/strokeRegion.js.map +1 -1
- package/dist/interactions/actions/pathCommands/cutJoin.js +102 -0
- package/dist/interactions/actions/pathCommands/cutJoin.js.map +1 -0
- package/dist/interactions/actions/pathCommands/livePathEdit.js +64 -0
- package/dist/interactions/actions/pathCommands/livePathEdit.js.map +1 -0
- package/dist/interactions/actions/pathCommands/pathNodes.js +99 -0
- package/dist/interactions/actions/pathCommands/pathNodes.js.map +1 -0
- package/dist/interactions/actions/pathCommands/simplifyOffset.js +42 -0
- package/dist/interactions/actions/pathCommands/simplifyOffset.js.map +1 -0
- package/dist/interactions/actions/resize/action.js +31 -20
- package/dist/interactions/actions/resize/action.js.map +1 -1
- package/dist/interactions/actions/resize/commit.js.map +1 -1
- package/dist/interactions/actions/resize/frame.js +29 -15
- package/dist/interactions/actions/resize/frame.js.map +1 -1
- package/dist/interactions/actions/resize/replay.js +47 -0
- package/dist/interactions/actions/resize/replay.js.map +1 -0
- package/dist/interactions/actions/resize/session.js +49 -35
- package/dist/interactions/actions/resize/session.js.map +1 -1
- package/dist/interactions/actions/resolveOverlays.js +2 -1
- package/dist/interactions/actions/resolveOverlays.js.map +1 -1
- package/dist/interactions/actions/rotate/action.js +40 -25
- package/dist/interactions/actions/rotate/action.js.map +1 -1
- package/dist/interactions/actions/rotate/frame.js +1 -1
- package/dist/interactions/actions/rotate/frame.js.map +1 -1
- package/dist/interactions/actions/rotate/replay.js +22 -0
- package/dist/interactions/actions/rotate/replay.js.map +1 -0
- package/dist/interactions/actions/rotate/session.js +42 -32
- package/dist/interactions/actions/rotate/session.js.map +1 -1
- package/dist/interactions/actions/transform-again/action.js +63 -0
- package/dist/interactions/actions/transform-again/action.js.map +1 -0
- package/dist/interactions/actions/transform-again/memory.js +35 -0
- package/dist/interactions/actions/transform-again/memory.js.map +1 -0
- package/dist/interactions/actions/useStandardActions.js +101 -83
- package/dist/interactions/actions/useStandardActions.js.map +1 -1
- package/dist/move.d.ts +4 -4
- package/dist/{originProjection-PPT88jZv.d.ts → originProjection-CoNVpITV.d.ts} +1 -1
- package/dist/resize.d.ts +3 -3
- package/dist/style.css +1 -1
- package/dist/tools/builtin/ellipse/useEllipseTool.js +16 -15
- package/dist/tools/builtin/ellipse/useEllipseTool.js.map +1 -1
- package/dist/tools/builtin/line/useLineTool.js +16 -15
- package/dist/tools/builtin/line/useLineTool.js.map +1 -1
- package/dist/tools/builtin/pen/usePenTool.js +111 -111
- package/dist/tools/builtin/pen/usePenTool.js.map +1 -1
- package/dist/tools/builtin/pickTopMostHit.js +11 -14
- package/dist/tools/builtin/pickTopMostHit.js.map +1 -1
- package/dist/tools/builtin/polygon/usePolygonTool.js +17 -15
- package/dist/tools/builtin/polygon/usePolygonTool.js.map +1 -1
- package/dist/tools/builtin/rect/useRectTool.js +15 -14
- package/dist/tools/builtin/rect/useRectTool.js.map +1 -1
- package/dist/tools/builtin/select/adapterPointQuery.js +22 -18
- package/dist/tools/builtin/select/adapterPointQuery.js.map +1 -1
- package/dist/tools/builtin/select/selectionContributions.js +1 -1
- package/dist/tools/builtin/select/selectionContributions.js.map +1 -1
- package/dist/tools/builtin/select/useSelectTool.js +2 -1
- package/dist/tools/builtin/select/useSelectTool.js.map +1 -1
- package/dist/tools/builtin/slice/useSliceTool.js +42 -40
- package/dist/tools/builtin/slice/useSliceTool.js.map +1 -1
- package/dist/tools/builtin/star/useStarTool.js +18 -16
- package/dist/tools/builtin/star/useStarTool.js.map +1 -1
- package/dist/tools/builtin/text/useTextTool.js +2 -2
- package/dist/tools/builtin/text/useTextTool.js.map +1 -1
- package/dist/{types-CIKDwlsP.d.ts → types-DBbbCy0i.d.ts} +22 -15
- package/dist/version.js +1 -1
- package/package.json +22 -22
- package/dist/canvas/surface.module.js +0 -6
- package/dist/canvas/surface.module.js.map +0 -1
- package/dist/canvas/surfaceBox.js +0 -16
- package/dist/canvas/surfaceBox.js.map +0 -1
- package/dist/layout/arrivals.js +0 -33
- package/dist/layout/arrivals.js.map +0 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { View, NodeId, Bounds, ModifierState, PointerSessionCancelReason, DeviceProfile, DebugSink, HitShape, HandleKind, ViewportGestureKind, IngestItem, SelectionMode, SelectionExtendKey, SelectionApi, ActionDeps, DragSample, Point2, LongPressState, Tool as Tool$1, Contribution as Contribution$1, ContributionChrome as ContributionChrome$1, ToolDef as ToolDef$1, DepName, DepSchema, Action,
|
|
2
|
-
export { ALWAYS, Action, ActionDeps, ActionDisabledReason, ActionDispatch, ActionEnabledResult, ActionEntry, ActionItem, ActionPresentation, ActionVariant, ActionsProp, ActionsRegistry, AffordanceHit, AssemblyInputs, BindingOpts, BindingScope, BindingSource, BoundGesture, Bounds, BuildRuleCtxArgs, COARSE_TARGET_SCALE, CONTROL_SELECTOR, ContributionDeps, ContributionRouting, DEFAULT_ALLOWED_CAPABILITIES, DEFAULT_DEVICE_PROFILE, DRAG_THRESHOLD_PX, DebugSink, DepName, DepRegistry, DepSchema, DetectedDeviceFacts, DeviceProfile, DispatchRecord, DispatchRecordInput, Dispatcher, DispatcherContext, DragSample, DroppedCandidate, Eligibility, EligibilityState, GestureBinding, HandleKind, HitShape, HotkeyTrigger, ImmediateInvoker, IngestItem, InputEvent, InvocationCtx, Invoker, KeyBinding, LONG_PRESS_MS, LongPressOptions, LongPressState, LongPressStore, MatchResult, ModeShortcutHandlers, ModifierState, NEVER, NodeId, OngoingHandle, OngoingInvoker, OngoingOverlay, OverlayPosition, OverlayRole, PendingLongPress, PlacedBy, Point2, PointerSession, PointerSessionCallbacks, PointerSessionCancelReason, PointerSessionOptions, RankedCandidate, RecordCandidate, ResizeAnchor, ResolveAllOptions, ResolveOnlyResult, ResolvedCandidate, Rule, RuleCtx, ScopedBinding, ScratchKey, ScratchStore, SelectionApi, SelectionExtendKey, SelectionMode, Selector, SpecificityPart, ToolKeybinding, ToolModifiers, ToolPresentation, ToolSlot, UiOngoingControl, Point2 as Vec2, View, ViewportGestureKind, WalkStep, actionBindings, actionItems, activatesFocusedControl, assembleEntries, buildDepsFromRequires, buildRuleCtx, clientToCanvas, createDepRegistry, createDispatcher, createLongPressStore, defineTool, deleteScratch, describeRule, dlog, dwarn, evaluate, evaluateActive, evaluateEnabled, focusedControlOwnsKey, getScratch, heldKeySpec, historyKey, isDebugEnabled, isEditableTarget, isInControlWithin, liveScope, matchesKeyBinding, modeShortcutSpec, modeShortcuts, openPointerSession, pastDragThreshold, resolveDeviceProfile, resolveParams, scopeBindings, scratchKey, setScratch, specificity } from '@weasel-js/routing';
|
|
1
|
+
import { View, NodeId, Bounds, ModifierState, PointerSessionCancelReason, DeviceProfile, DebugSink, HitShape, HandleKind, ViewportGestureKind, IngestItem, SelectionMode, SelectionExtendKey, SelectionApi, ActionDeps, DragSample, Point2, LongPressState, Tool as Tool$1, Contribution as Contribution$1, ContributionChrome as ContributionChrome$1, ToolDef as ToolDef$1, DepName, DepSchema, Action, GestureBinding, AffordanceHit, ToolKeybinding, HotkeyTrigger, RuleCtx, Rule, OngoingOverlay, ActionTunings, ActionsProp, OverlayRole, ResizeAnchor } from '@weasel-js/routing';
|
|
2
|
+
export { ALWAYS, Action, ActionDeps, ActionDisabledReason, ActionDispatch, ActionEnabledResult, ActionEntry, ActionItem, ActionParamSchema, ActionParams, ActionPresentation, ActionTuning, ActionTunings, ActionVariant, ActionsProp, ActionsRegistry, AffordanceHit, AssemblyInputs, BindingOpts, BindingScope, BindingSource, BoundGesture, Bounds, BuildRuleCtxArgs, COARSE_TARGET_SCALE, CONTROL_SELECTOR, ContributionDeps, ContributionRouting, DEFAULT_ALLOWED_CAPABILITIES, DEFAULT_DEVICE_PROFILE, DRAG_THRESHOLD_PX, DebugSink, DepName, DepRegistry, DepSchema, DetectedDeviceFacts, DeviceProfile, DispatchRecord, DispatchRecordInput, Dispatcher, DispatcherContext, DragSample, DroppedCandidate, Eligibility, EligibilityState, GestureBinding, HandleKind, HitShape, HotkeyTrigger, ImmediateInvoker, IngestItem, InputEvent, InvocationCtx, Invoker, KeyBinding, LONG_PRESS_MS, LongPressOptions, LongPressState, LongPressStore, MatchResult, ModeShortcutHandlers, ModifierState, NEVER, NodeId, OngoingHandle, OngoingInvoker, OngoingOverlay, OverlayPosition, OverlayRole, PendingLongPress, PlacedBy, Point2, PointerSession, PointerSessionCallbacks, PointerSessionCancelReason, PointerSessionOptions, RankedCandidate, RecordCandidate, ResizeAnchor, ResolveAllOptions, ResolveOnlyResult, ResolvedCandidate, Rule, RuleCtx, ScopedBinding, ScratchKey, ScratchStore, SelectionApi, SelectionExtendKey, SelectionMode, Selector, SpecificityPart, ToolKeybinding, ToolModifiers, ToolPresentation, ToolSlot, TunedBinding, UiOngoingControl, Point2 as Vec2, View, ViewportGestureKind, WalkStep, actionBindings, actionItems, activatesFocusedControl, assembleEntries, buildDepsFromRequires, buildRuleCtx, clientToCanvas, createDepRegistry, createDispatcher, createLongPressStore, defineTool, deleteScratch, describeRule, dlog, dwarn, evaluate, evaluateActive, evaluateEnabled, focusedControlOwnsKey, getScratch, heldKeySpec, historyKey, isDebugEnabled, isEditableTarget, isInControlWithin, liveScope, matchesKeyBinding, modeShortcutSpec, modeShortcuts, openPointerSession, pastDragThreshold, resolveDeviceProfile, resolveParams, scopeBindings, scratchKey, setScratch, specificity, tuneAction } from '@weasel-js/routing';
|
|
3
3
|
import { DrawCommand, Effect, CompositeOp, BlendFactors, ShaderProgramHandle } from '@weasel-js/renderer';
|
|
4
4
|
export { BlendFactor, BlendFactors, CompositeOp, CullRect, DrawCommand, Effect, FillPoseBox, GlMat3, GroupDrawCommand, ImageDrawCommand, ImageMinification, ImageNodeData, ImageRasterSize, ImageStatus, PaintBindContext, PaintDrawKind, PaintProgram, PaintResources, PathDrawCommand, ProgramSource, RenderTarget, SPRITE_STRIDE, ShaderDrawCommand, ShaderProgram, ShaderProgramHandle, ShaderUniform, SpriteSheet, SpritesDrawCommand, TextDrawCommand, TilePatternOpts, blur, commandFill, commandPaint, commandStroke, createTilePattern, cullDrawCommands, fillInPoseFrame, fillToBoundsFrame, frameRect, getImageBitmap, imageStatus, isPaintKindKnown, isVectorImageSrc, mat3, registerEffect, releaseImage, resolveFillPattern, resolvePatternSpec, retryImage, setImageCacheBudget, subscribeImageReady, textCommand, textCommandFromPose, textCommandFromRuns, viewToMat3, vignette, warmPaintKinds } from '@weasel-js/renderer';
|
|
5
5
|
import { CommandFill, CommandStroke, Paint, Fill, Stroke, Palette, SolidPaint } from '@weasel-js/paint';
|
|
@@ -9,16 +9,16 @@ export { BakeOptions, CURSOR_ANGLE_STEPS, CURSOR_MAX_CSS_PX, CursorGlyph, Cursor
|
|
|
9
9
|
import * as _weasel_js_gestures from '@weasel-js/gestures';
|
|
10
10
|
import { ClaimableGesture, GestureSpec } from '@weasel-js/gestures';
|
|
11
11
|
export { ClaimableGesture, ClickSpec, DragSpec, DropSpec, GestureSpec, KeyHeldSpec, KeySpec, ModSpec, MultiTouchSpec, PasteSpec, PinchSpec, TargetPredicate, TargetSpec, WheelSpec, bodyPredicate, hitPredicate } from '@weasel-js/gestures';
|
|
12
|
-
import
|
|
13
|
-
|
|
12
|
+
import * as _weasel_js_geom from '@weasel-js/geom';
|
|
13
|
+
import { Path, Affine, PoseLinear, PolygonPath, Scale2, Rect, GlMat3, PathFillRule, PlacementAlign, View as View$1, PathInWorldPose } from '@weasel-js/geom';
|
|
14
|
+
export { AverageAxis, BezierEasing, DEFAULT_FLATTEN_TOLERANCE, EASINGS, EasingFn, EasingName, EasingSpec, PATH_C, PATH_CMD_LENGTHS, PATH_L, PATH_M, PATH_Q, PATH_Z, Path, PathBuilder, PathFillRule, PathInWorldPose, PathStation, PenAnchor, PointAlongPathOptions, PointInPathOptions, PolygonPath, PoseLinear, PoseRotation, Rect, RectPath, SPRING_PRESETS, Scale2, SimplifyPathOptions, SpringPreset, SpringPresetName, ZOOM_FLOOR, averageAnchorsAt, boundsOfPath, circlePath, composePath, countPathAnchors, cubicBezierEasing, decomposePath, easeIn, easeInBack, easeInBounce, easeInCirc, easeInCubic, easeInElastic, easeInExpo, easeInOut, easeInOutBack, easeInOutBounce, easeInOutCirc, easeInOutCubic, easeInOutElastic, easeInOutExpo, easeInOutQuad, easeInOutQuart, easeInOutQuint, easeInOutSine, easeInQuad, easeInQuart, easeInQuint, easeInSine, easeOut, easeOutBack, easeOutBounce, easeOutCirc, easeOutCubic, easeOutElastic, easeOutExpo, easeOutQuad, easeOutQuart, easeOutQuint, easeOutSine, ellipsePath, flattenCubic, flattenCubicWithArcLen, flattenQuadratic, flattenQuadraticWithArcLen, hasOpenSubpath, joinAnchorsAt, linePath, linear, meanScale, pathCommandCoordCount, pathContainsPoint, pathContainsPolygon, pathContainsRect, pathDistanceToPoint, pathFromD, pathInPoseFrame, pathInWorld, pathIntersectsPolygon, pathIntersectsRect, pathSignedArea, pathThroughPoseFrame, pathToAnchors, pointAlongPath, pointInPath, polygonFromPoints, polylineFromPoints, poseFrameInverseOf, poseFrameOf, poseLinearOf, poseRotationOf, pxExtent, rectMarkerPath, rectPath, regularPolygonPath, resolveEasing, reversePath, rotatePathAround, roundRectPath, scaleDelta, scalePathToBounds, screenAngleOf, simplifyPath, splitByClosure, splitSubpaths, squarePath, standoff, starPath, transformPath, translatePath, unionBoundsPath, withinPxBox, withinPxRadius, worldEditToStorage } from '@weasel-js/geom';
|
|
15
|
+
import { P as ParallaxOpts, C as ContainerBounds, L as LayoutStrategy, a as PlaneMap, R as RegionPickView, b as LayoutDropTargetMode, c as ReflowTransition, I as InsertAdapter, d as PasteOmission, M as MoveAdapter, A as AreaSelectAdapter, e as LayerEnumerableAdapter, f as LassoHitMode, g as ResizeAdapter, h as RotateAdapter, i as LassoSelectAdapter, j as ClipboardSnapshot, k as PasteCtx, O as OrderedAdapter } from './types-DBbbCy0i.js';
|
|
16
|
+
export { D as DropRegion, l as DropTarget, m as LayoutArrival, n as LayoutChild, o as LayoutContainer, p as LayoutDragged, q as LayoutSnap, r as ReflowGlideOptions, s as ScalarOrXY, S as SnapTarget, t as deriveParallaxView, u as fromPlane, v as planeMap, w as planeMatrix, x as planeToPlane, y as rectFromPlane, z as rectToPlane, B as toPlane } from './types-DBbbCy0i.js';
|
|
14
17
|
export { DEFAULT_ALPHA_DECAY, DEFAULT_ALPHA_MIN, DEFAULT_VELOCITY_DECAY, Simulation, SimulationCore, SimulationForce, SimulationNode, SimulationOptions, UseSimulationOptions, createSimulation } from '@weasel-js/simulation';
|
|
15
18
|
export { useSimulation } from '@weasel-js/simulation/react';
|
|
16
19
|
import * as _weasel_js_history from '@weasel-js/history';
|
|
17
20
|
import { SerializedHistory, Op, History, CreateHistoryOptions, HistorySelection } from '@weasel-js/history';
|
|
18
21
|
export { BeginJournalOptions, CreateHistoryOptions, EvictedEntry, History, HistoryBranch, HistoryEntry, HistoryLogger, HistorySelection, Journal, Op, RecordEntryOptions, SerializedHistory, SerializedHistoryEntry, SerializedOp, SwapArgs, SwapOpOptions, swapOp } from '@weasel-js/history';
|
|
19
|
-
import * as _weasel_js_geom from '@weasel-js/geom';
|
|
20
|
-
import { Path, PoseLinear, Scale2, Mat3, Rect, GlMat3, PolygonPath, PathFillRule, PlacementAlign, View as View$1 } from '@weasel-js/geom';
|
|
21
|
-
export { BezierEasing, DEFAULT_FLATTEN_TOLERANCE, EASINGS, EasingFn, EasingName, EasingSpec, PATH_C, PATH_CMD_LENGTHS, PATH_L, PATH_M, PATH_Q, PATH_Z, Path, PathBuilder, PathFillRule, PathInWorldPose, PathStation, PenAnchor, PointAlongPathOptions, PointInPathOptions, PolygonPath, PoseLinear, PoseRotation, Rect, RectPath, SPRING_PRESETS, Scale2, SpringPreset, SpringPresetName, ZOOM_FLOOR, boundsOfPath, circlePath, composePath, countPathAnchors, cubicBezierEasing, decomposePath, easeIn, easeInBack, easeInBounce, easeInCirc, easeInCubic, easeInElastic, easeInExpo, easeInOut, easeInOutBack, easeInOutBounce, easeInOutCirc, easeInOutCubic, easeInOutElastic, easeInOutExpo, easeInOutQuad, easeInOutQuart, easeInOutQuint, easeInOutSine, easeInQuad, easeInQuart, easeInQuint, easeInSine, easeOut, easeOutBack, easeOutBounce, easeOutCirc, easeOutCubic, easeOutElastic, easeOutExpo, easeOutQuad, easeOutQuart, easeOutQuint, easeOutSine, ellipsePath, flattenCubic, flattenCubicWithArcLen, flattenQuadratic, flattenQuadraticWithArcLen, hasOpenSubpath, linePath, linear, meanScale, pathCommandCoordCount, pathContainsPoint, pathContainsPolygon, pathContainsRect, pathDistanceToPoint, pathFromD, pathInPoseFrame, pathInWorld, pathIntersectsPolygon, pathIntersectsRect, pathSignedArea, pathThroughPoseFrame, pathToAnchors, pointAlongPath, pointInPath, polygonFromPoints, polylineFromPoints, poseFrameInverseOf, poseFrameOf, poseLinearOf, poseRotationOf, pxExtent, rectMarkerPath, rectPath, regularPolygonPath, resolveEasing, reversePath, rotatePathAround, roundRectPath, scaleDelta, scalePathToBounds, screenAngleOf, splitByClosure, splitSubpaths, squarePath, standoff, starPath, transformPath, translatePath, unionBoundsPath, withinPxBox, withinPxRadius, worldEditToStorage } from '@weasel-js/geom';
|
|
22
22
|
import { UnitScope } from '@weasel-js/quantity';
|
|
23
23
|
export { ANGLE_RADIANS, IMPERIAL_INCHES, METRIC_MM, PIXELS, PerAxis, PlaneUnits, PlaneValue, ScopeTree, Unit, UnitEntry, UnitExpr, UnitExprContext, UnitScale, UnitScope, UnitSystem, UnitValue, axisUnits, formatAxes, formatScoped, formatUnit, fromRoot, parseUnitExpr, resolveAxes, resolveScoped, resolveUnit, resolveUnitExpr, scopesOf, toRoot, unitScale } from '@weasel-js/quantity';
|
|
24
24
|
import * as react from 'react';
|
|
@@ -33,25 +33,25 @@ import { ToolsApi as ToolsApi$1, UseToolsOptions as UseToolsOptions$1, Yoke } fr
|
|
|
33
33
|
export { ActionsProvider, ActiveToolContextProvider, ActiveToolContextProviderIfRoot, ActiveToolContextProviderProps, ActiveToolContextValue, DepRegistryProvider, DispatcherChannels, InputScope, OngoingAction, PointerContextProvider, PointerContextValue, PointerWorldPos, SelectionContextProvider, SelectionContextProviderIfRoot, SelectionContextValue, UseGestureDispatcherOptions, Yoke, createPointerStore, useAction, useActionsRegistry, useActiveToolContext, useDepRegistry, useDepSource, useGestureDispatcher, useOngoingAction, useOptionalActiveToolContext, useOptionalDepRegistry, usePointerContext, usePointerPosition, usePublishSelection, useSelectionContext, useYoke } from '@weasel-js/routing/react';
|
|
34
34
|
import { TextNodeSource, TextOutlinesError, TextPose, TextStyle, StyledRun, TextVerticalAlign, TextPaint } from '@weasel-js/text';
|
|
35
35
|
export { DEFAULT_DECORATION_METRICS, DEFAULT_TEXT_STYLE, DecorationKind, FaceMetricsFn, FitTextPoseOptions, FlagKey, FontVariantCaps, LabelOptions, LaidOutCell, LaidOutDecoration, LaidOutGroup, LaidOutLineBox, LaidOutOutlineGlyph, LaidOutQuad, LaidOutRuns, LayoutLine, LayoutResult, LayoutRunsOpts, MARKDOWN_RUN_GRAMMAR, MarkdownFontOptions, MeasureFn, MeasureTextBoundsOpts, MeasuredSpan, MeasuredText, PaintRunsOpts, PaintedRuns, PlacedGlyph, PointInTextPoseOpts, PositionedRun, RangeStyle, ResolvedRun, ResolvedTextStyle, RunFlag, RunGrammar, RunMarker, RunSourceMap, RunStylePatch, SCRIPT_METRICS, SMALL_CAPS_SCALE, ScriptPreset, SetFlagResult, SmallCapsText, StyleKey, StyledRun, TextAlign, TextDirection, TextLineBoxesOpts, TextNodeSource, TextOutlineSource, TextOutlinesError, TextOutlinesFailure, TextPaint, TextPaintPath, TextPose, TextPoseLayout, TextPoseLayoutInput, TextRenderer, TextStyle, TextToPathOptions, TextTransform, TextVerticalAlign, TransformedRunText, applyStyleToRange, cachedLayoutRuns, cachedPaintRuns, caretIndexAt, createMarkdownRenderer, decorationMetrics, defaultLabelTextRenderer, effectiveRangeStyle, fitTextPose, fontString, isBoldWeight, isSmallCapsLetter, isTextData, layoutMarkdown, layoutRuns, layoutTextPose, loadTextOutlines, markdownToRuns, measureText, measureTextBounds, measuredWidth, nodeHasFlag, numericWeight, paintRuns, paragraphDirection, patchRangeStyle, pointInTextPose, rangeWeight, registerBidi, renderLabel, resolveAlign, resolveRunFace, resolveRuns, resolveTextStyle, runsToMarkdown, runsToPlainText, scriptMetrics, scriptMetricsFor, setFlagOverRange, smallCapsScale, smallCapsScaleFor, smallCapsText, styleAtRange, textLineBoxes, textPoseLayoutInput, textToPath, textToPathsByPaint, toRuns, transformRunTexts, unboldPatch, verticalAlignOffset } from '@weasel-js/text';
|
|
36
|
-
import { B as BoundsConstraint, P as PointSnapBehavior, G as GestureContext, R as RotateBehavior, I as InsertBehavior, L as LassoSelectBehavior, S as SnapStrategy, M as MoveBehavior } from './clone-
|
|
37
|
-
export { A as ActionBehavior, a as AreaSelectOverlay, b as BehaviorEnd, c as
|
|
36
|
+
import { B as BoundsConstraint, P as PointSnapBehavior, G as GestureContext, R as RotateBehavior, I as InsertBehavior, L as LassoSelectBehavior, S as SnapStrategy, M as MoveBehavior } from './clone-C0eADtS0.js';
|
|
37
|
+
export { A as ActionBehavior, a as AreaSelectOverlay, b as BehaviorEnd, c as BehaviorResult, C as CloneBehavior, d as CloneBehaviorResult, e as GestureFrames, f as GroupTransform, g as InsertMoveResult, h as InsertOverlay, i as InsertPoint, j as InsertProposed, k as LassoSelectMoveResult, l as LassoSelectOverlay, m as LassoSelectPose, n as LassoSelectProposed, o as MoveEnd, p as PointSnapContext, q as PointSnapFrame, r as PointSnapResult, s as PointerState, t as ResizeMoveResult, u as ResizeOverlay, v as ResizeProposed, w as RotateMoveResult, x as RotateOverlay, y as RotateProposed } from './clone-C0eADtS0.js';
|
|
38
38
|
import { P as PoseDescriptor, b as RotatedPose } from './poseDescriptor-Bqk-11Rl.js';
|
|
39
39
|
export { R as RECT_POSE_DESCRIPTOR, a as ROTATED_POSE_DESCRIPTOR, p as poseDescriptorForNode, t as translatePoseViaDescriptor, v as visualBoundsViaDescriptor } from './poseDescriptor-Bqk-11Rl.js';
|
|
40
40
|
import { FontRequest } from '@weasel-js/font';
|
|
41
41
|
export { FaceMetrics, FaceRuleMetrics, FaceScriptMetrics, FontFamilyFaces, FontRequest, FontStyle, FontVariant, LocalFontOutlinesResult, OutlineFaceInfo, OutlineSource, OutlineStatus, OutlineVariant, RegisterFontOptions, canQueryLocalFonts, cssFamilyName, cssFontFamily, cssFontFamilyLoading, enableLocalFontOutlines, fontOutlineRegistry, fontRegistry, hasFontOutlines, isCanvasFont, listFontOutlines, loadFontOutlines, outlineStatus, refreshCanvasFont, registerCanvasFont, registerFont, registerFontOutlines, subscribeGlyphReady, unregisterCanvasFont, unregisterFontOutlines, warmFonts } from '@weasel-js/font';
|
|
42
|
-
import { U as UseResizeOptions } from './cornerHandles-
|
|
43
|
-
export { C as CORNER_ANCHORS, a as CornerAnchor, e as CornerEdge, b as CornerHandle, c as cornerPoint, d as cornerResizeHandles, f as fixedCornerOf, h as hitCornerHandle } from './cornerHandles-
|
|
42
|
+
import { U as UseResizeOptions } from './cornerHandles-BSKbyuvQ.js';
|
|
43
|
+
export { C as CORNER_ANCHORS, a as CornerAnchor, e as CornerEdge, b as CornerHandle, c as cornerPoint, d as cornerResizeHandles, f as fixedCornerOf, h as hitCornerHandle } from './cornerHandles-BSKbyuvQ.js';
|
|
44
44
|
import { ModeRegistry, ModeDecorations } from '@weasel-js/modes';
|
|
45
|
-
import { U as UseMoveOptions, O as OriginProjection } from './originProjection-
|
|
46
|
-
export { A as AUTO_ORIGIN_PROJECTION, R as RECT_ORIGIN_PROJECTION } from './originProjection-
|
|
45
|
+
import { U as UseMoveOptions, O as OriginProjection } from './originProjection-CoNVpITV.js';
|
|
46
|
+
export { A as AUTO_ORIGIN_PROJECTION, R as RECT_ORIGIN_PROJECTION } from './originProjection-CoNVpITV.js';
|
|
47
47
|
import { PrefSection, PrefNumberUnit } from '@weasel-js/prefs';
|
|
48
48
|
import { UseTextEditReturn } from '@weasel-js/text-dom';
|
|
49
49
|
export { StartEditOptions, StyleToggle, TEXT_EDIT_FONT_HOLD, TextEditClipRect, TextEditCommit, TextEditScreenPose, TextEditSelection, UseTextEditOptions, UseTextEditReturn, charOffsetToDomPosition, domPositionToCharOffset, domToRuns, runsToDom, useTextEdit } from '@weasel-js/text-dom';
|
|
50
|
-
export { BUILTIN_MARKERS, MarkerCtx, MarkerEntry, MarkerPaint, MarkerSite, MarkerSiteRequest, StrokeToPathOptions, getMarker, listMarkers, markerInset, markerKeyOf, markerRegistry, markerSites, registerMarker, resolveMarkerSize, resolveStrokeWidth, strokeInsets, strokeToPath } from '@weasel-js/stroke';
|
|
50
|
+
export { BUILTIN_MARKERS, MarkerCtx, MarkerEntry, MarkerPaint, MarkerSite, MarkerSiteRequest, OffsetPathOptions, StrokeToPathOptions, getMarker, listMarkers, markerInset, markerKeyOf, markerRegistry, markerSites, offsetPath, registerMarker, resolveMarkerSize, resolveStrokeWidth, strokeInsets, strokeToPath } from '@weasel-js/stroke';
|
|
51
51
|
import { P as PaintKindEntry } from './test-seams-D0pyV3pR.js';
|
|
52
52
|
export { a as PaintKind, b as PaintKindEditorProps, c as PaintKindFamily, d as PaintKindLoader, e as asPaint, g as getPaintKind, l as listGradientKinds, f as listPaintKinds, p as paintKindOf, h as paintKindRegistry, i as patternFamily, r as registerPaintKind, j as registerPaintKindLoader, s as seedTile, k as switchGradientKind } from './test-seams-D0pyV3pR.js';
|
|
53
53
|
export { Polyline, trimPolyline } from '@weasel-js/geom/tessellate';
|
|
54
|
-
export { SplitBySegmentOptions, pathDivide, pathExclude, pathIntersect, pathSubtract, pathUnion, snipPathByPolyline, splitPathByPolyline, splitPathBySegment, trianglesToPath } from '@weasel-js/geom/booleans';
|
|
54
|
+
export { SnipAtCrossingsOptions, SplitBySegmentOptions, pathDivide, pathExclude, pathIntersect, pathSubtract, pathUnion, snipPathByPolyline, snipPathsAtCrossings, splitPathByPolyline, splitPathBySegment, trianglesToPath } from '@weasel-js/geom/booleans';
|
|
55
55
|
export { CURVE_REPS, CurveRepKind, CurveRepresentation, Discriminator, SharedAnchor, bezierCubic, bezierQuadratic, nurbs, spiro } from '@weasel-js/geom/curves';
|
|
56
56
|
export { A as AUTO_POSE_DESCRIPTOR, i as isPathLike, a as isRectPose } from './autoPoseDescriptor-DHg5KqaJ.js';
|
|
57
57
|
export { a as aabbCenter, p as pointInRotatedRect, r as rectCorners, b as rotatePoint, c as rotatedRectCorners } from './math-CYUjoyyU.js';
|
|
@@ -112,6 +112,52 @@ declare function viewZoom(view: View): number;
|
|
|
112
112
|
*/
|
|
113
113
|
declare function normalizeView(view: View): View;
|
|
114
114
|
|
|
115
|
+
interface LayerRecordBase<TLayer extends string> {
|
|
116
|
+
id: TLayer;
|
|
117
|
+
visible: boolean;
|
|
118
|
+
locked: boolean;
|
|
119
|
+
/** Draw this layer as a parallax plane: through a view derived from the
|
|
120
|
+
* camera's (see `deriveParallaxView`), and picked through the same one.
|
|
121
|
+
* Absent means the layer moves with the camera. */
|
|
122
|
+
parallax?: ParallaxOpts;
|
|
123
|
+
}
|
|
124
|
+
/** A layer declared when the scene was created. Fixed set, no display name —
|
|
125
|
+
* these are the kit's own render bands, not something a user manages. */
|
|
126
|
+
interface SystemLayerRecord<TLayer extends string> extends LayerRecordBase<TLayer> {
|
|
127
|
+
kind: 'system';
|
|
128
|
+
}
|
|
129
|
+
/** A layer the user created and can rename, reorder or delete. */
|
|
130
|
+
interface UserLayerRecord<TLayer extends string> extends LayerRecordBase<TLayer> {
|
|
131
|
+
kind: 'user';
|
|
132
|
+
name: string;
|
|
133
|
+
}
|
|
134
|
+
/** Per-layer metadata held by the scene: whether it is visible and locked,
|
|
135
|
+
* and where it sits in the render stack. Distinct from a node's `layer` tag,
|
|
136
|
+
* which merely names one of these. */
|
|
137
|
+
type LayerRecord<TLayer extends string> = SystemLayerRecord<TLayer> | UserLayerRecord<TLayer>;
|
|
138
|
+
/** One of the layers a scene is created with. */
|
|
139
|
+
interface SystemLayerSpec<TLayer extends string> {
|
|
140
|
+
id: TLayer;
|
|
141
|
+
visible?: boolean;
|
|
142
|
+
locked?: boolean;
|
|
143
|
+
/** See `LayerRecord.parallax`. */
|
|
144
|
+
parallax?: ParallaxOpts;
|
|
145
|
+
}
|
|
146
|
+
/** Argument to `Scene.addLayer`. Always produces a `UserLayerRecord`
|
|
147
|
+
* (`kind: 'user'`). */
|
|
148
|
+
interface AddLayerSpec<TLayer extends string> {
|
|
149
|
+
id: TLayer;
|
|
150
|
+
name: string;
|
|
151
|
+
/** Default `true`. */
|
|
152
|
+
visible?: boolean;
|
|
153
|
+
/** Default `false`. */
|
|
154
|
+
locked?: boolean;
|
|
155
|
+
/** See `LayerRecord.parallax`. */
|
|
156
|
+
parallax?: ParallaxOpts;
|
|
157
|
+
/** Render-stack position. Default: top of stack (highest render index). */
|
|
158
|
+
index?: number;
|
|
159
|
+
}
|
|
160
|
+
|
|
115
161
|
/** A pose a container's layout wrote — reported by `Scene.onReflow` — in the
|
|
116
162
|
* node's stored frame. */
|
|
117
163
|
interface LayoutMove<TPose> {
|
|
@@ -140,11 +186,10 @@ interface PoseAdapter<TPose> {
|
|
|
140
186
|
definesFrame?(id: string): boolean;
|
|
141
187
|
}
|
|
142
188
|
/**
|
|
143
|
-
*
|
|
144
|
-
*
|
|
145
|
-
*
|
|
146
|
-
*
|
|
147
|
-
* shear is dropped.
|
|
189
|
+
* What a container's pose does to its children under a `compose`: nothing,
|
|
190
|
+
* an offset, or a whole frame. `'rigid'` is the frame: a container's rotation
|
|
191
|
+
* and its `transform` both reach its children, and a child's `transform`
|
|
192
|
+
* holds the skew or stretch its box and rotation cannot.
|
|
148
193
|
*/
|
|
149
194
|
type PoseClosure = 'identity' | 'translation' | 'rigid';
|
|
150
195
|
/** Consumer's pose-composition strategy for hierarchical scenes. `compose`
|
|
@@ -296,6 +341,9 @@ interface SerializedNode<TData, TLayer extends string, TPose> {
|
|
|
296
341
|
/** Registry key for the container's clip-path factory.
|
|
297
342
|
* Containers only; omitted when the container has no clip. */
|
|
298
343
|
clipFromPoseKey?: string;
|
|
344
|
+
/** Registry key for the container's `copiesFromPose`. Containers only;
|
|
345
|
+
* omitted when it draws no copies. */
|
|
346
|
+
copiesFromPoseKey?: string;
|
|
299
347
|
/** Ids this node's geometry derives from, or `'children'`. Omitted when it
|
|
300
348
|
* derives from nothing. */
|
|
301
349
|
dependsOn?: readonly string[] | 'children';
|
|
@@ -311,24 +359,6 @@ interface SerializedNode<TData, TLayer extends string, TPose> {
|
|
|
311
359
|
units?: UnitScope;
|
|
312
360
|
}
|
|
313
361
|
|
|
314
|
-
/**
|
|
315
|
-
* Axis-aligned rectangle pose with optional rotation. Rotation is in
|
|
316
|
-
* radians, pivoted on the unrotated AABB center; absent === 0.
|
|
317
|
-
*/
|
|
318
|
-
interface RectPose {
|
|
319
|
-
x: number;
|
|
320
|
-
y: number;
|
|
321
|
-
width: number;
|
|
322
|
-
height: number;
|
|
323
|
-
/** Rotation in radians around the unrotated AABB center. Absent === 0. */
|
|
324
|
-
rotation?: number;
|
|
325
|
-
/** A skew or per-axis scale the box and rotation cannot hold; see
|
|
326
|
-
* {@link PoseLinear}. Absent is the identity. */
|
|
327
|
-
transform?: PoseLinear;
|
|
328
|
-
}
|
|
329
|
-
|
|
330
|
-
/** Brand a string as a NodeId. */
|
|
331
|
-
declare const asNodeId: (s: string) => NodeId;
|
|
332
362
|
/**
|
|
333
363
|
* One dependency, as a derivation reads it: the node itself and the pose it is
|
|
334
364
|
* painted at.
|
|
@@ -342,10 +372,11 @@ interface DerivedDep<TPose, TData = unknown, TLayer extends string = string> {
|
|
|
342
372
|
/** Its override when it has one, else its own derived pose, else the pose
|
|
343
373
|
* the document stores — `effectivePose`, the same answer the renderer uses. */
|
|
344
374
|
pose: TPose;
|
|
345
|
-
/** The path
|
|
346
|
-
*
|
|
347
|
-
*
|
|
348
|
-
*
|
|
375
|
+
/** The path a pose override shows it by, else the one it derives, else
|
|
376
|
+
* `null`; the document reading skips the override, and a `toPose` lookup
|
|
377
|
+
* carries it into the box its `toPose` answers. Read
|
|
378
|
+
* it to place something *along* a dependency: a label on a routed edge.
|
|
379
|
+
* Resolved on first read and memoized on the dependency. */
|
|
349
380
|
readonly path: Path | null;
|
|
350
381
|
}
|
|
351
382
|
/** `F` with its parameters checked bivariantly, as a method's are, so that a
|
|
@@ -363,6 +394,31 @@ type DerivePoseFn<TPose, TData = unknown, TLayer extends string = string> = Biva
|
|
|
363
394
|
/** A container's clip, from its pose: the type of `ContainerNode.clipFromPose`
|
|
364
395
|
* and of each entry in `SceneRegistry.clipFromPose`. */
|
|
365
396
|
type ClipFromPoseFn<TPose> = Bivariant<(pose: TPose) => Path | null>;
|
|
397
|
+
/** The extra times a container draws its children: the type of
|
|
398
|
+
* `ContainerNode.copiesFromPose` and of each entry in
|
|
399
|
+
* `SceneRegistry.copiesFromPose`. Each affine is in world coordinates and
|
|
400
|
+
* carries the children, as drawn, to one copy. */
|
|
401
|
+
type CopiesFromPoseFn<TPose, TData = unknown, TLayer extends string = string> = Bivariant<(pose: TPose, node: ContainerNode<TData, TLayer, TPose>) => readonly Affine[] | null>;
|
|
402
|
+
|
|
403
|
+
/**
|
|
404
|
+
* Axis-aligned rectangle pose with optional rotation. Rotation is in
|
|
405
|
+
* radians, pivoted on the unrotated AABB center; absent === 0.
|
|
406
|
+
*/
|
|
407
|
+
interface RectPose {
|
|
408
|
+
x: number;
|
|
409
|
+
y: number;
|
|
410
|
+
width: number;
|
|
411
|
+
height: number;
|
|
412
|
+
/** Rotation in radians around the unrotated AABB center. Absent === 0. */
|
|
413
|
+
rotation?: number;
|
|
414
|
+
/** A skew or per-axis scale the box and rotation cannot hold; see
|
|
415
|
+
* {@link PoseLinear}. Absent is the identity. */
|
|
416
|
+
transform?: PoseLinear;
|
|
417
|
+
}
|
|
418
|
+
|
|
419
|
+
/** Brand a string as a NodeId. */
|
|
420
|
+
declare const asNodeId: (s: string) => NodeId;
|
|
421
|
+
|
|
366
422
|
interface NodeBase<TData, TLayer extends string, TPose> {
|
|
367
423
|
id: NodeId;
|
|
368
424
|
layer: TLayer;
|
|
@@ -423,6 +479,13 @@ interface ContainerNode<TData, TLayer extends string, TPose = RectPose> extends
|
|
|
423
479
|
* means "no clip for this container right now"; an empty / zero-area path
|
|
424
480
|
* means "clip everything out" (children render nowhere). */
|
|
425
481
|
clipFromPose?: ClipFromPoseFn<TPose>;
|
|
482
|
+
/** Draws the whole subtree again under each affine it returns, on top of
|
|
483
|
+
* the original, which still draws once as authored. The copies are paint,
|
|
484
|
+
* not nodes: nothing stores them, so they follow every edit to the
|
|
485
|
+
* children, and a pick that lands on one answers with the child it copies.
|
|
486
|
+
* A copy is a copy of the clipped content — the clip travels with it.
|
|
487
|
+
* Re-evaluated each render; `null` or `[]` draws no copies. */
|
|
488
|
+
copiesFromPose?: CopiesFromPoseFn<TPose, TData, TLayer>;
|
|
426
489
|
/** How this container arranges its children. Whenever the container's
|
|
427
490
|
* child set or order changes, or its bounds change size, the scene hands
|
|
428
491
|
* the change to the strategy — `depart` for children that left it,
|
|
@@ -438,29 +501,6 @@ interface ContainerNode<TData, TLayer extends string, TPose = RectPose> extends
|
|
|
438
501
|
/** A node in the scene tree: either a leaf or a container. Re-exported
|
|
439
502
|
* publicly as `SceneNode`, to avoid colliding with the DOM's `Node`. */
|
|
440
503
|
type Node<TData, TLayer extends string, TPose = RectPose> = LeafNode<TData, TLayer, TPose> | ContainerNode<TData, TLayer, TPose>;
|
|
441
|
-
interface LayerRecordBase<TLayer extends string> {
|
|
442
|
-
id: TLayer;
|
|
443
|
-
visible: boolean;
|
|
444
|
-
locked: boolean;
|
|
445
|
-
/** Draw this layer as a parallax plane: through a view derived from the
|
|
446
|
-
* camera's (see `deriveParallaxView`), and picked through the same one.
|
|
447
|
-
* Absent means the layer moves with the camera. */
|
|
448
|
-
parallax?: ParallaxOpts;
|
|
449
|
-
}
|
|
450
|
-
/** A layer declared when the scene was created. Fixed set, no display name —
|
|
451
|
-
* these are the kit's own render bands, not something a user manages. */
|
|
452
|
-
interface SystemLayerRecord<TLayer extends string> extends LayerRecordBase<TLayer> {
|
|
453
|
-
kind: 'system';
|
|
454
|
-
}
|
|
455
|
-
/** A layer the user created and can rename, reorder or delete. */
|
|
456
|
-
interface UserLayerRecord<TLayer extends string> extends LayerRecordBase<TLayer> {
|
|
457
|
-
kind: 'user';
|
|
458
|
-
name: string;
|
|
459
|
-
}
|
|
460
|
-
/** Per-layer metadata held by the scene: whether it is visible and locked,
|
|
461
|
-
* and where it sits in the render stack. Distinct from a node's `layer` tag,
|
|
462
|
-
* which merely names one of these. */
|
|
463
|
-
type LayerRecord<TLayer extends string> = SystemLayerRecord<TLayer> | UserLayerRecord<TLayer>;
|
|
464
504
|
/** What `Scene.add` needs to mint a node. Everything except the id is
|
|
465
505
|
* required; the id is generated unless one is supplied. */
|
|
466
506
|
interface AddNodeSpec<TData, TLayer extends string, TPose = RectPose> {
|
|
@@ -477,6 +517,8 @@ interface AddNodeSpec<TData, TLayer extends string, TPose = RectPose> {
|
|
|
477
517
|
/** Only meaningful when `kind === 'container'`. Attach a clip-path function
|
|
478
518
|
* to the node; ignored for leaves. Mirrors `ContainerNode.clipFromPose`. */
|
|
479
519
|
clipFromPose?: ClipFromPoseFn<TPose>;
|
|
520
|
+
/** Mirrors `ContainerNode.copiesFromPose`; ignored for leaves. */
|
|
521
|
+
copiesFromPose?: CopiesFromPoseFn<TPose, TData, TLayer>;
|
|
480
522
|
/** Mirrors `SceneNode.dependsOn`. */
|
|
481
523
|
dependsOn?: readonly NodeId[] | 'children';
|
|
482
524
|
/** Mirrors `SceneNode.derivePath`. Taken as a live function; its registry key is
|
|
@@ -502,34 +544,14 @@ interface RegisteredOp<P> {
|
|
|
502
544
|
* Omitted, or returning `undefined`, the op is always its own entry. */
|
|
503
545
|
coalesceKey?: (payload: P) => string | undefined;
|
|
504
546
|
}
|
|
505
|
-
/** One of the layers a scene is created with. */
|
|
506
|
-
interface SystemLayerSpec<TLayer extends string> {
|
|
507
|
-
id: TLayer;
|
|
508
|
-
visible?: boolean;
|
|
509
|
-
locked?: boolean;
|
|
510
|
-
/** See `LayerRecord.parallax`. */
|
|
511
|
-
parallax?: ParallaxOpts;
|
|
512
|
-
}
|
|
513
|
-
/** Argument to `Scene.addLayer`. Always produces a `UserLayerRecord`
|
|
514
|
-
* (`kind: 'user'`). */
|
|
515
|
-
interface AddLayerSpec<TLayer extends string> {
|
|
516
|
-
id: TLayer;
|
|
517
|
-
name: string;
|
|
518
|
-
/** Default `true`. */
|
|
519
|
-
visible?: boolean;
|
|
520
|
-
/** Default `false`. */
|
|
521
|
-
locked?: boolean;
|
|
522
|
-
/** See `LayerRecord.parallax`. */
|
|
523
|
-
parallax?: ParallaxOpts;
|
|
524
|
-
/** Render-stack position. Default: top of stack (highest render index). */
|
|
525
|
-
index?: number;
|
|
526
|
-
}
|
|
527
547
|
/** Per-scene registry mapping string keys to live function references.
|
|
528
548
|
* Passed to `createScene({ ..., registry })` and `sceneFromJSON(json, { registry })`.
|
|
529
549
|
* Each function-field type has its own keyed map. */
|
|
530
550
|
interface SceneRegistry<TPose, TData = unknown, TLayer extends string = string> {
|
|
531
551
|
/** Maps registry keys to `clipFromPose` factory functions for container nodes. */
|
|
532
552
|
clipFromPose?: Readonly<Record<string, ClipFromPoseFn<TPose>>>;
|
|
553
|
+
/** Maps registry keys to `copiesFromPose` functions for container nodes. */
|
|
554
|
+
copiesFromPose?: Readonly<Record<string, CopiesFromPoseFn<TPose, TData, TLayer>>>;
|
|
533
555
|
/** Maps registry keys to `derivePath` functions for nodes with `dependsOn`. */
|
|
534
556
|
derivePath?: Readonly<Record<string, DerivePathFn<TPose, TData, TLayer>>>;
|
|
535
557
|
/** Maps registry keys to `derivePose` functions for nodes with `dependsOn`. */
|
|
@@ -581,10 +603,10 @@ interface UseSceneOptions<TData, TLayer extends string, TPose = RectPose> {
|
|
|
581
603
|
composition?: PoseComposition<TPose>;
|
|
582
604
|
/** How laid-out containers are measured. See {@link LayoutFrame}. */
|
|
583
605
|
layoutFrame?: LayoutFrame<TPose>;
|
|
584
|
-
/** When supplied, `scene.applyBatch` consults this on every call. If it
|
|
585
|
-
*
|
|
586
|
-
*
|
|
587
|
-
*
|
|
606
|
+
/** When supplied, `scene.applyBatch` consults this on every call. If it returns a non-null
|
|
607
|
+
* `Journal`, ops are routed to the journal's `applyBatch` instead of recording a new
|
|
608
|
+
* parent-history entry, and undo and redo step that journal. The scene state changes as
|
|
609
|
+
* normal; only the history tracking differs.
|
|
588
610
|
*
|
|
589
611
|
* When the accessor isn't known at scene-construction time, wire it after
|
|
590
612
|
* construction via `scene.setActiveJournalAccessor(fn)`. */
|
|
@@ -1016,7 +1038,9 @@ interface AffordanceRegion<TScratch = unknown> {
|
|
|
1016
1038
|
* chrome that floats a fixed distance off an edge at any zoom.
|
|
1017
1039
|
* - `rect` — axis-aligned rect (target rotation applies).
|
|
1018
1040
|
* - `annulus` — outer ellipse minus inner rect cutout, for zones that sit *around* the
|
|
1019
|
-
* AABB (e.g. a rotate-on-hover band).
|
|
1041
|
+
* AABB (e.g. a rotate-on-hover band).
|
|
1042
|
+
* - `outline` — within `hitRadiusPx` screen pixels of `path`'s outline, either side of it,
|
|
1043
|
+
* for chrome that is a path's own edge (path edit's segments). Hit-only. */
|
|
1020
1044
|
shape: {
|
|
1021
1045
|
kind: 'point';
|
|
1022
1046
|
x: number;
|
|
@@ -1074,6 +1098,10 @@ interface AffordanceRegion<TScratch = unknown> {
|
|
|
1074
1098
|
* In screen pixels because the clamp has to know the view and the affordance
|
|
1075
1099
|
* doesn't: `ChromeState` carries no scale. */
|
|
1076
1100
|
minBandPx?: number;
|
|
1101
|
+
} | {
|
|
1102
|
+
kind: 'outline';
|
|
1103
|
+
path: PolygonPath;
|
|
1104
|
+
hitRadiusPx: number;
|
|
1077
1105
|
};
|
|
1078
1106
|
/** Optional paint. World position is derived from `shape` + target
|
|
1079
1107
|
* transform; visual size stays in screen pixels (so handles don't
|
|
@@ -1103,8 +1131,12 @@ interface AffordanceRegion<TScratch = unknown> {
|
|
|
1103
1131
|
* discriminator; `buildAffordanceAt` falls back to
|
|
1104
1132
|
* `<affordanceId>:<regionId>`. */
|
|
1105
1133
|
hitKind?: string;
|
|
1106
|
-
/** Cursor to show while hovering this region
|
|
1107
|
-
|
|
1134
|
+
/** Cursor to show while hovering this region: one spec, or one worked out
|
|
1135
|
+
* from where the pointer is (`at`, in world coords). */
|
|
1136
|
+
cursor?: CursorSpec | ((at: {
|
|
1137
|
+
x: number;
|
|
1138
|
+
y: number;
|
|
1139
|
+
}, view: View) => CursorSpec);
|
|
1108
1140
|
/** `'exclusive'` bars every binding whose target doesn't consult the
|
|
1109
1141
|
* affordance. Read only when the affordance is composed into a
|
|
1110
1142
|
* consumer-registered layer; kit chrome routes through
|
|
@@ -1425,17 +1457,14 @@ interface ResolvableView {
|
|
|
1425
1457
|
*
|
|
1426
1458
|
* The view an input event belongs to. `id` is `null` for the root view —
|
|
1427
1459
|
* the whole canvas, when no viewport contains the point.
|
|
1428
|
-
*
|
|
1429
|
-
* `origin` is the client-space origin of that view's surface, ready to hand
|
|
1430
|
-
* to `clientToWorld` — which is the whole reason this type carries it rather
|
|
1431
|
-
* than leaving callers to add the canvas rect and the view rect themselves.
|
|
1432
1460
|
*/
|
|
1433
1461
|
interface ViewTarget {
|
|
1434
1462
|
id: string | null;
|
|
1435
1463
|
view: View;
|
|
1436
|
-
|
|
1437
|
-
|
|
1438
|
-
|
|
1464
|
+
/** The point asked about, in that view's world. */
|
|
1465
|
+
world: {
|
|
1466
|
+
x: number;
|
|
1467
|
+
y: number;
|
|
1439
1468
|
};
|
|
1440
1469
|
}
|
|
1441
1470
|
/**
|
|
@@ -1474,10 +1503,10 @@ interface CreateViewResolverOpts {
|
|
|
1474
1503
|
views: () => readonly ResolvableView[];
|
|
1475
1504
|
/** The camera for points no view claims. */
|
|
1476
1505
|
root: () => View;
|
|
1477
|
-
/**
|
|
1478
|
-
|
|
1479
|
-
|
|
1480
|
-
|
|
1506
|
+
/** A client point in the canvas's own CSS pixels, from its top-left. */
|
|
1507
|
+
toLocal: (clientX: number, clientY: number) => {
|
|
1508
|
+
x: number;
|
|
1509
|
+
y: number;
|
|
1481
1510
|
};
|
|
1482
1511
|
/**
|
|
1483
1512
|
* Whether something painted over every view claims a canvas-local point —
|
|
@@ -1922,12 +1951,94 @@ declare function fitToBounds(viewportW: number, viewportH: number, contentW: num
|
|
|
1922
1951
|
panY: number;
|
|
1923
1952
|
};
|
|
1924
1953
|
|
|
1954
|
+
/** One page of a document: a sheet of a fixed size, in world units. */
|
|
1955
|
+
interface Page {
|
|
1956
|
+
readonly id: string;
|
|
1957
|
+
readonly name?: string;
|
|
1958
|
+
readonly width: number;
|
|
1959
|
+
readonly height: number;
|
|
1960
|
+
}
|
|
1961
|
+
/** A page and where it sits in world space. */
|
|
1962
|
+
interface PlacedPage extends Page {
|
|
1963
|
+
readonly x: number;
|
|
1964
|
+
readonly y: number;
|
|
1965
|
+
/** Its place in the document's page order. */
|
|
1966
|
+
readonly index: number;
|
|
1967
|
+
}
|
|
1968
|
+
/** Options for {@link layoutPages}. */
|
|
1969
|
+
interface PageLayoutOptions {
|
|
1970
|
+
/** Which way the pages run. Default `'row'`. */
|
|
1971
|
+
direction?: 'row' | 'column';
|
|
1972
|
+
/** World units between neighbors. Default 40. */
|
|
1973
|
+
gap?: number;
|
|
1974
|
+
/** Where a page sits across the run, against the largest page. Default `'start'`. */
|
|
1975
|
+
align?: 'start' | 'center' | 'end';
|
|
1976
|
+
/** Where the first page's run starts. Default the world origin. */
|
|
1977
|
+
origin?: {
|
|
1978
|
+
readonly x: number;
|
|
1979
|
+
readonly y: number;
|
|
1980
|
+
};
|
|
1981
|
+
}
|
|
1982
|
+
/**
|
|
1983
|
+
* Place a document's pages in one world space, in order, so a single scene,
|
|
1984
|
+
* view, and history serve all of them. With the defaults the first page's
|
|
1985
|
+
* top-left corner is the world origin, where a one-page document's page is.
|
|
1986
|
+
* Throws on two pages with one id.
|
|
1987
|
+
*/
|
|
1988
|
+
declare function layoutPages(pages: readonly Page[], options?: PageLayoutOptions): PlacedPage[];
|
|
1989
|
+
/** The page under a world point, or `null` between and outside them. A point on an edge is on the page. */
|
|
1990
|
+
declare function pageAt(pages: readonly PlacedPage[], point: {
|
|
1991
|
+
readonly x: number;
|
|
1992
|
+
readonly y: number;
|
|
1993
|
+
}): PlacedPage | null;
|
|
1994
|
+
/**
|
|
1995
|
+
* The page a world-space box belongs to: the one it overlaps most, the earlier
|
|
1996
|
+
* of two it overlaps equally, and `null` when it touches none. This is the
|
|
1997
|
+
* rule that says which page an object is on.
|
|
1998
|
+
*/
|
|
1999
|
+
declare function pageOfBounds(pages: readonly PlacedPage[], bounds: Bounds): PlacedPage | null;
|
|
2000
|
+
/**
|
|
2001
|
+
* The page `step` places along the page order from the one with id `current`:
|
|
2002
|
+
* the next slide is `1`, the one before is `-1`. `null` past either end, unless
|
|
2003
|
+
* `wrap`. With no current page in the list, a step forward starts at the first
|
|
2004
|
+
* page and a step back at the last.
|
|
2005
|
+
*/
|
|
2006
|
+
declare function adjacentPage(pages: readonly PlacedPage[], current: string | null, step: number, options?: {
|
|
2007
|
+
wrap?: boolean;
|
|
2008
|
+
}): PlacedPage | null;
|
|
2009
|
+
/** The box around every page, or `null` for a document with none. */
|
|
2010
|
+
declare function pagesBounds(pages: readonly PlacedPage[]): Bounds | null;
|
|
2011
|
+
|
|
2012
|
+
/** Options for {@link pagesLayer}. */
|
|
2013
|
+
interface PagesLayerOptions {
|
|
2014
|
+
/** Each page's color: one for all, or one per page. */
|
|
2015
|
+
fill: string | ((page: PlacedPage) => string);
|
|
2016
|
+
/** Default `'pages'`. */
|
|
2017
|
+
id?: string;
|
|
2018
|
+
/** Default `'Pages'`. */
|
|
2019
|
+
label?: string;
|
|
2020
|
+
}
|
|
2021
|
+
/**
|
|
2022
|
+
* The sheets themselves: a world-space layer that paints each placed page as a
|
|
2023
|
+
* filled rect, to sit under the scene. Build it again when the pages or the
|
|
2024
|
+
* fill change; its commands are cached on both.
|
|
2025
|
+
*/
|
|
2026
|
+
declare function pagesLayer(pages: readonly PlacedPage[], options: PagesLayerOptions): RenderLayer<unknown>;
|
|
2027
|
+
|
|
2028
|
+
/** The view that shows one placed page whole: `fitViewToBounds` on its rect. */
|
|
2029
|
+
declare function fitViewToPage(page: PlacedPage, viewportDims: ViewportDims, currentView: View, options?: FitViewToBoundsOptions): View;
|
|
2030
|
+
|
|
1925
2031
|
/** Optional clamp bounds for `zoomAt`. Defaults: {@link DEFAULT_MIN_ZOOM} /
|
|
1926
2032
|
* {@link DEFAULT_MAX_ZOOM} (per axis). */
|
|
1927
2033
|
interface ZoomClampOpts {
|
|
1928
2034
|
min?: ZoomBound;
|
|
1929
2035
|
max?: ZoomBound;
|
|
1930
2036
|
}
|
|
2037
|
+
/** Which axes a zoom scales. */
|
|
2038
|
+
type ZoomAxis = 'both' | 'x' | 'y';
|
|
2039
|
+
/** `factor` held to one axis: the other axis's factor is 1, so `zoomAt` leaves
|
|
2040
|
+
* its scale and its translation where they were. */
|
|
2041
|
+
declare function axisZoomFactor(factor: number, axis: ZoomAxis): ZoomFactor;
|
|
1931
2042
|
/**
|
|
1932
2043
|
* Pure zoom primitive. Returns a new `View` whose `scale` is multiplied
|
|
1933
2044
|
* by `factor` (per-axis, clamped) and whose translation is adjusted so
|
|
@@ -3422,7 +3533,7 @@ interface CreateOutlinesAdapter {
|
|
|
3422
3533
|
* node drawn straight. Outline Stroke skews and stretches a world-width
|
|
3423
3534
|
* stroke with it. Without it every stroke is outlined in world.
|
|
3424
3535
|
*/
|
|
3425
|
-
getStrokeFrame?(id: NodeId):
|
|
3536
|
+
getStrokeFrame?(id: NodeId): Affine | null | undefined;
|
|
3426
3537
|
/**
|
|
3427
3538
|
* Mint one path node of node `sourceId`'s outlines. `path` is in world
|
|
3428
3539
|
* space. The node must wear `spec`'s fill and stroke — a text whose runs
|
|
@@ -3448,15 +3559,14 @@ interface CreateOutlinesAdapter {
|
|
|
3448
3559
|
}): {
|
|
3449
3560
|
id: string;
|
|
3450
3561
|
};
|
|
3451
|
-
/** Full node for `id`, so undo restores the text node whole.
|
|
3452
|
-
|
|
3453
|
-
getNode?(id: string): {
|
|
3562
|
+
/** Full node for `id`, so undo restores the text node whole. */
|
|
3563
|
+
getNode(id: string): {
|
|
3454
3564
|
id: string;
|
|
3455
3565
|
} | undefined | null;
|
|
3456
|
-
/**
|
|
3457
|
-
*
|
|
3458
|
-
getParent
|
|
3459
|
-
getChildren
|
|
3566
|
+
/** The tree: each path is inserted at its source node's index among its
|
|
3567
|
+
* parent's children. */
|
|
3568
|
+
getParent(id: string): string | null;
|
|
3569
|
+
getChildren(parentId: string | null): string[];
|
|
3460
3570
|
applyOps?(ops: Op[], label?: string): void;
|
|
3461
3571
|
setSelection?(ids: NodeId[]): void;
|
|
3462
3572
|
insertNode?(node: {
|
|
@@ -3526,16 +3636,6 @@ interface BooleanOpOptions {
|
|
|
3526
3636
|
|
|
3527
3637
|
/** Boolean op identifiers: the five Pathfinder primaries, and Crop, Trim, and Merge. */
|
|
3528
3638
|
type BooleanOp = 'union' | 'intersect' | 'subtract' | 'exclude' | 'divide' | 'crop' | 'trim' | 'merge';
|
|
3529
|
-
/**
|
|
3530
|
-
* z-position descriptor for a path node. `parentId` is the direct parent
|
|
3531
|
-
* (or `null` for a top-level node); `index` is the position within that
|
|
3532
|
-
* parent's child order — never a global render index.
|
|
3533
|
-
*/
|
|
3534
|
-
/** @internal */
|
|
3535
|
-
interface BooleanZOrder {
|
|
3536
|
-
parentId: string | null;
|
|
3537
|
-
index: number;
|
|
3538
|
-
}
|
|
3539
3639
|
/** Adapter the hook and the pure core both consume. */
|
|
3540
3640
|
interface BooleansAdapter {
|
|
3541
3641
|
getSelection(): readonly NodeId[] | readonly string[];
|
|
@@ -3559,7 +3659,7 @@ interface BooleansAdapter {
|
|
|
3559
3659
|
* node drawn straight. A counted world-width stroke is skewed and stretched
|
|
3560
3660
|
* with it. Without it every stroke is outlined in world.
|
|
3561
3661
|
*/
|
|
3562
|
-
getStrokeFrame?(id: NodeId):
|
|
3662
|
+
getStrokeFrame?(id: NodeId): Affine | null | undefined;
|
|
3563
3663
|
compareZ(a: NodeId, b: NodeId): number;
|
|
3564
3664
|
/**
|
|
3565
3665
|
* Mint a new node from a boolean-op result `Path`. `producedBy` names the
|
|
@@ -3578,34 +3678,21 @@ interface BooleansAdapter {
|
|
|
3578
3678
|
id: string;
|
|
3579
3679
|
};
|
|
3580
3680
|
/**
|
|
3581
|
-
*
|
|
3582
|
-
*
|
|
3583
|
-
* If omitted, a `{ id }` stub is captured — undo will reinstate the id
|
|
3584
|
-
* but consumers reading other fields (path, fill, etc.) will see them as
|
|
3585
|
-
* undefined.
|
|
3681
|
+
* The full object for an id. The delete ops capture it, so their `invert`
|
|
3682
|
+
* (an insert) restores the complete object on undo.
|
|
3586
3683
|
*/
|
|
3587
|
-
getNode
|
|
3684
|
+
getNode(id: NodeId): {
|
|
3588
3685
|
id: string;
|
|
3589
3686
|
} | undefined | null;
|
|
3590
3687
|
/**
|
|
3591
|
-
*
|
|
3592
|
-
*
|
|
3593
|
-
*
|
|
3594
|
-
*
|
|
3595
|
-
* `insertNode` defaults to. `defaultCommitAdapter` supplies all three.
|
|
3596
|
-
*/
|
|
3597
|
-
getParent?(id: string): string | null;
|
|
3598
|
-
getChildren?(parentId: string | null): readonly string[];
|
|
3599
|
-
setChildOrder?(parentId: string | null, ids: string[]): void;
|
|
3600
|
-
/**
|
|
3601
|
-
* Optional override for the slot the kit otherwise reads through
|
|
3602
|
-
* `getParent` / `getChildren`: `id`'s parent and its index in that
|
|
3603
|
-
* parent's child order.
|
|
3604
|
-
*
|
|
3605
|
-
* @deprecated Supply `getParent` and `getChildren` instead, and the kit
|
|
3606
|
-
* derives this.
|
|
3688
|
+
* The tree. The kit reads each source's slot among its siblings through
|
|
3689
|
+
* `getParent` and `getChildren`, and moves each result into the slot of
|
|
3690
|
+
* the topmost source in its own source's parent through `setChildOrder`.
|
|
3691
|
+
* `defaultCommitAdapter` supplies all three, and `getNode`.
|
|
3607
3692
|
*/
|
|
3608
|
-
|
|
3693
|
+
getParent(id: string): string | null;
|
|
3694
|
+
getChildren(parentId: string | null): string[];
|
|
3695
|
+
setChildOrder(parentId: string | null, ids: string[]): void;
|
|
3609
3696
|
applyOps?(ops: Op[], label?: string): void;
|
|
3610
3697
|
setSelection?(ids: NodeId[]): void;
|
|
3611
3698
|
insertNode?(node: {
|
|
@@ -3763,7 +3850,64 @@ interface GeometryProjection {
|
|
|
3763
3850
|
id?: string;
|
|
3764
3851
|
data: unknown;
|
|
3765
3852
|
pose: unknown;
|
|
3766
|
-
}, m:
|
|
3853
|
+
}, m: Affine): unknown | null;
|
|
3854
|
+
}
|
|
3855
|
+
|
|
3856
|
+
/** Adapter dep for `insertAction`. The `extras` carry the active tool's kind
|
|
3857
|
+
* + per-kind geometry. */
|
|
3858
|
+
interface InsertDep {
|
|
3859
|
+
/**
|
|
3860
|
+
* Materialise a new node from the given drag-rect bounds and typed
|
|
3861
|
+
* per-kind extras. Returns the new node's id, or `null` if the consumer
|
|
3862
|
+
* rejected the insert (e.g. sub-threshold bounds, unknown kind).
|
|
3863
|
+
*/
|
|
3864
|
+
commit(bounds: {
|
|
3865
|
+
x: number;
|
|
3866
|
+
y: number;
|
|
3867
|
+
width: number;
|
|
3868
|
+
height: number;
|
|
3869
|
+
}, extras: InsertExtras): NodeId | null;
|
|
3870
|
+
/**
|
|
3871
|
+
* What `commit` would apply, unapplied: the new node's id and the ops that
|
|
3872
|
+
* insert it, for a caller that has more to put in the same undo step. The
|
|
3873
|
+
* pen joins two paths this way. Without it such a caller declines.
|
|
3874
|
+
*/
|
|
3875
|
+
build?(bounds: {
|
|
3876
|
+
x: number;
|
|
3877
|
+
y: number;
|
|
3878
|
+
width: number;
|
|
3879
|
+
height: number;
|
|
3880
|
+
}, extras: InsertExtras): {
|
|
3881
|
+
id: NodeId;
|
|
3882
|
+
ops: Op[];
|
|
3883
|
+
} | null;
|
|
3884
|
+
/** The scene layer `commit` puts the node on. An insert on a layer carrying
|
|
3885
|
+
* `parallax` is dragged out in that plane's world, so `bounds` arrive
|
|
3886
|
+
* there too. Omitted: the camera's world. */
|
|
3887
|
+
layer?(): string;
|
|
3888
|
+
}
|
|
3889
|
+
/**
|
|
3890
|
+
* What `editAnchorsAction` keeps a path symmetric under. Asked once at the
|
|
3891
|
+
* press, with the id of the path being edited; answer every transform of the
|
|
3892
|
+
* symmetry group except the identity, in world coordinates. Of those, the
|
|
3893
|
+
* ones the path is already its own image under are held through the drag:
|
|
3894
|
+
* each image of a dragged anchor or handle follows it, and one a transform
|
|
3895
|
+
* fixes stays where that transform allows.
|
|
3896
|
+
*/
|
|
3897
|
+
interface PathSymmetryDep {
|
|
3898
|
+
transforms(id: string): readonly Affine[];
|
|
3899
|
+
}
|
|
3900
|
+
/** Where the `insert` dep puts what it makes. Read at each insert. A node
|
|
3901
|
+
* goes onto the container's layer, with its pose made local to it when the
|
|
3902
|
+
* scene composes frames; an id naming no container is the same as `null`. */
|
|
3903
|
+
interface InsertIntoDep {
|
|
3904
|
+
get(): string | null;
|
|
3905
|
+
}
|
|
3906
|
+
/** Holder for the insert gesture in flight in one input scope. `gesture` is
|
|
3907
|
+
* `insertAction`'s own state, opaque to everything else, and `null` between
|
|
3908
|
+
* gestures. A source must return the same object on every read. */
|
|
3909
|
+
interface InsertLive {
|
|
3910
|
+
gesture: unknown;
|
|
3767
3911
|
}
|
|
3768
3912
|
|
|
3769
3913
|
/** Minimal view API the action layer consumes. */
|
|
@@ -3871,17 +4015,17 @@ interface EditAnchorsDep {
|
|
|
3871
4015
|
pose: unknown;
|
|
3872
4016
|
data: unknown;
|
|
3873
4017
|
} | null;
|
|
3874
|
-
/** Commit `worldPath` as the new value for `id
|
|
3875
|
-
*
|
|
3876
|
-
*
|
|
3877
|
-
*
|
|
3878
|
-
applyEdit(id: string, worldPath: unknown, label: string): void;
|
|
4018
|
+
/** Commit `worldPath` as the new value for `id`, as one history entry
|
|
4019
|
+
* labeled `label`: a setPose when the pose IS the polygon, a batched
|
|
4020
|
+
* setPose+update when it lives on data.path. Given `origins` (from
|
|
4021
|
+
* `editAnchorSetTracked`), a `data.skin` is renumbered in that entry. */
|
|
4022
|
+
applyEdit(id: string, worldPath: unknown, label: string, origins?: readonly (_weasel_js_geom.PointOrigin | null)[]): void;
|
|
3879
4023
|
/** The ops `applyEdit` would commit for the same arguments, unapplied, so
|
|
3880
4024
|
* a caller can make the edit part of a larger batch — the pen joining
|
|
3881
4025
|
* two paths edits one node and deletes the other in one undo step.
|
|
3882
4026
|
* Optional; a caller that needs it declines the composite edit without
|
|
3883
4027
|
* it. Returns `[]` when `id` has no editable polygon. */
|
|
3884
|
-
editOps?(id: string, worldPath: unknown, label: string): Op[];
|
|
4028
|
+
editOps?(id: string, worldPath: unknown, label: string, origins?: readonly (_weasel_js_geom.PointOrigin | null)[]): Op[];
|
|
3885
4029
|
/**
|
|
3886
4030
|
* Anchors currently selected within the edited path, as **flat anchor
|
|
3887
4031
|
* indices** — the same numbering `enumerateAnchors` produces and the
|
|
@@ -4090,45 +4234,7 @@ interface SnapDep {
|
|
|
4090
4234
|
y: number;
|
|
4091
4235
|
};
|
|
4092
4236
|
}
|
|
4093
|
-
|
|
4094
|
-
* + per-kind geometry. */
|
|
4095
|
-
interface InsertDep {
|
|
4096
|
-
/**
|
|
4097
|
-
* Materialise a new node from the given drag-rect bounds and typed
|
|
4098
|
-
* per-kind extras. Returns the new node's id, or `null` if the consumer
|
|
4099
|
-
* rejected the insert (e.g. sub-threshold bounds, unknown kind).
|
|
4100
|
-
*/
|
|
4101
|
-
commit(bounds: {
|
|
4102
|
-
x: number;
|
|
4103
|
-
y: number;
|
|
4104
|
-
width: number;
|
|
4105
|
-
height: number;
|
|
4106
|
-
}, extras: InsertExtras): NodeId | null;
|
|
4107
|
-
/**
|
|
4108
|
-
* What `commit` would apply, unapplied: the new node's id and the ops that
|
|
4109
|
-
* insert it, for a caller that has more to put in the same undo step. The
|
|
4110
|
-
* pen joins two paths this way. Without it such a caller declines.
|
|
4111
|
-
*/
|
|
4112
|
-
build?(bounds: {
|
|
4113
|
-
x: number;
|
|
4114
|
-
y: number;
|
|
4115
|
-
width: number;
|
|
4116
|
-
height: number;
|
|
4117
|
-
}, extras: InsertExtras): {
|
|
4118
|
-
id: NodeId;
|
|
4119
|
-
ops: Op[];
|
|
4120
|
-
} | null;
|
|
4121
|
-
/** The scene layer `commit` puts the node on. An insert on a layer carrying
|
|
4122
|
-
* `parallax` is dragged out in that plane's world, so `bounds` arrive
|
|
4123
|
-
* there too. Omitted: the camera's world. */
|
|
4124
|
-
layer?(): string;
|
|
4125
|
-
}
|
|
4126
|
-
/** Holder for the insert gesture in flight in one input scope. `gesture` is
|
|
4127
|
-
* `insertAction`'s own state, opaque to everything else, and `null` between
|
|
4128
|
-
* gestures. A source must return the same object on every read. */
|
|
4129
|
-
interface InsertLive {
|
|
4130
|
-
gesture: unknown;
|
|
4131
|
-
}
|
|
4237
|
+
|
|
4132
4238
|
/**
|
|
4133
4239
|
* Adapter dep for `resizeAction`: bounds-frame behaviors (e.g.
|
|
4134
4240
|
* `lockAspectWithModifier`), world-space anchor-point snap behaviors (e.g.
|
|
@@ -4150,9 +4256,9 @@ interface ResizePolicy<TPose> extends GestureLifecycleOptions {
|
|
|
4150
4256
|
}
|
|
4151
4257
|
/**
|
|
4152
4258
|
* Layout-strategy lookup by container id, consumed by `moveAction` to run
|
|
4153
|
-
* the drag-time reflow pass. Sourced by `<SceneCanvas>` from
|
|
4154
|
-
*
|
|
4155
|
-
*
|
|
4259
|
+
* the drag-time reflow pass. Sourced by `<SceneCanvas>` from the layout each
|
|
4260
|
+
* container declares on its scene node. `getLayout` returns null for a
|
|
4261
|
+
* container that declares none, so the reflow pass is a no-op then.
|
|
4156
4262
|
*/
|
|
4157
4263
|
interface LayoutDep {
|
|
4158
4264
|
getLayout(containerId: string): LayoutStrategy<unknown> | null;
|
|
@@ -4255,6 +4361,10 @@ declare module '@weasel-js/routing' {
|
|
|
4255
4361
|
* `insert.adjustRotation` reaches the one in its own input scope.
|
|
4256
4362
|
* Sourced by `<SceneCanvas>`; without it the rotation does nothing. */
|
|
4257
4363
|
insertLive?: InsertLive;
|
|
4364
|
+
/** The container the `insert` dep puts new nodes into — every shape a
|
|
4365
|
+
* tool draws and every dropped image or text. Absent, or answering
|
|
4366
|
+
* `null`: the top of the tree. */
|
|
4367
|
+
insertInto?: InsertIntoDep;
|
|
4258
4368
|
/** Snap dep — world-space point snapping (grid / guides). Sourced by
|
|
4259
4369
|
* `<SceneCanvas>` from `toolOptions.snapPoint`. Absent means no snapping. */
|
|
4260
4370
|
snap?: SnapDep;
|
|
@@ -4269,6 +4379,9 @@ declare module '@weasel-js/routing' {
|
|
|
4269
4379
|
/** Edit-anchors dep — narrow read/write of one polygon's path. If
|
|
4270
4380
|
* absent, `editAnchorsAction`'s `start` returns an empty handle (no-op). */
|
|
4271
4381
|
editAnchors: EditAnchorsDep;
|
|
4382
|
+
/** The transforms a path being edited should stay its own image under.
|
|
4383
|
+
* Absent: an anchor drag moves only what is dragged. */
|
|
4384
|
+
pathSymmetry?: PathSymmetryDep;
|
|
4272
4385
|
/**
|
|
4273
4386
|
* Text-edit dep — activates the in-place text editing overlay. Sourced
|
|
4274
4387
|
* from consumer via `useTextEdit` / `useSceneTextEdit`.
|
|
@@ -4312,7 +4425,7 @@ declare module '@weasel-js/routing' {
|
|
|
4312
4425
|
cancelAll(reason: 'commit' | 'cancel'): void;
|
|
4313
4426
|
};
|
|
4314
4427
|
/**
|
|
4315
|
-
* Layout-strategy lookup. Sourced by `<SceneCanvas>` from
|
|
4428
|
+
* Layout-strategy lookup. Sourced by `<SceneCanvas>` from the scene.
|
|
4316
4429
|
* Optional: absent (or all-null) → `moveAction` skips reflow.
|
|
4317
4430
|
*/
|
|
4318
4431
|
layout?: LayoutDep;
|
|
@@ -4787,43 +4900,6 @@ declare function DepRegistryProviderIfRoot({ children }: {
|
|
|
4787
4900
|
children: ReactNode;
|
|
4788
4901
|
}): react.JSX.Element;
|
|
4789
4902
|
|
|
4790
|
-
/**
|
|
4791
|
-
* Project an action's keyboard bindings into the shape a shortcut chip
|
|
4792
|
-
* renders from (`formatShortcut` / `formatShortcutParts` in `@weasel-js/ui`).
|
|
4793
|
-
*/
|
|
4794
|
-
|
|
4795
|
-
/** One keyboard shortcut, flattened for display. Structurally the
|
|
4796
|
-
* `ShortcutInput` weasel-ui formats — kept local so core doesn't depend on
|
|
4797
|
-
* the UI package. */
|
|
4798
|
-
interface ActionShortcut {
|
|
4799
|
-
key: string;
|
|
4800
|
-
mod: boolean;
|
|
4801
|
-
alt: boolean;
|
|
4802
|
-
shift: boolean;
|
|
4803
|
-
}
|
|
4804
|
-
/**
|
|
4805
|
-
* The chip form of a single gesture spec, or `undefined` when the spec has
|
|
4806
|
-
* none.
|
|
4807
|
-
*
|
|
4808
|
-
* - A spec's `key` may list spellings of one keycap (`['[', '{']` — the
|
|
4809
|
-
* shifted bracket reports as `'{'`). The first is the shortcut's name.
|
|
4810
|
-
* - A modifier declared `'optional'` matches held or unheld, so it isn't
|
|
4811
|
-
* part of what the user has to press.
|
|
4812
|
-
*
|
|
4813
|
-
* Non-keyboard specs (drag, wheel, click) have no chip form. Neither does a
|
|
4814
|
-
* *required* `ctrl` or `meta`: the display shape carries only `mod`.
|
|
4815
|
-
*/
|
|
4816
|
-
declare function keySpecShortcut(spec: GestureSpec): ActionShortcut | undefined;
|
|
4817
|
-
/**
|
|
4818
|
-
* Every keyboard shortcut an action answers to, in declaration order.
|
|
4819
|
-
* Specs `keySpecShortcut` has no chip for are skipped, and bindings it leaves
|
|
4820
|
-
* identical are emitted once; an action bound only to those returns empty.
|
|
4821
|
-
*
|
|
4822
|
-
* With `params` — an `ActionItem`'s — only the bindings that pass those same
|
|
4823
|
-
* values count, so each variant of `flip` gets its own key.
|
|
4824
|
-
*/
|
|
4825
|
-
declare function actionShortcuts(action: Action, params?: Readonly<Record<string, unknown>>): readonly ActionShortcut[];
|
|
4826
|
-
|
|
4827
4903
|
/**
|
|
4828
4904
|
* Pose composition for hierarchical scene graphs.
|
|
4829
4905
|
*
|
|
@@ -4847,9 +4923,9 @@ declare function decomposeRectPose<TPose extends RectPose>(parent: TPose, world:
|
|
|
4847
4923
|
* pose is offset into the parent's unrotated box, then the whole thing is
|
|
4848
4924
|
* turned about the parent's center. Rotations add; the child keeps its size.
|
|
4849
4925
|
*
|
|
4850
|
-
* Reduces to `composeRectPose` when the parent is upright.
|
|
4851
|
-
*
|
|
4852
|
-
*
|
|
4926
|
+
* Reduces to `composeRectPose` when the parent is upright. A parent's
|
|
4927
|
+
* `transform` composes too, and what the child's box and rotation cannot hold
|
|
4928
|
+
* of the result lands in the child's own `transform`.
|
|
4853
4929
|
*/
|
|
4854
4930
|
declare function composeRigidPose<TPose extends RectPose>(parent: TPose, child: TPose): TPose;
|
|
4855
4931
|
/** Inverse of `composeRigidPose` — un-turns about the parent's center, then
|
|
@@ -4871,6 +4947,245 @@ declare const RIGID_POSE_COMPOSITION: PoseComposition<RectPose>;
|
|
|
4871
4947
|
*/
|
|
4872
4948
|
declare function worldPoseLookup<TPose>(adapter: PoseAdapter<TPose>, compose: (parent: TPose, child: TPose) => TPose): (id: string) => TPose | null;
|
|
4873
4949
|
|
|
4950
|
+
/**
|
|
4951
|
+
* @experimental
|
|
4952
|
+
* A world-space place a selection transform lines up against — what align
|
|
4953
|
+
* aligns to, what flip mirrors about — other than the selection itself:
|
|
4954
|
+
*
|
|
4955
|
+
* - `'pointer'` — where the pointer is: the click's world point when a click
|
|
4956
|
+
* invoked the action, otherwise the latest position in the `pointer` dep.
|
|
4957
|
+
* - `{ x, y, width?, height? }` — a world point, or a world rect when it has
|
|
4958
|
+
* extent.
|
|
4959
|
+
* - `{ node }` — that node's visual bounds (a key object; it does not move).
|
|
4960
|
+
*/
|
|
4961
|
+
type SpatialReference = 'pointer' | {
|
|
4962
|
+
x: number;
|
|
4963
|
+
y: number;
|
|
4964
|
+
width?: number;
|
|
4965
|
+
height?: number;
|
|
4966
|
+
} | {
|
|
4967
|
+
node: NodeId;
|
|
4968
|
+
};
|
|
4969
|
+
/** @experimental Where `resolveSpatialReference` reads a reference's inputs. */
|
|
4970
|
+
interface SpatialReferenceSources {
|
|
4971
|
+
/** The pointer's world position, or `null` when it is over no canvas. */
|
|
4972
|
+
pointer(): {
|
|
4973
|
+
x: number;
|
|
4974
|
+
y: number;
|
|
4975
|
+
} | null;
|
|
4976
|
+
/** A node's world visual bounds, or `null` when it is not in the scene. */
|
|
4977
|
+
nodeBounds(id: NodeId): Bounds | null;
|
|
4978
|
+
}
|
|
4979
|
+
/**
|
|
4980
|
+
* @experimental
|
|
4981
|
+
* The world bounds `ref` names — a point comes back as a zero-size rect — or
|
|
4982
|
+
* `null` when it names nothing right now (no pointer, a missing node, a
|
|
4983
|
+
* malformed value).
|
|
4984
|
+
*/
|
|
4985
|
+
declare function resolveSpatialReference(ref: SpatialReference | unknown, src: SpatialReferenceSources): Bounds | null;
|
|
4986
|
+
|
|
4987
|
+
/** Edge or center the selection should align to within the reference's
|
|
4988
|
+
* bounds (rotated members contribute their ink extent). */
|
|
4989
|
+
type AlignEdge = 'left' | 'right' | 'top' | 'bottom' | 'center-x' | 'center-y';
|
|
4990
|
+
/** @experimental What the selection aligns to: `'union'` — the selection's
|
|
4991
|
+
* own visual union AABB, the default — or a {@link SpatialReference}. */
|
|
4992
|
+
type AlignReference = 'union' | SpatialReference;
|
|
4993
|
+
/** @experimental The bounds each member of `bounds` aligns to under `to`, or
|
|
4994
|
+
* `null` when there is nothing to align: a union of fewer than two members,
|
|
4995
|
+
* an empty selection, or a reference that names nothing right now. */
|
|
4996
|
+
declare function alignTargetBounds(bounds: readonly Bounds[], to: AlignReference | undefined, src: SpatialReferenceSources): Bounds | null;
|
|
4997
|
+
/** Adapter for `useAlign`. */
|
|
4998
|
+
interface AlignAdapter<TPose> {
|
|
4999
|
+
getSelection(): NodeId[];
|
|
5000
|
+
/** The pose as stored — local to the node's parent. */
|
|
5001
|
+
getPose(id: NodeId): TPose;
|
|
5002
|
+
/** The node's container, `null` for a root: the chain a pose is composed
|
|
5003
|
+
* through when container poses define a frame. */
|
|
5004
|
+
getParent(id: NodeId): NodeId | null;
|
|
5005
|
+
applyOps?(ops: Op[], label?: string): void;
|
|
5006
|
+
}
|
|
5007
|
+
/** Options for `useAlign`. */
|
|
5008
|
+
interface UseAlignOptions<TPose> {
|
|
5009
|
+
/** Projection between `TPose` and bounds. Defaults to `RECT_POSE_DESCRIPTOR`
|
|
5010
|
+
* for `{x,y,width,height}` poses. Pass `pathPoseDescriptor` for `Path`
|
|
5011
|
+
* poses so polygon coords translate correctly. */
|
|
5012
|
+
geometry?: PoseDescriptor<TPose>;
|
|
5013
|
+
/** Label passed to applyOps. Default 'Align'. */
|
|
5014
|
+
label?: string;
|
|
5015
|
+
/** How local poses fold up to world. Default IDENTITY, where the two are
|
|
5016
|
+
* the same value and the alignment runs entirely in stored coordinates. */
|
|
5017
|
+
composition?: PoseComposition<TPose>;
|
|
5018
|
+
}
|
|
5019
|
+
/** Return shape of `useAlign`. */
|
|
5020
|
+
interface UseAlignReturn {
|
|
5021
|
+
/** Imperative trigger. `to` defaults to `'union'`, which needs two items;
|
|
5022
|
+
* any other reference aligns a single item too. `'pointer'` reads the
|
|
5023
|
+
* surrounding `<PointerContextProvider>`. */
|
|
5024
|
+
align(edge: AlignEdge, to?: AlignReference): void;
|
|
5025
|
+
}
|
|
5026
|
+
/** Compute the (dx, dy) translation that moves AABB `b` so that the requested
|
|
5027
|
+
* `edge`/center matches the corresponding feature of the union AABB `u`. */
|
|
5028
|
+
declare function alignDeltaFor(b: Bounds, u: Bounds, edge: AlignEdge): {
|
|
5029
|
+
dx: number;
|
|
5030
|
+
dy: number;
|
|
5031
|
+
};
|
|
5032
|
+
/** Align the current selection to a shared edge or center of the selection's
|
|
5033
|
+
* union AABB, or of another reference. Single batch — one undo step.
|
|
5034
|
+
*
|
|
5035
|
+
* The edge is a world edge: bounds are measured and translated in world, and
|
|
5036
|
+
* each result is stored back in its own parent's frame. */
|
|
5037
|
+
declare function useAlign<TPose>(adapter: AlignAdapter<TPose>, options?: UseAlignOptions<TPose>): UseAlignReturn;
|
|
5038
|
+
|
|
5039
|
+
/** Axis along which selection is distributed. `'x'` spreads horizontally. */
|
|
5040
|
+
type DistributeAxis = 'x' | 'y';
|
|
5041
|
+
/** `'centers'` spaces centers equally; `'gaps'` makes the gap between
|
|
5042
|
+
* consecutive items equal. Both measure a rotated item by its ink extent.
|
|
5043
|
+
* Endpoints stay put in both modes. */
|
|
5044
|
+
type DistributeMode = 'centers' | 'gaps';
|
|
5045
|
+
/** Adapter for `useDistribute`. */
|
|
5046
|
+
interface DistributeAdapter<TPose> {
|
|
5047
|
+
getSelection(): NodeId[];
|
|
5048
|
+
/** The pose as stored — local to the node's parent. */
|
|
5049
|
+
getPose(id: NodeId): TPose;
|
|
5050
|
+
/** The node's container, `null` for a root: the chain a pose is composed
|
|
5051
|
+
* through when container poses define a frame. */
|
|
5052
|
+
getParent(id: NodeId): NodeId | null;
|
|
5053
|
+
applyOps?(ops: Op[], label?: string): void;
|
|
5054
|
+
}
|
|
5055
|
+
/** Options for `useDistribute`. */
|
|
5056
|
+
interface UseDistributeOptions<TPose> {
|
|
5057
|
+
/** Projection between `TPose` and bounds. Defaults to `RECT_POSE_DESCRIPTOR`
|
|
5058
|
+
* for `{x,y,width,height}` poses. */
|
|
5059
|
+
geometry?: PoseDescriptor<TPose>;
|
|
5060
|
+
/** Default mode when `distribute(axis)` is called without one. Default 'centers'. */
|
|
5061
|
+
defaultMode?: DistributeMode;
|
|
5062
|
+
/** Label passed to applyOps. Default 'Distribute'. */
|
|
5063
|
+
label?: string;
|
|
5064
|
+
/** How local poses fold up to world. Default IDENTITY, where the two are
|
|
5065
|
+
* the same value and the spread runs entirely in stored coordinates. */
|
|
5066
|
+
composition?: PoseComposition<TPose>;
|
|
5067
|
+
}
|
|
5068
|
+
/** Return shape of `useDistribute`. */
|
|
5069
|
+
interface UseDistributeReturn {
|
|
5070
|
+
/** Imperative trigger. No-op when fewer than 3 items selected. */
|
|
5071
|
+
distribute(axis: DistributeAxis, mode?: DistributeMode): void;
|
|
5072
|
+
}
|
|
5073
|
+
/** Distribute the current multi-selection along `axis`. Requires ≥3 items;
|
|
5074
|
+
* no-op otherwise. Endpoints (min and max along the axis) stay put; the
|
|
5075
|
+
* remaining items are repositioned. Single batch — one undo step.
|
|
5076
|
+
*
|
|
5077
|
+
* The span being divided is a world span: bounds are measured and translated
|
|
5078
|
+
* in world, and each result is stored back in its own parent's frame. */
|
|
5079
|
+
declare function useDistribute<TPose>(adapter: DistributeAdapter<TPose>, options?: UseDistributeOptions<TPose>): UseDistributeReturn;
|
|
5080
|
+
|
|
5081
|
+
/**
|
|
5082
|
+
* Pose-flip helpers used by `flipAction` (via `defaults/flip.ts`).
|
|
5083
|
+
*
|
|
5084
|
+
* These were extracted from the legacy `useFlip` hook when it was removed —
|
|
5085
|
+
* they remain because the descriptor-style `flipAction` still needs to reflect
|
|
5086
|
+
* arbitrary `TPose` values through a `PoseDescriptor`.
|
|
5087
|
+
*/
|
|
5088
|
+
|
|
5089
|
+
/** Axis for flip. `'x'` mirrors horizontally (left↔right); `'y'` mirrors vertically (top↔bottom). */
|
|
5090
|
+
type FlipAxis = 'x' | 'y';
|
|
5091
|
+
/** How a multi-selection flip chooses its pivot.
|
|
5092
|
+
*
|
|
5093
|
+
* - `'each'` — every pose mirrors about its own AABB; spatial layout of the
|
|
5094
|
+
* selection is unchanged, individual items are reflected in place.
|
|
5095
|
+
* - `'union'` — every pose mirrors about the selection's union AABB; items
|
|
5096
|
+
* swap sides as well as reflect, matching Illustrator/Figma defaults.
|
|
5097
|
+
* - a {@link SpatialReference} — every pose mirrors about the center of the
|
|
5098
|
+
* bounds it names: the pointer, a world point or rect, or a key node. */
|
|
5099
|
+
type FlipPivot = 'each' | 'union' | SpatialReference;
|
|
5100
|
+
|
|
5101
|
+
/**
|
|
5102
|
+
* The params the kit's own actions read, merged into routing's
|
|
5103
|
+
* `ActionParamSchema` so `<SceneCanvas tune>` types them. An action that
|
|
5104
|
+
* reads params gets its entry here, beside the others.
|
|
5105
|
+
*/
|
|
5106
|
+
|
|
5107
|
+
/** A point a spatial reference of `'pointer'` resolves to in place of the
|
|
5108
|
+
* pointer dep, when the invocation has one of its own. */
|
|
5109
|
+
type AtPoint = {
|
|
5110
|
+
worldX: number;
|
|
5111
|
+
worldY: number;
|
|
5112
|
+
};
|
|
5113
|
+
type AlignParams = AtPoint & {
|
|
5114
|
+
to: AlignReference;
|
|
5115
|
+
};
|
|
5116
|
+
type FlipParams = AtPoint & {
|
|
5117
|
+
axis: FlipAxis;
|
|
5118
|
+
pivot: FlipPivot;
|
|
5119
|
+
};
|
|
5120
|
+
type DistributeParams = {
|
|
5121
|
+
mode: DistributeMode;
|
|
5122
|
+
};
|
|
5123
|
+
type ReorderParams = {
|
|
5124
|
+
distance: 'adjacent' | 'extreme';
|
|
5125
|
+
};
|
|
5126
|
+
type NudgeParams = {
|
|
5127
|
+
magnitude: 'small' | 'big';
|
|
5128
|
+
};
|
|
5129
|
+
declare module '@weasel-js/routing' {
|
|
5130
|
+
interface ActionParamSchema {
|
|
5131
|
+
'align.left': AlignParams;
|
|
5132
|
+
'align.centerX': AlignParams;
|
|
5133
|
+
'align.right': AlignParams;
|
|
5134
|
+
'align.top': AlignParams;
|
|
5135
|
+
'align.centerY': AlignParams;
|
|
5136
|
+
'align.bottom': AlignParams;
|
|
5137
|
+
flip: FlipParams;
|
|
5138
|
+
'distribute.horizontal': DistributeParams;
|
|
5139
|
+
'distribute.vertical': DistributeParams;
|
|
5140
|
+
'reorder.forward': ReorderParams;
|
|
5141
|
+
'reorder.backward': ReorderParams;
|
|
5142
|
+
'nudge.up': NudgeParams;
|
|
5143
|
+
'nudge.down': NudgeParams;
|
|
5144
|
+
'nudge.left': NudgeParams;
|
|
5145
|
+
'nudge.right': NudgeParams;
|
|
5146
|
+
'tool.activate': {
|
|
5147
|
+
toolId: string;
|
|
5148
|
+
};
|
|
5149
|
+
}
|
|
5150
|
+
}
|
|
5151
|
+
|
|
5152
|
+
/**
|
|
5153
|
+
* Project an action's keyboard bindings into the shape a shortcut chip
|
|
5154
|
+
* renders from (`formatShortcut` / `formatShortcutParts` in `@weasel-js/ui`).
|
|
5155
|
+
*/
|
|
5156
|
+
|
|
5157
|
+
/** One keyboard shortcut, flattened for display. Structurally the
|
|
5158
|
+
* `ShortcutInput` weasel-ui formats — kept local so core doesn't depend on
|
|
5159
|
+
* the UI package. */
|
|
5160
|
+
interface ActionShortcut {
|
|
5161
|
+
key: string;
|
|
5162
|
+
mod: boolean;
|
|
5163
|
+
alt: boolean;
|
|
5164
|
+
shift: boolean;
|
|
5165
|
+
}
|
|
5166
|
+
/**
|
|
5167
|
+
* The chip form of a single gesture spec, or `undefined` when the spec has
|
|
5168
|
+
* none.
|
|
5169
|
+
*
|
|
5170
|
+
* - A spec's `key` may list spellings of one keycap (`['[', '{']` — the
|
|
5171
|
+
* shifted bracket reports as `'{'`). The first is the shortcut's name.
|
|
5172
|
+
* - A modifier declared `'optional'` matches held or unheld, so it isn't
|
|
5173
|
+
* part of what the user has to press.
|
|
5174
|
+
*
|
|
5175
|
+
* Non-keyboard specs (drag, wheel, click) have no chip form. Neither does a
|
|
5176
|
+
* *required* `ctrl` or `meta`: the display shape carries only `mod`.
|
|
5177
|
+
*/
|
|
5178
|
+
declare function keySpecShortcut(spec: GestureSpec): ActionShortcut | undefined;
|
|
5179
|
+
/**
|
|
5180
|
+
* Every keyboard shortcut an action answers to, in declaration order.
|
|
5181
|
+
* Specs `keySpecShortcut` has no chip for are skipped, and bindings it leaves
|
|
5182
|
+
* identical are emitted once; an action bound only to those returns empty.
|
|
5183
|
+
*
|
|
5184
|
+
* With `params` — an `ActionItem`'s — only the bindings that pass those same
|
|
5185
|
+
* values count, so each variant of `flip` gets its own key.
|
|
5186
|
+
*/
|
|
5187
|
+
declare function actionShortcuts(action: Action, params?: Readonly<Record<string, unknown>>): readonly ActionShortcut[];
|
|
5188
|
+
|
|
4874
5189
|
/** A screen-pixel tolerance in world units, per axis, through the camera of
|
|
4875
5190
|
* the view the gesture landed in. With no view, one pixel is one unit. */
|
|
4876
5191
|
declare function screenTolerance(px: number, ctx: Pick<GestureContext<unknown>, 'view'>): {
|
|
@@ -4985,6 +5300,21 @@ declare const insertAction: Action & {
|
|
|
4985
5300
|
requires: string[];
|
|
4986
5301
|
};
|
|
4987
5302
|
|
|
5303
|
+
/**
|
|
5304
|
+
* @experimental
|
|
5305
|
+
* Companion to `insertAction`: while its key is held, dragging moves the
|
|
5306
|
+
* shape being drawn instead of resizing it; letting go resumes resizing from
|
|
5307
|
+
* where the shape now sits. No-op when no insert is in flight.
|
|
5308
|
+
*/
|
|
5309
|
+
declare const insertRepositionAction: Action;
|
|
5310
|
+
/**
|
|
5311
|
+
* The binding a shape-drawing tool adds so holding Space mid-draw repositions
|
|
5312
|
+
* the shape. Gated to the tool's own engaged phase, so Space between drags is
|
|
5313
|
+
* left to the offhand hand tool. Shift and Alt may be down with it, so a
|
|
5314
|
+
* constrained or from-center draw can be moved without letting go of them.
|
|
5315
|
+
*/
|
|
5316
|
+
declare const INSERT_REPOSITION_BINDING: GestureBinding;
|
|
5317
|
+
|
|
4988
5318
|
/**
|
|
4989
5319
|
* @experimental
|
|
4990
5320
|
* Clears the selection on a click on empty canvas. It has no ambient
|
|
@@ -5103,6 +5433,9 @@ interface ViewportZoomOptions {
|
|
|
5103
5433
|
min?: number;
|
|
5104
5434
|
/** Upper clamp on the resulting view scale, forwarded to `zoomAt`. Default 8. */
|
|
5105
5435
|
max?: number;
|
|
5436
|
+
/** Hold wheel, trackpad-pinch, and key zoom to one axis; the other keeps its
|
|
5437
|
+
* scale and its translation. Default `'both'`. Cmd+0 still resets both. */
|
|
5438
|
+
axis?: ZoomAxis;
|
|
5106
5439
|
/**
|
|
5107
5440
|
* Glide the discrete steps (Cmd+=, Cmd+-, Cmd+0) instead of jumping.
|
|
5108
5441
|
* `true` uses the kit defaults; an object tunes them. Wheel and pinch never
|
|
@@ -5161,7 +5494,11 @@ declare function makeViewportWheelPanAction(opts?: WheelPanOptions): Action & {
|
|
|
5161
5494
|
* - **Drag** then moves whatever the press left selected — one anchor,
|
|
5162
5495
|
* or every selected anchor together.
|
|
5163
5496
|
* - **Dragging a control handle** moves just that handle, mirroring the
|
|
5164
|
-
* opposite one while the anchor is smooth. Alt breaks the mirror
|
|
5497
|
+
* opposite one while the anchor is smooth. Alt breaks the mirror; Shift
|
|
5498
|
+
* holds the handle to the angle it had at the press, changing only its
|
|
5499
|
+
* length.
|
|
5500
|
+
* - **Under a `pathSymmetry` dep**, on a path that is its own image under
|
|
5501
|
+
* some of its transforms, every image of what is dragged follows it.
|
|
5165
5502
|
*
|
|
5166
5503
|
* Selection lives on the `editAnchors` dep (flat anchor indices) rather
|
|
5167
5504
|
* than in this handle's scratch, because the keyboard actions
|
|
@@ -5231,6 +5568,9 @@ interface PinchZoomOptions {
|
|
|
5231
5568
|
min?: number;
|
|
5232
5569
|
/** Upper clamp on the resulting view scale, forwarded to `zoomAt`. Default 8. */
|
|
5233
5570
|
max?: number;
|
|
5571
|
+
/** Hold the zoom to one axis. Default `'both'`. The two fingers still pan
|
|
5572
|
+
* on both. */
|
|
5573
|
+
axis?: ZoomAxis;
|
|
5234
5574
|
}
|
|
5235
5575
|
/**
|
|
5236
5576
|
* @experimental
|
|
@@ -5470,8 +5810,8 @@ declare function useKeybindings(tools: ToolsApi, options?: UseKeybindingsOptions
|
|
|
5470
5810
|
interface UseSelectToolOptions<TPose> {
|
|
5471
5811
|
/** Return ids of all objects whose painted body covers (worldX, worldY).
|
|
5472
5812
|
* Order doesn't matter — the tool collapses parent/child overlap via
|
|
5473
|
-
* `pickTopMostHit`. When omitted, defaults to an AABB-vs-point
|
|
5474
|
-
*
|
|
5813
|
+
* `pickTopMostHit`. When omitted, defaults to an AABB-vs-point walk of
|
|
5814
|
+
* the adapter's tree using the pose descriptor. Override for tighter
|
|
5475
5815
|
* shapes (path / polygon hit-tests). */
|
|
5476
5816
|
pickEvery?: (worldX: number, worldY: number) => string[];
|
|
5477
5817
|
/** Optional alt-aware selection-update hit returning the single id the
|
|
@@ -5647,9 +5987,10 @@ declare const onEmptyCanvas: _weasel_js_gestures.TargetPredicate & {
|
|
|
5647
5987
|
* tool adds this to its ambient list. */
|
|
5648
5988
|
declare function areaSelectContribution(): Contribution;
|
|
5649
5989
|
|
|
5650
|
-
/**
|
|
5990
|
+
/** What `pickTopMostHit` ranks a hit list by: the tree, and a z signal where
|
|
5991
|
+
* the adapter has one. */
|
|
5651
5992
|
interface PickTopMostHitAdapter {
|
|
5652
|
-
getParent
|
|
5993
|
+
getParent: (id: string) => string | null;
|
|
5653
5994
|
/** Paint depth of `id`; higher draws later, so higher wins a hit. Ids the
|
|
5654
5995
|
* adapter doesn't know sort below every id it does. */
|
|
5655
5996
|
getZIndex?: (id: string) => number | null | undefined;
|
|
@@ -5665,7 +6006,7 @@ interface PickTopMostHitAdapter {
|
|
|
5665
6006
|
* With no z signal the LAST id wins: scenes walked forward come back
|
|
5666
6007
|
* bottom-first by convention. A caller that z-sorts topmost-first and exposes
|
|
5667
6008
|
* neither z hook should resolve before calling. */
|
|
5668
|
-
declare function pickTopMostHit(ids: readonly string[], adapter: PickTopMostHitAdapter
|
|
6009
|
+
declare function pickTopMostHit(ids: readonly string[], adapter: PickTopMostHitAdapter): string | null;
|
|
5669
6010
|
|
|
5670
6011
|
/** Options for `useHandTool`. Both are forwarded to `viewport.dragPan` as
|
|
5671
6012
|
* binding params; momentum additionally needs a `view` dep publishing
|
|
@@ -5843,8 +6184,8 @@ declare namespace useTextTool {
|
|
|
5843
6184
|
description: string;
|
|
5844
6185
|
step: number;
|
|
5845
6186
|
unit: {
|
|
5846
|
-
|
|
5847
|
-
|
|
6187
|
+
scale: number;
|
|
6188
|
+
precision: number;
|
|
5848
6189
|
suffix: string;
|
|
5849
6190
|
};
|
|
5850
6191
|
default: number;
|
|
@@ -5856,8 +6197,8 @@ declare namespace useTextTool {
|
|
|
5856
6197
|
min: number;
|
|
5857
6198
|
step: number;
|
|
5858
6199
|
unit: {
|
|
5859
|
-
|
|
5860
|
-
|
|
6200
|
+
scale: number;
|
|
6201
|
+
precision: number;
|
|
5861
6202
|
suffix: string;
|
|
5862
6203
|
};
|
|
5863
6204
|
default: number;
|
|
@@ -6055,8 +6396,10 @@ interface UseRigNodeOptions<TPose> extends Pick<BindRigOptions<TPose>, 'apply' |
|
|
|
6055
6396
|
* rig node or a node under it changes its pose or data, or when nodes under it come or go; an
|
|
6056
6397
|
* edit elsewhere in the scene leaves it alone. A rig bound again keeps its `target`, with the
|
|
6057
6398
|
* animations running on it, its committed pose, and its placement, unless the skeleton's
|
|
6058
|
-
* joints were added, removed, renamed, or reordered
|
|
6059
|
-
*
|
|
6399
|
+
* joints were added, removed, renamed, or reordered. Then it has a new `target`, which takes
|
|
6400
|
+
* over the placement and the pose of every joint the skeleton still names. Animations go on
|
|
6401
|
+
* running on the target they were started on and show through the new one, so a joint that
|
|
6402
|
+
* was renamed stops moving.
|
|
6060
6403
|
*/
|
|
6061
6404
|
declare function useRigNode<TPose>(options: UseRigNodeOptions<TPose>): Rig;
|
|
6062
6405
|
|
|
@@ -6925,7 +7268,10 @@ interface SceneSlotConfig<TNode extends {
|
|
|
6925
7268
|
/** Paint these, in this order, in place of the adapter's tree: one flat run with no
|
|
6926
7269
|
* scene layers, no container clips, and no pose composition. */
|
|
6927
7270
|
objects?: TNode[];
|
|
6928
|
-
/**
|
|
7271
|
+
/** The pose an object is painted at. Defaults to `adapter.getPose(obj.id)`. `<SceneCanvas>`
|
|
7272
|
+
* hands it each node as the scene shows it, its `pose` an override's or a derived one,
|
|
7273
|
+
* and carries an override's `path` into the box it answers; return a pose placed from
|
|
7274
|
+
* `obj.pose`, or a drag in flight and a rig's motion do not show in this view. */
|
|
6929
7275
|
toPose?: (obj: TNode) => TPose;
|
|
6930
7276
|
/** Draw a single object as a `DrawCommand` tree. `ctx` carries a derived
|
|
6931
7277
|
* node's path: `<SceneCanvas>` resolves it from the scene, and
|
|
@@ -7660,102 +8006,6 @@ type InsertPaint = (kind: string, seq: number) => {
|
|
|
7660
8006
|
* alone on a line or a pencil trail. */
|
|
7661
8007
|
declare const paletteInsertPaint: InsertPaint;
|
|
7662
8008
|
|
|
7663
|
-
/** Minimal selection contract `sceneToAdapter` needs to wire `getSelection` /
|
|
7664
|
-
* `setSelection`. Matches `useSelection().adapterMethods` plus an imperative
|
|
7665
|
-
* read; pass `useSelection()` itself or `selection.adapterMethods`. */
|
|
7666
|
-
interface SceneAdapterSelection {
|
|
7667
|
-
get?(): string[];
|
|
7668
|
-
set?(ids: string[]): void;
|
|
7669
|
-
getSelection?(): string[];
|
|
7670
|
-
setSelection?(ids: string[]): void;
|
|
7671
|
-
}
|
|
7672
|
-
/** Sibling z-order surface used by reorder ops. Inlined here (rather than
|
|
7673
|
-
* pulled from `core/ops/reorder` to avoid import cycles); the `null` parent
|
|
7674
|
-
* channel addresses the root sibling list. */
|
|
7675
|
-
/** @internal */
|
|
7676
|
-
interface ReorderAdapter {
|
|
7677
|
-
getChildren(parentId: string | null): string[];
|
|
7678
|
-
setChildOrder(parentId: string | null, ids: string[]): void;
|
|
7679
|
-
}
|
|
7680
|
-
/** Everything the interaction layer can ask of a scene, as one type: the
|
|
7681
|
-
* move, resize, rotate, selection, layer and reorder contracts combined.
|
|
7682
|
-
* `<SceneCanvas>` synthesizes one of these, which is why most consumers never
|
|
7683
|
-
* touch an adapter directly. */
|
|
7684
|
-
type SceneCanvasAdapter<TData, TLayer extends string, TPose> = MoveAdapter<Node<TData, TLayer, TPose>, TPose> & ResizeAdapter<Node<TData, TLayer, TPose>, TPose> & RotateAdapter<Node<TData, TLayer, TPose>, TPose> & AreaSelectAdapter & LassoSelectAdapter & LayerEnumerableAdapter<TLayer> & ReorderAdapter & Partial<InsertAdapter<Node<TData, TLayer, TPose>>> & {
|
|
7685
|
-
getParent(id: string): string | null;
|
|
7686
|
-
getLayers: NonNullable<LayerEnumerableAdapter<TLayer>['getLayers']>;
|
|
7687
|
-
/** The node's pose with every ancestor's frame folded in. Equal to
|
|
7688
|
-
* `getPose` unless the scene composes poses. */
|
|
7689
|
-
getWorldPose(id: string): TPose;
|
|
7690
|
-
/** Whether `id`'s pose is a frame its children are expressed in — see
|
|
7691
|
-
* `definesFrame`. */
|
|
7692
|
-
definesFrame(id: string): boolean;
|
|
7693
|
-
/** Present only when a composing strategy is configured; the render
|
|
7694
|
-
* walk feature-detects it. */
|
|
7695
|
-
composePose?(parent: TPose, child: TPose): TPose;
|
|
7696
|
-
getSelection(): string[];
|
|
7697
|
-
setSelection(ids: string[]): void;
|
|
7698
|
-
insertNode(node: Node<TData, TLayer, TPose>, index?: number): void;
|
|
7699
|
-
removeNode(id: string): void;
|
|
7700
|
-
/** Replace a node's `data` — what a `setData` op writes through. */
|
|
7701
|
-
setData(id: string, data: TData): void;
|
|
7702
|
-
/** Swap a container's layout — what a `setLayout` op writes through. */
|
|
7703
|
-
setLayout(id: string, layout: LayoutStrategy<TPose> | string | null): void;
|
|
7704
|
-
/** Move a node to another layer — what a `setLayer` op writes through. */
|
|
7705
|
-
setLayer(id: string, layer: TLayer): void;
|
|
7706
|
-
getRemovalClosure(ids: readonly string[]): string[];
|
|
7707
|
-
applyOps(ops: Op[], label?: string): void;
|
|
7708
|
-
snapshotSelection(ids: string[]): ClipboardSnapshot;
|
|
7709
|
-
commitPaste(clipboard: ClipboardSnapshot, offset: {
|
|
7710
|
-
dx: number;
|
|
7711
|
-
dy: number;
|
|
7712
|
-
}, ctx?: PasteCtx): Node<TData, TLayer, TPose>[];
|
|
7713
|
-
getPasteOffset(clipboard: ClipboardSnapshot): {
|
|
7714
|
-
dx: number;
|
|
7715
|
-
dy: number;
|
|
7716
|
-
};
|
|
7717
|
-
};
|
|
7718
|
-
/** Optional extras for the synthesized adapter. Pass `commitInsert` to wire
|
|
7719
|
-
* the insert gesture into a Scene-owned canvas; the returned object becomes
|
|
7720
|
-
* a leaf on the layer named by `layer` (default `'default'`). */
|
|
7721
|
-
interface SceneToAdapterOptions<TData, TLayer extends string, TPose> {
|
|
7722
|
-
/** Factory for new objects. Returning `null` aborts the insert. */
|
|
7723
|
-
commitInsert?: (bounds: Bounds) => {
|
|
7724
|
-
pose: TPose;
|
|
7725
|
-
data: TData;
|
|
7726
|
-
id?: string;
|
|
7727
|
-
} | null;
|
|
7728
|
-
/** Layer to place inserted nodes on. Defaults to the trivial-form layer. */
|
|
7729
|
-
insertLayer?: TLayer;
|
|
7730
|
-
/** Selection source: the result of `useSelection()` (or its
|
|
7731
|
-
* `adapterMethods`). When omitted, `getSelection` returns `[]` and
|
|
7732
|
-
* `setSelection` is a noop, so the marquee gesture updates nothing. */
|
|
7733
|
-
selection?: SceneAdapterSelection;
|
|
7734
|
-
/** How to read and rewrite this scene's poses. Default `AUTO_POSE_DESCRIPTOR`. */
|
|
7735
|
-
poseDescriptor?: PoseDescriptor<TPose>;
|
|
7736
|
-
/** Layout strategies keyed by container node id, for containers whose
|
|
7737
|
-
* scene node declares none (`ContainerNode.layout` wins). `move` runs its
|
|
7738
|
-
* layout-aware pass on them; for inserts, deletes and resizes to reach
|
|
7739
|
-
* them too, install them with `useLayoutArrivals`. Pass either a static
|
|
7740
|
-
* map, or a `getLayout(id)` function for dynamic resolution. */
|
|
7741
|
-
layouts?: Record<string, LayoutStrategy<TPose>> | ((containerId: string) => LayoutStrategy<TPose> | null);
|
|
7742
|
-
}
|
|
7743
|
-
/** Derive the adapter for a scene. Reads go straight to the scene; writes are
|
|
7744
|
-
* ops applied through its history, so anything done through the adapter is
|
|
7745
|
-
* undoable.
|
|
7746
|
-
*
|
|
7747
|
-
* Moving a container carries its contents either way the scene composes
|
|
7748
|
-
* poses. Under a frame (`scene.composition`) the one pose written moves them.
|
|
7749
|
-
* Under the absolute-pose model `setPose` on a container translates every
|
|
7750
|
-
* descendant by the same delta, and a batch that poses descendants too undoes
|
|
7751
|
-
* exactly only when it goes through this adapter's `applyOps`. */
|
|
7752
|
-
declare function sceneToAdapter<TData, TLayer extends string, TPose>(scene: Scene<TData, TLayer, TPose>, options?: SceneToAdapterOptions<TData, TLayer, TPose>): SceneCanvasAdapter<TData, TLayer, TPose>;
|
|
7753
|
-
/**
|
|
7754
|
-
* React-hook wrapper around `sceneToAdapter`. Memoizes on every option, so
|
|
7755
|
-
* the adapter keeps its identity across renders unless one of them changes.
|
|
7756
|
-
*/
|
|
7757
|
-
declare function useSceneAdapter<TData, TLayer extends string, TPose>(scene: Scene<TData, TLayer, TPose>, options?: SceneToAdapterOptions<TData, TLayer, TPose>): SceneCanvasAdapter<TData, TLayer, TPose>;
|
|
7758
|
-
|
|
7759
8009
|
/** A preset that names one behavior and abbreviates nothing. */
|
|
7760
8010
|
type BaseFeature = 'view' | 'select' | 'outline' | 'move' | 'resize' | 'rotate' | 'edit' | 'arrange' | 'paths' | 'ingest';
|
|
7761
8011
|
/** A preset that abbreviates others: `pick` is `select` + `outline`,
|
|
@@ -7810,6 +8060,45 @@ interface BuiltinToolOptions {
|
|
|
7810
8060
|
* meet: warn in development (the default), throw, or not check. */
|
|
7811
8061
|
type VersionCheck = 'warn' | 'strict' | 'off';
|
|
7812
8062
|
|
|
8063
|
+
/** `<SceneCanvas viewport>`: configures the `view` preset, and implies
|
|
8064
|
+
* it: passing this turns `view` on.
|
|
8065
|
+
*
|
|
8066
|
+
* - `inertia` and `animatedZoom` are opt-in: pass `true` for defaults or
|
|
8067
|
+
* an object to tune. Omitted means off.
|
|
8068
|
+
* - `pan` (wheel pan), `zoom` (Cmd+wheel + Cmd+=/-/0), and `pinchZoom`
|
|
8069
|
+
* (two-finger pinch) are on under `view`; pass `false` to disable one.
|
|
8070
|
+
* Disabling via the `actions` prop
|
|
8071
|
+
* (`actions: { 'viewport.wheelPan': null }`) also works and runs after
|
|
8072
|
+
* this. */
|
|
8073
|
+
interface SceneCanvasViewport {
|
|
8074
|
+
inertia?: boolean | InertiaConfig;
|
|
8075
|
+
/** Two-finger pinch zoom. `true`/omitted = on with the kit's 0.1–8
|
|
8076
|
+
* clamp; `false` disables. An object sets the scale clamp and holds the
|
|
8077
|
+
* zoom to one axis (`axis`). */
|
|
8078
|
+
pinchZoom?: boolean | PinchZoomOptions;
|
|
8079
|
+
/** Glide Cmd+=/-/0 instead of jumping. `true` uses the kit defaults
|
|
8080
|
+
* (250 ms, ease-out-cubic); a {@link ViewportZoomAnimateOptions} tunes
|
|
8081
|
+
* duration, easing, interpolator and the reset-branch duration. Wheel
|
|
8082
|
+
* and pinch are unaffected — their input already samples every frame. */
|
|
8083
|
+
animatedZoom?: boolean | ViewportZoomAnimateOptions;
|
|
8084
|
+
/** Wheel pan. `true`/omitted = on; `false` disables; an object locks the
|
|
8085
|
+
* axis (`{ axis: 'x' }`) so a single-axis viewport needs no commit clamp. */
|
|
8086
|
+
pan?: boolean | WheelPanOptions;
|
|
8087
|
+
/** Wheel/keyboard zoom. `true`/omitted = default Cmd+wheel zoom with the
|
|
8088
|
+
* kit's 0.1–8 clamp; `false` disables. Pass a {@link ViewportZoomOptions}
|
|
8089
|
+
* object to bind zoom to plain wheel (`wheel: 'plain'`, pair with
|
|
8090
|
+
* `pan: false`), set `min`/`max` scale clamps, or hold the zoom to one
|
|
8091
|
+
* axis (`axis: 'x'`). */
|
|
8092
|
+
zoom?: boolean | ViewportZoomOptions;
|
|
8093
|
+
/** Callback invoked by Cmd-0 (`viewport.zoom` action's `reset` branch).
|
|
8094
|
+
* When supplied, replaces the default reset-to-identity behavior —
|
|
8095
|
+
* consumers typically refit the document page into the workspace via
|
|
8096
|
+
* `fitViewToBounds`. Return the target `View` to let the kit animate
|
|
8097
|
+
* there when `animatedZoom` is on; return nothing to dispatch it
|
|
8098
|
+
* yourself, which is what a controlled canvas does. */
|
|
8099
|
+
recenter?: () => View | void;
|
|
8100
|
+
}
|
|
8101
|
+
|
|
7813
8102
|
/** Default size in CSS pixels for selection corner-handles AND their
|
|
7814
8103
|
* hit-test radius, at `targetScale = 1`. Deliberately unscaled; kit-internal
|
|
7815
8104
|
* use sites multiply by `DeviceProfile.targetScale`. */
|
|
@@ -7872,11 +8161,6 @@ type SceneCanvasProps<TData, TLayer extends string, TPose> = Omit<CanvasProps<TP
|
|
|
7872
8161
|
* spread over that slot's defaults; pass `slot: null` to suppress a
|
|
7873
8162
|
* default explicitly. */
|
|
7874
8163
|
layers?: SceneCanvasLayers<Node<TData, TLayer, TPose>, TPose>;
|
|
7875
|
-
/** Layout strategies keyed by container node id (or a resolver), for
|
|
7876
|
-
* containers whose scene node declares none (`ContainerNode.layout`
|
|
7877
|
-
* wins). Applied to a drag and to every other change to their children,
|
|
7878
|
-
* through the scene's layout pass. */
|
|
7879
|
-
layouts?: SceneToAdapterOptions<TData, TLayer, TPose>['layouts'];
|
|
7880
8164
|
/** Which layout container a drag lands in when several contain the drop
|
|
7881
8165
|
* point — the innermost (default), the topmost in paint order, or only
|
|
7882
8166
|
* containers whose strategy declares a `dropRegion`. Decides both the
|
|
@@ -8124,46 +8408,20 @@ type SceneCanvasProps<TData, TLayer extends string, TPose> = Omit<CanvasProps<TP
|
|
|
8124
8408
|
/** Touch and pen long-press: its hold time, its haptic, and the
|
|
8125
8409
|
* feedback shown while it is held. */
|
|
8126
8410
|
longPress?: SceneCanvasLongPress;
|
|
8127
|
-
/** Configures the `view` preset, and implies it
|
|
8128
|
-
|
|
8129
|
-
|
|
8130
|
-
*
|
|
8131
|
-
*
|
|
8132
|
-
*
|
|
8133
|
-
*
|
|
8134
|
-
*
|
|
8135
|
-
|
|
8136
|
-
|
|
8137
|
-
viewport?: {
|
|
8138
|
-
inertia?: boolean | InertiaConfig;
|
|
8139
|
-
/** Two-finger pinch zoom. `true`/omitted = on with the kit's 0.1–8
|
|
8140
|
-
* clamp; `false` disables. An object sets the scale clamp. */
|
|
8141
|
-
pinchZoom?: boolean | PinchZoomOptions;
|
|
8142
|
-
/** Glide Cmd+=/-/0 instead of jumping. `true` uses the kit defaults
|
|
8143
|
-
* (250 ms, ease-out-cubic); a {@link ViewportZoomAnimateOptions} tunes
|
|
8144
|
-
* duration, easing, interpolator and the reset-branch duration. Wheel
|
|
8145
|
-
* and pinch are unaffected — their input already samples every frame. */
|
|
8146
|
-
animatedZoom?: boolean | ViewportZoomAnimateOptions;
|
|
8147
|
-
/** Wheel pan. `true`/omitted = on; `false` disables; an object locks the
|
|
8148
|
-
* axis (`{ axis: 'x' }`) so a single-axis viewport needs no commit clamp. */
|
|
8149
|
-
pan?: boolean | WheelPanOptions;
|
|
8150
|
-
/** Wheel/keyboard zoom. `true`/omitted = default Cmd+wheel zoom with the
|
|
8151
|
-
* kit's 0.1–8 clamp; `false` disables. Pass a {@link ViewportZoomOptions}
|
|
8152
|
-
* object to bind zoom to plain wheel (`wheel: 'plain'`, pair with
|
|
8153
|
-
* `pan: false`) and/or set `min`/`max` scale clamps. */
|
|
8154
|
-
zoom?: boolean | ViewportZoomOptions;
|
|
8155
|
-
/** Callback invoked by Cmd-0 (`viewport.zoom` action's `reset` branch).
|
|
8156
|
-
* When supplied, replaces the default reset-to-identity behavior —
|
|
8157
|
-
* consumers typically refit the document page into the workspace via
|
|
8158
|
-
* `fitViewToBounds`. Return the target `View` to let the kit animate
|
|
8159
|
-
* there when `animatedZoom` is on; return nothing to dispatch it
|
|
8160
|
-
* yourself, which is what a controlled canvas does. */
|
|
8161
|
-
recenter?: () => View | void;
|
|
8162
|
-
};
|
|
8411
|
+
/** Configures the `view` preset, and implies it. See {@link SceneCanvasViewport}. */
|
|
8412
|
+
viewport?: SceneCanvasViewport;
|
|
8413
|
+
/**
|
|
8414
|
+
* Tune actions on this canvas without restating them, keyed by action id:
|
|
8415
|
+
* `params` every invocation starts from, and `bindings` added beside the
|
|
8416
|
+
* action's own. A tuning applies to whichever descriptor holds the id, a
|
|
8417
|
+
* preset's or a tool's. Pass a stable object; a params thunk is read on
|
|
8418
|
+
* every call. See the core README ("Tuning an action").
|
|
8419
|
+
*/
|
|
8420
|
+
tune?: ActionTunings;
|
|
8163
8421
|
/**
|
|
8164
8422
|
* @experimental
|
|
8165
|
-
*
|
|
8166
|
-
* defaults.
|
|
8423
|
+
* Replace, add or mute whole action descriptors. Pass `null` to disable
|
|
8424
|
+
* all defaults. To change a built-in's params or add a key, use `tune`.
|
|
8167
8425
|
*/
|
|
8168
8426
|
actions?: ActionsProp;
|
|
8169
8427
|
/**
|
|
@@ -8319,7 +8577,7 @@ type SceneCanvasProps<TData, TLayer extends string, TPose> = Omit<CanvasProps<TP
|
|
|
8319
8577
|
|
|
8320
8578
|
/** Paint one node the way the kit does by default: dispatch to the first
|
|
8321
8579
|
* registered node-shape painter that matches, then draw its `data.label` on
|
|
8322
|
-
* top when it has one. Consumers replace or wrap this via `drawOne`. */
|
|
8580
|
+
* top when it has one: on top of a container's children too. Consumers replace or wrap this via `drawOne`. */
|
|
8323
8581
|
declare function defaultDrawOne<TData, TLayer extends string, TPose>(node: Node<TData, TLayer, TPose>, pose: TPose, view?: View, ctx?: NodePaintCtx): DrawCommand[];
|
|
8324
8582
|
/**
|
|
8325
8583
|
* The box {@link defaultDrawOne}'s output for `node` fits in — the matched
|
|
@@ -8358,6 +8616,28 @@ declare const SceneCanvas: <TData, TLayer extends string, TPose>(props: SceneCan
|
|
|
8358
8616
|
ref?: react__default.Ref<SceneCanvasApi>;
|
|
8359
8617
|
}) => ReturnType<typeof SceneCanvasInner>;
|
|
8360
8618
|
|
|
8619
|
+
/**
|
|
8620
|
+
* How a painter asks for part of a node's paint to land on top of the node's
|
|
8621
|
+
* children: a container's label, a frame's title, a badge. A scene walk draws
|
|
8622
|
+
* a node before its children, so anything else a container paints is covered
|
|
8623
|
+
* by them.
|
|
8624
|
+
*/
|
|
8625
|
+
|
|
8626
|
+
/**
|
|
8627
|
+
* `cmds` as one command a scene walk paints after the node's children. Return
|
|
8628
|
+
* it among a `drawOne`'s other commands. Outside a scene walk it is an
|
|
8629
|
+
* ordinary group, painted where it sits in the list.
|
|
8630
|
+
*/
|
|
8631
|
+
declare function overChildren(cmds: DrawCommand[]): DrawCommand;
|
|
8632
|
+
/** Whether `cmd` came from {@link overChildren}. */
|
|
8633
|
+
declare function isOverChildren(cmd: DrawCommand): boolean;
|
|
8634
|
+
/** `cmds` as what paints under the node's children and what paints over them.
|
|
8635
|
+
* A list asking for nothing over comes back as `under` itself. */
|
|
8636
|
+
declare function splitOverChildren(cmds: DrawCommand[]): {
|
|
8637
|
+
under: DrawCommand[];
|
|
8638
|
+
over: DrawCommand[];
|
|
8639
|
+
};
|
|
8640
|
+
|
|
8361
8641
|
/** Which of the host's edges the panel is held against, per axis. */
|
|
8362
8642
|
interface HostAnchorAlign {
|
|
8363
8643
|
x: PlacementAlign;
|
|
@@ -8488,6 +8768,103 @@ interface PickHudProps {
|
|
|
8488
8768
|
* would actually select shown in bold. */
|
|
8489
8769
|
declare function PickHud({ canvasRef, anchorRef, viewRef, toWorld, pickEvery, pickBest, offset }: PickHudProps): react.JSX.Element | null;
|
|
8490
8770
|
|
|
8771
|
+
/**
|
|
8772
|
+
* Synthesize a `<Canvas>`-compatible adapter from a `Scene` primitive.
|
|
8773
|
+
* `getPose` / `setPose` return / write **local** coordinates (relative to
|
|
8774
|
+
* parent); world composition is the renderer's job via `composeWorldPose`.
|
|
8775
|
+
*/
|
|
8776
|
+
|
|
8777
|
+
/** Minimal selection contract `sceneToAdapter` needs to wire `getSelection` /
|
|
8778
|
+
* `setSelection`. Matches `useSelection().adapterMethods` plus an imperative
|
|
8779
|
+
* read; pass `useSelection()` itself or `selection.adapterMethods`. */
|
|
8780
|
+
interface SceneAdapterSelection {
|
|
8781
|
+
get?(): string[];
|
|
8782
|
+
set?(ids: string[]): void;
|
|
8783
|
+
getSelection?(): string[];
|
|
8784
|
+
setSelection?(ids: string[]): void;
|
|
8785
|
+
}
|
|
8786
|
+
/** Sibling z-order surface used by reorder ops. Inlined here (rather than
|
|
8787
|
+
* pulled from `core/ops/reorder` to avoid import cycles); the `null` parent
|
|
8788
|
+
* channel addresses the root sibling list. */
|
|
8789
|
+
/** @internal */
|
|
8790
|
+
interface ReorderAdapter {
|
|
8791
|
+
getChildren(parentId: string | null): string[];
|
|
8792
|
+
setChildOrder(parentId: string | null, ids: string[]): void;
|
|
8793
|
+
}
|
|
8794
|
+
/** Everything the interaction layer can ask of a scene, as one type: the
|
|
8795
|
+
* move, resize, rotate, selection, layer and reorder contracts combined.
|
|
8796
|
+
* `<SceneCanvas>` synthesizes one of these, which is why most consumers never
|
|
8797
|
+
* touch an adapter directly. */
|
|
8798
|
+
type SceneCanvasAdapter<TData, TLayer extends string, TPose> = MoveAdapter<Node<TData, TLayer, TPose>, TPose> & ResizeAdapter<Node<TData, TLayer, TPose>, TPose> & RotateAdapter<Node<TData, TLayer, TPose>, TPose> & AreaSelectAdapter & LassoSelectAdapter & LayerEnumerableAdapter<TLayer> & ReorderAdapter & Partial<InsertAdapter<Node<TData, TLayer, TPose>>> & {
|
|
8799
|
+
getParent(id: string): string | null;
|
|
8800
|
+
getLayers: NonNullable<LayerEnumerableAdapter<TLayer>['getLayers']>;
|
|
8801
|
+
/** The node's pose with every ancestor's frame folded in. Equal to
|
|
8802
|
+
* `getPose` unless the scene composes poses. */
|
|
8803
|
+
getWorldPose(id: string): TPose;
|
|
8804
|
+
/** Whether `id`'s pose is a frame its children are expressed in — see
|
|
8805
|
+
* `definesFrame`. */
|
|
8806
|
+
definesFrame(id: string): boolean;
|
|
8807
|
+
/** Present only when a composing strategy is configured; the render
|
|
8808
|
+
* walk feature-detects it. */
|
|
8809
|
+
composePose?(parent: TPose, child: TPose): TPose;
|
|
8810
|
+
getSelection(): string[];
|
|
8811
|
+
setSelection(ids: string[]): void;
|
|
8812
|
+
insertNode(node: Node<TData, TLayer, TPose>, index?: number): void;
|
|
8813
|
+
removeNode(id: string): void;
|
|
8814
|
+
/** Replace a node's `data` — what a `setData` op writes through. */
|
|
8815
|
+
setData(id: string, data: TData): void;
|
|
8816
|
+
/** Swap a container's layout — what a `setLayout` op writes through. */
|
|
8817
|
+
setLayout(id: string, layout: LayoutStrategy<TPose> | string | null): void;
|
|
8818
|
+
/** Move a node to another layer — what a `setLayer` op writes through. */
|
|
8819
|
+
setLayer(id: string, layer: TLayer): void;
|
|
8820
|
+
getRemovalClosure(ids: readonly string[]): string[];
|
|
8821
|
+
applyOps(ops: Op[], label?: string): void;
|
|
8822
|
+
snapshotSelection(ids: string[]): ClipboardSnapshot;
|
|
8823
|
+
commitPaste(clipboard: ClipboardSnapshot, offset: {
|
|
8824
|
+
dx: number;
|
|
8825
|
+
dy: number;
|
|
8826
|
+
}, ctx?: PasteCtx): Node<TData, TLayer, TPose>[];
|
|
8827
|
+
getPasteOffset(clipboard: ClipboardSnapshot): {
|
|
8828
|
+
dx: number;
|
|
8829
|
+
dy: number;
|
|
8830
|
+
};
|
|
8831
|
+
};
|
|
8832
|
+
/** Optional extras for the synthesized adapter. Pass `commitInsert` to wire
|
|
8833
|
+
* the insert gesture into a Scene-owned canvas; the returned object becomes
|
|
8834
|
+
* a leaf on the layer named by `layer` (default `'default'`). */
|
|
8835
|
+
interface SceneToAdapterOptions<TData, TLayer extends string, TPose> {
|
|
8836
|
+
/** Factory for new objects. Returning `null` aborts the insert. */
|
|
8837
|
+
commitInsert?: (bounds: Bounds) => {
|
|
8838
|
+
pose: TPose;
|
|
8839
|
+
data: TData;
|
|
8840
|
+
id?: string;
|
|
8841
|
+
} | null;
|
|
8842
|
+
/** Layer to place inserted nodes on. Defaults to the trivial-form layer. */
|
|
8843
|
+
insertLayer?: TLayer;
|
|
8844
|
+
/** Selection source: the result of `useSelection()` (or its
|
|
8845
|
+
* `adapterMethods`). When omitted, `getSelection` returns `[]` and
|
|
8846
|
+
* `setSelection` is a noop, so the marquee gesture updates nothing. */
|
|
8847
|
+
selection?: SceneAdapterSelection;
|
|
8848
|
+
/** How to read and rewrite this scene's poses. Default `AUTO_POSE_DESCRIPTOR`. */
|
|
8849
|
+
poseDescriptor?: PoseDescriptor<TPose>;
|
|
8850
|
+
}
|
|
8851
|
+
/** Derive the adapter for a scene. Reads go straight to the scene; writes are
|
|
8852
|
+
* ops applied through its history, so anything done through the adapter is
|
|
8853
|
+
* undoable.
|
|
8854
|
+
*
|
|
8855
|
+
* Moving a container carries its contents either way the scene composes
|
|
8856
|
+
* poses. Under a frame (`scene.composition`) the one pose written moves them.
|
|
8857
|
+
* Under the absolute-pose model `setPose` on a container translates every
|
|
8858
|
+
* descendant by the same delta, and a batch that poses descendants too undoes
|
|
8859
|
+
* exactly only when it goes through this adapter's `applyOps`. */
|
|
8860
|
+
declare function sceneToAdapter<TData, TLayer extends string, TPose>(scene: Scene<TData, TLayer, TPose>, options?: SceneToAdapterOptions<TData, TLayer, TPose>): SceneCanvasAdapter<TData, TLayer, TPose>;
|
|
8861
|
+
|
|
8862
|
+
/**
|
|
8863
|
+
* React-hook wrapper around `sceneToAdapter`. Memoizes on every option, so
|
|
8864
|
+
* the adapter keeps its identity across renders unless one of them changes.
|
|
8865
|
+
*/
|
|
8866
|
+
declare function useSceneAdapter<TData, TLayer extends string, TPose>(scene: Scene<TData, TLayer, TPose>, options?: SceneToAdapterOptions<TData, TLayer, TPose>): SceneCanvasAdapter<TData, TLayer, TPose>;
|
|
8867
|
+
|
|
8491
8868
|
/**
|
|
8492
8869
|
* Routing classifiers for the kit's built-in shape kinds
|
|
8493
8870
|
* (`KIT_SHAPE_KINDS`): each entry matches `data.kind === '<name>'`. Routing
|
|
@@ -8527,6 +8904,21 @@ interface NodePropertiesEntry {
|
|
|
8527
8904
|
name: string;
|
|
8528
8905
|
/** Property schema for this kind. */
|
|
8529
8906
|
schema: PrefSection;
|
|
8907
|
+
/**
|
|
8908
|
+
* What a property write stores, given the node as the write left it and as
|
|
8909
|
+
* it was: lets a kind keep fields derived from the one written in step
|
|
8910
|
+
* with it, in the same undo step. Unset, the write is stored as made.
|
|
8911
|
+
*/
|
|
8912
|
+
settle?(next: {
|
|
8913
|
+
pose: unknown;
|
|
8914
|
+
data: unknown;
|
|
8915
|
+
}, prev: {
|
|
8916
|
+
pose: unknown;
|
|
8917
|
+
data: unknown;
|
|
8918
|
+
}): {
|
|
8919
|
+
pose: unknown;
|
|
8920
|
+
data: unknown;
|
|
8921
|
+
};
|
|
8530
8922
|
}
|
|
8531
8923
|
/**
|
|
8532
8924
|
* The **properties trait's** registry. Each trait of a node (shape, routing,
|
|
@@ -8731,6 +9123,8 @@ type ResolvedOverlay = {
|
|
|
8731
9123
|
/** The drag's anchor — a growth axis to mark. Absent for a pencil, which
|
|
8732
9124
|
* has none. */
|
|
8733
9125
|
anchorPoint?: Point;
|
|
9126
|
+
/** World affines the shape will also be drawn under, as the action gave them. */
|
|
9127
|
+
copies?: readonly (readonly [number, number, number, number, number, number])[];
|
|
8734
9128
|
/** The action's per-shape payload, verbatim. Carries what geometry
|
|
8735
9129
|
* cannot: an image insert's `src`, say. */
|
|
8736
9130
|
extras: unknown;
|
|
@@ -8803,8 +9197,7 @@ declare function modeDecorationLayer(decorations: ModeDecorations, opts?: {
|
|
|
8803
9197
|
|
|
8804
9198
|
/**
|
|
8805
9199
|
* Z-ordered child renderer: a `RenderLayer` factory over an `OrderedAdapter`.
|
|
8806
|
-
* Children are drawn in z-order (index 0 = bottom).
|
|
8807
|
-
* implement `getChildren`, the layer is a silent no-op.
|
|
9200
|
+
* Children are drawn in z-order (index 0 = bottom).
|
|
8808
9201
|
*/
|
|
8809
9202
|
|
|
8810
9203
|
/** Options for `createChildrenLayer`. */
|
|
@@ -8888,32 +9281,6 @@ declare const DEFAULT_DEBUG_THEME: DebugTheme;
|
|
|
8888
9281
|
*/
|
|
8889
9282
|
declare const DEFAULT_DEBUG_STROKES: DebugStrokes;
|
|
8890
9283
|
|
|
8891
|
-
/** Where a container's layout comes from: a map by container id, or a
|
|
8892
|
-
* resolver. The same shape `<SceneCanvas layouts>` takes. */
|
|
8893
|
-
type LayoutSource<TPose> = Record<string, LayoutStrategy<TPose>> | ((containerId: string) => LayoutStrategy<TPose> | null);
|
|
8894
|
-
/** Options for {@link layoutArrivalHandler} and {@link useLayoutArrivals}. */
|
|
8895
|
-
interface LayoutArrivalOptions<TPose> {
|
|
8896
|
-
layouts: LayoutSource<TPose>;
|
|
8897
|
-
/** How poses are read and resized. Default `AUTO_POSE_DESCRIPTOR`. */
|
|
8898
|
-
poseDescriptor?: PoseDescriptor<TPose>;
|
|
8899
|
-
}
|
|
8900
|
-
/**
|
|
8901
|
-
* A scene arrival handler over `layouts`: the scene's own layout pass
|
|
8902
|
-
* (`depart` for children that left a container, `arrive` for children that
|
|
8903
|
-
* joined it, `childPoses` for any other change to its children or size),
|
|
8904
|
-
* measured through the canvas's pose
|
|
8905
|
-
* descriptor. A container that declares its own layout
|
|
8906
|
-
* (`ContainerNode.layout`) is arranged by that one; `layouts` fills in for
|
|
8907
|
-
* the rest.
|
|
8908
|
-
*/
|
|
8909
|
-
declare function layoutArrivalHandler<TData, TLayer extends string, TPose>(scene: Scene<TData, TLayer, TPose>, opts: LayoutArrivalOptions<TPose>): SceneArrivalHandler<TPose>;
|
|
8910
|
-
/**
|
|
8911
|
-
* Install {@link layoutArrivalHandler} on `scene` for as long as the calling
|
|
8912
|
-
* component is mounted. `<SceneCanvas layouts>` does this itself; call it
|
|
8913
|
-
* when a canvas is wired by hand through `sceneToAdapter({ layouts })`.
|
|
8914
|
-
*/
|
|
8915
|
-
declare function useLayoutArrivals<TData, TLayer extends string, TPose>(scene: Scene<TData, TLayer, TPose>, opts: Partial<LayoutArrivalOptions<TPose>>): void;
|
|
8916
|
-
|
|
8917
9284
|
/**
|
|
8918
9285
|
* @experimental
|
|
8919
9286
|
* Bundle a list of Affordances into a single RenderLayer.
|
|
@@ -8942,10 +9309,10 @@ interface TargetTransform {
|
|
|
8942
9309
|
/** No rotation and no `transform`: local is world. */
|
|
8943
9310
|
identity: boolean;
|
|
8944
9311
|
/** Target box frame → world. */
|
|
8945
|
-
toWorld:
|
|
9312
|
+
toWorld: Affine;
|
|
8946
9313
|
/** World → target box frame. `null` when the target's `transform` is
|
|
8947
9314
|
* singular: it draws nothing, and no world point maps back. */
|
|
8948
|
-
toLocal:
|
|
9315
|
+
toLocal: Affine | null;
|
|
8949
9316
|
}
|
|
8950
9317
|
|
|
8951
9318
|
/**
|
|
@@ -8959,8 +9326,10 @@ interface AffordanceRegionHit {
|
|
|
8959
9326
|
affordanceId: string;
|
|
8960
9327
|
/** `AffordanceRegion.id`. */
|
|
8961
9328
|
regionId: string;
|
|
8962
|
-
/** The region itself, so callers can read `hitKind
|
|
9329
|
+
/** The region itself, so callers can read `hitKind`. */
|
|
8963
9330
|
region: AffordanceRegion;
|
|
9331
|
+
/** The region's cursor at the hit point. */
|
|
9332
|
+
cursor?: CursorSpec;
|
|
8964
9333
|
/** Result of the region's `bind()`, called exactly once. */
|
|
8965
9334
|
binding: AffordanceBinding;
|
|
8966
9335
|
}
|
|
@@ -9064,8 +9433,8 @@ interface RotationAffordanceOptions {
|
|
|
9064
9433
|
insetPx?: number;
|
|
9065
9434
|
} | null | false;
|
|
9066
9435
|
/** Cursor while hovering the ring. Defaults to the `rotate` glyph turned
|
|
9067
|
-
*
|
|
9068
|
-
* image. */
|
|
9436
|
+
* square to the line from the pivot to the pointer, falling back to
|
|
9437
|
+
* `'grab'` if the browser rejects the image. */
|
|
9069
9438
|
cursor?: CursorSpec;
|
|
9070
9439
|
/** A grab region for a rotate badge painted off the top edge — the one
|
|
9071
9440
|
* the selection overlay's `rotationHandle` draws. `distancePx` is how far
|
|
@@ -9101,7 +9470,7 @@ interface RotationScratch extends CommonAffordanceScratch {
|
|
|
9101
9470
|
*/
|
|
9102
9471
|
declare function createRotationAffordance(opts?: RotationAffordanceOptions): Affordance;
|
|
9103
9472
|
|
|
9104
|
-
/** Path anchor
|
|
9473
|
+
/** Path anchor, control-handle, and segment affordances. */
|
|
9105
9474
|
|
|
9106
9475
|
/**
|
|
9107
9476
|
* Live anchor-editing state. The thunk that returns it is called on every
|
|
@@ -9130,15 +9499,18 @@ interface AnchorScratch extends CommonAffordanceScratch {
|
|
|
9130
9499
|
/** Which of the anchor's three grabbable points this is. */
|
|
9131
9500
|
part: 'anchor' | 'controlIn' | 'controlOut';
|
|
9132
9501
|
}
|
|
9133
|
-
/** Chrome-caps id gating
|
|
9502
|
+
/** Chrome-caps id gating every returned affordance. */
|
|
9134
9503
|
declare const PATH_ANCHOR_CHROME_ID = "path-edit.anchors";
|
|
9135
9504
|
/**
|
|
9136
|
-
*
|
|
9505
|
+
* Segment, anchor, and control affordances for the selected paths, bottom →
|
|
9506
|
+
* top.
|
|
9137
9507
|
*
|
|
9138
|
-
*
|
|
9139
|
-
*
|
|
9140
|
-
*
|
|
9141
|
-
*
|
|
9508
|
+
* Three affordances rather than one, so that a control handle beats an anchor
|
|
9509
|
+
* regardless of which is nearer, the way controls draw on top, and both beat
|
|
9510
|
+
* the segment they sit on. Within each, nearest wins. A press on the edited
|
|
9511
|
+
* path's outline is a `segment` hit, which the segment bend binds to and a
|
|
9512
|
+
* selection move turns down. They deliberately share one id: chrome-caps
|
|
9513
|
+
* gates anchor editing as a single piece of chrome.
|
|
9142
9514
|
*
|
|
9143
9515
|
* Order matters — spread this into an affordance list in the returned order.
|
|
9144
9516
|
*/
|
|
@@ -9210,7 +9582,9 @@ declare function unionAABB<TPose extends RectPose>(parts: Iterable<TPose | null
|
|
|
9210
9582
|
/**
|
|
9211
9583
|
* `useSceneTextEdit` — scene-aware wrapper around `useTextEdit`: scene
|
|
9212
9584
|
* lookups for text / style / runs / screen-pose, and
|
|
9213
|
-
* `scene.update(id, { data })` for commits.
|
|
9585
|
+
* `scene.update(id, { data })` for commits. The overlay and a double-click
|
|
9586
|
+
* both read the pose a node is painted at, so text inside a container whose
|
|
9587
|
+
* pose is a frame is edited where it is drawn.
|
|
9214
9588
|
*
|
|
9215
9589
|
* Defaults assume the node's `data` carries `text` / `style` / `runs`
|
|
9216
9590
|
* directly. For custom data shapes, override any of the optional projections.
|
|
@@ -9270,10 +9644,6 @@ interface UseSceneTextEditOptions<TData> {
|
|
|
9270
9644
|
* on, when there are several). With no canvas there, the node's world box
|
|
9271
9645
|
* is passed through as screen pixels.
|
|
9272
9646
|
*
|
|
9273
|
-
* The overlay takes a single scale factor, so a non-uniform view scale is
|
|
9274
|
-
* represented by its `scale.x`; text under `scale.x !== scale.y` will not
|
|
9275
|
-
* match the canvas.
|
|
9276
|
-
*
|
|
9277
9647
|
* A thunk is re-read on every projection; a plain `View` is the value from
|
|
9278
9648
|
* the render that supplied it.
|
|
9279
9649
|
*/
|
|
@@ -9288,6 +9658,12 @@ interface UseSceneTextEditOptions<TData> {
|
|
|
9288
9658
|
escape?: 'cancel' | 'commit';
|
|
9289
9659
|
/** Forwarded to `useTextEdit`: how long an edit waits for its face. */
|
|
9290
9660
|
fontHold?: number;
|
|
9661
|
+
/** Forwarded to `useTextEdit`: called as an edit of the node `id` opens,
|
|
9662
|
+
* whichever way it was started. */
|
|
9663
|
+
onStart?: (id: string) => void;
|
|
9664
|
+
/** Forwarded to `useTextEdit`: called as the edit of `id` closes, after
|
|
9665
|
+
* any commit has been written to the scene. */
|
|
9666
|
+
onEnd?: (id: string) => void;
|
|
9291
9667
|
}
|
|
9292
9668
|
/** Return shape extends `UseTextEditReturn` with an `onDoubleClick`
|
|
9293
9669
|
* binding for the canvas container. Double-clicking inside a text
|
|
@@ -9321,7 +9697,7 @@ interface StrokeRegionOptions {
|
|
|
9321
9697
|
* the node's own (`poseFrameOf`, to world), which skews and stretches the
|
|
9322
9698
|
* stroke with the node.
|
|
9323
9699
|
*/
|
|
9324
|
-
declare function strokeRegion(path: Path, stroke: Stroke, frame:
|
|
9700
|
+
declare function strokeRegion(path: Path, stroke: Stroke, frame: Affine | null | undefined, { scale, flattenTolerance }?: StrokeRegionOptions): PolygonPath;
|
|
9325
9701
|
|
|
9326
9702
|
/**
|
|
9327
9703
|
* Outline Stroke: replace each selected stroked path, or stroked text, with
|
|
@@ -9526,8 +9902,8 @@ declare function createArrangeOp(args: ArrangeArgs, compute?: () => ArrangedPose
|
|
|
9526
9902
|
* so an ordinal captured before the mutation is replayed against a list that
|
|
9527
9903
|
* has not been refilled yet and clamps to the end, while "put this back before
|
|
9528
9904
|
* `e`" stays true however much else has already moved. The ordinal is the
|
|
9529
|
-
* fallback for the
|
|
9530
|
-
*
|
|
9905
|
+
* fallback for the case the anchor cannot cover: an anchor that is itself
|
|
9906
|
+
* gone by replay time.
|
|
9531
9907
|
*/
|
|
9532
9908
|
interface SiblingSlot {
|
|
9533
9909
|
/** Ordinal among the siblings. `-1` means "nowhere in particular". */
|
|
@@ -9582,7 +9958,7 @@ interface DeleteArgs<TNode extends {
|
|
|
9582
9958
|
label?: string;
|
|
9583
9959
|
/** Sibling ordinal the node occupies at the moment of delete. Sugar for
|
|
9584
9960
|
* `slot: { index }`, and only a seed: `apply` re-observes the node's full
|
|
9585
|
-
* slot through the adapter,
|
|
9961
|
+
* slot through the adapter, and that supersedes this. */
|
|
9586
9962
|
index?: number;
|
|
9587
9963
|
/** Full slot, anchor included. Written by `apply`; supersedes `index`. */
|
|
9588
9964
|
slot?: SiblingSlot;
|
|
@@ -10298,6 +10674,83 @@ interface PathEditingOverlayStyle {
|
|
|
10298
10674
|
* edited. */
|
|
10299
10675
|
declare function createPathEditingOverlayLayer(opts: CreatePathEditingOverlayLayerOptions): RenderLayer<unknown>;
|
|
10300
10676
|
|
|
10677
|
+
/**
|
|
10678
|
+
* The parameters a polygon or star was drawn with, kept on the node beside the
|
|
10679
|
+
* geometry they made (`data.generator` beside `data.path`), so the shape stays
|
|
10680
|
+
* editable as a polygon or a star after it is drawn.
|
|
10681
|
+
*
|
|
10682
|
+
* `data.path` stays the geometry every reader uses; the generator only says how
|
|
10683
|
+
* to make it again. Editing the path itself turns the shape into plain
|
|
10684
|
+
* geometry: the generator is dropped, since it could no longer reproduce what
|
|
10685
|
+
* is drawn. A generator whose path no longer matches it (a writer that changed
|
|
10686
|
+
* the path without dropping it) is treated the same way.
|
|
10687
|
+
*/
|
|
10688
|
+
|
|
10689
|
+
/** A regular polygon's parameters. `rotation` is the angle of its first
|
|
10690
|
+
* vertex, in radians, inside the pose's own rotation. */
|
|
10691
|
+
interface PolygonGenerator {
|
|
10692
|
+
kind: 'polygon';
|
|
10693
|
+
sides: number;
|
|
10694
|
+
rotation: number;
|
|
10695
|
+
}
|
|
10696
|
+
/** A star's parameters. `innerRadiusRatio` is the inner radius over the outer
|
|
10697
|
+
* one; `rotation` is the angle of its first point, in radians, inside the
|
|
10698
|
+
* pose's own rotation. */
|
|
10699
|
+
interface StarGenerator {
|
|
10700
|
+
kind: 'star';
|
|
10701
|
+
points: number;
|
|
10702
|
+
innerRadiusRatio: number;
|
|
10703
|
+
rotation: number;
|
|
10704
|
+
}
|
|
10705
|
+
/** The parameters a node's `data.path` was generated from. */
|
|
10706
|
+
type ShapeGenerator = PolygonGenerator | StarGenerator;
|
|
10707
|
+
/** The range of a polygon's side count and a star's point count. */
|
|
10708
|
+
declare const SHAPE_COUNT_RANGE: {
|
|
10709
|
+
readonly min: 3;
|
|
10710
|
+
readonly max: 32;
|
|
10711
|
+
};
|
|
10712
|
+
/** The range of a star's `innerRadiusRatio`. */
|
|
10713
|
+
declare const STAR_RATIO_RANGE: {
|
|
10714
|
+
readonly min: 0.01;
|
|
10715
|
+
readonly max: 1;
|
|
10716
|
+
};
|
|
10717
|
+
/** Whether `v` is a well-formed {@link ShapeGenerator}. */
|
|
10718
|
+
declare function isShapeGenerator(v: unknown): v is ShapeGenerator;
|
|
10719
|
+
/** The generator a node's `data` holds, or `null`. */
|
|
10720
|
+
declare function shapeGeneratorOf(data: unknown): ShapeGenerator | null;
|
|
10721
|
+
/** `g` with its counts rounded and every field held in range. */
|
|
10722
|
+
declare function clampShapeGenerator(g: ShapeGenerator): ShapeGenerator;
|
|
10723
|
+
/** The shape `g` makes, on a circle of `radius` around `center`. */
|
|
10724
|
+
declare function shapeGeneratorPath(g: ShapeGenerator, center?: {
|
|
10725
|
+
x: number;
|
|
10726
|
+
y: number;
|
|
10727
|
+
}, radius?: number): PolygonPath;
|
|
10728
|
+
/** `data` without its generator: the shape as plain geometry. */
|
|
10729
|
+
declare function withoutShapeGenerator<T>(data: T): T;
|
|
10730
|
+
/** A node's two halves, as a regeneration reads and writes them. */
|
|
10731
|
+
interface GeneratedShape<P extends PathInWorldPose = PathInWorldPose> {
|
|
10732
|
+
pose: P;
|
|
10733
|
+
data: unknown;
|
|
10734
|
+
}
|
|
10735
|
+
/**
|
|
10736
|
+
* `node` made again from `next`, in place: the new shape takes the box the old
|
|
10737
|
+
* one's circle had, under the same rotation and transform, so a star given
|
|
10738
|
+
* more points keeps its center and its size. Returns `null` when the node holds
|
|
10739
|
+
* no generator, or its path no longer matches the one it holds.
|
|
10740
|
+
*/
|
|
10741
|
+
declare function regenerateShape<P extends PathInWorldPose>(node: GeneratedShape<P>, next: ShapeGenerator): GeneratedShape<P> | null;
|
|
10742
|
+
/**
|
|
10743
|
+
* What a write that left a node as `next`, from `prev`, stores: when the write
|
|
10744
|
+
* changed the generator, the shape made again from it. A generator written
|
|
10745
|
+
* onto a node that held none, or of another kind, or onto one whose path no
|
|
10746
|
+
* longer matches, is dropped, leaving the shape as plain geometry. Any other
|
|
10747
|
+
* write is stored as written. Fits `NodePropertiesEntry.settle`.
|
|
10748
|
+
*/
|
|
10749
|
+
declare function settleShapeGenerator<N extends {
|
|
10750
|
+
pose: unknown;
|
|
10751
|
+
data: unknown;
|
|
10752
|
+
}>(next: N, prev: N): N;
|
|
10753
|
+
|
|
10301
10754
|
/**
|
|
10302
10755
|
* Snap a (dx, dy) direction vector to the nearest 0/45/90/135° axis,
|
|
10303
10756
|
* preserving the input magnitude. Used by the pen tool's Shift-constrain
|
|
@@ -10672,154 +11125,50 @@ declare function hitAnchor(path: PolygonPath, worldX: number, worldY: number, th
|
|
|
10672
11125
|
|
|
10673
11126
|
/**
|
|
10674
11127
|
* @experimental
|
|
10675
|
-
* A
|
|
10676
|
-
*
|
|
10677
|
-
*
|
|
10678
|
-
* - `
|
|
10679
|
-
*
|
|
10680
|
-
*
|
|
10681
|
-
*
|
|
10682
|
-
*
|
|
10683
|
-
|
|
10684
|
-
|
|
10685
|
-
|
|
10686
|
-
|
|
10687
|
-
|
|
10688
|
-
|
|
11128
|
+
* A transform the selection underwent, kept relative so it can be applied to
|
|
11129
|
+
* whatever is selected next.
|
|
11130
|
+
*
|
|
11131
|
+
* - `translate`: a world offset.
|
|
11132
|
+
* - `rotate`: radians about the selection's center, or about each node's own
|
|
11133
|
+
* center (`pivot: 'each'`).
|
|
11134
|
+
* - `scale`: the box the selection was resized to, in units of the box it
|
|
11135
|
+
* started as (`{ x: 0, y: 0, width: 1, height: 1 }` is no change), and the
|
|
11136
|
+
* anchor the resize held fixed.
|
|
11137
|
+
* - `duplicate`: copy the selection, offset by `(dx, dy)`, and select the copies.
|
|
11138
|
+
*/
|
|
11139
|
+
type RepeatableTransform = {
|
|
11140
|
+
readonly kind: 'translate';
|
|
11141
|
+
readonly dx: number;
|
|
11142
|
+
readonly dy: number;
|
|
10689
11143
|
} | {
|
|
10690
|
-
|
|
11144
|
+
readonly kind: 'rotate';
|
|
11145
|
+
readonly angle: number;
|
|
11146
|
+
readonly pivot: 'union' | 'each';
|
|
11147
|
+
} | {
|
|
11148
|
+
readonly kind: 'scale';
|
|
11149
|
+
readonly to: Bounds;
|
|
11150
|
+
readonly anchor: ResizeAnchor;
|
|
11151
|
+
} | {
|
|
11152
|
+
readonly kind: 'duplicate';
|
|
11153
|
+
readonly dx: number;
|
|
11154
|
+
readonly dy: number;
|
|
10691
11155
|
};
|
|
10692
|
-
/** @experimental Where `resolveSpatialReference` reads a reference's inputs. */
|
|
10693
|
-
interface SpatialReferenceSources {
|
|
10694
|
-
/** The pointer's world position, or `null` when it is over no canvas. */
|
|
10695
|
-
pointer(): {
|
|
10696
|
-
x: number;
|
|
10697
|
-
y: number;
|
|
10698
|
-
} | null;
|
|
10699
|
-
/** A node's world visual bounds, or `null` when it is not in the scene. */
|
|
10700
|
-
nodeBounds(id: NodeId): Bounds | null;
|
|
10701
|
-
}
|
|
10702
11156
|
/**
|
|
10703
11157
|
* @experimental
|
|
10704
|
-
* The
|
|
10705
|
-
* `null` when it names nothing right now (no pointer, a missing node, a
|
|
10706
|
-
* malformed value).
|
|
11158
|
+
* The last transform recorded against `scene`, which `transformAgain` repeats.
|
|
10707
11159
|
*/
|
|
10708
|
-
declare function
|
|
10709
|
-
|
|
10710
|
-
/** Edge or center the selection should align to within the reference's
|
|
10711
|
-
* bounds (rotated members contribute their ink extent). */
|
|
10712
|
-
type AlignEdge = 'left' | 'right' | 'top' | 'bottom' | 'center-x' | 'center-y';
|
|
10713
|
-
/** @experimental What the selection aligns to: `'union'` — the selection's
|
|
10714
|
-
* own visual union AABB, the default — or a {@link SpatialReference}. */
|
|
10715
|
-
type AlignReference = 'union' | SpatialReference;
|
|
10716
|
-
/** @experimental The bounds each member of `bounds` aligns to under `to`, or
|
|
10717
|
-
* `null` when there is nothing to align: a union of fewer than two members,
|
|
10718
|
-
* an empty selection, or a reference that names nothing right now. */
|
|
10719
|
-
declare function alignTargetBounds(bounds: readonly Bounds[], to: AlignReference | undefined, src: SpatialReferenceSources): Bounds | null;
|
|
10720
|
-
/** Adapter for `useAlign`. */
|
|
10721
|
-
interface AlignAdapter<TPose> {
|
|
10722
|
-
getSelection(): NodeId[];
|
|
10723
|
-
/** The pose as stored — local to the node's parent. */
|
|
10724
|
-
getPose(id: NodeId): TPose;
|
|
10725
|
-
/** The parent chain, for a scene whose container poses define a frame.
|
|
10726
|
-
* Omit it (or leave `composition` unset) for an absolute-pose scene. */
|
|
10727
|
-
getParent?(id: NodeId): NodeId | null;
|
|
10728
|
-
applyOps?(ops: Op[], label?: string): void;
|
|
10729
|
-
}
|
|
10730
|
-
/** Options for `useAlign`. */
|
|
10731
|
-
interface UseAlignOptions<TPose> {
|
|
10732
|
-
/** Projection between `TPose` and bounds. Defaults to `RECT_POSE_DESCRIPTOR`
|
|
10733
|
-
* for `{x,y,width,height}` poses. Pass `pathPoseDescriptor` for `Path`
|
|
10734
|
-
* poses so polygon coords translate correctly. */
|
|
10735
|
-
geometry?: PoseDescriptor<TPose>;
|
|
10736
|
-
/** Label passed to applyOps. Default 'Align'. */
|
|
10737
|
-
label?: string;
|
|
10738
|
-
/** How local poses fold up to world. Default IDENTITY, where the two are
|
|
10739
|
-
* the same value and the alignment runs entirely in stored coordinates. */
|
|
10740
|
-
composition?: PoseComposition<TPose>;
|
|
10741
|
-
}
|
|
10742
|
-
/** Return shape of `useAlign`. */
|
|
10743
|
-
interface UseAlignReturn {
|
|
10744
|
-
/** Imperative trigger. `to` defaults to `'union'`, which needs two items;
|
|
10745
|
-
* any other reference aligns a single item too. `'pointer'` reads the
|
|
10746
|
-
* surrounding `<PointerContextProvider>`. */
|
|
10747
|
-
align(edge: AlignEdge, to?: AlignReference): void;
|
|
10748
|
-
}
|
|
10749
|
-
/** Compute the (dx, dy) translation that moves AABB `b` so that the requested
|
|
10750
|
-
* `edge`/center matches the corresponding feature of the union AABB `u`. */
|
|
10751
|
-
declare function alignDeltaFor(b: Bounds, u: Bounds, edge: AlignEdge): {
|
|
10752
|
-
dx: number;
|
|
10753
|
-
dy: number;
|
|
10754
|
-
};
|
|
10755
|
-
/** Align the current selection to a shared edge or center of the selection's
|
|
10756
|
-
* union AABB, or of another reference. Single batch — one undo step.
|
|
10757
|
-
*
|
|
10758
|
-
* The edge is a world edge: bounds are measured and translated in world, and
|
|
10759
|
-
* each result is stored back in its own parent's frame. */
|
|
10760
|
-
declare function useAlign<TPose>(adapter: AlignAdapter<TPose>, options?: UseAlignOptions<TPose>): UseAlignReturn;
|
|
10761
|
-
|
|
11160
|
+
declare function lastTransform(scene: object): RepeatableTransform | undefined;
|
|
10762
11161
|
/**
|
|
10763
|
-
*
|
|
10764
|
-
*
|
|
10765
|
-
*
|
|
10766
|
-
*
|
|
10767
|
-
*
|
|
11162
|
+
* @experimental
|
|
11163
|
+
* Remember `transform` as the last one `scene` underwent, `subject` being the
|
|
11164
|
+
* ids selected once it landed. A translate of exactly the copies a
|
|
11165
|
+
* `duplicate` just made folds into it, so the copies' offset from their
|
|
11166
|
+
* sources is what repeats: duplicate, drag the copy, and each repeat steps
|
|
11167
|
+
* one more copy along.
|
|
10768
11168
|
*/
|
|
10769
|
-
|
|
10770
|
-
/**
|
|
10771
|
-
|
|
10772
|
-
/** How a multi-selection flip chooses its pivot.
|
|
10773
|
-
*
|
|
10774
|
-
* - `'each'` — every pose mirrors about its own AABB; spatial layout of the
|
|
10775
|
-
* selection is unchanged, individual items are reflected in place.
|
|
10776
|
-
* - `'union'` — every pose mirrors about the selection's union AABB; items
|
|
10777
|
-
* swap sides as well as reflect, matching Illustrator/Figma defaults.
|
|
10778
|
-
* - a {@link SpatialReference} — every pose mirrors about the center of the
|
|
10779
|
-
* bounds it names: the pointer, a world point or rect, or a key node. */
|
|
10780
|
-
type FlipPivot = 'each' | 'union' | SpatialReference;
|
|
10781
|
-
|
|
10782
|
-
/** Axis along which selection is distributed. `'x'` spreads horizontally. */
|
|
10783
|
-
type DistributeAxis = 'x' | 'y';
|
|
10784
|
-
/** `'centers'` spaces centers equally; `'gaps'` makes the gap between
|
|
10785
|
-
* consecutive items equal. Both measure a rotated item by its ink extent.
|
|
10786
|
-
* Endpoints stay put in both modes. */
|
|
10787
|
-
type DistributeMode = 'centers' | 'gaps';
|
|
10788
|
-
/** Adapter for `useDistribute`. */
|
|
10789
|
-
interface DistributeAdapter<TPose> {
|
|
10790
|
-
getSelection(): NodeId[];
|
|
10791
|
-
/** The pose as stored — local to the node's parent. */
|
|
10792
|
-
getPose(id: NodeId): TPose;
|
|
10793
|
-
/** The parent chain, for a scene whose container poses define a frame.
|
|
10794
|
-
* Omit it (or leave `composition` unset) for an absolute-pose scene. */
|
|
10795
|
-
getParent?(id: NodeId): NodeId | null;
|
|
10796
|
-
applyOps?(ops: Op[], label?: string): void;
|
|
10797
|
-
}
|
|
10798
|
-
/** Options for `useDistribute`. */
|
|
10799
|
-
interface UseDistributeOptions<TPose> {
|
|
10800
|
-
/** Projection between `TPose` and bounds. Defaults to `RECT_POSE_DESCRIPTOR`
|
|
10801
|
-
* for `{x,y,width,height}` poses. */
|
|
10802
|
-
geometry?: PoseDescriptor<TPose>;
|
|
10803
|
-
/** Default mode when `distribute(axis)` is called without one. Default 'centers'. */
|
|
10804
|
-
defaultMode?: DistributeMode;
|
|
10805
|
-
/** Label passed to applyOps. Default 'Distribute'. */
|
|
10806
|
-
label?: string;
|
|
10807
|
-
/** How local poses fold up to world. Default IDENTITY, where the two are
|
|
10808
|
-
* the same value and the spread runs entirely in stored coordinates. */
|
|
10809
|
-
composition?: PoseComposition<TPose>;
|
|
10810
|
-
}
|
|
10811
|
-
/** Return shape of `useDistribute`. */
|
|
10812
|
-
interface UseDistributeReturn {
|
|
10813
|
-
/** Imperative trigger. No-op when fewer than 3 items selected. */
|
|
10814
|
-
distribute(axis: DistributeAxis, mode?: DistributeMode): void;
|
|
10815
|
-
}
|
|
10816
|
-
/** Distribute the current multi-selection along `axis`. Requires ≥3 items;
|
|
10817
|
-
* no-op otherwise. Endpoints (min and max along the axis) stay put; the
|
|
10818
|
-
* remaining items are repositioned. Single batch — one undo step.
|
|
10819
|
-
*
|
|
10820
|
-
* The span being divided is a world span: bounds are measured and translated
|
|
10821
|
-
* in world, and each result is stored back in its own parent's frame. */
|
|
10822
|
-
declare function useDistribute<TPose>(adapter: DistributeAdapter<TPose>, options?: UseDistributeOptions<TPose>): UseDistributeReturn;
|
|
11169
|
+
declare function recordTransform(scene: object, transform: RepeatableTransform, subject: readonly string[]): void;
|
|
11170
|
+
/** @experimental Drop what `scene` remembers, so `transformAgain` has nothing to repeat. */
|
|
11171
|
+
declare function forgetTransform(scene: object): void;
|
|
10823
11172
|
|
|
10824
11173
|
/** What {@link createPoseTarget} takes. */
|
|
10825
11174
|
interface PoseTargetOptions<TPose> {
|
|
@@ -11253,6 +11602,11 @@ declare function PenIcon({ className, size }: IconProps): react.JSX.Element;
|
|
|
11253
11602
|
* and a thumb stub. Used for `useHandTool` (viewport pan). */
|
|
11254
11603
|
declare function HandIcon({ className, size }: IconProps): react.JSX.Element;
|
|
11255
11604
|
|
|
11605
|
+
/** Knife — an outlined handle on the diagonal with a filled blade whose
|
|
11606
|
+
* spine continues the handle's upper edge to the tip at lower-left. Used
|
|
11607
|
+
* for `useSliceTool`. */
|
|
11608
|
+
declare function SliceIcon({ className, size }: IconProps): react.JSX.Element;
|
|
11609
|
+
|
|
11256
11610
|
/** Placeholder for tools without `presentation.icon`. A circle with "?"
|
|
11257
11611
|
* inside — readable, debuggable, not hidden. */
|
|
11258
11612
|
declare function UnknownIcon({ className, size }: IconProps): react.JSX.Element;
|
|
@@ -11322,6 +11676,21 @@ declare function CreateOutlinesIcon(): react.JSX.Element;
|
|
|
11322
11676
|
*/
|
|
11323
11677
|
declare function OutlineStrokeIcon(): react.JSX.Element;
|
|
11324
11678
|
|
|
11679
|
+
/**
|
|
11680
|
+
* Retract handles: a sharp corner on its anchor, with the handle stubs
|
|
11681
|
+
* either side pointing in toward it.
|
|
11682
|
+
*
|
|
11683
|
+
* @experimental
|
|
11684
|
+
*/
|
|
11685
|
+
declare function RetractHandlesIcon(): react.JSX.Element;
|
|
11686
|
+
/**
|
|
11687
|
+
* Make handles symmetric: a smooth curve through its anchor, with one handle
|
|
11688
|
+
* line across it ending in two equal knobs.
|
|
11689
|
+
*
|
|
11690
|
+
* @experimental
|
|
11691
|
+
*/
|
|
11692
|
+
declare function SymmetricHandlesIcon(): react.JSX.Element;
|
|
11693
|
+
|
|
11325
11694
|
/**
|
|
11326
11695
|
* Cut: scissors.
|
|
11327
11696
|
*
|
|
@@ -11346,6 +11715,12 @@ declare function PasteIcon(): react.JSX.Element;
|
|
|
11346
11715
|
* @experimental
|
|
11347
11716
|
*/
|
|
11348
11717
|
declare function DuplicateIcon(): react.JSX.Element;
|
|
11718
|
+
/**
|
|
11719
|
+
* Transform again: a step-and-repeat run of three squares, the last filled.
|
|
11720
|
+
*
|
|
11721
|
+
* @experimental
|
|
11722
|
+
*/
|
|
11723
|
+
declare function TransformAgainIcon(): react.JSX.Element;
|
|
11349
11724
|
/**
|
|
11350
11725
|
* Group: corner brackets framing two filled rects.
|
|
11351
11726
|
*
|
|
@@ -11503,4 +11878,4 @@ interface InsertOverlayStyle {
|
|
|
11503
11878
|
lineWidth?: number;
|
|
11504
11879
|
}
|
|
11505
11880
|
|
|
11506
|
-
export { ACTION_GLYPHS, ANCHOR_HIT_BASE_PX, AREA_SELECT_ID, type ActionGlyphProps, type ActionShortcut, ActionsProviderIfRoot, type AddLayerSpec, type AddNodeSpec, type Affordance, type AffordanceBinding, type AffordanceRegion, type AffordanceRegionHit, type AlignAdapter, AlignBottomIcon, AlignCenterXIcon, AlignCenterYIcon, type AlignEdge, AlignLeftIcon, type AlignReference, AlignRightIcon, AlignTopIcon, type AnchorHit, type AnchorScratch, type AnchorState, type AnimateOnSetPoseOptions, type AnimateToBoundsOptions, type AnimatedReflow, type AnyTool, AreaSelectAdapter, type AreaSelectDep, type ArrangeArgs, type ArrangedPose, ArrowIcon, BUILTIN_TOOL_IDS, type BaseFeature, type BindRigOptions, type Bivariant, type BooleanOp, type BooleanOpOptions, type BooleanOpPreview, type BooleanOpResult, type BooleanPreviewPiece, type BooleanStrokes, type BooleansAdapter, BoundsConstraint, BringForwardIcon, BringToFrontIcon, type BuildChromeCtxArgs, type BuiltinShapeToolId, type BuiltinToolId, type BuiltinToolOptions, COMPOSITE_FEATURES, type CameraProps, type CanvasDebugSink, type CanvasExtensionApi, type CanvasHelpers, type CanvasLayers, type CanvasProps, type CanvasSize, type CanvasSizeSnapshot, type CanvasSurfaceHelpers, CanvasView, type CanvasViewCamera, type CanvasViewHandle, type CanvasViewHelpers, type CanvasViewProps, type CanvasViewState, type ChildOrder, type ChromeCtx, type ChromeId, type ChromeState, type ClampBounds, type ClipFromPoseFn, type ClipboardDep, type ClipboardIngestCtx, ClipboardSnapshot, type CoalescedCtx, type CommonAffordanceScratch, type ComposeSelectionPoseOpts, type CompositeFeature, type ComputeSliceOpsArgs, type ComputeSliceResult, type Condition, ContainerBounds, type ContainerNode, type ContentHandlerEntry, type Contribution, type ContributionChrome, type ContributionDepReader, type ContributionFrameCtx, CopyIcon, type CornerResizeAffordanceOptions, type CornerResizeScratch, type CreateChildrenLayerOpts, type CreateDebugOverlayLayerOpts, type CreateOutlinesAdapter, CreateOutlinesIcon, type CreateOutlinesResult, type CreatePathEditingOverlayLayerOptions, type CreatePathLayerOpts, type CreatePenPreviewLayerOptions, type CreateTextLayerOpts, type CreateViewResolverOpts, type CreateViewportLayerOpts, CropIcon, CursorCoordsHud, type CursorCoordsHudProps, type CustomLayerEntry, type CustomPaintContext, CutIcon, DEFAULT_DEBUG_STROKES, DEFAULT_DEBUG_THEME, DEFAULT_FILL_COLOR, DEFAULT_HANDLE_SIZE, DEFAULT_INK, DEFAULT_MAX_ZOOM, DEFAULT_MIN_ZOOM, DEFAULT_PALETTE, DEFAULT_ROTATE_BEHAVIORS, DEFAULT_ROTATION_HANDLE_DISTANCE, DEFAULT_ROTATION_SNAP_STEP, DEFAULT_SHAPE_FILL, DEFAULT_STROKE_COLOR, DRAG_PAN_ID, type DebugConfig, type DebugFeature, type DebugSnapshot, type DebugStroke, type DebugStrokes, type DebugTheme, type DecayLoopConfig, type DefaultTextData, type DeleteArgs, DeleteIcon, DepRegistryProviderIfRoot, type DerivePathFn, type DerivePoseFn, type DerivedDep, DeviceProfileProvider, type DeviceProfileProviderProps, type Dims, type DistributeAdapter, type DistributeAxis, DistributeHorizontalIcon, type DistributeMode, DistributeVerticalIcon, DivideIcon, type DragGestureController, type DragGestureCtx, type DragGestureEndCtx, type DragGesturePhase, type DragGesturePoint, type DragHandleOptions, type DragPanParams, type DragPayload, type DragRadialController, type DragRadialCtx, type DragRadialEndCtx, type DragRadialPoint, type DragRadialState, type DragRectBounds, type DragRectController, type DragRectCtx, type DragRectEndCtx, type DragRectPoint, DrawCanvas, type DrawCanvasDraw, type DrawCanvasProps, type DropZoneOptions, DuplicateIcon, type EditAnchorsDep, type EditedLayerOf, EllipseIcon, ExcludeIcon, EyedropperIcon, FALLBACK_ACCENT, FEATURE_ACTION_IDS, type Feature, type FeedDelta, type FeedNode, type FitViewToBoundsOptions, type FlipAxis, type FlipPivot, FlipXIcon, FlipYIcon, type FrameStats, GHOST_STROKE, type GateLayerOptions, type GeometryProjection, GestureContext, type GesturePreviewSource, type GestureSource, GroupIcon, HANDLE_BASE_PX, HandIcon, type InertiaConfig as HandToolInertiaConfig, type HandleDragEnd, type HandleDragPoint, type HeadlessCanvasLike, type HitTestView, type HostAnchorAlign, type HostAnchorInput, type HostAnchorOffset, type HostAnchorStyle, type HoverTracking, IDENTITY_POSE_COMPOSITION, type IconProps, ImageIcon, type InertiaConfig, type IngestCtx, type IngestionDep, InsertAdapter, type InsertArgs, InsertBehavior, type InsertDep, type InsertExtras, type InsertLive, type InsertNodeFactory, type InsertOp, type InsertOverlayStyle, type InsertPaint, type InsertPreviewExtent, type InsertPreviewGeometry, type InsertPreviewLike, type InsertPreviewOverlay, type InsertToolOptions, IntersectIcon, KIT_SHAPE_KINDS, KIT_STANDARD_ACTION_IDS, KIT_VERSIONS, type KeyModifiers, type KeyState, type KeyStateAttachOptions, type KitInsertShape, type KitRequirements, type KitVersions, LONG_PRESS_FEEDBACK_ID, LassoHitMode, LassoIcon, LassoSelectAdapter, LassoSelectBehavior, type LassoSelectDep, type LayerCommandCache, type LayerDrawFailure, type LayerDrawSpan, LayerEnumerableAdapter, type LayerFrameStats, type LayerGroup, type LayerHit, type LayerRecord, type LayerSlotValue, type LayersMap, type LayoutArrivalOptions, type LayoutDep, LayoutDropTargetMode, type LayoutFrame, type LayoutMove, type LayoutRef, type LayoutSource, LayoutStrategy, type LeafNode, type LifecycleAdapter, type LifecycleAnimation, LineIcon, type LinePoint, type LongPressFeedbackOptions, MergeIcon, type MomentumOptions, MoveAdapter, MoveBehavior, type MoveToIndexArgs, type NestedHitOpts, type NestedHitTester, type NodeAtPointDep, type NodeClientRect, type NodeInk, type NodeInkCtx, type NodeOverlayFrame, type NodePaintCtx, type NodeProperties, type NodePropertiesEntry, type NodeRouting, type NodeRoutingEntry, type NodeShapeEntry, type NodeSilhouetteCtx, type OpFactory, type OpenFilePickerOptions, type OpsApplier, OrderedAdapter, OriginProjection, type OutlinePathSpec, OutlineStrokeIcon, type OutlineStrokeResult, type Overlay, type OverlayPoint, type OverlayVisibilityId, PAINTED_CURSOR_LAYER_ID, PATH_ANCHOR_CHROME_ID, type PaintBoundsFn, PaintKindEntry, type PaintedSkins, type PanBounds, ParallaxOpts, PasteCtx, PasteIcon, PasteOmission, type PathAnchor, type PathAnchorAffordanceOptions, type PathEditHost, type PathEditingOverlayStyle, type PathPaint, type PenContinuation, PenIcon, type PenPreviewStyle, type PenScratch, type PenSubpath, PencilIcon, type PencilPoint, PickHud, type PickHudProps, type PickSlop, type PickTopMostHitAdapter, type PinchZoomOptions, type PixelRenderPlan, type PlacedNode, type PlacedRig, PlaneMap, PointSnapBehavior, PointerProviderIfRoot, type PointerSample, type PointerStylusState, PolygonIcon, type PolygonPoint, type PoseAdapter, type PoseAnimationAdapter, type PoseCascade, type PoseClosure, type PoseComposition, PoseDescriptor, type PoseFeed, type PoseHold, type PoseOverride, type PoseOverrides, type PoseRun, type PoseRunCtx, type PoseRunStep, type PoseSource, type PoseTargetOptions, type PoseTargetScene, type PosedNode, type PressureToWidthOptions, type PreviewNode, RECT_POSE_COMPOSITION, RIGID_POSE_COMPOSITION, ROTATION_HANDLE_BASE_PX, type RasterImage, type RasterRenderArgs, type RasterSession, type RasterSessionOptions, type RecordedBounds, type RecordedHandle, type RecordedHitbox, type RecordedLayer, type RecordedOrigin, type RecordedSnap, type RecordedViewport, RectIcon, type RectPose, RedoIcon, type RedrawSource, type ReflowScene, ReflowTransition, type ReflowTransitionOptions, RegionPickView, type RegisterNodeShapeOptions, type RegisteredOp, type RenderDebugSnapshotArgs, type RenderLayer, type RenderNeeds, type RenderSceneToCanvasArgs, type RenderSceneToPixelsArgs, type ReorderArgs, type ReorderDirection, type ReorderRestoreEntry, type ReparentArgs, type RequirementMismatch, ResizeAdapter, type ResizePolicy, type ResolvableView, type ResolvedOverlay, type RestPath, type Rig, type RigApply, type RigApplyContext, type RigEditState, type RigNodeData, type RigNodeParts, type RigNodeSource, type RigScene, RotateAdapter, RotateBehavior, RotatedPose, type RotationAffordanceOptions, type RotationHandle, type RotationScratch, SCENE_CANVAS_FEATURES, SCENE_HISTORY_FORM, SELECTION_MOVE_ID, SELECTION_RESIZE_ID, SELECTION_ROTATE_ID, SELECTION_TRANSFORM_ID, SHAPE_KINDS, type Scene, type SceneAdapterSelection, type SceneArrivalHandler, SceneArrivalRefused, SceneCanvas, type SceneCanvasAdapter, type SceneCanvasApi, type SceneCanvasHit, type SceneCanvasLayers, type SceneCanvasLongPress, type SceneCanvasProps, type SceneClipTargetsOptions, type Node as SceneNode, type SceneNodeClientRectOpts, type SceneRegistry, type SceneSlotConfig, type SceneSlotLayers, type SceneToAdapterOptions, SceneViewCanvas, type SceneViewCanvasProps, type SceneViewCull, type SceneViewDrawOne, type SceneViewLayers, type ScopedScene, type ScreenSlop, type SelectAdapter, type SelectFromLassoOptions, SelectIcon, type SelectionHandleStyle, type SelectionHandlesLayerOpts, type SelectionMoveOptions, type SelectionOutlineLayerOpts, type SelectionOverlayLayerOpts, type SelectionOverlaySlotConfig, type SelectionRotateOptions, type SelectionStore, type SelectionTransformOptions, SendBackwardIcon, SendToBackIcon, type SerializedLayer, type SerializedNode, type SerializedScene, type SerializedSceneHistory, type SetChildOrderArgs, type SetDataArgs, type SetLayerArgs, type SetLayoutArgs, type SetPathArgs, type SetPathFields, type SetSelectionArgs, type SetTextArgs, type ShapeCoversPointOptions, type ShapeKind, type ShapeKindDescriptor, type ShapeKindsWhere, type SiblingSlot, type SliceDep, type SliceLeaf, type SlicePiece, type SliceScratch, type SliceableNode, type SnapDep, SnapStrategy, type SpatialReference, type SpatialReferenceSources, type SpringPoseOptions, type StaggerSpringPoseOptions, type StandardSlotConfig, type StandardSlotName, StarIcon, type StarPoint, type StrokeRegionOptions, type StylusData, SubtractIcon, type SurfaceContribution, type SvgIngestOptions, type SvgUnpacker, type SystemLayerRecord, type SystemLayerSpec, TOOL_DRIVEN_ACTION_IDS, type TargetTransform, type TextEditDep, TextIcon, type ThresholdDragHandle, type ThresholdDragOptions, type Tool, type ToolDef, type ToolsApi, type TransformArgs, TrimIcon, type TweenPoseOptions, UNION_OF_CHILDREN, UndoIcon, UngroupIcon, UnionIcon, UnknownIcon, type UseAlignOptions, type UseAlignReturn, type UseBoneToolOptions, type UseBooleansOptions, type UseBooleansReturn, type UseDistributeOptions, type UseDistributeReturn, type UseDragGestureOptions, type UseDragRadialOptions, type UseDragRectOptions, type UseEyedropperToolOptions, type UseHandToolOptions, type UseHandleDragOptions, type UseHandleDragReturn, type UseHostAnchorOptions, type UseHoverTrackingArgs, type UseImageToolOptions, type UseKeyStateOptions, type UseKeybindingsOptions, type UseLassoSelectOptions, type UseLassoToolOptions, UseMoveOptions, type UseNodeOverlayFrameOptions, type UsePenToolOptions, type UsePointerStylusOptions, type UsePolygonToolOptions, type UsePoseRunOptions, UseResizeOptions, type UseResizePolicyOptions, type UseRigNodeOptions, type UseRotateOptions, type UseSceneOptions, type UseSceneTextEditOptions, type UseSceneTextEditReturn, type UseSceneTrivialOptions, type UseSelectToolOptions, type UseSelectionOptions, type UseSliceToolOptions, type UseStandardActionsOptions, type UseStarToolOptions, type UseToolsOptions, type UseWeightToolOptions, type UserLayerRecord, VERSION, VIEW_ANIMATION_KEY, type VelocityTracker, type VersionCheck, type ViewAnimationApi, type ViewAnimationOptions, type ViewApi, type ViewChannel, type ViewLike, type ViewRect, type ViewResolver, type ViewTarget, type ViewTransform, type ViewportDims, type ViewportLayer, type ViewportZoomAnimateOptions, type ViewportZoomOptions, type VisibilityRules, WHEEL_ZOOM_STEP, type WarmRenderOptions, WeaselProvider, type WeaselProviderProps, type WeighedPath, type WeightEnv, type WheelInput, type WheelPanOptions, type WheelPanOpts, type WorkspaceTintLayerOptions, type WrittenPoseTargetOptions, type ZoomBound, type ZoomClampOpts, type ZoomFactor, accentColorOf, actionIs, actionShortcuts, alignDeltaFor, alignTargetBounds, always, and, animateLifecycle, animateOnSetPose, annulusSemiAxes, applyBooleanOp, applyCreateOutlines, applyOpsTo, applyOutlineStroke, areaSelectAction, areaSelectContribution, asNodeId, axisAlignedBounds, bindRig, buildChromeCtx, buildDebugOverlayCommands, buildSceneViewCommands, canBringForward, canHover, canSendBackward, capabilityAll, capabilityIn, capabilityIs, capabilityNot, checkRequirements, clampView, clearSelectionAction, clipboardCopyAction, clipboardCutAction, clipboardPasteAction, clipboardPasteEventAction, cloneAction, coarsePointer, composeAffordanceLayer, composeRectPose, composeRigidPose, composeSelectionPose, composeWorldPose, composesFrames, computeFitViewport, computeSliceOps, computeWheelAction, cond, constrainTo45, createArrangeOp, createBoneOverlay, createChildrenLayer, createCornerResizeAffordance, createDebugOverlayLayer, createDebugSink, createDeleteOp, createHistory, createInsertOp, createKeyState, createLongPressFeedbackContribution, createMoveToIndexOp, createNodeProperties, createNodeRouting, createPaintedCursorLayer, createPathAnchorAffordances, createPathEditingOverlayLayer, createPathLayer, createPenPreviewLayer, createPoseFeed, createPoseOverrides, createPoseTarget, createRasterSession, createReflowTransition, createReorderOp, createReparentOp, createRigEditState, createRotationAffordance, createScene, createSelectionHandlesLayer, createSelectionOutlineLayer, createSelectionOverlayLayer, createSetChildOrderOp, createSetDataOp, createSetLayerOp, createSetLayoutOp, createSetPathOp, createSetSelectionOp, createSetTextOp, createTextLayer, createTransformOp, createVelocityTracker, createViewResolver, createViewportLayer, createWeightOverlay, createWrittenPoseTarget, cycleFill, dataRestPath, debugSnapshotArgs, decomposeRectPose, decomposeRigidPose, defaultCommitAdapter, defaultDrawOne, defaultNodeProperties, defaultNodeRouting, defaultPaintBounds, defaultVisibilityRules, definesFrame, depsUnchanged, derivedDepOf, derivedPose, dispatchApplyBatch, documentPose, dragPanContribution, dragPointOf, drawLayers, drawOneLayer, editAnchorsAction, editingLayer, effectivePose, enterTextEditAction, enumerateAnchors, findNodeShape, findShapeBounds, findShapeInk, findShapeSilhouette, fitToBounds, fitViewToBounds, fitZoom, flattenPreviews, focused, forEachCoalesced, gateLayer, gesturePlaneReader, gestureViewReader, gesturing, getAlpha01, getNodeShapes, getStylusData, hitAffordanceRegions, hitAnchor, hitRotationHandle, hostAnchorCss, hostAnchorRect, hovering, hoveringSelected, inPlane, inferredNodeProperties, inferredNodeRouting, insertAction, insertLayer, insertPreviewExtent, interpolateView, isLayerPainted, isLayerVisible, keySpecShortcut, kitTextHandler, lassoSelectAction, layoutArrivalHandler, makePinchZoomAction, makeViewportWheelPanAction, makeViewportZoomAction, mergeAlphaFromPrev, mergeContributions, modeDecorationLayer, modeIn, modeIs, modeNot, modifierHeld, momentum, moveAction, multiActive, nestedHitTester, never, normalizeView, normalizeZoom, not, onEmptyCanvas, opFactoryRegistry, openFilePicker, or, paintAlpha, paintWithAlpha, paintWithColor, paintedLayers, paletteInsertPaint, parseDebugFlags, pathOriginProjection, pathPaintOf, pathPoseDescriptor, pickTopMostHit, pinchZoomAction, placeSkeleton, placedRig, planPixelRender, pointRegionFrame, poseAxes, pressureToWidth, previewBooleanOp, rasterToPng, rebaseLocalPose, rebuildOp, reconcileSpecs, registerContentHandler, registerNodeShape, registerOpFactory, registeredOpNames, releaseCanvasRenderer, renderDebugSnapshot, renderNeeds, renderSceneToCanvas, renderSceneToPixels, resizeAction, resolveOverlays, resolvePreviews, resolveSpatialReference, resolveVisibility, rigFromNode, rigidRigApply, rotateAction, rotateAroundAABBCenter, rotationDegreesUnit, rotationHandle, satisfiesRange, sceneClipTargets, sceneFromJSON, sceneNodeClientRect, scenePoseTarget, sceneSelectionStore, sceneToAdapter, sceneUnitScopes, screenToWorld, screenTolerance, selectFromLasso, selectionAtLeast, selectionEmpty, selectionIs, selectionLayer, selectionMoveBindings, selectionMoveContribution, selectionResizeBindings, selectionResizeContribution, selectionRotateBindings, selectionRotateContribution, selectionTransformBindings, selectionTransformContribution, shapeCoversPoint, sliceAction, snap, snapRotationWithModifier, solid, springPose, stableStringify, staggerSpringPose, startThresholdDrag, strokeOf, strokeRegion, strokeWith, subscribeToSources, toHex8, translateRectPose, tweenPose, unionAABB, unionBounds, unionOfChildren, unionOfChildrenVia, unplaceSkeleton, useAlign, useAnimatedReflow, useAutoCenter, useBoneTool, useBooleans, useBooleansAdapter, useCanvasSize, useCreateOutlinesAdapter, useDecayLoop, useDeviceProfile, useDistribute, useDragGesture, useDragHandle, useDragRadial, useDragRect, useDropZone, useEllipseTool, useEyedropperTool, useGradientKinds, useHandTool, useHandleDrag, useHostAnchor, useHoverTracking, useImageTool, useKeyModifiers, useKeyState, useKeybindings, useLassoTool, useLayoutArrivals, useLineTool, useNodeOverlayFrame, usePaintKind, usePaintKinds, usePenTool, usePencilTool, usePointerStylus, usePolygonTool, usePoseDescriptorDepSource, usePoseRun, useRectTool, useResizePolicy, useRig, useRigNode, useScene, useSceneAdapter, useSceneTextEdit, useSelectTool, useSelection, useSliceDep, useSliceDepSource, useSliceTool, useStandardActions, useStarTool, useTextTool, useTools, useVelocityTracker, useViewAnimation, useViewAnimationOn, useWeightTool, viewAxes, viewToTransform, viewZoom, viewportDragPanAction, viewportWheelPanAction, viewportZoomAction, warmRender, watchDevicePixelRatio, weighedPaths, wheelPan, wheelZoom, wheelZoomFactor, when, withAlpha01, withCoord, workspaceTintLayer, worldPoseLookup, worldToScreen, zoomAt, zoomAtLeast };
|
|
11881
|
+
export { ACTION_GLYPHS, ANCHOR_HIT_BASE_PX, AREA_SELECT_ID, type ActionGlyphProps, type ActionShortcut, ActionsProviderIfRoot, type AddLayerSpec, type AddNodeSpec, type Affordance, type AffordanceBinding, type AffordanceRegion, type AffordanceRegionHit, type AlignAdapter, AlignBottomIcon, AlignCenterXIcon, AlignCenterYIcon, type AlignEdge, AlignLeftIcon, type AlignReference, AlignRightIcon, AlignTopIcon, type AnchorHit, type AnchorScratch, type AnchorState, type AnimateOnSetPoseOptions, type AnimateToBoundsOptions, type AnimatedReflow, type AnyTool, AreaSelectAdapter, type AreaSelectDep, type ArrangeArgs, type ArrangedPose, ArrowIcon, BUILTIN_TOOL_IDS, type BaseFeature, type BindRigOptions, type Bivariant, type BooleanOp, type BooleanOpOptions, type BooleanOpPreview, type BooleanOpResult, type BooleanPreviewPiece, type BooleanStrokes, type BooleansAdapter, BoundsConstraint, BringForwardIcon, BringToFrontIcon, type BuildChromeCtxArgs, type BuiltinShapeToolId, type BuiltinToolId, type BuiltinToolOptions, COMPOSITE_FEATURES, type CameraProps, type CanvasDebugSink, type CanvasExtensionApi, type CanvasHelpers, type CanvasLayers, type CanvasProps, type CanvasSize, type CanvasSizeSnapshot, type CanvasSurfaceHelpers, CanvasView, type CanvasViewCamera, type CanvasViewHandle, type CanvasViewHelpers, type CanvasViewProps, type CanvasViewState, type ChildOrder, type ChromeCtx, type ChromeId, type ChromeState, type ClampBounds, type ClipFromPoseFn, type ClipboardDep, type ClipboardIngestCtx, ClipboardSnapshot, type CoalescedCtx, type CommonAffordanceScratch, type ComposeSelectionPoseOpts, type CompositeFeature, type ComputeSliceOpsArgs, type ComputeSliceResult, type Condition, ContainerBounds, type ContainerNode, type ContentHandlerEntry, type Contribution, type ContributionChrome, type ContributionDepReader, type ContributionFrameCtx, type CopiesFromPoseFn, CopyIcon, type CornerResizeAffordanceOptions, type CornerResizeScratch, type CreateChildrenLayerOpts, type CreateDebugOverlayLayerOpts, type CreateOutlinesAdapter, CreateOutlinesIcon, type CreateOutlinesResult, type CreatePathEditingOverlayLayerOptions, type CreatePathLayerOpts, type CreatePenPreviewLayerOptions, type CreateTextLayerOpts, type CreateViewResolverOpts, type CreateViewportLayerOpts, CropIcon, CursorCoordsHud, type CursorCoordsHudProps, type CustomLayerEntry, type CustomPaintContext, CutIcon, DEFAULT_DEBUG_STROKES, DEFAULT_DEBUG_THEME, DEFAULT_FILL_COLOR, DEFAULT_HANDLE_SIZE, DEFAULT_INK, DEFAULT_MAX_ZOOM, DEFAULT_MIN_ZOOM, DEFAULT_PALETTE, DEFAULT_ROTATE_BEHAVIORS, DEFAULT_ROTATION_HANDLE_DISTANCE, DEFAULT_ROTATION_SNAP_STEP, DEFAULT_SHAPE_FILL, DEFAULT_STROKE_COLOR, DRAG_PAN_ID, type DebugConfig, type DebugFeature, type DebugSnapshot, type DebugStroke, type DebugStrokes, type DebugTheme, type DecayLoopConfig, type DefaultTextData, type DeleteArgs, DeleteIcon, DepRegistryProviderIfRoot, type DerivePathFn, type DerivePoseFn, type DerivedDep, DeviceProfileProvider, type DeviceProfileProviderProps, type Dims, type DistributeAdapter, type DistributeAxis, DistributeHorizontalIcon, type DistributeMode, DistributeVerticalIcon, DivideIcon, type DragGestureController, type DragGestureCtx, type DragGestureEndCtx, type DragGesturePhase, type DragGesturePoint, type DragHandleOptions, type DragPanParams, type DragPayload, type DragRadialController, type DragRadialCtx, type DragRadialEndCtx, type DragRadialPoint, type DragRadialState, type DragRectBounds, type DragRectController, type DragRectCtx, type DragRectEndCtx, type DragRectPoint, DrawCanvas, type DrawCanvasDraw, type DrawCanvasProps, type DropZoneOptions, DuplicateIcon, type EditAnchorsDep, type EditedLayerOf, EllipseIcon, ExcludeIcon, EyedropperIcon, FALLBACK_ACCENT, FEATURE_ACTION_IDS, type Feature, type FeedDelta, type FeedNode, type FitViewToBoundsOptions, type FlipAxis, type FlipPivot, FlipXIcon, FlipYIcon, type FrameStats, GHOST_STROKE, type GateLayerOptions, type GeneratedShape, type GeometryProjection, GestureContext, type GesturePreviewSource, type GestureSource, GroupIcon, HANDLE_BASE_PX, HandIcon, type InertiaConfig as HandToolInertiaConfig, type HandleDragEnd, type HandleDragPoint, type HeadlessCanvasLike, type HitTestView, type HostAnchorAlign, type HostAnchorInput, type HostAnchorOffset, type HostAnchorStyle, type HoverTracking, IDENTITY_POSE_COMPOSITION, INSERT_REPOSITION_BINDING, type IconProps, ImageIcon, type InertiaConfig, type IngestCtx, type IngestionDep, InsertAdapter, type InsertArgs, InsertBehavior, type InsertDep, type InsertExtras, type InsertIntoDep, type InsertLive, type InsertNodeFactory, type InsertOp, type InsertOverlayStyle, type InsertPaint, type InsertPreviewExtent, type InsertPreviewGeometry, type InsertPreviewLike, type InsertPreviewOverlay, type InsertToolOptions, IntersectIcon, KIT_SHAPE_KINDS, KIT_STANDARD_ACTION_IDS, KIT_VERSIONS, type KeyModifiers, type KeyState, type KeyStateAttachOptions, type KitInsertShape, type KitRequirements, type KitVersions, LONG_PRESS_FEEDBACK_ID, LassoHitMode, LassoIcon, LassoSelectAdapter, LassoSelectBehavior, type LassoSelectDep, type LayerCommandCache, type LayerDrawFailure, type LayerDrawSpan, LayerEnumerableAdapter, type LayerFrameStats, type LayerGroup, type LayerHit, type LayerRecord, type LayerSlotValue, type LayersMap, type LayoutDep, LayoutDropTargetMode, type LayoutFrame, type LayoutMove, type LayoutRef, LayoutStrategy, type LeafNode, type LifecycleAdapter, type LifecycleAnimation, LineIcon, type LinePoint, type LongPressFeedbackOptions, MergeIcon, type MomentumOptions, MoveAdapter, MoveBehavior, type MoveToIndexArgs, type NestedHitOpts, type NestedHitTester, type NodeAtPointDep, type NodeClientRect, type NodeInk, type NodeInkCtx, type NodeOverlayFrame, type NodePaintCtx, type NodeProperties, type NodePropertiesEntry, type NodeRouting, type NodeRoutingEntry, type NodeShapeEntry, type NodeSilhouetteCtx, type OpFactory, type OpenFilePickerOptions, type OpsApplier, OrderedAdapter, OriginProjection, type OutlinePathSpec, OutlineStrokeIcon, type OutlineStrokeResult, type Overlay, type OverlayPoint, type OverlayVisibilityId, PAINTED_CURSOR_LAYER_ID, PATH_ANCHOR_CHROME_ID, type Page, type PageLayoutOptions, type PagesLayerOptions, type PaintBoundsFn, PaintKindEntry, type PaintedSkins, type PanBounds, ParallaxOpts, PasteCtx, PasteIcon, PasteOmission, type PathAnchor, type PathAnchorAffordanceOptions, type PathEditHost, type PathEditingOverlayStyle, type PathPaint, type PathSymmetryDep, type PenContinuation, PenIcon, type PenPreviewStyle, type PenScratch, type PenSubpath, PencilIcon, type PencilPoint, PickHud, type PickHudProps, type PickSlop, type PickTopMostHitAdapter, type PinchZoomOptions, type PixelRenderPlan, type PlacedNode, type PlacedPage, type PlacedRig, PlaneMap, PointSnapBehavior, PointerProviderIfRoot, type PointerSample, type PointerStylusState, type PolygonGenerator, PolygonIcon, type PolygonPoint, type PoseAdapter, type PoseAnimationAdapter, type PoseCascade, type PoseClosure, type PoseComposition, PoseDescriptor, type PoseFeed, type PoseHold, type PoseOverride, type PoseOverrides, type PoseRun, type PoseRunCtx, type PoseRunStep, type PoseSource, type PoseTargetOptions, type PoseTargetScene, type PosedNode, type PressureToWidthOptions, type PreviewNode, RECT_POSE_COMPOSITION, RIGID_POSE_COMPOSITION, ROTATION_HANDLE_BASE_PX, type RasterImage, type RasterRenderArgs, type RasterSession, type RasterSessionOptions, type RecordedBounds, type RecordedHandle, type RecordedHitbox, type RecordedLayer, type RecordedOrigin, type RecordedSnap, type RecordedViewport, RectIcon, type RectPose, RedoIcon, type RedrawSource, type ReflowScene, ReflowTransition, type ReflowTransitionOptions, RegionPickView, type RegisterNodeShapeOptions, type RegisteredOp, type RenderDebugSnapshotArgs, type RenderLayer, type RenderNeeds, type RenderSceneToCanvasArgs, type RenderSceneToPixelsArgs, type ReorderArgs, type ReorderDirection, type ReorderRestoreEntry, type ReparentArgs, type RepeatableTransform, type RequirementMismatch, ResizeAdapter, type ResizePolicy, type ResolvableView, type ResolvedOverlay, type RestPath, RetractHandlesIcon, type Rig, type RigApply, type RigApplyContext, type RigEditState, type RigNodeData, type RigNodeParts, type RigNodeSource, type RigScene, RotateAdapter, RotateBehavior, RotatedPose, type RotationAffordanceOptions, type RotationHandle, type RotationScratch, SCENE_CANVAS_FEATURES, SCENE_HISTORY_FORM, SELECTION_MOVE_ID, SELECTION_RESIZE_ID, SELECTION_ROTATE_ID, SELECTION_TRANSFORM_ID, SHAPE_COUNT_RANGE, SHAPE_KINDS, STAR_RATIO_RANGE, type Scene, type SceneAdapterSelection, type SceneArrivalHandler, SceneArrivalRefused, SceneCanvas, type SceneCanvasAdapter, type SceneCanvasApi, type SceneCanvasHit, type SceneCanvasLayers, type SceneCanvasLongPress, type SceneCanvasProps, type SceneCanvasViewport, type SceneClipTargetsOptions, type Node as SceneNode, type SceneNodeClientRectOpts, type SceneRegistry, type SceneSlotConfig, type SceneSlotLayers, type SceneToAdapterOptions, SceneViewCanvas, type SceneViewCanvasProps, type SceneViewCull, type SceneViewDrawOne, type SceneViewLayers, type ScopedScene, type ScreenSlop, type SelectAdapter, type SelectFromLassoOptions, SelectIcon, type SelectionHandleStyle, type SelectionHandlesLayerOpts, type SelectionMoveOptions, type SelectionOutlineLayerOpts, type SelectionOverlayLayerOpts, type SelectionOverlaySlotConfig, type SelectionRotateOptions, type SelectionStore, type SelectionTransformOptions, SendBackwardIcon, SendToBackIcon, type SerializedLayer, type SerializedNode, type SerializedScene, type SerializedSceneHistory, type SetChildOrderArgs, type SetDataArgs, type SetLayerArgs, type SetLayoutArgs, type SetPathArgs, type SetPathFields, type SetSelectionArgs, type SetTextArgs, type ShapeCoversPointOptions, type ShapeGenerator, type ShapeKind, type ShapeKindDescriptor, type ShapeKindsWhere, type SiblingSlot, type SliceDep, SliceIcon, type SliceLeaf, type SlicePiece, type SliceScratch, type SliceableNode, type SnapDep, SnapStrategy, type SpatialReference, type SpatialReferenceSources, type SpringPoseOptions, type StaggerSpringPoseOptions, type StandardSlotConfig, type StandardSlotName, type StarGenerator, StarIcon, type StarPoint, type StrokeRegionOptions, type StylusData, SubtractIcon, type SurfaceContribution, type SvgIngestOptions, type SvgUnpacker, SymmetricHandlesIcon, type SystemLayerRecord, type SystemLayerSpec, TOOL_DRIVEN_ACTION_IDS, type TargetTransform, type TextEditDep, TextIcon, type ThresholdDragHandle, type ThresholdDragOptions, type Tool, type ToolDef, type ToolsApi, TransformAgainIcon, type TransformArgs, TrimIcon, type TweenPoseOptions, UNION_OF_CHILDREN, UndoIcon, UngroupIcon, UnionIcon, UnknownIcon, type UseAlignOptions, type UseAlignReturn, type UseBoneToolOptions, type UseBooleansOptions, type UseBooleansReturn, type UseDistributeOptions, type UseDistributeReturn, type UseDragGestureOptions, type UseDragRadialOptions, type UseDragRectOptions, type UseEyedropperToolOptions, type UseHandToolOptions, type UseHandleDragOptions, type UseHandleDragReturn, type UseHostAnchorOptions, type UseHoverTrackingArgs, type UseImageToolOptions, type UseKeyStateOptions, type UseKeybindingsOptions, type UseLassoSelectOptions, type UseLassoToolOptions, UseMoveOptions, type UseNodeOverlayFrameOptions, type UsePenToolOptions, type UsePointerStylusOptions, type UsePolygonToolOptions, type UsePoseRunOptions, UseResizeOptions, type UseResizePolicyOptions, type UseRigNodeOptions, type UseRotateOptions, type UseSceneOptions, type UseSceneTextEditOptions, type UseSceneTextEditReturn, type UseSceneTrivialOptions, type UseSelectToolOptions, type UseSelectionOptions, type UseSliceToolOptions, type UseStandardActionsOptions, type UseStarToolOptions, type UseToolsOptions, type UseWeightToolOptions, type UserLayerRecord, VERSION, VIEW_ANIMATION_KEY, type VelocityTracker, type VersionCheck, type ViewAnimationApi, type ViewAnimationOptions, type ViewApi, type ViewChannel, type ViewLike, type ViewRect, type ViewResolver, type ViewTarget, type ViewTransform, type ViewportDims, type ViewportLayer, type ViewportZoomAnimateOptions, type ViewportZoomOptions, type VisibilityRules, WHEEL_ZOOM_STEP, type WarmRenderOptions, WeaselProvider, type WeaselProviderProps, type WeighedPath, type WeightEnv, type WheelInput, type WheelPanOptions, type WheelPanOpts, type WorkspaceTintLayerOptions, type WrittenPoseTargetOptions, type ZoomAxis, type ZoomBound, type ZoomClampOpts, type ZoomFactor, accentColorOf, actionIs, actionShortcuts, adjacentPage, alignDeltaFor, alignTargetBounds, always, and, animateLifecycle, animateOnSetPose, annulusSemiAxes, applyBooleanOp, applyCreateOutlines, applyOpsTo, applyOutlineStroke, areaSelectAction, areaSelectContribution, asNodeId, axisAlignedBounds, axisZoomFactor, bindRig, buildChromeCtx, buildDebugOverlayCommands, buildSceneViewCommands, canBringForward, canHover, canSendBackward, capabilityAll, capabilityIn, capabilityIs, capabilityNot, checkRequirements, clampShapeGenerator, clampView, clearSelectionAction, clipboardCopyAction, clipboardCutAction, clipboardPasteAction, clipboardPasteEventAction, cloneAction, coarsePointer, composeAffordanceLayer, composeRectPose, composeRigidPose, composeSelectionPose, composeWorldPose, composesFrames, computeFitViewport, computeSliceOps, computeWheelAction, cond, constrainTo45, createArrangeOp, createBoneOverlay, createChildrenLayer, createCornerResizeAffordance, createDebugOverlayLayer, createDebugSink, createDeleteOp, createHistory, createInsertOp, createKeyState, createLongPressFeedbackContribution, createMoveToIndexOp, createNodeProperties, createNodeRouting, createPaintedCursorLayer, createPathAnchorAffordances, createPathEditingOverlayLayer, createPathLayer, createPenPreviewLayer, createPoseFeed, createPoseOverrides, createPoseTarget, createRasterSession, createReflowTransition, createReorderOp, createReparentOp, createRigEditState, createRotationAffordance, createScene, createSelectionHandlesLayer, createSelectionOutlineLayer, createSelectionOverlayLayer, createSetChildOrderOp, createSetDataOp, createSetLayerOp, createSetLayoutOp, createSetPathOp, createSetSelectionOp, createSetTextOp, createTextLayer, createTransformOp, createVelocityTracker, createViewResolver, createViewportLayer, createWeightOverlay, createWrittenPoseTarget, cycleFill, dataRestPath, debugSnapshotArgs, decomposeRectPose, decomposeRigidPose, defaultCommitAdapter, defaultDrawOne, defaultNodeProperties, defaultNodeRouting, defaultPaintBounds, defaultVisibilityRules, definesFrame, depsUnchanged, derivedDepOf, derivedPose, dispatchApplyBatch, documentPose, dragPanContribution, dragPointOf, drawLayers, drawOneLayer, editAnchorsAction, editingLayer, effectivePose, enterTextEditAction, enumerateAnchors, findNodeShape, findShapeBounds, findShapeInk, findShapeSilhouette, fitToBounds, fitViewToBounds, fitViewToPage, fitZoom, flattenPreviews, focused, forEachCoalesced, forgetTransform, gateLayer, gesturePlaneReader, gestureViewReader, gesturing, getAlpha01, getNodeShapes, getStylusData, hitAffordanceRegions, hitAnchor, hitRotationHandle, hostAnchorCss, hostAnchorRect, hovering, hoveringSelected, inPlane, inferredNodeProperties, inferredNodeRouting, insertAction, insertLayer, insertPreviewExtent, insertRepositionAction, interpolateView, isLayerPainted, isLayerVisible, isOverChildren, isShapeGenerator, keySpecShortcut, kitTextHandler, lassoSelectAction, lastTransform, layoutPages, makePinchZoomAction, makeViewportWheelPanAction, makeViewportZoomAction, mergeAlphaFromPrev, mergeContributions, modeDecorationLayer, modeIn, modeIs, modeNot, modifierHeld, momentum, moveAction, multiActive, nestedHitTester, never, normalizeView, normalizeZoom, not, onEmptyCanvas, opFactoryRegistry, openFilePicker, or, overChildren, pageAt, pageOfBounds, pagesBounds, pagesLayer, paintAlpha, paintWithAlpha, paintWithColor, paintedLayers, paletteInsertPaint, parseDebugFlags, pathOriginProjection, pathPaintOf, pathPoseDescriptor, pickTopMostHit, pinchZoomAction, placeSkeleton, placedRig, planPixelRender, pointRegionFrame, poseAxes, pressureToWidth, previewBooleanOp, rasterToPng, rebaseLocalPose, rebuildOp, reconcileSpecs, recordTransform, regenerateShape, registerContentHandler, registerNodeShape, registerOpFactory, registeredOpNames, releaseCanvasRenderer, renderDebugSnapshot, renderNeeds, renderSceneToCanvas, renderSceneToPixels, resizeAction, resolveOverlays, resolvePreviews, resolveSpatialReference, resolveVisibility, rigFromNode, rigidRigApply, rotateAction, rotateAroundAABBCenter, rotationDegreesUnit, rotationHandle, satisfiesRange, sceneClipTargets, sceneFromJSON, sceneNodeClientRect, scenePoseTarget, sceneSelectionStore, sceneToAdapter, sceneUnitScopes, screenToWorld, screenTolerance, selectFromLasso, selectionAtLeast, selectionEmpty, selectionIs, selectionLayer, selectionMoveBindings, selectionMoveContribution, selectionResizeBindings, selectionResizeContribution, selectionRotateBindings, selectionRotateContribution, selectionTransformBindings, selectionTransformContribution, settleShapeGenerator, shapeCoversPoint, shapeGeneratorOf, shapeGeneratorPath, sliceAction, snap, snapRotationWithModifier, solid, splitOverChildren, springPose, stableStringify, staggerSpringPose, startThresholdDrag, strokeOf, strokeRegion, strokeWith, subscribeToSources, toHex8, translateRectPose, tweenPose, unionAABB, unionBounds, unionOfChildren, unionOfChildrenVia, unplaceSkeleton, useAlign, useAnimatedReflow, useAutoCenter, useBoneTool, useBooleans, useBooleansAdapter, useCanvasSize, useCreateOutlinesAdapter, useDecayLoop, useDeviceProfile, useDistribute, useDragGesture, useDragHandle, useDragRadial, useDragRect, useDropZone, useEllipseTool, useEyedropperTool, useGradientKinds, useHandTool, useHandleDrag, useHostAnchor, useHoverTracking, useImageTool, useKeyModifiers, useKeyState, useKeybindings, useLassoTool, useLineTool, useNodeOverlayFrame, usePaintKind, usePaintKinds, usePenTool, usePencilTool, usePointerStylus, usePolygonTool, usePoseDescriptorDepSource, usePoseRun, useRectTool, useResizePolicy, useRig, useRigNode, useScene, useSceneAdapter, useSceneTextEdit, useSelectTool, useSelection, useSliceDep, useSliceDepSource, useSliceTool, useStandardActions, useStarTool, useTextTool, useTools, useVelocityTracker, useViewAnimation, useViewAnimationOn, useWeightTool, viewAxes, viewToTransform, viewZoom, viewportDragPanAction, viewportWheelPanAction, viewportZoomAction, warmRender, watchDevicePixelRatio, weighedPaths, wheelPan, wheelZoom, wheelZoomFactor, when, withAlpha01, withCoord, withoutShapeGenerator, workspaceTintLayer, worldPoseLookup, worldToScreen, zoomAt, zoomAtLeast };
|