@motion-core/motion-gpu 0.4.0 → 0.4.2

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 (207) hide show
  1. package/dist/advanced.d.ts +1 -0
  2. package/dist/advanced.d.ts.map +1 -0
  3. package/dist/advanced.js +12 -6
  4. package/dist/core/advanced.d.ts +1 -0
  5. package/dist/core/advanced.d.ts.map +1 -0
  6. package/dist/core/advanced.js +12 -5
  7. package/dist/core/current-value.d.ts +1 -0
  8. package/dist/core/current-value.d.ts.map +1 -0
  9. package/dist/core/current-value.js +35 -34
  10. package/dist/core/current-value.js.map +1 -0
  11. package/dist/core/error-diagnostics.d.ts +1 -0
  12. package/dist/core/error-diagnostics.d.ts.map +1 -0
  13. package/dist/core/error-diagnostics.js +70 -137
  14. package/dist/core/error-diagnostics.js.map +1 -0
  15. package/dist/core/error-report.d.ts +1 -0
  16. package/dist/core/error-report.d.ts.map +1 -0
  17. package/dist/core/error-report.js +184 -233
  18. package/dist/core/error-report.js.map +1 -0
  19. package/dist/core/frame-registry.d.ts +1 -0
  20. package/dist/core/frame-registry.d.ts.map +1 -0
  21. package/dist/core/frame-registry.js +546 -662
  22. package/dist/core/frame-registry.js.map +1 -0
  23. package/dist/core/index.d.ts +1 -0
  24. package/dist/core/index.d.ts.map +1 -0
  25. package/dist/core/index.js +11 -12
  26. package/dist/core/material-preprocess.d.ts +1 -0
  27. package/dist/core/material-preprocess.d.ts.map +1 -0
  28. package/dist/core/material-preprocess.js +128 -151
  29. package/dist/core/material-preprocess.js.map +1 -0
  30. package/dist/core/material.d.ts +1 -0
  31. package/dist/core/material.d.ts.map +1 -0
  32. package/dist/core/material.js +263 -317
  33. package/dist/core/material.js.map +1 -0
  34. package/dist/core/recompile-policy.d.ts +1 -0
  35. package/dist/core/recompile-policy.d.ts.map +1 -0
  36. package/dist/core/recompile-policy.js +18 -13
  37. package/dist/core/recompile-policy.js.map +1 -0
  38. package/dist/core/render-graph.d.ts +1 -0
  39. package/dist/core/render-graph.d.ts.map +1 -0
  40. package/dist/core/render-graph.js +61 -68
  41. package/dist/core/render-graph.js.map +1 -0
  42. package/dist/core/render-targets.d.ts +2 -0
  43. package/dist/core/render-targets.d.ts.map +1 -0
  44. package/dist/core/render-targets.js +52 -53
  45. package/dist/core/render-targets.js.map +1 -0
  46. package/dist/core/renderer.d.ts +1 -0
  47. package/dist/core/renderer.d.ts.map +1 -0
  48. package/dist/core/renderer.js +942 -1081
  49. package/dist/core/renderer.js.map +1 -0
  50. package/dist/core/runtime-loop.d.ts +2 -0
  51. package/dist/core/runtime-loop.d.ts.map +1 -0
  52. package/dist/core/runtime-loop.js +305 -362
  53. package/dist/core/runtime-loop.js.map +1 -0
  54. package/dist/core/scheduler-helpers.d.ts +1 -0
  55. package/dist/core/scheduler-helpers.d.ts.map +1 -0
  56. package/dist/core/scheduler-helpers.js +52 -51
  57. package/dist/core/scheduler-helpers.js.map +1 -0
  58. package/dist/core/shader.d.ts +1 -0
  59. package/dist/core/shader.d.ts.map +1 -0
  60. package/dist/core/shader.js +92 -117
  61. package/dist/core/shader.js.map +1 -0
  62. package/dist/core/texture-loader.d.ts +1 -0
  63. package/dist/core/texture-loader.d.ts.map +1 -0
  64. package/dist/core/texture-loader.js +205 -273
  65. package/dist/core/texture-loader.js.map +1 -0
  66. package/dist/core/textures.d.ts +2 -0
  67. package/dist/core/textures.d.ts.map +1 -0
  68. package/dist/core/textures.js +106 -116
  69. package/dist/core/textures.js.map +1 -0
  70. package/dist/core/types.d.ts +2 -0
  71. package/dist/core/types.d.ts.map +1 -0
  72. package/dist/core/types.js +0 -4
  73. package/dist/core/uniforms.d.ts +1 -0
  74. package/dist/core/uniforms.d.ts.map +1 -0
  75. package/dist/core/uniforms.js +170 -191
  76. package/dist/core/uniforms.js.map +1 -0
  77. package/dist/index.d.ts +1 -0
  78. package/dist/index.d.ts.map +1 -0
  79. package/dist/index.js +11 -6
  80. package/dist/passes/BlitPass.d.ts +1 -0
  81. package/dist/passes/BlitPass.d.ts.map +1 -0
  82. package/dist/passes/BlitPass.js +23 -18
  83. package/dist/passes/BlitPass.js.map +1 -0
  84. package/dist/passes/CopyPass.d.ts +2 -0
  85. package/dist/passes/CopyPass.d.ts.map +1 -0
  86. package/dist/passes/CopyPass.js +58 -52
  87. package/dist/passes/CopyPass.js.map +1 -0
  88. package/dist/passes/FullscreenPass.d.ts +2 -0
  89. package/dist/passes/FullscreenPass.d.ts.map +1 -0
  90. package/dist/passes/FullscreenPass.js +127 -130
  91. package/dist/passes/FullscreenPass.js.map +1 -0
  92. package/dist/passes/ShaderPass.d.ts +1 -0
  93. package/dist/passes/ShaderPass.d.ts.map +1 -0
  94. package/dist/passes/ShaderPass.js +40 -37
  95. package/dist/passes/ShaderPass.js.map +1 -0
  96. package/dist/passes/index.d.ts +1 -0
  97. package/dist/passes/index.d.ts.map +1 -0
  98. package/dist/passes/index.js +4 -3
  99. package/dist/react/FragCanvas.d.ts +2 -0
  100. package/dist/react/FragCanvas.d.ts.map +1 -0
  101. package/dist/react/FragCanvas.js +234 -211
  102. package/dist/react/FragCanvas.js.map +1 -0
  103. package/dist/react/MotionGPUErrorOverlay.d.ts +1 -0
  104. package/dist/react/MotionGPUErrorOverlay.d.ts.map +1 -0
  105. package/dist/react/MotionGPUErrorOverlay.js +384 -48
  106. package/dist/react/MotionGPUErrorOverlay.js.map +1 -0
  107. package/dist/react/Portal.d.ts +1 -0
  108. package/dist/react/Portal.d.ts.map +1 -0
  109. package/dist/react/Portal.js +18 -21
  110. package/dist/react/Portal.js.map +1 -0
  111. package/dist/react/advanced.d.ts +1 -0
  112. package/dist/react/advanced.d.ts.map +1 -0
  113. package/dist/react/advanced.js +12 -6
  114. package/dist/react/frame-context.d.ts +1 -0
  115. package/dist/react/frame-context.d.ts.map +1 -0
  116. package/dist/react/frame-context.js +88 -94
  117. package/dist/react/frame-context.js.map +1 -0
  118. package/dist/react/index.d.ts +1 -0
  119. package/dist/react/index.d.ts.map +1 -0
  120. package/dist/react/index.js +10 -9
  121. package/dist/react/motiongpu-context.d.ts +1 -0
  122. package/dist/react/motiongpu-context.d.ts.map +1 -0
  123. package/dist/react/motiongpu-context.js +18 -15
  124. package/dist/react/motiongpu-context.js.map +1 -0
  125. package/dist/react/use-motiongpu-user-context.d.ts +1 -0
  126. package/dist/react/use-motiongpu-user-context.d.ts.map +1 -0
  127. package/dist/react/use-motiongpu-user-context.js +83 -82
  128. package/dist/react/use-motiongpu-user-context.js.map +1 -0
  129. package/dist/react/use-texture.d.ts +1 -0
  130. package/dist/react/use-texture.d.ts.map +1 -0
  131. package/dist/react/use-texture.js +132 -152
  132. package/dist/react/use-texture.js.map +1 -0
  133. package/dist/svelte/FragCanvas.svelte.d.ts +2 -0
  134. package/dist/svelte/FragCanvas.svelte.d.ts.map +1 -0
  135. package/dist/svelte/MotionGPUErrorOverlay.svelte +17 -20
  136. package/dist/svelte/MotionGPUErrorOverlay.svelte.d.ts +1 -0
  137. package/dist/svelte/MotionGPUErrorOverlay.svelte.d.ts.map +1 -0
  138. package/dist/svelte/Portal.svelte.d.ts +1 -0
  139. package/dist/svelte/Portal.svelte.d.ts.map +1 -0
  140. package/dist/svelte/advanced.d.ts +1 -0
  141. package/dist/svelte/advanced.d.ts.map +1 -0
  142. package/dist/svelte/advanced.js +11 -6
  143. package/dist/svelte/frame-context.d.ts +1 -0
  144. package/dist/svelte/frame-context.d.ts.map +1 -0
  145. package/dist/svelte/frame-context.js +27 -27
  146. package/dist/svelte/frame-context.js.map +1 -0
  147. package/dist/svelte/index.d.ts +1 -0
  148. package/dist/svelte/index.d.ts.map +1 -0
  149. package/dist/svelte/index.js +10 -9
  150. package/dist/svelte/motiongpu-context.d.ts +1 -0
  151. package/dist/svelte/motiongpu-context.d.ts.map +1 -0
  152. package/dist/svelte/motiongpu-context.js +24 -21
  153. package/dist/svelte/motiongpu-context.js.map +1 -0
  154. package/dist/svelte/use-motiongpu-user-context.d.ts +1 -0
  155. package/dist/svelte/use-motiongpu-user-context.d.ts.map +1 -0
  156. package/dist/svelte/use-motiongpu-user-context.js +69 -70
  157. package/dist/svelte/use-motiongpu-user-context.js.map +1 -0
  158. package/dist/svelte/use-texture.d.ts +1 -0
  159. package/dist/svelte/use-texture.d.ts.map +1 -0
  160. package/dist/svelte/use-texture.js +125 -147
  161. package/dist/svelte/use-texture.js.map +1 -0
  162. package/package.json +15 -7
  163. package/src/lib/advanced.ts +6 -0
  164. package/src/lib/core/advanced.ts +12 -0
  165. package/src/lib/core/current-value.ts +64 -0
  166. package/src/lib/core/error-diagnostics.ts +236 -0
  167. package/src/lib/core/error-report.ts +406 -0
  168. package/src/lib/core/frame-registry.ts +1189 -0
  169. package/src/lib/core/index.ts +77 -0
  170. package/src/lib/core/material-preprocess.ts +284 -0
  171. package/src/lib/core/material.ts +667 -0
  172. package/src/lib/core/recompile-policy.ts +31 -0
  173. package/src/lib/core/render-graph.ts +143 -0
  174. package/src/lib/core/render-targets.ts +107 -0
  175. package/src/lib/core/renderer.ts +1547 -0
  176. package/src/lib/core/runtime-loop.ts +458 -0
  177. package/src/lib/core/scheduler-helpers.ts +136 -0
  178. package/src/lib/core/shader.ts +258 -0
  179. package/src/lib/core/texture-loader.ts +476 -0
  180. package/src/lib/core/textures.ts +235 -0
  181. package/src/lib/core/types.ts +582 -0
  182. package/src/lib/core/uniforms.ts +282 -0
  183. package/src/lib/index.ts +6 -0
  184. package/src/lib/passes/BlitPass.ts +54 -0
  185. package/src/lib/passes/CopyPass.ts +80 -0
  186. package/src/lib/passes/FullscreenPass.ts +173 -0
  187. package/src/lib/passes/ShaderPass.ts +88 -0
  188. package/src/lib/passes/index.ts +3 -0
  189. package/src/lib/react/MotionGPUErrorOverlay.tsx +392 -0
  190. package/src/lib/react/advanced.ts +36 -0
  191. package/src/lib/react/frame-context.ts +169 -0
  192. package/src/lib/react/index.ts +51 -0
  193. package/src/lib/react/motiongpu-context.ts +88 -0
  194. package/src/lib/react/use-motiongpu-user-context.ts +186 -0
  195. package/src/lib/react/use-texture.ts +233 -0
  196. package/src/lib/svelte/FragCanvas.svelte +249 -0
  197. package/src/lib/svelte/MotionGPUErrorOverlay.svelte +382 -0
  198. package/src/lib/svelte/Portal.svelte +31 -0
  199. package/src/lib/svelte/advanced.ts +32 -0
  200. package/src/lib/svelte/frame-context.ts +87 -0
  201. package/src/lib/svelte/index.ts +51 -0
  202. package/src/lib/svelte/motiongpu-context.ts +97 -0
  203. package/src/lib/svelte/use-motiongpu-user-context.ts +145 -0
  204. package/src/lib/svelte/use-texture.ts +232 -0
  205. package/dist/react/MotionGPUErrorOverlay.tsx +0 -129
  206. /package/{dist → src/lib}/react/FragCanvas.tsx +0 -0
  207. /package/{dist → src/lib}/react/Portal.tsx +0 -0
