@wireweave/core 4.0.0-beta.12 → 4.0.0-beta.14

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 (53) hide show
  1. package/dist/app.cjs +51 -31
  2. package/dist/app.d.cts +5 -145
  3. package/dist/app.d.ts +5 -145
  4. package/dist/app.js +2 -31
  5. package/dist/{chunk-QOS4IC75.js → chunk-2Y3GKARZ.js} +16 -1354
  6. package/dist/chunk-3RWGG5EC.js +296 -342
  7. package/dist/chunk-4DDV6Z2X.js +389 -0
  8. package/dist/chunk-ETV4XYOV.cjs +4 -6
  9. package/dist/chunk-IMUVIIJR.cjs +317 -354
  10. package/dist/chunk-LA5LKIEL.cjs +396 -0
  11. package/dist/chunk-MD6MNOEQ.cjs +121 -142
  12. package/dist/chunk-NV6UV5ID.cjs +2145 -0
  13. package/dist/chunk-PKBMQBKP.js +1 -3
  14. package/dist/{chunk-7VTK6LHL.cjs → chunk-SAN6CJEE.cjs} +96 -1421
  15. package/dist/chunk-TQSOLTMZ.js +2132 -0
  16. package/dist/chunk-V3HVWC7C.js +1 -32
  17. package/dist/chunk-XYACLXXF.js +4 -132
  18. package/dist/chunk-ZPHNXJRY.cjs +158 -180
  19. package/dist/index-BD_4rXH-.d.cts +1031 -0
  20. package/dist/{index-Br7pNaf3.d.cts → index-BEnsO2kE.d.ts} +144 -2
  21. package/dist/{index-G906GEtg.d.cts → index-BlNYFaZd.d.cts} +2 -2
  22. package/dist/{index-CghCKUPx.d.ts → index-Cx4-VXVS.d.ts} +2 -2
  23. package/dist/{index-Da_B3eoM.d.ts → index-YSIzfhOd.d.cts} +144 -2
  24. package/dist/index-g9yV20xb.d.ts +1031 -0
  25. package/dist/index.cjs +939 -429
  26. package/dist/index.d.cts +16 -193
  27. package/dist/index.d.ts +16 -193
  28. package/dist/index.js +210 -396
  29. package/dist/interaction.cjs +26 -17
  30. package/dist/interaction.d.cts +2 -2
  31. package/dist/interaction.d.ts +2 -2
  32. package/dist/interaction.js +1 -17
  33. package/dist/parser.cjs +38 -21
  34. package/dist/parser.d.cts +3 -3
  35. package/dist/parser.d.ts +3 -3
  36. package/dist/parser.js +1 -21
  37. package/dist/renderer.cjs +124 -68
  38. package/dist/renderer.d.cts +4 -756
  39. package/dist/renderer.d.ts +4 -756
  40. package/dist/renderer.js +3 -68
  41. package/dist/spec.cjs +94 -49
  42. package/dist/spec.js +1 -49
  43. package/dist/{types-vhPCZpAW.d.cts → types-CGRi1k2N.d.cts} +1 -1
  44. package/dist/{types-vhPCZpAW.d.ts → types-CGRi1k2N.d.ts} +1 -1
  45. package/dist/{v4-types-Baz9yqAS.d.cts → v4-types-2ORUg6To.d.cts} +1 -1
  46. package/dist/{v4-types-Baz9yqAS.d.ts → v4-types-2ORUg6To.d.ts} +1 -1
  47. package/package.json +21 -23
  48. package/dist/chunk-4TMDPWPR.cjs +0 -196
  49. package/dist/chunk-5DGRIQDU.cjs +0 -842
  50. package/dist/chunk-JJWAFHSV.js +0 -842
  51. package/dist/chunk-R5WBZWBC.js +0 -196
  52. package/dist/chunk-WV724EAW.js +0 -0
  53. package/dist/chunk-XENFKHRC.cjs +0 -1
