meno-astro 0.1.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.
@@ -0,0 +1,2921 @@
1
+ import {
2
+ COMMENT_STATUSES
3
+ } from "./chunk-LEMVUKVG.js";
4
+ import {
5
+ __esm
6
+ } from "./chunk-ZYQNHI3W.js";
7
+
8
+ // ../core/lib/shared/constants.ts
9
+ var SERVER_PORT, SERVE_PORT, NODE_TYPE;
10
+ var init_constants = __esm({
11
+ "../core/lib/shared/constants.ts"() {
12
+ "use strict";
13
+ SERVER_PORT = typeof process !== "undefined" && process.env?.PORT ? parseInt(process.env.PORT, 10) : 3e3;
14
+ SERVE_PORT = typeof process !== "undefined" && process.env?.MENO_SERVE_PORT ? parseInt(process.env.MENO_SERVE_PORT, 10) : 8080;
15
+ NODE_TYPE = {
16
+ NODE: "node",
17
+ COMPONENT: "component",
18
+ SLOT: "slot",
19
+ EMBED: "embed",
20
+ LINK: "link",
21
+ LOCALE_LIST: "locale-list",
22
+ LIST: "list"
23
+ };
24
+ }
25
+ });
26
+
27
+ // ../core/lib/shared/validation/schemas.ts
28
+ import { z } from "zod";
29
+ var BasePropTypeSchema, PropTypeSchema, I18nValueObjectSchema, BasePropDefinitionSchema, EnumsConfigSchema, ListItemSchemaSchema, ListPropDefinitionSchema, PropDefinitionSchema, StyleMappingSchema, BooleanMappingSchema, IfConditionSchema, LinkMappingSchema, HtmlMappingSchema, StyleObjectSchema, ResponsiveStyleObjectSchema, StyleValueSchema, InteractiveStyleRuleSchema, InteractiveStylesSchema, SlotMarkerSchema, ComponentNodeSchema, HtmlNodeSchema, ComponentInstanceNodeSchema, EmbedNodeSchema, LinkNodeSchema, LocaleListNodeSchema, ListNodeSchemaBasic, ScriptLoadModeSchema, LibraryPositionSchema, ScriptTypeSchema, JSLibraryConfigSchema, CSSLibraryConfigSchema, LibrariesConfigSchema, StructuredComponentDefinitionSchema, ComponentDefinitionSchema, I18nOrStringSchema, LibraryMergeModeSchema, PageLibrariesConfigSchema, CustomCodeConfigSchema, PageMetaDataBaseSchema, PageMetaDataSchema, LineRangeSchema, JSONPageSchema, PageDataWithComponentSchema, PageDataSchema, CMSFieldTypeSchema, CMSFieldDefinitionSchema, CMSClientDataStrategySchema, CMSClientDataConfigSchema, CMSSchemaSchema, CMSItemSchema, CMSDraftItemSchema, CMSFilterConditionSchema, CMSSortConfigSchema, CMSListQuerySchema, CMSListNodeSchema, PageCmsConfigSchema, PageMetaDataWithCMSSchema;
30
+ var init_schemas = __esm({
31
+ "../core/lib/shared/validation/schemas.ts"() {
32
+ "use strict";
33
+ init_constants();
34
+ BasePropTypeSchema = z.enum(["string", "select", "boolean", "number", "link", "file", "rich-text", "embed"]);
35
+ PropTypeSchema = z.enum(["string", "select", "boolean", "number", "link", "file", "rich-text", "embed", "list"]);
36
+ I18nValueObjectSchema = z.object({
37
+ _i18n: z.literal(true)
38
+ }).passthrough();
39
+ BasePropDefinitionSchema = z.object({
40
+ type: BasePropTypeSchema,
41
+ default: z.union([
42
+ z.string(),
43
+ z.number(),
44
+ z.boolean(),
45
+ z.object({ href: z.string(), target: z.string().optional() }),
46
+ I18nValueObjectSchema
47
+ ]).optional(),
48
+ options: z.array(z.string()).readonly().optional(),
49
+ enumName: z.string().optional(),
50
+ // For 'select' type: reference to project-level enum
51
+ accept: z.string().optional(),
52
+ // For 'file' type: MIME pattern like "image/*", "video/*"
53
+ editor: z.enum(["basic", "extended"]).optional()
54
+ // For 'rich-text' type: which editor to use
55
+ }).passthrough();
56
+ EnumsConfigSchema = z.record(z.string(), z.array(z.string()));
57
+ ListItemSchemaSchema = z.record(z.string(), BasePropDefinitionSchema);
58
+ ListPropDefinitionSchema = z.object({
59
+ type: z.literal("list"),
60
+ itemSchema: ListItemSchemaSchema,
61
+ // List-item field values can be any primitive, a link object, an `_i18n`
62
+ // object (resolved by the SSR pipeline), or null.
63
+ default: z.array(z.record(z.string(), z.union([
64
+ z.string(),
65
+ z.number(),
66
+ z.boolean(),
67
+ z.object({ href: z.string(), target: z.string().optional() }),
68
+ I18nValueObjectSchema,
69
+ z.null()
70
+ ]))).optional()
71
+ }).passthrough();
72
+ PropDefinitionSchema = z.union([
73
+ ListPropDefinitionSchema,
74
+ BasePropDefinitionSchema
75
+ ]);
76
+ StyleMappingSchema = z.object({
77
+ _mapping: z.literal(true),
78
+ prop: z.string(),
79
+ values: z.record(z.string(), z.union([z.string(), z.number()]))
80
+ }).passthrough();
81
+ BooleanMappingSchema = z.object({
82
+ _mapping: z.literal(true),
83
+ prop: z.string(),
84
+ values: z.record(z.string(), z.boolean())
85
+ }).passthrough();
86
+ IfConditionSchema = z.union([
87
+ z.boolean(),
88
+ z.string(),
89
+ BooleanMappingSchema
90
+ ]);
91
+ LinkMappingSchema = z.object({
92
+ _mapping: z.literal(true),
93
+ prop: z.string(),
94
+ values: z.record(z.string(), z.object({
95
+ href: z.string(),
96
+ target: z.string().optional()
97
+ })).optional()
98
+ }).passthrough();
99
+ HtmlMappingSchema = z.object({
100
+ _mapping: z.literal(true),
101
+ prop: z.string(),
102
+ values: z.record(z.string(), z.string()).optional()
103
+ }).passthrough();
104
+ StyleObjectSchema = z.record(
105
+ z.string(),
106
+ z.union([
107
+ z.string(),
108
+ z.number(),
109
+ StyleMappingSchema
110
+ ])
111
+ );
112
+ ResponsiveStyleObjectSchema = z.object({
113
+ base: StyleObjectSchema.optional(),
114
+ tablet: StyleObjectSchema.optional(),
115
+ mobile: StyleObjectSchema.optional()
116
+ }).passthrough();
117
+ StyleValueSchema = z.union([
118
+ StyleObjectSchema,
119
+ ResponsiveStyleObjectSchema
120
+ ]);
121
+ InteractiveStyleRuleSchema = z.object({
122
+ name: z.string().optional(),
123
+ prefix: z.string().optional(),
124
+ postfix: z.string().optional(),
125
+ style: StyleValueSchema,
126
+ previewProp: z.string().optional()
127
+ });
128
+ InteractiveStylesSchema = z.array(InteractiveStyleRuleSchema);
129
+ SlotMarkerSchema = z.lazy(() => z.object({
130
+ type: z.literal(NODE_TYPE.SLOT),
131
+ default: z.union([
132
+ z.array(z.union([ComponentNodeSchema, z.string(), I18nValueObjectSchema])),
133
+ z.string(),
134
+ I18nValueObjectSchema
135
+ ]).optional()
136
+ }).passthrough());
137
+ HtmlNodeSchema = z.lazy(() => z.object({
138
+ type: z.literal(NODE_TYPE.NODE),
139
+ tag: z.string(),
140
+ label: z.string().optional(),
141
+ if: IfConditionSchema.optional(),
142
+ style: StyleValueSchema.optional(),
143
+ interactiveStyles: InteractiveStylesSchema.optional(),
144
+ generateElementClass: z.boolean().optional(),
145
+ attributes: z.record(z.string(), z.union([z.string(), z.number(), z.boolean(), I18nValueObjectSchema])).optional(),
146
+ props: z.record(z.string(), z.any()).optional(),
147
+ // Allow props for backward compatibility
148
+ children: z.union([
149
+ z.array(z.union([ComponentNodeSchema, z.string(), I18nValueObjectSchema])),
150
+ z.string(),
151
+ I18nValueObjectSchema
152
+ ]).optional()
153
+ }).passthrough());
154
+ ComponentInstanceNodeSchema = z.lazy(() => z.object({
155
+ type: z.literal(NODE_TYPE.COMPONENT),
156
+ component: z.string(),
157
+ label: z.string().optional(),
158
+ if: IfConditionSchema.optional(),
159
+ props: z.record(z.string(), z.any()).optional(),
160
+ style: StyleValueSchema.optional(),
161
+ interactiveStyles: InteractiveStylesSchema.optional(),
162
+ generateElementClass: z.boolean().optional(),
163
+ attributes: z.record(z.string(), z.union([z.string(), z.number(), z.boolean(), I18nValueObjectSchema])).optional(),
164
+ children: z.union([
165
+ z.array(z.union([ComponentNodeSchema, z.string(), I18nValueObjectSchema])),
166
+ z.string(),
167
+ I18nValueObjectSchema
168
+ ]).optional()
169
+ }).passthrough());
170
+ EmbedNodeSchema = z.lazy(() => z.object({
171
+ type: z.literal(NODE_TYPE.EMBED),
172
+ html: z.union([z.string(), HtmlMappingSchema, I18nValueObjectSchema]),
173
+ label: z.string().optional(),
174
+ if: IfConditionSchema.optional(),
175
+ style: StyleValueSchema.optional(),
176
+ interactiveStyles: InteractiveStylesSchema.optional(),
177
+ generateElementClass: z.boolean().optional(),
178
+ attributes: z.record(z.string(), z.union([z.string(), z.number(), z.boolean(), I18nValueObjectSchema])).optional()
179
+ }).passthrough());
180
+ LinkNodeSchema = z.lazy(() => z.object({
181
+ type: z.literal(NODE_TYPE.LINK),
182
+ href: z.union([z.string(), LinkMappingSchema, I18nValueObjectSchema]),
183
+ label: z.string().optional(),
184
+ if: IfConditionSchema.optional(),
185
+ style: StyleValueSchema.optional(),
186
+ interactiveStyles: InteractiveStylesSchema.optional(),
187
+ generateElementClass: z.boolean().optional(),
188
+ attributes: z.record(z.string(), z.union([z.string(), z.number(), z.boolean(), I18nValueObjectSchema])).optional(),
189
+ children: z.union([
190
+ z.array(z.union([ComponentNodeSchema, z.string(), I18nValueObjectSchema])),
191
+ z.string(),
192
+ I18nValueObjectSchema
193
+ ]).optional()
194
+ }).passthrough());
195
+ LocaleListNodeSchema = z.lazy(() => z.object({
196
+ type: z.literal(NODE_TYPE.LOCALE_LIST),
197
+ label: z.string().optional(),
198
+ if: IfConditionSchema.optional(),
199
+ style: StyleValueSchema.optional(),
200
+ interactiveStyles: InteractiveStylesSchema.optional(),
201
+ generateElementClass: z.boolean().optional(),
202
+ itemStyle: StyleValueSchema.optional(),
203
+ activeItemStyle: StyleValueSchema.optional(),
204
+ separatorStyle: StyleValueSchema.optional(),
205
+ showCurrent: z.boolean().optional(),
206
+ showSeparator: z.boolean().optional(),
207
+ showFlag: z.boolean().optional(),
208
+ flagStyle: StyleValueSchema.optional(),
209
+ attributes: z.record(z.string(), z.union([z.string(), z.number(), z.boolean(), I18nValueObjectSchema])).optional()
210
+ }).passthrough());
211
+ ListNodeSchemaBasic = z.lazy(() => z.object({
212
+ type: z.union([z.literal(NODE_TYPE.LIST), z.literal("cms-list")]),
213
+ // Support both for migration
214
+ sourceType: z.enum(["prop", "collection"]).optional(),
215
+ // defaults to 'prop'
216
+ source: z.string().optional(),
217
+ // Source prop name or collection name
218
+ collection: z.string().optional(),
219
+ // Legacy field for cms-list migration
220
+ label: z.string().optional(),
221
+ if: IfConditionSchema.optional(),
222
+ itemAs: z.string().optional(),
223
+ // Collection-specific options
224
+ items: z.union([z.string(), z.array(z.string())]).optional(),
225
+ filter: z.unknown().optional(),
226
+ sort: z.unknown().optional(),
227
+ limit: z.number().optional(),
228
+ offset: z.number().optional(),
229
+ excludeCurrentItem: z.boolean().optional(),
230
+ emitTemplate: z.boolean().optional(),
231
+ children: z.array(z.union([ComponentNodeSchema, z.string(), I18nValueObjectSchema])).optional()
232
+ }).passthrough());
233
+ ComponentNodeSchema = z.union([
234
+ HtmlNodeSchema,
235
+ ComponentInstanceNodeSchema,
236
+ SlotMarkerSchema,
237
+ EmbedNodeSchema,
238
+ LinkNodeSchema,
239
+ LocaleListNodeSchema,
240
+ ListNodeSchemaBasic
241
+ ]);
242
+ ScriptLoadModeSchema = z.enum(["async", "defer"]);
243
+ LibraryPositionSchema = z.enum(["head", "body-end"]);
244
+ ScriptTypeSchema = z.enum(["classic", "module"]);
245
+ JSLibraryConfigSchema = z.object({
246
+ url: z.string().min(1),
247
+ mode: ScriptLoadModeSchema.optional(),
248
+ position: LibraryPositionSchema.optional(),
249
+ type: ScriptTypeSchema.optional()
250
+ }).passthrough();
251
+ CSSLibraryConfigSchema = z.object({
252
+ url: z.string().min(1),
253
+ media: z.string().optional(),
254
+ inline: z.boolean().optional()
255
+ }).passthrough();
256
+ LibrariesConfigSchema = z.object({
257
+ js: z.array(JSLibraryConfigSchema).optional(),
258
+ css: z.array(CSSLibraryConfigSchema).optional()
259
+ }).passthrough();
260
+ StructuredComponentDefinitionSchema = z.object({
261
+ interface: z.record(z.string(), PropDefinitionSchema).optional(),
262
+ structure: ComponentNodeSchema.optional(),
263
+ javascript: z.string().optional(),
264
+ css: z.string().optional(),
265
+ category: z.string().optional(),
266
+ libraries: LibrariesConfigSchema.optional(),
267
+ acceptsStyles: z.boolean().optional()
268
+ }).passthrough();
269
+ ComponentDefinitionSchema = z.union([
270
+ // New format: { component: {...} }
271
+ z.object({
272
+ component: StructuredComponentDefinitionSchema
273
+ }).passthrough(),
274
+ // Legacy format: { type, props?, children?, component }
275
+ z.object({
276
+ type: z.string(),
277
+ props: z.record(z.string(), z.any()).optional(),
278
+ children: z.array(z.any()).optional(),
279
+ component: StructuredComponentDefinitionSchema
280
+ }).passthrough()
281
+ ]);
282
+ I18nOrStringSchema = z.union([
283
+ z.string(),
284
+ z.object({
285
+ _i18n: z.literal(true)
286
+ }).passthrough()
287
+ ]);
288
+ LibraryMergeModeSchema = z.enum(["extend", "replace"]);
289
+ PageLibrariesConfigSchema = z.object({
290
+ js: z.array(JSLibraryConfigSchema).optional(),
291
+ css: z.array(CSSLibraryConfigSchema).optional(),
292
+ mode: LibraryMergeModeSchema.optional()
293
+ }).passthrough();
294
+ CustomCodeConfigSchema = z.object({
295
+ head: z.string().optional(),
296
+ bodyStart: z.string().optional(),
297
+ bodyEnd: z.string().optional()
298
+ }).passthrough();
299
+ PageMetaDataBaseSchema = z.object({
300
+ title: I18nOrStringSchema.optional(),
301
+ description: I18nOrStringSchema.optional(),
302
+ keywords: I18nOrStringSchema.optional(),
303
+ ogTitle: I18nOrStringSchema.optional(),
304
+ ogDescription: I18nOrStringSchema.optional(),
305
+ ogImage: z.string().optional(),
306
+ ogType: z.string().optional(),
307
+ slugs: z.record(z.string(), z.string()).optional(),
308
+ draft: z.boolean().optional(),
309
+ libraries: PageLibrariesConfigSchema.optional(),
310
+ customCode: CustomCodeConfigSchema.optional()
311
+ }).passthrough();
312
+ PageMetaDataSchema = PageMetaDataBaseSchema;
313
+ LineRangeSchema = z.object({
314
+ startLine: z.number(),
315
+ endLine: z.number()
316
+ });
317
+ JSONPageSchema = z.object({
318
+ components: z.record(z.string(), ComponentDefinitionSchema).optional(),
319
+ root: ComponentNodeSchema.optional(),
320
+ meta: PageMetaDataSchema.optional(),
321
+ _lineMap: z.record(z.string(), LineRangeSchema).optional()
322
+ }).passthrough().refine((data) => {
323
+ return data.meta !== void 0 || data.components !== void 0 || data.root !== void 0;
324
+ }, {
325
+ message: "JSONPage must have at least one of: meta, components, or root"
326
+ });
327
+ PageDataWithComponentSchema = z.object({
328
+ component: z.object({
329
+ structure: ComponentNodeSchema.optional(),
330
+ interface: z.record(z.string(), PropDefinitionSchema).optional(),
331
+ javascript: z.string().optional(),
332
+ css: z.string().optional(),
333
+ acceptsStyles: z.boolean().optional()
334
+ }).passthrough()
335
+ }).passthrough();
336
+ PageDataSchema = z.union([
337
+ PageDataWithComponentSchema,
338
+ JSONPageSchema
339
+ ]);
340
+ CMSFieldTypeSchema = z.enum([
341
+ "string",
342
+ "text",
343
+ "rich-text",
344
+ "number",
345
+ "boolean",
346
+ "image",
347
+ "file",
348
+ "date",
349
+ "select",
350
+ "reference"
351
+ ]);
352
+ CMSFieldDefinitionSchema = z.object({
353
+ type: CMSFieldTypeSchema,
354
+ required: z.boolean().optional(),
355
+ default: z.unknown().optional(),
356
+ label: z.string().optional(),
357
+ description: z.string().optional(),
358
+ options: z.array(z.string()).optional(),
359
+ accept: z.string().optional(),
360
+ collection: z.string().optional(),
361
+ multiple: z.boolean().optional()
362
+ }).passthrough();
363
+ CMSClientDataStrategySchema = z.enum(["auto", "inline", "static"]);
364
+ CMSClientDataConfigSchema = z.object({
365
+ enabled: z.boolean(),
366
+ strategy: CMSClientDataStrategySchema,
367
+ threshold: z.number().positive().optional(),
368
+ fields: z.array(z.string()).optional()
369
+ }).passthrough();
370
+ CMSSchemaSchema = z.object({
371
+ id: z.string(),
372
+ name: z.string(),
373
+ slugField: z.string(),
374
+ urlPattern: z.string(),
375
+ fields: z.record(CMSFieldDefinitionSchema),
376
+ clientData: CMSClientDataConfigSchema.optional()
377
+ }).passthrough();
378
+ CMSItemSchema = z.object({
379
+ _id: z.string(),
380
+ _slug: z.string().optional(),
381
+ _filename: z.string().optional(),
382
+ _createdAt: z.string().optional()
383
+ }).passthrough();
384
+ CMSDraftItemSchema = z.object({
385
+ _id: z.string().optional(),
386
+ _slug: z.string().optional(),
387
+ _filename: z.string().optional(),
388
+ _createdAt: z.string().optional()
389
+ }).passthrough();
390
+ CMSFilterConditionSchema = z.object({
391
+ field: z.string(),
392
+ operator: z.enum(["eq", "neq", "gt", "gte", "lt", "lte", "contains", "in"]).optional(),
393
+ value: z.unknown()
394
+ });
395
+ CMSSortConfigSchema = z.object({
396
+ field: z.string(),
397
+ order: z.enum(["asc", "desc"]).optional()
398
+ });
399
+ CMSListQuerySchema = z.object({
400
+ collection: z.string(),
401
+ filter: z.union([
402
+ CMSFilterConditionSchema,
403
+ z.array(CMSFilterConditionSchema),
404
+ z.record(z.unknown())
405
+ ]).optional(),
406
+ sort: z.union([CMSSortConfigSchema, z.array(CMSSortConfigSchema)]).optional(),
407
+ limit: z.number().positive().optional(),
408
+ offset: z.number().nonnegative().optional()
409
+ });
410
+ CMSListNodeSchema = z.object({
411
+ type: z.literal("cms-list"),
412
+ collection: z.string(),
413
+ if: IfConditionSchema.optional(),
414
+ itemAs: z.string().optional(),
415
+ items: z.union([z.string(), z.array(z.string())]).optional(),
416
+ filter: z.union([
417
+ CMSFilterConditionSchema,
418
+ z.array(CMSFilterConditionSchema),
419
+ z.record(z.unknown())
420
+ ]).optional(),
421
+ sort: z.union([CMSSortConfigSchema, z.array(CMSSortConfigSchema)]).optional(),
422
+ limit: z.number().positive().optional(),
423
+ offset: z.number().nonnegative().optional(),
424
+ excludeCurrentItem: z.boolean().optional(),
425
+ children: z.array(z.unknown()).optional()
426
+ }).passthrough();
427
+ PageCmsConfigSchema = z.object({
428
+ id: z.string(),
429
+ name: z.string(),
430
+ slugField: z.string(),
431
+ urlPattern: z.string(),
432
+ fields: z.record(CMSFieldDefinitionSchema)
433
+ }).passthrough();
434
+ PageMetaDataWithCMSSchema = z.object({
435
+ title: z.union([z.string(), z.object({ _i18n: z.literal(true) }).passthrough()]).optional(),
436
+ description: z.union([z.string(), z.object({ _i18n: z.literal(true) }).passthrough()]).optional(),
437
+ keywords: z.union([z.string(), z.object({ _i18n: z.literal(true) }).passthrough()]).optional(),
438
+ ogTitle: z.union([z.string(), z.object({ _i18n: z.literal(true) }).passthrough()]).optional(),
439
+ ogDescription: z.union([z.string(), z.object({ _i18n: z.literal(true) }).passthrough()]).optional(),
440
+ ogImage: z.string().optional(),
441
+ ogType: z.string().optional(),
442
+ slugs: z.record(z.string(), z.string()).optional(),
443
+ source: z.enum(["static", "cms"]).optional(),
444
+ cms: PageCmsConfigSchema.optional(),
445
+ draft: z.boolean().optional(),
446
+ libraries: PageLibrariesConfigSchema.optional(),
447
+ customCode: CustomCodeConfigSchema.optional()
448
+ }).passthrough();
449
+ }
450
+ });
451
+
452
+ // ../core/lib/shared/registry/ComponentRegistry.ts
453
+ var init_ComponentRegistry = __esm({
454
+ "../core/lib/shared/registry/ComponentRegistry.ts"() {
455
+ "use strict";
456
+ }
457
+ });
458
+
459
+ // ../core/lib/shared/registry/ClientRegistry.ts
460
+ var init_ClientRegistry = __esm({
461
+ "../core/lib/shared/registry/ClientRegistry.ts"() {
462
+ "use strict";
463
+ init_ComponentRegistry();
464
+ }
465
+ });
466
+
467
+ // ../core/lib/shared/registry/SSRRegistry.ts
468
+ var init_SSRRegistry = __esm({
469
+ "../core/lib/shared/registry/SSRRegistry.ts"() {
470
+ "use strict";
471
+ init_ComponentRegistry();
472
+ }
473
+ });
474
+
475
+ // ../core/lib/shared/registry/RegistryManager.ts
476
+ var init_RegistryManager = __esm({
477
+ "../core/lib/shared/registry/RegistryManager.ts"() {
478
+ "use strict";
479
+ init_ClientRegistry();
480
+ init_SSRRegistry();
481
+ }
482
+ });
483
+
484
+ // ../core/lib/shared/registry/BaseNodeTypeRegistry.ts
485
+ var BaseNodeTypeRegistry;
486
+ var init_BaseNodeTypeRegistry = __esm({
487
+ "../core/lib/shared/registry/BaseNodeTypeRegistry.ts"() {
488
+ "use strict";
489
+ BaseNodeTypeRegistry = class {
490
+ registry = /* @__PURE__ */ new Map();
491
+ listeners = /* @__PURE__ */ new Set();
492
+ nodeTypeCache = /* @__PURE__ */ new WeakMap();
493
+ /**
494
+ * Register a node type definition
495
+ */
496
+ register(definition) {
497
+ if (!definition.type) {
498
+ throw new Error("Node type definition must have a type");
499
+ }
500
+ this.registry.set(definition.type, definition);
501
+ this.nodeTypeCache = /* @__PURE__ */ new WeakMap();
502
+ this.notify();
503
+ }
504
+ /**
505
+ * Register multiple node type definitions at once
506
+ */
507
+ registerAll(definitions) {
508
+ for (const definition of definitions) {
509
+ if (!definition.type) {
510
+ throw new Error("Node type definition must have a type");
511
+ }
512
+ this.registry.set(definition.type, definition);
513
+ }
514
+ this.nodeTypeCache = /* @__PURE__ */ new WeakMap();
515
+ this.notify();
516
+ }
517
+ /**
518
+ * Get a node type definition by type string
519
+ */
520
+ get(type) {
521
+ return this.registry.get(type);
522
+ }
523
+ /**
524
+ * Check if a node type is registered
525
+ */
526
+ has(type) {
527
+ return this.registry.has(type);
528
+ }
529
+ /**
530
+ * Get all registered node types
531
+ */
532
+ getAll() {
533
+ return Array.from(this.registry.values());
534
+ }
535
+ /**
536
+ * Get node types by category
537
+ */
538
+ getByCategory(category) {
539
+ return this.getAll().filter((def) => def.category === category);
540
+ }
541
+ /**
542
+ * Get list of registered type names
543
+ */
544
+ getNames() {
545
+ return Array.from(this.registry.keys());
546
+ }
547
+ /**
548
+ * Find node type definition by node object using type guards
549
+ * Uses WeakMap caching for performance
550
+ */
551
+ findByNode(node) {
552
+ if (!node || typeof node !== "object") {
553
+ return void 0;
554
+ }
555
+ const cached = this.nodeTypeCache.get(node);
556
+ if (cached !== void 0) {
557
+ return cached || void 0;
558
+ }
559
+ for (const definition of this.registry.values()) {
560
+ if (definition.typeGuard(node)) {
561
+ this.nodeTypeCache.set(node, definition);
562
+ return definition;
563
+ }
564
+ }
565
+ this.nodeTypeCache.set(node, null);
566
+ return void 0;
567
+ }
568
+ /**
569
+ * Check if a node matches a specific type
570
+ * More efficient than findByNode when you know the type
571
+ */
572
+ isType(node, type) {
573
+ const definition = this.registry.get(type);
574
+ if (!definition) {
575
+ return false;
576
+ }
577
+ return definition.typeGuard(node);
578
+ }
579
+ /**
580
+ * Get node label info for tree display
581
+ */
582
+ getNodeLabel(node) {
583
+ const definition = this.findByNode(node);
584
+ if (!definition) {
585
+ return void 0;
586
+ }
587
+ return {
588
+ label: definition.treeDisplay.getLabel(node),
589
+ icon: definition.treeDisplay.icon
590
+ };
591
+ }
592
+ /**
593
+ * Get default node for a type
594
+ */
595
+ createDefault(type) {
596
+ const definition = this.registry.get(type);
597
+ if (!definition) {
598
+ return void 0;
599
+ }
600
+ return definition.defaultFactory();
601
+ }
602
+ /**
603
+ * Remove a node type by type string
604
+ */
605
+ remove(type) {
606
+ if (this.has(type)) {
607
+ this.registry.delete(type);
608
+ this.nodeTypeCache = /* @__PURE__ */ new WeakMap();
609
+ this.notify();
610
+ return true;
611
+ }
612
+ return false;
613
+ }
614
+ /**
615
+ * Clear all registered node types
616
+ */
617
+ clear() {
618
+ this.registry.clear();
619
+ this.nodeTypeCache = /* @__PURE__ */ new WeakMap();
620
+ this.notify();
621
+ }
622
+ /**
623
+ * Subscribe to registry changes. Returns an unsubscribe function.
624
+ */
625
+ subscribe(listener) {
626
+ this.listeners.add(listener);
627
+ return () => {
628
+ this.listeners.delete(listener);
629
+ };
630
+ }
631
+ /**
632
+ * Get the number of registered node types
633
+ */
634
+ get size() {
635
+ return this.registry.size;
636
+ }
637
+ notify() {
638
+ for (const listener of this.listeners) {
639
+ try {
640
+ listener();
641
+ } catch {
642
+ }
643
+ }
644
+ }
645
+ };
646
+ }
647
+ });
648
+
649
+ // ../core/lib/shared/registry/ClientNodeTypeRegistry.ts
650
+ var ClientNodeTypeRegistry;
651
+ var init_ClientNodeTypeRegistry = __esm({
652
+ "../core/lib/shared/registry/ClientNodeTypeRegistry.ts"() {
653
+ "use strict";
654
+ init_BaseNodeTypeRegistry();
655
+ ClientNodeTypeRegistry = class extends BaseNodeTypeRegistry {
656
+ /**
657
+ * Render a node using the registered renderer
658
+ * Returns null if no renderer is found for the node type
659
+ */
660
+ renderNode(node, context) {
661
+ const definition = this.findByNode(node);
662
+ if (!definition) {
663
+ return null;
664
+ }
665
+ return definition.clientRenderer(node, context);
666
+ }
667
+ /**
668
+ * Check if a node can be rendered by this registry
669
+ */
670
+ canRender(node) {
671
+ return this.findByNode(node) !== void 0;
672
+ }
673
+ };
674
+ }
675
+ });
676
+
677
+ // ../core/lib/shared/registry/SSRNodeTypeRegistry.ts
678
+ var SSRNodeTypeRegistry;
679
+ var init_SSRNodeTypeRegistry = __esm({
680
+ "../core/lib/shared/registry/SSRNodeTypeRegistry.ts"() {
681
+ "use strict";
682
+ init_BaseNodeTypeRegistry();
683
+ SSRNodeTypeRegistry = class extends BaseNodeTypeRegistry {
684
+ /**
685
+ * Render a node to HTML string using the registered renderer
686
+ * Returns empty string if no renderer is found for the node type
687
+ */
688
+ renderNode(node, context) {
689
+ const definition = this.findByNode(node);
690
+ if (!definition) {
691
+ return "";
692
+ }
693
+ return definition.ssrRenderer(node, context);
694
+ }
695
+ /**
696
+ * Check if a node can be rendered by this registry
697
+ */
698
+ canRender(node) {
699
+ return this.findByNode(node) !== void 0;
700
+ }
701
+ };
702
+ }
703
+ });
704
+
705
+ // ../core/lib/shared/registry/NodeTypeManager.ts
706
+ var NodeTypeManager, globalNodeTypeManager;
707
+ var init_NodeTypeManager = __esm({
708
+ "../core/lib/shared/registry/NodeTypeManager.ts"() {
709
+ "use strict";
710
+ init_ClientNodeTypeRegistry();
711
+ init_SSRNodeTypeRegistry();
712
+ NodeTypeManager = class {
713
+ clientRegistry;
714
+ ssrRegistry;
715
+ constructor() {
716
+ this.clientRegistry = new ClientNodeTypeRegistry();
717
+ this.ssrRegistry = new SSRNodeTypeRegistry();
718
+ }
719
+ /**
720
+ * Get the client-side registry
721
+ */
722
+ getClient() {
723
+ return this.clientRegistry;
724
+ }
725
+ /**
726
+ * Get the SSR registry
727
+ */
728
+ getSSR() {
729
+ return this.ssrRegistry;
730
+ }
731
+ /**
732
+ * Register a node type in both registries
733
+ */
734
+ register(definition) {
735
+ this.clientRegistry.register(definition);
736
+ this.ssrRegistry.register(definition);
737
+ }
738
+ /**
739
+ * Register multiple node types in both registries
740
+ */
741
+ registerAll(definitions) {
742
+ this.clientRegistry.registerAll(definitions);
743
+ this.ssrRegistry.registerAll(definitions);
744
+ }
745
+ /**
746
+ * Check if a node type is registered
747
+ */
748
+ has(type) {
749
+ return this.clientRegistry.has(type);
750
+ }
751
+ /**
752
+ * Get a node type definition
753
+ */
754
+ get(type) {
755
+ return this.clientRegistry.get(type);
756
+ }
757
+ /**
758
+ * Get all registered node types
759
+ */
760
+ getAll() {
761
+ return this.clientRegistry.getAll();
762
+ }
763
+ /**
764
+ * Get list of registered type names
765
+ */
766
+ getNames() {
767
+ return this.clientRegistry.getNames();
768
+ }
769
+ /**
770
+ * Clear both registries
771
+ */
772
+ clear() {
773
+ this.clientRegistry.clear();
774
+ this.ssrRegistry.clear();
775
+ }
776
+ };
777
+ globalNodeTypeManager = new NodeTypeManager();
778
+ }
779
+ });
780
+
781
+ // ../core/lib/shared/registry/defineNodeType.ts
782
+ var init_defineNodeType = __esm({
783
+ "../core/lib/shared/registry/defineNodeType.ts"() {
784
+ "use strict";
785
+ }
786
+ });
787
+
788
+ // ../core/lib/shared/registry/createNodeType.ts
789
+ function createTypeGuard(typeValue) {
790
+ return (node) => node !== null && typeof node === "object" && "type" in node && node.type === typeValue;
791
+ }
792
+ function createNodeType(input) {
793
+ if (!input.type) {
794
+ throw new Error("Node type definition must have a type");
795
+ }
796
+ if (!input.displayName) {
797
+ throw new Error("Node type definition must have a displayName");
798
+ }
799
+ if (!input.schema) {
800
+ throw new Error("Node type definition must have a schema");
801
+ }
802
+ if (!input.clientRenderer) {
803
+ throw new Error("Node type definition must have a clientRenderer");
804
+ }
805
+ if (!input.ssrRenderer) {
806
+ throw new Error("Node type definition must have an ssrRenderer");
807
+ }
808
+ if (!input.treeDisplay) {
809
+ throw new Error("Node type definition must have treeDisplay");
810
+ }
811
+ return {
812
+ type: input.type,
813
+ displayName: input.displayName,
814
+ category: input.category ?? "core",
815
+ schema: input.schema,
816
+ // Auto-generated type guard
817
+ typeGuard: createTypeGuard(input.type),
818
+ // Auto-generated default factory
819
+ defaultFactory: () => ({
820
+ type: input.type,
821
+ ...input.defaultValues
822
+ }),
823
+ treeDisplay: {
824
+ icon: input.treeDisplay.icon,
825
+ getLabel: input.treeDisplay.getLabel ?? (() => input.displayName)
826
+ },
827
+ clientRenderer: input.clientRenderer,
828
+ ssrRenderer: input.ssrRenderer,
829
+ propsEditor: input.propsEditor,
830
+ editableFields: input.editableFields,
831
+ capabilities: {
832
+ ...DEFAULT_CAPABILITIES,
833
+ ...input.capabilities
834
+ }
835
+ };
836
+ }
837
+ var DEFAULT_CAPABILITIES;
838
+ var init_createNodeType = __esm({
839
+ "../core/lib/shared/registry/createNodeType.ts"() {
840
+ "use strict";
841
+ DEFAULT_CAPABILITIES = {
842
+ canHaveChildren: true,
843
+ canHaveStyle: true,
844
+ canHaveAttributes: true,
845
+ canBeNested: true,
846
+ requiresProps: []
847
+ };
848
+ }
849
+ });
850
+
851
+ // ../core/lib/shared/registry/fieldPresets.ts
852
+ var urlField, textareaField;
853
+ var init_fieldPresets = __esm({
854
+ "../core/lib/shared/registry/fieldPresets.ts"() {
855
+ "use strict";
856
+ urlField = (config) => ({
857
+ name: config.name,
858
+ label: config.label,
859
+ type: "url",
860
+ required: config.required,
861
+ placeholder: config.placeholder ?? "https://...",
862
+ group: config.group
863
+ });
864
+ textareaField = (config) => ({
865
+ name: config.name,
866
+ label: config.label,
867
+ type: "text",
868
+ required: config.required,
869
+ placeholder: config.placeholder,
870
+ group: config.group
871
+ });
872
+ }
873
+ });
874
+
875
+ // ../core/lib/shared/registry/nodeTypes/HtmlNodeType.ts
876
+ import { z as z4 } from "zod";
877
+ import { createElement as h } from "react";
878
+ var ComponentNodeSchemaRef, HtmlNodeSchemaInternal, HtmlNodeType;
879
+ var init_HtmlNodeType = __esm({
880
+ "../core/lib/shared/registry/nodeTypes/HtmlNodeType.ts"() {
881
+ "use strict";
882
+ init_schemas();
883
+ init_createNodeType();
884
+ ComponentNodeSchemaRef = z4.lazy(() => z4.any());
885
+ HtmlNodeSchemaInternal = z4.object({
886
+ type: z4.literal("node"),
887
+ tag: z4.string(),
888
+ label: z4.string().optional(),
889
+ // Custom label displayed in structure tree
890
+ if: IfConditionSchema.optional(),
891
+ // Conditional rendering - skip node when false
892
+ style: StyleValueSchema.optional(),
893
+ interactiveStyles: InteractiveStylesSchema.optional(),
894
+ // Interactive CSS rules (hover, active, etc.)
895
+ generateElementClass: z4.boolean().optional(),
896
+ // Generate element class without styles (for custom CSS)
897
+ attributes: z4.record(z4.string(), z4.union([z4.string(), z4.number(), z4.boolean()])).optional(),
898
+ props: z4.record(z4.string(), z4.any()).optional(),
899
+ // Backward compatibility
900
+ children: z4.union([
901
+ z4.array(z4.union([ComponentNodeSchemaRef, z4.string()])),
902
+ z4.string()
903
+ ]).optional()
904
+ }).passthrough();
905
+ HtmlNodeType = createNodeType({
906
+ type: "node",
907
+ displayName: "HTML Element",
908
+ category: "core",
909
+ schema: HtmlNodeSchemaInternal,
910
+ defaultValues: {
911
+ tag: "div",
912
+ style: { base: {} },
913
+ children: []
914
+ },
915
+ treeDisplay: {
916
+ icon: "HTML_ELEMENT",
917
+ getLabel: (node) => node.tag
918
+ },
919
+ clientRenderer: (node, context) => {
920
+ const props = { key: context.key };
921
+ if (node.tag === "form") {
922
+ props.onSubmit = (e) => e.preventDefault();
923
+ }
924
+ const voidElements = ["img", "br", "hr", "input", "meta", "link", "area", "base", "col", "embed", "param", "source", "track", "wbr"];
925
+ if (voidElements.includes(node.tag.toLowerCase())) {
926
+ return h(node.tag, props);
927
+ }
928
+ const children = context.buildChildren(
929
+ node.children,
930
+ context.elementPath,
931
+ context.parentComponentName,
932
+ context.componentContext
933
+ );
934
+ return h(node.tag, props, children);
935
+ },
936
+ ssrRenderer: (node, context) => {
937
+ const childrenHTML = context.renderChildren(node.children, context);
938
+ const voidElements = ["img", "br", "hr", "input", "meta", "link", "area", "base", "col", "embed", "param", "source", "track", "wbr"];
939
+ if (voidElements.includes(node.tag.toLowerCase())) {
940
+ return `<${node.tag} />`;
941
+ }
942
+ return `<${node.tag}>${childrenHTML}</${node.tag}>`;
943
+ },
944
+ capabilities: {
945
+ canHaveChildren: true,
946
+ requiresProps: ["tag"]
947
+ }
948
+ });
949
+ }
950
+ });
951
+
952
+ // ../core/lib/shared/registry/nodeTypes/ComponentInstanceNodeType.ts
953
+ import { z as z5 } from "zod";
954
+ import { createElement as h2 } from "react";
955
+ var ComponentNodeSchemaRef2, ComponentInstanceNodeSchemaInternal, ComponentInstanceNodeType;
956
+ var init_ComponentInstanceNodeType = __esm({
957
+ "../core/lib/shared/registry/nodeTypes/ComponentInstanceNodeType.ts"() {
958
+ "use strict";
959
+ init_schemas();
960
+ init_createNodeType();
961
+ ComponentNodeSchemaRef2 = z5.lazy(() => z5.any());
962
+ ComponentInstanceNodeSchemaInternal = z5.object({
963
+ type: z5.literal("component"),
964
+ component: z5.string(),
965
+ label: z5.string().optional(),
966
+ // Custom label displayed in structure tree
967
+ if: IfConditionSchema.optional(),
968
+ // Conditional rendering - skip node when false
969
+ props: z5.record(z5.string(), z5.any()).optional(),
970
+ style: StyleValueSchema.optional(),
971
+ interactiveStyles: InteractiveStylesSchema.optional(),
972
+ // Interactive CSS rules (hover, active, etc.)
973
+ generateElementClass: z5.boolean().optional(),
974
+ // Generate element class without styles (for custom CSS)
975
+ attributes: z5.record(z5.string(), z5.union([z5.string(), z5.number(), z5.boolean()])).optional(),
976
+ children: z5.union([
977
+ z5.array(z5.union([ComponentNodeSchemaRef2, z5.string()])),
978
+ z5.string()
979
+ ]).optional()
980
+ }).passthrough();
981
+ ComponentInstanceNodeType = createNodeType({
982
+ type: "component",
983
+ displayName: "Component",
984
+ category: "core",
985
+ schema: ComponentInstanceNodeSchemaInternal,
986
+ defaultValues: {
987
+ component: "",
988
+ props: {},
989
+ style: { base: {} },
990
+ children: []
991
+ },
992
+ treeDisplay: {
993
+ icon: "COMPONENT",
994
+ getLabel: (node) => node.component
995
+ },
996
+ clientRenderer: (node, context) => {
997
+ const definition = context.getComponentDefinition(node.component);
998
+ if (!definition) {
999
+ return h2("div", { key: context.key }, `[Unknown component: ${node.component}]`);
1000
+ }
1001
+ return h2("div", { key: context.key }, `[Component: ${node.component}]`);
1002
+ },
1003
+ ssrRenderer: (node, context) => {
1004
+ const definition = context.getComponentDefinition(node.component);
1005
+ if (!definition) {
1006
+ return `<!-- Unknown component: ${context.escapeHtml(node.component)} -->`;
1007
+ }
1008
+ return `<!-- Component: ${context.escapeHtml(node.component)} -->`;
1009
+ },
1010
+ capabilities: {
1011
+ canHaveChildren: true,
1012
+ requiresProps: ["component"]
1013
+ }
1014
+ });
1015
+ }
1016
+ });
1017
+
1018
+ // ../core/lib/shared/registry/nodeTypes/SlotMarkerType.ts
1019
+ import { z as z6 } from "zod";
1020
+ var SlotMarkerSchemaInternal, SlotMarkerType;
1021
+ var init_SlotMarkerType = __esm({
1022
+ "../core/lib/shared/registry/nodeTypes/SlotMarkerType.ts"() {
1023
+ "use strict";
1024
+ init_createNodeType();
1025
+ SlotMarkerSchemaInternal = z6.object({
1026
+ type: z6.literal("slot"),
1027
+ default: z6.union([
1028
+ z6.array(z6.any()),
1029
+ z6.string()
1030
+ ]).optional()
1031
+ }).passthrough();
1032
+ SlotMarkerType = createNodeType({
1033
+ type: "slot",
1034
+ displayName: "Slot",
1035
+ category: "special",
1036
+ schema: SlotMarkerSchemaInternal,
1037
+ defaultValues: {},
1038
+ treeDisplay: {
1039
+ icon: "SLOT_MARKER",
1040
+ getLabel: () => "slot"
1041
+ },
1042
+ clientRenderer: (_node, _context) => {
1043
+ return null;
1044
+ },
1045
+ ssrRenderer: (_node, _context) => {
1046
+ return "";
1047
+ },
1048
+ capabilities: {
1049
+ canHaveChildren: false,
1050
+ canHaveStyle: false,
1051
+ canHaveAttributes: false,
1052
+ requiresProps: []
1053
+ }
1054
+ });
1055
+ }
1056
+ });
1057
+
1058
+ // ../core/lib/shared/registry/nodeTypes/EmbedNodeType.ts
1059
+ import { z as z7 } from "zod";
1060
+ import { createElement as h3 } from "react";
1061
+ var EmbedNodeSchemaInternal, EmbedNodeType;
1062
+ var init_EmbedNodeType = __esm({
1063
+ "../core/lib/shared/registry/nodeTypes/EmbedNodeType.ts"() {
1064
+ "use strict";
1065
+ init_schemas();
1066
+ init_createNodeType();
1067
+ init_fieldPresets();
1068
+ EmbedNodeSchemaInternal = z7.object({
1069
+ type: z7.literal("embed"),
1070
+ html: z7.union([z7.string(), HtmlMappingSchema]),
1071
+ label: z7.string().optional(),
1072
+ // Custom label displayed in structure tree
1073
+ if: IfConditionSchema.optional(),
1074
+ // Conditional rendering - skip node when false
1075
+ style: StyleValueSchema.optional(),
1076
+ interactiveStyles: InteractiveStylesSchema.optional(),
1077
+ // Interactive CSS rules (hover, active, etc.)
1078
+ generateElementClass: z7.boolean().optional(),
1079
+ // Generate element class without styles (for custom CSS)
1080
+ attributes: z7.record(z7.string(), z7.union([z7.string(), z7.number(), z7.boolean()])).optional()
1081
+ }).passthrough();
1082
+ EmbedNodeType = createNodeType({
1083
+ type: "embed",
1084
+ displayName: "Embed",
1085
+ category: "content",
1086
+ schema: EmbedNodeSchemaInternal,
1087
+ defaultValues: {
1088
+ html: "",
1089
+ style: { base: {} }
1090
+ },
1091
+ treeDisplay: {
1092
+ icon: "HTML_ELEMENT",
1093
+ getLabel: () => "Embed"
1094
+ },
1095
+ editableFields: [
1096
+ textareaField({ name: "html", label: "HTML Content", required: true, placeholder: "<svg>...</svg>" })
1097
+ ],
1098
+ clientRenderer: (node, context) => {
1099
+ const htmlContent = typeof node.html === "string" ? node.html : "";
1100
+ return h3("div", {
1101
+ key: context.key,
1102
+ dangerouslySetInnerHTML: { __html: htmlContent }
1103
+ });
1104
+ },
1105
+ ssrRenderer: (node, _context) => {
1106
+ const htmlContent = typeof node.html === "string" ? node.html : "";
1107
+ return `<div>${htmlContent}</div>`;
1108
+ },
1109
+ capabilities: {
1110
+ canHaveChildren: false,
1111
+ requiresProps: ["html"]
1112
+ }
1113
+ });
1114
+ }
1115
+ });
1116
+
1117
+ // ../core/lib/shared/registry/nodeTypes/LinkNodeType.ts
1118
+ import { z as z8 } from "zod";
1119
+ import { createElement as h4 } from "react";
1120
+ var ComponentNodeSchemaRef3, LinkNodeSchemaInternal, LinkNodeType;
1121
+ var init_LinkNodeType = __esm({
1122
+ "../core/lib/shared/registry/nodeTypes/LinkNodeType.ts"() {
1123
+ "use strict";
1124
+ init_schemas();
1125
+ init_createNodeType();
1126
+ init_fieldPresets();
1127
+ ComponentNodeSchemaRef3 = z8.lazy(() => z8.any());
1128
+ LinkNodeSchemaInternal = z8.object({
1129
+ type: z8.literal("link"),
1130
+ href: z8.union([z8.string(), LinkMappingSchema]),
1131
+ label: z8.string().optional(),
1132
+ // Custom label displayed in structure tree
1133
+ if: IfConditionSchema.optional(),
1134
+ // Conditional rendering - skip node when false
1135
+ style: StyleValueSchema.optional(),
1136
+ interactiveStyles: InteractiveStylesSchema.optional(),
1137
+ // Interactive CSS rules (hover, active, etc.)
1138
+ generateElementClass: z8.boolean().optional(),
1139
+ // Generate element class without styles (for custom CSS)
1140
+ attributes: z8.record(z8.string(), z8.union([z8.string(), z8.number(), z8.boolean()])).optional(),
1141
+ children: z8.union([
1142
+ z8.array(z8.union([ComponentNodeSchemaRef3, z8.string()])),
1143
+ z8.string()
1144
+ ]).optional()
1145
+ }).passthrough();
1146
+ LinkNodeType = createNodeType({
1147
+ type: "link",
1148
+ displayName: "Link",
1149
+ category: "content",
1150
+ schema: LinkNodeSchemaInternal,
1151
+ defaultValues: {
1152
+ href: "#",
1153
+ style: { base: {} },
1154
+ children: []
1155
+ },
1156
+ treeDisplay: {
1157
+ icon: "LINK",
1158
+ getLabel: () => "Link"
1159
+ },
1160
+ editableFields: [
1161
+ urlField({ name: "href", label: "Link URL", required: true })
1162
+ ],
1163
+ clientRenderer: (node, context) => {
1164
+ const children = context.buildChildren(
1165
+ node.children,
1166
+ context.elementPath,
1167
+ context.parentComponentName,
1168
+ context.componentContext
1169
+ );
1170
+ return h4("div", { key: context.key }, children);
1171
+ },
1172
+ ssrRenderer: (node, context) => {
1173
+ const href = typeof node.href === "string" ? node.href : "#";
1174
+ const childrenHTML = context.renderChildren(node.children, context);
1175
+ return `<a href="${context.escapeHtml(href)}" class="olink">${childrenHTML}</a>`;
1176
+ },
1177
+ capabilities: {
1178
+ canHaveChildren: true,
1179
+ requiresProps: ["href"]
1180
+ }
1181
+ });
1182
+ }
1183
+ });
1184
+
1185
+ // ../core/lib/shared/registry/nodeTypes/LocaleListNodeType.ts
1186
+ import { z as z9 } from "zod";
1187
+ import { createElement as h5 } from "react";
1188
+ var LocaleListNodeSchemaInternal, LocaleListNodeType;
1189
+ var init_LocaleListNodeType = __esm({
1190
+ "../core/lib/shared/registry/nodeTypes/LocaleListNodeType.ts"() {
1191
+ "use strict";
1192
+ init_schemas();
1193
+ init_createNodeType();
1194
+ LocaleListNodeSchemaInternal = z9.object({
1195
+ type: z9.literal("locale-list"),
1196
+ label: z9.string().optional(),
1197
+ // Custom label displayed in structure tree
1198
+ if: IfConditionSchema.optional(),
1199
+ // Conditional rendering - skip node when false
1200
+ style: StyleValueSchema.optional(),
1201
+ itemStyle: StyleValueSchema.optional(),
1202
+ activeItemStyle: StyleValueSchema.optional(),
1203
+ separatorStyle: StyleValueSchema.optional(),
1204
+ showCurrent: z9.boolean().optional(),
1205
+ showSeparator: z9.boolean().optional(),
1206
+ showFlag: z9.boolean().optional(),
1207
+ flagStyle: StyleValueSchema.optional(),
1208
+ interactiveStyles: InteractiveStylesSchema.optional(),
1209
+ // Interactive CSS rules (hover, active, etc.)
1210
+ generateElementClass: z9.boolean().optional(),
1211
+ // Generate element class without styles (for custom CSS)
1212
+ displayType: z9.enum(["code", "name", "nativeName"]).optional(),
1213
+ // How to display locale text
1214
+ attributes: z9.record(z9.string(), z9.union([z9.string(), z9.number(), z9.boolean()])).optional()
1215
+ }).passthrough();
1216
+ LocaleListNodeType = createNodeType({
1217
+ type: "locale-list",
1218
+ displayName: "LocaleList",
1219
+ category: "special",
1220
+ schema: LocaleListNodeSchemaInternal,
1221
+ defaultValues: {
1222
+ style: { base: {} },
1223
+ showCurrent: true,
1224
+ showSeparator: true,
1225
+ showFlag: true,
1226
+ displayType: "nativeName"
1227
+ },
1228
+ treeDisplay: {
1229
+ icon: "HTML_ELEMENT",
1230
+ getLabel: () => "LocaleList"
1231
+ },
1232
+ clientRenderer: (_node, context) => {
1233
+ return h5("div", {
1234
+ key: context.key,
1235
+ "data-locale-list": "true"
1236
+ }, "[Locale List]");
1237
+ },
1238
+ ssrRenderer: (_node, _context) => {
1239
+ return '<div class="locale-list">[Locale List]</div>';
1240
+ },
1241
+ capabilities: {
1242
+ canHaveChildren: false,
1243
+ requiresProps: []
1244
+ }
1245
+ });
1246
+ }
1247
+ });
1248
+
1249
+ // ../core/lib/shared/registry/nodeTypes/ListNodeType.ts
1250
+ import { z as z10 } from "zod";
1251
+ import { createElement as h6 } from "react";
1252
+ var CMSFilterConditionSchema2, CMSSortConfigSchema2, ListNodeSchemaInternal, ListNodeType;
1253
+ var init_ListNodeType = __esm({
1254
+ "../core/lib/shared/registry/nodeTypes/ListNodeType.ts"() {
1255
+ "use strict";
1256
+ init_schemas();
1257
+ init_createNodeType();
1258
+ init_constants();
1259
+ CMSFilterConditionSchema2 = z10.object({
1260
+ field: z10.string(),
1261
+ operator: z10.enum(["eq", "neq", "gt", "gte", "lt", "lte", "contains", "in"]).optional(),
1262
+ value: z10.unknown()
1263
+ });
1264
+ CMSSortConfigSchema2 = z10.union([
1265
+ z10.object({
1266
+ field: z10.string(),
1267
+ order: z10.enum(["asc", "desc"]).optional()
1268
+ }),
1269
+ z10.array(z10.object({
1270
+ field: z10.string(),
1271
+ order: z10.enum(["asc", "desc"]).optional()
1272
+ }))
1273
+ ]);
1274
+ ListNodeSchemaInternal = z10.object({
1275
+ type: z10.literal("list"),
1276
+ /**
1277
+ * Data source type:
1278
+ * - 'prop': Read items from component props (default)
1279
+ * - 'collection': Query items from CMS collection
1280
+ */
1281
+ sourceType: z10.enum(["prop", "collection"]).default("prop"),
1282
+ /**
1283
+ * Source identifier:
1284
+ * - For sourceType 'prop': Prop name (e.g., "items") or template expression (e.g., "{{category.items}}")
1285
+ * - For sourceType 'collection': Collection name (e.g., "posts", "authors")
1286
+ */
1287
+ source: z10.string(),
1288
+ label: z10.string().optional(),
1289
+ // Custom label displayed in structure tree
1290
+ if: IfConditionSchema.optional(),
1291
+ // Conditional rendering - skip node when false
1292
+ /**
1293
+ * Variable name for item in templates.
1294
+ * - For sourceType 'prop': defaults to 'item'
1295
+ * - For sourceType 'collection': defaults to singularized collection name
1296
+ */
1297
+ itemAs: z10.string().optional(),
1298
+ // Collection-only options (ignored when sourceType: 'prop')
1299
+ /** Direct item IDs or template expression for referenced items (e.g., "{{post.authorId}}") */
1300
+ items: z10.union([z10.string(), z10.array(z10.string())]).optional(),
1301
+ /** Filter conditions */
1302
+ filter: z10.union([
1303
+ CMSFilterConditionSchema2,
1304
+ z10.array(CMSFilterConditionSchema2),
1305
+ z10.record(z10.unknown())
1306
+ ]).optional(),
1307
+ /** Sort configuration */
1308
+ sort: CMSSortConfigSchema2.optional(),
1309
+ /** Exclude the current CMS item from the list (useful for "related items" sections) */
1310
+ excludeCurrentItem: z10.boolean().optional(),
1311
+ /**
1312
+ * Emit item template for dynamic client-side rendering.
1313
+ * When true, SSR emits a `<template data-meno-item>` element with unprocessed
1314
+ * {{item.field}} placeholders. MenoFilter uses this to render items beyond
1315
+ * the SSR'd limit dynamically.
1316
+ */
1317
+ emitTemplate: z10.boolean().optional(),
1318
+ // Shared options
1319
+ /** Maximum number of items to return */
1320
+ limit: z10.number().optional(),
1321
+ /** Number of items to skip */
1322
+ offset: z10.number().optional(),
1323
+ /** Children are repeated for each item */
1324
+ children: z10.array(z10.unknown()).optional(),
1325
+ /** @deprecated Legacy property - use source + sourceType instead */
1326
+ collection: z10.union([z10.string(), z10.array(z10.any())]).optional()
1327
+ }).passthrough();
1328
+ ListNodeType = createNodeType({
1329
+ type: NODE_TYPE.LIST,
1330
+ displayName: "List",
1331
+ category: "special",
1332
+ schema: ListNodeSchemaInternal,
1333
+ defaultValues: {
1334
+ sourceType: "prop",
1335
+ source: "{{items}}",
1336
+ itemAs: "item",
1337
+ children: []
1338
+ },
1339
+ treeDisplay: {
1340
+ icon: "ARRAY",
1341
+ getLabel: (node) => {
1342
+ const listNode = node;
1343
+ const sourceType = listNode.sourceType || "prop";
1344
+ const prefix = sourceType === "collection" ? "CMS List" : "List";
1345
+ return listNode.source ? `${prefix}: ${listNode.source}` : prefix;
1346
+ }
1347
+ },
1348
+ clientRenderer: (node, context) => {
1349
+ const listNode = node;
1350
+ const sourceType = listNode.sourceType || "prop";
1351
+ const isCollection = sourceType === "collection";
1352
+ const bgColor = isCollection ? "rgba(139, 92, 246, 0.1)" : "rgba(59, 130, 246, 0.1)";
1353
+ const borderColor = isCollection ? "rgba(139, 92, 246, 0.5)" : "rgba(59, 130, 246, 0.5)";
1354
+ const textColor = isCollection ? "#8b5cf6" : "#3b82f6";
1355
+ const label = isCollection ? "CMS List" : "List";
1356
+ return h6("div", {
1357
+ key: context.key,
1358
+ "data-list": "true",
1359
+ "data-source-type": sourceType,
1360
+ "data-source": listNode.source,
1361
+ style: {
1362
+ padding: "8px 12px",
1363
+ background: bgColor,
1364
+ border: `1px dashed ${borderColor}`,
1365
+ borderRadius: "4px",
1366
+ color: textColor,
1367
+ fontSize: "12px"
1368
+ }
1369
+ }, `[${label}: ${listNode.source || "No source"}]`);
1370
+ },
1371
+ ssrRenderer: (_node, _context) => {
1372
+ return "<!-- list rendered by processList -->";
1373
+ },
1374
+ capabilities: {
1375
+ canHaveChildren: true,
1376
+ requiresProps: ["source"]
1377
+ },
1378
+ editableFields: [
1379
+ {
1380
+ name: "sourceType",
1381
+ label: "Source Type",
1382
+ type: "select",
1383
+ required: false,
1384
+ options: ["prop", "collection"]
1385
+ },
1386
+ {
1387
+ name: "source",
1388
+ label: "Source",
1389
+ type: "string",
1390
+ required: true,
1391
+ placeholder: "e.g., items or posts"
1392
+ },
1393
+ {
1394
+ name: "itemAs",
1395
+ label: "Item Variable",
1396
+ type: "string",
1397
+ required: false,
1398
+ placeholder: "default: item (prop) or singular (collection)"
1399
+ }
1400
+ ]
1401
+ });
1402
+ }
1403
+ });
1404
+
1405
+ // ../core/lib/shared/registry/nodeTypes/index.ts
1406
+ var init_nodeTypes = __esm({
1407
+ "../core/lib/shared/registry/nodeTypes/index.ts"() {
1408
+ "use strict";
1409
+ init_NodeTypeManager();
1410
+ init_HtmlNodeType();
1411
+ init_ComponentInstanceNodeType();
1412
+ init_SlotMarkerType();
1413
+ init_EmbedNodeType();
1414
+ init_LinkNodeType();
1415
+ init_LocaleListNodeType();
1416
+ init_ListNodeType();
1417
+ init_HtmlNodeType();
1418
+ init_ComponentInstanceNodeType();
1419
+ init_SlotMarkerType();
1420
+ init_EmbedNodeType();
1421
+ init_LinkNodeType();
1422
+ init_LocaleListNodeType();
1423
+ init_ListNodeType();
1424
+ }
1425
+ });
1426
+
1427
+ // ../core/lib/shared/registry/index.ts
1428
+ var init_registry = __esm({
1429
+ "../core/lib/shared/registry/index.ts"() {
1430
+ "use strict";
1431
+ init_ComponentRegistry();
1432
+ init_ClientRegistry();
1433
+ init_SSRRegistry();
1434
+ init_RegistryManager();
1435
+ init_BaseNodeTypeRegistry();
1436
+ init_ClientNodeTypeRegistry();
1437
+ init_SSRNodeTypeRegistry();
1438
+ init_NodeTypeManager();
1439
+ init_defineNodeType();
1440
+ init_createNodeType();
1441
+ init_fieldPresets();
1442
+ init_nodeTypes();
1443
+ }
1444
+ });
1445
+
1446
+ // ../core/lib/shared/i18n.ts
1447
+ var DEFAULT_I18N_CONFIG = {
1448
+ defaultLocale: "en",
1449
+ locales: [
1450
+ { code: "en", name: "English", nativeName: "English", langTag: "en-US" }
1451
+ ]
1452
+ };
1453
+ function isValidLocaleCode(config, code) {
1454
+ return config.locales.some((loc) => loc.code === code);
1455
+ }
1456
+ function migrateLocaleString(code) {
1457
+ const upperCode = code.toUpperCase();
1458
+ return {
1459
+ code: code.toLowerCase(),
1460
+ name: upperCode,
1461
+ nativeName: upperCode,
1462
+ langTag: `${code.toLowerCase()}-${upperCode}`
1463
+ };
1464
+ }
1465
+ function isOldLocaleFormat(locales) {
1466
+ return Array.isArray(locales) && locales.length > 0 && typeof locales[0] === "string";
1467
+ }
1468
+ function migrateI18nConfig(i18n) {
1469
+ if (!i18n || typeof i18n !== "object") {
1470
+ return DEFAULT_I18N_CONFIG;
1471
+ }
1472
+ const config = i18n;
1473
+ const defaultLocale = config.defaultLocale || "en";
1474
+ const locales = config.locales;
1475
+ if (!locales || !Array.isArray(locales)) {
1476
+ return DEFAULT_I18N_CONFIG;
1477
+ }
1478
+ if (isOldLocaleFormat(locales)) {
1479
+ return {
1480
+ defaultLocale,
1481
+ locales: locales.map(migrateLocaleString)
1482
+ };
1483
+ }
1484
+ return {
1485
+ defaultLocale,
1486
+ locales
1487
+ };
1488
+ }
1489
+ function isI18nValue(value) {
1490
+ if (typeof value !== "object" || value === null || Array.isArray(value)) {
1491
+ return false;
1492
+ }
1493
+ return "_i18n" in value && value._i18n === true;
1494
+ }
1495
+ function resolveTranslation(value, locale, config) {
1496
+ if (locale in value && value[locale] !== void 0 && locale !== "_i18n") {
1497
+ return value[locale];
1498
+ }
1499
+ if (config.defaultLocale in value && value[config.defaultLocale] !== void 0) {
1500
+ return value[config.defaultLocale];
1501
+ }
1502
+ for (const key of Object.keys(value)) {
1503
+ if (key !== "_i18n" && value[key] !== void 0) {
1504
+ return value[key];
1505
+ }
1506
+ }
1507
+ const hasArrayValue = Object.entries(value).some(
1508
+ ([k, v]) => k !== "_i18n" && Array.isArray(v)
1509
+ );
1510
+ return hasArrayValue ? [] : "";
1511
+ }
1512
+ function resolveI18nValue(value, locale, config) {
1513
+ if (isI18nValue(value)) {
1514
+ return resolveTranslation(value, locale, config);
1515
+ }
1516
+ return value;
1517
+ }
1518
+ function extractLocaleFromPath(path, config) {
1519
+ const cleanPath = path.startsWith("/") ? path.slice(1) : path;
1520
+ const segments = cleanPath.split("/");
1521
+ if (segments.length > 0 && isValidLocaleCode(config, segments[0])) {
1522
+ const locale = segments[0];
1523
+ const pathWithoutLocale = "/" + segments.slice(1).join("/");
1524
+ return { locale, pathWithoutLocale: pathWithoutLocale || "/" };
1525
+ }
1526
+ return { locale: null, pathWithoutLocale: path };
1527
+ }
1528
+ function buildLocalizedPath(path, locale) {
1529
+ const cleanPath = path.startsWith("/") ? path : "/" + path;
1530
+ return `/${locale}${cleanPath === "/" ? "" : cleanPath}`;
1531
+ }
1532
+
1533
+ // ../core/lib/shared/cmsQueryParser.ts
1534
+ function parseSortExpression(expr) {
1535
+ if (!expr.trim()) return void 0;
1536
+ const parts = expr.split(",").map((p) => p.trim()).filter(Boolean);
1537
+ const sorts = parts.map((part) => {
1538
+ const tokens = part.split(/\s+/);
1539
+ const field = tokens[0];
1540
+ const order = tokens[1]?.toLowerCase() === "desc" ? "desc" : "asc";
1541
+ return { field, order };
1542
+ });
1543
+ return sorts.length === 1 ? sorts[0] : sorts;
1544
+ }
1545
+ function serializeSortExpression(sort) {
1546
+ if (!sort) return "";
1547
+ const sorts = Array.isArray(sort) ? sort : [sort];
1548
+ return sorts.map((s) => `${s.field}${s.order === "desc" ? " desc" : ""}`).join(", ");
1549
+ }
1550
+ function parseFilterExpression(expr) {
1551
+ if (!expr.trim()) return void 0;
1552
+ const lines = expr.split(/[;\n]/).map((l) => l.trim()).filter(Boolean);
1553
+ const conditions = [];
1554
+ for (const line of lines) {
1555
+ const condition = parseFilterLine(line);
1556
+ if (condition) conditions.push(condition);
1557
+ }
1558
+ if (conditions.length === 0) return void 0;
1559
+ if (conditions.length === 1 && (!conditions[0].operator || conditions[0].operator === "eq")) {
1560
+ return { [conditions[0].field]: conditions[0].value };
1561
+ }
1562
+ return conditions.length === 1 ? conditions[0] : conditions;
1563
+ }
1564
+ function parseFilterLine(line) {
1565
+ const match = line.match(/^(\w+)\s*(==|!=|<>|>=|<=|=|>|<|contains|~|in|gte|lte|neq|gt|lt|eq)\s*(.+)$/i);
1566
+ if (!match) return null;
1567
+ const [, field, op, rawValue] = match;
1568
+ const operator = normalizeOperator(op);
1569
+ const value = parseValue(rawValue.trim(), operator);
1570
+ if (operator === "eq") {
1571
+ return { field, value };
1572
+ }
1573
+ return { field, operator, value };
1574
+ }
1575
+ function normalizeOperator(op) {
1576
+ const normalized = op.toLowerCase();
1577
+ const map = {
1578
+ "=": "eq",
1579
+ "==": "eq",
1580
+ "eq": "eq",
1581
+ "!=": "neq",
1582
+ "<>": "neq",
1583
+ "neq": "neq",
1584
+ ">": "gt",
1585
+ "gt": "gt",
1586
+ ">=": "gte",
1587
+ "gte": "gte",
1588
+ "<": "lt",
1589
+ "lt": "lt",
1590
+ "<=": "lte",
1591
+ "lte": "lte",
1592
+ "contains": "contains",
1593
+ "~": "contains",
1594
+ "in": "in"
1595
+ };
1596
+ return map[normalized] || "eq";
1597
+ }
1598
+ function parseValue(raw, operator) {
1599
+ if (raw.startsWith("{{") && raw.endsWith("}}")) {
1600
+ return raw;
1601
+ }
1602
+ if (operator === "in") {
1603
+ return raw.split(",").map((v) => parseScalarValue(v.trim()));
1604
+ }
1605
+ return parseScalarValue(raw);
1606
+ }
1607
+ function parseScalarValue(raw) {
1608
+ if (raw.toLowerCase() === "true") return true;
1609
+ if (raw.toLowerCase() === "false") return false;
1610
+ const num = Number(raw);
1611
+ if (!isNaN(num) && raw !== "") return num;
1612
+ if (raw.startsWith('"') && raw.endsWith('"') || raw.startsWith("'") && raw.endsWith("'")) {
1613
+ return raw.slice(1, -1);
1614
+ }
1615
+ return raw;
1616
+ }
1617
+ function serializeFilterExpression(filter) {
1618
+ if (!filter) return "";
1619
+ if (!Array.isArray(filter) && !isFilterCondition(filter)) {
1620
+ return Object.entries(filter).map(([field, value]) => `${field} = ${serializeValue(value)}`).join("\n");
1621
+ }
1622
+ const conditions = Array.isArray(filter) ? filter : [filter];
1623
+ return conditions.map((c) => {
1624
+ const op = c.operator || "eq";
1625
+ const opStr = operatorToString(op);
1626
+ const valStr = op === "in" && Array.isArray(c.value) ? c.value.map((v) => serializeValue(v)).join(", ") : serializeValue(c.value);
1627
+ return `${c.field} ${opStr} ${valStr}`;
1628
+ }).join("\n");
1629
+ }
1630
+ function operatorToString(op) {
1631
+ const map = {
1632
+ "eq": "=",
1633
+ "neq": "!=",
1634
+ "gt": ">",
1635
+ "gte": ">=",
1636
+ "lt": "<",
1637
+ "lte": "<=",
1638
+ "contains": "contains",
1639
+ "in": "in"
1640
+ };
1641
+ return map[op] || "=";
1642
+ }
1643
+ function isFilterCondition(obj) {
1644
+ return typeof obj === "object" && obj !== null && "field" in obj;
1645
+ }
1646
+ function serializeValue(value) {
1647
+ if (typeof value === "string") {
1648
+ if (value.startsWith("{{") || /^[\w-]+$/.test(value)) return value;
1649
+ return `"${value}"`;
1650
+ }
1651
+ return String(value);
1652
+ }
1653
+
1654
+ // ../core/lib/shared/index.ts
1655
+ init_constants();
1656
+
1657
+ // ../core/lib/shared/nodeUtils.ts
1658
+ init_constants();
1659
+
1660
+ // ../core/lib/shared/breakpoints.ts
1661
+ var DEFAULT_BREAKPOINTS = {
1662
+ tablet: { breakpoint: 1024, previewPoint: 768 },
1663
+ mobile: { breakpoint: 540, previewPoint: 375 }
1664
+ };
1665
+ function getBreakpointValues(config) {
1666
+ const result = {};
1667
+ for (const [name, entry] of Object.entries(config)) {
1668
+ result[name] = entry.breakpoint;
1669
+ }
1670
+ return result;
1671
+ }
1672
+
1673
+ // ../core/lib/shared/cssProperties.ts
1674
+ var CSS_PROPERTIES_DEFINITION = {
1675
+ // Display & Layout
1676
+ display: {
1677
+ values: ["block", "flex", "grid", "inline", "inline-block", "inline-flex", "inline-grid", "none"],
1678
+ type: "select"
1679
+ },
1680
+ position: {
1681
+ values: ["static", "relative", "absolute", "fixed", "sticky"],
1682
+ type: "select"
1683
+ },
1684
+ top: { type: "string" },
1685
+ right: { type: "string" },
1686
+ bottom: { type: "string" },
1687
+ left: { type: "string" },
1688
+ inset: { type: "string" },
1689
+ zIndex: { type: "number" },
1690
+ // Dimensions
1691
+ width: { type: "string" },
1692
+ height: { type: "string" },
1693
+ minWidth: { type: "string" },
1694
+ maxWidth: { type: "string" },
1695
+ minHeight: { type: "string" },
1696
+ maxHeight: { type: "string" },
1697
+ aspectRatio: { type: "string" },
1698
+ // Spacing
1699
+ margin: { type: "string" },
1700
+ marginTop: { type: "string" },
1701
+ marginRight: { type: "string" },
1702
+ marginBottom: { type: "string" },
1703
+ marginLeft: { type: "string" },
1704
+ padding: { type: "string" },
1705
+ paddingTop: { type: "string" },
1706
+ paddingRight: { type: "string" },
1707
+ paddingBottom: { type: "string" },
1708
+ paddingLeft: { type: "string" },
1709
+ gap: { type: "string" },
1710
+ rowGap: { type: "string" },
1711
+ columnGap: { type: "string" },
1712
+ // Borders
1713
+ border: { type: "string" },
1714
+ borderWidth: { type: "string" },
1715
+ borderStyle: {
1716
+ values: ["solid", "dashed", "dotted", "double", "groove", "ridge", "inset", "outset", "none"],
1717
+ type: "select"
1718
+ },
1719
+ borderColor: { type: "string" },
1720
+ borderTop: { type: "string" },
1721
+ borderRight: { type: "string" },
1722
+ borderBottom: { type: "string" },
1723
+ borderLeft: { type: "string" },
1724
+ borderRadius: { type: "string" },
1725
+ borderTopLeftRadius: { type: "string" },
1726
+ borderTopRightRadius: { type: "string" },
1727
+ borderBottomLeftRadius: { type: "string" },
1728
+ borderBottomRightRadius: { type: "string" },
1729
+ // Background & Colors
1730
+ background: { type: "string" },
1731
+ backgroundColor: { type: "string" },
1732
+ backgroundImage: { type: "string" },
1733
+ backgroundSize: {
1734
+ values: ["auto", "cover", "contain"],
1735
+ type: "select"
1736
+ },
1737
+ backgroundPosition: {
1738
+ values: ["top", "bottom", "left", "right", "center"],
1739
+ type: "select"
1740
+ },
1741
+ backgroundRepeat: {
1742
+ values: ["repeat", "repeat-x", "repeat-y", "no-repeat"],
1743
+ type: "select"
1744
+ },
1745
+ backgroundAttachment: {
1746
+ values: ["scroll", "fixed", "local"],
1747
+ type: "select"
1748
+ },
1749
+ backgroundOrigin: {
1750
+ values: ["border-box", "padding-box", "content-box"],
1751
+ type: "select"
1752
+ },
1753
+ backgroundBlendMode: {
1754
+ values: ["normal", "multiply", "screen", "overlay", "darken", "lighten", "color-dodge", "color-burn", "hard-light", "soft-light", "difference", "exclusion", "hue", "saturation", "color", "luminosity"],
1755
+ type: "select"
1756
+ },
1757
+ // Gradient-text recipe (`background: linear-gradient(...); background-clip:
1758
+ // text; -webkit-background-clip: text; -webkit-text-fill-color: transparent`).
1759
+ // The `Webkit*` capitalization is intentional — utilityClassMapper's
1760
+ // camel→kebab emitter only prepends `-` when the first letter is uppercase,
1761
+ // so `WebkitBackgroundClip` round-trips back to `-webkit-background-clip`.
1762
+ backgroundClip: {
1763
+ values: ["border-box", "padding-box", "content-box", "text"],
1764
+ type: "select"
1765
+ },
1766
+ WebkitBackgroundClip: {
1767
+ values: ["border-box", "padding-box", "content-box", "text"],
1768
+ type: "select"
1769
+ },
1770
+ WebkitTextFillColor: { type: "string" },
1771
+ WebkitTextStroke: { type: "string" },
1772
+ WebkitTextStrokeWidth: { type: "string" },
1773
+ WebkitTextStrokeColor: { type: "string" },
1774
+ color: { type: "string" },
1775
+ opacity: { type: "number" },
1776
+ // Flexbox
1777
+ flex: { type: "string" },
1778
+ flexDirection: {
1779
+ values: ["row", "column", "row-reverse", "column-reverse"],
1780
+ type: "select"
1781
+ },
1782
+ flexWrap: {
1783
+ values: ["nowrap", "wrap", "wrap-reverse"],
1784
+ type: "select"
1785
+ },
1786
+ flexFlow: { type: "string" },
1787
+ justifyContent: {
1788
+ values: ["flex-start", "flex-end", "center", "space-between", "space-around", "space-evenly"],
1789
+ type: "select"
1790
+ },
1791
+ alignItems: {
1792
+ values: ["flex-start", "flex-end", "center", "stretch", "baseline"],
1793
+ type: "select"
1794
+ },
1795
+ alignContent: {
1796
+ values: ["flex-start", "flex-end", "center", "space-between", "space-around", "stretch"],
1797
+ type: "select"
1798
+ },
1799
+ alignSelf: {
1800
+ values: ["auto", "flex-start", "flex-end", "center", "stretch", "baseline"],
1801
+ type: "select"
1802
+ },
1803
+ flexGrow: { type: "number" },
1804
+ flexShrink: { type: "number" },
1805
+ flexBasis: { type: "string" },
1806
+ order: { type: "number" },
1807
+ // Grid
1808
+ grid: { type: "string" },
1809
+ gridTemplateColumns: { type: "string" },
1810
+ gridTemplateRows: { type: "string" },
1811
+ gridTemplateAreas: { type: "string" },
1812
+ gridGap: { type: "string" },
1813
+ gridColumn: { type: "string" },
1814
+ gridRow: { type: "string" },
1815
+ gridArea: { type: "string" },
1816
+ gridAutoFlow: {
1817
+ values: ["row", "column", "row dense", "column dense"],
1818
+ type: "select"
1819
+ },
1820
+ gridAutoColumns: { type: "string" },
1821
+ gridAutoRows: { type: "string" },
1822
+ justifyItems: {
1823
+ values: ["start", "end", "center", "stretch"],
1824
+ type: "select"
1825
+ },
1826
+ justifySelf: {
1827
+ values: ["auto", "start", "end", "center", "stretch"],
1828
+ type: "select"
1829
+ },
1830
+ placeContent: { type: "string" },
1831
+ placeItems: { type: "string" },
1832
+ placeSelf: { type: "string" },
1833
+ // Text & Font
1834
+ fontSize: { type: "string" },
1835
+ fontWeight: {
1836
+ values: ["100", "200", "300", "400", "500", "600", "700", "800", "900", "normal", "bold"],
1837
+ type: "select"
1838
+ },
1839
+ fontFamily: { type: "string" },
1840
+ fontStyle: {
1841
+ values: ["normal", "italic", "oblique"],
1842
+ type: "select"
1843
+ },
1844
+ lineHeight: { type: "string" },
1845
+ textAlign: {
1846
+ values: ["left", "right", "center", "justify", "start", "end"],
1847
+ type: "select"
1848
+ },
1849
+ textDecoration: {
1850
+ values: ["none", "underline", "overline", "line-through"],
1851
+ type: "select"
1852
+ },
1853
+ textDecorationLine: {
1854
+ values: ["none", "underline", "overline", "line-through"],
1855
+ type: "select"
1856
+ },
1857
+ textDecorationStyle: {
1858
+ values: ["solid", "double", "dotted", "dashed", "wavy"],
1859
+ type: "select"
1860
+ },
1861
+ textDecorationColor: { type: "string" },
1862
+ textDecorationThickness: { type: "string" },
1863
+ textUnderlineOffset: { type: "string" },
1864
+ textUnderlinePosition: { type: "string" },
1865
+ textTransform: {
1866
+ values: ["none", "capitalize", "uppercase", "lowercase"],
1867
+ type: "select"
1868
+ },
1869
+ textRendering: {
1870
+ values: ["auto", "optimizeSpeed", "optimizeLegibility", "geometricPrecision"],
1871
+ type: "select"
1872
+ },
1873
+ fontVariant: { type: "string" },
1874
+ fontStretch: { type: "string" },
1875
+ fontFeatureSettings: { type: "string" },
1876
+ fontVariationSettings: { type: "string" },
1877
+ fontKerning: {
1878
+ values: ["auto", "normal", "none"],
1879
+ type: "select"
1880
+ },
1881
+ WebkitFontSmoothing: {
1882
+ values: ["auto", "none", "antialiased", "subpixel-antialiased"],
1883
+ type: "select"
1884
+ },
1885
+ MozOsxFontSmoothing: {
1886
+ values: ["auto", "grayscale"],
1887
+ type: "select"
1888
+ },
1889
+ hyphens: {
1890
+ values: ["none", "manual", "auto"],
1891
+ type: "select"
1892
+ },
1893
+ WebkitHyphens: {
1894
+ values: ["none", "manual", "auto"],
1895
+ type: "select"
1896
+ },
1897
+ writingMode: {
1898
+ values: ["horizontal-tb", "vertical-rl", "vertical-lr"],
1899
+ type: "select"
1900
+ },
1901
+ direction: {
1902
+ values: ["ltr", "rtl"],
1903
+ type: "select"
1904
+ },
1905
+ tabSize: { type: "string" },
1906
+ wordWrap: {
1907
+ values: ["normal", "break-word"],
1908
+ type: "select"
1909
+ },
1910
+ letterSpacing: { type: "string" },
1911
+ wordSpacing: { type: "string" },
1912
+ wordBreak: {
1913
+ values: ["normal", "break-all", "keep-all", "break-word"],
1914
+ type: "select"
1915
+ },
1916
+ overflowWrap: {
1917
+ values: ["normal", "break-word", "anywhere"],
1918
+ type: "select"
1919
+ },
1920
+ textWrap: {
1921
+ values: ["wrap", "nowrap", "balance", "pretty", "stable"],
1922
+ type: "select"
1923
+ },
1924
+ textIndent: { type: "string" },
1925
+ verticalAlign: {
1926
+ values: ["baseline", "top", "middle", "bottom", "text-top", "text-bottom", "sub", "super"],
1927
+ type: "select"
1928
+ },
1929
+ // Box Shadow & Effects
1930
+ boxShadow: { type: "string" },
1931
+ textShadow: { type: "string" },
1932
+ filter: { type: "string" },
1933
+ backdropFilter: { type: "string" },
1934
+ WebkitBackdropFilter: { type: "string" },
1935
+ transform: { type: "string" },
1936
+ transformOrigin: { type: "string" },
1937
+ transformStyle: {
1938
+ values: ["flat", "preserve-3d"],
1939
+ type: "select"
1940
+ },
1941
+ perspective: { type: "string" },
1942
+ perspectiveOrigin: { type: "string" },
1943
+ transition: { type: "string" },
1944
+ transitionProperty: { type: "string" },
1945
+ transitionDuration: { type: "string" },
1946
+ transitionTimingFunction: { type: "string" },
1947
+ transitionDelay: { type: "string" },
1948
+ animation: { type: "string" },
1949
+ backfaceVisibility: {
1950
+ values: ["visible", "hidden"],
1951
+ type: "select"
1952
+ },
1953
+ mixBlendMode: {
1954
+ values: ["normal", "multiply", "screen", "overlay", "darken", "lighten", "color-dodge", "color-burn", "hard-light", "soft-light", "difference", "exclusion", "hue", "saturation", "color", "luminosity"],
1955
+ type: "select"
1956
+ },
1957
+ isolation: {
1958
+ values: ["auto", "isolate"],
1959
+ type: "select"
1960
+ },
1961
+ willChange: { type: "string" },
1962
+ imageRendering: {
1963
+ values: ["auto", "crisp-edges", "pixelated", "smooth"],
1964
+ type: "select"
1965
+ },
1966
+ clipPath: { type: "string" },
1967
+ WebkitClipPath: { type: "string" },
1968
+ // Mask family — gradient/SVG masks. Emit both the standard and `-webkit-`
1969
+ // form because Safari still needs the prefix.
1970
+ maskImage: { type: "string" },
1971
+ WebkitMaskImage: { type: "string" },
1972
+ maskSize: { type: "string" },
1973
+ WebkitMaskSize: { type: "string" },
1974
+ maskPosition: { type: "string" },
1975
+ WebkitMaskPosition: { type: "string" },
1976
+ maskRepeat: { type: "string" },
1977
+ WebkitMaskRepeat: { type: "string" },
1978
+ maskOrigin: { type: "string" },
1979
+ WebkitMaskOrigin: { type: "string" },
1980
+ maskClip: { type: "string" },
1981
+ WebkitMaskClip: { type: "string" },
1982
+ maskComposite: { type: "string" },
1983
+ WebkitMaskComposite: { type: "string" },
1984
+ maskMode: { type: "string" },
1985
+ maskType: {
1986
+ values: ["luminance", "alpha"],
1987
+ type: "select"
1988
+ },
1989
+ // Overflow & Content
1990
+ overflow: {
1991
+ values: ["visible", "hidden", "scroll", "auto"],
1992
+ type: "select"
1993
+ },
1994
+ overflowX: {
1995
+ values: ["visible", "hidden", "scroll", "auto"],
1996
+ type: "select"
1997
+ },
1998
+ overflowY: {
1999
+ values: ["visible", "hidden", "scroll", "auto"],
2000
+ type: "select"
2001
+ },
2002
+ whiteSpace: {
2003
+ values: ["normal", "nowrap", "pre", "pre-wrap", "pre-line"],
2004
+ type: "select"
2005
+ },
2006
+ textOverflow: {
2007
+ values: ["clip", "ellipsis"],
2008
+ type: "select"
2009
+ },
2010
+ visibility: {
2011
+ values: ["visible", "hidden", "collapse"],
2012
+ type: "select"
2013
+ },
2014
+ content: { type: "string" },
2015
+ // Cursor & Interaction
2016
+ cursor: {
2017
+ values: ["auto", "default", "pointer", "wait", "text", "move", "not-allowed", "help"],
2018
+ type: "select"
2019
+ },
2020
+ pointerEvents: {
2021
+ values: ["auto", "none"],
2022
+ type: "select"
2023
+ },
2024
+ userSelect: {
2025
+ values: ["auto", "none", "text", "all"],
2026
+ type: "select"
2027
+ },
2028
+ WebkitUserSelect: {
2029
+ values: ["auto", "none", "text", "all"],
2030
+ type: "select"
2031
+ },
2032
+ MozUserSelect: {
2033
+ values: ["auto", "none", "text", "all"],
2034
+ type: "select"
2035
+ },
2036
+ caretColor: { type: "string" },
2037
+ appearance: {
2038
+ values: ["none", "auto", "menulist-button", "textfield"],
2039
+ type: "select"
2040
+ },
2041
+ WebkitAppearance: {
2042
+ values: ["none", "auto", "menulist-button", "textfield"],
2043
+ type: "select"
2044
+ },
2045
+ MozAppearance: {
2046
+ values: ["none", "auto", "menulist-button", "textfield"],
2047
+ type: "select"
2048
+ },
2049
+ // Outline
2050
+ outline: { type: "string" },
2051
+ outlineWidth: { type: "string" },
2052
+ outlineStyle: {
2053
+ values: ["none", "solid", "dashed", "dotted", "double", "groove", "ridge", "inset", "outset"],
2054
+ type: "select"
2055
+ },
2056
+ outlineColor: { type: "string" },
2057
+ outlineOffset: { type: "string" },
2058
+ // Lists
2059
+ listStyle: { type: "string" },
2060
+ listStyleType: {
2061
+ values: ["none", "disc", "circle", "square", "decimal", "decimal-leading-zero", "lower-roman", "upper-roman", "lower-alpha", "upper-alpha"],
2062
+ type: "select"
2063
+ },
2064
+ listStylePosition: {
2065
+ values: ["inside", "outside"],
2066
+ type: "select"
2067
+ },
2068
+ // Miscellaneous
2069
+ float: {
2070
+ values: ["left", "right", "none"],
2071
+ type: "select"
2072
+ },
2073
+ clear: {
2074
+ values: ["left", "right", "both", "none"],
2075
+ type: "select"
2076
+ },
2077
+ boxSizing: {
2078
+ values: ["content-box", "border-box"],
2079
+ type: "select"
2080
+ },
2081
+ objectFit: {
2082
+ values: ["fill", "contain", "cover", "scale-down"],
2083
+ type: "select"
2084
+ },
2085
+ objectPosition: {
2086
+ values: ["top", "bottom", "left", "right", "center"],
2087
+ type: "select"
2088
+ },
2089
+ resize: {
2090
+ values: ["none", "both", "horizontal", "vertical"],
2091
+ type: "select"
2092
+ },
2093
+ scrollBehavior: {
2094
+ values: ["auto", "smooth"],
2095
+ type: "select"
2096
+ },
2097
+ scrollSnapType: { type: "string" },
2098
+ scrollSnapAlign: {
2099
+ values: ["none", "start", "end", "center"],
2100
+ type: "select"
2101
+ },
2102
+ scrollSnapStop: {
2103
+ values: ["normal", "always"],
2104
+ type: "select"
2105
+ },
2106
+ scrollMarginTop: { type: "string" },
2107
+ scrollMarginRight: { type: "string" },
2108
+ scrollMarginBottom: { type: "string" },
2109
+ scrollMarginLeft: { type: "string" },
2110
+ scrollPaddingTop: { type: "string" },
2111
+ scrollPaddingRight: { type: "string" },
2112
+ scrollPaddingBottom: { type: "string" },
2113
+ scrollPaddingLeft: { type: "string" },
2114
+ overscrollBehavior: {
2115
+ values: ["auto", "contain", "none"],
2116
+ type: "select"
2117
+ },
2118
+ overscrollBehaviorX: {
2119
+ values: ["auto", "contain", "none"],
2120
+ type: "select"
2121
+ },
2122
+ overscrollBehaviorY: {
2123
+ values: ["auto", "contain", "none"],
2124
+ type: "select"
2125
+ },
2126
+ // CSS Containment — container queries depend on these.
2127
+ containerType: {
2128
+ values: ["normal", "size", "inline-size"],
2129
+ type: "select"
2130
+ },
2131
+ containerName: { type: "string" },
2132
+ accentColor: { type: "string" },
2133
+ // SVG
2134
+ stroke: { type: "string" },
2135
+ strokeWidth: { type: "string" },
2136
+ strokeDasharray: { type: "string" },
2137
+ strokeDashoffset: { type: "string" },
2138
+ strokeLinecap: {
2139
+ values: ["butt", "round", "square"],
2140
+ type: "select"
2141
+ },
2142
+ strokeLinejoin: {
2143
+ values: ["miter", "round", "bevel"],
2144
+ type: "select"
2145
+ },
2146
+ strokeOpacity: { type: "number" },
2147
+ fill: { type: "string" },
2148
+ fillOpacity: { type: "number" },
2149
+ fillRule: {
2150
+ values: ["nonzero", "evenodd"],
2151
+ type: "select"
2152
+ }
2153
+ };
2154
+ var CSS_PROPERTIES = Object.keys(CSS_PROPERTIES_DEFINITION);
2155
+ var VISUAL_MODE_PROPERTIES = {
2156
+ "Layout": ["display"],
2157
+ "Grid": ["gridTemplateColumns"],
2158
+ "Flexbox": ["flexDirection", "flexWrap", "justifyContent", "alignItems", "gap", "flexGrow", "flexShrink", "flexBasis"],
2159
+ "Spacing": ["margin", "marginTop", "marginRight", "marginBottom", "marginLeft", "padding", "paddingTop", "paddingRight", "paddingBottom", "paddingLeft"],
2160
+ "Size": ["width", "height", "minWidth", "minHeight", "maxWidth", "maxHeight"],
2161
+ "Position": ["position", "top", "right", "bottom", "left", "zIndex"],
2162
+ "Typography": ["fontFamily", "fontWeight", "fontSize", "lineHeight", "color", "letterSpacing", "textAlign", "textTransform", "textDecoration"],
2163
+ "Background": ["backgroundColor", "backgroundImage", "backgroundSize", "backgroundPosition", "backgroundRepeat", "opacity"],
2164
+ "Borders": ["borderRadius", "borderWidth", "borderStyle", "borderColor"],
2165
+ "Effects": ["boxShadow", "transform", "transition", "filter"],
2166
+ "Overflow": ["overflow", "whiteSpace"],
2167
+ "Interaction": ["cursor", "pointerEvents"]
2168
+ };
2169
+ var VISUAL_MODE_PROPERTIES_SET = new Set(
2170
+ Object.values(VISUAL_MODE_PROPERTIES).flat()
2171
+ );
2172
+
2173
+ // ../core/lib/shared/utilityClassConfig.ts
2174
+ var propertyMap = {
2175
+ // Padding
2176
+ padding: "p",
2177
+ paddingTop: "pt",
2178
+ paddingRight: "pr",
2179
+ paddingBottom: "pb",
2180
+ paddingLeft: "pl",
2181
+ paddingInline: "px",
2182
+ paddingBlock: "py",
2183
+ // Margin
2184
+ margin: "m",
2185
+ marginTop: "mt",
2186
+ marginRight: "mr",
2187
+ marginBottom: "mb",
2188
+ marginLeft: "ml",
2189
+ marginInline: "mx",
2190
+ marginBlock: "my",
2191
+ // Display & Layout
2192
+ display: "d",
2193
+ flexDirection: "fd",
2194
+ justifyContent: "jc",
2195
+ alignItems: "ai",
2196
+ alignContent: "ac",
2197
+ flex: "flex",
2198
+ flexWrap: "fw",
2199
+ gap: "g",
2200
+ rowGap: "rg",
2201
+ columnGap: "cg",
2202
+ // Sizing
2203
+ width: "w",
2204
+ height: "h",
2205
+ maxWidth: "mw",
2206
+ maxHeight: "mh",
2207
+ minWidth: "miw",
2208
+ minHeight: "mih",
2209
+ aspectRatio: "ar",
2210
+ // Colors & Background
2211
+ backgroundColor: "bgc",
2212
+ background: "bg",
2213
+ backgroundImage: "bgi",
2214
+ color: "c",
2215
+ // Borders & Radius
2216
+ border: "b",
2217
+ borderRadius: "br",
2218
+ borderTop: "bt",
2219
+ borderRight: "border-r",
2220
+ borderBottom: "bb",
2221
+ borderLeft: "bl",
2222
+ borderTopLeftRadius: "brtl",
2223
+ borderTopRightRadius: "brtr",
2224
+ borderBottomLeftRadius: "brbl",
2225
+ borderBottomRightRadius: "brbr",
2226
+ borderColor: "bc",
2227
+ // Text
2228
+ fontSize: "fs",
2229
+ fontWeight: "fe",
2230
+ fontFamily: "ff",
2231
+ textAlign: "ta",
2232
+ textDecoration: "td",
2233
+ textTransform: "tt",
2234
+ lineHeight: "lh",
2235
+ letterSpacing: "ls",
2236
+ wordBreak: "wb",
2237
+ overflowWrap: "ow",
2238
+ textIndent: "ti",
2239
+ verticalAlign: "va",
2240
+ whiteSpace: "whs",
2241
+ // Lists
2242
+ listStyle: "lst",
2243
+ listStyleType: "lstt",
2244
+ listStylePosition: "lstp",
2245
+ // Transform & Effects
2246
+ opacity: "o",
2247
+ transform: "tm",
2248
+ transformOrigin: "tmo",
2249
+ boxShadow: "bsh",
2250
+ textShadow: "ts",
2251
+ filter: "flt",
2252
+ backdropFilter: "bdf",
2253
+ backfaceVisibility: "bfv",
2254
+ mixBlendMode: "mbm",
2255
+ clipPath: "cp",
2256
+ // Positioning
2257
+ position: "pos",
2258
+ top: "top",
2259
+ right: "r",
2260
+ bottom: "bo",
2261
+ left: "l",
2262
+ inset: "ins",
2263
+ zIndex: "z",
2264
+ // Grid Layout
2265
+ gridTemplateColumns: "gtc",
2266
+ gridTemplateRows: "gtr",
2267
+ gridTemplateAreas: "gta",
2268
+ gridGap: "gg",
2269
+ gridAutoFlow: "gaf",
2270
+ gridColumn: "gc",
2271
+ gridRow: "gr",
2272
+ gridArea: "ga",
2273
+ gridAutoRows: "gar",
2274
+ gridAutoColumns: "gac",
2275
+ justifyItems: "ji",
2276
+ justifySelf: "jse",
2277
+ placeContent: "plc",
2278
+ placeItems: "pli",
2279
+ placeSelf: "pls",
2280
+ // Flexbox extras
2281
+ flexGrow: "fg",
2282
+ flexShrink: "fsh",
2283
+ flexBasis: "fb",
2284
+ order: "ord",
2285
+ alignSelf: "as",
2286
+ // Outline
2287
+ outline: "ol",
2288
+ outlineWidth: "olw",
2289
+ outlineStyle: "ols",
2290
+ outlineColor: "olc",
2291
+ outlineOffset: "olo",
2292
+ // Other
2293
+ overflow: "ov",
2294
+ overflowX: "ovx",
2295
+ overflowY: "ovy",
2296
+ cursor: "cu",
2297
+ pointerEvents: "pe",
2298
+ userSelect: "us",
2299
+ transition: "tn",
2300
+ objectFit: "objf",
2301
+ objectPosition: "objp",
2302
+ boxSizing: "bsz",
2303
+ visibility: "vis",
2304
+ resize: "rsz",
2305
+ scrollBehavior: "scb",
2306
+ accentColor: "acc"
2307
+ };
2308
+ var prefixToCSSProperty = {
2309
+ // Spacing
2310
+ p: "padding",
2311
+ pt: "padding-top",
2312
+ pr: "padding-right",
2313
+ pb: "padding-bottom",
2314
+ pl: "padding-left",
2315
+ px: "padding",
2316
+ py: "padding",
2317
+ m: "margin",
2318
+ mt: "margin-top",
2319
+ mr: "margin-right",
2320
+ mb: "margin-bottom",
2321
+ ml: "margin-left",
2322
+ mx: "margin",
2323
+ my: "margin",
2324
+ g: "gap",
2325
+ rg: "row-gap",
2326
+ cg: "column-gap",
2327
+ // Sizing
2328
+ w: "width",
2329
+ h: "height",
2330
+ mw: "max-width",
2331
+ mh: "max-height",
2332
+ miw: "min-width",
2333
+ mih: "min-height",
2334
+ ar: "aspect-ratio",
2335
+ // Colors & Background
2336
+ bgc: "background-color",
2337
+ bg: "background",
2338
+ bgi: "background-image",
2339
+ c: "color",
2340
+ bc: "border-color",
2341
+ // Borders
2342
+ b: "border",
2343
+ br: "border-radius",
2344
+ brtl: "border-top-left-radius",
2345
+ brtr: "border-top-right-radius",
2346
+ brbl: "border-bottom-left-radius",
2347
+ brbr: "border-bottom-right-radius",
2348
+ bt: "border-top",
2349
+ bb: "border-bottom",
2350
+ bl: "border-left",
2351
+ "border-r": "border-right",
2352
+ // Text
2353
+ fs: "font-size",
2354
+ fe: "font-weight",
2355
+ ff: "font-family",
2356
+ ta: "text-align",
2357
+ td: "text-decoration",
2358
+ tt: "text-transform",
2359
+ lh: "line-height",
2360
+ ls: "letter-spacing",
2361
+ wb: "word-break",
2362
+ ow: "overflow-wrap",
2363
+ ti: "text-indent",
2364
+ va: "vertical-align",
2365
+ whs: "white-space",
2366
+ // Lists
2367
+ lst: "list-style",
2368
+ lstt: "list-style-type",
2369
+ lstp: "list-style-position",
2370
+ // Display
2371
+ d: "display",
2372
+ // Flexbox
2373
+ fd: "flex-direction",
2374
+ jc: "justify-content",
2375
+ ai: "align-items",
2376
+ ac: "align-content",
2377
+ as: "align-self",
2378
+ flex: "flex",
2379
+ fw: "flex-wrap",
2380
+ fg: "flex-grow",
2381
+ fsh: "flex-shrink",
2382
+ fb: "flex-basis",
2383
+ ord: "order",
2384
+ // Grid
2385
+ gtc: "grid-template-columns",
2386
+ gtr: "grid-template-rows",
2387
+ gta: "grid-template-areas",
2388
+ gg: "grid-gap",
2389
+ gaf: "grid-auto-flow",
2390
+ gc: "grid-column",
2391
+ gr: "grid-row",
2392
+ ga: "grid-area",
2393
+ gar: "grid-auto-rows",
2394
+ gac: "grid-auto-columns",
2395
+ ji: "justify-items",
2396
+ jse: "justify-self",
2397
+ plc: "place-content",
2398
+ pli: "place-items",
2399
+ pls: "place-self",
2400
+ // Effects
2401
+ o: "opacity",
2402
+ tm: "transform",
2403
+ tmo: "transform-origin",
2404
+ bsh: "box-shadow",
2405
+ ts: "text-shadow",
2406
+ flt: "filter",
2407
+ bdf: "backdrop-filter",
2408
+ bfv: "backface-visibility",
2409
+ mbm: "mix-blend-mode",
2410
+ cp: "clip-path",
2411
+ // Positioning
2412
+ pos: "position",
2413
+ top: "top",
2414
+ r: "right",
2415
+ bo: "bottom",
2416
+ l: "left",
2417
+ ins: "inset",
2418
+ z: "z-index",
2419
+ // Outline
2420
+ ol: "outline",
2421
+ olw: "outline-width",
2422
+ ols: "outline-style",
2423
+ olc: "outline-color",
2424
+ olo: "outline-offset",
2425
+ // Other
2426
+ ov: "overflow",
2427
+ ovx: "overflow-x",
2428
+ ovy: "overflow-y",
2429
+ cu: "cursor",
2430
+ pe: "pointer-events",
2431
+ us: "user-select",
2432
+ tn: "transition",
2433
+ objf: "object-fit",
2434
+ objp: "object-position",
2435
+ bsz: "box-sizing",
2436
+ vis: "visibility",
2437
+ rsz: "resize",
2438
+ scb: "scroll-behavior",
2439
+ acc: "accent-color"
2440
+ };
2441
+
2442
+ // ../core/lib/shared/responsiveScaling.ts
2443
+ var DEFAULT_FLUID_RANGE = { min: 320, max: 1440 };
2444
+ var DEFAULT_SITE_MARGIN = { min: 16, max: 32 };
2445
+ function getScaleCategory(property) {
2446
+ const propertyStr = property;
2447
+ if (property === "fontSize") return "fontSize";
2448
+ if (propertyStr.startsWith("padding")) return "padding";
2449
+ if (propertyStr.startsWith("margin")) return "margin";
2450
+ if (property === "gap" || property === "rowGap" || property === "columnGap") return "gap";
2451
+ if (propertyStr === "borderRadius" || propertyStr.startsWith("border") && propertyStr.includes("Radius")) return "borderRadius";
2452
+ if (property === "width" || property === "height" || property === "maxWidth" || property === "maxHeight" || property === "minWidth" || property === "minHeight") return "size";
2453
+ return null;
2454
+ }
2455
+ function parseValue2(valueStr) {
2456
+ const match = valueStr.trim().match(/^(-?[\d.]+)(px|rem|em|%|pt)$/);
2457
+ if (!match) return null;
2458
+ return {
2459
+ value: parseFloat(match[1]),
2460
+ unit: match[2]
2461
+ };
2462
+ }
2463
+ function calculateResponsiveValue(baseValue, baseReference, scale) {
2464
+ if (Math.abs(baseValue) <= baseReference) {
2465
+ return Math.round(baseValue);
2466
+ }
2467
+ const scaled = baseValue + (baseValue - baseReference) * (scale - 1);
2468
+ return Math.round(scaled);
2469
+ }
2470
+ function getScaleMultiplier(scales, property, breakpoint) {
2471
+ const category = getScaleCategory(property);
2472
+ if (!category || !scales[category]) return null;
2473
+ const scaleConfig = scales[category];
2474
+ return scaleConfig?.[breakpoint] ?? null;
2475
+ }
2476
+ function parseMultiValue(valueStr) {
2477
+ const normalized = valueStr.replace(/(?<=\w)-(?=\d|auto|inherit|initial|unset)/g, " ");
2478
+ return normalized.trim().split(/\s+/).filter((v) => v.length > 0);
2479
+ }
2480
+ function scaleValue(valueStr, baseReference, scale) {
2481
+ const parsed = parseValue2(valueStr);
2482
+ if (!parsed) return null;
2483
+ if (parsed.unit === "%" || parsed.unit === "em") {
2484
+ return valueStr.trim();
2485
+ }
2486
+ const scaledValue = calculateResponsiveValue(parsed.value, baseReference, scale);
2487
+ return `${scaledValue}${parsed.unit}`;
2488
+ }
2489
+ function scalePropertyValue(valueStr, baseReference, scale) {
2490
+ const parts = parseMultiValue(valueStr);
2491
+ if (parts.length === 0) return null;
2492
+ const scaledParts = parts.map((part) => {
2493
+ const scaled = scaleValue(part, baseReference, scale);
2494
+ if (scaled !== null) {
2495
+ return scaled;
2496
+ }
2497
+ return part;
2498
+ });
2499
+ return scaledParts.join(" ");
2500
+ }
2501
+ function getSmallestBreakpointName(breakpoints) {
2502
+ if (!breakpoints) return null;
2503
+ const entries = Object.entries(breakpoints);
2504
+ if (entries.length === 0) return null;
2505
+ let smallestName = entries[0][0];
2506
+ let smallestWidth = entries[0][1].breakpoint;
2507
+ for (const [name, cfg] of entries) {
2508
+ if (cfg.breakpoint < smallestWidth) {
2509
+ smallestWidth = cfg.breakpoint;
2510
+ smallestName = name;
2511
+ }
2512
+ }
2513
+ return smallestName;
2514
+ }
2515
+ function buildFluidClamp(baseValue, unit, scale, vpMin, vpMax, baseReference = 16) {
2516
+ const max = baseValue;
2517
+ const min = calculateResponsiveValue(baseValue, baseReference, scale);
2518
+ if (min === max || vpMax === vpMin) {
2519
+ return `${formatNumber(max)}${unit}`;
2520
+ }
2521
+ const unitToPx = unit === "rem" ? 16 : 1;
2522
+ const minPx = min * unitToPx;
2523
+ const maxPx = max * unitToPx;
2524
+ const slopePx = (maxPx - minPx) / (vpMax - vpMin);
2525
+ const interceptPx = minPx - slopePx * vpMin;
2526
+ const interceptInUnit = interceptPx / unitToPx;
2527
+ const slopeVw = slopePx * 100;
2528
+ return `clamp(${formatNumber(min)}${unit}, ${formatNumber(interceptInUnit)}${unit} + ${formatNumber(slopeVw)}vw, ${formatNumber(max)}${unit})`;
2529
+ }
2530
+ function formatNumber(n) {
2531
+ if (Number.isInteger(n)) return String(n);
2532
+ return Number(n.toFixed(4)).toString();
2533
+ }
2534
+ function buildFluidPropertyValue(valueStr, scale, vpMin, vpMax, baseReference = 16) {
2535
+ const parts = parseMultiValue(valueStr);
2536
+ if (parts.length === 0) return null;
2537
+ let anyScaled = false;
2538
+ const out = parts.map((part) => {
2539
+ const parsed = parseValue2(part);
2540
+ if (!parsed) return part;
2541
+ if (parsed.unit === "%" || parsed.unit === "em") return part;
2542
+ anyScaled = true;
2543
+ return buildFluidClamp(parsed.value, parsed.unit, scale, vpMin, vpMax, baseReference);
2544
+ });
2545
+ return anyScaled ? out.join(" ") : null;
2546
+ }
2547
+ var DEFAULT_RESPONSIVE_SCALES = {
2548
+ enabled: false,
2549
+ mode: "breakpoints",
2550
+ baseReference: 16,
2551
+ fluidRange: { ...DEFAULT_FLUID_RANGE },
2552
+ siteMargin: { ...DEFAULT_SITE_MARGIN },
2553
+ fontSize: {
2554
+ tablet: 0.88,
2555
+ mobile: 0.75
2556
+ },
2557
+ padding: {
2558
+ tablet: 0.75,
2559
+ mobile: 0.5
2560
+ },
2561
+ margin: {
2562
+ tablet: 0.7,
2563
+ mobile: 0.45
2564
+ },
2565
+ gap: {
2566
+ tablet: 0.65,
2567
+ mobile: 0.4
2568
+ },
2569
+ borderRadius: {
2570
+ tablet: 0.85,
2571
+ mobile: 0.7
2572
+ },
2573
+ size: {
2574
+ tablet: 0.9,
2575
+ mobile: 0.75
2576
+ }
2577
+ };
2578
+
2579
+ // ../core/lib/shared/pxToRem.ts
2580
+ var PX_REGEX = /(-?\d*\.?\d+)px/g;
2581
+ function convertPxToRem(cssValue, baseFontSize) {
2582
+ return cssValue.replace(PX_REGEX, (_, num) => {
2583
+ const px = parseFloat(num);
2584
+ if (px === 0) return "0";
2585
+ const rem = px / baseFontSize;
2586
+ const rounded = parseFloat(rem.toFixed(4));
2587
+ return `${rounded}rem`;
2588
+ });
2589
+ }
2590
+ var PX_KEEP_PROPERTIES = /* @__PURE__ */ new Set([
2591
+ "border-width",
2592
+ "border-top-width",
2593
+ "border-right-width",
2594
+ "border-bottom-width",
2595
+ "border-left-width",
2596
+ "outline-width",
2597
+ "outline-offset",
2598
+ "border",
2599
+ "box-shadow",
2600
+ "text-shadow"
2601
+ ]);
2602
+ function shouldConvertProperty(cssProperty) {
2603
+ return !PX_KEEP_PROPERTIES.has(cssProperty);
2604
+ }
2605
+ function applyRemConversion(declarations, remConfig) {
2606
+ if (!remConfig?.enabled) return declarations;
2607
+ return declarations.split(";").map((decl) => {
2608
+ const trimmed = decl.trim();
2609
+ if (!trimmed) return "";
2610
+ const colonIndex = trimmed.indexOf(":");
2611
+ if (colonIndex === -1) return trimmed;
2612
+ const property = trimmed.substring(0, colonIndex).trim();
2613
+ const value = trimmed.substring(colonIndex + 1).trim();
2614
+ if (shouldConvertProperty(property)) {
2615
+ return `${property}: ${convertPxToRem(value, remConfig.baseFontSize)}`;
2616
+ }
2617
+ return trimmed;
2618
+ }).filter(Boolean).join("; ");
2619
+ }
2620
+
2621
+ // ../core/lib/shared/cssGeneration.ts
2622
+ var SORTED_PREFIXES = Object.keys(prefixToCSSProperty).sort((a, b) => b.length - a.length);
2623
+ var cssPropertyOrderMap = (() => {
2624
+ const map = /* @__PURE__ */ new Map();
2625
+ const props = Object.keys(propertyMap);
2626
+ for (let i = 0; i < props.length; i++) {
2627
+ const kebab = props[i].replace(/([A-Z])/g, "-$1").toLowerCase();
2628
+ map.set(kebab, i);
2629
+ }
2630
+ return map;
2631
+ })();
2632
+ function getResponsiveMode(scales) {
2633
+ return scales?.mode ?? "breakpoints";
2634
+ }
2635
+ function applyFluidToStyle(style, responsiveScales, breakpoints) {
2636
+ const range = responsiveScales.fluidRange ?? DEFAULT_FLUID_RANGE;
2637
+ const baseRef = responsiveScales.baseReference ?? 16;
2638
+ const smallest = getSmallestBreakpointName(breakpoints);
2639
+ if (!smallest) return style;
2640
+ const out = {};
2641
+ for (const [prop, value] of Object.entries(style)) {
2642
+ if (typeof value === "object" && value !== null && "_mapping" in value) {
2643
+ out[prop] = value;
2644
+ continue;
2645
+ }
2646
+ if (value == null || value === "") {
2647
+ out[prop] = value;
2648
+ continue;
2649
+ }
2650
+ const scale = getScaleMultiplier(
2651
+ responsiveScales,
2652
+ prop,
2653
+ smallest
2654
+ );
2655
+ if (scale == null || scale === 1) {
2656
+ out[prop] = value;
2657
+ continue;
2658
+ }
2659
+ const fluidValue = buildFluidPropertyValue(
2660
+ String(value),
2661
+ scale,
2662
+ range.min,
2663
+ range.max,
2664
+ baseRef
2665
+ );
2666
+ out[prop] = fluidValue ?? value;
2667
+ }
2668
+ return out;
2669
+ }
2670
+ var CONTAINER_RESERVED_VALUES = /* @__PURE__ */ new Set(["auto", "inherit", "initial", "unset", ""]);
2671
+ function applyContainerPattern(style, fluidActive) {
2672
+ if (!fluidActive) return style;
2673
+ const w = style.width;
2674
+ const mw = style.maxWidth;
2675
+ if (w == null || mw == null) return style;
2676
+ if (typeof w !== "string" || typeof mw !== "string") return style;
2677
+ if (w !== mw) return style;
2678
+ if (CONTAINER_RESERVED_VALUES.has(w.trim())) return style;
2679
+ return {
2680
+ ...style,
2681
+ width: "calc(100% - var(--site-margin) * 2)",
2682
+ marginLeft: "auto",
2683
+ marginRight: "auto"
2684
+ };
2685
+ }
2686
+ function isResponsiveStyle(style) {
2687
+ return typeof style === "object" && style !== null && ("base" in style || "tablet" in style || "mobile" in style);
2688
+ }
2689
+ function styleObjectToCSS(style) {
2690
+ const declarations = [];
2691
+ for (const [prop, value] of Object.entries(style)) {
2692
+ if (typeof value === "object" && value !== null && "_mapping" in value) {
2693
+ continue;
2694
+ }
2695
+ const cssProperty = prop.replace(/([A-Z])/g, "-$1").toLowerCase();
2696
+ let cssValue = String(value);
2697
+ if ((prop === "backgroundColor" || prop === "color" || prop === "borderColor") && !cssValue.startsWith("#") && !cssValue.startsWith("rgb") && !cssValue.startsWith("var(") && !cssValue.includes("(")) {
2698
+ cssValue = `var(--${cssValue})`;
2699
+ }
2700
+ declarations.push(`${cssProperty}: ${cssValue}`);
2701
+ }
2702
+ return declarations.join("; ");
2703
+ }
2704
+ function generateInteractiveCSS(elementClass, interactiveStyles, breakpoints = DEFAULT_BREAKPOINTS, remConfig, responsiveScales) {
2705
+ const css = [];
2706
+ const breakpointValues = getBreakpointValues(breakpoints);
2707
+ const scalingEnabled = responsiveScales?.enabled === true;
2708
+ const mode = getResponsiveMode(responsiveScales);
2709
+ const fluidActive = scalingEnabled && mode === "fluid";
2710
+ for (const rule of interactiveStyles) {
2711
+ const { prefix, postfix, style } = rule;
2712
+ const fullSelector = `${prefix || ""}.${elementClass}${postfix || ""}`;
2713
+ const sortedBreakpoints = Object.entries(breakpointValues).sort(
2714
+ ([, a], [, b]) => b - a
2715
+ );
2716
+ if (isResponsiveStyle(style)) {
2717
+ const responsive = style;
2718
+ if (responsive.base && Object.keys(responsive.base).length > 0) {
2719
+ let baseStyle = responsive.base;
2720
+ if (fluidActive) {
2721
+ baseStyle = applyContainerPattern(baseStyle, true);
2722
+ baseStyle = applyFluidToStyle(baseStyle, responsiveScales, breakpoints);
2723
+ }
2724
+ const properties = applyRemConversion(styleObjectToCSS(baseStyle), remConfig);
2725
+ if (properties) {
2726
+ css.push(`${fullSelector} { ${properties}; }`);
2727
+ }
2728
+ }
2729
+ for (const [breakpointName, breakpointValue] of sortedBreakpoints) {
2730
+ const explicit = responsive[breakpointName];
2731
+ let merged = null;
2732
+ if (explicit && Object.keys(explicit).length > 0) {
2733
+ merged = fluidActive ? applyContainerPattern({ ...explicit }, true) : { ...explicit };
2734
+ }
2735
+ if (scalingEnabled && !fluidActive && responsive.base) {
2736
+ const scaled = scaleStyleForBreakpoint(
2737
+ responsive.base,
2738
+ responsiveScales,
2739
+ breakpointName,
2740
+ new Set(Object.keys(explicit ?? {}))
2741
+ );
2742
+ if (Object.keys(scaled).length > 0) {
2743
+ merged = { ...merged ?? {}, ...scaled };
2744
+ }
2745
+ }
2746
+ if (merged && Object.keys(merged).length > 0) {
2747
+ const properties = applyRemConversion(styleObjectToCSS(merged), remConfig);
2748
+ if (properties) {
2749
+ css.push(
2750
+ `@media (max-width: ${breakpointValue}px) { ${fullSelector} { ${properties}; } }`
2751
+ );
2752
+ }
2753
+ }
2754
+ }
2755
+ } else {
2756
+ const flatStyle = style;
2757
+ if (Object.keys(flatStyle).length > 0) {
2758
+ let baseFlat = flatStyle;
2759
+ if (fluidActive) {
2760
+ baseFlat = applyContainerPattern(baseFlat, true);
2761
+ baseFlat = applyFluidToStyle(baseFlat, responsiveScales, breakpoints);
2762
+ }
2763
+ const properties = applyRemConversion(styleObjectToCSS(baseFlat), remConfig);
2764
+ if (properties) {
2765
+ css.push(`${fullSelector} { ${properties}; }`);
2766
+ }
2767
+ if (scalingEnabled && !fluidActive) {
2768
+ for (const [breakpointName, breakpointValue] of sortedBreakpoints) {
2769
+ const scaled = scaleStyleForBreakpoint(
2770
+ flatStyle,
2771
+ responsiveScales,
2772
+ breakpointName,
2773
+ /* @__PURE__ */ new Set()
2774
+ );
2775
+ if (Object.keys(scaled).length === 0) continue;
2776
+ const scaledProps = applyRemConversion(styleObjectToCSS(scaled), remConfig);
2777
+ if (!scaledProps) continue;
2778
+ css.push(
2779
+ `@media (max-width: ${breakpointValue}px) { ${fullSelector} { ${scaledProps}; } }`
2780
+ );
2781
+ }
2782
+ }
2783
+ }
2784
+ }
2785
+ }
2786
+ return css.join("\n");
2787
+ }
2788
+ function scaleStyleForBreakpoint(baseStyle, responsiveScales, breakpointName, skipProperties) {
2789
+ const result = {};
2790
+ const baseRef = responsiveScales.baseReference ?? 16;
2791
+ for (const [property, value] of Object.entries(baseStyle)) {
2792
+ if (skipProperties.has(property)) continue;
2793
+ if (typeof value === "object" && value !== null && "_mapping" in value) continue;
2794
+ if (value == null) continue;
2795
+ const strValue = String(value);
2796
+ if (strValue === "") continue;
2797
+ const scale = getScaleMultiplier(
2798
+ responsiveScales,
2799
+ property,
2800
+ breakpointName
2801
+ );
2802
+ if (scale == null) continue;
2803
+ const scaledValue = scalePropertyValue(strValue, baseRef, scale);
2804
+ if (scaledValue == null || scaledValue === strValue) continue;
2805
+ result[property] = scaledValue;
2806
+ }
2807
+ return result;
2808
+ }
2809
+
2810
+ // ../core/lib/shared/utilityClassMapper.ts
2811
+ var propertyOrder = Object.keys(propertyMap);
2812
+
2813
+ // ../core/lib/shared/elementClassName.ts
2814
+ function shortHash(input) {
2815
+ let hash = 5381;
2816
+ for (let i = 0; i < input.length; i++) {
2817
+ hash = (hash << 5) + hash ^ input.charCodeAt(i);
2818
+ }
2819
+ return Math.abs(hash).toString(36).slice(-5);
2820
+ }
2821
+
2822
+ // ../core/lib/shared/validation/index.ts
2823
+ init_schemas();
2824
+
2825
+ // ../core/lib/shared/validation/validators.ts
2826
+ init_schemas();
2827
+
2828
+ // ../core/lib/shared/validation/cmsValidators.ts
2829
+ import { z as z2 } from "zod";
2830
+ var CMS_COLLECTION_ID_REGEX = /^[a-zA-Z0-9_-]+$/;
2831
+ var CMSCollectionIdSchema = z2.string().min(1, "Collection ID is required").regex(CMS_COLLECTION_ID_REGEX, "Collection ID must contain only letters, numbers, underscores, and hyphens");
2832
+
2833
+ // ../core/lib/shared/validation/commentValidators.ts
2834
+ import { z as z3 } from "zod";
2835
+ var CommentStatusSchema = z3.enum(COMMENT_STATUSES);
2836
+ var CommentAuthorSchema = z3.object({
2837
+ login: z3.string().min(1),
2838
+ name: z3.string().optional(),
2839
+ avatarUrl: z3.string().optional()
2840
+ });
2841
+ var CommentNodeIdentitySchema = z3.object({
2842
+ kind: z3.enum(["component", "node"]),
2843
+ name: z3.string().min(1),
2844
+ label: z3.string().optional()
2845
+ });
2846
+ var CommentAnchorSchema = z3.object({
2847
+ nodePath: z3.array(z3.number().int().nonnegative()),
2848
+ nodeIdentity: CommentNodeIdentitySchema,
2849
+ offsetXPercent: z3.number().min(0).max(1),
2850
+ offsetYPercent: z3.number().min(0).max(1),
2851
+ breakpoint: z3.string().optional()
2852
+ });
2853
+ var CommentThreadEntrySchema = z3.object({
2854
+ id: z3.string().min(1),
2855
+ author: CommentAuthorSchema,
2856
+ createdAt: z3.string().min(1),
2857
+ text: z3.string(),
2858
+ statusChange: CommentStatusSchema.nullable()
2859
+ });
2860
+ var CommentSchema = z3.object({
2861
+ _id: z3.string().min(1),
2862
+ _filename: z3.string().min(1),
2863
+ _pagePath: z3.string().min(1),
2864
+ _seq: z3.number().int().nonnegative(),
2865
+ _createdAt: z3.string().min(1),
2866
+ _updatedAt: z3.string().min(1),
2867
+ _commitSha: z3.string().nullable(),
2868
+ anchor: CommentAnchorSchema,
2869
+ status: CommentStatusSchema,
2870
+ thread: z3.array(CommentThreadEntrySchema).min(1)
2871
+ });
2872
+
2873
+ // ../core/lib/shared/index.ts
2874
+ init_registry();
2875
+
2876
+ // ../core/lib/shared/expressionEvaluator.ts
2877
+ import jsep from "jsep";
2878
+
2879
+ // ../core/lib/shared/globalTemplateContext.ts
2880
+ var defaultValues = {
2881
+ isEditorMode: false
2882
+ };
2883
+ var globalContext = { ...defaultValues };
2884
+
2885
+ // ../core/lib/shared/interactiveStyleMappings.ts
2886
+ function isStyleMapping(value) {
2887
+ return typeof value === "object" && value !== null && "_mapping" in value && value._mapping === true;
2888
+ }
2889
+
2890
+ // lib/server/loadI18nConfig.ts
2891
+ import { existsSync, readFileSync } from "fs";
2892
+ import { join } from "path";
2893
+ function loadI18nConfig(projectRoot) {
2894
+ try {
2895
+ const cfgPath = join(projectRoot, "project.config.json");
2896
+ if (!existsSync(cfgPath)) return DEFAULT_I18N_CONFIG;
2897
+ const raw = readFileSync(cfgPath, "utf8");
2898
+ const parsed = JSON.parse(raw);
2899
+ return migrateI18nConfig(parsed.i18n);
2900
+ } catch {
2901
+ return DEFAULT_I18N_CONFIG;
2902
+ }
2903
+ }
2904
+
2905
+ export {
2906
+ DEFAULT_BREAKPOINTS,
2907
+ generateInteractiveCSS,
2908
+ shortHash,
2909
+ DEFAULT_I18N_CONFIG,
2910
+ isI18nValue,
2911
+ resolveI18nValue,
2912
+ extractLocaleFromPath,
2913
+ buildLocalizedPath,
2914
+ isStyleMapping,
2915
+ parseSortExpression,
2916
+ serializeSortExpression,
2917
+ parseFilterExpression,
2918
+ serializeFilterExpression,
2919
+ loadI18nConfig
2920
+ };
2921
+ //# sourceMappingURL=chunk-IVGZB6XN.js.map