@sealpixel/ui 1.0.0-rc.0 → 1.0.0-rc.10

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.
Files changed (120) hide show
  1. package/LICENSE.md +2 -2
  2. package/dist/components/sealpixel-editor.d.ts +43 -7
  3. package/dist/components/sealpixel-editor.d.ts.map +1 -1
  4. package/dist/components/sealpixel-editor.js +114 -6
  5. package/dist/components/sealpixel-editor.js.map +1 -1
  6. package/dist/components/sealpixel-stage.d.ts +11 -0
  7. package/dist/components/sealpixel-stage.d.ts.map +1 -1
  8. package/dist/components/sealpixel-stage.js +23 -4
  9. package/dist/components/sealpixel-stage.js.map +1 -1
  10. package/dist/components/sealpixel-toolbar.d.ts +6 -1
  11. package/dist/components/sealpixel-toolbar.d.ts.map +1 -1
  12. package/dist/components/sealpixel-toolbar.js +40 -2
  13. package/dist/components/sealpixel-toolbar.js.map +1 -1
  14. package/dist/icons.d.ts +1 -0
  15. package/dist/icons.d.ts.map +1 -1
  16. package/dist/icons.js +1 -0
  17. package/dist/icons.js.map +1 -1
  18. package/dist/index.d.ts +1 -1
  19. package/dist/index.d.ts.map +1 -1
  20. package/dist/index.js +1 -1
  21. package/dist/index.js.map +1 -1
  22. package/dist/locales/de.d.ts.map +1 -1
  23. package/dist/locales/de.js +17 -0
  24. package/dist/locales/de.js.map +1 -1
  25. package/dist/locales/en.d.ts.map +1 -1
  26. package/dist/locales/en.js +17 -0
  27. package/dist/locales/en.js.map +1 -1
  28. package/dist/locales/es.d.ts.map +1 -1
  29. package/dist/locales/es.js +17 -0
  30. package/dist/locales/es.js.map +1 -1
  31. package/dist/locales/fr.d.ts.map +1 -1
  32. package/dist/locales/fr.js +17 -0
  33. package/dist/locales/fr.js.map +1 -1
  34. package/dist/locales/ja.d.ts.map +1 -1
  35. package/dist/locales/ja.js +17 -0
  36. package/dist/locales/ja.js.map +1 -1
  37. package/dist/locales/pt.d.ts.map +1 -1
  38. package/dist/locales/pt.js +17 -0
  39. package/dist/locales/pt.js.map +1 -1
  40. package/dist/theme.js +6 -6
  41. package/dist/tool.d.ts +12 -0
  42. package/dist/tool.d.ts.map +1 -1
  43. package/dist/tools/annotate.d.ts.map +1 -1
  44. package/dist/tools/annotate.js +182 -19
  45. package/dist/tools/annotate.js.map +1 -1
  46. package/dist/tools/assist.d.ts +93 -0
  47. package/dist/tools/assist.d.ts.map +1 -0
  48. package/dist/tools/assist.js +314 -0
  49. package/dist/tools/assist.js.map +1 -0
  50. package/dist/tools/crop-rotation.d.ts +53 -0
  51. package/dist/tools/crop-rotation.d.ts.map +1 -0
  52. package/dist/tools/crop-rotation.js +153 -0
  53. package/dist/tools/crop-rotation.js.map +1 -0
  54. package/dist/tools/crop.d.ts.map +1 -1
  55. package/dist/tools/crop.js +81 -10
  56. package/dist/tools/crop.js.map +1 -1
  57. package/dist/tools/handles.d.ts +27 -0
  58. package/dist/tools/handles.d.ts.map +1 -0
  59. package/dist/tools/handles.js +45 -0
  60. package/dist/tools/handles.js.map +1 -0
  61. package/dist/tools/index.d.ts +2 -1
  62. package/dist/tools/index.d.ts.map +1 -1
  63. package/dist/tools/index.js +3 -1
  64. package/dist/tools/index.js.map +1 -1
  65. package/dist/tools/redact.d.ts.map +1 -1
  66. package/dist/tools/redact.js +96 -7
  67. package/dist/tools/redact.js.map +1 -1
  68. package/dist/tools/region-transform.d.ts +70 -0
  69. package/dist/tools/region-transform.d.ts.map +1 -0
  70. package/dist/tools/region-transform.js +192 -0
  71. package/dist/tools/region-transform.js.map +1 -0
  72. package/package.json +8 -8
  73. package/dist/components/lumbra-button.d.ts +0 -28
  74. package/dist/components/lumbra-button.d.ts.map +0 -1
  75. package/dist/components/lumbra-button.js +0 -87
  76. package/dist/components/lumbra-button.js.map +0 -1
  77. package/dist/components/lumbra-editor.d.ts +0 -226
  78. package/dist/components/lumbra-editor.d.ts.map +0 -1
  79. package/dist/components/lumbra-editor.js +0 -873
  80. package/dist/components/lumbra-editor.js.map +0 -1
  81. package/dist/components/lumbra-nav.d.ts +0 -48
  82. package/dist/components/lumbra-nav.d.ts.map +0 -1
  83. package/dist/components/lumbra-nav.js +0 -159
  84. package/dist/components/lumbra-nav.js.map +0 -1
  85. package/dist/components/lumbra-slider.d.ts +0 -48
  86. package/dist/components/lumbra-slider.d.ts.map +0 -1
  87. package/dist/components/lumbra-slider.js +0 -168
  88. package/dist/components/lumbra-slider.js.map +0 -1
  89. package/dist/components/lumbra-stage.d.ts +0 -92
  90. package/dist/components/lumbra-stage.d.ts.map +0 -1
  91. package/dist/components/lumbra-stage.js +0 -344
  92. package/dist/components/lumbra-stage.js.map +0 -1
  93. package/dist/components/lumbra-toolbar.d.ts +0 -30
  94. package/dist/components/lumbra-toolbar.d.ts.map +0 -1
  95. package/dist/components/lumbra-toolbar.js +0 -127
  96. package/dist/components/lumbra-toolbar.js.map +0 -1
  97. package/dist/components/pincel-button.d.ts +0 -28
  98. package/dist/components/pincel-button.d.ts.map +0 -1
  99. package/dist/components/pincel-button.js +0 -87
  100. package/dist/components/pincel-button.js.map +0 -1
  101. package/dist/components/pincel-editor.d.ts +0 -195
  102. package/dist/components/pincel-editor.d.ts.map +0 -1
  103. package/dist/components/pincel-editor.js +0 -794
  104. package/dist/components/pincel-editor.js.map +0 -1
  105. package/dist/components/pincel-nav.d.ts +0 -33
  106. package/dist/components/pincel-nav.d.ts.map +0 -1
  107. package/dist/components/pincel-nav.js +0 -147
  108. package/dist/components/pincel-nav.js.map +0 -1
  109. package/dist/components/pincel-slider.d.ts +0 -48
  110. package/dist/components/pincel-slider.d.ts.map +0 -1
  111. package/dist/components/pincel-slider.js +0 -168
  112. package/dist/components/pincel-slider.js.map +0 -1
  113. package/dist/components/pincel-stage.d.ts +0 -66
  114. package/dist/components/pincel-stage.d.ts.map +0 -1
  115. package/dist/components/pincel-stage.js +0 -233
  116. package/dist/components/pincel-stage.js.map +0 -1
  117. package/dist/components/pincel-toolbar.d.ts +0 -30
  118. package/dist/components/pincel-toolbar.d.ts.map +0 -1
  119. package/dist/components/pincel-toolbar.js +0 -127
  120. package/dist/components/pincel-toolbar.js.map +0 -1
