@pairdraw/vue 0.21.1 → 0.22.0
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/canvas/index.d.ts +2 -1
- package/dist/canvas/index.js +2 -1
- package/dist/canvas/pointer/drag-move.js +2 -2
- package/dist/canvas/pointer/drag-move.js.map +1 -1
- package/dist/canvas/surface/color-space.d.ts.map +1 -1
- package/dist/canvas/surface/color-space.js +3 -19
- package/dist/canvas/surface/color-space.js.map +1 -1
- package/dist/canvas/surface/kit-loader.d.ts +10 -0
- package/dist/canvas/surface/kit-loader.d.ts.map +1 -0
- package/dist/canvas/surface/kit-loader.js +11 -2
- package/dist/canvas/surface/kit-loader.js.map +1 -1
- package/dist/canvas/tools/registry.js +1 -0
- package/dist/canvas/tools/registry.js.map +1 -1
- package/dist/canvas/useCanvasInput.d.ts +420 -0
- package/dist/controls/layout/helpers.js +28 -9
- package/dist/controls/layout/helpers.js.map +1 -1
- package/dist/controls/layout/use.d.ts +2 -0
- package/dist/controls/layout/use.d.ts.map +1 -1
- package/dist/controls/layout/use.js +3 -1
- package/dist/controls/layout/use.js.map +1 -1
- package/dist/controls/node-props/helpers.d.ts.map +1 -1
- package/dist/controls/node-props/helpers.js +1 -1
- package/dist/controls/node-props/helpers.js.map +1 -1
- package/dist/controls/number-variable-binding/index.d.ts +2 -2
- package/dist/controls/number-variable-binding/index.js +2 -2
- package/dist/controls/number-variable-binding/use.d.ts +7 -2
- package/dist/controls/number-variable-binding/use.d.ts.map +1 -1
- package/dist/controls/number-variable-binding/use.js +9 -1
- package/dist/controls/number-variable-binding/use.js.map +1 -1
- package/dist/controls/position/use.d.ts +1 -1
- package/dist/controls/typography/arrivals.js +35 -0
- package/dist/controls/typography/arrivals.js.map +1 -0
- package/dist/controls/typography/axes.d.ts.map +1 -1
- package/dist/controls/typography/axes.js +3 -0
- package/dist/controls/typography/axes.js.map +1 -1
- package/dist/controls/typography/faces.js +4 -15
- package/dist/controls/typography/faces.js.map +1 -1
- package/dist/controls/typography/features.d.ts.map +1 -1
- package/dist/controls/typography/features.js +3 -17
- package/dist/controls/typography/features.js.map +1 -1
- package/dist/editor/commands/actions.d.ts +10 -0
- package/dist/editor/commands/actions.d.ts.map +1 -0
- package/dist/editor/commands/actions.js +9 -1
- package/dist/editor/commands/actions.js.map +1 -1
- package/dist/editor/commands/index.d.ts +3 -1
- package/dist/editor/commands/index.js +3 -1
- package/dist/editor/commands/refusals.d.ts +18 -0
- package/dist/editor/commands/refusals.d.ts.map +1 -0
- package/dist/editor/commands/refusals.js +16 -0
- package/dist/editor/commands/refusals.js.map +1 -0
- package/dist/editor/commands/registry.d.ts +4 -1
- package/dist/editor/commands/registry.d.ts.map +1 -1
- package/dist/editor/commands/registry.js +2 -1
- package/dist/editor/commands/registry.js.map +1 -1
- package/dist/editor/commands/selection.js +11 -0
- package/dist/editor/commands/selection.js.map +1 -1
- package/dist/editor/commands/types.d.ts +1 -1
- package/dist/editor/commands/types.d.ts.map +1 -1
- package/dist/editor/selection-capabilities/use.d.ts +2 -0
- package/dist/editor/selection-capabilities/use.d.ts.map +1 -1
- package/dist/editor/selection-capabilities/use.js +38 -11
- package/dist/editor/selection-capabilities/use.js.map +1 -1
- package/dist/editor/selection-state/use.js +1 -5
- package/dist/editor/selection-state/use.js.map +1 -1
- package/dist/editor/tool-cursor/index.d.ts.map +1 -1
- package/dist/editor/tool-cursor/index.js +1 -0
- package/dist/editor/tool-cursor/index.js.map +1 -1
- package/dist/i18n/locales/de/ai.json.js +4 -11
- package/dist/i18n/locales/de/commands.json.js +4 -2
- package/dist/i18n/locales/de/files.json.js +21 -1
- package/dist/i18n/locales/de/menu.json.js +2 -0
- package/dist/i18n/locales/de/panels.json.js +77 -2
- package/dist/i18n/locales/de/tools.json.js +1 -0
- package/dist/i18n/locales/es/ai.json.js +4 -11
- package/dist/i18n/locales/es/commands.json.js +4 -2
- package/dist/i18n/locales/es/files.json.js +21 -1
- package/dist/i18n/locales/es/menu.json.js +2 -0
- package/dist/i18n/locales/es/panels.json.js +77 -2
- package/dist/i18n/locales/es/tools.json.js +1 -0
- package/dist/i18n/locales/fr/ai.json.js +4 -11
- package/dist/i18n/locales/fr/commands.json.js +4 -2
- package/dist/i18n/locales/fr/files.json.js +21 -1
- package/dist/i18n/locales/fr/menu.json.js +2 -0
- package/dist/i18n/locales/fr/panels.json.js +77 -2
- package/dist/i18n/locales/fr/tools.json.js +1 -0
- package/dist/i18n/locales/id/ai.json.js +4 -11
- package/dist/i18n/locales/id/commands.json.js +4 -2
- package/dist/i18n/locales/id/files.json.js +21 -1
- package/dist/i18n/locales/id/menu.json.js +2 -0
- package/dist/i18n/locales/id/panels.json.js +77 -2
- package/dist/i18n/locales/id/tools.json.js +1 -0
- package/dist/i18n/locales/it/ai.json.js +4 -11
- package/dist/i18n/locales/it/commands.json.js +4 -2
- package/dist/i18n/locales/it/files.json.js +21 -1
- package/dist/i18n/locales/it/menu.json.js +2 -0
- package/dist/i18n/locales/it/panels.json.js +77 -2
- package/dist/i18n/locales/it/tools.json.js +1 -0
- package/dist/i18n/locales/ja/ai.json.js +4 -11
- package/dist/i18n/locales/ja/commands.json.js +4 -2
- package/dist/i18n/locales/ja/files.json.js +21 -1
- package/dist/i18n/locales/ja/menu.json.js +2 -0
- package/dist/i18n/locales/ja/panels.json.js +77 -2
- package/dist/i18n/locales/ja/tools.json.js +1 -0
- package/dist/i18n/locales/pl/ai.json.js +4 -11
- package/dist/i18n/locales/pl/commands.json.js +4 -2
- package/dist/i18n/locales/pl/files.json.js +21 -1
- package/dist/i18n/locales/pl/menu.json.js +2 -0
- package/dist/i18n/locales/pl/panels.json.js +77 -2
- package/dist/i18n/locales/pl/tools.json.js +1 -0
- package/dist/i18n/locales/ru/ai.json.js +4 -11
- package/dist/i18n/locales/ru/commands.json.js +4 -2
- package/dist/i18n/locales/ru/files.json.js +21 -1
- package/dist/i18n/locales/ru/menu.json.js +2 -0
- package/dist/i18n/locales/ru/panels.json.js +77 -2
- package/dist/i18n/locales/ru/tools.json.js +1 -0
- package/dist/i18n/locales/zh-cn/ai.json.js +4 -11
- package/dist/i18n/locales/zh-cn/commands.json.js +4 -2
- package/dist/i18n/locales/zh-cn/files.json.js +21 -1
- package/dist/i18n/locales/zh-cn/menu.json.js +2 -0
- package/dist/i18n/locales/zh-cn/panels.json.js +77 -2
- package/dist/i18n/locales/zh-cn/tools.json.js +1 -0
- package/dist/i18n/messages/ai.d.ts +10 -11
- package/dist/i18n/messages/ai.js +4 -11
- package/dist/i18n/messages/ai.js.map +1 -1
- package/dist/i18n/messages/commands.d.ts +3 -1
- package/dist/i18n/messages/commands.d.ts.map +1 -1
- package/dist/i18n/messages/commands.js +3 -1
- package/dist/i18n/messages/commands.js.map +1 -1
- package/dist/i18n/messages/files.d.ts +34 -0
- package/dist/i18n/messages/files.d.ts.map +1 -1
- package/dist/i18n/messages/files.js +20 -0
- package/dist/i18n/messages/files.js.map +1 -1
- package/dist/i18n/messages/menu.d.ts +2 -0
- package/dist/i18n/messages/menu.d.ts.map +1 -1
- package/dist/i18n/messages/menu.js +2 -0
- package/dist/i18n/messages/menu.js.map +1 -1
- package/dist/i18n/messages/panels.d.ts +77 -0
- package/dist/i18n/messages/panels.d.ts.map +1 -1
- package/dist/i18n/messages/panels.js +75 -0
- package/dist/i18n/messages/panels.js.map +1 -1
- package/dist/i18n/messages/tools.d.ts +1 -0
- package/dist/i18n/messages/tools.d.ts.map +1 -1
- package/dist/i18n/messages/tools.js +1 -0
- package/dist/i18n/messages/tools.js.map +1 -1
- package/dist/i18n/messages.d.ts +127 -12
- package/dist/i18n/useI18n.d.ts +508 -48
- package/dist/i18n/useI18n.d.ts.map +1 -1
- package/dist/primitives/LayerTree/LayerTreeRoot.vue.d.ts +1 -1
- package/dist/primitives/LayoutControls/LayoutControlsRoot.vue.d.ts.map +1 -1
- package/dist/primitives/LayoutControls/LayoutControlsRoot.vue.js +2 -0
- package/dist/primitives/LayoutControls/LayoutControlsRoot.vue.js.map +1 -1
- package/dist/shared/input/resize.js +28 -12
- package/dist/shared/input/resize.js.map +1 -1
- package/dist/shared/input/types.js +1 -0
- package/dist/shared/input/types.js.map +1 -1
- package/package.json +4 -4
package/dist/canvas/index.d.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import _default from "./CanvasRoot.vue.js";
|
|
2
2
|
import _default$1 from "./CanvasSurface.vue.js";
|
|
3
|
+
import { CanvasStartError } from "./surface/kit-loader.js";
|
|
3
4
|
import { CanvasContext, useCanvasContext } from "./context/index.js";
|
|
4
5
|
import _default$2 from "./islands/IslandLayer.vue.js";
|
|
5
6
|
import { useCanvasInput } from "./useCanvasInput.js";
|
|
6
7
|
import { VIEWPORT_TWEEN_MS, ViewportFrame, animateViewport, easeViewport, interpolateViewport, isViewportTweening, setViewportMotion, stopViewportTween } from "./viewport/tween.js";
|
|
7
|
-
export { type CanvasContext, _default as CanvasRoot, _default$1 as CanvasSurface, _default$2 as PlayIslands, VIEWPORT_TWEEN_MS, type ViewportFrame, animateViewport, easeViewport, interpolateViewport, isViewportTweening, setViewportMotion, stopViewportTween, useCanvasContext, useCanvasInput };
|
|
8
|
+
export { type CanvasContext, _default as CanvasRoot, CanvasStartError, _default$1 as CanvasSurface, _default$2 as PlayIslands, VIEWPORT_TWEEN_MS, type ViewportFrame, animateViewport, easeViewport, interpolateViewport, isViewportTweening, setViewportMotion, stopViewportTween, useCanvasContext, useCanvasInput };
|
package/dist/canvas/index.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { useCanvasContext } from "./context/index.js";
|
|
2
|
+
import { CanvasStartError } from "./surface/kit-loader.js";
|
|
2
3
|
import _sfc_main from "./CanvasRoot.vue.js";
|
|
3
4
|
import _sfc_main$1 from "./CanvasSurface.vue.js";
|
|
4
5
|
import _sfc_main$2 from "./islands/IslandLayer.vue.js";
|
|
5
6
|
import { VIEWPORT_TWEEN_MS, animateViewport, easeViewport, interpolateViewport, isViewportTweening, setViewportMotion, stopViewportTween } from "./viewport/tween.js";
|
|
6
7
|
import { useCanvasInput } from "./useCanvasInput.js";
|
|
7
|
-
export { _sfc_main as CanvasRoot, _sfc_main$1 as CanvasSurface, _sfc_main$2 as PlayIslands, VIEWPORT_TWEEN_MS, animateViewport, easeViewport, interpolateViewport, isViewportTweening, setViewportMotion, stopViewportTween, useCanvasContext, useCanvasInput };
|
|
8
|
+
export { _sfc_main as CanvasRoot, CanvasStartError, _sfc_main$1 as CanvasSurface, _sfc_main$2 as PlayIslands, VIEWPORT_TWEEN_MS, animateViewport, easeViewport, interpolateViewport, isViewportTweening, setViewportMotion, stopViewportTween, useCanvasContext, useCanvasInput };
|
|
@@ -7,7 +7,7 @@ import { handleBendHandleMove } from "../vector-input/bend.js";
|
|
|
7
7
|
import { attachModifiers, handleConnectorDrawMove } from "../../shared/input/connector/draw.js";
|
|
8
8
|
import { handleDrawMove } from "../../shared/input/draw.js";
|
|
9
9
|
import { handleMoveMove } from "../../shared/input/move/drag.js";
|
|
10
|
-
import { applyResize } from "../../shared/input/resize.js";
|
|
10
|
+
import { applyResize, ignoresConstraints } from "../../shared/input/resize.js";
|
|
11
11
|
import { applyStickyScale } from "../../shared/input/sticky/scale.js";
|
|
12
12
|
//#region src/canvas/pointer/drag-move.ts
|
|
13
13
|
/** Moves the drag in progress to the pointer, for each kind of drag the canvas starts. */
|
|
@@ -55,7 +55,7 @@ function moveDrag(d, e, { sx, sy, cx, cy }, { editor, guideInput, transform, spa
|
|
|
55
55
|
return;
|
|
56
56
|
}
|
|
57
57
|
if (d.type === "resize") {
|
|
58
|
-
applyResize(d, cx, cy, e.shiftKey, editor, e.
|
|
58
|
+
applyResize(d, cx, cy, e.shiftKey, editor, ignoresConstraints(e), e.altKey);
|
|
59
59
|
return;
|
|
60
60
|
}
|
|
61
61
|
if (d.type === "pen-drag") {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"drag-move.js","names":[],"sources":["../../../src/canvas/pointer/drag-move.ts"],"sourcesContent":["import type { Editor } from '@pairdraw/core'\n\nimport { selectedTopLevelGuideFrameId, type createGuideInput } from '#vue/canvas/guides/input'\nimport { handlePenDragMove } from '#vue/canvas/pen/input'\nimport { handlePencilDragMove } from '#vue/canvas/pencil/input'\nimport type { createCanvasTransformInput } from '#vue/canvas/transform/input'\nimport { handleBendHandleMove } from '#vue/canvas/vector-input/input'\nimport { attachModifiers, handleConnectorDrawMove } from '#vue/shared/input/connector/draw'\nimport { handleDrawMove } from '#vue/shared/input/draw'\nimport { handleMoveMove } from '#vue/shared/input/move/drag'\nimport { applyResize } from '#vue/shared/input/resize'\nimport { applyStickyScale } from '#vue/shared/input/sticky/scale'\nimport type { DragState } from '#vue/shared/input/types'\nimport { handleNodeEditMarqueeMove, handleNodeEditMove } from '#vue/shared/input/vector'\nimport { handleNodeEditTransformMove } from '#vue/shared/input/vector/transform'\n\ntype TransformInput = ReturnType<typeof createCanvasTransformInput>\n\n/** What a drag in progress reaches while the pointer moves. */\nexport interface DragMoveContext {\n editor: Editor\n guideInput: Pick<ReturnType<typeof createGuideInput>, 'handleMove'>\n transform: Pick<\n TransformInput,\n 'handlePanMove' | 'handleRotateMove' | 'handleTextSelectMove' | 'handleMarqueeMove'\n >\n /** Whether Space is held, which moves a pen handle's anchor instead of the handle. */\n spaceHeld: () => boolean\n}\n\n/** Pointer position on screen (`sx`, `sy`) and on the canvas (`cx`, `cy`). */\ninterface DragMovePointer {\n sx: number\n sy: number\n cx: number\n cy: number\n}\n\n/** Moves the drag in progress to the pointer, for each kind of drag the canvas starts. */\n// Dispatching the full drag union is intentionally centralized here.\n// eslint-disable-next-line complexity\nexport function moveDrag(\n d: DragState,\n e: MouseEvent,\n { sx, sy, cx, cy }: DragMovePointer,\n { editor, guideInput, transform, spaceHeld }: DragMoveContext\n): void {\n if (d.type === 'pan') {\n transform.handlePanMove(d, e)\n return\n }\n\n if (d.type === 'auto-layout') {\n d.update(sx, sy, e.altKey, e.shiftKey)\n return\n }\n\n if (d.type === 'gradient' || d.type === 'shape-handle') {\n d.update(sx, sy, e.shiftKey)\n return\n }\n\n if (d.type === 'image-crop') {\n d.update(sx, sy, { shift: e.shiftKey, alt: e.altKey })\n return\n }\n\n if (d.type === 'guide') {\n const frameId = e.altKey && !d.guideId ? selectedTopLevelGuideFrameId(editor) : null\n guideInput.handleMove(\n d,\n sx,\n sy,\n cx,\n cy,\n frameId ? { frameId, deep: e.metaKey || e.ctrlKey } : undefined\n )\n return\n }\n\n if (d.type === 'rotate') {\n transform.handleRotateMove(d, cx, cy, e.shiftKey)\n return\n }\n if (d.type === 'move') {\n handleMoveMove(d, cx, cy, sx, sy, editor, { ctrlKey: e.ctrlKey, shiftKey: e.shiftKey })\n return\n }\n if (d.type === 'text-select') {\n transform.handleTextSelectMove(cx, cy)\n return\n }\n if (d.type === 'resize') {\n applyResize(d, cx, cy, e.shiftKey, editor, e.
|
|
1
|
+
{"version":3,"file":"drag-move.js","names":[],"sources":["../../../src/canvas/pointer/drag-move.ts"],"sourcesContent":["import type { Editor } from '@pairdraw/core'\n\nimport { selectedTopLevelGuideFrameId, type createGuideInput } from '#vue/canvas/guides/input'\nimport { handlePenDragMove } from '#vue/canvas/pen/input'\nimport { handlePencilDragMove } from '#vue/canvas/pencil/input'\nimport type { createCanvasTransformInput } from '#vue/canvas/transform/input'\nimport { handleBendHandleMove } from '#vue/canvas/vector-input/input'\nimport { attachModifiers, handleConnectorDrawMove } from '#vue/shared/input/connector/draw'\nimport { handleDrawMove } from '#vue/shared/input/draw'\nimport { handleMoveMove } from '#vue/shared/input/move/drag'\nimport { applyResize, ignoresConstraints } from '#vue/shared/input/resize'\nimport { applyStickyScale } from '#vue/shared/input/sticky/scale'\nimport type { DragState } from '#vue/shared/input/types'\nimport { handleNodeEditMarqueeMove, handleNodeEditMove } from '#vue/shared/input/vector'\nimport { handleNodeEditTransformMove } from '#vue/shared/input/vector/transform'\n\ntype TransformInput = ReturnType<typeof createCanvasTransformInput>\n\n/** What a drag in progress reaches while the pointer moves. */\nexport interface DragMoveContext {\n editor: Editor\n guideInput: Pick<ReturnType<typeof createGuideInput>, 'handleMove'>\n transform: Pick<\n TransformInput,\n 'handlePanMove' | 'handleRotateMove' | 'handleTextSelectMove' | 'handleMarqueeMove'\n >\n /** Whether Space is held, which moves a pen handle's anchor instead of the handle. */\n spaceHeld: () => boolean\n}\n\n/** Pointer position on screen (`sx`, `sy`) and on the canvas (`cx`, `cy`). */\ninterface DragMovePointer {\n sx: number\n sy: number\n cx: number\n cy: number\n}\n\n/** Moves the drag in progress to the pointer, for each kind of drag the canvas starts. */\n// Dispatching the full drag union is intentionally centralized here.\n// eslint-disable-next-line complexity\nexport function moveDrag(\n d: DragState,\n e: MouseEvent,\n { sx, sy, cx, cy }: DragMovePointer,\n { editor, guideInput, transform, spaceHeld }: DragMoveContext\n): void {\n if (d.type === 'pan') {\n transform.handlePanMove(d, e)\n return\n }\n\n if (d.type === 'auto-layout') {\n d.update(sx, sy, e.altKey, e.shiftKey)\n return\n }\n\n if (d.type === 'gradient' || d.type === 'shape-handle') {\n d.update(sx, sy, e.shiftKey)\n return\n }\n\n if (d.type === 'image-crop') {\n d.update(sx, sy, { shift: e.shiftKey, alt: e.altKey })\n return\n }\n\n if (d.type === 'guide') {\n const frameId = e.altKey && !d.guideId ? selectedTopLevelGuideFrameId(editor) : null\n guideInput.handleMove(\n d,\n sx,\n sy,\n cx,\n cy,\n frameId ? { frameId, deep: e.metaKey || e.ctrlKey } : undefined\n )\n return\n }\n\n if (d.type === 'rotate') {\n transform.handleRotateMove(d, cx, cy, e.shiftKey)\n return\n }\n if (d.type === 'move') {\n handleMoveMove(d, cx, cy, sx, sy, editor, { ctrlKey: e.ctrlKey, shiftKey: e.shiftKey })\n return\n }\n if (d.type === 'text-select') {\n transform.handleTextSelectMove(cx, cy)\n return\n }\n if (d.type === 'resize') {\n applyResize(d, cx, cy, e.shiftKey, editor, ignoresConstraints(e), e.altKey)\n return\n }\n\n if (d.type === 'pen-drag') {\n handlePenDragMove(d, cx, cy, spaceHeld(), e, editor)\n return\n }\n\n if (d.type === 'pencil-drag') {\n handlePencilDragMove(cx, cy, e.shiftKey, editor)\n return\n }\n\n if (d.type === 'edit-node' || d.type === 'edit-handle') {\n handleNodeEditMove(d, cx, cy, editor, e.altKey, e.metaKey || e.ctrlKey, e.shiftKey, e.ctrlKey)\n return\n }\n\n if (d.type === 'bend-handle') {\n handleBendHandleMove(d, cx, cy, e, editor)\n return\n }\n\n if (d.type === 'bend-segment' || d.type === 'edit-transform') {\n handleNodeEditTransformMove(d, cx, cy, e, editor)\n return\n }\n\n if (d.type === 'edit-marquee') {\n handleNodeEditMarqueeMove(d, cx, cy, editor)\n return\n }\n\n if (d.type === 'draw') {\n handleDrawMove(d, cx, cy, e.shiftKey)\n return\n }\n\n if (d.type === 'sticky-draw') {\n d.move(cx, cy)\n return\n }\n\n if (d.type === 'connector-draw') {\n handleConnectorDrawMove(d, cx, cy, sx, sy, editor, attachModifiers(e))\n return\n }\n\n if (d.type === 'connector-end') {\n editor.connectorEndpointDrag(cx, cy, attachModifiers(e))\n return\n }\n\n if (d.type === 'connector-line') {\n editor.connectorLineDrag(cx, cy)\n return\n }\n\n if (d.type === 'line-end') {\n editor.lineEndDrag(cx, cy, { shift: e.shiftKey, alt: e.altKey })\n return\n }\n\n if (d.type === 'sticky-scale') {\n applyStickyScale(d, cx, cy, editor)\n return\n }\n\n if (d.type === 'zoom' || d.type === 'scale') {\n d.update(cx, cy, sx, sy, e.altKey)\n return\n }\n\n // While ⌘ or Ctrl is held the marquee reaches nested layers, as in Figma.\n transform.handleMarqueeMove(d, cx, cy, e.metaKey || e.ctrlKey)\n}\n"],"mappings":";;;;;;;;;;;;;AAyCA,SAAgB,SACd,GACA,GACA,EAAE,IAAI,IAAI,IAAI,MACd,EAAE,QAAQ,YAAY,WAAW,aAC3B;CACN,IAAI,EAAE,SAAS,OAAO;EACpB,UAAU,cAAc,GAAG,CAAC;EAC5B;CACF;CAEA,IAAI,EAAE,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space.d.ts","names":[],"sources":["../../../src/canvas/surface/color-space.ts"],"mappings":";;
|
|
1
|
+
{"version":3,"file":"color-space.d.ts","names":[],"sources":["../../../src/canvas/surface/color-space.ts"],"mappings":";;KASY;;;;;;iBAgHI"}
|
|
@@ -1,17 +1,10 @@
|
|
|
1
1
|
import { IS_BROWSER } from "@pairdraw/core/constants";
|
|
2
|
+
import { hasFloatRenderTarget, isHardwareRenderer, rendererName } from "@pairdraw/core/canvas";
|
|
2
3
|
//#region src/canvas/surface/color-space.ts
|
|
3
|
-
const UNMASKED_RENDERER_WEBGL = 37446;
|
|
4
|
-
/** Software rasterizers advertise the float extensions but cannot render offscreen float targets. */
|
|
5
|
-
const SOFTWARE_RENDERER = /swiftshader|llvmpipe|softpipe|software|basic render/i;
|
|
6
|
-
function isHardwareRenderer(renderer) {
|
|
7
|
-
if (typeof renderer !== "string" || renderer.length === 0) return false;
|
|
8
|
-
return !SOFTWARE_RENDERER.test(renderer);
|
|
9
|
-
}
|
|
10
4
|
function hasFloatDrawingBuffer(context) {
|
|
11
5
|
if (typeof context.drawingBufferStorage !== "function") return false;
|
|
12
6
|
if (context.RGBA16F === void 0) return false;
|
|
13
|
-
|
|
14
|
-
return context.getExtension("EXT_color_buffer_float") != null && context.getExtension("EXT_float_blend") != null;
|
|
7
|
+
return hasFloatRenderTarget(context);
|
|
15
8
|
}
|
|
16
9
|
/** Read the buffer back instead of trusting a write TS narrowed to the requested value. */
|
|
17
10
|
function readColorSpace(context) {
|
|
@@ -55,15 +48,6 @@ function configurePresentation(context, request) {
|
|
|
55
48
|
}
|
|
56
49
|
}
|
|
57
50
|
let wideGamutSupport = null;
|
|
58
|
-
/**
|
|
59
|
-
* Whether this browser can present a Display-P3 canvas at all: a P3 display plus the
|
|
60
|
-
* floating-point drawing buffer CanvasKit's P3 on-screen surface requires.
|
|
61
|
-
*/
|
|
62
|
-
function rendererName(context) {
|
|
63
|
-
if (!context.getExtension?.("WEBGL_debug_renderer_info") || !context.getParameter) return null;
|
|
64
|
-
const renderer = context.getParameter(UNMASKED_RENDERER_WEBGL);
|
|
65
|
-
return typeof renderer === "string" ? renderer : null;
|
|
66
|
-
}
|
|
67
51
|
function probeDrawingBufferContext() {
|
|
68
52
|
const probe = document.createElement("canvas");
|
|
69
53
|
probe.width = 1;
|
|
@@ -89,6 +73,6 @@ function supportsWideGamutPresentation() {
|
|
|
89
73
|
return wideGamutSupport;
|
|
90
74
|
}
|
|
91
75
|
//#endregion
|
|
92
|
-
export { configurePresentation,
|
|
76
|
+
export { configurePresentation, supportsWideGamutPresentation };
|
|
93
77
|
|
|
94
78
|
//# sourceMappingURL=color-space.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"color-space.js","names":[],"sources":["../../../src/canvas/surface/color-space.ts"],"sourcesContent":["import { IS_BROWSER } from '@pairdraw/core/constants'\nimport type { DocumentColorSpace } from '@pairdraw/scene-graph'\n\nexport type PresentationColorSpace = 'srgb' | 'display-p3'\n\
|
|
1
|
+
{"version":3,"file":"color-space.js","names":[],"sources":["../../../src/canvas/surface/color-space.ts"],"sourcesContent":["import {\n hasFloatRenderTarget,\n isHardwareRenderer,\n rendererName,\n type ColorSpaceContext\n} from '@pairdraw/core/canvas'\nimport { IS_BROWSER } from '@pairdraw/core/constants'\nimport type { DocumentColorSpace } from '@pairdraw/scene-graph'\n\nexport type PresentationColorSpace = 'srgb' | 'display-p3'\n\nexport interface PresentationRequest {\n documentColorSpace: DocumentColorSpace\n wideGamutDisplay: boolean\n width: number\n height: number\n}\n\nfunction hasFloatDrawingBuffer(context: ColorSpaceContext): boolean {\n if (typeof context.drawingBufferStorage !== 'function') return false\n if (context.RGBA16F === undefined) return false\n return hasFloatRenderTarget(context)\n}\n\n/** Read the buffer back instead of trusting a write TS narrowed to the requested value. */\nfunction readColorSpace(context: ColorSpaceContext): string {\n return context.drawingBufferColorSpace ?? 'srgb'\n}\n\n/** Reinstall the drawing buffer only when its format or size drifted. */\nfunction installDrawingBuffer(\n context: ColorSpaceContext,\n format: number,\n request: PresentationRequest\n): boolean {\n const matches =\n context.drawingBufferFormat === format &&\n context.drawingBufferWidth === request.width &&\n context.drawingBufferHeight === request.height\n if (matches) return true\n if (typeof context.drawingBufferStorage !== 'function') return false\n try {\n context.drawingBufferStorage(format, request.width, request.height)\n } catch {\n return false\n }\n return context.drawingBufferFormat === format\n}\n\n/**\n * CanvasKit 0.41 wraps sRGB on-screen surfaces as RGBA_8888 but every other color\n * space as RGBA_F16 — the pixel format is not configurable (Skia's\n * `modules/canvaskit/canvaskit_bindings.cpp`, `ColorSettings`). A Display-P3 surface\n * therefore only matches the browser buffer when that buffer is floating point, which\n * `drawingBufferStorage` provides on Chromium 122+; WebKit and Firefox have no\n * implementation. Presenting P3 over the default 8-bit buffer produces invalid\n * destination copies and broken blend modes, so it falls back to sRGB.\n *\n * Returns the space actually configured, or null when the buffer cannot be made\n * consistent with the requested surface.\n */\nexport function configurePresentation(\n context: ColorSpaceContext | null,\n request: PresentationRequest\n): PresentationColorSpace | null {\n if (!context?.drawingBufferColorSpace) return 'srgb'\n try {\n if (\n request.documentColorSpace === 'display-p3' &&\n request.wideGamutDisplay &&\n hasFloatDrawingBuffer(context) &&\n context.RGBA16F !== undefined &&\n installDrawingBuffer(context, context.RGBA16F, request)\n ) {\n context.drawingBufferColorSpace = 'display-p3'\n if (readColorSpace(context) === 'display-p3') return 'display-p3'\n }\n // 8-bit is already the browser default, so sRGB only has to undo a float buffer we\n // installed earlier. Reallocating the default buffer on every resize would decouple it\n // from the canvas size. Browsers without drawingBufferStorage never need this.\n if (\n context.RGBA8 !== undefined &&\n context.drawingBufferFormat !== undefined &&\n context.drawingBufferFormat !== context.RGBA8 &&\n !installDrawingBuffer(context, context.RGBA8, request)\n ) {\n return null\n }\n if (context.drawingBufferColorSpace !== 'srgb') context.drawingBufferColorSpace = 'srgb'\n return readColorSpace(context) === 'srgb' ? 'srgb' : null\n } catch {\n return null\n }\n}\n\nlet wideGamutSupport: boolean | null = null\n\nfunction probeDrawingBufferContext(): ColorSpaceContext | null {\n const probe = document.createElement('canvas')\n probe.width = 1\n probe.height = 1\n return probe.getContext('webgl2') ?? probe.getContext('webgl')\n}\n\nfunction detectWideGamutSupport(): boolean {\n if (!IS_BROWSER) return false\n if (!window.matchMedia('(color-gamut: p3)').matches) return false\n const context = probeDrawingBufferContext()\n if (!context) return false\n // Software renderers cannot render the offscreen float targets Skia needs once the\n // drawing buffer is float, and a software compositor has no wide-gamut output either.\n const supported = isHardwareRenderer(rendererName(context)) && hasFloatDrawingBuffer(context)\n context.getExtension?.('WEBGL_lose_context')?.loseContext?.()\n return supported\n}\n\n/**\n * Whether this browser can present a Display-P3 canvas: a P3 display, a hardware\n * renderer, and the floating-point drawing buffer CanvasKit's P3 on-screen surface\n * requires (Chromium 122+; WebKit and Firefox have no drawingBufferStorage).\n */\nexport function supportsWideGamutPresentation(): boolean {\n wideGamutSupport ??= detectWideGamutSupport()\n return wideGamutSupport\n}\n"],"mappings":";;;AAkBA,SAAS,sBAAsB,SAAqC;CAClE,IAAI,OAAO,QAAQ,yBAAyB,YAAY,OAAO;CAC/D,IAAI,QAAQ,YAAY,KAAA,GAAW,OAAO;CAC1C,OAAO,qBAAqB,OAAO;AACrC;;AAGA,SAAS,eAAe,SAAoC;CAC1D,OAAO,QAAQ,2BAA2B;AAC5C;;AAGA,SAAS,qBACP,SACA,QACA,SACS;CAKT,IAHE,QAAQ,wBAAwB,UAChC,QAAQ,uBAAuB,QAAQ,SACvC,QAAQ,wBAAwB,QAAQ,QAC7B,OAAO;CACpB,IAAI,OAAO,QAAQ,yBAAyB,YAAY,OAAO;CAC/D,IAAI;EACF,QAAQ,qBAAqB,QAAQ,QAAQ,OAAO,QAAQ,MAAM;CACpE,QAAQ;EACN,OAAO;CACT;CACA,OAAO,QAAQ,wBAAwB;AACzC;;;;;;;;;;;;;AAcA,SAAgB,sBACd,SACA,SAC+B;CAC/B,IAAI,CAAC,SAAS,yBAAyB,OAAO;CAC9C,IAAI;EACF,IACE,QAAQ,uBAAuB,gBAC/B,QAAQ,oBACR,sBAAsB,OAAO,KAC7B,QAAQ,YAAY,KAAA,KACpB,qBAAqB,SAAS,QAAQ,SAAS,OAAO,GACtD;GACA,QAAQ,0BAA0B;GAClC,IAAI,eAAe,OAAO,MAAM,cAAc,OAAO;EACvD;EAIA,IACE,QAAQ,UAAU,KAAA,KAClB,QAAQ,wBAAwB,KAAA,KAChC,QAAQ,wBAAwB,QAAQ,SACxC,CAAC,qBAAqB,SAAS,QAAQ,OAAO,OAAO,GAErD,OAAO;EAET,IAAI,QAAQ,4BAA4B,QAAQ,QAAQ,0BAA0B;EAClF,OAAO,eAAe,OAAO,MAAM,SAAS,SAAS;CACvD,QAAQ;EACN,OAAO;CACT;AACF;AAEA,IAAI,mBAAmC;AAEvC,SAAS,4BAAsD;CAC7D,MAAM,QAAQ,SAAS,cAAc,QAAQ;CAC7C,MAAM,QAAQ;CACd,MAAM,SAAS;CACf,OAAO,MAAM,WAAW,QAAQ,KAAK,MAAM,WAAW,OAAO;AAC/D;AAEA,SAAS,yBAAkC;CACzC,IAAI,CAAC,YAAY,OAAO;CACxB,IAAI,CAAC,OAAO,WAAW,mBAAmB,CAAC,CAAC,SAAS,OAAO;CAC5D,MAAM,UAAU,0BAA0B;CAC1C,IAAI,CAAC,SAAS,OAAO;CAGrB,MAAM,YAAY,mBAAmB,aAAa,OAAO,CAAC,KAAK,sBAAsB,OAAO;CAC5F,QAAQ,eAAe,oBAAoB,CAAC,EAAE,cAAc;CAC5D,OAAO;AACT;;;;;;AAOA,SAAgB,gCAAyC;CACvD,qBAAqB,uBAAuB;CAC5C,OAAO;AACT"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Ref } from "vue";
|
|
2
|
+
//#region src/canvas/surface/kit-loader.d.ts
|
|
3
|
+
/** Why a canvas could not start, named by the loader so callers do not parse its message. */
|
|
4
|
+
declare class CanvasStartError extends Error {
|
|
5
|
+
readonly reason: 'webgl' | 'unknown';
|
|
6
|
+
constructor(reason: 'webgl' | 'unknown');
|
|
7
|
+
}
|
|
8
|
+
//#endregion
|
|
9
|
+
export { CanvasStartError };
|
|
10
|
+
//# sourceMappingURL=kit-loader.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"kit-loader.d.ts","names":[],"sources":["../../../src/canvas/surface/kit-loader.ts"],"mappings":";;;cA0Ba,yBAAyB;WACf;EAAA,YAAA"}
|
|
@@ -2,6 +2,15 @@ import { nextFrame } from "../../shared/frame.js";
|
|
|
2
2
|
import { onScopeDispose, watch } from "vue";
|
|
3
3
|
import { getCanvasKit } from "@pairdraw/core/canvaskit";
|
|
4
4
|
//#region src/canvas/surface/kit-loader.ts
|
|
5
|
+
/** Why a canvas could not start, named by the loader so callers do not parse its message. */
|
|
6
|
+
var CanvasStartError = class extends Error {
|
|
7
|
+
reason;
|
|
8
|
+
constructor(reason) {
|
|
9
|
+
super("The canvas cannot start");
|
|
10
|
+
this.reason = reason;
|
|
11
|
+
this.name = "CanvasStartError";
|
|
12
|
+
}
|
|
13
|
+
};
|
|
5
14
|
function useCanvasKitLoader({ canvasRef, lifecycle, setCanvasKit, createSurface, loadFonts, renderNow, onReady, onFailed, loadCanvasKit = getCanvasKit }) {
|
|
6
15
|
const isDestroyed = () => lifecycle.destroyed;
|
|
7
16
|
let generation = 0;
|
|
@@ -12,7 +21,7 @@ function useCanvasKitLoader({ canvasRef, lifecycle, setCanvasKit, createSurface,
|
|
|
12
21
|
if (!stillCurrent()) return;
|
|
13
22
|
await nextFrame();
|
|
14
23
|
if (!stillCurrent()) return;
|
|
15
|
-
if (!createSurface(canvas)) throw new
|
|
24
|
+
if (!createSurface(canvas)) throw new CanvasStartError("webgl");
|
|
16
25
|
await loadFonts();
|
|
17
26
|
if (!stillCurrent()) return;
|
|
18
27
|
renderNow();
|
|
@@ -38,6 +47,6 @@ function useCanvasKitLoader({ canvasRef, lifecycle, setCanvasKit, createSurface,
|
|
|
38
47
|
});
|
|
39
48
|
}
|
|
40
49
|
//#endregion
|
|
41
|
-
export { useCanvasKitLoader };
|
|
50
|
+
export { CanvasStartError, useCanvasKitLoader };
|
|
42
51
|
|
|
43
52
|
//# sourceMappingURL=kit-loader.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"kit-loader.js","names":[],"sources":["../../../src/canvas/surface/kit-loader.ts"],"sourcesContent":["import type { CanvasKit } from 'canvaskit-wasm'\nimport { onScopeDispose, watch } from 'vue'\nimport type { Ref } from 'vue'\n\nimport { getCanvasKit } from '@pairdraw/core/canvaskit'\n\nimport { nextFrame } from '#vue/shared/frame'\n\ntype CanvasKitLoaderOptions = {\n canvasRef: Ref<HTMLCanvasElement | null>\n lifecycle: { destroyed: boolean }\n setCanvasKit: (ck: CanvasKit | null) => void\n /** Whether a surface the canvas can draw on was made. */\n createSurface: (canvas: HTMLCanvasElement) => boolean\n loadFonts: () => Promise<unknown> | undefined\n renderNow: () => void\n onReady?: () => void\n onFailed?: (error: unknown) => void\n /**\n * Loads CanvasKit. Tests pass a stand-in; the canvas uses the shared loader.\n * A default keeps the unit test from downloading the WASM module.\n */\n loadCanvasKit?: () => Promise<CanvasKit>\n}\n\nexport function useCanvasKitLoader({\n canvasRef,\n lifecycle,\n setCanvasKit,\n createSurface,\n loadFonts,\n renderNow,\n onReady,\n onFailed,\n loadCanvasKit = getCanvasKit\n}: CanvasKitLoaderOptions) {\n const isDestroyed = () => lifecycle.destroyed\n // Bumped when a new element arrives, so a start still in flight cannot make a surface\n // on a canvas that has already been replaced.\n let generation = 0\n\n async function init(canvas: HTMLCanvasElement, generationAtStart: number) {\n const stillCurrent = () =>\n !isDestroyed() && canvasRef.value === canvas && generation === generationAtStart\n\n if (!stillCurrent()) return\n\n setCanvasKit(await loadCanvasKit())\n if (!stillCurrent()) return\n\n await nextFrame()\n if (!stillCurrent()) return\n if (!createSurface(canvas)) throw new
|
|
1
|
+
{"version":3,"file":"kit-loader.js","names":[],"sources":["../../../src/canvas/surface/kit-loader.ts"],"sourcesContent":["import type { CanvasKit } from 'canvaskit-wasm'\nimport { onScopeDispose, watch } from 'vue'\nimport type { Ref } from 'vue'\n\nimport { getCanvasKit } from '@pairdraw/core/canvaskit'\n\nimport { nextFrame } from '#vue/shared/frame'\n\ntype CanvasKitLoaderOptions = {\n canvasRef: Ref<HTMLCanvasElement | null>\n lifecycle: { destroyed: boolean }\n setCanvasKit: (ck: CanvasKit | null) => void\n /** Whether a surface the canvas can draw on was made. */\n createSurface: (canvas: HTMLCanvasElement) => boolean\n loadFonts: () => Promise<unknown> | undefined\n renderNow: () => void\n onReady?: () => void\n onFailed?: (error: unknown) => void\n /**\n * Loads CanvasKit. Tests pass a stand-in; the canvas uses the shared loader.\n * A default keeps the unit test from downloading the WASM module.\n */\n loadCanvasKit?: () => Promise<CanvasKit>\n}\n\n/** Why a canvas could not start, named by the loader so callers do not parse its message. */\nexport class CanvasStartError extends Error {\n constructor(readonly reason: 'webgl' | 'unknown') {\n super('The canvas cannot start')\n this.name = 'CanvasStartError'\n }\n}\n\nexport function useCanvasKitLoader({\n canvasRef,\n lifecycle,\n setCanvasKit,\n createSurface,\n loadFonts,\n renderNow,\n onReady,\n onFailed,\n loadCanvasKit = getCanvasKit\n}: CanvasKitLoaderOptions) {\n const isDestroyed = () => lifecycle.destroyed\n // Bumped when a new element arrives, so a start still in flight cannot make a surface\n // on a canvas that has already been replaced.\n let generation = 0\n\n async function init(canvas: HTMLCanvasElement, generationAtStart: number) {\n const stillCurrent = () =>\n !isDestroyed() && canvasRef.value === canvas && generation === generationAtStart\n\n if (!stillCurrent()) return\n\n setCanvasKit(await loadCanvasKit())\n if (!stillCurrent()) return\n\n await nextFrame()\n if (!stillCurrent()) return\n if (!createSurface(canvas)) throw new CanvasStartError('webgl')\n await loadFonts()\n if (!stillCurrent()) return\n renderNow()\n onReady?.()\n }\n\n function start(canvas: HTMLCanvasElement) {\n const generationAtStart = ++generation\n void init(canvas, generationAtStart).catch((error: unknown) => {\n if (!onFailed) throw error\n if (!isDestroyed() && generation === generationAtStart) onFailed(error)\n })\n }\n\n // A CanvasSurface child hands its element over after the root has mounted, so waiting for\n // mount alone would find none. The app replaces the element when the browser keeps a context\n // lost, and that new element has to start too: watching once would leave it blank. The same\n // element does not start again.\n watch(\n canvasRef,\n (canvas, previous) => {\n if (!canvas || canvas === previous) return\n start(canvas)\n },\n { flush: 'post', immediate: true }\n )\n\n onScopeDispose(() => {\n lifecycle.destroyed = true\n generation += 1\n })\n}\n"],"mappings":";;;;;AA0BA,IAAa,mBAAb,cAAsC,MAAM;CACrB;CAArB,YAAY,QAAsC;EAChD,MAAM,yBAAyB;EADZ,KAAA,SAAA;EAEnB,KAAK,OAAO;CACd;AACF;AAEA,SAAgB,mBAAmB,EACjC,WACA,WACA,cACA,eACA,WACA,WACA,SACA,UACA,gBAAgB,gBACS;CACzB,MAAM,oBAAoB,UAAU;CAGpC,IAAI,aAAa;CAEjB,eAAe,KAAK,QAA2B,mBAA2B;EACxE,MAAM,qBACJ,CAAC,YAAY,KAAK,UAAU,UAAU,UAAU,eAAe;EAEjE,IAAI,CAAC,aAAa,GAAG;EAErB,aAAa,MAAM,cAAc,CAAC;EAClC,IAAI,CAAC,aAAa,GAAG;EAErB,MAAM,UAAU;EAChB,IAAI,CAAC,aAAa,GAAG;EACrB,IAAI,CAAC,cAAc,MAAM,GAAG,MAAM,IAAI,iBAAiB,OAAO;EAC9D,MAAM,UAAU;EAChB,IAAI,CAAC,aAAa,GAAG;EACrB,UAAU;EACV,UAAU;CACZ;CAEA,SAAS,MAAM,QAA2B;EACxC,MAAM,oBAAoB,EAAE;EAC5B,KAAU,QAAQ,iBAAiB,CAAC,CAAC,OAAO,UAAmB;GAC7D,IAAI,CAAC,UAAU,MAAM;GACrB,IAAI,CAAC,YAAY,KAAK,eAAe,mBAAmB,SAAS,KAAK;EACxE,CAAC;CACH;CAMA,MACE,YACC,QAAQ,aAAa;EACpB,IAAI,CAAC,UAAU,WAAW,UAAU;EACpC,MAAM,MAAM;CACd,GACA;EAAE,OAAO;EAAQ,WAAW;CAAK,CACnC;CAEA,qBAAqB;EACnB,UAAU,YAAY;EACtB,cAAc;CAChB,CAAC;AACH"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"registry.js","names":[],"sources":["../../../src/canvas/tools/registry.ts"],"sourcesContent":["import type { Ref } from 'vue'\n\nimport type { Editor, Tool } from '@pairdraw/core'\n\nimport { handleEyedropperDown } from '#vue/canvas/eyedropper'\nimport { startPenInput, updatePenHover } from '#vue/canvas/pen/input'\nimport { startPencilInput } from '#vue/canvas/pencil/input'\nimport { onSelectionHandle, scaleHoverCursor, tryStartScaleDrag } from '#vue/canvas/scale/input'\nimport { startZoomDrag, zoomToolCursor } from '#vue/canvas/zoom/input'\nimport { HAND_GRAB_CURSOR } from '#vue/editor/tool-cursor'\nimport { attachModifiers, startConnectorDraw } from '#vue/shared/input/connector/draw'\nimport { startShapeDraw, startTextDraw } from '#vue/shared/input/draw'\nimport { startPanDrag } from '#vue/shared/input/pan/drag'\nimport { handleSelectDown } from '#vue/shared/input/select'\nimport type { HitTestFns } from '#vue/shared/input/select'\nimport { startStickyDraw } from '#vue/shared/input/sticky/draw'\nimport type { DragState } from '#vue/shared/input/types'\n\n/** Where the pointer is, in canvas (`cx`, `cy`) and screen (`sx`, `sy`) coordinates. */\nexport interface CanvasToolPointer {\n event: MouseEvent\n cx: number\n cy: number\n sx: number\n sy: number\n}\n\n/** What a canvas tool works with: the editor and the canvas input's own pieces. */\nexport interface CanvasToolContext {\n editor: Editor\n hitFns: HitTestFns\n cursorOverride: Ref<string | null>\n setDrag: (d: DragState) => void\n tryStartRotation: (cx: number, cy: number) => boolean\n handleTextEditClick: (cx: number, cy: number, shiftKey: boolean) => boolean\n /** Settings → Editor's large nudge, in pixels. */\n bigNudge: () => number\n /** Shows what the pointer is over while selecting: the cursor, guides, and auto layout. */\n hoverLayers: (pointer: CanvasToolPointer) => void\n}\n\n/** What a tool does on the canvas: on a press, and while the pointer moves with no drag. */\nexport interface CanvasTool {\n press: (pointer: CanvasToolPointer, context: CanvasToolContext) => void\n hover?: (pointer: CanvasToolPointer, context: CanvasToolContext) => void\n}\n\nconst pan: CanvasTool = {\n press: ({ event }, { editor, setDrag, cursorOverride }) => {\n startPanDrag(event, setDrag, editor)\n cursorOverride.value = HAND_GRAB_CURSOR\n }\n}\n\n/** Draws the layer of the tool's own type, from the press to the release. */\nconst shape: CanvasTool = {\n press: ({ cx, cy }, { editor, setDrag }) => startShapeDraw(cx, cy, editor, setDrag)\n}\n\n/** Selects, moves, resizes, and turns layers: the Move tool. */\nconst select: CanvasTool = {\n press: ({ event, cx, cy, sx, sy }, context) =>\n handleSelectDown(\n event,\n cx,\n cy,\n sx,\n sy,\n context.editor,\n context.hitFns,\n context.tryStartRotation,\n context.handleTextEditClick,\n context.setDrag,\n context.bigNudge()\n ),\n hover: (pointer, { hoverLayers }) => hoverLayers(pointer)\n}\n\n/**\n * Every tool's canvas behaviour, by id. A tool added to `Tool` needs an entry here, and the\n * editor's profile decides which tools are on offer.\n */\nexport const CANVAS_TOOLS: Readonly<Record<Tool, CanvasTool>> = {\n SELECT: select,\n // Handles scale the selection with its contents, and never resize it as Move's do; elsewhere a\n // press selects as Move does.\n SCALE: {\n press: (pointer, context) => {\n const drag = tryStartScaleDrag(pointer.cx, pointer.cy, context.editor)\n if (drag) {\n context.setDrag(drag)\n context.cursorOverride.value = drag.cursor\n } else if (!onSelectionHandle(pointer.cx, pointer.cy, context.editor)) {\n select.press(pointer, context)\n }\n },\n hover: (pointer, context) => {\n context.hoverLayers(pointer)\n const cursor = scaleHoverCursor(pointer.cx, pointer.cy, context.editor)\n if (cursor) context.cursorOverride.value = cursor\n else if (onSelectionHandle(pointer.cx, pointer.cy, context.editor)) {\n context.cursorOverride.value = null\n }\n }\n },\n ZOOM: {\n press: ({ event, cx, cy, sx, sy }, { editor, setDrag, cursorOverride }) => {\n if (event.button !== 0) return\n setDrag(startZoomDrag(cx, cy, sx, sy, event.altKey, editor))\n cursorOverride.value = zoomToolCursor(event.altKey)\n },\n hover: ({ event }, { cursorOverride }) => {\n cursorOverride.value = zoomToolCursor(event.altKey)\n }\n },\n HAND: pan,\n // Comments are placed by the app's comments layer above the canvas.\n COMMENT: { press: () => undefined },\n EYEDROPPER: {\n press: ({ event, cx, cy }, { editor }) => {\n if (event.button === 0) handleEyedropperDown(editor, cx, cy, event.altKey)\n }\n },\n PEN: {\n press: ({ event, cx, cy }, { editor, setDrag, cursorOverride }) =>\n startPenInput(event, cx, cy, editor, setDrag, cursorOverride),\n hover: ({ cx, cy }, { editor }) => {\n updatePenHover(cx, cy, editor)\n }\n },\n PENCIL: { press: ({ cx, cy }, { editor, setDrag }) => startPencilInput(cx, cy, editor, setDrag) },\n TEXT: { press: ({ cx, cy }, { editor, setDrag }) => startTextDraw(cx, cy, editor, setDrag) },\n CONNECTOR: {\n press: ({ event, cx, cy, sx, sy }, { editor, setDrag }) =>\n startConnectorDraw(cx, cy, sx, sy, editor, setDrag, attachModifiers(event)),\n hover: ({ event, cx, cy }, { editor }) => editor.connectorHover(cx, cy, attachModifiers(event))\n },\n STICKY: { press: ({ cx, cy }, { editor, setDrag }) => startStickyDraw(cx, cy, editor, setDrag) },\n FRAME: shape,\n SECTION: shape,\n RECTANGLE: shape,\n ELLIPSE: shape,\n LINE: shape,\n POLYGON: shape,\n STAR: shape,\n SHAPE_WITH_TEXT: shape\n}\n"],"mappings":";;;;;;;;;;;;AA+CA,MAAM,MAAkB,EACtB,QAAQ,EAAE,SAAS,EAAE,QAAQ,SAAS,qBAAqB;CACzD,aAAa,OAAO,SAAS,MAAM;CACnC,eAAe,QAAQ;AACzB,EACF;;AAGA,MAAM,QAAoB,EACxB,QAAQ,EAAE,IAAI,MAAM,EAAE,QAAQ,cAAc,eAAe,IAAI,IAAI,QAAQ,OAAO,EACpF;;AAGA,MAAM,SAAqB;CACzB,QAAQ,EAAE,OAAO,IAAI,IAA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QAAQ,IAAI,IAAI,MAAM,MAAM;CAC3E,EACF;CACA,KAAK;EACH,QAAQ,EAAE,OAAO,IAAI,MAAM,EAAE,QAAQ,SAAS,qBAC5C,cAAc,OAAO,IAAI,IAAI,QAAQ,SAAS,cAAc;EAC9D,QAAQ,EAAE,IAAI,MAAM,EAAE,aAAa;GACjC,eAAe,IAAI,IAAI,MAAM;EAC/B;CACF;CACA,QAAQ,EAAE,QAAQ,EAAE,IAAI,MAAM,EAAE,QAAQ,cAAc,iBAAiB,IAAI,IAAI,QAAQ,OAAO,EAAE;CAChG,MAAM,EAAE,QAAQ,EAAE,IAAI,MAAM,EAAE,QAAQ,cAAc,cAAc,IAAI,IAAI,QAAQ,OAAO,EAAE;CAC3F,WAAW;EACT,QAAQ,EAAE,OAAO,IAAI,IAAI,IAAI,MAAM,EAAE,QAAQ,cAC3C,mBAAmB,IAAI,IAAI,IAAI,IAAI,QAAQ,SAAS,gBAAgB,KAAK,CAAC;EAC5E,QAAQ,EAAE,OAAO,IAAI,MAAM,EAAE,aAAa,OAAO,eAAe,IAAI,IAAI,gBAAgB,KAAK,CAAC;CAChG;CACA,QAAQ,EAAE,QAAQ,EAAE,IAAI,MAAM,EAAE,QAAQ,cAAc,gBAAgB,IAAI,IAAI,QAAQ,OAAO,EAAE;CAC/F,OAAO;CACP,SAAS;CACT,WAAW;CACX,SAAS;CACT,MAAM;CACN,SAAS;CACT,MAAM;CACN,iBAAiB;AACnB"}
|
|
1
|
+
{"version":3,"file":"registry.js","names":[],"sources":["../../../src/canvas/tools/registry.ts"],"sourcesContent":["import type { Ref } from 'vue'\n\nimport type { Editor, Tool } from '@pairdraw/core'\n\nimport { handleEyedropperDown } from '#vue/canvas/eyedropper'\nimport { startPenInput, updatePenHover } from '#vue/canvas/pen/input'\nimport { startPencilInput } from '#vue/canvas/pencil/input'\nimport { onSelectionHandle, scaleHoverCursor, tryStartScaleDrag } from '#vue/canvas/scale/input'\nimport { startZoomDrag, zoomToolCursor } from '#vue/canvas/zoom/input'\nimport { HAND_GRAB_CURSOR } from '#vue/editor/tool-cursor'\nimport { attachModifiers, startConnectorDraw } from '#vue/shared/input/connector/draw'\nimport { startShapeDraw, startTextDraw } from '#vue/shared/input/draw'\nimport { startPanDrag } from '#vue/shared/input/pan/drag'\nimport { handleSelectDown } from '#vue/shared/input/select'\nimport type { HitTestFns } from '#vue/shared/input/select'\nimport { startStickyDraw } from '#vue/shared/input/sticky/draw'\nimport type { DragState } from '#vue/shared/input/types'\n\n/** Where the pointer is, in canvas (`cx`, `cy`) and screen (`sx`, `sy`) coordinates. */\nexport interface CanvasToolPointer {\n event: MouseEvent\n cx: number\n cy: number\n sx: number\n sy: number\n}\n\n/** What a canvas tool works with: the editor and the canvas input's own pieces. */\nexport interface CanvasToolContext {\n editor: Editor\n hitFns: HitTestFns\n cursorOverride: Ref<string | null>\n setDrag: (d: DragState) => void\n tryStartRotation: (cx: number, cy: number) => boolean\n handleTextEditClick: (cx: number, cy: number, shiftKey: boolean) => boolean\n /** Settings → Editor's large nudge, in pixels. */\n bigNudge: () => number\n /** Shows what the pointer is over while selecting: the cursor, guides, and auto layout. */\n hoverLayers: (pointer: CanvasToolPointer) => void\n}\n\n/** What a tool does on the canvas: on a press, and while the pointer moves with no drag. */\nexport interface CanvasTool {\n press: (pointer: CanvasToolPointer, context: CanvasToolContext) => void\n hover?: (pointer: CanvasToolPointer, context: CanvasToolContext) => void\n}\n\nconst pan: CanvasTool = {\n press: ({ event }, { editor, setDrag, cursorOverride }) => {\n startPanDrag(event, setDrag, editor)\n cursorOverride.value = HAND_GRAB_CURSOR\n }\n}\n\n/** Draws the layer of the tool's own type, from the press to the release. */\nconst shape: CanvasTool = {\n press: ({ cx, cy }, { editor, setDrag }) => startShapeDraw(cx, cy, editor, setDrag)\n}\n\n/** Selects, moves, resizes, and turns layers: the Move tool. */\nconst select: CanvasTool = {\n press: ({ event, cx, cy, sx, sy }, context) =>\n handleSelectDown(\n event,\n cx,\n cy,\n sx,\n sy,\n context.editor,\n context.hitFns,\n context.tryStartRotation,\n context.handleTextEditClick,\n context.setDrag,\n context.bigNudge()\n ),\n hover: (pointer, { hoverLayers }) => hoverLayers(pointer)\n}\n\n/**\n * Every tool's canvas behaviour, by id. A tool added to `Tool` needs an entry here, and the\n * editor's profile decides which tools are on offer.\n */\nexport const CANVAS_TOOLS: Readonly<Record<Tool, CanvasTool>> = {\n SELECT: select,\n // Handles scale the selection with its contents, and never resize it as Move's do; elsewhere a\n // press selects as Move does.\n SCALE: {\n press: (pointer, context) => {\n const drag = tryStartScaleDrag(pointer.cx, pointer.cy, context.editor)\n if (drag) {\n context.setDrag(drag)\n context.cursorOverride.value = drag.cursor\n } else if (!onSelectionHandle(pointer.cx, pointer.cy, context.editor)) {\n select.press(pointer, context)\n }\n },\n hover: (pointer, context) => {\n context.hoverLayers(pointer)\n const cursor = scaleHoverCursor(pointer.cx, pointer.cy, context.editor)\n if (cursor) context.cursorOverride.value = cursor\n else if (onSelectionHandle(pointer.cx, pointer.cy, context.editor)) {\n context.cursorOverride.value = null\n }\n }\n },\n ZOOM: {\n press: ({ event, cx, cy, sx, sy }, { editor, setDrag, cursorOverride }) => {\n if (event.button !== 0) return\n setDrag(startZoomDrag(cx, cy, sx, sy, event.altKey, editor))\n cursorOverride.value = zoomToolCursor(event.altKey)\n },\n hover: ({ event }, { cursorOverride }) => {\n cursorOverride.value = zoomToolCursor(event.altKey)\n }\n },\n HAND: pan,\n // Comments are placed by the app's comments layer above the canvas.\n COMMENT: { press: () => undefined },\n EYEDROPPER: {\n press: ({ event, cx, cy }, { editor }) => {\n if (event.button === 0) handleEyedropperDown(editor, cx, cy, event.altKey)\n }\n },\n PEN: {\n press: ({ event, cx, cy }, { editor, setDrag, cursorOverride }) =>\n startPenInput(event, cx, cy, editor, setDrag, cursorOverride),\n hover: ({ cx, cy }, { editor }) => {\n updatePenHover(cx, cy, editor)\n }\n },\n PENCIL: { press: ({ cx, cy }, { editor, setDrag }) => startPencilInput(cx, cy, editor, setDrag) },\n TEXT: { press: ({ cx, cy }, { editor, setDrag }) => startTextDraw(cx, cy, editor, setDrag) },\n CONNECTOR: {\n press: ({ event, cx, cy, sx, sy }, { editor, setDrag }) =>\n startConnectorDraw(cx, cy, sx, sy, editor, setDrag, attachModifiers(event)),\n hover: ({ event, cx, cy }, { editor }) => editor.connectorHover(cx, cy, attachModifiers(event))\n },\n STICKY: { press: ({ cx, cy }, { editor, setDrag }) => startStickyDraw(cx, cy, editor, setDrag) },\n FRAME: shape,\n SECTION: shape,\n SLICE: shape,\n RECTANGLE: shape,\n ELLIPSE: shape,\n LINE: shape,\n POLYGON: shape,\n STAR: shape,\n SHAPE_WITH_TEXT: shape\n}\n"],"mappings":";;;;;;;;;;;;AA+CA,MAAM,MAAkB,EACtB,QAAQ,EAAE,SAAS,EAAE,QAAQ,SAAS,qBAAqB;CACzD,aAAa,OAAO,SAAS,MAAM;CACnC,eAAe,QAAQ;AACzB,EACF;;AAGA,MAAM,QAAoB,EACxB,QAAQ,EAAE,IAAI,MAAM,EAAE,QAAQ,cAAc,eAAe,IAAI,IAAI,QAAQ,OAAO,EACpF;;AAGA,MAAM,SAAqB;CACzB,QAAQ,EAAE,OAAO,IAAI,IAAI,IAAI,MAAM,YACjC,iBACE,OACA,IACA,IACA,IACA,IACA,QAAQ,QACR,QAAQ,QACR,QAAQ,kBACR,QAAQ,qBACR,QAAQ,SACR,QAAQ,SAAS,CACnB;CACF,QAAQ,SAAS,EAAE,kBAAkB,YAAY,OAAO;AAC1D;;;;;AAMA,MAAa,eAAmD;CAC9D,QAAQ;CAGR,OAAO;EACL,QAAQ,SAAS,YAAY;GAC3B,MAAM,OAAO,kBAAkB,QAAQ,IAAI,QAAQ,IAAI,QAAQ,MAAM;GACrE,IAAI,MAAM;IACR,QAAQ,QAAQ,IAAI;IACpB,QAAQ,eAAe,QAAQ,KAAK;GACtC,OAAO,IAAI,CAAC,kBAAkB,QAAQ,IAAI,QAAQ,IAAI,QAAQ,MAAM,GAClE,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