@edv4h/usketch-plugin-bg-grid 2.2.0 → 2.4.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/export-background.d.ts +12 -0
- package/dist/export-background.d.ts.map +1 -0
- package/dist/export-background.js +15 -0
- package/dist/export-background.js.map +1 -0
- package/dist/grid-frame.d.ts +19 -0
- package/dist/grid-frame.d.ts.map +1 -0
- package/dist/grid-frame.js +33 -0
- package/dist/grid-frame.js.map +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/plugin.d.ts.map +1 -1
- package/dist/plugin.js +57 -11
- package/dist/plugin.js.map +1 -1
- package/package.json +4 -4
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { LayerExportBackgroundContext } from "@edv4h/usketch-shared";
|
|
2
|
+
import type { ReactElement } from "react";
|
|
3
|
+
export declare const GRID_SIZE = 20;
|
|
4
|
+
export declare const GRID_COLOR = "#e0e0e0";
|
|
5
|
+
export declare const GRID_OPACITY = 0.5;
|
|
6
|
+
/**
|
|
7
|
+
* The grid for a region export, in board coordinates. Spacing is GRID_SIZE board
|
|
8
|
+
* units (zoom-independent, as on screen); only the line width depends on `zoom` —
|
|
9
|
+
* the screen draws a 1px line, i.e. `1 / zoom` board units.
|
|
10
|
+
*/
|
|
11
|
+
export declare function renderGridExportBackground({ rect, zoom, idPrefix, }: LayerExportBackgroundContext): ReactElement;
|
|
12
|
+
//# sourceMappingURL=export-background.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"export-background.d.ts","sourceRoot":"","sources":["../src/export-background.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,uBAAuB,CAAC;AAC1E,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAE1C,eAAO,MAAM,SAAS,KAAK,CAAC;AAC5B,eAAO,MAAM,UAAU,YAAY,CAAC;AACpC,eAAO,MAAM,YAAY,MAAM,CAAC;AAEhC;;;;GAIG;AACH,wBAAgB,0BAA0B,CAAC,EAC1C,IAAI,EACJ,IAAI,EACJ,QAAQ,GACR,EAAE,4BAA4B,GAAG,YAAY,CA0B7C"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
export const GRID_SIZE = 20;
|
|
3
|
+
export const GRID_COLOR = "#e0e0e0";
|
|
4
|
+
export const GRID_OPACITY = 0.5;
|
|
5
|
+
/**
|
|
6
|
+
* The grid for a region export, in board coordinates. Spacing is GRID_SIZE board
|
|
7
|
+
* units (zoom-independent, as on screen); only the line width depends on `zoom` —
|
|
8
|
+
* the screen draws a 1px line, i.e. `1 / zoom` board units.
|
|
9
|
+
*/
|
|
10
|
+
export function renderGridExportBackground({ rect, zoom, idPrefix, }) {
|
|
11
|
+
const id = `${idPrefix}-pattern`;
|
|
12
|
+
const strokeWidth = zoom > 0 ? 1 / zoom : 1;
|
|
13
|
+
return (_jsxs("g", { children: [_jsx("defs", { children: _jsx("pattern", { id: id, x: 0, y: 0, width: GRID_SIZE, height: GRID_SIZE, patternUnits: "userSpaceOnUse", children: _jsx("path", { d: `M ${GRID_SIZE} 0 L 0 0 0 ${GRID_SIZE}`, fill: "none", stroke: GRID_COLOR, strokeWidth: strokeWidth, opacity: GRID_OPACITY }) }) }), _jsx("rect", { x: rect.x, y: rect.y, width: rect.width, height: rect.height, fill: `url(#${id})` })] }));
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=export-background.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"export-background.js","sourceRoot":"","sources":["../src/export-background.tsx"],"names":[],"mappings":";AAGA,MAAM,CAAC,MAAM,SAAS,GAAG,EAAE,CAAC;AAC5B,MAAM,CAAC,MAAM,UAAU,GAAG,SAAS,CAAC;AACpC,MAAM,CAAC,MAAM,YAAY,GAAG,GAAG,CAAC;AAEhC;;;;GAIG;AACH,MAAM,UAAU,0BAA0B,CAAC,EAC1C,IAAI,EACJ,IAAI,EACJ,QAAQ,GACsB;IAC9B,MAAM,EAAE,GAAG,GAAG,QAAQ,UAAU,CAAC;IACjC,MAAM,WAAW,GAAG,IAAI,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;IAC5C,OAAO,CACN,wBACC,yBACC,kBACC,EAAE,EAAE,EAAE,EACN,CAAC,EAAE,CAAC,EACJ,CAAC,EAAE,CAAC,EACJ,KAAK,EAAE,SAAS,EAChB,MAAM,EAAE,SAAS,EACjB,YAAY,EAAC,gBAAgB,YAE7B,eACC,CAAC,EAAE,KAAK,SAAS,cAAc,SAAS,EAAE,EAC1C,IAAI,EAAC,MAAM,EACX,MAAM,EAAE,UAAU,EAClB,WAAW,EAAE,WAAW,EACxB,OAAO,EAAE,YAAY,GACpB,GACO,GACJ,EACP,eAAM,CAAC,EAAE,IAAI,CAAC,CAAC,EAAE,CAAC,EAAE,IAAI,CAAC,CAAC,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE,IAAI,EAAE,QAAQ,EAAE,GAAG,GAAI,IACxF,CACJ,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { Viewport } from "@edv4h/usketch-shared";
|
|
2
|
+
export interface RotatedGridFrame {
|
|
3
|
+
/** Square box position/size in the layer's (screen) coordinates. */
|
|
4
|
+
left: number;
|
|
5
|
+
top: number;
|
|
6
|
+
side: number;
|
|
7
|
+
/** CSS rotation for the square (about its own center = the screen center). */
|
|
8
|
+
rotation: number;
|
|
9
|
+
/** Pattern phase inside the square, in [0, size). */
|
|
10
|
+
offsetX: number;
|
|
11
|
+
offsetY: number;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Where to put the rotated grid square for a `width × height` screen (plus `pad`
|
|
15
|
+
* overscan on every side) and a grid cell of `size` screen px. `null` until the
|
|
16
|
+
* screen has been measured.
|
|
17
|
+
*/
|
|
18
|
+
export declare function rotatedGridFrame(viewport: Viewport, width: number, height: number, pad: number, size: number): RotatedGridFrame | null;
|
|
19
|
+
//# sourceMappingURL=grid-frame.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"grid-frame.d.ts","sourceRoot":"","sources":["../src/grid-frame.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAGtD,MAAM,WAAW,gBAAgB;IAChC,oEAAoE;IACpE,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,8EAA8E;IAC9E,QAAQ,EAAE,MAAM,CAAC;IACjB,qDAAqD;IACrD,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;CAChB;AAID;;;;GAIG;AACH,wBAAgB,gBAAgB,CAC/B,QAAQ,EAAE,QAAQ,EAClB,KAAK,EAAE,MAAM,EACb,MAAM,EAAE,MAAM,EACd,GAAG,EAAE,MAAM,EACX,IAAI,EAAE,MAAM,GACV,gBAAgB,GAAG,IAAI,CAuBzB"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { viewportRotation } from "@edv4h/usketch-shared";
|
|
2
|
+
const mod = (a, n) => ((a % n) + n) % n;
|
|
3
|
+
/**
|
|
4
|
+
* Where to put the rotated grid square for a `width × height` screen (plus `pad`
|
|
5
|
+
* overscan on every side) and a grid cell of `size` screen px. `null` until the
|
|
6
|
+
* screen has been measured.
|
|
7
|
+
*/
|
|
8
|
+
export function rotatedGridFrame(viewport, width, height, pad, size) {
|
|
9
|
+
if (width <= 0 || height <= 0 || size <= 0)
|
|
10
|
+
return null;
|
|
11
|
+
const deg = viewportRotation(viewport);
|
|
12
|
+
const rad = (deg * Math.PI) / 180;
|
|
13
|
+
const cos = Math.cos(rad);
|
|
14
|
+
const sin = Math.sin(rad);
|
|
15
|
+
const cx = width / 2;
|
|
16
|
+
const cy = height / 2;
|
|
17
|
+
const side = Math.ceil(Math.hypot(width + 2 * pad, height + 2 * pad)) + 2;
|
|
18
|
+
// t' = c + R⁻¹(t − c)
|
|
19
|
+
const dx = viewport.x - cx;
|
|
20
|
+
const dy = viewport.y - cy;
|
|
21
|
+
const tx = cx + dx * cos + dy * sin;
|
|
22
|
+
const ty = cy - dx * sin + dy * cos;
|
|
23
|
+
// The square's local origin is at c − side/2 (in the unrotated frame).
|
|
24
|
+
return {
|
|
25
|
+
left: cx - side / 2,
|
|
26
|
+
top: cy - side / 2,
|
|
27
|
+
side,
|
|
28
|
+
rotation: deg,
|
|
29
|
+
offsetX: mod(tx - cx + side / 2, size),
|
|
30
|
+
offsetY: mod(ty - cy + side / 2, size),
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
//# sourceMappingURL=grid-frame.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"grid-frame.js","sourceRoot":"","sources":["../src/grid-frame.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAczD,MAAM,GAAG,GAAG,CAAC,CAAS,EAAE,CAAS,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC;AAExD;;;;GAIG;AACH,MAAM,UAAU,gBAAgB,CAC/B,QAAkB,EAClB,KAAa,EACb,MAAc,EACd,GAAW,EACX,IAAY;IAEZ,IAAI,KAAK,IAAI,CAAC,IAAI,MAAM,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC;QAAE,OAAO,IAAI,CAAC;IACxD,MAAM,GAAG,GAAG,gBAAgB,CAAC,QAAQ,CAAC,CAAC;I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-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,WAAW,EAAG,wBAAiC,CAAC;AAC7D,OAAO,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,WAAW,EAAG,wBAAiC,CAAC;AAC7D,OAAO,EAAE,0BAA0B,EAAE,MAAM,wBAAwB,CAAC;AACpE,OAAO,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC"}
|
package/dist/index.js
CHANGED
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,WAAW,GAAG,wBAAiC,CAAC;AAC7D,OAAO,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,WAAW,GAAG,wBAAiC,CAAC;AAC7D,OAAO,EAAE,0BAA0B,EAAE,MAAM,wBAAwB,CAAC;AACpE,OAAO,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC"}
|
package/dist/plugin.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../src/plugin.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAqC,aAAa,EAAE,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../src/plugin.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAqC,aAAa,EAAE,MAAM,uBAAuB,CAAC;AA2K9F,wBAAgB,kBAAkB,IAAI,aAAa,CAyDlD"}
|
package/dist/plugin.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
2
|
+
import { viewportRotation } from "@edv4h/usketch-shared";
|
|
3
|
+
import { useId, useLayoutEffect, useRef, useState, useSyncExternalStore, } from "react";
|
|
4
|
+
import { GRID_COLOR, GRID_OPACITY, GRID_SIZE, renderGridExportBackground, } from "./export-background.js";
|
|
5
|
+
import { rotatedGridFrame } from "./grid-frame.js";
|
|
6
6
|
// ── Shared visibility + overscan state ──
|
|
7
7
|
let visible = true;
|
|
8
8
|
// How far BEYOND the viewport box (in CSS px, all sides) to render the grid. Normally
|
|
@@ -37,20 +37,65 @@ function getOverscan() {
|
|
|
37
37
|
return overscan;
|
|
38
38
|
}
|
|
39
39
|
// ── React component ──
|
|
40
|
+
/** Track an element's size (needed only to rotate the grid about the screen center). */
|
|
41
|
+
function useBoxSize(ref) {
|
|
42
|
+
const [size, setSize] = useState({ width: 0, height: 0 });
|
|
43
|
+
useLayoutEffect(() => {
|
|
44
|
+
const el = ref.current;
|
|
45
|
+
if (!el)
|
|
46
|
+
return;
|
|
47
|
+
const measure = () => {
|
|
48
|
+
const r = el.getBoundingClientRect();
|
|
49
|
+
setSize((s) => s.width === r.width && s.height === r.height ? s : { width: r.width, height: r.height });
|
|
50
|
+
};
|
|
51
|
+
measure();
|
|
52
|
+
if (typeof ResizeObserver === "undefined")
|
|
53
|
+
return;
|
|
54
|
+
const ro = new ResizeObserver(measure);
|
|
55
|
+
ro.observe(el);
|
|
56
|
+
return () => ro.disconnect();
|
|
57
|
+
}, [ref]);
|
|
58
|
+
return size;
|
|
59
|
+
}
|
|
40
60
|
function GridBackground({ viewport }) {
|
|
41
61
|
const show = useSyncExternalStore(subscribe, getVisible);
|
|
42
62
|
const pad = useSyncExternalStore(subscribe, getOverscan);
|
|
43
63
|
const patternId = useId();
|
|
64
|
+
// A stable, viewport-sized box: measured for the rotated case, and the positioning
|
|
65
|
+
// parent of whichever grid box is drawn.
|
|
66
|
+
const boxRef = useRef(null);
|
|
67
|
+
const box = useBoxSize(boxRef);
|
|
44
68
|
if (!show)
|
|
45
69
|
return null;
|
|
46
70
|
const size = GRID_SIZE * viewport.zoom;
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
71
|
+
let grid;
|
|
72
|
+
if (viewportRotation(viewport) !== 0) {
|
|
73
|
+
// Camera rotation: a diagonal-sized square turned about the screen center,
|
|
74
|
+
// phased so its lines land on world multiples (see rotatedGridFrame).
|
|
75
|
+
const f = rotatedGridFrame(viewport, box.width, box.height, pad, size);
|
|
76
|
+
grid = f && (_jsx("div", { style: {
|
|
77
|
+
position: "absolute",
|
|
78
|
+
left: f.left,
|
|
79
|
+
top: f.top,
|
|
80
|
+
width: f.side,
|
|
81
|
+
height: f.side,
|
|
82
|
+
transform: `rotate(${f.rotation}deg)`,
|
|
83
|
+
transformOrigin: "50% 50%",
|
|
84
|
+
}, children: _jsx(GridPattern, { id: patternId, size: size, offsetX: f.offsetX, offsetY: f.offsetY }) }));
|
|
85
|
+
}
|
|
86
|
+
else {
|
|
87
|
+
// The grid box is inset by `-pad` on every side (extends past the viewport). Its
|
|
88
|
+
// user-space origin therefore sits at box(-pad,-pad), so a world-0 line that is at
|
|
89
|
+
// box `viewport.x` is at grid-space `viewport.x + pad`; keep the pattern phase on
|
|
90
|
+
// world multiples by shifting the offset accordingly (mod size). `pad = 0` → current.
|
|
91
|
+
const offsetX = (viewport.x + pad) % size;
|
|
92
|
+
const offsetY = (viewport.y + pad) % size;
|
|
93
|
+
grid = (_jsx("div", { style: { position: "absolute", inset: -pad }, children: _jsx(GridPattern, { id: patternId, size: size, offsetX: offsetX, offsetY: offsetY }) }));
|
|
94
|
+
}
|
|
95
|
+
return (_jsx("div", { ref: boxRef, style: { position: "absolute", inset: 0, pointerEvents: "none" }, children: grid }));
|
|
96
|
+
}
|
|
97
|
+
function GridPattern({ id, size, offsetX, offsetY, }) {
|
|
98
|
+
return (_jsxs("svg", { width: "100%", height: "100%", xmlns: "http://www.w3.org/2000/svg", children: [_jsx("defs", { children: _jsx("pattern", { id: id, x: offsetX, y: offsetY, width: size, height: size, patternUnits: "userSpaceOnUse", children: _jsx("path", { d: `M ${size} 0 L 0 0 0 ${size}`, fill: "none", stroke: GRID_COLOR, strokeWidth: 1, opacity: GRID_OPACITY }) }) }), _jsx("rect", { width: "100%", height: "100%", fill: `url(#${id})` })] }));
|
|
54
99
|
}
|
|
55
100
|
// ── Plugin ──
|
|
56
101
|
export function createGridBgPlugin() {
|
|
@@ -66,6 +111,7 @@ export function createGridBgPlugin() {
|
|
|
66
111
|
order: 10,
|
|
67
112
|
fixed: true,
|
|
68
113
|
render: (renderCtx) => _jsx(GridBackground, { viewport: renderCtx.viewport }),
|
|
114
|
+
renderExportBackground: (exportCtx) => visible ? renderGridExportBackground(exportCtx) : null,
|
|
69
115
|
});
|
|
70
116
|
const off = ctx.events.on("bg:set", ({ type }) => {
|
|
71
117
|
setVisible(type === "grid");
|
package/dist/plugin.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.js","sourceRoot":"","sources":["../src/plugin.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"plugin.js","sourceRoot":"","sources":["../src/plugin.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAGN,KAAK,EACL,eAAe,EACf,MAAM,EACN,QAAQ,EACR,oBAAoB,GACpB,MAAM,OAAO,CAAC;AACf,OAAO,EACN,UAAU,EACV,YAAY,EACZ,SAAS,EACT,0BAA0B,GAC1B,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAEnD,2CAA2C;AA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AC;YAClC,CAAC,CAAC;QACH,CAAC;KACD,CAAC;AACH,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@edv4h/usketch-plugin-bg-grid",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.4.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -12,8 +12,8 @@
|
|
|
12
12
|
}
|
|
13
13
|
},
|
|
14
14
|
"dependencies": {
|
|
15
|
-
"@edv4h/usketch-core": "2.4.
|
|
16
|
-
"@edv4h/usketch-shared": "4.
|
|
15
|
+
"@edv4h/usketch-core": "2.4.5",
|
|
16
|
+
"@edv4h/usketch-shared": "4.15.0"
|
|
17
17
|
},
|
|
18
18
|
"peerDependencies": {
|
|
19
19
|
"react": ">=19"
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"devDependencies": {
|
|
22
22
|
"@types/react": "19.2.18",
|
|
23
23
|
"typescript": "7.0.2",
|
|
24
|
-
"vitest": "
|
|
24
|
+
"vitest": "5.0.3"
|
|
25
25
|
},
|
|
26
26
|
"publishConfig": {
|
|
27
27
|
"access": "public"
|