@canvas-harness/core 0.1.11 → 0.1.13
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/dist/index.cjs +23 -80
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +26 -8
- package/dist/index.d.ts +26 -8
- package/dist/index.js +23 -81
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -469,10 +469,14 @@ declare const nodeAABB: (node: Node) => WorldRect;
|
|
|
469
469
|
/**
|
|
470
470
|
* Auto-routing for bezier edges — see ARCHITECTURE.md §6.6.
|
|
471
471
|
*
|
|
472
|
-
*
|
|
473
|
-
* endpoint
|
|
474
|
-
*
|
|
475
|
-
*
|
|
472
|
+
* Unified rule: for each attached endpoint, cast a ray from the node
|
|
473
|
+
* center toward the other endpoint and pick the side the ray exits
|
|
474
|
+
* through. The bezier's control point at that end leaves along that
|
|
475
|
+
* side's outward normal. Endpoints themselves stay at the user-supplied
|
|
476
|
+
* localOffset; the renderer's clipSamples trims any inside-rect portion.
|
|
477
|
+
*
|
|
478
|
+
* Rotation-aware: side selection happens in each node's pre-rotation
|
|
479
|
+
* local frame, then the normal is rotated back into world.
|
|
476
480
|
*/
|
|
477
481
|
|
|
478
482
|
type Side = 'n' | 's' | 'e' | 'w';
|
|
@@ -503,6 +507,16 @@ declare const autoRouteControls: (sourceWorld: Vec2, targetWorld: Vec2, sourceNo
|
|
|
503
507
|
c1: Vec2;
|
|
504
508
|
c2: Vec2;
|
|
505
509
|
};
|
|
510
|
+
/**
|
|
511
|
+
* Picks which side of {@link node}'s rect the line from the node's
|
|
512
|
+
* center to {@link towardWorld} exits through. The bezier auto-route
|
|
513
|
+
* uses this to choose each endpoint's outgoing direction: the control
|
|
514
|
+
* leaves along the chosen side's outward normal.
|
|
515
|
+
*
|
|
516
|
+
* Rotation-aware: the ray is computed in the node's pre-rotation local
|
|
517
|
+
* frame so a rotated rect still picks its locally-correct side.
|
|
518
|
+
*/
|
|
519
|
+
declare const sideToward: (node: Node, towardWorld: Vec2) => Side;
|
|
506
520
|
|
|
507
521
|
/**
|
|
508
522
|
* Result of clipping the polyline against the two attached-node rects.
|
|
@@ -2485,10 +2499,14 @@ type Hit = NodeHit | EdgeHit;
|
|
|
2485
2499
|
declare const hitTestPoint: (store: CanvasStore, worldPoint: Vec2, cameraZ: number, selectedIds?: ReadonlySet<NodeId>) => NodeHit | null;
|
|
2486
2500
|
/**
|
|
2487
2501
|
* Combined node + edge hit testing. Order: node handles > edge endpoint
|
|
2488
|
-
* handles > node
|
|
2502
|
+
* handles > visually-topmost body (node or edge, compared by z).
|
|
2489
2503
|
*
|
|
2490
|
-
*
|
|
2491
|
-
*
|
|
2504
|
+
* For bodies, the rule is paint-order: whichever of (node body, edge
|
|
2505
|
+
* body) has the higher z wins, with ties going to edges (edges paint
|
|
2506
|
+
* over nodes by convention). This lets users click an edge that runs
|
|
2507
|
+
* visually over a large background-style node — the 8px polyline slop
|
|
2508
|
+
* keeps the edge's hit zone narrow, so clicks far from the polyline
|
|
2509
|
+
* still land on the node underneath.
|
|
2492
2510
|
*/
|
|
2493
2511
|
declare const hitTestAny: (store: CanvasStore, worldPoint: Vec2, cameraZ: number, selectedNodes?: ReadonlySet<NodeId>, selectedEdges?: ReadonlySet<EdgeId>) => Hit | null;
|
|
2494
2512
|
/**
|
|
@@ -3471,4 +3489,4 @@ declare const installedExtensions: (store: CanvasStore) => string[];
|
|
|
3471
3489
|
*/
|
|
3472
3490
|
declare const VERSION = "0.0.0";
|
|
3473
3491
|
|
|
3474
|
-
export { type AnthropicToolDef, type Arrowhead, BEZIER_SEGMENTS, type BatchId, type BitmapCacheEntry, type BitmapCacheRequest, type BuiltInNodeType, CODE_BG_COLOR, CODE_BLOCK_MARGIN_Y, CODE_BLOCK_PADDING_X, CONTENT_HEIGHT_BUFFER, CONTENT_PADDING, type CameraState, type CanvasBackground, type CanvasBackgroundPattern, type CanvasStore, type CanvasSurface, type ClientId, type ClipResult, type ConflictRecord, type ContextEdge, type ContextNode, DEFAULT_BACKGROUND, DEFAULT_CAMERA, DEFAULT_HIGHLIGHT_COLOR, DEFAULT_HIGHLIGHT_COLOR_DARK, DEFAULT_MINIMAP_MAX_NODES, DEFAULT_STYLE, DEFAULT_TEXT_COLOR, type DeserializeOptions, type DragOriginal, type DrawTextOptions, EDGE_HANDLE_SLOP_PX, EDGE_HIT_SLOP_PX, type Edge, type EdgeEnd, type EdgeGeometry, EdgeGeometryCache, type EdgeHit, type EdgeId, type EdgeStyle, type EditorAdapter, type EditorAdapterFactory, type EditorAdapterMountOptions, type EstimateOptions, type ExportOptions, type Extension, type ExtensionApi, FONT_FAMILY_MAP, FONT_SIZE_MAP, type FontFamily, type FontSize, type FrameLoop, type FrameStats, type GetContextOptions, type Group, type GroupId, type Hit, type IconNodeData, type IdGenerator, type ImageNodeData, type InlineType, type InteractionMode, type InteractionState, LINE_HEIGHT_MAP, LINK_COLOR, type LayoutLine, type LayoutOptions, MAX_IMAGE_BYTES, MAX_SVG_BYTES, MAX_ZOOM, MIN_ZOOM, type MathBitmap, type Migrator, type MinimapContentOptions, type Node, type NodeHit, type NodeId, type NodeType, type NodeTypeDef, type NodeTypeDefOptions, type Op, type OpBatch, type OpOrigin, PALM_REJECTION_GRACE_MS, type PalmRejectionState, type PathStyle, type PointerInfo, type PresenceEvent, type PresencePatch, type PresenceSlice, type PresenceState, type PrimitiveType, RESIZE_HANDLES, RESIZE_HANDLE_SIZE_PX, ROTATE_HANDLE_OFFSET_PX, ROTATE_HANDLE_RADIUS_PX, type RenderEnv, type Renderer, type RendererOptions, type ResizeHandle, SCHEMA_VERSION, type Scene, type SceneContextJson, type SchemaVersion, type SerializedClipboard, type SerializedScene, type Side, type SnapshotEnv, type SpatialId, type SpatialQuery, type SpatialResult, type StoreEventHandler, type StoreEventName, type StoreEvents, type StoreOptions, type StrokeStyle, type Style, type StyledRun, type SvgExportOptions, type SyncAdapter, type SyncAdapterCapabilities, type TextAlign, type TextStyle, type ThemeResolver, type Token, type Transform, UniformGrid, type Unsubscribe, VERSION, type Vec2, type WorldRect, applyCameraTransform, applySvgColor, arrowheadLength, asBatchId, asClientId, asEdgeId, asGroupId, asNodeId, attachSync, autoRouteControls, blobToDataUri, clampEffectiveScale, clampZoom, clearMathCache, clearMeasureCache, clearSurface, clearTextBitmapCache, clipSamples, computeAutoFitHeight, computeEdgeGeometry, copy, createCanvasStore, createDefaultTextareaEditor, createFrameLoop, createPalmRejectionState, createRenderer, cubicBezier, cubicBezierTangent, cut, defineExtension, defineNode, deserializeClipboard, detectConflicts, downscaleImageBlob, drawArrowhead, drawEdge, drawMinimapViewport, drawShape, drawTextToCanvas, drawWithNodeTransform, edgeAABBFromSamples, edgeLabelBoundsWorld, emptyPresenceState, estimateMarkdownContentHeight, exportSelection, exportSelectionSvg, exportViewport, extractSvgDimensions, fromSerialized, fullVisibleClipResult, getCanvasFont, getContentHeight, getContext, getDpr, getFontEpoch, getMarkdownLineHeightPx, getMathBitmap, getMathCacheSize, getMathEpoch, getMathJax, getOrRenderTextBitmap, getPointAndTangentAtArcLength, getTextBitmapCacheSize, handleEnter, handleWorldPositions, hitTestAny, hitTestEdge, hitTestHandles, hitTestPoint, hitTestRotateHandle, idleInteractionState, inflateRect, insertLink, installExtension, installedExtensions, inverseBatch, inverseOp, isAttached, isCanvasHarnessClipboard, isDrawablePrimitive, isMoving, isNodeRemoteEditing, layoutTokens, makeIdGenerator, marqueeNodes, measureText, midpointToCubicControls, minimapScreenToWorld, nodeAABB, nodeIntersectsRect, nodeLocalToWorld, notePenActive, notePenInactive, onMathJaxReady, opSchemas, opSchemasAsAnthropicTools, paintBackground, panByScreen, paste, pointInNode, projectEndToWorld, projectToNodeBoundary, quantizeDpr, quantizeZoom, randomClientId, rectContainsPoint, rectFromPoints, rectsIntersect, registerMigrator, renderMinimapContent, resolveColor, resolveOpacity, resolveRenderScale, resolveStrokeWidth, rotateHandleWorldPosition, rotateVecByAngle, sampleBezier, sampleSelfLoop, samplesFor, sanitizeSvg, sceneBounds, screenToWorld, selfLoopGeometry, serializeSelection, setupSurface, shouldAutoFit, shouldRejectTouch, sideNormalLocal, sideOf, sizeSurface, storeToJSON, subscribeFontEpoch, subscribeMathEpoch, tangentAtArcLength, toImageBlob, toSerialized, toggleBold, toggleCode, toggleItalic, toggleStrike, toggleUnderline, tokenize, unionRects, validateImageInput, validateSvgMarkup, viewportWorldRect, withAutoFitHeight, worldToNodeLocal, worldToScreen, worldViewport, worldViewportFromCamera, zoomAtScreenPoint };
|
|
3492
|
+
export { type AnthropicToolDef, type Arrowhead, BEZIER_SEGMENTS, type BatchId, type BitmapCacheEntry, type BitmapCacheRequest, type BuiltInNodeType, CODE_BG_COLOR, CODE_BLOCK_MARGIN_Y, CODE_BLOCK_PADDING_X, CONTENT_HEIGHT_BUFFER, CONTENT_PADDING, type CameraState, type CanvasBackground, type CanvasBackgroundPattern, type CanvasStore, type CanvasSurface, type ClientId, type ClipResult, type ConflictRecord, type ContextEdge, type ContextNode, DEFAULT_BACKGROUND, DEFAULT_CAMERA, DEFAULT_HIGHLIGHT_COLOR, DEFAULT_HIGHLIGHT_COLOR_DARK, DEFAULT_MINIMAP_MAX_NODES, DEFAULT_STYLE, DEFAULT_TEXT_COLOR, type DeserializeOptions, type DragOriginal, type DrawTextOptions, EDGE_HANDLE_SLOP_PX, EDGE_HIT_SLOP_PX, type Edge, type EdgeEnd, type EdgeGeometry, EdgeGeometryCache, type EdgeHit, type EdgeId, type EdgeStyle, type EditorAdapter, type EditorAdapterFactory, type EditorAdapterMountOptions, type EstimateOptions, type ExportOptions, type Extension, type ExtensionApi, FONT_FAMILY_MAP, FONT_SIZE_MAP, type FontFamily, type FontSize, type FrameLoop, type FrameStats, type GetContextOptions, type Group, type GroupId, type Hit, type IconNodeData, type IdGenerator, type ImageNodeData, type InlineType, type InteractionMode, type InteractionState, LINE_HEIGHT_MAP, LINK_COLOR, type LayoutLine, type LayoutOptions, MAX_IMAGE_BYTES, MAX_SVG_BYTES, MAX_ZOOM, MIN_ZOOM, type MathBitmap, type Migrator, type MinimapContentOptions, type Node, type NodeHit, type NodeId, type NodeType, type NodeTypeDef, type NodeTypeDefOptions, type Op, type OpBatch, type OpOrigin, PALM_REJECTION_GRACE_MS, type PalmRejectionState, type PathStyle, type PointerInfo, type PresenceEvent, type PresencePatch, type PresenceSlice, type PresenceState, type PrimitiveType, RESIZE_HANDLES, RESIZE_HANDLE_SIZE_PX, ROTATE_HANDLE_OFFSET_PX, ROTATE_HANDLE_RADIUS_PX, type RenderEnv, type Renderer, type RendererOptions, type ResizeHandle, SCHEMA_VERSION, type Scene, type SceneContextJson, type SchemaVersion, type SerializedClipboard, type SerializedScene, type Side, type SnapshotEnv, type SpatialId, type SpatialQuery, type SpatialResult, type StoreEventHandler, type StoreEventName, type StoreEvents, type StoreOptions, type StrokeStyle, type Style, type StyledRun, type SvgExportOptions, type SyncAdapter, type SyncAdapterCapabilities, type TextAlign, type TextStyle, type ThemeResolver, type Token, type Transform, UniformGrid, type Unsubscribe, VERSION, type Vec2, type WorldRect, applyCameraTransform, applySvgColor, arrowheadLength, asBatchId, asClientId, asEdgeId, asGroupId, asNodeId, attachSync, autoRouteControls, blobToDataUri, clampEffectiveScale, clampZoom, clearMathCache, clearMeasureCache, clearSurface, clearTextBitmapCache, clipSamples, computeAutoFitHeight, computeEdgeGeometry, copy, createCanvasStore, createDefaultTextareaEditor, createFrameLoop, createPalmRejectionState, createRenderer, cubicBezier, cubicBezierTangent, cut, defineExtension, defineNode, deserializeClipboard, detectConflicts, downscaleImageBlob, drawArrowhead, drawEdge, drawMinimapViewport, drawShape, drawTextToCanvas, drawWithNodeTransform, edgeAABBFromSamples, edgeLabelBoundsWorld, emptyPresenceState, estimateMarkdownContentHeight, exportSelection, exportSelectionSvg, exportViewport, extractSvgDimensions, fromSerialized, fullVisibleClipResult, getCanvasFont, getContentHeight, getContext, getDpr, getFontEpoch, getMarkdownLineHeightPx, getMathBitmap, getMathCacheSize, getMathEpoch, getMathJax, getOrRenderTextBitmap, getPointAndTangentAtArcLength, getTextBitmapCacheSize, handleEnter, handleWorldPositions, hitTestAny, hitTestEdge, hitTestHandles, hitTestPoint, hitTestRotateHandle, idleInteractionState, inflateRect, insertLink, installExtension, installedExtensions, inverseBatch, inverseOp, isAttached, isCanvasHarnessClipboard, isDrawablePrimitive, isMoving, isNodeRemoteEditing, layoutTokens, makeIdGenerator, marqueeNodes, measureText, midpointToCubicControls, minimapScreenToWorld, nodeAABB, nodeIntersectsRect, nodeLocalToWorld, notePenActive, notePenInactive, onMathJaxReady, opSchemas, opSchemasAsAnthropicTools, paintBackground, panByScreen, paste, pointInNode, projectEndToWorld, projectToNodeBoundary, quantizeDpr, quantizeZoom, randomClientId, rectContainsPoint, rectFromPoints, rectsIntersect, registerMigrator, renderMinimapContent, resolveColor, resolveOpacity, resolveRenderScale, resolveStrokeWidth, rotateHandleWorldPosition, rotateVecByAngle, sampleBezier, sampleSelfLoop, samplesFor, sanitizeSvg, sceneBounds, screenToWorld, selfLoopGeometry, serializeSelection, setupSurface, shouldAutoFit, shouldRejectTouch, sideNormalLocal, sideOf, sideToward, sizeSurface, storeToJSON, subscribeFontEpoch, subscribeMathEpoch, tangentAtArcLength, toImageBlob, toSerialized, toggleBold, toggleCode, toggleItalic, toggleStrike, toggleUnderline, tokenize, unionRects, validateImageInput, validateSvgMarkup, viewportWorldRect, withAutoFitHeight, worldToNodeLocal, worldToScreen, worldViewport, worldViewportFromCamera, zoomAtScreenPoint };
|
package/dist/index.d.ts
CHANGED
|
@@ -469,10 +469,14 @@ declare const nodeAABB: (node: Node) => WorldRect;
|
|
|
469
469
|
/**
|
|
470
470
|
* Auto-routing for bezier edges — see ARCHITECTURE.md §6.6.
|
|
471
471
|
*
|
|
472
|
-
*
|
|
473
|
-
* endpoint
|
|
474
|
-
*
|
|
475
|
-
*
|
|
472
|
+
* Unified rule: for each attached endpoint, cast a ray from the node
|
|
473
|
+
* center toward the other endpoint and pick the side the ray exits
|
|
474
|
+
* through. The bezier's control point at that end leaves along that
|
|
475
|
+
* side's outward normal. Endpoints themselves stay at the user-supplied
|
|
476
|
+
* localOffset; the renderer's clipSamples trims any inside-rect portion.
|
|
477
|
+
*
|
|
478
|
+
* Rotation-aware: side selection happens in each node's pre-rotation
|
|
479
|
+
* local frame, then the normal is rotated back into world.
|
|
476
480
|
*/
|
|
477
481
|
|
|
478
482
|
type Side = 'n' | 's' | 'e' | 'w';
|
|
@@ -503,6 +507,16 @@ declare const autoRouteControls: (sourceWorld: Vec2, targetWorld: Vec2, sourceNo
|
|
|
503
507
|
c1: Vec2;
|
|
504
508
|
c2: Vec2;
|
|
505
509
|
};
|
|
510
|
+
/**
|
|
511
|
+
* Picks which side of {@link node}'s rect the line from the node's
|
|
512
|
+
* center to {@link towardWorld} exits through. The bezier auto-route
|
|
513
|
+
* uses this to choose each endpoint's outgoing direction: the control
|
|
514
|
+
* leaves along the chosen side's outward normal.
|
|
515
|
+
*
|
|
516
|
+
* Rotation-aware: the ray is computed in the node's pre-rotation local
|
|
517
|
+
* frame so a rotated rect still picks its locally-correct side.
|
|
518
|
+
*/
|
|
519
|
+
declare const sideToward: (node: Node, towardWorld: Vec2) => Side;
|
|
506
520
|
|
|
507
521
|
/**
|
|
508
522
|
* Result of clipping the polyline against the two attached-node rects.
|
|
@@ -2485,10 +2499,14 @@ type Hit = NodeHit | EdgeHit;
|
|
|
2485
2499
|
declare const hitTestPoint: (store: CanvasStore, worldPoint: Vec2, cameraZ: number, selectedIds?: ReadonlySet<NodeId>) => NodeHit | null;
|
|
2486
2500
|
/**
|
|
2487
2501
|
* Combined node + edge hit testing. Order: node handles > edge endpoint
|
|
2488
|
-
* handles > node
|
|
2502
|
+
* handles > visually-topmost body (node or edge, compared by z).
|
|
2489
2503
|
*
|
|
2490
|
-
*
|
|
2491
|
-
*
|
|
2504
|
+
* For bodies, the rule is paint-order: whichever of (node body, edge
|
|
2505
|
+
* body) has the higher z wins, with ties going to edges (edges paint
|
|
2506
|
+
* over nodes by convention). This lets users click an edge that runs
|
|
2507
|
+
* visually over a large background-style node — the 8px polyline slop
|
|
2508
|
+
* keeps the edge's hit zone narrow, so clicks far from the polyline
|
|
2509
|
+
* still land on the node underneath.
|
|
2492
2510
|
*/
|
|
2493
2511
|
declare const hitTestAny: (store: CanvasStore, worldPoint: Vec2, cameraZ: number, selectedNodes?: ReadonlySet<NodeId>, selectedEdges?: ReadonlySet<EdgeId>) => Hit | null;
|
|
2494
2512
|
/**
|
|
@@ -3471,4 +3489,4 @@ declare const installedExtensions: (store: CanvasStore) => string[];
|
|
|
3471
3489
|
*/
|
|
3472
3490
|
declare const VERSION = "0.0.0";
|
|
3473
3491
|
|
|
3474
|
-
export { type AnthropicToolDef, type Arrowhead, BEZIER_SEGMENTS, type BatchId, type BitmapCacheEntry, type BitmapCacheRequest, type BuiltInNodeType, CODE_BG_COLOR, CODE_BLOCK_MARGIN_Y, CODE_BLOCK_PADDING_X, CONTENT_HEIGHT_BUFFER, CONTENT_PADDING, type CameraState, type CanvasBackground, type CanvasBackgroundPattern, type CanvasStore, type CanvasSurface, type ClientId, type ClipResult, type ConflictRecord, type ContextEdge, type ContextNode, DEFAULT_BACKGROUND, DEFAULT_CAMERA, DEFAULT_HIGHLIGHT_COLOR, DEFAULT_HIGHLIGHT_COLOR_DARK, DEFAULT_MINIMAP_MAX_NODES, DEFAULT_STYLE, DEFAULT_TEXT_COLOR, type DeserializeOptions, type DragOriginal, type DrawTextOptions, EDGE_HANDLE_SLOP_PX, EDGE_HIT_SLOP_PX, type Edge, type EdgeEnd, type EdgeGeometry, EdgeGeometryCache, type EdgeHit, type EdgeId, type EdgeStyle, type EditorAdapter, type EditorAdapterFactory, type EditorAdapterMountOptions, type EstimateOptions, type ExportOptions, type Extension, type ExtensionApi, FONT_FAMILY_MAP, FONT_SIZE_MAP, type FontFamily, type FontSize, type FrameLoop, type FrameStats, type GetContextOptions, type Group, type GroupId, type Hit, type IconNodeData, type IdGenerator, type ImageNodeData, type InlineType, type InteractionMode, type InteractionState, LINE_HEIGHT_MAP, LINK_COLOR, type LayoutLine, type LayoutOptions, MAX_IMAGE_BYTES, MAX_SVG_BYTES, MAX_ZOOM, MIN_ZOOM, type MathBitmap, type Migrator, type MinimapContentOptions, type Node, type NodeHit, type NodeId, type NodeType, type NodeTypeDef, type NodeTypeDefOptions, type Op, type OpBatch, type OpOrigin, PALM_REJECTION_GRACE_MS, type PalmRejectionState, type PathStyle, type PointerInfo, type PresenceEvent, type PresencePatch, type PresenceSlice, type PresenceState, type PrimitiveType, RESIZE_HANDLES, RESIZE_HANDLE_SIZE_PX, ROTATE_HANDLE_OFFSET_PX, ROTATE_HANDLE_RADIUS_PX, type RenderEnv, type Renderer, type RendererOptions, type ResizeHandle, SCHEMA_VERSION, type Scene, type SceneContextJson, type SchemaVersion, type SerializedClipboard, type SerializedScene, type Side, type SnapshotEnv, type SpatialId, type SpatialQuery, type SpatialResult, type StoreEventHandler, type StoreEventName, type StoreEvents, type StoreOptions, type StrokeStyle, type Style, type StyledRun, type SvgExportOptions, type SyncAdapter, type SyncAdapterCapabilities, type TextAlign, type TextStyle, type ThemeResolver, type Token, type Transform, UniformGrid, type Unsubscribe, VERSION, type Vec2, type WorldRect, applyCameraTransform, applySvgColor, arrowheadLength, asBatchId, asClientId, asEdgeId, asGroupId, asNodeId, attachSync, autoRouteControls, blobToDataUri, clampEffectiveScale, clampZoom, clearMathCache, clearMeasureCache, clearSurface, clearTextBitmapCache, clipSamples, computeAutoFitHeight, computeEdgeGeometry, copy, createCanvasStore, createDefaultTextareaEditor, createFrameLoop, createPalmRejectionState, createRenderer, cubicBezier, cubicBezierTangent, cut, defineExtension, defineNode, deserializeClipboard, detectConflicts, downscaleImageBlob, drawArrowhead, drawEdge, drawMinimapViewport, drawShape, drawTextToCanvas, drawWithNodeTransform, edgeAABBFromSamples, edgeLabelBoundsWorld, emptyPresenceState, estimateMarkdownContentHeight, exportSelection, exportSelectionSvg, exportViewport, extractSvgDimensions, fromSerialized, fullVisibleClipResult, getCanvasFont, getContentHeight, getContext, getDpr, getFontEpoch, getMarkdownLineHeightPx, getMathBitmap, getMathCacheSize, getMathEpoch, getMathJax, getOrRenderTextBitmap, getPointAndTangentAtArcLength, getTextBitmapCacheSize, handleEnter, handleWorldPositions, hitTestAny, hitTestEdge, hitTestHandles, hitTestPoint, hitTestRotateHandle, idleInteractionState, inflateRect, insertLink, installExtension, installedExtensions, inverseBatch, inverseOp, isAttached, isCanvasHarnessClipboard, isDrawablePrimitive, isMoving, isNodeRemoteEditing, layoutTokens, makeIdGenerator, marqueeNodes, measureText, midpointToCubicControls, minimapScreenToWorld, nodeAABB, nodeIntersectsRect, nodeLocalToWorld, notePenActive, notePenInactive, onMathJaxReady, opSchemas, opSchemasAsAnthropicTools, paintBackground, panByScreen, paste, pointInNode, projectEndToWorld, projectToNodeBoundary, quantizeDpr, quantizeZoom, randomClientId, rectContainsPoint, rectFromPoints, rectsIntersect, registerMigrator, renderMinimapContent, resolveColor, resolveOpacity, resolveRenderScale, resolveStrokeWidth, rotateHandleWorldPosition, rotateVecByAngle, sampleBezier, sampleSelfLoop, samplesFor, sanitizeSvg, sceneBounds, screenToWorld, selfLoopGeometry, serializeSelection, setupSurface, shouldAutoFit, shouldRejectTouch, sideNormalLocal, sideOf, sizeSurface, storeToJSON, subscribeFontEpoch, subscribeMathEpoch, tangentAtArcLength, toImageBlob, toSerialized, toggleBold, toggleCode, toggleItalic, toggleStrike, toggleUnderline, tokenize, unionRects, validateImageInput, validateSvgMarkup, viewportWorldRect, withAutoFitHeight, worldToNodeLocal, worldToScreen, worldViewport, worldViewportFromCamera, zoomAtScreenPoint };
|
|
3492
|
+
export { type AnthropicToolDef, type Arrowhead, BEZIER_SEGMENTS, type BatchId, type BitmapCacheEntry, type BitmapCacheRequest, type BuiltInNodeType, CODE_BG_COLOR, CODE_BLOCK_MARGIN_Y, CODE_BLOCK_PADDING_X, CONTENT_HEIGHT_BUFFER, CONTENT_PADDING, type CameraState, type CanvasBackground, type CanvasBackgroundPattern, type CanvasStore, type CanvasSurface, type ClientId, type ClipResult, type ConflictRecord, type ContextEdge, type ContextNode, DEFAULT_BACKGROUND, DEFAULT_CAMERA, DEFAULT_HIGHLIGHT_COLOR, DEFAULT_HIGHLIGHT_COLOR_DARK, DEFAULT_MINIMAP_MAX_NODES, DEFAULT_STYLE, DEFAULT_TEXT_COLOR, type DeserializeOptions, type DragOriginal, type DrawTextOptions, EDGE_HANDLE_SLOP_PX, EDGE_HIT_SLOP_PX, type Edge, type EdgeEnd, type EdgeGeometry, EdgeGeometryCache, type EdgeHit, type EdgeId, type EdgeStyle, type EditorAdapter, type EditorAdapterFactory, type EditorAdapterMountOptions, type EstimateOptions, type ExportOptions, type Extension, type ExtensionApi, FONT_FAMILY_MAP, FONT_SIZE_MAP, type FontFamily, type FontSize, type FrameLoop, type FrameStats, type GetContextOptions, type Group, type GroupId, type Hit, type IconNodeData, type IdGenerator, type ImageNodeData, type InlineType, type InteractionMode, type InteractionState, LINE_HEIGHT_MAP, LINK_COLOR, type LayoutLine, type LayoutOptions, MAX_IMAGE_BYTES, MAX_SVG_BYTES, MAX_ZOOM, MIN_ZOOM, type MathBitmap, type Migrator, type MinimapContentOptions, type Node, type NodeHit, type NodeId, type NodeType, type NodeTypeDef, type NodeTypeDefOptions, type Op, type OpBatch, type OpOrigin, PALM_REJECTION_GRACE_MS, type PalmRejectionState, type PathStyle, type PointerInfo, type PresenceEvent, type PresencePatch, type PresenceSlice, type PresenceState, type PrimitiveType, RESIZE_HANDLES, RESIZE_HANDLE_SIZE_PX, ROTATE_HANDLE_OFFSET_PX, ROTATE_HANDLE_RADIUS_PX, type RenderEnv, type Renderer, type RendererOptions, type ResizeHandle, SCHEMA_VERSION, type Scene, type SceneContextJson, type SchemaVersion, type SerializedClipboard, type SerializedScene, type Side, type SnapshotEnv, type SpatialId, type SpatialQuery, type SpatialResult, type StoreEventHandler, type StoreEventName, type StoreEvents, type StoreOptions, type StrokeStyle, type Style, type StyledRun, type SvgExportOptions, type SyncAdapter, type SyncAdapterCapabilities, type TextAlign, type TextStyle, type ThemeResolver, type Token, type Transform, UniformGrid, type Unsubscribe, VERSION, type Vec2, type WorldRect, applyCameraTransform, applySvgColor, arrowheadLength, asBatchId, asClientId, asEdgeId, asGroupId, asNodeId, attachSync, autoRouteControls, blobToDataUri, clampEffectiveScale, clampZoom, clearMathCache, clearMeasureCache, clearSurface, clearTextBitmapCache, clipSamples, computeAutoFitHeight, computeEdgeGeometry, copy, createCanvasStore, createDefaultTextareaEditor, createFrameLoop, createPalmRejectionState, createRenderer, cubicBezier, cubicBezierTangent, cut, defineExtension, defineNode, deserializeClipboard, detectConflicts, downscaleImageBlob, drawArrowhead, drawEdge, drawMinimapViewport, drawShape, drawTextToCanvas, drawWithNodeTransform, edgeAABBFromSamples, edgeLabelBoundsWorld, emptyPresenceState, estimateMarkdownContentHeight, exportSelection, exportSelectionSvg, exportViewport, extractSvgDimensions, fromSerialized, fullVisibleClipResult, getCanvasFont, getContentHeight, getContext, getDpr, getFontEpoch, getMarkdownLineHeightPx, getMathBitmap, getMathCacheSize, getMathEpoch, getMathJax, getOrRenderTextBitmap, getPointAndTangentAtArcLength, getTextBitmapCacheSize, handleEnter, handleWorldPositions, hitTestAny, hitTestEdge, hitTestHandles, hitTestPoint, hitTestRotateHandle, idleInteractionState, inflateRect, insertLink, installExtension, installedExtensions, inverseBatch, inverseOp, isAttached, isCanvasHarnessClipboard, isDrawablePrimitive, isMoving, isNodeRemoteEditing, layoutTokens, makeIdGenerator, marqueeNodes, measureText, midpointToCubicControls, minimapScreenToWorld, nodeAABB, nodeIntersectsRect, nodeLocalToWorld, notePenActive, notePenInactive, onMathJaxReady, opSchemas, opSchemasAsAnthropicTools, paintBackground, panByScreen, paste, pointInNode, projectEndToWorld, projectToNodeBoundary, quantizeDpr, quantizeZoom, randomClientId, rectContainsPoint, rectFromPoints, rectsIntersect, registerMigrator, renderMinimapContent, resolveColor, resolveOpacity, resolveRenderScale, resolveStrokeWidth, rotateHandleWorldPosition, rotateVecByAngle, sampleBezier, sampleSelfLoop, samplesFor, sanitizeSvg, sceneBounds, screenToWorld, selfLoopGeometry, serializeSelection, setupSurface, shouldAutoFit, shouldRejectTouch, sideNormalLocal, sideOf, sideToward, sizeSurface, storeToJSON, subscribeFontEpoch, subscribeMathEpoch, tangentAtArcLength, toImageBlob, toSerialized, toggleBold, toggleCode, toggleItalic, toggleStrike, toggleUnderline, tokenize, unionRects, validateImageInput, validateSvgMarkup, viewportWorldRect, withAutoFitHeight, worldToNodeLocal, worldToScreen, worldViewport, worldViewportFromCamera, zoomAtScreenPoint };
|
package/dist/index.js
CHANGED
|
@@ -282,15 +282,6 @@ var projectToNodeBoundary = (world, node) => {
|
|
|
282
282
|
// src/edges/auto-route.ts
|
|
283
283
|
var CONTROL_MAX = 200;
|
|
284
284
|
var CONTROL_FRACTION = 0.4;
|
|
285
|
-
var BOUNDARY_EPS = 0.5;
|
|
286
|
-
var isLocalOffsetInsideBody = (localOffset, node) => {
|
|
287
|
-
const onLeft = Math.abs(localOffset.x) <= BOUNDARY_EPS;
|
|
288
|
-
const onRight = Math.abs(localOffset.x - node.w) <= BOUNDARY_EPS;
|
|
289
|
-
const onTop = Math.abs(localOffset.y) <= BOUNDARY_EPS;
|
|
290
|
-
const onBottom = Math.abs(localOffset.y - node.h) <= BOUNDARY_EPS;
|
|
291
|
-
const inside = localOffset.x > -BOUNDARY_EPS && localOffset.x < node.w + BOUNDARY_EPS && localOffset.y > -BOUNDARY_EPS && localOffset.y < node.h + BOUNDARY_EPS;
|
|
292
|
-
return inside && !onLeft && !onRight && !onTop && !onBottom;
|
|
293
|
-
};
|
|
294
285
|
var sideOf = (node, localX, localY) => {
|
|
295
286
|
const distLeft = localX;
|
|
296
287
|
const distRight = node.w - localX;
|
|
@@ -334,55 +325,17 @@ var autoRouteControls = (sourceWorld, targetWorld, sourceNormalWorld, targetNorm
|
|
|
334
325
|
c2: { x: targetWorld.x + nt.x * offset, y: targetWorld.y + nt.y * offset }
|
|
335
326
|
};
|
|
336
327
|
};
|
|
337
|
-
var
|
|
338
|
-
const
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
const
|
|
343
|
-
|
|
344
|
-
const
|
|
345
|
-
const
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
let tgtEntryLocal;
|
|
349
|
-
if (targetSide === "n" || targetSide === "s") {
|
|
350
|
-
const sideY = targetSide === "n" ? 0 : targetNode.h;
|
|
351
|
-
const clampX = Math.max(0, Math.min(targetNode.w, srcInTgtLocal.x));
|
|
352
|
-
tgtEntryLocal = { x: clampX, y: sideY };
|
|
353
|
-
} else {
|
|
354
|
-
const sideX = targetSide === "w" ? 0 : targetNode.w;
|
|
355
|
-
const clampY = Math.max(0, Math.min(targetNode.h, srcInTgtLocal.y));
|
|
356
|
-
tgtEntryLocal = { x: sideX, y: clampY };
|
|
357
|
-
}
|
|
358
|
-
const targetEntryWorld = nodeLocalToWorld(tgtEntryLocal, targetNode);
|
|
359
|
-
const tgtEntryInSrcLocal = worldToNodeLocal(targetEntryWorld, sourceNode);
|
|
360
|
-
const srcHalfW = sourceNode.w / 2;
|
|
361
|
-
const srcHalfH = sourceNode.h / 2;
|
|
362
|
-
const rayDx = tgtEntryInSrcLocal.x - srcHalfW;
|
|
363
|
-
const rayDy = tgtEntryInSrcLocal.y - srcHalfH;
|
|
364
|
-
const tx = rayDx === 0 ? Number.POSITIVE_INFINITY : (rayDx > 0 ? srcHalfW : -srcHalfW) / rayDx;
|
|
365
|
-
const ty = rayDy === 0 ? Number.POSITIVE_INFINITY : (rayDy > 0 ? srcHalfH : -srcHalfH) / rayDy;
|
|
366
|
-
const t = Math.min(tx, ty);
|
|
367
|
-
const srcExitLocal = {
|
|
368
|
-
x: srcHalfW + rayDx * t,
|
|
369
|
-
y: srcHalfH + rayDy * t
|
|
370
|
-
};
|
|
371
|
-
const sourceExitWorld = nodeLocalToWorld(srcExitLocal, sourceNode);
|
|
372
|
-
const dxWorld = targetEntryWorld.x - sourceExitWorld.x;
|
|
373
|
-
const dyWorld = targetEntryWorld.y - sourceExitWorld.y;
|
|
374
|
-
const distance2 = Math.hypot(dxWorld, dyWorld);
|
|
375
|
-
const offset = Math.min(CONTROL_MAX, CONTROL_FRACTION * distance2);
|
|
376
|
-
const c1 = distance2 > 0 ? {
|
|
377
|
-
x: sourceExitWorld.x + dxWorld / distance2 * offset,
|
|
378
|
-
y: sourceExitWorld.y + dyWorld / distance2 * offset
|
|
379
|
-
} : { ...sourceExitWorld };
|
|
380
|
-
const tgtNormalWorld = rotateVecByAngle(sideNormalLocal(targetSide), targetNode.angle);
|
|
381
|
-
const c2 = {
|
|
382
|
-
x: targetEntryWorld.x + tgtNormalWorld.x * offset,
|
|
383
|
-
y: targetEntryWorld.y + tgtNormalWorld.y * offset
|
|
384
|
-
};
|
|
385
|
-
return { source: sourceExitWorld, target: targetEntryWorld, c1, c2 };
|
|
328
|
+
var sideToward = (node, towardWorld) => {
|
|
329
|
+
const local = worldToNodeLocal(towardWorld, node);
|
|
330
|
+
const halfW = node.w / 2;
|
|
331
|
+
const halfH = node.h / 2;
|
|
332
|
+
const dx = local.x - halfW;
|
|
333
|
+
const dy = local.y - halfH;
|
|
334
|
+
if (dx === 0 && dy === 0) return "e";
|
|
335
|
+
const tx = dx === 0 ? Number.POSITIVE_INFINITY : (dx > 0 ? halfW : -halfW) / dx;
|
|
336
|
+
const ty = dy === 0 ? Number.POSITIVE_INFINITY : (dy > 0 ? halfH : -halfH) / dy;
|
|
337
|
+
if (tx <= ty) return dx > 0 ? "e" : "w";
|
|
338
|
+
return dy > 0 ? "s" : "n";
|
|
386
339
|
};
|
|
387
340
|
|
|
388
341
|
// src/edges/clip.ts
|
|
@@ -645,8 +598,8 @@ var computeEdgeGeometry = (edge, getNode) => {
|
|
|
645
598
|
targetNodeId
|
|
646
599
|
};
|
|
647
600
|
}
|
|
648
|
-
|
|
649
|
-
|
|
601
|
+
const sourceWorld = projectEndToWorld(edge.source, getNode);
|
|
602
|
+
const targetWorld = projectEndToWorld(edge.target, getNode);
|
|
650
603
|
if (!sourceWorld || !targetWorld) return null;
|
|
651
604
|
let samples;
|
|
652
605
|
if (edge.pathStyle === "bezier") {
|
|
@@ -655,25 +608,9 @@ var computeEdgeGeometry = (edge, getNode) => {
|
|
|
655
608
|
if (edge.control && edge.control.length >= 2) {
|
|
656
609
|
c1 = edge.control[0];
|
|
657
610
|
c2 = edge.control[1];
|
|
658
|
-
} else if (sourceNode && targetNode && isAttached(edge.source) && isAttached(edge.target) && isLocalOffsetInsideBody(edge.source.localOffset, sourceNode) && isLocalOffsetInsideBody(edge.target.localOffset, targetNode)) {
|
|
659
|
-
const r = computeAsymmetricRoute(sourceNode, targetNode);
|
|
660
|
-
sourceWorld = r.source;
|
|
661
|
-
targetWorld = r.target;
|
|
662
|
-
c1 = r.c1;
|
|
663
|
-
c2 = r.c2;
|
|
664
611
|
} else {
|
|
665
|
-
const sourceNormal = sourceNode
|
|
666
|
-
|
|
667
|
-
sideOf(sourceNode, edge.source.localOffset.x, edge.source.localOffset.y)
|
|
668
|
-
),
|
|
669
|
-
sourceNode.angle
|
|
670
|
-
) : null;
|
|
671
|
-
const targetNormal = targetNode && isAttached(edge.target) ? rotateVecByAngle(
|
|
672
|
-
sideNormalLocal(
|
|
673
|
-
sideOf(targetNode, edge.target.localOffset.x, edge.target.localOffset.y)
|
|
674
|
-
),
|
|
675
|
-
targetNode.angle
|
|
676
|
-
) : null;
|
|
612
|
+
const sourceNormal = sourceNode ? rotateVecByAngle(sideNormalLocal(sideToward(sourceNode, targetWorld)), sourceNode.angle) : null;
|
|
613
|
+
const targetNormal = targetNode ? rotateVecByAngle(sideNormalLocal(sideToward(targetNode, sourceWorld)), targetNode.angle) : null;
|
|
677
614
|
({ c1, c2 } = autoRouteControls(sourceWorld, targetWorld, sourceNormal, targetNormal));
|
|
678
615
|
}
|
|
679
616
|
samples = samplesFor("bezier", sourceWorld, targetWorld, [c1, c2]);
|
|
@@ -5914,8 +5851,13 @@ var hitTestAny = (store, worldPoint, cameraZ, selectedNodes = /* @__PURE__ */ ne
|
|
|
5914
5851
|
}
|
|
5915
5852
|
}
|
|
5916
5853
|
const nodeHit = hitTestPoint(store, worldPoint, cameraZ, selectedNodes);
|
|
5917
|
-
|
|
5918
|
-
|
|
5854
|
+
const edgeHit = hitTestEdge(store, worldPoint, cameraZ);
|
|
5855
|
+
if (nodeHit && edgeHit && "edgeId" in edgeHit) {
|
|
5856
|
+
const nodeZ = store.getNode(nodeHit.nodeId)?.z ?? 0;
|
|
5857
|
+
const edgeZ = store.getEdge(edgeHit.edgeId)?.z ?? 0;
|
|
5858
|
+
return edgeZ >= nodeZ ? edgeHit : nodeHit;
|
|
5859
|
+
}
|
|
5860
|
+
return nodeHit ?? edgeHit;
|
|
5919
5861
|
};
|
|
5920
5862
|
var marqueeNodes = (store, rect) => {
|
|
5921
5863
|
const candidates = store.querySpatial({ rect }).nodes;
|
|
@@ -6656,6 +6598,6 @@ var installedExtensions = (store) => {
|
|
|
6656
6598
|
// src/index.ts
|
|
6657
6599
|
var VERSION = "0.0.0";
|
|
6658
6600
|
|
|
6659
|
-
export { BEZIER_SEGMENTS, CODE_BG_COLOR, CODE_BLOCK_MARGIN_Y, CODE_BLOCK_PADDING_X, CONTENT_HEIGHT_BUFFER, CONTENT_PADDING, DEFAULT_BACKGROUND, DEFAULT_CAMERA, DEFAULT_HIGHLIGHT_COLOR, DEFAULT_HIGHLIGHT_COLOR_DARK, DEFAULT_MINIMAP_MAX_NODES, DEFAULT_STYLE, DEFAULT_TEXT_COLOR, EDGE_HANDLE_SLOP_PX, EDGE_HIT_SLOP_PX, EdgeGeometryCache, FONT_FAMILY_MAP, FONT_SIZE_MAP, LINE_HEIGHT_MAP, LINK_COLOR, MAX_IMAGE_BYTES, MAX_SVG_BYTES, MAX_ZOOM, MIN_ZOOM, PALM_REJECTION_GRACE_MS, RESIZE_HANDLES, RESIZE_HANDLE_SIZE_PX, ROTATE_HANDLE_OFFSET_PX, ROTATE_HANDLE_RADIUS_PX, SCHEMA_VERSION, UniformGrid, VERSION, applyCameraTransform, applySvgColor, arrowheadLength, asBatchId, asClientId, asEdgeId, asGroupId, asNodeId, attachSync, autoRouteControls, blobToDataUri, clampEffectiveScale, clampZoom, clearMathCache, clearMeasureCache, clearSurface, clearTextBitmapCache, clipSamples, computeAutoFitHeight, computeEdgeGeometry, copy, createCanvasStore, createDefaultTextareaEditor, createFrameLoop, createPalmRejectionState, createRenderer, cubicBezier, cubicBezierTangent, cut, defineExtension, defineNode, deserializeClipboard, detectConflicts, downscaleImageBlob, drawArrowhead, drawEdge, drawMinimapViewport, drawShape, drawTextToCanvas, drawWithNodeTransform, edgeAABBFromSamples, edgeLabelBoundsWorld, emptyPresenceState, estimateMarkdownContentHeight, exportSelection, exportSelectionSvg, exportViewport, extractSvgDimensions, fromSerialized, fullVisibleClipResult, getCanvasFont, getContentHeight, getContext, getDpr, getFontEpoch, getMarkdownLineHeightPx, getMathBitmap, getMathCacheSize, getMathEpoch, getMathJax, getOrRenderTextBitmap, getPointAndTangentAtArcLength, getTextBitmapCacheSize, handleEnter, handleWorldPositions, hitTestAny, hitTestEdge, hitTestHandles, hitTestPoint, hitTestRotateHandle, idleInteractionState, inflateRect, insertLink, installExtension, installedExtensions, inverseBatch, inverseOp, isAttached, isCanvasHarnessClipboard, isDrawablePrimitive, isMoving, isNodeRemoteEditing, layoutTokens, makeIdGenerator, marqueeNodes, measureText, midpointToCubicControls, minimapScreenToWorld, nodeAABB, nodeIntersectsRect, nodeLocalToWorld, notePenActive, notePenInactive, onMathJaxReady, opSchemas, opSchemasAsAnthropicTools, paintBackground, panByScreen, paste, pointInNode, projectEndToWorld, projectToNodeBoundary, quantizeDpr, quantizeZoom, randomClientId, rectContainsPoint, rectFromPoints, rectsIntersect, registerMigrator, renderMinimapContent, resolveColor, resolveOpacity, resolveRenderScale, resolveStrokeWidth, rotateHandleWorldPosition, rotateVecByAngle, sampleBezier, sampleSelfLoop, samplesFor, sanitizeSvg, sceneBounds, screenToWorld, selfLoopGeometry, serializeSelection, setupSurface, shouldAutoFit, shouldRejectTouch, sideNormalLocal, sideOf, sizeSurface, storeToJSON, subscribeFontEpoch, subscribeMathEpoch, tangentAtArcLength, toImageBlob, toSerialized, toggleBold, toggleCode, toggleItalic, toggleStrike, toggleUnderline, tokenize, unionRects, validateImageInput, validateSvgMarkup, viewportWorldRect, withAutoFitHeight, worldToNodeLocal, worldToScreen, worldViewport, worldViewportFromCamera, zoomAtScreenPoint };
|
|
6601
|
+
export { BEZIER_SEGMENTS, CODE_BG_COLOR, CODE_BLOCK_MARGIN_Y, CODE_BLOCK_PADDING_X, CONTENT_HEIGHT_BUFFER, CONTENT_PADDING, DEFAULT_BACKGROUND, DEFAULT_CAMERA, DEFAULT_HIGHLIGHT_COLOR, DEFAULT_HIGHLIGHT_COLOR_DARK, DEFAULT_MINIMAP_MAX_NODES, DEFAULT_STYLE, DEFAULT_TEXT_COLOR, EDGE_HANDLE_SLOP_PX, EDGE_HIT_SLOP_PX, EdgeGeometryCache, FONT_FAMILY_MAP, FONT_SIZE_MAP, LINE_HEIGHT_MAP, LINK_COLOR, MAX_IMAGE_BYTES, MAX_SVG_BYTES, MAX_ZOOM, MIN_ZOOM, PALM_REJECTION_GRACE_MS, RESIZE_HANDLES, RESIZE_HANDLE_SIZE_PX, ROTATE_HANDLE_OFFSET_PX, ROTATE_HANDLE_RADIUS_PX, SCHEMA_VERSION, UniformGrid, VERSION, applyCameraTransform, applySvgColor, arrowheadLength, asBatchId, asClientId, asEdgeId, asGroupId, asNodeId, attachSync, autoRouteControls, blobToDataUri, clampEffectiveScale, clampZoom, clearMathCache, clearMeasureCache, clearSurface, clearTextBitmapCache, clipSamples, computeAutoFitHeight, computeEdgeGeometry, copy, createCanvasStore, createDefaultTextareaEditor, createFrameLoop, createPalmRejectionState, createRenderer, cubicBezier, cubicBezierTangent, cut, defineExtension, defineNode, deserializeClipboard, detectConflicts, downscaleImageBlob, drawArrowhead, drawEdge, drawMinimapViewport, drawShape, drawTextToCanvas, drawWithNodeTransform, edgeAABBFromSamples, edgeLabelBoundsWorld, emptyPresenceState, estimateMarkdownContentHeight, exportSelection, exportSelectionSvg, exportViewport, extractSvgDimensions, fromSerialized, fullVisibleClipResult, getCanvasFont, getContentHeight, getContext, getDpr, getFontEpoch, getMarkdownLineHeightPx, getMathBitmap, getMathCacheSize, getMathEpoch, getMathJax, getOrRenderTextBitmap, getPointAndTangentAtArcLength, getTextBitmapCacheSize, handleEnter, handleWorldPositions, hitTestAny, hitTestEdge, hitTestHandles, hitTestPoint, hitTestRotateHandle, idleInteractionState, inflateRect, insertLink, installExtension, installedExtensions, inverseBatch, inverseOp, isAttached, isCanvasHarnessClipboard, isDrawablePrimitive, isMoving, isNodeRemoteEditing, layoutTokens, makeIdGenerator, marqueeNodes, measureText, midpointToCubicControls, minimapScreenToWorld, nodeAABB, nodeIntersectsRect, nodeLocalToWorld, notePenActive, notePenInactive, onMathJaxReady, opSchemas, opSchemasAsAnthropicTools, paintBackground, panByScreen, paste, pointInNode, projectEndToWorld, projectToNodeBoundary, quantizeDpr, quantizeZoom, randomClientId, rectContainsPoint, rectFromPoints, rectsIntersect, registerMigrator, renderMinimapContent, resolveColor, resolveOpacity, resolveRenderScale, resolveStrokeWidth, rotateHandleWorldPosition, rotateVecByAngle, sampleBezier, sampleSelfLoop, samplesFor, sanitizeSvg, sceneBounds, screenToWorld, selfLoopGeometry, serializeSelection, setupSurface, shouldAutoFit, shouldRejectTouch, sideNormalLocal, sideOf, sideToward, sizeSurface, storeToJSON, subscribeFontEpoch, subscribeMathEpoch, tangentAtArcLength, toImageBlob, toSerialized, toggleBold, toggleCode, toggleItalic, toggleStrike, toggleUnderline, tokenize, unionRects, validateImageInput, validateSvgMarkup, viewportWorldRect, withAutoFitHeight, worldToNodeLocal, worldToScreen, worldViewport, worldViewportFromCamera, zoomAtScreenPoint };
|
|
6660
6602
|
//# sourceMappingURL=index.js.map
|
|
6661
6603
|
//# sourceMappingURL=index.js.map
|