@almadar/patterns 2.0.1 → 2.0.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.
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-03-03T11:14:06.592Z",
4
+ exportedAt: "2026-03-05T06:51:24.222Z",
5
5
  patterns: {
6
6
  "entity-table": {
7
7
  type: "entity-table",
@@ -477,6 +477,18 @@ var patterns_registry_default = {
477
477
  "boolean"
478
478
  ],
479
479
  description: "Show total count in pagination"
480
+ },
481
+ showAvatar: {
482
+ types: [
483
+ "boolean"
484
+ ],
485
+ description: "Show avatar/image field on cards"
486
+ },
487
+ variant: {
488
+ types: [
489
+ "string"
490
+ ],
491
+ description: "Visual variant for the card grid"
480
492
  }
481
493
  }
482
494
  },
@@ -2154,6 +2166,12 @@ var patterns_registry_default = {
2154
2166
  "unknown"
2155
2167
  ],
2156
2168
  description: "Metrics to display (schema format) - accepts readonly for compatibility with generated const arrays"
2169
+ },
2170
+ compact: {
2171
+ types: [
2172
+ "boolean"
2173
+ ],
2174
+ description: "Compact display mode"
2157
2175
  }
2158
2176
  }
2159
2177
  },
@@ -2168,6 +2186,84 @@ var patterns_registry_default = {
2168
2186
  ],
2169
2187
  typicalSize: "large",
2170
2188
  propsSchema: {
2189
+ entity: {
2190
+ types: [
2191
+ "string"
2192
+ ],
2193
+ description: "Entity name for schema-driven integration"
2194
+ },
2195
+ data: {
2196
+ types: [
2197
+ "array"
2198
+ ],
2199
+ description: "Data array provided by the trait via render-ui"
2200
+ },
2201
+ className: {
2202
+ types: [
2203
+ "string"
2204
+ ],
2205
+ description: "Additional CSS classes"
2206
+ },
2207
+ isLoading: {
2208
+ types: [
2209
+ "boolean"
2210
+ ],
2211
+ description: "Loading state indicator"
2212
+ },
2213
+ error: {
2214
+ types: [
2215
+ "object"
2216
+ ],
2217
+ description: "Error state"
2218
+ },
2219
+ sortBy: {
2220
+ types: [
2221
+ "string"
2222
+ ],
2223
+ description: "Current sort field"
2224
+ },
2225
+ sortDirection: {
2226
+ types: [
2227
+ "string"
2228
+ ],
2229
+ description: "Current sort direction"
2230
+ },
2231
+ searchValue: {
2232
+ types: [
2233
+ "string"
2234
+ ],
2235
+ description: "Current search query value"
2236
+ },
2237
+ page: {
2238
+ types: [
2239
+ "number"
2240
+ ],
2241
+ description: "Current page number"
2242
+ },
2243
+ pageSize: {
2244
+ types: [
2245
+ "number"
2246
+ ],
2247
+ description: "Number of items per page"
2248
+ },
2249
+ totalCount: {
2250
+ types: [
2251
+ "number"
2252
+ ],
2253
+ description: "Total number of items"
2254
+ },
2255
+ activeFilters: {
2256
+ types: [
2257
+ "object"
2258
+ ],
2259
+ description: "Active filters"
2260
+ },
2261
+ selectedIds: {
2262
+ types: [
2263
+ "array"
2264
+ ],
2265
+ description: "Currently selected item IDs"
2266
+ },
2171
2267
  columns: {
2172
2268
  types: [
2173
2269
  "number"
@@ -2186,12 +2282,6 @@ var patterns_registry_default = {
2186
2282
  ],
2187
2283
  description: "Cell definitions",
2188
2284
  required: true
2189
- },
2190
- className: {
2191
- types: [
2192
- "string"
2193
- ],
2194
- description: "Additional CSS classes"
2195
2285
  }
2196
2286
  }
2197
2287
  },
@@ -3391,6 +3481,12 @@ var patterns_registry_default = {
3391
3481
  "badgesize"
3392
3482
  ],
3393
3483
  description: "size prop"
