@almadar/patterns 2.28.1 → 2.29.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 +11 -1
- package/dist/event-contracts.json +1 -1
- package/dist/index.d.ts +1848 -0
- package/dist/index.js +1788 -735
- package/dist/index.js.map +1 -1
- package/dist/patterns-registry.json +1810 -767
- package/dist/registry.json +1810 -767
- package/dist/types.d.ts +20 -0
- package/package.json +1 -1
package/dist/types.d.ts
CHANGED
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
*
|
|
4
4
|
* @packageDocumentation
|
|
5
5
|
*/
|
|
6
|
+
import type { EventPayloadValue } from '@almadar/core';
|
|
6
7
|
/**
|
|
7
8
|
* Semantic kind marker for a pattern prop. Complements the structural
|
|
8
9
|
* `types` field (which declares "string" / "array" / "object" / ...)
|
|
@@ -96,4 +97,23 @@ export interface PatternPropDef {
|
|
|
96
97
|
* wrapper at the dispatch site.
|
|
97
98
|
*/
|
|
98
99
|
callbackArgs?: PatternCallbackArg[];
|
|
100
|
+
/**
|
|
101
|
+
* Default value extracted from the component's parameter destructuring
|
|
102
|
+
* (`function Button({ size = 'md', variant = 'primary' })`). Surfaces
|
|
103
|
+
* what the component would render in the absence of an explicit
|
|
104
|
+
* override. Consumers:
|
|
105
|
+
*
|
|
106
|
+
* - The Studio drop pipeline (`apps/builder` `useSchemaEditor.addPattern`)
|
|
107
|
+
* seeds fresh SExpression nodes with these values so dropped patterns
|
|
108
|
+
* carry sensible content immediately.
|
|
109
|
+
* - The Inspector reads it to hint at the implicit value when a prop
|
|
110
|
+
* isn't set on the SExpression.
|
|
111
|
+
*
|
|
112
|
+
* Populated by `almadar-pattern-sync` from each component's TS source
|
|
113
|
+
* (initializer expressions on the first parameter's binding pattern).
|
|
114
|
+
* Function-valued defaults (lambdas, callbacks) are omitted — only
|
|
115
|
+
* JSON-serializable scalars / arrays / objects round-trip through the
|
|
116
|
+
* registry.
|
|
117
|
+
*/
|
|
118
|
+
default?: EventPayloadValue;
|
|
99
119
|
}
|