@wireweave/core 3.1.0-beta.9 → 4.0.0-beta.12

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.
Files changed (50) hide show
  1. package/README.md +17 -126
  2. package/dist/app.cjs +31 -0
  3. package/dist/app.d.cts +488 -0
  4. package/dist/app.d.ts +488 -0
  5. package/dist/app.js +31 -0
  6. package/dist/chunk-3RWGG5EC.js +18088 -0
  7. package/dist/chunk-4TMDPWPR.cjs +196 -0
  8. package/dist/chunk-5DGRIQDU.cjs +842 -0
  9. package/dist/chunk-7VTK6LHL.cjs +4374 -0
  10. package/dist/chunk-ETV4XYOV.cjs +7 -0
  11. package/dist/chunk-IMUVIIJR.cjs +18088 -0
  12. package/dist/chunk-JJWAFHSV.js +842 -0
  13. package/dist/chunk-MD6MNOEQ.cjs +2905 -0
  14. package/dist/chunk-PKBMQBKP.js +7 -0
  15. package/dist/chunk-QOS4IC75.js +4374 -0
  16. package/dist/chunk-R5WBZWBC.js +196 -0
  17. package/dist/chunk-V3HVWC7C.js +2905 -0
  18. package/dist/chunk-WV724EAW.js +0 -0
  19. package/dist/chunk-XENFKHRC.cjs +1 -0
  20. package/dist/chunk-XYACLXXF.js +51612 -0
  21. package/dist/chunk-ZPHNXJRY.cjs +51612 -0
  22. package/dist/index-Br7pNaf3.d.cts +240 -0
  23. package/dist/index-CghCKUPx.d.ts +337 -0
  24. package/dist/index-Da_B3eoM.d.ts +240 -0
  25. package/dist/index-G906GEtg.d.cts +337 -0
  26. package/dist/index.cjs +963 -64577
  27. package/dist/index.d.cts +13 -522
  28. package/dist/index.d.ts +13 -522
  29. package/dist/index.js +711 -64118
  30. package/dist/interaction.cjs +17 -0
  31. package/dist/interaction.d.cts +3 -0
  32. package/dist/interaction.d.ts +3 -0
  33. package/dist/interaction.js +17 -0
  34. package/dist/parser.cjs +18 -7832
  35. package/dist/parser.d.cts +10 -1
  36. package/dist/parser.d.ts +10 -1
  37. package/dist/parser.js +16 -7800
  38. package/dist/renderer.cjs +7 -53162
  39. package/dist/renderer.d.cts +19 -239
  40. package/dist/renderer.d.ts +19 -239
  41. package/dist/renderer.js +37 -53137
  42. package/dist/spec.cjs +42 -2883
  43. package/dist/spec.d.cts +4 -75
  44. package/dist/spec.d.ts +4 -75
  45. package/dist/spec.js +25 -2818
  46. package/dist/types-Dkgr0Wyc.d.cts +75 -0
  47. package/dist/types-Dkgr0Wyc.d.ts +75 -0
  48. package/dist/v4-types-Baz9yqAS.d.cts +137 -0
  49. package/dist/v4-types-Baz9yqAS.d.ts +137 -0
  50. package/package.json +22 -1
package/dist/spec.d.cts CHANGED
@@ -1,3 +1,6 @@
1
+ import { c as ComponentSpec, a as AttributeSpec, A as AttributeOverride } from './types-Dkgr0Wyc.cjs';
2
+ export { b as AttributeValueType, C as ComponentCategory } from './types-Dkgr0Wyc.cjs';
3
+
1
4
  /**
2
5
  * GENERATED FILE — DO NOT EDIT.
3
6
  *
@@ -102,80 +105,6 @@ declare const GRAMMAR_CHILD_KEYWORDS: readonly ["page", "header", "main", "foote
102
105
  */
103
106
  declare const LUCIDE_ICON_NAMES: readonly string[];
104
107
 
