@wireweave/core 4.0.0-beta.0 → 4.0.0-beta.13

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 -462
  2. package/dist/app.cjs +50 -0
  3. package/dist/app.d.cts +488 -0
  4. package/dist/app.d.ts +488 -0
  5. package/dist/app.js +1 -0
  6. package/dist/chunk-3RWGG5EC.js +18042 -0
  7. package/dist/chunk-4TMDPWPR.cjs +186 -0
  8. package/dist/chunk-4UZBGIGJ.cjs +4359 -0
  9. package/dist/chunk-5DGRIQDU.cjs +824 -0
  10. package/dist/chunk-ETV4XYOV.cjs +5 -0
  11. package/dist/chunk-FS6A6EJ4.js +4345 -0
  12. package/dist/chunk-IMUVIIJR.cjs +18051 -0
  13. package/dist/chunk-JJWAFHSV.js +821 -0
  14. package/dist/chunk-MD6MNOEQ.cjs +2884 -0
  15. package/dist/chunk-PKBMQBKP.js +5 -0
  16. package/dist/chunk-R5WBZWBC.js +180 -0
  17. package/dist/chunk-V3HVWC7C.js +2874 -0
  18. package/dist/chunk-XYACLXXF.js +51484 -0
  19. package/dist/chunk-ZPHNXJRY.cjs +51590 -0
  20. package/dist/index-BGU_4N4W.d.ts +240 -0
  21. package/dist/index-BlNYFaZd.d.cts +337 -0
  22. package/dist/index-Cx4-VXVS.d.ts +337 -0
  23. package/dist/index-DyXaMSgd.d.cts +240 -0
  24. package/dist/index.cjs +1844 -58238
  25. package/dist/index.d.cts +556 -102
  26. package/dist/index.d.ts +556 -102
  27. package/dist/index.js +1163 -58104
  28. package/dist/interaction.cjs +26 -0
  29. package/dist/interaction.d.cts +3 -0
  30. package/dist/interaction.d.ts +3 -0
  31. package/dist/interaction.js +1 -0
  32. package/dist/parser.cjs +34 -6611
  33. package/dist/parser.d.cts +11 -2
  34. package/dist/parser.d.ts +11 -2
  35. package/dist/parser.js +1 -6585
  36. package/dist/renderer.cjs +119 -50537
  37. package/dist/renderer.d.cts +348 -123
  38. package/dist/renderer.d.ts +348 -123
  39. package/dist/renderer.js +3 -50499
  40. package/dist/spec.cjs +94 -0
  41. package/dist/spec.d.cts +301 -0
  42. package/dist/spec.d.ts +301 -0
  43. package/dist/spec.js +1 -0
  44. package/dist/{types-hEr_afgw.d.cts → types-CGRi1k2N.d.cts} +307 -27
  45. package/dist/{types-hEr_afgw.d.ts → types-CGRi1k2N.d.ts} +307 -27
  46. package/dist/types-Dkgr0Wyc.d.cts +75 -0
  47. package/dist/types-Dkgr0Wyc.d.ts +75 -0
  48. package/dist/v4-types-2ORUg6To.d.cts +137 -0
  49. package/dist/v4-types-2ORUg6To.d.ts +137 -0
  50. package/package.json +112 -35
package/dist/parser.d.cts CHANGED
@@ -1,4 +1,11 @@
1
- import { aK as SourceLocation, a1 as WireframeDocument } from './types-hEr_afgw.cjs';
1
+ import { S as SourceLocation, W as WireframeDocument } from './types-CGRi1k2N.cjs';
2
+ import { V as V4SourceSpan, a as V4ParseOptions, P as ParsedDocument, b as V4ParseResult } from './v4-types-2ORUg6To.cjs';
3
+ export { C as CanonicalDefinition, c as CanonicalModule, d as CanonicalNode, e as CanonicalParameter, f as CanonicalPrimitive, g as CanonicalSymbol, h as CanonicalUse, i as V4Diagnostic, j as V4ParseError } from './v4-types-2ORUg6To.cjs';
4
+
5
+ /** Original-source metadata is kept outside the canonical JSON document. */
6
+ declare function getV4SourceSpan(value: object): Readonly<V4SourceSpan> | undefined;
7
+ declare function parseV4(source: string, options: V4ParseOptions): ParsedDocument;
8
+ declare function tryParseV4(source: string, options: V4ParseOptions): V4ParseResult;
2
9
 
