sdui-web 0.4.0 → 0.5.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 +45 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +11 -1
- package/dist/index.d.ts +11 -1
- package/dist/index.js +44 -0
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -21,6 +21,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
21
21
|
var index_exports = {};
|
|
22
22
|
__export(index_exports, {
|
|
23
23
|
getComponents: () => getComponents,
|
|
24
|
+
getDevicePresets: () => getDevicePresets,
|
|
24
25
|
render: () => render
|
|
25
26
|
});
|
|
26
27
|
module.exports = __toCommonJS(index_exports);
|
|
@@ -737,6 +738,49 @@ function getComponents() {
|
|
|
737
738
|
return JSON.parse(JSON.stringify(COMPONENT_DEFINITIONS));
|
|
738
739
|
}
|
|
739
740
|
|
|
741
|
+
// src/device-presets.ts
|
|
742
|
+
var DEVICE_PRESETS = {
|
|
743
|
+
phone: {
|
|
744
|
+
"Google": [
|
|
745
|
+
{ name: "Pixel 10", width: 412, height: 915 },
|
|
746
|
+
{ name: "Pixel 10 Pro", width: 412, height: 915 },
|
|
747
|
+
{ name: "Pixel 10 Pro XL", width: 448, height: 998 },
|
|
748
|
+
{ name: "Pixel 10 Fold", width: 600, height: 748, foldedWidth: 360, foldedHeight: 748 }
|
|
749
|
+
],
|
|
750
|
+
"Samsung": [
|
|
751
|
+
{ name: "Galaxy S26", width: 360, height: 780 },
|
|
752
|
+
{ name: "Galaxy S26 Ultra", width: 412, height: 915 },
|
|
753
|
+
{ name: "Galaxy Z Fold 7", width: 588, height: 748, foldedWidth: 360, foldedHeight: 748 }
|
|
754
|
+
],
|
|
755
|
+
"iOS": [
|
|
756
|
+
{ name: "iPhone 17 Pro Max", width: 440, height: 956 },
|
|
757
|
+
{ name: "iPhone 17 Pro", width: 402, height: 874 },
|
|
758
|
+
{ name: "iPhone 17e", width: 375, height: 812 },
|
|
759
|
+
{ name: "iPhone 17", width: 393, height: 852 },
|
|
760
|
+
{ name: "iPhone Air", width: 402, height: 874 }
|
|
761
|
+
]
|
|
762
|
+
},
|
|
763
|
+
tablet: {
|
|
764
|
+
"Google": [
|
|
765
|
+
{ name: "Pixel Tablet 2", width: 800, height: 1280 }
|
|
766
|
+
],
|
|
767
|
+
"Samsung": [
|
|
768
|
+
{ name: "Galaxy Tab S11", width: 753, height: 1205 },
|
|
769
|
+
{ name: "Galaxy Tab S11+", width: 834, height: 1334 },
|
|
770
|
+
{ name: "Galaxy Tab S11 Ultra", width: 930, height: 1488 }
|
|
771
|
+
],
|
|
772
|
+
"iOS": [
|
|
773
|
+
{ name: 'iPad Pro 13"', width: 1024, height: 1366 },
|
|
774
|
+
{ name: 'iPad Pro 11"', width: 834, height: 1194 },
|
|
775
|
+
{ name: "iPad Air", width: 820, height: 1180 },
|
|
776
|
+
{ name: "iPad mini", width: 744, height: 1133 }
|
|
777
|
+
]
|
|
778
|
+
}
|
|
779
|
+
};
|
|
780
|
+
function getDevicePresets() {
|
|
781
|
+
return JSON.parse(JSON.stringify(DEVICE_PRESETS));
|
|
782
|
+
}
|
|
783
|
+
|
|
740
784
|
// src/index.ts
|
|
741
785
|
function render(json, container, options) {
|
|
742
786
|
const screen = JSON.parse(json);
|
|
@@ -748,6 +792,7 @@ function render(json, container, options) {
|
|
|
748
792
|
// Annotate the CommonJS export names for ESM import in node:
|
|
749
793
|
0 && (module.exports = {
|
|
750
794
|
getComponents,
|
|
795
|
+
getDevicePresets,
|
|
751
796
|
render
|
|
752
797
|
});
|
|
753
798
|
//# sourceMappingURL=index.cjs.map
|
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 interface RenderOptions {\n theme?: Theme\n}\n\nexport function render(json: string, container: HTMLElement, options?: RenderOptions): void {\n const screen: SduiScreen = JSON.parse(json)\n const theme: Theme = options?.theme ?? 'light'\n\n const root = renderComponent(screen.root, theme)\n\n container.innerHTML = ''\n container.appendChild(root)\n}\n\nexport { getComponents } from './component-meta'\n\nexport type {\n // Root models\n SduiScreen,\n SduiComponent,\n Theme,\n // Properties\n PropertiesModel,\n TextUiProperties,\n ImageUiProperties,\n BoxUiProperties,\n ColumnUiProperties,\n RowUiProperties,\n LazyColumnUiProperties,\n DefaultUiProperties,\n // Modifiers\n ModifierBase,\n TextUiModifier,\n ContainerUiModifier,\n ImageUiModifier,\n // Base models\n ColorModel,\n SizeModel,\n SpacingModel,\n ActionModel,\n BackgroundColorModel,\n HorizontalArrangementModel,\n VerticalArrangementModel,\n // Enums\n ComponentType,\n AlignmentType,\n FontWeightType,\n SizeUnitType,\n BackgroundColorType,\n ContentScaleType,\n TextAlignType,\n TextOverflowType,\n HorizontalAlignmentType,\n VerticalAlignmentType,\n HorizontalArrangementType,\n VerticalArrangementType,\n // Metadata\n ComponentMeta,\n PropertyDescriptor,\n PropertyType,\n} from './types'\n","import type { ColorModel, SizeModel, SpacingModel, Theme } from './types'\n\nexport function resolveColor(color: ColorModel | undefined, theme: Theme): string | undefined {\n if (!color) return undefined\n if (theme === 'dark') {\n return color.dark ?? color.light\n }\n return color.light ?? color.dark\n}\n\nexport function resolveSize(size: SizeModel | undefined): string | undefined {\n if (!size || !size.unit) return undefined\n switch (size.unit) {\n case 'dp':\n return `${size.value ?? 0}px`\n case 'match_parent':\n return '100%'\n case 'wrap_content':\n return 'fit-content'\n default:\n return undefined\n }\n}\n\nexport function resolveSpacing(spacing: SpacingModel | undefined): {\n top?: string\n bottom?: string\n left?: string\n right?: string\n} {\n if (!spacing) return {}\n return {\n top: spacing.top != null ? `${spacing.top}px` : undefined,\n bottom: spacing.bottom != null ? `${spacing.bottom}px` : undefined,\n left: spacing.start != null ? `${spacing.start}px` : undefined,\n right: spacing.end != null ? `${spacing.end}px` : undefined,\n }\n}\n","import type { BackgroundColorModel, ContainerUiModifier, ImageUiModifier, ModifierBase, TextUiModifier, Theme } from './types'\nimport { resolveColor, resolveSize, resolveSpacing } from './utils'\n\nexport function applyModifier(element: HTMLElement, modifier: ModifierBase | undefined, theme: Theme): void {\n if (!modifier) return\n\n const s = element.style\n\n // alignment → align-self (+ justify-self for 2-axis Box alignments)\n if (modifier.alignment) {\n switch (modifier.alignment) {\n // Single-axis (Column / Row children)\n case 'center':\n case 'center_horizontally':\n case 'center_vertically':\n s.alignSelf = 'center'\n break\n case 'start':\n case 'top':\n s.alignSelf = 'flex-start'\n break\n case 'end':\n case 'bottom':\n s.alignSelf = 'flex-end'\n break\n // Two-axis (Box children — grid layout)\n case 'top_start':\n s.alignSelf = 'start'; s.justifySelf = 'start'\n break\n case 'top_center':\n s.alignSelf = 'start'; s.justifySelf = 'center'\n break\n case 'top_end':\n s.alignSelf = 'start'; s.justifySelf = 'end'\n break\n case 'center_start':\n s.alignSelf = 'center'; s.justifySelf = 'start'\n break\n case 'center_end':\n s.alignSelf = 'center'; s.justifySelf = 'end'\n break\n case 'bottom_start':\n s.alignSelf = 'end'; s.justifySelf = 'start'\n break\n case 'bottom_center':\n s.alignSelf = 'end'; s.justifySelf = 'center'\n break\n case 'bottom_end':\n s.alignSelf = 'end'; s.justifySelf = 'end'\n break\n }\n }\n\n // weight → flex\n if (modifier.weight != null) {\n s.flex = `${modifier.weight}`\n s.minWidth = '0'\n s.minHeight = '0'\n }\n\n // action → click handler\n if (modifier.action) {\n const action = modifier.action\n s.cursor = 'pointer'\n element.addEventListener('click', (e) => {\n e.stopPropagation()\n element.dispatchEvent(new CustomEvent('sdui:action', {\n bubbles: true,\n detail: { type: action.type, params: action.params },\n }))\n })\n }\n\n // Extended modifier fields (width, height, padding, margin, backgroundColor, aspectRatio)\n const mod = modifier as ContainerUiModifier | ImageUiModifier | TextUiModifier\n\n const hasAspectRatio = 'aspectRatio' in mod && mod.aspectRatio != null\n const hasWidth = 'width' in mod && mod.width\n const hasHeight = 'height' in mod && (mod as ContainerUiModifier).height\n\n if (hasWidth) {\n const w = resolveSize(mod.width)\n if (w) s.width = w\n }\n\n if (hasHeight && !(hasAspectRatio && hasWidth)) {\n const h = resolveSize((mod as ContainerUiModifier).height)\n if (h) s.height = h\n }\n\n if (hasAspectRatio) {\n s.aspectRatio = `${(mod as ContainerUiModifier).aspectRatio}`\n }\n\n if ('padding' in mod && mod.padding) {\n const p = resolveSpacing((mod as ContainerUiModifier).padding)\n if (p.top) s.paddingTop = p.top\n if (p.bottom) s.paddingBottom = p.bottom\n if (p.left) s.paddingLeft = p.left\n if (p.right) s.paddingRight = p.right\n }\n\n if ('margin' in mod && mod.margin) {\n const m = resolveSpacing(mod.margin)\n if (m.top) s.marginTop = m.top\n if (m.bottom) s.marginBottom = m.bottom\n if (m.left) s.marginLeft = m.left\n if (m.right) s.marginRight = m.right\n }\n\n if ('backgroundColor' in mod && mod.backgroundColor) {\n applyBackground(s, (mod as ContainerUiModifier).backgroundColor!, theme)\n }\n}\n\nfunction applyBackground(s: CSSStyleDeclaration, bg: BackgroundColorModel, theme: Theme): void {\n if (!bg.colors || bg.colors.length === 0) return\n\n const colors = bg.colors.map((c) => resolveColor(c, theme)).filter(Boolean) as string[]\n if (colors.length === 0) return\n\n switch (bg.type) {\n case 'single':\n s.backgroundColor = colors[0]\n break\n case 'vertical_gradient':\n s.background = `linear-gradient(to bottom, ${colors.join(', ')})`\n break\n case 'horizontal_gradient':\n s.background = `linear-gradient(to right, ${colors.join(', ')})`\n break\n case 'linear_gradient':\n s.background = `linear-gradient(${colors.join(', ')})`\n break\n default:\n if (colors.length === 1) {\n s.backgroundColor = colors[0]\n }\n break\n }\n}\n","import type { SduiComponent, TextUiProperties, Theme } from '../types'\nimport { resolveColor } from '../utils'\nimport { applyModifier } from '../modifiers'\n\nexport function renderText(component: SduiComponent, theme: Theme): HTMLElement {\n const props = component.properties as TextUiProperties | undefined\n const el = document.createElement('span')\n\n el.textContent = props?.text ?? ''\n\n if (props?.fontSize != null) {\n el.style.fontSize = `${props.fontSize}px`\n }\n\n if (props?.color) {\n const c = resolveColor(props.color, theme)\n if (c) el.style.color = c\n }\n\n if (props?.fontWeight) {\n switch (props.fontWeight) {\n case 'bold':\n el.style.fontWeight = '700'\n break\n case 'semi_bold':\n el.style.fontWeight = '600'\n break\n case 'medium':\n el.style.fontWeight = '500'\n break\n case 'normal':\n el.style.fontWeight = '400'\n break\n }\n }\n\n if (props?.textAlign) {\n el.style.display = 'block'\n switch (props.textAlign) {\n case 'left':\n case 'start':\n el.style.textAlign = 'left'\n break\n case 'right':\n case 'end':\n el.style.textAlign = 'right'\n break\n case 'center':\n el.style.textAlign = 'center'\n break\n case 'justify':\n el.style.textAlign = 'justify'\n break\n }\n }\n\n if (props?.overflow === 'ellipsis') {\n el.style.textOverflow = 'ellipsis'\n el.style.overflow = 'hidden'\n el.style.whiteSpace = 'nowrap'\n }\n\n if (props?.maxLines != null) {\n el.style.display = '-webkit-box'\n el.style.webkitLineClamp = `${props.maxLines}`\n ;(el.style as unknown as Record<string, string>)['-webkit-box-orient'] = 'vertical'\n el.style.overflow = 'hidden'\n }\n\n if (props?.minLines != null) {\n el.style.minHeight = `${props.minLines * (props.fontSize ?? 16) * 1.4}px`\n }\n\n applyModifier(el, props?.modifier, theme)\n\n return el\n}\n","import type { SduiComponent, ImageUiProperties, Theme } from '../types'\nimport { resolveColor } from '../utils'\nimport { applyModifier } from '../modifiers'\n\nexport function renderImage(component: SduiComponent, theme: Theme): HTMLElement {\n const props = component.properties as ImageUiProperties | undefined\n const el = document.createElement('img') as HTMLImageElement\n\n if (props?.image) {\n el.src = props.image\n }\n\n if (props?.contentDescription) {\n el.alt = props.contentDescription\n }\n\n if (props?.scaleType) {\n switch (props.scaleType) {\n case 'fit':\n case 'inside':\n el.style.objectFit = 'contain'\n break\n case 'crop':\n el.style.objectFit = 'cover'\n break\n case 'fill_bounds':\n el.style.objectFit = 'fill'\n break\n case 'fill_width':\n el.style.objectFit = 'cover'\n el.style.width = '100%'\n break\n case 'fill_height':\n el.style.objectFit = 'cover'\n el.style.height = '100%'\n break\n case 'none':\n el.style.objectFit = 'none'\n break\n }\n }\n\n if (props?.tintColor) {\n const c = resolveColor(props.tintColor, theme)\n if (c) {\n el.style.filter = `opacity(0.5) drop-shadow(0 0 0 ${c})`\n }\n }\n\n applyModifier(el, props?.modifier, theme)\n\n return el\n}\n","import type { SduiComponent, BoxUiProperties, Theme } from '../types'\nimport { applyModifier } from '../modifiers'\n\nexport function renderBox(component: SduiComponent, theme: Theme): HTMLElement {\n const props = component.properties as BoxUiProperties | undefined\n const el = document.createElement('div')\n\n el.style.display = 'grid'\n el.style.position = 'relative'\n\n // All children share the same grid cell (like Compose FrameLayout)\n // Default alignment for all children\n if (props?.alignment) {\n switch (props.alignment) {\n case 'top_start':\n el.style.justifyItems = 'start'\n el.style.alignItems = 'start'\n break\n case 'top_center':\n el.style.justifyItems = 'center'\n el.style.alignItems = 'start'\n break\n case 'top_end':\n el.style.justifyItems = 'end'\n el.style.alignItems = 'start'\n break\n case 'center_start':\n el.style.justifyItems = 'start'\n el.style.alignItems = 'center'\n break\n case 'center':\n el.style.justifyItems = 'center'\n el.style.alignItems = 'center'\n break\n case 'center_end':\n el.style.justifyItems = 'end'\n el.style.alignItems = 'center'\n break\n case 'bottom_start':\n el.style.justifyItems = 'start'\n el.style.alignItems = 'end'\n break\n case 'bottom_center':\n el.style.justifyItems = 'center'\n el.style.alignItems = 'end'\n break\n case 'bottom_end':\n el.style.justifyItems = 'end'\n el.style.alignItems = 'end'\n break\n }\n }\n\n applyModifier(el, props?.modifier, theme)\n\n return el\n}\n","import type { SduiComponent, ColumnUiProperties, Theme } from '../types'\nimport { applyModifier } from '../modifiers'\n\nexport function renderColumn(component: SduiComponent, theme: Theme): HTMLElement {\n const props = component.properties as ColumnUiProperties | undefined\n const el = document.createElement('div')\n\n el.style.display = 'flex'\n el.style.flexDirection = 'column'\n\n if (props?.verticalArrangement) {\n const arr = props.verticalArrangement\n switch (arr.type) {\n case 'top':\n el.style.justifyContent = 'flex-start'\n break\n case 'center':\n el.style.justifyContent = 'center'\n break\n case 'bottom':\n el.style.justifyContent = 'flex-end'\n break\n case 'space_between':\n el.style.justifyContent = 'space-between'\n break\n case 'space_evenly':\n el.style.justifyContent = 'space-evenly'\n break\n case 'space_around':\n el.style.justifyContent = 'space-around'\n break\n case 'spaced_by':\n el.style.justifyContent = 'flex-start'\n if (arr.spacing != null) {\n el.style.gap = `${arr.spacing}px`\n }\n break\n }\n }\n\n if (props?.horizontalAlignment) {\n switch (props.horizontalAlignment) {\n case 'start':\n el.style.alignItems = 'flex-start'\n break\n case 'end':\n el.style.alignItems = 'flex-end'\n break\n case 'center_horizontally':\n el.style.alignItems = 'center'\n break\n }\n }\n\n if (props?.canScroll) {\n el.style.overflowY = 'auto'\n }\n\n applyModifier(el, props?.modifier, theme)\n\n return el\n}\n","import type { SduiComponent, RowUiProperties, Theme } from '../types'\nimport { applyModifier } from '../modifiers'\n\nexport function renderRow(component: SduiComponent, theme: Theme): HTMLElement {\n const props = component.properties as RowUiProperties | undefined\n const el = document.createElement('div')\n\n el.style.display = 'flex'\n el.style.flexDirection = 'row'\n\n if (props?.horizontalArrangement) {\n const arr = props.horizontalArrangement\n switch (arr.type) {\n case 'start':\n el.style.justifyContent = 'flex-start'\n break\n case 'center':\n el.style.justifyContent = 'center'\n break\n case 'end':\n el.style.justifyContent = 'flex-end'\n break\n case 'space_between':\n el.style.justifyContent = 'space-between'\n break\n case 'space_evenly':\n el.style.justifyContent = 'space-evenly'\n break\n case 'space_around':\n el.style.justifyContent = 'space-around'\n break\n case 'spaced_by':\n el.style.justifyContent = 'flex-start'\n if (arr.spacing != null) {\n el.style.gap = `${arr.spacing}px`\n }\n break\n }\n }\n\n if (props?.verticalAlignment) {\n switch (props.verticalAlignment) {\n case 'top':\n el.style.alignItems = 'flex-start'\n break\n case 'bottom':\n el.style.alignItems = 'flex-end'\n break\n case 'center_vertically':\n el.style.alignItems = 'center'\n break\n }\n }\n\n if (props?.canScroll) {\n el.style.overflowX = 'auto'\n }\n\n applyModifier(el, props?.modifier, theme)\n\n return el\n}\n","import type { SduiComponent, LazyColumnUiProperties, Theme } from '../types'\nimport { applyModifier } from '../modifiers'\n\nexport function renderLazyColumn(component: SduiComponent, theme: Theme): HTMLElement {\n const props = component.properties as LazyColumnUiProperties | undefined\n const el = document.createElement('div')\n\n el.style.display = 'flex'\n el.style.flexDirection = 'column'\n el.style.overflowY = 'auto'\n\n if (props?.verticalArrangement) {\n const arr = props.verticalArrangement\n switch (arr.type) {\n case 'top':\n el.style.justifyContent = 'flex-start'\n break\n case 'center':\n el.style.justifyContent = 'center'\n break\n case 'bottom':\n el.style.justifyContent = 'flex-end'\n break\n case 'space_between':\n el.style.justifyContent = 'space-between'\n break\n case 'space_evenly':\n el.style.justifyContent = 'space-evenly'\n break\n case 'space_around':\n el.style.justifyContent = 'space-around'\n break\n case 'spaced_by':\n el.style.justifyContent = 'flex-start'\n if (arr.spacing != null) {\n el.style.gap = `${arr.spacing}px`\n }\n break\n }\n }\n\n applyModifier(el, props?.modifier, theme)\n\n return el\n}\n","import type { SduiComponent, Theme } from '../types'\nimport { renderText } from './text'\nimport { renderImage } from './image'\nimport { renderBox } from './box'\nimport { renderColumn } from './column'\nimport { renderRow } from './row'\nimport { renderLazyColumn } from './lazy-column'\n\nexport type ComponentRenderer = (component: SduiComponent, theme: Theme) => HTMLElement\n\nconst renderers: Record<string, ComponentRenderer> = {\n text: renderText,\n image: renderImage,\n box: renderBox,\n column: renderColumn,\n row: renderRow,\n lazy_column: renderLazyColumn,\n}\n\nexport function getRenderer(type: string): ComponentRenderer | undefined {\n return renderers[type]\n}\n","import type { SduiComponent, Theme } from './types'\nimport { getRenderer } from './components'\n\nexport function renderComponent(component: SduiComponent, theme: Theme): HTMLElement {\n const renderer = getRenderer(component.type)\n\n if (!renderer) {\n console.warn(`[sdui] Unknown component type: \"${component.type}\"`)\n const el = document.createElement('div')\n el.dataset.sduiUnknown = component.type\n return el\n }\n\n const el = renderer(component, theme)\n el.dataset.sduiType = component.type\n\n if (component.children && component.children.length > 0) {\n for (const child of component.children) {\n el.appendChild(renderComponent(child, theme))\n }\n }\n\n return el\n}\n","import type { ComponentMeta, PropertyDescriptor } from './types'\n\n// === Reusable sub-object property builders ===\n\nfunction sizeModelProperties(): PropertyDescriptor[] {\n return [\n { name: 'value', label: 'Value', type: 'number' },\n { name: 'unit', label: 'Unit', type: 'enum', enumValues: ['dp', 'match_parent', 'wrap_content'] },\n ]\n}\n\nfunction spacingModelProperties(): PropertyDescriptor[] {\n return [\n { name: 'top', label: 'Top', type: 'number' },\n { name: 'bottom', label: 'Bottom', type: 'number' },\n { name: 'start', label: 'Start', type: 'number' },\n { name: 'end', label: 'End', type: 'number' },\n ]\n}\n\nfunction colorModelProperties(): PropertyDescriptor[] {\n return [\n { name: 'light', label: 'Light', type: 'color' },\n { name: 'dark', label: 'Dark', type: 'color' },\n ]\n}\n\nfunction actionModelProperties(): PropertyDescriptor[] {\n return [\n { name: 'type', label: 'Action Type', type: 'string' },\n { name: 'params', label: 'Parameters', type: 'object' },\n ]\n}\n\nfunction backgroundColorModelProperties(): PropertyDescriptor[] {\n return [\n {\n name: 'colors',\n label: 'Colors',\n type: 'object',\n isArray: true,\n properties: colorModelProperties(),\n },\n {\n name: 'type',\n label: 'Background Type',\n type: 'enum',\n enumValues: ['single', 'vertical_gradient', 'horizontal_gradient', 'linear_gradient'],\n },\n ]\n}\n\n// === Modifier builders ===\n\nfunction modifierBaseProperties(): PropertyDescriptor[] {\n return [\n {\n name: 'alignment',\n label: 'Alignment',\n type: 'enum',\n enumValues: ['start', 'end', 'center', 'center_horizontally', 'center_vertically', 'top', 'bottom', 'top_start', 'top_center', 'top_end', 'center_start', 'center_end', 'bottom_start', 'bottom_center', 'bottom_end'],\n },\n { name: 'weight', label: 'Weight', type: 'number' },\n { name: 'action', label: 'Action', type: 'object', properties: actionModelProperties() },\n ]\n}\n\nfunction textModifierDescriptor(): PropertyDescriptor {\n return {\n name: 'modifier',\n label: 'Modifier',\n type: 'object',\n properties: [\n ...modifierBaseProperties(),\n { name: 'width', label: 'Width', type: 'object', properties: sizeModelProperties() },\n { name: 'margin', label: 'Margin', type: 'object', properties: spacingModelProperties() },\n ],\n }\n}\n\nfunction imageModifierDescriptor(): PropertyDescriptor {\n return {\n name: 'modifier',\n label: 'Modifier',\n type: 'object',\n properties: [\n ...modifierBaseProperties(),\n { name: 'width', label: 'Width', type: 'object', properties: sizeModelProperties() },\n { name: 'height', label: 'Height', type: 'object', properties: sizeModelProperties() },\n { name: 'padding', label: 'Padding', type: 'object', properties: spacingModelProperties() },\n { name: 'margin', label: 'Margin', type: 'object', properties: spacingModelProperties() },\n { name: 'aspectRatio', label: 'Aspect Ratio', type: 'number' },\n ],\n }\n}\n\nfunction containerModifierDescriptor(): PropertyDescriptor {\n return {\n name: 'modifier',\n label: 'Modifier',\n type: 'object',\n properties: [\n ...modifierBaseProperties(),\n { name: 'backgroundColor', label: 'Background Color', type: 'object', properties: backgroundColorModelProperties() },\n { name: 'width', label: 'Width', type: 'object', properties: sizeModelProperties() },\n { name: 'height', label: 'Height', type: 'object', properties: sizeModelProperties() },\n { name: 'padding', label: 'Padding', type: 'object', properties: spacingModelProperties() },\n { name: 'margin', label: 'Margin', type: 'object', properties: spacingModelProperties() },\n { name: 'aspectRatio', label: 'Aspect Ratio', type: 'number' },\n ],\n }\n}\n\n// === Arrangement descriptors ===\n\nfunction verticalArrangementDescriptor(): PropertyDescriptor {\n return {\n name: 'verticalArrangement',\n label: 'Vertical Arrangement',\n type: 'object',\n properties: [\n {\n name: 'type',\n label: 'Type',\n type: 'enum',\n enumValues: ['top', 'center', 'bottom', 'space_evenly', 'space_between', 'space_around', 'spaced_by'],\n },\n { name: 'spacing', label: 'Spacing', type: 'number' },\n ],\n }\n}\n\nfunction horizontalArrangementDescriptor(): PropertyDescriptor {\n return {\n name: 'horizontalArrangement',\n label: 'Horizontal Arrangement',\n type: 'object',\n properties: [\n {\n name: 'type',\n label: 'Type',\n type: 'enum',\n enumValues: ['start', 'center', 'end', 'space_between', 'space_evenly', 'space_around', 'spaced_by'],\n },\n { name: 'spacing', label: 'Spacing', type: 'number' },\n ],\n }\n}\n\n// === Component definitions ===\n\nconst COMPONENT_DEFINITIONS: ComponentMeta[] = [\n {\n type: 'text',\n label: 'Text',\n acceptsChildren: false,\n properties: [\n { name: 'text', label: 'Text', type: 'string', required: true, defaultValue: 'Text' },\n { name: 'fontSize', label: 'Font Size', type: 'number' },\n { name: 'color', label: 'Color', type: 'object', properties: colorModelProperties() },\n { name: 'fontWeight', label: 'Font Weight', type: 'enum', enumValues: ['bold', 'medium', 'normal', 'semi_bold'] },\n { name: 'textAlign', label: 'Text Align', type: 'enum', enumValues: ['left', 'right', 'center', 'justify', 'start', 'end', 'unspecified'] },\n { name: 'overflow', label: 'Overflow', type: 'enum', enumValues: ['none', 'ellipsis'] },\n { name: 'maxLines', label: 'Max Lines', type: 'number' },\n { name: 'minLines', label: 'Min Lines', type: 'number', defaultValue: 1 },\n textModifierDescriptor(),\n ],\n },\n {\n type: 'image',\n label: 'Image',\n acceptsChildren: false,\n properties: [\n imageModifierDescriptor(),\n { name: 'image', label: 'Image URL', type: 'string', required: true },\n { name: 'scaleType', label: 'Scale Type', type: 'enum', enumValues: ['fit', 'crop', 'fill_height', 'fill_width', 'fill_bounds', 'inside', 'none'] },\n { name: 'contentDescription', label: 'Content Description', type: 'string' },\n { name: 'tintColor', label: 'Tint Color', type: 'object', properties: colorModelProperties() },\n ],\n },\n {\n type: 'box',\n label: 'Box',\n acceptsChildren: true,\n properties: [\n containerModifierDescriptor(),\n {\n name: 'alignment',\n label: 'Alignment',\n type: 'enum',\n enumValues: ['top_start', 'top_center', 'top_end', 'center_start', 'center', 'center_end', 'bottom_start', 'bottom_center', 'bottom_end'],\n },\n ],\n },\n {\n type: 'column',\n label: 'Column',\n acceptsChildren: true,\n properties: [\n containerModifierDescriptor(),\n verticalArrangementDescriptor(),\n { name: 'horizontalAlignment', label: 'Horizontal Alignment', type: 'enum', enumValues: ['start', 'end', 'center_horizontally'] },\n { name: 'canScroll', label: 'Can Scroll', type: 'boolean' },\n ],\n },\n {\n type: 'row',\n label: 'Row',\n acceptsChildren: true,\n properties: [\n containerModifierDescriptor(),\n { name: 'verticalAlignment', label: 'Vertical Alignment', type: 'enum', enumValues: ['top', 'bottom', 'center_vertically'] },\n horizontalArrangementDescriptor(),\n { name: 'canScroll', label: 'Can Scroll', type: 'boolean' },\n ],\n },\n {\n type: 'lazy_column',\n label: 'Lazy Column',\n acceptsChildren: true,\n properties: [\n containerModifierDescriptor(),\n verticalArrangementDescriptor(),\n ],\n },\n]\n\n// === Public API ===\n\nexport function getComponents(): ComponentMeta[] {\n return JSON.parse(JSON.stringify(COMPONENT_DEFINITIONS))\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACEO,SAAS,aAAa,OAA+B,OAAkC;AAC5F,MAAI,CAAC,MAAO,QAAO;AACnB,MAAI,UAAU,QAAQ;AACpB,WAAO,MAAM,QAAQ,MAAM;AAAA,EAC7B;AACA,SAAO,MAAM,SAAS,MAAM;AAC9B;AAEO,SAAS,YAAY,MAAiD;AAC3E,MAAI,CAAC,QAAQ,CAAC,KAAK,KAAM,QAAO;AAChC,UAAQ,KAAK,MAAM;AAAA,IACjB,KAAK;AACH,aAAO,GAAG,KAAK,SAAS,CAAC;AAAA,IAC3B,KAAK;AACH,aAAO;AAAA,IACT,KAAK;AACH,aAAO;AAAA,IACT;AACE,aAAO;AAAA,EACX;AACF;AAEO,SAAS,e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AA,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;;;AXhOO,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","../src/device-presets.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'\nexport { getDevicePresets } from './device-presets'\nexport type { DevicePreset, DeviceCategory } from './device-presets'\n\nexport type {\n // Root models\n SduiScreen,\n SduiComponent,\n Theme,\n // Properties\n PropertiesModel,\n TextUiProperties,\n ImageUiProperties,\n BoxUiProperties,\n ColumnUiProperties,\n RowUiProperties,\n LazyColumnUiProperties,\n DefaultUiProperties,\n // Modifiers\n ModifierBase,\n TextUiModifier,\n ContainerUiModifier,\n ImageUiModifier,\n // Base models\n ColorModel,\n SizeModel,\n SpacingModel,\n ActionModel,\n BackgroundColorModel,\n HorizontalArrangementModel,\n VerticalArrangementModel,\n // Enums\n ComponentType,\n AlignmentType,\n FontWeightType,\n SizeUnitType,\n BackgroundColorType,\n ContentScaleType,\n TextAlignType,\n TextOverflowType,\n HorizontalAlignmentType,\n VerticalAlignmentType,\n HorizontalArrangementType,\n VerticalArrangementType,\n // Metadata\n ComponentMeta,\n PropertyDescriptor,\n PropertyType,\n} from './types'\n","import type { ColorModel, SizeModel, SpacingModel, Theme } from './types'\n\nexport function resolveColor(color: ColorModel | undefined, theme: Theme): string | undefined {\n if (!color) return undefined\n if (theme === 'dark') {\n return color.dark ?? color.light\n }\n return color.light ?? color.dark\n}\n\nexport function resolveSize(size: SizeModel | undefined): string | undefined {\n if (!size || !size.unit) return undefined\n switch (size.unit) {\n case 'dp':\n return `${size.value ?? 0}px`\n case 'match_parent':\n return '100%'\n case 'wrap_content':\n return 'fit-content'\n default:\n return undefined\n }\n}\n\nexport function resolveSpacing(spacing: SpacingModel | undefined): {\n top?: string\n bottom?: string\n left?: string\n right?: string\n} {\n if (!spacing) return {}\n return {\n top: spacing.top != null ? `${spacing.top}px` : undefined,\n bottom: spacing.bottom != null ? `${spacing.bottom}px` : undefined,\n left: spacing.start != null ? `${spacing.start}px` : undefined,\n right: spacing.end != null ? `${spacing.end}px` : undefined,\n }\n}\n","import type { BackgroundColorModel, ContainerUiModifier, ImageUiModifier, ModifierBase, TextUiModifier, Theme } from './types'\nimport { resolveColor, resolveSize, resolveSpacing } from './utils'\n\nexport function applyModifier(element: HTMLElement, modifier: ModifierBase | undefined, theme: Theme): void {\n if (!modifier) return\n\n const s = element.style\n\n // alignment → align-self (+ justify-self for 2-axis Box alignments)\n if (modifier.alignment) {\n switch (modifier.alignment) {\n // Single-axis (Column / Row children)\n case 'center':\n case 'center_horizontally':\n case 'center_vertically':\n s.alignSelf = 'center'\n break\n case 'start':\n case 'top':\n s.alignSelf = 'flex-start'\n break\n case 'end':\n case 'bottom':\n s.alignSelf = 'flex-end'\n break\n // Two-axis (Box children — grid layout)\n case 'top_start':\n s.alignSelf = 'start'; s.justifySelf = 'start'\n break\n case 'top_center':\n s.alignSelf = 'start'; s.justifySelf = 'center'\n break\n case 'top_end':\n s.alignSelf = 'start'; s.justifySelf = 'end'\n break\n case 'center_start':\n s.alignSelf = 'center'; s.justifySelf = 'start'\n break\n case 'center_end':\n s.alignSelf = 'center'; s.justifySelf = 'end'\n break\n case 'bottom_start':\n s.alignSelf = 'end'; s.justifySelf = 'start'\n break\n case 'bottom_center':\n s.alignSelf = 'end'; s.justifySelf = 'center'\n break\n case 'bottom_end':\n s.alignSelf = 'end'; s.justifySelf = 'end'\n break\n }\n }\n\n // weight → flex\n if (modifier.weight != null) {\n s.flex = `${modifier.weight}`\n s.minWidth = '0'\n s.minHeight = '0'\n }\n\n // action → click handler\n if (modifier.action) {\n const action = modifier.action\n s.cursor = 'pointer'\n element.addEventListener('click', (e) => {\n e.stopPropagation()\n element.dispatchEvent(new CustomEvent('sdui:action', {\n bubbles: true,\n detail: { type: action.type, params: action.params },\n }))\n })\n }\n\n // Extended modifier fields (width, height, padding, margin, backgroundColor, aspectRatio)\n const mod = modifier as ContainerUiModifier | ImageUiModifier | TextUiModifier\n\n const hasAspectRatio = 'aspectRatio' in mod && mod.aspectRatio != null\n const hasWidth = 'width' in mod && mod.width\n const hasHeight = 'height' in mod && (mod as ContainerUiModifier).height\n\n if (hasWidth) {\n const w = resolveSize(mod.width)\n if (w) s.width = w\n }\n\n if (hasHeight && !(hasAspectRatio && hasWidth)) {\n const h = resolveSize((mod as ContainerUiModifier).height)\n if (h) s.height = h\n }\n\n if (hasAspectRatio) {\n s.aspectRatio = `${(mod as ContainerUiModifier).aspectRatio}`\n }\n\n if ('padding' in mod && mod.padding) {\n const p = resolveSpacing((mod as ContainerUiModifier).padding)\n if (p.top) s.paddingTop = p.top\n if (p.bottom) s.paddingBottom = p.bottom\n if (p.left) s.paddingLeft = p.left\n if (p.right) s.paddingRight = p.right\n }\n\n if ('margin' in mod && mod.margin) {\n const m = resolveSpacing(mod.margin)\n if (m.top) s.marginTop = m.top\n if (m.bottom) s.marginBottom = m.bottom\n if (m.left) s.marginLeft = m.left\n if (m.right) s.marginRight = m.right\n }\n\n if ('backgroundColor' in mod && mod.backgroundColor) {\n applyBackground(s, (mod as ContainerUiModifier).backgroundColor!, theme)\n }\n}\n\nfunction applyBackground(s: CSSStyleDeclaration, bg: BackgroundColorModel, theme: Theme): void {\n if (!bg.colors || bg.colors.length === 0) return\n\n const colors = bg.colors.map((c) => resolveColor(c, theme)).filter(Boolean) as string[]\n if (colors.length === 0) return\n\n switch (bg.type) {\n case 'single':\n s.backgroundColor = colors[0]\n break\n case 'vertical_gradient':\n s.background = `linear-gradient(to bottom, ${colors.join(', ')})`\n break\n case 'horizontal_gradient':\n s.background = `linear-gradient(to right, ${colors.join(', ')})`\n break\n case 'linear_gradient':\n s.background = `linear-gradient(${colors.join(', ')})`\n break\n default:\n if (colors.length === 1) {\n s.backgroundColor = colors[0]\n }\n break\n }\n}\n","import type { SduiComponent, TextUiProperties, Theme } from '../types'\nimport { resolveColor } from '../utils'\nimport { applyModifier } from '../modifiers'\n\nexport function renderText(component: SduiComponent, theme: Theme): HTMLElement {\n const props = component.properties as TextUiProperties | undefined\n const el = document.createElement('span')\n\n el.textContent = props?.text ?? ''\n\n if (props?.fontSize != null) {\n el.style.fontSize = `${props.fontSize}px`\n }\n\n if (props?.color) {\n const c = resolveColor(props.color, theme)\n if (c) el.style.color = c\n }\n\n if (props?.fontWeight) {\n switch (props.fontWeight) {\n case 'bold':\n el.style.fontWeight = '700'\n break\n case 'semi_bold':\n el.style.fontWeight = '600'\n break\n case 'medium':\n el.style.fontWeight = '500'\n break\n case 'normal':\n el.style.fontWeight = '400'\n break\n }\n }\n\n if (props?.textAlign) {\n el.style.display = 'block'\n switch (props.textAlign) {\n case 'left':\n case 'start':\n el.style.textAlign = 'left'\n break\n case 'right':\n case 'end':\n el.style.textAlign = 'right'\n break\n case 'center':\n el.style.textAlign = 'center'\n break\n case 'justify':\n el.style.textAlign = 'justify'\n break\n }\n }\n\n if (props?.overflow === 'ellipsis') {\n el.style.textOverflow = 'ellipsis'\n el.style.overflow = 'hidden'\n el.style.whiteSpace = 'nowrap'\n }\n\n if (props?.maxLines != null) {\n el.style.display = '-webkit-box'\n el.style.webkitLineClamp = `${props.maxLines}`\n ;(el.style as unknown as Record<string, string>)['-webkit-box-orient'] = 'vertical'\n el.style.overflow = 'hidden'\n }\n\n if (props?.minLines != null) {\n el.style.minHeight = `${props.minLines * (props.fontSize ?? 16) * 1.4}px`\n }\n\n applyModifier(el, props?.modifier, theme)\n\n return el\n}\n","import type { SduiComponent, ImageUiProperties, Theme } from '../types'\nimport { resolveColor } from '../utils'\nimport { applyModifier } from '../modifiers'\n\nexport function renderImage(component: SduiComponent, theme: Theme): HTMLElement {\n const props = component.properties as ImageUiProperties | undefined\n const el = document.createElement('img') as HTMLImageElement\n\n if (props?.image) {\n el.src = props.image\n }\n\n if (props?.contentDescription) {\n el.alt = props.contentDescription\n }\n\n if (props?.scaleType) {\n switch (props.scaleType) {\n case 'fit':\n case 'inside':\n el.style.objectFit = 'contain'\n break\n case 'crop':\n el.style.objectFit = 'cover'\n break\n case 'fill_bounds':\n el.style.objectFit = 'fill'\n break\n case 'fill_width':\n el.style.objectFit = 'cover'\n el.style.width = '100%'\n break\n case 'fill_height':\n el.style.objectFit = 'cover'\n el.style.height = '100%'\n break\n case 'none':\n el.style.objectFit = 'none'\n break\n }\n }\n\n if (props?.tintColor) {\n const c = resolveColor(props.tintColor, theme)\n if (c) {\n el.style.filter = `opacity(0.5) drop-shadow(0 0 0 ${c})`\n }\n }\n\n applyModifier(el, props?.modifier, theme)\n\n return el\n}\n","import type { SduiComponent, BoxUiProperties, Theme } from '../types'\nimport { applyModifier } from '../modifiers'\n\nexport function renderBox(component: SduiComponent, theme: Theme): HTMLElement {\n const props = component.properties as BoxUiProperties | undefined\n const el = document.createElement('div')\n\n el.style.display = 'grid'\n el.style.position = 'relative'\n\n // All children share the same grid cell (like Compose FrameLayout)\n // Default alignment for all children\n if (props?.alignment) {\n switch (props.alignment) {\n case 'top_start':\n el.style.justifyItems = 'start'\n el.style.alignItems = 'start'\n break\n case 'top_center':\n el.style.justifyItems = 'center'\n el.style.alignItems = 'start'\n break\n case 'top_end':\n el.style.justifyItems = 'end'\n el.style.alignItems = 'start'\n break\n case 'center_start':\n el.style.justifyItems = 'start'\n el.style.alignItems = 'center'\n break\n case 'center':\n el.style.justifyItems = 'center'\n el.style.alignItems = 'center'\n break\n case 'center_end':\n el.style.justifyItems = 'end'\n el.style.alignItems = 'center'\n break\n case 'bottom_start':\n el.style.justifyItems = 'start'\n el.style.alignItems = 'end'\n break\n case 'bottom_center':\n el.style.justifyItems = 'center'\n el.style.alignItems = 'end'\n break\n case 'bottom_end':\n el.style.justifyItems = 'end'\n el.style.alignItems = 'end'\n break\n }\n }\n\n applyModifier(el, props?.modifier, theme)\n\n return el\n}\n","import type { SduiComponent, ColumnUiProperties, Theme } from '../types'\nimport { applyModifier } from '../modifiers'\n\nexport function renderColumn(component: SduiComponent, theme: Theme): HTMLElement {\n const props = component.properties as ColumnUiProperties | undefined\n const el = document.createElement('div')\n\n el.style.display = 'flex'\n el.style.flexDirection = 'column'\n\n if (props?.verticalArrangement) {\n const arr = props.verticalArrangement\n switch (arr.type) {\n case 'top':\n el.style.justifyContent = 'flex-start'\n break\n case 'center':\n el.style.justifyContent = 'center'\n break\n case 'bottom':\n el.style.justifyContent = 'flex-end'\n break\n case 'space_between':\n el.style.justifyContent = 'space-between'\n break\n case 'space_evenly':\n el.style.justifyContent = 'space-evenly'\n break\n case 'space_around':\n el.style.justifyContent = 'space-around'\n break\n case 'spaced_by':\n el.style.justifyContent = 'flex-start'\n if (arr.spacing != null) {\n el.style.gap = `${arr.spacing}px`\n }\n break\n }\n }\n\n if (props?.horizontalAlignment) {\n switch (props.horizontalAlignment) {\n case 'start':\n el.style.alignItems = 'flex-start'\n break\n case 'end':\n el.style.alignItems = 'flex-end'\n break\n case 'center_horizontally':\n el.style.alignItems = 'center'\n break\n }\n }\n\n if (props?.canScroll) {\n el.style.overflowY = 'auto'\n }\n\n applyModifier(el, props?.modifier, theme)\n\n return el\n}\n","import type { SduiComponent, RowUiProperties, Theme } from '../types'\nimport { applyModifier } from '../modifiers'\n\nexport function renderRow(component: SduiComponent, theme: Theme): HTMLElement {\n const props = component.properties as RowUiProperties | undefined\n const el = document.createElement('div')\n\n el.style.display = 'flex'\n el.style.flexDirection = 'row'\n\n if (props?.horizontalArrangement) {\n const arr = props.horizontalArrangement\n switch (arr.type) {\n case 'start':\n el.style.justifyContent = 'flex-start'\n break\n case 'center':\n el.style.justifyContent = 'center'\n break\n case 'end':\n el.style.justifyContent = 'flex-end'\n break\n case 'space_between':\n el.style.justifyContent = 'space-between'\n break\n case 'space_evenly':\n el.style.justifyContent = 'space-evenly'\n break\n case 'space_around':\n el.style.justifyContent = 'space-around'\n break\n case 'spaced_by':\n el.style.justifyContent = 'flex-start'\n if (arr.spacing != null) {\n el.style.gap = `${arr.spacing}px`\n }\n break\n }\n }\n\n if (props?.verticalAlignment) {\n switch (props.verticalAlignment) {\n case 'top':\n el.style.alignItems = 'flex-start'\n break\n case 'bottom':\n el.style.alignItems = 'flex-end'\n break\n case 'center_vertically':\n el.style.alignItems = 'center'\n break\n }\n }\n\n if (props?.canScroll) {\n el.style.overflowX = 'auto'\n }\n\n applyModifier(el, props?.modifier, theme)\n\n return el\n}\n","import type { SduiComponent, LazyColumnUiProperties, Theme } from '../types'\nimport { applyModifier } from '../modifiers'\n\nexport function renderLazyColumn(component: SduiComponent, theme: Theme): HTMLElement {\n const props = component.properties as LazyColumnUiProperties | undefined\n const el = document.createElement('div')\n\n el.style.display = 'flex'\n el.style.flexDirection = 'column'\n el.style.overflowY = 'auto'\n\n if (props?.verticalArrangement) {\n const arr = props.verticalArrangement\n switch (arr.type) {\n case 'top':\n el.style.justifyContent = 'flex-start'\n break\n case 'center':\n el.style.justifyContent = 'center'\n break\n case 'bottom':\n el.style.justifyContent = 'flex-end'\n break\n case 'space_between':\n el.style.justifyContent = 'space-between'\n break\n case 'space_evenly':\n el.style.justifyContent = 'space-evenly'\n break\n case 'space_around':\n el.style.justifyContent = 'space-around'\n break\n case 'spaced_by':\n el.style.justifyContent = 'flex-start'\n if (arr.spacing != null) {\n el.style.gap = `${arr.spacing}px`\n }\n break\n }\n }\n\n applyModifier(el, props?.modifier, theme)\n\n return el\n}\n","import type { SduiComponent, Theme } from '../types'\nimport { renderText } from './text'\nimport { renderImage } from './image'\nimport { renderBox } from './box'\nimport { renderColumn } from './column'\nimport { renderRow } from './row'\nimport { renderLazyColumn } from './lazy-column'\n\nexport type ComponentRenderer = (component: SduiComponent, theme: Theme) => HTMLElement\n\nconst renderers: Record<string, ComponentRenderer> = {\n text: renderText,\n image: renderImage,\n box: renderBox,\n column: renderColumn,\n row: renderRow,\n lazy_column: renderLazyColumn,\n}\n\nexport function getRenderer(type: string): ComponentRenderer | undefined {\n return renderers[type]\n}\n","import type { SduiComponent, Theme } from './types'\nimport { getRenderer } from './components'\n\nexport function renderComponent(component: SduiComponent, theme: Theme): HTMLElement {\n const renderer = getRenderer(component.type)\n\n if (!renderer) {\n console.warn(`[sdui] Unknown component type: \"${component.type}\"`)\n const el = document.createElement('div')\n el.dataset.sduiUnknown = component.type\n return el\n }\n\n const el = renderer(component, theme)\n el.dataset.sduiType = component.type\n\n if (component.children && component.children.length > 0) {\n for (const child of component.children) {\n el.appendChild(renderComponent(child, theme))\n }\n }\n\n return el\n}\n","import type { ComponentMeta, PropertyDescriptor } from './types'\n\n// === Reusable sub-object property builders ===\n\nfunction sizeModelProperties(): PropertyDescriptor[] {\n return [\n { name: 'value', label: 'Value', type: 'number' },\n { name: 'unit', label: 'Unit', type: 'enum', enumValues: ['dp', 'match_parent', 'wrap_content'] },\n ]\n}\n\nfunction spacingModelProperties(): PropertyDescriptor[] {\n return [\n { name: 'top', label: 'Top', type: 'number' },\n { name: 'bottom', label: 'Bottom', type: 'number' },\n { name: 'start', label: 'Start', type: 'number' },\n { name: 'end', label: 'End', type: 'number' },\n ]\n}\n\nfunction colorModelProperties(): PropertyDescriptor[] {\n return [\n { name: 'light', label: 'Light', type: 'color' },\n { name: 'dark', label: 'Dark', type: 'color' },\n ]\n}\n\nfunction actionModelProperties(): PropertyDescriptor[] {\n return [\n { name: 'type', label: 'Action Type', type: 'string' },\n { name: 'params', label: 'Parameters', type: 'object' },\n ]\n}\n\nfunction backgroundColorModelProperties(): PropertyDescriptor[] {\n return [\n {\n name: 'colors',\n label: 'Colors',\n type: 'object',\n isArray: true,\n properties: colorModelProperties(),\n },\n {\n name: 'type',\n label: 'Background Type',\n type: 'enum',\n enumValues: ['single', 'vertical_gradient', 'horizontal_gradient', 'linear_gradient'],\n },\n ]\n}\n\n// === Modifier builders ===\n\nfunction modifierBaseProperties(): PropertyDescriptor[] {\n return [\n {\n name: 'alignment',\n label: 'Alignment',\n type: 'enum',\n enumValues: ['start', 'end', 'center', 'center_horizontally', 'center_vertically', 'top', 'bottom', 'top_start', 'top_center', 'top_end', 'center_start', 'center_end', 'bottom_start', 'bottom_center', 'bottom_end'],\n },\n { name: 'weight', label: 'Weight', type: 'number' },\n { name: 'action', label: 'Action', type: 'object', properties: actionModelProperties() },\n ]\n}\n\nfunction textModifierDescriptor(): PropertyDescriptor {\n return {\n name: 'modifier',\n label: 'Modifier',\n type: 'object',\n properties: [\n ...modifierBaseProperties(),\n { name: 'width', label: 'Width', type: 'object', properties: sizeModelProperties() },\n { name: 'margin', label: 'Margin', type: 'object', properties: spacingModelProperties() },\n ],\n }\n}\n\nfunction imageModifierDescriptor(): PropertyDescriptor {\n return {\n name: 'modifier',\n label: 'Modifier',\n type: 'object',\n properties: [\n ...modifierBaseProperties(),\n { name: 'width', label: 'Width', type: 'object', properties: sizeModelProperties() },\n { name: 'height', label: 'Height', type: 'object', properties: sizeModelProperties() },\n { name: 'padding', label: 'Padding', type: 'object', properties: spacingModelProperties() },\n { name: 'margin', label: 'Margin', type: 'object', properties: spacingModelProperties() },\n { name: 'aspectRatio', label: 'Aspect Ratio', type: 'number' },\n ],\n }\n}\n\nfunction containerModifierDescriptor(): PropertyDescriptor {\n return {\n name: 'modifier',\n label: 'Modifier',\n type: 'object',\n properties: [\n ...modifierBaseProperties(),\n { name: 'backgroundColor', label: 'Background Color', type: 'object', properties: backgroundColorModelProperties() },\n { name: 'width', label: 'Width', type: 'object', properties: sizeModelProperties() },\n { name: 'height', label: 'Height', type: 'object', properties: sizeModelProperties() },\n { name: 'padding', label: 'Padding', type: 'object', properties: spacingModelProperties() },\n { name: 'margin', label: 'Margin', type: 'object', properties: spacingModelProperties() },\n { name: 'aspectRatio', label: 'Aspect Ratio', type: 'number' },\n ],\n }\n}\n\n// === Arrangement descriptors ===\n\nfunction verticalArrangementDescriptor(): PropertyDescriptor {\n return {\n name: 'verticalArrangement',\n label: 'Vertical Arrangement',\n type: 'object',\n properties: [\n {\n name: 'type',\n label: 'Type',\n type: 'enum',\n enumValues: ['top', 'center', 'bottom', 'space_evenly', 'space_between', 'space_around', 'spaced_by'],\n },\n { name: 'spacing', label: 'Spacing', type: 'number' },\n ],\n }\n}\n\nfunction horizontalArrangementDescriptor(): PropertyDescriptor {\n return {\n name: 'horizontalArrangement',\n label: 'Horizontal Arrangement',\n type: 'object',\n properties: [\n {\n name: 'type',\n label: 'Type',\n type: 'enum',\n enumValues: ['start', 'center', 'end', 'space_between', 'space_evenly', 'space_around', 'spaced_by'],\n },\n { name: 'spacing', label: 'Spacing', type: 'number' },\n ],\n }\n}\n\n// === Component definitions ===\n\nconst COMPONENT_DEFINITIONS: ComponentMeta[] = [\n {\n type: 'text',\n label: 'Text',\n acceptsChildren: false,\n properties: [\n { name: 'text', label: 'Text', type: 'string', required: true, defaultValue: 'Text' },\n { name: 'fontSize', label: 'Font Size', type: 'number' },\n { name: 'color', label: 'Color', type: 'object', properties: colorModelProperties() },\n { name: 'fontWeight', label: 'Font Weight', type: 'enum', enumValues: ['bold', 'medium', 'normal', 'semi_bold'] },\n { name: 'textAlign', label: 'Text Align', type: 'enum', enumValues: ['left', 'right', 'center', 'justify', 'start', 'end', 'unspecified'] },\n { name: 'overflow', label: 'Overflow', type: 'enum', enumValues: ['none', 'ellipsis'] },\n { name: 'maxLines', label: 'Max Lines', type: 'number' },\n { name: 'minLines', label: 'Min Lines', type: 'number', defaultValue: 1 },\n textModifierDescriptor(),\n ],\n },\n {\n type: 'image',\n label: 'Image',\n acceptsChildren: false,\n properties: [\n imageModifierDescriptor(),\n { name: 'image', label: 'Image URL', type: 'string', required: true },\n { name: 'scaleType', label: 'Scale Type', type: 'enum', enumValues: ['fit', 'crop', 'fill_height', 'fill_width', 'fill_bounds', 'inside', 'none'] },\n { name: 'contentDescription', label: 'Content Description', type: 'string' },\n { name: 'tintColor', label: 'Tint Color', type: 'object', properties: colorModelProperties() },\n ],\n },\n {\n type: 'box',\n label: 'Box',\n acceptsChildren: true,\n properties: [\n containerModifierDescriptor(),\n {\n name: 'alignment',\n label: 'Alignment',\n type: 'enum',\n enumValues: ['top_start', 'top_center', 'top_end', 'center_start', 'center', 'center_end', 'bottom_start', 'bottom_center', 'bottom_end'],\n },\n ],\n },\n {\n type: 'column',\n label: 'Column',\n acceptsChildren: true,\n properties: [\n containerModifierDescriptor(),\n verticalArrangementDescriptor(),\n { name: 'horizontalAlignment', label: 'Horizontal Alignment', type: 'enum', enumValues: ['start', 'end', 'center_horizontally'] },\n { name: 'canScroll', label: 'Can Scroll', type: 'boolean' },\n ],\n },\n {\n type: 'row',\n label: 'Row',\n acceptsChildren: true,\n properties: [\n containerModifierDescriptor(),\n { name: 'verticalAlignment', label: 'Vertical Alignment', type: 'enum', enumValues: ['top', 'bottom', 'center_vertically'] },\n horizontalArrangementDescriptor(),\n { name: 'canScroll', label: 'Can Scroll', type: 'boolean' },\n ],\n },\n {\n type: 'lazy_column',\n label: 'Lazy Column',\n acceptsChildren: true,\n properties: [\n containerModifierDescriptor(),\n verticalArrangementDescriptor(),\n ],\n },\n]\n\n// === Public API ===\n\nexport function getComponents(): ComponentMeta[] {\n return JSON.parse(JSON.stringify(COMPONENT_DEFINITIONS))\n}\n","export interface DevicePreset {\n name: string\n width: number\n height: number\n foldedWidth?: number\n foldedHeight?: number\n}\n\nexport type DeviceCategory = 'phone' | 'tablet'\n\nconst DEVICE_PRESETS: Record<DeviceCategory, Record<string, DevicePreset[]>> = {\n phone: {\n 'Google': [\n { name: 'Pixel 10', width: 412, height: 915 },\n { name: 'Pixel 10 Pro', width: 412, height: 915 },\n { name: 'Pixel 10 Pro XL', width: 448, height: 998 },\n { name: 'Pixel 10 Fold', width: 600, height: 748, foldedWidth: 360, foldedHeight: 748 },\n ],\n 'Samsung': [\n { name: 'Galaxy S26', width: 360, height: 780 },\n { name: 'Galaxy S26 Ultra', width: 412, height: 915 },\n { name: 'Galaxy Z Fold 7', width: 588, height: 748, foldedWidth: 360, foldedHeight: 748 },\n ],\n 'iOS': [\n { name: 'iPhone 17 Pro Max', width: 440, height: 956 },\n { name: 'iPhone 17 Pro', width: 402, height: 874 },\n { name: 'iPhone 17e', width: 375, height: 812 },\n { name: 'iPhone 17', width: 393, height: 852 },\n { name: 'iPhone Air', width: 402, height: 874 },\n ],\n },\n tablet: {\n 'Google': [\n { name: 'Pixel Tablet 2', width: 800, height: 1280 },\n ],\n 'Samsung': [\n { name: 'Galaxy Tab S11', width: 753, height: 1205 },\n { name: 'Galaxy Tab S11+', width: 834, height: 1334 },\n { name: 'Galaxy Tab S11 Ultra', width: 930, height: 1488 },\n ],\n 'iOS': [\n { name: 'iPad Pro 13\"', width: 1024, height: 1366 },\n { name: 'iPad Pro 11\"', width: 834, height: 1194 },\n { name: 'iPad Air', width: 820, height: 1180 },\n { name: 'iPad mini', width: 744, height: 1133 },\n ],\n },\n}\n\nexport function getDevicePresets(): Record<DeviceCategory, Record<string, DevicePreset[]>> {\n return JSON.parse(JSON.stringify(DEVICE_PRESETS))\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;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,GAA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;AACtB,YAAU,YAAY,IAAI;AAC5B;","names":["el"]}
|
package/dist/index.d.cts
CHANGED
|
@@ -136,9 +136,19 @@ interface ComponentMeta {
|
|
|
136
136
|
|
|
137
137
|
declare function getComponents(): ComponentMeta[];
|
|
138
138
|
|
|
139
|
+
interface DevicePreset {
|
|
140
|
+
name: string;
|
|
141
|
+
width: number;
|
|
142
|
+
height: number;
|
|
143
|
+
foldedWidth?: number;
|
|
144
|
+
foldedHeight?: number;
|
|
145
|
+
}
|
|
146
|
+
type DeviceCategory = 'phone' | 'tablet';
|
|
147
|
+
declare function getDevicePresets(): Record<DeviceCategory, Record<string, DevicePreset[]>>;
|
|
148
|
+
|
|
139
149
|
interface RenderOptions {
|
|
140
150
|
theme?: Theme;
|
|
141
151
|
}
|
|
142
152
|
declare function render(json: string, container: HTMLElement, options?: RenderOptions): void;
|
|
143
153
|
|
|
144
|
-
export { type ActionModel, 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 };
|
|
154
|
+
export { type ActionModel, type AlignmentType, type BackgroundColorModel, type BackgroundColorType, type BoxUiProperties, type ColorModel, type ColumnUiProperties, type ComponentMeta, type ComponentType, type ContainerUiModifier, type ContentScaleType, type DefaultUiProperties, type DeviceCategory, type DevicePreset, 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, getDevicePresets, render };
|
package/dist/index.d.ts
CHANGED
|
@@ -136,9 +136,19 @@ interface ComponentMeta {
|
|
|
136
136
|
|
|
137
137
|
declare function getComponents(): ComponentMeta[];
|
|
138
138
|
|
|
139
|
+
interface DevicePreset {
|
|
140
|
+
name: string;
|
|
141
|
+
width: number;
|
|
142
|
+
height: number;
|
|
143
|
+
foldedWidth?: number;
|
|
144
|
+
foldedHeight?: number;
|
|
145
|
+
}
|
|
146
|
+
type DeviceCategory = 'phone' | 'tablet';
|
|
147
|
+
declare function getDevicePresets(): Record<DeviceCategory, Record<string, DevicePreset[]>>;
|
|
148
|
+
|
|
139
149
|
interface RenderOptions {
|
|
140
150
|
theme?: Theme;
|
|
141
151
|
}
|
|
142
152
|
declare function render(json: string, container: HTMLElement, options?: RenderOptions): void;
|
|
143
153
|
|
|
144
|
-
export { type ActionModel, 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 };
|
|
154
|
+
export { type ActionModel, type AlignmentType, type BackgroundColorModel, type BackgroundColorType, type BoxUiProperties, type ColorModel, type ColumnUiProperties, type ComponentMeta, type ComponentType, type ContainerUiModifier, type ContentScaleType, type DefaultUiProperties, type DeviceCategory, type DevicePreset, 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, getDevicePresets, render };
|
package/dist/index.js
CHANGED
|
@@ -710,6 +710,49 @@ function getComponents() {
|
|
|
710
710
|
return JSON.parse(JSON.stringify(COMPONENT_DEFINITIONS));
|
|
711
711
|
}
|
|
712
712
|
|
|
713
|
+
// src/device-presets.ts
|
|
714
|
+
var DEVICE_PRESETS = {
|
|
715
|
+
phone: {
|
|
716
|
+
"Google": [
|
|
717
|
+
{ name: "Pixel 10", width: 412, height: 915 },
|
|
718
|
+
{ name: "Pixel 10 Pro", width: 412, height: 915 },
|
|
719
|
+
{ name: "Pixel 10 Pro XL", width: 448, height: 998 },
|
|
720
|
+
{ name: "Pixel 10 Fold", width: 600, height: 748, foldedWidth: 360, foldedHeight: 748 }
|
|
721
|
+
],
|
|
722
|
+
"Samsung": [
|
|
723
|
+
{ name: "Galaxy S26", width: 360, height: 780 },
|
|
724
|
+
{ name: "Galaxy S26 Ultra", width: 412, height: 915 },
|
|
725
|
+
{ name: "Galaxy Z Fold 7", width: 588, height: 748, foldedWidth: 360, foldedHeight: 748 }
|
|
726
|
+
],
|
|
727
|
+
"iOS": [
|
|
728
|
+
{ name: "iPhone 17 Pro Max", width: 440, height: 956 },
|
|
729
|
+
{ name: "iPhone 17 Pro", width: 402, height: 874 },
|
|
730
|
+
{ name: "iPhone 17e", width: 375, height: 812 },
|
|
731
|
+
{ name: "iPhone 17", width: 393, height: 852 },
|
|
732
|
+
{ name: "iPhone Air", width: 402, height: 874 }
|
|
733
|
+
]
|
|
734
|
+
},
|
|
735
|
+
tablet: {
|
|
736
|
+
"Google": [
|
|
737
|
+
{ name: "Pixel Tablet 2", width: 800, height: 1280 }
|
|
738
|
+
],
|
|
739
|
+
"Samsung": [
|
|
740
|
+
{ name: "Galaxy Tab S11", width: 753, height: 1205 },
|
|
741
|
+
{ name: "Galaxy Tab S11+", width: 834, height: 1334 },
|
|
742
|
+
{ name: "Galaxy Tab S11 Ultra", width: 930, height: 1488 }
|
|
743
|
+
],
|
|
744
|
+
"iOS": [
|
|
745
|
+
{ name: 'iPad Pro 13"', width: 1024, height: 1366 },
|
|
746
|
+
{ name: 'iPad Pro 11"', width: 834, height: 1194 },
|
|
747
|
+
{ name: "iPad Air", width: 820, height: 1180 },
|
|
748
|
+
{ name: "iPad mini", width: 744, height: 1133 }
|
|
749
|
+
]
|
|
750
|
+
}
|
|
751
|
+
};
|
|
752
|
+
function getDevicePresets() {
|
|
753
|
+
return JSON.parse(JSON.stringify(DEVICE_PRESETS));
|
|
754
|
+
}
|
|
755
|
+
|
|
713
756
|
// src/index.ts
|
|
714
757
|
function render(json, container, options) {
|
|
715
758
|
const screen = JSON.parse(json);
|
|
@@ -720,6 +763,7 @@ function render(json, container, options) {
|
|
|
720
763
|
}
|
|
721
764
|
export {
|
|
722
765
|
getComponents,
|
|
766
|
+
getDevicePresets,
|
|
723
767
|
render
|
|
724
768
|
};
|
|
725
769
|
//# sourceMappingURL=index.js.map
|
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 (+ justify-self for 2-axis Box alignments)\n if (modifier.alignment) {\n switch (modifier.alignment) {\n // Single-axis (Column / Row children)\n case 'center':\n case 'center_horizontally':\n case 'center_vertically':\n s.alignSelf = 'center'\n break\n case 'start':\n case 'top':\n s.alignSelf = 'flex-start'\n break\n case 'end':\n case 'bottom':\n s.alignSelf = 'flex-end'\n break\n // Two-axis (Box children — grid layout)\n case 'top_start':\n s.alignSelf = 'start'; s.justifySelf = 'start'\n break\n case 'top_center':\n s.alignSelf = 'start'; s.justifySelf = 'center'\n break\n case 'top_end':\n s.alignSelf = 'start'; s.justifySelf = 'end'\n break\n case 'center_start':\n s.alignSelf = 'center'; s.justifySelf = 'start'\n break\n case 'center_end':\n s.alignSelf = 'center'; s.justifySelf = 'end'\n break\n case 'bottom_start':\n s.alignSelf = 'end'; s.justifySelf = 'start'\n break\n case 'bottom_center':\n s.alignSelf = 'end'; s.justifySelf = 'center'\n break\n case 'bottom_end':\n s.alignSelf = 'end'; s.justifySelf = 'end'\n break\n }\n }\n\n // weight → flex\n if (modifier.weight != null) {\n s.flex = `${modifier.weight}`\n s.minWidth = '0'\n s.minHeight = '0'\n }\n\n // action → click handler\n if (modifier.action) {\n const action = modifier.action\n s.cursor = 'pointer'\n element.addEventListener('click', (e) => {\n e.stopPropagation()\n element.dispatchEvent(new CustomEvent('sdui:action', {\n bubbles: true,\n detail: { type: action.type, params: action.params },\n }))\n })\n }\n\n // Extended modifier fields (width, height, padding, margin, backgroundColor, aspectRatio)\n const mod = modifier as ContainerUiModifier | ImageUiModifier | TextUiModifier\n\n const hasAspectRatio = 'aspectRatio' in mod && mod.aspectRatio != null\n const hasWidth = 'width' in mod && mod.width\n const hasHeight = 'height' in mod && (mod as ContainerUiModifier).height\n\n if (hasWidth) {\n const w = resolveSize(mod.width)\n if (w) s.width = w\n }\n\n if (hasHeight && !(hasAspectRatio && hasWidth)) {\n const h = resolveSize((mod as ContainerUiModifier).height)\n if (h) s.height = h\n }\n\n if (hasAspectRatio) {\n s.aspectRatio = `${(mod as ContainerUiModifier).aspectRatio}`\n }\n\n if ('padding' in mod && mod.padding) {\n const p = resolveSpacing((mod as ContainerUiModifier).padding)\n if (p.top) s.paddingTop = p.top\n if (p.bottom) s.paddingBottom = p.bottom\n if (p.left) s.paddingLeft = p.left\n if (p.right) s.paddingRight = p.right\n }\n\n if ('margin' in mod && mod.margin) {\n const m = resolveSpacing(mod.margin)\n if (m.top) s.marginTop = m.top\n if (m.bottom) s.marginBottom = m.bottom\n if (m.left) s.marginLeft = m.left\n if (m.right) s.marginRight = m.right\n }\n\n if ('backgroundColor' in mod && mod.backgroundColor) {\n applyBackground(s, (mod as ContainerUiModifier).backgroundColor!, theme)\n }\n}\n\nfunction applyBackground(s: CSSStyleDeclaration, bg: BackgroundColorModel, theme: Theme): void {\n if (!bg.colors || bg.colors.length === 0) return\n\n const colors = bg.colors.map((c) => resolveColor(c, theme)).filter(Boolean) as string[]\n if (colors.length === 0) return\n\n switch (bg.type) {\n case 'single':\n s.backgroundColor = colors[0]\n break\n case 'vertical_gradient':\n s.background = `linear-gradient(to bottom, ${colors.join(', ')})`\n break\n case 'horizontal_gradient':\n s.background = `linear-gradient(to right, ${colors.join(', ')})`\n break\n case 'linear_gradient':\n s.background = `linear-gradient(${colors.join(', ')})`\n break\n default:\n if (colors.length === 1) {\n s.backgroundColor = colors[0]\n }\n break\n }\n}\n","import type { SduiComponent, TextUiProperties, Theme } from '../types'\nimport { resolveColor } from '../utils'\nimport { applyModifier } from '../modifiers'\n\nexport function renderText(component: SduiComponent, theme: Theme): HTMLElement {\n const props = component.properties as TextUiProperties | undefined\n const el = document.createElement('span')\n\n el.textContent = props?.text ?? ''\n\n if (props?.fontSize != null) {\n el.style.fontSize = `${props.fontSize}px`\n }\n\n if (props?.color) {\n const c = resolveColor(props.color, theme)\n if (c) el.style.color = c\n }\n\n if (props?.fontWeight) {\n switch (props.fontWeight) {\n case 'bold':\n el.style.fontWeight = '700'\n break\n case 'semi_bold':\n el.style.fontWeight = '600'\n break\n case 'medium':\n el.style.fontWeight = '500'\n break\n case 'normal':\n el.style.fontWeight = '400'\n break\n }\n }\n\n if (props?.textAlign) {\n el.style.display = 'block'\n switch (props.textAlign) {\n case 'left':\n case 'start':\n el.style.textAlign = 'left'\n break\n case 'right':\n case 'end':\n el.style.textAlign = 'right'\n break\n case 'center':\n el.style.textAlign = 'center'\n break\n case 'justify':\n el.style.textAlign = 'justify'\n break\n }\n }\n\n if (props?.overflow === 'ellipsis') {\n el.style.textOverflow = 'ellipsis'\n el.style.overflow = 'hidden'\n el.style.whiteSpace = 'nowrap'\n }\n\n if (props?.maxLines != null) {\n el.style.display = '-webkit-box'\n el.style.webkitLineClamp = `${props.maxLines}`\n ;(el.style as unknown as Record<string, string>)['-webkit-box-orient'] = 'vertical'\n el.style.overflow = 'hidden'\n }\n\n if (props?.minLines != null) {\n el.style.minHeight = `${props.minLines * (props.fontSize ?? 16) * 1.4}px`\n }\n\n applyModifier(el, props?.modifier, theme)\n\n return el\n}\n","import type { SduiComponent, ImageUiProperties, Theme } from '../types'\nimport { resolveColor } from '../utils'\nimport { applyModifier } from '../modifiers'\n\nexport function renderImage(component: SduiComponent, theme: Theme): HTMLElement {\n const props = component.properties as ImageUiProperties | undefined\n const el = document.createElement('img') as HTMLImageElement\n\n if (props?.image) {\n el.src = props.image\n }\n\n if (props?.contentDescription) {\n el.alt = props.contentDescription\n }\n\n if (props?.scaleType) {\n switch (props.scaleType) {\n case 'fit':\n case 'inside':\n el.style.objectFit = 'contain'\n break\n case 'crop':\n el.style.objectFit = 'cover'\n break\n case 'fill_bounds':\n el.style.objectFit = 'fill'\n break\n case 'fill_width':\n el.style.objectFit = 'cover'\n el.style.width = '100%'\n break\n case 'fill_height':\n el.style.objectFit = 'cover'\n el.style.height = '100%'\n break\n case 'none':\n el.style.objectFit = 'none'\n break\n }\n }\n\n if (props?.tintColor) {\n const c = resolveColor(props.tintColor, theme)\n if (c) {\n el.style.filter = `opacity(0.5) drop-shadow(0 0 0 ${c})`\n }\n }\n\n applyModifier(el, props?.modifier, theme)\n\n return el\n}\n","import type { SduiComponent, BoxUiProperties, Theme } from '../types'\nimport { applyModifier } from '../modifiers'\n\nexport function renderBox(component: SduiComponent, theme: Theme): HTMLElement {\n const props = component.properties as BoxUiProperties | undefined\n const el = document.createElement('div')\n\n el.style.display = 'grid'\n el.style.position = 'relative'\n\n // All children share the same grid cell (like Compose FrameLayout)\n // Default alignment for all children\n if (props?.alignment) {\n switch (props.alignment) {\n case 'top_start':\n el.style.justifyItems = 'start'\n el.style.alignItems = 'start'\n break\n case 'top_center':\n el.style.justifyItems = 'center'\n el.style.alignItems = 'start'\n break\n case 'top_end':\n el.style.justifyItems = 'end'\n el.style.alignItems = 'start'\n break\n case 'center_start':\n el.style.justifyItems = 'start'\n el.style.alignItems = 'center'\n break\n case 'center':\n el.style.justifyItems = 'center'\n el.style.alignItems = 'center'\n break\n case 'center_end':\n el.style.justifyItems = 'end'\n el.style.alignItems = 'center'\n break\n case 'bottom_start':\n el.style.justifyItems = 'start'\n el.style.alignItems = 'end'\n break\n case 'bottom_center':\n el.style.justifyItems = 'center'\n el.style.alignItems = 'end'\n break\n case 'bottom_end':\n el.style.justifyItems = 'end'\n el.style.alignItems = 'end'\n break\n }\n }\n\n applyModifier(el, props?.modifier, theme)\n\n return el\n}\n","import type { SduiComponent, ColumnUiProperties, Theme } from '../types'\nimport { applyModifier } from '../modifiers'\n\nexport function renderColumn(component: SduiComponent, theme: Theme): HTMLElement {\n const props = component.properties as ColumnUiProperties | undefined\n const el = document.createElement('div')\n\n el.style.display = 'flex'\n el.style.flexDirection = 'column'\n\n if (props?.verticalArrangement) {\n const arr = props.verticalArrangement\n switch (arr.type) {\n case 'top':\n el.style.justifyContent = 'flex-start'\n break\n case 'center':\n el.style.justifyContent = 'center'\n break\n case 'bottom':\n el.style.justifyContent = 'flex-end'\n break\n case 'space_between':\n el.style.justifyContent = 'space-between'\n break\n case 'space_evenly':\n el.style.justifyContent = 'space-evenly'\n break\n case 'space_around':\n el.style.justifyContent = 'space-around'\n break\n case 'spaced_by':\n el.style.justifyContent = 'flex-start'\n if (arr.spacing != null) {\n el.style.gap = `${arr.spacing}px`\n }\n break\n }\n }\n\n if (props?.horizontalAlignment) {\n switch (props.horizontalAlignment) {\n case 'start':\n el.style.alignItems = 'flex-start'\n break\n case 'end':\n el.style.alignItems = 'flex-end'\n break\n case 'center_horizontally':\n el.style.alignItems = 'center'\n break\n }\n }\n\n if (props?.canScroll) {\n el.style.overflowY = 'auto'\n }\n\n applyModifier(el, props?.modifier, theme)\n\n return el\n}\n","import type { SduiComponent, RowUiProperties, Theme } from '../types'\nimport { applyModifier } from '../modifiers'\n\nexport function renderRow(component: SduiComponent, theme: Theme): HTMLElement {\n const props = component.properties as RowUiProperties | undefined\n const el = document.createElement('div')\n\n el.style.display = 'flex'\n el.style.flexDirection = 'row'\n\n if (props?.horizontalArrangement) {\n const arr = props.horizontalArrangement\n switch (arr.type) {\n case 'start':\n el.style.justifyContent = 'flex-start'\n break\n case 'center':\n el.style.justifyContent = 'center'\n break\n case 'end':\n el.style.justifyContent = 'flex-end'\n break\n case 'space_between':\n el.style.justifyContent = 'space-between'\n break\n case 'space_evenly':\n el.style.justifyContent = 'space-evenly'\n break\n case 'space_around':\n el.style.justifyContent = 'space-around'\n break\n case 'spaced_by':\n el.style.justifyContent = 'flex-start'\n if (arr.spacing != null) {\n el.style.gap = `${arr.spacing}px`\n }\n break\n }\n }\n\n if (props?.verticalAlignment) {\n switch (props.verticalAlignment) {\n case 'top':\n el.style.alignItems = 'flex-start'\n break\n case 'bottom':\n el.style.alignItems = 'flex-end'\n break\n case 'center_vertically':\n el.style.alignItems = 'center'\n break\n }\n }\n\n if (props?.canScroll) {\n el.style.overflowX = 'auto'\n }\n\n applyModifier(el, props?.modifier, theme)\n\n return el\n}\n","import type { SduiComponent, LazyColumnUiProperties, Theme } from '../types'\nimport { applyModifier } from '../modifiers'\n\nexport function renderLazyColumn(component: SduiComponent, theme: Theme): HTMLElement {\n const props = component.properties as LazyColumnUiProperties | undefined\n const el = document.createElement('div')\n\n el.style.display = 'flex'\n el.style.flexDirection = 'column'\n el.style.overflowY = 'auto'\n\n if (props?.verticalArrangement) {\n const arr = props.verticalArrangement\n switch (arr.type) {\n case 'top':\n el.style.justifyContent = 'flex-start'\n break\n case 'center':\n el.style.justifyContent = 'center'\n break\n case 'bottom':\n el.style.justifyContent = 'flex-end'\n break\n case 'space_between':\n el.style.justifyContent = 'space-between'\n break\n case 'space_evenly':\n el.style.justifyContent = 'space-evenly'\n break\n case 'space_around':\n el.style.justifyContent = 'space-around'\n break\n case 'spaced_by':\n el.style.justifyContent = 'flex-start'\n if (arr.spacing != null) {\n el.style.gap = `${arr.spacing}px`\n }\n break\n }\n }\n\n applyModifier(el, props?.modifier, theme)\n\n return el\n}\n","import type { SduiComponent, Theme } from '../types'\nimport { renderText } from './text'\nimport { renderImage } from './image'\nimport { renderBox } from './box'\nimport { renderColumn } from './column'\nimport { renderRow } from './row'\nimport { renderLazyColumn } from './lazy-column'\n\nexport type ComponentRenderer = (component: SduiComponent, theme: Theme) => HTMLElement\n\nconst renderers: Record<string, ComponentRenderer> = {\n text: renderText,\n image: renderImage,\n box: renderBox,\n column: renderColumn,\n row: renderRow,\n lazy_column: renderLazyColumn,\n}\n\nexport function getRenderer(type: string): ComponentRenderer | undefined {\n return renderers[type]\n}\n","import type { SduiComponent, Theme } from './types'\nimport { getRenderer } from './components'\n\nexport function renderComponent(component: SduiComponent, theme: Theme): HTMLElement {\n const renderer = getRenderer(component.type)\n\n if (!renderer) {\n console.warn(`[sdui] Unknown component type: \"${component.type}\"`)\n const el = document.createElement('div')\n el.dataset.sduiUnknown = component.type\n return el\n }\n\n const el = renderer(component, theme)\n el.dataset.sduiType = component.type\n\n if (component.children && component.children.length > 0) {\n for (const child of component.children) {\n el.appendChild(renderComponent(child, theme))\n }\n }\n\n return el\n}\n","import type { ComponentMeta, PropertyDescriptor } from './types'\n\n// === Reusable sub-object property builders ===\n\nfunction sizeModelProperties(): PropertyDescriptor[] {\n return [\n { name: 'value', label: 'Value', type: 'number' },\n { name: 'unit', label: 'Unit', type: 'enum', enumValues: ['dp', 'match_parent', 'wrap_content'] },\n ]\n}\n\nfunction spacingModelProperties(): PropertyDescriptor[] {\n return [\n { name: 'top', label: 'Top', type: 'number' },\n { name: 'bottom', label: 'Bottom', type: 'number' },\n { name: 'start', label: 'Start', type: 'number' },\n { name: 'end', label: 'End', type: 'number' },\n ]\n}\n\nfunction colorModelProperties(): PropertyDescriptor[] {\n return [\n { name: 'light', label: 'Light', type: 'color' },\n { name: 'dark', label: 'Dark', type: 'color' },\n ]\n}\n\nfunction actionModelProperties(): PropertyDescriptor[] {\n return [\n { name: 'type', label: 'Action Type', type: 'string' },\n { name: 'params', label: 'Parameters', type: 'object' },\n ]\n}\n\nfunction backgroundColorModelProperties(): PropertyDescriptor[] {\n return [\n {\n name: 'colors',\n label: 'Colors',\n type: 'object',\n isArray: true,\n properties: colorModelProperties(),\n },\n {\n name: 'type',\n label: 'Background Type',\n type: 'enum',\n enumValues: ['single', 'vertical_gradient', 'horizontal_gradient', 'linear_gradient'],\n },\n ]\n}\n\n// === Modifier builders ===\n\nfunction modifierBaseProperties(): PropertyDescriptor[] {\n return [\n {\n name: 'alignment',\n label: 'Alignment',\n type: 'enum',\n enumValues: ['start', 'end', 'center', 'center_horizontally', 'center_vertically', 'top', 'bottom', 'top_start', 'top_center', 'top_end', 'center_start', 'center_end', 'bottom_start', 'bottom_center', 'bottom_end'],\n },\n { name: 'weight', label: 'Weight', type: 'number' },\n { name: 'action', label: 'Action', type: 'object', properties: actionModelProperties() },\n ]\n}\n\nfunction textModifierDescriptor(): PropertyDescriptor {\n return {\n name: 'modifier',\n label: 'Modifier',\n type: 'object',\n properties: [\n ...modifierBaseProperties(),\n { name: 'width', label: 'Width', type: 'object', properties: sizeModelProperties() },\n { name: 'margin', label: 'Margin', type: 'object', properties: spacingModelProperties() },\n ],\n }\n}\n\nfunction imageModifierDescriptor(): PropertyDescriptor {\n return {\n name: 'modifier',\n label: 'Modifier',\n type: 'object',\n properties: [\n ...modifierBaseProperties(),\n { name: 'width', label: 'Width', type: 'object', properties: sizeModelProperties() },\n { name: 'height', label: 'Height', type: 'object', properties: sizeModelProperties() },\n { name: 'padding', label: 'Padding', type: 'object', properties: spacingModelProperties() },\n { name: 'margin', label: 'Margin', type: 'object', properties: spacingModelProperties() },\n { name: 'aspectRatio', label: 'Aspect Ratio', type: 'number' },\n ],\n }\n}\n\nfunction containerModifierDescriptor(): PropertyDescriptor {\n return {\n name: 'modifier',\n label: 'Modifier',\n type: 'object',\n properties: [\n ...modifierBaseProperties(),\n { name: 'backgroundColor', label: 'Background Color', type: 'object', properties: backgroundColorModelProperties() },\n { name: 'width', label: 'Width', type: 'object', properties: sizeModelProperties() },\n { name: 'height', label: 'Height', type: 'object', properties: sizeModelProperties() },\n { name: 'padding', label: 'Padding', type: 'object', properties: spacingModelProperties() },\n { name: 'margin', label: 'Margin', type: 'object', properties: spacingModelProperties() },\n { name: 'aspectRatio', label: 'Aspect Ratio', type: 'number' },\n ],\n }\n}\n\n// === Arrangement descriptors ===\n\nfunction verticalArrangementDescriptor(): PropertyDescriptor {\n return {\n name: 'verticalArrangement',\n label: 'Vertical Arrangement',\n type: 'object',\n properties: [\n {\n name: 'type',\n label: 'Type',\n type: 'enum',\n enumValues: ['top', 'center', 'bottom', 'space_evenly', 'space_between', 'space_around', 'spaced_by'],\n },\n { name: 'spacing', label: 'Spacing', type: 'number' },\n ],\n }\n}\n\nfunction horizontalArrangementDescriptor(): PropertyDescriptor {\n return {\n name: 'horizontalArrangement',\n label: 'Horizontal Arrangement',\n type: 'object',\n properties: [\n {\n name: 'type',\n label: 'Type',\n type: 'enum',\n enumValues: ['start', 'center', 'end', 'space_between', 'space_evenly', 'space_around', 'spaced_by'],\n },\n { name: 'spacing', label: 'Spacing', type: 'number' },\n ],\n }\n}\n\n// === Component definitions ===\n\nconst COMPONENT_DEFINITIONS: ComponentMeta[] = [\n {\n type: 'text',\n label: 'Text',\n acceptsChildren: false,\n properties: [\n { name: 'text', label: 'Text', type: 'string', required: true, defaultValue: 'Text' },\n { name: 'fontSize', label: 'Font Size', type: 'number' },\n { name: 'color', label: 'Color', type: 'object', properties: colorModelProperties() },\n { name: 'fontWeight', label: 'Font Weight', type: 'enum', enumValues: ['bold', 'medium', 'normal', 'semi_bold'] },\n { name: 'textAlign', label: 'Text Align', type: 'enum', enumValues: ['left', 'right', 'center', 'justify', 'start', 'end', 'unspecified'] },\n { name: 'overflow', label: 'Overflow', type: 'enum', enumValues: ['none', 'ellipsis'] },\n { name: 'maxLines', label: 'Max Lines', type: 'number' },\n { name: 'minLines', label: 'Min Lines', type: 'number', defaultValue: 1 },\n textModifierDescriptor(),\n ],\n },\n {\n type: 'image',\n label: 'Image',\n acceptsChildren: false,\n properties: [\n imageModifierDescriptor(),\n { name: 'image', label: 'Image URL', type: 'string', required: true },\n { name: 'scaleType', label: 'Scale Type', type: 'enum', enumValues: ['fit', 'crop', 'fill_height', 'fill_width', 'fill_bounds', 'inside', 'none'] },\n { name: 'contentDescription', label: 'Content Description', type: 'string' },\n { name: 'tintColor', label: 'Tint Color', type: 'object', properties: colorModelProperties() },\n ],\n },\n {\n type: 'box',\n label: 'Box',\n acceptsChildren: true,\n properties: [\n containerModifierDescriptor(),\n {\n name: 'alignment',\n label: 'Alignment',\n type: 'enum',\n enumValues: ['top_start', 'top_center', 'top_end', 'center_start', 'center', 'center_end', 'bottom_start', 'bottom_center', 'bottom_end'],\n },\n ],\n },\n {\n type: 'column',\n label: 'Column',\n acceptsChildren: true,\n properties: [\n containerModifierDescriptor(),\n verticalArrangementDescriptor(),\n { name: 'horizontalAlignment', label: 'Horizontal Alignment', type: 'enum', enumValues: ['start', 'end', 'center_horizontally'] },\n { name: 'canScroll', label: 'Can Scroll', type: 'boolean' },\n ],\n },\n {\n type: 'row',\n label: 'Row',\n acceptsChildren: true,\n properties: [\n containerModifierDescriptor(),\n { name: 'verticalAlignment', label: 'Vertical Alignment', type: 'enum', enumValues: ['top', 'bottom', 'center_vertically'] },\n horizontalArrangementDescriptor(),\n { name: 'canScroll', label: 'Can Scroll', type: 'boolean' },\n ],\n },\n {\n type: 'lazy_column',\n label: 'Lazy Column',\n acceptsChildren: true,\n properties: [\n containerModifierDescriptor(),\n verticalArrangementDescriptor(),\n ],\n },\n]\n\n// === Public API ===\n\nexport function getComponents(): ComponentMeta[] {\n return JSON.parse(JSON.stringify(COMPONENT_DEFINITIONS))\n}\n","import type { SduiScreen, Theme } from './types'\nimport { renderComponent } from './render'\n\nexport interface RenderOptions {\n theme?: Theme\n}\n\nexport function render(json: string, container: HTMLElement, options?: RenderOptions): void {\n const screen: SduiScreen = JSON.parse(json)\n const theme: Theme = options?.theme ?? 'light'\n\n const root = renderComponent(screen.root, theme)\n\n container.innerHTML = ''\n container.appendChild(root)\n}\n\nexport { getComponents } from './component-meta'\n\nexport type {\n // Root models\n SduiScreen,\n SduiComponent,\n Theme,\n // Properties\n PropertiesModel,\n TextUiProperties,\n ImageUiProperties,\n BoxUiProperties,\n ColumnUiProperties,\n RowUiProperties,\n LazyColumnUiProperties,\n DefaultUiProperties,\n // Modifiers\n ModifierBase,\n TextUiModifier,\n ContainerUiModifier,\n ImageUiModifier,\n // Base models\n ColorModel,\n SizeModel,\n SpacingModel,\n ActionModel,\n BackgroundColorModel,\n HorizontalArrangementModel,\n VerticalArrangementModel,\n // Enums\n ComponentType,\n AlignmentType,\n FontWeightType,\n SizeUnitType,\n BackgroundColorType,\n ContentScaleType,\n TextAlignType,\n TextOverflowType,\n HorizontalAlignmentType,\n VerticalAlignmentType,\n HorizontalArrangementType,\n VerticalArrangementType,\n // Metadata\n ComponentMeta,\n PropertyDescriptor,\n PropertyType,\n} from './types'\n"],"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,SAAO;AAAA,IACL,KAAK,QAAQ,OAAO,OAAO,GAAG,QAAQ,GAAG,OAAO;AAAA,IAChD,QAAQ,QAAQ,UAA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A8B;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;;;AChOO,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/device-presets.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 (+ justify-self for 2-axis Box alignments)\n if (modifier.alignment) {\n switch (modifier.alignment) {\n // Single-axis (Column / Row children)\n case 'center':\n case 'center_horizontally':\n case 'center_vertically':\n s.alignSelf = 'center'\n break\n case 'start':\n case 'top':\n s.alignSelf = 'flex-start'\n break\n case 'end':\n case 'bottom':\n s.alignSelf = 'flex-end'\n break\n // Two-axis (Box children — grid layout)\n case 'top_start':\n s.alignSelf = 'start'; s.justifySelf = 'start'\n break\n case 'top_center':\n s.alignSelf = 'start'; s.justifySelf = 'center'\n break\n case 'top_end':\n s.alignSelf = 'start'; s.justifySelf = 'end'\n break\n case 'center_start':\n s.alignSelf = 'center'; s.justifySelf = 'start'\n break\n case 'center_end':\n s.alignSelf = 'center'; s.justifySelf = 'end'\n break\n case 'bottom_start':\n s.alignSelf = 'end'; s.justifySelf = 'start'\n break\n case 'bottom_center':\n s.alignSelf = 'end'; s.justifySelf = 'center'\n break\n case 'bottom_end':\n s.alignSelf = 'end'; s.justifySelf = 'end'\n break\n }\n }\n\n // weight → flex\n if (modifier.weight != null) {\n s.flex = `${modifier.weight}`\n s.minWidth = '0'\n s.minHeight = '0'\n }\n\n // action → click handler\n if (modifier.action) {\n const action = modifier.action\n s.cursor = 'pointer'\n element.addEventListener('click', (e) => {\n e.stopPropagation()\n element.dispatchEvent(new CustomEvent('sdui:action', {\n bubbles: true,\n detail: { type: action.type, params: action.params },\n }))\n })\n }\n\n // Extended modifier fields (width, height, padding, margin, backgroundColor, aspectRatio)\n const mod = modifier as ContainerUiModifier | ImageUiModifier | TextUiModifier\n\n const hasAspectRatio = 'aspectRatio' in mod && mod.aspectRatio != null\n const hasWidth = 'width' in mod && mod.width\n const hasHeight = 'height' in mod && (mod as ContainerUiModifier).height\n\n if (hasWidth) {\n const w = resolveSize(mod.width)\n if (w) s.width = w\n }\n\n if (hasHeight && !(hasAspectRatio && hasWidth)) {\n const h = resolveSize((mod as ContainerUiModifier).height)\n if (h) s.height = h\n }\n\n if (hasAspectRatio) {\n s.aspectRatio = `${(mod as ContainerUiModifier).aspectRatio}`\n }\n\n if ('padding' in mod && mod.padding) {\n const p = resolveSpacing((mod as ContainerUiModifier).padding)\n if (p.top) s.paddingTop = p.top\n if (p.bottom) s.paddingBottom = p.bottom\n if (p.left) s.paddingLeft = p.left\n if (p.right) s.paddingRight = p.right\n }\n\n if ('margin' in mod && mod.margin) {\n const m = resolveSpacing(mod.margin)\n if (m.top) s.marginTop = m.top\n if (m.bottom) s.marginBottom = m.bottom\n if (m.left) s.marginLeft = m.left\n if (m.right) s.marginRight = m.right\n }\n\n if ('backgroundColor' in mod && mod.backgroundColor) {\n applyBackground(s, (mod as ContainerUiModifier).backgroundColor!, theme)\n }\n}\n\nfunction applyBackground(s: CSSStyleDeclaration, bg: BackgroundColorModel, theme: Theme): void {\n if (!bg.colors || bg.colors.length === 0) return\n\n const colors = bg.colors.map((c) => resolveColor(c, theme)).filter(Boolean) as string[]\n if (colors.length === 0) return\n\n switch (bg.type) {\n case 'single':\n s.backgroundColor = colors[0]\n break\n case 'vertical_gradient':\n s.background = `linear-gradient(to bottom, ${colors.join(', ')})`\n break\n case 'horizontal_gradient':\n s.background = `linear-gradient(to right, ${colors.join(', ')})`\n break\n case 'linear_gradient':\n s.background = `linear-gradient(${colors.join(', ')})`\n break\n default:\n if (colors.length === 1) {\n s.backgroundColor = colors[0]\n }\n break\n }\n}\n","import type { SduiComponent, TextUiProperties, Theme } from '../types'\nimport { resolveColor } from '../utils'\nimport { applyModifier } from '../modifiers'\n\nexport function renderText(component: SduiComponent, theme: Theme): HTMLElement {\n const props = component.properties as TextUiProperties | undefined\n const el = document.createElement('span')\n\n el.textContent = props?.text ?? ''\n\n if (props?.fontSize != null) {\n el.style.fontSize = `${props.fontSize}px`\n }\n\n if (props?.color) {\n const c = resolveColor(props.color, theme)\n if (c) el.style.color = c\n }\n\n if (props?.fontWeight) {\n switch (props.fontWeight) {\n case 'bold':\n el.style.fontWeight = '700'\n break\n case 'semi_bold':\n el.style.fontWeight = '600'\n break\n case 'medium':\n el.style.fontWeight = '500'\n break\n case 'normal':\n el.style.fontWeight = '400'\n break\n }\n }\n\n if (props?.textAlign) {\n el.style.display = 'block'\n switch (props.textAlign) {\n case 'left':\n case 'start':\n el.style.textAlign = 'left'\n break\n case 'right':\n case 'end':\n el.style.textAlign = 'right'\n break\n case 'center':\n el.style.textAlign = 'center'\n break\n case 'justify':\n el.style.textAlign = 'justify'\n break\n }\n }\n\n if (props?.overflow === 'ellipsis') {\n el.style.textOverflow = 'ellipsis'\n el.style.overflow = 'hidden'\n el.style.whiteSpace = 'nowrap'\n }\n\n if (props?.maxLines != null) {\n el.style.display = '-webkit-box'\n el.style.webkitLineClamp = `${props.maxLines}`\n ;(el.style as unknown as Record<string, string>)['-webkit-box-orient'] = 'vertical'\n el.style.overflow = 'hidden'\n }\n\n if (props?.minLines != null) {\n el.style.minHeight = `${props.minLines * (props.fontSize ?? 16) * 1.4}px`\n }\n\n applyModifier(el, props?.modifier, theme)\n\n return el\n}\n","import type { SduiComponent, ImageUiProperties, Theme } from '../types'\nimport { resolveColor } from '../utils'\nimport { applyModifier } from '../modifiers'\n\nexport function renderImage(component: SduiComponent, theme: Theme): HTMLElement {\n const props = component.properties as ImageUiProperties | undefined\n const el = document.createElement('img') as HTMLImageElement\n\n if (props?.image) {\n el.src = props.image\n }\n\n if (props?.contentDescription) {\n el.alt = props.contentDescription\n }\n\n if (props?.scaleType) {\n switch (props.scaleType) {\n case 'fit':\n case 'inside':\n el.style.objectFit = 'contain'\n break\n case 'crop':\n el.style.objectFit = 'cover'\n break\n case 'fill_bounds':\n el.style.objectFit = 'fill'\n break\n case 'fill_width':\n el.style.objectFit = 'cover'\n el.style.width = '100%'\n break\n case 'fill_height':\n el.style.objectFit = 'cover'\n el.style.height = '100%'\n break\n case 'none':\n el.style.objectFit = 'none'\n break\n }\n }\n\n if (props?.tintColor) {\n const c = resolveColor(props.tintColor, theme)\n if (c) {\n el.style.filter = `opacity(0.5) drop-shadow(0 0 0 ${c})`\n }\n }\n\n applyModifier(el, props?.modifier, theme)\n\n return el\n}\n","import type { SduiComponent, BoxUiProperties, Theme } from '../types'\nimport { applyModifier } from '../modifiers'\n\nexport function renderBox(component: SduiComponent, theme: Theme): HTMLElement {\n const props = component.properties as BoxUiProperties | undefined\n const el = document.createElement('div')\n\n el.style.display = 'grid'\n el.style.position = 'relative'\n\n // All children share the same grid cell (like Compose FrameLayout)\n // Default alignment for all children\n if (props?.alignment) {\n switch (props.alignment) {\n case 'top_start':\n el.style.justifyItems = 'start'\n el.style.alignItems = 'start'\n break\n case 'top_center':\n el.style.justifyItems = 'center'\n el.style.alignItems = 'start'\n break\n case 'top_end':\n el.style.justifyItems = 'end'\n el.style.alignItems = 'start'\n break\n case 'center_start':\n el.style.justifyItems = 'start'\n el.style.alignItems = 'center'\n break\n case 'center':\n el.style.justifyItems = 'center'\n el.style.alignItems = 'center'\n break\n case 'center_end':\n el.style.justifyItems = 'end'\n el.style.alignItems = 'center'\n break\n case 'bottom_start':\n el.style.justifyItems = 'start'\n el.style.alignItems = 'end'\n break\n case 'bottom_center':\n el.style.justifyItems = 'center'\n el.style.alignItems = 'end'\n break\n case 'bottom_end':\n el.style.justifyItems = 'end'\n el.style.alignItems = 'end'\n break\n }\n }\n\n applyModifier(el, props?.modifier, theme)\n\n return el\n}\n","import type { SduiComponent, ColumnUiProperties, Theme } from '../types'\nimport { applyModifier } from '../modifiers'\n\nexport function renderColumn(component: SduiComponent, theme: Theme): HTMLElement {\n const props = component.properties as ColumnUiProperties | undefined\n const el = document.createElement('div')\n\n el.style.display = 'flex'\n el.style.flexDirection = 'column'\n\n if (props?.verticalArrangement) {\n const arr = props.verticalArrangement\n switch (arr.type) {\n case 'top':\n el.style.justifyContent = 'flex-start'\n break\n case 'center':\n el.style.justifyContent = 'center'\n break\n case 'bottom':\n el.style.justifyContent = 'flex-end'\n break\n case 'space_between':\n el.style.justifyContent = 'space-between'\n break\n case 'space_evenly':\n el.style.justifyContent = 'space-evenly'\n break\n case 'space_around':\n el.style.justifyContent = 'space-around'\n break\n case 'spaced_by':\n el.style.justifyContent = 'flex-start'\n if (arr.spacing != null) {\n el.style.gap = `${arr.spacing}px`\n }\n break\n }\n }\n\n if (props?.horizontalAlignment) {\n switch (props.horizontalAlignment) {\n case 'start':\n el.style.alignItems = 'flex-start'\n break\n case 'end':\n el.style.alignItems = 'flex-end'\n break\n case 'center_horizontally':\n el.style.alignItems = 'center'\n break\n }\n }\n\n if (props?.canScroll) {\n el.style.overflowY = 'auto'\n }\n\n applyModifier(el, props?.modifier, theme)\n\n return el\n}\n","import type { SduiComponent, RowUiProperties, Theme } from '../types'\nimport { applyModifier } from '../modifiers'\n\nexport function renderRow(component: SduiComponent, theme: Theme): HTMLElement {\n const props = component.properties as RowUiProperties | undefined\n const el = document.createElement('div')\n\n el.style.display = 'flex'\n el.style.flexDirection = 'row'\n\n if (props?.horizontalArrangement) {\n const arr = props.horizontalArrangement\n switch (arr.type) {\n case 'start':\n el.style.justifyContent = 'flex-start'\n break\n case 'center':\n el.style.justifyContent = 'center'\n break\n case 'end':\n el.style.justifyContent = 'flex-end'\n break\n case 'space_between':\n el.style.justifyContent = 'space-between'\n break\n case 'space_evenly':\n el.style.justifyContent = 'space-evenly'\n break\n case 'space_around':\n el.style.justifyContent = 'space-around'\n break\n case 'spaced_by':\n el.style.justifyContent = 'flex-start'\n if (arr.spacing != null) {\n el.style.gap = `${arr.spacing}px`\n }\n break\n }\n }\n\n if (props?.verticalAlignment) {\n switch (props.verticalAlignment) {\n case 'top':\n el.style.alignItems = 'flex-start'\n break\n case 'bottom':\n el.style.alignItems = 'flex-end'\n break\n case 'center_vertically':\n el.style.alignItems = 'center'\n break\n }\n }\n\n if (props?.canScroll) {\n el.style.overflowX = 'auto'\n }\n\n applyModifier(el, props?.modifier, theme)\n\n return el\n}\n","import type { SduiComponent, LazyColumnUiProperties, Theme } from '../types'\nimport { applyModifier } from '../modifiers'\n\nexport function renderLazyColumn(component: SduiComponent, theme: Theme): HTMLElement {\n const props = component.properties as LazyColumnUiProperties | undefined\n const el = document.createElement('div')\n\n el.style.display = 'flex'\n el.style.flexDirection = 'column'\n el.style.overflowY = 'auto'\n\n if (props?.verticalArrangement) {\n const arr = props.verticalArrangement\n switch (arr.type) {\n case 'top':\n el.style.justifyContent = 'flex-start'\n break\n case 'center':\n el.style.justifyContent = 'center'\n break\n case 'bottom':\n el.style.justifyContent = 'flex-end'\n break\n case 'space_between':\n el.style.justifyContent = 'space-between'\n break\n case 'space_evenly':\n el.style.justifyContent = 'space-evenly'\n break\n case 'space_around':\n el.style.justifyContent = 'space-around'\n break\n case 'spaced_by':\n el.style.justifyContent = 'flex-start'\n if (arr.spacing != null) {\n el.style.gap = `${arr.spacing}px`\n }\n break\n }\n }\n\n applyModifier(el, props?.modifier, theme)\n\n return el\n}\n","import type { SduiComponent, Theme } from '../types'\nimport { renderText } from './text'\nimport { renderImage } from './image'\nimport { renderBox } from './box'\nimport { renderColumn } from './column'\nimport { renderRow } from './row'\nimport { renderLazyColumn } from './lazy-column'\n\nexport type ComponentRenderer = (component: SduiComponent, theme: Theme) => HTMLElement\n\nconst renderers: Record<string, ComponentRenderer> = {\n text: renderText,\n image: renderImage,\n box: renderBox,\n column: renderColumn,\n row: renderRow,\n lazy_column: renderLazyColumn,\n}\n\nexport function getRenderer(type: string): ComponentRenderer | undefined {\n return renderers[type]\n}\n","import type { SduiComponent, Theme } from './types'\nimport { getRenderer } from './components'\n\nexport function renderComponent(component: SduiComponent, theme: Theme): HTMLElement {\n const renderer = getRenderer(component.type)\n\n if (!renderer) {\n console.warn(`[sdui] Unknown component type: \"${component.type}\"`)\n const el = document.createElement('div')\n el.dataset.sduiUnknown = component.type\n return el\n }\n\n const el = renderer(component, theme)\n el.dataset.sduiType = component.type\n\n if (component.children && component.children.length > 0) {\n for (const child of component.children) {\n el.appendChild(renderComponent(child, theme))\n }\n }\n\n return el\n}\n","import type { ComponentMeta, PropertyDescriptor } from './types'\n\n// === Reusable sub-object property builders ===\n\nfunction sizeModelProperties(): PropertyDescriptor[] {\n return [\n { name: 'value', label: 'Value', type: 'number' },\n { name: 'unit', label: 'Unit', type: 'enum', enumValues: ['dp', 'match_parent', 'wrap_content'] },\n ]\n}\n\nfunction spacingModelProperties(): PropertyDescriptor[] {\n return [\n { name: 'top', label: 'Top', type: 'number' },\n { name: 'bottom', label: 'Bottom', type: 'number' },\n { name: 'start', label: 'Start', type: 'number' },\n { name: 'end', label: 'End', type: 'number' },\n ]\n}\n\nfunction colorModelProperties(): PropertyDescriptor[] {\n return [\n { name: 'light', label: 'Light', type: 'color' },\n { name: 'dark', label: 'Dark', type: 'color' },\n ]\n}\n\nfunction actionModelProperties(): PropertyDescriptor[] {\n return [\n { name: 'type', label: 'Action Type', type: 'string' },\n { name: 'params', label: 'Parameters', type: 'object' },\n ]\n}\n\nfunction backgroundColorModelProperties(): PropertyDescriptor[] {\n return [\n {\n name: 'colors',\n label: 'Colors',\n type: 'object',\n isArray: true,\n properties: colorModelProperties(),\n },\n {\n name: 'type',\n label: 'Background Type',\n type: 'enum',\n enumValues: ['single', 'vertical_gradient', 'horizontal_gradient', 'linear_gradient'],\n },\n ]\n}\n\n// === Modifier builders ===\n\nfunction modifierBaseProperties(): PropertyDescriptor[] {\n return [\n {\n name: 'alignment',\n label: 'Alignment',\n type: 'enum',\n enumValues: ['start', 'end', 'center', 'center_horizontally', 'center_vertically', 'top', 'bottom', 'top_start', 'top_center', 'top_end', 'center_start', 'center_end', 'bottom_start', 'bottom_center', 'bottom_end'],\n },\n { name: 'weight', label: 'Weight', type: 'number' },\n { name: 'action', label: 'Action', type: 'object', properties: actionModelProperties() },\n ]\n}\n\nfunction textModifierDescriptor(): PropertyDescriptor {\n return {\n name: 'modifier',\n label: 'Modifier',\n type: 'object',\n properties: [\n ...modifierBaseProperties(),\n { name: 'width', label: 'Width', type: 'object', properties: sizeModelProperties() },\n { name: 'margin', label: 'Margin', type: 'object', properties: spacingModelProperties() },\n ],\n }\n}\n\nfunction imageModifierDescriptor(): PropertyDescriptor {\n return {\n name: 'modifier',\n label: 'Modifier',\n type: 'object',\n properties: [\n ...modifierBaseProperties(),\n { name: 'width', label: 'Width', type: 'object', properties: sizeModelProperties() },\n { name: 'height', label: 'Height', type: 'object', properties: sizeModelProperties() },\n { name: 'padding', label: 'Padding', type: 'object', properties: spacingModelProperties() },\n { name: 'margin', label: 'Margin', type: 'object', properties: spacingModelProperties() },\n { name: 'aspectRatio', label: 'Aspect Ratio', type: 'number' },\n ],\n }\n}\n\nfunction containerModifierDescriptor(): PropertyDescriptor {\n return {\n name: 'modifier',\n label: 'Modifier',\n type: 'object',\n properties: [\n ...modifierBaseProperties(),\n { name: 'backgroundColor', label: 'Background Color', type: 'object', properties: backgroundColorModelProperties() },\n { name: 'width', label: 'Width', type: 'object', properties: sizeModelProperties() },\n { name: 'height', label: 'Height', type: 'object', properties: sizeModelProperties() },\n { name: 'padding', label: 'Padding', type: 'object', properties: spacingModelProperties() },\n { name: 'margin', label: 'Margin', type: 'object', properties: spacingModelProperties() },\n { name: 'aspectRatio', label: 'Aspect Ratio', type: 'number' },\n ],\n }\n}\n\n// === Arrangement descriptors ===\n\nfunction verticalArrangementDescriptor(): PropertyDescriptor {\n return {\n name: 'verticalArrangement',\n label: 'Vertical Arrangement',\n type: 'object',\n properties: [\n {\n name: 'type',\n label: 'Type',\n type: 'enum',\n enumValues: ['top', 'center', 'bottom', 'space_evenly', 'space_between', 'space_around', 'spaced_by'],\n },\n { name: 'spacing', label: 'Spacing', type: 'number' },\n ],\n }\n}\n\nfunction horizontalArrangementDescriptor(): PropertyDescriptor {\n return {\n name: 'horizontalArrangement',\n label: 'Horizontal Arrangement',\n type: 'object',\n properties: [\n {\n name: 'type',\n label: 'Type',\n type: 'enum',\n enumValues: ['start', 'center', 'end', 'space_between', 'space_evenly', 'space_around', 'spaced_by'],\n },\n { name: 'spacing', label: 'Spacing', type: 'number' },\n ],\n }\n}\n\n// === Component definitions ===\n\nconst COMPONENT_DEFINITIONS: ComponentMeta[] = [\n {\n type: 'text',\n label: 'Text',\n acceptsChildren: false,\n properties: [\n { name: 'text', label: 'Text', type: 'string', required: true, defaultValue: 'Text' },\n { name: 'fontSize', label: 'Font Size', type: 'number' },\n { name: 'color', label: 'Color', type: 'object', properties: colorModelProperties() },\n { name: 'fontWeight', label: 'Font Weight', type: 'enum', enumValues: ['bold', 'medium', 'normal', 'semi_bold'] },\n { name: 'textAlign', label: 'Text Align', type: 'enum', enumValues: ['left', 'right', 'center', 'justify', 'start', 'end', 'unspecified'] },\n { name: 'overflow', label: 'Overflow', type: 'enum', enumValues: ['none', 'ellipsis'] },\n { name: 'maxLines', label: 'Max Lines', type: 'number' },\n { name: 'minLines', label: 'Min Lines', type: 'number', defaultValue: 1 },\n textModifierDescriptor(),\n ],\n },\n {\n type: 'image',\n label: 'Image',\n acceptsChildren: false,\n properties: [\n imageModifierDescriptor(),\n { name: 'image', label: 'Image URL', type: 'string', required: true },\n { name: 'scaleType', label: 'Scale Type', type: 'enum', enumValues: ['fit', 'crop', 'fill_height', 'fill_width', 'fill_bounds', 'inside', 'none'] },\n { name: 'contentDescription', label: 'Content Description', type: 'string' },\n { name: 'tintColor', label: 'Tint Color', type: 'object', properties: colorModelProperties() },\n ],\n },\n {\n type: 'box',\n label: 'Box',\n acceptsChildren: true,\n properties: [\n containerModifierDescriptor(),\n {\n name: 'alignment',\n label: 'Alignment',\n type: 'enum',\n enumValues: ['top_start', 'top_center', 'top_end', 'center_start', 'center', 'center_end', 'bottom_start', 'bottom_center', 'bottom_end'],\n },\n ],\n },\n {\n type: 'column',\n label: 'Column',\n acceptsChildren: true,\n properties: [\n containerModifierDescriptor(),\n verticalArrangementDescriptor(),\n { name: 'horizontalAlignment', label: 'Horizontal Alignment', type: 'enum', enumValues: ['start', 'end', 'center_horizontally'] },\n { name: 'canScroll', label: 'Can Scroll', type: 'boolean' },\n ],\n },\n {\n type: 'row',\n label: 'Row',\n acceptsChildren: true,\n properties: [\n containerModifierDescriptor(),\n { name: 'verticalAlignment', label: 'Vertical Alignment', type: 'enum', enumValues: ['top', 'bottom', 'center_vertically'] },\n horizontalArrangementDescriptor(),\n { name: 'canScroll', label: 'Can Scroll', type: 'boolean' },\n ],\n },\n {\n type: 'lazy_column',\n label: 'Lazy Column',\n acceptsChildren: true,\n properties: [\n containerModifierDescriptor(),\n verticalArrangementDescriptor(),\n ],\n },\n]\n\n// === Public API ===\n\nexport function getComponents(): ComponentMeta[] {\n return JSON.parse(JSON.stringify(COMPONENT_DEFINITIONS))\n}\n","export interface DevicePreset {\n name: string\n width: number\n height: number\n foldedWidth?: number\n foldedHeight?: number\n}\n\nexport type DeviceCategory = 'phone' | 'tablet'\n\nconst DEVICE_PRESETS: Record<DeviceCategory, Record<string, DevicePreset[]>> = {\n phone: {\n 'Google': [\n { name: 'Pixel 10', width: 412, height: 915 },\n { name: 'Pixel 10 Pro', width: 412, height: 915 },\n { name: 'Pixel 10 Pro XL', width: 448, height: 998 },\n { name: 'Pixel 10 Fold', width: 600, height: 748, foldedWidth: 360, foldedHeight: 748 },\n ],\n 'Samsung': [\n { name: 'Galaxy S26', width: 360, height: 780 },\n { name: 'Galaxy S26 Ultra', width: 412, height: 915 },\n { name: 'Galaxy Z Fold 7', width: 588, height: 748, foldedWidth: 360, foldedHeight: 748 },\n ],\n 'iOS': [\n { name: 'iPhone 17 Pro Max', width: 440, height: 956 },\n { name: 'iPhone 17 Pro', width: 402, height: 874 },\n { name: 'iPhone 17e', width: 375, height: 812 },\n { name: 'iPhone 17', width: 393, height: 852 },\n { name: 'iPhone Air', width: 402, height: 874 },\n ],\n },\n tablet: {\n 'Google': [\n { name: 'Pixel Tablet 2', width: 800, height: 1280 },\n ],\n 'Samsung': [\n { name: 'Galaxy Tab S11', width: 753, height: 1205 },\n { name: 'Galaxy Tab S11+', width: 834, height: 1334 },\n { name: 'Galaxy Tab S11 Ultra', width: 930, height: 1488 },\n ],\n 'iOS': [\n { name: 'iPad Pro 13\"', width: 1024, height: 1366 },\n { name: 'iPad Pro 11\"', width: 834, height: 1194 },\n { name: 'iPad Air', width: 820, height: 1180 },\n { name: 'iPad mini', width: 744, height: 1133 },\n ],\n },\n}\n\nexport function getDevicePresets(): Record<DeviceCategory, Record<string, DevicePreset[]>> {\n return JSON.parse(JSON.stringify(DEVICE_PRESETS))\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'\nexport { getDevicePresets } from './device-presets'\nexport type { DevicePreset, DeviceCategory } from './device-presets'\n\nexport type {\n // Root models\n SduiScreen,\n SduiComponent,\n Theme,\n // Properties\n PropertiesModel,\n TextUiProperties,\n ImageUiProperties,\n BoxUiProperties,\n ColumnUiProperties,\n RowUiProperties,\n LazyColumnUiProperties,\n DefaultUiProperties,\n // Modifiers\n ModifierBase,\n TextUiModifier,\n ContainerUiModifier,\n ImageUiModifier,\n // Base models\n ColorModel,\n SizeModel,\n SpacingModel,\n ActionModel,\n BackgroundColorModel,\n HorizontalArrangementModel,\n VerticalArrangementModel,\n // Enums\n ComponentType,\n AlignmentType,\n FontWeightType,\n SizeUnitType,\n BackgroundColorType,\n ContentScaleType,\n TextAlignType,\n TextOverflowType,\n HorizontalAlignmentType,\n VerticalAlignmentType,\n HorizontalArrangementType,\n VerticalArrangementType,\n // Metadata\n ComponentMeta,\n PropertyDescriptor,\n PropertyType,\n} from './types'\n"],"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,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,EAC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