@pixel-point/toolcraft 0.0.15 → 0.0.17

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 (1273) hide show
  1. package/package.json +1 -1
  2. package/src/cli-package-manager-flow.test.mjs +9 -2
  3. package/src/cli.test.mjs +11 -16
  4. package/src/create-command.mjs +10 -4
  5. package/src/generate-demand-only-lifecycle.test.mjs +102 -0
  6. package/src/generate-performance-iteration-execution.test.mjs +105 -0
  7. package/src/generate-test-assertions.mjs +2 -0
  8. package/src/generate-test-browser-execution-ledger.mjs +138 -0
  9. package/src/generate-test-browser-execution-ledger.test.mjs +87 -0
  10. package/src/generate-test-delivery-architecture-assertions.mjs +137 -0
  11. package/src/generate-test-demand-only-lifecycle.mjs +314 -0
  12. package/src/generate-test-dependency-sandbox.mjs +195 -0
  13. package/src/generate-test-doc-assertions.mjs +336 -10
  14. package/src/generate-test-doc-assertions.test.mjs +65 -0
  15. package/src/generate-test-file-assertions.mjs +258 -53
  16. package/src/generate-test-fs-utils.mjs +4 -1
  17. package/src/generate-test-integrity-assertions.mjs +70 -3
  18. package/src/generate-test-integrity-framework-assertions.mjs +31 -1
  19. package/src/generate-test-integrity-manifest-assertions.mjs +58 -0
  20. package/src/generate-test-integrity-ownership-assertions.mjs +35 -2
  21. package/src/generate-test-managed-process.mjs +287 -0
  22. package/src/generate-test-managed-process.test.mjs +340 -0
  23. package/src/generate-test-output-assertions.mjs +95 -0
  24. package/src/generate-test-package-assertions.mjs +81 -11
  25. package/src/generate-test-performance-boundary-assertions.mjs +45 -0
  26. package/src/generate-test-product-fixture.mjs +86 -7
  27. package/src/generate-test-product-fixture.test.mjs +245 -0
  28. package/src/generate-test-product-iteration.mjs +279 -0
  29. package/src/generate-test-product-iteration.test.mjs +242 -0
  30. package/src/generate-test-standalone-assertions.mjs +87 -149
  31. package/src/generate-test-standalone-delivery-stages.mjs +194 -0
  32. package/src/generate-test-windows-job-native.cs +496 -0
  33. package/src/generate-test-windows-job-wrapper.mjs +40 -0
  34. package/src/generate-test-windows-job.mjs +47 -0
  35. package/src/generate-test-windows-job.ps1 +17 -0
  36. package/src/generate.mjs +26 -0
  37. package/src/generate.test.mjs +90 -14
  38. package/src/generated-integrity-manifest.test.mjs +51 -2
  39. package/src/generated-source-policy.mjs +1 -1
  40. package/src/generated-source-policy.test.mjs +15 -2
  41. package/src/import-map.mjs +12 -0
  42. package/src/package-json.mjs +7 -6
  43. package/src/package-json.test.mjs +55 -31
  44. package/src/package-manager.mjs +71 -33
  45. package/src/package-manager.test.mjs +101 -18
  46. package/src/packaged-template-fallback.test.mjs +4 -0
  47. package/src/rewrite-imports.mjs +3 -0
  48. package/src/rewrite-imports.test.mjs +16 -1
  49. package/templates/runtime/contracts/component-contracts.choices.test.ts +59 -13
  50. package/templates/runtime/contracts/component-contracts.choices.ts +61 -17
  51. package/templates/runtime/contracts/component-contracts.inputs.test.ts +2 -2
  52. package/templates/runtime/contracts/component-contracts.inputs.ts +2 -2
  53. package/templates/runtime/contracts/component-contracts.media-custom.test.ts +19 -0
  54. package/templates/runtime/contracts/component-contracts.media-custom.ts +18 -2
  55. package/templates/runtime/contracts/component-contracts.runtime-acceptance.test.ts +67 -78
  56. package/templates/runtime/contracts/component-contracts.runtime-labels.test.ts +1 -1
  57. package/templates/runtime/contracts/component-contracts.runtime-panels.test.ts +17 -3
  58. package/templates/runtime/contracts/component-contracts.runtime-shell.test.ts +24 -8
  59. package/templates/runtime/contracts/component-contracts.runtime.ts +82 -40
  60. package/templates/runtime/contracts/component-contracts.test.ts +6 -1
  61. package/templates/runtime/contracts/component-contracts.visual.test.ts +44 -5
  62. package/templates/runtime/contracts/component-contracts.visual.ts +64 -17
  63. package/templates/runtime/contracts/decision-contracts.test.ts +127 -11
  64. package/templates/runtime/contracts/decision-contracts.ts +84 -7
  65. package/templates/runtime/contracts/index.ts +2 -0
  66. package/templates/runtime/contracts/performance-request-classifier-descriptions.ts +39 -0
  67. package/templates/runtime/contracts/performance-request-classifier-rules.ts +181 -0
  68. package/templates/runtime/contracts/performance-request-classifier-types.ts +50 -0
  69. package/templates/runtime/contracts/performance-request-classifier.test.ts +269 -0
  70. package/templates/runtime/contracts/performance-request-classifier.ts +224 -0
  71. package/templates/runtime/contracts/performance-request-evidence-policy.d.mts +21 -0
  72. package/templates/runtime/contracts/performance-request-evidence-policy.mjs +39 -0
  73. package/templates/runtime/contracts/performance-verification-policy.test.ts +182 -0
  74. package/templates/runtime/contracts/performance-verification-policy.ts +52 -0
  75. package/templates/runtime/contracts/segmented-control-fit.test.ts +71 -0
  76. package/templates/runtime/contracts/segmented-control-fit.ts +38 -0
  77. package/templates/runtime/export/artifact-download.test.ts +71 -0
  78. package/templates/runtime/export/artifact-download.ts +80 -0
  79. package/templates/runtime/export/artifact-export-request.ts +23 -0
  80. package/templates/runtime/export/artifact-export-settings.test.ts +75 -0
  81. package/templates/runtime/export/artifact-export-settings.ts +96 -0
  82. package/templates/runtime/export/artifact-frame-renderer.test.ts +107 -0
  83. package/templates/runtime/export/artifact-frame-renderer.ts +96 -0
  84. package/templates/runtime/export/artifact-frame-state.test.ts +54 -0
  85. package/templates/runtime/export/artifact-frame-state.ts +44 -0
  86. package/templates/runtime/export/artifact-scene-frame.test.ts +84 -0
  87. package/templates/runtime/export/artifact-scene-frame.ts +118 -0
  88. package/templates/runtime/export/export-background.ts +65 -0
  89. package/templates/runtime/export/export-error.ts +43 -0
  90. package/templates/runtime/export/export-frame.test.ts +80 -0
  91. package/templates/runtime/export/export-frame.ts +107 -0
  92. package/templates/runtime/export/export-sizing.ts +136 -0
  93. package/templates/runtime/export/export.test.ts +24 -135
  94. package/templates/runtime/export/image-artifact-export.test.ts +111 -0
  95. package/templates/runtime/export/image-artifact-export.ts +145 -0
  96. package/templates/runtime/export/index.ts +16 -1
  97. package/templates/runtime/export/product-export-renderer.test.ts +77 -0
  98. package/templates/runtime/export/product-export-renderer.ts +63 -0
  99. package/templates/runtime/export/video-artifact-export.test.ts +166 -0
  100. package/templates/runtime/export/video-artifact-export.ts +164 -0
  101. package/templates/runtime/export/video-encoding-backend.ts +124 -0
  102. package/templates/runtime/export/video-encoding-policy.test.ts +68 -0
  103. package/templates/runtime/export/video-encoding-policy.ts +86 -0
  104. package/templates/runtime/export/video-frame-schedule.test.ts +58 -0
  105. package/templates/runtime/export/video-frame-schedule.ts +42 -0
  106. package/templates/runtime/index.ts +11 -0
  107. package/templates/runtime/model-import/canonical/index.ts +39 -0
  108. package/templates/runtime/model-import/canonical/model-appearance-data-uri.test.ts +43 -0
  109. package/templates/runtime/model-import/canonical/model-appearance-data-uri.ts +79 -0
  110. package/templates/runtime/model-import/canonical/model-appearance-image.ts +111 -0
  111. package/templates/runtime/model-import/canonical/model-appearance-input-snapshot.ts +189 -0
  112. package/templates/runtime/model-import/canonical/model-appearance-resource.test.ts +116 -0
  113. package/templates/runtime/model-import/canonical/model-appearance-resource.ts +165 -0
  114. package/templates/runtime/model-import/canonical/model-appearance-validation.test.ts +197 -0
  115. package/templates/runtime/model-import/canonical/model-appearance-validation.ts +458 -0
  116. package/templates/runtime/model-import/canonical/model-document-codec-adversarial.test.ts +151 -0
  117. package/templates/runtime/model-import/canonical/model-document-codec-appearance-metadata.ts +336 -0
  118. package/templates/runtime/model-import/canonical/model-document-codec-closure.test.ts +125 -0
  119. package/templates/runtime/model-import/canonical/model-document-codec-envelope.ts +363 -0
  120. package/templates/runtime/model-import/canonical/model-document-codec-error.ts +57 -0
  121. package/templates/runtime/model-import/canonical/model-document-codec-format.ts +83 -0
  122. package/templates/runtime/model-import/canonical/model-document-codec-layout.ts +163 -0
  123. package/templates/runtime/model-import/canonical/model-document-codec-metadata-adversarial.test.ts +169 -0
  124. package/templates/runtime/model-import/canonical/model-document-codec-metadata-preflight.ts +371 -0
  125. package/templates/runtime/model-import/canonical/model-document-codec-metadata-reader.ts +142 -0
  126. package/templates/runtime/model-import/canonical/model-document-codec-metadata.ts +420 -0
  127. package/templates/runtime/model-import/canonical/model-document-codec-payload.ts +311 -0
  128. package/templates/runtime/model-import/canonical/model-document-codec.test.ts +450 -0
  129. package/templates/runtime/model-import/canonical/model-document-codec.ts +161 -0
  130. package/templates/runtime/model-import/canonical/model-document-digest.ts +13 -0
  131. package/templates/runtime/model-import/canonical/model-document-hostile-decode.test.ts +100 -0
  132. package/templates/runtime/model-import/canonical/model-document-hostile-input.test.ts +140 -0
  133. package/templates/runtime/model-import/canonical/model-document-input-reader.ts +153 -0
  134. package/templates/runtime/model-import/canonical/model-document-input-snapshot.ts +413 -0
  135. package/templates/runtime/model-import/canonical/model-document-limit-options.test.ts +155 -0
  136. package/templates/runtime/model-import/canonical/model-document-limits.ts +151 -0
  137. package/templates/runtime/model-import/canonical/model-document-owned-geometry.test.ts +138 -0
  138. package/templates/runtime/model-import/canonical/model-document-safe-typed-array.ts +154 -0
  139. package/templates/runtime/model-import/canonical/model-document-test-support.ts +163 -0
  140. package/templates/runtime/model-import/canonical/model-document-validation-geometry.ts +330 -0
  141. package/templates/runtime/model-import/canonical/model-document-validation-helpers.ts +22 -0
  142. package/templates/runtime/model-import/canonical/model-document-validation-hierarchy.ts +314 -0
  143. package/templates/runtime/model-import/canonical/model-document-validation-provenance.ts +153 -0
  144. package/templates/runtime/model-import/canonical/model-document-validation-result.ts +118 -0
  145. package/templates/runtime/model-import/canonical/model-document-validation.test.ts +497 -0
  146. package/templates/runtime/model-import/canonical/model-document-validation.ts +276 -0
  147. package/templates/runtime/model-import/canonical/model-document-worker-memory.test.ts +95 -0
  148. package/templates/runtime/model-import/canonical/model-document-worker-memory.ts +365 -0
  149. package/templates/runtime/model-import/canonical/model-document.ts +187 -0
  150. package/templates/runtime/model-import/canonical/sha256.ts +144 -0
  151. package/templates/runtime/model-import/default-model-source-assets.test.ts +212 -0
  152. package/templates/runtime/model-import/default-model-source-assets.ts +235 -0
  153. package/templates/runtime/model-import/formats/fbx-appearance-test-fixtures.ts +144 -0
  154. package/templates/runtime/model-import/formats/fbx-ascii-appearance-test-fixtures.ts +123 -0
  155. package/templates/runtime/model-import/formats/fbx-binary-preflight-reader.ts +179 -0
  156. package/templates/runtime/model-import/formats/fbx-binary-preflight.ts +277 -0
  157. package/templates/runtime/model-import/formats/fbx-binary-test-fixture-builder.ts +129 -0
  158. package/templates/runtime/model-import/formats/fbx-model-format-adapter.test-fixtures.ts +119 -0
  159. package/templates/runtime/model-import/formats/fbx-model-format-adapter.test.ts +316 -0
  160. package/templates/runtime/model-import/formats/fbx-model-format-adapter.ts +96 -0
  161. package/templates/runtime/model-import/formats/fbx-model-format-preflight.ts +122 -0
  162. package/templates/runtime/model-import/formats/fbx-static-appearance.test.ts +93 -0
  163. package/templates/runtime/model-import/formats/fbx-static-appearance.ts +403 -0
  164. package/templates/runtime/model-import/formats/gltf-accessor-preflight.ts +321 -0
  165. package/templates/runtime/model-import/formats/gltf-attribute-encoding.ts +65 -0
  166. package/templates/runtime/model-import/formats/gltf-buffer-preflight.ts +320 -0
  167. package/templates/runtime/model-import/formats/gltf-canonical-appearance.ts +422 -0
  168. package/templates/runtime/model-import/formats/gltf-canonical-geometry.ts +276 -0
  169. package/templates/runtime/model-import/formats/gltf-canonical-hierarchy.ts +180 -0
  170. package/templates/runtime/model-import/formats/gltf-canonical-metadata.ts +100 -0
  171. package/templates/runtime/model-import/formats/gltf-decode-safety.ts +84 -0
  172. package/templates/runtime/model-import/formats/gltf-decoded-count-validation.ts +38 -0
  173. package/templates/runtime/model-import/formats/gltf-document-canonicalizer.ts +328 -0
  174. package/templates/runtime/model-import/formats/gltf-document-sanitizer.ts +269 -0
  175. package/templates/runtime/model-import/formats/gltf-extension-policy.ts +59 -0
  176. package/templates/runtime/model-import/formats/gltf-glb-document.ts +93 -0
  177. package/templates/runtime/model-import/formats/gltf-json-inspection.ts +152 -0
  178. package/templates/runtime/model-import/formats/gltf-json-preflight.ts +128 -0
  179. package/templates/runtime/model-import/formats/gltf-missing-appearance.ts +158 -0
  180. package/templates/runtime/model-import/formats/gltf-model-format-adapter-appearance.test.ts +181 -0
  181. package/templates/runtime/model-import/formats/gltf-model-format-adapter-resource-limits.test.ts +236 -0
  182. package/templates/runtime/model-import/formats/gltf-model-format-adapter-validation.test.ts +274 -0
  183. package/templates/runtime/model-import/formats/gltf-model-format-adapter.test.ts +229 -0
  184. package/templates/runtime/model-import/formats/gltf-model-format-adapter.ts +161 -0
  185. package/templates/runtime/model-import/formats/gltf-node-preflight.ts +218 -0
  186. package/templates/runtime/model-import/formats/gltf-primitive-preflight.ts +295 -0
  187. package/templates/runtime/model-import/formats/gltf-source-document.ts +234 -0
  188. package/templates/runtime/model-import/formats/gltf-source-snapshot.ts +187 -0
  189. package/templates/runtime/model-import/formats/gltf-texture-resource.ts +252 -0
  190. package/templates/runtime/model-import/formats/index.ts +28 -0
  191. package/templates/runtime/model-import/formats/model-format-adapter.test.ts +165 -0
  192. package/templates/runtime/model-import/formats/model-format-adapter.ts +165 -0
  193. package/templates/runtime/model-import/formats/obj-material-library.test.ts +124 -0
  194. package/templates/runtime/model-import/formats/obj-material-library.ts +432 -0
  195. package/templates/runtime/model-import/formats/obj-model-format-adapter.test.ts +251 -0
  196. package/templates/runtime/model-import/formats/obj-model-format-adapter.ts +85 -0
  197. package/templates/runtime/model-import/formats/obj-stl-ply-model-format-adapter-support.ts +335 -0
  198. package/templates/runtime/model-import/formats/ply-model-format-adapter.test.ts +151 -0
  199. package/templates/runtime/model-import/formats/ply-model-format-adapter.ts +195 -0
  200. package/templates/runtime/model-import/formats/production-model-format-main-bundle.test.ts +123 -0
  201. package/templates/runtime/model-import/formats/production-model-format-manifest.ts +135 -0
  202. package/templates/runtime/model-import/formats/production-model-format-registry.test.ts +253 -0
  203. package/templates/runtime/model-import/formats/production-model-format-registry.ts +16 -0
  204. package/templates/runtime/model-import/formats/production-model-format-worker-registry.ts +68 -0
  205. package/templates/runtime/model-import/formats/stl-model-format-adapter.test.ts +110 -0
  206. package/templates/runtime/model-import/formats/stl-model-format-adapter.ts +125 -0
  207. package/templates/runtime/model-import/formats/three-static-appearance-canonicalizer.ts +305 -0
  208. package/templates/runtime/model-import/formats/three-static-geometry-canonicalizer.test.ts +245 -0
  209. package/templates/runtime/model-import/formats/three-static-geometry-canonicalizer.ts +434 -0
  210. package/templates/runtime/model-import/formats/three-static-source-bundle.ts +146 -0
  211. package/templates/runtime/model-import/formats/vendor/draco/LICENSE +252 -0
  212. package/templates/runtime/model-import/formats/vendor/draco/README.md +15 -0
  213. package/templates/runtime/model-import/formats/vendor/draco/draco_decoder_gltf.wasm.json +1 -0
  214. package/templates/runtime/model-import/formats/vendor/draco/draco_wasm_wrapper.cjs +117 -0
  215. package/templates/runtime/model-import/formats/vendor/draco/draco_wasm_wrapper.d.cts +9 -0
  216. package/templates/runtime/model-import/index.ts +125 -0
  217. package/templates/runtime/model-import/model-analysis-summary.test.ts +179 -0
  218. package/templates/runtime/model-import/model-analysis-summary.ts +164 -0
  219. package/templates/runtime/model-import/model-asset-metadata.ts +71 -0
  220. package/templates/runtime/model-import/model-import-limit-values.ts +41 -0
  221. package/templates/runtime/model-import/model-import-limits.test.ts +125 -0
  222. package/templates/runtime/model-import/model-import-limits.ts +165 -0
  223. package/templates/runtime/model-import/model-import-types.ts +215 -0
  224. package/templates/runtime/model-import/model-package-path.ts +106 -0
  225. package/templates/runtime/model-import/model-package-types.ts +55 -0
  226. package/templates/runtime/model-import/model-package-zip-preflight.ts +405 -0
  227. package/templates/runtime/model-import/model-package-zip.test.ts +252 -0
  228. package/templates/runtime/model-import/model-package-zip.ts +227 -0
  229. package/templates/runtime/model-import/model-persistence-appearance-resources.test.ts +69 -0
  230. package/templates/runtime/model-import/model-persistence-hydration-appearance.test.ts +146 -0
  231. package/templates/runtime/model-import/model-persistence-hydration-resources.ts +281 -0
  232. package/templates/runtime/model-import/model-persistence-hydration-test-support.ts +97 -0
  233. package/templates/runtime/model-import/model-persistence-hydration.test.ts +370 -0
  234. package/templates/runtime/model-import/model-persistence-hydration.ts +323 -0
  235. package/templates/runtime/model-import/model-source-asset-coordinator.test.ts +414 -0
  236. package/templates/runtime/model-import/model-source-asset-handler-appearance-resources.ts +20 -0
  237. package/templates/runtime/model-import/model-source-asset-handler-appearance.test.ts +169 -0
  238. package/templates/runtime/model-import/model-source-asset-handler-repair-controller.ts +294 -0
  239. package/templates/runtime/model-import/model-source-asset-handler-repair.ts +233 -0
  240. package/templates/runtime/model-import/model-source-asset-handler-resources.ts +54 -0
  241. package/templates/runtime/model-import/model-source-asset-handler.ingestion.test.ts +236 -0
  242. package/templates/runtime/model-import/model-source-asset-handler.lifecycle.test.ts +176 -0
  243. package/templates/runtime/model-import/model-source-asset-handler.test-support.ts +231 -0
  244. package/templates/runtime/model-import/model-source-asset-handler.ts +479 -0
  245. package/templates/runtime/model-import/model-source-asset-repair-coordinator.test.ts +431 -0
  246. package/templates/runtime/model-import/model-source-bundle-codec.test.ts +423 -0
  247. package/templates/runtime/model-import/model-source-bundle-codec.ts +259 -0
  248. package/templates/runtime/model-import/model-source-bundle-descriptor-fields.ts +369 -0
  249. package/templates/runtime/model-import/model-source-bundle-descriptor-validation.ts +402 -0
  250. package/templates/runtime/model-import/model-source-bundle-error.ts +28 -0
  251. package/templates/runtime/model-import/model-source-bundle-limits.ts +108 -0
  252. package/templates/runtime/model-import/model-source-bundle-mime-type.test.ts +21 -0
  253. package/templates/runtime/model-import/model-source-bundle-preflight-test-support.ts +435 -0
  254. package/templates/runtime/model-import/model-source-bundle-security-test-support.ts +417 -0
  255. package/templates/runtime/model-import/model-source-bundle-test-support.ts +83 -0
  256. package/templates/runtime/model-import/model-source-bundle.test.ts +427 -0
  257. package/templates/runtime/model-import/model-source-bundle.ts +377 -0
  258. package/templates/runtime/model-import/model-source-bytes.ts +78 -0
  259. package/templates/runtime/model-import/model-source-data-uri.ts +74 -0
  260. package/templates/runtime/model-import/model-source-digest.test.ts +25 -0
  261. package/templates/runtime/model-import/model-source-digest.ts +288 -0
  262. package/templates/runtime/model-import/model-source-gltf.ts +184 -0
  263. package/templates/runtime/model-import/model-source-json-preflight.ts +382 -0
  264. package/templates/runtime/model-import/model-source-lookup.ts +134 -0
  265. package/templates/runtime/model-import/model-source-package-normalization.test.ts +106 -0
  266. package/templates/runtime/model-import/model-source-path.ts +233 -0
  267. package/templates/runtime/model-import/test-fixtures/gltf-appearance-fixtures.ts +188 -0
  268. package/templates/runtime/model-import/test-fixtures/model-fixtures.ts +612 -0
  269. package/templates/runtime/model-import/test-fixtures/obj-appearance-fixtures.ts +76 -0
  270. package/templates/runtime/model-import/topology/apply-model-repair.test.ts +236 -0
  271. package/templates/runtime/model-import/topology/apply-model-repair.ts +31 -0
  272. package/templates/runtime/model-import/topology/model-repair-execution.ts +364 -0
  273. package/templates/runtime/model-import/topology/model-repair-geometry.ts +60 -0
  274. package/templates/runtime/model-import/topology/model-repair-plan-codec.test.ts +125 -0
  275. package/templates/runtime/model-import/topology/model-repair-plan-codec.ts +96 -0
  276. package/templates/runtime/model-import/topology/model-repair-plan-envelope.ts +13 -0
  277. package/templates/runtime/model-import/topology/model-repair-plan-validation.ts +325 -0
  278. package/templates/runtime/model-import/topology/model-repair-plan.ts +275 -0
  279. package/templates/runtime/model-import/topology/model-topology-analysis.test.ts +448 -0
  280. package/templates/runtime/model-import/topology/model-topology-analysis.ts +426 -0
  281. package/templates/runtime/model-import/topology/model-topology-digest.ts +117 -0
  282. package/templates/runtime/model-import/topology/model-topology-graph.ts +455 -0
  283. package/templates/runtime/model-import/topology/model-topology-math.ts +140 -0
  284. package/templates/runtime/model-import/topology/model-topology-resources.ts +126 -0
  285. package/templates/runtime/model-import/topology/model-topology-test-support.ts +163 -0
  286. package/templates/runtime/model-import/topology/model-topology-types.ts +14 -0
  287. package/templates/runtime/model-import/worker/bounded-worker-cache.test.ts +47 -0
  288. package/templates/runtime/model-import/worker/bounded-worker-cache.ts +147 -0
  289. package/templates/runtime/model-import/worker/cooperative-buffer-snapshot.ts +195 -0
  290. package/templates/runtime/model-import/worker/model-import-worker-appearance-receipt.test.ts +273 -0
  291. package/templates/runtime/model-import/worker/model-import-worker-client-draft-verification.ts +39 -0
  292. package/templates/runtime/model-import/worker/model-import-worker-client-receipt.test.ts +217 -0
  293. package/templates/runtime/model-import/worker/model-import-worker-client-repair-validation.test.ts +357 -0
  294. package/templates/runtime/model-import/worker/model-import-worker-client-repair-verification.ts +44 -0
  295. package/templates/runtime/model-import/worker/model-import-worker-client-result-verification.ts +68 -0
  296. package/templates/runtime/model-import/worker/model-import-worker-client-snapshot.test.ts +368 -0
  297. package/templates/runtime/model-import/worker/model-import-worker-client-snapshot.ts +478 -0
  298. package/templates/runtime/model-import/worker/model-import-worker-client-test-support.ts +198 -0
  299. package/templates/runtime/model-import/worker/model-import-worker-client-validation.test.ts +301 -0
  300. package/templates/runtime/model-import/worker/model-import-worker-client.test.ts +484 -0
  301. package/templates/runtime/model-import/worker/model-import-worker-client.ts +715 -0
  302. package/templates/runtime/model-import/worker/model-import-worker-diagnostics.ts +298 -0
  303. package/templates/runtime/model-import/worker/model-import-worker-protocol-validation.ts +714 -0
  304. package/templates/runtime/model-import/worker/model-import-worker-protocol.ts +192 -0
  305. package/templates/runtime/model-import/worker/model-import-worker-receipt.ts +221 -0
  306. package/templates/runtime/model-import/worker/model-import-worker-result-verification.ts +22 -0
  307. package/templates/runtime/model-import/worker/model-import-worker-runtime-appearance.test.ts +81 -0
  308. package/templates/runtime/model-import/worker/model-import-worker-runtime-envelope.test.ts +126 -0
  309. package/templates/runtime/model-import/worker/model-import-worker-runtime-lifecycle.test.ts +342 -0
  310. package/templates/runtime/model-import/worker/model-import-worker-runtime-package.test.ts +85 -0
  311. package/templates/runtime/model-import/worker/model-import-worker-runtime-production.test.ts +51 -0
  312. package/templates/runtime/model-import/worker/model-import-worker-runtime-repair.test.ts +75 -0
  313. package/templates/runtime/model-import/worker/model-import-worker-runtime-test-support.ts +126 -0
  314. package/templates/runtime/model-import/worker/model-import-worker-runtime.test.ts +472 -0
  315. package/templates/runtime/model-import/worker/model-import-worker-runtime.ts +804 -0
  316. package/templates/runtime/model-import/worker/model-import-worker-trust-boundary.test.ts +243 -0
  317. package/templates/runtime/model-import/worker/model-import-worker-vite-smoke.test.ts +132 -0
  318. package/templates/runtime/model-import/worker/model-import.worker.bundle.js +3691 -0
  319. package/templates/runtime/model-import/worker/model-import.worker.ts +25 -0
  320. package/templates/runtime/performance/index.ts +1 -0
  321. package/templates/runtime/performance/profile-catalog-manifest.d.mts +27 -0
  322. package/templates/runtime/performance/profile-catalog-manifest.mjs +42 -0
  323. package/templates/runtime/performance/profile-catalog.test.ts +49 -0
  324. package/templates/runtime/performance/profile-catalog.ts +56 -0
  325. package/templates/runtime/react/app-shell/runtime-public-api-runtime.test.tsx +291 -0
  326. package/templates/runtime/react/app-shell/runtime-public-api-test-support.ts +21 -0
  327. package/templates/runtime/react/app-shell/runtime-public-api.test.tsx +93 -9
  328. package/templates/runtime/react/app-shell/settings-transfer-canvas.ts +68 -0
  329. package/templates/runtime/react/app-shell/settings-transfer.test.ts +94 -1
  330. package/templates/runtime/react/app-shell/settings-transfer.ts +61 -89
  331. package/templates/runtime/react/app-shell/storage-key-migration.test.ts +40 -0
  332. package/templates/runtime/react/app-shell/storage-key-migration.ts +13 -9
  333. package/templates/runtime/react/app-shell/toolbar-panel.tsx +31 -13
  334. package/templates/runtime/react/app-shell/toolcraft-app-panel-workspace.test.tsx +125 -0
  335. package/templates/runtime/react/app-shell/toolcraft-app-test-utils.tsx +72 -0
  336. package/templates/runtime/react/app-shell/toolcraft-app.integration.test.tsx +21 -1
  337. package/templates/runtime/react/app-shell/toolcraft-app.scene-export.test.tsx +53 -0
  338. package/templates/runtime/react/app-shell/toolcraft-app.test.tsx +10 -55
  339. package/templates/runtime/react/app-shell/toolcraft-app.tsx +91 -15
  340. package/templates/runtime/react/app-shell/toolcraft-media-presentation.test.tsx +135 -0
  341. package/templates/runtime/react/app-shell/toolcraft-media-presentation.tsx +190 -0
  342. package/templates/runtime/react/app-shell/toolcraft-model-presentation-composition.test.tsx +99 -0
  343. package/templates/runtime/react/app-shell/toolcraft-persistence-bootstrap.ts +111 -0
  344. package/templates/runtime/react/app-shell/toolcraft-pipeline-context.test.tsx +252 -0
  345. package/templates/runtime/react/app-shell/toolcraft-pipeline-context.tsx +44 -0
  346. package/templates/runtime/react/app-shell/toolcraft-pipeline-evidence.tsx +41 -0
  347. package/templates/runtime/react/app-shell/toolcraft-pipeline-initialization.test.tsx +301 -0
  348. package/templates/runtime/react/app-shell/toolcraft-playback-persistence.test.tsx +116 -0
  349. package/templates/runtime/react/app-shell/toolcraft-render-isolation.test.tsx +418 -0
  350. package/templates/runtime/react/app-shell/toolcraft-root-persistence-migration.test.tsx +297 -0
  351. package/templates/runtime/react/app-shell/toolcraft-root-persistence-test-utils.tsx +163 -0
  352. package/templates/runtime/react/app-shell/toolcraft-root-persistence.test.tsx +357 -0
  353. package/templates/runtime/react/app-shell/toolcraft-root.test.tsx +57 -6
  354. package/templates/runtime/react/app-shell/toolcraft-root.tsx +106 -94
  355. package/templates/runtime/react/app-shell/toolcraft-selector-lanes.test.tsx +338 -0
  356. package/templates/runtime/react/app-shell/toolcraft-selectors.test.tsx +241 -0
  357. package/templates/runtime/react/app-shell/toolcraft-selectors.ts +133 -0
  358. package/templates/runtime/react/app-shell/toolcraft-source-asset-context.test.tsx +426 -0
  359. package/templates/runtime/react/app-shell/toolcraft-source-asset-context.tsx +287 -0
  360. package/templates/runtime/react/app-shell/toolcraft-source-asset-owner.test.ts +194 -0
  361. package/templates/runtime/react/app-shell/toolcraft-source-asset-owner.ts +227 -0
  362. package/templates/runtime/react/app-shell/toolcraft-source-asset-provider-ownership.test.tsx +243 -0
  363. package/templates/runtime/react/app-shell/toolcraft-source-asset-test-support.ts +51 -0
  364. package/templates/runtime/react/app-shell/toolcraft-store-context.tsx +18 -0
  365. package/templates/runtime/react/app-shell/toolcraft-unavailable-resource-proof.test.ts +138 -0
  366. package/templates/runtime/react/app-shell/toolcraft-unavailable-resource-proof.ts +378 -0
  367. package/templates/runtime/react/app-shell/use-toolcraft-persistence.ts +203 -0
  368. package/templates/runtime/react/app-shell/use-toolcraft-pipeline-pass.test.tsx +220 -0
  369. package/templates/runtime/react/app-shell/use-toolcraft-pipeline-pass.ts +175 -0
  370. package/templates/runtime/react/app-shell/use-toolcraft-pipeline.ts +10 -0
  371. package/templates/runtime/react/app-shell/use-toolcraft-values.test.tsx +288 -0
  372. package/templates/runtime/react/app-shell/use-toolcraft.ts +188 -7
  373. package/templates/runtime/react/canvas/canvas-default-media-layer.tsx +52 -14
  374. package/templates/runtime/react/canvas/canvas-media-transform.ts +2 -1
  375. package/templates/runtime/react/canvas/canvas-scene-surface.test.tsx +51 -0
  376. package/templates/runtime/react/canvas/canvas-scene-surface.tsx +54 -0
  377. package/templates/runtime/react/canvas/canvas-shell-interactions.test.tsx +225 -3
  378. package/templates/runtime/react/canvas/canvas-shell-media-rendering.test.tsx +83 -0
  379. package/templates/runtime/react/canvas/canvas-shell-rendering.test.tsx +88 -0
  380. package/templates/runtime/react/canvas/canvas-shell-test-utils.tsx +42 -2
  381. package/templates/runtime/react/canvas/canvas-shell-upload.test.tsx +231 -16
  382. package/templates/runtime/react/canvas/canvas-shell.tsx +154 -63
  383. package/templates/runtime/react/canvas/canvas-source-asset-feedback.test.tsx +211 -0
  384. package/templates/runtime/react/canvas/canvas-upload-routing.ts +65 -56
  385. package/templates/runtime/react/canvas/canvas-viewport-world.tsx +66 -0
  386. package/templates/runtime/react/canvas/media-file.test.ts +102 -0
  387. package/templates/runtime/react/canvas/media-file.ts +80 -35
  388. package/templates/runtime/react/canvas/runtime-scene-export.test.ts +279 -0
  389. package/templates/runtime/react/canvas/runtime-scene-export.ts +167 -0
  390. package/templates/runtime/react/canvas/scene-element-presentation-rect.ts +35 -0
  391. package/templates/runtime/react/canvas/use-canvas-drop-import.ts +65 -94
  392. package/templates/runtime/react/canvas/use-canvas-viewport-interactions.ts +52 -17
  393. package/templates/runtime/react/canvas/use-toolcraft-canvas-frame.ts +20 -0
  394. package/templates/runtime/react/canvas-handles/canvas-handle-layer-registry.test.ts +33 -0
  395. package/templates/runtime/react/canvas-handles/canvas-handle-layer-registry.tsx +64 -0
  396. package/templates/runtime/react/controls-panel/__tests__/actions-control-loading.test.tsx +59 -0
  397. package/templates/runtime/react/controls-panel/__tests__/controls-panel-filedrop-reorder.test.tsx +29 -11
  398. package/templates/runtime/react/controls-panel/__tests__/controls-panel.control-visibility.test.tsx +52 -0
  399. package/templates/runtime/react/controls-panel/__tests__/controls-panel.dependency-isolation.test.tsx +332 -0
  400. package/templates/runtime/react/controls-panel/__tests__/controls-panel.extensions-live-state.test.tsx +135 -0
  401. package/templates/runtime/react/controls-panel/__tests__/controls-panel.footer-actions.test.tsx +45 -0
  402. package/templates/runtime/react/controls-panel/__tests__/controls-panel.inline-layout.test.tsx +25 -9
  403. package/templates/runtime/react/controls-panel/__tests__/controls-panel.media-upload-files.test.tsx +35 -3
  404. package/templates/runtime/react/controls-panel/__tests__/controls-panel.media-upload-image.test.tsx +11 -5
  405. package/templates/runtime/react/controls-panel/__tests__/controls-panel.media-upload-multi-image.test.tsx +167 -5
  406. package/templates/runtime/react/controls-panel/__tests__/controls-panel.render-isolation.test.tsx +496 -0
  407. package/templates/runtime/react/controls-panel/__tests__/controls-panel.reset-dependency-isolation.test.tsx +226 -0
  408. package/templates/runtime/react/controls-panel/__tests__/controls-panel.scene-export-actions.test.tsx +121 -0
  409. package/templates/runtime/react/controls-panel/__tests__/controls-panel.section-isolation.test.tsx +441 -0
  410. package/templates/runtime/react/controls-panel/__tests__/controls-panel.section-navigation-overflow.test.tsx +247 -0
  411. package/templates/runtime/react/controls-panel/__tests__/controls-panel.section-navigation.test.tsx +486 -0
  412. package/templates/runtime/react/controls-panel/__tests__/controls-panel.section-shell.test.tsx +24 -2
  413. package/templates/runtime/react/controls-panel/__tests__/controls-panel.setup-controls.test.tsx +10 -5
  414. package/templates/runtime/react/controls-panel/__tests__/controls-panel.tabs.test.tsx +93 -0
  415. package/templates/runtime/react/controls-panel/__tests__/file-drop-folder-selection.test.tsx +62 -0
  416. package/templates/runtime/react/controls-panel/__tests__/file-drop-presentation-accessibility.test.tsx +45 -0
  417. package/templates/runtime/react/controls-panel/__tests__/file-drop-presentation.test.tsx +459 -0
  418. package/templates/runtime/react/controls-panel/actions/controls-panel-actions.ts +118 -13
  419. package/templates/runtime/react/controls-panel/actions/export-action-runner.ts +62 -0
  420. package/templates/runtime/react/controls-panel/actions/panel-action-feedback.tsx +24 -0
  421. package/templates/runtime/react/controls-panel/conditions/control-condition-dependencies.ts +39 -0
  422. package/templates/runtime/react/controls-panel/conditions/control-conditions.ts +40 -0
  423. package/templates/runtime/react/controls-panel/controls-panel.tsx +286 -170
  424. package/templates/runtime/react/controls-panel/keyframes/controls-panel-keyframes.tsx +27 -20
  425. package/templates/runtime/react/controls-panel/layout/controls-panel-control-group.tsx +509 -0
  426. package/templates/runtime/react/controls-panel/layout/controls-panel-inline-layout.tsx +5 -3
  427. package/templates/runtime/react/controls-panel/layout/controls-panel-layout.tsx +33 -5
  428. package/templates/runtime/react/controls-panel/layout/controls-panel-section-navigation-layout.ts +169 -0
  429. package/templates/runtime/react/controls-panel/layout/controls-panel-section-navigation.tsx +458 -0
  430. package/templates/runtime/react/controls-panel/layout/controls-panel-section.tsx +324 -324
  431. package/templates/runtime/react/controls-panel/live-custom-control.tsx +52 -0
  432. package/templates/runtime/react/controls-panel/renderers/controls-panel-basic-renderers.tsx +15 -0
  433. package/templates/runtime/react/controls-panel/renderers/controls-panel-media-renderer.test.tsx +242 -0
  434. package/templates/runtime/react/controls-panel/renderers/controls-panel-media-renderer.tsx +203 -129
  435. package/templates/runtime/react/controls-panel/renderers/controls-panel-renderer-registry.test.ts +26 -0
  436. package/templates/runtime/react/controls-panel/renderers/controls-panel-renderer-registry.ts +29 -0
  437. package/templates/runtime/react/controls-panel/renderers/controls-panel-settings-transfer-renderer.tsx +4 -4
  438. package/templates/runtime/react/controls-panel/testing/controls-panel-test-utils.tsx +8 -2
  439. package/templates/runtime/react/controls-panel/values/controls-panel-value-labels.ts +1 -0
  440. package/templates/runtime/react/index.ts +32 -1
  441. package/templates/runtime/react/layers/layer-tree.ts +5 -32
  442. package/templates/runtime/react/layers/layers-panel-test-utils.tsx +3 -1
  443. package/templates/runtime/react/layers/layers-panel.tsx +44 -30
  444. package/templates/runtime/react/model-rendering/lazy-three-model-render-binding.test.ts +92 -0
  445. package/templates/runtime/react/model-rendering/lazy-three-model-render-binding.ts +49 -0
  446. package/templates/runtime/react/model-rendering/model-canvas-layer.test.tsx +491 -0
  447. package/templates/runtime/react/model-rendering/model-canvas-layer.tsx +459 -0
  448. package/templates/runtime/react/model-rendering/model-display-fit.test.ts +57 -0
  449. package/templates/runtime/react/model-rendering/model-display-fit.ts +110 -0
  450. package/templates/runtime/react/model-rendering/model-export.test.ts +179 -0
  451. package/templates/runtime/react/model-rendering/model-export.ts +90 -0
  452. package/templates/runtime/react/model-rendering/model-presentation-consumer.test.tsx +225 -0
  453. package/templates/runtime/react/model-rendering/model-presentation-consumer.tsx +189 -0
  454. package/templates/runtime/react/model-rendering/model-presentation-feedback.ts +15 -0
  455. package/templates/runtime/react/model-rendering/model-presentation-mode.ts +112 -0
  456. package/templates/runtime/react/model-rendering/model-presentation-resource-manager.test.ts +244 -0
  457. package/templates/runtime/react/model-rendering/model-presentation-resource-manager.ts +426 -0
  458. package/templates/runtime/react/model-rendering/model-render-binding.ts +233 -0
  459. package/templates/runtime/react/model-rendering/model-render-host.ts +339 -0
  460. package/templates/runtime/react/model-rendering/model-render-provider.test.tsx +457 -0
  461. package/templates/runtime/react/model-rendering/model-render-provider.tsx +172 -0
  462. package/templates/runtime/react/model-rendering/model-render-registry.test.ts +86 -0
  463. package/templates/runtime/react/model-rendering/model-render-registry.ts +64 -0
  464. package/templates/runtime/react/model-rendering/model-render-state.ts +79 -0
  465. package/templates/runtime/react/model-rendering/three-canonical-geometry.ts +346 -0
  466. package/templates/runtime/react/model-rendering/three-canonical-model.ts +150 -0
  467. package/templates/runtime/react/model-rendering/three-model-appearance.test.ts +125 -0
  468. package/templates/runtime/react/model-rendering/three-model-appearance.ts +199 -0
  469. package/templates/runtime/react/model-rendering/three-model-prewarm.ts +61 -0
  470. package/templates/runtime/react/model-rendering/three-model-render-adapter-lifecycle.test.ts +293 -0
  471. package/templates/runtime/react/model-rendering/three-model-render-adapter.test-support.ts +70 -0
  472. package/templates/runtime/react/model-rendering/three-model-render-adapter.test.ts +379 -0
  473. package/templates/runtime/react/model-rendering/three-model-render-adapter.ts +484 -0
  474. package/templates/runtime/react/orientation-gizmo/model-orbit-interaction.integration.test.tsx +129 -0
  475. package/templates/runtime/react/orientation-gizmo/orientation-gizmo-layer.tsx +44 -0
  476. package/templates/runtime/react/orientation-gizmo/orientation-gizmo-math.test.ts +217 -0
  477. package/templates/runtime/react/orientation-gizmo/orientation-gizmo-math.ts +299 -0
  478. package/templates/runtime/react/orientation-gizmo/orientation-gizmo-public-api.test.ts +12 -0
  479. package/templates/runtime/react/orientation-gizmo/orientation-gizmo-selection.test.ts +115 -0
  480. package/templates/runtime/react/orientation-gizmo/orientation-gizmo-selection.ts +46 -0
  481. package/templates/runtime/react/orientation-gizmo/orientation-gizmo-snap.integration.test.tsx +179 -0
  482. package/templates/runtime/react/orientation-gizmo/orientation-gizmo-test-harness.tsx +208 -0
  483. package/templates/runtime/react/orientation-gizmo/orientation-gizmo.integration.test.tsx +167 -0
  484. package/templates/runtime/react/orientation-gizmo/orientation-gizmo.tsx +544 -0
  485. package/templates/runtime/react/orientation-gizmo/orientation-interaction-coordinator.ts +112 -0
  486. package/templates/runtime/react/orientation-gizmo/orientation-quaternion.ts +264 -0
  487. package/templates/runtime/react/orientation-gizmo/use-toolcraft-model-orbit-interaction.ts +233 -0
  488. package/templates/runtime/react/orientation-gizmo/use-toolcraft-orientation-control-selection.ts +78 -0
  489. package/templates/runtime/react/panel-host/panel-host-geometry.test.ts +38 -1
  490. package/templates/runtime/react/panel-host/panel-host-geometry.ts +64 -6
  491. package/templates/runtime/react/panel-host/panel-host-runtime-placement.test.tsx +228 -0
  492. package/templates/runtime/react/panel-host/panel-host-types.ts +13 -2
  493. package/templates/runtime/react/panel-host/panel-host.test.tsx +13 -1
  494. package/templates/runtime/react/panel-host/panel-host.tsx +109 -20
  495. package/templates/runtime/react/panel-host/use-toolcraft-panel-binding.test.tsx +161 -0
  496. package/templates/runtime/react/panel-host/use-toolcraft-panel-binding.ts +55 -0
  497. package/templates/runtime/react/timeline/timeline-expanded-content.tsx +3 -0
  498. package/templates/runtime/react/timeline/timeline-panel-header.tsx +6 -0
  499. package/templates/runtime/react/timeline/timeline-panel-test-utils.tsx +1 -0
  500. package/templates/runtime/react/timeline/timeline-panel-transport.test.tsx +176 -2
  501. package/templates/runtime/react/timeline/timeline-panel.tsx +72 -19
  502. package/templates/runtime/react/timeline/timeline-playback-hooks.ts +58 -21
  503. package/templates/runtime/react/timeline/timeline-scrub-lifecycle.test.tsx +154 -0
  504. package/templates/runtime/rendering/index.ts +3 -0
  505. package/templates/runtime/rendering/renderer-pipeline-cache.ts +171 -0
  506. package/templates/runtime/rendering/renderer-pipeline-pass-generation.test.ts +151 -0
  507. package/templates/runtime/rendering/renderer-pipeline-pass-generation.ts +267 -0
  508. package/templates/runtime/rendering/renderer-pipeline-registration.test.ts +356 -0
  509. package/templates/runtime/rendering/renderer-pipeline-registration.ts +760 -0
  510. package/templates/runtime/rendering/renderer-pipeline-resource-lifecycle.test.ts +248 -0
  511. package/templates/runtime/rendering/renderer-pipeline-runtime-owner-inspection.ts +23 -0
  512. package/templates/runtime/rendering/renderer-pipeline-runtime-owner.test.ts +353 -0
  513. package/templates/runtime/rendering/renderer-pipeline-runtime-owner.ts +369 -0
  514. package/templates/runtime/rendering/renderer-pipeline-runtime.lifecycle.test.ts +440 -0
  515. package/templates/runtime/rendering/renderer-pipeline-runtime.test.ts +495 -0
  516. package/templates/runtime/rendering/renderer-pipeline-runtime.ts +611 -0
  517. package/templates/runtime/rendering/renderer-pipeline-runtime.types.test.ts +93 -0
  518. package/templates/runtime/rendering/renderer-pipeline-source-invalidation.test.ts +208 -0
  519. package/templates/runtime/rendering/structured-key-trie.test.ts +31 -0
  520. package/templates/runtime/rendering/structured-key-trie.ts +91 -0
  521. package/templates/runtime/scene/index.ts +1 -0
  522. package/templates/runtime/scene/scene-bounds.test.ts +242 -0
  523. package/templates/runtime/scene/scene-bounds.ts +189 -0
  524. package/templates/runtime/schema/additional-value-targets.ts +15 -0
  525. package/templates/runtime/schema/app-capabilities.test.ts +70 -0
  526. package/templates/runtime/schema/app-capabilities.ts +28 -0
  527. package/templates/runtime/schema/app-identity.test.ts +68 -0
  528. package/templates/runtime/schema/app-identity.ts +30 -0
  529. package/templates/runtime/schema/assembly-contract.ts +18 -2
  530. package/templates/runtime/schema/canvas-render-scale.ts +62 -0
  531. package/templates/runtime/schema/control-schema-normalization.ts +144 -3
  532. package/templates/runtime/schema/controls-panel-actions.ts +111 -44
  533. package/templates/runtime/schema/controls-panel-layout-groups.ts +17 -6
  534. package/templates/runtime/schema/controls-panel-normalization.ts +42 -7
  535. package/templates/runtime/schema/controls-panel-section-id.test.ts +418 -0
  536. package/templates/runtime/schema/controls-panel-section-id.ts +208 -0
  537. package/templates/runtime/schema/controls-panel-section-layout.ts +62 -23
  538. package/templates/runtime/schema/controls-panel-section-roundtrip.test.ts +157 -0
  539. package/templates/runtime/schema/controls-panel-section-titles.ts +19 -7
  540. package/templates/runtime/schema/define-toolcraft.assembly.test.ts +73 -0
  541. package/templates/runtime/schema/define-toolcraft.control-sections.test-support.ts +46 -0
  542. package/templates/runtime/schema/define-toolcraft.control-sections.test.ts +2 -4
  543. package/templates/runtime/schema/define-toolcraft.file-drop-normalization.test.ts +177 -0
  544. package/templates/runtime/schema/define-toolcraft.model-file-drop-formats.test.ts +181 -0
  545. package/templates/runtime/schema/define-toolcraft.model-file-drop-limits.test.ts +175 -0
  546. package/templates/runtime/schema/define-toolcraft.segmented-control-fit.test.ts +167 -0
  547. package/templates/runtime/schema/define-toolcraft.setup-background.test.ts +142 -0
  548. package/templates/runtime/schema/define-toolcraft.setup-canvas.test.ts +38 -0
  549. package/templates/runtime/schema/define-toolcraft.setup-persistence.test.ts +39 -31
  550. package/templates/runtime/schema/define-toolcraft.setup-render-scale-timeline.test.ts +102 -14
  551. package/templates/runtime/schema/define-toolcraft.setup-settings-transfer.test.ts +61 -1
  552. package/templates/runtime/schema/define-toolcraft.ts +33 -56
  553. package/templates/runtime/schema/keyframe-capability.test.ts +16 -5
  554. package/templates/runtime/schema/panels-schema-normalization.ts +17 -2
  555. package/templates/runtime/schema/persistence-plan.test.ts +201 -0
  556. package/templates/runtime/schema/persistence-plan.ts +70 -0
  557. package/templates/runtime/schema/runtime-setup-background.ts +158 -0
  558. package/templates/runtime/schema/runtime-setup-section.ts +122 -57
  559. package/templates/runtime/schema/runtime-targets.ts +14 -0
  560. package/templates/runtime/schema/schema-resolvers.ts +0 -74
  561. package/templates/runtime/schema/types.ts +171 -21
  562. package/templates/runtime/source-assets/binary-media-hydration.ts +73 -0
  563. package/templates/runtime/source-assets/default-binary-media-hydration.test.ts +92 -0
  564. package/templates/runtime/source-assets/default-model-hydration.test.ts +200 -0
  565. package/templates/runtime/source-assets/file-source-asset-handler.ts +157 -0
  566. package/templates/runtime/source-assets/image-file-source-asset-handler.test.ts +78 -0
  567. package/templates/runtime/source-assets/image-source-asset-handler.test.ts +202 -0
  568. package/templates/runtime/source-assets/image-source-asset-handler.ts +123 -0
  569. package/templates/runtime/source-assets/index.ts +20 -0
  570. package/templates/runtime/source-assets/media-resource-ref.test.ts +33 -0
  571. package/templates/runtime/source-assets/media-resource-ref.ts +49 -0
  572. package/templates/runtime/source-assets/production-source-asset-registry.ts +18 -0
  573. package/templates/runtime/source-assets/repository/binary-asset-dependencies.test.ts +184 -0
  574. package/templates/runtime/source-assets/repository/binary-asset-reachability.ts +26 -0
  575. package/templates/runtime/source-assets/repository/binary-asset-repository.ts +139 -0
  576. package/templates/runtime/source-assets/repository/indexeddb-binary-asset-lifecycle.test.ts +111 -0
  577. package/templates/runtime/source-assets/repository/indexeddb-binary-asset-lifecycle.ts +248 -0
  578. package/templates/runtime/source-assets/repository/indexeddb-binary-asset-liveness.test.ts +68 -0
  579. package/templates/runtime/source-assets/repository/indexeddb-binary-asset-liveness.ts +156 -0
  580. package/templates/runtime/source-assets/repository/indexeddb-binary-asset-metadata.ts +242 -0
  581. package/templates/runtime/source-assets/repository/indexeddb-binary-asset-options.ts +130 -0
  582. package/templates/runtime/source-assets/repository/indexeddb-binary-asset-repository-leases.test.ts +305 -0
  583. package/templates/runtime/source-assets/repository/indexeddb-binary-asset-repository-liveness.test.ts +217 -0
  584. package/templates/runtime/source-assets/repository/indexeddb-binary-asset-repository-migration.test.ts +198 -0
  585. package/templates/runtime/source-assets/repository/indexeddb-binary-asset-repository.test-support.ts +48 -0
  586. package/templates/runtime/source-assets/repository/indexeddb-binary-asset-repository.test.ts +242 -0
  587. package/templates/runtime/source-assets/repository/indexeddb-binary-asset-repository.ts +390 -0
  588. package/templates/runtime/source-assets/repository/indexeddb-binary-asset-storage.ts +238 -0
  589. package/templates/runtime/source-assets/repository/indexeddb-binary-asset-test-support.ts +163 -0
  590. package/templates/runtime/source-assets/repository/memory-binary-asset-repository.test.ts +211 -0
  591. package/templates/runtime/source-assets/repository/memory-binary-asset-repository.ts +149 -0
  592. package/templates/runtime/source-assets/repository/resource-manifest.test.ts +67 -0
  593. package/templates/runtime/source-assets/repository/resource-manifest.ts +122 -0
  594. package/templates/runtime/source-assets/repository/resource-reachability.test.ts +227 -0
  595. package/templates/runtime/source-assets/repository/resource-reachability.ts +153 -0
  596. package/templates/runtime/source-assets/repository/unavailable-binary-asset-repository.ts +24 -0
  597. package/templates/runtime/source-assets/source-asset-admission.ts +63 -0
  598. package/templates/runtime/source-assets/source-asset-batch-preparation.ts +42 -0
  599. package/templates/runtime/source-assets/source-asset-binary-media-hydrator.ts +137 -0
  600. package/templates/runtime/source-assets/source-asset-cleanup-manager.ts +110 -0
  601. package/templates/runtime/source-assets/source-asset-coordinator-admission.test.ts +365 -0
  602. package/templates/runtime/source-assets/source-asset-coordinator-lifecycle.test.ts +230 -0
  603. package/templates/runtime/source-assets/source-asset-coordinator-planning.test.ts +121 -0
  604. package/templates/runtime/source-assets/source-asset-coordinator-presentation-reachability.test.ts +54 -0
  605. package/templates/runtime/source-assets/source-asset-coordinator-test-support.ts +197 -0
  606. package/templates/runtime/source-assets/source-asset-coordinator.test.ts +495 -0
  607. package/templates/runtime/source-assets/source-asset-coordinator.ts +328 -0
  608. package/templates/runtime/source-assets/source-asset-feedback.ts +40 -0
  609. package/templates/runtime/source-assets/source-asset-handler-cancellation.test.ts +157 -0
  610. package/templates/runtime/source-assets/source-asset-import-runner.ts +462 -0
  611. package/templates/runtime/source-assets/source-asset-job-manager.ts +186 -0
  612. package/templates/runtime/source-assets/source-asset-model-hydrator.ts +241 -0
  613. package/templates/runtime/source-assets/source-asset-operation-store.test.ts +53 -0
  614. package/templates/runtime/source-assets/source-asset-operation-store.ts +132 -0
  615. package/templates/runtime/source-assets/source-asset-prepared-result.ts +108 -0
  616. package/templates/runtime/source-assets/source-asset-presentation-feedback.test.ts +34 -0
  617. package/templates/runtime/source-assets/source-asset-presentation-resources.test.ts +43 -0
  618. package/templates/runtime/source-assets/source-asset-presentation-resources.ts +144 -0
  619. package/templates/runtime/source-assets/source-asset-presentation.test.ts +196 -0
  620. package/templates/runtime/source-assets/source-asset-presentation.ts +182 -0
  621. package/templates/runtime/source-assets/source-asset-registry.test.ts +282 -0
  622. package/templates/runtime/source-assets/source-asset-registry.ts +165 -0
  623. package/templates/runtime/source-assets/source-asset-resource-resolver.test.ts +47 -0
  624. package/templates/runtime/source-assets/source-asset-resource-resolver.ts +86 -0
  625. package/templates/runtime/source-assets/source-asset-types.ts +173 -0
  626. package/templates/runtime/state/canvas-background-state.ts +79 -0
  627. package/templates/runtime/state/canvas-control-target-reducer.test.ts +272 -0
  628. package/templates/runtime/state/canvas-control-target-reducer.ts +349 -0
  629. package/templates/runtime/state/canvas-frame.test.ts +68 -0
  630. package/templates/runtime/state/canvas-frame.ts +79 -0
  631. package/templates/runtime/state/canvas-reducer.ts +90 -5
  632. package/templates/runtime/state/control-value-normalization.test.ts +141 -0
  633. package/templates/runtime/state/control-value-normalization.ts +222 -0
  634. package/templates/runtime/state/controls-reducer.ts +45 -145
  635. package/templates/runtime/state/create-template-state.test.ts +43 -2
  636. package/templates/runtime/state/create-template-state.ts +36 -5
  637. package/templates/runtime/state/history-patch-metadata.test.ts +36 -0
  638. package/templates/runtime/state/history-patch-metadata.ts +74 -0
  639. package/templates/runtime/state/history-patches.ts +49 -12
  640. package/templates/runtime/state/layer-visibility.ts +36 -0
  641. package/templates/runtime/state/media-defaults.ts +93 -6
  642. package/templates/runtime/state/media-discriminated-union.test.ts +204 -0
  643. package/templates/runtime/state/media-import-allocation.ts +129 -0
  644. package/templates/runtime/state/media-reducer.ts +395 -99
  645. package/templates/runtime/state/media-resource-state.ts +34 -0
  646. package/templates/runtime/state/media-state.ts +1 -1
  647. package/templates/runtime/state/panels-reducer.ts +80 -27
  648. package/templates/runtime/state/persistence-additional-value-targets.test.ts +67 -0
  649. package/templates/runtime/state/persistence-controller.test.ts +187 -0
  650. package/templates/runtime/state/persistence-controller.ts +195 -0
  651. package/templates/runtime/state/persistence-legacy-section-collapse.test.ts +75 -0
  652. package/templates/runtime/state/persistence-legacy-section-collapse.ts +138 -0
  653. package/templates/runtime/state/persistence-media-migration.test.ts +163 -0
  654. package/templates/runtime/state/persistence-migrations.test.ts +51 -0
  655. package/templates/runtime/state/persistence-migrations.ts +101 -0
  656. package/templates/runtime/state/persistence-reader-canvas.ts +4 -0
  657. package/templates/runtime/state/persistence-reader-media.ts +298 -39
  658. package/templates/runtime/state/persistence-reader-panels.ts +52 -5
  659. package/templates/runtime/state/persistence-reader-values.ts +19 -21
  660. package/templates/runtime/state/persistence-readers.ts +1 -1
  661. package/templates/runtime/state/persistence-snapshot.ts +15 -4
  662. package/templates/runtime/state/persistence.test.ts +228 -3
  663. package/templates/runtime/state/persistence.ts +53 -14
  664. package/templates/runtime/state/reducer-canvas-panels.test.ts +63 -0
  665. package/templates/runtime/state/reducer-controls.test.ts +114 -0
  666. package/templates/runtime/state/reducer-media-import-batch.test.ts +90 -0
  667. package/templates/runtime/state/reducer-media-import-sizing.test.ts +5 -3
  668. package/templates/runtime/state/reducer-media-reset.test.ts +18 -2
  669. package/templates/runtime/state/reducer-media-test-utils.ts +11 -6
  670. package/templates/runtime/state/reducer-media-transform.test.ts +11 -3
  671. package/templates/runtime/state/reducer-model-lifecycle.test.ts +307 -0
  672. package/templates/runtime/state/reducer.ts +9 -0
  673. package/templates/runtime/state/scene-element-frame.test.ts +32 -0
  674. package/templates/runtime/state/scene-element-frame.ts +46 -0
  675. package/templates/runtime/state/toolcraft-external-store-cross-lane.test.ts +475 -0
  676. package/templates/runtime/state/toolcraft-external-store-dependencies.test.ts +226 -0
  677. package/templates/runtime/state/toolcraft-external-store-dependencies.ts +291 -0
  678. package/templates/runtime/state/toolcraft-external-store-field-intent.test.ts +202 -0
  679. package/templates/runtime/state/toolcraft-external-store-history-boundary.test.ts +243 -0
  680. package/templates/runtime/state/toolcraft-external-store-history.ts +254 -0
  681. package/templates/runtime/state/toolcraft-external-store-publication.test.ts +135 -0
  682. package/templates/runtime/state/toolcraft-external-store-transition.ts +143 -0
  683. package/templates/runtime/state/toolcraft-external-store.test.ts +330 -0
  684. package/templates/runtime/state/toolcraft-external-store.ts +401 -0
  685. package/templates/runtime/state/toolcraft-keyframe-equality.ts +78 -0
  686. package/templates/runtime/state/types.ts +215 -13
  687. package/templates/runtime/testing/model-import-performance-workload.test.ts +265 -0
  688. package/templates/runtime/testing/model-import-performance-workload.ts +468 -0
  689. package/templates/runtime/testing/performance-config.ts +7 -0
  690. package/templates/runtime/testing/performance-control-classification.ts +3 -59
  691. package/templates/runtime/testing/performance-coverage-policy.ts +13 -0
  692. package/templates/runtime/testing/performance-coverage-validator.ts +39 -24
  693. package/templates/runtime/testing/performance-envelope-validation-context.ts +33 -0
  694. package/templates/runtime/testing/performance-fixture-adapter-types.ts +74 -0
  695. package/templates/runtime/testing/performance-fixture-adapters.ts +24 -0
  696. package/templates/runtime/testing/performance-fixture-cost-model.ts +216 -0
  697. package/templates/runtime/testing/performance-fixture-dimensions.ts +83 -0
  698. package/templates/runtime/testing/performance-fixture-discrete-adapters.ts +150 -0
  699. package/templates/runtime/testing/performance-fixture-discrete-domain.test.ts +274 -0
  700. package/templates/runtime/testing/performance-fixture-discrete-search.test.ts +119 -0
  701. package/templates/runtime/testing/performance-fixture-discrete-search.ts +96 -0
  702. package/templates/runtime/testing/performance-fixture-execution.test.ts +248 -0
  703. package/templates/runtime/testing/performance-fixture-execution.ts +109 -0
  704. package/templates/runtime/testing/performance-fixture-numeric.test.ts +15 -0
  705. package/templates/runtime/testing/performance-fixture-numeric.ts +24 -0
  706. package/templates/runtime/testing/performance-fixture-plan-analysis.ts +385 -0
  707. package/templates/runtime/testing/performance-fixture-plan.test-fixtures.ts +115 -0
  708. package/templates/runtime/testing/performance-fixture-plan.test.ts +443 -0
  709. package/templates/runtime/testing/performance-fixture-plan.ts +105 -0
  710. package/templates/runtime/testing/performance-fixture-reachable-values.test.ts +406 -0
  711. package/templates/runtime/testing/performance-fixture-record.ts +14 -0
  712. package/templates/runtime/testing/performance-fixture-registry-validation.ts +341 -0
  713. package/templates/runtime/testing/performance-fixture-validation-pure.test.ts +378 -0
  714. package/templates/runtime/testing/performance-interaction-policy.test.ts +35 -0
  715. package/templates/runtime/testing/performance-interaction-policy.ts +9 -0
  716. package/templates/runtime/testing/performance-no-legacy-semantics.test.ts +109 -0
  717. package/templates/runtime/testing/performance-path-codec.d.mts +42 -0
  718. package/templates/runtime/testing/performance-path-codec.mjs +112 -0
  719. package/templates/runtime/testing/performance-path-codec.test.ts +96 -0
  720. package/templates/runtime/testing/performance-path-coverage-policy.ts +111 -0
  721. package/templates/runtime/testing/performance-path-coverage.test.ts +219 -0
  722. package/templates/runtime/testing/performance-path-model.ts +15 -0
  723. package/templates/runtime/testing/performance-paths.test-fixtures.ts +165 -0
  724. package/templates/runtime/testing/performance-paths.test.ts +208 -0
  725. package/templates/runtime/testing/performance-paths.ts +84 -0
  726. package/templates/runtime/testing/performance-profile-validation.test.ts +42 -0
  727. package/templates/runtime/testing/performance-profile-validation.ts +19 -0
  728. package/templates/runtime/testing/performance-render-plan-assessment.test.ts +492 -0
  729. package/templates/runtime/testing/performance-render-plan-assessment.ts +121 -0
  730. package/templates/runtime/testing/performance-render-plan-benchmark-evidence.test.ts +225 -0
  731. package/templates/runtime/testing/performance-render-plan-benchmark-evidence.ts +185 -0
  732. package/templates/runtime/testing/performance-render-plan-integration.test.ts +314 -0
  733. package/templates/runtime/testing/performance-render-plan-model.ts +91 -0
  734. package/templates/runtime/testing/performance-render-plan-pass-assessment.ts +353 -0
  735. package/templates/runtime/testing/performance-render-plan-registration.test.ts +78 -0
  736. package/templates/runtime/testing/performance-render-plan-test-fixtures.ts +123 -0
  737. package/templates/runtime/testing/performance-render-plan-utils.ts +65 -0
  738. package/templates/runtime/testing/performance-renderer-pipeline-parser.ts +202 -0
  739. package/templates/runtime/testing/performance-renderer-pipeline-validation.ts +111 -99
  740. package/templates/runtime/testing/performance-renderer-technique-validation.ts +0 -155
  741. package/templates/runtime/testing/performance-scenario-common-validation.ts +101 -0
  742. package/templates/runtime/testing/performance-scenario-validation.ts +3 -40
  743. package/templates/runtime/testing/performance-schema-queries.ts +3 -1
  744. package/templates/runtime/testing/performance-test-fixtures/index.ts +0 -2
  745. package/templates/runtime/testing/performance-test-fixtures/renderer-pipelines.ts +0 -14
  746. package/templates/runtime/testing/performance-types.ts +128 -182
  747. package/templates/runtime/testing/performance-workload-envelope-derived-validation.test.ts +152 -0
  748. package/templates/runtime/testing/performance-workload-envelope-derived-validation.ts +109 -0
  749. package/templates/runtime/testing/performance-workload-envelope-schema-validation.test.ts +384 -0
  750. package/templates/runtime/testing/performance-workload-envelope-schema-validation.ts +201 -0
  751. package/templates/runtime/testing/performance-workload-envelope-shared.ts +97 -0
  752. package/templates/runtime/testing/performance-workload-envelope-test-fixtures.ts +102 -0
  753. package/templates/runtime/testing/performance-workload-envelope-validation.test.ts +293 -0
  754. package/templates/runtime/testing/performance-workload-envelope-validation.ts +222 -0
  755. package/templates/runtime/testing/performance-workload-types.test.ts +65 -0
  756. package/templates/runtime/testing/performance-workload-types.ts +34 -0
  757. package/templates/runtime/testing/performance.ts +47 -5
  758. package/templates/starter/AGENTS.md +49 -40
  759. package/templates/starter/NOTICE.md +6 -0
  760. package/templates/starter/docs/toolcraft/README.md +15 -16
  761. package/templates/starter/docs/toolcraft/acceptance-testing.md +90 -35
  762. package/templates/starter/docs/toolcraft/agent-worklog.md +121 -22
  763. package/templates/starter/docs/toolcraft/assembly-workflow.md +31 -14
  764. package/templates/starter/docs/toolcraft/component-rules.md +43 -5
  765. package/templates/starter/docs/toolcraft/core/control-selection.md +66 -0
  766. package/templates/starter/docs/toolcraft/core/layout.md +5 -3
  767. package/templates/starter/docs/toolcraft/core/media-upload.md +44 -1
  768. package/templates/starter/docs/toolcraft/core/performance.md +111 -67
  769. package/templates/starter/docs/toolcraft/core/runtime-boundary.md +17 -3
  770. package/templates/starter/docs/toolcraft/core/setup-export.md +50 -22
  771. package/templates/starter/docs/toolcraft/core/timeline-animation.md +6 -5
  772. package/templates/starter/docs/toolcraft/custom-controls.md +7 -1
  773. package/templates/starter/docs/toolcraft/decision-contract.md +8 -4
  774. package/templates/starter/docs/toolcraft/performance.md +127 -141
  775. package/templates/starter/docs/toolcraft/renderer-technique.md +90 -25
  776. package/templates/starter/docs/toolcraft/schema-reference.md +201 -49
  777. package/templates/starter/docs/toolcraft/workflow.md +40 -20
  778. package/templates/starter/e2e/app-browser-control-coverage.spec.ts +33 -54
  779. package/templates/starter/e2e/app-browser-infinity-canvas-evidence.spec.ts +128 -0
  780. package/templates/starter/e2e/app-browser-model-appearance-evidence.spec.ts +214 -0
  781. package/templates/starter/e2e/app-browser-model-import-evidence.spec.ts +422 -0
  782. package/templates/starter/e2e/app-browser-model-performance.spec.ts +140 -0
  783. package/templates/starter/e2e/app-browser-model-runtime-requirements.spec.ts +71 -0
  784. package/templates/starter/e2e/app-browser-orientation-evidence.spec.ts +276 -0
  785. package/templates/starter/e2e/app-browser-performance-evidence.spec.ts +164 -90
  786. package/templates/starter/e2e/app-browser-performance-probe.spec.ts +61 -0
  787. package/templates/starter/e2e/app-browser-proof-session.spec.ts +19 -0
  788. package/templates/starter/e2e/app-browser-render-scale-evidence.spec.ts +247 -0
  789. package/templates/starter/e2e/app-browser-render-scale-requirements.spec.ts +147 -0
  790. package/templates/starter/e2e/app-browser-runtime-provenance.spec.ts +20 -64
  791. package/templates/starter/e2e/app-browser-runtime-reporter.spec.ts +135 -50
  792. package/templates/starter/e2e/app-browser-runtime-requirements.spec.ts +181 -45
  793. package/templates/starter/e2e/app-browser-semantic-evidence.spec.ts +33 -56
  794. package/templates/starter/e2e/app-browser-shell.spec.ts +13 -5
  795. package/templates/starter/e2e/app-controls.spec.ts +1 -1
  796. package/templates/starter/e2e/app-kernel-benchmarks.ts +3 -0
  797. package/templates/starter/e2e/app-performance-path-adapters.ts +11 -0
  798. package/templates/starter/e2e/app-performance.spec.ts +56 -0
  799. package/templates/starter/e2e/app-persistence.spec.ts +209 -0
  800. package/templates/starter/e2e/browser-acceptance-outcome-helpers.ts +5 -1
  801. package/templates/starter/e2e/browser-conditional-output-evidence-helpers.ts +5 -0
  802. package/templates/starter/e2e/browser-execution-ledger.spec.ts +79 -0
  803. package/templates/starter/e2e/browser-execution-ledger.ts +115 -0
  804. package/templates/starter/e2e/browser-infinity-canvas-evidence.ts +408 -0
  805. package/templates/starter/e2e/browser-infinity-canvas-unavailable-image-evidence.ts +370 -0
  806. package/templates/starter/e2e/browser-layer-evidence-helpers.ts +66 -9
  807. package/templates/starter/e2e/browser-media-export-evidence.spec.ts +77 -0
  808. package/templates/starter/e2e/browser-media-export-evidence.ts +208 -0
  809. package/templates/starter/e2e/browser-model-appearance-evidence-helpers.ts +65 -0
  810. package/templates/starter/e2e/browser-model-appearance-evidence.ts +171 -0
  811. package/templates/starter/e2e/browser-model-import-evidence-helpers.ts +426 -0
  812. package/templates/starter/e2e/browser-orientation-gizmo-actions.ts +256 -0
  813. package/templates/starter/e2e/browser-orientation-gizmo-evidence-helpers.ts +433 -0
  814. package/templates/starter/e2e/browser-performance-evidence.ts +22 -0
  815. package/templates/starter/e2e/browser-performance-measurement-evidence.ts +25 -0
  816. package/templates/starter/e2e/browser-performance-measurement-report.spec.ts +73 -0
  817. package/templates/starter/e2e/browser-performance-measurement-report.ts +218 -0
  818. package/templates/starter/e2e/browser-performance-report.ts +246 -0
  819. package/templates/starter/e2e/browser-performance-reporter-evaluation.ts +317 -0
  820. package/templates/starter/e2e/browser-performance-reporter.spec.ts +456 -0
  821. package/templates/starter/e2e/browser-performance-targeted-selection.spec.ts +145 -0
  822. package/templates/starter/e2e/browser-proof-session.ts +31 -1
  823. package/templates/starter/e2e/browser-render-scale-evidence.ts +253 -0
  824. package/templates/starter/e2e/browser-runtime-evidence-reporter-test-fixtures.ts +55 -0
  825. package/templates/starter/e2e/browser-runtime-evidence-reporter.ts +149 -4
  826. package/templates/starter/e2e/browser-runtime-evidence-requirements.ts +170 -55
  827. package/templates/starter/e2e/browser-semantic-evidence-test-helpers.ts +57 -0
  828. package/templates/starter/e2e/browser-standard-timeline-evidence.ts +106 -0
  829. package/templates/starter/e2e/browser-state-evidence-helpers.ts +7 -1
  830. package/templates/starter/e2e/browser-timeline-evidence-helpers.ts +4 -0
  831. package/templates/starter/e2e/canvas-handle-helpers.ts +3 -3
  832. package/templates/starter/e2e/decoded-pixel-observation.spec.ts +74 -0
  833. package/templates/starter/e2e/decoded-pixel-observation.ts +227 -0
  834. package/templates/starter/e2e/export-artifact-helpers.ts +206 -25
  835. package/templates/starter/e2e/image-artifact-inspection.spec.ts +41 -0
  836. package/templates/starter/e2e/image-artifact-inspection.ts +99 -0
  837. package/templates/starter/e2e/kernel-benchmark-contract.ts +19 -0
  838. package/templates/starter/e2e/model-import-evidence-test-support.ts +125 -0
  839. package/templates/starter/e2e/performance-budget-helpers.ts +3 -107
  840. package/templates/starter/e2e/performance-canvas-helpers.ts +29 -28
  841. package/templates/starter/e2e/performance-canvas-quality-guard.spec.ts +312 -0
  842. package/templates/starter/e2e/performance-canvas-quality-guard.ts +196 -0
  843. package/templates/starter/e2e/performance-canvas-quality-observer.ts +351 -0
  844. package/templates/starter/e2e/performance-checkpoint-report.ts +89 -0
  845. package/templates/starter/e2e/performance-compiled-fixture-runtime.ts +120 -0
  846. package/templates/starter/e2e/performance-control-helpers.ts +1 -1
  847. package/templates/starter/e2e/performance-control-layout-helpers.ts +24 -0
  848. package/templates/starter/e2e/performance-environment-evidence.ts +205 -0
  849. package/templates/starter/e2e/performance-fixture-helpers.ts +37 -210
  850. package/templates/starter/e2e/performance-fixture-selection.spec.ts +167 -0
  851. package/templates/starter/e2e/performance-fixture-selection.ts +82 -0
  852. package/templates/starter/e2e/performance-frame-metrics.spec.ts +21 -0
  853. package/templates/starter/e2e/performance-frame-metrics.ts +50 -0
  854. package/templates/starter/e2e/performance-frame-probe.ts +74 -49
  855. package/templates/starter/e2e/performance-helpers.ts +1 -0
  856. package/templates/starter/e2e/performance-interaction-measurement.ts +5 -11
  857. package/templates/starter/e2e/performance-measurement-evidence.ts +52 -8
  858. package/templates/starter/e2e/performance-model-appearance-contract.ts +11 -0
  859. package/templates/starter/e2e/performance-model-import-appearance-fixture-support.ts +32 -0
  860. package/templates/starter/e2e/performance-model-import-appearance-fixtures.spec.ts +56 -0
  861. package/templates/starter/e2e/performance-model-import-appearance-fixtures.ts +434 -0
  862. package/templates/starter/e2e/performance-model-import-binary-appearance-fixtures.ts +39 -0
  863. package/templates/starter/e2e/performance-model-import-fixtures.spec.ts +133 -0
  864. package/templates/starter/e2e/performance-model-import-fixtures.ts +439 -0
  865. package/templates/starter/e2e/performance-model-import-geometry-fixtures.ts +158 -0
  866. package/templates/starter/e2e/performance-model-import-helpers.ts +409 -0
  867. package/templates/starter/e2e/performance-model-import-zip-fixtures.ts +57 -0
  868. package/templates/starter/e2e/performance-model-orientation-helpers.ts +34 -0
  869. package/templates/starter/e2e/performance-model-pixel-helpers.ts +135 -0
  870. package/templates/starter/e2e/performance-output-action-helpers.ts +4 -4
  871. package/templates/starter/e2e/performance-path-adapter-contract.ts +55 -0
  872. package/templates/starter/e2e/performance-path-helpers.spec.ts +304 -0
  873. package/templates/starter/e2e/performance-path-helpers.ts +410 -0
  874. package/templates/starter/e2e/performance-pipeline-browser-helper.spec.ts +175 -0
  875. package/templates/starter/e2e/performance-pipeline-cache-fallback.spec.ts +204 -0
  876. package/templates/starter/e2e/performance-pipeline-evidence-continuity.spec.ts +210 -0
  877. package/templates/starter/e2e/performance-pipeline-evidence-test-fixtures.ts +418 -0
  878. package/templates/starter/e2e/performance-pipeline-evidence.spec.ts +441 -0
  879. package/templates/starter/e2e/performance-pipeline-evidence.ts +175 -0
  880. package/templates/starter/e2e/performance-pipeline-invariants.ts +402 -0
  881. package/templates/starter/e2e/performance-pipeline-resource-evidence.spec.ts +119 -0
  882. package/templates/starter/e2e/performance-profile-helpers.spec.ts +103 -0
  883. package/templates/starter/e2e/performance-profile-helpers.ts +52 -0
  884. package/templates/starter/e2e/performance-render-scale-runner.spec.ts +368 -0
  885. package/templates/starter/e2e/performance-slider-helpers.ts +7 -123
  886. package/templates/starter/e2e/product-observable-helpers.ts +109 -103
  887. package/templates/starter/e2e/toolcraft-delivery-catalog-reporter.ts +31 -0
  888. package/templates/starter/e2e/toolcraft-kernel-benchmark.spec.ts +107 -0
  889. package/templates/starter/e2e/toolcraft-product-test.spec.ts +14 -0
  890. package/templates/starter/e2e/toolcraft-product-test.ts +33 -0
  891. package/templates/starter/e2e/video-artifact-inspection.spec.ts +64 -0
  892. package/templates/starter/e2e/video-artifact-inspection.ts +281 -0
  893. package/templates/starter/gitignore +1 -0
  894. package/templates/starter/index.html +8 -0
  895. package/templates/starter/package.json +15 -11
  896. package/templates/starter/playwright.config.ts +124 -2
  897. package/templates/starter/scripts/check-toolcraft-code-health.mjs +66 -19
  898. package/templates/starter/scripts/check-toolcraft-code-health.test.mjs +151 -0
  899. package/templates/starter/scripts/check-toolcraft-docs.mjs +66 -3
  900. package/templates/starter/scripts/check-toolcraft-integrity.mjs +229 -117
  901. package/templates/starter/scripts/check-toolcraft-integrity.test.mjs +271 -0
  902. package/templates/starter/scripts/playwright-containing-file.mjs +48 -0
  903. package/templates/starter/scripts/playwright-test-shim-fixture.mjs +204 -0
  904. package/templates/starter/scripts/playwright-test-shim-fixture.test.mjs +69 -0
  905. package/templates/starter/scripts/playwright-test-title-selection-performance-path.test.mjs +129 -0
  906. package/templates/starter/scripts/playwright-test-title-selection.mjs +350 -0
  907. package/templates/starter/scripts/playwright-test-title-selection.test.mjs +465 -0
  908. package/templates/starter/scripts/run-browser-performance-test-helpers.mjs +335 -0
  909. package/templates/starter/scripts/run-browser-performance.mjs +71 -98
  910. package/templates/starter/scripts/run-browser-performance.test.mjs +266 -27
  911. package/templates/starter/scripts/run-delivery-verification-test-helpers.mjs +210 -0
  912. package/templates/starter/scripts/run-delivery-verification.mjs +47 -0
  913. package/templates/starter/scripts/run-delivery-verification.test.mjs +101 -0
  914. package/templates/starter/scripts/run-kernel-benchmarks.mjs +104 -0
  915. package/templates/starter/scripts/toolcraft-browser-impact-selection.mjs +26 -0
  916. package/templates/starter/scripts/toolcraft-checkpoint-bundle.mjs +198 -0
  917. package/templates/starter/scripts/toolcraft-checkpoint-bundle.test.mjs +297 -0
  918. package/templates/starter/scripts/toolcraft-checkpoint-capability-invariants.test.mjs +389 -0
  919. package/templates/starter/scripts/toolcraft-checkpoint-delivery-state.mjs +106 -0
  920. package/templates/starter/scripts/toolcraft-checkpoint-delivery-state.test.mjs +279 -0
  921. package/templates/starter/scripts/toolcraft-checkpoint-durability.test.mjs +49 -0
  922. package/templates/starter/scripts/toolcraft-checkpoint-durable-fs.mjs +90 -0
  923. package/templates/starter/scripts/toolcraft-checkpoint-ownership-policy.mjs +217 -0
  924. package/templates/starter/scripts/toolcraft-checkpoint-paths.mjs +35 -0
  925. package/templates/starter/scripts/toolcraft-checkpoint-transaction-test-helpers.mjs +12 -0
  926. package/templates/starter/scripts/toolcraft-checkpoint-transaction.mjs +125 -0
  927. package/templates/starter/scripts/toolcraft-checkpoint-transaction.test.mjs +167 -0
  928. package/templates/starter/scripts/toolcraft-checkpoint-write-capability.mjs +196 -0
  929. package/templates/starter/scripts/toolcraft-code-health-core.d.mts +46 -0
  930. package/templates/starter/scripts/toolcraft-code-health-core.mjs +80 -99
  931. package/templates/starter/scripts/toolcraft-code-health-line-budget.mjs +80 -0
  932. package/templates/starter/scripts/toolcraft-contract-doc-integrity.mjs +7 -3
  933. package/templates/starter/scripts/toolcraft-contract-doc-integrity.test.mjs +16 -0
  934. package/templates/starter/scripts/toolcraft-contract-manifest.json +42 -0
  935. package/templates/starter/scripts/toolcraft-contract-manifest.mjs +8 -0
  936. package/templates/starter/scripts/toolcraft-contract-manifest.test.mjs +40 -0
  937. package/templates/starter/scripts/toolcraft-css-source-evidence.mjs +192 -0
  938. package/templates/starter/scripts/toolcraft-css-source-evidence.test.mjs +336 -0
  939. package/templates/starter/scripts/toolcraft-css-url-graph-evidence.test.mjs +157 -0
  940. package/templates/starter/scripts/toolcraft-css-url-scanner.mjs +333 -0
  941. package/templates/starter/scripts/toolcraft-css-url-scanner.test.mjs +210 -0
  942. package/templates/starter/scripts/toolcraft-delivery-anchor.d.mts +46 -0
  943. package/templates/starter/scripts/toolcraft-delivery-anchor.mjs +84 -0
  944. package/templates/starter/scripts/toolcraft-delivery-anchor.test.mjs +131 -0
  945. package/templates/starter/scripts/toolcraft-delivery-architecture-inventory.mjs +86 -0
  946. package/templates/starter/scripts/toolcraft-delivery-architecture-policy.d.mts +51 -0
  947. package/templates/starter/scripts/toolcraft-delivery-architecture-policy.mjs +248 -0
  948. package/templates/starter/scripts/toolcraft-delivery-architecture-test-helpers.mjs +40 -0
  949. package/templates/starter/scripts/toolcraft-delivery-catalog-collector.mjs +55 -0
  950. package/templates/starter/scripts/toolcraft-delivery-catalog-collector.test.mjs +167 -0
  951. package/templates/starter/scripts/toolcraft-delivery-evidence.mjs +187 -0
  952. package/templates/starter/scripts/toolcraft-delivery-evidence.test.mjs +268 -0
  953. package/templates/starter/scripts/toolcraft-delivery-executor.mjs +294 -0
  954. package/templates/starter/scripts/toolcraft-delivery-executor.test.mjs +463 -0
  955. package/templates/starter/scripts/toolcraft-delivery-framework-refresh.test.mjs +141 -0
  956. package/templates/starter/scripts/toolcraft-delivery-functional-changed.test.mjs +468 -0
  957. package/templates/starter/scripts/toolcraft-delivery-functional-context.d.mts +72 -0
  958. package/templates/starter/scripts/toolcraft-delivery-functional-context.mjs +56 -0
  959. package/templates/starter/scripts/toolcraft-delivery-functional-context.test.mjs +231 -0
  960. package/templates/starter/scripts/toolcraft-delivery-functional-initial.test.mjs +212 -0
  961. package/templates/starter/scripts/toolcraft-delivery-functional-model-lifecycle.test.mjs +254 -0
  962. package/templates/starter/scripts/toolcraft-delivery-functional-semantic-regression.test.mjs +135 -0
  963. package/templates/starter/scripts/toolcraft-delivery-lifecycle-state.mjs +226 -0
  964. package/templates/starter/scripts/toolcraft-delivery-lifecycle-state.test.mjs +83 -0
  965. package/templates/starter/scripts/toolcraft-delivery-lifecycle.mjs +340 -0
  966. package/templates/starter/scripts/toolcraft-delivery-module-graph.test.mjs +393 -0
  967. package/templates/starter/scripts/toolcraft-delivery-performance-iteration-authority.test.mjs +88 -0
  968. package/templates/starter/scripts/toolcraft-delivery-performance-iteration-durability.test.mjs +329 -0
  969. package/templates/starter/scripts/toolcraft-delivery-performance-iteration-evidence.test.mjs +104 -0
  970. package/templates/starter/scripts/toolcraft-delivery-performance-iteration-lifecycle.test.mjs +478 -0
  971. package/templates/starter/scripts/toolcraft-delivery-performance-iteration-test-helpers.mjs +19 -0
  972. package/templates/starter/scripts/toolcraft-delivery-plan-authority.test.mjs +342 -0
  973. package/templates/starter/scripts/toolcraft-delivery-plan-construction.mjs +166 -0
  974. package/templates/starter/scripts/toolcraft-delivery-plan-errors.test.mjs +430 -0
  975. package/templates/starter/scripts/toolcraft-delivery-plan-functional-model.test.mjs +358 -0
  976. package/templates/starter/scripts/toolcraft-delivery-plan.d.mts +155 -0
  977. package/templates/starter/scripts/toolcraft-delivery-plan.mjs +338 -0
  978. package/templates/starter/scripts/toolcraft-delivery-plan.test.mjs +487 -0
  979. package/templates/starter/scripts/toolcraft-delivery-receipt-performance.test.mjs +156 -0
  980. package/templates/starter/scripts/toolcraft-delivery-receipt-strictness.test.mjs +220 -0
  981. package/templates/starter/scripts/toolcraft-delivery-receipt-test-helpers.mjs +226 -0
  982. package/templates/starter/scripts/toolcraft-delivery-receipt.d.mts +83 -0
  983. package/templates/starter/scripts/toolcraft-delivery-receipt.mjs +216 -0
  984. package/templates/starter/scripts/toolcraft-delivery-receipt.test.mjs +195 -0
  985. package/templates/starter/scripts/toolcraft-delivery-receipt.types.test.mts +161 -0
  986. package/templates/starter/scripts/toolcraft-dependency-source-record.mjs +59 -0
  987. package/templates/starter/scripts/toolcraft-fixture-module-closure.mjs +279 -0
  988. package/templates/starter/scripts/toolcraft-fixture-module-closure.test.mjs +184 -0
  989. package/templates/starter/scripts/toolcraft-full-performance-test-helpers.mjs +67 -0
  990. package/templates/starter/scripts/toolcraft-functional-proof-model.d.mts +47 -0
  991. package/templates/starter/scripts/toolcraft-functional-proof-model.mjs +198 -0
  992. package/templates/starter/scripts/toolcraft-functional-proof-model.test.mjs +453 -0
  993. package/templates/starter/scripts/toolcraft-functional-proof-model.types.test.mts +102 -0
  994. package/templates/starter/scripts/toolcraft-functional-proof-primitives.d.mts +6 -0
  995. package/templates/starter/scripts/toolcraft-functional-proof-primitives.mjs +98 -0
  996. package/templates/starter/scripts/toolcraft-functional-proof-primitives.test.mjs +67 -0
  997. package/templates/starter/scripts/toolcraft-functional-proof-regression-fixtures.mjs +298 -0
  998. package/templates/starter/scripts/toolcraft-graph-reachability.mjs +73 -0
  999. package/templates/starter/scripts/toolcraft-integrity-manifest.mjs +5 -2
  1000. package/templates/starter/scripts/toolcraft-integrity-policy.d.mts +6 -0
  1001. package/templates/starter/scripts/toolcraft-integrity-policy.mjs +14 -6
  1002. package/templates/starter/scripts/toolcraft-integrity-test-utils.mjs +84 -0
  1003. package/templates/starter/scripts/toolcraft-kernel-benchmark-receipt.d.mts +47 -0
  1004. package/templates/starter/scripts/toolcraft-kernel-benchmark-receipt.mjs +306 -0
  1005. package/templates/starter/scripts/toolcraft-kernel-benchmark-receipt.test.mjs +169 -0
  1006. package/templates/starter/scripts/toolcraft-layer-evidence-facade.test.mjs +256 -0
  1007. package/templates/starter/scripts/toolcraft-layer-evidence-reporter.test.mjs +106 -0
  1008. package/templates/starter/scripts/toolcraft-local-dependency-evidence.test.mjs +453 -0
  1009. package/templates/starter/scripts/toolcraft-local-dependency-graph.mjs +344 -0
  1010. package/templates/starter/scripts/toolcraft-local-dependency-graph.test.mjs +372 -0
  1011. package/templates/starter/scripts/toolcraft-performance-authority-policy.d.mts +40 -0
  1012. package/templates/starter/scripts/toolcraft-performance-authority-policy.mjs +274 -0
  1013. package/templates/starter/scripts/toolcraft-performance-checkpoint-runner.mjs +87 -0
  1014. package/templates/starter/scripts/toolcraft-performance-checkpoint-runner.test.mjs +50 -0
  1015. package/templates/starter/scripts/toolcraft-performance-escalation-policy.mjs +72 -0
  1016. package/templates/starter/scripts/toolcraft-performance-escalation-policy.test.mjs +393 -0
  1017. package/templates/starter/scripts/toolcraft-performance-iteration-comparison.mjs +127 -0
  1018. package/templates/starter/scripts/toolcraft-performance-iteration-comparison.test.mjs +133 -0
  1019. package/templates/starter/scripts/toolcraft-performance-receipt-policy.mjs +127 -0
  1020. package/templates/starter/scripts/toolcraft-performance-receipt-validation.test.mjs +214 -0
  1021. package/templates/starter/scripts/toolcraft-performance-report.d.mts +34 -0
  1022. package/templates/starter/scripts/toolcraft-performance-report.mjs +244 -0
  1023. package/templates/starter/scripts/toolcraft-performance-report.test.mjs +138 -0
  1024. package/templates/starter/scripts/toolcraft-performance-request-authority.mjs +64 -0
  1025. package/templates/starter/scripts/toolcraft-performance-request-authority.test.mjs +488 -0
  1026. package/templates/starter/scripts/toolcraft-plan-execution-authority.mjs +143 -0
  1027. package/templates/starter/scripts/toolcraft-playwright-evidence-authority.mjs +96 -0
  1028. package/templates/starter/scripts/toolcraft-playwright-evidence-authority.test.mjs +94 -0
  1029. package/templates/starter/scripts/toolcraft-product-boundary-ast.mjs +87 -51
  1030. package/templates/starter/scripts/toolcraft-product-boundary-graph-evidence.test.mjs +161 -0
  1031. package/templates/starter/scripts/toolcraft-product-boundary.mjs +116 -129
  1032. package/templates/starter/scripts/toolcraft-product-boundary.test.mjs +92 -0
  1033. package/templates/starter/scripts/toolcraft-product-dependency-resolution.mjs +61 -118
  1034. package/templates/starter/scripts/toolcraft-product-evidence-boundary-ast.mjs +97 -31
  1035. package/templates/starter/scripts/toolcraft-product-evidence-boundary.test.mjs +269 -1
  1036. package/templates/starter/scripts/toolcraft-product-evidence-import-policy.mjs +43 -0
  1037. package/templates/starter/scripts/toolcraft-product-export-boundary.mjs +168 -0
  1038. package/templates/starter/scripts/toolcraft-product-model-presentation-boundary.test.mjs +49 -0
  1039. package/templates/starter/scripts/toolcraft-product-observable-facade.test.mjs +223 -0
  1040. package/templates/starter/scripts/toolcraft-product-style-boundary.mjs +0 -136
  1041. package/templates/starter/scripts/toolcraft-proof-process.mjs +199 -0
  1042. package/templates/starter/scripts/toolcraft-proof-process.test.mjs +466 -0
  1043. package/templates/starter/scripts/toolcraft-protected-browser-build.mjs +32 -0
  1044. package/templates/starter/scripts/toolcraft-readonly-adjacency.mjs +44 -0
  1045. package/templates/starter/scripts/toolcraft-receipt-boundary.test.mjs +285 -0
  1046. package/templates/starter/scripts/toolcraft-receipt-file-io.mjs +16 -0
  1047. package/templates/starter/scripts/toolcraft-source-inventory.mjs +100 -1
  1048. package/templates/starter/scripts/toolcraft-source-inventory.test.mjs +106 -0
  1049. package/templates/starter/scripts/toolcraft-source-ownership.mjs +15 -0
  1050. package/templates/starter/scripts/toolcraft-source-ownership.test.mjs +31 -1
  1051. package/templates/starter/scripts/toolcraft-state-evidence-facade.test.mjs +258 -0
  1052. package/templates/starter/scripts/toolcraft-state-evidence-reporter.test.mjs +78 -0
  1053. package/templates/starter/scripts/toolcraft-static-string.mjs +234 -28
  1054. package/templates/starter/scripts/toolcraft-targeted-performance-execution.mjs +274 -0
  1055. package/templates/starter/scripts/toolcraft-targeted-performance-execution.test.mjs +225 -0
  1056. package/templates/starter/scripts/toolcraft-targeted-performance-report-combination.mjs +83 -0
  1057. package/templates/starter/scripts/toolcraft-targeted-performance-report-combination.test.mjs +131 -0
  1058. package/templates/starter/scripts/toolcraft-targeted-performance-report.d.mts +89 -0
  1059. package/templates/starter/scripts/toolcraft-targeted-performance-report.mjs +321 -0
  1060. package/templates/starter/scripts/toolcraft-targeted-performance-report.test.mjs +225 -0
  1061. package/templates/starter/scripts/toolcraft-targeted-performance-report.types.test.mts +71 -0
  1062. package/templates/starter/scripts/toolcraft-typescript-analysis.d.mts +73 -0
  1063. package/templates/starter/scripts/toolcraft-typescript-analysis.mjs +334 -0
  1064. package/templates/starter/scripts/toolcraft-typescript-architecture-invariants.test.mjs +202 -0
  1065. package/templates/starter/scripts/toolcraft-typescript-callables.mjs +83 -0
  1066. package/templates/starter/scripts/toolcraft-typescript-module-shape.mjs +156 -0
  1067. package/templates/starter/scripts/toolcraft-typescript-semantic-evidence.mjs +66 -0
  1068. package/templates/starter/scripts/toolcraft-typescript-source-evidence-structure.test.mjs +44 -0
  1069. package/templates/starter/scripts/toolcraft-typescript-source-evidence.d.mts +86 -0
  1070. package/templates/starter/scripts/toolcraft-typescript-source-evidence.mjs +334 -0
  1071. package/templates/starter/scripts/toolcraft-unavailable-resource-evidence-facade-test-helpers.mjs +318 -0
  1072. package/templates/starter/scripts/toolcraft-unavailable-resource-evidence-facade.test.mjs +388 -0
  1073. package/templates/starter/scripts/toolcraft-verification-impact-inventory.d.mts +62 -0
  1074. package/templates/starter/scripts/toolcraft-verification-impact-inventory.mjs +344 -0
  1075. package/templates/starter/scripts/toolcraft-verification-impact-inventory.test.mjs +204 -0
  1076. package/templates/starter/scripts/toolcraft-verification-impact-performance-candidates.test.mjs +210 -0
  1077. package/templates/starter/scripts/toolcraft-verification-impact-resolution.mjs +344 -0
  1078. package/templates/starter/scripts/toolcraft-verification-impact-resolution.test.mjs +270 -0
  1079. package/templates/starter/scripts/toolcraft-verification-impact-semantic-resolution.test.mjs +449 -0
  1080. package/templates/starter/scripts/toolcraft-verification-impact-support-resolution.test.mjs +195 -0
  1081. package/templates/starter/scripts/toolcraft-verification-impact.d.mts +132 -0
  1082. package/templates/starter/scripts/toolcraft-verification-impact.mjs +169 -0
  1083. package/templates/starter/scripts/toolcraft-verification-impact.test.mjs +300 -0
  1084. package/templates/starter/scripts/toolcraft-verification-input-roles.d.mts +60 -0
  1085. package/templates/starter/scripts/toolcraft-verification-input-roles.mjs +197 -0
  1086. package/templates/starter/scripts/toolcraft-verification-input-roles.test.mjs +225 -0
  1087. package/templates/starter/scripts/toolcraft-verification-inventory.mjs +139 -42
  1088. package/templates/starter/scripts/toolcraft-verification-lock.mjs +64 -0
  1089. package/templates/starter/scripts/toolcraft-verification-receipt-test-helpers.mjs +245 -0
  1090. package/templates/starter/scripts/toolcraft-verification-receipt.d.mts +40 -6
  1091. package/templates/starter/scripts/toolcraft-verification-receipt.mjs +95 -229
  1092. package/templates/starter/scripts/toolcraft-verification-receipt.test.mjs +373 -207
  1093. package/templates/starter/scripts/toolcraft-vite-env-activation.test.mjs +200 -0
  1094. package/templates/starter/scripts/toolcraft-vitest-runtime-contract.mjs +18 -0
  1095. package/templates/starter/scripts/toolcraft-vitest-runtime-contract.test.mjs +36 -0
  1096. package/templates/starter/scripts/toolcraft-vitest-runtime-evidence-reporter.test.mjs +7 -0
  1097. package/templates/starter/scripts/toolcraft-worklog-decision-trail.d.mts +14 -0
  1098. package/templates/starter/scripts/toolcraft-worklog-decision-trail.mjs +170 -0
  1099. package/templates/starter/src/app/acceptance/canvas-coverage.ts +18 -0
  1100. package/templates/starter/src/app/acceptance/canvas-handle-acceptance.ts +5 -14
  1101. package/templates/starter/src/app/acceptance/condition-exclusivity.test.ts +60 -0
  1102. package/templates/starter/src/app/acceptance/condition-exclusivity.ts +221 -0
  1103. package/templates/starter/src/app/acceptance/control-acceptance-context.ts +20 -6
  1104. package/templates/starter/src/app/acceptance/control-acceptance-coverage.ts +60 -10
  1105. package/templates/starter/src/app/acceptance/control-acceptance-kind-rules.ts +55 -7
  1106. package/templates/starter/src/app/acceptance/control-acceptance.ts +3 -0
  1107. package/templates/starter/src/app/acceptance/control-component-rules.ts +0 -32
  1108. package/templates/starter/src/app/acceptance/control-layout-entity-rules.ts +7 -4
  1109. package/templates/starter/src/app/acceptance/control-layout-model.ts +12 -4
  1110. package/templates/starter/src/app/acceptance/control-section-inventory.test.ts +136 -0
  1111. package/templates/starter/src/app/acceptance/control-section-inventory.ts +69 -24
  1112. package/templates/starter/src/app/acceptance/controls.ts +4 -0
  1113. package/templates/starter/src/app/acceptance/export-artifact-coverage.ts +113 -0
  1114. package/templates/starter/src/app/acceptance/infinity-canvas.ts +81 -0
  1115. package/templates/starter/src/app/acceptance/inline-layout.ts +14 -3
  1116. package/templates/starter/src/app/acceptance/interaction-ownership-intent.ts +31 -0
  1117. package/templates/starter/src/app/acceptance/interaction-ownership.ts +283 -0
  1118. package/templates/starter/src/app/acceptance/interaction-targets.ts +18 -0
  1119. package/templates/starter/src/app/acceptance/media-upload.ts +115 -10
  1120. package/templates/starter/src/app/acceptance/model-import-coverage.ts +42 -0
  1121. package/templates/starter/src/app/acceptance/orientation-gizmo.ts +176 -0
  1122. package/templates/starter/src/app/acceptance/output-background-rules.ts +58 -18
  1123. package/templates/starter/src/app/acceptance/output-export-layout-rules.ts +4 -8
  1124. package/templates/starter/src/app/acceptance/output-export-model.ts +17 -7
  1125. package/templates/starter/src/app/acceptance/output-export.ts +13 -2
  1126. package/templates/starter/src/app/acceptance/reference-study-types.ts +60 -0
  1127. package/templates/starter/src/app/acceptance/render-scale.ts +107 -0
  1128. package/templates/starter/src/app/acceptance/runtime-coverage.ts +45 -0
  1129. package/templates/starter/src/app/acceptance/runtime-setup.ts +4 -2
  1130. package/templates/starter/src/app/acceptance/types.ts +73 -63
  1131. package/templates/starter/src/app/acceptance/validate-coverage.ts +78 -5
  1132. package/templates/starter/src/app/acceptance/validation-pipeline.test.ts +5 -1
  1133. package/templates/starter/src/app/acceptance/validation-pipeline.ts +2 -0
  1134. package/templates/starter/src/app/acceptance/view-interaction-intent.ts +23 -0
  1135. package/templates/starter/src/app/acceptance/view-interaction.ts +148 -0
  1136. package/templates/starter/src/app/starter-acceptance-data.ts +28 -1
  1137. package/templates/starter/src/app/starter-acceptance.animation-intent.test.ts +7 -4
  1138. package/templates/starter/src/app/starter-acceptance.background-export.test.ts +17 -14
  1139. package/templates/starter/src/app/starter-acceptance.base-coverage.test.ts +3 -0
  1140. package/templates/starter/src/app/starter-acceptance.canvas-sizing.test.ts +133 -4
  1141. package/templates/starter/src/app/starter-acceptance.compound-part-coverage.test.ts +6 -4
  1142. package/templates/starter/src/app/starter-acceptance.contract-fixtures.test.ts +40 -0
  1143. package/templates/starter/src/app/starter-acceptance.contract-fixtures.ts +20 -2
  1144. package/templates/starter/src/app/starter-acceptance.control-label-context.test.ts +7 -5
  1145. package/templates/starter/src/app/starter-acceptance.control-labels.test.ts +10 -8
  1146. package/templates/starter/src/app/starter-acceptance.control-naming-rules.test.ts +6 -7
  1147. package/templates/starter/src/app/starter-acceptance.control-order.test.ts +110 -2
  1148. package/templates/starter/src/app/starter-acceptance.control-state.test.ts +6 -7
  1149. package/templates/starter/src/app/starter-acceptance.curves-rules.test.ts +4 -5
  1150. package/templates/starter/src/app/starter-acceptance.custom-control-collections.test.ts +7 -5
  1151. package/templates/starter/src/app/starter-acceptance.custom-control-coverage.test.ts +3 -4
  1152. package/templates/starter/src/app/starter-acceptance.custom-control-fit-check.test.ts +6 -4
  1153. package/templates/starter/src/app/starter-acceptance.custom-control-valid.test.ts +5 -3
  1154. package/templates/starter/src/app/starter-acceptance.export-artifact.test.ts +131 -0
  1155. package/templates/starter/src/app/starter-acceptance.image-video-export-settings.test.ts +5 -6
  1156. package/templates/starter/src/app/starter-acceptance.interaction-ownership.test.ts +408 -0
  1157. package/templates/starter/src/app/starter-acceptance.keyframes.test.ts +17 -6
  1158. package/templates/starter/src/app/starter-acceptance.layers.test.ts +2 -0
  1159. package/templates/starter/src/app/starter-acceptance.media-upload.fixtures.ts +34 -4
  1160. package/templates/starter/src/app/starter-acceptance.media-upload.test.ts +225 -2
  1161. package/templates/starter/src/app/starter-acceptance.orientation-gizmo.test.ts +265 -0
  1162. package/templates/starter/src/app/starter-acceptance.output-export-rules.test.ts +52 -21
  1163. package/templates/starter/src/app/starter-acceptance.persistence-coverage.test.ts +50 -0
  1164. package/templates/starter/src/app/starter-acceptance.product-output-export.test.ts +7 -7
  1165. package/templates/starter/src/app/starter-acceptance.product-readiness.test.ts +2 -0
  1166. package/templates/starter/src/app/starter-acceptance.product-worklog.test.ts +1 -7
  1167. package/templates/starter/src/app/starter-acceptance.range-slider-rules.test.ts +3 -4
  1168. package/templates/starter/src/app/starter-acceptance.reference-foundation.test.ts +2 -2
  1169. package/templates/starter/src/app/starter-acceptance.render-scale.test.ts +305 -0
  1170. package/templates/starter/src/app/starter-acceptance.schema-test-utils.ts +1 -1
  1171. package/templates/starter/src/app/starter-acceptance.section-cohesion.test.ts +5 -5
  1172. package/templates/starter/src/app/starter-acceptance.section-dependencies.test.ts +11 -5
  1173. package/templates/starter/src/app/starter-acceptance.section-titles.test.ts +4 -5
  1174. package/templates/starter/src/app/starter-acceptance.setup-readiness.test.ts +26 -9
  1175. package/templates/starter/src/app/starter-acceptance.slider-rules.test.ts +9 -7
  1176. package/templates/starter/src/app/starter-acceptance.slider-unit-rules.test.ts +2 -3
  1177. package/templates/starter/src/app/starter-acceptance.text-control-kind.test.ts +3 -4
  1178. package/templates/starter/src/app/starter-acceptance.toggle-pair-layout.test.ts +5 -6
  1179. package/templates/starter/src/app/starter-acceptance.toggle-parameter-layout.test.ts +63 -7
  1180. package/templates/starter/src/app/starter-acceptance.ts +31 -0
  1181. package/templates/starter/src/app/starter-acceptance.video-reference-study.test.ts +3 -3
  1182. package/templates/starter/src/app/starter-acceptance.view-interaction.test.ts +282 -0
  1183. package/templates/starter/src/app/starter-acceptance.worklog-command-authority.test.ts +123 -0
  1184. package/templates/starter/src/app/starter-acceptance.worklog-performance-command-cases.ts +34 -0
  1185. package/templates/starter/src/app/starter-acceptance.worklog-performance-intent-test-utils.ts +98 -0
  1186. package/templates/starter/src/app/starter-acceptance.worklog-performance-intent.test.ts +299 -0
  1187. package/templates/starter/src/app/starter-acceptance.worklog-test-utils.ts +76 -173
  1188. package/templates/starter/src/app/starter-acceptance.worklog.test.ts +92 -114
  1189. package/templates/starter/src/app/starter-automated-runtime-evidence.test.ts +0 -8
  1190. package/templates/starter/src/app/starter-composition.tsx +1 -0
  1191. package/templates/starter/src/app/starter-identity.ts +4 -0
  1192. package/templates/starter/src/app/starter-performance-test-utils.ts +103 -87
  1193. package/templates/starter/src/app/starter-performance.fixture-helper.test.ts +191 -0
  1194. package/templates/starter/src/app/starter-performance.gates.test.ts +379 -80
  1195. package/templates/starter/src/app/starter-performance.lifecycle.test.ts +261 -0
  1196. package/templates/starter/src/app/starter-performance.ts +8 -13
  1197. package/templates/starter/src/app/starter-schema.test.ts +26 -2
  1198. package/templates/starter/src/app/starter-schema.ts +3 -0
  1199. package/templates/starter/src/app/starter-verification-impact.json +15 -0
  1200. package/templates/starter/src/app/test-evidence/browser-performance-contract.ts +387 -0
  1201. package/templates/starter/src/app/test-evidence/browser-performance-measurement-contract.ts +258 -0
  1202. package/templates/starter/src/app/test-evidence/browser-runtime-contract.ts +33 -2
  1203. package/templates/starter/src/router.tsx +3 -0
  1204. package/templates/starter/src/routes/index.tsx +4 -0
  1205. package/templates/starter/tsconfig.json +7 -1
  1206. package/templates/ui/components/composites/tabs.tsx +10 -0
  1207. package/templates/ui/components/controls/actions/actions-control.tsx +17 -1
  1208. package/templates/ui/components/controls/actions/index.ts +1 -0
  1209. package/templates/ui/components/controls/boolean/boolean-controls.tsx +5 -0
  1210. package/templates/ui/components/controls/file-drop/file-drop-control.test.tsx +96 -0
  1211. package/templates/ui/components/controls/file-drop/file-drop-control.tsx +325 -104
  1212. package/templates/ui/components/controls/file-drop/file-drop-empty-state.tsx +51 -17
  1213. package/templates/ui/components/controls/file-drop/file-drop-file-list.tsx +85 -61
  1214. package/templates/ui/components/controls/file-drop/file-drop-folder-input.tsx +39 -0
  1215. package/templates/ui/components/controls/file-drop/file-drop-image-grid.tsx +64 -43
  1216. package/templates/ui/components/controls/file-drop/file-drop-presentation-messages.tsx +57 -0
  1217. package/templates/ui/components/controls/file-drop/file-drop-presentation.test.ts +58 -0
  1218. package/templates/ui/components/controls/file-drop/{file-drop-model.tsx → file-drop-presentation.tsx} +128 -2
  1219. package/templates/ui/components/controls/file-drop/file-drop-single-preview.tsx +32 -25
  1220. package/templates/ui/components/controls/file-drop/file-drop-types.ts +99 -8
  1221. package/templates/ui/components/controls/file-drop/index.ts +5 -1
  1222. package/templates/ui/components/controls/font-picker/font-catalog.node-import.test.ts +24 -0
  1223. package/templates/ui/components/controls/font-picker/font-catalog.ts +1 -1
  1224. package/templates/ui/components/controls/index.ts +7 -0
  1225. package/templates/ui/components/controls/tabs/index.ts +4 -0
  1226. package/templates/ui/components/controls/tabs/tabs-control.tsx +166 -0
  1227. package/templates/ui/components/panel/panel-section.tsx +6 -1
  1228. package/templates/ui/components/panel/panel.tsx +6 -2
  1229. package/templates/ui/components/primitives/index.ts +1 -0
  1230. package/templates/ui/components/primitives/scroll-fade-render.tsx +11 -2
  1231. package/templates/ui/components/primitives/scroll-fade-types.ts +2 -0
  1232. package/templates/ui/components/primitives/scroll-fade.test.tsx +63 -0
  1233. package/templates/ui/components/primitives/scroll-fade.tsx +2 -0
  1234. package/templates/ui/index.ts +1 -0
  1235. package/templates/runtime/export/export.ts +0 -281
  1236. package/templates/runtime/react/controls-panel/layout/controls-panel-collapse-storage.ts +0 -131
  1237. package/templates/runtime/testing/performance-browser-policy.test.ts +0 -81
  1238. package/templates/runtime/testing/performance-browser-policy.ts +0 -102
  1239. package/templates/runtime/testing/performance-budget-validation.ts +0 -84
  1240. package/templates/runtime/testing/performance-control-classification.test.ts +0 -106
  1241. package/templates/runtime/testing/performance-coverage-context.ts +0 -44
  1242. package/templates/runtime/testing/performance-coverage-renderer-policy.ts +0 -221
  1243. package/templates/runtime/testing/performance-coverage-scenario-policy.ts +0 -147
  1244. package/templates/runtime/testing/performance-coverage-target-policy.ts +0 -121
  1245. package/templates/runtime/testing/performance-export-coverage.test.ts +0 -234
  1246. package/templates/runtime/testing/performance-fixture-load-profile.test.ts +0 -360
  1247. package/templates/runtime/testing/performance-fixture-media.test.ts +0 -80
  1248. package/templates/runtime/testing/performance-fixture-stress.test.ts +0 -314
  1249. package/templates/runtime/testing/performance-fixture-validation.ts +0 -255
  1250. package/templates/runtime/testing/performance-fixture-values.ts +0 -275
  1251. package/templates/runtime/testing/performance-fixture-workload.test.ts +0 -140
  1252. package/templates/runtime/testing/performance-load-profile-validation.ts +0 -467
  1253. package/templates/runtime/testing/performance-renderer-coverage.test.ts +0 -325
  1254. package/templates/runtime/testing/performance-renderer-pipeline-coverage.test.ts +0 -115
  1255. package/templates/runtime/testing/performance-renderer-pipeline-interactions.test.ts +0 -201
  1256. package/templates/runtime/testing/performance-renderer-pipeline-passes.test.ts +0 -247
  1257. package/templates/runtime/testing/performance-renderer-technique.test.ts +0 -275
  1258. package/templates/runtime/testing/performance-renderer-validation.ts +0 -2
  1259. package/templates/runtime/testing/performance-scenario-coverage.test.ts +0 -303
  1260. package/templates/runtime/testing/performance-schema-derived-workloads.test.ts +0 -231
  1261. package/templates/runtime/testing/performance-test-fixtures/scenarios.ts +0 -172
  1262. package/templates/runtime/testing/performance-test-fixtures/stress-fixtures.ts +0 -133
  1263. package/templates/starter/e2e/performance-render-scale-helpers.ts +0 -55
  1264. package/templates/starter/scripts/check-ai-skills.mjs +0 -136
  1265. package/templates/starter/scripts/check-ai-skills.test.mjs +0 -64
  1266. package/templates/starter/scripts/toolcraft-product-boundary-ast-utils.mjs +0 -23
  1267. package/templates/starter/scripts/toolcraft-product-dependency-graph.mjs +0 -176
  1268. package/templates/starter/scripts/toolcraft-product-dependency-graph.test.mjs +0 -196
  1269. package/templates/starter/src/app/starter-acceptance.video-export-test-utils.ts +0 -37
  1270. package/templates/starter/src/app/starter-performance.budgets.test.ts +0 -374
  1271. package/templates/starter/src/app/starter-performance.renderer-source.test.ts +0 -136
  1272. package/templates/starter/src/app/starter-performance.renderer-technique.test.ts +0 -291
  1273. package/templates/starter/src/app/starter-performance.scenarios.test.ts +0 -355
