@almadar/patterns 2.28.2 → 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/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
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@almadar/patterns",
3
- "version": "2.28.2",
3
+ "version": "2.29.0",
4
4
  "description": "Pattern registry and component mappings for Almadar",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",