@nika-js/onlymap 0.8.4 → 0.9.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.
Files changed (36) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/README.md +32 -2
  3. package/dist/{LercDecode.es-BKustV-1.js → LercDecode.es-BMcxSLhD.js} +1 -1
  4. package/dist/{basemap-B0SwrOqQ.js → basemap-m98j2wxG.js} +780 -780
  5. package/dist/elements/om-map.d.ts +10 -0
  6. package/dist/{geoparquet-C5E6N6G0.js → geoparquet-XOwOmChh.js} +1 -1
  7. package/dist/html-data.d.ts +1 -1
  8. package/dist/{index-CaM1C93G.js → index-BMbpftvm.js} +1 -1
  9. package/dist/{index-D5Fqn_eZ.js → index-BSAY6CWm.js} +12139 -11698
  10. package/dist/index-CfPbQUqO.js +511 -0
  11. package/dist/{index-BnQDfKfE.js → index-DDNElBTs.js} +106 -106
  12. package/dist/{index-xUVMTGZG.js → index-DzOvV-O7.js} +25 -25
  13. package/dist/{index-BLIjrGOE.js → index-HZWdgtm4.js} +36 -36
  14. package/dist/index.d.ts +3 -0
  15. package/dist/{lerc-TxsFLMlC.js → lerc-qK-nhCaB.js} +2 -2
  16. package/dist/onlymap.standalone.js +26772 -25833
  17. package/dist/onlymapjs.js +101 -98
  18. package/dist/post-process/catalogue.d.ts +61 -0
  19. package/dist/post-process/compile.d.ts +37 -0
  20. package/dist/post-process/index.d.ts +71 -0
  21. package/dist/post-process/ops.d.ts +22 -0
  22. package/dist/post-process/presets.d.ts +33 -0
  23. package/dist/post-process/validate.d.ts +8 -0
  24. package/dist/programmatic.d.ts +11 -0
  25. package/dist/{raster-B_wekCHv.js → raster-Dg5p_99H.js} +3 -3
  26. package/dist/{raster-pipeline-Dn2fkLYx.js → raster-pipeline-DhjkqDYd.js} +1 -1
  27. package/dist/runtime-core.d.ts +39 -1
  28. package/dist/version.d.ts +1 -1
  29. package/dist/{zarr-Dan2ab-l.js → zarr-D3CzK1Zm.js} +2 -2
  30. package/docs/cartograph.md +2 -2
  31. package/docs/effects.md +197 -0
  32. package/llms.txt +2 -1
  33. package/onlymapjs.html-data.json +163 -0
  34. package/package.json +3 -3
  35. package/skills/onlymapjs/SKILL.md +3 -2
  36. package/skills/onlymapjs/references/syntax.md +9 -2
