sdui-web 0.2.0 → 0.3.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 +31 -71
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +81 -82
- package/dist/index.d.ts +81 -82
- package/dist/index.js +31 -71
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -69,65 +69,63 @@ function applyModifier(element, modifier, theme) {
|
|
|
69
69
|
break;
|
|
70
70
|
case "start":
|
|
71
71
|
case "top":
|
|
72
|
-
case "top_start":
|
|
73
72
|
s.alignSelf = "flex-start";
|
|
74
73
|
break;
|
|
75
74
|
case "end":
|
|
76
75
|
case "bottom":
|
|
77
|
-
case "bottom_end":
|
|
78
76
|
s.alignSelf = "flex-end";
|
|
79
77
|
break;
|
|
80
78
|
}
|
|
81
79
|
}
|
|
82
80
|
if (modifier.weight != null) {
|
|
83
81
|
s.flex = `${modifier.weight}`;
|
|
82
|
+
s.minWidth = "0";
|
|
83
|
+
s.minHeight = "0";
|
|
84
84
|
}
|
|
85
85
|
if (modifier.action) {
|
|
86
86
|
const action = modifier.action;
|
|
87
|
-
|
|
87
|
+
s.cursor = "pointer";
|
|
88
88
|
element.addEventListener("click", (e) => {
|
|
89
89
|
e.stopPropagation();
|
|
90
90
|
if (action.type === "navigate") {
|
|
91
|
-
|
|
91
|
+
element.dispatchEvent(new CustomEvent("sdui:navigate", {
|
|
92
92
|
bubbles: true,
|
|
93
93
|
detail: { route: action.params?.route, args: action.params?.args }
|
|
94
|
-
});
|
|
95
|
-
element.dispatchEvent(event);
|
|
96
|
-
console.log("[sdui] navigate \u2192", action.params?.route, action.params?.args);
|
|
94
|
+
}));
|
|
97
95
|
}
|
|
98
96
|
});
|
|
99
97
|
}
|
|
100
|
-
const
|
|
101
|
-
const hasAspectRatio = "aspectRatio" in
|
|
102
|
-
const hasWidth = "width" in
|
|
103
|
-
const hasHeight = "height" in
|
|
98
|
+
const mod = modifier;
|
|
99
|
+
const hasAspectRatio = "aspectRatio" in mod && mod.aspectRatio != null;
|
|
100
|
+
const hasWidth = "width" in mod && mod.width;
|
|
101
|
+
const hasHeight = "height" in mod && mod.height;
|
|
104
102
|
if (hasWidth) {
|
|
105
|
-
const w = resolveSize(
|
|
103
|
+
const w = resolveSize(mod.width);
|
|
106
104
|
if (w) s.width = w;
|
|
107
105
|
}
|
|
108
106
|
if (hasHeight && !(hasAspectRatio && hasWidth)) {
|
|
109
|
-
const h = resolveSize(
|
|
107
|
+
const h = resolveSize(mod.height);
|
|
110
108
|
if (h) s.height = h;
|
|
111
109
|
}
|
|
112
110
|
if (hasAspectRatio) {
|
|
113
|
-
s.aspectRatio = `${
|
|
111
|
+
s.aspectRatio = `${mod.aspectRatio}`;
|
|
114
112
|
}
|
|
115
|
-
if ("padding" in
|
|
116
|
-
const p = resolveSpacing(
|
|
113
|
+
if ("padding" in mod && mod.padding) {
|
|
114
|
+
const p = resolveSpacing(mod.padding);
|
|
117
115
|
if (p.top) s.paddingTop = p.top;
|
|
118
116
|
if (p.bottom) s.paddingBottom = p.bottom;
|
|
119
117
|
if (p.left) s.paddingLeft = p.left;
|
|
120
118
|
if (p.right) s.paddingRight = p.right;
|
|
121
119
|
}
|
|
122
|
-
if ("margin" in
|
|
123
|
-
const m = resolveSpacing(
|
|
120
|
+
if ("margin" in mod && mod.margin) {
|
|
121
|
+
const m = resolveSpacing(mod.margin);
|
|
124
122
|
if (m.top) s.marginTop = m.top;
|
|
125
123
|
if (m.bottom) s.marginBottom = m.bottom;
|
|
126
124
|
if (m.left) s.marginLeft = m.left;
|
|
127
125
|
if (m.right) s.marginRight = m.right;
|
|
128
126
|
}
|
|
129
|
-
if ("backgroundColor" in
|
|
130
|
-
applyBackground(s,
|
|
127
|
+
if ("backgroundColor" in mod && mod.backgroundColor) {
|
|
128
|
+
applyBackground(s, mod.backgroundColor, theme);
|
|
131
129
|
}
|
|
132
130
|
}
|
|
133
131
|
function applyBackground(s, bg, theme) {
|
|
@@ -205,7 +203,7 @@ function renderText(component, theme) {
|
|
|
205
203
|
if (props?.overflow === "ellipsis") {
|
|
206
204
|
el.style.textOverflow = "ellipsis";
|
|
207
205
|
el.style.overflow = "hidden";
|
|
208
|
-
el.style.whiteSpace =
|
|
206
|
+
el.style.whiteSpace = "nowrap";
|
|
209
207
|
}
|
|
210
208
|
if (props?.maxLines != null) {
|
|
211
209
|
el.style.display = "-webkit-box";
|
|
@@ -343,6 +341,7 @@ function renderColumn(component, theme) {
|
|
|
343
341
|
el.style.justifyContent = "space-around";
|
|
344
342
|
break;
|
|
345
343
|
case "spaced_by":
|
|
344
|
+
el.style.justifyContent = "flex-start";
|
|
346
345
|
if (arr.spacing != null) {
|
|
347
346
|
el.style.gap = `${arr.spacing}px`;
|
|
348
347
|
}
|
|
@@ -397,6 +396,7 @@ function renderRow(component, theme) {
|
|
|
397
396
|
el.style.justifyContent = "space-around";
|
|
398
397
|
break;
|
|
399
398
|
case "spaced_by":
|
|
399
|
+
el.style.justifyContent = "flex-start";
|
|
400
400
|
if (arr.spacing != null) {
|
|
401
401
|
el.style.gap = `${arr.spacing}px`;
|
|
402
402
|
}
|
|
@@ -452,6 +452,7 @@ function renderLazyColumn(component, theme) {
|
|
|
452
452
|
el.style.justifyContent = "space-around";
|
|
453
453
|
break;
|
|
454
454
|
case "spaced_by":
|
|
455
|
+
el.style.justifyContent = "flex-start";
|
|
455
456
|
if (arr.spacing != null) {
|
|
456
457
|
el.style.gap = `${arr.spacing}px`;
|
|
457
458
|
}
|
|
@@ -488,8 +489,7 @@ function renderComponent(component, theme) {
|
|
|
488
489
|
el.dataset.sduiType = component.type;
|
|
489
490
|
if (component.children && component.children.length > 0) {
|
|
490
491
|
for (const child of component.children) {
|
|
491
|
-
|
|
492
|
-
el.appendChild(childEl);
|
|
492
|
+
el.appendChild(renderComponent(child, theme));
|
|
493
493
|
}
|
|
494
494
|
}
|
|
495
495
|
return el;
|
|
@@ -553,7 +553,7 @@ function modifierBaseProperties() {
|
|
|
553
553
|
name: "alignment",
|
|
554
554
|
label: "Alignment",
|
|
555
555
|
type: "enum",
|
|
556
|
-
enumValues: ["center", "center_horizontally", "center_vertically", "start", "top", "
|
|
556
|
+
enumValues: ["center", "center_horizontally", "center_vertically", "start", "top", "end", "bottom"]
|
|
557
557
|
},
|
|
558
558
|
{ name: "weight", label: "Weight", type: "number" },
|
|
559
559
|
{ name: "action", label: "Action", type: "object", properties: actionModelProperties() }
|
|
@@ -644,24 +644,9 @@ var COMPONENT_DEFINITIONS = [
|
|
|
644
644
|
{ name: "text", label: "Text", type: "string", required: true },
|
|
645
645
|
{ name: "fontSize", label: "Font Size", type: "number" },
|
|
646
646
|
{ 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
|
-
},
|
|
647
|
+
{ name: "fontWeight", label: "Font Weight", type: "enum", enumValues: ["bold", "medium", "normal", "semi_bold"] },
|
|
648
|
+
{ name: "textAlign", label: "Text Align", type: "enum", enumValues: ["left", "right", "center", "justify", "start", "end", "unspecified"] },
|
|
649
|
+
{ name: "overflow", label: "Overflow", type: "enum", enumValues: ["none", "ellipsis"] },
|
|
665
650
|
{ name: "maxLines", label: "Max Lines", type: "number" },
|
|
666
651
|
{ name: "minLines", label: "Min Lines", type: "number" }
|
|
667
652
|
]
|
|
@@ -673,12 +658,7 @@ var COMPONENT_DEFINITIONS = [
|
|
|
673
658
|
properties: [
|
|
674
659
|
imageModifierDescriptor(),
|
|
675
660
|
{ 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
|
-
},
|
|
661
|
+
{ name: "scaleType", label: "Scale Type", type: "enum", enumValues: ["fit", "crop", "fill_height", "fill_width", "fill_bounds", "inside", "none"] },
|
|
682
662
|
{ name: "contentDescription", label: "Content Description", type: "string" },
|
|
683
663
|
{ name: "tintColor", label: "Tint Color", type: "object", properties: colorModelProperties() }
|
|
684
664
|
]
|
|
@@ -693,17 +673,7 @@ var COMPONENT_DEFINITIONS = [
|
|
|
693
673
|
name: "alignment",
|
|
694
674
|
label: "Alignment",
|
|
695
675
|
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
|
-
]
|
|
676
|
+
enumValues: ["top_start", "top_center", "top_end", "center_start", "center", "center_end", "bottom_start", "bottom_center", "bottom_end"]
|
|
707
677
|
}
|
|
708
678
|
]
|
|
709
679
|
},
|
|
@@ -714,12 +684,7 @@ var COMPONENT_DEFINITIONS = [
|
|
|
714
684
|
properties: [
|
|
715
685
|
containerModifierDescriptor(),
|
|
716
686
|
verticalArrangementDescriptor(),
|
|
717
|
-
{
|
|
718
|
-
name: "horizontalAlignment",
|
|
719
|
-
label: "Horizontal Alignment",
|
|
720
|
-
type: "enum",
|
|
721
|
-
enumValues: ["start", "end", "center_horizontally"]
|
|
722
|
-
},
|
|
687
|
+
{ name: "horizontalAlignment", label: "Horizontal Alignment", type: "enum", enumValues: ["start", "end", "center_horizontally"] },
|
|
723
688
|
{ name: "canScroll", label: "Can Scroll", type: "boolean" }
|
|
724
689
|
]
|
|
725
690
|
},
|
|
@@ -729,12 +694,7 @@ var COMPONENT_DEFINITIONS = [
|
|
|
729
694
|
acceptsChildren: true,
|
|
730
695
|
properties: [
|
|
731
696
|
containerModifierDescriptor(),
|
|
732
|
-
{
|
|
733
|
-
name: "verticalAlignment",
|
|
734
|
-
label: "Vertical Alignment",
|
|
735
|
-
type: "enum",
|
|
736
|
-
enumValues: ["top", "bottom", "center_vertically"]
|
|
737
|
-
},
|
|
697
|
+
{ name: "verticalAlignment", label: "Vertical Alignment", type: "enum", enumValues: ["top", "bottom", "center_vertically"] },
|
|
738
698
|
horizontalArrangementDescriptor(),
|
|
739
699
|
{ name: "canScroll", label: "Can Scroll", type: "boolean" }
|
|
740
700
|
]
|
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,UAAQ,KAAK,MAAM;AAAA,IACjB,KAAK;AACH,aAAO,GAAG,KAAK,SAAS,CAAC;AAAA,IAC3B,KAAK;AACH,aAAO;AAAA,IACT,KAAK;AACH,aAAO;AAAA,IACT;AACE,aAAO;AAAA,EACX;AACF;AAEO,SAAS,eAAe,SAK7B;AACA,MAAI,CAAC,QAAS,QAAO,CAAC;AACtB,SAAO;AAAA,IACL,KAAK,QAAQ,OAAO,OAAO,GAAG,QAAQ,GAAG,OAAO;AAAA,IAChD,QAAQ,QAAQ,UAAU,OAAO,GAAG,QAAQ,MAAM,OAAO;AAAA,IACzD,MAAM,QAAQ,SAAS,OAAO,GAAG,QAAQ,KAAK,OAAO;AAAA,IACrD,OAAO,QAAQ,OAAO,OAAO,GAAG,QAAQ,GAAG,OAAO;AAAA,EACpD;AACF;;;AClCO,SAAS,cAAc,SAAsB,UAAoC,OAAoB;AAC1G,MAAI,CAAC,SAAU;AAEf,QAAM,IAAI,QAAQ;AAGlB,MAAI,SAAS,WAAW;AACtB,YAAQ,SAAS,WAAW;AAAA,MAC1B,KAAK;AA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O,UAAU,mBAAmB;AAAA,MACnD;AAAA,MACA,gCAAgC;AAAA,MAChC,EAAE,MAAM,aAAa,OAAO,cAAc,MAAM,UAAU;AAAA,IAC5D;AAAA,EACF;AAAA,EACA;AAAA,IACE,MAAM;AAAA,IACN,OAAO;AAAA,IACP,iBAAiB;AAAA,IACjB,YAAY;AAAA,MACV,4BAA4B;AAAA,MAC5B,8BAA8B;AAAA,IAChC;AAAA,EACF;AACF;AAIO,SAAS,gBAAiC;AAC/C,SAAO,KAAK,MAAM,KAAK,UAAU,qBAAqB,CAAC;AACzD;;;AXzRO,SAAS,OAAO,MAAc,WAAwB,SAA+B;AAC1F,QAAM,SAAqB,KAAK,MAAM,IAAI;AAC1C,QAAM,QAAe,SAAS,SAAS;AAEvC,QAAM,OAAO,gBAAgB,OAAO,MAAM,KAAK;AAE/C,YAAU,YAAY;AACtB,YAAU,YAAY,IAAI;AAC5B;","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 ActionParams,\n BackgroundColorModel,\n HorizontalArrangementModel,\n VerticalArrangementModel,\n // Enums\n ComponentType,\n AlignmentType,\n FontWeightType,\n SizeUnitType,\n ActionType,\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\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 s.alignSelf = 'flex-start'\n break\n case 'end':\n case 'bottom':\n s.alignSelf = 'flex-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 if (action.type === 'navigate') {\n element.dispatchEvent(new CustomEvent('sdui:navigate', {\n bubbles: true,\n detail: { route: action.params?.route, args: action.params?.args },\n }))\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 = 'flex'\n el.style.position = 'relative'\n\n if (props?.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 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: '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', 'end', 'bottom'],\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 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 { 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' },\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,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AAAA,MAC1I;AAAA,IACF;AAAA,EACF;AAAA,EACA;AAAA,IACE,MAAM;AAAA,IACN,OAAO;AAAA,IACP,iBAAiB;AAAA,IACjB,YAAY;AAAA,MACV,4BAA4B;AAAA,MAC5B,8BAA8B;AAAA,MAC9B,EAAE,MAAM,uBAAuB,OAAO,wBAAwB,MAAM,QAAQ,YAAY,CAAC,SAAS,OAAO,qBAAqB,EAAE;AAAA,MAChI,EAAE,MAAM,aAAa,OAAO,cAAc,MAAM,UAAU;AAAA,IAC5D;AAAA,EACF;AAAA,EACA;AAAA,IACE,MAAM;AAAA,IACN,OAAO;AAAA,IACP,iBAAiB;AAAA,IACjB,YAAY;AAAA,MACV,4BAA4B;AAAA,MAC5B,EAAE,MAAM,qBAAqB,OAAO,sBAAsB,MAAM,QAAQ,YAAY,CAAC,OAAO,UAAU,mBAAmB,EAAE;AAAA,MAC3H,gCAAgC;AAAA,MAChC,EAAE,MAAM,aAAa,OAAO,cAAc,MAAM,UAAU;AAAA,IAC5D;AAAA,EACF;AAAA,EACA;AAAA,IACE,MAAM;AAAA,IACN,OAAO;AAAA,IACP,iBAAiB;AAAA,IACjB,YAAY;AAAA,MACV,4BAA4B;AAAA,MAC5B,8BAA8B;AAAA,IAChC;AAAA,EACF;AACF;AAIO,SAAS,gBAAiC;AAC/C,SAAO,KAAK,MAAM,KAAK,UAAU,qBAAqB,CAAC;AACzD;;;AXxOO,SAAS,OAAO,MAAc,WAAwB,SAA+B;AAC1F,QAAM,SAAqB,KAAK,MAAM,IAAI;AAC1C,QAAM,QAAe,SAAS,SAAS;AAEvC,QAAM,OAAO,gBAAgB,OAAO,MAAM,KAAK;AAE/C,YAAU,YAAY;AACtB,YAAU,YAAY,IAAI;AAC5B;","names":["el"]}
|
package/dist/index.d.cts
CHANGED
|
@@ -1,16 +1,74 @@
|
|
|
1
|
+
type ComponentType = 'text' | 'image' | 'box' | 'column' | 'row' | 'lazy_column';
|
|
2
|
+
type AlignmentType = 'top_start' | 'top_center' | 'top_end' | 'center_start' | 'center' | 'center_end' | 'bottom_start' | 'bottom_center' | 'bottom_end';
|
|
3
|
+
type FontWeightType = 'bold' | 'medium' | 'normal' | 'semi_bold';
|
|
4
|
+
type SizeUnitType = 'dp' | 'match_parent' | 'wrap_content';
|
|
5
|
+
type ActionType = 'navigate';
|
|
6
|
+
type BackgroundColorType = 'single' | 'vertical_gradient' | 'horizontal_gradient' | 'linear_gradient';
|
|
7
|
+
type ContentScaleType = 'fit' | 'crop' | 'fill_height' | 'fill_width' | 'fill_bounds' | 'inside' | 'none';
|
|
8
|
+
type TextAlignType = 'left' | 'right' | 'center' | 'justify' | 'start' | 'end' | 'unspecified';
|
|
9
|
+
type TextOverflowType = 'none' | 'ellipsis';
|
|
10
|
+
type HorizontalAlignmentType = 'start' | 'end' | 'center_horizontally';
|
|
11
|
+
type VerticalAlignmentType = 'top' | 'bottom' | 'center_vertically';
|
|
12
|
+
type HorizontalArrangementType = 'start' | 'center' | 'end' | 'space_between' | 'space_evenly' | 'space_around' | 'spaced_by';
|
|
13
|
+
type VerticalArrangementType = 'top' | 'center' | 'bottom' | 'space_evenly' | 'space_between' | 'space_around' | 'spaced_by';
|
|
1
14
|
type Theme = 'light' | 'dark';
|
|
2
|
-
interface
|
|
3
|
-
|
|
4
|
-
|
|
15
|
+
interface ColorModel {
|
|
16
|
+
light?: string;
|
|
17
|
+
dark?: string;
|
|
5
18
|
}
|
|
6
|
-
interface
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
children?: SduiComponent[];
|
|
19
|
+
interface SizeModel {
|
|
20
|
+
value?: number;
|
|
21
|
+
unit?: SizeUnitType;
|
|
10
22
|
}
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
23
|
+
interface SpacingModel {
|
|
24
|
+
top?: number;
|
|
25
|
+
bottom?: number;
|
|
26
|
+
start?: number;
|
|
27
|
+
end?: number;
|
|
28
|
+
}
|
|
29
|
+
interface ActionModel {
|
|
30
|
+
type?: ActionType;
|
|
31
|
+
params?: ActionParams;
|
|
32
|
+
}
|
|
33
|
+
interface ActionParams {
|
|
34
|
+
route?: string;
|
|
35
|
+
args?: Record<string, string>;
|
|
36
|
+
}
|
|
37
|
+
interface BackgroundColorModel {
|
|
38
|
+
colors?: ColorModel[];
|
|
39
|
+
type?: BackgroundColorType;
|
|
40
|
+
}
|
|
41
|
+
interface HorizontalArrangementModel {
|
|
42
|
+
type?: HorizontalArrangementType;
|
|
43
|
+
spacing?: number;
|
|
44
|
+
}
|
|
45
|
+
interface VerticalArrangementModel {
|
|
46
|
+
type?: VerticalArrangementType;
|
|
47
|
+
spacing?: number;
|
|
48
|
+
}
|
|
49
|
+
interface ModifierBase {
|
|
50
|
+
alignment?: string;
|
|
51
|
+
weight?: number;
|
|
52
|
+
action?: ActionModel;
|
|
53
|
+
}
|
|
54
|
+
interface TextUiModifier extends ModifierBase {
|
|
55
|
+
width?: SizeModel;
|
|
56
|
+
margin?: SpacingModel;
|
|
57
|
+
}
|
|
58
|
+
interface ContainerUiModifier extends ModifierBase {
|
|
59
|
+
backgroundColor?: BackgroundColorModel;
|
|
60
|
+
width?: SizeModel;
|
|
61
|
+
height?: SizeModel;
|
|
62
|
+
padding?: SpacingModel;
|
|
63
|
+
margin?: SpacingModel;
|
|
64
|
+
aspectRatio?: number;
|
|
65
|
+
}
|
|
66
|
+
interface ImageUiModifier extends ModifierBase {
|
|
67
|
+
width?: SizeModel;
|
|
68
|
+
height?: SizeModel;
|
|
69
|
+
padding?: SpacingModel;
|
|
70
|
+
margin?: SpacingModel;
|
|
71
|
+
aspectRatio?: number;
|
|
14
72
|
}
|
|
15
73
|
interface TextUiProperties {
|
|
16
74
|
modifier?: TextUiModifier;
|
|
@@ -42,87 +100,27 @@ interface ColumnUiProperties {
|
|
|
42
100
|
}
|
|
43
101
|
interface RowUiProperties {
|
|
44
102
|
modifier?: ContainerUiModifier;
|
|
45
|
-
verticalAlignment?: VerticalAlignmentType;
|
|
46
103
|
horizontalArrangement?: HorizontalArrangementModel;
|
|
104
|
+
verticalAlignment?: VerticalAlignmentType;
|
|
47
105
|
canScroll?: boolean;
|
|
48
106
|
}
|
|
49
107
|
interface LazyColumnUiProperties {
|
|
50
108
|
modifier?: ContainerUiModifier;
|
|
51
109
|
verticalArrangement?: VerticalArrangementModel;
|
|
52
110
|
}
|
|
53
|
-
interface
|
|
54
|
-
|
|
55
|
-
weight?: number;
|
|
56
|
-
action?: ActionModel;
|
|
57
|
-
}
|
|
58
|
-
interface DefaultUiModifier extends ModifierBase {
|
|
59
|
-
}
|
|
60
|
-
interface TextUiModifier extends ModifierBase {
|
|
61
|
-
width?: SizeModel;
|
|
62
|
-
margin?: SpacingModel;
|
|
63
|
-
}
|
|
64
|
-
interface ContainerUiModifier extends ModifierBase {
|
|
65
|
-
backgroundColor?: BackgroundColorModel;
|
|
66
|
-
width?: SizeModel;
|
|
67
|
-
height?: SizeModel;
|
|
68
|
-
padding?: SpacingModel;
|
|
69
|
-
margin?: SpacingModel;
|
|
70
|
-
aspectRatio?: number;
|
|
71
|
-
}
|
|
72
|
-
interface ImageUiModifier extends ModifierBase {
|
|
73
|
-
width?: SizeModel;
|
|
74
|
-
height?: SizeModel;
|
|
75
|
-
padding?: SpacingModel;
|
|
76
|
-
margin?: SpacingModel;
|
|
77
|
-
aspectRatio?: number;
|
|
78
|
-
}
|
|
79
|
-
interface ColorModel {
|
|
80
|
-
light?: string;
|
|
81
|
-
dark?: string;
|
|
82
|
-
}
|
|
83
|
-
interface SizeModel {
|
|
84
|
-
value?: number;
|
|
85
|
-
unit?: SizeUnitType;
|
|
86
|
-
}
|
|
87
|
-
interface SpacingModel {
|
|
88
|
-
top?: number;
|
|
89
|
-
bottom?: number;
|
|
90
|
-
start?: number;
|
|
91
|
-
end?: number;
|
|
92
|
-
}
|
|
93
|
-
interface ActionModel {
|
|
94
|
-
type?: ActionType;
|
|
95
|
-
params?: ActionParams;
|
|
96
|
-
}
|
|
97
|
-
interface ActionParams {
|
|
98
|
-
route?: string;
|
|
99
|
-
args?: Record<string, string>;
|
|
100
|
-
}
|
|
101
|
-
interface BackgroundColorModel {
|
|
102
|
-
colors?: ColorModel[];
|
|
103
|
-
type?: BackgroundColorType;
|
|
111
|
+
interface DefaultUiProperties {
|
|
112
|
+
modifier?: ModifierBase;
|
|
104
113
|
}
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
114
|
+
type PropertiesModel = TextUiProperties | ImageUiProperties | BoxUiProperties | ColumnUiProperties | RowUiProperties | LazyColumnUiProperties | DefaultUiProperties;
|
|
115
|
+
interface SduiComponent {
|
|
116
|
+
type: string;
|
|
117
|
+
properties?: PropertiesModel;
|
|
118
|
+
children?: SduiComponent[];
|
|
108
119
|
}
|
|
109
|
-
interface
|
|
110
|
-
|
|
111
|
-
|
|
120
|
+
interface SduiScreen {
|
|
121
|
+
schemaVersion?: string;
|
|
122
|
+
root: SduiComponent;
|
|
112
123
|
}
|
|
113
|
-
type ActionType = 'navigate';
|
|
114
|
-
type FontWeightType = 'bold' | 'medium' | 'normal' | 'semi_bold';
|
|
115
|
-
type TextAlignType = 'left' | 'right' | 'center' | 'justify' | 'start' | 'end' | 'unspecified';
|
|
116
|
-
type TextOverflowType = 'none' | 'ellipsis';
|
|
117
|
-
type ContentScaleType = 'fit' | 'crop' | 'fill_height' | 'fill_width' | 'fill_bounds' | 'inside' | 'none';
|
|
118
|
-
type SizeUnitType = 'dp' | 'match_parent' | 'wrap_content';
|
|
119
|
-
type AlignmentType = 'top_start' | 'top_center' | 'top_end' | 'center_start' | 'center' | 'center_end' | 'bottom_start' | 'bottom_center' | 'bottom_end';
|
|
120
|
-
type HorizontalAlignmentType = 'start' | 'end' | 'center_horizontally';
|
|
121
|
-
type VerticalAlignmentType = 'top' | 'bottom' | 'center_vertically';
|
|
122
|
-
type HorizontalArrangementType = 'start' | 'center' | 'end' | 'space_between' | 'space_evenly' | 'space_around' | 'spaced_by';
|
|
123
|
-
type VerticalArrangementType = 'top' | 'center' | 'bottom' | 'space_evenly' | 'space_between' | 'space_around' | 'spaced_by';
|
|
124
|
-
type BackgroundColorType = 'single' | 'vertical_gradient' | 'linear_gradient' | 'horizontal_gradient';
|
|
125
|
-
|
|
126
124
|
type PropertyType = 'string' | 'number' | 'boolean' | 'enum' | 'color' | 'object';
|
|
127
125
|
interface PropertyDescriptor {
|
|
128
126
|
name: string;
|
|
@@ -140,6 +138,7 @@ interface ComponentMeta {
|
|
|
140
138
|
acceptsChildren: boolean;
|
|
141
139
|
properties: PropertyDescriptor[];
|
|
142
140
|
}
|
|
141
|
+
|
|
143
142
|
declare function getComponents(): ComponentMeta[];
|
|
144
143
|
|
|
145
144
|
interface RenderOptions {
|
|
@@ -147,4 +146,4 @@ interface RenderOptions {
|
|
|
147
146
|
}
|
|
148
147
|
declare function render(json: string, container: HTMLElement, options?: RenderOptions): void;
|
|
149
148
|
|
|
150
|
-
export { type BoxUiProperties, type ColumnUiProperties, type ComponentMeta, type ImageUiProperties, type LazyColumnUiProperties, type PropertiesModel, type PropertyDescriptor, type PropertyType, type RenderOptions, type RowUiProperties, type SduiComponent, type SduiScreen, type TextUiProperties, type Theme, getComponents, render };
|
|
149
|
+
export { type ActionModel, type ActionParams, type ActionType, type AlignmentType, type BackgroundColorModel, type BackgroundColorType, type BoxUiProperties, type ColorModel, type ColumnUiProperties, type ComponentMeta, type ComponentType, type ContainerUiModifier, type ContentScaleType, type DefaultUiProperties, type FontWeightType, type HorizontalAlignmentType, type HorizontalArrangementModel, type HorizontalArrangementType, type ImageUiModifier, type ImageUiProperties, type LazyColumnUiProperties, type ModifierBase, type PropertiesModel, type PropertyDescriptor, type PropertyType, type RenderOptions, type RowUiProperties, type SduiComponent, type SduiScreen, type SizeModel, type SizeUnitType, type SpacingModel, type TextAlignType, type TextOverflowType, type TextUiModifier, type TextUiProperties, type Theme, type VerticalAlignmentType, type VerticalArrangementModel, type VerticalArrangementType, getComponents, render };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,16 +1,74 @@
|
|
|
1
|
+
type ComponentType = 'text' | 'image' | 'box' | 'column' | 'row' | 'lazy_column';
|
|
2
|
+
type AlignmentType = 'top_start' | 'top_center' | 'top_end' | 'center_start' | 'center' | 'center_end' | 'bottom_start' | 'bottom_center' | 'bottom_end';
|
|
3
|
+
type FontWeightType = 'bold' | 'medium' | 'normal' | 'semi_bold';
|
|
4
|
+
type SizeUnitType = 'dp' | 'match_parent' | 'wrap_content';
|
|
5
|
+
type ActionType = 'navigate';
|
|
6
|
+
type BackgroundColorType = 'single' | 'vertical_gradient' | 'horizontal_gradient' | 'linear_gradient';
|
|
7
|
+
type ContentScaleType = 'fit' | 'crop' | 'fill_height' | 'fill_width' | 'fill_bounds' | 'inside' | 'none';
|
|
8
|
+
type TextAlignType = 'left' | 'right' | 'center' | 'justify' | 'start' | 'end' | 'unspecified';
|
|
9
|
+
type TextOverflowType = 'none' | 'ellipsis';
|
|
10
|
+
type HorizontalAlignmentType = 'start' | 'end' | 'center_horizontally';
|
|
11
|
+
type VerticalAlignmentType = 'top' | 'bottom' | 'center_vertically';
|
|
12
|
+
type HorizontalArrangementType = 'start' | 'center' | 'end' | 'space_between' | 'space_evenly' | 'space_around' | 'spaced_by';
|
|
13
|
+
type VerticalArrangementType = 'top' | 'center' | 'bottom' | 'space_evenly' | 'space_between' | 'space_around' | 'spaced_by';
|
|
1
14
|
type Theme = 'light' | 'dark';
|
|
2
|
-
interface
|
|
3
|
-
|
|
4
|
-
|
|
15
|
+
interface ColorModel {
|
|
16
|
+
light?: string;
|
|
17
|
+
dark?: string;
|
|
5
18
|
}
|
|
6
|
-
interface
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
children?: SduiComponent[];
|
|
19
|
+
interface SizeModel {
|
|
20
|
+
value?: number;
|
|
21
|
+
unit?: SizeUnitType;
|
|
10
22
|
}
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
23
|
+
interface SpacingModel {
|
|
24
|
+
top?: number;
|
|
25
|
+
bottom?: number;
|
|
26
|
+
start?: number;
|
|
27
|
+
end?: number;
|
|
28
|
+
}
|
|
29
|
+
interface ActionModel {
|
|
30
|
+
type?: ActionType;
|
|
31
|
+
params?: ActionParams;
|
|
32
|
+
}
|
|
33
|
+
interface ActionParams {
|
|
34
|
+
route?: string;
|
|
35
|
+
args?: Record<string, string>;
|
|
36
|
+
}
|
|
37
|
+
interface BackgroundColorModel {
|
|
38
|
+
colors?: ColorModel[];
|
|
39
|
+
type?: BackgroundColorType;
|
|
40
|
+
}
|
|
41
|
+
interface HorizontalArrangementModel {
|
|
42
|
+
type?: HorizontalArrangementType;
|
|
43
|
+
spacing?: number;
|
|
44
|
+
}
|
|
45
|
+
interface VerticalArrangementModel {
|
|
46
|
+
type?: VerticalArrangementType;
|
|
47
|
+
spacing?: number;
|
|
48
|
+
}
|
|
49
|
+
interface ModifierBase {
|
|
50
|
+
alignment?: string;
|
|
51
|
+
weight?: number;
|
|
52
|
+
action?: ActionModel;
|
|
53
|
+
}
|
|
54
|
+
interface TextUiModifier extends ModifierBase {
|
|
55
|
+
width?: SizeModel;
|
|
56
|
+
margin?: SpacingModel;
|
|
57
|
+
}
|
|
58
|
+
interface ContainerUiModifier extends ModifierBase {
|
|
59
|
+
backgroundColor?: BackgroundColorModel;
|
|
60
|
+
width?: SizeModel;
|
|
61
|
+
height?: SizeModel;
|
|
62
|
+
padding?: SpacingModel;
|
|
63
|
+
margin?: SpacingModel;
|
|
64
|
+
aspectRatio?: number;
|
|
65
|
+
}
|
|
66
|
+
interface ImageUiModifier extends ModifierBase {
|
|
67
|
+
width?: SizeModel;
|
|
68
|
+
height?: SizeModel;
|
|
69
|
+
padding?: SpacingModel;
|
|
70
|
+
margin?: SpacingModel;
|
|
71
|
+
aspectRatio?: number;
|
|
14
72
|
}
|
|
15
73
|
interface TextUiProperties {
|
|
16
74
|
modifier?: TextUiModifier;
|
|
@@ -42,87 +100,27 @@ interface ColumnUiProperties {
|
|
|
42
100
|
}
|
|
43
101
|
interface RowUiProperties {
|
|
44
102
|
modifier?: ContainerUiModifier;
|
|
45
|
-
verticalAlignment?: VerticalAlignmentType;
|
|
46
103
|
horizontalArrangement?: HorizontalArrangementModel;
|
|
104
|
+
verticalAlignment?: VerticalAlignmentType;
|
|
47
105
|
canScroll?: boolean;
|
|
48
106
|
}
|
|
49
107
|
interface LazyColumnUiProperties {
|
|
50
108
|
modifier?: ContainerUiModifier;
|
|
51
109
|
verticalArrangement?: VerticalArrangementModel;
|
|
52
110
|
}
|
|
53
|
-
interface
|
|
54
|
-
|
|
55
|
-
weight?: number;
|
|
56
|
-
action?: ActionModel;
|
|
57
|
-
}
|
|
58
|
-
interface DefaultUiModifier extends ModifierBase {
|
|
59
|
-
}
|
|
60
|
-
interface TextUiModifier extends ModifierBase {
|
|
61
|
-
width?: SizeModel;
|
|
62
|
-
margin?: SpacingModel;
|
|
63
|
-
}
|
|
64
|
-
interface ContainerUiModifier extends ModifierBase {
|
|
65
|
-
backgroundColor?: BackgroundColorModel;
|
|
66
|
-
width?: SizeModel;
|
|
67
|
-
height?: SizeModel;
|
|
68
|
-
padding?: SpacingModel;
|
|
69
|
-
margin?: SpacingModel;
|
|
70
|
-
aspectRatio?: number;
|
|
71
|
-
}
|
|
72
|
-
interface ImageUiModifier extends ModifierBase {
|
|
73
|
-
width?: SizeModel;
|
|
74
|
-
height?: SizeModel;
|
|
75
|
-
padding?: SpacingModel;
|
|
76
|
-
margin?: SpacingModel;
|
|
77
|
-
aspectRatio?: number;
|
|
78
|
-
}
|
|
79
|
-
interface ColorModel {
|
|
80
|
-
light?: string;
|
|
81
|
-
dark?: string;
|
|
82
|
-
}
|
|
83
|
-
interface SizeModel {
|
|
84
|
-
value?: number;
|
|
85
|
-
unit?: SizeUnitType;
|
|
86
|
-
}
|
|
87
|
-
interface SpacingModel {
|
|
88
|
-
top?: number;
|
|
89
|
-
bottom?: number;
|
|
90
|
-
start?: number;
|
|
91
|
-
end?: number;
|
|
92
|
-
}
|
|
93
|
-
interface ActionModel {
|
|
94
|
-
type?: ActionType;
|
|
95
|
-
params?: ActionParams;
|
|
96
|
-
}
|
|
97
|
-
interface ActionParams {
|
|
98
|
-
route?: string;
|
|
99
|
-
args?: Record<string, string>;
|
|
100
|
-
}
|
|
101
|
-
interface BackgroundColorModel {
|
|
102
|
-
colors?: ColorModel[];
|
|
103
|
-
type?: BackgroundColorType;
|
|
111
|
+
interface DefaultUiProperties {
|
|
112
|
+
modifier?: ModifierBase;
|
|
104
113
|
}
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
114
|
+
type PropertiesModel = TextUiProperties | ImageUiProperties | BoxUiProperties | ColumnUiProperties | RowUiProperties | LazyColumnUiProperties | DefaultUiProperties;
|
|
115
|
+
interface SduiComponent {
|
|
116
|
+
type: string;
|
|
117
|
+
properties?: PropertiesModel;
|
|
118
|
+
children?: SduiComponent[];
|
|
108
119
|
}
|
|
109
|
-
interface
|
|
110
|
-
|
|
111
|
-
|
|
120
|
+
interface SduiScreen {
|
|
121
|
+
schemaVersion?: string;
|
|
122
|
+
root: SduiComponent;
|
|
112
123
|
}
|
|
113
|
-
type ActionType = 'navigate';
|
|
114
|
-
type FontWeightType = 'bold' | 'medium' | 'normal' | 'semi_bold';
|
|
115
|
-
type TextAlignType = 'left' | 'right' | 'center' | 'justify' | 'start' | 'end' | 'unspecified';
|
|
116
|
-
type TextOverflowType = 'none' | 'ellipsis';
|
|
117
|
-
type ContentScaleType = 'fit' | 'crop' | 'fill_height' | 'fill_width' | 'fill_bounds' | 'inside' | 'none';
|
|
118
|
-
type SizeUnitType = 'dp' | 'match_parent' | 'wrap_content';
|
|
119
|
-
type AlignmentType = 'top_start' | 'top_center' | 'top_end' | 'center_start' | 'center' | 'center_end' | 'bottom_start' | 'bottom_center' | 'bottom_end';
|
|
120
|
-
type HorizontalAlignmentType = 'start' | 'end' | 'center_horizontally';
|
|
121
|
-
type VerticalAlignmentType = 'top' | 'bottom' | 'center_vertically';
|
|
122
|
-
type HorizontalArrangementType = 'start' | 'center' | 'end' | 'space_between' | 'space_evenly' | 'space_around' | 'spaced_by';
|
|
123
|
-
type VerticalArrangementType = 'top' | 'center' | 'bottom' | 'space_evenly' | 'space_between' | 'space_around' | 'spaced_by';
|
|
124
|
-
type BackgroundColorType = 'single' | 'vertical_gradient' | 'linear_gradient' | 'horizontal_gradient';
|
|
125
|
-
|
|
126
124
|
type PropertyType = 'string' | 'number' | 'boolean' | 'enum' | 'color' | 'object';
|
|
127
125
|
interface PropertyDescriptor {
|
|
128
126
|
name: string;
|
|
@@ -140,6 +138,7 @@ interface ComponentMeta {
|
|
|
140
138
|
acceptsChildren: boolean;
|
|
141
139
|
properties: PropertyDescriptor[];
|
|
142
140
|
}
|
|
141
|
+
|
|
143
142
|
declare function getComponents(): ComponentMeta[];
|
|
144
143
|
|
|
145
144
|
interface RenderOptions {
|
|
@@ -147,4 +146,4 @@ interface RenderOptions {
|
|
|
147
146
|
}
|
|
148
147
|
declare function render(json: string, container: HTMLElement, options?: RenderOptions): void;
|
|
149
148
|
|
|
150
|
-
export { type BoxUiProperties, type ColumnUiProperties, type ComponentMeta, type ImageUiProperties, type LazyColumnUiProperties, type PropertiesModel, type PropertyDescriptor, type PropertyType, type RenderOptions, type RowUiProperties, type SduiComponent, type SduiScreen, type TextUiProperties, type Theme, getComponents, render };
|
|
149
|
+
export { type ActionModel, type ActionParams, type ActionType, type AlignmentType, type BackgroundColorModel, type BackgroundColorType, type BoxUiProperties, type ColorModel, type ColumnUiProperties, type ComponentMeta, type ComponentType, type ContainerUiModifier, type ContentScaleType, type DefaultUiProperties, type FontWeightType, type HorizontalAlignmentType, type HorizontalArrangementModel, type HorizontalArrangementType, type ImageUiModifier, type ImageUiProperties, type LazyColumnUiProperties, type ModifierBase, type PropertiesModel, type PropertyDescriptor, type PropertyType, type RenderOptions, type RowUiProperties, type SduiComponent, type SduiScreen, type SizeModel, type SizeUnitType, type SpacingModel, type TextAlignType, type TextOverflowType, type TextUiModifier, type TextUiProperties, type Theme, type VerticalAlignmentType, type VerticalArrangementModel, type VerticalArrangementType, getComponents, render };
|
package/dist/index.js
CHANGED
|
@@ -42,65 +42,63 @@ function applyModifier(element, modifier, theme) {
|
|
|
42
42
|
break;
|
|
43
43
|
case "start":
|
|
44
44
|
case "top":
|
|
45
|
-
case "top_start":
|
|
46
45
|
s.alignSelf = "flex-start";
|
|
47
46
|
break;
|
|
48
47
|
case "end":
|
|
49
48
|
case "bottom":
|
|
50
|
-
case "bottom_end":
|
|
51
49
|
s.alignSelf = "flex-end";
|
|
52
50
|
break;
|
|
53
51
|
}
|
|
54
52
|
}
|
|
55
53
|
if (modifier.weight != null) {
|
|
56
54
|
s.flex = `${modifier.weight}`;
|
|
55
|
+
s.minWidth = "0";
|
|
56
|
+
s.minHeight = "0";
|
|
57
57
|
}
|
|
58
58
|
if (modifier.action) {
|
|
59
59
|
const action = modifier.action;
|
|
60
|
-
|
|
60
|
+
s.cursor = "pointer";
|
|
61
61
|
element.addEventListener("click", (e) => {
|
|
62
62
|
e.stopPropagation();
|
|
63
63
|
if (action.type === "navigate") {
|
|
64
|
-
|
|
64
|
+
element.dispatchEvent(new CustomEvent("sdui:navigate", {
|
|
65
65
|
bubbles: true,
|
|
66
66
|
detail: { route: action.params?.route, args: action.params?.args }
|
|
67
|
-
});
|
|
68
|
-
element.dispatchEvent(event);
|
|
69
|
-
console.log("[sdui] navigate \u2192", action.params?.route, action.params?.args);
|
|
67
|
+
}));
|
|
70
68
|
}
|
|
71
69
|
});
|
|
72
70
|
}
|
|
73
|
-
const
|
|
74
|
-
const hasAspectRatio = "aspectRatio" in
|
|
75
|
-
const hasWidth = "width" in
|
|
76
|
-
const hasHeight = "height" in
|
|
71
|
+
const mod = modifier;
|
|
72
|
+
const hasAspectRatio = "aspectRatio" in mod && mod.aspectRatio != null;
|
|
73
|
+
const hasWidth = "width" in mod && mod.width;
|
|
74
|
+
const hasHeight = "height" in mod && mod.height;
|
|
77
75
|
if (hasWidth) {
|
|
78
|
-
const w = resolveSize(
|
|
76
|
+
const w = resolveSize(mod.width);
|
|
79
77
|
if (w) s.width = w;
|
|
80
78
|
}
|
|
81
79
|
if (hasHeight && !(hasAspectRatio && hasWidth)) {
|
|
82
|
-
const h = resolveSize(
|
|
80
|
+
const h = resolveSize(mod.height);
|
|
83
81
|
if (h) s.height = h;
|
|
84
82
|
}
|
|
85
83
|
if (hasAspectRatio) {
|
|
86
|
-
s.aspectRatio = `${
|
|
84
|
+
s.aspectRatio = `${mod.aspectRatio}`;
|
|
87
85
|
}
|
|
88
|
-
if ("padding" in
|
|
89
|
-
const p = resolveSpacing(
|
|
86
|
+
if ("padding" in mod && mod.padding) {
|
|
87
|
+
const p = resolveSpacing(mod.padding);
|
|
90
88
|
if (p.top) s.paddingTop = p.top;
|
|
91
89
|
if (p.bottom) s.paddingBottom = p.bottom;
|
|
92
90
|
if (p.left) s.paddingLeft = p.left;
|
|
93
91
|
if (p.right) s.paddingRight = p.right;
|
|
94
92
|
}
|
|
95
|
-
if ("margin" in
|
|
96
|
-
const m = resolveSpacing(
|
|
93
|
+
if ("margin" in mod && mod.margin) {
|
|
94
|
+
const m = resolveSpacing(mod.margin);
|
|
97
95
|
if (m.top) s.marginTop = m.top;
|
|
98
96
|
if (m.bottom) s.marginBottom = m.bottom;
|
|
99
97
|
if (m.left) s.marginLeft = m.left;
|
|
100
98
|
if (m.right) s.marginRight = m.right;
|
|
101
99
|
}
|
|
102
|
-
if ("backgroundColor" in
|
|
103
|
-
applyBackground(s,
|
|
100
|
+
if ("backgroundColor" in mod && mod.backgroundColor) {
|
|
101
|
+
applyBackground(s, mod.backgroundColor, theme);
|
|
104
102
|
}
|
|
105
103
|
}
|
|
106
104
|
function applyBackground(s, bg, theme) {
|
|
@@ -178,7 +176,7 @@ function renderText(component, theme) {
|
|
|
178
176
|
if (props?.overflow === "ellipsis") {
|
|
179
177
|
el.style.textOverflow = "ellipsis";
|
|
180
178
|
el.style.overflow = "hidden";
|
|
181
|
-
el.style.whiteSpace =
|
|
179
|
+
el.style.whiteSpace = "nowrap";
|
|
182
180
|
}
|
|
183
181
|
if (props?.maxLines != null) {
|
|
184
182
|
el.style.display = "-webkit-box";
|
|
@@ -316,6 +314,7 @@ function renderColumn(component, theme) {
|
|
|
316
314
|
el.style.justifyContent = "space-around";
|
|
317
315
|
break;
|
|
318
316
|
case "spaced_by":
|
|
317
|
+
el.style.justifyContent = "flex-start";
|
|
319
318
|
if (arr.spacing != null) {
|
|
320
319
|
el.style.gap = `${arr.spacing}px`;
|
|
321
320
|
}
|
|
@@ -370,6 +369,7 @@ function renderRow(component, theme) {
|
|
|
370
369
|
el.style.justifyContent = "space-around";
|
|
371
370
|
break;
|
|
372
371
|
case "spaced_by":
|
|
372
|
+
el.style.justifyContent = "flex-start";
|
|
373
373
|
if (arr.spacing != null) {
|
|
374
374
|
el.style.gap = `${arr.spacing}px`;
|
|
375
375
|
}
|
|
@@ -425,6 +425,7 @@ function renderLazyColumn(component, theme) {
|
|
|
425
425
|
el.style.justifyContent = "space-around";
|
|
426
426
|
break;
|
|
427
427
|
case "spaced_by":
|
|
428
|
+
el.style.justifyContent = "flex-start";
|
|
428
429
|
if (arr.spacing != null) {
|
|
429
430
|
el.style.gap = `${arr.spacing}px`;
|
|
430
431
|
}
|
|
@@ -461,8 +462,7 @@ function renderComponent(component, theme) {
|
|
|
461
462
|
el.dataset.sduiType = component.type;
|
|
462
463
|
if (component.children && component.children.length > 0) {
|
|
463
464
|
for (const child of component.children) {
|
|
464
|
-
|
|
465
|
-
el.appendChild(childEl);
|
|
465
|
+
el.appendChild(renderComponent(child, theme));
|
|
466
466
|
}
|
|
467
467
|
}
|
|
468
468
|
return el;
|
|
@@ -526,7 +526,7 @@ function modifierBaseProperties() {
|
|
|
526
526
|
name: "alignment",
|
|
527
527
|
label: "Alignment",
|
|
528
528
|
type: "enum",
|
|
529
|
-
enumValues: ["center", "center_horizontally", "center_vertically", "start", "top", "
|
|
529
|
+
enumValues: ["center", "center_horizontally", "center_vertically", "start", "top", "end", "bottom"]
|
|
530
530
|
},
|
|
531
531
|
{ name: "weight", label: "Weight", type: "number" },
|
|
532
532
|
{ name: "action", label: "Action", type: "object", properties: actionModelProperties() }
|
|
@@ -617,24 +617,9 @@ var COMPONENT_DEFINITIONS = [
|
|
|
617
617
|
{ name: "text", label: "Text", type: "string", required: true },
|
|
618
618
|
{ name: "fontSize", label: "Font Size", type: "number" },
|
|
619
619
|
{ name: "color", label: "Color", type: "object", properties: colorModelProperties() },
|
|
620
|
-
{
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
type: "enum",
|
|
624
|
-
enumValues: ["bold", "medium", "normal", "semi_bold"]
|
|
625
|
-
},
|
|
626
|
-
{
|
|
627
|
-
name: "textAlign",
|
|
628
|
-
label: "Text Align",
|
|
629
|
-
type: "enum",
|
|
630
|
-
enumValues: ["left", "right", "center", "justify", "start", "end", "unspecified"]
|
|
631
|
-
},
|
|
632
|
-
{
|
|
633
|
-
name: "overflow",
|
|
634
|
-
label: "Overflow",
|
|
635
|
-
type: "enum",
|
|
636
|
-
enumValues: ["none", "ellipsis"]
|
|
637
|
-
},
|
|
620
|
+
{ name: "fontWeight", label: "Font Weight", type: "enum", enumValues: ["bold", "medium", "normal", "semi_bold"] },
|
|
621
|
+
{ name: "textAlign", label: "Text Align", type: "enum", enumValues: ["left", "right", "center", "justify", "start", "end", "unspecified"] },
|
|
622
|
+
{ name: "overflow", label: "Overflow", type: "enum", enumValues: ["none", "ellipsis"] },
|
|
638
623
|
{ name: "maxLines", label: "Max Lines", type: "number" },
|
|
639
624
|
{ name: "minLines", label: "Min Lines", type: "number" }
|
|
640
625
|
]
|
|
@@ -646,12 +631,7 @@ var COMPONENT_DEFINITIONS = [
|
|
|
646
631
|
properties: [
|
|
647
632
|
imageModifierDescriptor(),
|
|
648
633
|
{ name: "image", label: "Image URL", type: "string", required: true },
|
|
649
|
-
{
|
|
650
|
-
name: "scaleType",
|
|
651
|
-
label: "Scale Type",
|
|
652
|
-
type: "enum",
|
|
653
|
-
enumValues: ["fit", "crop", "fill_height", "fill_width", "fill_bounds", "inside", "none"]
|
|
654
|
-
},
|
|
634
|
+
{ name: "scaleType", label: "Scale Type", type: "enum", enumValues: ["fit", "crop", "fill_height", "fill_width", "fill_bounds", "inside", "none"] },
|
|
655
635
|
{ name: "contentDescription", label: "Content Description", type: "string" },
|
|
656
636
|
{ name: "tintColor", label: "Tint Color", type: "object", properties: colorModelProperties() }
|
|
657
637
|
]
|
|
@@ -666,17 +646,7 @@ var COMPONENT_DEFINITIONS = [
|
|
|
666
646
|
name: "alignment",
|
|
667
647
|
label: "Alignment",
|
|
668
648
|
type: "enum",
|
|
669
|
-
enumValues: [
|
|
670
|
-
"top_start",
|
|
671
|
-
"top_center",
|
|
672
|
-
"top_end",
|
|
673
|
-
"center_start",
|
|
674
|
-
"center",
|
|
675
|
-
"center_end",
|
|
676
|
-
"bottom_start",
|
|
677
|
-
"bottom_center",
|
|
678
|
-
"bottom_end"
|
|
679
|
-
]
|
|
649
|
+
enumValues: ["top_start", "top_center", "top_end", "center_start", "center", "center_end", "bottom_start", "bottom_center", "bottom_end"]
|
|
680
650
|
}
|
|
681
651
|
]
|
|
682
652
|
},
|
|
@@ -687,12 +657,7 @@ var COMPONENT_DEFINITIONS = [
|
|
|
687
657
|
properties: [
|
|
688
658
|
containerModifierDescriptor(),
|
|
689
659
|
verticalArrangementDescriptor(),
|
|
690
|
-
{
|
|
691
|
-
name: "horizontalAlignment",
|
|
692
|
-
label: "Horizontal Alignment",
|
|
693
|
-
type: "enum",
|
|
694
|
-
enumValues: ["start", "end", "center_horizontally"]
|
|
695
|
-
},
|
|
660
|
+
{ name: "horizontalAlignment", label: "Horizontal Alignment", type: "enum", enumValues: ["start", "end", "center_horizontally"] },
|
|
696
661
|
{ name: "canScroll", label: "Can Scroll", type: "boolean" }
|
|
697
662
|
]
|
|
698
663
|
},
|
|
@@ -702,12 +667,7 @@ var COMPONENT_DEFINITIONS = [
|
|
|
702
667
|
acceptsChildren: true,
|
|
703
668
|
properties: [
|
|
704
669
|
containerModifierDescriptor(),
|
|
705
|
-
{
|
|
706
|
-
name: "verticalAlignment",
|
|
707
|
-
label: "Vertical Alignment",
|
|
708
|
-
type: "enum",
|
|
709
|
-
enumValues: ["top", "bottom", "center_vertically"]
|
|
710
|
-
},
|
|
670
|
+
{ name: "verticalAlignment", label: "Vertical Alignment", type: "enum", enumValues: ["top", "bottom", "center_vertically"] },
|
|
711
671
|
horizontalArrangementDescriptor(),
|
|
712
672
|
{ name: "canScroll", label: "Can Scroll", type: "boolean" }
|
|
713
673
|
]
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../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","../src/index.ts"],"sourcesContent":["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","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.innerHT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;AAIO,SAAS,gBAAiC;AAC/C,SAAO,KAAK,MAAM,KAAK,UAAU,qBAAqB,CAAC;AACzD;;;ACzRO,SAAS,OAAO,MAAc,WAAwB,SAA+B;AAC1F,QAAM,SAAqB,KAAK,MAAM,IAAI;AAC1C,QAAM,QAAe,SAAS,SAAS;AAEvC,QAAM,OAAO,gBAAgB,OAAO,MAAM,KAAK;AAE/C,YAAU,YAAY;AACtB,YAAU,YAAY,IAAI;AAC5B;","names":["el"]}
|
|
1
|
+
{"version":3,"sources":["../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","../src/index.ts"],"sourcesContent":["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\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 s.alignSelf = 'flex-start'\n break\n case 'end':\n case 'bottom':\n s.alignSelf = 'flex-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 if (action.type === 'navigate') {\n element.dispatchEvent(new CustomEvent('sdui:navigate', {\n bubbles: true,\n detail: { route: action.params?.route, args: action.params?.args },\n }))\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 = 'flex'\n el.style.position = 'relative'\n\n if (props?.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 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: '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', 'end', 'bottom'],\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 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 { 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' },\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","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 ActionParams,\n BackgroundColorModel,\n HorizontalArrangementModel,\n VerticalArrangementModel,\n // Enums\n ComponentType,\n AlignmentType,\n FontWeightType,\n SizeUnitType,\n ActionType,\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"],"mappings":";AAEO,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,SAAS,CAAC;AAAA,IAC3B,KAAK;AACH,aAAO;AAAA,IACT,KAAK;AACH,aAAO;AAAA,IACT;AACE,aAAO;AAAA,EACX;AACF;AAEO,SAAS,eAAe,SAK7B;AACA,MAAI,CAAC,QAAS,QAAO,CAAC;AACtB,SA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