@edv4h/usketch-plugin-bg-grid 2.1.8 → 2.3.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/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/plugin.d.ts.map +1 -1
- package/dist/plugin.js +85 -8
- package/dist/plugin.js.map +1 -1
- package/package.json +3 -3
|
@@ -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;IACvC,MAAM,GAAG,GAAG,CAAC,GAAG,GAAG,IAAI,CAAC,EAAE,CAAC,GAAG,GAAG,CAAC;IAClC,MAAM,GAAG,GAAG,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IAC1B,MAAM,GAAG,GAAG,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IAC1B,MAAM,EAAE,GAAG,KAAK,GAAG,CAAC,CAAC;IACrB,MAAM,EAAE,GAAG,MAAM,GAAG,CAAC,CAAC;IACtB,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,GAAG,CAAC,GAAG,GAAG,EAAE,MAAM,GAAG,CAAC,GAAG,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC;IAC1E,sBAAsB;IACtB,MAAM,EAAE,GAAG,QAAQ,CAAC,CAAC,GAAG,EAAE,CAAC;IAC3B,MAAM,EAAE,GAAG,QAAQ,CAAC,CAAC,GAAG,EAAE,CAAC;IAC3B,MAAM,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,GAAG,GAAG,EAAE,GAAG,GAAG,CAAC;IACpC,MAAM,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,GAAG,GAAG,EAAE,GAAG,GAAG,CAAC;IACpC,uEAAuE;IACvE,OAAO;QACN,IAAI,EAAE,EAAE,GAAG,IAAI,GAAG,CAAC;QACnB,GAAG,EAAE,EAAE,GAAG,IAAI,GAAG,CAAC;QAClB,IAAI;QACJ,QAAQ,EAAE,GAAG;QACb,OAAO,EAAE,GAAG,CAAC,EAAE,GAAG,EAAE,GAAG,IAAI,GAAG,CAAC,EAAE,IAAI,CAAC;QACtC,OAAO,EAAE,GAAG,CAAC,EAAE,GAAG,EAAE,GAAG,IAAI,GAAG,CAAC,EAAE,IAAI,CAAC;KACtC,CAAC;AACH,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;AAyK9F,wBAAgB,kBAAkB,IAAI,aAAa,CAuDlD"}
|
package/dist/plugin.js
CHANGED
|
@@ -1,16 +1,33 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
2
|
+
import { viewportRotation } from "@edv4h/usketch-shared";
|
|
3
|
+
import { useId, useLayoutEffect, useRef, useState, useSyncExternalStore, } from "react";
|
|
4
|
+
import { rotatedGridFrame } from "./grid-frame.js";
|
|
3
5
|
const GRID_SIZE = 20;
|
|
4
6
|
const GRID_COLOR = "#e0e0e0";
|
|
5
7
|
const GRID_OPACITY = 0.5;
|
|
6
|
-
// ── Shared visibility state ──
|
|
8
|
+
// ── Shared visibility + overscan state ──
|
|
7
9
|
let visible = true;
|
|
10
|
+
// How far BEYOND the viewport box (in CSS px, all sides) to render the grid. Normally
|
|
11
|
+
// 0 (grid fills the viewport). A consumer that reveals off-screen area — e.g. the Mode
|
|
12
|
+
// 7 tilt, which shows content past the box — drives this via the `bg-grid:set-overscan`
|
|
13
|
+
// event so the grid extends under that far content instead of stopping at the box edge.
|
|
14
|
+
let overscan = 0;
|
|
8
15
|
const listeners = new Set();
|
|
9
|
-
function
|
|
10
|
-
visible = v;
|
|
16
|
+
function notify() {
|
|
11
17
|
for (const fn of listeners)
|
|
12
18
|
fn();
|
|
13
19
|
}
|
|
20
|
+
function setVisible(v) {
|
|
21
|
+
visible = v;
|
|
22
|
+
notify();
|
|
23
|
+
}
|
|
24
|
+
function setOverscan(px) {
|
|
25
|
+
const next = Number.isFinite(px) && px > 0 ? Math.ceil(px) : 0;
|
|
26
|
+
if (next === overscan)
|
|
27
|
+
return;
|
|
28
|
+
overscan = next;
|
|
29
|
+
notify();
|
|
30
|
+
}
|
|
14
31
|
function subscribe(cb) {
|
|
15
32
|
listeners.add(cb);
|
|
16
33
|
return () => listeners.delete(cb);
|
|
@@ -18,16 +35,69 @@ function subscribe(cb) {
|
|
|
18
35
|
function getVisible() {
|
|
19
36
|
return visible;
|
|
20
37
|
}
|
|
38
|
+
function getOverscan() {
|
|
39
|
+
return overscan;
|
|
40
|
+
}
|
|
21
41
|
// ── React component ──
|
|
42
|
+
/** Track an element's size (needed only to rotate the grid about the screen center). */
|
|
43
|
+
function useBoxSize(ref) {
|
|
44
|
+
const [size, setSize] = useState({ width: 0, height: 0 });
|
|
45
|
+
useLayoutEffect(() => {
|
|
46
|
+
const el = ref.current;
|
|
47
|
+
if (!el)
|
|
48
|
+
return;
|
|
49
|
+
const measure = () => {
|
|
50
|
+
const r = el.getBoundingClientRect();
|
|
51
|
+
setSize((s) => s.width === r.width && s.height === r.height ? s : { width: r.width, height: r.height });
|
|
52
|
+
};
|
|
53
|
+
measure();
|
|
54
|
+
if (typeof ResizeObserver === "undefined")
|
|
55
|
+
return;
|
|
56
|
+
const ro = new ResizeObserver(measure);
|
|
57
|
+
ro.observe(el);
|
|
58
|
+
return () => ro.disconnect();
|
|
59
|
+
}, [ref]);
|
|
60
|
+
return size;
|
|
61
|
+
}
|
|
22
62
|
function GridBackground({ viewport }) {
|
|
23
63
|
const show = useSyncExternalStore(subscribe, getVisible);
|
|
64
|
+
const pad = useSyncExternalStore(subscribe, getOverscan);
|
|
24
65
|
const patternId = useId();
|
|
66
|
+
// A stable, viewport-sized box: measured for the rotated case, and the positioning
|
|
67
|
+
// parent of whichever grid box is drawn.
|
|
68
|
+
const boxRef = useRef(null);
|
|
69
|
+
const box = useBoxSize(boxRef);
|
|
25
70
|
if (!show)
|
|
26
71
|
return null;
|
|
27
72
|
const size = GRID_SIZE * viewport.zoom;
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
73
|
+
let grid;
|
|
74
|
+
if (viewportRotation(viewport) !== 0) {
|
|
75
|
+
// Camera rotation: a diagonal-sized square turned about the screen center,
|
|
76
|
+
// phased so its lines land on world multiples (see rotatedGridFrame).
|
|
77
|
+
const f = rotatedGridFrame(viewport, box.width, box.height, pad, size);
|
|
78
|
+
grid = f && (_jsx("div", { style: {
|
|
79
|
+
position: "absolute",
|
|
80
|
+
left: f.left,
|
|
81
|
+
top: f.top,
|
|
82
|
+
width: f.side,
|
|
83
|
+
height: f.side,
|
|
84
|
+
transform: `rotate(${f.rotation}deg)`,
|
|
85
|
+
transformOrigin: "50% 50%",
|
|
86
|
+
}, children: _jsx(GridPattern, { id: patternId, size: size, offsetX: f.offsetX, offsetY: f.offsetY }) }));
|
|
87
|
+
}
|
|
88
|
+
else {
|
|
89
|
+
// The grid box is inset by `-pad` on every side (extends past the viewport). Its
|
|
90
|
+
// user-space origin therefore sits at box(-pad,-pad), so a world-0 line that is at
|
|
91
|
+
// box `viewport.x` is at grid-space `viewport.x + pad`; keep the pattern phase on
|
|
92
|
+
// world multiples by shifting the offset accordingly (mod size). `pad = 0` → current.
|
|
93
|
+
const offsetX = (viewport.x + pad) % size;
|
|
94
|
+
const offsetY = (viewport.y + pad) % size;
|
|
95
|
+
grid = (_jsx("div", { style: { position: "absolute", inset: -pad }, children: _jsx(GridPattern, { id: patternId, size: size, offsetX: offsetX, offsetY: offsetY }) }));
|
|
96
|
+
}
|
|
97
|
+
return (_jsx("div", { ref: boxRef, style: { position: "absolute", inset: 0, pointerEvents: "none" }, children: grid }));
|
|
98
|
+
}
|
|
99
|
+
function GridPattern({ id, size, offsetX, offsetY, }) {
|
|
100
|
+
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})` })] }));
|
|
31
101
|
}
|
|
32
102
|
// ── Plugin ──
|
|
33
103
|
export function createGridBgPlugin() {
|
|
@@ -35,8 +105,9 @@ export function createGridBgPlugin() {
|
|
|
35
105
|
id: "usketch-plugin-bg-grid",
|
|
36
106
|
name: "Grid Background",
|
|
37
107
|
setup(ctx) {
|
|
38
|
-
// Reset to
|
|
108
|
+
// Reset to defaults
|
|
39
109
|
visible = true;
|
|
110
|
+
overscan = 0;
|
|
40
111
|
ctx.layers.register({
|
|
41
112
|
id: "bg-grid",
|
|
42
113
|
order: 10,
|
|
@@ -46,6 +117,11 @@ export function createGridBgPlugin() {
|
|
|
46
117
|
const off = ctx.events.on("bg:set", ({ type }) => {
|
|
47
118
|
setVisible(type === "grid");
|
|
48
119
|
});
|
|
120
|
+
// Let a consumer (e.g. the Mode 7 tilt) extend the grid past the viewport so
|
|
121
|
+
// it stays under off-screen content instead of stopping at the box edge.
|
|
122
|
+
const offOverscan = ctx.events.on("bg-grid:set-overscan", ({ px }) => {
|
|
123
|
+
setOverscan(px);
|
|
124
|
+
});
|
|
49
125
|
// ── 背景切替を Action として公開(grid/dots プラグイン共通の bg:set を emit) ──
|
|
50
126
|
const offAction = ctx.actions.register({
|
|
51
127
|
id: "bg:set",
|
|
@@ -67,6 +143,7 @@ export function createGridBgPlugin() {
|
|
|
67
143
|
});
|
|
68
144
|
return () => {
|
|
69
145
|
off();
|
|
146
|
+
offOverscan();
|
|
70
147
|
offAction();
|
|
71
148
|
ctx.layers.unregister("bg-grid");
|
|
72
149
|
};
|
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,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAEnD,MAAM,SAAS,GAAG,EAAE,CAAC;AACrB,MAAM,UAAU,GAAG,SAAS,CAAC;AAC7B,MAAM,YAAY,GAAG,GAAG,CAAC;AAEzB,2CAA2C;AAE3C,IAAI,OAAO,GAAG,IAAI,CAAC;AACnB,sFAAsF;AACtF,uFAAuF;AACvF,wFAAwF;AACxF,wFAAwF;AACxF,IAAI,QAAQ,GAAG,CAAC,CAAC;AACjB,MAAM,SAAS,GAAoB,IAAI,GAAG,EAAE,CAAC;AAE7C,SA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MAAM,CAAC,EAAE,CAAiB,sBAAsB,EAAE,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE;gBACpF,WAAW,CAAC,EAAE,CAAC,CAAC;YACjB,CAAC,CAAC,CAAC;YAEH,6DAA6D;YAC7D,MAAM,SAAS,GAAG,GAAG,CAAC,OAAO,CAAC,QAAQ,CAAC;gBACtC,EAAE,EAAE,QAAQ;gBACZ,KAAK,EAAE,YAAY;gBACnB,KAAK,EAAE,YAAY;gBACnB,MAAM,EAAE;oBACP;wBACC,IAAI,EAAE,MAAM;wBACZ,IAAI,EAAE,MAAM;wBACZ,OAAO,EAAE,MAAM;wBACf,OAAO,EAAE;4BACR,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE;4BAChC,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE;4BAChC,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE;yBAChC;qBACD;iBACD;gBACD,GAAG,EAAE,CAAC,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,QAAQ,EAAE,EAAE,IAAI,EAAE,CAAC;aACtD,CAAC,CAAC;YAEH,OAAO,GAAG,EAAE;gBACX,GAAG,EAAE,CAAC;gBACN,WAAW,EAAE,CAAC;gBACd,SAAS,EAAE,CAAC;gBACZ,GAAG,CAAC,MAAM,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC;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.3.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.4",
|
|
16
|
+
"@edv4h/usketch-shared": "4.14.0"
|
|
17
17
|
},
|
|
18
18
|
"peerDependencies": {
|
|
19
19
|
"react": ">=19"
|