@@ -0,0 +1,70 @@
1
+ /**
2
+ * Resizing and turning a redaction region after it is drawn.
3
+ *
4
+ * A region is a rectangle or a path in normalised image space. Both are
5
+ * handled through one frame: centre, size and rotation about the centre, in
6
+ * preview pixels, because a turn is only a turn in a space with square
7
+ * pixels. A rectangle is a frame with no rotation; a path of four points that
8
+ * form a rectangle is a frame with one; any other path is its bounding box.
9
+ *
10
+ * What goes back into the log needs no new operation: a resized rectangle
11
+ * stays a `rect`, a turned one becomes a `path` with its four corners, and a
12
+ * freeform path keeps its points, mapped through the frame. A turn that lands
13
+ * on a quarter is a rectangle again.
14
+ */
15
+ import type { Rect } from '@sealpixel/core';
16
+ export type Region = {
17
+ kind: 'rect';
18
+ rect: Rect;
19
+ } | {
20
+ kind: 'path';
21
+ points: [number, number][];
22
+ };
23
+ export type ResizeHandle = 'nw' | 'n' | 'ne' | 'e' | 'se' | 's' | 'sw' | 'w';
24
+ /** A region's frame in preview pixels. `rotation` is radians, clockwise on screen. */
25
+ export interface Frame {
26
+ cx: number;
27
+ cy: number;
28
+ width: number;
29
+ height: number;
30
+ rotation: number;
31
+ }
32
+ type Px = [number, number];
33
+ /** The frame of a region on a preview of `W` by `H` pixels. */
34
+ export declare function describe(region: Region, W: number, H: number): Frame;
35
+ /**
36
+ * The frame of four points that form a rectangle — equal opposite sides and a
37
+ * right angle, within a thousandth — or null. The first edge sets the rotation.
38
+ */
39
+ export declare function rectangleFrame(pts: readonly Px[]): Frame | null;
40
+ /** The frame's corners in preview pixels: north-west, north-east, south-east, south-west. */
41
+ export declare function corners(f: Frame): Px[];
42
+ /**
43
+ * A handle dragged by `dx`, `dy` preview pixels. The delta is taken in the
44
+ * frame's own axes, so a corner of a turned box follows the pointer along its
45
+ * turned edges; the opposite edge stays; neither side shrinks below `min`.
46
+ */
47
+ export declare function resize(f: Frame, handle: ResizeHandle, dx: number, dy: number, min?: number): Frame;
48
+ /** A rotation within `tolerance` of a quarter turn snaps to it, so a box can become a plain rectangle again. */
49
+ export declare function snapAngle(rotation: number, tolerance?: number): number;
50
+ /** True when the rotation is a multiple of a quarter turn: the box is axis-aligned. */
51
+ export declare function isAxisAligned(rotation: number): boolean;
52
+ /** Points in preview pixels, mapped from one frame into another: scaled along the old axes, turned to the new ones. */
53
+ export declare function mapPoints(pts: readonly Px[], from: Frame, to: Frame): Px[];
54
+ /**
55
+ * Points moved by `dx`, `dy` in unit space, the move shortened so that no
56
+ * point leaves the unit square. Every point moves by the same amount: the
57
+ * shape is kept and stops at the edge. A point already outside pins its axis.
58
+ */
59
+ export declare function slide(pts: readonly Px[], dx: number, dy: number): Px[];
60
+ /**
61
+ * The region a frame stands for, in normalised image space, given the region
62
+ * it was made from and that region's frame. A rectangle or a rectangular path
63
+ * becomes the frame's four corners — a `rect` when the frame is axis-aligned,
64
+ * a `path` otherwise. A freeform path keeps its points, mapped from the old
65
+ * frame into the new one. Null when a point would leave the image: the caller
66
+ * keeps the last region that fit.
67
+ */
68
+ export declare function transformRegion(origin: Region, from: Frame, to: Frame, W: number, H: number): Region | null;
69
+ export {};
70
+ //# sourceMappingURL=region-transform.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"region-transform.d.ts","sourceRoot":"","sources":["../../src/tools/region-transform.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AACH,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AAE5C,MAAM,MAAM,MAAM,GAAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,IAAI,CAAA;CAAE,GAAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE,CAAA;CAAE,CAAC;AACjG,MAAM,MAAM,YAAY,GAAG,IAAI,GAAG,GAAG,GAAG,IAAI,GAAG,GAAG,GAAG,IAAI,GAAG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E;AAED;;;;;;;GAOG;AACH,wBAAgB,eAAe,CAC7B,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,KAAK,EACX,EAAE,EAAE,KAAK,EACT,CAAC,EAAE,MAAM,EACT,CAAC,EAAE,MAAM,GACR,MAAM,GAAG,IAAI,CAoCf"}
@@ -0,0 +1,192 @@
1
+ const RIGHT_ANGLE = Math.PI / 2;
2
+ /** The frame of a region on a preview of `W` by `H` pixels. */
3
+ export function describe(region, W, H) {
4
+ if (region.kind === 'rect') {
5
+ const r = region.rect;
6
+ return {
7
+ cx: (r.x + r.width / 2) * W,
8
+ cy: (r.y + r.height / 2) * H,
9
+ width: r.width * W,
10
+ height: r.height * H,
11
+ rotation: 0,
12
+ };
13
+ }
14
+ const pts = region.points.map((p) => [p[0] * W, p[1] * H]);
15
+ const rect = rectangleFrame(pts);
16
+ if (rect)
17
+ return rect;
18
+ let x0 = Number.POSITIVE_INFINITY;
19
+ let y0 = Number.POSITIVE_INFINITY;
20
+ let x1 = Number.NEGATIVE_INFINITY;
21
+ let y1 = Number.NEGATIVE_INFINITY;
22
+ for (const [x, y] of pts) {
23
+ x0 = Math.min(x0, x);
24
+ y0 = Math.min(y0, y);
25
+ x1 = Math.max(x1, x);
26
+ y1 = Math.max(y1, y);
27
+ }
28
+ return { cx: (x0 + x1) / 2, cy: (y0 + y1) / 2, width: x1 - x0, height: y1 - y0, rotation: 0 };
29
+ }
30
+ /**
31
+ * The frame of four points that form a rectangle — equal opposite sides and a
32
+ * right angle, within a thousandth — or null. The first edge sets the rotation.
33
+ */
34
+ export function rectangleFrame(pts) {
35
+ if (pts.length !== 4)
36
+ return null;
37
+ const edge = (i) => {
38
+ const a = pts[i];
39
+ const b = pts[(i + 1) % 4];
40
+ return [b[0] - a[0], b[1] - a[1]];
41
+ };
42
+ const e = [edge(0), edge(1), edge(2), edge(3)];
43
+ const len = e.map((v) => Math.hypot(v[0], v[1]));
44
+ const size = Math.max(len[0], len[1], 1);
45
+ const tol = 1e-3 * size;
46
+ if (Math.abs(len[0] - len[2]) > tol)
47
+ return null;
48
+ if (Math.abs(len[1] - len[3]) > tol)
49
+ return null;
50
+ const dot = e[0][0] * e[1][0] + e[0][1] * e[1][1];
51
+ if (Math.abs(dot) > tol * size)
52
+ return null;
53
+ if (len[0] < 1e-9 || len[1] < 1e-9)
54
+ return null;
55
+ return {
56
+ cx: pts.reduce((s, p) => s + p[0], 0) / 4,
57
+ cy: pts.reduce((s, p) => s + p[1], 0) / 4,
58
+ width: len[0],
59
+ height: len[1],
60
+ rotation: Math.atan2(e[0][1], e[0][0]),
61
+ };
62
+ }
63
+ /** The frame's corners in preview pixels: north-west, north-east, south-east, south-west. */
64
+ export function corners(f) {
65
+ const cos = Math.cos(f.rotation);
66
+ const sin = Math.sin(f.rotation);
67
+ const hw = f.width / 2;
68
+ const hh = f.height / 2;
69
+ return [
70
+ [-hw, -hh],
71
+ [hw, -hh],
72
+ [hw, hh],
73
+ [-hw, hh],
74
+ ].map(([x, y]) => [f.cx + x * cos - y * sin, f.cy + x * sin + y * cos]);
75
+ }
76
+ /**
77
+ * A handle dragged by `dx`, `dy` preview pixels. The delta is taken in the
78
+ * frame's own axes, so a corner of a turned box follows the pointer along its
79
+ * turned edges; the opposite edge stays; neither side shrinks below `min`.
80
+ */
81
+ export function resize(f, handle, dx, dy, min = 6) {
82
+ const cos = Math.cos(f.rotation);
83
+ const sin = Math.sin(f.rotation);
84
+ const lx = dx * cos + dy * sin;
85
+ const ly = -dx * sin + dy * cos;
86
+ let left = -f.width / 2;
87
+ let right = f.width / 2;
88
+ let top = -f.height / 2;
89
+ let bottom = f.height / 2;
90
+ if (handle.includes('w'))
91
+ left = Math.min(left + lx, right - min);
92
+ if (handle.includes('e'))
93
+ right = Math.max(right + lx, left + min);
94
+ if (handle.includes('n'))
95
+ top = Math.min(top + ly, bottom - min);
96
+ if (handle.includes('s'))
97
+ bottom = Math.max(bottom + ly, top + min);
98
+ const mx = (left + right) / 2;
99
+ const my = (top + bottom) / 2;
100
+ return {
101
+ cx: f.cx + mx * cos - my * sin,
102
+ cy: f.cy + mx * sin + my * cos,
103
+ width: right - left,
104
+ height: bottom - top,
105
+ rotation: f.rotation,
106
+ };
107
+ }
108
+ /** A rotation within `tolerance` of a quarter turn snaps to it, so a box can become a plain rectangle again. */
109
+ export function snapAngle(rotation, tolerance = (2 * Math.PI) / 180) {
110
+ const quarter = Math.round(rotation / RIGHT_ANGLE) * RIGHT_ANGLE;
111
+ return Math.abs(rotation - quarter) <= tolerance ? quarter : rotation;
112
+ }
113
+ /** True when the rotation is a multiple of a quarter turn: the box is axis-aligned. */
114
+ export function isAxisAligned(rotation) {
115
+ const r = rotation / RIGHT_ANGLE;
116
+ return Math.abs(r - Math.round(r)) < 1e-9;
117
+ }
118
+ /** Points in preview pixels, mapped from one frame into another: scaled along the old axes, turned to the new ones. */
119
+ export function mapPoints(pts, from, to) {
120
+ const cos0 = Math.cos(from.rotation);
121
+ const sin0 = Math.sin(from.rotation);
122
+ const cos1 = Math.cos(to.rotation);
123
+ const sin1 = Math.sin(to.rotation);
124
+ const sx = from.width > 0 ? to.width / from.width : 1;
125
+ const sy = from.height > 0 ? to.height / from.height : 1;
126
+ return pts.map((p) => {
127
+ const x = p[0] - from.cx;
128
+ const y = p[1] - from.cy;
129
+ const lx = (x * cos0 + y * sin0) * sx;
130
+ const ly = (-x * sin0 + y * cos0) * sy;
131
+ return [to.cx + lx * cos1 - ly * sin1, to.cy + lx * sin1 + ly * cos1];
132
+ });
133
+ }
134
+ /**
135
+ * Points moved by `dx`, `dy` in unit space, the move shortened so that no
136
+ * point leaves the unit square. Every point moves by the same amount: the
137
+ * shape is kept and stops at the edge. A point already outside pins its axis.
138
+ */
139
+ export function slide(pts, dx, dy) {
140
+ const xs = pts.map((p) => p[0]);
141
+ const ys = pts.map((p) => p[1]);
142
+ const within = (d, lo, hi) => lo > hi ? 0 : Math.min(hi, Math.max(lo, d));
143
+ const mx = within(dx, -Math.min(...xs), 1 - Math.max(...xs));
144
+ const my = within(dy, -Math.min(...ys), 1 - Math.max(...ys));
145
+ return pts.map((p) => [p[0] + mx, p[1] + my]);
146
+ }
147
+ /**
148
+ * The region a frame stands for, in normalised image space, given the region
149
+ * it was made from and that region's frame. A rectangle or a rectangular path
150
+ * becomes the frame's four corners — a `rect` when the frame is axis-aligned,
151
+ * a `path` otherwise. A freeform path keeps its points, mapped from the old
152
+ * frame into the new one. Null when a point would leave the image: the caller
153
+ * keeps the last region that fit.
154
+ */
155
+ export function transformRegion(origin, from, to, W, H) {
156
+ const rectangular = origin.kind === 'rect' ||
157
+ rectangleFrame(origin.points.map((p) => [p[0] * W, p[1] * H])) !== null;
158
+ let pts;
159
+ if (rectangular) {
160
+ pts = corners(to);
161
+ }
162
+ else {
163
+ pts = mapPoints(origin.points.map((p) => [
164
+ p[0] * W,
165
+ p[1] * H,
166
+ ]), from, to);
167
+ }
168
+ const eps = 1e-9;
169
+ const norm = [];
170
+ for (const [x, y] of pts) {
171
+ const u = x / W;
172
+ const v = y / H;
173
+ if (u < -eps || u > 1 + eps || v < -eps || v > 1 + eps)
174
+ return null;
175
+ norm.push([clamp01(u), clamp01(v)]);
176
+ }
177
+ if (rectangular && isAxisAligned(to.rotation)) {
178
+ const xs = norm.map((p) => p[0]);
179
+ const ys = norm.map((p) => p[1]);
180
+ const x = Math.min(...xs);
181
+ const y = Math.min(...ys);
182
+ return {
183
+ kind: 'rect',
184
+ rect: { x, y, width: Math.max(...xs) - x, height: Math.max(...ys) - y },
185
+ };
186
+ }
187
+ return { kind: 'path', points: norm };
188
+ }
189
+ function clamp01(v) {
190
+ return v < 0 ? 0 : v > 1 ? 1 : v;
191
+ }
192
+ //# sourceMappingURL=region-transform.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"region-transform.js","sourceRoot":"","sources":["../../src/tools/region-transform.ts"],"names":[],"mappings":"AA8BA,MAAM,WAAW,GAAG,IAAI,CAAC,EAAE,GAAG,CAAC,CAAC;AAEhC,+DAA+D;AAC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G,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,EAAE,MAAM,EAAE,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,EAAE;SACxE,CAAC;IACJ,CAAC;IACD,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;AACxC,CAAC;AAED,SAAS,OAAO,CAAC,CAAS;IACxB,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AACnC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sealpixel/ui",
3
- "version": "1.0.0-rc.0",
3
+ "version": "1.0.0-rc.10",
4
4
  "description": "Default, themeable Sealpixel editor UI as Web Components (Lit). Optional: the core is headless.",
