@apteva/apteva-kit 0.1.61 → 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.mjs 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": "email", "type": "text", "label": "Email"}]}]'
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: {
@@ -1016,7 +1016,7 @@ function Form({ widget, onAction }) {
1016
1016
  renderField(field)
1017
1017
  ] }, field.name)) })
1018
1018
  ] }),
1019
- submitAction && /* @__PURE__ */ jsx6("div", { className: "border-t border-neutral-200 dark:border-neutral-700 p-4", children: /* @__PURE__ */ jsx6(
1019
+ submitAction && /* @__PURE__ */ jsx6("div", { className: "px-4 pb-4", children: /* @__PURE__ */ jsx6(
1020
1020
  "button",
1021
1021
  {
1022
1022
  type: "submit",