shaders 2.2.16 → 2.2.17
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/index.js +1 -0
- package/dist/solid/codegen.js +1 -0
- package/dist/solid/engine/Shader.d.ts +22 -0
- package/dist/solid/engine/Shader.d.ts.map +1 -0
- package/dist/solid/engine/component.template.d.ts +28 -0
- package/dist/solid/engine/component.template.d.ts.map +1 -0
- package/dist/solid/index.js +103781 -0
- package/dist/solid/utils/generatePresetCode.js +328 -0
- package/dist/solid/utils/generatePresetCode.template.d.ts +13 -0
- package/dist/solid/utils/generatePresetCode.template.d.ts.map +1 -0
- package/package.json +21 -18
- package/dist/react/generatePresetCode-DWBlTzlt.cjs +0 -13
- package/dist/react/index.cjs +0 -4456
- package/dist/react/utils/generatePresetCode.cjs +0 -1
|
@@ -0,0 +1,328 @@
|
|
|
1
|
+
const c = {
|
|
2
|
+
AngularBlur: {
|
|
3
|
+
opacity: 1,
|
|
4
|
+
blendMode: "normal"
|
|
5
|
+
},
|
|
6
|
+
Ascii: {
|
|
7
|
+
opacity: 1,
|
|
8
|
+
blendMode: "normal"
|
|
9
|
+
},
|
|
10
|
+
Blob: {
|
|
11
|
+
opacity: 1,
|
|
12
|
+
blendMode: "normal"
|
|
13
|
+
},
|
|
14
|
+
Blur: {
|
|
15
|
+
opacity: 1,
|
|
16
|
+
blendMode: "normal"
|
|
17
|
+
},
|
|
18
|
+
Bulge: {
|
|
19
|
+
opacity: 1,
|
|
20
|
+
blendMode: "normal"
|
|
21
|
+
},
|
|
22
|
+
CRTScreen: {
|
|
23
|
+
opacity: 1,
|
|
24
|
+
blendMode: "normal"
|
|
25
|
+
},
|
|
26
|
+
ChannelBlur: {
|
|
27
|
+
opacity: 1,
|
|
28
|
+
blendMode: "normal"
|
|
29
|
+
},
|
|
30
|
+
Checkerboard: {
|
|
31
|
+
opacity: 1,
|
|
32
|
+
blendMode: "normal"
|
|
33
|
+
},
|
|
34
|
+
ChromaFlow: {
|
|
35
|
+
opacity: 1,
|
|
36
|
+
blendMode: "normal"
|
|
37
|
+
},
|
|
38
|
+
ChromaticAberration: {
|
|
39
|
+
opacity: 1,
|
|
40
|
+
blendMode: "normal"
|
|
41
|
+
},
|
|
42
|
+
Circle: {
|
|
43
|
+
opacity: 1,
|
|
44
|
+
blendMode: "normal"
|
|
45
|
+
},
|
|
46
|
+
CursorTrail: {
|
|
47
|
+
opacity: 1,
|
|
48
|
+
blendMode: "normal"
|
|
49
|
+
},
|
|
50
|
+
DiffuseBlur: {
|
|
51
|
+
opacity: 1,
|
|
52
|
+
blendMode: "normal"
|
|
53
|
+
},
|
|
54
|
+
Dither: {
|
|
55
|
+
opacity: 1,
|
|
56
|
+
blendMode: "normal"
|
|
57
|
+
},
|
|
58
|
+
DotGrid: {
|
|
59
|
+
opacity: 1,
|
|
60
|
+
blendMode: "normal"
|
|
61
|
+
},
|
|
62
|
+
Duotone: {
|
|
63
|
+
opacity: 1,
|
|
64
|
+
blendMode: "normal"
|
|
65
|
+
},
|
|
66
|
+
FilmGrain: {
|
|
67
|
+
opacity: 1,
|
|
68
|
+
blendMode: "normal"
|
|
69
|
+
},
|
|
70
|
+
FloatingParticles: {
|
|
71
|
+
opacity: 1,
|
|
72
|
+
blendMode: "normal"
|
|
73
|
+
},
|
|
74
|
+
GlassTiles: {
|
|
75
|
+
opacity: 1,
|
|
76
|
+
blendMode: "normal"
|
|
77
|
+
},
|
|
78
|
+
Glow: {
|
|
79
|
+
opacity: 1,
|
|
80
|
+
blendMode: "normal"
|
|
81
|
+
},
|
|
82
|
+
Godrays: {
|
|
83
|
+
opacity: 1,
|
|
84
|
+
blendMode: "normal"
|
|
85
|
+
},
|
|
86
|
+
Grayscale: {
|
|
87
|
+
opacity: 1,
|
|
88
|
+
blendMode: "normal"
|
|
89
|
+
},
|
|
90
|
+
Grid: {
|
|
91
|
+
opacity: 1,
|
|
92
|
+
blendMode: "normal"
|
|
93
|
+
},
|
|
94
|
+
GridDistortion: {
|
|
95
|
+
opacity: 1,
|
|
96
|
+
blendMode: "normal"
|
|
97
|
+
},
|
|
98
|
+
Group: {
|
|
99
|
+
opacity: 1,
|
|
100
|
+
blendMode: "normal"
|
|
101
|
+
},
|
|
102
|
+
Halftone: {
|
|
103
|
+
opacity: 1,
|
|
104
|
+
blendMode: "normal"
|
|
105
|
+
},
|
|
106
|
+
HueShift: {
|
|
107
|
+
opacity: 1,
|
|
108
|
+
blendMode: "normal"
|
|
109
|
+
},
|
|
110
|
+
ImageTexture: {
|
|
111
|
+
opacity: 1,
|
|
112
|
+
blendMode: "normal"
|
|
113
|
+
},
|
|
114
|
+
Invert: {
|
|
115
|
+
opacity: 1,
|
|
116
|
+
blendMode: "normal"
|
|
117
|
+
},
|
|
118
|
+
LinearBlur: {
|
|
119
|
+
opacity: 1,
|
|
120
|
+
blendMode: "normal"
|
|
121
|
+
},
|
|
122
|
+
LinearGradient: {
|
|
123
|
+
opacity: 1,
|
|
124
|
+
blendMode: "normal"
|
|
125
|
+
},
|
|
126
|
+
Liquify: {
|
|
127
|
+
opacity: 1,
|
|
128
|
+
blendMode: "normal"
|
|
129
|
+
},
|
|
130
|
+
Pixelate: {
|
|
131
|
+
opacity: 1,
|
|
132
|
+
blendMode: "normal"
|
|
133
|
+
},
|
|
134
|
+
PolarCoordinates: {
|
|
135
|
+
opacity: 1,
|
|
136
|
+
blendMode: "normal"
|
|
137
|
+
},
|
|
138
|
+
Posterize: {
|
|
139
|
+
opacity: 1,
|
|
140
|
+
blendMode: "normal"
|
|
141
|
+
},
|
|
142
|
+
ProgressiveBlur: {
|
|
143
|
+
opacity: 1,
|
|
144
|
+
blendMode: "normal"
|
|
145
|
+
},
|
|
146
|
+
RadialGradient: {
|
|
147
|
+
opacity: 1,
|
|
148
|
+
blendMode: "normal"
|
|
149
|
+
},
|
|
150
|
+
RectangularCoordinates: {
|
|
151
|
+
opacity: 1,
|
|
152
|
+
blendMode: "normal"
|
|
153
|
+
},
|
|
154
|
+
Ripples: {
|
|
155
|
+
opacity: 1,
|
|
156
|
+
blendMode: "normal"
|
|
157
|
+
},
|
|
158
|
+
Saturation: {
|
|
159
|
+
opacity: 1,
|
|
160
|
+
blendMode: "normal"
|
|
161
|
+
},
|
|
162
|
+
SimplexNoise: {
|
|
163
|
+
opacity: 1,
|
|
164
|
+
blendMode: "normal"
|
|
165
|
+
},
|
|
166
|
+
SineWave: {
|
|
167
|
+
opacity: 1,
|
|
168
|
+
blendMode: "normal"
|
|
169
|
+
},
|
|
170
|
+
SolidColor: {
|
|
171
|
+
opacity: 1,
|
|
172
|
+
blendMode: "normal"
|
|
173
|
+
},
|
|
174
|
+
Spherize: {
|
|
175
|
+
opacity: 1,
|
|
176
|
+
blendMode: "normal"
|
|
177
|
+
},
|
|
178
|
+
Spiral: {
|
|
179
|
+
opacity: 1,
|
|
180
|
+
blendMode: "normal"
|
|
181
|
+
},
|
|
182
|
+
Strands: {
|
|
183
|
+
opacity: 1,
|
|
184
|
+
blendMode: "normal"
|
|
185
|
+
},
|
|
186
|
+
Stretch: {
|
|
187
|
+
opacity: 1,
|
|
188
|
+
blendMode: "normal"
|
|
189
|
+
},
|
|
190
|
+
Swirl: {
|
|
191
|
+
opacity: 1,
|
|
192
|
+
blendMode: "normal"
|
|
193
|
+
},
|
|
194
|
+
TiltShift: {
|
|
195
|
+
opacity: 1,
|
|
196
|
+
blendMode: "normal"
|
|
197
|
+
},
|
|
198
|
+
Tritone: {
|
|
199
|
+
opacity: 1,
|
|
200
|
+
blendMode: "normal"
|
|
201
|
+
},
|
|
202
|
+
Twirl: {
|
|
203
|
+
opacity: 1,
|
|
204
|
+
blendMode: "normal"
|
|
205
|
+
},
|
|
206
|
+
Vibrance: {
|
|
207
|
+
opacity: 1,
|
|
208
|
+
blendMode: "normal"
|
|
209
|
+
},
|
|
210
|
+
WaveDistortion: {
|
|
211
|
+
opacity: 1,
|
|
212
|
+
blendMode: "normal"
|
|
213
|
+
},
|
|
214
|
+
ZoomBlur: {
|
|
215
|
+
opacity: 1,
|
|
216
|
+
blendMode: "normal"
|
|
217
|
+
}
|
|
218
|
+
};
|
|
219
|
+
function s(a, l, t = " ") {
|
|
220
|
+
return Object.entries(a).filter(([o, e]) => {
|
|
221
|
+
const r = c[l] || {};
|
|
222
|
+
if (r.hasOwnProperty(o)) {
|
|
223
|
+
const n = r[o];
|
|
224
|
+
return e !== null && n !== null && typeof e == "object" && typeof n == "object" ? JSON.stringify(e) !== JSON.stringify(n) : e !== n;
|
|
225
|
+
}
|
|
226
|
+
return !(o === "opacity" && e === 1 || o === "blendMode" && e === "normal");
|
|
227
|
+
}).map(([o, e]) => typeof e == "string" ? `${o}=${JSON.stringify(e)}` : e !== null && typeof e == "object" ? `${o}={${JSON.stringify(e)}}` : `${o}={${e}}`).join(`
|
|
228
|
+
` + t + " ");
|
|
229
|
+
}
|
|
230
|
+
function m(a, l) {
|
|
231
|
+
const t = [];
|
|
232
|
+
function o(e) {
|
|
233
|
+
for (const r of e)
|
|
234
|
+
t.push(r), r.children && o(r.children);
|
|
235
|
+
}
|
|
236
|
+
return o(l), t.some(
|
|
237
|
+
(e) => {
|
|
238
|
+
var r;
|
|
239
|
+
return ((r = e.props) == null ? void 0 : r.maskSource) === a;
|
|
240
|
+
}
|
|
241
|
+
);
|
|
242
|
+
}
|
|
243
|
+
function y(a) {
|
|
244
|
+
const l = (o, e = " ") => {
|
|
245
|
+
const r = o.props ? s(o.props, o.type, e) : "";
|
|
246
|
+
let n = "";
|
|
247
|
+
o.id && m(o.id, a.components) && (n = `id="${o.id}"`);
|
|
248
|
+
const i = [n, r].filter(Boolean).join(`
|
|
249
|
+
` + e + " ");
|
|
250
|
+
if (o.children && o.children.length > 0) {
|
|
251
|
+
const d = o.children.map((p) => l(p, e + " ")).join(`
|
|
252
|
+
`);
|
|
253
|
+
return i ? `${e}<${o.type}
|
|
254
|
+
${e} ${i}>
|
|
255
|
+
${d}
|
|
256
|
+
${e}</${o.type}>` : `${e}<${o.type}>
|
|
257
|
+
${d}
|
|
258
|
+
${e}</${o.type}>`;
|
|
259
|
+
} else
|
|
260
|
+
return i ? `${e}<${o.type}
|
|
261
|
+
${e} ${i} />` : `${e}<${o.type} />`;
|
|
262
|
+
};
|
|
263
|
+
return `<Shader>
|
|
264
|
+
${a.components.map((o) => l(o)).join(`
|
|
265
|
+
`)}
|
|
266
|
+
</Shader>`;
|
|
267
|
+
}
|
|
268
|
+
const b = [
|
|
269
|
+
// @ts-ignore - replaced at build time
|
|
270
|
+
"AngularBlur",
|
|
271
|
+
"Ascii",
|
|
272
|
+
"Blob",
|
|
273
|
+
"Blur",
|
|
274
|
+
"Bulge",
|
|
275
|
+
"CRTScreen",
|
|
276
|
+
"ChannelBlur",
|
|
277
|
+
"Checkerboard",
|
|
278
|
+
"ChromaFlow",
|
|
279
|
+
"ChromaticAberration",
|
|
280
|
+
"Circle",
|
|
281
|
+
"CursorTrail",
|
|
282
|
+
"DiffuseBlur",
|
|
283
|
+
"Dither",
|
|
284
|
+
"DotGrid",
|
|
285
|
+
"Duotone",
|
|
286
|
+
"FilmGrain",
|
|
287
|
+
"FloatingParticles",
|
|
288
|
+
"GlassTiles",
|
|
289
|
+
"Glow",
|
|
290
|
+
"Godrays",
|
|
291
|
+
"Grayscale",
|
|
292
|
+
"Grid",
|
|
293
|
+
"GridDistortion",
|
|
294
|
+
"Group",
|
|
295
|
+
"Halftone",
|
|
296
|
+
"HueShift",
|
|
297
|
+
"ImageTexture",
|
|
298
|
+
"Invert",
|
|
299
|
+
"LinearBlur",
|
|
300
|
+
"LinearGradient",
|
|
301
|
+
"Liquify",
|
|
302
|
+
"Pixelate",
|
|
303
|
+
"PolarCoordinates",
|
|
304
|
+
"Posterize",
|
|
305
|
+
"ProgressiveBlur",
|
|
306
|
+
"RadialGradient",
|
|
307
|
+
"RectangularCoordinates",
|
|
308
|
+
"Ripples",
|
|
309
|
+
"Saturation",
|
|
310
|
+
"SimplexNoise",
|
|
311
|
+
"SineWave",
|
|
312
|
+
"SolidColor",
|
|
313
|
+
"Spherize",
|
|
314
|
+
"Spiral",
|
|
315
|
+
"Strands",
|
|
316
|
+
"Stretch",
|
|
317
|
+
"Swirl",
|
|
318
|
+
"TiltShift",
|
|
319
|
+
"Tritone",
|
|
320
|
+
"Twirl",
|
|
321
|
+
"Vibrance",
|
|
322
|
+
"WaveDistortion",
|
|
323
|
+
"ZoomBlur"
|
|
324
|
+
];
|
|
325
|
+
export {
|
|
326
|
+
b as availableComponents,
|
|
327
|
+
y as generatePresetCode
|
|
328
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
interface ComponentConfig {
|
|
2
|
+
type: string;
|
|
3
|
+
id?: string;
|
|
4
|
+
props?: Record<string, any>;
|
|
5
|
+
children?: ComponentConfig[];
|
|
6
|
+
}
|
|
7
|
+
interface PresetConfig {
|
|
8
|
+
components: ComponentConfig[];
|
|
9
|
+
}
|
|
10
|
+
export declare function generatePresetCode(preset: PresetConfig): string;
|
|
11
|
+
export declare const availableComponents: any[];
|
|
12
|
+
export {};
|
|
13
|
+
//# sourceMappingURL=generatePresetCode.template.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generatePresetCode.template.d.ts","sourceRoot":"","sources":["../../src/utils/generatePresetCode.template.ts"],"names":[],"mappings":"AAAA,UAAU,eAAe;IACvB,IAAI,EAAE,MAAM,CAAA;IACZ,EAAE,CAAC,EAAE,MAAM,CAAA;IACX,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IAC3B,QAAQ,CAAC,EAAE,eAAe,EAAE,CAAA;CAC7B;AAED,UAAU,YAAY;IACpB,UAAU,EAAE,eAAe,EAAE,CAAA;CAC9B;AAgED,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,YAAY,GAAG,MAAM,CAyC/D;AAGD,eAAO,MAAM,mBAAmB,OAG/B,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "shaders",
|
|
3
|
-
"version": "2.2.
|
|
3
|
+
"version": "2.2.17",
|
|
4
4
|
"description": "Declarative shader components for Vue, React, and Svelte",
|
|
5
5
|
"author": "Simon Le Marchant<https://github.com/marchantweb>",
|
|
6
6
|
"homepage": "https://shaders.com/",
|
|
@@ -12,43 +12,43 @@
|
|
|
12
12
|
"exports": {
|
|
13
13
|
".": {
|
|
14
14
|
"types": "./dist/index.d.ts",
|
|
15
|
-
"import": "./dist/index.js"
|
|
16
|
-
"require": "./dist/index.cjs"
|
|
15
|
+
"import": "./dist/index.js"
|
|
17
16
|
},
|
|
18
17
|
"./registry": {
|
|
19
18
|
"types": "./dist/registry.d.ts",
|
|
20
|
-
"import": "./dist/registry.js"
|
|
21
|
-
"require": "./dist/registry.cjs"
|
|
19
|
+
"import": "./dist/registry.js"
|
|
22
20
|
},
|
|
23
21
|
"./vue": {
|
|
24
22
|
"types": "./dist/vue/index.d.ts",
|
|
25
|
-
"import": "./dist/vue/index.js"
|
|
26
|
-
"require": "./dist/vue/index.cjs"
|
|
23
|
+
"import": "./dist/vue/index.js"
|
|
27
24
|
},
|
|
28
25
|
"./vue/codegen": {
|
|
29
26
|
"types": "./dist/vue/codegen.d.ts",
|
|
30
|
-
"import": "./dist/vue/codegen.js"
|
|
31
|
-
"require": "./dist/vue/codegen.cjs"
|
|
27
|
+
"import": "./dist/vue/codegen.js"
|
|
32
28
|
},
|
|
33
29
|
"./react": {
|
|
34
30
|
"types": "./dist/react/index.d.ts",
|
|
35
|
-
"import": "./dist/react/index.js"
|
|
36
|
-
"require": "./dist/react/index.cjs"
|
|
31
|
+
"import": "./dist/react/index.js"
|
|
37
32
|
},
|
|
38
33
|
"./react/codegen": {
|
|
39
34
|
"types": "./dist/react/codegen.d.ts",
|
|
40
|
-
"import": "./dist/react/codegen.js"
|
|
41
|
-
"require": "./dist/react/codegen.cjs"
|
|
35
|
+
"import": "./dist/react/codegen.js"
|
|
42
36
|
},
|
|
43
37
|
"./svelte": {
|
|
44
38
|
"types": "./dist/svelte/index.d.ts",
|
|
45
|
-
"import": "./dist/svelte/index.js"
|
|
46
|
-
"require": "./dist/svelte/index.cjs"
|
|
39
|
+
"import": "./dist/svelte/index.js"
|
|
47
40
|
},
|
|
48
41
|
"./svelte/codegen": {
|
|
49
42
|
"types": "./dist/svelte/codegen.d.ts",
|
|
50
|
-
"import": "./dist/svelte/codegen.js"
|
|
51
|
-
|
|
43
|
+
"import": "./dist/svelte/codegen.js"
|
|
44
|
+
},
|
|
45
|
+
"./solid": {
|
|
46
|
+
"types": "./dist/solid/index.d.ts",
|
|
47
|
+
"import": "./dist/solid/index.js"
|
|
48
|
+
},
|
|
49
|
+
"./solid/codegen": {
|
|
50
|
+
"types": "./dist/solid/codegen.d.ts",
|
|
51
|
+
"import": "./dist/solid/codegen.js"
|
|
52
52
|
},
|
|
53
53
|
"./core": {
|
|
54
54
|
"types": "./dist/core/index.d.ts",
|
|
@@ -351,13 +351,16 @@
|
|
|
351
351
|
"shaders-core": "workspace:*",
|
|
352
352
|
"shaders-vue": "workspace:*",
|
|
353
353
|
"shaders-react": "workspace:*",
|
|
354
|
-
"shaders-svelte": "workspace:*"
|
|
354
|
+
"shaders-svelte": "workspace:*",
|
|
355
|
+
"shaders-solid": "workspace:*"
|
|
355
356
|
},
|
|
356
357
|
"keywords": [
|
|
357
358
|
"vue",
|
|
358
359
|
"vue3",
|
|
359
360
|
"react",
|
|
360
361
|
"svelte",
|
|
362
|
+
"solid",
|
|
363
|
+
"solidjs",
|
|
361
364
|
"webgpu",
|
|
362
365
|
"webgl",
|
|
363
366
|
"wgsl",
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
var p={AngularBlur:{opacity:1,blendMode:"normal"},Ascii:{opacity:1,blendMode:"normal"},Blob:{opacity:1,blendMode:"normal"},Blur:{opacity:1,blendMode:"normal"},Bulge:{opacity:1,blendMode:"normal"},CRTScreen:{opacity:1,blendMode:"normal"},ChannelBlur:{opacity:1,blendMode:"normal"},Checkerboard:{opacity:1,blendMode:"normal"},ChromaFlow:{opacity:1,blendMode:"normal"},ChromaticAberration:{opacity:1,blendMode:"normal"},Circle:{opacity:1,blendMode:"normal"},CursorTrail:{opacity:1,blendMode:"normal"},DiffuseBlur:{opacity:1,blendMode:"normal"},Dither:{opacity:1,blendMode:"normal"},DotGrid:{opacity:1,blendMode:"normal"},Duotone:{opacity:1,blendMode:"normal"},FilmGrain:{opacity:1,blendMode:"normal"},FloatingParticles:{opacity:1,blendMode:"normal"},GlassTiles:{opacity:1,blendMode:"normal"},Glow:{opacity:1,blendMode:"normal"},Godrays:{opacity:1,blendMode:"normal"},Grayscale:{opacity:1,blendMode:"normal"},Grid:{opacity:1,blendMode:"normal"},GridDistortion:{opacity:1,blendMode:"normal"},Group:{opacity:1,blendMode:"normal"},Halftone:{opacity:1,blendMode:"normal"},HueShift:{opacity:1,blendMode:"normal"},ImageTexture:{opacity:1,blendMode:"normal"},Invert:{opacity:1,blendMode:"normal"},LinearBlur:{opacity:1,blendMode:"normal"},LinearGradient:{opacity:1,blendMode:"normal"},Liquify:{opacity:1,blendMode:"normal"},Pixelate:{opacity:1,blendMode:"normal"},PolarCoordinates:{opacity:1,blendMode:"normal"},Posterize:{opacity:1,blendMode:"normal"},ProgressiveBlur:{opacity:1,blendMode:"normal"},RadialGradient:{opacity:1,blendMode:"normal"},RectangularCoordinates:{opacity:1,blendMode:"normal"},Ripples:{opacity:1,blendMode:"normal"},Saturation:{opacity:1,blendMode:"normal"},SimplexNoise:{opacity:1,blendMode:"normal"},SineWave:{opacity:1,blendMode:"normal"},SolidColor:{opacity:1,blendMode:"normal"},Spherize:{opacity:1,blendMode:"normal"},Spiral:{opacity:1,blendMode:"normal"},Strands:{opacity:1,blendMode:"normal"},Stretch:{opacity:1,blendMode:"normal"},Swirl:{opacity:1,blendMode:"normal"},TiltShift:{opacity:1,blendMode:"normal"},Tritone:{opacity:1,blendMode:"normal"},Twirl:{opacity:1,blendMode:"normal"},Vibrance:{opacity:1,blendMode:"normal"},WaveDistortion:{opacity:1,blendMode:"normal"},ZoomBlur:{opacity:1,blendMode:"normal"}};function c(t,l,o=" "){return Object.entries(t).filter(([e,r])=>{const n=p[l]||{};if(n.hasOwnProperty(e)){const a=n[e];return typeof r=="object"&&typeof a=="object"?JSON.stringify(r)!==JSON.stringify(a):r!==a}return!(e==="opacity"&&r===1||e==="blendMode"&&r==="normal")}).map(([e,r])=>typeof r=="string"?`${e}="${r}"`:typeof r=="object"?`${e}={${JSON.stringify(r)}}`:`${e}={${r}}`).join(`
|
|
2
|
-
`+o+" ")}function m(t,l){const o=[];function e(r){for(const n of r)o.push(n),n.children&&e(n.children)}return e(l),o.some(r=>r.props?.maskSource===t)}function s(t){const l=(o,e=" ")=>{const r=o.props?c(o.props,o.type,e):"";let n="";o.id&&m(o.id,t.components)&&(n=`id="${o.id}"`);const a=[n,r].filter(Boolean).join(`
|
|
3
|
-
`+e+" ");if(o.children&&o.children.length>0){const i=o.children.map(d=>l(d,e+" ")).join(`
|
|
4
|
-
`);return a?`${e}<${o.type}
|
|
5
|
-
${e} ${a}>
|
|
6
|
-
${i}
|
|
7
|
-
${e}</${o.type}>`:`${e}<${o.type}>
|
|
8
|
-
${i}
|
|
9
|
-
${e}</${o.type}>`}else return a?`${e}<${o.type}
|
|
10
|
-
${e} ${a} />`:`${e}<${o.type} />`};return`<Shader>
|
|
11
|
-
${t.components.map(o=>l(o)).join(`
|
|
12
|
-
`)}
|
|
13
|
-
</Shader>`}const b=["AngularBlur","Ascii","Blob","Blur","Bulge","CRTScreen","ChannelBlur","Checkerboard","ChromaFlow","ChromaticAberration","Circle","CursorTrail","DiffuseBlur","Dither","DotGrid","Duotone","FilmGrain","FloatingParticles","GlassTiles","Glow","Godrays","Grayscale","Grid","GridDistortion","Group","Halftone","HueShift","ImageTexture","Invert","LinearBlur","LinearGradient","Liquify","Pixelate","PolarCoordinates","Posterize","ProgressiveBlur","RadialGradient","RectangularCoordinates","Ripples","Saturation","SimplexNoise","SineWave","SolidColor","Spherize","Spiral","Strands","Stretch","Swirl","TiltShift","Tritone","Twirl","Vibrance","WaveDistortion","ZoomBlur"];Object.defineProperty(exports,"availableComponents",{enumerable:!0,get:function(){return b}});Object.defineProperty(exports,"generatePresetCode",{enumerable:!0,get:function(){return s}});
|