@@ -1,4 +1,146 @@
1
- import { be as WireframeDocument } from './types-vhPCZpAW.cjs';
1
+ import { J as JsonObject, V as V4SourceSpan, P as ParsedDocument, c as CanonicalModule } from './v4-types-2ORUg6To.js';
2
+ import { W as WireframeDocument } from './types-CGRi1k2N.js';
3
+
4
+ interface Diagnostic {
5
+ severity: 'error';
6
+ code: string;
7
+ phase: 'schema' | 'import' | 'link' | 'compile';
8
+ sourceId: string;
9
+ start: number;
10
+ end: number;
11
+ path: string;
12
+ messageKey: string;
13
+ details: JsonObject;
14
+ related: {
15
+ sourceId: string;
16
+ start: number;
17
+ end: number;
18
+ }[];
19
+ }
20
+ type AppResult<T> = {
21
+ ok: true;
22
+ value: T;
23
+ diagnostics: readonly [];
24
+ } | {
25
+ ok: false;
26
+ value: null;
27
+ html: null;
28
+ diagnostics: readonly Diagnostic[];
29
+ };
30
+ interface ScreenReference {
31
+ namespace: string;
32
+ id: string;
33
+ variant?: string;
34
+ }
35
+ interface CreateAppBundleOptions {
36
+ id: string;
37
+ entry: ScreenReference;
38
+ profile: JsonObject;
39
+ states: JsonObject[];
40
+ registry: ParsedDocument['registry'];
41
+ fixtures: JsonObject[];
42
+ /** Exact original module bytes. Source maps address these bytes as moduleId.wf. */
43
+ moduleSources: Readonly<Record<string, string>>;
44
+ }
45
+ declare const bundleBrand: unique symbol;
46
+ declare const linkedBrand: unique symbol;
47
+ interface AppBundle {
48
+ readonly [bundleBrand]: true;
49
+ readonly schemaVersion: '1.0.0';
50
+ readonly languageVersion: '4.0.0';
51
+ readonly id: string;
52
+ readonly entry: Readonly<ScreenReference>;
53
+ readonly profile: Readonly<JsonObject>;
54
+ readonly states: readonly JsonObject[];
55
+ readonly registry: Readonly<ParsedDocument['registry']>;
56
+ readonly fixtures: readonly JsonObject[];
57
+ readonly modules: readonly CanonicalModule[];
58
+ }
59
+ type InstanceStep = {
60
+ kind: 'use';
61
+ id: string;
62
+ } | {
63
+ kind: 'repeat';
64
+ id: string;
65
+ index: number;
66
+ };
67
+ interface LinkedIdentity {
68
+ namespace: string;
69
+ definitionKind: 'page' | 'layout' | 'component';
70
+ definitionId: string;
71
+ instanceRoot: {
72
+ kind: 'screen';
73
+ namespace: string;
74
+ id: string;
75
+ } | {
76
+ kind: 'shell';
77
+ namespace: string;
78
+ id: string;
79
+ profileDigest: string;
80
+ };
81
+ instancePath: InstanceStep[];
82
+ localId: string;
83
+ }
84
+ interface SourceMapEntry {
85
+ renderedId: string;
86
+ identity: LinkedIdentity;
87
+ moduleId: string;
88
+ source: Readonly<V4SourceSpan>;
89
+ invocationSources: readonly Readonly<V4SourceSpan>[];
90
+ requirementRefs: readonly string[];
91
+ obligationRefs: readonly string[];
92
+ operationIds: readonly string[];
93
+ }
94
+ interface LinkedApp {
95
+ readonly [linkedBrand]: true;
96
+ readonly kind: 'LinkedApp';
97
+ readonly languageVersion: '4.0.0';
98
+ readonly id: string;
99
+ readonly digest: string;
100
+ readonly sourceMap: readonly SourceMapEntry[];
101
+ }
102
+ interface AppArtifact {
103
+ readonly kind: 'AppArtifact';
104
+ readonly schemaVersion: '1.0.0';
105
+ readonly languageVersion: '4.0.0';
106
+ readonly html: string;
107
+ readonly mediaType: 'text/html';
108
+ readonly byteLength: number;
109
+ readonly digest: string;
110
+ readonly modelDigest: string;
111
+ readonly profileDigest: string;
112
+ readonly runtimeDigest: string;
113
+ readonly registryDigest: string;
114
+ readonly entry: Readonly<ScreenReference>;
115
+ readonly screenIndex: readonly {
116
+ route: ScreenReference;
117
+ renderedId: string;
118
+ }[];
119
+ readonly operationIndex: readonly {
120
+ renderedId: string;
121
+ handlerId: string;
122
+ operationId: string;
123
+ executionClass: string;
124
+ operation: JsonObject;
125
+ }[];
126
+ readonly diagnostics: readonly [];
127
+ readonly sourceMap: readonly SourceMapEntry[];
128
+ readonly manifest: {
129
+ readonly appId: string;
130
+ readonly modelDigest: string;
131
+ readonly profileDigest: string;
132
+ readonly registryDigest: string;
133
+ readonly htmlDigest: string;
134
+ readonly runtimeDigest: string;
135
+ readonly executionScope: 'standard-1';
136
+ readonly unsupportedOperations: readonly {
137
+ renderedId: string;
138
+ handlerId: string;
139
+ operationId: string;
140
+ }[];
141
+ };
142
+ }
143
+ declare function createAppBundle(documents: readonly ParsedDocument[], options: CreateAppBundleOptions): AppResult<AppBundle>;
2
144
 
