@apteva/apteva-kit 0.1.80 → 0.1.81

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
@@ -739,8 +739,8 @@ var WIDGET_DEFINITIONS = {
739
739
  example: '@ui:card[{"title": "Summary", "description": "Details here"}]'
740
740
  },
741
741
  list: {
742
- schema: "items: [{id, title, subtitle?, description?}], actions?: [{type, label}]",
743
- example: '@ui:list[{"items": [{"id": "1", "title": "Item", "subtitle": "Info"}]}]'
742
+ schema: "items: [{id, title, subtitle?, description?, image?, meta?: {any extra data}}], actions?: [{type, label}] - meta is sent as action payload when clicked",
743
+ example: '@ui:list[{"items": [{"id": "1", "title": "Item", "subtitle": "Info", "meta": {"key": "value"}}]}]'
744
744
  },
745
745
  button_group: {
746
746
  schema: "buttons: [{id, label, variant?}] - Use for standalone buttons only, NOT for form submits",
@@ -782,7 +782,7 @@ WRONG: @ui:list{"items": [...]} (missing square brackets)
782
782
  `;
783
783
  }
784
784
  context += `
785
- Meta example: @ui:list[{"items": [{"id": "1", "title": "X"}], "meta": {"items": [{"id": "1", "title": "X", "extra": "..."}]}}]
785
+ Per-item "meta" is sent as payload on action click.
786
786
  `;
787
787
  return context;
788
788
  }
@@ -872,7 +872,7 @@ function List({ widget, onAction }) {
872
872
  {
873
873
  onClick: () => onAction?.({
874
874
  type: action.type,
875
- payload: item.metadata || item,
875
+ payload: item.meta || item,
876
876
  widgetId: widget.id,
877
877
  timestamp: /* @__PURE__ */ new Date()
878
878
  }),