@apteva/apteva-kit 0.1.62 → 0.1.63
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +6 -6
- package/dist/index.d.ts +6 -6
- package/dist/index.js +6 -6
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +6 -6
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -186,23 +186,23 @@ interface SendMessageParams {
|
|
|
186
186
|
*/
|
|
187
187
|
declare const WIDGET_DEFINITIONS: {
|
|
188
188
|
readonly card: {
|
|
189
|
-
readonly schema: "title, description?, image?, footer
|
|
189
|
+
readonly schema: "title, description?, image?, footer?, actions?: [{type, label}]";
|
|
190
190
|
readonly example: "@ui:card[{\"title\": \"Summary\", \"description\": \"Details here\"}]";
|
|
191
191
|
};
|
|
192
192
|
readonly list: {
|
|
193
|
-
readonly schema: "items: [{id, title, subtitle?, description?}]";
|
|
193
|
+
readonly schema: "items: [{id, title, subtitle?, description?}], actions?: [{type, label}]";
|
|
194
194
|
readonly example: "@ui:list[{\"items\": [{\"id\": \"1\", \"title\": \"Item\", \"subtitle\": \"Info\"}]}]";
|
|
195
195
|
};
|
|
196
196
|
readonly button_group: {
|
|
197
|
-
readonly schema: "buttons: [{id, label, variant?}]";
|
|
197
|
+
readonly schema: "buttons: [{id, label, variant?}] - Use for standalone buttons only, NOT for form submits";
|
|
198
198
|
readonly example: "@ui:button_group[{\"buttons\": [{\"id\": \"ok\", \"label\": \"OK\"}]}]";
|
|
199
199
|
};
|
|
200
200
|
readonly form: {
|
|
201
|
-
readonly schema: "fields: [{name, type, label, required?}]";
|
|
202
|
-
readonly example: "@ui:form[{\"fields\": [{\"name\": \"
|
|
201
|
+
readonly schema: "title?, fields: [{name, type: text|password|number|select|checkbox|textarea|date, label, required?, placeholder?, options?}], actions: [{type, label}] - Button is built-in via actions, do NOT add separate button";
|
|
202
|
+
readonly example: "@ui:form[{\"title\": \"Settings\", \"fields\": [{\"name\": \"apiKey\", \"type\": \"password\", \"label\": \"API Key\", \"required\": true}], \"actions\": [{\"type\": \"save\", \"label\": \"Save\"}]}]";
|
|
203
203
|
};
|
|
204
204
|
readonly table: {
|
|
205
|
-
readonly schema: "columns: [{key, label}], rows: [...]";
|
|
205
|
+
readonly schema: "columns: [{key, label}], rows: [...], striped?, compact?";
|
|
206
206
|
readonly example: "@ui:table[{\"columns\": [{\"key\": \"name\", \"label\": \"Name\"}], \"rows\": [{\"name\": \"A\"}]}]";
|
|
207
207
|
};
|
|
208
208
|
readonly image: {
|
package/dist/index.d.ts
CHANGED
|
@@ -186,23 +186,23 @@ interface SendMessageParams {
|
|
|
186
186
|
*/
|
|
187
187
|
declare const WIDGET_DEFINITIONS: {
|
|
188
188
|
readonly card: {
|
|
189
|
-
readonly schema: "title, description?, image?, footer
|
|
189
|
+
readonly schema: "title, description?, image?, footer?, actions?: [{type, label}]";
|
|
190
190
|
readonly example: "@ui:card[{\"title\": \"Summary\", \"description\": \"Details here\"}]";
|
|
191
191
|
};
|
|
192
192
|
readonly list: {
|
|
193
|
-
readonly schema: "items: [{id, title, subtitle?, description?}]";
|
|
193
|
+
readonly schema: "items: [{id, title, subtitle?, description?}], actions?: [{type, label}]";
|
|
194
194
|
readonly example: "@ui:list[{\"items\": [{\"id\": \"1\", \"title\": \"Item\", \"subtitle\": \"Info\"}]}]";
|
|
195
195
|
};
|
|
196
196
|
readonly button_group: {
|
|
197
|
-
readonly schema: "buttons: [{id, label, variant?}]";
|
|
197
|
+
readonly schema: "buttons: [{id, label, variant?}] - Use for standalone buttons only, NOT for form submits";
|
|
198
198
|
readonly example: "@ui:button_group[{\"buttons\": [{\"id\": \"ok\", \"label\": \"OK\"}]}]";
|
|
199
199
|
};
|
|
200
200
|
readonly form: {
|
|
201
|
-
readonly schema: "fields: [{name, type, label, required?}]";
|
|
202
|
-
readonly example: "@ui:form[{\"fields\": [{\"name\": \"
|
|
201
|
+
readonly schema: "title?, fields: [{name, type: text|password|number|select|checkbox|textarea|date, label, required?, placeholder?, options?}], actions: [{type, label}] - Button is built-in via actions, do NOT add separate button";
|
|
202
|
+
readonly example: "@ui:form[{\"title\": \"Settings\", \"fields\": [{\"name\": \"apiKey\", \"type\": \"password\", \"label\": \"API Key\", \"required\": true}], \"actions\": [{\"type\": \"save\", \"label\": \"Save\"}]}]";
|
|
203
203
|
};
|
|
204
204
|
readonly table: {
|
|
205
|
-
readonly schema: "columns: [{key, label}], rows: [...]";
|
|
205
|
+
readonly schema: "columns: [{key, label}], rows: [...], striped?, compact?";
|
|
206
206
|
readonly example: "@ui:table[{\"columns\": [{\"key\": \"name\", \"label\": \"Name\"}], \"rows\": [{\"name\": \"A\"}]}]";
|
|
207
207
|
};
|
|
208
208
|
readonly image: {
|
package/dist/index.js
CHANGED
|
@@ -639,23 +639,23 @@ function parseWidgetsFromText(text) {
|
|
|
639
639
|
// src/utils/widget-context.ts
|
|
640
640
|
var WIDGET_DEFINITIONS = {
|
|
641
641
|
card: {
|
|
642
|
-
schema: "title, description?, image?, footer
|
|
642
|
+
schema: "title, description?, image?, footer?, actions?: [{type, label}]",
|
|
643
643
|
example: '@ui:card[{"title": "Summary", "description": "Details here"}]'
|
|
644
644
|
},
|
|
645
645
|
list: {
|
|
646
|
-
schema: "items: [{id, title, subtitle?, description?}]",
|
|
646
|
+
schema: "items: [{id, title, subtitle?, description?}], actions?: [{type, label}]",
|
|
647
647
|
example: '@ui:list[{"items": [{"id": "1", "title": "Item", "subtitle": "Info"}]}]'
|
|
648
648
|
},
|
|
649
649
|
button_group: {
|
|
650
|
-
schema: "buttons: [{id, label, variant?}]",
|
|
650
|
+
schema: "buttons: [{id, label, variant?}] - Use for standalone buttons only, NOT for form submits",
|
|
651
651
|
example: '@ui:button_group[{"buttons": [{"id": "ok", "label": "OK"}]}]'
|
|
652
652
|
},
|
|
653
653
|
form: {
|
|
654
|
-
schema: "fields: [{name, type, label, required?}]",
|
|
655
|
-
example: '@ui:form[{"fields": [{"name": "
|
|
654
|
+
schema: "title?, fields: [{name, type: text|password|number|select|checkbox|textarea|date, label, required?, placeholder?, options?}], actions: [{type, label}] - Button is built-in via actions, do NOT add separate button",
|
|
655
|
+
example: '@ui:form[{"title": "Settings", "fields": [{"name": "apiKey", "type": "password", "label": "API Key", "required": true}], "actions": [{"type": "save", "label": "Save"}]}]'
|
|
656
656
|
},
|
|
657
657
|
table: {
|
|
658
|
-
schema: "columns: [{key, label}], rows: [...]",
|
|
658
|
+
schema: "columns: [{key, label}], rows: [...], striped?, compact?",
|
|
659
659
|
example: '@ui:table[{"columns": [{"key": "name", "label": "Name"}], "rows": [{"name": "A"}]}]'
|
|
660
660
|
},
|
|
661
661
|
image: {
|