3484
+ },
3485
+ amount: {
3486
+ types: [
3487
+ "number"
3488
+ ],
3489
+ description: "Numeric count or amount to display in badge"
3394
3490
  }
3395
3491
  }
3396
3492
  },
@@ -3599,6 +3695,30 @@ var patterns_registry_default = {
3599
3695
  "string"
3600
3696
  ],
3601
3697
  description: "Declarative event name \u2014 emits UI:{action} via eventBus on card click"
3698
+ },
3699
+ isSelected: {
3700
+ types: [
3701
+ "boolean"
3702
+ ],
3703
+ description: "Whether the card is selected (highlighted state)"
3704
+ },
3705
+ name: {
3706
+ types: [
3707
+ "string"
3708
+ ],
3709
+ description: "Card name (alias for title)"
3710
+ },
3711
+ level: {
3712
+ types: [
3713
+ "number"
3714
+ ],
3715
+ description: "Level indicator"
3716
+ },
3717
+ maxLevel: {
3718
+ types: [
3719
+ "number"
3720
+ ],
3721
+ description: "Maximum level"
3602
3722
  }
3603
3723
  }
3604
3724
  },
@@ -7475,6 +7595,12 @@ var patterns_registry_default = {
7475
7595
  "function"
7476
7596
  ],
7477
7597
  description: "Callback when user clicks sign out (optional - uses auth context signOut if not provided)"
7598
+ },
7599
+ children: {
7600
+ types: [
7601
+ "node"
7602
+ ],
7603
+ description: "Page content rendered inside the main area"
7478
7604
  }
7479
7605
  }
7480
7606
  },
@@ -7620,6 +7746,12 @@ var patterns_registry_default = {
7620
7746
  "boolean"
7621
7747
  ],
7622
7748
  description: "Whether to show the minimal top bar (default: true)"
7749
+ },
7750
+ children: {
7751
+ types: [
7752
+ "node"
7753
+ ],
7754
+ description: "Game content rendered inside the full-screen area"
7623
7755
  }
7624
7756
  }
7625
7757
  },
@@ -8629,11 +8761,23 @@ var patterns_registry_default = {
8629
8761
  ],
8630
8762
  typicalSize: "large",
