@nova-lab/core 1.2.1-dev.258 → 1.2.2-dev.272

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 (30) hide show
  1. package/README.md +55 -0
  2. package/dist/2d/effects.js +165 -404
  3. package/dist/2d/lighting.d.ts +2 -0
  4. package/dist/2d/lighting.js +483 -227
  5. package/dist/2d/lottie.js +1 -1
  6. package/dist/2d/meshes.js +2 -2
  7. package/dist/2d/render-textures.js +3 -537
  8. package/dist/2d.js +3 -3
  9. package/dist/{NovaNode-CBZ-Ol-W.js → NovaNode-CshmSV9Y.js} +21 -21
  10. package/dist/{NovaRenderCommandWriter-CWQRa42y.js → NovaRenderCommandWriter-DeHyKjke.js} +272 -251
  11. package/dist/NovaRenderTexture-Desjl5-m.js +539 -0
  12. package/dist/{NovaTextSelectionService-Bdi0AqZ5.js → NovaTextSelectionService-CWJKn7TW.js} +3658 -3216
  13. package/dist/{NovaWebGLProgram-BO250QNF.js → NovaWebGLProgram-ytnblA5d.js} +28 -25
  14. package/dist/core.js +3 -3
  15. package/dist/model/lighting/LightingFields2D.d.ts +35 -0
  16. package/dist/model/lighting/LightingRenderer2D.d.ts +11 -18
  17. package/dist/model/lighting/LightingScene2D.d.ts +43 -0
  18. package/dist/model/lighting/NovaLighting2D.d.ts +18 -33
  19. package/dist/model/lighting/NovaLightingEffect2D.d.ts +46 -0
  20. package/dist/model/lighting/lighting-effect.d.ts +24 -0
  21. package/dist/model/lighting/lighting-shaders.d.ts +2 -2
  22. package/dist/model/lighting/lighting.types.d.ts +5 -1
  23. package/dist/model/render/backends/webgl/NovaWebGLCompositionPass.d.ts +2 -1
  24. package/dist/model/render/backends/webgl/NovaWebGLFrameRenderer.d.ts +29 -3
  25. package/dist/model/render/backends/webgl/NovaWebGLPathClipPass.d.ts +3 -2
  26. package/dist/model/render/backends/webgl/NovaWebGLProgram.d.ts +1 -1
  27. package/dist/model/render/graph/nova-render-dirty-items.d.ts +12 -0
  28. package/dist/model/runtime/cursor/NovaCursorManager.d.ts +7 -0
  29. package/dist/shader-effect-CHXZBHrO.js +247 -0
  30. package/package.json +2 -2