3
10
  /**
4
11
  * Parser module for wireweave
@@ -62,6 +69,7 @@ interface ParseErrorInfo {
62
69
  * @returns Parsed AST document
63
70
  * @throws {ParseError} When source contains syntax errors
64
71
  */
72
+ declare function parse(source: string, options: V4ParseOptions): ParsedDocument;
65
73
  declare function parse(source: string, options?: ParseOptions): WireframeDocument;
66
74
  /**
67
75
  * Parse wireframe DSL with error recovery
@@ -70,6 +78,7 @@ declare function parse(source: string, options?: ParseOptions): WireframeDocumen
70
78
  * @param options - Parse options
71
79
  * @returns Parse result with AST or errors
72
80
  */
81
+ declare function tryParse(source: string, options: V4ParseOptions): V4ParseResult;
73
82
  declare function tryParse(source: string, options?: ParseOptions): ParseResult;
74
83
  /**
75
84
  * Validate source code without throwing
@@ -86,4 +95,4 @@ declare function isValid(source: string): boolean;
86
95
  */
87
96
  declare function getErrors(source: string): ParseErrorInfo[];
88
97
 
89
- export { type ExpectedToken, type ParseError, type ParseErrorInfo, type ParseOptions, type ParseResult, getErrors, isValid, parse, tryParse };
98
+ export { type ExpectedToken, type ParseError, type ParseErrorInfo, type ParseOptions, type ParseResult, ParsedDocument, V4ParseOptions, V4ParseResult, V4SourceSpan, getErrors, getV4SourceSpan, isValid, parse, parseV4, tryParse, tryParseV4 };
package/dist/parser.d.ts CHANGED
@@ -1,4 +1,11 @@
1
- import { aK as SourceLocation, a1 as WireframeDocument } from './types-hEr_afgw.js';
1
+ import { S as SourceLocation, W as WireframeDocument } from './types-CGRi1k2N.js';
2
+ import { V as V4SourceSpan, a as V4ParseOptions, P as ParsedDocument, b as V4ParseResult } from './v4-types-2ORUg6To.js';
3
+ export { C as CanonicalDefinition, c as CanonicalModule, d as CanonicalNode, e as CanonicalParameter, f as CanonicalPrimitive, g as CanonicalSymbol, h as CanonicalUse, i as V4Diagnostic, j as V4ParseError } from './v4-types-2ORUg6To.js';
4
+
5
+ /** Original-source metadata is kept outside the canonical JSON document. */
6
+ declare function getV4SourceSpan(value: object): Readonly<V4SourceSpan> | undefined;
7
+ declare function parseV4(source: string, options: V4ParseOptions): ParsedDocument;
8
+ declare function tryParseV4(source: string, options: V4ParseOptions): V4ParseResult;
2
9
 
3
10
  /**
4
11
  * Parser module for wireweave
@@ -62,6 +69,7 @@ interface ParseErrorInfo {
62
69
  * @returns Parsed AST document
63
70
  * @throws {ParseError} When source contains syntax errors
64
71
  */
72
+ declare function parse(source: string, options: V4ParseOptions): ParsedDocument;
65
73
  declare function parse(source: string, options?: ParseOptions): WireframeDocument;
66
74
  /**
67
75
  * Parse wireframe DSL with error recovery
@@ -70,6 +78,7 @@ declare function parse(source: string, options?: ParseOptions): WireframeDocumen
70
78
  * @param options - Parse options
71
79
  * @returns Parse result with AST or errors
72
80
  */
81
+ declare function tryParse(source: string, options: V4ParseOptions): V4ParseResult;
73
82
  declare function tryParse(source: string, options?: ParseOptions): ParseResult;
74
83
  /**
75
84
  * Validate source code without throwing
@@ -86,4 +95,4 @@ declare function isValid(source: string): boolean;
86
95
  */
87
96
  declare function getErrors(source: string): ParseErrorInfo[];
88
97
 
89
- export { type ExpectedToken, type ParseError, type ParseErrorInfo, type ParseOptions, type ParseResult, getErrors, isValid, parse, tryParse };
98
+ export { type ExpectedToken, type ParseError, type ParseErrorInfo, type ParseOptions, type ParseResult, ParsedDocument, V4ParseOptions, V4ParseResult, V4SourceSpan, getErrors, getV4SourceSpan, isValid, parse, parseV4, tryParse, tryParseV4 };