8631
8763
  propsSchema: {
8764
+ entity: {
8765
+ types: [
8766
+ "string"
8767
+ ],
8768
+ description: "Entity name for schema-driven integration"
8769
+ },
8770
+ data: {
8771
+ types: [
8772
+ "array"
8773
+ ],
8774
+ description: "Data array provided by the trait via render-ui"
8775
+ },
8632
8776
  className: {
8633
8777
  types: [
8634
8778
  "string"
8635
8779
  ],
8636
- description: "--- Closed-circuit props (MANDATORY) ---"
8780
+ description: "Additional CSS classes"
8637
8781
  },
8638
8782
  isLoading: {
8639
8783
  types: [
@@ -8643,21 +8787,63 @@ var patterns_registry_default = {
8643
8787
  },
8644
8788
  error: {
8645
8789
  types: [
8646
- "error"
8790
+ "object"
8647
8791
  ],
8648
8792
  description: "Error state"
8649
8793
  },
8650
- entity: {
8794
+ sortBy: {
8651
8795
  types: [
8652
8796
  "string"
8653
8797
  ],
8654
- description: "Entity name for schema-driven auto-fetch"
8798
+ description: "Current sort field"
8799
+ },
8800
+ sortDirection: {
8801
+ types: [
8802
+ "string"
8803
+ ],
8804
+ description: "Current sort direction"
8805
+ },
8806
+ searchValue: {
8807
+ types: [
8808
+ "string"
8809
+ ],
8810
+ description: "Current search query value"
8811
+ },
8812
+ page: {
8813
+ types: [
8814
+ "number"
8815
+ ],
8816
+ description: "Current page number"
8817
+ },
8818
+ pageSize: {
8819
+ types: [
8820
+ "number"
8821
+ ],
8822
+ description: "Number of items per page"
8823
+ },
8824
+ totalCount: {
8825
+ types: [
8826
+ "number"
8827
+ ],
8828
+ description: "Total number of items"
8829
+ },
8830
+ activeFilters: {
8831
+ types: [
8832
+ "object"
8833
+ ],
8834
+ description: "Active filters"
8835
+ },
8836
+ selectedIds: {
8837
+ types: [
8838
+ "array"
8839
+ ],
8840
+ description: "Currently selected item IDs"
8655
8841
  },
8656
8842
  tiles: {
8657
8843
  types: [
8658
8844
  "array"
8659
8845
  ],
8660
- description: "--- Grid data ---"
8846
+ description: "EntityDisplayProps provides: className, isLoading, error, entity,"
8661
8847
  },
8662
8848
  units: {
8663
8849
  types: [
@@ -8699,25 +8885,25 @@ var patterns_registry_default = {
8699
8885
  types: [
8700
8886
  "function"
8701
8887
  ],
8702
- description: "--- Event handlers ---"
8888
+ description: "--- Event handlers (legacy callbacks \u2014 prefer declarative event string props below) ---"
8703
8889
  },
8704
8890
  onUnitClick: {
8705
8891
  types: [
8706
8892
  "function"
8707
8893
  ],
8708
- description: "Unit click handler"
8894
+ description: "eslint-disable-next-line almadar/organism-no-callback-props"
8709
8895
  },
8710
8896
  onTileHover: {
8711
8897
  types: [
8712
8898
  "function"
8713
8899
  ],
8714
- description: "Tile hover handler"
8900
+ description: "eslint-disable-next-line almadar/organism-no-callback-props"
8715
8901
  },
8716
8902
  onTileLeave: {
8717
8903
  types: [
8718
8904
  "function"
8719
8905
  ],
8720
- description: "Tile leave handler"
8906
+ description: "eslint-disable-next-line almadar/organism-no-callback-props"
8721
8907
  },
8722
8908
  tileClickEvent: {
8723
8909
  types: [
@@ -8779,6 +8965,18 @@ var patterns_registry_default = {
8779
8965
  ],
8780
8966
  description: "Extra scale multiplier for unit draw size. 1 = default."
8781
8967
  },
8968
+ boardWidth: {
8969
+ types: [
8970
+ "number"
8971
+ ],
8972
+ description: "Board width in tiles (overrides tile-derived size)"
8973
+ },
8974
+ boardHeight: {
8975
+ types: [
8976
+ "number"
8977
+ ],
8978
+ description: "Board height in tiles (overrides tile-derived size)"
8979
+ },
8782
8980
  diamondTopY: {
8783
8981
  types: [
8784
8982
  "number"
@@ -8819,7 +9017,7 @@ var patterns_registry_default = {
8819
9017
  types: [
8820
9018
  "function"
8821
9019
  ],
8822
- description: "Callback to draw canvas effects after units"
9020
+ description: "Callback to draw canvas effects after units (canvas-specific: cannot be declarative)"
8823
9021
  },
8824
9022
  hasActiveEffects: {
8825
9023
  types: [
@@ -9458,10 +9656,81 @@ var patterns_registry_default = {
9458
9656
  propsSchema: {
9459
9657
  entity: {
9460
9658
  types: [
9461
- "worldmapentity"
9659
+ "string"
9462
9660
  ],
9463
- description: "World map entity data",
9464
- required: true
9661
+ description: "Entity name for schema-driven integration"
9662
+ },
9663
+ data: {
9664
+ types: [
9665
+ "array"
9666
+ ],
9667
+ description: "Data array provided by the trait via render-ui"
9668
+ },
9669
+ className: {
9670
+ types: [
9671
+ "string"
9672
+ ],
9673
+ description: "className prop"
9674
+ },
9675
+ isLoading: {
9676
+ types: [
9677
+ "boolean"
9678
+ ],
9679
+ description: "Loading state indicator"
9680
+ },
9681
+ error: {
9682
+ types: [
9683
+ "object"
9684
+ ],
9685
+ description: "Error state"
9686
+ },
9687
+ sortBy: {
9688
+ types: [
9689
+ "string"
9690
+ ],
9691
+ description: "Current sort field"
9692
+ },
9693
+ sortDirection: {
9694
+ types: [
9695
+ "string"
9696
+ ],
9697
+ description: "Current sort direction"
9698
+ },
9699
+ searchValue: {
9700
+ types: [
9701
+ "string"
9702
+ ],
9703
+ description: "Current search query value"
9704
+ },
9705
+ page: {
9706
+ types: [
9707
+ "number"
9708
+ ],
9709
+ description: "Current page number"
9710
+ },
9711
+ pageSize: {
9712
+ types: [
9713
+ "number"
9714
+ ],
9715
+ description: "Number of items per page"
9716
+ },
9717
+ totalCount: {
9718
+ types: [
9719
+ "number"
9720
+ ],
9721
+ description: "Total number of items"
9722
+ },
9723
+ activeFilters: {
9724
+ types: [
9725
+ "object"
9726
+ ],
9727
+ description: "Active filters"
9728
+ },
9729
+ selectedIds: {
9730
+ types: [
9731
+ "array"
9732
+ ],
9733
+ description: "Currently selected item IDs"
9465
9734
  },
9466
9735
  scale: {
9467
9736
  types: [
@@ -9588,12 +9857,6 @@ var patterns_registry_default = {
9588
9857
  "function"
9589
9858
  ],
9590
9859
  description: "resolveUnitFrame prop"
9591
- },
9592
- className: {
9593
- types: [
9594
- "string"
9595
- ],
9596
- description: "className prop"
9597
9860
  }
9598
9861
  }
9599
9862
  },
@@ -13955,7 +14218,7 @@ var integrators_registry_default = {
13955
14218
  // src/component-mapping.json
13956
14219
  var component_mapping_default = {
13957
14220
  version: "1.0.0",
13958
- exportedAt: "2026-03-03T11:14:06.592Z",
14221
+ exportedAt: "2026-03-05T06:51:24.222Z",
13959
14222
  mappings: {
13960
14223
  "page-header": {
13961
14224
  component: "PageHeader",
@@ -14911,7 +15174,7 @@ var component_mapping_default = {
14911
15174
  // src/event-contracts.json
14912
15175
  var event_contracts_default = {
14913
15176
  version: "1.0.0",
14914
- exportedAt: "2026-03-03T11:14:06.592Z",
15177
+ exportedAt: "2026-03-05T06:51:24.222Z",
14915
15178
  contracts: {
14916
15179
  form: {
14917
15180
  emits: [
@@ -15073,13 +15336,6 @@ var event_contracts_default = {
15073
15336
  type: "object"
15074
15337
  }
15075
15338
  },
15076
- {
15077
- event: "VIEW",
15078
- trigger: "action",
15079
- payload: {
15080
- type: "object"
15081
- }
15082
- },
15083
15339
  {
15084
15340
  event: "NAVIGATE",
15085
15341
  trigger: "action",
@@ -15114,13 +15370,6 @@ var event_contracts_default = {
15114
15370
  payload: {
15115
15371
  type: "object"
15116
15372
  }
15117
- },
15118
- {
15119
- event: "VIEW",
15120
- trigger: "action",
15121
- payload: {
15122
- type: "object"
15123
- }
15124
15373
  }
15125
15374
  ],
15126
15375
  requires: [],
@@ -15450,7 +15699,7 @@ var event_contracts_default = {
15450
15699
  "dashboard-grid": {
15451
15700
  emits: [],
15452
15701
  requires: [],
15453
- entityAware: false
15702
+ entityAware: true
15454
15703
  },
15455
15704
  stats: {
15456
15705
  emits: [],
@@ -15538,19 +15787,25 @@ var event_contracts_default = {
15538
15787
  "dialogue-box": {
15539
15788
  emits: [
15540
15789
  {
15541
- event: "ADVANCE",
15542
- trigger: "click",
15790
+ event: "COMPLETE",
15791
+ trigger: "action",
15543
15792
  payload: {
15544
- type: "void"
15793
+ type: "object"
15545
15794
  }
15546
15795
  },
15547
15796
  {
15548
- event: "CHOOSE",
15549
- trigger: "click",
15797
+ event: "CHOICE",
15798
+ trigger: "action",
15550
15799
  payload: {
15551
- type: "EntityRow"
15552
- },
15553
- optional: true
15800
+ type: "object"
15801
+ }
15802
+ },
15803
+ {
15804
+ event: "ADVANCE",
15805
+ trigger: "action",
15806
+ payload: {
15807
+ type: "object"
15808
+ }
15554
15809
  }
15555
15810
  ],
15556
15811
  requires: [],
@@ -15992,6 +16247,127 @@ var event_contracts_default = {
15992
16247
  ],
15993
16248
  requires: [],
15994
16249
  entityAware: true
16250
+ },
16251
+ "action-buttons": {
16252
+ emits: [
16253
+ {
16254
+ event: "ACTION",
16255
+ trigger: "action",
16256
+ payload: {
16257
+ type: "object"
16258
+ }
16259
+ }
16260
+ ],
16261
+ requires: [],
16262
+ entityAware: false
16263
+ },
16264
+ "d-pad": {
16265
+ emits: [
16266
+ {
16267
+ event: "DIRECTION",
16268
+ trigger: "action",
16269
+ payload: {
16270
+ type: "object"
16271
+ }
16272
+ }
16273
+ ],
16274
+ requires: [],
16275
+ entityAware: false
16276
+ },
16277
+ "isometric-canvas": {
16278
+ emits: [
16279
+ {
16280
+ event: "TILE_CLICK",
16281
+ trigger: "action",
16282
+ payload: {
16283
+ type: "object"
16284
+ }
16285
+ },
16286
+ {
16287
+ event: "UNIT_CLICK",
16288
+ trigger: "action",
16289
+ payload: {
16290
+ type: "object"
16291
+ }
16292
+ },
16293
+ {
16294
+ event: "TILE_HOVER",
16295
+ trigger: "action",
16296
+ payload: {
16297
+ type: "object"
16298
+ }
16299
+ },
16300
+ {
16301
+ event: "TILE_LEAVE",
16302
+ trigger: "action",
16303
+ payload: {
16304
+ type: "object"
16305
+ }
16306
+ }
16307
+ ],
16308
+ requires: [],
16309
+ entityAware: true
16310
+ },
16311
+ "trait-slot": {
16312
+ emits: [
16313
+ {
16314
+ event: "CLICK",
16315
+ trigger: "action",
16316
+ payload: {
16317
+ type: "object"
16318
+ }
16319
+ },
16320
+ {
16321
+ event: "REMOVE",
16322
+ trigger: "action",
16323
+ payload: {
16324
+ type: "object"
16325
+ }
16326
+ }
16327
+ ],
16328
+ requires: [],
16329
+ entityAware: true
16330
+ },
16331
+ "world-map-board": {
16332
+ emits: [
16333
+ {
16334
+ event: "HERO_SELECT",
16335
+ trigger: "action",
16336
+ payload: {
16337
+ type: "object"
16338
+ }
16339
+ },
16340
+ {
16341
+ event: "HERO_MOVE",
16342
+ trigger: "action",
16343
+ payload: {
16344
+ type: "object"
16345
+ }
16346
+ },
16347
+ {
16348
+ event: "BATTLE_ENCOUNTER",
16349
+ trigger: "action",
16350
+ payload: {
16351
+ type: "object"
16352
+ }
16353
+ },
16354
+ {
16355
+ event: "FEATURE_ENTER",
16356
+ trigger: "action",
16357
+ payload: {
16358
+ type: "object"
16359
+ }
16360
+ },
16361
+ {
16362
+ event: "TILE_CLICK",
16363
+ trigger: "action",
16364
+ payload: {
16365
+ type: "object"
16366
+ }
16367
+ }
16368
+ ],
16369
+ requires: [],
16370
+ entityAware: true
15995
16371
  }
15996
16372
  }
15997
16373
  };