@weasel-js/core 1.4.2 → 1.4.4
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 +742 -0
- package/dist/{DrawCommand-Ch8W63oQ.d.ts → DrawCommand-CD-ug3d9.d.ts} +45 -1
- package/dist/{pointSnapToGrid-Dmthv94u.d.ts → autoPoseDescriptor-DF1SnnSx.d.ts} +18 -3
- package/dist/{stroke-Dq8nL4A2.d.ts → builtins-BXFBXegF.d.ts} +251 -102
- package/dist/{chunk-Y5KS66G7.js → chunk-2VXGHUVL.js} +4 -4
- package/dist/{chunk-Y5KS66G7.js.map → chunk-2VXGHUVL.js.map} +1 -1
- package/dist/{chunk-2KKYDDDD.js → chunk-4RJP2N2L.js} +43 -21
- package/dist/chunk-4RJP2N2L.js.map +1 -0
- package/dist/{chunk-TORKRNFY.js → chunk-BL65SHCX.js} +83 -8
- package/dist/chunk-BL65SHCX.js.map +1 -0
- package/dist/{chunk-MXFSHJOM.js → chunk-D4AAWR64.js} +4 -4
- package/dist/{chunk-MXFSHJOM.js.map → chunk-D4AAWR64.js.map} +1 -1
- package/dist/{chunk-ZB7UYJVG.js → chunk-DOBSZOPR.js} +3 -3
- package/dist/{chunk-ZB7UYJVG.js.map → chunk-DOBSZOPR.js.map} +1 -1
- package/dist/{chunk-BLJNRMKB.js → chunk-PRGBGMH3.js} +3 -3
- package/dist/{chunk-BLJNRMKB.js.map → chunk-PRGBGMH3.js.map} +1 -1
- package/dist/{chunk-KIVJXUYE.js → chunk-R3AWPTLZ.js} +2779 -1660
- package/dist/chunk-R3AWPTLZ.js.map +1 -0
- package/dist/{chunk-67KE7SDP.js → chunk-T3UQ3F6R.js} +4 -4
- package/dist/{chunk-67KE7SDP.js.map → chunk-T3UQ3F6R.js.map} +1 -1
- package/dist/{chunk-SBFC6J3C.js → chunk-WPM42WJP.js} +3 -3
- package/dist/{chunk-SBFC6J3C.js.map → chunk-WPM42WJP.js.map} +1 -1
- package/dist/clipboard.d.ts +2 -2
- package/dist/clipboard.js +3 -3
- package/dist/clone.d.ts +2 -2
- package/dist/clone.js +3 -3
- package/dist/{geometry-Dtt_k6Dq.d.ts → geometry-6fCNhAux.d.ts} +3 -3
- package/dist/{grid-nnXU4VjN.d.ts → grid-0Pbn5B2C.d.ts} +1 -14
- package/dist/index.d.ts +330 -288
- package/dist/index.js +9 -9
- package/dist/insert.d.ts +3 -3
- package/dist/insert.js +1 -1
- package/dist/move.d.ts +4 -4
- package/dist/move.js +3 -3
- package/dist/{options-CdFl510T.d.ts → options-DbYLImvq.d.ts} +1 -1
- package/dist/{registry-BwY_DxJM.d.ts → registry-BY-wI9gm.d.ts} +98 -8
- package/dist/renderer.d.ts +32 -4
- package/dist/renderer.js +9 -9
- package/dist/resize.d.ts +5 -4
- package/dist/resize.js +2 -2
- package/dist/routing.d.ts +6 -6
- package/dist/routing.js +1 -1
- package/dist/{types-XBcDEp3Y.d.ts → types-DEALFt5F.d.ts} +10 -6
- package/dist/{types-DIQAisSG.d.ts → types-bcc7jcUy.d.ts} +116 -15
- package/dist/{types-miXHGrZM.d.ts → types-ei3UMl9R.d.ts} +1 -1
- package/package.json +9 -9
- package/dist/chunk-2KKYDDDD.js.map +0 -1
- package/dist/chunk-KIVJXUYE.js.map +0 -1
- package/dist/chunk-TORKRNFY.js.map +0 -1
package/dist/index.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
export { ALWAYS, ANCHOR_HIT_BASE_PX, ActionsProviderIfRoot, ActiveToolContextProvider, ActiveToolContextProviderIfRoot, ArrowIcon, BUILTIN_MARKERS, BUNDLE_TOOLS, COARSE_TARGET_SCALE, CURVE_REPS, CanvasView, ColorOverrideRegistry, CropIcon, CursorCoordsHud, DEFAULT_ALPHA_DECAY, DEFAULT_ALPHA_MIN, DEFAULT_DEBUG_STROKES, DEFAULT_DEBUG_THEME, DEFAULT_DEVICE_PROFILE, DEFAULT_FILL_COLOR, DEFAULT_HANDLE_SIZE, DEFAULT_MAX_ZOOM, DEFAULT_MIN_ZOOM, DEFAULT_PALETTE, DEFAULT_ROTATION_HANDLE_DISTANCE, DEFAULT_SHAPE_FILL, DEFAULT_STROKE_COLOR, DEFAULT_TEXT_STYLE, DEFAULT_VELOCITY_DECAY, DepRegistryProviderIfRoot, DeviceProfileProvider, DivideIcon, EASINGS, EllipseIcon, ExcludeIcon, EyedropperIcon, FALLBACK_FIT_VIEW, GHOST_STROKE, HANDLE_BASE_PX, HandIcon, IDENTITY_JOINT, IDENTITY_POSE_COMPOSITION, ImageIcon, IntersectIcon, KIT_SHAPE_KINDS, LassoIcon, LineIcon, MARKDOWN_RUN_GRAMMAR, MIXED, MOVE_ANCHORS, MinimapCanvas, NEVER, PAINTED_CURSOR_LAYER_ID, PATH_ANCHOR_CHROME_ID, PenIcon, PencilIcon, PickHud, PointerProviderIfRoot, PolygonIcon, RECT_ALIGN_PROJECTION, ROTATION_HANDLE_BASE_PX, RectIcon, SCRIPT_METRICS, SPRING_PRESETS, SPRITE_STRIDE, STROKE_DASH_RATIOS, SceneCanvas, SceneViewCanvas, SelectIcon, SelectionContextProvider, SelectionContextProviderIfRoot, StarIcon, SubtractIcon, TOOL_PREF_KINDS, TextIcon, UnionIcon, UnknownIcon, VERSION, VIEW_ANIMATION_KEY, WeaselProvider, _resetMarkersForTests, _resetPaintKindsForTests, aabbCenter, actionIs, actionShortcuts, alignDeltaFor, alignInsertBehavior, alignMoveBehavior, alignResizeBehavior, alignedStrokeRect, always, and, animateLifecycle, animateOnSetPose, annulusSemiAxes, applyBooleanOp, applyStyleToRange, areaSelectAction, arrayAdapter, asNodeId, asPaint, axisAlignedBounds, bakeCursor, bezierCubic, bezierQuadratic, blendPoses, buildChromeCtx, buildRuleCtx, buildSceneViewCommands, cachedLayoutRuns, canBringForward, canHover, canQueryLocalFonts2 as canQueryLocalFonts, canSendBackward, capabilityAll, capabilityIn, capabilityIs, capabilityNot, caretIndexAt, cellAt, charOffsetToDomPosition, clampView, clearSelectionAction, clientToCanvas, clipboardCopyAction, clipboardCutAction, cloneAction, coarsePointer, composeAffordanceLayer, composePath, composeRectPose, composeSelectionPose, composeWorldPose, computeFitView, computeFitViewport, computeIndicatorCommand, computeWheelAction, cond, constrainTo45, containedThenNearest, countPathAnchors, createCellHighlightLayer, createChildrenLayer, createCornerResizeAffordance, createDebugOverlayLayer, createDebugSink, createDispatcher, createGridLayer, createGuidesLayer, createHistory, createMarkdownRenderer, createMoveToIndexOp, createNodeProperties, createNodeRouting, createPaintedCursorLayer, createPaintedCursorState, createParallaxLayer, createPathAnchorAffordances, createPathEditingOverlayLayer, createPathLayer, createPenPreviewLayer, createReorderOp, createRotationAffordance, createScene, createSelectionHandlesLayer, createSelectionOutlineLayer, createSelectionOverlayLayer, createSetDataOp, createSetLayerOp, createSetPathOp, createSetTextOp, createTextLayer, createVelocityTracker, createViewResolver, createViewportLayer, cubicBezierEasing, cursorFor, cycleVertexColors, dashForStrokeStyle, decomposePath, decomposeRectPose, defaultCommitAdapter, defaultDrawOne, defaultLabelTextRenderer, defaultNodeProperties, defaultNodeRouting, defaultVisibilityRules, defineTool, defineViewportTool, deriveAlignmentGuides, deriveParallaxView, describeRule, domPositionToCharOffset, domToRuns, drawLayers, drawOneLayer, 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, editAnchorsAction, enableLocalFontOutlines2 as enableLocalFontOutlines, enterTextEditAction, enumerateAnchors, evaluate, fillInPoseFrame, fillToBoundsFrame, findNodeShape, findShapeInk, findShapeSilhouette, fitTextPose, fitToBounds, fitViewToBounds, fitZoom, focused, fontString, forEachCoalesced, frameRect, freeform, gateLayer, gesturing, getAlpha01, getImageBitmap, getMarker, getNodeShapes, getPaintKind, getStylusData, gradientForBounds, gradientGeometry, hasFontOutlines2 as hasFontOutlines, hexToRgba, hitAffordanceRegions, hitAnchor, hitRotationHandle, hostAnchorCss, hostAnchorRect, hovering, hoveringSelected, imageStatus, inferredNodeProperties, inferredNodeRouting, insertAction, interpolateView, isBuiltinToolPref, isCanvasFont2 as isCanvasFont, isEditableTarget, isGradientFill, isLayerPainted, isLayerVisible, isPatternSpec, keySpecShortcut, lassoSelectAction, layoutMarkdown, layoutRuns, lerpColorArray, lerpOklab, lerpOklch, linear, listFontOutlines2 as listFontOutlines, listMarkers, listPaintKinds, liveScope, makePinchZoomAction, makeViewportWheelPanAction, makeViewportZoomAction, markdownToRuns, markerDrawCommands, markerInset, markerKeyOf, markerSites, mat3, matchAlignment, matchesKeyBinding, meanScale, measureText, measureTextBounds, measuredWidth, mergeAlphaFromPrev, mergeContributions, modeIn, modeIs, modeNot, modifierHeld, momentum, moveAction, multiActive, nearest, nearestWithin, nestedHitTester, never, nodeHasFlag, none, normalizeHex, not, nurbs, oklabToOklch, oklabToSrgbU8, oklchToOklab, openFilePicker, openPointerSession, or, outlineStatus2 as outlineStatus, paintAlpha, paintKindOf, paintWithAlpha, paintWithColor, parseColor, parseColorToRgba255, parseDebugFlags, pathContainsPoint, pathContainsPolygon, pathContainsRect, pathDistanceToPoint, pathDivide, pathExclude, pathFromD, pathInPoseFrame, pathInWorld, pathIntersect, pathIntersectsPolygon, pathIntersectsRect, pathOriginProjection, pathSubtract, pathToAnchors, pathUnion, pickTopMostHit, pinchZoomAction, planPixelRender, pointInRotatedRect, pointInTextPose, poseRotationOf, pressureToWidth, rainbowVertexColors, rebaseLocalPose, rectCorners, registerCanvasFont2 as registerCanvasFont, registerContentHandler, registerFont2 as registerFont, registerFontOutlines2 as registerFontOutlines, registerMarker, registerNodeShape, registerPaintKind, renderLabel, renderSceneToCanvas, renderSceneToPixels, resizeAction, resolveAlign, resolveColor, resolveCursor, resolveCursorTier, resolveDeviceProfile, resolveEasing, resolveFillPattern, resolveMarkerSize, resolveParams, resolvePatternSpec, resolveRuns, resolveSkeleton, resolveStrokeWidth, resolveTextStyle, resolveVisibility, rgbaToHex, rotateAction, rotateAroundAABBCenter, rotatePathAround, rotatePoint, rotatedRectCorners, rotationDegreesUnit, rotationHandle, roundToCell, runsToDom, runsToMarkdown, runsToPlainText, sampleGradientStops, sampleTrack, sceneFromJSON, sceneNodeClientRect, sceneSelectionStore, sceneToAdapter, scopeBindings, screenToWorld, selectFromLasso, selectionAtLeast, selectionEmpty, selectionIs, setFlagOverRange, shapeCoversPoint, sliceAction, snapPoint, solid, solidVertexColors, specificity, spiro, splitPathByLine, splitSubpaths, springPose, springVertexColors, srgbU8ToOklab, staggerVertexColors, startThresholdDrag, strokeDashStyleOf, strokeInsets, strokeOf, strokeWith, styleAtRange, subscribeGlyphReady2 as subscribeGlyphReady, subscribeImageReady, textCommand, textCommandFromRuns, textLineBoxes, tileGrid, toHex8, toRuns, translatePoseViaDescriptor, translateRectPose, trimPolyline, tweenPose, tweenVertexColors, unionAABB, unionBounds, unionBoundsPath, unregisterCanvasFont2 as unregisterCanvasFont, unregisterFontOutlines2 as unregisterFontOutlines, useActiveToolContext, useAlign, useAnimator, useArrayAdapter, useAutoCenter, useBooleans, useBooleansAdapter, useCanvasFocus, useCanvasSize, useDecayLoop, useDeviceProfile, useDistribute, useDragGesture, useDragHandle, useDragRadial, useDragRect, useDropZone, useEllipseTool, useEyedropperTool, useGestureDispatcher, useGridCellHover, useGuides, useHandTool, useHandleDrag, useHostAnchor, useHoverTracking, useImageTool, useKeybindings, useLassoTool, useLineTool, useNodeOverlayFrame, useOptionalActiveToolContext, usePenTool, usePencilTool, usePinchGesture,
|
|
2
|
-
export { ActionDisabledReason, ActionsProvider, DepRegistryProvider, actionBindings, evaluateEnabled, useAction, useActionsRegistry, useDepRegistry, useDepSource, useOptionalDepRegistry } from './chunk-
|
|
3
|
-
export { createReparentOp, createTransformOp, deleteScratch, getScratch, scratchKey, setScratch, snap } from './chunk-
|
|
4
|
-
export { CORNER_ANCHORS, cornerPoint, cornerResizeHandles, hitCornerHandle, pointSnapToGrid } from './chunk-
|
|
5
|
-
export { DEFAULT_FLATTEN_TOLERANCE, DEFAULT_GUIDE_TOLERANCE_PX, IMPERIAL_INCHES, METRIC_MM, PATH_C, PATH_CMD_LENGTHS, PATH_L, PATH_M, PATH_Q, PATH_Z, PIXELS, PathBuilder, RECT_ORIGIN_PROJECTION, RECT_POSE_DESCRIPTOR, ROTATED_POSE_DESCRIPTOR, boundsOfPath, ellipsePath, flattenCubic, flattenCubicWithArcLen, flattenQuadratic, flattenQuadraticWithArcLen, formatUnit, gridSnapStrategy, guideSnapStrategy, linePath, pathCommandCoordCount, pathPoseDescriptor, pointInPath, pointToGridCell, polygonFromPoints, polylineFromPoints, pxExtent, rectPath, regularPolygonPath, resolveUnit, scaleDelta, scalePathToBounds, starPath, transformPath, translatePath, translatePolygonInPlace, withinPxBox, withinPxRadius } from './chunk-
|
|
6
|
-
export { PointerContextProvider, WEASEL_CLIPBOARD_MIME, WEASEL_CLIPBOARD_MIME_WEB, applyOpsTo, buildWeaselClipboardText, dispatchApplyBatch, dlog, dwarn, embedWeaselMetadataInSvg, extractWeaselClipboardFromSvg, isDebugEnabled, parseWeaselClipboardText, sniffWeaselClipboardText, useClipboardOps, usePointerContext } from './chunk-
|
|
7
|
-
export { cloneByAltDrag } from './chunk-
|
|
8
|
-
export { createSetSelectionOp } from './chunk-
|
|
9
|
-
export { createDeleteOp, createInsertOp, rebuildOp, registerOpFactory, registeredOpNames } from './chunk-
|
|
1
|
+
export { ALWAYS, ANCHOR_HIT_BASE_PX, ActionsProviderIfRoot, ActiveToolContextProvider, ActiveToolContextProviderIfRoot, ArrowIcon, BUILTIN_MARKERS, BUNDLE_TOOLS, COARSE_TARGET_SCALE, CURVE_REPS, CanvasView, ColorOverrideRegistry, CropIcon, CursorCoordsHud, DEFAULT_ALPHA_DECAY, DEFAULT_ALPHA_MIN, DEFAULT_DEBUG_STROKES, DEFAULT_DEBUG_THEME, DEFAULT_DEVICE_PROFILE, DEFAULT_FILL_COLOR, DEFAULT_HANDLE_SIZE, DEFAULT_MAX_ZOOM, DEFAULT_MIN_ZOOM, DEFAULT_PALETTE, DEFAULT_ROTATION_HANDLE_DISTANCE, DEFAULT_SHAPE_FILL, DEFAULT_STROKE_COLOR, DEFAULT_TEXT_STYLE, DEFAULT_VELOCITY_DECAY, DepRegistryProviderIfRoot, DeviceProfileProvider, DivideIcon, EASINGS, EllipseIcon, ExcludeIcon, EyedropperIcon, FALLBACK_FIT_VIEW, GHOST_STROKE, HANDLE_BASE_PX, HandIcon, IDENTITY_JOINT, IDENTITY_POSE_COMPOSITION, ImageIcon, IntersectIcon, KIT_SHAPE_KINDS, KIT_STANDARD_ACTION_IDS, LassoIcon, LineIcon, MARKDOWN_RUN_GRAMMAR, MIXED, MOVE_ANCHORS, MinimapCanvas, NEVER, PAINTED_CURSOR_LAYER_ID, PATH_ANCHOR_CHROME_ID, PenIcon, PencilIcon, PickHud, PointerProviderIfRoot, PolygonIcon, RECT_ALIGN_PROJECTION, ROTATION_HANDLE_BASE_PX, RectIcon, SCRIPT_METRICS, SPRING_PRESETS, SPRITE_STRIDE, STROKE_DASH_RATIOS, SceneCanvas, SceneViewCanvas, SelectIcon, SelectionContextProvider, SelectionContextProviderIfRoot, StarIcon, SubtractIcon, TOOL_PREF_KINDS, TextIcon, UNION_OF_CHILDREN, UnionIcon, UnknownIcon, VERSION, VIEW_ANIMATION_KEY, WHEEL_ZOOM_STEP, WeaselProvider, _resetMarkersForTests, _resetPaintKindsForTests, aabbCenter, actionIs, actionShortcuts, alignDeltaFor, alignInsertBehavior, alignMoveBehavior, alignResizeBehavior, alignedStrokeRect, always, and, animateLifecycle, animateOnSetPose, annulusSemiAxes, applyBooleanOp, applyStyleToRange, areaSelectAction, arrayAdapter, asNodeId, asPaint, axisAlignedBounds, bakeCursor, bezierCubic, bezierQuadratic, blendPoses, blur, buildChromeCtx, buildRuleCtx, buildSceneViewCommands, cachedLayoutRuns, canBringForward, canHover, canQueryLocalFonts2 as canQueryLocalFonts, canSendBackward, capabilityAll, capabilityIn, capabilityIs, capabilityNot, caretIndexAt, cellAt, charOffsetToDomPosition, clampView, clearSelectionAction, clientToCanvas, clipboardCopyAction, clipboardCutAction, cloneAction, coarsePointer, composeAffordanceLayer, composePath, composeRectPose, composeSelectionPose, composeWorldPose, computeFitView, computeFitViewport, computeIndicatorCommand, computeWheelAction, cond, constrainTo45, containedThenNearest, countPathAnchors, createCellHighlightLayer, createChildrenLayer, createCornerResizeAffordance, createDebugOverlayLayer, createDebugSink, createDispatcher, createGridLayer, createGuidesLayer, createHistory, createMarkdownRenderer, createMoveToIndexOp, createNodeProperties, createNodeRouting, createPaintedCursorLayer, createPaintedCursorState, createParallaxLayer, createPathAnchorAffordances, createPathEditingOverlayLayer, createPathLayer, createPenPreviewLayer, createPoseOverrides, createReorderOp, createRotationAffordance, createScene, createSelectionHandlesLayer, createSelectionOutlineLayer, createSelectionOverlayLayer, createSetDataOp, createSetLayerOp, createSetPathOp, createSetTextOp, createSimulation, createTextLayer, createVelocityTracker, createViewResolver, createViewportLayer, cubicBezierEasing, cursorFor, cycleVertexColors, dashForStrokeStyle, decomposePath, decomposeRectPose, defaultCommitAdapter, defaultDrawOne, defaultLabelTextRenderer, defaultNodeProperties, defaultNodeRouting, defaultVisibilityRules, defineTool, defineViewportTool, deriveAlignmentGuides, deriveParallaxView, derivedDepOf, derivedPose, describeRule, documentPose, domPositionToCharOffset, domToRuns, drawLayers, drawOneLayer, 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, editAnchorsAction, effectivePose, enableLocalFontOutlines2 as enableLocalFontOutlines, enterTextEditAction, enumerateAnchors, evaluate, fillInPoseFrame, fillToBoundsFrame, findNodeShape, findShapeInk, findShapeSilhouette, fitTextPose, fitToBounds, fitViewToBounds, fitZoom, focused, fontString, forEachCoalesced, frameRect, freeform, gateLayer, gesturing, getAlpha01, getImageBitmap, getMarker, getNodeShapes, getPaintKind, getStylusData, gradientForBounds, gradientGeometry, hasFontOutlines2 as hasFontOutlines, hexToRgba, hitAffordanceRegions, hitAnchor, hitRotationHandle, hostAnchorCss, hostAnchorRect, hovering, hoveringSelected, imageStatus, inferredNodeProperties, inferredNodeRouting, insertAction, interpolateView, isBuiltinToolPref, isCanvasFont2 as isCanvasFont, isEditableTarget, isGradientFill, isLayerPainted, isLayerVisible, isPatternSpec, keySpecShortcut, lassoSelectAction, layoutMarkdown, layoutRuns, lerpColorArray, lerpOklab, lerpOklch, linear, listFontOutlines2 as listFontOutlines, listMarkers, listPaintKinds, liveScope, makePinchZoomAction, makeViewportWheelPanAction, makeViewportZoomAction, markdownToRuns, markerDrawCommands, markerInset, markerKeyOf, markerSites, mat3, matchAlignment, matchesKeyBinding, meanScale, measureText, measureTextBounds, measuredWidth, mergeAlphaFromPrev, mergeContributions, modeIn, modeIs, modeNot, modifierHeld, momentum, moveAction, multiActive, nearest, nearestWithin, nestedHitTester, never, nodeHasFlag, none, normalizeHex, not, nurbs, oklabToOklch, oklabToSrgbU8, oklchToOklab, openFilePicker, openPointerSession, or, outlineStatus2 as outlineStatus, paintAlpha, paintKindOf, paintWithAlpha, paintWithColor, parseColor, parseColorToRgba255, parseDebugFlags, pathContainsPoint, pathContainsPolygon, pathContainsRect, pathDistanceToPoint, pathDivide, pathExclude, pathFromD, pathInPoseFrame, pathInWorld, pathIntersect, pathIntersectsPolygon, pathIntersectsRect, pathOriginProjection, pathSubtract, pathToAnchors, pathUnion, pickTopMostHit, pinchZoomAction, planPixelRender, pointAlongPath, pointInRotatedRect, pointInTextPose, poseRotationOf, pressureToWidth, rainbowVertexColors, rebaseLocalPose, rectCorners, registerCanvasFont2 as registerCanvasFont, registerContentHandler, registerEffect, registerFont2 as registerFont, registerFontOutlines2 as registerFontOutlines, registerMarker, registerNodeShape, registerPaintKind, renderLabel, renderSceneToCanvas, renderSceneToPixels, resizeAction, resolveAlign, resolveColor, resolveCursor, resolveCursorTier, resolveDeviceProfile, resolveEasing, resolveFillPattern, resolveMarkerSize, resolveParams, resolvePatternSpec, resolveRuns, resolveSkeleton, resolveStrokeWidth, resolveTextStyle, resolveVisibility, rgbaToHex, rotateAction, rotateAroundAABBCenter, rotatePathAround, rotatePoint, rotatedRectCorners, rotationDegreesUnit, rotationHandle, roundToCell, runsToDom, runsToMarkdown, runsToPlainText, sampleGradientStops, sampleTrack, sceneFromJSON, sceneNodeClientRect, sceneSelectionStore, sceneToAdapter, scopeBindings, screenToWorld, selectFromLasso, selectionAtLeast, selectionEmpty, selectionIs, setFlagOverRange, shapeCoversPoint, sliceAction, snapPoint, solid, solidVertexColors, specificity, spiro, splitPathByLine, splitSubpaths, springPose, springVertexColors, srgbU8ToOklab, staggerVertexColors, startThresholdDrag, strokeDashStyleOf, strokeInsets, strokeOf, strokeWith, styleAtRange, subscribeGlyphReady2 as subscribeGlyphReady, subscribeImageReady, textCommand, textCommandFromRuns, textLineBoxes, tileGrid, toHex8, toRuns, translatePoseViaDescriptor, translateRectPose, trimPolyline, tweenPose, tweenVertexColors, unionAABB, unionBounds, unionBoundsPath, unionOfChildren, unregisterCanvasFont2 as unregisterCanvasFont, unregisterFontOutlines2 as unregisterFontOutlines, useActiveToolContext, useAlign, useAnimator, useArrayAdapter, useAutoCenter, useBooleans, useBooleansAdapter, useCanvasFocus, useCanvasSize, useDecayLoop, useDeviceProfile, useDistribute, useDragGesture, useDragHandle, useDragRadial, useDragRect, useDropZone, useEllipseTool, useEyedropperTool, useGestureDispatcher, useGridCellHover, useGuides, useHandTool, useHandleDrag, useHostAnchor, useHoverTracking, useImageTool, useKeybindings, useLassoTool, useLineTool, useNodeOverlayFrame, useOptionalActiveToolContext, usePenTool, usePencilTool, usePinchGesture, usePointerStylus, usePolygonTool, usePoseRun, usePublishSelection, useRectTool, useResizePolicy, useRotateTool, useScene, useSceneAdapter, useSceneTextEdit, useSelectTool, useSelection, useSelectionContext, useSimulation, useSliceDep, useStandardActions, useStarTool, useTextEdit, useTextTool, useTools, useVelocityTracker, useViewAnimation, useVisibleRaf, verticalAlignOffset, viewToMat3, viewToTransform, viewportDragPanAction, viewportWheelPanAction, viewportZoomAction, viewportsAt, vignette, visualBoundsViaDescriptor, wheelPan, wheelZoom, wheelZoomFactor, when, withAlpha01, withCoord, withGradientKind, worldEditToStorage, worldPoseLookup, worldToScreen, zoomAt, zoomAtLeast } from './chunk-R3AWPTLZ.js';
|
|
2
|
+
export { ActionDisabledReason, ActionsProvider, ActionsScope, DepRegistryProvider, actionBindings, evaluateEnabled, useAction, useActionsRegistry, useDepRegistry, useDepSource, useOptionalDepRegistry } from './chunk-BL65SHCX.js';
|
|
3
|
+
export { createReparentOp, createTransformOp, deleteScratch, getScratch, scratchKey, setScratch, snap } from './chunk-2VXGHUVL.js';
|
|
4
|
+
export { CORNER_ANCHORS, cornerPoint, cornerResizeHandles, hitCornerHandle, pointSnapToGrid } from './chunk-PRGBGMH3.js';
|
|
5
|
+
export { AUTO_POSE_DESCRIPTOR, DEFAULT_FLATTEN_TOLERANCE, DEFAULT_GUIDE_TOLERANCE_PX, IMPERIAL_INCHES, METRIC_MM, PATH_C, PATH_CMD_LENGTHS, PATH_L, PATH_M, PATH_Q, PATH_Z, PIXELS, PathBuilder, RECT_ORIGIN_PROJECTION, RECT_POSE_DESCRIPTOR, ROTATED_POSE_DESCRIPTOR, boundsOfPath, ellipsePath, flattenCubic, flattenCubicWithArcLen, flattenQuadratic, flattenQuadraticWithArcLen, formatUnit, gridSnapStrategy, guideSnapStrategy, isPathLike, linePath, pathCommandCoordCount, pathPoseDescriptor, pointInPath, pointToGridCell, polygonFromPoints, polylineFromPoints, pxExtent, rectPath, regularPolygonPath, resolveUnit, scaleDelta, scalePathToBounds, starPath, transformPath, translatePath, translatePolygonInPlace, withinPxBox, withinPxRadius } from './chunk-WPM42WJP.js';
|
|
6
|
+
export { PointerContextProvider, WEASEL_CLIPBOARD_MIME, WEASEL_CLIPBOARD_MIME_WEB, applyOpsTo, buildWeaselClipboardText, dispatchApplyBatch, dlog, dwarn, embedWeaselMetadataInSvg, extractWeaselClipboardFromSvg, isDebugEnabled, parseWeaselClipboardText, sniffWeaselClipboardText, useClipboardOps, usePointerContext } from './chunk-T3UQ3F6R.js';
|
|
7
|
+
export { cloneByAltDrag } from './chunk-D4AAWR64.js';
|
|
8
|
+
export { createSetSelectionOp } from './chunk-DOBSZOPR.js';
|
|
9
|
+
export { createDeleteOp, createInsertOp, rebuildOp, registerOpFactory, registeredOpNames } from './chunk-4RJP2N2L.js';
|
|
10
10
|
export { createTilePattern } from './chunk-BJN5ZRIJ.js';
|
|
11
11
|
//# sourceMappingURL=index.js.map
|
|
12
12
|
//# sourceMappingURL=index.js.map
|
package/dist/insert.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
export { U as UseInsertOptions } from './options-
|
|
2
|
-
import { M as ModifierState, I as InsertBehavior } from './types-
|
|
1
|
+
export { U as UseInsertOptions } from './options-DbYLImvq.js';
|
|
2
|
+
import { M as ModifierState, I as InsertBehavior } from './types-ei3UMl9R.js';
|
|
3
3
|
import { G as Guide } from './types-D2tTKEU0.js';
|
|
4
4
|
import { V as View } from './view-DSQgxBJB.js';
|
|
5
5
|
import '@weasel-js/history';
|
|
6
|
-
import './types-
|
|
6
|
+
import './types-DEALFt5F.js';
|
|
7
7
|
|
|
8
8
|
type ModKey$1 = keyof ModifierState;
|
|
9
9
|
/** Insert behavior that rounds the insertion point to a grid, so a shape
|
package/dist/insert.js
CHANGED
package/dist/move.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { O as OriginProjection } from './grid-
|
|
2
|
-
export { U as UseMoveOptions } from './grid-
|
|
3
|
-
import { M as ModifierState, b as MoveBehavior } from './types-
|
|
4
|
-
import { S as SnapTarget } from './types-
|
|
1
|
+
import { O as OriginProjection } from './grid-0Pbn5B2C.js';
|
|
2
|
+
export { U as UseMoveOptions } from './grid-0Pbn5B2C.js';
|
|
3
|
+
import { M as ModifierState, b as MoveBehavior } from './types-ei3UMl9R.js';
|
|
4
|
+
import { S as SnapTarget } from './types-DEALFt5F.js';
|
|
5
5
|
import { G as Guide } from './types-D2tTKEU0.js';
|
|
6
6
|
import { V as View } from './view-DSQgxBJB.js';
|
|
7
7
|
import './types-BHK2dkMu.js';
|
package/dist/move.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { scratchKey, snap, createTransformOp, createReparentOp, getScratch, setScratch } from './chunk-
|
|
2
|
-
import { gridSnapStrategy, RECT_ORIGIN_PROJECTION, guideSnapStrategy } from './chunk-
|
|
3
|
-
import { createDeleteOp } from './chunk-
|
|
1
|
+
import { scratchKey, snap, createTransformOp, createReparentOp, getScratch, setScratch } from './chunk-2VXGHUVL.js';
|
|
2
|
+
import { gridSnapStrategy, RECT_ORIGIN_PROJECTION, guideSnapStrategy } from './chunk-WPM42WJP.js';
|
|
3
|
+
import { createDeleteOp } from './chunk-4RJP2N2L.js';
|
|
4
4
|
|
|
5
5
|
// src/interactions/actions/move/behaviors/snapToGrid.ts
|
|
6
6
|
function snapToGrid(args) {
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { N as NodeId, R as RectPose, S as Scene } from './types-
|
|
2
|
-
import { M as ModifierState, A as ActionBehavior, c as ResizeAnchor, R as ResizePose, B as BoundsConstraint, P as PointSnapBehavior } from './types-
|
|
1
|
+
import { N as NodeId, R as RectPose, S as Scene } from './types-bcc7jcUy.js';
|
|
2
|
+
import { M as ModifierState, A as ActionBehavior, c as ResizeAnchor, R as ResizePose, B as BoundsConstraint, P as PointSnapBehavior } from './types-ei3UMl9R.js';
|
|
3
3
|
import { V as View } from './view-DSQgxBJB.js';
|
|
4
4
|
import { CapabilityTag } from '@weasel-js/modes';
|
|
5
5
|
import * as React from 'react';
|
|
6
6
|
import { MutableRefObject, ReactNode, ReactElement } from 'react';
|
|
7
7
|
import { GestureSpec, IngestItem, InputEvent } from '@weasel-js/gestures';
|
|
8
|
-
import { D as DrawCommand } from './DrawCommand-
|
|
9
|
-
import { B as Bounds, P as PoseProjection, F as FitViewToBoundsOptions, V as ViewportDims } from './geometry-
|
|
8
|
+
import { D as DrawCommand, E as Effect } from './DrawCommand-CD-ug3d9.js';
|
|
9
|
+
import { B as Bounds, P as PoseProjection, F as FitViewToBoundsOptions, V as ViewportDims } from './geometry-6fCNhAux.js';
|
|
10
10
|
import { FillStyle, Stroke } from '@weasel-js/paint';
|
|
11
11
|
import { CursorSpec } from '@weasel-js/cursor';
|
|
12
12
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
13
13
|
import { P as Path } from './path-JEV2c5If.js';
|
|
14
14
|
import { Op, History } from '@weasel-js/history';
|
|
15
|
-
import { a as SceneAdapter, L as LayoutStrategy, I as InsertAdapter } from './types-
|
|
15
|
+
import { a as SceneAdapter, L as LayoutStrategy, I as InsertAdapter } from './types-DEALFt5F.js';
|
|
16
16
|
import { D as DebugSink } from './types-BHK2dkMu.js';
|
|
17
17
|
import { Mat3 } from '@weasel-js/geom';
|
|
18
18
|
|
|
@@ -279,6 +279,55 @@ interface Dims {
|
|
|
279
279
|
width: number;
|
|
280
280
|
height: number;
|
|
281
281
|
}
|
|
282
|
+
/**
|
|
283
|
+
* What a layer's `draw` threw, and which layer threw it.
|
|
284
|
+
*
|
|
285
|
+
* A `draw` runs on the frame loop, so a throw that escapes it surfaces as an
|
|
286
|
+
* uncaught `requestAnimationFrame` error on the window and takes the whole
|
|
287
|
+
* frame with it — every other layer included. One broken layer painting
|
|
288
|
+
* nothing, named in the console, is the lesser wrong.
|
|
289
|
+
*/
|
|
290
|
+
interface LayerDrawFailure {
|
|
291
|
+
layerId: string;
|
|
292
|
+
error: unknown;
|
|
293
|
+
}
|
|
294
|
+
/**
|
|
295
|
+
* Several consecutive layers composited as one.
|
|
296
|
+
*
|
|
297
|
+
* A layer's own `effects` run over that layer alone, which is the wrong
|
|
298
|
+
* picture whenever a pass reads neighboring pixels: `blur(A over B)` is not
|
|
299
|
+
* `blur(A) over blur(B)`, and it costs a buffer and a pass chain per layer. A
|
|
300
|
+
* group draws its members into one buffer, runs one chain over it, and
|
|
301
|
+
* composites the result back once.
|
|
302
|
+
*
|
|
303
|
+
* Membership is by `RenderLayer.id` — the same names `layerOrder` and
|
|
304
|
+
* `layerVisibility` use, not the `layers` map's slot keys.
|
|
305
|
+
*
|
|
306
|
+
* Only *consecutive* members share a buffer, because anything drawn between
|
|
307
|
+
* two members has to land between them. A group whose members are separated in
|
|
308
|
+
* the render order is drawn as one bracket per run, with a warning: the
|
|
309
|
+
* picture is right, the declaration almost certainly is not.
|
|
310
|
+
*
|
|
311
|
+
* This is a render-stack bracket, not a scene `ContainerNode` — it holds no
|
|
312
|
+
* ids, survives no reload, and nothing in the scene knows about it.
|
|
313
|
+
*/
|
|
314
|
+
interface LayerGroup {
|
|
315
|
+
/** Names the group in warnings; not a layer id and never drawn. */
|
|
316
|
+
id: string;
|
|
317
|
+
/** Member layer ids. Order here is ignored — the render order decides. */
|
|
318
|
+
layers: readonly string[];
|
|
319
|
+
/**
|
|
320
|
+
* Passes over the group's combined pixels, in order. A thunk is re-read on
|
|
321
|
+
* every frame, so an animating radius costs no React render; an array is
|
|
322
|
+
* read once per frame either way.
|
|
323
|
+
*/
|
|
324
|
+
effects?: readonly Effect[] | ((view: View, dims: Dims) => readonly Effect[]);
|
|
325
|
+
/** Opacity applied to the group's composited result, not to each member. */
|
|
326
|
+
alpha?: number;
|
|
327
|
+
/** 4×5 color matrix (row-major, 20 numbers) applied to the composited
|
|
328
|
+
* result. See `GroupDrawCommand.colorMatrix`. */
|
|
329
|
+
colorMatrix?: number[];
|
|
330
|
+
}
|
|
282
331
|
/** One layer's memoized output, keyed by layer id. Owned by the canvas that
|
|
283
332
|
* calls `drawLayers`, not by `drawLayers` itself — the function is pure. */
|
|
284
333
|
type LayerCommandCache = Map<string, {
|
|
@@ -348,6 +397,17 @@ interface RenderLayer<TData> {
|
|
|
348
397
|
* the relevant subset with `viewToMat3(view)` manually.
|
|
349
398
|
*/
|
|
350
399
|
space?: 'world' | 'screen';
|
|
400
|
+
/**
|
|
401
|
+
* Full-screen passes run over this layer's own pixels before it joins the
|
|
402
|
+
* frame — a blur here blurs the world and leaves the HUD drawn above it
|
|
403
|
+
* sharp, which is the thing a CSS `filter` on the `<canvas>` cannot do.
|
|
404
|
+
*
|
|
405
|
+
* Costs nothing while empty: the renderer allocates no offscreen buffer
|
|
406
|
+
* until a layer actually declares one. See `GroupDrawCommand.effects` for
|
|
407
|
+
* what a pass may read, and {@link LayerGroup} to run one chain over
|
|
408
|
+
* several layers at once instead of one chain each.
|
|
409
|
+
*/
|
|
410
|
+
effects?: readonly Effect[];
|
|
351
411
|
/**
|
|
352
412
|
* Optional hit-test for **consumer-attached** layers.
|
|
353
413
|
*
|
|
@@ -398,8 +458,15 @@ interface RenderLayer<TData> {
|
|
|
398
458
|
* `'world'`) have their commands wrapped in a `kind: 'group'` with
|
|
399
459
|
* `viewToMat3(view)` before they reach the renderer. Screen-space layers
|
|
400
460
|
* (`space: 'screen'`) pass through unchanged.
|
|
461
|
+
*
|
|
462
|
+
* A layer whose `draw` throws is dropped for the frame and reported through
|
|
463
|
+
* `onLayerError` — the rest of the frame still paints.
|
|
464
|
+
*
|
|
465
|
+
* `groups` brackets runs of consecutive layers so they composite as one — see
|
|
466
|
+
* `LayerGroup`. A layer named by no group is emitted exactly as it was before
|
|
467
|
+
* groups existed, and a frame that declares none allocates nothing.
|
|
401
468
|
*/
|
|
402
|
-
declare function drawLayers<TData>(layers: RenderLayer<TData>[], data: TData, visibility: Record<string, boolean>, order: string[] | undefined, view: View | undefined, dims: Dims, cache?: LayerCommandCache): DrawCommand[];
|
|
469
|
+
declare function drawLayers<TData>(layers: RenderLayer<TData>[], data: TData, visibility: Record<string, boolean>, order: string[] | undefined, view: View | undefined, dims: Dims, cache?: LayerCommandCache, onLayerError?: (failure: LayerDrawFailure) => void, groups?: readonly LayerGroup[]): DrawCommand[];
|
|
403
470
|
/**
|
|
404
471
|
* Resolve one layer's visibility: `alwaysOn` wins, then an explicit entry in
|
|
405
472
|
* `visibility`, then `defaultVisible`, defaulting to shown.
|
|
@@ -425,8 +492,12 @@ declare function isLayerPainted<TData>(layer: RenderLayer<TData>, visibility: Re
|
|
|
425
492
|
* node's inner pass — goes through here. A second copy of this rule that
|
|
426
493
|
* forgets the wrap draws world content at raw world coords, which looks
|
|
427
494
|
* plausible at the identity view and wrong everywhere else.
|
|
495
|
+
*
|
|
496
|
+
* A `draw` that throws yields no commands, and `onLayerError` is told which
|
|
497
|
+
* layer it was. The layer's cache entry goes with it, so the next frame is a
|
|
498
|
+
* real re-attempt rather than a stale tree served under fresh deps.
|
|
428
499
|
*/
|
|
429
|
-
declare function drawOneLayer<TData>(layer: RenderLayer<TData>, data: TData, view: View, dims: Dims, cache?: LayerCommandCache): DrawCommand[];
|
|
500
|
+
declare function drawOneLayer<TData>(layer: RenderLayer<TData>, data: TData, view: View, dims: Dims, cache?: LayerCommandCache, onLayerError?: (failure: LayerDrawFailure) => void): DrawCommand[];
|
|
430
501
|
|
|
431
502
|
/**
|
|
432
503
|
* Facts about the device the canvas is running on.
|
|
@@ -3852,6 +3923,12 @@ interface ActionsRegistry {
|
|
|
3852
3923
|
/** Drop every registrant of `id`. This is the "this action should not exist"
|
|
3853
3924
|
* door, not a release — for that, call what `register` returned. */
|
|
3854
3925
|
unregister(id: string): void;
|
|
3926
|
+
/** Declare `id` not for this scope: it stays registered, and every other
|
|
3927
|
+
* scope over the same store still resolves it, but here it lists as absent
|
|
3928
|
+
* and neither `trigger` nor `begin` will fire it. Returns a release; an
|
|
3929
|
+
* `<ActionsScope>` drops what it muted when it unmounts. This is the
|
|
3930
|
+
* "not for me" door — `unregister` is the "should not exist" one. */
|
|
3931
|
+
mute(id: string): () => void;
|
|
3855
3932
|
list(): readonly Action[];
|
|
3856
3933
|
/** Fire an immediate-invoker action by id. The optional `params` arg is
|
|
3857
3934
|
* forwarded to `ImmediateInvoker.run` as its second argument — use it for
|
|
@@ -3891,6 +3968,19 @@ interface ActionsRegistry {
|
|
|
3891
3968
|
* only while this registry still holds it. */
|
|
3892
3969
|
setDepRegistry(r: DepRegistry | null): () => void;
|
|
3893
3970
|
}
|
|
3971
|
+
/**
|
|
3972
|
+
* @experimental
|
|
3973
|
+
* A view of the registry in scope that can declare ids not for itself. Wrap
|
|
3974
|
+
* anything that should be able to opt out of an action — a second
|
|
3975
|
+
* `<SceneCanvas>` sharing the host's `<ActionsProvider>` mounts one — and its
|
|
3976
|
+
* `mute` calls stay inside it. Renders nothing of its own.
|
|
3977
|
+
*
|
|
3978
|
+
* Not a `BindingScope`: that names the tier a binding matches at (hotkey /
|
|
3979
|
+
* active / ambient), which this has nothing to do with.
|
|
3980
|
+
*/
|
|
3981
|
+
declare function ActionsScope({ children }: {
|
|
3982
|
+
children: ReactNode;
|
|
3983
|
+
}): ReactElement;
|
|
3894
3984
|
/**
|
|
3895
3985
|
* @experimental
|
|
3896
3986
|
* Mounts an `ActionsRegistry` for its lifetime. Children call
|
|
@@ -3910,4 +4000,4 @@ declare function useActionsRegistry(): ActionsRegistry | null;
|
|
|
3910
4000
|
*/
|
|
3911
4001
|
declare function useAction(action: Action): void;
|
|
3912
4002
|
|
|
3913
|
-
export { type
|
|
4003
|
+
export { type Contribution as $, type Action as A, type BuiltinShapeToolId as B, type Condition as C, type Dims as D, type AffordanceBinding as E, type CommonAffordanceScratch as F, type GeometryProjection as G, type HotkeyTrigger as H, type InertiaConfig as I, ColorOverrideRegistry as J, type BooleansAdapter as K, type LayerHit as L, type UseAnimatorOptions as M, type SpringPresetName as N, type OverlayPosition as O, type PanBounds as P, type EasingSpec as Q, type RenderLayer as R, type SliceDep as S, type Tool as T, type UseSelectionOptions as U, type VisibilityRules as V, type AnimationHandle as W, type VertexColorChannel as X, type SampledTrack as Y, type Eligibility as Z, type BindingScope as _, type DeviceProfile as a, type PhysicsOptions as a$, type ScopedBinding as a0, ALWAYS as a1, type ActionDeps as a2, ActionDisabledReason as a3, type ActionEnabledResult as a4, type ActionEntry as a5, ActionsProvider as a6, ActionsScope as a7, ActiveToolContextProvider as a8, ActiveToolContextProviderIfRoot as a9, type EditAnchorsDep as aA, type EventTrack as aB, type GestureBinding as aC, IDENTITY_POSE_COMPOSITION as aD, type ImmediateInvoker as aE, type IngestCtx as aF, type IngestionDep as aG, type InsertDep as aH, type Interpolate as aI, type InterpolatorFactory as aJ, type InvocationCtx as aK, type Invoker as aL, KIT_SHAPE_KINDS as aM, type Keyframe as aN, type LassoSelectDep as aO, type LayerCommandCache as aP, type LayerDrawFailure as aQ, type LayoutDep as aR, type LoopFactory as aS, type LoopOptions as aT, type MatchResult as aU, NEVER as aV, type NestedTimeline as aW, type NodeAtPointDep as aX, type OngoingHandle as aY, type OngoingInvoker as aZ, type PhysicsHandle as a_, type ActiveToolContextProviderProps as aa, type ActiveToolContextValue as ab, type AnimateToBoundsOptions as ac, type AreaSelectDep as ad, type BezierEasing as ae, type BindingOpts as af, type BooleanOp as ag, type BooleanOpResult as ah, type BoundGesture as ai, type BuildRuleCtxArgs as aj, type ClaimableGesture as ak, type ClipboardDep as al, type ClipboardIngestCtx as am, type ColorOverride as an, type ColorOverrideFn as ao, type CustomPaintContext as ap, type DecayLoopConfig as aq, type DecayOptions as ar, type DepName as as, type DepRegistry as at, DepRegistryProvider as au, type DispatcherContext as av, type DragSample as aw, EASINGS as ax, type EasingFn as ay, type EasingName as az, type DetectedDeviceFacts as b, easeInOutBounce as b$, type Point2 as b0, PointerContextProvider as b1, type PointerContextValue as b2, type PointerWorldPos as b3, type PoseAdapter as b4, type PoseComposition as b5, type ResizePolicy as b6, type ResolveAllOptions as b7, type ResolveOnlyResult as b8, type ResolvedCandidate as b9, type UiOngoingControl as bA, VIEW_ANIMATION_KEY as bB, type ViewAnimationApi as bC, type ViewApi as bD, type ViewChannel as bE, actionBindings as bF, applyBooleanOp as bG, buildRuleCtx as bH, clipboardCopyAction as bI, clipboardCutAction as bJ, composeRectPose as bK, composeWorldPose as bL, createDispatcher as bM, cubicBezierEasing as bN, decomposeRectPose as bO, describeRule as bP, drawLayers as bQ, drawOneLayer as bR, easeIn as bS, easeInBack as bT, easeInBounce as bU, easeInCirc as bV, easeInCubic as bW, easeInElastic as bX, easeInExpo as bY, easeInOut as bZ, easeInOutBack as b_, SPRING_PRESETS as ba, type SelectionExtendKey as bb, type SelectionMode as bc, type Selector as bd, type SnapDep as be, type SpringOptions as bf, type SpringPreset as bg, type StaggerBuilder as bh, type StaggerDelay as bi, type StaggerFactory as bj, type StaggerOptions as bk, type StaggerPerItem as bl, type StaggerSpringPoseOptions as bm, type StaggerTweenOptions as bn, type SvgUnpacker as bo, type TextEditDep as bp, type TimelineHandle as bq, type TimelineOptions as br, type TimelineTrack as bs, type ToolCtx as bt, type ToolModifiers as bu, type ToolPresentation as bv, type ToolSlot as bw, type Track as bx, type TweenLoopOptions as by, type TweenOptions as bz, type Rule as c, easeInOutCirc as c0, easeInOutCubic as c1, easeInOutElastic as c2, easeInOutExpo as c3, easeInOutQuad as c4, easeInOutQuart as c5, easeInOutQuint as c6, easeInOutSine as c7, easeInQuad as c8, easeInQuart as c9, useAction as cA, useActionsRegistry as cB, useActiveToolContext as cC, useDecayLoop as cD, useDepRegistry as cE, useDepSource as cF, useOptionalActiveToolContext as cG, useOptionalDepRegistry as cH, usePointerContext as cI, useSelection as cJ, useViewAnimation as cK, worldPoseLookup as cL, easeInQuint as ca, easeInSine as cb, easeOut as cc, easeOutBack as cd, easeOutBounce as ce, easeOutCirc as cf, easeOutCubic as cg, easeOutElastic as ch, easeOutExpo as ci, easeOutQuad as cj, easeOutQuart as ck, easeOutQuint as cl, easeOutSine as cm, enterTextEditAction as cn, evaluate as co, evaluateEnabled as cp, isLayerPainted as cq, isLayerVisible as cr, linear as cs, rebaseLocalPose as ct, registerContentHandler as cu, resolveEasing as cv, resolveParams as cw, sliceAction as cx, specificity as cy, translateRectPose as cz, type RuleCtx as d, type ChromeCtx as e, type ChromeId as f, type ViewAnimationOptions as g, type DepSchema as h, type ActionsRegistry as i, type AffordanceHit as j, type Dispatcher as k, type ToolDef as l, type ViewportToolDef as m, type AnyTool as n, type ToolKeybinding as o, type OngoingOverlay as p, type ChromeState as q, type SelectionApi as r, type LayerGroup as s, type InsertExtras as t, type ContentHandlerEntry as u, type SvgIngestOptions as v, type ActionsProp as w, type Animator as x, type Affordance as y, type AffordanceRegion as z };
|
package/dist/renderer.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { M as Mesh } from './
|
|
2
|
-
export { I as IDENTITY_COLOR_MATRIX, a as ImageMinification, R as RenderTarget, S as ShaderCompileError, b as SpriteSheet, c as StrokeOptions, V as ViewLike, W as WeaselRenderer, d as WeaselRendererOptions, e as
|
|
3
|
-
export { D as DrawCommand, G as GroupDrawCommand, I as ImageDrawCommand, M as Mat3, P as PathDrawCommand, S as SPRITE_STRIDE, a as ShaderDrawCommand, b as ShaderProgramHandle, c as ShaderUniform, d as SolidPaint, e as SpritesDrawCommand, T as TextDrawCommand, m as mat3, r as registerProgram } from './DrawCommand-
|
|
1
|
+
import { M as Mesh } from './builtins-BXFBXegF.js';
|
|
2
|
+
export { I as IDENTITY_COLOR_MATRIX, a as ImageMinification, R as RenderTarget, S as ShaderCompileError, b as SpriteSheet, c as StrokeOptions, V as ViewLike, W as WeaselRenderer, d as WeaselRendererOptions, e as blur, f as buildGradientRamp, g as frameRect, t as tessellateStroke, v as viewToMat3, h as vignette } from './builtins-BXFBXegF.js';
|
|
3
|
+
export { D as DrawCommand, E as Effect, G as GroupDrawCommand, I as ImageDrawCommand, M as Mat3, P as PathDrawCommand, S as SPRITE_STRIDE, a as ShaderDrawCommand, b as ShaderProgramHandle, c as ShaderUniform, d as SolidPaint, e as SpritesDrawCommand, T as TextDrawCommand, m as mat3, r as registerEffect, f as registerProgram } from './DrawCommand-CD-ug3d9.js';
|
|
4
4
|
import { P as Path } from './path-JEV2c5If.js';
|
|
5
5
|
export { canQueryLocalFonts, enableLocalFontOutlines, hasFontOutlines, isCanvasFont, listFontOutlines, outlineStatus, registerCanvasFont, registerFont, registerFontOutlines, subscribeGlyphReady, unregisterCanvasFont, unregisterFontOutlines } from '@weasel-js/font';
|
|
6
6
|
import { TextureHandle } from '@weasel-js/paint';
|
|
@@ -55,4 +55,32 @@ declare function tessellate(path: Path, opts?: TessellateOptions): Mesh;
|
|
|
55
55
|
*/
|
|
56
56
|
declare const OUTLINE_MIN_SCREEN_PX = 48;
|
|
57
57
|
|
|
58
|
-
|
|
58
|
+
/**
|
|
59
|
+
* Kit-supplied vertex shader for a full-screen effect pass.
|
|
60
|
+
*
|
|
61
|
+
* Distinct from `CUSTOM_VERT_SRC` on purpose. That one places its quad through
|
|
62
|
+
* `u_bounds` and `u_proj`, so its `v_uv` runs top-down in *screen* space; an
|
|
63
|
+
* effect samples a texture the scene was just rendered into, whose v axis runs
|
|
64
|
+
* the other way. Passing `a_position` straight to `gl_Position` and `a_uv`
|
|
65
|
+
* straight out keeps the two aligned — `QUAD_VERTICES` already carries
|
|
66
|
+
* `a_uv == (a_position + 1) / 2` on both axes.
|
|
67
|
+
*
|
|
68
|
+
* PUBLIC CONTRACT — what every effect fragment shader may read:
|
|
69
|
+
*
|
|
70
|
+
* in vec2 v_uv 0..1 across the source texture
|
|
71
|
+
* uniform sampler2D u_source what has been drawn so far
|
|
72
|
+
* uniform vec2 u_resolution source size in device pixels
|
|
73
|
+
* uniform vec2 u_texel 1.0 / u_resolution — one texel step
|
|
74
|
+
*
|
|
75
|
+
* PREMULTIPLIED ALPHA: `u_source` holds premultiplied RGBA, because that is
|
|
76
|
+
* what the scene blends into it. An effect that weights neighbouring samples
|
|
77
|
+
* (a blur) is doing the right thing on premultiplied values; one that
|
|
78
|
+
* manipulates rgb against a must premultiply its own output the same way the
|
|
79
|
+
* custom-shader prelude requires.
|
|
80
|
+
*/
|
|
81
|
+
declare const EFFECT_VERT_SRC = "#version 300 es\nin vec2 a_position;\nin vec2 a_uv;\nout vec2 v_uv;\n\nvoid main() {\n v_uv = a_uv;\n gl_Position = vec4(a_position, 0.0, 1.0);\n}\n";
|
|
82
|
+
/** Uniforms the renderer sets on every effect pass. An effect must not
|
|
83
|
+
* redeclare them with different meanings; it may leave any of them out. */
|
|
84
|
+
declare const EFFECT_KIT_UNIFORMS: readonly ["u_source", "u_resolution", "u_texel"];
|
|
85
|
+
|
|
86
|
+
export { EFFECT_KIT_UNIFORMS, EFFECT_VERT_SRC, Mesh, OUTLINE_MIN_SCREEN_PX, type TessellateOptions, registerTexture, tessellate };
|
package/dist/renderer.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
export { IDENTITY_COLOR_MATRIX, OUTLINE_MIN_SCREEN_PX, SPRITE_STRIDE, ShaderCompileError, WeaselRenderer, buildGradientRamp, canQueryLocalFonts, enableLocalFontOutlines, frameRect, hasFontOutlines, isCanvasFont, listFontOutlines, mat3, outlineStatus, registerCanvasFont, registerFont, registerFontOutlines, registerProgram, subscribeGlyphReady, tessellate, tessellateStroke, unregisterCanvasFont, unregisterFontOutlines, viewToMat3 } from './chunk-
|
|
2
|
-
import './chunk-
|
|
3
|
-
import './chunk-
|
|
4
|
-
import './chunk-
|
|
5
|
-
import './chunk-
|
|
6
|
-
import './chunk-
|
|
7
|
-
import './chunk-
|
|
8
|
-
import './chunk-
|
|
9
|
-
import './chunk-
|
|
1
|
+
export { EFFECT_KIT_UNIFORMS, EFFECT_VERT_SRC, IDENTITY_COLOR_MATRIX, OUTLINE_MIN_SCREEN_PX, SPRITE_STRIDE, ShaderCompileError, WeaselRenderer, blur, buildGradientRamp, canQueryLocalFonts, enableLocalFontOutlines, frameRect, hasFontOutlines, isCanvasFont, listFontOutlines, mat3, outlineStatus, registerCanvasFont, registerEffect, registerFont, registerFontOutlines, registerProgram, subscribeGlyphReady, tessellate, tessellateStroke, unregisterCanvasFont, unregisterFontOutlines, viewToMat3, vignette } from './chunk-R3AWPTLZ.js';
|
|
2
|
+
import './chunk-BL65SHCX.js';
|
|
3
|
+
import './chunk-2VXGHUVL.js';
|
|
4
|
+
import './chunk-PRGBGMH3.js';
|
|
5
|
+
import './chunk-WPM42WJP.js';
|
|
6
|
+
import './chunk-T3UQ3F6R.js';
|
|
7
|
+
import './chunk-D4AAWR64.js';
|
|
8
|
+
import './chunk-DOBSZOPR.js';
|
|
9
|
+
import './chunk-4RJP2N2L.js';
|
|
10
10
|
export { registerTexture } from './chunk-BJN5ZRIJ.js';
|
|
11
11
|
//# sourceMappingURL=renderer.js.map
|
|
12
12
|
//# sourceMappingURL=renderer.js.map
|
package/dist/resize.d.ts
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
export { C as CORNER_ANCHORS, a as CornerAnchor, b as CornerHandle, U as UseResizeOptions, c as cornerPoint, d as cornerResizeHandles, f as fixedCornerOf, h as hitCornerHandle, p as pointSnapToGrid } from './
|
|
2
|
-
export { P as PoseProjection, R as RECT_POSE_DESCRIPTOR, a as ROTATED_POSE_DESCRIPTOR } from './geometry-
|
|
3
|
-
import { R as ResizePose, B as BoundsConstraint, M as ModifierState } from './types-
|
|
1
|
+
export { A as AUTO_POSE_DESCRIPTOR, C as CORNER_ANCHORS, a as CornerAnchor, b as CornerHandle, U as UseResizeOptions, c as cornerPoint, d as cornerResizeHandles, f as fixedCornerOf, h as hitCornerHandle, i as isPathLike, p as pointSnapToGrid } from './autoPoseDescriptor-DF1SnnSx.js';
|
|
2
|
+
export { P as PoseProjection, R as RECT_POSE_DESCRIPTOR, a as ROTATED_POSE_DESCRIPTOR } from './geometry-6fCNhAux.js';
|
|
3
|
+
import { R as ResizePose, B as BoundsConstraint, M as ModifierState } from './types-ei3UMl9R.js';
|
|
4
4
|
import { G as Guide } from './types-D2tTKEU0.js';
|
|
5
5
|
import { V as View } from './view-DSQgxBJB.js';
|
|
6
6
|
import './types-BHK2dkMu.js';
|
|
7
|
+
import './path-JEV2c5If.js';
|
|
7
8
|
import '@weasel-js/history';
|
|
8
|
-
import './types-
|
|
9
|
+
import './types-DEALFt5F.js';
|
|
9
10
|
|
|
10
11
|
/** Resize constraint that stops a node shrinking past a minimum. The anchored
|
|
11
12
|
* edge stays put, so clamping pushes the dragged edge back rather than moving
|
package/dist/resize.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { CORNER_ANCHORS, DEFAULT_RESIZE_BEHAVIORS, clampMinSize, cornerPoint, cornerResizeHandles, fixedCornerOf, hitCornerHandle, lockAspectWithModifier, pointSnapToGrid, snapToGrid, snapToGuides } from './chunk-
|
|
2
|
-
export { RECT_POSE_DESCRIPTOR, ROTATED_POSE_DESCRIPTOR } from './chunk-
|
|
1
|
+
export { CORNER_ANCHORS, DEFAULT_RESIZE_BEHAVIORS, clampMinSize, cornerPoint, cornerResizeHandles, fixedCornerOf, hitCornerHandle, lockAspectWithModifier, pointSnapToGrid, snapToGrid, snapToGuides } from './chunk-PRGBGMH3.js';
|
|
2
|
+
export { AUTO_POSE_DESCRIPTOR, RECT_POSE_DESCRIPTOR, ROTATED_POSE_DESCRIPTOR, isPathLike } from './chunk-WPM42WJP.js';
|
|
3
3
|
//# sourceMappingURL=resize.js.map
|
|
4
4
|
//# sourceMappingURL=resize.js.map
|
package/dist/routing.d.ts
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import { ParsedModifiers, GestureName, GestureSpec } from '@weasel-js/gestures';
|
|
2
2
|
export { ChannelRef, DescribeRouteOptions, GESTURE_DESCRIPTORS, GestureArgSpec, GestureDescriptor, GestureName, ModRequirement, ModifierKey, ParsedModifiers, ParsedRoute, PhaseAtom, RESERVED_ID_NAMES, RESERVED_ID_PREFIXES, ROUTE_FIELD_DEFINITIONS, ROUTE_TERMS, RouteDescriptionPart, RouteFieldName, RouteTermLabel, canonicalModifiers, collapseShiftPairs, describeRoute, describeRouteParts, formatPhaseAtom, formatRoute, getGestureDescriptor, isKnownGestureName, parseRoute } from '@weasel-js/gestures';
|
|
3
|
-
import { T as Tool } from './registry-
|
|
4
|
-
import './types-
|
|
3
|
+
import { T as Tool } from './registry-BY-wI9gm.js';
|
|
4
|
+
import './types-bcc7jcUy.js';
|
|
5
5
|
import '@weasel-js/history';
|
|
6
6
|
import './path-JEV2c5If.js';
|
|
7
|
-
import './types-
|
|
8
|
-
import './types-
|
|
7
|
+
import './types-ei3UMl9R.js';
|
|
8
|
+
import './types-DEALFt5F.js';
|
|
9
9
|
import './view-DSQgxBJB.js';
|
|
10
10
|
import '@weasel-js/modes';
|
|
11
11
|
import 'react';
|
|
12
|
-
import './DrawCommand-
|
|
12
|
+
import './DrawCommand-CD-ug3d9.js';
|
|
13
13
|
import '@weasel-js/paint';
|
|
14
14
|
import '@weasel-js/text';
|
|
15
|
-
import './geometry-
|
|
15
|
+
import './geometry-6fCNhAux.js';
|
|
16
16
|
import '@weasel-js/cursor';
|
|
17
17
|
import 'react/jsx-runtime';
|
|
18
18
|
import './types-BHK2dkMu.js';
|
package/dist/routing.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { GESTURE_DESCRIPTORS, PREDICATE_TARGET, RESERVED_ID_NAMES, RESERVED_ID_PREFIXES, ROUTE_FIELD_DEFINITIONS, ROUTE_TERMS, buildRouteRegistry, canonicalModifiers, collapseShiftPairs, describeRoute, describeRouteParts, findConflicts, formatPhaseAtom, formatRoute, getGestureDescriptor, isKnownGestureName, parseRoute, routeGestureForSpecKind, routesForSpec } from './chunk-
|
|
1
|
+
export { GESTURE_DESCRIPTORS, PREDICATE_TARGET, RESERVED_ID_NAMES, RESERVED_ID_PREFIXES, ROUTE_FIELD_DEFINITIONS, ROUTE_TERMS, buildRouteRegistry, canonicalModifiers, collapseShiftPairs, describeRoute, describeRouteParts, findConflicts, formatPhaseAtom, formatRoute, getGestureDescriptor, isKnownGestureName, parseRoute, routeGestureForSpecKind, routesForSpec } from './chunk-BL65SHCX.js';
|
|
2
2
|
//# sourceMappingURL=routing.js.map
|
|
3
3
|
//# sourceMappingURL=routing.js.map
|
|
@@ -92,6 +92,15 @@ interface LayoutStrategy<TPose> {
|
|
|
92
92
|
* absent, every drag is considered — rejection is still possible later, by
|
|
93
93
|
* `snap.pickTarget` returning null. */
|
|
94
94
|
acceptsDrop?(container: LayoutContainer, dragged: LayoutDragged<TPose>): boolean;
|
|
95
|
+
/** Optional: what this container does about a child of its own that was
|
|
96
|
+
* released outside every layout container. Returning ops replaces the
|
|
97
|
+
* free-space commit — put the child back in its slot, reflow the gap
|
|
98
|
+
* closed — and an empty array leaves the container unchanged, which snaps
|
|
99
|
+
* the child home because the drag only ever wrote previews. `null` lets
|
|
100
|
+
* the drop stand where the pointer left it, which is also what a strategy
|
|
101
|
+
* without this method gets. The drag preview follows the pointer either
|
|
102
|
+
* way; this decides the release. */
|
|
103
|
+
releaseDrop?(container: LayoutContainer, children: ReadonlyArray<LayoutChild<TPose>>, dragged: LayoutDragged<TPose>): Op[] | null;
|
|
95
104
|
}
|
|
96
105
|
|
|
97
106
|
/**
|
|
@@ -182,12 +191,7 @@ interface MoveAdapter<TNode extends {
|
|
|
182
191
|
* One contract with {@link OrderedAdapter.getChildren} — the two land on
|
|
183
192
|
* the same adapter object, and an implementation that answers only node
|
|
184
193
|
* ids returns `[]` for the root, which the ops read as "no siblings".
|
|
185
|
-
|
|
186
|
-
* When present (alongside the `cascadeWorldPose` option on `useMove`),
|
|
187
|
-
* dragging a node auto-cascades its descendants in the live overlay so
|
|
188
|
-
* structurally-grouped children visually follow the parent during the
|
|
189
|
-
* drag. No additional ops are generated — children's local poses don't
|
|
190
|
-
* change when the parent's local pose moves. */
|
|
194
|
+
*/
|
|
191
195
|
getChildren?(parentId: string | null): string[];
|
|
192
196
|
/** Optional: layout strategy attached to a container, or null if the
|
|
193
197
|
* container uses absolute positioning (default behavior). When present,
|