105
- /**
106
- * Types for Wireweave DSL Specification
107
- */
108
- /**
109
- * Attribute value type
110
- */
111
- type AttributeValueType = 'boolean' | 'number' | 'string' | 'string[]' | 'object' | 'object[]' | 'enum';
112
- /**
113
- * Attribute definition
114
- */
115
- interface AttributeSpec {
116
- /** Attribute name */
117
- name: string;
118
- /** Value type */
119
- type: AttributeValueType;
120
- /**
121
- * Value keywords this attribute accepts, machine-readable.
122
- *
123
- * For `type: 'enum'` these are the whole domain. For the attributes whose
124
- * value is *either* a keyword or something open-ended — `w="full"` or
125
- * `w=240`, bare `wrap` or `wrap=nowrap` — they are the keyword half, and
126
- * {@link AttributeSpec.type} names the other half. Listing them here rather
127
- * than inside the description sentence is what lets an editor complete them.
128
- */
129
- values?: readonly string[];
130
- /** Description for documentation */
131
- description?: string;
132
- }
133
- /**
134
- * A narrowing of one registry attribute, scoped to one element.
135
- *
136
- * {@link AttributeSpec} is a flat namespace keyed by attribute name alone, so it
137
- * can only state what an attribute means everywhere at once. Some facts are not
138
- * of that shape: `name` on `icon` is a glyph out of a closed 1.6k-name set,
139
- * while `name` on `radio` is whatever string groups the radios. An override
140
- * carries the narrower fact for the one element it holds on, and the wider one
141
- * stays in the registry for everybody else.
142
- *
143
- * Narrowing only, in both directions:
144
- * - `name` is absent from this type, so an override cannot rename an attribute
145
- * and therefore cannot bring a name into existence that the registry has not
146
- * already declared.
147
- * - `values` may only shrink an existing domain, and `type` may only move to
148
- * `enum` from an open one. `spec-override-containment.test.ts` in
149
- * `packages/language-data` holds both, because an override that widened would
150
- * be a second registry hiding behind a lookup function.
151
- */
152
- type AttributeOverride = Omit<Partial<AttributeSpec>, 'name'>;
153
- /**
154
- * Component category
155
- *
156
- * `structure` is the odd one out: its elements (`layout`, `component`, `slot`)
157
- * declare reusable structure rather than draw anything, so editors and docs
158
- * must not offer them as ordinary content the way they offer a `card`.
159
- */
160
- type ComponentCategory = 'structure' | 'layout' | 'grid' | 'container' | 'text' | 'input' | 'display' | 'data' | 'feedback' | 'overlay' | 'navigation' | 'annotation';
161
- /**
162
- * Component definition
163
- */
164
- interface ComponentSpec {
165
- /** Component name (lowercase, as used in DSL) */
166
- name: string;
167
- /** AST node type (PascalCase) */
168
- nodeType: string;
169
- /** Component category */
170
- category: ComponentCategory;
171
- /** Valid attributes for this component (names only, definitions in ATTRIBUTES) */
172
- attributes: readonly string[];
173
- /** Whether this component can have children */
174
- hasChildren: boolean;
175
- /** Description for documentation */
176
- description: string;
177
- }
178
-
179
108
  /**
180
109
  * Wireweave DSL Component Definitions
181
110
  *
@@ -369,4 +298,4 @@ declare const ATTRIBUTE_OVERRIDES: Readonly<Record<string, Readonly<Record<strin
369
298
  */
370
299
  declare function attributeFor(componentNameOrType: string, attributeName: string): AttributeSpec | undefined;
371
300
 