3
145
  /**
4
146
  * Renderer type definitions for wireweave
@@ -237,4 +379,4 @@ interface SiteOptions extends Pick<RenderOptions, 'theme' | 'classPrefix' | 'bac
237
379
  */
238
380
  declare function renderSite(document: WireframeDocument, options?: SiteOptions): string;
239
381
 
240
- export { type AnnotationStyle as A, type CanvasOptions as C, type PageRenderResult as P, type RenderContext as R, type SiteOptions as S, type ThemeColors as T, type CanvasRenderResult as a, type RenderOptions as b, type RenderResult as c, type SvgRenderOptions as d, type SvgRenderResult as e, type ThemeConfig as f, darkTheme as g, defaultTheme as h, getTheme as i, renderSite as r };
382
+ export { type AppResult as A, type CanvasOptions as C, type Diagnostic as D, type InstanceStep as I, type LinkedIdentity as L, type PageRenderResult as P, type RenderContext as R, type SourceMapEntry as S, type ThemeConfig as T, type ScreenReference as a, type LinkedApp as b, type RenderOptions as c, type RenderResult as d, type AnnotationStyle as e, type CanvasRenderResult as f, type SvgRenderOptions as g, type SvgRenderResult as h, type SiteOptions as i, type ThemeColors as j, darkTheme as k, defaultTheme as l, getTheme as m, type AppArtifact as n, type AppBundle as o, type CreateAppBundleOptions as p, createAppBundle as q, renderSite as r };
@@ -1,4 +1,4 @@
1
- import { aK as SourceLocation, aR as StateDeclaration, aS as StateGuard, a6 as InteractionEffect, aq as NodeType, be as WireframeDocument, a5 as InputType } from './types-vhPCZpAW.cjs';
1
+ import { S as SourceLocation, a$ as StateDeclaration, b0 as StateGuard, aF as InteractionEffect, K as NodeType, W as WireframeDocument, aE as InputType } from './types-CGRi1k2N.cjs';
2
2
  import { C as ComponentCategory } from './types-Dkgr0Wyc.cjs';
3
3
 
4
4
  /** Overlay toggle is distinct from the typed boolean-state `toggle` effect. */