@@ -0,0 +1,511 @@
1
+ import { M as A, G as k, u as T, P as M, i as j, o as F, C as w, a as z, E as O, c as L } from "./index-BSAY6CWm.js";
2
+ import { b as io, O as lo, d as ao, e as fo } from "./index-BSAY6CWm.js";
3
+ const R = (
4
+ /* wgsl */
5
+ `struct VertexInputs {
6
+ @location(0) clipSpacePositions: vec2<f32>,
7
+ @location(1) texCoords: vec2<f32>,
8
+ @location(2) coordinates: vec2<f32>
9
+ }
10
+
11
+ struct FragmentInputs {
12
+ @builtin(position) Position : vec4<f32>,
13
+ @location(0) position : vec2<f32>,
14
+ @location(1) coordinate : vec2<f32>,
15
+ @location(2) uv : vec2<f32>
16
+ };
17
+
18
+ @vertex
19
+ fn vertexMain(inputs: VertexInputs) -> FragmentInputs {
20
+ var outputs: FragmentInputs;
21
+ outputs.Position = vec4(inputs.clipSpacePositions, 0., 1.);
22
+ outputs.position = inputs.clipSpacePositions;
23
+ outputs.coordinate = inputs.coordinates;
24
+ outputs.uv = inputs.texCoords;
25
+ return outputs;
26
+ }
27
+ `
28
+ ), I = (
29
+ /* glsl */
30
+ `#version 300 es
31
+ in vec2 clipSpacePositions;
32
+ in vec2 texCoords;
33
+ in vec2 coordinates;
34
+
35
+ out vec2 position;
36
+ out vec2 coordinate;
37
+ out vec2 uv;
38
+
39
+ void main(void) {
40
+ gl_Position = vec4(clipSpacePositions, 0., 1.);
41
+ position = clipSpacePositions;
42
+ coordinate = coordinates;
43
+ uv = texCoords;
44
+ }
45
+ `
46
+ ), $ = [-1, -1, 1, -1, -1, 1, 1, 1];
47
+ class B extends A {
48
+ constructor(e, t) {
49
+ const n = $.map((r) => r === -1 ? 0 : r);
50
+ t.source && (t = { ...t, source: `${R}
51
+ ${t.source}` }), super(e, {
52
+ id: t.id || T("clip-space"),
53
+ ...t,
54
+ vs: I,
55
+ vertexCount: 4,
56
+ geometry: new k({
57
+ topology: "triangle-strip",
58
+ vertexCount: 4,
59
+ attributes: {
60
+ clipSpacePositions: { size: 2, value: new Float32Array($) },
61
+ texCoords: { size: 2, value: new Float32Array(n) },
62
+ coordinates: { size: 2, value: new Float32Array(n) }
63
+ }
64
+ })
65
+ });
66
+ }
67
+ }
68
+ const D = `layout(std140) uniform screenUniforms {
69
+ vec2 texSize;
70
+ } screen;
71
+ `, N = {
72
+ name: "screen",
73
+ fs: D,
74
+ uniformTypes: {
75
+ texSize: "vec2<f32>"
76
+ }
77
+ };
78
+ class U extends M {
79
+ constructor(e, t) {
80
+ super(e, t);
81
+ const { module: n, fs: r, id: i } = t, c = {
82
+ depthWriteEnabled: !1,
83
+ depthCompare: "always",
84
+ depthBias: 0,
85
+ blend: !0,
86
+ blendColorSrcFactor: "one",
87
+ blendColorDstFactor: "one-minus-src-alpha",
88
+ blendAlphaSrcFactor: "one",
89
+ blendAlphaDstFactor: "one-minus-src-alpha",
90
+ blendColorOperation: "add",
91
+ blendAlphaOperation: "add"
92
+ };
93
+ this.model = new B(e, { id: i, fs: r, modules: [n, N], parameters: c });
94
+ }
95
+ render(e) {
96
+ this._renderPass(this.device, e);
97
+ }
98
+ delete() {
99
+ this.model.destroy(), this.model = null;
100
+ }
101
+ // Private methods
102
+ /**
103
+ * Renders the pass.
104
+ * This is an abstract method that should be overridden.
105
+ * @param inputBuffer - Frame buffer that contains the result of the previous pass
106
+ * @param outputBuffer - Frame buffer that serves as the output render target
107
+ */
108
+ _renderPass(e, t) {
109
+ const { clearCanvas: n, inputBuffer: r, outputBuffer: i } = t, c = [r.width, r.height], s = {
110
+ texSrc: r.colorAttachments[0],
111
+ texSize: c
112
+ };
113
+ this.model.shaderInputs.setProps({
114
+ screen: s,
115
+ ...t.moduleProps
116
+ });
117
+ const l = this.device.beginRenderPass({
118
+ framebuffer: i,
119
+ parameters: { viewport: [0, 0, ...c] },
120
+ clearColor: n ? [0, 0, 0, 0] : !1,
121
+ clearDepth: 1,
122
+ clearStencil: !1
123
+ });
124
+ this.model.draw(l), l.end();
125
+ }
126
+ }
127
+ class S {
128
+ constructor(e, t) {
129
+ this.id = `${e.name}-pass`, this.props = t, j(e), this.module = e;
130
+ }
131
+ setup({ device: e }) {
132
+ this.passes = G(e, this.module, this.id);
133
+ }
134
+ setProps(e) {
135
+ this.props = e;
136
+ }
137
+ // eslint-disable-next-line @typescript-eslint/no-empty-function
138
+ preRender() {
139
+ }
140
+ postRender(e) {
141
+ const t = this.passes, { target: n } = e;
142
+ let r = e.inputBuffer, i = e.swapBuffer;
143
+ for (let c = 0; c < t.length; c++) {
144
+ const s = c === t.length - 1, l = n !== void 0 && s;
145
+ l && (i = n);
146
+ const f = !l || !!e.clearCanvas, u = {}, d = this.module.passes[c].uniforms;
147
+ u[this.module.name] = { ...this.props, ...d }, t[c].render({ clearCanvas: f, inputBuffer: r, outputBuffer: i, moduleProps: u });
148
+ const v = i;
149
+ i = r, r = v;
150
+ }
151
+ return r;
152
+ }
153
+ cleanup() {
154
+ if (this.passes) {
155
+ for (const e of this.passes)
156
+ e.delete();
157
+ this.passes = void 0;
158
+ }
159
+ }
160
+ }
161
+ function G(o, e, t) {
162
+ return e.passes.map((n, r) => {
163
+ const i = J(e, n), c = `${t}-${r}`;
164
+ return new U(o, { id: c, module: e, fs: i });
165
+ });
166
+ }
167
+ const y = `#version 300 es
168
+ uniform sampler2D texSrc;
169
+
170
+ in vec2 position;
171
+ in vec2 coordinate;
172
+ in vec2 uv;
173
+
174
+ out vec4 fragColor;
175
+ `, V = (o) => `${y}
176
+ void main() {
177
+ fragColor = texture(texSrc, coordinate);
178
+ fragColor = ${o}(fragColor, screen.texSize, coordinate);
179
+ }
180
+ `, q = (o) => `${y}
181
+ void main() {
182
+ fragColor = ${o}(texSrc, screen.texSize, coordinate);
183
+ }
184
+ `;
185
+ function J(o, e) {
186
+ if (e.filter) {
187
+ const t = typeof e.filter == "string" ? e.filter : `${o.name}_filterColor_ext`;
188
+ return V(t);
189
+ }
190
+ if (e.sampler) {
191
+ const t = typeof e.sampler == "string" ? e.sampler : `${o.name}_sampleColor`;
192
+ return q(t);
193
+ }
194
+ return "";
195
+ }
196
+ const X = `
197
+ float omfx_lum(vec3 c) { return dot(c, vec3(0.299, 0.587, 0.114)); }
198
+ float omfx_hash(vec2 p) { return fract(sin(dot(p, vec2(12.9898, 78.233))) * 43758.5453); }
199
+ `, P = {
200
+ tint: (o) => `
201
+ {
202
+ float L = omfx_lum(color.rgb);
203
+ float sat = max(max(color.r, color.g), color.b) - min(min(color.r, color.g), color.b);
204
+ vec3 duo = mix(${o("ink")}.rgb, ${o("paper")}.rgb, smoothstep(0.0, 1.0, L));
205
+ float keep = clamp(sat * 2.5, 0.0, 1.0) * ${o("keep-color")};
206
+ color.rgb = mix(color.rgb, mix(duo, color.rgb, keep), ${o("amount")});
207
+ }`,
208
+ levels: (o) => `
209
+ {
210
+ color.rgb = clamp((color.rgb - 0.5) * ${o("contrast")} + 0.5 + ${o("brightness")}, 0.0, 1.0);
211
+ color.rgb = pow(max(color.rgb, vec3(0.0)), vec3(1.0 / max(${o("gamma")}, 0.0001)));
212
+ }`,
213
+ saturation: (o) => `
214
+ {
215
+ color.rgb = mix(vec3(omfx_lum(color.rgb)), color.rgb, ${o("amount")});
216
+ }`,
217
+ posterize: (o) => `
218
+ {
219
+ float n = max(${o("levels")}, 2.0);
220
+ color.rgb = floor(color.rgb * n + 0.5) / n;
221
+ }`,
222
+ vignette: (o) => `
223
+ {
224
+ float r = length(coord - 0.5) * 1.41421356;
225
+ float v = smoothstep(${o("radius")}, ${o("radius")} + max(${o("softness")}, 0.0001), r);
226
+ color.rgb *= 1.0 - ${o("amount")} * v;
227
+ }`,
228
+ grain: (o, e) => `
229
+ {
230
+ float cell = max(${o("size")} * ${e}, 1.0);
231
+ vec2 g = floor(coord * texSize / cell) + ${o("seed")};
232
+ float n = omfx_hash(g) - 0.5;
233
+ vec3 nz = ${o("mono")} > 0.5
234
+ ? vec3(n)
235
+ : vec3(n, omfx_hash(g + 17.0) - 0.5, omfx_hash(g + 41.0) - 0.5);
236
+ color.rgb = clamp(color.rgb + nz * ${o("amount")}, 0.0, 1.0);
237
+ }`,
238
+ edges: (o, e) => `
239
+ {
240
+ vec2 o = max(${o("width")} * ${e}, 1.0) / texSize;
241
+ float tl = omfx_lum(texture(src, coord + o * vec2(-1.0, 1.0)).rgb);
242
+ float t = omfx_lum(texture(src, coord + o * vec2( 0.0, 1.0)).rgb);
243
+ float tr = omfx_lum(texture(src, coord + o * vec2( 1.0, 1.0)).rgb);
244
+ float l = omfx_lum(texture(src, coord + o * vec2(-1.0, 0.0)).rgb);
245
+ float r = omfx_lum(texture(src, coord + o * vec2( 1.0, 0.0)).rgb);
246
+ float bl = omfx_lum(texture(src, coord + o * vec2(-1.0, -1.0)).rgb);
247
+ float b = omfx_lum(texture(src, coord + o * vec2( 0.0, -1.0)).rgb);
248
+ float br = omfx_lum(texture(src, coord + o * vec2( 1.0, -1.0)).rgb);
249
+ float gx = (tr + 2.0 * r + br) - (tl + 2.0 * l + bl);
250
+ float gy = (bl + 2.0 * b + br) - (tl + 2.0 * t + tr);
251
+ float e = clamp(sqrt(gx * gx + gy * gy) * 2.0, 0.0, 1.0);
252
+ color.rgb = mix(color.rgb, ${o("color")}.rgb, e * ${o("amount")});
253
+ }`,
254
+ blur: (o, e) => `
255
+ {
256
+ vec2 o = max(${o("radius")} * ${e}, 0.5) / texSize;
257
+ vec4 sum = vec4(0.0);
258
+ float wsum = 0.0;
259
+ for (int i = -2; i <= 2; i++) {
260
+ for (int j = -2; j <= 2; j++) {
261
+ float w = exp(-float(i * i + j * j) / 4.0);
262
+ sum += texture(src, coord + o * vec2(float(i), float(j))) * w;
263
+ wsum += w;
264
+ }
265
+ }
266
+ color = sum / wsum;
267
+ }`,
268
+ sharpen: (o, e) => `
269
+ {
270
+ vec2 o = max(${o("radius")} * ${e}, 0.5) / texSize;
271
+ vec4 soft = vec4(0.0);
272
+ float wsum = 0.0;
273
+ for (int i = -1; i <= 1; i++) {
274
+ for (int j = -1; j <= 1; j++) {
275
+ float w = (i == 0 && j == 0) ? 4.0 : 1.0;
276
+ soft += texture(src, coord + o * vec2(float(i), float(j))) * w;
277
+ wsum += w;
278
+ }
279
+ }
280
+ soft /= wsum;
281
+ color.rgb = clamp(color.rgb + (color.rgb - soft.rgb) * ${o("amount")}, 0.0, 1.0);
282
+ }`,
283
+ halftone: (o, e) => `
284
+ {
285
+ float cell = max(${o("cell")} * ${e}, 2.0);
286
+ float a = radians(${o("angle")});
287
+ float ca = cos(a);
288
+ float sa = sin(a);
289
+ mat2 rot = mat2(ca, -sa, sa, ca);
290
+ mat2 inv = mat2(ca, sa, -sa, ca);
291
+ vec2 p = coord * texSize;
292
+ vec2 rp = rot * p;
293
+ vec2 centre = inv * ((floor(rp / cell) + 0.5) * cell);
294
+ vec4 c = texture(src, clamp(centre / texSize, vec2(0.0), vec2(1.0)));
295
+ float radius = sqrt(clamp(1.0 - omfx_lum(c.rgb), 0.0, 1.0)) * 0.5;
296
+ float d = length(fract(rp / cell) - 0.5);
297
+ float cov = 1.0 - smoothstep(radius - 0.08, radius + 0.08, d);
298
+ vec3 screened = mix(${o("paper")}.rgb, c.rgb, cov);
299
+ color.rgb = mix(color.rgb, screened, ${o("amount")});
300
+ }`
301
+ };
302
+ function x(o) {
303
+ const e = F(o), t = Object.prototype.hasOwnProperty.call(P, o) ? P[o] : void 0;
304
+ return e && t ? { ...e, glsl: t } : void 0;
305
+ }
306
+ function H(o) {
307
+ const e = [];
308
+ let t = [];
309
+ const n = () => {
310
+ t.length > 0 && e.push({ kind: "pointwise", ops: t }), t = [];
311
+ };
312
+ return o.forEach((r, i) => {
313
+ if (r.def.kind === "pointwise") {
314
+ t.push(i);
315
+ return;
316
+ }
317
+ n(), e.push({ kind: "neighbourhood", op: i });
318
+ }), n(), e;
319
+ }
320
+ function W(o, e) {
321
+ if (o.length === 0) return null;
322
+ const t = [], n = [], r = /* @__PURE__ */ new Map();
323
+ o.forEach((a, p) => {
324
+ for (const g of a.def.params) {
325
+ const h = a.values[g.name];
326
+ let m;
327
+ g.kind === "color" ? (m = `c${t.length}`, t.push({ key: m, value: Array.isArray(h) ? h : [0, 0, 0, 1] })) : (m = `f${n.length}`, n.push({ key: m, value: typeof h == "number" ? h : 0 })), r.set(`${p}:${g.name}`, `${e}.${m}`);
328
+ }
329
+ });
330
+ const i = {}, c = {}, s = [];
331
+ for (const { key: a, value: p } of t)
332
+ i[a] = p, c[a] = "vec4<f32>", s.push(` vec4 ${a};`);
333
+ for (const { key: a, value: p } of n)
334
+ i[a] = p, c[a] = "f32", s.push(` float ${a};`);
335
+ i.pxPerMm = w, c.pxPerMm = "f32", s.push(" float pxPerMm;");
336
+ const l = `${e}.pxPerMm`, f = (a) => (p) => r.get(`${a}:${p}`) ?? "0.0", u = [], d = [];
337
+ H(o).forEach((a, p) => {
338
+ if (a.kind === "pointwise") {
339
+ const m = `${e}_p${p}`, C = a.ops.map((b) => o[b].def.glsl(f(b), l)).join(`
340
+ `);
341
+ u.push(
342
+ `vec4 ${m}(vec4 inColor, vec2 texSize, vec2 coord) {
343
+ vec4 color = inColor;
344
+ ${C}
345
+ return color;
346
+ }`
347
+ ), d.push({ filter: m });
348
+ return;
349
+ }
350
+ const g = `${e}_n${p}`, h = o[a.op].def.glsl(f(a.op), l);
351
+ u.push(
352
+ `vec4 ${g}(sampler2D src, vec2 texSize, vec2 coord) {
353
+ vec4 color = texture(src, coord);
354
+ ${h}
355
+ return color;
356
+ }`
357
+ ), d.push({ sampler: g });
358
+ });
359
+ const v = [
360
+ `layout(std140) uniform ${e}Uniforms {`,
361
+ ...s,
362
+ `} ${e};`,
363
+ X,
364
+ ...u
365
+ ].join(`
366
+ `);
367
+ return {
368
+ // A multi-pass module names the function each pass runs, which deck's
369
+ // runtime reads (`typeof pass.filter === 'string' ? pass.filter : …`) but
370
+ // its `ShaderSubPass` type declares as a boolean — a deck typing gap, not
371
+ // a runtime one, the same shape as `maxZoom` on the standalone controller.
372
+ module: { name: e, fs: v, uniformTypes: c, passes: d },
373
+ uniforms: i,
374
+ passCount: d.length
375
+ };
376
+ }
377
+ const K = /^\s*(-?[\d.]+)\s*(mm)?\s*$/i, Q = /^\s*(-?[\d.]+)\s*(deg)?\s*$/i;
378
+ function E(o, e) {
379
+ if (o.kind === "color") {
380
+ const n = L(e);
381
+ if (!n) return;
382
+ const [r, i, c, s] = n;
383
+ return [r / 255, i / 255, c / 255, s === void 0 ? 1 : s > 1 ? s / 255 : s];
384
+ }
385
+ if (o.kind === "length" || o.kind === "angle") {
386
+ const n = (o.kind === "length" ? K : Q).exec(e);
387
+ if (!n) return;
388
+ const r = Number(n[1]);
389
+ return Number.isFinite(r) ? r : void 0;
390
+ }
391
+ const t = Number(e);
392
+ return Number.isFinite(t) ? t : void 0;
393
+ }
394
+ function Y(o) {
395
+ return E(o, String(o.default)) ?? 0;
396
+ }
397
+ function _(o, e) {
398
+ const t = x(o);
399
+ if (!t) return null;
400
+ const n = {};
401
+ for (const r of t.params) {
402
+ const i = e(r.name), c = i === null ? void 0 : E(r, i);
403
+ n[r.name] = c ?? Y(r);
404
+ }
405
+ return { op: o, values: n };
406
+ }
407
+ function Z(o) {
408
+ if (!o || typeof o != "object") return !1;
409
+ const e = o;
410
+ return typeof e.name == "string" && typeof e.fs == "string" && Array.isArray(e.passes) && e.passes.length > 0;
411
+ }
412
+ function ro(o) {
413
+ const e = [];
414
+ for (const t of Array.from(o.querySelectorAll(":scope > om-effect"))) {
415
+ const n = t.getAttribute("preset"), r = t.getAttribute("op"), i = t.querySelector(":scope > script[type='application/json']");
416
+ if (n !== null && n !== "") {
417
+ if (!z(n)) {
418
+ console.warn(`[onlymapjs] <om-effect preset="${n}"> is not a known preset — skipped.`, t);
419
+ continue;
420
+ }
421
+ const c = O[n].map(({ op: s, params: l }) => x(s) ? _(s, (u) => {
422
+ const d = t.getAttribute(`${s}-${u}`);
423
+ if (d !== null) return d;
424
+ const v = l[u];
425
+ return v === void 0 ? null : String(v);
426
+ }) : null).filter((s) => s !== null);
427
+ e.push({ ops: c });
428
+ continue;
429
+ }
430
+ if (r !== null && r !== "") {
431
+ const c = _(r, (s) => t.getAttribute(s));
432
+ if (!c) {
433
+ console.warn(`[onlymapjs] <om-effect op="${r}"> is not a known op — skipped.`, t);
434
+ continue;
435
+ }
436
+ e.push({ ops: [c] });
437
+ continue;
438
+ }
439
+ if (i) {
440
+ let c;
441
+ try {
442
+ c = JSON.parse(i.textContent ?? "");
443
+ } catch (f) {
444
+ console.warn(`[onlymapjs] <om-effect>'s inline module is not valid JSON — skipped. ${String(f)}`, t);
445
+ continue;
446
+ }
447
+ if (!Z(c)) {
448
+ console.warn(
449
+ "[onlymapjs] <om-effect>'s inline module needs `name`, `fs` and a non-empty `passes` — skipped.",
450
+ t
451
+ );
452
+ continue;
453
+ }
454
+ let s = {};
455
+ const l = t.getAttribute("uniforms");
456
+ if (l)
457
+ try {
458
+ s = JSON.parse(l);
459
+ } catch (f) {
460
+ console.warn(`[onlymapjs] <om-effect uniforms> is not valid JSON — ignored. ${String(f)}`, t);
461
+ }
462
+ e.push({ raw: { module: c, uniforms: s } });
463
+ continue;
464
+ }
465
+ console.warn("[onlymapjs] <om-effect> needs `preset`, `op`, or an inline module — skipped.", t);
466
+ }
467
+ return e;
468
+ }
469
+ let oo = 0;
470
+ const eo = () => oo++;
471
+ function so(o, e = w) {
472
+ const t = [], n = [];
473
+ let r = [];
474
+ const i = eo(), c = () => {
475
+ if (r.length === 0) return;
476
+ const s = W(r, `omfx${i}_${t.length}`);
477
+ if (r = [], !s) return;
478
+ const l = { ...s.uniforms, pxPerMm: e }, f = new S(s.module, l);
479
+ n.push({ effect: f, uniforms: s.uniforms }), t.push(f);
480
+ };
481
+ for (const s of o) {
482
+ if (s.ops) {
483
+ for (const { op: l, values: f } of s.ops) {
484
+ const u = x(l);
485
+ u && r.push({ def: u, values: f });
486
+ }
487
+ continue;
488
+ }
489
+ s.raw && (c(), t.push(new S(s.raw.module, s.raw.uniforms)));
490
+ }
491
+ return c(), {
492
+ effects: t,
493
+ setPixelsPerMm(s) {
494
+ for (const { effect: l, uniforms: f } of n) l.setProps({ ...f, pxPerMm: s });
495
+ }
496
+ };
497
+ }
498
+ export {
499
+ w as CSS_PX_PER_MM,
500
+ O as EFFECT_PRESETS,
501
+ io as EFFECT_PRESET_NAMES,
502
+ lo as OP_META,
503
+ ao as OP_NAMES,
504
+ so as buildPostProcessEffects,
505
+ E as coerceParam,
506
+ fo as expandPreset,
507
+ z as isEffectPreset,
508
+ x as opDef,
509
+ F as opMeta,
510
+ ro as parseEffectEls
511
+ };