@@ -0,0 +1,612 @@
1
+ import { Document, type Accessor, type GLTF } from "@gltf-transform/core";
2
+
3
+ import { TOOLCRAFT_DEFAULT_MODEL_IMPORT_LIMITS } from "../model-import-limits";
4
+ import type {
5
+ ToolcraftModelDecodeContext,
6
+ ToolcraftModelSourceBundleTransfer,
7
+ } from "../model-import-types";
8
+
9
+ type PrimitiveFixtureOptions = Readonly<{
10
+ indices?: readonly number[] | null;
11
+ mode?: GLTF.MeshPrimitiveMode;
12
+ positions?: readonly number[];
13
+ }>;
14
+
15
+ export type ModelFixture = Readonly<{
16
+ bin: Uint8Array;
17
+ json: GLTF.IGLTF;
18
+ }>;
19
+
20
+ export type CoreTriangleDocumentFixture = Readonly<{
21
+ document: Document;
22
+ indices: Accessor;
23
+ positions: Accessor;
24
+ }>;
25
+
26
+ const encoder = new TextEncoder();
27
+
28
+ function align4(value: number): number {
29
+ return (value + 3) & ~3;
30
+ }
31
+
32
+ function viewBytes(view: ArrayBufferView): Uint8Array {
33
+ return new Uint8Array(view.buffer, view.byteOffset, view.byteLength);
34
+ }
35
+
36
+ function joinViews(views: readonly ArrayBufferView[]): {
37
+ bin: Uint8Array;
38
+ bufferViews: GLTF.IBufferView[];
39
+ } {
40
+ const bufferViews: GLTF.IBufferView[] = [];
41
+ let byteLength = 0;
42
+ for (const view of views) {
43
+ byteLength = align4(byteLength);
44
+ bufferViews.push({ buffer: 0, byteLength: view.byteLength, byteOffset: byteLength });
45
+ byteLength += view.byteLength;
46
+ }
47
+ const bin = new Uint8Array(align4(byteLength));
48
+ views.forEach((view, index) => {
49
+ bin.set(viewBytes(view), bufferViews[index]!.byteOffset);
50
+ });
51
+ return { bin, bufferViews };
52
+ }
53
+
54
+ function cloneJson(json: GLTF.IGLTF): GLTF.IGLTF {
55
+ return JSON.parse(JSON.stringify(json)) as GLTF.IGLTF;
56
+ }
57
+
58
+ function arrayBuffer(bytes: Uint8Array): ArrayBuffer {
59
+ return bytes.slice().buffer;
60
+ }
61
+
62
+ export function createCoreTriangleDocumentFixture(
63
+ options: Readonly<{
64
+ indices?: readonly number[];
65
+ instanceMeshOnEveryNode?: boolean;
66
+ nodeCount?: number;
67
+ positions?: readonly number[];
68
+ primitiveCount?: number;
69
+ }> = {},
70
+ ): CoreTriangleDocumentFixture {
71
+ const document = new Document();
72
+ const buffer = document.createBuffer();
73
+ const positions = document
74
+ .createAccessor()
75
+ .setBuffer(buffer)
76
+ .setType("VEC3")
77
+ .setArray(
78
+ new Float32Array(
79
+ options.positions ?? [0, 0, 0, 1, 0, 0, 0, 1, 0],
80
+ ),
81
+ );
82
+ const indices = document
83
+ .createAccessor()
84
+ .setBuffer(buffer)
85
+ .setType("SCALAR")
86
+ .setArray(new Uint16Array(options.indices ?? [0, 1, 2]));
87
+ const mesh = document.createMesh();
88
+ for (let index = 0; index < (options.primitiveCount ?? 1); index += 1) {
89
+ mesh.addPrimitive(
90
+ document
91
+ .createPrimitive()
92
+ .setAttribute("POSITION", positions)
93
+ .setIndices(indices),
94
+ );
95
+ }
96
+ const scene = document.createScene();
97
+ scene.addChild(document.createNode().setMesh(mesh));
98
+ for (let index = 1; index < (options.nodeCount ?? 1); index += 1) {
99
+ const node = document.createNode();
100
+ if (options.instanceMeshOnEveryNode) node.setMesh(mesh);
101
+ scene.addChild(node);
102
+ }
103
+ document.getRoot().setDefaultScene(scene);
104
+ return { document, indices, positions };
105
+ }
106
+
107
+ export function createPrimitiveFixture(
108
+ options: PrimitiveFixtureOptions = {},
109
+ ): ModelFixture {
110
+ const positions = new Float32Array(
111
+ options.positions ?? [0, 0, 0, 1, 0, 0, 0, 1, 0],
112
+ );
113
+ const indices =
114
+ options.indices === null
115
+ ? null
116
+ : new Uint16Array(options.indices ?? [0, 1, 2]);
117
+ const joined = joinViews(indices ? [positions, indices] : [positions]);
118
+ const accessors: GLTF.IAccessor[] = [
119
+ {
120
+ bufferView: 0,
121
+ componentType: 5126,
122
+ count: positions.length / 3,
123
+ type: "VEC3",
124
+ },
125
+ ];
126
+ if (indices) {
127
+ accessors.push({
128
+ bufferView: 1,
129
+ componentType: 5123,
130
+ count: indices.length,
131
+ type: "SCALAR",
132
+ });
133
+ }
134
+ const primitive: GLTF.IMeshPrimitive = {
135
+ attributes: { POSITION: 0 },
136
+ mode: options.mode ?? 4,
137
+ };
138
+ if (indices) primitive.indices = 1;
139
+
140
+ return {
141
+ bin: joined.bin,
142
+ json: {
143
+ accessors,
144
+ asset: { version: "2.0" },
145
+ buffers: [{ byteLength: joined.bin.byteLength, uri: "mesh.bin" }],
146
+ bufferViews: joined.bufferViews,
147
+ meshes: [{ primitives: [primitive] }],
148
+ nodes: [{ mesh: 0, name: "Mesh" }],
149
+ scene: 0,
150
+ scenes: [{ nodes: [0] }],
151
+ },
152
+ };
153
+ }
154
+
155
+ export function createHierarchyFixture(): ModelFixture {
156
+ const firstPositions = new Float32Array([
157
+ 0, 0, 0, 2, 0, 0, 0, 3, 0,
158
+ ]);
159
+ const firstIndices = new Uint16Array([0, 1, 2]);
160
+ const secondPositions = new Float32Array([
161
+ -4, -2, 1, -2, -2, 1, -4, -1, 1,
162
+ ]);
163
+ const secondIndices = new Uint16Array([0, 1, 2]);
164
+ const joined = joinViews([
165
+ firstPositions,
166
+ firstIndices,
167
+ secondPositions,
168
+ secondIndices,
169
+ ]);
170
+
171
+ return {
172
+ bin: joined.bin,
173
+ json: {
174
+ accessors: [
175
+ { bufferView: 0, componentType: 5126, count: 3, type: "VEC3" },
176
+ { bufferView: 1, componentType: 5123, count: 3, type: "SCALAR" },
177
+ { bufferView: 2, componentType: 5126, count: 3, type: "VEC3" },
178
+ { bufferView: 3, componentType: 5123, count: 3, type: "SCALAR" },
179
+ ],
180
+ asset: { version: "2.0" },
181
+ buffers: [{ byteLength: joined.bin.byteLength, uri: "mesh.bin" }],
182
+ bufferViews: joined.bufferViews,
183
+ meshes: [
184
+ {
185
+ primitives: [
186
+ { attributes: { POSITION: 0 }, indices: 1, mode: 4 },
187
+ { attributes: { POSITION: 2 }, indices: 3, mode: 4 },
188
+ ],
189
+ },
190
+ ],
191
+ nodes: [
192
+ { children: [1], name: "Parent", translation: [100, 0, 0] },
193
+ {
194
+ matrix: [2, 0, 0, 0, 0, 2, 0, 0, 0, 0, 2, 0, 5, 6, 7, 1],
195
+ mesh: 0,
196
+ name: "Child",
197
+ },
198
+ { mesh: 0, name: "Instance", translation: [-50, 0, 0] },
199
+ ],
200
+ scene: 0,
201
+ scenes: [{ nodes: [0, 2] }],
202
+ },
203
+ };
204
+ }
205
+
206
+ export function createIgnoredFeaturesFixture(): ModelFixture {
207
+ const fixture = createPrimitiveFixture();
208
+ const json = cloneJson(fixture.json);
209
+ json.meshes![0]!.weights = [0];
210
+ json.meshes![0]!.primitives[0]!.targets = [{ POSITION: 0 }];
211
+ json.nodes![0]!.skin = 0;
212
+ json.nodes![0]!.weights = [0];
213
+ json.nodes!.push({ name: "Joint" });
214
+ json.skins = [{ joints: [1], name: "Rig" }];
215
+ json.animations = [
216
+ {
217
+ channels: [{ sampler: 0, target: { node: 0, path: "translation" } }],
218
+ name: "Move",
219
+ samplers: [{ input: 1, output: 0 }],
220
+ },
221
+ ];
222
+ return { bin: fixture.bin, json };
223
+ }
224
+
225
+ export function createNormalizedQuantizedFixture(): ModelFixture {
226
+ const positions = new Int16Array([
227
+ 0, 0, 0, 32767, 0, 0, 0, 32767, 0,
228
+ ]);
229
+ const normals = new Int8Array([
230
+ 0, 0, 127, 0, 0, 127, 0, 0, 127,
231
+ ]);
232
+ const indices = new Uint16Array([0, 1, 2]);
233
+ const joined = joinViews([positions, normals, indices]);
234
+ return {
235
+ bin: joined.bin,
236
+ json: {
237
+ accessors: [
238
+ {
239
+ bufferView: 0,
240
+ componentType: 5122,
241
+ count: 3,
242
+ normalized: true,
243
+ type: "VEC3",
244
+ },
245
+ {
246
+ bufferView: 1,
247
+ componentType: 5120,
248
+ count: 3,
249
+ normalized: true,
250
+ type: "VEC3",
251
+ },
252
+ { bufferView: 2, componentType: 5123, count: 3, type: "SCALAR" },
253
+ ],
254
+ asset: { version: "2.0" },
255
+ buffers: [{ byteLength: joined.bin.byteLength, uri: "mesh.bin" }],
256
+ bufferViews: joined.bufferViews,
257
+ extensionsRequired: ["KHR_mesh_quantization"],
258
+ extensionsUsed: ["KHR_mesh_quantization"],
259
+ meshes: [
260
+ {
261
+ primitives: [
262
+ {
263
+ attributes: { NORMAL: 1, POSITION: 0 },
264
+ indices: 2,
265
+ mode: 4,
266
+ },
267
+ ],
268
+ },
269
+ ],
270
+ nodes: [{ mesh: 0 }],
271
+ scene: 0,
272
+ scenes: [{ nodes: [0] }],
273
+ },
274
+ };
275
+ }
276
+
277
+ export function createAppearanceFixture(): ModelFixture {
278
+ const fixture = createPrimitiveFixture();
279
+ const json = cloneJson(fixture.json);
280
+ json.images = [{ uri: "https://example.invalid/texture.png" }];
281
+ json.textures = [{ source: 0 }];
282
+ json.materials = [
283
+ {
284
+ extensions: { KHR_materials_unlit: {} },
285
+ pbrMetallicRoughness: { baseColorTexture: { index: 0 } },
286
+ },
287
+ ];
288
+ json.meshes![0]!.primitives[0]!.material = 0;
289
+ json.extensionsUsed = ["KHR_materials_unlit"];
290
+ json.extensionsRequired = ["KHR_materials_unlit"];
291
+ return { bin: fixture.bin, json };
292
+ }
293
+
294
+ export function createExtensionOnlyBehaviorFixture(): ModelFixture {
295
+ const fixture = createPrimitiveFixture();
296
+ const json = cloneJson(fixture.json);
297
+ json.cameras = [{ type: "perspective", perspective: { yfov: 1, znear: 0.1 } }];
298
+ json.nodes![0]!.camera = 0;
299
+ (json as unknown as Record<string, unknown>).extensions = {
300
+ KHR_lights_punctual: {
301
+ lights: [{ color: [1, 1, 1], type: "point" }],
302
+ },
303
+ };
304
+ (json.nodes![0] as unknown as Record<string, unknown>).extensions = {
305
+ KHR_lights_punctual: { light: 0 },
306
+ KHR_node_visibility: { visible: false },
307
+ };
308
+ json.extensionsUsed = ["KHR_lights_punctual", "KHR_node_visibility"];
309
+ json.extensionsRequired = ["KHR_lights_punctual", "KHR_node_visibility"];
310
+ return { bin: fixture.bin, json };
311
+ }
312
+
313
+ export function createSparsePositionFixture(
314
+ sparseIndices: readonly number[],
315
+ ): ModelFixture {
316
+ const positions = new Float32Array(9);
317
+ const indices = new Uint16Array([0, 1, 2]);
318
+ const sparseIndexValues = new Uint8Array(sparseIndices);
319
+ const sparsePositions = new Float32Array(sparseIndices.length * 3);
320
+ const joined = joinViews([
321
+ positions,
322
+ indices,
323
+ sparseIndexValues,
324
+ sparsePositions,
325
+ ]);
326
+ return {
327
+ bin: joined.bin,
328
+ json: {
329
+ accessors: [
330
+ {
331
+ bufferView: 0,
332
+ componentType: 5126,
333
+ count: 3,
334
+ sparse: {
335
+ count: sparseIndices.length,
336
+ indices: { bufferView: 2, componentType: 5121 },
337
+ values: { bufferView: 3 },
338
+ },
339
+ type: "VEC3",
340
+ },
341
+ { bufferView: 1, componentType: 5123, count: 3, type: "SCALAR" },
342
+ ],
343
+ asset: { version: "2.0" },
344
+ buffers: [{ byteLength: joined.bin.byteLength, uri: "mesh.bin" }],
345
+ bufferViews: joined.bufferViews,
346
+ meshes: [
347
+ {
348
+ primitives: [
349
+ { attributes: { POSITION: 0 }, indices: 1, mode: 4 },
350
+ ],
351
+ },
352
+ ],
353
+ nodes: [{ mesh: 0 }],
354
+ scene: 0,
355
+ scenes: [{ nodes: [0] }],
356
+ },
357
+ };
358
+ }
359
+
360
+ export function createGltfTransfer(
361
+ fixture: ModelFixture,
362
+ rootPath = "scene.gltf",
363
+ bufferPath = `${rootPath.slice(0, Math.max(0, rootPath.lastIndexOf("/") + 1))}mesh.bin`,
364
+ ): ToolcraftModelSourceBundleTransfer {
365
+ const rootBytes = encoder.encode(JSON.stringify(fixture.json));
366
+ return Object.freeze({
367
+ aggregateDigest: "fixture-gltf",
368
+ rootPath,
369
+ sourceFiles: Object.freeze([
370
+ Object.freeze({
371
+ bytes: arrayBuffer(rootBytes),
372
+ contentDigest: "fixture-gltf-root",
373
+ mimeType: "model/gltf+json",
374
+ path: rootPath,
375
+ }),
376
+ Object.freeze({
377
+ bytes: arrayBuffer(fixture.bin),
378
+ contentDigest: "fixture-gltf-bin",
379
+ mimeType: "application/octet-stream",
380
+ path: bufferPath,
381
+ }),
382
+ ]),
383
+ });
384
+ }
385
+
386
+ export function encodeGlb(fixture: ModelFixture): Uint8Array {
387
+ const json = cloneJson(fixture.json);
388
+ if (json.buffers?.[0]) delete json.buffers[0].uri;
389
+ const rawJson = encoder.encode(JSON.stringify(json));
390
+ const jsonLength = align4(rawJson.byteLength);
391
+ const binLength = align4(fixture.bin.byteLength);
392
+ const totalLength = 12 + 8 + jsonLength + 8 + binLength;
393
+ const glb = new Uint8Array(totalLength);
394
+ const data = new DataView(glb.buffer);
395
+ data.setUint32(0, 0x46546c67, true);
396
+ data.setUint32(4, 2, true);
397
+ data.setUint32(8, totalLength, true);
398
+ data.setUint32(12, jsonLength, true);
399
+ data.setUint32(16, 0x4e4f534a, true);
400
+ glb.fill(0x20, 20, 20 + jsonLength);
401
+ glb.set(rawJson, 20);
402
+ const binHeader = 20 + jsonLength;
403
+ data.setUint32(binHeader, binLength, true);
404
+ data.setUint32(binHeader + 4, 0x004e4942, true);
405
+ glb.set(fixture.bin, binHeader + 8);
406
+ return glb;
407
+ }
408
+
409
+ export function createGlbTransfer(
410
+ fixture: ModelFixture,
411
+ rootPath = "scene.glb",
412
+ ): ToolcraftModelSourceBundleTransfer {
413
+ return transferForGlbBytes(encodeGlb(fixture), rootPath);
414
+ }
415
+
416
+ export function transferForGlbBytes(
417
+ bytes: Uint8Array,
418
+ rootPath = "scene.glb",
419
+ ): ToolcraftModelSourceBundleTransfer {
420
+ return Object.freeze({
421
+ aggregateDigest: "fixture-glb",
422
+ rootPath,
423
+ sourceFiles: Object.freeze([
424
+ Object.freeze({
425
+ bytes: arrayBuffer(bytes),
426
+ contentDigest: "fixture-glb-root",
427
+ mimeType: "model/gltf-binary",
428
+ path: rootPath,
429
+ }),
430
+ ]),
431
+ });
432
+ }
433
+
434
+ export function rewriteGlbJson(
435
+ bytes: Uint8Array,
436
+ rewrite: (json: GLTF.IGLTF) => void,
437
+ ): Uint8Array {
438
+ const data = new DataView(bytes.buffer, bytes.byteOffset, bytes.byteLength);
439
+ const jsonLength = data.getUint32(12, true);
440
+ const json = JSON.parse(
441
+ new TextDecoder().decode(bytes.subarray(20, 20 + jsonLength)).trimEnd(),
442
+ ) as GLTF.IGLTF;
443
+ const binHeader = 20 + jsonLength;
444
+ const binLength = data.getUint32(binHeader, true);
445
+ const bin = bytes.slice(binHeader + 8, binHeader + 8 + binLength);
446
+ rewrite(json);
447
+ return encodeGlb({ bin, json });
448
+ }
449
+
450
+ export function contextFor(
451
+ bundle: ToolcraftModelSourceBundleTransfer,
452
+ options: Readonly<{
453
+ limits?: Partial<ToolcraftModelDecodeContext["limits"]>;
454
+ signal?: AbortSignal;
455
+ }> = {},
456
+ ): ToolcraftModelDecodeContext {
457
+ return {
458
+ bundle,
459
+ limits: { ...TOOLCRAFT_DEFAULT_MODEL_IMPORT_LIMITS, ...options.limits },
460
+ signal: options.signal ?? new AbortController().signal,
461
+ };
462
+ }
463
+
464
+ export function transferForStaticModelBytes(
465
+ bytes: Uint8Array,
466
+ rootPath: string,
467
+ mimeType = "application/octet-stream",
468
+ ): ToolcraftModelSourceBundleTransfer {
469
+ return Object.freeze({
470
+ aggregateDigest: `fixture-${rootPath}`,
471
+ rootPath,
472
+ sourceFiles: Object.freeze([
473
+ Object.freeze({
474
+ bytes: arrayBuffer(bytes),
475
+ contentDigest: `fixture-${rootPath}-root`,
476
+ mimeType,
477
+ path: rootPath,
478
+ }),
479
+ ]),
480
+ });
481
+ }
482
+
483
+ export const OBJ_STATIC_GEOMETRY_FIXTURE = encoder.encode(`
484
+ mtllib ignored.mtl
485
+ o First
486
+ v 10 20 30
487
+ v 12 20 30
488
+ v 10 23 30
489
+ usemtl ignored-red
490
+ f 1 2 3
491
+ o Second
492
+ v -4 -2 1
493
+ v -2 -2 1
494
+ v -4 -1 1
495
+ usemtl ignored-blue
496
+ f 4 5 6
497
+ `);
498
+
499
+ export const ASCII_STL_FIXTURE = encoder.encode(`solid first
500
+ facet normal 0 0 1
501
+ outer loop
502
+ vertex 10 20 30
503
+ vertex 12 20 30
504
+ vertex 10 23 30
505
+ endloop
506
+ endfacet
507
+ endsolid first
508
+ `);
509
+
510
+ export function createBinaryStlFixture(): Uint8Array {
511
+ const bytes = new Uint8Array(84 + 50);
512
+ bytes.set(encoder.encode("Toolcraft binary STL fixture").subarray(0, 80));
513
+ const view = new DataView(bytes.buffer);
514
+ view.setUint32(80, 1, true);
515
+ const values = [
516
+ 0, 0, 1,
517
+ -4, -2, 1,
518
+ -2, -2, 1,
519
+ -4, -1, 1,
520
+ ];
521
+ values.forEach((value, index) => {
522
+ view.setFloat32(84 + index * 4, value, true);
523
+ });
524
+ view.setUint16(84 + 48, 0, true);
525
+ return bytes;
526
+ }
527
+
528
+ export function createBinaryColoredStlFixture(): Uint8Array {
529
+ const bytes = createBinaryStlFixture();
530
+ bytes.set([0x43, 0x4f, 0x4c, 0x4f, 0x52, 0x3d, 0xff, 0x00, 0x00, 0x80]);
531
+ new DataView(bytes.buffer).setUint16(84 + 48, 0x8000, true);
532
+ return bytes;
533
+ }
534
+
535
+ export const ASCII_PLY_FIXTURE = encoder.encode(`ply
536
+ format ascii 1.0
537
+ comment appearance data is intentionally ignored
538
+ element vertex 4
539
+ property float x
540
+ property float y
541
+ property float z
542
+ property uchar red
543
+ property uchar green
544
+ property uchar blue
545
+ element face 2
546
+ property list uchar int vertex_indices
547
+ end_header
548
+ 10 20 30 255 0 0
549
+ 12 20 30 0 255 0
550
+ 12 23 30 0 0 255
551
+ 10 23 30 255 255 255
552
+ 3 0 1 2
553
+ 3 0 2 3
554
+ `);
555
+
556
+ export function createBinaryPlyFixture(
557
+ endian: "big" | "little" = "little",
558
+ ): Uint8Array {
559
+ const littleEndian = endian === "little";
560
+ const header = encoder.encode(`ply
561
+ format binary_${endian}_endian 1.0
562
+ element vertex 4
563
+ property float x
564
+ property float y
565
+ property float z
566
+ element face 2
567
+ property list uchar int vertex_indices
568
+ end_header
569
+ `);
570
+ const body = new Uint8Array(4 * 12 + 2 * 13);
571
+ const view = new DataView(body.buffer);
572
+ const positions = [
573
+ 10, 20, 30,
574
+ 12, 20, 30,
575
+ 12, 23, 30,
576
+ 10, 23, 30,
577
+ ];
578
+ positions.forEach((value, index) => {
579
+ view.setFloat32(index * 4, value, littleEndian);
580
+ });
581
+ let offset = positions.length * 4;
582
+ for (const triangle of [[0, 1, 2], [0, 2, 3]] as const) {
583
+ view.setUint8(offset, 3);
584
+ offset += 1;
585
+ for (const index of triangle) {
586
+ view.setInt32(offset, index, littleEndian);
587
+ offset += 4;
588
+ }
589
+ }
590
+ const bytes = new Uint8Array(header.byteLength + body.byteLength);
591
+ bytes.set(header);
592
+ bytes.set(body, header.byteLength);
593
+ return bytes;
594
+ }
595
+
596
+ function decodeBase64(value: string): Uint8Array {
597
+ const decoded = atob(value);
598
+ const bytes = new Uint8Array(decoded.length);
599
+ for (let index = 0; index < decoded.length; index += 1) {
600
+ bytes[index] = decoded.charCodeAt(index);
601
+ }
602
+ return bytes;
603
+ }
604
+
605
+ const DRACO_GLB_BASE64 =
606
+ "Z2xURgIAAAA0AwAApAIAAEpTT057ImFzc2V0Ijp7ImdlbmVyYXRvciI6ImdsVEYtVHJhbnNmb3JtIHY0LjQuMSIsInZlcnNpb24iOiIyLjAifSwiYWNjZXNzb3JzIjpbeyJ0eXBlIjoiU0NBTEFSIiwiY29tcG9uZW50VHlwZSI6NTEyMywiY291bnQiOjN9LHsidHlwZSI6IlZFQzMiLCJjb21wb25lbnRUeXBlIjo1MTI2LCJjb3VudCI6MywibWF4IjpbMSwxLDBdLCJtaW4iOlswLDAsMF19LHsidHlwZSI6IlZFQzMiLCJjb21wb25lbnRUeXBlIjo1MTI2LCJjb3VudCI6M31dLCJidWZmZXJWaWV3cyI6W3siYnVmZmVyIjowLCJieXRlT2Zmc2V0IjowLCJieXRlTGVuZ3RoIjoxMTV9XSwiYnVmZmVycyI6W3siYnl0ZUxlbmd0aCI6MTE1fV0sIm1lc2hlcyI6W3sicHJpbWl0aXZlcyI6W3siYXR0cmlidXRlcyI6eyJQT1NJVElPTiI6MSwiTk9STUFMIjoyfSwibW9kZSI6NCwiaW5kaWNlcyI6MCwiZXh0ZW5zaW9ucyI6eyJLSFJfZHJhY29fbWVzaF9jb21wcmVzc2lvbiI6eyJidWZmZXJWaWV3IjowLCJhdHRyaWJ1dGVzIjp7IlBPU0lUSU9OIjowLCJOT1JNQUwiOjF9fX19XX1dLCJub2RlcyI6W3sibWVzaCI6MH1dLCJzY2VuZXMiOlt7Im5vZGVzIjpbMF19XSwiZXh0ZW5zaW9uc1VzZWQiOlsiS0hSX2RyYWNvX21lc2hfY29tcHJlc3Npb24iXSwiZXh0ZW5zaW9uc1JlcXVpcmVkIjpbIktIUl9kcmFjb19tZXNoX2NvbXByZXNzaW9uIl19dAAAAEJJTgBEUkFDTwICAQEAAAADAQEBAAABB/8BEQEBAAL/AAAAAAABAAkDAAACAQEJAwABAwEBAQADA1UVrSoDBHCBMRAAAAAA/z8AAAAAAAAAAAAAAAAAAAAAgD8OAAMBAAoDrSobVRUDr1qBAP4D/wMAAP8BAAAKAA==";
607
+
608
+ const MESHOPT_GLB_BASE64 =
609
+ "Z2xURgIAAADwBQAATAUAAEpTT057ImFzc2V0Ijp7ImdlbmVyYXRvciI6ImdsVEYtVHJhbnNmb3JtIHY0LjQuMSIsInZlcnNpb24iOiIyLjAifSwiYWNjZXNzb3JzIjpbeyJ0eXBlIjoiVkVDMyIsImNvbXBvbmVudFR5cGUiOjUxMjYsImNvdW50IjozLCJtYXgiOlsxLDEsMF0sIm1pbiI6WzAsMCwwXSwibm9ybWFsaXplZCI6ZmFsc2UsImJ5dGVPZmZzZXQiOjAsImJ1ZmZlclZpZXciOjB9LHsidHlwZSI6IlZFQzMiLCJjb21wb25lbnRUeXBlIjo1MTI2LCJjb3VudCI6Mywibm9ybWFsaXplZCI6ZmFsc2UsImJ5dGVPZmZzZXQiOjAsImJ1ZmZlclZpZXciOjF9LHsidHlwZSI6IlNDQUxBUiIsImNvbXBvbmVudFR5cGUiOjUxMjMsImNvdW50IjozLCJub3JtYWxpemVkIjpmYWxzZSwiYnl0ZU9mZnNldCI6MCwiYnVmZmVyVmlldyI6Mn1dLCJidWZmZXJWaWV3cyI6W3siYnVmZmVyIjoxLCJieXRlT2Zmc2V0IjowLCJieXRlTGVuZ3RoIjozNiwidGFyZ2V0IjozNDk2MiwiYnl0ZVN0cmlkZSI6MTIsImV4dGVuc2lvbnMiOnsiRVhUX21lc2hvcHRfY29tcHJlc3Npb24iOnsiYnVmZmVyIjowLCJieXRlT2Zmc2V0IjowLCJieXRlTGVuZ3RoIjo2NywibW9kZSI6IkFUVFJJQlVURVMiLCJieXRlU3RyaWRlIjoxMiwiY291bnQiOjN9fX0seyJidWZmZXIiOjEsImJ5dGVPZmZzZXQiOjM2LCJieXRlTGVuZ3RoIjozNiwidGFyZ2V0IjozNDk2MiwiYnl0ZVN0cmlkZSI6MTIsImV4dGVuc2lvbnMiOnsiRVhUX21lc2hvcHRfY29tcHJlc3Npb24iOnsiYnVmZmVyIjowLCJieXRlT2Zmc2V0Ijo2OCwiYnl0ZUxlbmd0aCI6NDUsIm1vZGUiOiJBVFRSSUJVVEVTIiwiYnl0ZVN0cmlkZSI6MTIsImNvdW50IjozfX19LHsiYnVmZmVyIjoxLCJieXRlT2Zmc2V0Ijo3MiwiYnl0ZUxlbmd0aCI6NiwidGFyZ2V0IjozNDk2MywiZXh0ZW5zaW9ucyI6eyJFWFRfbWVzaG9wdF9jb21wcmVzc2lvbiI6eyJidWZmZXIiOjAsImJ5dGVPZmZzZXQiOjExNiwiYnl0ZUxlbmd0aCI6MTgsIm1vZGUiOiJUUklBTkdMRVMiLCJieXRlU3RyaWRlIjoyLCJjb3VudCI6M319fV0sImJ1ZmZlcnMiOlt7ImJ5dGVMZW5ndGgiOjEzNn0seyJieXRlTGVuZ3RoIjo4MCwiZXh0ZW5zaW9ucyI6eyJFWFRfbWVzaG9wdF9jb21wcmVzc2lvbiI6eyJmYWxsYmFjayI6dHJ1ZX19fV0sIm1lc2hlcyI6W3sicHJpbWl0aXZlcyI6W3siYXR0cmlidXRlcyI6eyJQT1NJVElPTiI6MCwiTk9STUFMIjoxfSwibW9kZSI6NCwiaW5kaWNlcyI6Mn1dfV0sIm5vZGVzIjpbeyJtZXNoIjowfV0sInNjZW5lcyI6W3sibm9kZXMiOlswXX1dLCJleHRlbnNpb25zVXNlZCI6WyJFWFRfbWVzaG9wdF9jb21wcmVzc2lvbiJdLCJleHRlbnNpb25zUmVxdWlyZWQiOlsiRVhUX21lc2hvcHRfY29tcHJlc3Npb24iXX0gICCIAAAAQklOAKAAAAE8AAAA//8BPAAAAH59AAABDAAAAP8BDAAAAH4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAoAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIA/AAAA4fAAdodWZ3iphmWJaJgBaQAAAAA=";
610
+
611
+ export const REAL_DRACO_GLB = decodeBase64(DRACO_GLB_BASE64);
612
+ export const REAL_MESHOPT_GLB = decodeBase64(MESHOPT_GLB_BASE64);
@@ -0,0 +1,76 @@
1
+ import type { ToolcraftModelSourceBundleTransfer } from "../model-import-types";
2
+ import {
3
+ GLTF_APPEARANCE_JPEG,
4
+ GLTF_APPEARANCE_PNG,
5
+ } from "./gltf-appearance-fixtures";
6
+
7
+ const encoder = new TextEncoder();
8
+
9
+ export const OBJ_APPEARANCE_SOURCE = encoder.encode(`
10
+ mtllib materials/main.mtl
11
+ o Painted
12
+ v 0 0 0
13
+ v 1 0 0
14
+ v 0 1 0
15
+ v 2 0 0
16
+ v 3 0 0
17
+ v 2 1 0
18
+ vt 0 0
19
+ vt 1 0
20
+ vt 0 1
21
+ vt 0 0
22
+ vt 1 0
23
+ vt 0 1
24
+ usemtl Red
25
+ f 1/1 2/2 3/3
26
+ usemtl Blue
27
+ f 4/4 5/5 6/6
28
+ `);
29
+
30
+ export const OBJ_APPEARANCE_MTL = encoder.encode(`
31
+ newmtl Red
32
+ Kd 0.2 0.3 0.4
33
+ Ke 0.1 0.2 0.3
34
+ d 0.75
35
+ Ns 198
36
+ map_Kd textures/diffuse.png
37
+ map_Ke textures/emissive.png
38
+ map_Bump -bm 0.4 textures/normal.jpg
39
+
40
+ newmtl Blue
41
+ Kd 0.9 0.8 0.7
42
+ Tr 0.25
43
+ Ns 0
44
+ map_Kd textures/missing.png
45
+ `);
46
+
47
+ function copyBuffer(bytes: Uint8Array): ArrayBuffer {
48
+ return bytes.slice().buffer;
49
+ }
50
+
51
+ export function createObjAppearanceTransfer(
52
+ options: Readonly<{
53
+ materialSource?: Uint8Array;
54
+ objSource?: Uint8Array;
55
+ }> = {},
56
+ ): ToolcraftModelSourceBundleTransfer {
57
+ const entries = [
58
+ ["models/scene.obj", options.objSource ?? OBJ_APPEARANCE_SOURCE, "model/obj"],
59
+ ["models/materials/main.mtl", options.materialSource ?? OBJ_APPEARANCE_MTL, "text/plain"],
60
+ ["models/materials/textures/diffuse.png", GLTF_APPEARANCE_PNG, "image/png"],
61
+ ["models/materials/textures/emissive.png", GLTF_APPEARANCE_PNG, "image/png"],
62
+ ["models/materials/textures/normal.jpg", GLTF_APPEARANCE_JPEG, "image/jpeg"],
63
+ ] as const;
64
+ return Object.freeze({
65
+ aggregateDigest: "fixture-obj-appearance",
66
+ rootPath: "models/scene.obj",
67
+ sourceFiles: Object.freeze(entries.map(([path, bytes, mimeType]) =>
68
+ Object.freeze({
69
+ bytes: copyBuffer(bytes),
70
+ contentDigest: `fixture:${path}`,
71
+ mimeType,
72
+ path,
73
+ })
74
+ )),
75
+ });
76
+ }