@@ -334,4 +334,4 @@ interface ScreenTransitionGraph {
334
334
  */
335
335
  declare function isUrlTarget(target: string | undefined): target is string;
336
336
 
337
- export { type InteractionDiagnostic as I, type NormalizedInteraction as N, type ScreenAction as S, type TransitionEdge as T, type InteractionDiagnosticCode as a, type InteractionKind as b, type InteractionModel as c, type NormalizedInteractionEffect as d, type NormalizedInteractionHandler as e, type ScreenDisplay as f, type ScreenElement as g, type ScreenFields as h, type ScreenFieldsSummary as i, type ScreenInput as j, type ScreenTransitionGraph as k, type TransitionScreen as l, collectInteractions as m, interactionSignature as n, isUrlTarget as o, normalizeInteractionHandlers as p, normalizeStateGuard as q };
337
+ export { type InteractionDiagnostic as I, type NormalizedInteraction as N, type ScreenFields as S, type TransitionEdge as T, type ScreenTransitionGraph as a, type InteractionDiagnosticCode as b, type InteractionKind as c, type InteractionModel as d, type NormalizedInteractionEffect as e, type NormalizedInteractionHandler as f, type ScreenAction as g, type ScreenDisplay as h, type ScreenElement as i, type ScreenFieldsSummary as j, type ScreenInput as k, type TransitionScreen as l, collectInteractions as m, interactionSignature as n, isUrlTarget as o, normalizeInteractionHandlers as p, normalizeStateGuard as q };
@@ -1,4 +1,4 @@
1
- import { aK as SourceLocation, aR as StateDeclaration, aS as StateGuard, a6 as InteractionEffect, aq as NodeType, be as WireframeDocument, a5 as InputType } from './types-vhPCZpAW.js';
1
+ import { S as SourceLocation, a$ as StateDeclaration, b0 as StateGuard, aF as InteractionEffect, K as NodeType, W as WireframeDocument, aE as InputType } from './types-CGRi1k2N.js';
2
2
  import { C as ComponentCategory } from './types-Dkgr0Wyc.js';
3
3
 
4
4
  /** Overlay toggle is distinct from the typed boolean-state `toggle` effect. */
@@ -334,4 +334,4 @@ interface ScreenTransitionGraph {
334
334
  */
335
335
  declare function isUrlTarget(target: string | undefined): target is string;
336
336
 
337
- export { type InteractionDiagnostic as I, type NormalizedInteraction as N, type ScreenAction as S, type TransitionEdge as T, type InteractionDiagnosticCode as a, type InteractionKind as b, type InteractionModel as c, type NormalizedInteractionEffect as d, type NormalizedInteractionHandler as e, type ScreenDisplay as f, type ScreenElement as g, type ScreenFields as h, type ScreenFieldsSummary as i, type ScreenInput as j, type ScreenTransitionGraph as k, type TransitionScreen as l, collectInteractions as m, interactionSignature as n, isUrlTarget as o, normalizeInteractionHandlers as p, normalizeStateGuard as q };
337
+ export { type InteractionDiagnostic as I, type NormalizedInteraction as N, type ScreenFields as S, type TransitionEdge as T, type ScreenTransitionGraph as a, type InteractionDiagnosticCode as b, type InteractionKind as c, type InteractionModel as d, type NormalizedInteractionEffect as e, type NormalizedInteractionHandler as f, type ScreenAction as g, type ScreenDisplay as h, type ScreenElement as i, type ScreenFieldsSummary as j, type ScreenInput as k, type TransitionScreen as l, collectInteractions as m, interactionSignature as n, isUrlTarget as o, normalizeInteractionHandlers as p, normalizeStateGuard as q };
@@ -1,4 +1,146 @@
1
- import { be as WireframeDocument } from './types-vhPCZpAW.js';
1
+ import { J as JsonObject, V as V4SourceSpan, P as ParsedDocument, c as CanonicalModule } from './v4-types-2ORUg6To.cjs';
2
+ import { W as WireframeDocument } from './types-CGRi1k2N.cjs';
3
+
4
+ interface Diagnostic {
5
+ severity: 'error';
6
+ code: string;
7
+ phase: 'schema' | 'import' | 'link' | 'compile';
8
+ sourceId: string;
9
+ start: number;
10
+ end: number;
11
+ path: string;
12
+ messageKey: string;
13
+ details: JsonObject;
14
+ related: {
15
+ sourceId: string;
16
+ start: number;
17
+ end: number;
18
+ }[];
19
+ }
20
+ type AppResult<T> = {
21
+ ok: true;
22
+ value: T;
23
+ diagnostics: readonly [];
24
+ } | {
25
+ ok: false;
26
+ value: null;
27
+ html: null;
28
+ diagnostics: readonly Diagnostic[];
29
+ };
30
+ interface ScreenReference {
31
+ namespace: string;
32
+ id: string;
33
+ variant?: string;
34
+ }
35
+ interface CreateAppBundleOptions {
36
+ id: string;
37
+ entry: ScreenReference;
38
+ profile: JsonObject;
39
+ states: JsonObject[];
40
+ registry: ParsedDocument['registry'];
41
+ fixtures: JsonObject[];
42
+ /** Exact original module bytes. Source maps address these bytes as moduleId.wf. */
43
+ moduleSources: Readonly<Record<string, string>>;
44
+ }
45
+ declare const bundleBrand: unique symbol;
46
+ declare const linkedBrand: unique symbol;
47
+ interface AppBundle {
48
+ readonly [bundleBrand]: true;
49
+ readonly schemaVersion: '1.0.0';
50
+ readonly languageVersion: '4.0.0';
51
+ readonly id: string;
52
+ readonly entry: Readonly<ScreenReference>;
53
+ readonly profile: Readonly<JsonObject>;
54
+ readonly states: readonly JsonObject[];
55
+ readonly registry: Readonly<ParsedDocument['registry']>;
56
+ readonly fixtures: readonly JsonObject[];
57
+ readonly modules: readonly CanonicalModule[];
58
+ }
59
+ type InstanceStep = {
60
+ kind: 'use';
61
+ id: string;
62
+ } | {
63
+ kind: 'repeat';
64
+ id: string;
65
+ index: number;
66
+ };
67
+ interface LinkedIdentity {
68
+ namespace: string;
69
+ definitionKind: 'page' | 'layout' | 'component';
70
+ definitionId: string;
71
+ instanceRoot: {
72
+ kind: 'screen';
73
+ namespace: string;
74
+ id: string;
75
+ } | {
76
+ kind: 'shell';
77
+ namespace: string;
78
+ id: string;
79
+ profileDigest: string;
80
+ };
81
+ instancePath: InstanceStep[];
82
+ localId: string;
83
+ }
84
+ interface SourceMapEntry {
85
+ renderedId: string;
86
+ identity: LinkedIdentity;
87
+ moduleId: string;
88
+ source: Readonly<V4SourceSpan>;
89
+ invocationSources: readonly Readonly<V4SourceSpan>[];
90
+ requirementRefs: readonly string[];
91
+ obligationRefs: readonly string[];
92
+ operationIds: readonly string[];
93
+ }
94
+ interface LinkedApp {
95
+ readonly [linkedBrand]: true;
96
+ readonly kind: 'LinkedApp';
97
+ readonly languageVersion: '4.0.0';
98
+ readonly id: string;
99
+ readonly digest: string;
100
+ readonly sourceMap: readonly SourceMapEntry[];
101
+ }
102
+ interface AppArtifact {
103
+ readonly kind: 'AppArtifact';
104
+ readonly schemaVersion: '1.0.0';
105
+ readonly languageVersion: '4.0.0';
106
+ readonly html: string;
107
+ readonly mediaType: 'text/html';
108
+ readonly byteLength: number;
109
+ readonly digest: string;
110
+ readonly modelDigest: string;
111
+ readonly profileDigest: string;
112
+ readonly runtimeDigest: string;
113
+ readonly registryDigest: string;
114
+ readonly entry: Readonly<ScreenReference>;
115
+ readonly screenIndex: readonly {
116
+ route: ScreenReference;
117
+ renderedId: string;
118
+ }[];
119
+ readonly operationIndex: readonly {
120
+ renderedId: string;
121
+ handlerId: string;
122
+ operationId: string;
123
+ executionClass: string;
124
+ operation: JsonObject;
125
+ }[];
126
+ readonly diagnostics: readonly [];
127
+ readonly sourceMap: readonly SourceMapEntry[];
128
+ readonly manifest: {
129
+ readonly appId: string;
130
+ readonly modelDigest: string;
131
+ readonly profileDigest: string;
132
+ readonly registryDigest: string;
133
+ readonly htmlDigest: string;
134
+ readonly runtimeDigest: string;
135
+ readonly executionScope: 'standard-1';
136
+ readonly unsupportedOperations: readonly {
137
+ renderedId: string;
138
+ handlerId: string;
139
+ operationId: string;
140
+ }[];
141
+ };
142
+ }
143
+ declare function createAppBundle(documents: readonly ParsedDocument[], options: CreateAppBundleOptions): AppResult<AppBundle>;
2
144
 
3
145
  /**
4
146
  * Renderer type definitions for wireweave
@@ -237,4 +379,4 @@ interface SiteOptions extends Pick<RenderOptions, 'theme' | 'classPrefix' | 'bac
237
379
  */
238
380
  declare function renderSite(document: WireframeDocument, options?: SiteOptions): string;
239
381
 
240
- export { type AnnotationStyle as A, type CanvasOptions as C, type PageRenderResult as P, type RenderContext as R, type SiteOptions as S, type ThemeColors as T, type CanvasRenderResult as a, type RenderOptions as b, type RenderResult as c, type SvgRenderOptions as d, type SvgRenderResult as e, type ThemeConfig as f, darkTheme as g, defaultTheme as h, getTheme as i, renderSite as r };
382
+ export { type AppResult as A, type CanvasOptions as C, type Diagnostic as D, type InstanceStep as I, type LinkedIdentity as L, type PageRenderResult as P, type RenderContext as R, type SourceMapEntry as S, type ThemeConfig as T, type ScreenReference as a, type LinkedApp as b, type RenderOptions as c, type RenderResult as d, type AnnotationStyle as e, type CanvasRenderResult as f, type SvgRenderOptions as g, type SvgRenderResult as h, type SiteOptions as i, type ThemeColors as j, darkTheme as k, defaultTheme as l, getTheme as m, type AppArtifact as n, type AppBundle as o, type CreateAppBundleOptions as p, createAppBundle as q, renderSite as r };