sdui-web 0.3.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 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);
@@ -62,6 +63,7 @@ function applyModifier(element, modifier, theme) {
62
63
  const s = element.style;
63
64
  if (modifier.alignment) {
64
65
  switch (modifier.alignment) {
66
+ // Single-axis (Column / Row children)
65
67
  case "center":
66
68
  case "center_horizontally":
67
69
  case "center_vertically":
@@ -75,6 +77,39 @@ function applyModifier(element, modifier, theme) {
75
77
  case "bottom":
76
78
  s.alignSelf = "flex-end";
77
79
  break;
80
+ // Two-axis (Box children — grid layout)
81
+ case "top_start":
82
+ s.alignSelf = "start";
83
+ s.justifySelf = "start";
84
+ break;
85
+ case "top_center":
86
+ s.alignSelf = "start";
87
+ s.justifySelf = "center";
88
+ break;
89
+ case "top_end":
90
+ s.alignSelf = "start";
91
+ s.justifySelf = "end";
92
+ break;
93
+ case "center_start":
94
+ s.alignSelf = "center";
95
+ s.justifySelf = "start";
96
+ break;
97
+ case "center_end":
98
+ s.alignSelf = "center";
99
+ s.justifySelf = "end";
100
+ break;
101
+ case "bottom_start":
102
+ s.alignSelf = "end";
103
+ s.justifySelf = "start";
104
+ break;
105
+ case "bottom_center":
106
+ s.alignSelf = "end";
107
+ s.justifySelf = "center";
108
+ break;
109
+ case "bottom_end":
110
+ s.alignSelf = "end";
111
+ s.justifySelf = "end";
112
+ break;
78
113
  }
79
114
  }
80
115
  if (modifier.weight != null) {
@@ -87,12 +122,10 @@ function applyModifier(element, modifier, theme) {
87
122
  s.cursor = "pointer";
88
123
  element.addEventListener("click", (e) => {
89
124
  e.stopPropagation();
90
- if (action.type === "navigate") {
91
- element.dispatchEvent(new CustomEvent("sdui:navigate", {
92
- bubbles: true,
93
- detail: { route: action.params?.route, args: action.params?.args }
94
- }));
95
- }
125
+ element.dispatchEvent(new CustomEvent("sdui:action", {
126
+ bubbles: true,
127
+ detail: { type: action.type, params: action.params }
128
+ }));
96
129
  });
97
130
  }
98
131
  const mod = modifier;
@@ -267,45 +300,45 @@ function renderImage(component, theme) {
267
300
  function renderBox(component, theme) {
268
301
  const props = component.properties;
269
302
  const el = document.createElement("div");
270
- el.style.display = "flex";
303
+ el.style.display = "grid";
271
304
  el.style.position = "relative";
272
305
  if (props?.alignment) {
273
306
  switch (props.alignment) {
274
307
  case "top_start":
275
- el.style.justifyContent = "flex-start";
276
- el.style.alignItems = "flex-start";
308
+ el.style.justifyItems = "start";
309
+ el.style.alignItems = "start";
277
310
  break;
278
311
  case "top_center":
279
- el.style.justifyContent = "center";
280
- el.style.alignItems = "flex-start";
312
+ el.style.justifyItems = "center";
313
+ el.style.alignItems = "start";
281
314
  break;
282
315
  case "top_end":
283
- el.style.justifyContent = "flex-end";
284
- el.style.alignItems = "flex-start";
316
+ el.style.justifyItems = "end";
317
+ el.style.alignItems = "start";
285
318
  break;
286
319
  case "center_start":
287
- el.style.justifyContent = "flex-start";
320
+ el.style.justifyItems = "start";
288
321
  el.style.alignItems = "center";
289
322
  break;
290
323
  case "center":
291
- el.style.justifyContent = "center";
324
+ el.style.justifyItems = "center";
292
325
  el.style.alignItems = "center";
293
326
  break;
294
327
  case "center_end":
295
- el.style.justifyContent = "flex-end";
328
+ el.style.justifyItems = "end";
296
329
  el.style.alignItems = "center";
297
330
  break;
298
331
  case "bottom_start":
299
- el.style.justifyContent = "flex-start";
300
- el.style.alignItems = "flex-end";
332
+ el.style.justifyItems = "start";
333
+ el.style.alignItems = "end";
301
334
  break;
302
335
  case "bottom_center":
303
- el.style.justifyContent = "center";
304
- el.style.alignItems = "flex-end";
336
+ el.style.justifyItems = "center";
337
+ el.style.alignItems = "end";
305
338
  break;
306
339
  case "bottom_end":
307
- el.style.justifyContent = "flex-end";
308
- el.style.alignItems = "flex-end";
340
+ el.style.justifyItems = "end";
341
+ el.style.alignItems = "end";
309
342
  break;
310
343
  }
311
344
  }
@@ -518,16 +551,8 @@ function colorModelProperties() {
518
551
  }
519
552
  function actionModelProperties() {
520
553
  return [
521
- { name: "type", label: "Action Type", type: "enum", enumValues: ["navigate"] },
522
- {
523
- name: "params",
524
- label: "Params",
525
- type: "object",
526
- properties: [
527
- { name: "route", label: "Route", type: "string" },
528
- { name: "args", label: "Args", type: "object" }
529
- ]
530
- }
554
+ { name: "type", label: "Action Type", type: "string" },
555
+ { name: "params", label: "Parameters", type: "object" }
531
556
  ];
532
557
  }
533
558
  function backgroundColorModelProperties() {
@@ -553,7 +578,7 @@ function modifierBaseProperties() {
553
578
  name: "alignment",
554
579
  label: "Alignment",
555
580
  type: "enum",
556
- enumValues: ["center", "center_horizontally", "center_vertically", "start", "top", "end", "bottom"]
581
+ enumValues: ["start", "end", "center", "center_horizontally", "center_vertically", "top", "bottom", "top_start", "top_center", "top_end", "center_start", "center_end", "bottom_start", "bottom_center", "bottom_end"]
557
582
  },
558
583
  { name: "weight", label: "Weight", type: "number" },
559
584
  { name: "action", label: "Action", type: "object", properties: actionModelProperties() }
@@ -640,15 +665,15 @@ var COMPONENT_DEFINITIONS = [
640
665
  label: "Text",
641
666
  acceptsChildren: false,
642
667
  properties: [
643
- textModifierDescriptor(),
644
- { name: "text", label: "Text", type: "string", required: true },
668
+ { name: "text", label: "Text", type: "string", required: true, defaultValue: "Text" },
645
669
  { name: "fontSize", label: "Font Size", type: "number" },
646
670
  { name: "color", label: "Color", type: "object", properties: colorModelProperties() },
647
671
  { name: "fontWeight", label: "Font Weight", type: "enum", enumValues: ["bold", "medium", "normal", "semi_bold"] },
648
672
  { name: "textAlign", label: "Text Align", type: "enum", enumValues: ["left", "right", "center", "justify", "start", "end", "unspecified"] },
649
673
  { name: "overflow", label: "Overflow", type: "enum", enumValues: ["none", "ellipsis"] },
650
674
  { name: "maxLines", label: "Max Lines", type: "number" },
651
- { name: "minLines", label: "Min Lines", type: "number" }
675
+ { name: "minLines", label: "Min Lines", type: "number", defaultValue: 1 },
676
+ textModifierDescriptor()
652
677
  ]
653
678
  },
654
679
  {
@@ -713,6 +738,49 @@ function getComponents() {
713
738
  return JSON.parse(JSON.stringify(COMPONENT_DEFINITIONS));
714
739
  }
715
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
+
716
784
  // src/index.ts
717
785
  function render(json, container, options) {
718
786
  const screen = JSON.parse(json);
@@ -724,6 +792,7 @@ function render(json, container, options) {
724
792
  // Annotate the CommonJS export names for ESM import in node:
725
793
  0 && (module.exports = {
726
794
  getComponents,
795
+ getDevicePresets,
727
796
  render
728
797
  });
729
798
  //# sourceMappingURL=index.cjs.map
@@ -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 ActionParams,\n BackgroundColorModel,\n HorizontalArrangementModel,\n VerticalArrangementModel,\n // Enums\n ComponentType,\n AlignmentType,\n FontWeightType,\n SizeUnitType,\n ActionType,\n BackgroundColorType,\n ContentScaleType,\n TextAlignType,\n TextOverflowType,\n HorizontalAlignmentType,\n VerticalAlignmentType,\n HorizontalArrangementType,\n VerticalArrangementType,\n // Metadata\n ComponentMeta,\n PropertyDescriptor,\n PropertyType,\n} from './types'\n","import type { ColorModel, SizeModel, SpacingModel, Theme } from './types'\n\nexport function resolveColor(color: ColorModel | undefined, theme: Theme): string | undefined {\n if (!color) return undefined\n if (theme === 'dark') {\n return color.dark ?? color.light\n }\n return color.light ?? color.dark\n}\n\nexport function resolveSize(size: SizeModel | undefined): string | undefined {\n if (!size || !size.unit) return undefined\n switch (size.unit) {\n case 'dp':\n return `${size.value ?? 0}px`\n case 'match_parent':\n return '100%'\n case 'wrap_content':\n return 'fit-content'\n default:\n return undefined\n }\n}\n\nexport function resolveSpacing(spacing: SpacingModel | undefined): {\n top?: string\n bottom?: string\n left?: string\n right?: string\n} {\n if (!spacing) return {}\n return {\n top: spacing.top != null ? `${spacing.top}px` : undefined,\n bottom: spacing.bottom != null ? `${spacing.bottom}px` : undefined,\n left: spacing.start != null ? `${spacing.start}px` : undefined,\n right: spacing.end != null ? `${spacing.end}px` : undefined,\n }\n}\n","import type { BackgroundColorModel, ContainerUiModifier, ImageUiModifier, ModifierBase, TextUiModifier, Theme } from './types'\nimport { resolveColor, resolveSize, resolveSpacing } from './utils'\n\nexport function applyModifier(element: HTMLElement, modifier: ModifierBase | undefined, theme: Theme): void {\n if (!modifier) return\n\n const s = element.style\n\n // alignment → align-self\n if (modifier.alignment) {\n switch (modifier.alignment) {\n case 'center':\n case 'center_horizontally':\n case 'center_vertically':\n s.alignSelf = 'center'\n break\n case 'start':\n case 'top':\n s.alignSelf = 'flex-start'\n break\n case 'end':\n case 'bottom':\n s.alignSelf = 'flex-end'\n break\n }\n }\n\n // weight → flex\n if (modifier.weight != null) {\n s.flex = `${modifier.weight}`\n s.minWidth = '0'\n s.minHeight = '0'\n }\n\n // action → click handler\n if (modifier.action) {\n const action = modifier.action\n s.cursor = 'pointer'\n element.addEventListener('click', (e) => {\n e.stopPropagation()\n if (action.type === 'navigate') {\n element.dispatchEvent(new CustomEvent('sdui:navigate', {\n bubbles: true,\n detail: { route: action.params?.route, args: action.params?.args },\n }))\n }\n })\n }\n\n // Extended modifier fields (width, height, padding, margin, backgroundColor, aspectRatio)\n const mod = modifier as ContainerUiModifier | ImageUiModifier | TextUiModifier\n\n const hasAspectRatio = 'aspectRatio' in mod && mod.aspectRatio != null\n const hasWidth = 'width' in mod && mod.width\n const hasHeight = 'height' in mod && (mod as ContainerUiModifier).height\n\n if (hasWidth) {\n const w = resolveSize(mod.width)\n if (w) s.width = w\n }\n\n if (hasHeight && !(hasAspectRatio && hasWidth)) {\n const h = resolveSize((mod as ContainerUiModifier).height)\n if (h) s.height = h\n }\n\n if (hasAspectRatio) {\n s.aspectRatio = `${(mod as ContainerUiModifier).aspectRatio}`\n }\n\n if ('padding' in mod && mod.padding) {\n const p = resolveSpacing((mod as ContainerUiModifier).padding)\n if (p.top) s.paddingTop = p.top\n if (p.bottom) s.paddingBottom = p.bottom\n if (p.left) s.paddingLeft = p.left\n if (p.right) s.paddingRight = p.right\n }\n\n if ('margin' in mod && mod.margin) {\n const m = resolveSpacing(mod.margin)\n if (m.top) s.marginTop = m.top\n if (m.bottom) s.marginBottom = m.bottom\n if (m.left) s.marginLeft = m.left\n if (m.right) s.marginRight = m.right\n }\n\n if ('backgroundColor' in mod && mod.backgroundColor) {\n applyBackground(s, (mod as ContainerUiModifier).backgroundColor!, theme)\n }\n}\n\nfunction applyBackground(s: CSSStyleDeclaration, bg: BackgroundColorModel, theme: Theme): void {\n if (!bg.colors || bg.colors.length === 0) return\n\n const colors = bg.colors.map((c) => resolveColor(c, theme)).filter(Boolean) as string[]\n if (colors.length === 0) return\n\n switch (bg.type) {\n case 'single':\n s.backgroundColor = colors[0]\n break\n case 'vertical_gradient':\n s.background = `linear-gradient(to bottom, ${colors.join(', ')})`\n break\n case 'horizontal_gradient':\n s.background = `linear-gradient(to right, ${colors.join(', ')})`\n break\n case 'linear_gradient':\n s.background = `linear-gradient(${colors.join(', ')})`\n break\n default:\n if (colors.length === 1) {\n s.backgroundColor = colors[0]\n }\n break\n }\n}\n","import type { SduiComponent, TextUiProperties, Theme } from '../types'\nimport { resolveColor } from '../utils'\nimport { applyModifier } from '../modifiers'\n\nexport function renderText(component: SduiComponent, theme: Theme): HTMLElement {\n const props = component.properties as TextUiProperties | undefined\n const el = document.createElement('span')\n\n el.textContent = props?.text ?? ''\n\n if (props?.fontSize != null) {\n el.style.fontSize = `${props.fontSize}px`\n }\n\n if (props?.color) {\n const c = resolveColor(props.color, theme)\n if (c) el.style.color = c\n }\n\n if (props?.fontWeight) {\n switch (props.fontWeight) {\n case 'bold':\n el.style.fontWeight = '700'\n break\n case 'semi_bold':\n el.style.fontWeight = '600'\n break\n case 'medium':\n el.style.fontWeight = '500'\n break\n case 'normal':\n el.style.fontWeight = '400'\n break\n }\n }\n\n if (props?.textAlign) {\n el.style.display = 'block'\n switch (props.textAlign) {\n case 'left':\n case 'start':\n el.style.textAlign = 'left'\n break\n case 'right':\n case 'end':\n el.style.textAlign = 'right'\n break\n case 'center':\n el.style.textAlign = 'center'\n break\n case 'justify':\n el.style.textAlign = 'justify'\n break\n }\n }\n\n if (props?.overflow === 'ellipsis') {\n el.style.textOverflow = 'ellipsis'\n el.style.overflow = 'hidden'\n el.style.whiteSpace = 'nowrap'\n }\n\n if (props?.maxLines != null) {\n el.style.display = '-webkit-box'\n el.style.webkitLineClamp = `${props.maxLines}`\n ;(el.style as unknown as Record<string, string>)['-webkit-box-orient'] = 'vertical'\n el.style.overflow = 'hidden'\n }\n\n if (props?.minLines != null) {\n el.style.minHeight = `${props.minLines * (props.fontSize ?? 16) * 1.4}px`\n }\n\n applyModifier(el, props?.modifier, theme)\n\n return el\n}\n","import type { SduiComponent, ImageUiProperties, Theme } from '../types'\nimport { resolveColor } from '../utils'\nimport { applyModifier } from '../modifiers'\n\nexport function renderImage(component: SduiComponent, theme: Theme): HTMLElement {\n const props = component.properties as ImageUiProperties | undefined\n const el = document.createElement('img') as HTMLImageElement\n\n if (props?.image) {\n el.src = props.image\n }\n\n if (props?.contentDescription) {\n el.alt = props.contentDescription\n }\n\n if (props?.scaleType) {\n switch (props.scaleType) {\n case 'fit':\n case 'inside':\n el.style.objectFit = 'contain'\n break\n case 'crop':\n el.style.objectFit = 'cover'\n break\n case 'fill_bounds':\n el.style.objectFit = 'fill'\n break\n case 'fill_width':\n el.style.objectFit = 'cover'\n el.style.width = '100%'\n break\n case 'fill_height':\n el.style.objectFit = 'cover'\n el.style.height = '100%'\n break\n case 'none':\n el.style.objectFit = 'none'\n break\n }\n }\n\n if (props?.tintColor) {\n const c = resolveColor(props.tintColor, theme)\n if (c) {\n el.style.filter = `opacity(0.5) drop-shadow(0 0 0 ${c})`\n }\n }\n\n applyModifier(el, props?.modifier, theme)\n\n return el\n}\n","import type { SduiComponent, BoxUiProperties, Theme } from '../types'\nimport { applyModifier } from '../modifiers'\n\nexport function renderBox(component: SduiComponent, theme: Theme): HTMLElement {\n const props = component.properties as BoxUiProperties | undefined\n const el = document.createElement('div')\n\n el.style.display = 'flex'\n el.style.position = 'relative'\n\n if (props?.alignment) {\n switch (props.alignment) {\n case 'top_start':\n el.style.justifyContent = 'flex-start'\n el.style.alignItems = 'flex-start'\n break\n case 'top_center':\n el.style.justifyContent = 'center'\n el.style.alignItems = 'flex-start'\n break\n case 'top_end':\n el.style.justifyContent = 'flex-end'\n el.style.alignItems = 'flex-start'\n break\n case 'center_start':\n el.style.justifyContent = 'flex-start'\n el.style.alignItems = 'center'\n break\n case 'center':\n el.style.justifyContent = 'center'\n el.style.alignItems = 'center'\n break\n case 'center_end':\n el.style.justifyContent = 'flex-end'\n el.style.alignItems = 'center'\n break\n case 'bottom_start':\n el.style.justifyContent = 'flex-start'\n el.style.alignItems = 'flex-end'\n break\n case 'bottom_center':\n el.style.justifyContent = 'center'\n el.style.alignItems = 'flex-end'\n break\n case 'bottom_end':\n el.style.justifyContent = 'flex-end'\n el.style.alignItems = 'flex-end'\n break\n }\n }\n\n applyModifier(el, props?.modifier, theme)\n\n return el\n}\n","import type { SduiComponent, ColumnUiProperties, Theme } from '../types'\nimport { applyModifier } from '../modifiers'\n\nexport function renderColumn(component: SduiComponent, theme: Theme): HTMLElement {\n const props = component.properties as ColumnUiProperties | undefined\n const el = document.createElement('div')\n\n el.style.display = 'flex'\n el.style.flexDirection = 'column'\n\n if (props?.verticalArrangement) {\n const arr = props.verticalArrangement\n switch (arr.type) {\n case 'top':\n el.style.justifyContent = 'flex-start'\n break\n case 'center':\n el.style.justifyContent = 'center'\n break\n case 'bottom':\n el.style.justifyContent = 'flex-end'\n break\n case 'space_between':\n el.style.justifyContent = 'space-between'\n break\n case 'space_evenly':\n el.style.justifyContent = 'space-evenly'\n break\n case 'space_around':\n el.style.justifyContent = 'space-around'\n break\n case 'spaced_by':\n el.style.justifyContent = 'flex-start'\n if (arr.spacing != null) {\n el.style.gap = `${arr.spacing}px`\n }\n break\n }\n }\n\n if (props?.horizontalAlignment) {\n switch (props.horizontalAlignment) {\n case 'start':\n el.style.alignItems = 'flex-start'\n break\n case 'end':\n el.style.alignItems = 'flex-end'\n break\n case 'center_horizontally':\n el.style.alignItems = 'center'\n break\n }\n }\n\n if (props?.canScroll) {\n el.style.overflowY = 'auto'\n }\n\n applyModifier(el, props?.modifier, theme)\n\n return el\n}\n","import type { SduiComponent, RowUiProperties, Theme } from '../types'\nimport { applyModifier } from '../modifiers'\n\nexport function renderRow(component: SduiComponent, theme: Theme): HTMLElement {\n const props = component.properties as RowUiProperties | undefined\n const el = document.createElement('div')\n\n el.style.display = 'flex'\n el.style.flexDirection = 'row'\n\n if (props?.horizontalArrangement) {\n const arr = props.horizontalArrangement\n switch (arr.type) {\n case 'start':\n el.style.justifyContent = 'flex-start'\n break\n case 'center':\n el.style.justifyContent = 'center'\n break\n case 'end':\n el.style.justifyContent = 'flex-end'\n break\n case 'space_between':\n el.style.justifyContent = 'space-between'\n break\n case 'space_evenly':\n el.style.justifyContent = 'space-evenly'\n break\n case 'space_around':\n el.style.justifyContent = 'space-around'\n break\n case 'spaced_by':\n el.style.justifyContent = 'flex-start'\n if (arr.spacing != null) {\n el.style.gap = `${arr.spacing}px`\n }\n break\n }\n }\n\n if (props?.verticalAlignment) {\n switch (props.verticalAlignment) {\n case 'top':\n el.style.alignItems = 'flex-start'\n break\n case 'bottom':\n el.style.alignItems = 'flex-end'\n break\n case 'center_vertically':\n el.style.alignItems = 'center'\n break\n }\n }\n\n if (props?.canScroll) {\n el.style.overflowX = 'auto'\n }\n\n applyModifier(el, props?.modifier, theme)\n\n return el\n}\n","import type { SduiComponent, LazyColumnUiProperties, Theme } from '../types'\nimport { applyModifier } from '../modifiers'\n\nexport function renderLazyColumn(component: SduiComponent, theme: Theme): HTMLElement {\n const props = component.properties as LazyColumnUiProperties | undefined\n const el = document.createElement('div')\n\n el.style.display = 'flex'\n el.style.flexDirection = 'column'\n el.style.overflowY = 'auto'\n\n if (props?.verticalArrangement) {\n const arr = props.verticalArrangement\n switch (arr.type) {\n case 'top':\n el.style.justifyContent = 'flex-start'\n break\n case 'center':\n el.style.justifyContent = 'center'\n break\n case 'bottom':\n el.style.justifyContent = 'flex-end'\n break\n case 'space_between':\n el.style.justifyContent = 'space-between'\n break\n case 'space_evenly':\n el.style.justifyContent = 'space-evenly'\n break\n case 'space_around':\n el.style.justifyContent = 'space-around'\n break\n case 'spaced_by':\n el.style.justifyContent = 'flex-start'\n if (arr.spacing != null) {\n el.style.gap = `${arr.spacing}px`\n }\n break\n }\n }\n\n applyModifier(el, props?.modifier, theme)\n\n return el\n}\n","import type { SduiComponent, Theme } from '../types'\nimport { renderText } from './text'\nimport { renderImage } from './image'\nimport { renderBox } from './box'\nimport { renderColumn } from './column'\nimport { renderRow } from './row'\nimport { renderLazyColumn } from './lazy-column'\n\nexport type ComponentRenderer = (component: SduiComponent, theme: Theme) => HTMLElement\n\nconst renderers: Record<string, ComponentRenderer> = {\n text: renderText,\n image: renderImage,\n box: renderBox,\n column: renderColumn,\n row: renderRow,\n lazy_column: renderLazyColumn,\n}\n\nexport function getRenderer(type: string): ComponentRenderer | undefined {\n return renderers[type]\n}\n","import type { SduiComponent, Theme } from './types'\nimport { getRenderer } from './components'\n\nexport function renderComponent(component: SduiComponent, theme: Theme): HTMLElement {\n const renderer = getRenderer(component.type)\n\n if (!renderer) {\n console.warn(`[sdui] Unknown component type: \"${component.type}\"`)\n const el = document.createElement('div')\n el.dataset.sduiUnknown = component.type\n return el\n }\n\n const el = renderer(component, theme)\n el.dataset.sduiType = component.type\n\n if (component.children && component.children.length > 0) {\n for (const child of component.children) {\n el.appendChild(renderComponent(child, theme))\n }\n }\n\n return el\n}\n","import type { ComponentMeta, PropertyDescriptor } from './types'\n\n// === Reusable sub-object property builders ===\n\nfunction sizeModelProperties(): PropertyDescriptor[] {\n return [\n { name: 'value', label: 'Value', type: 'number' },\n { name: 'unit', label: 'Unit', type: 'enum', enumValues: ['dp', 'match_parent', 'wrap_content'] },\n ]\n}\n\nfunction spacingModelProperties(): PropertyDescriptor[] {\n return [\n { name: 'top', label: 'Top', type: 'number' },\n { name: 'bottom', label: 'Bottom', type: 'number' },\n { name: 'start', label: 'Start', type: 'number' },\n { name: 'end', label: 'End', type: 'number' },\n ]\n}\n\nfunction colorModelProperties(): PropertyDescriptor[] {\n return [\n { name: 'light', label: 'Light', type: 'color' },\n { name: 'dark', label: 'Dark', type: 'color' },\n ]\n}\n\nfunction actionModelProperties(): PropertyDescriptor[] {\n return [\n { name: 'type', label: 'Action Type', type: 'enum', enumValues: ['navigate'] },\n {\n name: 'params',\n label: 'Params',\n type: 'object',\n properties: [\n { name: 'route', label: 'Route', type: 'string' },\n { name: 'args', label: 'Args', type: 'object' },\n ],\n },\n ]\n}\n\nfunction backgroundColorModelProperties(): PropertyDescriptor[] {\n return [\n {\n name: 'colors',\n label: 'Colors',\n type: 'object',\n isArray: true,\n properties: colorModelProperties(),\n },\n {\n name: 'type',\n label: 'Background Type',\n type: 'enum',\n enumValues: ['single', 'vertical_gradient', 'horizontal_gradient', 'linear_gradient'],\n },\n ]\n}\n\n// === Modifier builders ===\n\nfunction modifierBaseProperties(): PropertyDescriptor[] {\n return [\n {\n name: 'alignment',\n label: 'Alignment',\n type: 'enum',\n enumValues: ['center', 'center_horizontally', 'center_vertically', 'start', 'top', 'end', 'bottom'],\n },\n { name: 'weight', label: 'Weight', type: 'number' },\n { name: 'action', label: 'Action', type: 'object', properties: actionModelProperties() },\n ]\n}\n\nfunction textModifierDescriptor(): PropertyDescriptor {\n return {\n name: 'modifier',\n label: 'Modifier',\n type: 'object',\n properties: [\n ...modifierBaseProperties(),\n { name: 'width', label: 'Width', type: 'object', properties: sizeModelProperties() },\n { name: 'margin', label: 'Margin', type: 'object', properties: spacingModelProperties() },\n ],\n }\n}\n\nfunction imageModifierDescriptor(): PropertyDescriptor {\n return {\n name: 'modifier',\n label: 'Modifier',\n type: 'object',\n properties: [\n ...modifierBaseProperties(),\n { name: 'width', label: 'Width', type: 'object', properties: sizeModelProperties() },\n { name: 'height', label: 'Height', type: 'object', properties: sizeModelProperties() },\n { name: 'padding', label: 'Padding', type: 'object', properties: spacingModelProperties() },\n { name: 'margin', label: 'Margin', type: 'object', properties: spacingModelProperties() },\n { name: 'aspectRatio', label: 'Aspect Ratio', type: 'number' },\n ],\n }\n}\n\nfunction containerModifierDescriptor(): PropertyDescriptor {\n return {\n name: 'modifier',\n label: 'Modifier',\n type: 'object',\n properties: [\n ...modifierBaseProperties(),\n { name: 'backgroundColor', label: 'Background Color', type: 'object', properties: backgroundColorModelProperties() },\n { name: 'width', label: 'Width', type: 'object', properties: sizeModelProperties() },\n { name: 'height', label: 'Height', type: 'object', properties: sizeModelProperties() },\n { name: 'padding', label: 'Padding', type: 'object', properties: spacingModelProperties() },\n { name: 'margin', label: 'Margin', type: 'object', properties: spacingModelProperties() },\n { name: 'aspectRatio', label: 'Aspect Ratio', type: 'number' },\n ],\n }\n}\n\n// === Arrangement descriptors ===\n\nfunction verticalArrangementDescriptor(): PropertyDescriptor {\n return {\n name: 'verticalArrangement',\n label: 'Vertical Arrangement',\n type: 'object',\n properties: [\n {\n name: 'type',\n label: 'Type',\n type: 'enum',\n enumValues: ['top', 'center', 'bottom', 'space_evenly', 'space_between', 'space_around', 'spaced_by'],\n },\n { name: 'spacing', label: 'Spacing', type: 'number' },\n ],\n }\n}\n\nfunction horizontalArrangementDescriptor(): PropertyDescriptor {\n return {\n name: 'horizontalArrangement',\n label: 'Horizontal Arrangement',\n type: 'object',\n properties: [\n {\n name: 'type',\n label: 'Type',\n type: 'enum',\n enumValues: ['start', 'center', 'end', 'space_between', 'space_evenly', 'space_around', 'spaced_by'],\n },\n { name: 'spacing', label: 'Spacing', type: 'number' },\n ],\n }\n}\n\n// === Component definitions ===\n\nconst COMPONENT_DEFINITIONS: ComponentMeta[] = [\n {\n type: 'text',\n label: 'Text',\n acceptsChildren: false,\n properties: [\n textModifierDescriptor(),\n { name: 'text', label: 'Text', type: 'string', required: true },\n { name: 'fontSize', label: 'Font Size', type: 'number' },\n { name: 'color', label: 'Color', type: 'object', properties: colorModelProperties() },\n { name: 'fontWeight', label: 'Font Weight', type: 'enum', enumValues: ['bold', 'medium', 'normal', 'semi_bold'] },\n { name: 'textAlign', label: 'Text Align', type: 'enum', enumValues: ['left', 'right', 'center', 'justify', 'start', 'end', 'unspecified'] },\n { name: 'overflow', label: 'Overflow', type: 'enum', enumValues: ['none', 'ellipsis'] },\n { name: 'maxLines', label: 'Max Lines', type: 'number' },\n { name: 'minLines', label: 'Min Lines', type: 'number' },\n ],\n },\n {\n type: 'image',\n label: 'Image',\n acceptsChildren: false,\n properties: [\n imageModifierDescriptor(),\n { name: 'image', label: 'Image URL', type: 'string', required: true },\n { name: 'scaleType', label: 'Scale Type', type: 'enum', enumValues: ['fit', 'crop', 'fill_height', 'fill_width', 'fill_bounds', 'inside', 'none'] },\n { name: 'contentDescription', label: 'Content Description', type: 'string' },\n { name: 'tintColor', label: 'Tint Color', type: 'object', properties: colorModelProperties() },\n ],\n },\n {\n type: 'box',\n label: 'Box',\n acceptsChildren: true,\n properties: [\n containerModifierDescriptor(),\n {\n name: 'alignment',\n label: 'Alignment',\n type: 'enum',\n enumValues: ['top_start', 'top_center', 'top_end', 'center_start', 'center', 'center_end', 'bottom_start', 'bottom_center', 'bottom_end'],\n },\n ],\n },\n {\n type: 'column',\n label: 'Column',\n acceptsChildren: true,\n properties: [\n containerModifierDescriptor(),\n verticalArrangementDescriptor(),\n { name: 'horizontalAlignment', label: 'Horizontal Alignment', type: 'enum', enumValues: ['start', 'end', 'center_horizontally'] },\n { name: 'canScroll', label: 'Can Scroll', type: 'boolean' },\n ],\n },\n {\n type: 'row',\n label: 'Row',\n acceptsChildren: true,\n properties: [\n containerModifierDescriptor(),\n { name: 'verticalAlignment', label: 'Vertical Alignment', type: 'enum', enumValues: ['top', 'bottom', 'center_vertically'] },\n horizontalArrangementDescriptor(),\n { name: 'canScroll', label: 'Can Scroll', type: 'boolean' },\n ],\n },\n {\n type: 'lazy_column',\n label: 'Lazy Column',\n acceptsChildren: true,\n properties: [\n containerModifierDescriptor(),\n verticalArrangementDescriptor(),\n ],\n },\n]\n\n// === Public API ===\n\nexport function getComponents(): ComponentMeta[] {\n return JSON.parse(JSON.stringify(COMPONENT_DEFINITIONS))\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACEO,SAAS,aAAa,OAA+B,OAAkC;AAC5F,MAAI,CAAC,MAAO,QAAO;AACnB,MAAI,UAAU,QAAQ;AACpB,WAAO,MAAM,QAAQ,MAAM;AAAA,EAC7B;AACA,SAAO,MAAM,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;A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AY,CAAC,SAAS,OAAO,qBAAqB,EAAE;AAAA,MAChI,EAAE,MAAM,aAAa,OAAO,cAAc,MAAM,UAAU;AAAA,IAC5D;AAAA,EACF;AAAA,EACA;AAAA,IACE,MAAM;AAAA,IACN,OAAO;AAAA,IACP,iBAAiB;AAAA,IACjB,YAAY;AAAA,MACV,4BAA4B;AAAA,MAC5B,EAAE,MAAM,qBAAqB,OAAO,sBAAsB,MAAM,QAAQ,YAAY,CAAC,OAAO,UAAU,mBAAmB,EAAE;AAAA,MAC3H,gCAAgC;AAAA,MAChC,EAAE,MAAM,aAAa,OAAO,cAAc,MAAM,UAAU;AAAA,IAC5D;AAAA,EACF;AAAA,EACA;AAAA,IACE,MAAM;AAAA,IACN,OAAO;AAAA,IACP,iBAAiB;AAAA,IACjB,YAAY;AAAA,MACV,4BAA4B;AAAA,MAC5B,8BAA8B;AAAA,IAChC;AAAA,EACF;AACF;AAIO,SAAS,gBAAiC;AAC/C,SAAO,KAAK,MAAM,KAAK,UAAU,qBAAqB,CAAC;AACzD;;;AXxOO,SAAS,OAAO,MAAc,WAAwB,SAA+B;AAC1F,QAAM,SAAqB,KAAK,MAAM,IAAI;AAC1C,QAAM,QAAe,SAAS,SAAS;AAEvC,QAAM,OAAO,gBAAgB,OAAO,MAAM,KAAK;AAE/C,YAAU,YAAY;AACtB,YAAU,YAAY,IAAI;AAC5B;","names":["el"]}
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,GAAG,QAAQ,GAAG,OAAO;AAAA,IAChD,QAAQ,QAAQ,UAAU,OAAO,GAAG,QAAQ,MAAM,OAAO;AAAA,IACzD,MAAM,QAAQ,SAAS,OAAO,GAAG,QAAQ,KAAK,OAAO;AAAA,IACrD,OAAO,QAAQ,OAAO,OAAO,GAAG,QAAQ,GAAG,OAAO;AAAA,EACpD;AACF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AAE,MAAM,cAAc,OAAO,KAAK,QAAQ,IAAI;AAAA,MAC9C,EAAE,MAAM,aAAa,OAAO,KAAK,QAAQ,IAAI;AAAA,MAC7C,EAAE,MAAM,cAAc,OAAO,KAAK,QAAQ,IAAI;AAAA,IAChD;AAAA,EACF;AAAA,EACA,QAAQ;AAAA,IACN,UAAU;AAAA,MACR,EAAE,MAAM,kBAAkB,OAAO,KAAK,QAAQ,KAAK;AAAA,IACrD;AAAA,IACA,WAAW;AAAA,MACT,EAAE,MAAM,kBAAkB,OAAO,KAAK,QAAQ,KAAK;AAAA,MACnD,EAAE,MAAM,mBAAmB,OAAO,KAAK,QAAQ,KAAK;AAAA,MACpD,EAAE,MAAM,wBAAwB,OAAO,KAAK,QAAQ,KAAK;AAAA,IAC3D;AAAA,IACA,OAAO;AAAA,MACL,EAAE,MAAM,gBAAgB,OAAO,MAAM,QAAQ,KAAK;AAAA,MAClD,EAAE,MAAM,gBAAgB,OAAO,KAAK,QAAQ,KAAK;AAAA,MACjD,EAAE,MAAM,YAAY,OAAO,KAAK,QAAQ,KAAK;AAAA,MAC7C,EAAE,MAAM,aAAa,OAAO,KAAK,QAAQ,KAAK;AAAA,IAChD;AAAA,EACF;AACF;AAEO,SAAS,mBAA2E;AACzF,SAAO,KAAK,MAAM,KAAK,UAAU,cAAc,CAAC;AAClD;;;AZ5CO,SAAS,OAAO,MAAc,WAAwB,SAA+B;AAC1F,QAAM,SAAqB,KAAK,MAAM,IAAI;AAC1C,QAAM,QAAe,SAAS,SAAS;AAEvC,QAAM,OAAO,gBAAgB,OAAO,MAAM,KAAK;AAE/C,YAAU,YAAY;AACtB,YAAU,YAAY,IAAI;AAC5B;","names":["el"]}
package/dist/index.d.cts CHANGED
@@ -2,7 +2,6 @@ type ComponentType = 'text' | 'image' | 'box' | 'column' | 'row' | 'lazy_column'
2
2
  type AlignmentType = 'top_start' | 'top_center' | 'top_end' | 'center_start' | 'center' | 'center_end' | 'bottom_start' | 'bottom_center' | 'bottom_end';
3
3
  type FontWeightType = 'bold' | 'medium' | 'normal' | 'semi_bold';
4
4
  type SizeUnitType = 'dp' | 'match_parent' | 'wrap_content';
5
- type ActionType = 'navigate';
6
5
  type BackgroundColorType = 'single' | 'vertical_gradient' | 'horizontal_gradient' | 'linear_gradient';
7
6
  type ContentScaleType = 'fit' | 'crop' | 'fill_height' | 'fill_width' | 'fill_bounds' | 'inside' | 'none';
8
7
  type TextAlignType = 'left' | 'right' | 'center' | 'justify' | 'start' | 'end' | 'unspecified';
@@ -27,12 +26,8 @@ interface SpacingModel {
27
26
  end?: number;
28
27
  }
29
28
  interface ActionModel {
30
- type?: ActionType;
31
- params?: ActionParams;
32
- }
33
- interface ActionParams {
34
- route?: string;
35
- args?: Record<string, string>;
29
+ type?: string;
30
+ params?: Record<string, string>;
36
31
  }
37
32
  interface BackgroundColorModel {
38
33
  colors?: ColorModel[];
@@ -141,9 +136,19 @@ interface ComponentMeta {
141
136
 
142
137
  declare function getComponents(): ComponentMeta[];
143
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
+
144
149
  interface RenderOptions {
145
150
  theme?: Theme;
146
151
  }
147
152
  declare function render(json: string, container: HTMLElement, options?: RenderOptions): void;
148
153
 
149
- export { type ActionModel, type ActionParams, type ActionType, type AlignmentType, type BackgroundColorModel, type BackgroundColorType, type BoxUiProperties, type ColorModel, type ColumnUiProperties, type ComponentMeta, type ComponentType, type ContainerUiModifier, type ContentScaleType, type DefaultUiProperties, type FontWeightType, type HorizontalAlignmentType, type HorizontalArrangementModel, type HorizontalArrangementType, type ImageUiModifier, type ImageUiProperties, type LazyColumnUiProperties, type ModifierBase, type PropertiesModel, type PropertyDescriptor, type PropertyType, type RenderOptions, type RowUiProperties, type SduiComponent, type SduiScreen, type SizeModel, type SizeUnitType, type SpacingModel, type TextAlignType, type TextOverflowType, type TextUiModifier, type TextUiProperties, type Theme, type VerticalAlignmentType, type VerticalArrangementModel, type VerticalArrangementType, getComponents, render };
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
@@ -2,7 +2,6 @@ type ComponentType = 'text' | 'image' | 'box' | 'column' | 'row' | 'lazy_column'
2
2
  type AlignmentType = 'top_start' | 'top_center' | 'top_end' | 'center_start' | 'center' | 'center_end' | 'bottom_start' | 'bottom_center' | 'bottom_end';
3
3
  type FontWeightType = 'bold' | 'medium' | 'normal' | 'semi_bold';
4
4
  type SizeUnitType = 'dp' | 'match_parent' | 'wrap_content';
5
- type ActionType = 'navigate';
6
5
  type BackgroundColorType = 'single' | 'vertical_gradient' | 'horizontal_gradient' | 'linear_gradient';
7
6
  type ContentScaleType = 'fit' | 'crop' | 'fill_height' | 'fill_width' | 'fill_bounds' | 'inside' | 'none';
8
7
  type TextAlignType = 'left' | 'right' | 'center' | 'justify' | 'start' | 'end' | 'unspecified';
@@ -27,12 +26,8 @@ interface SpacingModel {
27
26
  end?: number;
28
27
  }
29
28
  interface ActionModel {
30
- type?: ActionType;
31
- params?: ActionParams;
32
- }
33
- interface ActionParams {
34
- route?: string;
35
- args?: Record<string, string>;
29
+ type?: string;
30
+ params?: Record<string, string>;
36
31
  }
37
32
  interface BackgroundColorModel {
38
33
  colors?: ColorModel[];
@@ -141,9 +136,19 @@ interface ComponentMeta {
141
136
 
142
137
  declare function getComponents(): ComponentMeta[];
143
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
+
144
149
  interface RenderOptions {
145
150
  theme?: Theme;
146
151
  }
147
152
  declare function render(json: string, container: HTMLElement, options?: RenderOptions): void;
148
153
 
149
- export { type ActionModel, type ActionParams, type ActionType, type AlignmentType, type BackgroundColorModel, type BackgroundColorType, type BoxUiProperties, type ColorModel, type ColumnUiProperties, type ComponentMeta, type ComponentType, type ContainerUiModifier, type ContentScaleType, type DefaultUiProperties, type FontWeightType, type HorizontalAlignmentType, type HorizontalArrangementModel, type HorizontalArrangementType, type ImageUiModifier, type ImageUiProperties, type LazyColumnUiProperties, type ModifierBase, type PropertiesModel, type PropertyDescriptor, type PropertyType, type RenderOptions, type RowUiProperties, type SduiComponent, type SduiScreen, type SizeModel, type SizeUnitType, type SpacingModel, type TextAlignType, type TextOverflowType, type TextUiModifier, type TextUiProperties, type Theme, type VerticalAlignmentType, type VerticalArrangementModel, type VerticalArrangementType, getComponents, render };
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
@@ -35,6 +35,7 @@ function applyModifier(element, modifier, theme) {
35
35
  const s = element.style;
36
36
  if (modifier.alignment) {
37
37
  switch (modifier.alignment) {
38
+ // Single-axis (Column / Row children)
38
39
  case "center":
39
40
  case "center_horizontally":
40
41
  case "center_vertically":
@@ -48,6 +49,39 @@ function applyModifier(element, modifier, theme) {
48
49
  case "bottom":
49
50
  s.alignSelf = "flex-end";
50
51
  break;
52
+ // Two-axis (Box children — grid layout)
53
+ case "top_start":
54
+ s.alignSelf = "start";
55
+ s.justifySelf = "start";
56
+ break;
57
+ case "top_center":
58
+ s.alignSelf = "start";
59
+ s.justifySelf = "center";
60
+ break;
61
+ case "top_end":
62
+ s.alignSelf = "start";
63
+ s.justifySelf = "end";
64
+ break;
65
+ case "center_start":
66
+ s.alignSelf = "center";
67
+ s.justifySelf = "start";
68
+ break;
69
+ case "center_end":
70
+ s.alignSelf = "center";
71
+ s.justifySelf = "end";
72
+ break;
73
+ case "bottom_start":
74
+ s.alignSelf = "end";
75
+ s.justifySelf = "start";
76
+ break;
77
+ case "bottom_center":
78
+ s.alignSelf = "end";
79
+ s.justifySelf = "center";
80
+ break;
81
+ case "bottom_end":
82
+ s.alignSelf = "end";
83
+ s.justifySelf = "end";
84
+ break;
51
85
  }
52
86
  }
53
87
  if (modifier.weight != null) {
@@ -60,12 +94,10 @@ function applyModifier(element, modifier, theme) {
60
94
  s.cursor = "pointer";
61
95
  element.addEventListener("click", (e) => {
62
96
  e.stopPropagation();
63
- if (action.type === "navigate") {
64
- element.dispatchEvent(new CustomEvent("sdui:navigate", {
65
- bubbles: true,
66
- detail: { route: action.params?.route, args: action.params?.args }
67
- }));
68
- }
97
+ element.dispatchEvent(new CustomEvent("sdui:action", {
98
+ bubbles: true,
99
+ detail: { type: action.type, params: action.params }
100
+ }));
69
101
  });
70
102
  }
71
103
  const mod = modifier;
@@ -240,45 +272,45 @@ function renderImage(component, theme) {
240
272
  function renderBox(component, theme) {
241
273
  const props = component.properties;
242
274
  const el = document.createElement("div");
243
- el.style.display = "flex";
275
+ el.style.display = "grid";
244
276
  el.style.position = "relative";
245
277
  if (props?.alignment) {
246
278
  switch (props.alignment) {
247
279
  case "top_start":
248
- el.style.justifyContent = "flex-start";
249
- el.style.alignItems = "flex-start";
280
+ el.style.justifyItems = "start";
281
+ el.style.alignItems = "start";
250
282
  break;
251
283
  case "top_center":
252
- el.style.justifyContent = "center";
253
- el.style.alignItems = "flex-start";
284
+ el.style.justifyItems = "center";
285
+ el.style.alignItems = "start";
254
286
  break;
255
287
  case "top_end":
256
- el.style.justifyContent = "flex-end";
257
- el.style.alignItems = "flex-start";
288
+ el.style.justifyItems = "end";
289
+ el.style.alignItems = "start";
258
290
  break;
259
291
  case "center_start":
260
- el.style.justifyContent = "flex-start";
292
+ el.style.justifyItems = "start";
261
293
  el.style.alignItems = "center";
262
294
  break;
263
295
  case "center":
264
- el.style.justifyContent = "center";
296
+ el.style.justifyItems = "center";
265
297
  el.style.alignItems = "center";
266
298
  break;
267
299
  case "center_end":
268
- el.style.justifyContent = "flex-end";
300
+ el.style.justifyItems = "end";
269
301
  el.style.alignItems = "center";
270
302
  break;
271
303
  case "bottom_start":
272
- el.style.justifyContent = "flex-start";
273
- el.style.alignItems = "flex-end";
304
+ el.style.justifyItems = "start";
305
+ el.style.alignItems = "end";
274
306
  break;
275
307
  case "bottom_center":
276
- el.style.justifyContent = "center";
277
- el.style.alignItems = "flex-end";
308
+ el.style.justifyItems = "center";
309
+ el.style.alignItems = "end";
278
310
  break;
279
311
  case "bottom_end":
280
- el.style.justifyContent = "flex-end";
281
- el.style.alignItems = "flex-end";
312
+ el.style.justifyItems = "end";
313
+ el.style.alignItems = "end";
282
314
  break;
283
315
  }
284
316
  }
@@ -491,16 +523,8 @@ function colorModelProperties() {
491
523
  }
492
524
  function actionModelProperties() {
493
525
  return [
494
- { name: "type", label: "Action Type", type: "enum", enumValues: ["navigate"] },
495
- {
496
- name: "params",
497
- label: "Params",
498
- type: "object",
499
- properties: [
500
- { name: "route", label: "Route", type: "string" },
501
- { name: "args", label: "Args", type: "object" }
502
- ]
503
- }
526
+ { name: "type", label: "Action Type", type: "string" },
527
+ { name: "params", label: "Parameters", type: "object" }
504
528
  ];
505
529
  }
506
530
  function backgroundColorModelProperties() {
@@ -526,7 +550,7 @@ function modifierBaseProperties() {
526
550
  name: "alignment",
527
551
  label: "Alignment",
528
552
  type: "enum",
529
- enumValues: ["center", "center_horizontally", "center_vertically", "start", "top", "end", "bottom"]
553
+ 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"]
530
554
  },
531
555
  { name: "weight", label: "Weight", type: "number" },
532
556
  { name: "action", label: "Action", type: "object", properties: actionModelProperties() }
@@ -613,15 +637,15 @@ var COMPONENT_DEFINITIONS = [
613
637
  label: "Text",
614
638
  acceptsChildren: false,
615
639
  properties: [
616
- textModifierDescriptor(),
617
- { name: "text", label: "Text", type: "string", required: true },
640
+ { name: "text", label: "Text", type: "string", required: true, defaultValue: "Text" },
618
641
  { name: "fontSize", label: "Font Size", type: "number" },
619
642
  { name: "color", label: "Color", type: "object", properties: colorModelProperties() },
620
643
  { name: "fontWeight", label: "Font Weight", type: "enum", enumValues: ["bold", "medium", "normal", "semi_bold"] },
621
644
  { name: "textAlign", label: "Text Align", type: "enum", enumValues: ["left", "right", "center", "justify", "start", "end", "unspecified"] },
622
645
  { name: "overflow", label: "Overflow", type: "enum", enumValues: ["none", "ellipsis"] },
623
646
  { name: "maxLines", label: "Max Lines", type: "number" },
624
- { name: "minLines", label: "Min Lines", type: "number" }
647
+ { name: "minLines", label: "Min Lines", type: "number", defaultValue: 1 },
648
+ textModifierDescriptor()
625
649
  ]
626
650
  },
627
651
  {
@@ -686,6 +710,49 @@ function getComponents() {
686
710
  return JSON.parse(JSON.stringify(COMPONENT_DEFINITIONS));
687
711
  }
688
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
+
689
756
  // src/index.ts
690
757
  function render(json, container, options) {
691
758
  const screen = JSON.parse(json);
@@ -696,6 +763,7 @@ function render(json, container, options) {
696
763
  }
697
764
  export {
698
765
  getComponents,
766
+ getDevicePresets,
699
767
  render
700
768
  };
701
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\n if (modifier.alignment) {\n switch (modifier.alignment) {\n case 'center':\n case 'center_horizontally':\n case 'center_vertically':\n s.alignSelf = 'center'\n break\n case 'start':\n case 'top':\n s.alignSelf = 'flex-start'\n break\n case 'end':\n case 'bottom':\n s.alignSelf = 'flex-end'\n break\n }\n }\n\n // weight → flex\n if (modifier.weight != null) {\n s.flex = `${modifier.weight}`\n s.minWidth = '0'\n s.minHeight = '0'\n }\n\n // action → click handler\n if (modifier.action) {\n const action = modifier.action\n s.cursor = 'pointer'\n element.addEventListener('click', (e) => {\n e.stopPropagation()\n if (action.type === 'navigate') {\n element.dispatchEvent(new CustomEvent('sdui:navigate', {\n bubbles: true,\n detail: { route: action.params?.route, args: action.params?.args },\n }))\n }\n })\n }\n\n // Extended modifier fields (width, height, padding, margin, backgroundColor, aspectRatio)\n const mod = modifier as ContainerUiModifier | ImageUiModifier | TextUiModifier\n\n const hasAspectRatio = 'aspectRatio' in mod && mod.aspectRatio != null\n const hasWidth = 'width' in mod && mod.width\n const hasHeight = 'height' in mod && (mod as ContainerUiModifier).height\n\n if (hasWidth) {\n const w = resolveSize(mod.width)\n if (w) s.width = w\n }\n\n if (hasHeight && !(hasAspectRatio && hasWidth)) {\n const h = resolveSize((mod as ContainerUiModifier).height)\n if (h) s.height = h\n }\n\n if (hasAspectRatio) {\n s.aspectRatio = `${(mod as ContainerUiModifier).aspectRatio}`\n }\n\n if ('padding' in mod && mod.padding) {\n const p = resolveSpacing((mod as ContainerUiModifier).padding)\n if (p.top) s.paddingTop = p.top\n if (p.bottom) s.paddingBottom = p.bottom\n if (p.left) s.paddingLeft = p.left\n if (p.right) s.paddingRight = p.right\n }\n\n if ('margin' in mod && mod.margin) {\n const m = resolveSpacing(mod.margin)\n if (m.top) s.marginTop = m.top\n if (m.bottom) s.marginBottom = m.bottom\n if (m.left) s.marginLeft = m.left\n if (m.right) s.marginRight = m.right\n }\n\n if ('backgroundColor' in mod && mod.backgroundColor) {\n applyBackground(s, (mod as ContainerUiModifier).backgroundColor!, theme)\n }\n}\n\nfunction applyBackground(s: CSSStyleDeclaration, bg: BackgroundColorModel, theme: Theme): void {\n if (!bg.colors || bg.colors.length === 0) return\n\n const colors = bg.colors.map((c) => resolveColor(c, theme)).filter(Boolean) as string[]\n if (colors.length === 0) return\n\n switch (bg.type) {\n case 'single':\n s.backgroundColor = colors[0]\n break\n case 'vertical_gradient':\n s.background = `linear-gradient(to bottom, ${colors.join(', ')})`\n break\n case 'horizontal_gradient':\n s.background = `linear-gradient(to right, ${colors.join(', ')})`\n break\n case 'linear_gradient':\n s.background = `linear-gradient(${colors.join(', ')})`\n break\n default:\n if (colors.length === 1) {\n s.backgroundColor = colors[0]\n }\n break\n }\n}\n","import type { SduiComponent, TextUiProperties, Theme } from '../types'\nimport { resolveColor } from '../utils'\nimport { applyModifier } from '../modifiers'\n\nexport function renderText(component: SduiComponent, theme: Theme): HTMLElement {\n const props = component.properties as TextUiProperties | undefined\n const el = document.createElement('span')\n\n el.textContent = props?.text ?? ''\n\n if (props?.fontSize != null) {\n el.style.fontSize = `${props.fontSize}px`\n }\n\n if (props?.color) {\n const c = resolveColor(props.color, theme)\n if (c) el.style.color = c\n }\n\n if (props?.fontWeight) {\n switch (props.fontWeight) {\n case 'bold':\n el.style.fontWeight = '700'\n break\n case 'semi_bold':\n el.style.fontWeight = '600'\n break\n case 'medium':\n el.style.fontWeight = '500'\n break\n case 'normal':\n el.style.fontWeight = '400'\n break\n }\n }\n\n if (props?.textAlign) {\n el.style.display = 'block'\n switch (props.textAlign) {\n case 'left':\n case 'start':\n el.style.textAlign = 'left'\n break\n case 'right':\n case 'end':\n el.style.textAlign = 'right'\n break\n case 'center':\n el.style.textAlign = 'center'\n break\n case 'justify':\n el.style.textAlign = 'justify'\n break\n }\n }\n\n if (props?.overflow === 'ellipsis') {\n el.style.textOverflow = 'ellipsis'\n el.style.overflow = 'hidden'\n el.style.whiteSpace = 'nowrap'\n }\n\n if (props?.maxLines != null) {\n el.style.display = '-webkit-box'\n el.style.webkitLineClamp = `${props.maxLines}`\n ;(el.style as unknown as Record<string, string>)['-webkit-box-orient'] = 'vertical'\n el.style.overflow = 'hidden'\n }\n\n if (props?.minLines != null) {\n el.style.minHeight = `${props.minLines * (props.fontSize ?? 16) * 1.4}px`\n }\n\n applyModifier(el, props?.modifier, theme)\n\n return el\n}\n","import type { SduiComponent, ImageUiProperties, Theme } from '../types'\nimport { resolveColor } from '../utils'\nimport { applyModifier } from '../modifiers'\n\nexport function renderImage(component: SduiComponent, theme: Theme): HTMLElement {\n const props = component.properties as ImageUiProperties | undefined\n const el = document.createElement('img') as HTMLImageElement\n\n if (props?.image) {\n el.src = props.image\n }\n\n if (props?.contentDescription) {\n el.alt = props.contentDescription\n }\n\n if (props?.scaleType) {\n switch (props.scaleType) {\n case 'fit':\n case 'inside':\n el.style.objectFit = 'contain'\n break\n case 'crop':\n el.style.objectFit = 'cover'\n break\n case 'fill_bounds':\n el.style.objectFit = 'fill'\n break\n case 'fill_width':\n el.style.objectFit = 'cover'\n el.style.width = '100%'\n break\n case 'fill_height':\n el.style.objectFit = 'cover'\n el.style.height = '100%'\n break\n case 'none':\n el.style.objectFit = 'none'\n break\n }\n }\n\n if (props?.tintColor) {\n const c = resolveColor(props.tintColor, theme)\n if (c) {\n el.style.filter = `opacity(0.5) drop-shadow(0 0 0 ${c})`\n }\n }\n\n applyModifier(el, props?.modifier, theme)\n\n return el\n}\n","import type { SduiComponent, BoxUiProperties, Theme } from '../types'\nimport { applyModifier } from '../modifiers'\n\nexport function renderBox(component: SduiComponent, theme: Theme): HTMLElement {\n const props = component.properties as BoxUiProperties | undefined\n const el = document.createElement('div')\n\n el.style.display = 'flex'\n el.style.position = 'relative'\n\n if (props?.alignment) {\n switch (props.alignment) {\n case 'top_start':\n el.style.justifyContent = 'flex-start'\n el.style.alignItems = 'flex-start'\n break\n case 'top_center':\n el.style.justifyContent = 'center'\n el.style.alignItems = 'flex-start'\n break\n case 'top_end':\n el.style.justifyContent = 'flex-end'\n el.style.alignItems = 'flex-start'\n break\n case 'center_start':\n el.style.justifyContent = 'flex-start'\n el.style.alignItems = 'center'\n break\n case 'center':\n el.style.justifyContent = 'center'\n el.style.alignItems = 'center'\n break\n case 'center_end':\n el.style.justifyContent = 'flex-end'\n el.style.alignItems = 'center'\n break\n case 'bottom_start':\n el.style.justifyContent = 'flex-start'\n el.style.alignItems = 'flex-end'\n break\n case 'bottom_center':\n el.style.justifyContent = 'center'\n el.style.alignItems = 'flex-end'\n break\n case 'bottom_end':\n el.style.justifyContent = 'flex-end'\n el.style.alignItems = 'flex-end'\n break\n }\n }\n\n applyModifier(el, props?.modifier, theme)\n\n return el\n}\n","import type { SduiComponent, ColumnUiProperties, Theme } from '../types'\nimport { applyModifier } from '../modifiers'\n\nexport function renderColumn(component: SduiComponent, theme: Theme): HTMLElement {\n const props = component.properties as ColumnUiProperties | undefined\n const el = document.createElement('div')\n\n el.style.display = 'flex'\n el.style.flexDirection = 'column'\n\n if (props?.verticalArrangement) {\n const arr = props.verticalArrangement\n switch (arr.type) {\n case 'top':\n el.style.justifyContent = 'flex-start'\n break\n case 'center':\n el.style.justifyContent = 'center'\n break\n case 'bottom':\n el.style.justifyContent = 'flex-end'\n break\n case 'space_between':\n el.style.justifyContent = 'space-between'\n break\n case 'space_evenly':\n el.style.justifyContent = 'space-evenly'\n break\n case 'space_around':\n el.style.justifyContent = 'space-around'\n break\n case 'spaced_by':\n el.style.justifyContent = 'flex-start'\n if (arr.spacing != null) {\n el.style.gap = `${arr.spacing}px`\n }\n break\n }\n }\n\n if (props?.horizontalAlignment) {\n switch (props.horizontalAlignment) {\n case 'start':\n el.style.alignItems = 'flex-start'\n break\n case 'end':\n el.style.alignItems = 'flex-end'\n break\n case 'center_horizontally':\n el.style.alignItems = 'center'\n break\n }\n }\n\n if (props?.canScroll) {\n el.style.overflowY = 'auto'\n }\n\n applyModifier(el, props?.modifier, theme)\n\n return el\n}\n","import type { SduiComponent, RowUiProperties, Theme } from '../types'\nimport { applyModifier } from '../modifiers'\n\nexport function renderRow(component: SduiComponent, theme: Theme): HTMLElement {\n const props = component.properties as RowUiProperties | undefined\n const el = document.createElement('div')\n\n el.style.display = 'flex'\n el.style.flexDirection = 'row'\n\n if (props?.horizontalArrangement) {\n const arr = props.horizontalArrangement\n switch (arr.type) {\n case 'start':\n el.style.justifyContent = 'flex-start'\n break\n case 'center':\n el.style.justifyContent = 'center'\n break\n case 'end':\n el.style.justifyContent = 'flex-end'\n break\n case 'space_between':\n el.style.justifyContent = 'space-between'\n break\n case 'space_evenly':\n el.style.justifyContent = 'space-evenly'\n break\n case 'space_around':\n el.style.justifyContent = 'space-around'\n break\n case 'spaced_by':\n el.style.justifyContent = 'flex-start'\n if (arr.spacing != null) {\n el.style.gap = `${arr.spacing}px`\n }\n break\n }\n }\n\n if (props?.verticalAlignment) {\n switch (props.verticalAlignment) {\n case 'top':\n el.style.alignItems = 'flex-start'\n break\n case 'bottom':\n el.style.alignItems = 'flex-end'\n break\n case 'center_vertically':\n el.style.alignItems = 'center'\n break\n }\n }\n\n if (props?.canScroll) {\n el.style.overflowX = 'auto'\n }\n\n applyModifier(el, props?.modifier, theme)\n\n return el\n}\n","import type { SduiComponent, LazyColumnUiProperties, Theme } from '../types'\nimport { applyModifier } from '../modifiers'\n\nexport function renderLazyColumn(component: SduiComponent, theme: Theme): HTMLElement {\n const props = component.properties as LazyColumnUiProperties | undefined\n const el = document.createElement('div')\n\n el.style.display = 'flex'\n el.style.flexDirection = 'column'\n el.style.overflowY = 'auto'\n\n if (props?.verticalArrangement) {\n const arr = props.verticalArrangement\n switch (arr.type) {\n case 'top':\n el.style.justifyContent = 'flex-start'\n break\n case 'center':\n el.style.justifyContent = 'center'\n break\n case 'bottom':\n el.style.justifyContent = 'flex-end'\n break\n case 'space_between':\n el.style.justifyContent = 'space-between'\n break\n case 'space_evenly':\n el.style.justifyContent = 'space-evenly'\n break\n case 'space_around':\n el.style.justifyContent = 'space-around'\n break\n case 'spaced_by':\n el.style.justifyContent = 'flex-start'\n if (arr.spacing != null) {\n el.style.gap = `${arr.spacing}px`\n }\n break\n }\n }\n\n applyModifier(el, props?.modifier, theme)\n\n return el\n}\n","import type { SduiComponent, Theme } from '../types'\nimport { renderText } from './text'\nimport { renderImage } from './image'\nimport { renderBox } from './box'\nimport { renderColumn } from './column'\nimport { renderRow } from './row'\nimport { renderLazyColumn } from './lazy-column'\n\nexport type ComponentRenderer = (component: SduiComponent, theme: Theme) => HTMLElement\n\nconst renderers: Record<string, ComponentRenderer> = {\n text: renderText,\n image: renderImage,\n box: renderBox,\n column: renderColumn,\n row: renderRow,\n lazy_column: renderLazyColumn,\n}\n\nexport function getRenderer(type: string): ComponentRenderer | undefined {\n return renderers[type]\n}\n","import type { SduiComponent, Theme } from './types'\nimport { getRenderer } from './components'\n\nexport function renderComponent(component: SduiComponent, theme: Theme): HTMLElement {\n const renderer = getRenderer(component.type)\n\n if (!renderer) {\n console.warn(`[sdui] Unknown component type: \"${component.type}\"`)\n const el = document.createElement('div')\n el.dataset.sduiUnknown = component.type\n return el\n }\n\n const el = renderer(component, theme)\n el.dataset.sduiType = component.type\n\n if (component.children && component.children.length > 0) {\n for (const child of component.children) {\n el.appendChild(renderComponent(child, theme))\n }\n }\n\n return el\n}\n","import type { ComponentMeta, PropertyDescriptor } from './types'\n\n// === Reusable sub-object property builders ===\n\nfunction sizeModelProperties(): PropertyDescriptor[] {\n return [\n { name: 'value', label: 'Value', type: 'number' },\n { name: 'unit', label: 'Unit', type: 'enum', enumValues: ['dp', 'match_parent', 'wrap_content'] },\n ]\n}\n\nfunction spacingModelProperties(): PropertyDescriptor[] {\n return [\n { name: 'top', label: 'Top', type: 'number' },\n { name: 'bottom', label: 'Bottom', type: 'number' },\n { name: 'start', label: 'Start', type: 'number' },\n { name: 'end', label: 'End', type: 'number' },\n ]\n}\n\nfunction colorModelProperties(): PropertyDescriptor[] {\n return [\n { name: 'light', label: 'Light', type: 'color' },\n { name: 'dark', label: 'Dark', type: 'color' },\n ]\n}\n\nfunction actionModelProperties(): PropertyDescriptor[] {\n return [\n { name: 'type', label: 'Action Type', type: 'enum', enumValues: ['navigate'] },\n {\n name: 'params',\n label: 'Params',\n type: 'object',\n properties: [\n { name: 'route', label: 'Route', type: 'string' },\n { name: 'args', label: 'Args', type: 'object' },\n ],\n },\n ]\n}\n\nfunction backgroundColorModelProperties(): PropertyDescriptor[] {\n return [\n {\n name: 'colors',\n label: 'Colors',\n type: 'object',\n isArray: true,\n properties: colorModelProperties(),\n },\n {\n name: 'type',\n label: 'Background Type',\n type: 'enum',\n enumValues: ['single', 'vertical_gradient', 'horizontal_gradient', 'linear_gradient'],\n },\n ]\n}\n\n// === Modifier builders ===\n\nfunction modifierBaseProperties(): PropertyDescriptor[] {\n return [\n {\n name: 'alignment',\n label: 'Alignment',\n type: 'enum',\n enumValues: ['center', 'center_horizontally', 'center_vertically', 'start', 'top', 'end', 'bottom'],\n },\n { name: 'weight', label: 'Weight', type: 'number' },\n { name: 'action', label: 'Action', type: 'object', properties: actionModelProperties() },\n ]\n}\n\nfunction textModifierDescriptor(): PropertyDescriptor {\n return {\n name: 'modifier',\n label: 'Modifier',\n type: 'object',\n properties: [\n ...modifierBaseProperties(),\n { name: 'width', label: 'Width', type: 'object', properties: sizeModelProperties() },\n { name: 'margin', label: 'Margin', type: 'object', properties: spacingModelProperties() },\n ],\n }\n}\n\nfunction imageModifierDescriptor(): PropertyDescriptor {\n return {\n name: 'modifier',\n label: 'Modifier',\n type: 'object',\n properties: [\n ...modifierBaseProperties(),\n { name: 'width', label: 'Width', type: 'object', properties: sizeModelProperties() },\n { name: 'height', label: 'Height', type: 'object', properties: sizeModelProperties() },\n { name: 'padding', label: 'Padding', type: 'object', properties: spacingModelProperties() },\n { name: 'margin', label: 'Margin', type: 'object', properties: spacingModelProperties() },\n { name: 'aspectRatio', label: 'Aspect Ratio', type: 'number' },\n ],\n }\n}\n\nfunction containerModifierDescriptor(): PropertyDescriptor {\n return {\n name: 'modifier',\n label: 'Modifier',\n type: 'object',\n properties: [\n ...modifierBaseProperties(),\n { name: 'backgroundColor', label: 'Background Color', type: 'object', properties: backgroundColorModelProperties() },\n { name: 'width', label: 'Width', type: 'object', properties: sizeModelProperties() },\n { name: 'height', label: 'Height', type: 'object', properties: sizeModelProperties() },\n { name: 'padding', label: 'Padding', type: 'object', properties: spacingModelProperties() },\n { name: 'margin', label: 'Margin', type: 'object', properties: spacingModelProperties() },\n { name: 'aspectRatio', label: 'Aspect Ratio', type: 'number' },\n ],\n }\n}\n\n// === Arrangement descriptors ===\n\nfunction verticalArrangementDescriptor(): PropertyDescriptor {\n return {\n name: 'verticalArrangement',\n label: 'Vertical Arrangement',\n type: 'object',\n properties: [\n {\n name: 'type',\n label: 'Type',\n type: 'enum',\n enumValues: ['top', 'center', 'bottom', 'space_evenly', 'space_between', 'space_around', 'spaced_by'],\n },\n { name: 'spacing', label: 'Spacing', type: 'number' },\n ],\n }\n}\n\nfunction horizontalArrangementDescriptor(): PropertyDescriptor {\n return {\n name: 'horizontalArrangement',\n label: 'Horizontal Arrangement',\n type: 'object',\n properties: [\n {\n name: 'type',\n label: 'Type',\n type: 'enum',\n enumValues: ['start', 'center', 'end', 'space_between', 'space_evenly', 'space_around', 'spaced_by'],\n },\n { name: 'spacing', label: 'Spacing', type: 'number' },\n ],\n }\n}\n\n// === Component definitions ===\n\nconst COMPONENT_DEFINITIONS: ComponentMeta[] = [\n {\n type: 'text',\n label: 'Text',\n acceptsChildren: false,\n properties: [\n textModifierDescriptor(),\n { name: 'text', label: 'Text', type: 'string', required: true },\n { name: 'fontSize', label: 'Font Size', type: 'number' },\n { name: 'color', label: 'Color', type: 'object', properties: colorModelProperties() },\n { name: 'fontWeight', label: 'Font Weight', type: 'enum', enumValues: ['bold', 'medium', 'normal', 'semi_bold'] },\n { name: 'textAlign', label: 'Text Align', type: 'enum', enumValues: ['left', 'right', 'center', 'justify', 'start', 'end', 'unspecified'] },\n { name: 'overflow', label: 'Overflow', type: 'enum', enumValues: ['none', 'ellipsis'] },\n { name: 'maxLines', label: 'Max Lines', type: 'number' },\n { name: 'minLines', label: 'Min Lines', type: 'number' },\n ],\n },\n {\n type: 'image',\n label: 'Image',\n acceptsChildren: false,\n properties: [\n imageModifierDescriptor(),\n { name: 'image', label: 'Image URL', type: 'string', required: true },\n { name: 'scaleType', label: 'Scale Type', type: 'enum', enumValues: ['fit', 'crop', 'fill_height', 'fill_width', 'fill_bounds', 'inside', 'none'] },\n { name: 'contentDescription', label: 'Content Description', type: 'string' },\n { name: 'tintColor', label: 'Tint Color', type: 'object', properties: colorModelProperties() },\n ],\n },\n {\n type: 'box',\n label: 'Box',\n acceptsChildren: true,\n properties: [\n containerModifierDescriptor(),\n {\n name: 'alignment',\n label: 'Alignment',\n type: 'enum',\n enumValues: ['top_start', 'top_center', 'top_end', 'center_start', 'center', 'center_end', 'bottom_start', 'bottom_center', 'bottom_end'],\n },\n ],\n },\n {\n type: 'column',\n label: 'Column',\n acceptsChildren: true,\n properties: [\n containerModifierDescriptor(),\n verticalArrangementDescriptor(),\n { name: 'horizontalAlignment', label: 'Horizontal Alignment', type: 'enum', enumValues: ['start', 'end', 'center_horizontally'] },\n { name: 'canScroll', label: 'Can Scroll', type: 'boolean' },\n ],\n },\n {\n type: 'row',\n label: 'Row',\n acceptsChildren: true,\n properties: [\n containerModifierDescriptor(),\n { name: 'verticalAlignment', label: 'Vertical Alignment', type: 'enum', enumValues: ['top', 'bottom', 'center_vertically'] },\n horizontalArrangementDescriptor(),\n { name: 'canScroll', label: 'Can Scroll', type: 'boolean' },\n ],\n },\n {\n type: 'lazy_column',\n label: 'Lazy Column',\n acceptsChildren: true,\n properties: [\n containerModifierDescriptor(),\n verticalArrangementDescriptor(),\n ],\n },\n]\n\n// === Public API ===\n\nexport function getComponents(): ComponentMeta[] {\n return JSON.parse(JSON.stringify(COMPONENT_DEFINITIONS))\n}\n","import type { SduiScreen, Theme } from './types'\nimport { renderComponent } from './render'\n\nexport interface RenderOptions {\n theme?: Theme\n}\n\nexport function render(json: string, container: HTMLElement, options?: RenderOptions): void {\n const screen: SduiScreen = JSON.parse(json)\n const theme: Theme = options?.theme ?? 'light'\n\n const root = renderComponent(screen.root, theme)\n\n container.innerHTML = ''\n container.appendChild(root)\n}\n\nexport { getComponents } from './component-meta'\n\nexport type {\n // Root models\n SduiScreen,\n SduiComponent,\n Theme,\n // Properties\n PropertiesModel,\n TextUiProperties,\n ImageUiProperties,\n BoxUiProperties,\n ColumnUiProperties,\n RowUiProperties,\n LazyColumnUiProperties,\n DefaultUiProperties,\n // Modifiers\n ModifierBase,\n TextUiModifier,\n ContainerUiModifier,\n ImageUiModifier,\n // Base models\n ColorModel,\n SizeModel,\n SpacingModel,\n ActionModel,\n ActionParams,\n BackgroundColorModel,\n HorizontalArrangementModel,\n VerticalArrangementModel,\n // Enums\n ComponentType,\n AlignmentType,\n FontWeightType,\n SizeUnitType,\n ActionType,\n BackgroundColorType,\n ContentScaleType,\n TextAlignType,\n TextOverflowType,\n HorizontalAlignmentType,\n VerticalAlignmentType,\n HorizontalArrangementType,\n VerticalArrangementType,\n // Metadata\n ComponentMeta,\n PropertyDescriptor,\n PropertyType,\n} from './types'\n"],"mappings":";AAEO,SAAS,aAAa,OAA+B,OAAkC;AAC5F,MAAI,CAAC,MAAO,QAAO;AACnB,MAAI,UAAU,QAAQ;AACpB,WAAO,MAAM,QAAQ,MAAM;AAAA,EAC7B;AACA,SAAO,MAAM,SAAS,MAAM;AAC9B;AAEO,SAAS,YAAY,MAAiD;AAC3E,MAAI,CAAC,QAAQ,CAAC,KAAK,KAAM,QAAO;AAChC,UAAQ,KAAK,MAAM;AAAA,IACjB,KAAK;AACH,aAAO,GAAG,KAAK,SAAS,CAAC;AAAA,IAC3B,KAAK;AACH,aAAO;AAAA,IACT,KAAK;AACH,aAAO;AAAA,IACT;AACE,aAAO;AAAA,EACX;AACF;AAEO,SAAS,eAAe,SAK7B;AACA,MAAI,CAAC,QAAS,QAAO,CAAC;AACtB,SAAO;AAAA,IACL,KAAK,QAAQ,OAAO,OAAO,GAAG,QAAQ,GAAG,OAAO;AAAA,IAChD,QAAQ,QAAQ,UAAU,OAAO,GAAG,QAAQ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AAE,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;;;ACxOO,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,EACpD;AACF;;;AClCO,SAAS,cAAc,SAAsB,UAAoC,OAAoB;AAC1G,MAAI,CAAC,SAAU;AAEf,QAAM,IAAI,QAAQ;AAGlB,MAAI,SAAS,WAAW;AACtB,YAAQ,SAAS,WAAW;AAAA;AAAA,MAE1B,KAAK;AAAA,MACL,KAAK;AAAA,MACL,KAAK;AACH,UAAE,YAAY;AACd;AAAA,MACF,KAAK;AAAA,MACL,KAAK;AACH,UAAE,YAAY;AACd;AAAA,MACF,KAAK;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;AAAA,MACT,EAAE,MAAM,kBAAkB,OAAO,KAAK,QAAQ,KAAK;AAAA,MACnD,EAAE,MAAM,mBAAmB,OAAO,KAAK,QAAQ,KAAK;AAAA,MACpD,EAAE,MAAM,wBAAwB,OAAO,KAAK,QAAQ,KAAK;AAAA,IAC3D;AAAA,IACA,OAAO;AAAA,MACL,EAAE,MAAM,gBAAgB,OAAO,MAAM,QAAQ,KAAK;AAAA,MAClD,EAAE,MAAM,gBAAgB,OAAO,KAAK,QAAQ,KAAK;AAAA,MACjD,EAAE,MAAM,YAAY,OAAO,KAAK,QAAQ,KAAK;AAAA,MAC7C,EAAE,MAAM,aAAa,OAAO,KAAK,QAAQ,KAAK;AAAA,IAChD;AAAA,EACF;AACF;AAEO,SAAS,mBAA2E;AACzF,SAAO,KAAK,MAAM,KAAK,UAAU,cAAc,CAAC;AAClD;;;AC5CO,SAAS,OAAO,MAAc,WAAwB,SAA+B;AAC1F,QAAM,SAAqB,KAAK,MAAM,IAAI;AAC1C,QAAM,QAAe,SAAS,SAAS;AAEvC,QAAM,OAAO,gBAAgB,OAAO,MAAM,KAAK;AAE/C,YAAU,YAAY;AACtB,YAAU,YAAY,IAAI;AAC5B;","names":["el"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sdui-web",
3
- "version": "0.3.0",
3
+ "version": "0.5.0",
4
4
  "description": "Server-Driven UI renderer for the web — turns JSON component trees into DOM elements",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",