5
5
  "license": "BUSL-1.1",
6
6
  "repository": {
@@ -36,16 +36,16 @@
36
36
  "./themes/*": "./themes/*"
37
37
  },
38
38
  "dependencies": {
39
- "lit": "^3.3.0",
40
- "@sealpixel/core": "1.0.0-rc.0",
41
- "@sealpixel/plugins": "1.0.0-rc.0"
39
+ "@sealpixel/core": "1.0.0-rc.10",
40
+ "@sealpixel/plugins": "1.0.0-rc.10",
41
+ "lit": "^3.3.0"
42
42
  },
43
43
  "devDependencies": {
44
+ "@sealpixel/config": "0.0.0",
45
+ "@sealpixel/wasm": "1.0.0-rc.10",
44
46
  "@types/node": "^24.0.0",
45
- "typescript": "^5.9.0",
46
- "vitest": "^4.0.0",
47
- "@sealpixel/wasm": "1.0.0-rc.0",
48
- "@sealpixel/config": "0.0.0"
47
+ "typescript": "^6.0.0",
48
+ "vitest": "^5.0.0"
49
49
  },
50
50
  "scripts": {
51
51
  "build": "tsc -p tsconfig.build.json",
@@ -1,28 +0,0 @@
1
- import { LitElement } from 'lit';
2
- export declare class LumbraButton extends LitElement {
3
- static styles: import("lit").CSSResult[];
4
- static properties: {
5
- disabled: {
6
- type: BooleanConstructor;
7
- reflect: boolean;
8
- };
9
- pressed: {
10
- type: BooleanConstructor;
11
- reflect: boolean;
12
- };
13
- variant: {
14
- type: StringConstructor;
15
- reflect: boolean;
16
- };
17
- label: {
18
- type: StringConstructor;
19
- };
20
- };
21
- disabled: boolean;
22
- pressed: boolean;
23
- variant: 'default' | 'primary' | 'ghost';
24
- label: string;
25
- constructor();
26
- render(): import("lit").TemplateResult<1>;
27
- }
28
- //# sourceMappingURL=lumbra-button.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"lumbra-button.d.ts","sourceRoot":"","sources":["../../src/components/lumbra-button.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,UAAU,EAAE,MAAM,KAAK,CAAC;AAG5C,qBAAa,YAAa,SAAQ,UAAU;IAC1C,OAAgB,MAAM,4BAwDpB;IAEF,OAAgB,UAAU;;;;;;;;;;;;;;;;MAKxB;IAEM,QAAQ,EAAE,OAAO,CAAC;IAClB,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,EAAE,SAAS,GAAG,SAAS,GAAG,OAAO,CAAC;IACzC,KAAK,EAAE,MAAM,CAAC;;IAUb,MAAM;CAYhB"}
@@ -1,87 +0,0 @@
1
- import { css, html, LitElement } from 'lit';
2
- import { base } from '../theme.js';
3
- export class LumbraButton extends LitElement {
4
- static { this.styles = [
5
- base,
6
- css `
7
- :host {
8
- display: inline-block;
9
- }
10
- button {
11
- min-width: var(--lumbra-touch-target);
12
- min-height: var(--lumbra-touch-target);
13
- padding: 0 calc(var(--lumbra-space) * 1.5);
14
- border: 1px solid var(--lumbra-color-border);
15
- border-radius: var(--lumbra-radius-sm);
16
- background: var(--lumbra-color-surface-2);
17
- color: var(--lumbra-color-fg);
18
- font: inherit;
19
- font-weight: 500;
20
- cursor: pointer;
21
- display: inline-flex;
22
- align-items: center;
23
- justify-content: center;
24
- gap: var(--lumbra-space);
25
- width: 100%;
26
- transition:
27
- background var(--lumbra-transition),
28
- border-color var(--lumbra-transition),
29
- transform var(--lumbra-transition);
30
- }
31
- button:hover:not(:disabled) {
32
- background: var(--lumbra-color-surface-3, var(--lumbra-color-surface-2));
33
- border-color: var(--lumbra-color-fg-muted);
34
- }
35
- button:active:not(:disabled) {
36
- transform: translateY(1px);
37
- }
38
- button:disabled {
39
- opacity: 0.45;
40
- cursor: default;
41
- }
42
- :host([variant='primary']) button {
43
- background: var(--lumbra-color-accent);
44
- border-color: var(--lumbra-color-accent);
45
- color: var(--lumbra-color-accent-fg);
46
- }
47
- :host([variant='ghost']) button {
48
- background: transparent;
49
- border-color: transparent;
50
- }
51
- :host([pressed]) button {
52
- background: var(--lumbra-color-accent-soft, transparent);
53
- border-color: var(--lumbra-color-accent);
54
- color: var(--lumbra-color-fg);
55
- }
56
- :host([variant='primary']) button:hover:not(:disabled) {
57
- filter: brightness(1.08);
58
- }
59
- `,
60
- ]; }
61
- static { this.properties = {
62
- disabled: { type: Boolean, reflect: true },
63
- pressed: { type: Boolean, reflect: true },
64
- variant: { type: String, reflect: true },
65
- label: { type: String },
66
- }; }
67
- constructor() {
68
- super();
69
- this.disabled = false;
70
- this.pressed = false;
71
- this.variant = 'default';
72
- this.label = '';
73
- }
74
- render() {
75
- return html `<button
76
- part="button"
77
- type="button"
78
- ?disabled=${this.disabled}
79
- aria-pressed=${this.pressed ? 'true' : 'false'}
80
- aria-label=${this.label || undefined}
81
- title=${this.label || undefined}
82
- >
83
- <slot></slot>
84
- </button>`;
85
- }
86
- }
87
- //# sourceMappingURL=lumbra-button.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"lumbra-button.js","sourceRoot":"","sources":["../../src/components/lumbra-button.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,KAAK,CAAC;AAC5C,OAAO,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AAEnC,MAAM,OAAO,YAAa,SAAQ,UAAU;aAC1B,WAAM,GAAG;QACvB,IAAI;QACJ,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAqDF;KACF,CAAC;aAEc,eAAU,GAAG;QAC3B,QAAQ,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE;QAC1C,OAAO,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE;QACzC,OAAO,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE;QACxC,KAAK,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE;KACxB,CAAC;IAOF;QACE,KAAK,EAAE,CAAC;QACR,IAAI,CAAC,QAAQ,GAAG,KAAK,CAAC;QACtB,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC;QACrB,IAAI,CAAC,OAAO,GAAG,SAAS,CAAC;QACzB,IAAI,CAAC,KAAK,GAAG,EAAE,CAAC;IAClB,CAAC;IAEQ,MAAM;QACb,OAAO,IAAI,CAAA;;;kBAGG,IAAI,CAAC,QAAQ;qBACV,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO;mBACjC,IAAI,CAAC,KAAK,IAAI,SAAS;cAC5B,IAAI,CAAC,KAAK,IAAI,SAAS;;;cAGvB,CAAC;IACb,CAAC"}
@@ -1,226 +0,0 @@
1
- import { type AnyPlugin, type AssetResolver, type EditorSession, type ExportResult, type OutputOptions, type PluginOptionsMap, type Renderer, type SessionOptions } from '@lumbra/core';
2
- import { LitElement, type TemplateResult } from 'lit';
3
- import { type Dictionary } from '../i18n.js';
4
- import type { UiTool } from '../tool.js';
5
- export type EditorSource = File | Blob | Uint8Array | string;
6
- /**
7
- * The default editor. Headless `EditorSession` underneath; this element adds
8
- * the responsive shell, tools and events.
9
- *
10
- * Events: `lumbra:ready`, `lumbra:load`, `lumbra:change` ({ log, index }),
11
- * `lumbra:process` (ExportResult), `lumbra:error` (LumbraError).
12
- */
13
- export declare class LumbraEditor extends LitElement {
14
- static styles: import("lit").CSSResult[];
15
- static properties: {
16
- plugins: {
17
- attribute: boolean;
18
- };
19
- pluginOptions: {
20
- attribute: string;
21
- converter: {
22
- fromAttribute: (value: string | null) => Readonly<Record<string, unknown>> | null;
23
- toAttribute: (value: PluginOptionsMap | null) => string | null;
24
- };
25
- };
26
- session: {
27
- attribute: boolean;
28
- };
29
- renderer: {
30
- attribute: boolean;
31
- };
32
- assets: {
33
- attribute: boolean;
34
- };
35
- server: {
36
- attribute: boolean;
37
- };
38
- serverEndpoint: {
39
- type: StringConstructor;
40
- attribute: string;
41
- };
42
- src: {
43
- attribute: boolean;
44
- };
45
- editLog: {
46
- attribute: boolean;
47
- };
48
- defaultEditLog: {
49
- attribute: boolean;
50
- };
51
- output: {
52
- attribute: boolean;
53
- };
54
- theme: {
55
- type: StringConstructor;
56
- reflect: boolean;
57
- };
58
- locale: {
59
- type: StringConstructor;
60
- };
61
- dictionary: {
62
- attribute: boolean;
63
- };
64
- tools: {
65
- attribute: boolean;
66
- };
67
- activeTool: {
68
- type: StringConstructor;
69
- attribute: string;
70
- };
71
- showExport: {
72
- type: StringConstructor;
73
- attribute: string;
74
- };
75
- showDownload: {
76
- type: StringConstructor;
77
- attribute: string;
78
- };
79
- showHistory: {
80
- type: StringConstructor;
81
- attribute: string;
82
- };
83
- downloadLabel: {
84
- type: StringConstructor;
85
- attribute: string;
86
- };
87
- _busy: {
88
- state: boolean;
89
- };
90
- _processListeners: {
91
- state: boolean;
92
- };
93
- _toast: {
94
- state: boolean;
95
- };
96
- _dragover: {
97
- state: boolean;
98
- };
99
- _wide: {
100
- state: boolean;
101
- };
102
- _pluginTools: {
103
- state: boolean;
104
- };
105
- };
106
- plugins: readonly AnyPlugin[] | null;
107
- /** `{ pluginId: partialOptions }` applied to `plugins` (or the defaults) through each plugin's `configure()`. */
108
- pluginOptions: PluginOptionsMap | null;
109
- session: EditorSession | null;
110
- renderer: Renderer | null;
111
- /** Fonts and images. Defaults to a fetch resolver over the plugins' declarations. */
112
- assets: AssetResolver | null;
113
- /** Server rendering configuration; `server-endpoint` is the attribute shorthand. */
114
- server: SessionOptions['server'] | null;
115
- serverEndpoint: string | null;
116
- src: EditorSource | null;
117
- /** Controlled mode: the host owns the log. */
118
- editLog: unknown;
119
- /** Uncontrolled: applied once on load. */
120
- defaultEditLog: unknown;
121
- output: OutputOptions;
122
- theme: 'dark' | 'light' | 'auto';
123
- locale: string;
124
- /** Overrides the shipped dictionary for `locale`; shipped locales resolve automatically. */
125
- dictionary: Dictionary | null;
126
- tools: Record<string, UiTool> | null;
127
- activeTool: string | null;
128
- /**
129
- * When the Export button is shown. `auto` (default) shows it only while a
130
- * `lumbra:process` listener is attached, because Export hands the result to
131
- * the host and does nothing visible otherwise. Download is always shown.
132
- */
133
- showExport: 'auto' | 'always' | 'never';
134
- /** `always` (default) or `never`. Hosts that only consume `lumbra:process` hide the button. */
135
- showDownload: 'always' | 'never';
136
- /** `all` (default), `buttons` (undo and redo, no timeline) or `none` (also disables the undo/redo shortcuts). */
137
- showHistory: 'all' | 'buttons' | 'none';
138
- /** Custom text for the Download button; the localized label when null. */
139
- downloadLabel: string | null;
140
- _busy: boolean;
141
- _processListeners: number;
142
- _toast: {
143
- text: string;
144
- hash: string;
145
- } | null;
146
- _dragover: boolean;
147
- _wide: boolean;
148
- /** Tools loaded from `plugin.tool()`, keyed by plugin id. */
149
- _pluginTools: Record<string, UiTool>;
150
- private resizeObserver;
151
- private toolLoads;
152
- /**
153
- * Used when no `renderer` property is set. `@lumbra/element` installs a
154
- * factory that starts the bundled worker; without it the editor renders inline.
155
- */
156
- static defaultRendererFactory: ((plugins: readonly AnyPlugin[]) => Renderer) | null;
157
- private readonly ctl;
158
- private i18n;
159
- private ownsSession;
160
- private lastEmittedVersion;
161
- private lastAppliedControlled;
162
- private hint;
163
- private previousTool;
164
- private loadedSrc;
165
- constructor();
166
- addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => unknown, options?: boolean | AddEventListenerOptions): void;
167
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
168
- removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => unknown, options?: boolean | EventListenerOptions): void;
169
- removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
170
- /** A renderer the editor made through the factory dies with the session; a host's renderer lives on. */
171
- private disposeOwnedRenderer;
172
- /** `plugins` (or the defaults) with `pluginOptions` applied. Invalid options raise `lumbra:error`. */
173
- private effectivePlugins;
174
- /** The live session, created on first connection when none was passed. */
175
- getSession(): EditorSession;
176
- getEditLog(): {
177
- log: import("@lumbra/core").EditLog;
178
- index: number;
179
- };
180
- setEditLog(saved: unknown, index?: number): void;
181
- undo(): void;
182
- redo(): void;
183
- timeTravel(index: number): void;
184
- export(output?: OutputOptions, options?: {
185
- embedEditLog?: boolean;
186
- }): Promise<ExportResult>;
187
- download(options?: {
188
- output?: OutputOptions;
189
- filename?: string;
190
- embedEditLog?: boolean;
191
- }): Promise<{
192
- filename: string;
193
- result: ExportResult | import("@lumbra/core").ServerRenderResult;
194
- }>;
195
- private ensureSession;
196
- connectedCallback(): void;
197
- disconnectedCallback(): void;
198
- willUpdate(changed: Map<string, unknown>): void;
199
- updated(): void;
200
- private lastError;
201
- private loadSource;
202
- private applyControlled;
203
- /** Whether the owned session was built from the current `plugins` and `renderer`. */
204
- private sessionMatchesProps;
205
- private sessionRenderer;
206
- private sessionAssets;
207
- private sessionServer;
208
- private currentTools;
209
- /** Plugins may ship their own tool; load each once and re-render when it arrives. */
210
- private loadPluginTools;
211
- private get stage();
212
- private toolContext;
213
- private syncActiveTool;
214
- private onPointerDown;
215
- private onKeydown;
216
- private onExport;
217
- private onDownload;
218
- private announce;
219
- private toastTimer;
220
- /** Brief confirmation over the stage: format, size and hash of the result. */
221
- private toast;
222
- private onFiles;
223
- render(): TemplateResult<1>;
224
- private renderEmpty;
225
- }
226
- //# sourceMappingURL=lumbra-editor.d.ts.map