@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
|
@@ -0,0 +1,341 @@
|
|
|
1
|
+
{
|
|
2
|
+
"component": "cre8-layout-section",
|
|
3
|
+
"children": [
|
|
4
|
+
{
|
|
5
|
+
"component": "cre8-band",
|
|
6
|
+
"props": { "variant": "branded" },
|
|
7
|
+
"children": [
|
|
8
|
+
{
|
|
9
|
+
"component": "cre8-hero",
|
|
10
|
+
"props": { "align": "center" },
|
|
11
|
+
"children": [
|
|
12
|
+
{
|
|
13
|
+
"component": "cre8-heading",
|
|
14
|
+
"props": { "type": "display-default", "tagVariant": "h1" },
|
|
15
|
+
"children": ["Taylor Rivera"]
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
"component": "cre8-heading",
|
|
19
|
+
"props": { "type": "title-large", "tagVariant": "h2" },
|
|
20
|
+
"children": ["Product designer building agent-driven UIs"]
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"component": "cre8-text-passage",
|
|
24
|
+
"props": { "size": "large" },
|
|
25
|
+
"children": [
|
|
26
|
+
"I design and ship interfaces where AI agents compose the UI itself. Based in Brooklyn, shipping from a laptop and a lot of coffee."
|
|
27
|
+
]
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
"component": "cre8-button-group",
|
|
31
|
+
"children": [
|
|
32
|
+
{
|
|
33
|
+
"component": "cre8-button",
|
|
34
|
+
"props": {
|
|
35
|
+
"text": "View work",
|
|
36
|
+
"variant": "primary",
|
|
37
|
+
"href": "#work"
|
|
38
|
+
},
|
|
39
|
+
"events": { "click": "scroll-to-work" }
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
"component": "cre8-button",
|
|
43
|
+
"props": {
|
|
44
|
+
"text": "Get in touch",
|
|
45
|
+
"variant": "tertiary",
|
|
46
|
+
"href": "mailto:hi@taylorrivera.dev"
|
|
47
|
+
},
|
|
48
|
+
"events": { "click": "open-email" }
|
|
49
|
+
}
|
|
50
|
+
]
|
|
51
|
+
}
|
|
52
|
+
]
|
|
53
|
+
}
|
|
54
|
+
]
|
|
55
|
+
},
|
|
56
|
+
|
|
57
|
+
{
|
|
58
|
+
"component": "cre8-layout-section",
|
|
59
|
+
"children": [
|
|
60
|
+
{
|
|
61
|
+
"component": "cre8-heading",
|
|
62
|
+
"props": { "type": "headline-large", "tagVariant": "h2" },
|
|
63
|
+
"children": ["About"]
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
"component": "cre8-text-passage",
|
|
67
|
+
"children": [
|
|
68
|
+
"Ten years designing and building across the stack: Lit web components, Next.js, Supabase, and whatever Anthropic ships next. I like making the AI do the boring parts so I can focus on what a thing should feel like."
|
|
69
|
+
]
|
|
70
|
+
}
|
|
71
|
+
]
|
|
72
|
+
},
|
|
73
|
+
|
|
74
|
+
{
|
|
75
|
+
"component": "cre8-layout-section",
|
|
76
|
+
"children": [
|
|
77
|
+
{
|
|
78
|
+
"component": "cre8-heading",
|
|
79
|
+
"props": { "type": "headline-large", "tagVariant": "h2" },
|
|
80
|
+
"children": ["Featured work"]
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
"component": "cre8-grid",
|
|
84
|
+
"props": { "variant": "3up", "gap": "lg" },
|
|
85
|
+
"children": [
|
|
86
|
+
{
|
|
87
|
+
"component": "cre8-grid-item",
|
|
88
|
+
"children": [
|
|
89
|
+
{
|
|
90
|
+
"component": "cre8-card",
|
|
91
|
+
"slots": {
|
|
92
|
+
"header": [
|
|
93
|
+
{
|
|
94
|
+
"component": "cre8-heading",
|
|
95
|
+
"props": { "type": "title-default", "tagVariant": "h3" },
|
|
96
|
+
"children": ["A2UI Renderer for cre8-wc"]
|
|
97
|
+
}
|
|
98
|
+
],
|
|
99
|
+
"default": [
|
|
100
|
+
{
|
|
101
|
+
"component": "cre8-text-passage",
|
|
102
|
+
"props": { "size": "small" },
|
|
103
|
+
"children": [
|
|
104
|
+
"Zero-dep runtime that validates and renders AI-emitted component trees against a JSON Schema catalog generated from the design system's manifest."
|
|
105
|
+
]
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
"component": "cre8-button",
|
|
109
|
+
"props": {
|
|
110
|
+
"text": "Read case study",
|
|
111
|
+
"variant": "secondary",
|
|
112
|
+
"href": "/work/a2ui"
|
|
113
|
+
},
|
|
114
|
+
"events": { "click": "open-project:a2ui" }
|
|
115
|
+
}
|
|
116
|
+
]
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
]
|
|
120
|
+
},
|
|
121
|
+
{
|
|
122
|
+
"component": "cre8-grid-item",
|
|
123
|
+
"children": [
|
|
124
|
+
{
|
|
125
|
+
"component": "cre8-card",
|
|
126
|
+
"slots": {
|
|
127
|
+
"header": [
|
|
128
|
+
{
|
|
129
|
+
"component": "cre8-heading",
|
|
130
|
+
"props": { "type": "title-default", "tagVariant": "h3" },
|
|
131
|
+
"children": ["Cre8 MCP Server"]
|
|
132
|
+
}
|
|
133
|
+
],
|
|
134
|
+
"default": [
|
|
135
|
+
{
|
|
136
|
+
"component": "cre8-text-passage",
|
|
137
|
+
"props": { "size": "small" },
|
|
138
|
+
"children": [
|
|
139
|
+
"An MCP server that exposes the cre8-wc catalog and an A2UI spec validator to any AI agent. Ships as @tmorrow/cre8-mcp."
|
|
140
|
+
]
|
|
141
|
+
},
|
|
142
|
+
{
|
|
143
|
+
"component": "cre8-button",
|
|
144
|
+
"props": {
|
|
145
|
+
"text": "View on GitHub",
|
|
146
|
+
"variant": "secondary",
|
|
147
|
+
"href": "https://github.com/tmorrowdev/Cre8-Components",
|
|
148
|
+
"target": "_blank"
|
|
149
|
+
},
|
|
150
|
+
"events": { "click": "open-project:cre8-mcp" }
|
|
151
|
+
}
|
|
152
|
+
]
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
]
|
|
156
|
+
},
|
|
157
|
+
{
|
|
158
|
+
"component": "cre8-grid-item",
|
|
159
|
+
"children": [
|
|
160
|
+
{
|
|
161
|
+
"component": "cre8-card",
|
|
162
|
+
"slots": {
|
|
163
|
+
"header": [
|
|
164
|
+
{
|
|
165
|
+
"component": "cre8-heading",
|
|
166
|
+
"props": { "type": "title-default", "tagVariant": "h3" },
|
|
167
|
+
"children": ["cre8-wc design system"]
|
|
168
|
+
}
|
|
169
|
+
],
|
|
170
|
+
"default": [
|
|
171
|
+
{
|
|
172
|
+
"component": "cre8-text-passage",
|
|
173
|
+
"props": { "size": "small" },
|
|
174
|
+
"children": [
|
|
175
|
+
"85 Lit web components with auto-registration, React wrappers, and a CDN bundle. Used by internal tooling at a Fortune-500 healthcare company."
|
|
176
|
+
]
|
|
177
|
+
},
|
|
178
|
+
{
|
|
179
|
+
"component": "cre8-button",
|
|
180
|
+
"props": {
|
|
181
|
+
"text": "Browse components",
|
|
182
|
+
"variant": "secondary",
|
|
183
|
+
"href": "/work/cre8-wc"
|
|
184
|
+
},
|
|
185
|
+
"events": { "click": "open-project:cre8-wc" }
|
|
186
|
+
}
|
|
187
|
+
]
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
]
|
|
191
|
+
}
|
|
192
|
+
]
|
|
193
|
+
}
|
|
194
|
+
]
|
|
195
|
+
},
|
|
196
|
+
|
|
197
|
+
{
|
|
198
|
+
"component": "cre8-layout-section",
|
|
199
|
+
"children": [
|
|
200
|
+
{
|
|
201
|
+
"component": "cre8-heading",
|
|
202
|
+
"props": { "type": "headline-large", "tagVariant": "h2" },
|
|
203
|
+
"children": ["Toolbox"]
|
|
204
|
+
},
|
|
205
|
+
{
|
|
206
|
+
"component": "cre8-grid",
|
|
207
|
+
"props": { "variant": "4up", "gap": "sm" },
|
|
208
|
+
"children": [
|
|
209
|
+
{
|
|
210
|
+
"component": "cre8-grid-item",
|
|
211
|
+
"children": [
|
|
212
|
+
{
|
|
213
|
+
"component": "cre8-tag",
|
|
214
|
+
"props": { "text": "TypeScript", "variant": "branded", "shape": "round" }
|
|
215
|
+
}
|
|
216
|
+
]
|
|
217
|
+
},
|
|
218
|
+
{
|
|
219
|
+
"component": "cre8-grid-item",
|
|
220
|
+
"children": [
|
|
221
|
+
{
|
|
222
|
+
"component": "cre8-tag",
|
|
223
|
+
"props": { "text": "Lit", "variant": "branded", "shape": "round" }
|
|
224
|
+
}
|
|
225
|
+
]
|
|
226
|
+
},
|
|
227
|
+
{
|
|
228
|
+
"component": "cre8-grid-item",
|
|
229
|
+
"children": [
|
|
230
|
+
{
|
|
231
|
+
"component": "cre8-tag",
|
|
232
|
+
"props": { "text": "Next.js", "variant": "branded", "shape": "round" }
|
|
233
|
+
}
|
|
234
|
+
]
|
|
235
|
+
},
|
|
236
|
+
{
|
|
237
|
+
"component": "cre8-grid-item",
|
|
238
|
+
"children": [
|
|
239
|
+
{
|
|
240
|
+
"component": "cre8-tag",
|
|
241
|
+
"props": { "text": "Supabase", "variant": "branded", "shape": "round" }
|
|
242
|
+
}
|
|
243
|
+
]
|
|
244
|
+
},
|
|
245
|
+
{
|
|
246
|
+
"component": "cre8-grid-item",
|
|
247
|
+
"children": [
|
|
248
|
+
{
|
|
249
|
+
"component": "cre8-tag",
|
|
250
|
+
"props": { "text": "Figma", "variant": "neutral", "shape": "round" }
|
|
251
|
+
}
|
|
252
|
+
]
|
|
253
|
+
},
|
|
254
|
+
{
|
|
255
|
+
"component": "cre8-grid-item",
|
|
256
|
+
"children": [
|
|
257
|
+
{
|
|
258
|
+
"component": "cre8-tag",
|
|
259
|
+
"props": { "text": "Anthropic SDK", "variant": "neutral", "shape": "round" }
|
|
260
|
+
}
|
|
261
|
+
]
|
|
262
|
+
},
|
|
263
|
+
{
|
|
264
|
+
"component": "cre8-grid-item",
|
|
265
|
+
"children": [
|
|
266
|
+
{
|
|
267
|
+
"component": "cre8-tag",
|
|
268
|
+
"props": { "text": "Vercel", "variant": "neutral", "shape": "round" }
|
|
269
|
+
}
|
|
270
|
+
]
|
|
271
|
+
},
|
|
272
|
+
{
|
|
273
|
+
"component": "cre8-grid-item",
|
|
274
|
+
"children": [
|
|
275
|
+
{
|
|
276
|
+
"component": "cre8-tag",
|
|
277
|
+
"props": { "text": "Tailwind", "variant": "neutral", "shape": "round" }
|
|
278
|
+
}
|
|
279
|
+
]
|
|
280
|
+
}
|
|
281
|
+
]
|
|
282
|
+
}
|
|
283
|
+
]
|
|
284
|
+
},
|
|
285
|
+
|
|
286
|
+
{
|
|
287
|
+
"component": "cre8-divider"
|
|
288
|
+
},
|
|
289
|
+
|
|
290
|
+
{
|
|
291
|
+
"component": "cre8-layout-section",
|
|
292
|
+
"children": [
|
|
293
|
+
{
|
|
294
|
+
"component": "cre8-heading",
|
|
295
|
+
"props": { "type": "headline-default", "tagVariant": "h2" },
|
|
296
|
+
"children": ["Let's build something"]
|
|
297
|
+
},
|
|
298
|
+
{
|
|
299
|
+
"component": "cre8-text-passage",
|
|
300
|
+
"children": [
|
|
301
|
+
"Open to freelance work, collaborations, and talking to anyone shipping agent-UI systems."
|
|
302
|
+
]
|
|
303
|
+
},
|
|
304
|
+
{
|
|
305
|
+
"component": "cre8-button-group",
|
|
306
|
+
"children": [
|
|
307
|
+
{
|
|
308
|
+
"component": "cre8-button",
|
|
309
|
+
"props": {
|
|
310
|
+
"text": "Email",
|
|
311
|
+
"variant": "primary",
|
|
312
|
+
"href": "mailto:hi@taylorrivera.dev"
|
|
313
|
+
},
|
|
314
|
+
"events": { "click": "open-email" }
|
|
315
|
+
},
|
|
316
|
+
{
|
|
317
|
+
"component": "cre8-button",
|
|
318
|
+
"props": {
|
|
319
|
+
"text": "GitHub",
|
|
320
|
+
"variant": "tertiary",
|
|
321
|
+
"href": "https://github.com/tmorrowdev",
|
|
322
|
+
"target": "_blank"
|
|
323
|
+
},
|
|
324
|
+
"events": { "click": "open-github" }
|
|
325
|
+
},
|
|
326
|
+
{
|
|
327
|
+
"component": "cre8-button",
|
|
328
|
+
"props": {
|
|
329
|
+
"text": "LinkedIn",
|
|
330
|
+
"variant": "tertiary",
|
|
331
|
+
"href": "https://linkedin.com/in/taylorrivera",
|
|
332
|
+
"target": "_blank"
|
|
333
|
+
},
|
|
334
|
+
"events": { "click": "open-linkedin" }
|
|
335
|
+
}
|
|
336
|
+
]
|
|
337
|
+
}
|
|
338
|
+
]
|
|
339
|
+
}
|
|
340
|
+
]
|
|
341
|
+
}
|
|
@@ -0,0 +1,246 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { readFileSync, writeFileSync } from 'node:fs';
|
|
3
|
+
import { fileURLToPath } from 'node:url';
|
|
4
|
+
import { dirname, resolve } from 'node:path';
|
|
5
|
+
|
|
6
|
+
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
7
|
+
const manifestPath = resolve(__dirname, '..', 'mcp-manifest.json');
|
|
8
|
+
const outPath = resolve(__dirname, 'catalog.json');
|
|
9
|
+
|
|
10
|
+
const manifest = JSON.parse(readFileSync(manifestPath, 'utf8'));
|
|
11
|
+
|
|
12
|
+
const QUOTED_LITERAL = /^"([^"]*)"$/;
|
|
13
|
+
|
|
14
|
+
const SELECT_OPTION_SCHEMA = {
|
|
15
|
+
type: 'object',
|
|
16
|
+
required: ['label', 'value'],
|
|
17
|
+
additionalProperties: false,
|
|
18
|
+
properties: {
|
|
19
|
+
label: { type: 'string' },
|
|
20
|
+
value: { type: ['string', 'number'] },
|
|
21
|
+
},
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
const SELECT_OPTION_GROUP_SCHEMA = {
|
|
25
|
+
type: 'object',
|
|
26
|
+
required: ['optGroupLabel', 'options'],
|
|
27
|
+
additionalProperties: false,
|
|
28
|
+
properties: {
|
|
29
|
+
optGroupLabel: { type: 'string' },
|
|
30
|
+
options: { type: 'array', items: SELECT_OPTION_SCHEMA },
|
|
31
|
+
},
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
const TS_TYPE_RESOLVERS = {
|
|
35
|
+
Cre8ChartType: {
|
|
36
|
+
type: 'string',
|
|
37
|
+
enum: ['line', 'bar', 'pie', 'doughnut', 'radar', 'polarArea', 'bubble', 'scatter'],
|
|
38
|
+
},
|
|
39
|
+
Color: { type: 'string', enum: ['neutral', 'branded', 'neutral-hybrid'] },
|
|
40
|
+
Shape: { type: 'string', enum: ['round', 'square'] },
|
|
41
|
+
status: { type: 'string', enum: ['error', 'warning', 'success'] },
|
|
42
|
+
'(Cre8SelectOption | Cre8SelectOptionGroup)[]': {
|
|
43
|
+
type: 'array',
|
|
44
|
+
items: { oneOf: [SELECT_OPTION_SCHEMA, SELECT_OPTION_GROUP_SCHEMA] },
|
|
45
|
+
},
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
const PROP_OVERRIDES = {
|
|
49
|
+
'cre8-chart.data': { type: 'object', description: 'Chart.js data object with labels and datasets arrays.' },
|
|
50
|
+
'cre8-chart.options': { type: 'object', description: 'Chart.js options object.' },
|
|
51
|
+
'cre8-chart.colors': { type: 'array', items: { type: 'string' }, description: 'Dataset colors.' },
|
|
52
|
+
'cre8-heading.type': {
|
|
53
|
+
type: 'string',
|
|
54
|
+
enum: [
|
|
55
|
+
'display-default',
|
|
56
|
+
'display-small',
|
|
57
|
+
'headline-large',
|
|
58
|
+
'headline-default',
|
|
59
|
+
'headline-small',
|
|
60
|
+
'title-xlarge',
|
|
61
|
+
'title-large',
|
|
62
|
+
'title-default',
|
|
63
|
+
'title-small',
|
|
64
|
+
'label-large',
|
|
65
|
+
'label',
|
|
66
|
+
'label-small',
|
|
67
|
+
'meta-large',
|
|
68
|
+
'meta-default',
|
|
69
|
+
'meta-small',
|
|
70
|
+
],
|
|
71
|
+
},
|
|
72
|
+
};
|
|
73
|
+
|
|
74
|
+
function mapAttr(attr, componentName, propName, kind) {
|
|
75
|
+
const overrideKey = `${componentName}.${propName}`;
|
|
76
|
+
let out;
|
|
77
|
+
if (PROP_OVERRIDES[overrideKey]) {
|
|
78
|
+
out = { ...PROP_OVERRIDES[overrideKey] };
|
|
79
|
+
if (attr.description) out.description = attr.description.trim();
|
|
80
|
+
if (attr.default !== undefined) out.default = attr.default;
|
|
81
|
+
} else if (typeof attr.type === 'string' && TS_TYPE_RESOLVERS[attr.type]) {
|
|
82
|
+
out = { ...TS_TYPE_RESOLVERS[attr.type] };
|
|
83
|
+
if (attr.description) out.description = attr.description.trim();
|
|
84
|
+
if (attr.default !== undefined) out.default = attr.default;
|
|
85
|
+
} else {
|
|
86
|
+
out = mapAttrPlain(attr);
|
|
87
|
+
}
|
|
88
|
+
out['x-kind'] = kind;
|
|
89
|
+
return out;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
function mapAttrPlain(attr) {
|
|
93
|
+
const schema = {};
|
|
94
|
+
if (attr.description) schema.description = attr.description.trim();
|
|
95
|
+
if (attr.default !== undefined) schema.default = attr.default;
|
|
96
|
+
|
|
97
|
+
if (Array.isArray(attr.values) && attr.values.length) {
|
|
98
|
+
schema.type = 'string';
|
|
99
|
+
schema.enum = attr.values;
|
|
100
|
+
return schema;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
const t = attr.type;
|
|
104
|
+
if (t === 'boolean') { schema.type = 'boolean'; return schema; }
|
|
105
|
+
if (t === 'number') { schema.type = 'number'; return schema; }
|
|
106
|
+
if (t === 'string') { schema.type = 'string'; return schema; }
|
|
107
|
+
if (t === 'string[]') { schema.type = 'array'; schema.items = { type: 'string' }; return schema; }
|
|
108
|
+
if (t === 'string | number') { schema.type = ['string', 'number']; return schema; }
|
|
109
|
+
|
|
110
|
+
const lit = typeof t === 'string' ? t.match(QUOTED_LITERAL) : null;
|
|
111
|
+
if (lit) { schema.type = 'string'; schema.const = lit[1]; return schema; }
|
|
112
|
+
|
|
113
|
+
if (typeof t === 'string' && t.includes('|')) {
|
|
114
|
+
const parts = t.split('|').map((s) => s.trim());
|
|
115
|
+
const literals = parts.map((p) => p.match(QUOTED_LITERAL)?.[1]).filter(Boolean);
|
|
116
|
+
if (literals.length === parts.length) {
|
|
117
|
+
schema.type = 'string';
|
|
118
|
+
schema.enum = literals;
|
|
119
|
+
return schema;
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
schema.type = 'string';
|
|
124
|
+
schema['x-tsType'] = t;
|
|
125
|
+
return schema;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
const SLOT_OVERRIDES = {
|
|
129
|
+
'cre8-card': { body: 'default' },
|
|
130
|
+
};
|
|
131
|
+
|
|
132
|
+
function normalizeSlotName(name, componentName) {
|
|
133
|
+
const unquoted = typeof name === 'string' ? name.replace(/^"|"$/g, '') : name;
|
|
134
|
+
const base = unquoted === '' ? 'default' : unquoted;
|
|
135
|
+
const override = componentName && SLOT_OVERRIDES[componentName]?.[base];
|
|
136
|
+
return override ?? base;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
function buildComponent(c) {
|
|
140
|
+
const attrs = c.attributes || {};
|
|
141
|
+
const propsSchema = {
|
|
142
|
+
type: 'object',
|
|
143
|
+
additionalProperties: false,
|
|
144
|
+
properties: {},
|
|
145
|
+
};
|
|
146
|
+
for (const [name, attr] of Object.entries(attrs)) {
|
|
147
|
+
propsSchema.properties[name] = mapAttr(attr, c.name, name, 'attribute');
|
|
148
|
+
}
|
|
149
|
+
for (const [name, attr] of Object.entries(c.properties || {})) {
|
|
150
|
+
if (propsSchema.properties[name]) continue;
|
|
151
|
+
propsSchema.properties[name] = mapAttr(attr, c.name, name, 'property');
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
const rawSlots = c.slots || {};
|
|
155
|
+
const slotNames = Object.keys(rawSlots).map((n) => normalizeSlotName(n, c.name));
|
|
156
|
+
const hasSlots = slotNames.length > 0;
|
|
157
|
+
const onlyDefault = slotNames.length === 1 && slotNames[0] === 'default';
|
|
158
|
+
|
|
159
|
+
const events = {};
|
|
160
|
+
for (const [name, evt] of Object.entries(c.events || {})) {
|
|
161
|
+
events[name] = { detail: evt.detail || {} };
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
const def = {
|
|
165
|
+
type: 'object',
|
|
166
|
+
title: c.name,
|
|
167
|
+
'x-category': c.category,
|
|
168
|
+
description: (c.description || '').trim(),
|
|
169
|
+
required: ['component'],
|
|
170
|
+
properties: {
|
|
171
|
+
component: { const: c.name, description: 'Component tag name' },
|
|
172
|
+
props: propsSchema,
|
|
173
|
+
},
|
|
174
|
+
additionalProperties: false,
|
|
175
|
+
};
|
|
176
|
+
|
|
177
|
+
if (onlyDefault) {
|
|
178
|
+
def.properties.children = {
|
|
179
|
+
type: 'array',
|
|
180
|
+
description: (rawSlots.default?.description || '').trim() || 'Child instances rendered into the default slot.',
|
|
181
|
+
items: { $ref: '#/$defs/Component' },
|
|
182
|
+
};
|
|
183
|
+
} else if (hasSlots) {
|
|
184
|
+
const slotProps = {};
|
|
185
|
+
const slotDescriptions = {};
|
|
186
|
+
for (const [rawName, slot] of Object.entries(rawSlots)) {
|
|
187
|
+
const name = normalizeSlotName(rawName, c.name);
|
|
188
|
+
slotProps[name] = {
|
|
189
|
+
type: 'array',
|
|
190
|
+
description: (slot.description || '').trim(),
|
|
191
|
+
items: { $ref: '#/$defs/Component' },
|
|
192
|
+
};
|
|
193
|
+
slotDescriptions[name] = (slot.description || '').trim();
|
|
194
|
+
}
|
|
195
|
+
def.properties.slots = {
|
|
196
|
+
type: 'object',
|
|
197
|
+
description: 'Named slot content. Each key is a slot name; value is an array of component instances rendered into that slot.',
|
|
198
|
+
additionalProperties: false,
|
|
199
|
+
properties: slotProps,
|
|
200
|
+
};
|
|
201
|
+
def['x-slot-descriptions'] = slotDescriptions;
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
if (Object.keys(events).length) def['x-events'] = events;
|
|
205
|
+
|
|
206
|
+
return def;
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
const components = {};
|
|
210
|
+
const componentRefs = [];
|
|
211
|
+
|
|
212
|
+
for (const c of manifest.components) {
|
|
213
|
+
components[c.name] = buildComponent(c);
|
|
214
|
+
componentRefs.push({ $ref: `#/$defs/components/${c.name}` });
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
const catalog = {
|
|
218
|
+
$schema: 'https://json-schema.org/draft/2020-12/schema',
|
|
219
|
+
$id: `https://cre8.dev/a2ui/catalogs/cre8-wc/${manifest.version}`,
|
|
220
|
+
title: 'cre8-wc A2UI Catalog',
|
|
221
|
+
description: manifest.description,
|
|
222
|
+
'x-a2ui': {
|
|
223
|
+
catalogId: 'cre8-wc',
|
|
224
|
+
library: manifest.library,
|
|
225
|
+
libraryVersion: manifest.version,
|
|
226
|
+
tagPrefix: manifest.tagPrefix,
|
|
227
|
+
framework: manifest.framework,
|
|
228
|
+
},
|
|
229
|
+
type: 'object',
|
|
230
|
+
required: ['root'],
|
|
231
|
+
properties: {
|
|
232
|
+
root: { $ref: '#/$defs/Component' },
|
|
233
|
+
},
|
|
234
|
+
$defs: {
|
|
235
|
+
Component: {
|
|
236
|
+
description: 'A component instance in the cre8-wc catalog.',
|
|
237
|
+
oneOf: componentRefs,
|
|
238
|
+
},
|
|
239
|
+
components,
|
|
240
|
+
},
|
|
241
|
+
};
|
|
242
|
+
|
|
243
|
+
writeFileSync(outPath, JSON.stringify(catalog, null, 2) + '\n');
|
|
244
|
+
console.log(
|
|
245
|
+
`Wrote ${outPath} (${manifest.components.length} components, ${(JSON.stringify(catalog).length / 1024).toFixed(1)} KB)`
|
|
246
|
+
);
|
package/a2ui/index.d.ts
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export type { CatalogComponentDef, CatalogSchema, ComponentSpec, EmittedEvent, EventBinding, PropSchema, RegisteredCatalog, } from './types.js';
|
|
2
|
+
export { registerCatalog, validateSpec } from './registry.js';
|
|
3
|
+
export { render } from './renderer.js';
|
|
4
|
+
export type { RenderOptions } from './renderer.js';
|
package/a2ui/index.js
ADDED
package/a2ui/index.ts
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export type {
|
|
2
|
+
CatalogComponentDef,
|
|
3
|
+
CatalogSchema,
|
|
4
|
+
ComponentSpec,
|
|
5
|
+
EmittedEvent,
|
|
6
|
+
EventBinding,
|
|
7
|
+
PropSchema,
|
|
8
|
+
RegisteredCatalog,
|
|
9
|
+
} from './types.js';
|
|
10
|
+
export { registerCatalog, validateSpec } from './registry.js';
|
|
11
|
+
export { render } from './renderer.js';
|
|
12
|
+
export type { RenderOptions } from './renderer.js';
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { CatalogSchema, ComponentSpec, RegisteredCatalog } from './types.js';
|
|
2
|
+
export declare function registerCatalog(schema: CatalogSchema): RegisteredCatalog;
|
|
3
|
+
export declare function validateSpec(spec: unknown, catalog: RegisteredCatalog, path?: string): asserts spec is ComponentSpec;
|