sdui-web 0.2.0 → 0.4.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.
- package/dist/index.cjs +88 -104
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +76 -82
- package/dist/index.d.ts +76 -82
- package/dist/index.js +88 -104
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -62,6 +62,7 @@ function applyModifier(element, modifier, theme) {
|
|
|
62
62
|
const s = element.style;
|
|
63
63
|
if (modifier.alignment) {
|
|
64
64
|
switch (modifier.alignment) {
|
|
65
|
+
// Single-axis (Column / Row children)
|
|
65
66
|
case "center":
|
|
66
67
|
case "center_horizontally":
|
|
67
68
|
case "center_vertically":
|
|
@@ -69,65 +70,94 @@ function applyModifier(element, modifier, theme) {
|
|
|
69
70
|
break;
|
|
70
71
|
case "start":
|
|
71
72
|
case "top":
|
|
72
|
-
case "top_start":
|
|
73
73
|
s.alignSelf = "flex-start";
|
|
74
74
|
break;
|
|
75
75
|
case "end":
|
|
76
76
|
case "bottom":
|
|
77
|
-
case "bottom_end":
|
|
78
77
|
s.alignSelf = "flex-end";
|
|
79
78
|
break;
|
|
79
|
+
// Two-axis (Box children — grid layout)
|
|
80
|
+
case "top_start":
|
|
81
|
+
s.alignSelf = "start";
|
|
82
|
+
s.justifySelf = "start";
|
|
83
|
+
break;
|
|
84
|
+
case "top_center":
|
|
85
|
+
s.alignSelf = "start";
|
|
86
|
+
s.justifySelf = "center";
|
|
87
|
+
break;
|
|
88
|
+
case "top_end":
|
|
89
|
+
s.alignSelf = "start";
|
|
90
|
+
s.justifySelf = "end";
|
|
91
|
+
break;
|
|
92
|
+
case "center_start":
|
|
93
|
+
s.alignSelf = "center";
|
|
94
|
+
s.justifySelf = "start";
|
|
95
|
+
break;
|
|
96
|
+
case "center_end":
|
|
97
|
+
s.alignSelf = "center";
|
|
98
|
+
s.justifySelf = "end";
|
|
99
|
+
break;
|
|
100
|
+
case "bottom_start":
|
|
101
|
+
s.alignSelf = "end";
|
|
102
|
+
s.justifySelf = "start";
|
|
103
|
+
break;
|
|
104
|
+
case "bottom_center":
|
|
105
|
+
s.alignSelf = "end";
|
|
106
|
+
s.justifySelf = "center";
|
|
107
|
+
break;
|
|
108
|
+
case "bottom_end":
|
|
109
|
+
s.alignSelf = "end";
|
|
110
|
+
s.justifySelf = "end";
|
|
111
|
+
break;
|
|
80
112
|
}
|
|
81
113
|
}
|
|
82
114
|
if (modifier.weight != null) {
|
|
83
115
|
s.flex = `${modifier.weight}`;
|
|
116
|
+
s.minWidth = "0";
|
|
117
|
+
s.minHeight = "0";
|
|
84
118
|
}
|
|
85
119
|
if (modifier.action) {
|
|
86
120
|
const action = modifier.action;
|
|
87
|
-
|
|
121
|
+
s.cursor = "pointer";
|
|
88
122
|
element.addEventListener("click", (e) => {
|
|
89
123
|
e.stopPropagation();
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
});
|
|
95
|
-
element.dispatchEvent(event);
|
|
96
|
-
console.log("[sdui] navigate \u2192", action.params?.route, action.params?.args);
|
|
97
|
-
}
|
|
124
|
+
element.dispatchEvent(new CustomEvent("sdui:action", {
|
|
125
|
+
bubbles: true,
|
|
126
|
+
detail: { type: action.type, params: action.params }
|
|
127
|
+
}));
|
|
98
128
|
});
|
|
99
129
|
}
|
|
100
|
-
const
|
|
101
|
-
const hasAspectRatio = "aspectRatio" in
|
|
102
|
-
const hasWidth = "width" in
|
|
103
|
-
const hasHeight = "height" in
|
|
130
|
+
const mod = modifier;
|
|
131
|
+
const hasAspectRatio = "aspectRatio" in mod && mod.aspectRatio != null;
|
|
132
|
+
const hasWidth = "width" in mod && mod.width;
|
|
133
|
+
const hasHeight = "height" in mod && mod.height;
|
|
104
134
|
if (hasWidth) {
|
|
105
|
-
const w = resolveSize(
|
|
135
|
+
const w = resolveSize(mod.width);
|
|
106
136
|
if (w) s.width = w;
|
|
107
137
|
}
|
|
108
138
|
if (hasHeight && !(hasAspectRatio && hasWidth)) {
|
|
109
|
-
const h = resolveSize(
|
|
139
|
+
const h = resolveSize(mod.height);
|
|
110
140
|
if (h) s.height = h;
|
|
111
141
|
}
|
|
112
142
|
if (hasAspectRatio) {
|
|
113
|
-
s.aspectRatio = `${
|
|
143
|
+
s.aspectRatio = `${mod.aspectRatio}`;
|
|
114
144
|
}
|
|
115
|
-
if ("padding" in
|
|
116
|
-
const p = resolveSpacing(
|
|
145
|
+
if ("padding" in mod && mod.padding) {
|
|
146
|
+
const p = resolveSpacing(mod.padding);
|
|
117
147
|
if (p.top) s.paddingTop = p.top;
|
|
118
148
|
if (p.bottom) s.paddingBottom = p.bottom;
|
|
119
149
|
if (p.left) s.paddingLeft = p.left;
|
|
120
150
|
if (p.right) s.paddingRight = p.right;
|
|
121
151
|
}
|
|
122
|
-
if ("margin" in
|
|
123
|
-
const m = resolveSpacing(
|
|
152
|
+
if ("margin" in mod && mod.margin) {
|
|
153
|
+
const m = resolveSpacing(mod.margin);
|
|
124
154
|
if (m.top) s.marginTop = m.top;
|
|
125
155
|
if (m.bottom) s.marginBottom = m.bottom;
|
|
126
156
|
if (m.left) s.marginLeft = m.left;
|
|
127
157
|
if (m.right) s.marginRight = m.right;
|
|
128
158
|
}
|
|
129
|
-
if ("backgroundColor" in
|
|
130
|
-
applyBackground(s,
|
|
159
|
+
if ("backgroundColor" in mod && mod.backgroundColor) {
|
|
160
|
+
applyBackground(s, mod.backgroundColor, theme);
|
|
131
161
|
}
|
|
132
162
|
}
|
|
133
163
|
function applyBackground(s, bg, theme) {
|
|
@@ -205,7 +235,7 @@ function renderText(component, theme) {
|
|
|
205
235
|
if (props?.overflow === "ellipsis") {
|
|
206
236
|
el.style.textOverflow = "ellipsis";
|
|
207
237
|
el.style.overflow = "hidden";
|
|
208
|
-
el.style.whiteSpace =
|
|
238
|
+
el.style.whiteSpace = "nowrap";
|
|
209
239
|
}
|
|
210
240
|
if (props?.maxLines != null) {
|
|
211
241
|
el.style.display = "-webkit-box";
|
|
@@ -269,45 +299,45 @@ function renderImage(component, theme) {
|
|
|
269
299
|
function renderBox(component, theme) {
|
|
270
300
|
const props = component.properties;
|
|
271
301
|
const el = document.createElement("div");
|
|
272
|
-
el.style.display = "
|
|
302
|
+
el.style.display = "grid";
|
|
273
303
|
el.style.position = "relative";
|
|
274
304
|
if (props?.alignment) {
|
|
275
305
|
switch (props.alignment) {
|
|
276
306
|
case "top_start":
|
|
277
|
-
el.style.
|
|
278
|
-
el.style.alignItems = "
|
|
307
|
+
el.style.justifyItems = "start";
|
|
308
|
+
el.style.alignItems = "start";
|
|
279
309
|
break;
|
|
280
310
|
case "top_center":
|
|
281
|
-
el.style.
|
|
282
|
-
el.style.alignItems = "
|
|
311
|
+
el.style.justifyItems = "center";
|
|
312
|
+
el.style.alignItems = "start";
|
|
283
313
|
break;
|
|
284
314
|
case "top_end":
|
|
285
|
-
el.style.
|
|
286
|
-
el.style.alignItems = "
|
|
315
|
+
el.style.justifyItems = "end";
|
|
316
|
+
el.style.alignItems = "start";
|
|
287
317
|
break;
|
|
288
318
|
case "center_start":
|
|
289
|
-
el.style.
|
|
319
|
+
el.style.justifyItems = "start";
|
|
290
320
|
el.style.alignItems = "center";
|
|
291
321
|
break;
|
|
292
322
|
case "center":
|
|
293
|
-
el.style.
|
|
323
|
+
el.style.justifyItems = "center";
|
|
294
324
|
el.style.alignItems = "center";
|
|
295
325
|
break;
|
|
296
326
|
case "center_end":
|
|
297
|
-
el.style.
|
|
327
|
+
el.style.justifyItems = "end";
|
|
298
328
|
el.style.alignItems = "center";
|
|
299
329
|
break;
|
|
300
330
|
case "bottom_start":
|
|
301
|
-
el.style.
|
|
302
|
-
el.style.alignItems = "
|
|
331
|
+
el.style.justifyItems = "start";
|
|
332
|
+
el.style.alignItems = "end";
|
|
303
333
|
break;
|
|
304
334
|
case "bottom_center":
|
|
305
|
-
el.style.
|
|
306
|
-
el.style.alignItems = "
|
|
335
|
+
el.style.justifyItems = "center";
|
|
336
|
+
el.style.alignItems = "end";
|
|
307
337
|
break;
|
|
308
338
|
case "bottom_end":
|
|
309
|
-
el.style.
|
|
310
|
-
el.style.alignItems = "
|
|
339
|
+
el.style.justifyItems = "end";
|
|
340
|
+
el.style.alignItems = "end";
|
|
311
341
|
break;
|
|
312
342
|
}
|
|
313
343
|
}
|
|
@@ -343,6 +373,7 @@ function renderColumn(component, theme) {
|
|
|
343
373
|
el.style.justifyContent = "space-around";
|
|
344
374
|
break;
|
|
345
375
|
case "spaced_by":
|
|
376
|
+
el.style.justifyContent = "flex-start";
|
|
346
377
|
if (arr.spacing != null) {
|
|
347
378
|
el.style.gap = `${arr.spacing}px`;
|
|
348
379
|
}
|
|
@@ -397,6 +428,7 @@ function renderRow(component, theme) {
|
|
|
397
428
|
el.style.justifyContent = "space-around";
|
|
398
429
|
break;
|
|
399
430
|
case "spaced_by":
|
|
431
|
+
el.style.justifyContent = "flex-start";
|
|
400
432
|
if (arr.spacing != null) {
|
|
401
433
|
el.style.gap = `${arr.spacing}px`;
|
|
402
434
|
}
|
|
@@ -452,6 +484,7 @@ function renderLazyColumn(component, theme) {
|
|
|
452
484
|
el.style.justifyContent = "space-around";
|
|
453
485
|
break;
|
|
454
486
|
case "spaced_by":
|
|
487
|
+
el.style.justifyContent = "flex-start";
|
|
455
488
|
if (arr.spacing != null) {
|
|
456
489
|
el.style.gap = `${arr.spacing}px`;
|
|
457
490
|
}
|
|
@@ -488,8 +521,7 @@ function renderComponent(component, theme) {
|
|
|
488
521
|
el.dataset.sduiType = component.type;
|
|
489
522
|
if (component.children && component.children.length > 0) {
|
|
490
523
|
for (const child of component.children) {
|
|
491
|
-
|
|
492
|
-
el.appendChild(childEl);
|
|
524
|
+
el.appendChild(renderComponent(child, theme));
|
|
493
525
|
}
|
|
494
526
|
}
|
|
495
527
|
return el;
|
|
@@ -518,16 +550,8 @@ function colorModelProperties() {
|
|
|
518
550
|
}
|
|
519
551
|
function actionModelProperties() {
|
|
520
552
|
return [
|
|
521
|
-
{ name: "type", label: "Action Type", type: "
|
|
522
|
-
{
|
|
523
|
-
name: "params",
|
|
524
|
-
label: "Params",
|
|
525
|
-
type: "object",
|
|
526
|
-
properties: [
|
|
527
|
-
{ name: "route", label: "Route", type: "string" },
|
|
528
|
-
{ name: "args", label: "Args", type: "object" }
|
|
529
|
-
]
|
|
530
|
-
}
|
|
553
|
+
{ name: "type", label: "Action Type", type: "string" },
|
|
554
|
+
{ name: "params", label: "Parameters", type: "object" }
|
|
531
555
|
];
|
|
532
556
|
}
|
|
533
557
|
function backgroundColorModelProperties() {
|
|
@@ -553,7 +577,7 @@ function modifierBaseProperties() {
|
|
|
553
577
|
name: "alignment",
|
|
554
578
|
label: "Alignment",
|
|
555
579
|
type: "enum",
|
|
556
|
-
enumValues: ["center", "center_horizontally", "center_vertically", "
|
|
580
|
+
enumValues: ["start", "end", "center", "center_horizontally", "center_vertically", "top", "bottom", "top_start", "top_center", "top_end", "center_start", "center_end", "bottom_start", "bottom_center", "bottom_end"]
|
|
557
581
|
},
|
|
558
582
|
{ name: "weight", label: "Weight", type: "number" },
|
|
559
583
|
{ name: "action", label: "Action", type: "object", properties: actionModelProperties() }
|
|
@@ -640,30 +664,15 @@ var COMPONENT_DEFINITIONS = [
|
|
|
640
664
|
label: "Text",
|
|
641
665
|
acceptsChildren: false,
|
|
642
666
|
properties: [
|
|
643
|
-
|
|
644
|
-
{ name: "text", label: "Text", type: "string", required: true },
|
|
667
|
+
{ name: "text", label: "Text", type: "string", required: true, defaultValue: "Text" },
|
|
645
668
|
{ name: "fontSize", label: "Font Size", type: "number" },
|
|
646
669
|
{ name: "color", label: "Color", type: "object", properties: colorModelProperties() },
|
|
647
|
-
{
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
type: "enum",
|
|
651
|
-
enumValues: ["bold", "medium", "normal", "semi_bold"]
|
|
652
|
-
},
|
|
653
|
-
{
|
|
654
|
-
name: "textAlign",
|
|
655
|
-
label: "Text Align",
|
|
656
|
-
type: "enum",
|
|
657
|
-
enumValues: ["left", "right", "center", "justify", "start", "end", "unspecified"]
|
|
658
|
-
},
|
|
659
|
-
{
|
|
660
|
-
name: "overflow",
|
|
661
|
-
label: "Overflow",
|
|
662
|
-
type: "enum",
|
|
663
|
-
enumValues: ["none", "ellipsis"]
|
|
664
|
-
},
|
|
670
|
+
{ name: "fontWeight", label: "Font Weight", type: "enum", enumValues: ["bold", "medium", "normal", "semi_bold"] },
|
|
671
|
+
{ name: "textAlign", label: "Text Align", type: "enum", enumValues: ["left", "right", "center", "justify", "start", "end", "unspecified"] },
|
|
672
|
+
{ name: "overflow", label: "Overflow", type: "enum", enumValues: ["none", "ellipsis"] },
|
|
665
673
|
{ name: "maxLines", label: "Max Lines", type: "number" },
|
|
666
|
-
{ name: "minLines", label: "Min Lines", type: "number" }
|
|
674
|
+
{ name: "minLines", label: "Min Lines", type: "number", defaultValue: 1 },
|
|
675
|
+
textModifierDescriptor()
|
|
667
676
|
]
|
|
668
677
|
},
|
|
669
678
|
{
|
|
@@ -673,12 +682,7 @@ var COMPONENT_DEFINITIONS = [
|
|
|
673
682
|
properties: [
|
|
674
683
|
imageModifierDescriptor(),
|
|
675
684
|
{ name: "image", label: "Image URL", type: "string", required: true },
|
|
676
|
-
{
|
|
677
|
-
name: "scaleType",
|
|
678
|
-
label: "Scale Type",
|
|
679
|
-
type: "enum",
|
|
680
|
-
enumValues: ["fit", "crop", "fill_height", "fill_width", "fill_bounds", "inside", "none"]
|
|
681
|
-
},
|
|
685
|
+
{ name: "scaleType", label: "Scale Type", type: "enum", enumValues: ["fit", "crop", "fill_height", "fill_width", "fill_bounds", "inside", "none"] },
|
|
682
686
|
{ name: "contentDescription", label: "Content Description", type: "string" },
|
|
683
687
|
{ name: "tintColor", label: "Tint Color", type: "object", properties: colorModelProperties() }
|
|
684
688
|
]
|
|
@@ -693,17 +697,7 @@ var COMPONENT_DEFINITIONS = [
|
|
|
693
697
|
name: "alignment",
|
|
694
698
|
label: "Alignment",
|
|
695
699
|
type: "enum",
|
|
696
|
-
enumValues: [
|
|
697
|
-
"top_start",
|
|
698
|
-
"top_center",
|
|
699
|
-
"top_end",
|
|
700
|
-
"center_start",
|
|
701
|
-
"center",
|
|
702
|
-
"center_end",
|
|
703
|
-
"bottom_start",
|
|
704
|
-
"bottom_center",
|
|
705
|
-
"bottom_end"
|
|
706
|
-
]
|
|
700
|
+
enumValues: ["top_start", "top_center", "top_end", "center_start", "center", "center_end", "bottom_start", "bottom_center", "bottom_end"]
|
|
707
701
|
}
|
|
708
702
|
]
|
|
709
703
|
},
|
|
@@ -714,12 +708,7 @@ var COMPONENT_DEFINITIONS = [
|
|
|
714
708
|
properties: [
|
|
715
709
|
containerModifierDescriptor(),
|
|
716
710
|
verticalArrangementDescriptor(),
|
|
717
|
-
{
|
|
718
|
-
name: "horizontalAlignment",
|
|
719
|
-
label: "Horizontal Alignment",
|
|
720
|
-
type: "enum",
|
|
721
|
-
enumValues: ["start", "end", "center_horizontally"]
|
|
722
|
-
},
|
|
711
|
+
{ name: "horizontalAlignment", label: "Horizontal Alignment", type: "enum", enumValues: ["start", "end", "center_horizontally"] },
|
|
723
712
|
{ name: "canScroll", label: "Can Scroll", type: "boolean" }
|
|
724
713
|
]
|
|
725
714
|
},
|
|
@@ -729,12 +718,7 @@ var COMPONENT_DEFINITIONS = [
|
|
|
729
718
|
acceptsChildren: true,
|
|
730
719
|
properties: [
|
|
731
720
|
containerModifierDescriptor(),
|
|
732
|
-
{
|
|
733
|
-
name: "verticalAlignment",
|
|
734
|
-
label: "Vertical Alignment",
|
|
735
|
-
type: "enum",
|
|
736
|
-
enumValues: ["top", "bottom", "center_vertically"]
|
|
737
|
-
},
|
|
721
|
+
{ name: "verticalAlignment", label: "Vertical Alignment", type: "enum", enumValues: ["top", "bottom", "center_vertically"] },
|
|
738
722
|
horizontalArrangementDescriptor(),
|
|
739
723
|
{ name: "canScroll", label: "Can Scroll", type: "boolean" }
|
|
740
724
|
]
|
package/dist/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.ts","../src/utils.ts","../src/modifiers.ts","../src/components/text.ts","../src/components/image.ts","../src/components/box.ts","../src/components/column.ts","../src/components/row.ts","../src/components/lazy-column.ts","../src/components/index.ts","../src/render.ts","../src/component-meta.ts"],"sourcesContent":["import type { SduiScreen, Theme } from './types';\nimport { renderComponent } from './render';\n\nexport type { SduiScreen, SduiComponent, Theme } from './types';\nexport type { PropertiesModel, TextUiProperties, ImageUiProperties, BoxUiProperties, ColumnUiProperties, RowUiProperties, LazyColumnUiProperties } from './types';\nexport type { ComponentMeta, PropertyDescriptor, PropertyType } from './component-meta';\nexport { getComponents } from './component-meta';\n\nexport interface RenderOptions {\n theme?: Theme;\n}\n\nexport function render(json: string, container: HTMLElement, options?: RenderOptions): void {\n const screen: SduiScreen = JSON.parse(json);\n const theme: Theme = options?.theme ?? 'light';\n\n const root = renderComponent(screen.root, theme);\n\n container.innerHTML = '';\n container.appendChild(root);\n}\n","import type { ColorModel, SizeModel, SpacingModel, Theme } from './types';\n\nexport function resolveColor(color: ColorModel | undefined, theme: Theme): string | undefined {\n if (!color) return undefined;\n if (theme === 'dark') {\n return color.dark ?? color.light;\n }\n return color.light ?? color.dark;\n}\n\nexport function resolveSize(size: SizeModel | undefined): string | undefined {\n if (!size || !size.unit) return undefined;\n switch (size.unit) {\n case 'dp':\n return `${size.value ?? 0}px`;\n case 'match_parent':\n return '100%';\n case 'wrap_content':\n return 'fit-content';\n default:\n return undefined;\n }\n}\n\nexport function resolveSpacing(spacing: SpacingModel | undefined): {\n top?: string;\n bottom?: string;\n left?: string;\n right?: string;\n} {\n if (!spacing) return {};\n return {\n top: spacing.top != null ? `${spacing.top}px` : undefined,\n bottom: spacing.bottom != null ? `${spacing.bottom}px` : undefined,\n left: spacing.start != null ? `${spacing.start}px` : undefined,\n right: spacing.end != null ? `${spacing.end}px` : undefined,\n };\n}\n","import type { BackgroundColorModel, ContainerUiModifier, ImageUiModifier, ModifierBase, TextUiModifier, Theme } from './types';\nimport { resolveColor, resolveSize, resolveSpacing } from './utils';\n\nexport function applyModifier(element: HTMLElement, modifier: ModifierBase | undefined, theme: Theme): void {\n if (!modifier) return;\n\n const s = element.style;\n\n // alignment → align-self mapping\n if (modifier.alignment) {\n switch (modifier.alignment) {\n case 'center':\n case 'center_horizontally':\n case 'center_vertically':\n s.alignSelf = 'center';\n break;\n case 'start':\n case 'top':\n case 'top_start':\n s.alignSelf = 'flex-start';\n break;\n case 'end':\n case 'bottom':\n case 'bottom_end':\n s.alignSelf = 'flex-end';\n break;\n }\n }\n\n // weight → flex\n if (modifier.weight != null) {\n s.flex = `${modifier.weight}`;\n }\n\n // action → click handler\n if (modifier.action) {\n const action = modifier.action;\n element.style.cursor = 'pointer';\n element.addEventListener('click', (e) => {\n e.stopPropagation();\n if (action.type === 'navigate') {\n const event = new CustomEvent('sdui:navigate', {\n bubbles: true,\n detail: { route: action.params?.route, args: action.params?.args },\n });\n element.dispatchEvent(event);\n console.log('[sdui] navigate →', action.params?.route, action.params?.args);\n }\n });\n }\n\n // Container-like modifiers (width, height, padding, margin, backgroundColor, aspectRatio)\n const containerMod = modifier as ContainerUiModifier | ImageUiModifier | TextUiModifier;\n\n const hasAspectRatio = 'aspectRatio' in containerMod && containerMod.aspectRatio != null;\n const hasWidth = 'width' in containerMod && containerMod.width;\n const hasHeight = 'height' in containerMod && (containerMod as ContainerUiModifier).height;\n\n if (hasWidth) {\n const w = resolveSize(containerMod.width);\n if (w) s.width = w;\n }\n\n // In Compose, aspectRatio overrides the unconstrained dimension.\n // For CSS aspect-ratio to work, we must not set both width and height explicitly.\n // If aspectRatio + width → skip height (height = width / ratio).\n // If aspectRatio + height only → skip width (width = height * ratio).\n if (hasHeight && !(hasAspectRatio && hasWidth)) {\n const h = resolveSize((containerMod as ContainerUiModifier).height);\n if (h) s.height = h;\n }\n\n if (hasAspectRatio) {\n s.aspectRatio = `${(containerMod as ContainerUiModifier).aspectRatio}`;\n }\n\n if ('padding' in containerMod && containerMod.padding) {\n const p = resolveSpacing((containerMod as ContainerUiModifier).padding);\n if (p.top) s.paddingTop = p.top;\n if (p.bottom) s.paddingBottom = p.bottom;\n if (p.left) s.paddingLeft = p.left;\n if (p.right) s.paddingRight = p.right;\n }\n\n if ('margin' in containerMod && containerMod.margin) {\n const m = resolveSpacing(containerMod.margin);\n if (m.top) s.marginTop = m.top;\n if (m.bottom) s.marginBottom = m.bottom;\n if (m.left) s.marginLeft = m.left;\n if (m.right) s.marginRight = m.right;\n }\n\n if ('backgroundColor' in containerMod && containerMod.backgroundColor) {\n applyBackground(s, (containerMod as ContainerUiModifier).backgroundColor!, theme);\n }\n}\n\nfunction applyBackground(s: CSSStyleDeclaration, bg: BackgroundColorModel, theme: Theme): void {\n if (!bg.colors || bg.colors.length === 0) return;\n\n const colors = bg.colors.map((c) => resolveColor(c, theme)).filter(Boolean) as string[];\n if (colors.length === 0) return;\n\n switch (bg.type) {\n case 'single':\n s.backgroundColor = colors[0];\n break;\n case 'vertical_gradient':\n s.background = `linear-gradient(to bottom, ${colors.join(', ')})`;\n break;\n case 'horizontal_gradient':\n s.background = `linear-gradient(to right, ${colors.join(', ')})`;\n break;\n case 'linear_gradient':\n s.background = `linear-gradient(${colors.join(', ')})`;\n break;\n default:\n if (colors.length === 1) {\n s.backgroundColor = colors[0];\n }\n break;\n }\n}\n","import type { SduiComponent, TextUiProperties, Theme } from '../types';\nimport { resolveColor } from '../utils';\nimport { applyModifier } from '../modifiers';\n\nexport function renderText(component: SduiComponent, theme: Theme): HTMLElement {\n const props = component.properties as TextUiProperties | undefined;\n const el = document.createElement('span');\n\n el.textContent = props?.text ?? '';\n\n if (props?.fontSize != null) {\n el.style.fontSize = `${props.fontSize}px`;\n }\n\n if (props?.color) {\n const c = resolveColor(props.color, theme);\n if (c) el.style.color = c;\n }\n\n if (props?.fontWeight) {\n switch (props.fontWeight) {\n case 'bold':\n el.style.fontWeight = '700';\n break;\n case 'semi_bold':\n el.style.fontWeight = '600';\n break;\n case 'medium':\n el.style.fontWeight = '500';\n break;\n case 'normal':\n el.style.fontWeight = '400';\n break;\n }\n }\n\n if (props?.textAlign) {\n el.style.display = 'block';\n switch (props.textAlign) {\n case 'left':\n case 'start':\n el.style.textAlign = 'left';\n break;\n case 'right':\n case 'end':\n el.style.textAlign = 'right';\n break;\n case 'center':\n el.style.textAlign = 'center';\n break;\n case 'justify':\n el.style.textAlign = 'justify';\n break;\n }\n }\n\n if (props?.overflow === 'ellipsis') {\n el.style.textOverflow = 'ellipsis';\n el.style.overflow = 'hidden';\n el.style.whiteSpace = props.maxLines === 1 ? 'nowrap' : 'normal';\n }\n\n if (props?.maxLines != null) {\n el.style.display = '-webkit-box';\n el.style.webkitLineClamp = `${props.maxLines}`;\n (el.style as unknown as Record<string, string>)['-webkit-box-orient'] = 'vertical';\n el.style.overflow = 'hidden';\n }\n\n if (props?.minLines != null) {\n el.style.minHeight = `${props.minLines * (props.fontSize ?? 16) * 1.4}px`;\n }\n\n applyModifier(el, props?.modifier, theme);\n\n return el;\n}\n","import type { SduiComponent, ImageUiProperties, Theme } from '../types';\nimport { resolveColor } from '../utils';\nimport { applyModifier } from '../modifiers';\n\nexport function renderImage(component: SduiComponent, theme: Theme): HTMLElement {\n const props = component.properties as ImageUiProperties | undefined;\n const el = document.createElement('img');\n\n if (props?.image) {\n el.src = props.image;\n }\n\n if (props?.contentDescription) {\n el.alt = props.contentDescription;\n }\n\n if (props?.scaleType) {\n switch (props.scaleType) {\n case 'fit':\n case 'inside':\n el.style.objectFit = 'contain';\n break;\n case 'crop':\n el.style.objectFit = 'cover';\n break;\n case 'fill_bounds':\n el.style.objectFit = 'fill';\n break;\n case 'fill_width':\n el.style.objectFit = 'cover';\n el.style.width = '100%';\n break;\n case 'fill_height':\n el.style.objectFit = 'cover';\n el.style.height = '100%';\n break;\n case 'none':\n el.style.objectFit = 'none';\n break;\n }\n }\n\n if (props?.tintColor) {\n const c = resolveColor(props.tintColor, theme);\n if (c) {\n // Use CSS filter to approximate tint; for precise tinting a SVG filter would be needed\n el.style.filter = `opacity(0.5) drop-shadow(0 0 0 ${c})`;\n }\n }\n\n applyModifier(el, props?.modifier, theme);\n\n return el;\n}\n","import type { SduiComponent, BoxUiProperties, Theme } from '../types';\nimport { applyModifier } from '../modifiers';\n\nexport function renderBox(component: SduiComponent, theme: Theme): HTMLElement {\n const props = component.properties as BoxUiProperties | undefined;\n const el = document.createElement('div');\n\n el.style.display = 'flex';\n el.style.position = 'relative';\n\n if (props?.alignment) {\n // Map alignment to flex alignment\n switch (props.alignment) {\n case 'top_start':\n el.style.justifyContent = 'flex-start';\n el.style.alignItems = 'flex-start';\n break;\n case 'top_center':\n el.style.justifyContent = 'center';\n el.style.alignItems = 'flex-start';\n break;\n case 'top_end':\n el.style.justifyContent = 'flex-end';\n el.style.alignItems = 'flex-start';\n break;\n case 'center_start':\n el.style.justifyContent = 'flex-start';\n el.style.alignItems = 'center';\n break;\n case 'center':\n el.style.justifyContent = 'center';\n el.style.alignItems = 'center';\n break;\n case 'center_end':\n el.style.justifyContent = 'flex-end';\n el.style.alignItems = 'center';\n break;\n case 'bottom_start':\n el.style.justifyContent = 'flex-start';\n el.style.alignItems = 'flex-end';\n break;\n case 'bottom_center':\n el.style.justifyContent = 'center';\n el.style.alignItems = 'flex-end';\n break;\n case 'bottom_end':\n el.style.justifyContent = 'flex-end';\n el.style.alignItems = 'flex-end';\n break;\n }\n }\n\n applyModifier(el, props?.modifier, theme);\n\n return el;\n}\n","import type { SduiComponent, ColumnUiProperties, Theme } from '../types';\nimport { applyModifier } from '../modifiers';\n\nexport function renderColumn(component: SduiComponent, theme: Theme): HTMLElement {\n const props = component.properties as ColumnUiProperties | undefined;\n const el = document.createElement('div');\n\n el.style.display = 'flex';\n el.style.flexDirection = 'column';\n\n // verticalArrangement → justify-content + gap\n if (props?.verticalArrangement) {\n const arr = props.verticalArrangement;\n switch (arr.type) {\n case 'top':\n el.style.justifyContent = 'flex-start';\n break;\n case 'center':\n el.style.justifyContent = 'center';\n break;\n case 'bottom':\n el.style.justifyContent = 'flex-end';\n break;\n case 'space_between':\n el.style.justifyContent = 'space-between';\n break;\n case 'space_evenly':\n el.style.justifyContent = 'space-evenly';\n break;\n case 'space_around':\n el.style.justifyContent = 'space-around';\n break;\n case 'spaced_by':\n if (arr.spacing != null) {\n el.style.gap = `${arr.spacing}px`;\n }\n break;\n }\n }\n\n // horizontalAlignment → align-items\n if (props?.horizontalAlignment) {\n switch (props.horizontalAlignment) {\n case 'start':\n el.style.alignItems = 'flex-start';\n break;\n case 'end':\n el.style.alignItems = 'flex-end';\n break;\n case 'center_horizontally':\n el.style.alignItems = 'center';\n break;\n }\n }\n\n if (props?.canScroll) {\n el.style.overflowY = 'auto';\n }\n\n applyModifier(el, props?.modifier, theme);\n\n return el;\n}\n","import type { SduiComponent, RowUiProperties, Theme } from '../types';\nimport { applyModifier } from '../modifiers';\n\nexport function renderRow(component: SduiComponent, theme: Theme): HTMLElement {\n const props = component.properties as RowUiProperties | undefined;\n const el = document.createElement('div');\n\n el.style.display = 'flex';\n el.style.flexDirection = 'row';\n\n // horizontalArrangement → justify-content + gap\n if (props?.horizontalArrangement) {\n const arr = props.horizontalArrangement;\n switch (arr.type) {\n case 'start':\n el.style.justifyContent = 'flex-start';\n break;\n case 'center':\n el.style.justifyContent = 'center';\n break;\n case 'end':\n el.style.justifyContent = 'flex-end';\n break;\n case 'space_between':\n el.style.justifyContent = 'space-between';\n break;\n case 'space_evenly':\n el.style.justifyContent = 'space-evenly';\n break;\n case 'space_around':\n el.style.justifyContent = 'space-around';\n break;\n case 'spaced_by':\n if (arr.spacing != null) {\n el.style.gap = `${arr.spacing}px`;\n }\n break;\n }\n }\n\n // verticalAlignment → align-items\n if (props?.verticalAlignment) {\n switch (props.verticalAlignment) {\n case 'top':\n el.style.alignItems = 'flex-start';\n break;\n case 'bottom':\n el.style.alignItems = 'flex-end';\n break;\n case 'center_vertically':\n el.style.alignItems = 'center';\n break;\n }\n }\n\n if (props?.canScroll) {\n el.style.overflowX = 'auto';\n }\n\n applyModifier(el, props?.modifier, theme);\n\n return el;\n}\n","import type { SduiComponent, LazyColumnUiProperties, Theme } from '../types';\nimport { applyModifier } from '../modifiers';\n\nexport function renderLazyColumn(component: SduiComponent, theme: Theme): HTMLElement {\n const props = component.properties as LazyColumnUiProperties | undefined;\n const el = document.createElement('div');\n\n el.style.display = 'flex';\n el.style.flexDirection = 'column';\n el.style.overflowY = 'auto';\n\n if (props?.verticalArrangement) {\n const arr = props.verticalArrangement;\n switch (arr.type) {\n case 'top':\n el.style.justifyContent = 'flex-start';\n break;\n case 'center':\n el.style.justifyContent = 'center';\n break;\n case 'bottom':\n el.style.justifyContent = 'flex-end';\n break;\n case 'space_between':\n el.style.justifyContent = 'space-between';\n break;\n case 'space_evenly':\n el.style.justifyContent = 'space-evenly';\n break;\n case 'space_around':\n el.style.justifyContent = 'space-around';\n break;\n case 'spaced_by':\n if (arr.spacing != null) {\n el.style.gap = `${arr.spacing}px`;\n }\n break;\n }\n }\n\n applyModifier(el, props?.modifier, theme);\n\n return el;\n}\n","import type { SduiComponent, Theme } from '../types';\nimport { renderText } from './text';\nimport { renderImage } from './image';\nimport { renderBox } from './box';\nimport { renderColumn } from './column';\nimport { renderRow } from './row';\nimport { renderLazyColumn } from './lazy-column';\n\nexport type ComponentRenderer = (component: SduiComponent, theme: Theme) => HTMLElement;\n\nconst renderers: Record<string, ComponentRenderer> = {\n text: renderText,\n image: renderImage,\n box: renderBox,\n column: renderColumn,\n row: renderRow,\n lazy_column: renderLazyColumn,\n};\n\nexport function getRenderer(type: string): ComponentRenderer | undefined {\n return renderers[type];\n}\n","import type { SduiComponent, Theme } from './types';\nimport { getRenderer } from './components';\n\nexport function renderComponent(component: SduiComponent, theme: Theme): HTMLElement {\n const renderer = getRenderer(component.type);\n\n if (!renderer) {\n console.warn(`[sdui] Unknown component type: \"${component.type}\"`);\n const el = document.createElement('div');\n el.dataset.sduiUnknown = component.type;\n return el;\n }\n\n const el = renderer(component, theme);\n el.dataset.sduiType = component.type;\n\n // Recursively render children\n if (component.children && component.children.length > 0) {\n for (const child of component.children) {\n const childEl = renderComponent(child, theme);\n el.appendChild(childEl);\n }\n }\n\n return el;\n}\n","// ── Public types ──\n\nexport type PropertyType = 'string' | 'number' | 'boolean' | 'enum' | 'color' | 'object';\n\nexport interface PropertyDescriptor {\n name: string;\n label: string;\n type: PropertyType;\n required?: boolean;\n defaultValue?: unknown;\n enumValues?: string[];\n properties?: PropertyDescriptor[];\n isArray?: boolean;\n}\n\nexport interface ComponentMeta {\n type: string;\n label: string;\n acceptsChildren: boolean;\n properties: PropertyDescriptor[];\n}\n\n// ── Reusable sub-object property builders ──\n\nfunction sizeModelProperties(): PropertyDescriptor[] {\n return [\n { name: 'value', label: 'Value', type: 'number' },\n { name: 'unit', label: 'Unit', type: 'enum', enumValues: ['dp', 'match_parent', 'wrap_content'] },\n ];\n}\n\nfunction spacingModelProperties(): PropertyDescriptor[] {\n return [\n { name: 'top', label: 'Top', type: 'number' },\n { name: 'bottom', label: 'Bottom', type: 'number' },\n { name: 'start', label: 'Start', type: 'number' },\n { name: 'end', label: 'End', type: 'number' },\n ];\n}\n\nfunction colorModelProperties(): PropertyDescriptor[] {\n return [\n { name: 'light', label: 'Light', type: 'color' },\n { name: 'dark', label: 'Dark', type: 'color' },\n ];\n}\n\nfunction actionModelProperties(): PropertyDescriptor[] {\n return [\n { name: 'type', label: 'Action Type', type: 'enum', enumValues: ['navigate'] },\n {\n name: 'params',\n label: 'Params',\n type: 'object',\n properties: [\n { name: 'route', label: 'Route', type: 'string' },\n { name: 'args', label: 'Args', type: 'object' },\n ],\n },\n ];\n}\n\nfunction backgroundColorModelProperties(): PropertyDescriptor[] {\n return [\n {\n name: 'colors',\n label: 'Colors',\n type: 'object',\n isArray: true,\n properties: colorModelProperties(),\n },\n {\n name: 'type',\n label: 'Background Type',\n type: 'enum',\n enumValues: ['single', 'vertical_gradient', 'horizontal_gradient', 'linear_gradient'],\n },\n ];\n}\n\n// ── Modifier builders ──\n\nfunction modifierBaseProperties(): PropertyDescriptor[] {\n return [\n {\n name: 'alignment',\n label: 'Alignment',\n type: 'enum',\n enumValues: ['center', 'center_horizontally', 'center_vertically', 'start', 'top', 'top_start', 'end', 'bottom', 'bottom_end'],\n },\n { name: 'weight', label: 'Weight', type: 'number' },\n { name: 'action', label: 'Action', type: 'object', properties: actionModelProperties() },\n ];\n}\n\nfunction textModifierDescriptor(): PropertyDescriptor {\n return {\n name: 'modifier',\n label: 'Modifier',\n type: 'object',\n properties: [\n ...modifierBaseProperties(),\n { name: 'width', label: 'Width', type: 'object', properties: sizeModelProperties() },\n { name: 'margin', label: 'Margin', type: 'object', properties: spacingModelProperties() },\n ],\n };\n}\n\nfunction imageModifierDescriptor(): PropertyDescriptor {\n return {\n name: 'modifier',\n label: 'Modifier',\n type: 'object',\n properties: [\n ...modifierBaseProperties(),\n { name: 'width', label: 'Width', type: 'object', properties: sizeModelProperties() },\n { name: 'height', label: 'Height', type: 'object', properties: sizeModelProperties() },\n { name: 'padding', label: 'Padding', type: 'object', properties: spacingModelProperties() },\n { name: 'margin', label: 'Margin', type: 'object', properties: spacingModelProperties() },\n { name: 'aspectRatio', label: 'Aspect Ratio', type: 'number' },\n ],\n };\n}\n\nfunction containerModifierDescriptor(): PropertyDescriptor {\n return {\n name: 'modifier',\n label: 'Modifier',\n type: 'object',\n properties: [\n ...modifierBaseProperties(),\n { name: 'backgroundColor', label: 'Background Color', type: 'object', properties: backgroundColorModelProperties() },\n { name: 'width', label: 'Width', type: 'object', properties: sizeModelProperties() },\n { name: 'height', label: 'Height', type: 'object', properties: sizeModelProperties() },\n { name: 'padding', label: 'Padding', type: 'object', properties: spacingModelProperties() },\n { name: 'margin', label: 'Margin', type: 'object', properties: spacingModelProperties() },\n { name: 'aspectRatio', label: 'Aspect Ratio', type: 'number' },\n ],\n };\n}\n\n// ── Arrangement sub-object builders ──\n\nfunction verticalArrangementDescriptor(): PropertyDescriptor {\n return {\n name: 'verticalArrangement',\n label: 'Vertical Arrangement',\n type: 'object',\n properties: [\n {\n name: 'type',\n label: 'Type',\n type: 'enum',\n enumValues: ['top', 'center', 'bottom', 'space_evenly', 'space_between', 'space_around', 'spaced_by'],\n },\n { name: 'spacing', label: 'Spacing', type: 'number' },\n ],\n };\n}\n\nfunction horizontalArrangementDescriptor(): PropertyDescriptor {\n return {\n name: 'horizontalArrangement',\n label: 'Horizontal Arrangement',\n type: 'object',\n properties: [\n {\n name: 'type',\n label: 'Type',\n type: 'enum',\n enumValues: ['start', 'center', 'end', 'space_between', 'space_evenly', 'space_around', 'spaced_by'],\n },\n { name: 'spacing', label: 'Spacing', type: 'number' },\n ],\n };\n}\n\n// ── Component definitions ──\n\nconst COMPONENT_DEFINITIONS: ComponentMeta[] = [\n {\n type: 'text',\n label: 'Text',\n acceptsChildren: false,\n properties: [\n textModifierDescriptor(),\n { name: 'text', label: 'Text', type: 'string', required: true },\n { name: 'fontSize', label: 'Font Size', type: 'number' },\n { name: 'color', label: 'Color', type: 'object', properties: colorModelProperties() },\n {\n name: 'fontWeight',\n label: 'Font Weight',\n type: 'enum',\n enumValues: ['bold', 'medium', 'normal', 'semi_bold'],\n },\n {\n name: 'textAlign',\n label: 'Text Align',\n type: 'enum',\n enumValues: ['left', 'right', 'center', 'justify', 'start', 'end', 'unspecified'],\n },\n {\n name: 'overflow',\n label: 'Overflow',\n type: 'enum',\n enumValues: ['none', 'ellipsis'],\n },\n { name: 'maxLines', label: 'Max Lines', type: 'number' },\n { name: 'minLines', label: 'Min Lines', type: 'number' },\n ],\n },\n {\n type: 'image',\n label: 'Image',\n acceptsChildren: false,\n properties: [\n imageModifierDescriptor(),\n { name: 'image', label: 'Image URL', type: 'string', required: true },\n {\n name: 'scaleType',\n label: 'Scale Type',\n type: 'enum',\n enumValues: ['fit', 'crop', 'fill_height', 'fill_width', 'fill_bounds', 'inside', 'none'],\n },\n { name: 'contentDescription', label: 'Content Description', type: 'string' },\n { name: 'tintColor', label: 'Tint Color', type: 'object', properties: colorModelProperties() },\n ],\n },\n {\n type: 'box',\n label: 'Box',\n acceptsChildren: true,\n properties: [\n containerModifierDescriptor(),\n {\n name: 'alignment',\n label: 'Alignment',\n type: 'enum',\n enumValues: [\n 'top_start', 'top_center', 'top_end',\n 'center_start', 'center', 'center_end',\n 'bottom_start', 'bottom_center', 'bottom_end',\n ],\n },\n ],\n },\n {\n type: 'column',\n label: 'Column',\n acceptsChildren: true,\n properties: [\n containerModifierDescriptor(),\n verticalArrangementDescriptor(),\n {\n name: 'horizontalAlignment',\n label: 'Horizontal Alignment',\n type: 'enum',\n enumValues: ['start', 'end', 'center_horizontally'],\n },\n { name: 'canScroll', label: 'Can Scroll', type: 'boolean' },\n ],\n },\n {\n type: 'row',\n label: 'Row',\n acceptsChildren: true,\n properties: [\n containerModifierDescriptor(),\n {\n name: 'verticalAlignment',\n label: 'Vertical Alignment',\n type: 'enum',\n enumValues: ['top', 'bottom', 'center_vertically'],\n },\n horizontalArrangementDescriptor(),\n { name: 'canScroll', label: 'Can Scroll', type: 'boolean' },\n ],\n },\n {\n type: 'lazy_column',\n label: 'Lazy Column',\n acceptsChildren: true,\n properties: [\n containerModifierDescriptor(),\n verticalArrangementDescriptor(),\n ],\n },\n];\n\n// ── Public API ──\n\nexport function getComponents(): ComponentMeta[] {\n return JSON.parse(JSON.stringify(COMPONENT_DEFINITIONS));\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACEO,SAAS,aAAa,OAA+B,OAAkC;AAC5F,MAAI,CAAC,MAAO,QAAO;AACnB,MAAI,UAAU,QAAQ;AACpB,WAAO,MAAM,QAAQ,MAAM;AAAA,EAC7B;AACA,SAAO,MAAM,SAAS,MAAM;AAC9B;AAEO,SAAS,YAAY,MAAiD;AAC3E,MAAI,CAAC,QAAQ,CAAC,KAAK,KAAM,QAAO;AAChC,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B;","names":["el"]}
|
|
1
|
+
{"version":3,"sources":["../src/index.ts","../src/utils.ts","../src/modifiers.ts","../src/components/text.ts","../src/components/image.ts","../src/components/box.ts","../src/components/column.ts","../src/components/row.ts","../src/components/lazy-column.ts","../src/components/index.ts","../src/render.ts","../src/component-meta.ts"],"sourcesContent":["import type { SduiScreen, Theme } from './types'\nimport { renderComponent } from './render'\n\nexport interface RenderOptions {\n theme?: Theme\n}\n\nexport function render(json: string, container: HTMLElement, options?: RenderOptions): void {\n const screen: SduiScreen = JSON.parse(json)\n const theme: Theme = options?.theme ?? 'light'\n\n const root = renderComponent(screen.root, theme)\n\n container.innerHTML = ''\n container.appendChild(root)\n}\n\nexport { getComponents } from './component-meta'\n\nexport type {\n // Root models\n SduiScreen,\n SduiComponent,\n Theme,\n // Properties\n PropertiesModel,\n TextUiProperties,\n ImageUiProperties,\n BoxUiProperties,\n ColumnUiProperties,\n RowUiProperties,\n LazyColumnUiProperties,\n DefaultUiProperties,\n // Modifiers\n ModifierBase,\n TextUiModifier,\n ContainerUiModifier,\n ImageUiModifier,\n // Base models\n ColorModel,\n SizeModel,\n SpacingModel,\n ActionModel,\n BackgroundColorModel,\n HorizontalArrangementModel,\n VerticalArrangementModel,\n // Enums\n ComponentType,\n AlignmentType,\n FontWeightType,\n SizeUnitType,\n BackgroundColorType,\n ContentScaleType,\n TextAlignType,\n TextOverflowType,\n HorizontalAlignmentType,\n VerticalAlignmentType,\n HorizontalArrangementType,\n VerticalArrangementType,\n // Metadata\n ComponentMeta,\n PropertyDescriptor,\n PropertyType,\n} from './types'\n","import type { ColorModel, SizeModel, SpacingModel, Theme } from './types'\n\nexport function resolveColor(color: ColorModel | undefined, theme: Theme): string | undefined {\n if (!color) return undefined\n if (theme === 'dark') {\n return color.dark ?? color.light\n }\n return color.light ?? color.dark\n}\n\nexport function resolveSize(size: SizeModel | undefined): string | undefined {\n if (!size || !size.unit) return undefined\n switch (size.unit) {\n case 'dp':\n return `${size.value ?? 0}px`\n case 'match_parent':\n return '100%'\n case 'wrap_content':\n return 'fit-content'\n default:\n return undefined\n }\n}\n\nexport function resolveSpacing(spacing: SpacingModel | undefined): {\n top?: string\n bottom?: string\n left?: string\n right?: string\n} {\n if (!spacing) return {}\n return {\n top: spacing.top != null ? `${spacing.top}px` : undefined,\n bottom: spacing.bottom != null ? `${spacing.bottom}px` : undefined,\n left: spacing.start != null ? `${spacing.start}px` : undefined,\n right: spacing.end != null ? `${spacing.end}px` : undefined,\n }\n}\n","import type { BackgroundColorModel, ContainerUiModifier, ImageUiModifier, ModifierBase, TextUiModifier, Theme } from './types'\nimport { resolveColor, resolveSize, resolveSpacing } from './utils'\n\nexport function applyModifier(element: HTMLElement, modifier: ModifierBase | undefined, theme: Theme): void {\n if (!modifier) return\n\n const s = element.style\n\n // alignment → align-self (+ justify-self for 2-axis Box alignments)\n if (modifier.alignment) {\n switch (modifier.alignment) {\n // Single-axis (Column / Row children)\n case 'center':\n case 'center_horizontally':\n case 'center_vertically':\n s.alignSelf = 'center'\n break\n case 'start':\n case 'top':\n s.alignSelf = 'flex-start'\n break\n case 'end':\n case 'bottom':\n s.alignSelf = 'flex-end'\n break\n // Two-axis (Box children — grid layout)\n case 'top_start':\n s.alignSelf = 'start'; s.justifySelf = 'start'\n break\n case 'top_center':\n s.alignSelf = 'start'; s.justifySelf = 'center'\n break\n case 'top_end':\n s.alignSelf = 'start'; s.justifySelf = 'end'\n break\n case 'center_start':\n s.alignSelf = 'center'; s.justifySelf = 'start'\n break\n case 'center_end':\n s.alignSelf = 'center'; s.justifySelf = 'end'\n break\n case 'bottom_start':\n s.alignSelf = 'end'; s.justifySelf = 'start'\n break\n case 'bottom_center':\n s.alignSelf = 'end'; s.justifySelf = 'center'\n break\n case 'bottom_end':\n s.alignSelf = 'end'; s.justifySelf = 'end'\n break\n }\n }\n\n // weight → flex\n if (modifier.weight != null) {\n s.flex = `${modifier.weight}`\n s.minWidth = '0'\n s.minHeight = '0'\n }\n\n // action → click handler\n if (modifier.action) {\n const action = modifier.action\n s.cursor = 'pointer'\n element.addEventListener('click', (e) => {\n e.stopPropagation()\n element.dispatchEvent(new CustomEvent('sdui:action', {\n bubbles: true,\n detail: { type: action.type, params: action.params },\n }))\n })\n }\n\n // Extended modifier fields (width, height, padding, margin, backgroundColor, aspectRatio)\n const mod = modifier as ContainerUiModifier | ImageUiModifier | TextUiModifier\n\n const hasAspectRatio = 'aspectRatio' in mod && mod.aspectRatio != null\n const hasWidth = 'width' in mod && mod.width\n const hasHeight = 'height' in mod && (mod as ContainerUiModifier).height\n\n if (hasWidth) {\n const w = resolveSize(mod.width)\n if (w) s.width = w\n }\n\n if (hasHeight && !(hasAspectRatio && hasWidth)) {\n const h = resolveSize((mod as ContainerUiModifier).height)\n if (h) s.height = h\n }\n\n if (hasAspectRatio) {\n s.aspectRatio = `${(mod as ContainerUiModifier).aspectRatio}`\n }\n\n if ('padding' in mod && mod.padding) {\n const p = resolveSpacing((mod as ContainerUiModifier).padding)\n if (p.top) s.paddingTop = p.top\n if (p.bottom) s.paddingBottom = p.bottom\n if (p.left) s.paddingLeft = p.left\n if (p.right) s.paddingRight = p.right\n }\n\n if ('margin' in mod && mod.margin) {\n const m = resolveSpacing(mod.margin)\n if (m.top) s.marginTop = m.top\n if (m.bottom) s.marginBottom = m.bottom\n if (m.left) s.marginLeft = m.left\n if (m.right) s.marginRight = m.right\n }\n\n if ('backgroundColor' in mod && mod.backgroundColor) {\n applyBackground(s, (mod as ContainerUiModifier).backgroundColor!, theme)\n }\n}\n\nfunction applyBackground(s: CSSStyleDeclaration, bg: BackgroundColorModel, theme: Theme): void {\n if (!bg.colors || bg.colors.length === 0) return\n\n const colors = bg.colors.map((c) => resolveColor(c, theme)).filter(Boolean) as string[]\n if (colors.length === 0) return\n\n switch (bg.type) {\n case 'single':\n s.backgroundColor = colors[0]\n break\n case 'vertical_gradient':\n s.background = `linear-gradient(to bottom, ${colors.join(', ')})`\n break\n case 'horizontal_gradient':\n s.background = `linear-gradient(to right, ${colors.join(', ')})`\n break\n case 'linear_gradient':\n s.background = `linear-gradient(${colors.join(', ')})`\n break\n default:\n if (colors.length === 1) {\n s.backgroundColor = colors[0]\n }\n break\n }\n}\n","import type { SduiComponent, TextUiProperties, Theme } from '../types'\nimport { resolveColor } from '../utils'\nimport { applyModifier } from '../modifiers'\n\nexport function renderText(component: SduiComponent, theme: Theme): HTMLElement {\n const props = component.properties as TextUiProperties | undefined\n const el = document.createElement('span')\n\n el.textContent = props?.text ?? ''\n\n if (props?.fontSize != null) {\n el.style.fontSize = `${props.fontSize}px`\n }\n\n if (props?.color) {\n const c = resolveColor(props.color, theme)\n if (c) el.style.color = c\n }\n\n if (props?.fontWeight) {\n switch (props.fontWeight) {\n case 'bold':\n el.style.fontWeight = '700'\n break\n case 'semi_bold':\n el.style.fontWeight = '600'\n break\n case 'medium':\n el.style.fontWeight = '500'\n break\n case 'normal':\n el.style.fontWeight = '400'\n break\n }\n }\n\n if (props?.textAlign) {\n el.style.display = 'block'\n switch (props.textAlign) {\n case 'left':\n case 'start':\n el.style.textAlign = 'left'\n break\n case 'right':\n case 'end':\n el.style.textAlign = 'right'\n break\n case 'center':\n el.style.textAlign = 'center'\n break\n case 'justify':\n el.style.textAlign = 'justify'\n break\n }\n }\n\n if (props?.overflow === 'ellipsis') {\n el.style.textOverflow = 'ellipsis'\n el.style.overflow = 'hidden'\n el.style.whiteSpace = 'nowrap'\n }\n\n if (props?.maxLines != null) {\n el.style.display = '-webkit-box'\n el.style.webkitLineClamp = `${props.maxLines}`\n ;(el.style as unknown as Record<string, string>)['-webkit-box-orient'] = 'vertical'\n el.style.overflow = 'hidden'\n }\n\n if (props?.minLines != null) {\n el.style.minHeight = `${props.minLines * (props.fontSize ?? 16) * 1.4}px`\n }\n\n applyModifier(el, props?.modifier, theme)\n\n return el\n}\n","import type { SduiComponent, ImageUiProperties, Theme } from '../types'\nimport { resolveColor } from '../utils'\nimport { applyModifier } from '../modifiers'\n\nexport function renderImage(component: SduiComponent, theme: Theme): HTMLElement {\n const props = component.properties as ImageUiProperties | undefined\n const el = document.createElement('img') as HTMLImageElement\n\n if (props?.image) {\n el.src = props.image\n }\n\n if (props?.contentDescription) {\n el.alt = props.contentDescription\n }\n\n if (props?.scaleType) {\n switch (props.scaleType) {\n case 'fit':\n case 'inside':\n el.style.objectFit = 'contain'\n break\n case 'crop':\n el.style.objectFit = 'cover'\n break\n case 'fill_bounds':\n el.style.objectFit = 'fill'\n break\n case 'fill_width':\n el.style.objectFit = 'cover'\n el.style.width = '100%'\n break\n case 'fill_height':\n el.style.objectFit = 'cover'\n el.style.height = '100%'\n break\n case 'none':\n el.style.objectFit = 'none'\n break\n }\n }\n\n if (props?.tintColor) {\n const c = resolveColor(props.tintColor, theme)\n if (c) {\n el.style.filter = `opacity(0.5) drop-shadow(0 0 0 ${c})`\n }\n }\n\n applyModifier(el, props?.modifier, theme)\n\n return el\n}\n","import type { SduiComponent, BoxUiProperties, Theme } from '../types'\nimport { applyModifier } from '../modifiers'\n\nexport function renderBox(component: SduiComponent, theme: Theme): HTMLElement {\n const props = component.properties as BoxUiProperties | undefined\n const el = document.createElement('div')\n\n el.style.display = 'grid'\n el.style.position = 'relative'\n\n // All children share the same grid cell (like Compose FrameLayout)\n // Default alignment for all children\n if (props?.alignment) {\n switch (props.alignment) {\n case 'top_start':\n el.style.justifyItems = 'start'\n el.style.alignItems = 'start'\n break\n case 'top_center':\n el.style.justifyItems = 'center'\n el.style.alignItems = 'start'\n break\n case 'top_end':\n el.style.justifyItems = 'end'\n el.style.alignItems = 'start'\n break\n case 'center_start':\n el.style.justifyItems = 'start'\n el.style.alignItems = 'center'\n break\n case 'center':\n el.style.justifyItems = 'center'\n el.style.alignItems = 'center'\n break\n case 'center_end':\n el.style.justifyItems = 'end'\n el.style.alignItems = 'center'\n break\n case 'bottom_start':\n el.style.justifyItems = 'start'\n el.style.alignItems = 'end'\n break\n case 'bottom_center':\n el.style.justifyItems = 'center'\n el.style.alignItems = 'end'\n break\n case 'bottom_end':\n el.style.justifyItems = 'end'\n el.style.alignItems = 'end'\n break\n }\n }\n\n applyModifier(el, props?.modifier, theme)\n\n return el\n}\n","import type { SduiComponent, ColumnUiProperties, Theme } from '../types'\nimport { applyModifier } from '../modifiers'\n\nexport function renderColumn(component: SduiComponent, theme: Theme): HTMLElement {\n const props = component.properties as ColumnUiProperties | undefined\n const el = document.createElement('div')\n\n el.style.display = 'flex'\n el.style.flexDirection = 'column'\n\n if (props?.verticalArrangement) {\n const arr = props.verticalArrangement\n switch (arr.type) {\n case 'top':\n el.style.justifyContent = 'flex-start'\n break\n case 'center':\n el.style.justifyContent = 'center'\n break\n case 'bottom':\n el.style.justifyContent = 'flex-end'\n break\n case 'space_between':\n el.style.justifyContent = 'space-between'\n break\n case 'space_evenly':\n el.style.justifyContent = 'space-evenly'\n break\n case 'space_around':\n el.style.justifyContent = 'space-around'\n break\n case 'spaced_by':\n el.style.justifyContent = 'flex-start'\n if (arr.spacing != null) {\n el.style.gap = `${arr.spacing}px`\n }\n break\n }\n }\n\n if (props?.horizontalAlignment) {\n switch (props.horizontalAlignment) {\n case 'start':\n el.style.alignItems = 'flex-start'\n break\n case 'end':\n el.style.alignItems = 'flex-end'\n break\n case 'center_horizontally':\n el.style.alignItems = 'center'\n break\n }\n }\n\n if (props?.canScroll) {\n el.style.overflowY = 'auto'\n }\n\n applyModifier(el, props?.modifier, theme)\n\n return el\n}\n","import type { SduiComponent, RowUiProperties, Theme } from '../types'\nimport { applyModifier } from '../modifiers'\n\nexport function renderRow(component: SduiComponent, theme: Theme): HTMLElement {\n const props = component.properties as RowUiProperties | undefined\n const el = document.createElement('div')\n\n el.style.display = 'flex'\n el.style.flexDirection = 'row'\n\n if (props?.horizontalArrangement) {\n const arr = props.horizontalArrangement\n switch (arr.type) {\n case 'start':\n el.style.justifyContent = 'flex-start'\n break\n case 'center':\n el.style.justifyContent = 'center'\n break\n case 'end':\n el.style.justifyContent = 'flex-end'\n break\n case 'space_between':\n el.style.justifyContent = 'space-between'\n break\n case 'space_evenly':\n el.style.justifyContent = 'space-evenly'\n break\n case 'space_around':\n el.style.justifyContent = 'space-around'\n break\n case 'spaced_by':\n el.style.justifyContent = 'flex-start'\n if (arr.spacing != null) {\n el.style.gap = `${arr.spacing}px`\n }\n break\n }\n }\n\n if (props?.verticalAlignment) {\n switch (props.verticalAlignment) {\n case 'top':\n el.style.alignItems = 'flex-start'\n break\n case 'bottom':\n el.style.alignItems = 'flex-end'\n break\n case 'center_vertically':\n el.style.alignItems = 'center'\n break\n }\n }\n\n if (props?.canScroll) {\n el.style.overflowX = 'auto'\n }\n\n applyModifier(el, props?.modifier, theme)\n\n return el\n}\n","import type { SduiComponent, LazyColumnUiProperties, Theme } from '../types'\nimport { applyModifier } from '../modifiers'\n\nexport function renderLazyColumn(component: SduiComponent, theme: Theme): HTMLElement {\n const props = component.properties as LazyColumnUiProperties | undefined\n const el = document.createElement('div')\n\n el.style.display = 'flex'\n el.style.flexDirection = 'column'\n el.style.overflowY = 'auto'\n\n if (props?.verticalArrangement) {\n const arr = props.verticalArrangement\n switch (arr.type) {\n case 'top':\n el.style.justifyContent = 'flex-start'\n break\n case 'center':\n el.style.justifyContent = 'center'\n break\n case 'bottom':\n el.style.justifyContent = 'flex-end'\n break\n case 'space_between':\n el.style.justifyContent = 'space-between'\n break\n case 'space_evenly':\n el.style.justifyContent = 'space-evenly'\n break\n case 'space_around':\n el.style.justifyContent = 'space-around'\n break\n case 'spaced_by':\n el.style.justifyContent = 'flex-start'\n if (arr.spacing != null) {\n el.style.gap = `${arr.spacing}px`\n }\n break\n }\n }\n\n applyModifier(el, props?.modifier, theme)\n\n return el\n}\n","import type { SduiComponent, Theme } from '../types'\nimport { renderText } from './text'\nimport { renderImage } from './image'\nimport { renderBox } from './box'\nimport { renderColumn } from './column'\nimport { renderRow } from './row'\nimport { renderLazyColumn } from './lazy-column'\n\nexport type ComponentRenderer = (component: SduiComponent, theme: Theme) => HTMLElement\n\nconst renderers: Record<string, ComponentRenderer> = {\n text: renderText,\n image: renderImage,\n box: renderBox,\n column: renderColumn,\n row: renderRow,\n lazy_column: renderLazyColumn,\n}\n\nexport function getRenderer(type: string): ComponentRenderer | undefined {\n return renderers[type]\n}\n","import type { SduiComponent, Theme } from './types'\nimport { getRenderer } from './components'\n\nexport function renderComponent(component: SduiComponent, theme: Theme): HTMLElement {\n const renderer = getRenderer(component.type)\n\n if (!renderer) {\n console.warn(`[sdui] Unknown component type: \"${component.type}\"`)\n const el = document.createElement('div')\n el.dataset.sduiUnknown = component.type\n return el\n }\n\n const el = renderer(component, theme)\n el.dataset.sduiType = component.type\n\n if (component.children && component.children.length > 0) {\n for (const child of component.children) {\n el.appendChild(renderComponent(child, theme))\n }\n }\n\n return el\n}\n","import type { ComponentMeta, PropertyDescriptor } from './types'\n\n// === Reusable sub-object property builders ===\n\nfunction sizeModelProperties(): PropertyDescriptor[] {\n return [\n { name: 'value', label: 'Value', type: 'number' },\n { name: 'unit', label: 'Unit', type: 'enum', enumValues: ['dp', 'match_parent', 'wrap_content'] },\n ]\n}\n\nfunction spacingModelProperties(): PropertyDescriptor[] {\n return [\n { name: 'top', label: 'Top', type: 'number' },\n { name: 'bottom', label: 'Bottom', type: 'number' },\n { name: 'start', label: 'Start', type: 'number' },\n { name: 'end', label: 'End', type: 'number' },\n ]\n}\n\nfunction colorModelProperties(): PropertyDescriptor[] {\n return [\n { name: 'light', label: 'Light', type: 'color' },\n { name: 'dark', label: 'Dark', type: 'color' },\n ]\n}\n\nfunction actionModelProperties(): PropertyDescriptor[] {\n return [\n { name: 'type', label: 'Action Type', type: 'string' },\n { name: 'params', label: 'Parameters', type: 'object' },\n ]\n}\n\nfunction backgroundColorModelProperties(): PropertyDescriptor[] {\n return [\n {\n name: 'colors',\n label: 'Colors',\n type: 'object',\n isArray: true,\n properties: colorModelProperties(),\n },\n {\n name: 'type',\n label: 'Background Type',\n type: 'enum',\n enumValues: ['single', 'vertical_gradient', 'horizontal_gradient', 'linear_gradient'],\n },\n ]\n}\n\n// === Modifier builders ===\n\nfunction modifierBaseProperties(): PropertyDescriptor[] {\n return [\n {\n name: 'alignment',\n label: 'Alignment',\n type: 'enum',\n enumValues: ['start', 'end', 'center', 'center_horizontally', 'center_vertically', 'top', 'bottom', 'top_start', 'top_center', 'top_end', 'center_start', 'center_end', 'bottom_start', 'bottom_center', 'bottom_end'],\n },\n { name: 'weight', label: 'Weight', type: 'number' },\n { name: 'action', label: 'Action', type: 'object', properties: actionModelProperties() },\n ]\n}\n\nfunction textModifierDescriptor(): PropertyDescriptor {\n return {\n name: 'modifier',\n label: 'Modifier',\n type: 'object',\n properties: [\n ...modifierBaseProperties(),\n { name: 'width', label: 'Width', type: 'object', properties: sizeModelProperties() },\n { name: 'margin', label: 'Margin', type: 'object', properties: spacingModelProperties() },\n ],\n }\n}\n\nfunction imageModifierDescriptor(): PropertyDescriptor {\n return {\n name: 'modifier',\n label: 'Modifier',\n type: 'object',\n properties: [\n ...modifierBaseProperties(),\n { name: 'width', label: 'Width', type: 'object', properties: sizeModelProperties() },\n { name: 'height', label: 'Height', type: 'object', properties: sizeModelProperties() },\n { name: 'padding', label: 'Padding', type: 'object', properties: spacingModelProperties() },\n { name: 'margin', label: 'Margin', type: 'object', properties: spacingModelProperties() },\n { name: 'aspectRatio', label: 'Aspect Ratio', type: 'number' },\n ],\n }\n}\n\nfunction containerModifierDescriptor(): PropertyDescriptor {\n return {\n name: 'modifier',\n label: 'Modifier',\n type: 'object',\n properties: [\n ...modifierBaseProperties(),\n { name: 'backgroundColor', label: 'Background Color', type: 'object', properties: backgroundColorModelProperties() },\n { name: 'width', label: 'Width', type: 'object', properties: sizeModelProperties() },\n { name: 'height', label: 'Height', type: 'object', properties: sizeModelProperties() },\n { name: 'padding', label: 'Padding', type: 'object', properties: spacingModelProperties() },\n { name: 'margin', label: 'Margin', type: 'object', properties: spacingModelProperties() },\n { name: 'aspectRatio', label: 'Aspect Ratio', type: 'number' },\n ],\n }\n}\n\n// === Arrangement descriptors ===\n\nfunction verticalArrangementDescriptor(): PropertyDescriptor {\n return {\n name: 'verticalArrangement',\n label: 'Vertical Arrangement',\n type: 'object',\n properties: [\n {\n name: 'type',\n label: 'Type',\n type: 'enum',\n enumValues: ['top', 'center', 'bottom', 'space_evenly', 'space_between', 'space_around', 'spaced_by'],\n },\n { name: 'spacing', label: 'Spacing', type: 'number' },\n ],\n }\n}\n\nfunction horizontalArrangementDescriptor(): PropertyDescriptor {\n return {\n name: 'horizontalArrangement',\n label: 'Horizontal Arrangement',\n type: 'object',\n properties: [\n {\n name: 'type',\n label: 'Type',\n type: 'enum',\n enumValues: ['start', 'center', 'end', 'space_between', 'space_evenly', 'space_around', 'spaced_by'],\n },\n { name: 'spacing', label: 'Spacing', type: 'number' },\n ],\n }\n}\n\n// === Component definitions ===\n\nconst COMPONENT_DEFINITIONS: ComponentMeta[] = [\n {\n type: 'text',\n label: 'Text',\n acceptsChildren: false,\n properties: [\n { name: 'text', label: 'Text', type: 'string', required: true, defaultValue: 'Text' },\n { name: 'fontSize', label: 'Font Size', type: 'number' },\n { name: 'color', label: 'Color', type: 'object', properties: colorModelProperties() },\n { name: 'fontWeight', label: 'Font Weight', type: 'enum', enumValues: ['bold', 'medium', 'normal', 'semi_bold'] },\n { name: 'textAlign', label: 'Text Align', type: 'enum', enumValues: ['left', 'right', 'center', 'justify', 'start', 'end', 'unspecified'] },\n { name: 'overflow', label: 'Overflow', type: 'enum', enumValues: ['none', 'ellipsis'] },\n { name: 'maxLines', label: 'Max Lines', type: 'number' },\n { name: 'minLines', label: 'Min Lines', type: 'number', defaultValue: 1 },\n textModifierDescriptor(),\n ],\n },\n {\n type: 'image',\n label: 'Image',\n acceptsChildren: false,\n properties: [\n imageModifierDescriptor(),\n { name: 'image', label: 'Image URL', type: 'string', required: true },\n { name: 'scaleType', label: 'Scale Type', type: 'enum', enumValues: ['fit', 'crop', 'fill_height', 'fill_width', 'fill_bounds', 'inside', 'none'] },\n { name: 'contentDescription', label: 'Content Description', type: 'string' },\n { name: 'tintColor', label: 'Tint Color', type: 'object', properties: colorModelProperties() },\n ],\n },\n {\n type: 'box',\n label: 'Box',\n acceptsChildren: true,\n properties: [\n containerModifierDescriptor(),\n {\n name: 'alignment',\n label: 'Alignment',\n type: 'enum',\n enumValues: ['top_start', 'top_center', 'top_end', 'center_start', 'center', 'center_end', 'bottom_start', 'bottom_center', 'bottom_end'],\n },\n ],\n },\n {\n type: 'column',\n label: 'Column',\n acceptsChildren: true,\n properties: [\n containerModifierDescriptor(),\n verticalArrangementDescriptor(),\n { name: 'horizontalAlignment', label: 'Horizontal Alignment', type: 'enum', enumValues: ['start', 'end', 'center_horizontally'] },\n { name: 'canScroll', label: 'Can Scroll', type: 'boolean' },\n ],\n },\n {\n type: 'row',\n label: 'Row',\n acceptsChildren: true,\n properties: [\n containerModifierDescriptor(),\n { name: 'verticalAlignment', label: 'Vertical Alignment', type: 'enum', enumValues: ['top', 'bottom', 'center_vertically'] },\n horizontalArrangementDescriptor(),\n { name: 'canScroll', label: 'Can Scroll', type: 'boolean' },\n ],\n },\n {\n type: 'lazy_column',\n label: 'Lazy Column',\n acceptsChildren: true,\n properties: [\n containerModifierDescriptor(),\n verticalArrangementDescriptor(),\n ],\n },\n]\n\n// === Public API ===\n\nexport function getComponents(): ComponentMeta[] {\n return JSON.parse(JSON.stringify(COMPONENT_DEFINITIONS))\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACEO,SAAS,aAAa,OAA+B,OAAkC;AAC5F,MAAI,CAAC,MAAO,QAAO;AACnB,MAAI,UAAU,QAAQ;AACpB,WAAO,MAAM,QAAQ,MAAM;AAAA,EAC7B;AACA,SAAO,MAAM,SAAS,MAAM;AAC9B;AAEO,SAAS,YAAY,MAAiD;AAC3E,MAAI,CAAC,QAAQ,CAAC,KAAK,KAAM,QAAO;AAChC,UAAQ,KAAK,MAAM;AAAA,IACjB,KAAK;AACH,aAAO,GAAG,KAAK,SAA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