@lynx-js/genui 0.0.2 → 0.0.4
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 +5 -9
- package/a2ui/AGENTS.md +167 -0
- package/a2ui/README.md +76 -780
- package/a2ui/README_zh.md +103 -0
- package/a2ui/dist/catalog/Button/catalog.json +2 -1
- package/a2ui/dist/catalog/Button/index.d.ts +5 -0
- package/a2ui/dist/catalog/Button/index.jsx +3 -0
- package/a2ui/dist/catalog/Button/index.jsx.map +1 -1
- package/a2ui/dist/catalog/Card/catalog.json +2 -1
- package/a2ui/dist/catalog/Card/index.d.ts +5 -0
- package/a2ui/dist/catalog/Card/index.jsx +3 -0
- package/a2ui/dist/catalog/Card/index.jsx.map +1 -1
- package/a2ui/dist/catalog/CheckBox/catalog.json +2 -1
- package/a2ui/dist/catalog/CheckBox/index.d.ts +5 -0
- package/a2ui/dist/catalog/CheckBox/index.jsx +3 -0
- package/a2ui/dist/catalog/CheckBox/index.jsx.map +1 -1
- package/a2ui/dist/catalog/ChoicePicker/catalog.json +2 -1
- package/a2ui/dist/catalog/ChoicePicker/index.d.ts +5 -0
- package/a2ui/dist/catalog/ChoicePicker/index.jsx +3 -0
- package/a2ui/dist/catalog/ChoicePicker/index.jsx.map +1 -1
- package/a2ui/dist/catalog/Column/catalog.json +2 -1
- package/a2ui/dist/catalog/Column/index.d.ts +5 -0
- package/a2ui/dist/catalog/Column/index.jsx +3 -0
- package/a2ui/dist/catalog/Column/index.jsx.map +1 -1
- package/a2ui/dist/catalog/DateTimeInput/catalog.json +2 -1
- package/a2ui/dist/catalog/DateTimeInput/index.d.ts +5 -0
- package/a2ui/dist/catalog/DateTimeInput/index.jsx +4 -10
- package/a2ui/dist/catalog/DateTimeInput/index.jsx.map +1 -1
- package/a2ui/dist/catalog/DateTimeInput/utils.d.ts +0 -1
- package/a2ui/dist/catalog/DateTimeInput/utils.js +0 -3
- package/a2ui/dist/catalog/DateTimeInput/utils.js.map +1 -1
- package/a2ui/dist/catalog/Divider/catalog.json +2 -1
- package/a2ui/dist/catalog/Divider/index.d.ts +5 -0
- package/a2ui/dist/catalog/Divider/index.jsx +3 -0
- package/a2ui/dist/catalog/Divider/index.jsx.map +1 -1
- package/a2ui/dist/catalog/Icon/catalog.json +2 -1
- package/a2ui/dist/catalog/Icon/index.d.ts +5 -0
- package/a2ui/dist/catalog/Icon/index.jsx +3 -0
- package/a2ui/dist/catalog/Icon/index.jsx.map +1 -1
- package/a2ui/dist/catalog/Image/catalog.json +2 -1
- package/a2ui/dist/catalog/Image/index.d.ts +5 -0
- package/a2ui/dist/catalog/Image/index.jsx +3 -0
- package/a2ui/dist/catalog/Image/index.jsx.map +1 -1
- package/a2ui/dist/catalog/LazyComponent/catalog.json +37 -0
- package/a2ui/dist/catalog/LazyComponent/index.d.ts +27 -0
- package/a2ui/dist/catalog/LazyComponent/index.jsx +39 -0
- package/a2ui/dist/catalog/LazyComponent/index.jsx.map +1 -0
- package/a2ui/dist/catalog/LineChart/catalog.json +2 -1
- package/a2ui/dist/catalog/LineChart/index.d.ts +8 -0
- package/a2ui/dist/catalog/LineChart/index.jsx +3 -0
- package/a2ui/dist/catalog/LineChart/index.jsx.map +1 -1
- package/a2ui/dist/catalog/List/catalog.json +2 -1
- package/a2ui/dist/catalog/List/index.d.ts +5 -0
- package/a2ui/dist/catalog/List/index.jsx +3 -0
- package/a2ui/dist/catalog/List/index.jsx.map +1 -1
- package/a2ui/dist/catalog/Loading/catalog.json +16 -0
- package/a2ui/dist/catalog/Loading/index.d.ts +15 -0
- package/a2ui/dist/catalog/Loading/index.jsx +14 -0
- package/a2ui/dist/catalog/Loading/index.jsx.map +1 -0
- package/a2ui/dist/catalog/Modal/catalog.json +2 -1
- package/a2ui/dist/catalog/Modal/index.d.ts +5 -0
- package/a2ui/dist/catalog/Modal/index.jsx +3 -0
- package/a2ui/dist/catalog/Modal/index.jsx.map +1 -1
- package/a2ui/dist/catalog/PieChart/catalog.json +2 -1
- package/a2ui/dist/catalog/PieChart/index.d.ts +8 -0
- package/a2ui/dist/catalog/PieChart/index.jsx +3 -0
- package/a2ui/dist/catalog/PieChart/index.jsx.map +1 -1
- package/a2ui/dist/catalog/RadioGroup/catalog.json +2 -1
- package/a2ui/dist/catalog/RadioGroup/index.d.ts +5 -0
- package/a2ui/dist/catalog/RadioGroup/index.jsx +3 -0
- package/a2ui/dist/catalog/RadioGroup/index.jsx.map +1 -1
- package/a2ui/dist/catalog/Row/catalog.json +2 -1
- package/a2ui/dist/catalog/Row/index.d.ts +5 -0
- package/a2ui/dist/catalog/Row/index.jsx +3 -0
- package/a2ui/dist/catalog/Row/index.jsx.map +1 -1
- package/a2ui/dist/catalog/Slider/catalog.json +2 -1
- package/a2ui/dist/catalog/Slider/index.d.ts +5 -0
- package/a2ui/dist/catalog/Slider/index.jsx +3 -0
- package/a2ui/dist/catalog/Slider/index.jsx.map +1 -1
- package/a2ui/dist/catalog/Tabs/catalog.json +2 -1
- package/a2ui/dist/catalog/Tabs/index.d.ts +5 -0
- package/a2ui/dist/catalog/Tabs/index.jsx +3 -0
- package/a2ui/dist/catalog/Tabs/index.jsx.map +1 -1
- package/a2ui/dist/catalog/Text/catalog.json +2 -1
- package/a2ui/dist/catalog/Text/index.d.ts +5 -0
- package/a2ui/dist/catalog/Text/index.jsx +3 -0
- package/a2ui/dist/catalog/Text/index.jsx.map +1 -1
- package/a2ui/dist/catalog/TextField/catalog.json +2 -1
- package/a2ui/dist/catalog/TextField/index.d.ts +5 -0
- package/a2ui/dist/catalog/TextField/index.jsx +3 -0
- package/a2ui/dist/catalog/TextField/index.jsx.map +1 -1
- package/a2ui/dist/catalog/defineCatalog.d.ts +4 -4
- package/a2ui/dist/catalog/defineCatalog.js.map +1 -1
- package/a2ui/dist/catalog/index.d.ts +2 -0
- package/a2ui/dist/catalog/index.js +92 -18
- package/a2ui/dist/catalog/index.js.map +1 -1
- package/a2ui/dist/catalog.json +2603 -0
- package/a2ui/dist/index.d.ts +1 -1
- package/a2ui/dist/index.js +2 -2
- package/a2ui/dist/index.js.map +1 -1
- package/a2ui/dist/react/A2UI.d.ts +3 -0
- package/a2ui/dist/react/A2UI.jsx.map +1 -1
- package/a2ui/dist/react/A2UIRenderer.d.ts +5 -18
- package/a2ui/dist/react/A2UIRenderer.jsx +3 -13
- package/a2ui/dist/react/A2UIRenderer.jsx.map +1 -1
- package/a2ui/dist/react/useAction.d.ts +7 -0
- package/a2ui/dist/react/useAction.js +4 -0
- package/a2ui/dist/react/useAction.js.map +1 -1
- package/a2ui/dist/react/useDataBinding.d.ts +7 -5
- package/a2ui/dist/react/useDataBinding.js +18 -0
- package/a2ui/dist/react/useDataBinding.js.map +1 -1
- package/a2ui/dist/store/FunctionRegistry.d.ts +7 -0
- package/a2ui/dist/store/FunctionRegistry.js +4 -0
- package/a2ui/dist/store/FunctionRegistry.js.map +1 -1
- package/a2ui/dist/store/MessageProcessor.d.ts +7 -0
- package/a2ui/dist/store/MessageProcessor.js +4 -0
- package/a2ui/dist/store/MessageProcessor.js.map +1 -1
- package/a2ui/dist/store/MessageStore.d.ts +6 -0
- package/a2ui/dist/store/MessageStore.js +3 -0
- package/a2ui/dist/store/MessageStore.js.map +1 -1
- package/a2ui/dist/store/Resource.d.ts +8 -0
- package/a2ui/dist/store/Resource.js +4 -0
- package/a2ui/dist/store/Resource.js.map +1 -1
- package/a2ui/dist/store/SignalStore.d.ts +3 -2
- package/a2ui/dist/store/SignalStore.js +9 -0
- package/a2ui/dist/store/SignalStore.js.map +1 -1
- package/a2ui/dist/store/resolveDynamic.d.ts +4 -3
- package/a2ui/dist/store/resolveDynamic.js +19 -0
- package/a2ui/dist/store/resolveDynamic.js.map +1 -1
- package/a2ui/dist/store/resolveFunctionCall.d.ts +7 -0
- package/a2ui/dist/store/resolveFunctionCall.js +4 -0
- package/a2ui/dist/store/resolveFunctionCall.js.map +1 -1
- package/a2ui/dist/store/types.d.ts +13 -0
- package/a2ui/dist/store/utils.d.ts +6 -4
- package/a2ui/dist/store/utils.js +26 -0
- package/a2ui/dist/store/utils.js.map +1 -1
- package/a2ui/dist/tsconfig.build.tsbuildinfo +1 -1
- package/a2ui/docs/catalog-guide.md +407 -0
- package/a2ui/docs/catalog-guide_zh.md +379 -0
- package/a2ui/docs/overview.md +312 -0
- package/a2ui/docs/overview_zh.md +289 -0
- package/a2ui/docs/system-prompts.md +187 -0
- package/a2ui/docs/system-prompts_zh.md +187 -0
- package/a2ui/src/catalog/README.md +12 -0
- package/a2ui/src/catalog/index.ts +52 -0
- package/a2ui/src/catalog/readme_zh.md +11 -0
- package/a2ui/src/index.ts +116 -0
- package/a2ui/styles/catalog/Button.css +5 -5
- package/a2ui/styles/catalog/DateTimeInput.css +22 -30
- package/a2ui/styles/catalog/Loading.css +61 -0
- package/a2ui-catalog-extractor/README.md +14 -7
- package/a2ui-catalog-extractor/dist/cli.d.ts +1 -0
- package/a2ui-catalog-extractor/dist/cli.js +15 -6
- package/a2ui-catalog-extractor/dist/cli.js.map +1 -1
- package/a2ui-catalog-extractor/dist/index.d.ts +97 -2
- package/a2ui-catalog-extractor/dist/index.js +91 -6
- package/a2ui-catalog-extractor/dist/index.js.map +1 -1
- package/a2ui-catalog-extractor/dist/tsconfig.build.tsbuildinfo +1 -1
- package/a2ui-catalog-extractor/skills/a2ui-catalog-extractor/SKILL.md +1 -1
- package/a2ui-prompt/README.md +3 -2
- package/a2ui-prompt/dist/index.d.ts +41 -0
- package/a2ui-prompt/dist/index.js +159 -84
- package/cli/README.md +26 -0
- package/cli/bin/cli.js +7 -265
- package/cli/dist/a2ui/create.d.ts +5 -0
- package/cli/dist/a2ui/create.js +178 -0
- package/cli/dist/a2ui/create.js.map +1 -0
- package/cli/dist/a2ui/index.d.ts +5 -0
- package/cli/dist/a2ui/index.js +170 -0
- package/cli/dist/a2ui/index.js.map +1 -0
- package/cli/dist/cli.d.ts +4 -0
- package/cli/dist/cli.js +40 -0
- package/cli/dist/cli.js.map +1 -0
- package/cli/dist/openui.d.ts +1 -0
- package/cli/dist/openui.js +21 -0
- package/cli/dist/openui.js.map +1 -0
- package/cli/dist/tsconfig.build.tsbuildinfo +1 -0
- package/cli/dist/utils.d.ts +2 -0
- package/cli/dist/utils.js +17 -0
- package/cli/dist/utils.js.map +1 -0
- package/cli/templates/default/lynx.config.ts +13 -0
- package/cli/templates/default/package.json +27 -0
- package/cli/templates/default/src/App.css +88 -0
- package/cli/templates/default/src/App.tsx +100 -0
- package/cli/templates/default/src/index.tsx +10 -0
- package/cli/templates/default/src/messages.ts +158 -0
- package/cli/templates/default/src/rspeedy-env.d.ts +14 -0
- package/cli/templates/default/src/tsconfig.json +17 -0
- package/cli/templates/default/tsconfig.json +15 -0
- package/cli/templates/default/tsconfig.node.json +16 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/index.ts +12 -0
- package/openui/README.md +50 -46
- package/openui/dist/catalog/Action/{index.js → index.jsx} +1 -1
- package/openui/dist/catalog/Action/index.jsx.map +1 -0
- package/openui/dist/catalog/Button/index.d.ts +8 -8
- package/openui/dist/catalog/Button/{index.js → index.jsx} +28 -14
- package/openui/dist/catalog/Button/index.jsx.map +1 -0
- package/openui/dist/catalog/Card/index.d.ts +1 -1
- package/openui/dist/catalog/Card/{index.js → index.jsx} +5 -4
- package/openui/dist/catalog/Card/{index.js.map → index.jsx.map} +1 -1
- package/openui/dist/catalog/CardHeader/index.d.ts +1 -1
- package/openui/dist/catalog/CardHeader/index.jsx +20 -0
- package/openui/dist/catalog/CardHeader/index.jsx.map +1 -0
- package/openui/dist/catalog/CheckBox/index.d.ts +16 -0
- package/openui/dist/catalog/CheckBox/index.jsx +82 -0
- package/openui/dist/catalog/CheckBox/index.jsx.map +1 -0
- package/openui/dist/catalog/Icon/index.d.ts +44 -0
- package/openui/dist/catalog/Icon/index.jsx +66 -0
- package/openui/dist/catalog/Icon/index.jsx.map +1 -0
- package/openui/dist/catalog/Image/index.d.ts +19 -0
- package/openui/dist/catalog/Image/index.jsx +40 -0
- package/openui/dist/catalog/Image/index.jsx.map +1 -0
- package/openui/dist/catalog/Loading/index.d.ts +7 -0
- package/openui/dist/catalog/Loading/index.jsx +25 -0
- package/openui/dist/catalog/Loading/index.jsx.map +1 -0
- package/openui/dist/catalog/RadioGroup/index.d.ts +21 -0
- package/openui/dist/catalog/RadioGroup/index.jsx +99 -0
- package/openui/dist/catalog/RadioGroup/index.jsx.map +1 -0
- package/openui/dist/catalog/Separator/index.d.ts +1 -1
- package/openui/dist/catalog/Separator/{index.js → index.jsx} +3 -4
- package/openui/dist/catalog/Separator/index.jsx.map +1 -0
- package/openui/dist/catalog/Slider/index.d.ts +19 -0
- package/openui/dist/catalog/Slider/index.jsx +139 -0
- package/openui/dist/catalog/Slider/index.jsx.map +1 -0
- package/openui/dist/catalog/Stack/index.d.ts +1 -1
- package/openui/dist/catalog/Stack/{index.js → index.jsx} +3 -4
- package/openui/dist/catalog/Stack/{index.js.map → index.jsx.map} +1 -1
- package/openui/dist/catalog/Tag/index.d.ts +1 -1
- package/openui/dist/catalog/Tag/{index.js → index.jsx} +5 -4
- package/openui/dist/catalog/Tag/index.jsx.map +1 -0
- package/openui/dist/catalog/TextContent/index.d.ts +1 -1
- package/openui/dist/catalog/TextContent/{index.js → index.jsx} +5 -4
- package/openui/dist/catalog/TextContent/{index.js.map → index.jsx.map} +1 -1
- package/openui/dist/catalog/TextField/index.d.ts +23 -0
- package/openui/dist/catalog/TextField/index.jsx +132 -0
- package/openui/dist/catalog/TextField/index.jsx.map +1 -0
- package/openui/dist/catalog/index.d.ts +14 -7
- package/openui/dist/catalog/index.js +14 -7
- package/openui/dist/catalog/index.js.map +1 -1
- package/openui/dist/core/context.d.ts +22 -8
- package/openui/dist/core/{context.js → context.jsx} +10 -3
- package/openui/dist/core/context.jsx.map +1 -0
- package/openui/dist/core/createLibrary.d.ts +8 -1
- package/openui/dist/core/{createLibrary.js → createLibrary.jsx} +18 -3
- package/openui/dist/core/createLibrary.jsx.map +1 -0
- package/openui/dist/core/hooks/index.d.ts +1 -0
- package/openui/dist/core/hooks/index.js +1 -0
- package/openui/dist/core/hooks/index.js.map +1 -1
- package/openui/dist/core/hooks/useFormValidation.d.ts +9 -0
- package/openui/dist/core/hooks/useFormValidation.js +6 -0
- package/openui/dist/core/hooks/useFormValidation.js.map +1 -1
- package/openui/dist/core/hooks/useOpenUIState.d.ts +8 -2
- package/openui/dist/core/hooks/useOpenUIState.js +3 -1
- package/openui/dist/core/hooks/useOpenUIState.js.map +1 -1
- package/openui/dist/core/hooks/useStateField.d.ts +3 -0
- package/openui/dist/core/hooks/useStateField.js +4 -1
- package/openui/dist/core/hooks/useStateField.js.map +1 -1
- package/openui/dist/core/index.d.ts +13 -7
- package/openui/dist/core/index.js +7 -4
- package/openui/dist/core/index.js.map +1 -1
- package/openui/dist/core/library.d.ts +6 -1
- package/openui/dist/core/{library.js → library.jsx} +9 -1
- package/openui/dist/core/library.jsx.map +1 -0
- package/openui/dist/core/renderer.css +527 -0
- package/openui/dist/core/renderer.d.ts +41 -4
- package/openui/dist/core/renderer.jsx +284 -0
- package/openui/dist/core/renderer.jsx.map +1 -0
- package/openui/dist/core/runtime/index.d.ts +1 -0
- package/openui/dist/core/runtime/index.js +5 -0
- package/openui/dist/core/runtime/index.js.map +1 -0
- package/openui/dist/core/runtime/reactive.d.ts +7 -0
- package/openui/dist/core/runtime/reactive.js +10 -0
- package/openui/dist/core/runtime/reactive.js.map +1 -0
- package/openui/dist/openui-prompt/index.d.ts +47 -0
- package/openui/dist/openui-prompt/index.js +321 -0
- package/openui/dist/openui-prompt/index.js.map +1 -0
- package/package.json +20 -8
- package/openui/dist/catalog/Action/index.js.map +0 -1
- package/openui/dist/catalog/Button/index.js.map +0 -1
- package/openui/dist/catalog/CardHeader/index.js +0 -18
- package/openui/dist/catalog/CardHeader/index.js.map +0 -1
- package/openui/dist/catalog/Separator/index.js.map +0 -1
- package/openui/dist/catalog/Tag/index.js.map +0 -1
- package/openui/dist/core/context.js.map +0 -1
- package/openui/dist/core/createLibrary.js.map +0 -1
- package/openui/dist/core/library.js.map +0 -1
- package/openui/dist/core/renderer.js +0 -139
- package/openui/dist/core/renderer.js.map +0 -1
|
@@ -51,7 +51,6 @@
|
|
|
51
51
|
}
|
|
52
52
|
|
|
53
53
|
.datetime-input-icon,
|
|
54
|
-
.datetime-dialog-close-icon,
|
|
55
54
|
.datetime-calendar-nav-icon,
|
|
56
55
|
.datetime-time-stepper-icon {
|
|
57
56
|
font-family: var(--a2ui-icon-font-family);
|
|
@@ -79,7 +78,11 @@
|
|
|
79
78
|
justify-content: center;
|
|
80
79
|
width: 100%;
|
|
81
80
|
height: 100%;
|
|
82
|
-
padding:
|
|
81
|
+
padding: 24px;
|
|
82
|
+
top: 0;
|
|
83
|
+
right: 0;
|
|
84
|
+
bottom: 0;
|
|
85
|
+
left: 0;
|
|
83
86
|
box-sizing: border-box;
|
|
84
87
|
}
|
|
85
88
|
|
|
@@ -101,10 +104,11 @@
|
|
|
101
104
|
.datetime-dialog-content {
|
|
102
105
|
display: flex;
|
|
103
106
|
flex-direction: column;
|
|
104
|
-
gap:
|
|
107
|
+
gap: 12px;
|
|
105
108
|
width: 100%;
|
|
106
109
|
max-width: 380px;
|
|
107
|
-
|
|
110
|
+
max-height: 82%;
|
|
111
|
+
padding: 16px;
|
|
108
112
|
border-width: 1px;
|
|
109
113
|
border-style: solid;
|
|
110
114
|
border-color: var(--a2ui-color-border-strong);
|
|
@@ -112,6 +116,7 @@
|
|
|
112
116
|
background-color: var(--a2ui-color-surface-strong);
|
|
113
117
|
box-shadow: 0 16px 40px var(--a2ui-color-overlay);
|
|
114
118
|
box-sizing: border-box;
|
|
119
|
+
overflow-y: auto;
|
|
115
120
|
transition: opacity 0.18s ease, transform 0.18s ease;
|
|
116
121
|
}
|
|
117
122
|
|
|
@@ -127,7 +132,6 @@
|
|
|
127
132
|
transform: translateY(8px);
|
|
128
133
|
}
|
|
129
134
|
|
|
130
|
-
.datetime-dialog-header,
|
|
131
135
|
.datetime-calendar-header,
|
|
132
136
|
.datetime-dialog-actions {
|
|
133
137
|
display: flex;
|
|
@@ -135,21 +139,11 @@
|
|
|
135
139
|
align-items: center;
|
|
136
140
|
}
|
|
137
141
|
|
|
138
|
-
.datetime-dialog-header,
|
|
139
142
|
.datetime-calendar-header {
|
|
140
143
|
justify-content: space-between;
|
|
141
144
|
gap: 12px;
|
|
142
145
|
}
|
|
143
146
|
|
|
144
|
-
.datetime-dialog-title {
|
|
145
|
-
min-width: 0;
|
|
146
|
-
color: var(--a2ui-color-on-surface);
|
|
147
|
-
font-size: 17px;
|
|
148
|
-
font-weight: 700;
|
|
149
|
-
line-height: 1.4;
|
|
150
|
-
}
|
|
151
|
-
|
|
152
|
-
.datetime-dialog-close,
|
|
153
147
|
.datetime-calendar-nav {
|
|
154
148
|
display: flex;
|
|
155
149
|
align-items: center;
|
|
@@ -162,12 +156,10 @@
|
|
|
162
156
|
color: var(--a2ui-color-text-muted);
|
|
163
157
|
}
|
|
164
158
|
|
|
165
|
-
.datetime-dialog-close.ui-active,
|
|
166
159
|
.datetime-calendar-nav.ui-active {
|
|
167
160
|
background-color: var(--a2ui-color-secondary);
|
|
168
161
|
}
|
|
169
162
|
|
|
170
|
-
.datetime-dialog-close-icon,
|
|
171
163
|
.datetime-calendar-nav-icon {
|
|
172
164
|
color: inherit;
|
|
173
165
|
font-size: 20px;
|
|
@@ -176,7 +168,7 @@
|
|
|
176
168
|
.datetime-calendar {
|
|
177
169
|
display: flex;
|
|
178
170
|
flex-direction: column;
|
|
179
|
-
gap:
|
|
171
|
+
gap: 8px;
|
|
180
172
|
width: 100%;
|
|
181
173
|
min-width: 0;
|
|
182
174
|
}
|
|
@@ -201,7 +193,7 @@
|
|
|
201
193
|
display: flex;
|
|
202
194
|
align-items: center;
|
|
203
195
|
justify-content: center;
|
|
204
|
-
height:
|
|
196
|
+
height: 20px;
|
|
205
197
|
}
|
|
206
198
|
|
|
207
199
|
.datetime-weekday-text {
|
|
@@ -212,14 +204,14 @@
|
|
|
212
204
|
}
|
|
213
205
|
|
|
214
206
|
.datetime-month {
|
|
215
|
-
grid-template-rows:
|
|
207
|
+
grid-template-rows: 34px 34px 34px 34px 34px 34px;
|
|
216
208
|
}
|
|
217
209
|
|
|
218
210
|
.datetime-day {
|
|
219
211
|
display: flex;
|
|
220
212
|
align-items: center;
|
|
221
213
|
justify-content: center;
|
|
222
|
-
margin:
|
|
214
|
+
margin: 1px;
|
|
223
215
|
border-width: 1px;
|
|
224
216
|
border-style: solid;
|
|
225
217
|
border-color: transparent;
|
|
@@ -262,7 +254,7 @@
|
|
|
262
254
|
.datetime-time {
|
|
263
255
|
display: flex;
|
|
264
256
|
flex-direction: column;
|
|
265
|
-
gap:
|
|
257
|
+
gap: 8px;
|
|
266
258
|
width: 100%;
|
|
267
259
|
min-width: 0;
|
|
268
260
|
}
|
|
@@ -279,7 +271,7 @@
|
|
|
279
271
|
flex-direction: row;
|
|
280
272
|
align-items: center;
|
|
281
273
|
justify-content: center;
|
|
282
|
-
gap:
|
|
274
|
+
gap: 10px;
|
|
283
275
|
}
|
|
284
276
|
|
|
285
277
|
.datetime-time-field {
|
|
@@ -287,7 +279,7 @@
|
|
|
287
279
|
flex-direction: column;
|
|
288
280
|
align-items: center;
|
|
289
281
|
justify-content: center;
|
|
290
|
-
width:
|
|
282
|
+
width: 66px;
|
|
291
283
|
min-width: 0;
|
|
292
284
|
overflow: hidden;
|
|
293
285
|
border-width: 1px;
|
|
@@ -299,16 +291,16 @@
|
|
|
299
291
|
|
|
300
292
|
.datetime-time-value {
|
|
301
293
|
color: var(--a2ui-color-on-surface);
|
|
302
|
-
font-size:
|
|
294
|
+
font-size: 22px;
|
|
303
295
|
font-weight: 700;
|
|
304
|
-
line-height: 1.
|
|
296
|
+
line-height: 1.3;
|
|
305
297
|
}
|
|
306
298
|
|
|
307
299
|
.datetime-time-separator {
|
|
308
300
|
color: var(--a2ui-color-text-muted);
|
|
309
|
-
font-size:
|
|
301
|
+
font-size: 22px;
|
|
310
302
|
font-weight: 700;
|
|
311
|
-
line-height: 1.
|
|
303
|
+
line-height: 1.3;
|
|
312
304
|
}
|
|
313
305
|
|
|
314
306
|
.datetime-time-stepper {
|
|
@@ -316,7 +308,7 @@
|
|
|
316
308
|
align-items: center;
|
|
317
309
|
justify-content: center;
|
|
318
310
|
width: 100%;
|
|
319
|
-
height:
|
|
311
|
+
height: 24px;
|
|
320
312
|
color: var(--a2ui-color-text-muted);
|
|
321
313
|
}
|
|
322
314
|
|
|
@@ -326,7 +318,7 @@
|
|
|
326
318
|
|
|
327
319
|
.datetime-time-stepper-icon {
|
|
328
320
|
color: inherit;
|
|
329
|
-
font-size:
|
|
321
|
+
font-size: 20px;
|
|
330
322
|
}
|
|
331
323
|
|
|
332
324
|
.datetime-dialog-actions {
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
@import "../theme.css";
|
|
2
|
+
|
|
3
|
+
.loading {
|
|
4
|
+
--a2ui-loading-base: var(--a2ui-color-surface-muted);
|
|
5
|
+
--a2ui-loading-glow: rgba(255, 255, 255, 0.34);
|
|
6
|
+
--a2ui-loading-highlight: var(--a2ui-color-border-strong);
|
|
7
|
+
|
|
8
|
+
display: flex;
|
|
9
|
+
flex-direction: column;
|
|
10
|
+
align-items: stretch;
|
|
11
|
+
justify-content: center;
|
|
12
|
+
flex-shrink: 0;
|
|
13
|
+
gap: 10px;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.loading-inline {
|
|
17
|
+
width: 100%;
|
|
18
|
+
min-height: 14px;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.loading-block {
|
|
22
|
+
width: 100%;
|
|
23
|
+
min-height: 48px;
|
|
24
|
+
padding: 6px 0;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.loading-skeleton {
|
|
28
|
+
height: 14px;
|
|
29
|
+
border-radius: 999px;
|
|
30
|
+
background: linear-gradient(
|
|
31
|
+
90deg,
|
|
32
|
+
var(--a2ui-loading-base) 0%,
|
|
33
|
+
var(--a2ui-loading-glow) 30%,
|
|
34
|
+
var(--a2ui-loading-highlight) 50%,
|
|
35
|
+
var(--a2ui-loading-glow) 70%,
|
|
36
|
+
var(--a2ui-loading-base) 100%
|
|
37
|
+
);
|
|
38
|
+
background-size: 220% 100%;
|
|
39
|
+
animation-name: a2ui-loading-shimmer;
|
|
40
|
+
animation-duration: 1200ms;
|
|
41
|
+
animation-timing-function: ease-in-out;
|
|
42
|
+
animation-iteration-count: infinite;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.loading-skeleton-primary {
|
|
46
|
+
width: 96%;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.loading-skeleton-secondary {
|
|
50
|
+
width: 68%;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
@keyframes a2ui-loading-shimmer {
|
|
54
|
+
0% {
|
|
55
|
+
background-position: 120% 0;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
100% {
|
|
59
|
+
background-position: -120% 0;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
@@ -69,7 +69,7 @@ Then add a script to your package:
|
|
|
69
69
|
```json
|
|
70
70
|
{
|
|
71
71
|
"scripts": {
|
|
72
|
-
"build:catalog": "genui a2ui generate catalog --catalog-dir src/catalog --out-dir dist
|
|
72
|
+
"build:catalog": "genui a2ui generate catalog --catalog-dir src/catalog --out-dir dist"
|
|
73
73
|
}
|
|
74
74
|
}
|
|
75
75
|
```
|
|
@@ -132,13 +132,15 @@ extractor that this interface should become a catalog component named
|
|
|
132
132
|
Run:
|
|
133
133
|
|
|
134
134
|
```bash
|
|
135
|
-
genui a2ui generate catalog --catalog-dir src/catalog --out-dir dist
|
|
135
|
+
genui a2ui generate catalog --catalog-dir src/catalog --out-dir dist
|
|
136
136
|
```
|
|
137
137
|
|
|
138
138
|
The extractor scans the catalog directory, finds interfaces marked with
|
|
139
139
|
`@a2uiCatalog`, and writes one file per component:
|
|
140
140
|
|
|
141
141
|
```text
|
|
142
|
+
dist/
|
|
143
|
+
catalog.json
|
|
142
144
|
dist/catalog/
|
|
143
145
|
QuickStartCard/
|
|
144
146
|
catalog.json
|
|
@@ -405,13 +407,18 @@ genui a2ui generate catalog [options]
|
|
|
405
407
|
| `--catalog-dir <dir>` | Directory to scan for source files. Repeatable. | `src/catalog` |
|
|
406
408
|
| `--source <path>` | Source file or directory to scan. Repeatable. | None |
|
|
407
409
|
| `--typedoc-json <file>` | Read an existing TypeDoc JSON project instead of running TypeDoc conversion. | None |
|
|
408
|
-
| `--out-dir <dir>` |
|
|
410
|
+
| `--out-dir <dir>` | Root directory where catalog artifacts are written. | `dist` |
|
|
411
|
+
| `--catalog-id <id>` | Catalog ID written to the full catalog file. | `catalog.json` |
|
|
409
412
|
| `--version`, `-v` | Print the package version. | None |
|
|
410
413
|
| `--help`, `-h` | Print usage. | None |
|
|
411
414
|
|
|
412
415
|
`--source` and `--catalog-dir` can be used together. The extractor merges
|
|
413
416
|
all inputs, removes duplicates, sorts them, and then runs TypeDoc.
|
|
414
417
|
|
|
418
|
+
The extractor writes both per-component files such as
|
|
419
|
+
`dist/catalog/QuickStartCard/catalog.json` and a full catalog file at
|
|
420
|
+
`dist/catalog.json`.
|
|
421
|
+
|
|
415
422
|
The scanner accepts `.ts`, `.tsx`, `.js`, `.jsx`, `.mts`, and `.cts`
|
|
416
423
|
files. It ignores `.d.ts`, `node_modules`, `dist`, and `.turbo`.
|
|
417
424
|
|
|
@@ -437,7 +444,7 @@ const components = await extractCatalogComponents({
|
|
|
437
444
|
|
|
438
445
|
await writeComponentCatalogs({
|
|
439
446
|
sourceFiles: ['src/catalog/QuickStartCard.tsx'],
|
|
440
|
-
outDir: 'dist
|
|
447
|
+
outDir: 'dist',
|
|
441
448
|
});
|
|
442
449
|
```
|
|
443
450
|
|
|
@@ -448,7 +455,7 @@ directory:
|
|
|
448
455
|
await writeComponentCatalogs({
|
|
449
456
|
cwd: process.cwd(),
|
|
450
457
|
sourceFiles: ['src/catalog/QuickStartCard.tsx'],
|
|
451
|
-
outDir: 'dist
|
|
458
|
+
outDir: 'dist',
|
|
452
459
|
});
|
|
453
460
|
```
|
|
454
461
|
|
|
@@ -480,14 +487,14 @@ const projectJson = JSON.parse(
|
|
|
480
487
|
const components = extractCatalogComponentsFromTypeDocJson(projectJson);
|
|
481
488
|
|
|
482
489
|
writeCatalogComponents(components, {
|
|
483
|
-
outDir: 'dist
|
|
490
|
+
outDir: 'dist',
|
|
484
491
|
});
|
|
485
492
|
```
|
|
486
493
|
|
|
487
494
|
The equivalent CLI command is:
|
|
488
495
|
|
|
489
496
|
```bash
|
|
490
|
-
genui a2ui generate catalog --typedoc-json typedoc.json --out-dir dist
|
|
497
|
+
genui a2ui generate catalog --typedoc-json typedoc.json --out-dir dist
|
|
491
498
|
```
|
|
492
499
|
|
|
493
500
|
### Create a full A2UI catalog object
|
|
@@ -6,7 +6,7 @@ import * as fs from 'node:fs';
|
|
|
6
6
|
import { createRequire } from 'node:module';
|
|
7
7
|
import * as path from 'node:path';
|
|
8
8
|
import { pathToFileURL } from 'node:url';
|
|
9
|
-
import { extractCatalogComponentsFromTypeDocJson, extractCatalogFunctionsFromTypeDocJson, findCatalogSourceFiles, writeCatalogArtifacts, writeCatalogComponents,
|
|
9
|
+
import { createA2UICatalog, extractCatalogComponentsFromTypeDocJson, extractCatalogFunctionsFromTypeDocJson, findCatalogSourceFiles, writeA2UICatalog, writeCatalogArtifacts, writeCatalogComponents, } from './index.js';
|
|
10
10
|
const usage = `Usage: a2ui-catalog-extractor [options]
|
|
11
11
|
|
|
12
12
|
Options:
|
|
@@ -15,19 +15,20 @@ Options:
|
|
|
15
15
|
--typedoc-json <file>
|
|
16
16
|
Read an existing TypeDoc JSON project instead of
|
|
17
17
|
running TypeDoc conversion.
|
|
18
|
-
--out-dir <dir> Output directory for
|
|
18
|
+
--out-dir <dir> Output root directory for catalog artifacts.
|
|
19
|
+
--catalog-id <id> Catalog ID written to the full catalog.json file.
|
|
19
20
|
--version Print the package version.
|
|
20
21
|
--help Print this help message.
|
|
21
22
|
|
|
22
23
|
Defaults:
|
|
23
24
|
--catalog-dir src/catalog
|
|
24
|
-
--out-dir dist
|
|
25
|
+
--out-dir dist
|
|
25
26
|
`;
|
|
26
27
|
export function parseCliArgs(args) {
|
|
27
28
|
const options = {
|
|
28
29
|
catalogDirs: [],
|
|
29
30
|
help: false,
|
|
30
|
-
outDir: 'dist
|
|
31
|
+
outDir: 'dist',
|
|
31
32
|
sourceInputs: [],
|
|
32
33
|
version: false,
|
|
33
34
|
};
|
|
@@ -48,6 +49,9 @@ export function parseCliArgs(args) {
|
|
|
48
49
|
case '--out-dir':
|
|
49
50
|
options.outDir = readValue(args, ++index, arg);
|
|
50
51
|
break;
|
|
52
|
+
case '--catalog-id':
|
|
53
|
+
options.catalogId = readValue(args, ++index, arg);
|
|
54
|
+
break;
|
|
51
55
|
case '--help':
|
|
52
56
|
case '-h':
|
|
53
57
|
options.help = true;
|
|
@@ -87,7 +91,11 @@ export async function runCli(args, cwd = process.cwd()) {
|
|
|
87
91
|
cwd,
|
|
88
92
|
outDir: options.outDir,
|
|
89
93
|
});
|
|
90
|
-
|
|
94
|
+
writeA2UICatalog(createA2UICatalog({
|
|
95
|
+
catalogId: options.catalogId ?? 'catalog.json',
|
|
96
|
+
components,
|
|
97
|
+
functions,
|
|
98
|
+
}), {
|
|
91
99
|
cwd,
|
|
92
100
|
outDir: options.outDir,
|
|
93
101
|
});
|
|
@@ -111,6 +119,7 @@ export async function runCli(args, cwd = process.cwd()) {
|
|
|
111
119
|
cwd,
|
|
112
120
|
outDir: options.outDir,
|
|
113
121
|
sourceFiles: uniqueSourceFiles,
|
|
122
|
+
...(options.catalogId ? { catalogId: options.catalogId } : {}),
|
|
114
123
|
});
|
|
115
124
|
printGeneratedComponents(components);
|
|
116
125
|
printGeneratedFunctions(functions);
|
|
@@ -137,7 +146,7 @@ function printGeneratedComponents(components) {
|
|
|
137
146
|
function printGeneratedFunctions(functions) {
|
|
138
147
|
if (functions.length === 0)
|
|
139
148
|
return;
|
|
140
|
-
console.info(`Generated ${functions.length} A2UI function
|
|
149
|
+
console.info(`Generated ${functions.length} A2UI function definitions.`);
|
|
141
150
|
for (const fn of functions) {
|
|
142
151
|
console.info(`Generated function definition for ${fn.name}`);
|
|
143
152
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli.js","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";AACA,wDAAwD;AACxD,yEAAyE;AACzE,0DAA0D;AAC1D,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AAC9B,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAClC,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAEzC,OAAO,EACL,uCAAuC,EACvC,sCAAsC,EACtC,sBAAsB,EACtB,qBAAqB,EACrB,sBAAsB,
|
|
1
|
+
{"version":3,"file":"cli.js","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";AACA,wDAAwD;AACxD,yEAAyE;AACzE,0DAA0D;AAC1D,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AAC9B,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAClC,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAEzC,OAAO,EACL,iBAAiB,EACjB,uCAAuC,EACvC,sCAAsC,EACtC,sBAAsB,EACtB,gBAAgB,EAChB,qBAAqB,EACrB,sBAAsB,GACvB,MAAM,YAAY,CAAC;AAapB,MAAM,KAAK,GAAG;;;;;;;;;;;;;;;;CAgBb,CAAC;AAEF,MAAM,UAAU,YAAY,CAAC,IAAc;IACzC,MAAM,OAAO,GAAe;QAC1B,WAAW,EAAE,EAAE;Q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SAAS,aAAa;IACpB,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC;QAAE,OAAO,KAAK,CAAC;IACnC,MAAM,QAAQ,GAAG,aAAa,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;IACrD,IAAI,MAAM,CAAC,IAAI,CAAC,GAAG,KAAK,QAAQ;QAAE,OAAO,IAAI,CAAC;IAC9C,0EAA0E;IAC1E,2EAA2E;IAC3E,OAAO,+CAA+C,CAAC,IAAI,CACzD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAChB,CAAC;AACJ,CAAC;AAED,IAAI,CAAC;IACH,IAAI,aAAa,EAAE,EAAE,CAAC;QACpB,OAAO,CAAC,QAAQ,GAAG,MAAM,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;IACzD,CAAC;AACH,CAAC;AAAC,OAAO,KAAK,EAAE,CAAC;IACf,OAAO,CAAC,KAAK,CAAC,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC;IACtE,OAAO,CAAC,QAAQ,GAAG,CAAC,CAAC;AACvB,CAAC"}
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
import type { ProjectReflection } from 'typedoc';
|
|
2
|
+
/**
|
|
3
|
+
* JSON Schema subset emitted for A2UI component props and function arguments.
|
|
4
|
+
*/
|
|
2
5
|
export interface JsonSchema {
|
|
3
6
|
$ref?: string;
|
|
4
7
|
additionalProperties?: boolean | JsonSchema;
|
|
8
|
+
const?: unknown;
|
|
5
9
|
default?: unknown;
|
|
6
10
|
deprecated?: boolean;
|
|
7
11
|
description?: string;
|
|
@@ -11,30 +15,51 @@ export interface JsonSchema {
|
|
|
11
15
|
properties?: Record<string, JsonSchema>;
|
|
12
16
|
required?: string[];
|
|
13
17
|
type?: string;
|
|
18
|
+
unevaluatedProperties?: boolean | JsonSchema;
|
|
14
19
|
}
|
|
20
|
+
/**
|
|
21
|
+
* Component schema discovered from an interface annotated with `@a2uiCatalog`.
|
|
22
|
+
*/
|
|
15
23
|
export interface CatalogComponent {
|
|
16
24
|
filePath: string;
|
|
17
25
|
interfaceName: string;
|
|
18
26
|
name: string;
|
|
19
27
|
schema: JsonSchema;
|
|
20
28
|
}
|
|
29
|
+
/**
|
|
30
|
+
* Source and compiler inputs used when extracting catalog metadata.
|
|
31
|
+
*/
|
|
21
32
|
export interface ExtractCatalogOptions {
|
|
22
33
|
cwd?: string;
|
|
23
34
|
sourceFiles: string[];
|
|
24
35
|
tsconfig?: string;
|
|
25
36
|
}
|
|
37
|
+
/**
|
|
38
|
+
* Options used when extracting catalog metadata from an existing TypeDoc
|
|
39
|
+
* project reflection.
|
|
40
|
+
*/
|
|
26
41
|
export interface ExtractCatalogFromTypeDocOptions {
|
|
27
42
|
cwd?: string;
|
|
28
43
|
}
|
|
44
|
+
/**
|
|
45
|
+
* Options for writing extracted catalog artifacts to disk.
|
|
46
|
+
*/
|
|
29
47
|
export interface WriteComponentCatalogOptions extends ExtractCatalogOptions {
|
|
48
|
+
catalogId?: string;
|
|
30
49
|
outDir: string;
|
|
31
50
|
}
|
|
51
|
+
/**
|
|
52
|
+
* Full catalog manifest consumed by A2UI agents and renderers.
|
|
53
|
+
*/
|
|
32
54
|
export interface A2UICatalog {
|
|
33
55
|
catalogId: string;
|
|
34
56
|
components?: Record<string, JsonSchema>;
|
|
35
|
-
functions?:
|
|
57
|
+
functions?: Record<string, JsonSchema>;
|
|
36
58
|
theme?: Record<string, JsonSchema>;
|
|
37
59
|
}
|
|
60
|
+
/**
|
|
61
|
+
* Serializable definition for a client-side function exposed to an agent.
|
|
62
|
+
*/
|
|
38
63
|
export interface FunctionDefinition {
|
|
39
64
|
description?: string;
|
|
40
65
|
name: string;
|
|
@@ -45,9 +70,15 @@ export interface FunctionDefinition {
|
|
|
45
70
|
export interface CatalogFunction extends FunctionDefinition {
|
|
46
71
|
filePath: string;
|
|
47
72
|
}
|
|
73
|
+
/**
|
|
74
|
+
* Minimal TypeDoc project shape accepted by the extractor.
|
|
75
|
+
*/
|
|
48
76
|
export interface TypeDocProject {
|
|
49
77
|
children?: TypeDocReflection[];
|
|
50
78
|
}
|
|
79
|
+
/**
|
|
80
|
+
* Minimal TypeDoc reflection shape used while walking declarations.
|
|
81
|
+
*/
|
|
51
82
|
export interface TypeDocReflection {
|
|
52
83
|
children?: TypeDocReflection[];
|
|
53
84
|
comment?: TypeDocComment;
|
|
@@ -63,6 +94,9 @@ export interface TypeDocReflection {
|
|
|
63
94
|
sources?: TypeDocSource[];
|
|
64
95
|
type?: TypeDocType;
|
|
65
96
|
}
|
|
97
|
+
/**
|
|
98
|
+
* Minimal TypeDoc function or method signature shape used by the extractor.
|
|
99
|
+
*/
|
|
66
100
|
export interface TypeDocSignature {
|
|
67
101
|
comment?: TypeDocComment;
|
|
68
102
|
kind?: number;
|
|
@@ -71,21 +105,33 @@ export interface TypeDocSignature {
|
|
|
71
105
|
parameters?: TypeDocReflection[];
|
|
72
106
|
type?: TypeDocType;
|
|
73
107
|
}
|
|
108
|
+
/**
|
|
109
|
+
* Source location metadata supplied by TypeDoc.
|
|
110
|
+
*/
|
|
74
111
|
export interface TypeDocSource {
|
|
75
112
|
character?: number;
|
|
76
113
|
fileName?: string;
|
|
77
114
|
fullFileName?: string;
|
|
78
115
|
line?: number;
|
|
79
116
|
}
|
|
117
|
+
/**
|
|
118
|
+
* TypeDoc comment shape used to read summary text and custom tags.
|
|
119
|
+
*/
|
|
80
120
|
export interface TypeDocComment {
|
|
81
121
|
blockTags?: TypeDocCommentTag[];
|
|
82
122
|
modifierTags?: Iterable<string> | Record<string, boolean>;
|
|
83
123
|
summary?: TypeDocCommentDisplayPart[];
|
|
84
124
|
}
|
|
125
|
+
/**
|
|
126
|
+
* Custom or standard block tag parsed from a TypeDoc comment.
|
|
127
|
+
*/
|
|
85
128
|
export interface TypeDocCommentTag {
|
|
86
129
|
content?: TypeDocCommentDisplayPart[];
|
|
87
130
|
tag: string;
|
|
88
131
|
}
|
|
132
|
+
/**
|
|
133
|
+
* Text, code, or link fragment inside a TypeDoc comment.
|
|
134
|
+
*/
|
|
89
135
|
export interface TypeDocCommentDisplayPart {
|
|
90
136
|
code?: string;
|
|
91
137
|
content?: TypeDocCommentDisplayPart[];
|
|
@@ -94,6 +140,9 @@ export interface TypeDocCommentDisplayPart {
|
|
|
94
140
|
target?: unknown;
|
|
95
141
|
text?: string;
|
|
96
142
|
}
|
|
143
|
+
/**
|
|
144
|
+
* Minimal TypeDoc type node shape used for schema conversion.
|
|
145
|
+
*/
|
|
97
146
|
export interface TypeDocType {
|
|
98
147
|
declaration?: TypeDocReflection;
|
|
99
148
|
elementType?: TypeDocType;
|
|
@@ -105,36 +154,82 @@ export interface TypeDocType {
|
|
|
105
154
|
types?: TypeDocType[];
|
|
106
155
|
value?: bigint | boolean | number | string | null;
|
|
107
156
|
}
|
|
157
|
+
/**
|
|
158
|
+
* Find supported source files under a file or directory path.
|
|
159
|
+
*/
|
|
108
160
|
export declare function findCatalogSourceFiles(inputPath: string): string[];
|
|
161
|
+
/**
|
|
162
|
+
* Run TypeDoc over source files and extract A2UI component schemas.
|
|
163
|
+
*/
|
|
109
164
|
export declare function extractCatalogComponents(options: ExtractCatalogOptions): Promise<CatalogComponent[]>;
|
|
165
|
+
/**
|
|
166
|
+
* Extract A2UI component schemas from an already converted TypeDoc project.
|
|
167
|
+
*/
|
|
110
168
|
export declare function extractCatalogComponentsFromTypeDocProject(project: ProjectReflection | TypeDocProject, options?: ExtractCatalogFromTypeDocOptions): CatalogComponent[];
|
|
169
|
+
/**
|
|
170
|
+
* Extract A2UI component schemas from a serialized TypeDoc JSON project.
|
|
171
|
+
*/
|
|
111
172
|
export declare function extractCatalogComponentsFromTypeDocJson(project: TypeDocProject, options?: ExtractCatalogFromTypeDocOptions): CatalogComponent[];
|
|
173
|
+
/**
|
|
174
|
+
* Run TypeDoc over source files and extract A2UI function definitions.
|
|
175
|
+
*/
|
|
112
176
|
export declare function extractCatalogFunctions(options: ExtractCatalogOptions): Promise<CatalogFunction[]>;
|
|
177
|
+
/**
|
|
178
|
+
* Extract A2UI function definitions from an already converted TypeDoc project.
|
|
179
|
+
*/
|
|
113
180
|
export declare function extractCatalogFunctionsFromTypeDocProject(project: ProjectReflection | TypeDocProject, options?: ExtractCatalogFromTypeDocOptions): CatalogFunction[];
|
|
181
|
+
/**
|
|
182
|
+
* Extract A2UI function definitions from a serialized TypeDoc JSON project.
|
|
183
|
+
*/
|
|
114
184
|
export declare function extractCatalogFunctionsFromTypeDocJson(project: TypeDocProject, options?: ExtractCatalogFromTypeDocOptions): CatalogFunction[];
|
|
185
|
+
/**
|
|
186
|
+
* Extract component schemas and write one `catalog.json` per component.
|
|
187
|
+
*/
|
|
115
188
|
export declare function writeComponentCatalogs(options: WriteComponentCatalogOptions): Promise<CatalogComponent[]>;
|
|
189
|
+
/**
|
|
190
|
+
* Write component schema artifacts that were already extracted.
|
|
191
|
+
*/
|
|
116
192
|
export declare function writeCatalogComponents(components: CatalogComponent[], options: {
|
|
117
193
|
cwd?: string;
|
|
118
194
|
outDir: string;
|
|
119
195
|
}): void;
|
|
196
|
+
/**
|
|
197
|
+
* Extract A2UI function definitions and write one JSON artifact per function.
|
|
198
|
+
*/
|
|
120
199
|
export declare function writeCatalogFunctionDefinitions(options: WriteComponentCatalogOptions): Promise<CatalogFunction[]>;
|
|
200
|
+
/**
|
|
201
|
+
* Component and function artifacts produced by a single extraction pass.
|
|
202
|
+
*/
|
|
121
203
|
export interface CatalogArtifacts {
|
|
122
204
|
components: CatalogComponent[];
|
|
123
205
|
functions: CatalogFunction[];
|
|
124
206
|
}
|
|
125
207
|
/**
|
|
126
|
-
* Bootstrap TypeDoc once and emit
|
|
208
|
+
* Bootstrap TypeDoc once and emit component manifests plus the full catalog.
|
|
127
209
|
* Preferred entry point for the CLI — running the conversion twice doubles
|
|
128
210
|
* cold-start latency on large catalogs.
|
|
129
211
|
*/
|
|
130
212
|
export declare function writeCatalogArtifacts(options: WriteComponentCatalogOptions): Promise<CatalogArtifacts>;
|
|
213
|
+
/**
|
|
214
|
+
* Write function definition artifacts that were already extracted.
|
|
215
|
+
*/
|
|
131
216
|
export declare function writeCatalogFunctions(functions: CatalogFunction[], options: {
|
|
132
217
|
cwd?: string;
|
|
133
218
|
outDir: string;
|
|
134
219
|
}): void;
|
|
220
|
+
/**
|
|
221
|
+
* Build a full A2UI catalog manifest from component and function artifacts.
|
|
222
|
+
*/
|
|
135
223
|
export declare function createA2UICatalog(options: {
|
|
136
224
|
catalogId: string;
|
|
137
225
|
components: CatalogComponent[] | Record<string, JsonSchema>;
|
|
138
226
|
functions?: FunctionDefinition[];
|
|
139
227
|
theme?: Record<string, JsonSchema>;
|
|
140
228
|
}): A2UICatalog;
|
|
229
|
+
/**
|
|
230
|
+
* Write a full A2UI catalog manifest as `catalog.json`.
|
|
231
|
+
*/
|
|
232
|
+
export declare function writeA2UICatalog(catalog: A2UICatalog, options: {
|
|
233
|
+
cwd?: string;
|
|
234
|
+
outDir: string;
|
|
235
|
+
}): void;
|