@almadar/patterns 2.20.2 → 2.21.0

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-04T08:21:23.048Z",
3
+ "exportedAt": "2026-05-05T13:33:44.073Z",
4
4
  "mappings": {
5
5
  "page-header": {
6
6
  "component": "PageHeader",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": "1.0.0",
3
- "exportedAt": "2026-05-04T08:21:23.048Z",
3
+ "exportedAt": "2026-05-05T13:33:44.073Z",
4
4
  "contracts": {
5
5
  "form": {
6
6
  "emits": [
package/dist/index.d.ts CHANGED
@@ -5505,6 +5505,51 @@ export declare const registry: {
5505
5505
  types: string[];
5506
5506
  description: string;
5507
5507
  };
5508
+ searchEvent: {
5509
+ types: string[];
5510
+ description: string;
5511
+ kind: string;
5512
+ emitPayloadSchema: {
5513
+ name: string;
5514
+ type: string;
5515
+ required: boolean;
5516
+ }[];
5517
+ };
5518
+ onSearchSubmit: {
5519
+ types: string[];
5520
+ description: string;
5521
+ kind: string;
5522
+ callbackArgs: {
5523
+ name: string;
5524
+ type: string;
5525
+ }[];
5526
+ };
5527
+ topBarActions: {
5528
+ types: string[];
5529
+ description: string;
5530
+ kind: string;
5531
+ eventField: string;
5532
+ };
5533
+ notifications: {
5534
+ types: string[];
5535
+ description: string;
5536
+ };
5537
+ notificationClickEvent: {
5538
+ types: string[];
5539
+ description: string;
5540
+ kind: string;
5541
+ emitPayloadSchema: never[];
5542
+ };
5543
+ onNotificationClick: {
5544
+ types: string[];
5545
+ description: string;
5546
+ kind: string;
5547
+ callbackArgs: never[];
5548
+ };
5549
+ showThemeToggle: {
5550
+ types: string[];
5551
+ description: string;
5552
+ };
5508
5553
  sidebarFooter: {
5509
5554
  types: string[];
5510
5555
  description: string;
@@ -22158,6 +22203,51 @@ export declare const PATTERN_REGISTRY: {
22158
22203
  types: string[];
22159
22204
  description: string;
22160
22205
  };
22206
+ searchEvent: {
22207
+ types: string[];
22208
+ description: string;
22209
+ kind: string;
22210
+ emitPayloadSchema: {
22211
+ name: string;
22212
+ type: string;
22213
+ required: boolean;
22214
+ }[];
22215
+ };
22216
+ onSearchSubmit: {
22217
+ types: string[];
22218
+ description: string;
22219
+ kind: string;
22220
+ callbackArgs: {
22221
+ name: string;
22222
+ type: string;
22223
+ }[];
22224
+ };
22225
+ topBarActions: {
22226
+ types: string[];
22227
+ description: string;
22228
+ kind: string;
22229
+ eventField: string;
22230
+ };
22231
+ notifications: {
22232
+ types: string[];
22233
+ description: string;
22234
+ };
22235
+ notificationClickEvent: {
22236
+ types: string[];
22237
+ description: string;
22238
+ kind: string;
22239
+ emitPayloadSchema: never[];
22240
+ };
22241
+ onNotificationClick: {
22242
+ types: string[];
22243
+ description: string;
22244
+ kind: string;
22245
+ callbackArgs: never[];
22246
+ };
22247
+ showThemeToggle: {
22248
+ types: string[];
22249
+ description: string;
22250
+ };
22161
22251
  sidebarFooter: {
22162
22252
  types: string[];
22163
22253
  description: string;
package/dist/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  // src/patterns-registry.json
2
2
  var patterns_registry_default = {
3
3
  version: "1.0.0",
4
- exportedAt: "2026-05-04T08:21:23.048Z",
4
+ exportedAt: "2026-05-05T13:33:44.073Z",
5
5
  patterns: {
6
6
  "entity-table": {
7
7
  type: "entity-table",
@@ -8712,7 +8712,7 @@ var patterns_registry_default = {
8712
8712
  types: [
8713
8713
  "array"
8714
8714
  ],
8715
- description: "Navigation items"
8715
+ description: "Navigation items. Apps that need a Settings page should add it as a navItems entry, not depend on baked-in chrome."
8716
8716
  },
8717
8717
  user: {
8718
8718
  types: [
@@ -8724,19 +8724,82 @@ var patterns_registry_default = {
8724
8724
  types: [
8725
8725
  "node"
8726
8726
  ],
8727
- description: "Header actions (notifications, etc.)"
8727
+ description: "Header actions (extra slots beyond bell/search/theme)."
8728
8728
  },
8729
8729
  showSearch: {
8730
8730
  types: [
8731
8731
  "boolean"
8732
8732
  ],
8733
- description: "Show search in header"
8733
+ description: "Show the top-bar search box. Default `false` \u2014 opt in by setting `searchEvent` (any truthy value implies showSearch) or this flag."
8734
+ },
8735
+ searchEvent: {
8736
+ types: [
8737
+ "string"
8738
+ ],
8739
+ description: "Declarative search event \u2014 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.",
8740
+ kind: "event-ref",
8741
+ emitPayloadSchema: [
8742
+ {
8743
+ name: "value",
8744
+ type: "string",
8745
+ required: true
8746
+ }
8747
+ ]
8748
+ },
8749
+ onSearchSubmit: {
8750
+ types: [
8751
+ "function"
8752
+ ],
8753
+ description: "React-side search submit callback. Used when the host wires the layout directly (not via render-ui pattern resolution).",
8754
+ kind: "callback",
8755
+ callbackArgs: [
8756
+ {
8757
+ name: "value",
8758
+ type: "string"
8759
+ }
8760
+ ]
8761
+ },
8762
+ topBarActions: {
8763
+ types: [
8764
+ "array"
8765
+ ],
8766
+ description: "Generic top-bar action buttons rendered between the search bar and the notifications bell. Each entry: `{icon, label?, event, badge?, variant?}`. Domain-agnostic \u2014 consumers add a cart icon, profile button, help-bubble, or any other top-bar action by appending entries. Empty array (default) renders nothing.",
8767
+ kind: "event-list",
8768
+ eventField: "event"
8769
+ },
8770
+ notifications: {
8771
+ types: [
8772
+ "array"
8773
+ ],
8774
+ description: "Notification list. Pass an empty array to show the bell with no badge; omit / pass null to hide the bell entirely."
8775
+ },
8776
+ notificationClickEvent: {
8777
+ types: [
8778
+ "string"
8779
+ ],
8780
+ description: "Declarative bell click event \u2014 fires `UI:{notificationClickEvent}` on the bus with an empty payload when the user clicks the bell.",
8781
+ kind: "event-ref",
8782
+ emitPayloadSchema: []
8783
+ },
8784
+ onNotificationClick: {
8785
+ types: [
8786
+ "function"
8787
+ ],
8788
+ description: "React-side bell click callback.",
8789
+ kind: "callback",
8790
+ callbackArgs: []
8791
+ },
8792
+ showThemeToggle: {
8793
+ types: [
8794
+ "boolean"
8795
+ ],
8796
+ description: "Show the theme toggle button in the header. Default `true` \u2014 universally useful for a11y / dark mode."
8734
8797
  },
8735
8798
  sidebarFooter: {
8736
8799
  types: [
8737
8800
  "node"
8738
8801
  ],
8739
- description: "Custom sidebar footer"
8802
+ description: "Custom sidebar footer (optional). When omitted, the sidebar has no footer \u2014 apps that need Settings/etc. add them via navItems."
8740
8803
  },
8741
8804
  onSignOut: {
8742
8805
  types: [
@@ -26667,7 +26730,7 @@ var integrators_registry_default = {
26667
26730
  // src/component-mapping.json
26668
26731
  var component_mapping_default = {
26669
26732
  version: "1.0.0",
26670
- exportedAt: "2026-05-04T08:21:23.048Z",
26733
+ exportedAt: "2026-05-05T13:33:44.073Z",
26671
26734
  mappings: {
26672
26735
  "page-header": {
26673
26736
  component: "PageHeader",
@@ -28478,7 +28541,7 @@ var component_mapping_default = {
28478
28541
  // src/event-contracts.json
28479
28542
  var event_contracts_default = {
28480
28543
  version: "1.0.0",
28481
- exportedAt: "2026-05-04T08:21:23.048Z",
28544
+ exportedAt: "2026-05-05T13:33:44.073Z",
28482
28545
  contracts: {
28483
28546
  form: {
28484
28547
  emits: [