@@ -1,249 +1,200 @@
1
- import { getShaderCompilationDiagnostics } from './error-diagnostics.js';
2
- import { formatShaderSourceLocation } from './shader.js';
1
+ import { getShaderCompilationDiagnostics } from "./error-diagnostics.js";
2
+ import { formatShaderSourceLocation } from "./shader.js";
3
+ //#region src/lib/core/error-report.ts
3
4
  /**
4
- * Splits multi-line values into trimmed non-empty lines.
5
- */
5
+ * Splits multi-line values into trimmed non-empty lines.
6
+ */
6
7
  function splitLines(value) {
7
- return value
8
- .split('\n')
9
- .map((line) => line.trim())
10
- .filter((line) => line.length > 0);
8
+ return value.split("\n").map((line) => line.trim()).filter((line) => line.length > 0);
11
9
  }
12
10
  function toDisplayName(path) {
13
- const normalized = path.split(/[?#]/)[0] ?? path;
14
- const chunks = normalized.split(/[\\/]/);
15
- const last = chunks[chunks.length - 1];
16
- return last && last.length > 0 ? last : path;
11
+ const chunks = (path.split(/[?#]/)[0] ?? path).split(/[\\/]/);
12
+ const last = chunks[chunks.length - 1];
13
+ return last && last.length > 0 ? last : path;
17
14
  }
18
15
  function toSnippet(source, line, radius = 3) {
19
- const lines = source.replace(/\r\n?/g, '\n').split('\n');
20
- if (lines.length === 0) {
21
- return [];
22
- }
23
- const targetLine = Math.min(Math.max(1, line), lines.length);
24
- const start = Math.max(1, targetLine - radius);
25
- const end = Math.min(lines.length, targetLine + radius);
26
- const snippet = [];
27
- for (let index = start; index <= end; index += 1) {
28
- snippet.push({
29
- number: index,
30
- code: lines[index - 1] ?? '',
31
- highlight: index === targetLine
32
- });
33
- }
34
- return snippet;
16
+ const lines = source.replace(/\r\n?/g, "\n").split("\n");
17
+ if (lines.length === 0) return [];
18
+ const targetLine = Math.min(Math.max(1, line), lines.length);
19
+ const start = Math.max(1, targetLine - radius);
20
+ const end = Math.min(lines.length, targetLine + radius);
21
+ const snippet = [];
22
+ for (let index = start; index <= end; index += 1) snippet.push({
23
+ number: index,
24
+ code: lines[index - 1] ?? "",
25
+ highlight: index === targetLine
26
+ });
27
+ return snippet;
35
28
  }
36
29
  function buildSourceFromDiagnostics(error) {
37
- const diagnostics = getShaderCompilationDiagnostics(error);
38
- if (!diagnostics || diagnostics.diagnostics.length === 0) {
39
- return null;
40
- }
41
- const primary = diagnostics.diagnostics.find((entry) => entry.sourceLocation !== null);
42
- if (!primary?.sourceLocation) {
43
- return null;
44
- }
45
- const location = primary.sourceLocation;
46
- const column = primary.linePos && primary.linePos > 0 ? primary.linePos : undefined;
47
- if (location.kind === 'fragment') {
48
- const component = diagnostics.materialSource?.component ??
49
- (diagnostics.materialSource?.file
50
- ? toDisplayName(diagnostics.materialSource.file)
51
- : 'User shader fragment');
52
- const locationLabel = formatShaderSourceLocation(location) ?? `fragment line ${location.line}`;
53
- return {
54
- component,
55
- location: `${component} (${locationLabel})`,
56
- line: location.line,
57
- ...(column !== undefined ? { column } : {}),
58
- snippet: toSnippet(diagnostics.fragmentSource, location.line)
59
- };
60
- }
61
- if (location.kind === 'include') {
62
- const includeName = location.include ?? 'unknown';
63
- const includeSource = diagnostics.includeSources[includeName] ?? '';
64
- const component = `#include <${includeName}>`;
65
- const locationLabel = formatShaderSourceLocation(location) ?? `include <${includeName}>`;
66
- return {
67
- component,
68
- location: `${component} (${locationLabel})`,
69
- line: location.line,
70
- ...(column !== undefined ? { column } : {}),
71
- snippet: toSnippet(includeSource, location.line)
72
- };
73
- }
74
- const defineName = location.define ?? 'unknown';
75
- const defineLine = Math.max(1, location.line);
76
- const component = `#define ${defineName}`;
77
- const locationLabel = formatShaderSourceLocation(location) ?? `define "${defineName}" line ${defineLine}`;
78
- return {
79
- component,
80
- location: `${component} (${locationLabel})`,
81
- line: defineLine,
82
- ...(column !== undefined ? { column } : {}),
83
- snippet: toSnippet(diagnostics.defineBlockSource ?? '', defineLine, 2)
84
- };
30
+ const diagnostics = getShaderCompilationDiagnostics(error);
31
+ if (!diagnostics || diagnostics.diagnostics.length === 0) return null;
32
+ const primary = diagnostics.diagnostics.find((entry) => entry.sourceLocation !== null);
33
+ if (!primary?.sourceLocation) return null;
34
+ const location = primary.sourceLocation;
35
+ const column = primary.linePos && primary.linePos > 0 ? primary.linePos : void 0;
36
+ if (location.kind === "fragment") {
37
+ const component = diagnostics.materialSource?.component ?? (diagnostics.materialSource?.file ? toDisplayName(diagnostics.materialSource.file) : "User shader fragment");
38
+ return {
39
+ component,
40
+ location: `${component} (${formatShaderSourceLocation(location) ?? `fragment line ${location.line}`})`,
41
+ line: location.line,
42
+ ...column !== void 0 ? { column } : {},
43
+ snippet: toSnippet(diagnostics.fragmentSource, location.line)
44
+ };
45
+ }
46
+ if (location.kind === "include") {
47
+ const includeName = location.include ?? "unknown";
48
+ const includeSource = diagnostics.includeSources[includeName] ?? "";
49
+ const component = `#include <${includeName}>`;
50
+ return {
51
+ component,
52
+ location: `${component} (${formatShaderSourceLocation(location) ?? `include <${includeName}>`})`,
53
+ line: location.line,
54
+ ...column !== void 0 ? { column } : {},
55
+ snippet: toSnippet(includeSource, location.line)
56
+ };
57
+ }
58
+ const defineName = location.define ?? "unknown";
59
+ const defineLine = Math.max(1, location.line);
60
+ const component = `#define ${defineName}`;
61
+ return {
62
+ component,
63
+ location: `${component} (${formatShaderSourceLocation(location) ?? `define "${defineName}" line ${defineLine}`})`,
64
+ line: defineLine,
65
+ ...column !== void 0 ? { column } : {},
66
+ snippet: toSnippet(diagnostics.defineBlockSource ?? "", defineLine, 2)
67
+ };
85
68
  }
86
69
  function formatDiagnosticMessage(entry) {
87
- const sourceLabel = formatShaderSourceLocation(entry.sourceLocation);
88
- const generatedLineLabel = entry.generatedLine > 0 ? `generated WGSL line ${entry.generatedLine}` : null;
89
- const labels = [sourceLabel, generatedLineLabel].filter((value) => Boolean(value));
90
- if (labels.length === 0) {
91
- return entry.message;
92
- }
93
- return `[${labels.join(' | ')}] ${entry.message}`;
70
+ const labels = [formatShaderSourceLocation(entry.sourceLocation), entry.generatedLine > 0 ? `generated WGSL line ${entry.generatedLine}` : null].filter((value) => Boolean(value));
71
+ if (labels.length === 0) return entry.message;
72
+ return `[${labels.join(" | ")}] ${entry.message}`;
94
73
  }
95
74
  /**
96
- * Maps known WebGPU/WGSL error patterns to a user-facing title and hint.
97
- */
75
+ * Maps known WebGPU/WGSL error patterns to a user-facing title and hint.
76
+ */
98
77
  function classifyErrorMessage(message) {
99
- if (message.includes('WebGPU is not available in this browser')) {
100
- return {
101
- code: 'WEBGPU_UNAVAILABLE',
102
- severity: 'fatal',
103
- recoverable: false,
104
- title: 'WebGPU unavailable',
105
- hint: 'Use a browser with WebGPU enabled (latest Chrome/Edge/Safari TP) and secure context.'
106
- };
107
- }
108
- if (message.includes('Unable to acquire WebGPU adapter')) {
109
- return {
110
- code: 'WEBGPU_ADAPTER_UNAVAILABLE',
111
- severity: 'fatal',
112
- recoverable: false,
113
- title: 'WebGPU adapter unavailable',
114
- hint: 'GPU adapter request failed. Check browser permissions, flags and device support.'
115
- };
116
- }
117
- if (message.includes('Canvas does not support webgpu context')) {
118
- return {
119
- code: 'WEBGPU_CONTEXT_UNAVAILABLE',
120
- severity: 'error',
121
- recoverable: true,
122
- title: 'Canvas cannot create WebGPU context',
123
- hint: 'Make sure this canvas is attached to DOM and not using an unsupported context option.'
124
- };
125
- }
126
- if (message.includes('WGSL compilation failed')) {
127
- return {
128
- code: 'WGSL_COMPILATION_FAILED',
129
- severity: 'error',
130
- recoverable: true,
131
- title: 'WGSL compilation failed',
132
- hint: 'Check WGSL line numbers below and verify struct/binding/function signatures.'
133
- };
134
- }
135
- if (message.includes('WebGPU device lost') || message.includes('Device Lost')) {
136
- return {
137
- code: 'WEBGPU_DEVICE_LOST',
138
- severity: 'fatal',
139
- recoverable: false,
140
- title: 'WebGPU device lost',
141
- hint: 'GPU device/context was lost. Recreate the renderer and check OS/GPU stability.'
142
- };
143
- }
144
- if (message.includes('WebGPU uncaptured error')) {
145
- return {
146
- code: 'WEBGPU_UNCAPTURED_ERROR',
147
- severity: 'error',
148
- recoverable: true,
149
- title: 'WebGPU uncaptured error',
150
- hint: 'A GPU command failed asynchronously. Review details and validate resource/state usage.'
151
- };
152
- }
153
- if (message.includes('CreateBindGroup') || message.includes('bind group layout')) {
154
- return {
155
- code: 'BIND_GROUP_MISMATCH',
156
- severity: 'error',
157
- recoverable: true,
158
- title: 'Bind group mismatch',
159
- hint: 'Bindings in shader and runtime resources are out of sync. Verify uniforms/textures layout.'
160
- };
161
- }
162
- if (message.includes('Destination texture needs to have CopyDst')) {
163
- return {
164
- code: 'TEXTURE_USAGE_INVALID',
165
- severity: 'error',
166
- recoverable: true,
167
- title: 'Invalid texture usage flags',
168
- hint: 'Texture used as upload destination must include CopyDst (and often RenderAttachment).'
169
- };
170
- }
171
- if (message.includes('Texture request failed')) {
172
- return {
173
- code: 'TEXTURE_REQUEST_FAILED',
174
- severity: 'error',
175
- recoverable: true,
176
- title: 'Texture request failed',
177
- hint: 'Verify texture URL, CORS policy and response status before retrying.'
178
- };
179
- }
180
- if (message.includes('createImageBitmap is not available in this runtime')) {
181
- return {
182
- code: 'TEXTURE_DECODE_UNAVAILABLE',
183
- severity: 'fatal',
184
- recoverable: false,
185
- title: 'Texture decode unavailable',
186
- hint: 'Runtime lacks createImageBitmap support. Use a browser/runtime with image bitmap decoding.'
187
- };
188
- }
189
- if (message.toLowerCase().includes('texture request was aborted')) {
190
- return {
191
- code: 'TEXTURE_REQUEST_ABORTED',
192
- severity: 'error',
193
- recoverable: true,
194
- title: 'Texture request aborted',
195
- hint: 'Texture load was cancelled. Retry the request when source inputs stabilize.'
196
- };
197
- }
198
- return {
199
- code: 'MOTIONGPU_RUNTIME_ERROR',
200
- severity: 'error',
201
- recoverable: true,
202
- title: 'MotionGPU render error',
203
- hint: 'Review technical details below. If issue persists, isolate shader/uniform/texture changes.'
204
- };
78
+ if (message.includes("WebGPU is not available in this browser")) return {
79
+ code: "WEBGPU_UNAVAILABLE",
80
+ severity: "fatal",
81
+ recoverable: false,
82
+ title: "WebGPU unavailable",
83
+ hint: "Use a browser with WebGPU enabled (latest Chrome/Edge/Safari TP) and secure context."
84
+ };
85
+ if (message.includes("Unable to acquire WebGPU adapter")) return {
86
+ code: "WEBGPU_ADAPTER_UNAVAILABLE",
87
+ severity: "fatal",
88
+ recoverable: false,
89
+ title: "WebGPU adapter unavailable",
90
+ hint: "GPU adapter request failed. Check browser permissions, flags and device support."
91
+ };
92
+ if (message.includes("Canvas does not support webgpu context")) return {
93
+ code: "WEBGPU_CONTEXT_UNAVAILABLE",
94
+ severity: "error",
95
+ recoverable: true,
96
+ title: "Canvas cannot create WebGPU context",
97
+ hint: "Make sure this canvas is attached to DOM and not using an unsupported context option."
98
+ };
99
+ if (message.includes("WGSL compilation failed")) return {
100
+ code: "WGSL_COMPILATION_FAILED",
101
+ severity: "error",
102
+ recoverable: true,
103
+ title: "WGSL compilation failed",
104
+ hint: "Check WGSL line numbers below and verify struct/binding/function signatures."
105
+ };
106
+ if (message.includes("WebGPU device lost") || message.includes("Device Lost")) return {
107
+ code: "WEBGPU_DEVICE_LOST",
108
+ severity: "fatal",
109
+ recoverable: false,
110
+ title: "WebGPU device lost",
111
+ hint: "GPU device/context was lost. Recreate the renderer and check OS/GPU stability."
112
+ };
113
+ if (message.includes("WebGPU uncaptured error")) return {
114
+ code: "WEBGPU_UNCAPTURED_ERROR",
115
+ severity: "error",
116
+ recoverable: true,
117
+ title: "WebGPU uncaptured error",
118
+ hint: "A GPU command failed asynchronously. Review details and validate resource/state usage."
119
+ };
120
+ if (message.includes("CreateBindGroup") || message.includes("bind group layout")) return {
121
+ code: "BIND_GROUP_MISMATCH",
122
+ severity: "error",
123
+ recoverable: true,
124
+ title: "Bind group mismatch",
125
+ hint: "Bindings in shader and runtime resources are out of sync. Verify uniforms/textures layout."
126
+ };
127
+ if (message.includes("Destination texture needs to have CopyDst")) return {
128
+ code: "TEXTURE_USAGE_INVALID",
129
+ severity: "error",
130
+ recoverable: true,
131
+ title: "Invalid texture usage flags",
132
+ hint: "Texture used as upload destination must include CopyDst (and often RenderAttachment)."
133
+ };
134
+ if (message.includes("Texture request failed")) return {
135
+ code: "TEXTURE_REQUEST_FAILED",
136
+ severity: "error",
137
+ recoverable: true,
138
+ title: "Texture request failed",
139
+ hint: "Verify texture URL, CORS policy and response status before retrying."
140
+ };
141
+ if (message.includes("createImageBitmap is not available in this runtime")) return {
142
+ code: "TEXTURE_DECODE_UNAVAILABLE",
143
+ severity: "fatal",
144
+ recoverable: false,
145
+ title: "Texture decode unavailable",
146
+ hint: "Runtime lacks createImageBitmap support. Use a browser/runtime with image bitmap decoding."
147
+ };
148
+ if (message.toLowerCase().includes("texture request was aborted")) return {
149
+ code: "TEXTURE_REQUEST_ABORTED",
150
+ severity: "error",
151
+ recoverable: true,
152
+ title: "Texture request aborted",
153
+ hint: "Texture load was cancelled. Retry the request when source inputs stabilize."
154
+ };
155
+ return {
156
+ code: "MOTIONGPU_RUNTIME_ERROR",
157
+ severity: "error",
158
+ recoverable: true,
159
+ title: "MotionGPU render error",
160
+ hint: "Review technical details below. If issue persists, isolate shader/uniform/texture changes."
161
+ };
205
162
  }
206
163
  /**
207
- * Converts unknown errors to a consistent, display-ready error report.
208
- *
209
- * @param error - Unknown thrown value.
210
- * @param phase - Phase during which error occurred.
211
- * @returns Normalized error report.
212
- */
213
- export function toMotionGPUErrorReport(error, phase) {
214
- const shaderDiagnostics = getShaderCompilationDiagnostics(error);
215
- const rawMessage = error instanceof Error
216
- ? error.message
217
- : typeof error === 'string'
218
- ? error
219
- : 'Unknown FragCanvas error';
220
- const rawLines = splitLines(rawMessage);
221
- const defaultMessage = rawLines[0] ?? rawMessage;
222
- const defaultDetails = rawLines.slice(1);
223
- const source = buildSourceFromDiagnostics(error);
224
- const context = shaderDiagnostics?.runtimeContext ?? null;
225
- const message = shaderDiagnostics && shaderDiagnostics.diagnostics[0]
226
- ? formatDiagnosticMessage(shaderDiagnostics.diagnostics[0])
227
- : defaultMessage;
228
- const details = shaderDiagnostics
229
- ? shaderDiagnostics.diagnostics.slice(1).map((entry) => formatDiagnosticMessage(entry))
230
- : defaultDetails;
231
- const stack = error instanceof Error && error.stack
232
- ? splitLines(error.stack).filter((line) => line !== message)
233
- : [];
234
- const classification = classifyErrorMessage(rawMessage);
235
- return {
236
- code: classification.code,
237
- severity: classification.severity,
238
- recoverable: classification.recoverable,
239
- title: classification.title,
240
- message,
241
- hint: classification.hint,
242
- details,
243
- stack,
244
- rawMessage,
245
- phase,
246
- source,
247
- context
248
- };
164
+ * Converts unknown errors to a consistent, display-ready error report.
165
+ *
166
+ * @param error - Unknown thrown value.
167
+ * @param phase - Phase during which error occurred.
168
+ * @returns Normalized error report.
169
+ */
170
+ function toMotionGPUErrorReport(error, phase) {
171
+ const shaderDiagnostics = getShaderCompilationDiagnostics(error);
172
+ const rawMessage = error instanceof Error ? error.message : typeof error === "string" ? error : "Unknown FragCanvas error";
173
+ const rawLines = splitLines(rawMessage);
174
+ const defaultMessage = rawLines[0] ?? rawMessage;
175
+ const defaultDetails = rawLines.slice(1);
176
+ const source = buildSourceFromDiagnostics(error);
177
+ const context = shaderDiagnostics?.runtimeContext ?? null;
178
+ const message = shaderDiagnostics && shaderDiagnostics.diagnostics[0] ? formatDiagnosticMessage(shaderDiagnostics.diagnostics[0]) : defaultMessage;
179
+ const details = shaderDiagnostics ? shaderDiagnostics.diagnostics.slice(1).map((entry) => formatDiagnosticMessage(entry)) : defaultDetails;
180
+ const stack = error instanceof Error && error.stack ? splitLines(error.stack).filter((line) => line !== message) : [];
181
+ const classification = classifyErrorMessage(rawMessage);
182
+ return {
183
+ code: classification.code,
184
+ severity: classification.severity,
185
+ recoverable: classification.recoverable,
186
+ title: classification.title,
187
+ message,
188
+ hint: classification.hint,
189
+ details,
190
+ stack,
191
+ rawMessage,
192
+ phase,
193
+ source,
194
+ context
195
+ };
249
196
  }
197
+ //#endregion
198
+ export { toMotionGPUErrorReport };
199
+
200
+ //# sourceMappingURL=error-report.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"error-report.js","names":[],"sources":["../../src/lib/core/error-report.ts"],"sourcesContent":["import {\n\tgetShaderCompilationDiagnostics,\n\ttype ShaderCompilationDiagnostic\n} from './error-diagnostics.js';\nimport { formatShaderSourceLocation } from './shader.js';\n\n/**\n * Runtime phase in which an error occurred.\n */\nexport type MotionGPUErrorPhase = 'initialization' | 'render';\n\n/**\n * Stable machine-readable error category code.\n */\nexport type MotionGPUErrorCode =\n\t| 'WEBGPU_UNAVAILABLE'\n\t| 'WEBGPU_ADAPTER_UNAVAILABLE'\n\t| 'WEBGPU_CONTEXT_UNAVAILABLE'\n\t| 'WGSL_COMPILATION_FAILED'\n\t| 'WEBGPU_DEVICE_LOST'\n\t| 'WEBGPU_UNCAPTURED_ERROR'\n\t| 'BIND_GROUP_MISMATCH'\n\t| 'TEXTURE_USAGE_INVALID'\n\t| 'TEXTURE_REQUEST_FAILED'\n\t| 'TEXTURE_DECODE_UNAVAILABLE'\n\t| 'TEXTURE_REQUEST_ABORTED'\n\t| 'MOTIONGPU_RUNTIME_ERROR';\n\n/**\n * Severity level for user-facing diagnostics.\n */\nexport type MotionGPUErrorSeverity = 'error' | 'fatal';\n\n/**\n * One source-code line displayed in diagnostics snippet.\n */\nexport interface MotionGPUErrorSourceLine {\n\tnumber: number;\n\tcode: string;\n\thighlight: boolean;\n}\n\n/**\n * Structured source context displayed for shader compilation errors.\n */\nexport interface MotionGPUErrorSource {\n\tcomponent: string;\n\tlocation: string;\n\tline: number;\n\tcolumn?: number;\n\tsnippet: MotionGPUErrorSourceLine[];\n}\n\n/**\n * Optional runtime context captured with diagnostics payload.\n */\nexport interface MotionGPUErrorContext {\n\tmaterialSignature?: string;\n\tpassGraph?: {\n\t\tpassCount: number;\n\t\tenabledPassCount: number;\n\t\tinputs: string[];\n\t\toutputs: string[];\n\t};\n\tactiveRenderTargets: string[];\n}\n\n/**\n * Structured error payload used by UI diagnostics.\n */\nexport interface MotionGPUErrorReport {\n\t/**\n\t * Stable machine-readable category code.\n\t */\n\tcode: MotionGPUErrorCode;\n\t/**\n\t * Severity level used by diagnostics UIs and telemetry.\n\t */\n\tseverity: MotionGPUErrorSeverity;\n\t/**\n\t * Whether runtime may recover without full renderer re-creation.\n\t */\n\trecoverable: boolean;\n\t/**\n\t * Short category title.\n\t */\n\ttitle: string;\n\t/**\n\t * Primary human-readable message.\n\t */\n\tmessage: string;\n\t/**\n\t * Suggested remediation hint.\n\t */\n\thint: string;\n\t/**\n\t * Additional parsed details (for example WGSL line errors).\n\t */\n\tdetails: string[];\n\t/**\n\t * Stack trace lines when available.\n\t */\n\tstack: string[];\n\t/**\n\t * Original unmodified message.\n\t */\n\trawMessage: string;\n\t/**\n\t * Runtime phase where the error occurred.\n\t */\n\tphase: MotionGPUErrorPhase;\n\t/**\n\t * Optional source context for shader-related diagnostics.\n\t */\n\tsource: MotionGPUErrorSource | null;\n\t/**\n\t * Optional runtime context snapshot (material/pass graph/render targets).\n\t */\n\tcontext: MotionGPUErrorContext | null;\n}\n\n/**\n * Splits multi-line values into trimmed non-empty lines.\n */\nfunction splitLines(value: string): string[] {\n\treturn value\n\t\t.split('\\n')\n\t\t.map((line) => line.trim())\n\t\t.filter((line) => line.length > 0);\n}\n\nfunction toDisplayName(path: string): string {\n\tconst normalized = path.split(/[?#]/)[0] ?? path;\n\tconst chunks = normalized.split(/[\\\\/]/);\n\tconst last = chunks[chunks.length - 1];\n\treturn last && last.length > 0 ? last : path;\n}\n\nfunction toSnippet(source: string, line: number, radius = 3): MotionGPUErrorSourceLine[] {\n\tconst lines = source.replace(/\\r\\n?/g, '\\n').split('\\n');\n\tif (lines.length === 0) {\n\t\treturn [];\n\t}\n\n\tconst targetLine = Math.min(Math.max(1, line), lines.length);\n\tconst start = Math.max(1, targetLine - radius);\n\tconst end = Math.min(lines.length, targetLine + radius);\n\tconst snippet: MotionGPUErrorSourceLine[] = [];\n\n\tfor (let index = start; index <= end; index += 1) {\n\t\tsnippet.push({\n\t\t\tnumber: index,\n\t\t\tcode: lines[index - 1] ?? '',\n\t\t\thighlight: index === targetLine\n\t\t});\n\t}\n\n\treturn snippet;\n}\n\nfunction buildSourceFromDiagnostics(error: unknown): MotionGPUErrorSource | null {\n\tconst diagnostics = getShaderCompilationDiagnostics(error);\n\tif (!diagnostics || diagnostics.diagnostics.length === 0) {\n\t\treturn null;\n\t}\n\n\tconst primary = diagnostics.diagnostics.find((entry) => entry.sourceLocation !== null);\n\tif (!primary?.sourceLocation) {\n\t\treturn null;\n\t}\n\n\tconst location = primary.sourceLocation;\n\tconst column = primary.linePos && primary.linePos > 0 ? primary.linePos : undefined;\n\n\tif (location.kind === 'fragment') {\n\t\tconst component =\n\t\t\tdiagnostics.materialSource?.component ??\n\t\t\t(diagnostics.materialSource?.file\n\t\t\t\t? toDisplayName(diagnostics.materialSource.file)\n\t\t\t\t: 'User shader fragment');\n\t\tconst locationLabel = formatShaderSourceLocation(location) ?? `fragment line ${location.line}`;\n\t\treturn {\n\t\t\tcomponent,\n\t\t\tlocation: `${component} (${locationLabel})`,\n\t\t\tline: location.line,\n\t\t\t...(column !== undefined ? { column } : {}),\n\t\t\tsnippet: toSnippet(diagnostics.fragmentSource, location.line)\n\t\t};\n\t}\n\n\tif (location.kind === 'include') {\n\t\tconst includeName = location.include ?? 'unknown';\n\t\tconst includeSource = diagnostics.includeSources[includeName] ?? '';\n\t\tconst component = `#include <${includeName}>`;\n\t\tconst locationLabel = formatShaderSourceLocation(location) ?? `include <${includeName}>`;\n\t\treturn {\n\t\t\tcomponent,\n\t\t\tlocation: `${component} (${locationLabel})`,\n\t\t\tline: location.line,\n\t\t\t...(column !== undefined ? { column } : {}),\n\t\t\tsnippet: toSnippet(includeSource, location.line)\n\t\t};\n\t}\n\n\tconst defineName = location.define ?? 'unknown';\n\tconst defineLine = Math.max(1, location.line);\n\tconst component = `#define ${defineName}`;\n\tconst locationLabel =\n\t\tformatShaderSourceLocation(location) ?? `define \"${defineName}\" line ${defineLine}`;\n\treturn {\n\t\tcomponent,\n\t\tlocation: `${component} (${locationLabel})`,\n\t\tline: defineLine,\n\t\t...(column !== undefined ? { column } : {}),\n\t\tsnippet: toSnippet(diagnostics.defineBlockSource ?? '', defineLine, 2)\n\t};\n}\n\nfunction formatDiagnosticMessage(entry: ShaderCompilationDiagnostic): string {\n\tconst sourceLabel = formatShaderSourceLocation(entry.sourceLocation);\n\tconst generatedLineLabel =\n\t\tentry.generatedLine > 0 ? `generated WGSL line ${entry.generatedLine}` : null;\n\tconst labels = [sourceLabel, generatedLineLabel].filter((value) => Boolean(value));\n\tif (labels.length === 0) {\n\t\treturn entry.message;\n\t}\n\n\treturn `[${labels.join(' | ')}] ${entry.message}`;\n}\n\n/**\n * Maps known WebGPU/WGSL error patterns to a user-facing title and hint.\n */\nfunction classifyErrorMessage(\n\tmessage: string\n): Pick<MotionGPUErrorReport, 'code' | 'severity' | 'recoverable' | 'title' | 'hint'> {\n\tif (message.includes('WebGPU is not available in this browser')) {\n\t\treturn {\n\t\t\tcode: 'WEBGPU_UNAVAILABLE',\n\t\t\tseverity: 'fatal',\n\t\t\trecoverable: false,\n\t\t\ttitle: 'WebGPU unavailable',\n\t\t\thint: 'Use a browser with WebGPU enabled (latest Chrome/Edge/Safari TP) and secure context.'\n\t\t};\n\t}\n\n\tif (message.includes('Unable to acquire WebGPU adapter')) {\n\t\treturn {\n\t\t\tcode: 'WEBGPU_ADAPTER_UNAVAILABLE',\n\t\t\tseverity: 'fatal',\n\t\t\trecoverable: false,\n\t\t\ttitle: 'WebGPU adapter unavailable',\n\t\t\thint: 'GPU adapter request failed. Check browser permissions, flags and device support.'\n\t\t};\n\t}\n\n\tif (message.includes('Canvas does not support webgpu context')) {\n\t\treturn {\n\t\t\tcode: 'WEBGPU_CONTEXT_UNAVAILABLE',\n\t\t\tseverity: 'error',\n\t\t\trecoverable: true,\n\t\t\ttitle: 'Canvas cannot create WebGPU context',\n\t\t\thint: 'Make sure this canvas is attached to DOM and not using an unsupported context option.'\n\t\t};\n\t}\n\n\tif (message.includes('WGSL compilation failed')) {\n\t\treturn {\n\t\t\tcode: 'WGSL_COMPILATION_FAILED',\n\t\t\tseverity: 'error',\n\t\t\trecoverable: true,\n\t\t\ttitle: 'WGSL compilation failed',\n\t\t\thint: 'Check WGSL line numbers below and verify struct/binding/function signatures.'\n\t\t};\n\t}\n\n\tif (message.includes('WebGPU device lost') || message.includes('Device Lost')) {\n\t\treturn {\n\t\t\tcode: 'WEBGPU_DEVICE_LOST',\n\t\t\tseverity: 'fatal',\n\t\t\trecoverable: false,\n\t\t\ttitle: 'WebGPU device lost',\n\t\t\thint: 'GPU device/context was lost. Recreate the renderer and check OS/GPU stability.'\n\t\t};\n\t}\n\n\tif (message.includes('WebGPU uncaptured error')) {\n\t\treturn {\n\t\t\tcode: 'WEBGPU_UNCAPTURED_ERROR',\n\t\t\tseverity: 'error',\n\t\t\trecoverable: true,\n\t\t\ttitle: 'WebGPU uncaptured error',\n\t\t\thint: 'A GPU command failed asynchronously. Review details and validate resource/state usage.'\n\t\t};\n\t}\n\n\tif (message.includes('CreateBindGroup') || message.includes('bind group layout')) {\n\t\treturn {\n\t\t\tcode: 'BIND_GROUP_MISMATCH',\n\t\t\tseverity: 'error',\n\t\t\trecoverable: true,\n\t\t\ttitle: 'Bind group mismatch',\n\t\t\thint: 'Bindings in shader and runtime resources are out of sync. Verify uniforms/textures layout.'\n\t\t};\n\t}\n\n\tif (message.includes('Destination texture needs to have CopyDst')) {\n\t\treturn {\n\t\t\tcode: 'TEXTURE_USAGE_INVALID',\n\t\t\tseverity: 'error',\n\t\t\trecoverable: true,\n\t\t\ttitle: 'Invalid texture usage flags',\n\t\t\thint: 'Texture used as upload destination must include CopyDst (and often RenderAttachment).'\n\t\t};\n\t}\n\n\tif (message.includes('Texture request failed')) {\n\t\treturn {\n\t\t\tcode: 'TEXTURE_REQUEST_FAILED',\n\t\t\tseverity: 'error',\n\t\t\trecoverable: true,\n\t\t\ttitle: 'Texture request failed',\n\t\t\thint: 'Verify texture URL, CORS policy and response status before retrying.'\n\t\t};\n\t}\n\n\tif (message.includes('createImageBitmap is not available in this runtime')) {\n\t\treturn {\n\t\t\tcode: 'TEXTURE_DECODE_UNAVAILABLE',\n\t\t\tseverity: 'fatal',\n\t\t\trecoverable: false,\n\t\t\ttitle: 'Texture decode unavailable',\n\t\t\thint: 'Runtime lacks createImageBitmap support. Use a browser/runtime with image bitmap decoding.'\n\t\t};\n\t}\n\n\tif (message.toLowerCase().includes('texture request was aborted')) {\n\t\treturn {\n\t\t\tcode: 'TEXTURE_REQUEST_ABORTED',\n\t\t\tseverity: 'error',\n\t\t\trecoverable: true,\n\t\t\ttitle: 'Texture request aborted',\n\t\t\thint: 'Texture load was cancelled. Retry the request when source inputs stabilize.'\n\t\t};\n\t}\n\n\treturn {\n\t\tcode: 'MOTIONGPU_RUNTIME_ERROR',\n\t\tseverity: 'error',\n\t\trecoverable: true,\n\t\ttitle: 'MotionGPU render error',\n\t\thint: 'Review technical details below. If issue persists, isolate shader/uniform/texture changes.'\n\t};\n}\n\n/**\n * Converts unknown errors to a consistent, display-ready error report.\n *\n * @param error - Unknown thrown value.\n * @param phase - Phase during which error occurred.\n * @returns Normalized error report.\n */\nexport function toMotionGPUErrorReport(\n\terror: unknown,\n\tphase: MotionGPUErrorPhase\n): MotionGPUErrorReport {\n\tconst shaderDiagnostics = getShaderCompilationDiagnostics(error);\n\tconst rawMessage =\n\t\terror instanceof Error\n\t\t\t? error.message\n\t\t\t: typeof error === 'string'\n\t\t\t\t? error\n\t\t\t\t: 'Unknown FragCanvas error';\n\tconst rawLines = splitLines(rawMessage);\n\tconst defaultMessage = rawLines[0] ?? rawMessage;\n\tconst defaultDetails = rawLines.slice(1);\n\tconst source = buildSourceFromDiagnostics(error);\n\tconst context = shaderDiagnostics?.runtimeContext ?? null;\n\tconst message =\n\t\tshaderDiagnostics && shaderDiagnostics.diagnostics[0]\n\t\t\t? formatDiagnosticMessage(shaderDiagnostics.diagnostics[0])\n\t\t\t: defaultMessage;\n\tconst details = shaderDiagnostics\n\t\t? shaderDiagnostics.diagnostics.slice(1).map((entry) => formatDiagnosticMessage(entry))\n\t\t: defaultDetails;\n\tconst stack =\n\t\terror instanceof Error && error.stack\n\t\t\t? splitLines(error.stack).filter((line) => line !== message)\n\t\t\t: [];\n\tconst classification = classifyErrorMessage(rawMessage);\n\n\treturn {\n\t\tcode: classification.code,\n\t\tseverity: classification.severity,\n\t\trecoverable: classification.recoverable,\n\t\ttitle: classification.title,\n\t\tmessage,\n\t\thint: classification.hint,\n\t\tdetails,\n\t\tstack,\n\t\trawMessage,\n\t\tphase,\n\t\tsource,\n\t\tcontext\n\t};\n}\n"],"mappings":";;;;;;AA4HA,SAAS,WAAW,OAAyB;AAC5C,QAAO,MACL,MAAM,KAAK,CACX,KAAK,SAAS,KAAK,MAAM,CAAC,CAC1B,QAAQ,SAAS,KAAK,SAAS,EAAE;;AAGpC,SAAS,cAAc,MAAsB;CAE5C,MAAM,UADa,KAAK,MAAM,OAAO,CAAC,MAAM,MAClB,MAAM,QAAQ;CACxC,MAAM,OAAO,OAAO,OAAO,SAAS;AACpC,QAAO,QAAQ,KAAK,SAAS,IAAI,OAAO;;AAGzC,SAAS,UAAU,QAAgB,MAAc,SAAS,GAA+B;CACxF,MAAM,QAAQ,OAAO,QAAQ,UAAU,KAAK,CAAC,MAAM,KAAK;AACxD,K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AM,EAAE,CAAC,KAAK,UAAU,wBAAwB,MAAM,CAAC,GACrF;CACH,MAAM,QACL,iBAAiB,SAAS,MAAM,QAC7B,WAAW,MAAM,MAAM,CAAC,QAAQ,SAAS,SAAS,QAAQ,GAC1D,EAAE;CACN,MAAM,iBAAiB,qBAAqB,WAAW;AAEvD,QAAO;EACN,MAAM,eAAe;EACrB,UAAU,eAAe;EACzB,aAAa,eAAe;EAC5B,OAAO,eAAe;EACtB;EACA,MAAM,eAAe;EACrB;EACA;EACA;EACA;EACA;EACA;EACA"}
@@ -271,3 +271,4 @@ export declare function createFrameRegistry(options?: {
271
271
  diagnosticsEnabled?: boolean;
272
272
  }): FrameRegistry;
273
273
  export {};
274
+ //# sourceMappingURL=frame-registry.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"frame-registry.d.ts","sourceRoot":"","sources":["../../src/lib/core/frame-registry.ts"],"names":[],"mappings":"AAAA,OAAO,EAA+C,KAAK,YAAY,EAAE,MAAM,oBAAoB,CAAC;AACpG,OAAO,KAAK,EAAE,sBAAsB,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAEjF;;GAEG;AACH,MAAM,MAAM,aAAa,GAAG,CAAC,KAAK,EAAE,UAAU,KAAK,IAAI,CAAC;AAExD;;GAEG;AACH,MAAM,MAAM,QAAQ,GAAG,MAAM,GAAG,MAAM,CAAC;AAEvC;;GAEG;AACH,MAAM,WAAW,SAAS;IACzB,GAAG,EAAE,QAAQ,CAAC;IACd,KAAK,EAAE,QAAQ,CAAC;CAChB;AAED;;GAEG;AACH,MAAM,WAAW,UAAU;IAC1B,GAAG,EAAE,QAAQ,CAAC;CACd;AAED;;GAEG;AACH,MAAM,MAAM,kBAAkB,GAAG,CAAC,KAAK,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,IAAI,KAAK,IAAI,CAAC;AAEnF;;GAEG;AACH,MAAM,WAAW,eAAe;IAC/B;;;;OAIG;IACH,SAAS,CAAC,EAAE,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