@@ -1,67 +1,66 @@
1
- import { N as F } from "../NovaWebGLProgram-BO250QNF.js";
2
- import { r as O, p as K } from "../nova-color-parser-BCN_rFRN.js";
3
- import { i as z } from "../nova-render-texture-image-identity-DQ09XFKs.js";
4
- import { o as $ } from "../NovaAssetRegistry-p2QlCwvT.js";
5
- const M = /* @__PURE__ */ new Map();
6
- function U(e, r) {
7
- const o = e * r;
8
- if (!Number.isFinite(o) || o < 0 || !Number.isFinite(r) || r <= 0)
1
+ import { N as A } from "../NovaWebGLProgram-ytnblA5d.js";
2
+ import { r as D, p as C } from "../nova-color-parser-BCN_rFRN.js";
3
+ import { d as Y } from "../shader-effect-CHXZBHrO.js";
4
+ const g = /* @__PURE__ */ new Map();
5
+ function b(e, t) {
6
+ const r = e * t;
7
+ if (!Number.isFinite(r) || r < 0 || !Number.isFinite(t) || t <= 0)
9
8
  throw new RangeError("[Nova] Blur sigma and DPR must remain finite and nonnegative");
10
- const a = Math.ceil(3 * o);
11
- if (a > 8191)
9
+ const o = Math.ceil(3 * r);
10
+ if (o > 8191)
12
11
  throw new RangeError("[Nova] Blur kernel exceeds the supported physical extent");
13
- const i = M.get(o);
14
- if (i)
15
- return M.delete(o), M.set(o, i), i;
16
- const n = Array.from({ length: a * 2 + 1 }, (c, w) => w === a ? 1 : Math.exp(-0.5 * ((w - a) / o) ** 2)), s = n.reduce((c, w) => c + w, 0), u = { radius: a, weights: new Float32Array(n.map((c) => c / s)) };
17
- return M.set(o, u), M.size > 8 && M.delete(M.keys().next().value), u;
12
+ const s = g.get(r);
13
+ if (s)
14
+ return g.delete(r), g.set(r, s), s;
15
+ const a = Array.from({ length: o * 2 + 1 }, (u, c) => c === o ? 1 : Math.exp(-0.5 * ((c - o) / r) ** 2)), i = a.reduce((u, c) => u + c, 0), n = { radius: o, weights: new Float32Array(a.map((u) => u / i)) };
16
+ return g.set(r, n), g.size > 8 && g.delete(g.keys().next().value), n;
18
17
  }
19
- function G(e) {
20
- const r = /* @__PURE__ */ new Map();
18
+ function F(e) {
19
+ const t = /* @__PURE__ */ new Map();
21
20
  return {
22
- resolve(o, a) {
23
- const i = o * a, n = r.get(i);
24
- if (n)
25
- return r.delete(i), r.set(i, n), { radius: n.radius, texture: n.texture, uploadBytes: 0, uploadMs: 0 };
26
- const { radius: s, weights: u } = U(o, a);
27
- if (u.length > Number(e.getParameter(e.MAX_TEXTURE_SIZE)))
21
+ resolve(r, o) {
22
+ const s = r * o, a = t.get(s);
23
+ if (a)
24
+ return t.delete(s), t.set(s, a), { radius: a.radius, texture: a.texture, uploadBytes: 0, uploadMs: 0 };
25
+ const { radius: i, weights: n } = b(r, o);
26
+ if (n.length > Number(e.getParameter(e.MAX_TEXTURE_SIZE)))
28
27
  throw new RangeError("[Nova] Blur kernel exceeds this GPU texture size");
29
- const c = e.createTexture();
30
- if (!c)
28
+ const u = e.createTexture();
29
+ if (!u)
31
30
  throw new Error("[Nova] Failed to create Gaussian kernel texture");
32
- const w = performance.now();
31
+ const c = performance.now();
33
32
  try {
34
- e.activeTexture(e.TEXTURE0 + 1), e.bindTexture(e.TEXTURE_2D, c), e.texParameteri(e.TEXTURE_2D, e.TEXTURE_MIN_FILTER, e.NEAREST), e.texParameteri(e.TEXTURE_2D, e.TEXTURE_MAG_FILTER, e.NEAREST), e.texParameteri(e.TEXTURE_2D, e.TEXTURE_WRAP_S, e.CLAMP_TO_EDGE), e.texParameteri(e.TEXTURE_2D, e.TEXTURE_WRAP_T, e.CLAMP_TO_EDGE), e.texImage2D(e.TEXTURE_2D, 0, e.R32F, u.length, 1, 0, e.RED, e.FLOAT, u);
35
- } catch (h) {
36
- throw e.deleteTexture(c), h;
33
+ e.activeTexture(e.TEXTURE0 + 1), e.bindTexture(e.TEXTURE_2D, u), e.texParameteri(e.TEXTURE_2D, e.TEXTURE_MIN_FILTER, e.NEAREST), e.texParameteri(e.TEXTURE_2D, e.TEXTURE_MAG_FILTER, e.NEAREST), e.texParameteri(e.TEXTURE_2D, e.TEXTURE_WRAP_S, e.CLAMP_TO_EDGE), e.texParameteri(e.TEXTURE_2D, e.TEXTURE_WRAP_T, e.CLAMP_TO_EDGE), e.texImage2D(e.TEXTURE_2D, 0, e.R32F, n.length, 1, 0, e.RED, e.FLOAT, n);
34
+ } catch (d) {
35
+ throw e.deleteTexture(u), d;
37
36
  } finally {
38
37
  e.activeTexture(e.TEXTURE0);
39
38
  }
40
- if (r.set(i, { radius: s, texture: c, bytes: u.byteLength }), r.size > 4) {
41
- const h = r.keys().next().value;
42
- e.deleteTexture(r.get(h).texture), r.delete(h);
39
+ if (t.set(s, { radius: i, texture: u, bytes: n.byteLength }), t.size > 4) {
40
+ const d = t.keys().next().value;
41
+ e.deleteTexture(t.get(d).texture), t.delete(d);
43
42
  }
44
- return { radius: s, texture: c, uploadBytes: u.byteLength, uploadMs: performance.now() - w };
43
+ return { radius: i, texture: u, uploadBytes: n.byteLength, uploadMs: performance.now() - c };
45
44
  },
46
45
  getTextureBytes() {
47
- let o = 0;
48
- for (const a of r.values())
49
- o += a.bytes;
50
- return o;
46
+ let r = 0;
47
+ for (const o of t.values())
48
+ r += o.bytes;
49
+ return r;
51
50
  },
52
51
  destroy() {
53
- for (const o of r.values())
54
- e.deleteTexture(o.texture);
55
- r.clear();
52
+ for (const r of t.values())
53
+ e.deleteTexture(r.texture);
54
+ t.clear();
56
55
  }
57
56
  };
58
57
  }
59
- const H = `#version 300 es
58
+ const S = `#version 300 es
60
59
  precision highp float;
61
60
  void main() {
62
61
  const vec2 p[3] = vec2[3](vec2(-1.0, -1.0), vec2(3.0, -1.0), vec2(-1.0, 3.0));
63
62
  gl_Position = vec4(p[gl_VertexID], 0.0, 1.0);
64
- }`, J = `#version 300 es
63
+ }`, I = `#version 300 es
65
64
  precision highp float;
66
65
  uniform sampler2D u_source;
67
66
  uniform sampler2D u_weights;
@@ -79,53 +78,53 @@ void main() {
79
78
  }
80
79
  }
81
80
  outColor = sum;
82
- }`, Q = {
81
+ }`, P = {
83
82
  passes: (e) => e.sigma === 0 ? 0 : 2,
84
- outset: (e, r) => U(e.sigma, r).radius / r,
85
- stageOutset(e, r, o) {
86
- const a = U(e.sigma, r).radius / r;
87
- return { x: o === 0 ? a : 0, y: o === 1 ? a : 0 };
83
+ outset: (e, t) => b(e.sigma, t).radius / t,
84
+ stageOutset(e, t, r) {
85
+ const o = b(e.sigma, t).radius / t;
86
+ return { x: r === 0 ? o : 0, y: r === 1 ? o : 0 };
88
87
  },
89
- canvas(e, r, o, a) {
90
- const { radius: i, weights: n } = U(o.sigma, a.dpr), s = e.width, u = e.height, c = e.getContext("2d").getImageData(0, 0, s, u).data, w = r.createImageData(s, u);
91
- for (let h = 0; h < u; h += 1)
92
- for (let T = 0; T < s; T += 1) {
93
- let g = 0, t = 0, m = 0, f = 0;
94
- for (let v = -i; v <= i; v += 1) {
95
- const p = T + (a.pass === 0 ? v : 0), l = h + (a.pass === 1 ? v : 0);
96
- if (p < 0 || p >= s || l < 0 || l >= u)
88
+ canvas(e, t, r, o) {
89
+ const { radius: s, weights: a } = b(r.sigma, o.dpr), i = e.width, n = e.height, u = e.getContext("2d").getImageData(0, 0, i, n).data, c = t.createImageData(i, n);
90
+ for (let d = 0; d < n; d += 1)
91
+ for (let h = 0; h < i; h += 1) {
92
+ let x = 0, E = 0, M = 0, f = 0;
93
+ for (let p = -s; p <= s; p += 1) {
94
+ const w = h + (o.pass === 0 ? p : 0), l = d + (o.pass === 1 ? p : 0);
95
+ if (w < 0 || w >= i || l < 0 || l >= n)
97
96
  continue;
98
- const x = (l * s + p) * 4, b = n[v + i], y = c[x + 3] / 255;
99
- f += c[x + 3] * b, g += c[x] * y * b, t += c[x + 1] * y * b, m += c[x + 2] * y * b;
97
+ const v = (l * i + w) * 4, y = a[p + s], _ = u[v + 3] / 255;
98
+ f += u[v + 3] * y, x += u[v] * _ * y, E += u[v + 1] * _ * y, M += u[v + 2] * _ * y;
100
99
  }
101
- const d = (h * s + T) * 4;
102
- w.data[d + 3] = Math.round(f), f > 0 && (w.data[d] = Math.round(g * 255 / f), w.data[d + 1] = Math.round(t * 255 / f), w.data[d + 2] = Math.round(m * 255 / f));
100
+ const m = (d * i + h) * 4;
101
+ c.data[m + 3] = Math.round(f), f > 0 && (c.data[m] = Math.round(x * 255 / f), c.data[m + 1] = Math.round(E * 255 / f), c.data[m + 2] = Math.round(M * 255 / f));
103
102
  }
104
- r.putImageData(w, 0, 0);
103
+ t.putImageData(c, 0, 0);
105
104
  },
106
105
  webgl(e) {
107
- const r = F.create(e, H, J), o = e.createVertexArray();
108
- if (!o)
109
- throw r.destroy(), new Error("[Nova] Failed to create blur vertex array");
110
- const a = G(e);
106
+ const t = A.create(e, S, I), r = e.createVertexArray();
107
+ if (!r)
108
+ throw t.destroy(), new Error("[Nova] Failed to create blur vertex array");
109
+ const o = F(e);
111
110
  return {
112
- draw(i, n, s) {
113
- const { radius: u, texture: c, uploadBytes: w, uploadMs: h } = a.resolve(n.sigma, s.dpr);
114
- return r.use(), e.bindVertexArray(o), e.activeTexture(e.TEXTURE0 + 1), e.bindTexture(e.TEXTURE_2D, c), e.uniform1i(r.uniformLocation("u_weights"), 1), e.activeTexture(e.TEXTURE0), e.bindTexture(e.TEXTURE_2D, i), e.uniform1i(r.uniformLocation("u_source"), 0), e.uniform1i(r.uniformLocation("u_radius"), u), e.uniform2i(r.uniformLocation("u_direction"), s.pass === 0 ? 1 : 0, s.pass === 1 ? 1 : 0), e.drawArrays(e.TRIANGLES, 0, 3), { uploadBytes: w, uploadMs: h };
111
+ draw(s, a, i) {
112
+ const { radius: n, texture: u, uploadBytes: c, uploadMs: d } = o.resolve(a.sigma, i.dpr);
113
+ return t.use(), e.bindVertexArray(r), e.activeTexture(e.TEXTURE0 + 1), e.bindTexture(e.TEXTURE_2D, u), e.uniform1i(t.uniformLocation("u_weights"), 1), e.activeTexture(e.TEXTURE0), e.bindTexture(e.TEXTURE_2D, s), e.uniform1i(t.uniformLocation("u_source"), 0), e.uniform1i(t.uniformLocation("u_radius"), n), e.uniform2i(t.uniformLocation("u_direction"), i.pass === 0 ? 1 : 0, i.pass === 1 ? 1 : 0), e.drawArrays(e.TRIANGLES, 0, 3), { uploadBytes: c, uploadMs: d };
115
114
  },
116
- getTextureBytes: a.getTextureBytes,
115
+ getTextureBytes: o.getTextureBytes,
117
116
  destroy() {
118
- a.destroy(), e.deleteVertexArray(o), r.destroy();
117
+ o.destroy(), e.deleteVertexArray(r), t.destroy();
119
118
  }
120
119
  };
121
120
  }
122
121
  };
123
- function he(e) {
122
+ function K(e) {
124
123
  if (!Number.isFinite(e) || e < 0 || e > 64)
125
124
  throw new RangeError("[Nova] blur requires a standard deviation from 0 to 64 CSS pixels");
126
- return O({ kind: "blur", sigma: e }, Q);
125
+ return D({ kind: "blur", sigma: e }, P);
127
126
  }
128
- const Y = `#version 300 es
127
+ const B = `#version 300 es
129
128
  precision highp float;
130
129
  out vec2 v_uv;
131
130
  void main() {
@@ -133,7 +132,7 @@ void main() {
133
132
  vec2 corner = p[gl_VertexID];
134
133
  v_uv = (corner + 1.0) * 0.5;
135
134
  gl_Position = vec4(corner, 0.0, 1.0);
136
- }`, ee = `#version 300 es
135
+ }`, z = `#version 300 es
137
136
  precision highp float;
138
137
  in vec2 v_uv;
139
138
  uniform sampler2D u_source;
@@ -144,76 +143,78 @@ void main() {
144
143
  vec4 source = texture(u_source, v_uv);
145
144
  vec4 straight = vec4(source.a > 0.0 ? source.rgb / source.a : vec3(0.0), source.a);
146
145
  vec4 transformed = clamp(u_matrix * straight + u_offset, 0.0, 1.0);
147
- outColor = vec4(transformed.rgb * transformed.a, transformed.a);
148
- }`, q = /* @__PURE__ */ new WeakMap(), re = {
149
- canvas(e, r, o) {
150
- const a = o.matrix, i = e.getContext("2d").getImageData(0, 0, e.width, e.height), n = i.data;
151
- for (let s = 0; s < n.length; s += 4) {
152
- const u = n[s + 3] / 255, c = u > 0 ? n[s] / 255 : 0, w = u > 0 ? n[s + 1] / 255 : 0, h = u > 0 ? n[s + 2] / 255 : 0;
153
- for (let T = 0; T < 4; T += 1) {
154
- const g = T * 5;
155
- n[s + T] = Math.round(Math.max(0, Math.min(1, a[g] * c + a[g + 1] * w + a[g + 2] * h + a[g + 3] * u + a[g + 4])) * 255);
146
+ // Match the byte alpha written by the Canvas2D effect before premultiplying.
147
+ float alpha = floor(transformed.a * 255.0 + 0.5) / 255.0;
148
+ outColor = vec4(transformed.rgb * alpha, alpha);
149
+ }`, U = /* @__PURE__ */ new WeakMap(), $ = {
150
+ canvas(e, t, r) {
151
+ const o = r.matrix, s = e.getContext("2d").getImageData(0, 0, e.width, e.height), a = s.data;
152
+ for (let i = 0; i < a.length; i += 4) {
153
+ const n = a[i + 3] / 255, u = n > 0 ? a[i] / 255 : 0, c = n > 0 ? a[i + 1] / 255 : 0, d = n > 0 ? a[i + 2] / 255 : 0;
154
+ for (let h = 0; h < 4; h += 1) {
155
+ const x = h * 5;
156
+ a[i + h] = Math.round(Math.max(0, Math.min(1, o[x] * u + o[x + 1] * c + o[x + 2] * d + o[x + 3] * n + o[x + 4])) * 255);
156
157
  }
157
158
  }
158
- r.putImageData(i, 0, 0);
159
+ t.putImageData(s, 0, 0);
159
160
  },
160
161
  webgl(e) {
161
- const r = F.create(e, Y, ee), o = e.createVertexArray();
162
- if (!o)
163
- throw r.destroy(), new Error("[Nova] Failed to create color matrix vertex array");
162
+ const t = A.create(e, B, z), r = e.createVertexArray();
163
+ if (!r)
164
+ throw t.destroy(), new Error("[Nova] Failed to create color matrix vertex array");
164
165
  return {
165
- draw(a, i) {
166
- const n = q.get(i);
167
- r.use(), e.bindVertexArray(o), e.activeTexture(e.TEXTURE0), e.bindTexture(e.TEXTURE_2D, a), e.uniform1i(r.uniformLocation("u_source"), 0), e.uniformMatrix4fv(r.uniformLocation("u_matrix"), !1, n.matrix), e.uniform4fv(r.uniformLocation("u_offset"), n.offset), e.drawArrays(e.TRIANGLES, 0, 3);
166
+ draw(o, s) {
167
+ const a = U.get(s);
168
+ t.use(), e.bindVertexArray(r), e.activeTexture(e.TEXTURE0), e.bindTexture(e.TEXTURE_2D, o), e.uniform1i(t.uniformLocation("u_source"), 0), e.uniformMatrix4fv(t.uniformLocation("u_matrix"), !1, a.matrix), e.uniform4fv(t.uniformLocation("u_offset"), a.offset), e.drawArrays(e.TRIANGLES, 0, 3);
168
169
  },
169
170
  destroy() {
170
- e.deleteVertexArray(o), r.destroy();
171
+ e.deleteVertexArray(r), t.destroy();
171
172
  }
172
173
  };
173
174
  }
174
175
  };
175
- function pe(e) {
176
- if (e.length !== 20 || Array.from(e).some((n) => !Number.isFinite(n) || !Number.isFinite(Math.fround(n))))
176
+ function Z(e) {
177
+ if (e.length !== 20 || Array.from(e).some((a) => !Number.isFinite(a) || !Number.isFinite(Math.fround(a))))
177
178
  throw new RangeError("[Nova] colorMatrix requires 20 finite float32 coefficients");
178
- const r = Object.freeze(Array.from(e, Math.fround));
179
- for (let n = 0; n < 4; n += 1) {
180
- const s = r.slice(n * 5, n * 5 + 5).reduce((u, c) => u + Math.abs(c), 0);
181
- if (!Number.isFinite(Math.fround(s)))
179
+ const t = Object.freeze(Array.from(e, Math.fround));
180
+ for (let a = 0; a < 4; a += 1) {
181
+ const i = t.slice(a * 5, a * 5 + 5).reduce((n, u) => n + Math.abs(u), 0);
182
+ if (!Number.isFinite(Math.fround(i)))
182
183
  throw new RangeError("[Nova] colorMatrix row may overflow float32 arithmetic");
183
184
  }
184
- const o = O({ kind: "colorMatrix", matrix: r }, re), a = new Float32Array(16), i = new Float32Array(4);
185
- for (let n = 0; n < 4; n += 1) {
186
- for (let s = 0; s < 4; s += 1)
187
- a[s * 4 + n] = r[n * 5 + s];
188
- i[n] = r[n * 5 + 4];
185
+ const r = D({ kind: "colorMatrix", matrix: t }, $), o = new Float32Array(16), s = new Float32Array(4);
186
+ for (let a = 0; a < 4; a += 1) {
187
+ for (let i = 0; i < 4; i += 1)
188
+ o[i * 4 + a] = t[a * 5 + i];
189
+ s[a] = t[a * 5 + 4];
189
190
  }
190
- return q.set(o, { matrix: a, offset: i }), o;
191
+ return U.set(r, { matrix: o, offset: s }), r;
191
192
  }
192
- const I = String.raw`[+-]?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?%?`, k = new RegExp(`^rgba?\\(\\s*${I}\\s*,\\s*${I}\\s*,\\s*${I}(?:\\s*,\\s*${I})?\\s*\\)$`, "i");
193
- function te(e) {
193
+ const R = String.raw`[+-]?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?%?`, N = new RegExp(`^rgba?\\(\\s*${R}\\s*,\\s*${R}\\s*,\\s*${R}(?:\\s*,\\s*${R})?\\s*\\)$`, "i");
194
+ function k(e) {
194
195
  if (typeof e == "string") {
195
- const r = e.trim().toLowerCase();
196
- if (!/^#(?:[\da-f]{3}|[\da-f]{4}|[\da-f]{6}|[\da-f]{8})$/.test(r) && !/^(?:black|white|red|green|blue|transparent)$/.test(r) && !k.test(r))
196
+ const t = e.trim().toLowerCase();
197
+ if (!/^#(?:[\da-f]{3}|[\da-f]{4}|[\da-f]{6}|[\da-f]{8})$/.test(t) && !/^(?:black|white|red|green|blue|transparent)$/.test(t) && !N.test(t))
197
198
  throw new TypeError("[Nova] Unsupported shadow color; use normalized RGBA, hex, comma rgb(a), or a basic named color");
198
- if (k.test(r) && r.match(/[+-]?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?/gi)?.some((a) => !Number.isFinite(Number(a))))
199
+ if (N.test(t) && t.match(/[+-]?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?/gi)?.some((o) => !Number.isFinite(Number(o))))
199
200
  throw new RangeError("[Nova] Shadow color channels must be finite");
200
- const o = K(r);
201
- return Object.freeze([o.r, o.g, o.b, o.a].map(Math.fround));
201
+ const r = C(t);
202
+ return Object.freeze([r.r, r.g, r.b, r.a].map(Math.fround));
202
203
  }
203
- if (e.length !== 4 || e.some((r) => !Number.isFinite(r) || r < 0 || r > 1))
204
+ if (e.length !== 4 || e.some((t) => !Number.isFinite(t) || t < 0 || t > 1))
204
205
  throw new RangeError("[Nova] Shadow RGBA channels must be finite normalized values");
205
206
  return Object.freeze(Array.from(e, Math.fround));
206
207
  }
207
- function oe(e, r, o) {
208
- const a = U(r.blur, o).radius / o, i = Math.min(e.x, e.x + r.x - a), n = Math.min(e.y, e.y + r.y - a), s = Math.max(e.x + e.width, e.x + e.width + r.x + a), u = Math.max(e.y + e.height, e.y + e.height + r.y + a);
209
- return { x: i, y: n, width: s - i, height: u - n };
208
+ function G(e, t, r) {
209
+ const o = b(t.blur, r).radius / r, s = Math.min(e.x, e.x + t.x - o), a = Math.min(e.y, e.y + t.y - o), i = Math.max(e.x + e.width, e.x + e.width + t.x + o), n = Math.max(e.y + e.height, e.y + e.height + t.y + o);
210
+ return { x: s, y: a, width: i - s, height: n - a };
210
211
  }
211
- const ae = `#version 300 es
212
+ const V = `#version 300 es
212
213
  precision highp float;
213
214
  void main() {
214
215
  const vec2 p[3] = vec2[3](vec2(-1.0, -1.0), vec2(3.0, -1.0), vec2(-1.0, 3.0));
215
216
  gl_Position = vec4(p[gl_VertexID], 0.0, 1.0);
216
- }`, ne = `#version 300 es
217
+ }`, q = `#version 300 es
217
218
  precision highp float;
218
219
  uniform sampler2D u_source;
219
220
  uniform sampler2D u_original;
@@ -250,317 +251,77 @@ void main() {
250
251
  float alpha = coverage * u_color.a;
251
252
  outColor = original + vec4(u_color.rgb * alpha, alpha) * (1.0 - original.a);
252
253
  }
253
- }`, ie = {
254
+ }`, O = {
254
255
  needsSource: !0,
255
256
  passes: (e) => e.color[3] === 0 ? 0 : e.blur === 0 ? 1 : 2,
256
- outset(e, r) {
257
- const o = e;
258
- return o.color[3] ? U(o.blur, r).radius / r + Math.max(Math.abs(o.x), Math.abs(o.y)) : 0;
257
+ outset(e, t) {
258
+ const r = e;
259
+ return r.color[3] ? b(r.blur, t).radius / t + Math.max(Math.abs(r.x), Math.abs(r.y)) : 0;
259
260
  },
260
- stageBounds(e, r, o, a, i) {
261
- const n = o;
262
- if (n.blur && i === 0) {
263
- const s = U(n.blur, a).radius / a;
264
- return { x: e.x - s, y: e.y, width: e.width + s * 2, height: e.height };
261
+ stageBounds(e, t, r, o, s) {
262
+ const a = r;
263
+ if (a.blur && s === 0) {
264
+ const i = b(a.blur, o).radius / o;
265
+ return { x: e.x - i, y: e.y, width: e.width + i * 2, height: e.height };
265
266
  }
266
- return oe(r, n, a);
267
+ return G(t, a, o);
267
268
  },
268
- canvas(e, r, o, a) {
269
- const i = o, { radius: n, weights: s } = U(i.blur, a.dpr), u = e.width, c = e.height, w = e.getContext("2d").getImageData(0, 0, u, c).data, h = r.createImageData(u, c), T = !i.blur || a.pass === 1, g = T ? a.originalCanvas?.getContext("2d")?.getImageData(0, 0, u, c).data : void 0;
270
- if (T && !g)
269
+ canvas(e, t, r, o) {
270
+ const s = r, { radius: a, weights: i } = b(s.blur, o.dpr), n = e.width, u = e.height, c = e.getContext("2d").getImageData(0, 0, n, u).data, d = t.createImageData(n, u), h = !s.blur || o.pass === 1, x = h ? o.originalCanvas?.getContext("2d")?.getImageData(0, 0, n, u).data : void 0;
271
+ if (h && !x)
271
272
  throw new Error("[Nova] Drop shadow requires its original effect input");
272
- const t = (f, d) => f < 0 || f >= u || d < 0 || d >= c ? 0 : w[(d * u + f) * 4 + 3] / 255, m = (f, d) => {
273
- const v = f - 0.5, p = d - 0.5, l = Math.floor(v), x = Math.floor(p), b = v - l, y = p - x;
274
- return (t(l, x) * (1 - b) + t(l + 1, x) * b) * (1 - y) + (t(l, x + 1) * (1 - b) + t(l + 1, x + 1) * b) * y;
273
+ const E = (f, m) => f < 0 || f >= n || m < 0 || m >= u ? 0 : c[(m * n + f) * 4 + 3] / 255, M = (f, m) => {
274
+ const p = f - 0.5, w = m - 0.5, l = Math.floor(p), v = Math.floor(w), y = p - l, _ = w - v;
275
+ return (E(l, v) * (1 - y) + E(l + 1, v) * y) * (1 - _) + (E(l, v + 1) * (1 - y) + E(l + 1, v + 1) * y) * _;
275
276
  };
276
- for (let f = 0; f < c; f += 1)
277
- for (let d = 0; d < u; d += 1) {
278
- let v = 0;
279
- for (let E = -n; E <= n; E += 1)
280
- v += s[E + n] * (T ? m(d + 0.5 - i.x * a.dpr, f + 0.5 - i.y * a.dpr + E) : t(d + E, f));
281
- const p = (f * u + d) * 4;
282
- if (!T) {
283
- h.data[p + 3] = Math.round(v * 255);
277
+ for (let f = 0; f < u; f += 1)
278
+ for (let m = 0; m < n; m += 1) {
279
+ let p = 0;
280
+ for (let T = -a; T <= a; T += 1)
281
+ p += i[T + a] * (h ? M(m + 0.5 - s.x * o.dpr, f + 0.5 - s.y * o.dpr + T) : E(m + T, f));
282
+ const w = (f * n + m) * 4;
283
+ if (!h) {
284
+ d.data[w + 3] = Math.round(p * 255);
284
285
  continue;
285
286
  }
286
- const l = g[p + 3] / 255, x = v * i.color[3], b = l + x * (1 - l), y = Math.round(b * 255);
287
- h.data[p + 3] = y;
288
- for (let E = 0; E < 3; E += 1) {
289
- const A = Math.round(g[p + E] * l), X = Math.round(A + i.color[E] * x * (1 - l) * 255);
290
- h.data[p + E] = y ? Math.round(X * 255 / y) : 0;
287
+ const l = x[w + 3] / 255, v = p * s.color[3], y = l + v * (1 - l), _ = Math.round(y * 255);
288
+ d.data[w + 3] = _;
289
+ for (let T = 0; T < 3; T += 1) {
290
+ const L = Math.round(x[w + T] * l), X = Math.round(L + s.color[T] * v * (1 - l) * 255);
291
+ d.data[w + T] = _ ? Math.round(X * 255 / _) : 0;
291
292
  }
292
293
  }
293
- r.putImageData(h, 0, 0);
294
+ t.putImageData(d, 0, 0);
294
295
  },
295
296
  webgl(e) {
296
- const r = F.create(e, ae, ne), o = e.createVertexArray();
297
- if (!o)
298
- throw r.destroy(), new Error("[Nova] Failed to create drop shadow vertex array");
299
- const a = G(e);
297
+ const t = A.create(e, V, q), r = e.createVertexArray();
298
+ if (!r)
299
+ throw t.destroy(), new Error("[Nova] Failed to create drop shadow vertex array");
300
+ const o = F(e);
300
301
  return {
301
- draw(i, n, s) {
302
- const u = n;
303
- if (!s.originalTexture)
302
+ draw(s, a, i) {
303
+ const n = a;
304
+ if (!i.originalTexture)
304
305
  throw new Error("[Nova] Drop shadow requires its original effect input");
305
- const { radius: c, texture: w, uploadBytes: h, uploadMs: T } = a.resolve(u.blur, s.dpr);
306
- return r.use(), e.bindVertexArray(o), e.activeTexture(e.TEXTURE0 + 1), e.bindTexture(e.TEXTURE_2D, w), e.uniform1i(r.uniformLocation("u_weights"), 1), e.activeTexture(e.TEXTURE0 + 2), e.bindTexture(e.TEXTURE_2D, s.originalTexture), e.uniform1i(r.uniformLocation("u_original"), 2), e.activeTexture(e.TEXTURE0), e.bindTexture(e.TEXTURE_2D, i), e.uniform1i(r.uniformLocation("u_source"), 0), e.uniform1i(r.uniformLocation("u_radius"), c), e.uniform1i(r.uniformLocation("u_final"), !u.blur || s.pass === 1 ? 1 : 0), e.uniform2f(r.uniformLocation("u_offset"), u.x * s.dpr, -u.y * s.dpr), e.uniform4f(r.uniformLocation("u_color"), ...u.color), e.drawArrays(e.TRIANGLES, 0, 3), { uploadBytes: h, uploadMs: T };
306
+ const { radius: u, texture: c, uploadBytes: d, uploadMs: h } = o.resolve(n.blur, i.dpr);
307
+ return t.use(), e.bindVertexArray(r), e.activeTexture(e.TEXTURE0 + 1), e.bindTexture(e.TEXTURE_2D, c), e.uniform1i(t.uniformLocation("u_weights"), 1), e.activeTexture(e.TEXTURE0 + 2), e.bindTexture(e.TEXTURE_2D, i.originalTexture), e.uniform1i(t.uniformLocation("u_original"), 2), e.activeTexture(e.TEXTURE0), e.bindTexture(e.TEXTURE_2D, s), e.uniform1i(t.uniformLocation("u_source"), 0), e.uniform1i(t.uniformLocation("u_radius"), u), e.uniform1i(t.uniformLocation("u_final"), !n.blur || i.pass === 1 ? 1 : 0), e.uniform2f(t.uniformLocation("u_offset"), n.x * i.dpr, -n.y * i.dpr), e.uniform4f(t.uniformLocation("u_color"), ...n.color), e.drawArrays(e.TRIANGLES, 0, 3), { uploadBytes: d, uploadMs: h };
307
308
  },
308
- getTextureBytes: a.getTextureBytes,
309
+ getTextureBytes: o.getTextureBytes,
309
310
  destroy() {
310
- a.destroy(), e.deleteVertexArray(o), r.destroy();
311
+ o.destroy(), e.deleteVertexArray(r), t.destroy();
311
312
  }
312
313
  };
313
314
  }
314
315
  };
315
- function we(e = {}) {
316
- const r = e.x ?? 0, o = e.y ?? 0, a = e.blur ?? 0;
317
- if (![r, o, a].every(Number.isFinite) || Math.abs(r) > 4096 || Math.abs(o) > 4096 || a < 0 || a > 64)
316
+ function H(e = {}) {
317
+ const t = e.x ?? 0, r = e.y ?? 0, o = e.blur ?? 0;
318
+ if (![t, r, o].every(Number.isFinite) || Math.abs(t) > 4096 || Math.abs(r) > 4096 || o < 0 || o > 64)
318
319
  throw new RangeError("[Nova] Shadow requires finite offsets within 4096 CSS pixels and blur standard deviation 0..64");
319
- return O({ kind: "dropShadow", x: r, y: o, blur: a, color: te(e.color ?? "#000") }, ie);
320
- }
321
- const L = { float: 1, int: 1, vec2: 2, vec3: 3, vec4: 4, mat3: 9, mat4: 16 }, se = Object.freeze([]), ce = `#version 300 es
322
- precision highp float;
323
- out vec2 novaUv;
324
- void main() {
325
- const vec2 p[3] = vec2[3](vec2(-1.0, -1.0), vec2(3.0, -1.0), vec2(-1.0, 3.0));
326
- vec2 corner = p[gl_VertexID];
327
- novaUv = (corner + 1.0) * 0.5;
328
- gl_Position = vec4(corner, 0.0, 1.0);
329
- }`;
330
- function V(e, r, o) {
331
- if (r === "sampler2D") {
332
- if (!e || typeof e != "object" || e.__novaAssetRef !== !0)
333
- throw new TypeError(`[Nova] Sampler "${o}" requires an image asset ref`);
334
- const i = e, n = i.id, s = i.kind;
335
- if (typeof n != "string" || n.length === 0 || !["image", "icon", "fill"].includes(s))
336
- throw new TypeError(`[Nova] Sampler "${o}" requires an image asset ref`);
337
- return z(i) ? i : Object.freeze({ __novaAssetRef: !0, namespace: i.namespace, kind: s, name: i.name, id: n });
338
- }
339
- const a = (i) => {
340
- if (typeof i != "number" || !Number.isFinite(i) || (r === "int" ? !Number.isInteger(i) || i < -2147483648 || i > 2147483647 : !Number.isFinite(Math.fround(i))))
341
- throw new RangeError(`[Nova] Invalid ${r} uniform "${o}"`);
342
- return r === "int" ? i : Math.fround(i);
343
- };
344
- if (r === "float" || r === "int")
345
- return a(e);
346
- if (!e || typeof e != "object" || !("length" in e) || e.length !== L[r])
347
- throw new RangeError(`[Nova] Uniform "${o}" requires ${L[r]} coefficients`);
348
- return Object.freeze(Array.from({ length: L[r] }, (i, n) => a(e[n])));
349
- }
350
- function ue(e, r) {
351
- return $(e) || $(r) ? $(e) && $(r) && (z(e) || z(r) ? e === r : e.id === r.id && e.kind === r.kind) : typeof e == "number" ? Object.is(e, r) : typeof r != "number" && e.every((o, a) => Object.is(o, r[a]));
352
- }
353
- function j(e) {
354
- if (!e || typeof e != "object" || Array.isArray(e) || ArrayBuffer.isView(e))
355
- throw new TypeError("[Nova] Shader uniforms must be an object");
356
- }
357
- function B(e, r) {
358
- return r.map(([o, a]) => {
359
- const i = e[o];
360
- return { name: o, type: a, value: typeof i == "number" ? i : new Float32Array(i) };
361
- });
362
- }
363
- function fe(e, r, o) {
364
- switch (o.type) {
365
- case "float":
366
- e.uniform1f(r, o.value);
367
- break;
368
- case "int":
369
- e.uniform1i(r, o.value);
370
- break;
371
- case "vec2":
372
- e.uniform2fv(r, o.value);
373
- break;
374
- case "vec3":
375
- e.uniform3fv(r, o.value);
376
- break;
377
- case "vec4":
378
- e.uniform4fv(r, o.value);
379
- break;
380
- case "mat3":
381
- e.uniformMatrix3fv(r, !1, o.value);
382
- break;
383
- case "mat4":
384
- e.uniformMatrix4fv(r, !1, o.value);
385
- break;
386
- }
387
- }
388
- function xe(e) {
389
- if (typeof e.name != "string" || e.name.length === 0 || e.name.length > 128 || typeof e.fragment != "string" || e.fragment.trim().length === 0 || e.fragment.length > 65536)
390
- throw new TypeError("[Nova] Shader effect requires a name and a GLSL fragment body (at most 65536 characters)");
391
- const r = e.name, o = e.fragment, a = e.outset ?? 0, i = e.canvas;
392
- if (!Number.isFinite(a) || a < 0 || a > 256)
393
- throw new RangeError("[Nova] Shader effect outset must be from 0 to 256 CSS pixels");
394
- if (i !== void 0 && typeof i != "function")
395
- throw new TypeError("[Nova] Shader effect Canvas2D fallback must be a function");
396
- j(e.uniforms);
397
- const n = Object.entries(e.uniforms);
398
- if (n.length > 64 || n.some(([t, m]) => !/^[A-Z_]\w*$/i.test(t) || t.startsWith("nova") || t.startsWith("gl_") || t.includes("__") || m !== "sampler2D" && !Object.hasOwn(L, m)))
399
- throw new TypeError("[Nova] Shader effect supports at most 64 typed uniforms; nova/gl_ and double-underscore names are reserved");
400
- const s = Object.freeze(Object.fromEntries(n)), u = n.filter((t) => t[1] !== "sampler2D"), c = n.filter(([, t]) => t === "sampler2D").map(([t]) => t);
401
- if (c.some((t) => t.startsWith("_")))
402
- throw new TypeError("[Nova] Sampler names must start with a letter to keep generated GLSL helper names unambiguous");
403
- const w = (t) => c.length ? Object.freeze(c.map((m) => t[m])) : se, h = /* @__PURE__ */ new WeakMap(), T = `#version 300 es
404
- precision highp float;
405
- precision highp int;
406
- in vec2 novaUv;
407
- uniform sampler2D novaSource;
408
- uniform vec2 novaResolution;
409
- uniform float novaDpr;
410
- ${n.map(([t, m]) => `uniform ${m} ${t};`).join(`
411
- `)}
412
- ${c.map((t) => `uniform vec4 novaImageUv_${t};
413
- uniform vec4 novaImageClamp_${t};
414
- uniform float novaImagePremultiplied_${t};
415
- vec4 novaSample_${t}(vec2 uv) {
416
- vec2 nativeUv = clamp(clamp(uv, 0.0, 1.0) * novaImageUv_${t}.xy + novaImageUv_${t}.zw, novaImageClamp_${t}.xy, novaImageClamp_${t}.zw);
417
- vec4 color = texture(${t}, nativeUv);
418
- return vec4(color.rgb * mix(color.a, 1.0, novaImagePremultiplied_${t}), color.a);
419
- }`).join(`
420
- `)}
421
- out vec4 novaColor;
422
- // Public UV has its origin at the top left; the FBO attachment has its origin below.
423
- vec4 novaSample(vec2 uv) { return texture(novaSource, vec2(uv.x, 1.0 - uv.y)); }
424
- ${o}
425
- void main() { novaColor = novaEffect(vec2(novaUv.x, 1.0 - novaUv.y)); }`, g = {
426
- images: c.length ? (t) => h.get(t).images : void 0,
427
- outset: a > 0 ? () => a : void 0,
428
- stageOutset: a > 0 ? () => ({ x: a, y: a }) : void 0,
429
- subscribe(t, m) {
430
- const f = h.get(t).listeners;
431
- return f.add(m), () => {
432
- f.delete(m);
433
- };
434
- },
435
- canvas(t, m, f, d) {
436
- if (!i)
437
- throw new Error(`[Nova] Shader effect "${r}" requires an explicit Canvas2D fallback`);
438
- const v = h.get(f).values;
439
- let p;
440
- if (c.length) {
441
- const l = /* @__PURE__ */ Object.create(null);
442
- for (const x of c) {
443
- const b = d.resolveImage?.(v[x]);
444
- if (b?.kind !== "canvas")
445
- throw new Error(`[Nova] Shader sampler "${x}" changed or is unavailable; retry`);
446
- l[x] = Object.freeze({ source: b.source, width: b.width, height: b.height });
447
- }
448
- p = Object.freeze({ width: d.width, height: d.height, dpr: d.dpr, samplers: Object.freeze(l) });
449
- } else
450
- p = Object.freeze({ width: d.width, height: d.height, dpr: d.dpr });
451
- m.save();
452
- try {
453
- m.setTransform(1, 0, 0, 1, 0, 0), m.globalAlpha = 1, m.globalCompositeOperation = "source-over", m.clearRect(0, 0, t.width, t.height);
454
- const l = i(t, m, v, p);
455
- if (l && typeof l == "object" && "then" in l)
456
- throw new TypeError("[Nova] Shader effect Canvas2D fallback must be synchronous");
457
- } finally {
458
- m.restore();
459
- }
460
- },
461
- webgl(t) {
462
- let m, f = null;
463
- try {
464
- if (c.length) {
465
- const A = Number(t.getParameter(t.MAX_TEXTURE_IMAGE_UNITS));
466
- if (!Number.isSafeInteger(A) || A < c.length + 1)
467
- throw new RangeError(`[Nova] Shader effect "${r}" needs ${c.length + 1} fragment texture units`);
468
- }
469
- if (m = F.create(t, ce, T), f = t.createVertexArray(), !f)
470
- throw new Error("Failed to create vertex array");
471
- const d = u.map(([A]) => t.getUniformLocation(m.program, A)), v = c.map((A) => ({
472
- source: t.getUniformLocation(m.program, A),
473
- uv: t.getUniformLocation(m.program, `novaImageUv_${A}`),
474
- clamp: t.getUniformLocation(m.program, `novaImageClamp_${A}`),
475
- premultiplied: t.getUniformLocation(m.program, `novaImagePremultiplied_${A}`)
476
- })), p = t.getUniformLocation(m.program, "novaSource"), l = t.getUniformLocation(m.program, "novaResolution"), x = t.getUniformLocation(m.program, "novaDpr"), b = m, y = f;
477
- let E;
478
- return {
479
- draw(A, X, D) {
480
- const { values: P, prepared: W, images: Z } = h.get(X), C = c.length ? Z.map((_, S) => {
481
- const R = D.resolveImage?.(_);
482
- if (R?.kind !== "webgl")
483
- throw new Error(`[Nova] Shader sampler "${c[S]}" changed or is unavailable; retry`);
484
- return R;
485
- }) : void 0;
486
- if (b.use(), t.bindVertexArray(y), t.activeTexture(t.TEXTURE0), t.bindTexture(t.TEXTURE_2D, A), p !== null && t.uniform1i(p, 0), l !== null && t.uniform2f(l, D.width, D.height), x !== null && t.uniform1f(x, D.dpr), E !== P && (W.forEach((_, S) => {
487
- const R = d[S];
488
- R !== null && fe(t, R, _);
489
- }), E = P), !C) {
490
- t.drawArrays(t.TRIANGLES, 0, 3);
491
- return;
492
- }
493
- try {
494
- C.forEach((_, S) => {
495
- const R = S + 1, N = v[S];
496
- t.activeTexture(t.TEXTURE0 + R), t.bindTexture(t.TEXTURE_2D, _.texture), t.bindSampler(R, _.sampler), N.source !== null && t.uniform1i(N.source, R), N.uv !== null && t.uniform4f(N.uv, ..._.uv), N.clamp !== null && t.uniform4f(N.clamp, ..._.clamp), N.premultiplied !== null && t.uniform1f(N.premultiplied, _.premultiplied ? 1 : 0);
497
- }), t.drawArrays(t.TRIANGLES, 0, 3);
498
- } finally {
499
- for (let _ = 1; _ <= C.length; _++)
500
- t.activeTexture(t.TEXTURE0 + _), t.bindSampler(_, null), t.bindTexture(t.TEXTURE_2D, null);
501
- t.activeTexture(t.TEXTURE0);
502
- }
503
- },
504
- destroy() {
505
- t.deleteVertexArray(y), b.destroy(), E = void 0;
506
- }
507
- };
508
- } catch (d) {
509
- throw f && t.deleteVertexArray(f), m?.destroy(), new Error(`[Nova] Shader effect "${r}" failed: ${d instanceof Error ? d.message : String(d)}`, { cause: d });
510
- }
511
- }
512
- };
513
- return Object.freeze({
514
- name: r,
515
- uniforms: s,
516
- fragment: o,
517
- outset: a,
518
- create(t) {
519
- if (j(t), Object.keys(t).length !== n.length || n.some(([v]) => !Object.hasOwn(t, v)))
520
- throw new TypeError("[Nova] Shader effect initial uniforms must match its layout");
521
- const m = /* @__PURE__ */ Object.create(null);
522
- for (const [v, p] of n)
523
- m[v] = V(t[v], p, v);
524
- const f = { values: Object.freeze(m), prepared: B(m, u), images: w(m), version: 0, listeners: /* @__PURE__ */ new Set() }, d = O({
525
- kind: "shader",
526
- get uniforms() {
527
- return f.values;
528
- },
529
- get version() {
530
- return f.version;
531
- },
532
- setUniforms(v) {
533
- j(v);
534
- const p = { ...f.values };
535
- let l = !1;
536
- for (const y of Object.keys(v)) {
537
- if (!Object.hasOwn(s, y))
538
- throw new TypeError(`[Nova] Unknown shader uniform "${y}"`);
539
- const E = V(v[y], s[y], y);
540
- ue(f.values[y], E) || (p[y] = E, l = !0);
541
- }
542
- if (!l)
543
- return;
544
- const x = B(p, u);
545
- f.values = Object.freeze(p), f.prepared = x, f.images = w(p), f.version = f.version === Number.MAX_SAFE_INTEGER ? 0 : f.version + 1;
546
- const b = [];
547
- for (const y of [...f.listeners])
548
- try {
549
- y();
550
- } catch (E) {
551
- b.push(E);
552
- }
553
- if (b.length)
554
- throw new AggregateError(b, "[Nova] Shader effect replay notification failed");
555
- }
556
- }, g);
557
- return h.set(d, f), d;
558
- }
559
- });
320
+ return D({ kind: "dropShadow", x: t, y: r, blur: o, color: k(e.color ?? "#000") }, O);
560
321
  }
561
322
  export {
562
- he as blur,
563
- pe as colorMatrix,
564
- xe as defineShaderEffect,
565
- we as dropShadow
323
+ K as blur,
324
+ Z as colorMatrix,
325
+ Y as defineShaderEffect,
326
+ H as dropShadow
566
327
  };