@almadar/patterns 2.20.1 → 2.20.3

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.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": "1.0.0",
3
- "exportedAt": "2026-05-04T04:46:21.886Z",
3
+ "exportedAt": "2026-05-04T18:38:26.384Z",
4
4
  "patterns": {
5
5
  "entity-table": {
6
6
  "type": "entity-table",
@@ -3976,9 +3976,10 @@
3976
3976
  },
3977
3977
  "label": {
3978
3978
  "types": [
3979
- "string"
3979
+ "string",
3980
+ "number"
3980
3981
  ],
3981
- "description": "Badge label text (alternative to children for schema-driven rendering)"
3982
+ "description": "Badge label text (alternative to children for schema-driven rendering). Numeric values are auto-coerced to string for rendering — common case is unread counts, error counts, status codes, etc."
3982
3983
  },
3983
3984
  "icon": {
3984
3985
  "types": [
@@ -8710,7 +8711,7 @@
8710
8711
  "types": [
8711
8712
  "array"
8712
8713
  ],
8713
- "description": "Navigation items"
8714
+ "description": "Navigation items. Apps that need a Settings page should add it as a navItems entry, not depend on baked-in chrome."
8714
8715
  },
8715
8716
  "user": {
8716
8717
  "types": [
@@ -8722,19 +8723,74 @@
8722
8723
  "types": [
8723
8724
  "node"
8724
8725
  ],
8725
- "description": "Header actions (notifications, etc.)"
8726
+ "description": "Header actions (extra slots beyond bell/search/theme)."
8726
8727
  },
8727
8728
  "showSearch": {
8728
8729
  "types": [
8729
8730
  "boolean"
8730
8731
  ],
8731
- "description": "Show search in header"
8732
+ "description": "Show the top-bar search box. Default `false` — opt in by setting `searchEvent` (any truthy value implies showSearch) or this flag."
8733
+ },
8734
+ "searchEvent": {
8735
+ "types": [
8736
+ "string"
8737
+ ],
8738
+ "description": "Declarative search event — fires `UI:{searchEvent}` on the bus when the user submits the search box (Enter key). Setting this implies `showSearch=true`. Use `onSearchSubmit` for direct React usage instead.",
8739
+ "kind": "event-ref",
8740
+ "emitPayloadSchema": [
8741
+ {
8742
+ "name": "value",
8743
+ "type": "string",
8744
+ "required": true
8745
+ }
8746
+ ]
8747
+ },
8748
+ "onSearchSubmit": {
8749
+ "types": [
8750
+ "function"
8751
+ ],
8752
+ "description": "React-side search submit callback. Used when the host wires the layout directly (not via render-ui pattern resolution).",
8753
+ "kind": "callback",
8754
+ "callbackArgs": [
8755
+ {
8756
+ "name": "value",
8757
+ "type": "string"
8758
+ }
8759
+ ]
8760
+ },
8761
+ "notifications": {
8762
+ "types": [
8763
+ "array"
8764
+ ],
8765
+ "description": "Notification list. Pass an empty array to show the bell with no badge; omit / pass null to hide the bell entirely."
8766
+ },
8767
+ "notificationClickEvent": {
8768
+ "types": [
8769
+ "string"
8770
+ ],
8771
+ "description": "Declarative bell click event — fires `UI:{notificationClickEvent}` on the bus with an empty payload when the user clicks the bell.",
8772
+ "kind": "event-ref",
8773
+ "emitPayloadSchema": []
8774
+ },
8775
+ "onNotificationClick": {
8776
+ "types": [
8777
+ "function"
8778
+ ],
8779
+ "description": "React-side bell click callback.",
8780
+ "kind": "callback",
8781
+ "callbackArgs": []
8782
+ },
8783
+ "showThemeToggle": {
8784
+ "types": [
8785
+ "boolean"
8786
+ ],
8787
+ "description": "Show the theme toggle button in the header. Default `true` — universally useful for a11y / dark mode."
8732
8788
  },
8733
8789
  "sidebarFooter": {
8734
8790
  "types": [
8735
8791
  "node"
8736
8792
  ],
8737
- "description": "Custom sidebar footer"
8793
+ "description": "Custom sidebar footer (optional). When omitted, the sidebar has no footer — apps that need Settings/etc. add them via navItems."
8738
8794
  },
8739
8795
  "onSignOut": {
8740
8796
  "types": [
@@ -14711,8 +14767,13 @@
14711
14767
  "types": [
14712
14768
  "array"
14713
14769
  ],
14714
- "description": "Field definitions for rendering each card",
14715
- "required": true
14770
+ "description": "Field definitions for rendering each card. The pattern contract in `@almadar/patterns` documents `columns` as the wire-format alias the compiler emits — both names resolve to the same shape here. Pass either."
14771
+ },
14772
+ "columns": {
14773
+ "types": [
14774
+ "array"
14775
+ ],
14776
+ "description": "Alias for `fields` — the compiler emits `columns` for field defs."
14716
14777
  },
14717
14778
  "itemActions": {
14718
14779
  "types": [
@@ -14868,8 +14929,13 @@
14868
14929
  "types": [
14869
14930
  "array"
14870
14931
  ],
14871
- "description": "Field definitions for rendering each row",
14872
- "required": true
14932
+ "description": "Field definitions for rendering each row. The pattern contract in `@almadar/patterns` documents `columns` as the wire-format alias the compiler emits — both names resolve to the same shape here. Pass either."
14933
+ },
14934
+ "columns": {
14935
+ "types": [
14936
+ "array"
14937
+ ],
14938
+ "description": "Alias for `fields` — the compiler emits `columns` for field defs."
14873
14939
  },
14874
14940
  "itemActions": {
14875
14941
  "types": [
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": "1.0.0",
3
- "exportedAt": "2026-05-04T04:46:21.886Z",
3
+ "exportedAt": "2026-05-04T18:38:26.384Z",
4
4
  "patterns": {
5
5
  "entity-table": {
6
6
  "type": "entity-table",
@@ -3976,9 +3976,10 @@
3976
3976
  },
3977
3977
  "label": {
3978
3978
  "types": [
3979
- "string"
3979
+ "string",
3980
+ "number"
3980
3981
  ],
3981
- "description": "Badge label text (alternative to children for schema-driven rendering)"
3982
+ "description": "Badge label text (alternative to children for schema-driven rendering). Numeric values are auto-coerced to string for rendering — common case is unread counts, error counts, status codes, etc."
3982
3983
  },
3983
3984
  "icon": {
3984
3985
  "types": [
@@ -8710,7 +8711,7 @@
8710
8711
  "types": [
8711
8712
  "array"
8712
8713
  ],
8713
- "description": "Navigation items"
8714
+ "description": "Navigation items. Apps that need a Settings page should add it as a navItems entry, not depend on baked-in chrome."
8714
8715
  },
8715
8716
  "user": {
8716
8717
  "types": [
@@ -8722,19 +8723,74 @@
8722
8723
  "types": [
8723
8724
  "node"
8724
8725
  ],
8725
- "description": "Header actions (notifications, etc.)"
8726
+ "description": "Header actions (extra slots beyond bell/search/theme)."
8726
8727
  },
8727
8728
  "showSearch": {
8728
8729
  "types": [
8729
8730
  "boolean"
8730
8731
  ],
8731
- "description": "Show search in header"
8732
+ "description": "Show the top-bar search box. Default `false` — opt in by setting `searchEvent` (any truthy value implies showSearch) or this flag."
8733
+ },
8734
+ "searchEvent": {
8735
+ "types": [
8736
+ "string"
8737
+ ],
8738
+ "description": "Declarative search event — fires `UI:{searchEvent}` on the bus when the user submits the search box (Enter key). Setting this implies `showSearch=true`. Use `onSearchSubmit` for direct React usage instead.",
8739
+ "kind": "event-ref",
8740
+ "emitPayloadSchema": [
8741
+ {
8742
+ "name": "value",
8743
+ "type": "string",
8744
+ "required": true
8745
+ }
8746
+ ]
8747
+ },
8748
+ "onSearchSubmit": {
8749
+ "types": [
8750
+ "function"
8751
+ ],
8752
+ "description": "React-side search submit callback. Used when the host wires the layout directly (not via render-ui pattern resolution).",
8753
+ "kind": "callback",
8754
+ "callbackArgs": [
8755
+ {
8756
+ "name": "value",
8757
+ "type": "string"
8758
+ }
8759
+ ]
8760
+ },
8761
+ "notifications": {
8762
+ "types": [
8763
+ "array"
8764
+ ],
8765
+ "description": "Notification list. Pass an empty array to show the bell with no badge; omit / pass null to hide the bell entirely."
8766
+ },
8767
+ "notificationClickEvent": {
8768
+ "types": [
8769
+ "string"
8770
+ ],
8771
+ "description": "Declarative bell click event — fires `UI:{notificationClickEvent}` on the bus with an empty payload when the user clicks the bell.",
8772
+ "kind": "event-ref",
8773
+ "emitPayloadSchema": []
8774
+ },
8775
+ "onNotificationClick": {
8776
+ "types": [
8777
+ "function"
8778
+ ],
8779
+ "description": "React-side bell click callback.",
8780
+ "kind": "callback",
8781
+ "callbackArgs": []
8782
+ },
8783
+ "showThemeToggle": {
8784
+ "types": [
8785
+ "boolean"
8786
+ ],
8787
+ "description": "Show the theme toggle button in the header. Default `true` — universally useful for a11y / dark mode."
8732
8788
  },
8733
8789
  "sidebarFooter": {
8734
8790
  "types": [
8735
8791
  "node"
8736
8792
  ],
8737
- "description": "Custom sidebar footer"
8793
+ "description": "Custom sidebar footer (optional). When omitted, the sidebar has no footer — apps that need Settings/etc. add them via navItems."
8738
8794
  },
8739
8795
  "onSignOut": {
8740
8796
  "types": [
@@ -14711,8 +14767,13 @@
14711
14767
  "types": [
14712
14768
  "array"
14713
14769
  ],
14714
- "description": "Field definitions for rendering each card",
14715
- "required": true
14770
+ "description": "Field definitions for rendering each card. The pattern contract in `@almadar/patterns` documents `columns` as the wire-format alias the compiler emits — both names resolve to the same shape here. Pass either."
14771
+ },
14772
+ "columns": {
14773
+ "types": [
14774
+ "array"
14775
+ ],
14776
+ "description": "Alias for `fields` — the compiler emits `columns` for field defs."
14716
14777
  },
14717
14778
  "itemActions": {
14718
14779
  "types": [
@@ -14868,8 +14929,13 @@
14868
14929
  "types": [
14869
14930
  "array"
14870
14931
  ],
14871
- "description": "Field definitions for rendering each row",
14872
- "required": true
14932
+ "description": "Field definitions for rendering each row. The pattern contract in `@almadar/patterns` documents `columns` as the wire-format alias the compiler emits — both names resolve to the same shape here. Pass either."
14933
+ },
14934
+ "columns": {
14935
+ "types": [
14936
+ "array"
14937
+ ],
14938
+ "description": "Alias for `fields` — the compiler emits `columns` for field defs."
14873
14939
  },
14874
14940
  "itemActions": {
14875
14941
  "types": [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@almadar/patterns",
3
- "version": "2.20.1",
3
+ "version": "2.20.3",
4
4
  "description": "Pattern registry and component mappings for Almadar",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",