@almadar/patterns 2.34.1 → 2.36.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.
- package/dist/component-mapping.json +1 -1
- package/dist/event-contracts.json +1 -1
- package/dist/helpers/pattern-swap.d.ts +25 -0
- package/dist/index.d.ts +329 -136
- package/dist/index.js +339 -163
- package/dist/index.js.map +1 -1
- package/dist/pattern-embeddings.json +227927 -0
- package/dist/patterns-registry.json +298 -160
- package/dist/registry.json +298 -160
- package/dist/types.d.ts +44 -3
- package/package.json +6 -3
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-
|
|
4
|
+
exportedAt: "2026-06-04T18:07:03.548Z",
|
|
5
5
|
patterns: {
|
|
6
6
|
"entity-table": {
|
|
7
7
|
type: "entity-table",
|
|
@@ -20,6 +20,8 @@ var patterns_registry_default = {
|
|
|
20
20
|
"array"
|
|
21
21
|
],
|
|
22
22
|
description: "Entity record or array of records \u2014 pre-resolved by the trait via render-ui after a fetch emit",
|
|
23
|
+
kind: "entity",
|
|
24
|
+
cardinality: "collection",
|
|
23
25
|
items: {
|
|
24
26
|
types: [
|
|
25
27
|
"object"
|
|
@@ -270,7 +272,9 @@ var patterns_registry_default = {
|
|
|
270
272
|
"object",
|
|
271
273
|
"array"
|
|
272
274
|
],
|
|
273
|
-
description: "Entity record or array of records \u2014 pre-resolved by the trait via render-ui after a fetch emit"
|
|
275
|
+
description: "Entity record or array of records \u2014 pre-resolved by the trait via render-ui after a fetch emit",
|
|
276
|
+
kind: "entity",
|
|
277
|
+
cardinality: "collection"
|
|
274
278
|
},
|
|
275
279
|
className: {
|
|
276
280
|
types: [
|
|
@@ -447,7 +451,9 @@ var patterns_registry_default = {
|
|
|
447
451
|
"object",
|
|
448
452
|
"array"
|
|
449
453
|
],
|
|
450
|
-
description: "Entity record or array of records \u2014 pre-resolved by the trait via render-ui after a fetch emit"
|
|
454
|
+
description: "Entity record or array of records \u2014 pre-resolved by the trait via render-ui after a fetch emit",
|
|
455
|
+
kind: "entity",
|
|
456
|
+
cardinality: "collection"
|
|
451
457
|
},
|
|
452
458
|
className: {
|
|
453
459
|
types: [
|
|
@@ -692,10 +698,11 @@ var patterns_registry_default = {
|
|
|
692
698
|
propsSchema: {
|
|
693
699
|
entity: {
|
|
694
700
|
types: [
|
|
695
|
-
"object"
|
|
696
|
-
"array"
|
|
701
|
+
"object"
|
|
697
702
|
],
|
|
698
|
-
description: "
|
|
703
|
+
description: "RECORD-cardinality override: renders ONE record (see body collapse below).",
|
|
704
|
+
kind: "entity",
|
|
705
|
+
cardinality: "record"
|
|
699
706
|
},
|
|
700
707
|
className: {
|
|
701
708
|
types: [
|
|
@@ -4054,6 +4061,8 @@ var patterns_registry_default = {
|
|
|
4054
4061
|
"array"
|
|
4055
4062
|
],
|
|
4056
4063
|
description: "Entity record or array of records \u2014 pre-resolved by the trait via render-ui after a fetch emit",
|
|
4064
|
+
kind: "entity",
|
|
4065
|
+
cardinality: "collection",
|
|
4057
4066
|
items: {
|
|
4058
4067
|
types: [
|
|
4059
4068
|
"object"
|
|
@@ -9184,6 +9193,8 @@ var patterns_registry_default = {
|
|
|
9184
9193
|
"array"
|
|
9185
9194
|
],
|
|
9186
9195
|
description: "Entity record or array of records \u2014 pre-resolved by the trait via render-ui after a fetch emit",
|
|
9196
|
+
kind: "entity",
|
|
9197
|
+
cardinality: "collection",
|
|
9187
9198
|
items: {
|
|
9188
9199
|
types: [
|
|
9189
9200
|
"object"
|
|
@@ -10514,7 +10525,14 @@ var patterns_registry_default = {
|
|
|
10514
10525
|
"object",
|
|
10515
10526
|
"array"
|
|
10516
10527
|
],
|
|
10517
|
-
description: "Schema entity data typed against @almadar/core's EntityRow. Items from `entity` are normalised into `items` when `items` is omitted. UI-specific TimelineItem fields (`icon`, callbacks) cannot round-trip through the event bus, so decorative stories that need them pass `items` directly."
|
|
10528
|
+
description: "Schema entity data typed against @almadar/core's EntityRow. Items from `entity` are normalised into `items` when `items` is omitted. UI-specific TimelineItem fields (`icon`, callbacks) cannot round-trip through the event bus, so decorative stories that need them pass `items` directly.",
|
|
10529
|
+
kind: "entity",
|
|
10530
|
+
cardinality: "collection",
|
|
10531
|
+
items: {
|
|
10532
|
+
types: [
|
|
10533
|
+
"object"
|
|
10534
|
+
]
|
|
10535
|
+
}
|
|
10518
10536
|
},
|
|
10519
10537
|
title: {
|
|
10520
10538
|
types: [
|
|
@@ -10673,6 +10691,8 @@ var patterns_registry_default = {
|
|
|
10673
10691
|
"array"
|
|
10674
10692
|
],
|
|
10675
10693
|
description: "Entity record or array of records \u2014 pre-resolved by the trait via render-ui after a fetch emit",
|
|
10694
|
+
kind: "entity",
|
|
10695
|
+
cardinality: "collection",
|
|
10676
10696
|
items: {
|
|
10677
10697
|
types: [
|
|
10678
10698
|
"object"
|
|
@@ -11960,7 +11980,9 @@ var patterns_registry_default = {
|
|
|
11960
11980
|
"object",
|
|
11961
11981
|
"array"
|
|
11962
11982
|
],
|
|
11963
|
-
description: "Entity record or array of records \u2014 pre-resolved by the trait via render-ui after a fetch emit"
|
|
11983
|
+
description: "Entity record or array of records \u2014 pre-resolved by the trait via render-ui after a fetch emit",
|
|
11984
|
+
kind: "entity",
|
|
11985
|
+
cardinality: "collection"
|
|
11964
11986
|
},
|
|
11965
11987
|
className: {
|
|
11966
11988
|
types: [
|
|
@@ -12385,9 +12407,12 @@ var patterns_registry_default = {
|
|
|
12385
12407
|
},
|
|
12386
12408
|
events: {
|
|
12387
12409
|
types: [
|
|
12410
|
+
"object",
|
|
12388
12411
|
"array"
|
|
12389
12412
|
],
|
|
12390
12413
|
description: "Events to display on the grid",
|
|
12414
|
+
kind: "entity",
|
|
12415
|
+
cardinality: "collection",
|
|
12391
12416
|
items: {
|
|
12392
12417
|
types: [
|
|
12393
12418
|
"object"
|
|
@@ -13097,8 +13122,15 @@ var patterns_registry_default = {
|
|
|
13097
13122
|
"object",
|
|
13098
13123
|
"array"
|
|
13099
13124
|
],
|
|
13100
|
-
description: "Schema entity data \u2014 single record or collection, typed against `@almadar/core`'s `EntityRow` so the narrow type declared on the emitting trait's `Event { data : [X] }` flows through to the prop without widening. The generic `T` lets consumers pass a narrower entity (e.g. `CartItem`) and have the `children` render function receive cards typed to that exact shape.",
|
|
13101
|
-
required: true
|
|
13125
|
+
description: "Schema entity data \u2014 single record or collection, typed against `@almadar/core`'s `EntityRow` so the narrow type declared on the emitting trait's `Event { data : [X] }` flows through to the prop without widening. The generic `T` lets consumers pass a narrower entity (e.g. `CartItem`) and have the `children` render function receive cards typed to that exact shape. Declared as the pattern's data INLET via `EntityCollection<T>` (the inlet half of the circuit, symmetric with the `EventKey` outlet props below): pattern-sync tags it `kind:\"entity\", cardinality:\"collection\"` so consumers bind the domain entity without name-matching the prop. Structurally still `T | readonly T[]` \u2014 see the brand's doc.",
|
|
13126
|
+
required: true,
|
|
13127
|
+
kind: "entity",
|
|
13128
|
+
cardinality: "collection",
|
|
13129
|
+
items: {
|
|
13130
|
+
types: [
|
|
13131
|
+
"object"
|
|
13132
|
+
]
|
|
13133
|
+
}
|
|
13102
13134
|
},
|
|
13103
13135
|
fields: {
|
|
13104
13136
|
types: [
|
|
@@ -13491,7 +13523,14 @@ var patterns_registry_default = {
|
|
|
13491
13523
|
"array"
|
|
13492
13524
|
],
|
|
13493
13525
|
description: "Schema entity data \u2014 single record or collection, typed against `@almadar/core`'s `EntityRow` so the narrow type declared on the emitting trait's `Event { data : [X] }` flows through to the prop without widening. The generic `T` lets consumers pass a narrower entity (e.g. `CartItem`) and have the `children` render function receive items of that exact shape.",
|
|
13494
|
-
required: true
|
|
13526
|
+
required: true,
|
|
13527
|
+
kind: "entity",
|
|
13528
|
+
cardinality: "collection",
|
|
13529
|
+
items: {
|
|
13530
|
+
types: [
|
|
13531
|
+
"object"
|
|
13532
|
+
]
|
|
13533
|
+
}
|
|
13495
13534
|
},
|
|
13496
13535
|
fields: {
|
|
13497
13536
|
types: [
|
|
@@ -15114,10 +15153,13 @@ var patterns_registry_default = {
|
|
|
15114
15153
|
propsSchema: {
|
|
15115
15154
|
items: {
|
|
15116
15155
|
types: [
|
|
15156
|
+
"object",
|
|
15117
15157
|
"array"
|
|
15118
15158
|
],
|
|
15119
15159
|
description: "items prop",
|
|
15120
15160
|
required: true,
|
|
15161
|
+
kind: "entity",
|
|
15162
|
+
cardinality: "collection",
|
|
15121
15163
|
items: {
|
|
15122
15164
|
types: [
|
|
15123
15165
|
"object"
|
|
@@ -16760,6 +16802,8 @@ var patterns_registry_default = {
|
|
|
16760
16802
|
"array"
|
|
16761
16803
|
],
|
|
16762
16804
|
description: "Entity record or array of records \u2014 pre-resolved by the trait via render-ui after a fetch emit",
|
|
16805
|
+
kind: "entity",
|
|
16806
|
+
cardinality: "collection",
|
|
16763
16807
|
items: {
|
|
16764
16808
|
types: [
|
|
16765
16809
|
"object"
|
|
@@ -16909,6 +16953,8 @@ var patterns_registry_default = {
|
|
|
16909
16953
|
"array"
|
|
16910
16954
|
],
|
|
16911
16955
|
description: "Entity record or array of records \u2014 pre-resolved by the trait via render-ui after a fetch emit",
|
|
16956
|
+
kind: "entity",
|
|
16957
|
+
cardinality: "collection",
|
|
16912
16958
|
items: {
|
|
16913
16959
|
types: [
|
|
16914
16960
|
"object"
|
|
@@ -17053,155 +17099,151 @@ var patterns_registry_default = {
|
|
|
17053
17099
|
propsSchema: {
|
|
17054
17100
|
entity: {
|
|
17055
17101
|
types: [
|
|
17056
|
-
"object"
|
|
17057
|
-
"array"
|
|
17102
|
+
"object"
|
|
17058
17103
|
],
|
|
17059
|
-
description: "
|
|
17060
|
-
|
|
17061
|
-
|
|
17062
|
-
|
|
17063
|
-
|
|
17064
|
-
|
|
17065
|
-
|
|
17066
|
-
|
|
17067
|
-
|
|
17068
|
-
|
|
17069
|
-
|
|
17070
|
-
|
|
17071
|
-
|
|
17072
|
-
|
|
17073
|
-
|
|
17074
|
-
|
|
17075
|
-
|
|
17076
|
-
|
|
17077
|
-
|
|
17078
|
-
|
|
17079
|
-
|
|
17080
|
-
|
|
17081
|
-
|
|
17082
|
-
|
|
17083
|
-
|
|
17084
|
-
|
|
17085
|
-
|
|
17086
|
-
|
|
17087
|
-
|
|
17088
|
-
|
|
17089
|
-
|
|
17090
|
-
|
|
17091
|
-
|
|
17092
|
-
|
|
17093
|
-
|
|
17094
|
-
|
|
17095
|
-
|
|
17096
|
-
|
|
17097
|
-
"string"
|
|
17098
|
-
]
|
|
17099
|
-
},
|
|
17100
|
-
href: {
|
|
17101
|
-
types: [
|
|
17102
|
-
"string"
|
|
17103
|
-
]
|
|
17104
|
-
},
|
|
17105
|
-
variant: {
|
|
17106
|
-
types: [
|
|
17107
|
-
"string"
|
|
17108
|
-
],
|
|
17109
|
-
enumValues: [
|
|
17110
|
-
"primary",
|
|
17111
|
-
"secondary",
|
|
17112
|
-
"ghost"
|
|
17113
|
-
]
|
|
17114
|
-
}
|
|
17104
|
+
description: "entity prop",
|
|
17105
|
+
kind: "entity",
|
|
17106
|
+
cardinality: "record",
|
|
17107
|
+
properties: {
|
|
17108
|
+
id: {
|
|
17109
|
+
types: [
|
|
17110
|
+
"string"
|
|
17111
|
+
]
|
|
17112
|
+
},
|
|
17113
|
+
tag: {
|
|
17114
|
+
types: [
|
|
17115
|
+
"string"
|
|
17116
|
+
]
|
|
17117
|
+
},
|
|
17118
|
+
title: {
|
|
17119
|
+
types: [
|
|
17120
|
+
"string"
|
|
17121
|
+
]
|
|
17122
|
+
},
|
|
17123
|
+
titleAccent: {
|
|
17124
|
+
types: [
|
|
17125
|
+
"string"
|
|
17126
|
+
]
|
|
17127
|
+
},
|
|
17128
|
+
subtitle: {
|
|
17129
|
+
types: [
|
|
17130
|
+
"string"
|
|
17131
|
+
]
|
|
17132
|
+
},
|
|
17133
|
+
primaryAction: {
|
|
17134
|
+
types: [
|
|
17135
|
+
"object"
|
|
17136
|
+
],
|
|
17137
|
+
properties: {
|
|
17138
|
+
label: {
|
|
17139
|
+
types: [
|
|
17140
|
+
"string"
|
|
17141
|
+
]
|
|
17115
17142
|
},
|
|
17116
|
-
|
|
17117
|
-
|
|
17118
|
-
|
|
17119
|
-
|
|
17120
|
-
},
|
|
17121
|
-
secondaryAction: {
|
|
17122
|
-
types: [
|
|
17123
|
-
"object"
|
|
17124
|
-
],
|
|
17125
|
-
properties: {
|
|
17126
|
-
label: {
|
|
17127
|
-
types: [
|
|
17128
|
-
"string"
|
|
17129
|
-
]
|
|
17130
|
-
},
|
|
17131
|
-
href: {
|
|
17132
|
-
types: [
|
|
17133
|
-
"string"
|
|
17134
|
-
]
|
|
17135
|
-
},
|
|
17136
|
-
variant: {
|
|
17137
|
-
types: [
|
|
17138
|
-
"string"
|
|
17139
|
-
],
|
|
17140
|
-
enumValues: [
|
|
17141
|
-
"primary",
|
|
17142
|
-
"secondary",
|
|
17143
|
-
"ghost"
|
|
17144
|
-
]
|
|
17145
|
-
}
|
|
17143
|
+
href: {
|
|
17144
|
+
types: [
|
|
17145
|
+
"string"
|
|
17146
|
+
]
|
|
17146
17147
|
},
|
|
17147
|
-
|
|
17148
|
-
|
|
17149
|
-
|
|
17150
|
-
|
|
17151
|
-
|
|
17152
|
-
|
|
17153
|
-
|
|
17154
|
-
|
|
17155
|
-
|
|
17148
|
+
variant: {
|
|
17149
|
+
types: [
|
|
17150
|
+
"string"
|
|
17151
|
+
],
|
|
17152
|
+
enumValues: [
|
|
17153
|
+
"primary",
|
|
17154
|
+
"secondary",
|
|
17155
|
+
"ghost"
|
|
17156
|
+
]
|
|
17157
|
+
}
|
|
17156
17158
|
},
|
|
17157
|
-
|
|
17158
|
-
|
|
17159
|
-
|
|
17160
|
-
|
|
17161
|
-
|
|
17162
|
-
|
|
17163
|
-
|
|
17164
|
-
|
|
17165
|
-
|
|
17166
|
-
|
|
17167
|
-
|
|
17168
|
-
|
|
17169
|
-
|
|
17170
|
-
|
|
17171
|
-
}
|
|
17159
|
+
required: [
|
|
17160
|
+
"label",
|
|
17161
|
+
"href"
|
|
17162
|
+
]
|
|
17163
|
+
},
|
|
17164
|
+
secondaryAction: {
|
|
17165
|
+
types: [
|
|
17166
|
+
"object"
|
|
17167
|
+
],
|
|
17168
|
+
properties: {
|
|
17169
|
+
label: {
|
|
17170
|
+
types: [
|
|
17171
|
+
"string"
|
|
17172
|
+
]
|
|
17172
17173
|
},
|
|
17173
|
-
|
|
17174
|
-
|
|
17175
|
-
|
|
17176
|
-
|
|
17174
|
+
href: {
|
|
17175
|
+
types: [
|
|
17176
|
+
"string"
|
|
17177
|
+
]
|
|
17178
|
+
},
|
|
17179
|
+
variant: {
|
|
17180
|
+
types: [
|
|
17181
|
+
"string"
|
|
17182
|
+
],
|
|
17183
|
+
enumValues: [
|
|
17184
|
+
"primary",
|
|
17185
|
+
"secondary",
|
|
17186
|
+
"ghost"
|
|
17187
|
+
]
|
|
17188
|
+
}
|
|
17177
17189
|
},
|
|
17178
|
-
|
|
17179
|
-
|
|
17180
|
-
|
|
17181
|
-
|
|
17182
|
-
|
|
17183
|
-
|
|
17184
|
-
|
|
17185
|
-
|
|
17186
|
-
|
|
17190
|
+
required: [
|
|
17191
|
+
"label",
|
|
17192
|
+
"href"
|
|
17193
|
+
]
|
|
17194
|
+
},
|
|
17195
|
+
installCommand: {
|
|
17196
|
+
types: [
|
|
17197
|
+
"string"
|
|
17198
|
+
]
|
|
17199
|
+
},
|
|
17200
|
+
image: {
|
|
17201
|
+
types: [
|
|
17202
|
+
"object"
|
|
17203
|
+
],
|
|
17204
|
+
properties: {
|
|
17205
|
+
src: {
|
|
17206
|
+
types: [
|
|
17207
|
+
"string"
|
|
17208
|
+
]
|
|
17209
|
+
},
|
|
17210
|
+
alt: {
|
|
17211
|
+
types: [
|
|
17212
|
+
"string"
|
|
17213
|
+
]
|
|
17214
|
+
}
|
|
17187
17215
|
},
|
|
17188
|
-
|
|
17189
|
-
|
|
17190
|
-
|
|
17191
|
-
|
|
17192
|
-
enumValues: [
|
|
17193
|
-
"dark",
|
|
17194
|
-
"gradient",
|
|
17195
|
-
"subtle"
|
|
17196
|
-
]
|
|
17197
|
-
}
|
|
17216
|
+
required: [
|
|
17217
|
+
"src",
|
|
17218
|
+
"alt"
|
|
17219
|
+
]
|
|
17198
17220
|
},
|
|
17199
|
-
|
|
17200
|
-
|
|
17201
|
-
|
|
17202
|
-
|
|
17203
|
-
|
|
17204
|
-
|
|
17221
|
+
imagePosition: {
|
|
17222
|
+
types: [
|
|
17223
|
+
"string"
|
|
17224
|
+
],
|
|
17225
|
+
enumValues: [
|
|
17226
|
+
"below",
|
|
17227
|
+
"right",
|
|
17228
|
+
"background"
|
|
17229
|
+
]
|
|
17230
|
+
},
|
|
17231
|
+
background: {
|
|
17232
|
+
types: [
|
|
17233
|
+
"string"
|
|
17234
|
+
],
|
|
17235
|
+
enumValues: [
|
|
17236
|
+
"dark",
|
|
17237
|
+
"gradient",
|
|
17238
|
+
"subtle"
|
|
17239
|
+
]
|
|
17240
|
+
}
|
|
17241
|
+
},
|
|
17242
|
+
propertyRequired: [
|
|
17243
|
+
"id",
|
|
17244
|
+
"title",
|
|
17245
|
+
"subtitle"
|
|
17246
|
+
]
|
|
17205
17247
|
},
|
|
17206
17248
|
className: {
|
|
17207
17249
|
types: [
|
|
@@ -17295,6 +17337,8 @@ var patterns_registry_default = {
|
|
|
17295
17337
|
"array"
|
|
17296
17338
|
],
|
|
17297
17339
|
description: "Entity record or array of records \u2014 pre-resolved by the trait via render-ui after a fetch emit",
|
|
17340
|
+
kind: "entity",
|
|
17341
|
+
cardinality: "collection",
|
|
17298
17342
|
items: {
|
|
17299
17343
|
types: [
|
|
17300
17344
|
"object"
|
|
@@ -17459,6 +17503,8 @@ var patterns_registry_default = {
|
|
|
17459
17503
|
"array"
|
|
17460
17504
|
],
|
|
17461
17505
|
description: "Entity record or array of records \u2014 pre-resolved by the trait via render-ui after a fetch emit",
|
|
17506
|
+
kind: "entity",
|
|
17507
|
+
cardinality: "collection",
|
|
17462
17508
|
items: {
|
|
17463
17509
|
types: [
|
|
17464
17510
|
"object"
|
|
@@ -17628,6 +17674,8 @@ var patterns_registry_default = {
|
|
|
17628
17674
|
"array"
|
|
17629
17675
|
],
|
|
17630
17676
|
description: "Entity record or array of records \u2014 pre-resolved by the trait via render-ui after a fetch emit",
|
|
17677
|
+
kind: "entity",
|
|
17678
|
+
cardinality: "collection",
|
|
17631
17679
|
items: {
|
|
17632
17680
|
types: [
|
|
17633
17681
|
"object"
|
|
@@ -17750,6 +17798,8 @@ var patterns_registry_default = {
|
|
|
17750
17798
|
"array"
|
|
17751
17799
|
],
|
|
17752
17800
|
description: "Entity record or array of records \u2014 pre-resolved by the trait via render-ui after a fetch emit",
|
|
17801
|
+
kind: "entity",
|
|
17802
|
+
cardinality: "collection",
|
|
17753
17803
|
items: {
|
|
17754
17804
|
types: [
|
|
17755
17805
|
"object"
|
|
@@ -17904,6 +17954,8 @@ var patterns_registry_default = {
|
|
|
17904
17954
|
"array"
|
|
17905
17955
|
],
|
|
17906
17956
|
description: "Entity record or array of records \u2014 pre-resolved by the trait via render-ui after a fetch emit",
|
|
17957
|
+
kind: "entity",
|
|
17958
|
+
cardinality: "collection",
|
|
17907
17959
|
items: {
|
|
17908
17960
|
types: [
|
|
17909
17961
|
"object"
|
|
@@ -19509,10 +19561,13 @@ var patterns_registry_default = {
|
|
|
19509
19561
|
propsSchema: {
|
|
19510
19562
|
nodes: {
|
|
19511
19563
|
types: [
|
|
19564
|
+
"object",
|
|
19512
19565
|
"array"
|
|
19513
19566
|
],
|
|
19514
19567
|
description: "nodes prop",
|
|
19515
19568
|
required: true,
|
|
19569
|
+
kind: "entity",
|
|
19570
|
+
cardinality: "collection",
|
|
19516
19571
|
items: {
|
|
19517
19572
|
types: [
|
|
19518
19573
|
"object"
|
|
@@ -20089,11 +20144,84 @@ var patterns_registry_default = {
|
|
|
20089
20144
|
propsSchema: {
|
|
20090
20145
|
items: {
|
|
20091
20146
|
types: [
|
|
20092
|
-
"
|
|
20093
|
-
"
|
|
20147
|
+
"object",
|
|
20148
|
+
"array"
|
|
20094
20149
|
],
|
|
20095
20150
|
description: "Items to render. Accepts either a typed array (direct consumers) or the runtime payload shape from a render-ui binding (`@payload.data`). The molecule narrows non-array values to `[]` and validates element shape at render time via the `id` / `x` / `y` guards.",
|
|
20096
|
-
required: true
|
|
20151
|
+
required: true,
|
|
20152
|
+
kind: "entity",
|
|
20153
|
+
cardinality: "collection",
|
|
20154
|
+
items: {
|
|
20155
|
+
types: [
|
|
20156
|
+
"object"
|
|
20157
|
+
],
|
|
20158
|
+
properties: {
|
|
20159
|
+
id: {
|
|
20160
|
+
types: [
|
|
20161
|
+
"string"
|
|
20162
|
+
]
|
|
20163
|
+
},
|
|
20164
|
+
label: {
|
|
20165
|
+
types: [
|
|
20166
|
+
"string"
|
|
20167
|
+
]
|
|
20168
|
+
},
|
|
20169
|
+
x: {
|
|
20170
|
+
types: [
|
|
20171
|
+
"number"
|
|
20172
|
+
]
|
|
20173
|
+
},
|
|
20174
|
+
y: {
|
|
20175
|
+
types: [
|
|
20176
|
+
"number"
|
|
20177
|
+
]
|
|
20178
|
+
},
|
|
20179
|
+
shape: {
|
|
20180
|
+
types: [
|
|
20181
|
+
"string"
|
|
20182
|
+
],
|
|
20183
|
+
enumValues: [
|
|
20184
|
+
"round",
|
|
20185
|
+
"rectangle",
|
|
20186
|
+
"square"
|
|
20187
|
+
]
|
|
20188
|
+
},
|
|
20189
|
+
capacity: {
|
|
20190
|
+
types: [
|
|
20191
|
+
"number"
|
|
20192
|
+
]
|
|
20193
|
+
},
|
|
20194
|
+
status: {
|
|
20195
|
+
types: [
|
|
20196
|
+
"string"
|
|
20197
|
+
],
|
|
20198
|
+
enumValues: [
|
|
20199
|
+
"empty",
|
|
20200
|
+
"seated",
|
|
20201
|
+
"ordered",
|
|
20202
|
+
"awaiting-bill",
|
|
20203
|
+
"cleaning"
|
|
20204
|
+
]
|
|
20205
|
+
},
|
|
20206
|
+
partySize: {
|
|
20207
|
+
types: [
|
|
20208
|
+
"number"
|
|
20209
|
+
]
|
|
20210
|
+
},
|
|
20211
|
+
serverName: {
|
|
20212
|
+
types: [
|
|
20213
|
+
"string"
|
|
20214
|
+
]
|
|
20215
|
+
}
|
|
20216
|
+
},
|
|
20217
|
+
required: [
|
|
20218
|
+
"id",
|
|
20219
|
+
"label",
|
|
20220
|
+
"x",
|
|
20221
|
+
"y",
|
|
20222
|
+
"capacity"
|
|
20223
|
+
]
|
|
20224
|
+
}
|
|
20097
20225
|
},
|
|
20098
20226
|
width: {
|
|
20099
20227
|
types: [
|
|
@@ -26154,10 +26282,11 @@ var patterns_registry_default = {
|
|
|
26154
26282
|
propsSchema: {
|
|
26155
26283
|
entity: {
|
|
26156
26284
|
types: [
|
|
26157
|
-
"object"
|
|
26158
|
-
"array"
|
|
26285
|
+
"object"
|
|
26159
26286
|
],
|
|
26160
|
-
description: "
|
|
26287
|
+
description: "Renders ONE record (the book), not a collection",
|
|
26288
|
+
kind: "entity",
|
|
26289
|
+
cardinality: "record"
|
|
26161
26290
|
},
|
|
26162
26291
|
className: {
|
|
26163
26292
|
types: [
|
|
@@ -31467,7 +31596,9 @@ var patterns_registry_default = {
|
|
|
31467
31596
|
"object",
|
|
31468
31597
|
"array"
|
|
31469
31598
|
],
|
|
31470
|
-
description: "Entity record or array of records \u2014 pre-resolved by the trait via render-ui after a fetch emit"
|
|
31599
|
+
description: "Entity record or array of records \u2014 pre-resolved by the trait via render-ui after a fetch emit",
|
|
31600
|
+
kind: "entity",
|
|
31601
|
+
cardinality: "collection"
|
|
31471
31602
|
},
|
|
31472
31603
|
className: {
|
|
31473
31604
|
types: [
|
|
@@ -32313,7 +32444,14 @@ var patterns_registry_default = {
|
|
|
32313
32444
|
"array"
|
|
32314
32445
|
],
|
|
32315
32446
|
description: "Schema entity data \u2014 single record or collection.",
|
|
32316
|
-
required: true
|
|
32447
|
+
required: true,
|
|
32448
|
+
kind: "entity",
|
|
32449
|
+
cardinality: "collection",
|
|
32450
|
+
items: {
|
|
32451
|
+
types: [
|
|
32452
|
+
"object"
|
|
32453
|
+
]
|
|
32454
|
+
}
|
|
32317
32455
|
},
|
|
32318
32456
|
columns: {
|
|
32319
32457
|
types: [
|
|
@@ -33615,7 +33753,7 @@ var integrators_registry_default = {
|
|
|
33615
33753
|
// src/component-mapping.json
|
|
33616
33754
|
var component_mapping_default = {
|
|
33617
33755
|
version: "1.0.0",
|
|
33618
|
-
exportedAt: "2026-
|
|
33756
|
+
exportedAt: "2026-06-04T18:07:03.548Z",
|
|
33619
33757
|
mappings: {
|
|
33620
33758
|
"page-header": {
|
|
33621
33759
|
component: "PageHeader",
|
|
@@ -35155,7 +35293,7 @@ var component_mapping_default = {
|
|
|
35155
35293
|
// src/event-contracts.json
|
|
35156
35294
|
var event_contracts_default = {
|
|
35157
35295
|
version: "1.0.0",
|
|
35158
|
-
exportedAt: "2026-
|
|
35296
|
+
exportedAt: "2026-06-04T18:07:03.548Z",
|
|
35159
35297
|
contracts: {
|
|
35160
35298
|
form: {
|
|
35161
35299
|
emits: [
|
|
@@ -37045,6 +37183,44 @@ function formatRecommendationsForPrompt(recommendations) {
|
|
|
37045
37183
|
return lines.join("\n");
|
|
37046
37184
|
}
|
|
37047
37185
|
|
|
37186
|
+
// src/helpers/pattern-swap.ts
|
|
37187
|
+
var PATTERNS = patterns_registry_default;
|
|
37188
|
+
var CONTRACTS = event_contracts_default;
|
|
37189
|
+
function entityInlet(patternType) {
|
|
37190
|
+
const propsSchema = PATTERNS.patterns?.[patternType]?.propsSchema;
|
|
37191
|
+
if (!propsSchema) return null;
|
|
37192
|
+
for (const prop of Object.values(propsSchema)) {
|
|
37193
|
+
if (prop.kind === "entity") return prop;
|
|
37194
|
+
}
|
|
37195
|
+
return propsSchema["entity"] ?? null;
|
|
37196
|
+
}
|
|
37197
|
+
function getEntityCardinality(patternType) {
|
|
37198
|
+
return entityInlet(patternType)?.cardinality ?? null;
|
|
37199
|
+
}
|
|
37200
|
+
function getEmittedEvents(patternType) {
|
|
37201
|
+
const emits = CONTRACTS.contracts?.[patternType]?.emits ?? [];
|
|
37202
|
+
const out = [];
|
|
37203
|
+
for (const e of emits) {
|
|
37204
|
+
if (typeof e.event === "string") out.push(e.event);
|
|
37205
|
+
}
|
|
37206
|
+
return out;
|
|
37207
|
+
}
|
|
37208
|
+
function findCompatiblePatterns(currentType, gate = {}) {
|
|
37209
|
+
const cardinality = getEntityCardinality(currentType);
|
|
37210
|
+
const required = gate.requiredEmits ?? [];
|
|
37211
|
+
const result = [];
|
|
37212
|
+
for (const type of Object.keys(PATTERNS.patterns ?? {})) {
|
|
37213
|
+
if (type === currentType) continue;
|
|
37214
|
+
if (getEntityCardinality(type) !== cardinality) continue;
|
|
37215
|
+
if (required.length > 0) {
|
|
37216
|
+
const emits = new Set(getEmittedEvents(type));
|
|
37217
|
+
if (!required.every((ev) => emits.has(ev))) continue;
|
|
37218
|
+
}
|
|
37219
|
+
result.push(type);
|
|
37220
|
+
}
|
|
37221
|
+
return result;
|
|
37222
|
+
}
|
|
37223
|
+
|
|
37048
37224
|
// src/index.ts
|
|
37049
37225
|
var registry = patterns_registry_default;
|
|
37050
37226
|
var PATTERN_REGISTRY = patterns_registry_default;
|
|
@@ -37067,6 +37243,6 @@ function isEntityAwarePattern(patternType) {
|
|
|
37067
37243
|
return "entity" in propsSchema;
|
|
37068
37244
|
}
|
|
37069
37245
|
|
|
37070
|
-
export { COMPONENT_MAPPING, EVENT_CONTRACTS, INTEGRATORS_REGISTRY, PATTERN_REGISTRY, PATTERN_TYPES, buildRecommendationContext, component_mapping_default as componentMapping, event_contracts_default as eventContracts, formatRecommendationsForPrompt, generatePatternDescription, getAllPatternTypes, getComponentForPattern, getOrbAllowedPatterns, getOrbAllowedPatternsCompact, getOrbAllowedPatternsFiltered, getOrbAllowedPatternsSlim, getPatternActionsRef, getPatternDefinition, getPatternMetadata, getPatternPropsCompact, getPatternsGroupedByCategory, integrators_registry_default as integratorsRegistry, isEntityAwarePattern, isValidPatternType, patterns_registry_default as patternsRegistry, recommendPatterns, registry };
|
|
37246
|
+
export { COMPONENT_MAPPING, EVENT_CONTRACTS, INTEGRATORS_REGISTRY, PATTERN_REGISTRY, PATTERN_TYPES, buildRecommendationContext, component_mapping_default as componentMapping, event_contracts_default as eventContracts, findCompatiblePatterns, formatRecommendationsForPrompt, generatePatternDescription, getAllPatternTypes, getComponentForPattern, getEmittedEvents, getEntityCardinality, getOrbAllowedPatterns, getOrbAllowedPatternsCompact, getOrbAllowedPatternsFiltered, getOrbAllowedPatternsSlim, getPatternActionsRef, getPatternDefinition, getPatternMetadata, getPatternPropsCompact, getPatternsGroupedByCategory, integrators_registry_default as integratorsRegistry, isEntityAwarePattern, isValidPatternType, patterns_registry_default as patternsRegistry, recommendPatterns, registry };
|
|
37071
37247
|
//# sourceMappingURL=index.js.map
|
|
37072
37248
|
//# sourceMappingURL=index.js.map
|