372
- export { ATTRIBUTE_MAP, ATTRIBUTE_OVERRIDES, ATTRIBUTE_SPECS, type AttributeOverride, type AttributeSpec, type AttributeValueType, BLOCK_NODE_SPECS, BOX_ATTRIBUTES, COMPONENT_MAP, COMPONENT_NAMES, COMPONENT_SPECS, COMPONENT_SPEC_BY_NAME, CONTAINER_ATTRIBUTES, type ComponentCategory, type ComponentSpec, ELEMENT_NODE_TYPE_MAP, GRAMMAR_BLOCK_NODE_TYPES, GRAMMAR_CHILD_KEYWORDS, GRAMMAR_ELEMENTS, type GrammarBlockNodeType, type GrammarElementName, type GrammarNodeType, INTERACTIVE_ATTRIBUTES, LUCIDE_ICON_NAMES, NODE_TYPE_MAP, VALID_ATTRIBUTE_NAMES, VALID_COMPONENT_NAMES, attributeFor, getValidAttributes, isValidAttribute };
301
+ export { ATTRIBUTE_MAP, ATTRIBUTE_OVERRIDES, ATTRIBUTE_SPECS, AttributeOverride, AttributeSpec, BLOCK_NODE_SPECS, BOX_ATTRIBUTES, COMPONENT_MAP, COMPONENT_NAMES, COMPONENT_SPECS, COMPONENT_SPEC_BY_NAME, CONTAINER_ATTRIBUTES, ComponentSpec, ELEMENT_NODE_TYPE_MAP, GRAMMAR_BLOCK_NODE_TYPES, GRAMMAR_CHILD_KEYWORDS, GRAMMAR_ELEMENTS, type GrammarBlockNodeType, type GrammarElementName, type GrammarNodeType, INTERACTIVE_ATTRIBUTES, LUCIDE_ICON_NAMES, NODE_TYPE_MAP, VALID_ATTRIBUTE_NAMES, VALID_COMPONENT_NAMES, attributeFor, getValidAttributes, isValidAttribute };
package/dist/spec.d.ts CHANGED
@@ -1,3 +1,6 @@
1
+ import { c as ComponentSpec, a as AttributeSpec, A as AttributeOverride } from './types-Dkgr0Wyc.js';
2
+ export { b as AttributeValueType, C as ComponentCategory } from './types-Dkgr0Wyc.js';
3
+
1
4
  /**
2
5
  * GENERATED FILE — DO NOT EDIT.
3
6
  *
@@ -102,80 +105,6 @@ declare const GRAMMAR_CHILD_KEYWORDS: readonly ["page", "header", "main", "foote
102
105
  */
103
106
  declare const LUCIDE_ICON_NAMES: readonly string[];
104
107
 
