glchat-a2ui-react-renderer 0.2.6 → 0.2.7
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/README.md +88 -6
- package/dist/src/components/a2ui/Button/Button.d.ts.map +1 -1
- package/dist/src/components/a2ui/Button/Button.js +6 -14
- package/dist/src/components/a2ui/Button/theme.d.ts +3 -12
- package/dist/src/components/a2ui/Button/theme.d.ts.map +1 -1
- package/dist/src/components/a2ui/Button/theme.js +4 -58
- package/dist/src/components/a2ui/ButtonAsLink/ButtonAsLink.d.ts +4 -0
- package/dist/src/components/a2ui/ButtonAsLink/ButtonAsLink.d.ts.map +1 -0
- package/dist/src/components/a2ui/ButtonAsLink/ButtonAsLink.js +42 -0
- package/dist/src/components/a2ui/ButtonAsLink/theme.d.ts +8 -0
- package/dist/src/components/a2ui/ButtonAsLink/theme.d.ts.map +1 -0
- package/dist/src/components/a2ui/ButtonAsLink/theme.js +8 -0
- package/dist/src/components/a2ui/Card/theme.d.ts +2 -8
- package/dist/src/components/a2ui/Card/theme.d.ts.map +1 -1
- package/dist/src/components/a2ui/Card/theme.js +2 -8
- package/dist/src/components/a2ui/CheckBox/theme.d.ts +2 -9
- package/dist/src/components/a2ui/CheckBox/theme.d.ts.map +1 -1
- package/dist/src/components/a2ui/CheckBox/theme.js +2 -8
- package/dist/src/components/a2ui/DateTimeInput/theme.d.ts +2 -2
- package/dist/src/components/a2ui/DateTimeInput/theme.d.ts.map +1 -1
- package/dist/src/components/a2ui/DateTimeInput/theme.js +3 -3
- package/dist/src/components/a2ui/DestructiveButton/DestructiveButton.d.ts +4 -0
- package/dist/src/components/a2ui/DestructiveButton/DestructiveButton.d.ts.map +1 -0
- package/dist/src/components/a2ui/DestructiveButton/DestructiveButton.js +22 -0
- package/dist/src/components/a2ui/DestructiveButton/theme.d.ts +8 -0
- package/dist/src/components/a2ui/DestructiveButton/theme.d.ts.map +1 -0
- package/dist/src/components/a2ui/DestructiveButton/theme.js +8 -0
- package/dist/src/components/a2ui/MultipleChoice/CheckboxList.js +5 -5
- package/dist/src/components/a2ui/MultipleChoice/MultipleChoice.js +5 -5
- package/dist/src/components/a2ui/MultipleChoice/theme.d.ts +4 -4
- package/dist/src/components/a2ui/MultipleChoice/theme.d.ts.map +1 -1
- package/dist/src/components/a2ui/MultipleChoice/theme.js +4 -4
- package/dist/src/components/a2ui/TagInput/TagInput.d.ts +4 -0
- package/dist/src/components/a2ui/TagInput/TagInput.d.ts.map +1 -0
- package/dist/src/components/a2ui/TagInput/TagInput.js +120 -0
- package/dist/src/components/a2ui/TagInput/theme.d.ts +22 -0
- package/dist/src/components/a2ui/TagInput/theme.d.ts.map +1 -0
- package/dist/src/components/a2ui/TagInput/theme.js +82 -0
- package/dist/src/components/a2ui/TextField/theme.d.ts +2 -26
- package/dist/src/components/a2ui/TextField/theme.d.ts.map +1 -1
- package/dist/src/components/a2ui/TextField/theme.js +6 -79
- package/dist/src/components/a2ui/types.d.ts +12 -0
- package/dist/src/components/a2ui/types.d.ts.map +1 -0
- package/dist/src/components/a2ui/types.js +1 -0
- package/dist/src/components/ui/Button/Button.d.ts +15 -0
- package/dist/src/components/ui/Button/Button.d.ts.map +1 -0
- package/dist/src/components/ui/Button/Button.js +16 -0
- package/dist/src/components/ui/Button/ButtonAsLink.d.ts +15 -0
- package/dist/src/components/ui/Button/ButtonAsLink.d.ts.map +1 -0
- package/dist/src/components/ui/Button/ButtonAsLink.js +17 -0
- package/dist/src/components/ui/Button/theme.d.ts +5 -0
- package/dist/src/components/ui/Button/theme.d.ts.map +1 -0
- package/dist/src/components/ui/Button/theme.js +51 -0
- package/dist/src/components/ui/Checkbox/Checkbox.js +2 -2
- package/dist/src/components/ui/Checkbox/theme.d.ts +3 -3
- package/dist/src/components/ui/Checkbox/theme.d.ts.map +1 -1
- package/dist/src/components/ui/Checkbox/theme.js +3 -3
- package/dist/src/components/ui/MultiSelect/MultiSelect.js +12 -12
- package/dist/src/components/ui/MultiSelect/theme.d.ts +12 -12
- package/dist/src/components/ui/MultiSelect/theme.d.ts.map +1 -1
- package/dist/src/components/ui/MultiSelect/theme.js +13 -13
- package/dist/src/components/ui/Select/Select.js +8 -8
- package/dist/src/components/ui/Select/theme.d.ts +8 -8
- package/dist/src/components/ui/Select/theme.d.ts.map +1 -1
- package/dist/src/components/ui/Select/theme.js +8 -8
- package/dist/src/components/ui/TextField/theme.d.ts +4 -0
- package/dist/src/components/ui/TextField/theme.d.ts.map +1 -0
- package/dist/src/components/ui/TextField/theme.js +22 -0
- package/dist/src/utils/catalog.d.ts +1 -1
- package/dist/src/utils/catalog.d.ts.map +1 -1
- package/dist/src/utils/catalog.js +7 -11
- package/dist/src/utils/href.d.ts +11 -0
- package/dist/src/utils/href.d.ts.map +1 -0
- package/dist/src/utils/href.js +34 -0
- package/dist/src/utils/theme.d.ts +11 -0
- package/dist/src/utils/theme.d.ts.map +1 -1
- package/dist/src/utils/theme.js +80 -79
- package/json/README.md +74 -0
- package/json/a2ui-sample-messages.json +338 -0
- package/json/glchat_server_to_client_with_catalog.json +1000 -0
- package/json/glchat_standard_catalog_definition.json +844 -0
- package/package.json +6 -3
- package/styles/globals.css +135 -17
- package/dist/src/components/a2ui/Card/Card.d.ts +0 -4
- package/dist/src/components/a2ui/Card/Card.d.ts.map +0 -1
- package/dist/src/components/a2ui/Card/Card.js +0 -16
- package/dist/src/components/a2ui/CheckBox/CheckBox.d.ts +0 -4
- package/dist/src/components/a2ui/CheckBox/CheckBox.d.ts.map +0 -1
- package/dist/src/components/a2ui/CheckBox/CheckBox.js +0 -26
- package/dist/src/components/a2ui/TextField/TextField.d.ts +0 -4
- package/dist/src/components/a2ui/TextField/TextField.d.ts.map +0 -1
- package/dist/src/components/a2ui/TextField/TextField.js +0 -54
- package/patches/@a2ui+web_core+0.10.0.patch +0 -55
package/dist/src/utils/theme.js
CHANGED
|
@@ -1,92 +1,93 @@
|
|
|
1
1
|
import { litTheme } from '@a2ui/react';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
2
|
+
import { buttonAdditionalStyles, buttonComponents, } from '../components/a2ui/Button/theme.js';
|
|
3
|
+
import { buttonAsLinkAdditionalStyles, buttonAsLinkComponents, } from '../components/a2ui/ButtonAsLink/theme.js';
|
|
4
|
+
import { cardAdditionalStyles, cardComponents, } from '../components/a2ui/Card/theme.js';
|
|
5
|
+
import { checkBoxAdditionalStyles, checkBoxComponents, } from '../components/a2ui/CheckBox/theme.js';
|
|
6
|
+
import { destructiveButtonAdditionalStyles, destructiveButtonComponents, } from '../components/a2ui/DestructiveButton/theme.js';
|
|
7
|
+
import { dateTimeInputAdditionalStyles, dateTimeInputComponents, } from '../components/a2ui/DateTimeInput/theme.js';
|
|
8
|
+
import { multipleChoiceComponents } from '../components/a2ui/MultipleChoice/theme.js';
|
|
9
|
+
import { textFieldAdditionalStyles, textFieldComponents, } from '../components/a2ui/TextField/theme.js';
|
|
10
|
+
/** GLChat-owned component class maps merged into the default A2UI theme. */
|
|
11
|
+
const components = {
|
|
12
|
+
...litTheme.components,
|
|
13
|
+
Card: cardComponents,
|
|
14
|
+
Button: buttonComponents,
|
|
15
|
+
CheckBox: checkBoxComponents,
|
|
16
|
+
TextField: textFieldComponents,
|
|
17
|
+
DateTimeInput: dateTimeInputComponents,
|
|
18
|
+
MultipleChoice: multipleChoiceComponents,
|
|
19
|
+
DestructiveButton: destructiveButtonComponents,
|
|
20
|
+
ButtonAsLink: buttonAsLinkComponents,
|
|
21
|
+
};
|
|
22
|
+
/** GLChat-owned inline style overrides merged into the default A2UI theme. */
|
|
23
|
+
const additionalStyles = {
|
|
24
|
+
...litTheme.additionalStyles,
|
|
25
|
+
Card: { ...cardAdditionalStyles },
|
|
26
|
+
Button: { ...buttonAdditionalStyles },
|
|
27
|
+
CheckBox: { ...checkBoxAdditionalStyles },
|
|
28
|
+
TextField: { ...textFieldAdditionalStyles },
|
|
29
|
+
DateTimeInput: { ...dateTimeInputAdditionalStyles },
|
|
30
|
+
DestructiveButton: { ...destructiveButtonAdditionalStyles },
|
|
31
|
+
ButtonAsLink: { ...buttonAsLinkAdditionalStyles },
|
|
32
|
+
};
|
|
33
|
+
/**
|
|
34
|
+
* Default theme passed to Provider. Starts from upstream litTheme and layers
|
|
35
|
+
* GLChat component class maps and inline styles from each a2ui component theme file.
|
|
36
|
+
*/
|
|
8
37
|
export const glchatDefaultTheme = {
|
|
9
38
|
...litTheme,
|
|
10
|
-
components
|
|
11
|
-
|
|
12
|
-
Card: glchatCardComponents,
|
|
13
|
-
Button: glchatButtonComponents,
|
|
14
|
-
CheckBox: glchatCheckBoxComponents,
|
|
15
|
-
TextField: glchatTextFieldComponents,
|
|
16
|
-
DateTimeInput: glchatDateTimeInputComponents,
|
|
17
|
-
MultipleChoice: glchatMultipleChoiceComponents,
|
|
18
|
-
},
|
|
19
|
-
additionalStyles: {
|
|
20
|
-
...litTheme.additionalStyles,
|
|
21
|
-
Card: { ...glchatCardAdditionalStyles },
|
|
22
|
-
Button: { ...glchatButtonAdditionalStyles },
|
|
23
|
-
DateTimeInput: { ...glchatDateTimeInputAdditionalStyles },
|
|
24
|
-
},
|
|
39
|
+
components,
|
|
40
|
+
additionalStyles,
|
|
25
41
|
};
|
|
42
|
+
const DEEP_MERGE_COMPONENT_KEYS = [
|
|
43
|
+
'Card',
|
|
44
|
+
'Button',
|
|
45
|
+
'CheckBox',
|
|
46
|
+
'TextField',
|
|
47
|
+
'MultipleChoice',
|
|
48
|
+
'DateTimeInput',
|
|
49
|
+
'DestructiveButton',
|
|
50
|
+
'ButtonAsLink',
|
|
51
|
+
];
|
|
52
|
+
function mergeSection(base, patch, deepMergeKeys) {
|
|
53
|
+
if (!patch)
|
|
54
|
+
return base;
|
|
55
|
+
const merged = { ...base, ...patch };
|
|
56
|
+
for (const key of deepMergeKeys) {
|
|
57
|
+
if (patch[key] === undefined)
|
|
58
|
+
continue;
|
|
59
|
+
if (!(key in base))
|
|
60
|
+
continue;
|
|
61
|
+
merged[key] = {
|
|
62
|
+
...base[key],
|
|
63
|
+
...patch[key],
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
return merged;
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* Merges consumer overrides into glchatDefaultTheme.
|
|
70
|
+
*
|
|
71
|
+
* Top-level theme keys (elements, markdown, etc.) are shallow-merged.
|
|
72
|
+
* GLChat component entries are deep-merged so partial overrides (e.g. only
|
|
73
|
+
* components.Button) do not wipe the rest of that component's defaults.
|
|
74
|
+
*/
|
|
26
75
|
export function mergeGlchatTheme(override) {
|
|
27
76
|
if (!override) {
|
|
28
77
|
return glchatDefaultTheme;
|
|
29
78
|
}
|
|
30
|
-
const
|
|
31
|
-
const
|
|
32
|
-
const patchMarkdown = override.markdown;
|
|
33
|
-
const patchAdditional = override.additionalStyles;
|
|
34
|
-
const components = patchComponents
|
|
35
|
-
? {
|
|
36
|
-
...glchatDefaultTheme.components,
|
|
37
|
-
...patchComponents,
|
|
38
|
-
Card: {
|
|
39
|
-
...glchatDefaultTheme.components.Card,
|
|
40
|
-
...patchComponents.Card,
|
|
41
|
-
},
|
|
42
|
-
Button: {
|
|
43
|
-
...glchatDefaultTheme.components.Button,
|
|
44
|
-
...patchComponents.Button,
|
|
45
|
-
},
|
|
46
|
-
CheckBox: {
|
|
47
|
-
...glchatDefaultTheme.components.CheckBox,
|
|
48
|
-
...patchComponents.CheckBox,
|
|
49
|
-
},
|
|
50
|
-
TextField: {
|
|
51
|
-
...glchatDefaultTheme.components.TextField,
|
|
52
|
-
...patchComponents.TextField,
|
|
53
|
-
},
|
|
54
|
-
MultipleChoice: {
|
|
55
|
-
...glchatDefaultTheme.components.MultipleChoice,
|
|
56
|
-
...patchComponents.MultipleChoice,
|
|
57
|
-
},
|
|
58
|
-
DateTimeInput: {
|
|
59
|
-
...glchatDefaultTheme.components.DateTimeInput,
|
|
60
|
-
...patchComponents.DateTimeInput,
|
|
61
|
-
},
|
|
62
|
-
}
|
|
63
|
-
: glchatDefaultTheme.components;
|
|
64
|
-
const elements = patchElements
|
|
65
|
-
? { ...glchatDefaultTheme.elements, ...patchElements }
|
|
66
|
-
: glchatDefaultTheme.elements;
|
|
67
|
-
const markdown = patchMarkdown
|
|
68
|
-
? { ...glchatDefaultTheme.markdown, ...patchMarkdown }
|
|
69
|
-
: glchatDefaultTheme.markdown;
|
|
70
|
-
const additionalStyles = patchAdditional
|
|
71
|
-
? {
|
|
72
|
-
...glchatDefaultTheme.additionalStyles,
|
|
73
|
-
...patchAdditional,
|
|
74
|
-
Card: {
|
|
75
|
-
...glchatDefaultTheme.additionalStyles?.Card,
|
|
76
|
-
...patchAdditional.Card,
|
|
77
|
-
},
|
|
78
|
-
Button: {
|
|
79
|
-
...glchatDefaultTheme.additionalStyles?.Button,
|
|
80
|
-
...patchAdditional.Button,
|
|
81
|
-
},
|
|
82
|
-
}
|
|
83
|
-
: glchatDefaultTheme.additionalStyles;
|
|
79
|
+
const mergedComponents = mergeSection(components, override.components, DEEP_MERGE_COMPONENT_KEYS);
|
|
80
|
+
const mergedAdditionalStyles = mergeSection(additionalStyles, override.additionalStyles, DEEP_MERGE_COMPONENT_KEYS);
|
|
84
81
|
return {
|
|
85
82
|
...glchatDefaultTheme,
|
|
86
83
|
...override,
|
|
87
|
-
components,
|
|
88
|
-
elements
|
|
89
|
-
|
|
90
|
-
|
|
84
|
+
components: mergedComponents,
|
|
85
|
+
elements: override.elements
|
|
86
|
+
? { ...glchatDefaultTheme.elements, ...override.elements }
|
|
87
|
+
: glchatDefaultTheme.elements,
|
|
88
|
+
markdown: override.markdown
|
|
89
|
+
? { ...glchatDefaultTheme.markdown, ...override.markdown }
|
|
90
|
+
: glchatDefaultTheme.markdown,
|
|
91
|
+
additionalStyles: mergedAdditionalStyles,
|
|
91
92
|
};
|
|
92
93
|
}
|
package/json/README.md
ADDED
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
# JSON reference files
|
|
2
|
+
|
|
3
|
+
This folder contains JSON schema and sample payload files for the GLChat A2UI React renderer.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## `glchat_standard_catalog_definition.json` — GLChat component catalog
|
|
8
|
+
|
|
9
|
+
An extended version of the official A2UI v0.8 standard catalog.
|
|
10
|
+
|
|
11
|
+
**Base specification:** [google/A2UI — specification/v0_8/json/standard_catalog_definition.json](https://github.com/google/A2UI/blob/main/specification/v0_8/json/standard_catalog_definition.json)
|
|
12
|
+
|
|
13
|
+
**Catalog ID:** `https://github.com/GDP-ADMIN/glchat-sdk/blob/main/js/glchat-a2ui-react-renderer/json/glchat_standard_catalog_definition.json`
|
|
14
|
+
|
|
15
|
+
The GLChat catalog keeps full compatibility with the upstream schema and adds:
|
|
16
|
+
|
|
17
|
+
1. **`DestructiveButton` component**
|
|
18
|
+
A dedicated destructive-styled button (replaces the previous `destructive` boolean flag on `Button`). Requires `child` and `action`.
|
|
19
|
+
|
|
20
|
+
2. **`ButtonAsLink` component**
|
|
21
|
+
A button-styled anchor link. Requires `child` and `href`. Optional `target` (`_self`, `_blank`, `_parent`, `_top`) controls whether the link opens in the same tab or a new tab.
|
|
22
|
+
|
|
23
|
+
3. **`Timeout` component**
|
|
24
|
+
A countdown to a target UTC time (ISO 8601). Supports:
|
|
25
|
+
- `targetTimeUtc`: literal string or data-model path
|
|
26
|
+
- `usageHint`: optional text style (`body`, `caption`, `h3`, `h4`, `h5`)
|
|
27
|
+
|
|
28
|
+
4. **`TagInput` component**
|
|
29
|
+
A tag input field for adding and removing string tags. Supports `label`, `values`, and `placeholder` via literal values or data-model paths.
|
|
30
|
+
|
|
31
|
+
### Components
|
|
32
|
+
|
|
33
|
+
| Component | Key properties |
|
|
34
|
+
|---|---|
|
|
35
|
+
| Text | `text` (literalString / path), `usageHint` |
|
|
36
|
+
| Image | `url` (literalString / path), `fit`, `usageHint` |
|
|
37
|
+
| Icon | `name` (`{ "literalString": "..." }` / path) |
|
|
38
|
+
| Video | `url` (literalString / path) |
|
|
39
|
+
| AudioPlayer | `url`, `description` |
|
|
40
|
+
| Row | `children`, `distribution`, `alignment` |
|
|
41
|
+
| Column | `children`, `distribution`, `alignment` |
|
|
42
|
+
| List | `children` (explicitList / template + dataBinding), `direction`, `alignment` |
|
|
43
|
+
| Card | `child` |
|
|
44
|
+
| Tabs | `tabItems` (`title`, `child`) |
|
|
45
|
+
| Divider | `axis` |
|
|
46
|
+
| Modal | `entryPointChild`, `contentChild` |
|
|
47
|
+
| Button | `child`, `action`, `primary` |
|
|
48
|
+
| DestructiveButton | `child`, `action` ✦ |
|
|
49
|
+
| ButtonAsLink | `child`, `href` (literalString / path), `target` (optional) ✦ |
|
|
50
|
+
| CheckBox | `label`, `value` (path / literalBoolean) |
|
|
51
|
+
| TextField | `label`, `text` (path / literalString), `textFieldType` |
|
|
52
|
+
| DateTimeInput | `value` (path / literalString), `enableDate`, `enableTime` |
|
|
53
|
+
| MultipleChoice | `selections` (path / literalArray), `options`, `maxAllowedSelections`, `variant`, `filterable` |
|
|
54
|
+
| Slider | `value` (path / literalNumber), `minValue`, `maxValue` |
|
|
55
|
+
| TagInput | `label`, `values`, `placeholder` (literal / path) ✦ |
|
|
56
|
+
| Timeout | `targetTimeUtc` (path / literalString) ✦ |
|
|
57
|
+
|
|
58
|
+
---
|
|
59
|
+
|
|
60
|
+
## `glchat_server_to_client_with_catalog.json` — full server-to-client message schema
|
|
61
|
+
|
|
62
|
+
An extended version of the official A2UI v0.8 server-to-client message schema.
|
|
63
|
+
|
|
64
|
+
**Base specification:** [google/A2UI — specification/v0_8/json/server_to_client_with_standard_catalog.json](https://github.com/google/A2UI/blob/main/specification/v0_8/json/server_to_client_with_standard_catalog.json)
|
|
65
|
+
|
|
66
|
+
The GLChat version is identical to the upstream schema except the **`surfaceUpdate.components[].component`** section, which uses the GLChat extended catalog (`glchat_standard_catalog_definition.json`).
|
|
67
|
+
|
|
68
|
+
Use this file as the authoritative schema when validating server-generated A2UI payloads or configuring LLM structured-output for the GLChat renderer.
|
|
69
|
+
|
|
70
|
+
---
|
|
71
|
+
|
|
72
|
+
## `a2ui-sample-messages.json` — sample message sequence (all components)
|
|
73
|
+
|
|
74
|
+
A JSON array of four A2UI messages (one of each type) with a **surface that includes every component** from the catalog. Use for reference and testing.
|
|
@@ -0,0 +1,338 @@
|
|
|
1
|
+
[
|
|
2
|
+
{
|
|
3
|
+
"surfaceUpdate": {
|
|
4
|
+
"surfaceId": "main",
|
|
5
|
+
"components": [
|
|
6
|
+
{
|
|
7
|
+
"id": "root",
|
|
8
|
+
"component": {
|
|
9
|
+
"Column": {
|
|
10
|
+
"children": {
|
|
11
|
+
"explicitList": [
|
|
12
|
+
"text-sample",
|
|
13
|
+
"row-sample",
|
|
14
|
+
"card-sample",
|
|
15
|
+
"button-sample",
|
|
16
|
+
"textfield-sample",
|
|
17
|
+
"checkbox-sample",
|
|
18
|
+
"image-sample",
|
|
19
|
+
"icon-sample",
|
|
20
|
+
"divider-sample",
|
|
21
|
+
"timeout-sample",
|
|
22
|
+
"video-sample",
|
|
23
|
+
"audio-sample",
|
|
24
|
+
"tabs-sample",
|
|
25
|
+
"slider-sample",
|
|
26
|
+
"multiple-choice-sample",
|
|
27
|
+
"datetime-sample",
|
|
28
|
+
"list-sample",
|
|
29
|
+
"modal-sample"
|
|
30
|
+
]
|
|
31
|
+
},
|
|
32
|
+
"distribution": "start",
|
|
33
|
+
"alignment": "stretch"
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
"id": "text-sample",
|
|
39
|
+
"component": {
|
|
40
|
+
"Text": {
|
|
41
|
+
"text": { "literalString": "Text (h2)" },
|
|
42
|
+
"usageHint": "h2"
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
"id": "row-sample",
|
|
48
|
+
"component": {
|
|
49
|
+
"Row": {
|
|
50
|
+
"children": {
|
|
51
|
+
"explicitList": ["row-text-1", "row-text-2"]
|
|
52
|
+
},
|
|
53
|
+
"distribution": "spaceBetween",
|
|
54
|
+
"alignment": "center"
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
"id": "row-text-1",
|
|
60
|
+
"component": {
|
|
61
|
+
"Text": {
|
|
62
|
+
"text": { "literalString": "Row left" },
|
|
63
|
+
"usageHint": "body"
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
"id": "row-text-2",
|
|
69
|
+
"component": {
|
|
70
|
+
"Text": {
|
|
71
|
+
"text": { "literalString": "Row right" },
|
|
72
|
+
"usageHint": "body"
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
"id": "card-sample",
|
|
78
|
+
"component": {
|
|
79
|
+
"Card": {
|
|
80
|
+
"child": "card-content"
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
"id": "card-content",
|
|
86
|
+
"component": {
|
|
87
|
+
"Text": {
|
|
88
|
+
"text": { "literalString": "Card content" },
|
|
89
|
+
"usageHint": "body"
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
"id": "button-sample",
|
|
95
|
+
"component": {
|
|
96
|
+
"Button": {
|
|
97
|
+
"child": "button-label",
|
|
98
|
+
"primary": true,
|
|
99
|
+
"action": {
|
|
100
|
+
"name": "submit",
|
|
101
|
+
"context": [{ "key": "source", "value": { "literalString": "sample" } }]
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
"id": "button-label",
|
|
108
|
+
"component": {
|
|
109
|
+
"Text": {
|
|
110
|
+
"text": { "literalString": "Button" },
|
|
111
|
+
"usageHint": "body"
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
"id": "textfield-sample",
|
|
117
|
+
"component": {
|
|
118
|
+
"TextField": {
|
|
119
|
+
"label": { "literalString": "Name" },
|
|
120
|
+
"text": { "path": "/form/name" },
|
|
121
|
+
"textFieldType": "shortText"
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
},
|
|
125
|
+
{
|
|
126
|
+
"id": "checkbox-sample",
|
|
127
|
+
"component": {
|
|
128
|
+
"CheckBox": {
|
|
129
|
+
"label": { "literalString": "Accept terms" },
|
|
130
|
+
"checked": { "path": "/form/agreeTerms" }
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
"id": "image-sample",
|
|
136
|
+
"component": {
|
|
137
|
+
"Image": {
|
|
138
|
+
"url": { "literalString": "https://picsum.photos/200/100" },
|
|
139
|
+
"fit": "cover",
|
|
140
|
+
"usageHint": "thumbnail"
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
},
|
|
144
|
+
{
|
|
145
|
+
"id": "divider-sample",
|
|
146
|
+
"component": {
|
|
147
|
+
"Divider": {
|
|
148
|
+
"axis": "horizontal"
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
},
|
|
152
|
+
{
|
|
153
|
+
"id": "timeout-sample",
|
|
154
|
+
"component": {
|
|
155
|
+
"Timeout": {
|
|
156
|
+
"targetTimeUtc": { "literalString": "2026-12-31T23:59:59.000Z" }
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
},
|
|
160
|
+
{
|
|
161
|
+
"id": "tabs-sample",
|
|
162
|
+
"component": {
|
|
163
|
+
"Tabs": {
|
|
164
|
+
"tabItems": [
|
|
165
|
+
{ "title": "Tab A", "child": "tab-a-content" },
|
|
166
|
+
{ "title": "Tab B", "child": "tab-b-content" }
|
|
167
|
+
]
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
},
|
|
171
|
+
{
|
|
172
|
+
"id": "tab-a-content",
|
|
173
|
+
"component": {
|
|
174
|
+
"Text": {
|
|
175
|
+
"text": { "literalString": "Tab A content" },
|
|
176
|
+
"usageHint": "body"
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
},
|
|
180
|
+
{
|
|
181
|
+
"id": "tab-b-content",
|
|
182
|
+
"component": {
|
|
183
|
+
"Text": {
|
|
184
|
+
"text": { "literalString": "Tab B content" },
|
|
185
|
+
"usageHint": "body"
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
},
|
|
189
|
+
{
|
|
190
|
+
"id": "slider-sample",
|
|
191
|
+
"component": {
|
|
192
|
+
"Slider": {
|
|
193
|
+
"value": { "path": "/form/volume" },
|
|
194
|
+
"minValue": 0,
|
|
195
|
+
"maxValue": 100
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
},
|
|
199
|
+
{
|
|
200
|
+
"id": "multiple-choice-sample",
|
|
201
|
+
"component": {
|
|
202
|
+
"MultipleChoice": {
|
|
203
|
+
"label": { "literalString": "Choose" },
|
|
204
|
+
"options": [
|
|
205
|
+
{ "id": "opt1", "label": { "literalString": "Option 1" } },
|
|
206
|
+
{ "id": "opt2", "label": { "literalString": "Option 2" } }
|
|
207
|
+
],
|
|
208
|
+
"selections": { "path": "/form/choice" }
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
},
|
|
212
|
+
{
|
|
213
|
+
"id": "datetime-sample",
|
|
214
|
+
"component": {
|
|
215
|
+
"DateTimeInput": {
|
|
216
|
+
"value": { "path": "/form/dob" },
|
|
217
|
+
"enableDate": true,
|
|
218
|
+
"enableTime": false
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
},
|
|
222
|
+
{
|
|
223
|
+
"id": "list-sample",
|
|
224
|
+
"component": {
|
|
225
|
+
"List": {
|
|
226
|
+
"template": "list-item",
|
|
227
|
+
"dataBinding": "/items"
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
},
|
|
231
|
+
{
|
|
232
|
+
"id": "list-item",
|
|
233
|
+
"component": {
|
|
234
|
+
"Text": {
|
|
235
|
+
"text": { "path": "/title" },
|
|
236
|
+
"usageHint": "body"
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
},
|
|
240
|
+
{
|
|
241
|
+
"id": "modal-sample",
|
|
242
|
+
"component": {
|
|
243
|
+
"Modal": {
|
|
244
|
+
"entryPointChild": "modal-trigger",
|
|
245
|
+
"contentChild": "modal-content"
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
},
|
|
249
|
+
{
|
|
250
|
+
"id": "modal-trigger",
|
|
251
|
+
"component": {
|
|
252
|
+
"Button": {
|
|
253
|
+
"child": "modal-trigger-label",
|
|
254
|
+
"action": { "name": "open_modal" }
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
},
|
|
258
|
+
{
|
|
259
|
+
"id": "modal-trigger-label",
|
|
260
|
+
"component": {
|
|
261
|
+
"Text": {
|
|
262
|
+
"text": { "literalString": "Open modal" },
|
|
263
|
+
"usageHint": "body"
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
},
|
|
267
|
+
{
|
|
268
|
+
"id": "modal-content",
|
|
269
|
+
"component": {
|
|
270
|
+
"Text": {
|
|
271
|
+
"text": { "literalString": "Modal content" },
|
|
272
|
+
"usageHint": "body"
|
|
273
|
+
}
|
|
274
|
+
}
|
|
275
|
+
},
|
|
276
|
+
{
|
|
277
|
+
"id": "icon-sample",
|
|
278
|
+
"component": {
|
|
279
|
+
"Icon": {
|
|
280
|
+
"name": { "literalString": "check" }
|
|
281
|
+
}
|
|
282
|
+
}
|
|
283
|
+
},
|
|
284
|
+
{
|
|
285
|
+
"id": "video-sample",
|
|
286
|
+
"component": {
|
|
287
|
+
"Video": {
|
|
288
|
+
"url": { "literalString": "https://example.com/video.mp4" }
|
|
289
|
+
}
|
|
290
|
+
}
|
|
291
|
+
},
|
|
292
|
+
{
|
|
293
|
+
"id": "audio-sample",
|
|
294
|
+
"component": {
|
|
295
|
+
"AudioPlayer": {
|
|
296
|
+
"url": { "literalString": "https://example.com/audio.mp3" },
|
|
297
|
+
"description": { "literalString": "Sample audio" }
|
|
298
|
+
}
|
|
299
|
+
}
|
|
300
|
+
}
|
|
301
|
+
]
|
|
302
|
+
}
|
|
303
|
+
},
|
|
304
|
+
{
|
|
305
|
+
"beginRendering": {
|
|
306
|
+
"surfaceId": "main",
|
|
307
|
+
"root": "root"
|
|
308
|
+
}
|
|
309
|
+
},
|
|
310
|
+
{
|
|
311
|
+
"dataModelUpdate": {
|
|
312
|
+
"surfaceId": "main",
|
|
313
|
+
"contents": [
|
|
314
|
+
{
|
|
315
|
+
"key": "form",
|
|
316
|
+
"valueMap": [
|
|
317
|
+
{ "key": "name", "valueString": "Jane" },
|
|
318
|
+
{ "key": "agreeTerms", "valueBoolean": false },
|
|
319
|
+
{ "key": "volume", "valueNumber": 50 },
|
|
320
|
+
{ "key": "dob", "valueString": "1990-01-15" }
|
|
321
|
+
]
|
|
322
|
+
},
|
|
323
|
+
{
|
|
324
|
+
"key": "items",
|
|
325
|
+
"valueList": [
|
|
326
|
+
{ "key": "0", "valueMap": [{ "key": "title", "valueString": "Item 1" }] },
|
|
327
|
+
{ "key": "1", "valueMap": [{ "key": "title", "valueString": "Item 2" }] }
|
|
328
|
+
]
|
|
329
|
+
}
|
|
330
|
+
]
|
|
331
|
+
}
|
|
332
|
+
},
|
|
333
|
+
{
|
|
334
|
+
"deleteSurface": {
|
|
335
|
+
"surfaceId": "main"
|
|
336
|
+
}
|
|
337
|
+
}
|
|
338
|
+
]
|