|
1 | 1 | <script lang="ts">
|
2 | 2 | import { getContext, onMount, tick } from "svelte";
|
3 | 3 |
|
4 |
| - import type { DocumentState } from "@graphite/state-providers/document"; |
5 |
| - import { textInputCleanup } from "@graphite/utility-functions/keyboard-entry"; |
6 |
| - import { extractPixelData, rasterizeSVGCanvas } from "@graphite/utility-functions/rasterization"; |
7 |
| - import { updateBoundsOfViewports } from "@graphite/utility-functions/viewports"; |
8 |
| - import type { Editor } from "@graphite/wasm-communication/editor"; |
| 4 | + import type { Editor } from "@graphite/editor"; |
9 | 5 | import {
|
10 | 6 | type MouseCursorIcon,
|
11 | 7 | type XY,
|
|
19 | 15 | UpdateEyedropperSamplingState,
|
20 | 16 | UpdateMouseCursor,
|
21 | 17 | isWidgetSpanRow,
|
22 |
| - } from "@graphite/wasm-communication/messages"; |
| 18 | + } from "@graphite/messages"; |
| 19 | + import type { DocumentState } from "@graphite/state-providers/document"; |
| 20 | + import { textInputCleanup } from "@graphite/utility-functions/keyboard-entry"; |
| 21 | + import { extractPixelData, rasterizeSVGCanvas } from "@graphite/utility-functions/rasterization"; |
| 22 | + import { updateBoundsOfViewports } from "@graphite/utility-functions/viewports"; |
23 | 23 |
|
24 | 24 | import EyedropperPreview, { ZOOM_WINDOW_DIMENSIONS } from "@graphite/components/floating-menus/EyedropperPreview.svelte";
|
25 | 25 | import LayoutCol from "@graphite/components/layout/LayoutCol.svelte";
|
|
275 | 275 | // This isn't very clean but it's good enough for now until we need more icons, then we can build something more robust (consider blob URLs)
|
276 | 276 | if (cursor === "custom-rotate") {
|
277 | 277 | const svg = `
|
278 |
| - <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" width="20" height="20"> |
279 |
| - <path transform="translate(2 2)" fill="black" stroke="black" stroke-width="2px" d=" |
280 |
| - M8,15.2C4,15.2,0.8,12,0.8,8C0.8,4,4,0.8,8,0.8c2,0,3.9,0.8,5.3,2.3l-1,1C11.2,2.9,9.6,2.2,8,2.2C4.8,2.2,2.2,4.8,2.2,8s2.6,5.8,5.8,5.8s5.8-2.6,5.8-5.8h1.4C15.2,12,12,15.2,8,15.2z |
281 |
| - " /> |
282 |
| - <polygon transform="translate(2 2)" fill="black" stroke="black" stroke-width="2px" points="12.6,0 15.5,5 9.7,5" /> |
283 |
| - <path transform="translate(2 2)" fill="white" d=" |
284 |
| - M8,15.2C4,15.2,0.8,12,0.8,8C0.8,4,4,0.8,8,0.8c2,0,3.9,0.8,5.3,2.3l-1,1C11.2,2.9,9.6,2.2,8,2.2C4.8,2.2,2.2,4.8,2.2,8s2.6,5.8,5.8,5.8s5.8-2.6,5.8-5.8h1.4C15.2,12,12,15.2,8,15.2z |
285 |
| - " /> |
286 |
| - <polygon transform="translate(2 2)" fill="white" points="12.6,0 15.5,5 9.7,5" /> |
287 |
| - </svg> |
288 |
| - ` |
| 278 | + <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" width="20" height="20"> |
| 279 | + <path transform="translate(2 2)" fill="black" stroke="black" stroke-width="2px" d=" |
| 280 | + M8,15.2C4,15.2,0.8,12,0.8,8C0.8,4,4,0.8,8,0.8c2,0,3.9,0.8,5.3,2.3l-1,1C11.2,2.9,9.6,2.2,8,2.2C4.8,2.2,2.2,4.8,2.2,8s2.6,5.8,5.8,5.8s5.8-2.6,5.8-5.8h1.4C15.2,12,12,15.2,8,15.2z |
| 281 | + " /> |
| 282 | + <polygon transform="translate(2 2)" fill="black" stroke="black" stroke-width="2px" points="12.6,0 15.5,5 9.7,5" /> |
| 283 | + <path transform="translate(2 2)" fill="white" d=" |
| 284 | + M8,15.2C4,15.2,0.8,12,0.8,8C0.8,4,4,0.8,8,0.8c2,0,3.9,0.8,5.3,2.3l-1,1C11.2,2.9,9.6,2.2,8,2.2C4.8,2.2,2.2,4.8,2.2,8s2.6,5.8,5.8,5.8s5.8-2.6,5.8-5.8h1.4C15.2,12,12,15.2,8,15.2z |
| 285 | + " /> |
| 286 | + <polygon transform="translate(2 2)" fill="white" points="12.6,0 15.5,5 9.7,5" /> |
| 287 | + </svg> |
| 288 | + ` |
289 | 289 | .split("\n")
|
290 | 290 | .map((line) => line.trim())
|
291 | 291 | .join("");
|
|
0 commit comments