105
- /**
106
- * Types for Wireweave DSL Specification
107
- */
108
- /**
109
- * Attribute value type
110
- */
111
- type AttributeValueType = 'boolean' | 'number' | 'string' | 'string[]' | 'object' | 'object[]' | 'enum';
112
- /**
113
- * Attribute definition
114
- */
115
- interface AttributeSpec {
116
- /** Attribute name */
117
- name: string;
118
- /** Value type */
119
- type: AttributeValueType;
120
- /**
121
- * Value keywords this attribute accepts, machine-readable.
122
- *
123
- * For `type: 'enum'` these are the whole domain. For the attributes whose
124
- * value is *either* a keyword or something open-ended — `w="full"` or
125
- * `w=240`, bare `wrap` or `wrap=nowrap` — they are the keyword half, and
126
- * {@link AttributeSpec.type} names the other half. Listing them here rather
127
- * than inside the description sentence is what lets an editor complete them.
128
- */
129
- values?: readonly string[];
130
- /** Description for documentation */
131
- description?: string;
132
- }
133
- /**
134
- * A narrowing of one registry attribute, scoped to one element.
135
- *
136
- * {@link AttributeSpec} is a flat namespace keyed by attribute name alone, so it
137
- * can only state what an attribute means everywhere at once. Some facts are not
138
- * of that shape: `name` on `icon` is a glyph out of a closed 1.6k-name set,
139
- * while `name` on `radio` is whatever string groups the radios. An override
140
- * carries the narrower fact for the one element it holds on, and the wider one
141
- * stays in the registry for everybody else.
142
- *
143
- * Narrowing only, in both directions:
144
- * - `name` is absent from this type, so an override cannot rename an attribute
145
- * and therefore cannot bring a name into existence that the registry has not
146
- * already declared.
147
- * - `values` may only shrink an existing domain, and `type` may only move to
148
- * `enum` from an open one. `spec-override-containment.test.ts` in
149
- * `packages/language-data` holds both, because an override that widened would
150
- * be a second registry hiding behind a lookup function.
151
- */
152
- type AttributeOverride = Omit<Partial<AttributeSpec>, 'name'>;
153
- /**
154
- * Component category
155
- *
156
- * `structure` is the odd one out: its elements (`layout`, `component`, `slot`)
157
- * declare reusable structure rather than draw anything, so editors and docs
158
- * must not offer them as ordinary content the way they offer a `card`.
159
- */
160
- type ComponentCategory = 'structure' | 'layout' | 'grid' | 'container' | 'text' | 'input' | 'display' | 'data' | 'feedback' | 'overlay' | 'navigation' | 'annotation';
161
- /**
162
- * Component definition
163
- */
164
- interface ComponentSpec {
165
- /** Component name (lowercase, as used in DSL) */
166
- name: string;
167
- /** AST node type (PascalCase) */
168
- nodeType: string;
169
- /** Component category */
170
- category: ComponentCategory;
171
- /** Valid attributes for this component (names only, definitions in ATTRIBUTES) */
172
- attributes: readonly string[];
173
- /** Whether this component can have children */
174
- hasChildren: boolean;
175
- /** Description for documentation */
176
- description: string;
177
- }
178
-
179
108
  /**
180
109
  * Wireweave DSL Component Definitions
181
110
  *
@@ -369,4 +298,4 @@ declare const ATTRIBUTE_OVERRIDES: Readonly<Record<string, Readonly<Record<strin
369
298
  */
370
299
  declare function attributeFor(componentNameOrType: string, attributeName: string): AttributeSpec | undefined;
371
300
 
372
- export { ATTRIBUTE_MAP, ATTRIBUTE_OVERRIDES, ATTRIBUTE_SPECS, type AttributeOverride, type AttributeSpec, type AttributeValueType, BLOCK_NODE_SPECS, BOX_ATTRIBUTES, COMPONENT_MAP, COMPONENT_NAMES, COMPONENT_SPECS, COMPONENT_SPEC_BY_NAME, CONTAINER_ATTRIBUTES, type ComponentCategory, type ComponentSpec, ELEMENT_NODE_TYPE_MAP, GRAMMAR_BLOCK_NODE_TYPES, GRAMMAR_CHILD_KEYWORDS, GRAMMAR_ELEMENTS, type GrammarBlockNodeType, type GrammarElementName, type GrammarNodeType, INTERACTIVE_ATTRIBUTES, LUCIDE_ICON_NAMES, NODE_TYPE_MAP, VALID_ATTRIBUTE_NAMES, VALID_COMPONENT_NAMES, attributeFor, getValidAttributes, isValidAttribute };
301
+ export { ATTRIBUTE_MAP, ATTRIBUTE_OVERRIDES, ATTRIBUTE_SPECS, AttributeOverride, AttributeSpec, BLOCK_NODE_SPECS, BOX_ATTRIBUTES, COMPONENT_MAP, COMPONENT_NAMES, COMPONENT_SPECS, COMPONENT_SPEC_BY_NAME, CONTAINER_ATTRIBUTES, ComponentSpec, ELEMENT_NODE_TYPE_MAP, GRAMMAR_BLOCK_NODE_TYPES, GRAMMAR_CHILD_KEYWORDS, GRAMMAR_ELEMENTS, type GrammarBlockNodeType, type GrammarElementName, type GrammarNodeType, INTERACTIVE_ATTRIBUTES, LUCIDE_ICON_NAMES, NODE_TYPE_MAP, VALID_ATTRIBUTE_NAMES, VALID_COMPONENT_NAMES, attributeFor, getValidAttributes, isValidAttribute };