@almadar/patterns 2.20.0 → 2.20.2
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/index.d.ts +17 -5
- package/dist/index.js +20 -9
- package/dist/index.js.map +1 -1
- package/dist/patterns-registry.json +18 -7
- package/dist/registry.json +18 -7
- package/dist/types.d.ts +40 -1
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": "1.0.0",
|
|
3
|
-
"exportedAt": "2026-05-
|
|
3
|
+
"exportedAt": "2026-05-04T08:21:23.048Z",
|
|
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": [
|
|
@@ -14711,8 +14712,13 @@
|
|
|
14711
14712
|
"types": [
|
|
14712
14713
|
"array"
|
|
14713
14714
|
],
|
|
14714
|
-
"description": "Field definitions for rendering each card"
|
|
14715
|
-
|
|
14715
|
+
"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."
|
|
14716
|
+
},
|
|
14717
|
+
"columns": {
|
|
14718
|
+
"types": [
|
|
14719
|
+
"array"
|
|
14720
|
+
],
|
|
14721
|
+
"description": "Alias for `fields` — the compiler emits `columns` for field defs."
|
|
14716
14722
|
},
|
|
14717
14723
|
"itemActions": {
|
|
14718
14724
|
"types": [
|
|
@@ -14868,8 +14874,13 @@
|
|
|
14868
14874
|
"types": [
|
|
14869
14875
|
"array"
|
|
14870
14876
|
],
|
|
14871
|
-
"description": "Field definitions for rendering each row"
|
|
14872
|
-
|
|
14877
|
+
"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."
|
|
14878
|
+
},
|
|
14879
|
+
"columns": {
|
|
14880
|
+
"types": [
|
|
14881
|
+
"array"
|
|
14882
|
+
],
|
|
14883
|
+
"description": "Alias for `fields` — the compiler emits `columns` for field defs."
|
|
14873
14884
|
},
|
|
14874
14885
|
"itemActions": {
|
|
14875
14886
|
"types": [
|
package/dist/registry.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": "1.0.0",
|
|
3
|
-
"exportedAt": "2026-05-
|
|
3
|
+
"exportedAt": "2026-05-04T08:21:23.048Z",
|
|
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": [
|
|
@@ -14711,8 +14712,13 @@
|
|
|
14711
14712
|
"types": [
|
|
14712
14713
|
"array"
|
|
14713
14714
|
],
|
|
14714
|
-
"description": "Field definitions for rendering each card"
|
|
14715
|
-
|
|
14715
|
+
"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."
|
|
14716
|
+
},
|
|
14717
|
+
"columns": {
|
|
14718
|
+
"types": [
|
|
14719
|
+
"array"
|
|
14720
|
+
],
|
|
14721
|
+
"description": "Alias for `fields` — the compiler emits `columns` for field defs."
|
|
14716
14722
|
},
|
|
14717
14723
|
"itemActions": {
|
|
14718
14724
|
"types": [
|
|
@@ -14868,8 +14874,13 @@
|
|
|
14868
14874
|
"types": [
|
|
14869
14875
|
"array"
|
|
14870
14876
|
],
|
|
14871
|
-
"description": "Field definitions for rendering each row"
|
|
14872
|
-
|
|
14877
|
+
"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."
|
|
14878
|
+
},
|
|
14879
|
+
"columns": {
|
|
14880
|
+
"types": [
|
|
14881
|
+
"array"
|
|
14882
|
+
],
|
|
14883
|
+
"description": "Alias for `fields` — the compiler emits `columns` for field defs."
|
|
14873
14884
|
},
|
|
14874
14885
|
"itemActions": {
|
|
14875
14886
|
"types": [
|
package/dist/types.d.ts
CHANGED
|
@@ -28,7 +28,28 @@
|
|
|
28
28
|
* Reserved for future use: `"entity"`, `"config-binding"`. Add here
|
|
29
29
|
* rather than inventing per-consumer markers.
|
|
30
30
|
*/
|
|
31
|
-
export type PropKind = 'event' | 'event-list';
|
|
31
|
+
export type PropKind = 'event' | 'event-ref' | 'event-listen' | 'event-list' | 'callback';
|
|
32
|
+
/**
|
|
33
|
+
* One field of an emit/listen payload schema, mirrored into the registry
|
|
34
|
+
* by pattern-sync from a component's `EventEmit<P>` / `EventListen<P>`
|
|
35
|
+
* brand. Validator (L2.2) compares this against the trait's declared
|
|
36
|
+
* `emits { EVENT { ... } }` / `listens` payload shape.
|
|
37
|
+
*/
|
|
38
|
+
export interface PatternPayloadField {
|
|
39
|
+
name: string;
|
|
40
|
+
type: string;
|
|
41
|
+
required?: boolean;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* One positional parameter of a React callback prop. Validator (L2.2)
|
|
45
|
+
* uses the names to verify name-and-type parity with the trait's declared
|
|
46
|
+
* event payload; codegen (C2) uses the same names to wrap the dispatch
|
|
47
|
+
* site as `(name) => dispatch('EVENT', { name })`.
|
|
48
|
+
*/
|
|
49
|
+
export interface PatternCallbackArg {
|
|
50
|
+
name: string;
|
|
51
|
+
type: string;
|
|
52
|
+
}
|
|
32
53
|
/**
|
|
33
54
|
* Schema describing a single prop in a pattern's propsSchema. Emitted
|
|
34
55
|
* by the pattern-sync tool (`tools/almadar-pattern-sync/`) from a
|
|
@@ -57,4 +78,22 @@ export interface PatternPropDef {
|
|
|
57
78
|
* omitted. Only meaningful alongside `kind: "event-list"`.
|
|
58
79
|
*/
|
|
59
80
|
eventField?: string;
|
|
81
|
+
/**
|
|
82
|
+
* For `kind: "event-ref"` whose source is `EventEmit<P>`: the
|
|
83
|
+
* structural shape of `P` — the bus payload the component fires when
|
|
84
|
+
* the prop is bound. Validator compares against the trait's declared
|
|
85
|
+
* `emits { EVENT { ... } }` payload.
|
|
86
|
+
*/
|
|
87
|
+
emitPayloadSchema?: PatternPayloadField[];
|
|
88
|
+
/**
|
|
89
|
+
* For `kind: "event-listen"` whose source is `EventListen<P>`: the
|
|
90
|
+
* structural shape of `P` — the payload the component subscribes to.
|
|
91
|
+
*/
|
|
92
|
+
listenPayloadSchema?: PatternPayloadField[];
|
|
93
|
+
/**
|
|
94
|
+
* For `kind: "callback"`: positional parameter list of the function
|
|
95
|
+
* type. C2 uses these names to build the named-arg → object-payload
|
|
96
|
+
* wrapper at the dispatch site.
|
|
97
|
+
*/
|
|
98
|
+
callbackArgs?: PatternCallbackArg[];
|
|
60
99
|
}
|