@tmorrow/cre8-wc 2.0.3 → 2.0.5
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/a2ui/build-knowledge-graph.py +297 -0
- package/a2ui/catalog +240 -0
- package/a2ui/catalog-kg.json +6704 -0
- package/a2ui/catalog.json +6114 -0
- package/a2ui/catalog.svg +3295 -0
- package/a2ui/demo.html +243 -0
- package/a2ui/examples/card-gallery.json +786 -0
- package/a2ui/examples/dating-grid.json +456 -0
- package/a2ui/examples/llm-observability.json +1719 -0
- package/a2ui/examples/portfolio.json +341 -0
- package/a2ui/generate-catalog.mjs +246 -0
- package/a2ui/index.d.ts +4 -0
- package/a2ui/index.js +2 -0
- package/a2ui/index.ts +12 -0
- package/a2ui/registry.d.ts +3 -0
- package/a2ui/registry.js +166 -0
- package/a2ui/registry.ts +182 -0
- package/a2ui/renderer.d.ts +7 -0
- package/a2ui/renderer.js +108 -0
- package/a2ui/renderer.ts +156 -0
- package/a2ui/smoke-test.mjs +238 -0
- package/a2ui/types.d.ts +75 -0
- package/a2ui/types.js +1 -0
- package/a2ui/types.ts +80 -0
- package/cdn/cre8-wc.esm.js +3057 -2438
- package/cdn/cre8-wc.esm.js.map +1 -1
- package/cdn/cre8-wc.min.js +1801 -1204
- package/cdn/cre8-wc.min.js.map +1 -1
- package/lib/a2ui/index.d.ts +5 -0
- package/lib/a2ui/index.d.ts.map +1 -0
- package/lib/a2ui/index.js +3 -0
- package/lib/a2ui/index.js.map +1 -0
- package/lib/a2ui/registry.d.ts +4 -0
- package/lib/a2ui/registry.d.ts.map +1 -0
- package/lib/a2ui/registry.js +167 -0
- package/lib/a2ui/registry.js.map +1 -0
- package/lib/a2ui/renderer.d.ts +8 -0
- package/lib/a2ui/renderer.d.ts.map +1 -0
- package/lib/a2ui/renderer.js +109 -0
- package/lib/a2ui/renderer.js.map +1 -0
- package/lib/a2ui/types.d.ts +76 -0
- package/lib/a2ui/types.d.ts.map +1 -0
- package/lib/a2ui/types.js +2 -0
- package/lib/a2ui/types.js.map +1 -0
- package/lib/components/accordion/accordion.d.ts +1 -0
- package/lib/components/accordion/accordion.d.ts.map +1 -1
- package/lib/components/accordion/accordion.js +1 -0
- package/lib/components/accordion/accordion.js.map +1 -1
- package/lib/components/accordion-item/accordion-item.d.ts +1 -0
- package/lib/components/accordion-item/accordion-item.d.ts.map +1 -1
- package/lib/components/accordion-item/accordion-item.js +1 -0
- package/lib/components/accordion-item/accordion-item.js.map +1 -1
- package/lib/components/alert/alert.d.ts +6 -0
- package/lib/components/alert/alert.d.ts.map +1 -1
- package/lib/components/alert/alert.js +6 -0
- package/lib/components/alert/alert.js.map +1 -1
- package/lib/components/button/button.d.ts +2 -0
- package/lib/components/button/button.d.ts.map +1 -1
- package/lib/components/button/button.js +2 -0
- package/lib/components/button/button.js.map +1 -1
- package/lib/components/button/button.styles.d.ts.map +1 -1
- package/lib/components/button/button.styles.js +1120 -557
- package/lib/components/button/button.styles.js.map +1 -1
- package/lib/components/button-group/button-group.d.ts +9 -0
- package/lib/components/button-group/button-group.d.ts.map +1 -1
- package/lib/components/button-group/button-group.js +8 -0
- package/lib/components/button-group/button-group.js.map +1 -1
- package/lib/components/button-group/button-group.styles.d.ts.map +1 -1
- package/lib/components/button-group/button-group.styles.js +12 -0
- package/lib/components/button-group/button-group.styles.js.map +1 -1
- package/lib/components/card/card.d.ts +1 -1
- package/lib/components/card/card.d.ts.map +1 -1
- package/lib/components/card/card.js +1 -0
- package/lib/components/card/card.js.map +1 -1
- package/lib/components/card/card.styles.d.ts.map +1 -1
- package/lib/components/card/card.styles.js +8 -0
- package/lib/components/card/card.styles.js.map +1 -1
- package/lib/components/checkbox-field-item/checkbox-field-item.d.ts +6 -0
- package/lib/components/checkbox-field-item/checkbox-field-item.d.ts.map +1 -1
- package/lib/components/checkbox-field-item/checkbox-field-item.js +6 -0
- package/lib/components/checkbox-field-item/checkbox-field-item.js.map +1 -1
- package/lib/components/checkbox-field-item/checkbox-field-item.styles.js +1 -1
- package/lib/components/checkbox-field-item/checkbox-field-item.styles.js.map +1 -1
- package/lib/components/date-picker/date-picker.d.ts +5 -0
- package/lib/components/date-picker/date-picker.d.ts.map +1 -1
- package/lib/components/date-picker/date-picker.js +12 -10
- package/lib/components/date-picker/date-picker.js.map +1 -1
- package/lib/components/dropdown/dropdown.d.ts +2 -0
- package/lib/components/dropdown/dropdown.d.ts.map +1 -1
- package/lib/components/dropdown/dropdown.js +2 -0
- package/lib/components/dropdown/dropdown.js.map +1 -1
- package/lib/components/dropdown-item/dropdown-item.d.ts +8 -0
- package/lib/components/dropdown-item/dropdown-item.d.ts.map +1 -1
- package/lib/components/dropdown-item/dropdown-item.js +15 -2
- package/lib/components/dropdown-item/dropdown-item.js.map +1 -1
- package/lib/components/feature/feature.d.ts +4 -0
- package/lib/components/feature/feature.d.ts.map +1 -1
- package/lib/components/feature/feature.js +4 -1
- package/lib/components/feature/feature.js.map +1 -1
- package/lib/components/field/field.d.ts +2 -0
- package/lib/components/field/field.d.ts.map +1 -1
- package/lib/components/field/field.js +3 -0
- package/lib/components/field/field.js.map +1 -1
- package/lib/components/global-nav-item/global-nav-item.d.ts +2 -0
- package/lib/components/global-nav-item/global-nav-item.d.ts.map +1 -1
- package/lib/components/global-nav-item/global-nav-item.js +2 -0
- package/lib/components/global-nav-item/global-nav-item.js.map +1 -1
- package/lib/components/header/header.d.ts +2 -0
- package/lib/components/header/header.d.ts.map +1 -1
- package/lib/components/header/header.js +2 -0
- package/lib/components/header/header.js.map +1 -1
- package/lib/components/hero/hero.d.ts +4 -0
- package/lib/components/hero/hero.d.ts.map +1 -1
- package/lib/components/hero/hero.js +4 -0
- package/lib/components/hero/hero.js.map +1 -1
- package/lib/components/hero/hero.styles.d.ts.map +1 -1
- package/lib/components/hero/hero.styles.js +13 -0
- package/lib/components/hero/hero.styles.js.map +1 -1
- package/lib/components/icon/icon.d.ts +3 -0
- package/lib/components/icon/icon.d.ts.map +1 -1
- package/lib/components/icon/icon.js +7 -5
- package/lib/components/icon/icon.js.map +1 -1
- package/lib/components/link/link.d.ts +2 -0
- package/lib/components/link/link.d.ts.map +1 -1
- package/lib/components/link/link.js +2 -0
- package/lib/components/link/link.js.map +1 -1
- package/lib/components/link-list-item/link-list-item.d.ts +2 -0
- package/lib/components/link-list-item/link-list-item.d.ts.map +1 -1
- package/lib/components/link-list-item/link-list-item.js +2 -0
- package/lib/components/link-list-item/link-list-item.js.map +1 -1
- package/lib/components/modal/modal.d.ts +4 -0
- package/lib/components/modal/modal.d.ts.map +1 -1
- package/lib/components/modal/modal.js +4 -0
- package/lib/components/modal/modal.js.map +1 -1
- package/lib/components/multi-select/multi-select.d.ts +4 -0
- package/lib/components/multi-select/multi-select.d.ts.map +1 -1
- package/lib/components/multi-select/multi-select.js +5 -2
- package/lib/components/multi-select/multi-select.js.map +1 -1
- package/lib/components/page-header/page-header.d.ts +1 -0
- package/lib/components/page-header/page-header.d.ts.map +1 -1
- package/lib/components/page-header/page-header.js +3 -2
- package/lib/components/page-header/page-header.js.map +1 -1
- package/lib/components/pagination/pagination.d.ts +7 -0
- package/lib/components/pagination/pagination.d.ts.map +1 -1
- package/lib/components/pagination/pagination.js +7 -0
- package/lib/components/pagination/pagination.js.map +1 -1
- package/lib/components/percent-bar/percent-bar.d.ts.map +1 -1
- package/lib/components/percent-bar/percent-bar.js +1 -0
- package/lib/components/percent-bar/percent-bar.js.map +1 -1
- package/lib/components/popover/popover.d.ts +6 -0
- package/lib/components/popover/popover.d.ts.map +1 -1
- package/lib/components/popover/popover.js +7 -1
- package/lib/components/popover/popover.js.map +1 -1
- package/lib/components/primary-nav-item/primary-nav-item.d.ts +2 -0
- package/lib/components/primary-nav-item/primary-nav-item.d.ts.map +1 -1
- package/lib/components/primary-nav-item/primary-nav-item.js +2 -0
- package/lib/components/primary-nav-item/primary-nav-item.js.map +1 -1
- package/lib/components/remove-tag/remove-tag.d.ts +2 -0
- package/lib/components/remove-tag/remove-tag.d.ts.map +1 -1
- package/lib/components/remove-tag/remove-tag.js +3 -1
- package/lib/components/remove-tag/remove-tag.js.map +1 -1
- package/lib/components/section/section.d.ts +1 -0
- package/lib/components/section/section.d.ts.map +1 -1
- package/lib/components/section/section.js +1 -0
- package/lib/components/section/section.js.map +1 -1
- package/lib/components/select/select.d.ts +2 -0
- package/lib/components/select/select.d.ts.map +1 -1
- package/lib/components/select/select.js +5 -1
- package/lib/components/select/select.js.map +1 -1
- package/lib/components/split-button/split-button.d.ts +3 -0
- package/lib/components/split-button/split-button.d.ts.map +1 -1
- package/lib/components/split-button/split-button.js.map +1 -1
- package/lib/components/tab/tab.d.ts +2 -0
- package/lib/components/tab/tab.d.ts.map +1 -1
- package/lib/components/tab/tab.js +2 -0
- package/lib/components/tab/tab.js.map +1 -1
- package/lib/components/table-object/table-object.d.ts +2 -0
- package/lib/components/table-object/table-object.d.ts.map +1 -1
- package/lib/components/table-object/table-object.js +2 -0
- package/lib/components/table-object/table-object.js.map +1 -1
- package/lib/components/table-row/table-row.d.ts +1 -0
- package/lib/components/table-row/table-row.d.ts.map +1 -1
- package/lib/components/table-row/table-row.js +1 -0
- package/lib/components/table-row/table-row.js.map +1 -1
- package/lib/components/tag/tag.d.ts +5 -0
- package/lib/components/tag/tag.d.ts.map +1 -1
- package/lib/components/tag/tag.js +2 -0
- package/lib/components/tag/tag.js.map +1 -1
- package/lib/components/tag-list/tag-list.d.ts +2 -0
- package/lib/components/tag-list/tag-list.d.ts.map +1 -1
- package/lib/components/tag-list/tag-list.js +2 -0
- package/lib/components/tag-list/tag-list.js.map +1 -1
- package/lib/components/text-link/text-link.d.ts +1 -0
- package/lib/components/text-link/text-link.d.ts.map +1 -1
- package/lib/components/text-link/text-link.js +1 -0
- package/lib/components/text-link/text-link.js.map +1 -1
- package/lib/components/tooltip/tooltip.d.ts +6 -0
- package/lib/components/tooltip/tooltip.d.ts.map +1 -1
- package/lib/components/tooltip/tooltip.js +3 -0
- package/lib/components/tooltip/tooltip.js.map +1 -1
- package/lib/design-tokens/brands/claude-terracotta/css/tokens_brand.css +85 -0
- package/lib/design-tokens/brands/claude-terracotta/css/tokens_claude-terracotta.css +1 -0
- package/lib/design-tokens/brands/claude-terracotta/css/tokens_claude-terracotta.module.d.ts +3 -0
- package/lib/design-tokens/brands/claude-terracotta/css/tokens_claude-terracotta.module.d.ts.map +1 -0
- package/lib/design-tokens/brands/claude-terracotta/css/tokens_claude-terracotta.module.js +90 -0
- package/lib/design-tokens/brands/claude-terracotta/css/tokens_claude-terracotta.module.js.map +1 -0
- package/lib/design-tokens/brands/cre8-a2ui/css/tokens_brand.css +1 -0
- package/lib/design-tokens/brands/cre8-teal/css/tokens_brand.css +87 -0
- package/lib/design-tokens/brands/cre8-teal/css/tokens_cre8-teal.css +1 -0
- package/lib/design-tokens/brands/cre8-teal/css/tokens_cre8-teal.module.d.ts +3 -0
- package/lib/design-tokens/brands/cre8-teal/css/tokens_cre8-teal.module.d.ts.map +1 -0
- package/lib/design-tokens/brands/cre8-teal/css/tokens_cre8-teal.module.js +90 -0
- package/lib/design-tokens/brands/cre8-teal/css/tokens_cre8-teal.module.js.map +1 -0
- package/lib/scripts/generate-react-manifest.d.ts +20 -0
- package/lib/scripts/generate-react-manifest.d.ts.map +1 -0
- package/lib/scripts/generate-react-manifest.js +154 -0
- package/lib/scripts/generate-react-manifest.js.map +1 -0
- package/mcp-manifest.json +203 -38
- package/package.json +24 -4
- package/react-manifest.json +3594 -0
- package/dist/leaf.png +0 -0
- package/dist/leafDS.png +0 -0
- package/dist/leafLogo.svg +0 -1
package/a2ui/demo.html
ADDED
|
@@ -0,0 +1,243 @@
|
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="utf-8" />
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
6
|
+
<title>cre8-wc A2UI renderer demo</title>
|
|
7
|
+
<link
|
|
8
|
+
rel="stylesheet"
|
|
9
|
+
href="../design-tokens/brands/cre8-a2ui/css/tokens_cre8-a2ui.css"
|
|
10
|
+
/>
|
|
11
|
+
<style>
|
|
12
|
+
html,
|
|
13
|
+
body {
|
|
14
|
+
margin: 0;
|
|
15
|
+
font-family:
|
|
16
|
+
system-ui,
|
|
17
|
+
-apple-system,
|
|
18
|
+
sans-serif;
|
|
19
|
+
height: 100vh;
|
|
20
|
+
}
|
|
21
|
+
body {
|
|
22
|
+
display: grid;
|
|
23
|
+
grid-template-rows: auto 1fr;
|
|
24
|
+
grid-template-columns: 1fr;
|
|
25
|
+
}
|
|
26
|
+
header {
|
|
27
|
+
padding: 12px 20px;
|
|
28
|
+
border-bottom: 1px solid #e1e4e8;
|
|
29
|
+
display: flex;
|
|
30
|
+
align-items: baseline;
|
|
31
|
+
gap: 16px;
|
|
32
|
+
}
|
|
33
|
+
header h1 {
|
|
34
|
+
font-size: 16px;
|
|
35
|
+
margin: 0;
|
|
36
|
+
}
|
|
37
|
+
header .status {
|
|
38
|
+
font-size: 12px;
|
|
39
|
+
color: #6a737d;
|
|
40
|
+
}
|
|
41
|
+
main {
|
|
42
|
+
display: grid;
|
|
43
|
+
grid-template-columns: 1fr 1fr;
|
|
44
|
+
overflow: hidden;
|
|
45
|
+
}
|
|
46
|
+
.panel {
|
|
47
|
+
display: flex;
|
|
48
|
+
flex-direction: column;
|
|
49
|
+
border-right: 1px solid #e1e4e8;
|
|
50
|
+
overflow: hidden;
|
|
51
|
+
}
|
|
52
|
+
.panel:last-child {
|
|
53
|
+
border-right: none;
|
|
54
|
+
}
|
|
55
|
+
.panel h2 {
|
|
56
|
+
margin: 0;
|
|
57
|
+
padding: 10px 16px;
|
|
58
|
+
font-size: 12px;
|
|
59
|
+
font-weight: 600;
|
|
60
|
+
text-transform: uppercase;
|
|
61
|
+
letter-spacing: 0.5px;
|
|
62
|
+
color: #586069;
|
|
63
|
+
background: #f6f8fa;
|
|
64
|
+
border-bottom: 1px solid #e1e4e8;
|
|
65
|
+
}
|
|
66
|
+
.panel-body {
|
|
67
|
+
flex: 1;
|
|
68
|
+
padding: 16px;
|
|
69
|
+
overflow: auto;
|
|
70
|
+
}
|
|
71
|
+
textarea {
|
|
72
|
+
width: 100%;
|
|
73
|
+
height: 100%;
|
|
74
|
+
border: 1px solid #d1d5da;
|
|
75
|
+
border-radius: 4px;
|
|
76
|
+
padding: 10px;
|
|
77
|
+
font-family: ui-monospace, 'SF Mono', monospace;
|
|
78
|
+
font-size: 12px;
|
|
79
|
+
line-height: 1.5;
|
|
80
|
+
resize: none;
|
|
81
|
+
box-sizing: border-box;
|
|
82
|
+
}
|
|
83
|
+
button {
|
|
84
|
+
padding: 6px 14px;
|
|
85
|
+
font-size: 13px;
|
|
86
|
+
border: 1px solid #d1d5da;
|
|
87
|
+
background: #fafbfc;
|
|
88
|
+
border-radius: 4px;
|
|
89
|
+
cursor: pointer;
|
|
90
|
+
}
|
|
91
|
+
button:hover {
|
|
92
|
+
background: #f3f4f6;
|
|
93
|
+
}
|
|
94
|
+
.toolbar {
|
|
95
|
+
padding: 8px 16px;
|
|
96
|
+
display: flex;
|
|
97
|
+
gap: 8px;
|
|
98
|
+
border-bottom: 1px solid #e1e4e8;
|
|
99
|
+
}
|
|
100
|
+
.error {
|
|
101
|
+
color: #d73a49;
|
|
102
|
+
font-size: 12px;
|
|
103
|
+
padding: 8px 16px;
|
|
104
|
+
background: #ffeef0;
|
|
105
|
+
border-bottom: 1px solid #f97583;
|
|
106
|
+
white-space: pre-wrap;
|
|
107
|
+
font-family: ui-monospace, monospace;
|
|
108
|
+
display: none;
|
|
109
|
+
}
|
|
110
|
+
.error.visible {
|
|
111
|
+
display: block;
|
|
112
|
+
}
|
|
113
|
+
#output {
|
|
114
|
+
display: flex;
|
|
115
|
+
flex-direction: column;
|
|
116
|
+
gap: 16px;
|
|
117
|
+
}
|
|
118
|
+
</style>
|
|
119
|
+
</head>
|
|
120
|
+
<body>
|
|
121
|
+
<header>
|
|
122
|
+
<h1>cre8-wc A2UI renderer demo</h1>
|
|
123
|
+
<span class="status" id="status">loading…</span>
|
|
124
|
+
</header>
|
|
125
|
+
<main>
|
|
126
|
+
<section class="panel">
|
|
127
|
+
<h2>Spec (JSON)</h2>
|
|
128
|
+
<div class="toolbar">
|
|
129
|
+
<button id="render-btn">Render →</button>
|
|
130
|
+
<button id="reset-btn">Reset</button>
|
|
131
|
+
</div>
|
|
132
|
+
<div class="error" id="error"></div>
|
|
133
|
+
<div class="panel-body">
|
|
134
|
+
<textarea id="spec" spellcheck="false"></textarea>
|
|
135
|
+
</div>
|
|
136
|
+
</section>
|
|
137
|
+
<section class="panel">
|
|
138
|
+
<h2>Canvas</h2>
|
|
139
|
+
<div class="panel-body" id="output"></div>
|
|
140
|
+
</section>
|
|
141
|
+
</main>
|
|
142
|
+
|
|
143
|
+
<script type="module" src="../cdn/cre8-wc.esm.js"></script>
|
|
144
|
+
|
|
145
|
+
<script type="module">
|
|
146
|
+
import { registerCatalog, render } from './index.js';
|
|
147
|
+
|
|
148
|
+
const DEFAULT_SPEC = {
|
|
149
|
+
component: 'cre8-card',
|
|
150
|
+
slots: {
|
|
151
|
+
header: [
|
|
152
|
+
{
|
|
153
|
+
component: 'cre8-heading',
|
|
154
|
+
props: { type: 'headline-default', tagVariant: 'h2' },
|
|
155
|
+
children: ['Card heading'],
|
|
156
|
+
},
|
|
157
|
+
],
|
|
158
|
+
default: [
|
|
159
|
+
{
|
|
160
|
+
component: 'cre8-alert',
|
|
161
|
+
props: { status: 'info', headerText: 'Heads up', ctaBody: 'Review your settings before saving.' },
|
|
162
|
+
},
|
|
163
|
+
{
|
|
164
|
+
component: 'cre8-button-group',
|
|
165
|
+
children: [
|
|
166
|
+
{
|
|
167
|
+
component: 'cre8-button',
|
|
168
|
+
props: { text: 'Save', variant: 'primary' },
|
|
169
|
+
events: { click: 'save' },
|
|
170
|
+
},
|
|
171
|
+
{
|
|
172
|
+
component: 'cre8-button',
|
|
173
|
+
props: { text: 'Cancel', variant: 'tertiary' },
|
|
174
|
+
events: { click: 'cancel' },
|
|
175
|
+
},
|
|
176
|
+
],
|
|
177
|
+
},
|
|
178
|
+
],
|
|
179
|
+
},
|
|
180
|
+
};
|
|
181
|
+
|
|
182
|
+
const $status = document.getElementById('status');
|
|
183
|
+
const $spec = document.getElementById('spec');
|
|
184
|
+
const $output = document.getElementById('output');
|
|
185
|
+
const $error = document.getElementById('error');
|
|
186
|
+
const $renderBtn = document.getElementById('render-btn');
|
|
187
|
+
const $resetBtn = document.getElementById('reset-btn');
|
|
188
|
+
|
|
189
|
+
$spec.value = JSON.stringify(DEFAULT_SPEC, null, 2);
|
|
190
|
+
|
|
191
|
+
let catalog;
|
|
192
|
+
try {
|
|
193
|
+
const schema = await fetch('./catalog.json').then((r) => r.json());
|
|
194
|
+
catalog = registerCatalog(schema);
|
|
195
|
+
$status.textContent = `catalog "${catalog.id}" · ${catalog.components.size} components`;
|
|
196
|
+
} catch (e) {
|
|
197
|
+
$status.textContent = 'failed to load catalog';
|
|
198
|
+
showError(e.message);
|
|
199
|
+
throw e;
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
function showError(msg) {
|
|
203
|
+
$error.textContent = msg;
|
|
204
|
+
$error.classList.add('visible');
|
|
205
|
+
}
|
|
206
|
+
function clearError() {
|
|
207
|
+
$error.textContent = '';
|
|
208
|
+
$error.classList.remove('visible');
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
function logEvent(e) {
|
|
212
|
+
console.log(
|
|
213
|
+
`[a2ui] ${e.event} → ${e.handler} @ ${e.path} (${e.component})`,
|
|
214
|
+
e.detail ?? ''
|
|
215
|
+
);
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
function doRender() {
|
|
219
|
+
clearError();
|
|
220
|
+
let spec;
|
|
221
|
+
try {
|
|
222
|
+
spec = JSON.parse($spec.value);
|
|
223
|
+
} catch (e) {
|
|
224
|
+
showError('JSON parse error: ' + e.message);
|
|
225
|
+
return;
|
|
226
|
+
}
|
|
227
|
+
try {
|
|
228
|
+
render(spec, catalog, { root: $output, onEvent: logEvent });
|
|
229
|
+
} catch (e) {
|
|
230
|
+
showError(e.message);
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
$renderBtn.addEventListener('click', doRender);
|
|
235
|
+
$resetBtn.addEventListener('click', () => {
|
|
236
|
+
$spec.value = JSON.stringify(DEFAULT_SPEC, null, 2);
|
|
237
|
+
doRender();
|
|
238
|
+
});
|
|
239
|
+
|
|
240
|
+
doRender();
|
|
241
|
+
</script>
|
|
242
|
+
</body>
|
|
243
|
+
</html>
|