@pixel-point/toolcraft 0.0.15 → 0.0.16
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.
- package/package.json +1 -1
- package/src/cli-package-manager-flow.test.mjs +9 -2
- package/src/cli.test.mjs +11 -16
- package/src/create-command.mjs +10 -4
- package/src/generate-demand-only-lifecycle.test.mjs +102 -0
- package/src/generate-performance-iteration-execution.test.mjs +105 -0
- package/src/generate-test-assertions.mjs +2 -0
- package/src/generate-test-browser-execution-ledger.mjs +138 -0
- package/src/generate-test-browser-execution-ledger.test.mjs +87 -0
- package/src/generate-test-delivery-architecture-assertions.mjs +137 -0
- package/src/generate-test-demand-only-lifecycle.mjs +303 -0
- package/src/generate-test-dependency-sandbox.mjs +158 -0
- package/src/generate-test-doc-assertions.mjs +286 -10
- package/src/generate-test-doc-assertions.test.mjs +43 -0
- package/src/generate-test-file-assertions.mjs +244 -6
- package/src/generate-test-fs-utils.mjs +4 -1
- package/src/generate-test-integrity-assertions.mjs +70 -3
- package/src/generate-test-integrity-framework-assertions.mjs +31 -1
- package/src/generate-test-integrity-manifest-assertions.mjs +58 -0
- package/src/generate-test-integrity-ownership-assertions.mjs +35 -2
- package/src/generate-test-managed-process.mjs +287 -0
- package/src/generate-test-managed-process.test.mjs +340 -0
- package/src/generate-test-package-assertions.mjs +75 -11
- package/src/generate-test-product-fixture.mjs +85 -7
- package/src/generate-test-product-fixture.test.mjs +227 -0
- package/src/generate-test-product-iteration.mjs +278 -0
- package/src/generate-test-product-iteration.test.mjs +241 -0
- package/src/generate-test-standalone-assertions.mjs +87 -149
- package/src/generate-test-standalone-delivery-stages.mjs +186 -0
- package/src/generate-test-windows-job-native.cs +496 -0
- package/src/generate-test-windows-job-wrapper.mjs +40 -0
- package/src/generate-test-windows-job.mjs +47 -0
- package/src/generate-test-windows-job.ps1 +17 -0
- package/src/generate.mjs +26 -0
- package/src/generate.test.mjs +76 -14
- package/src/generated-integrity-manifest.test.mjs +51 -2
- package/src/generated-source-policy.mjs +1 -1
- package/src/generated-source-policy.test.mjs +15 -2
- package/src/import-map.mjs +12 -0
- package/src/package-json.mjs +7 -6
- package/src/package-json.test.mjs +55 -31
- package/src/package-manager.mjs +71 -33
- package/src/package-manager.test.mjs +101 -18
- package/src/packaged-template-fallback.test.mjs +4 -0
- package/src/rewrite-imports.mjs +3 -0
- package/src/rewrite-imports.test.mjs +16 -1
- package/templates/runtime/contracts/component-contracts.choices.test.ts +49 -6
- package/templates/runtime/contracts/component-contracts.choices.ts +53 -10
- package/templates/runtime/contracts/component-contracts.inputs.test.ts +2 -2
- package/templates/runtime/contracts/component-contracts.inputs.ts +2 -2
- package/templates/runtime/contracts/component-contracts.media-custom.test.ts +19 -0
- package/templates/runtime/contracts/component-contracts.media-custom.ts +18 -2
- package/templates/runtime/contracts/component-contracts.runtime-acceptance.test.ts +57 -83
- package/templates/runtime/contracts/component-contracts.runtime-labels.test.ts +1 -1
- package/templates/runtime/contracts/component-contracts.runtime-panels.test.ts +16 -2
- package/templates/runtime/contracts/component-contracts.runtime-shell.test.ts +24 -8
- package/templates/runtime/contracts/component-contracts.runtime.ts +80 -39
- package/templates/runtime/contracts/component-contracts.test.ts +6 -1
- package/templates/runtime/contracts/component-contracts.visual.test.ts +44 -5
- package/templates/runtime/contracts/component-contracts.visual.ts +64 -17
- package/templates/runtime/contracts/decision-contracts.test.ts +106 -11
- package/templates/runtime/contracts/decision-contracts.ts +83 -6
- package/templates/runtime/contracts/index.ts +2 -0
- package/templates/runtime/contracts/performance-request-classifier-descriptions.ts +39 -0
- package/templates/runtime/contracts/performance-request-classifier-rules.ts +181 -0
- package/templates/runtime/contracts/performance-request-classifier-types.ts +50 -0
- package/templates/runtime/contracts/performance-request-classifier.test.ts +269 -0
- package/templates/runtime/contracts/performance-request-classifier.ts +224 -0
- package/templates/runtime/contracts/performance-request-evidence-policy.d.mts +21 -0
- package/templates/runtime/contracts/performance-request-evidence-policy.mjs +39 -0
- package/templates/runtime/contracts/performance-verification-policy.test.ts +129 -0
- package/templates/runtime/contracts/performance-verification-policy.ts +49 -0
- package/templates/runtime/contracts/segmented-control-fit.test.ts +71 -0
- package/templates/runtime/contracts/segmented-control-fit.ts +38 -0
- package/templates/runtime/export/export-frame.test.ts +80 -0
- package/templates/runtime/export/export-frame.ts +107 -0
- package/templates/runtime/export/export-sizing.ts +136 -0
- package/templates/runtime/export/export.test.ts +70 -1
- package/templates/runtime/export/export.ts +31 -146
- package/templates/runtime/export/index.ts +2 -0
- package/templates/runtime/index.ts +10 -0
- package/templates/runtime/model-import/canonical/index.ts +39 -0
- package/templates/runtime/model-import/canonical/model-appearance-data-uri.test.ts +43 -0
- package/templates/runtime/model-import/canonical/model-appearance-data-uri.ts +79 -0
- package/templates/runtime/model-import/canonical/model-appearance-image.ts +111 -0
- package/templates/runtime/model-import/canonical/model-appearance-input-snapshot.ts +189 -0
- package/templates/runtime/model-import/canonical/model-appearance-resource.test.ts +116 -0
- package/templates/runtime/model-import/canonical/model-appearance-resource.ts +165 -0
- package/templates/runtime/model-import/canonical/model-appearance-validation.test.ts +197 -0
- package/templates/runtime/model-import/canonical/model-appearance-validation.ts +458 -0
- package/templates/runtime/model-import/canonical/model-document-codec-adversarial.test.ts +151 -0
- package/templates/runtime/model-import/canonical/model-document-codec-appearance-metadata.ts +336 -0
- package/templates/runtime/model-import/canonical/model-document-codec-closure.test.ts +125 -0
- package/templates/runtime/model-import/canonical/model-document-codec-envelope.ts +363 -0
- package/templates/runtime/model-import/canonical/model-document-codec-error.ts +57 -0
- package/templates/runtime/model-import/canonical/model-document-codec-format.ts +83 -0
- package/templates/runtime/model-import/canonical/model-document-codec-layout.ts +163 -0
- package/templates/runtime/model-import/canonical/model-document-codec-metadata-adversarial.test.ts +169 -0
- package/templates/runtime/model-import/canonical/model-document-codec-metadata-preflight.ts +371 -0
- package/templates/runtime/model-import/canonical/model-document-codec-metadata-reader.ts +142 -0
- package/templates/runtime/model-import/canonical/model-document-codec-metadata.ts +420 -0
- package/templates/runtime/model-import/canonical/model-document-codec-payload.ts +311 -0
- package/templates/runtime/model-import/canonical/model-document-codec.test.ts +450 -0
- package/templates/runtime/model-import/canonical/model-document-codec.ts +161 -0
- package/templates/runtime/model-import/canonical/model-document-digest.ts +13 -0
- package/templates/runtime/model-import/canonical/model-document-hostile-decode.test.ts +100 -0
- package/templates/runtime/model-import/canonical/model-document-hostile-input.test.ts +140 -0
- package/templates/runtime/model-import/canonical/model-document-input-reader.ts +153 -0
- package/templates/runtime/model-import/canonical/model-document-input-snapshot.ts +413 -0
- package/templates/runtime/model-import/canonical/model-document-limit-options.test.ts +155 -0
- package/templates/runtime/model-import/canonical/model-document-limits.ts +151 -0
- package/templates/runtime/model-import/canonical/model-document-owned-geometry.test.ts +138 -0
- package/templates/runtime/model-import/canonical/model-document-safe-typed-array.ts +154 -0
- package/templates/runtime/model-import/canonical/model-document-test-support.ts +163 -0
- package/templates/runtime/model-import/canonical/model-document-validation-geometry.ts +330 -0
- package/templates/runtime/model-import/canonical/model-document-validation-helpers.ts +22 -0
- package/templates/runtime/model-import/canonical/model-document-validation-hierarchy.ts +314 -0
- package/templates/runtime/model-import/canonical/model-document-validation-provenance.ts +153 -0
- package/templates/runtime/model-import/canonical/model-document-validation-result.ts +118 -0
- package/templates/runtime/model-import/canonical/model-document-validation.test.ts +497 -0
- package/templates/runtime/model-import/canonical/model-document-validation.ts +276 -0
- package/templates/runtime/model-import/canonical/model-document-worker-memory.test.ts +95 -0
- package/templates/runtime/model-import/canonical/model-document-worker-memory.ts +365 -0
- package/templates/runtime/model-import/canonical/model-document.ts +187 -0
- package/templates/runtime/model-import/canonical/sha256.ts +144 -0
- package/templates/runtime/model-import/default-model-source-assets.test.ts +212 -0
- package/templates/runtime/model-import/default-model-source-assets.ts +235 -0
- package/templates/runtime/model-import/formats/fbx-appearance-test-fixtures.ts +144 -0
- package/templates/runtime/model-import/formats/fbx-ascii-appearance-test-fixtures.ts +123 -0
- package/templates/runtime/model-import/formats/fbx-binary-preflight-reader.ts +179 -0
- package/templates/runtime/model-import/formats/fbx-binary-preflight.ts +277 -0
- package/templates/runtime/model-import/formats/fbx-binary-test-fixture-builder.ts +129 -0
- package/templates/runtime/model-import/formats/fbx-model-format-adapter.test-fixtures.ts +119 -0
- package/templates/runtime/model-import/formats/fbx-model-format-adapter.test.ts +316 -0
- package/templates/runtime/model-import/formats/fbx-model-format-adapter.ts +96 -0
- package/templates/runtime/model-import/formats/fbx-model-format-preflight.ts +122 -0
- package/templates/runtime/model-import/formats/fbx-static-appearance.test.ts +93 -0
- package/templates/runtime/model-import/formats/fbx-static-appearance.ts +403 -0
- package/templates/runtime/model-import/formats/gltf-accessor-preflight.ts +321 -0
- package/templates/runtime/model-import/formats/gltf-attribute-encoding.ts +65 -0
- package/templates/runtime/model-import/formats/gltf-buffer-preflight.ts +320 -0
- package/templates/runtime/model-import/formats/gltf-canonical-appearance.ts +422 -0
- package/templates/runtime/model-import/formats/gltf-canonical-geometry.ts +276 -0
- package/templates/runtime/model-import/formats/gltf-canonical-hierarchy.ts +180 -0
- package/templates/runtime/model-import/formats/gltf-canonical-metadata.ts +100 -0
- package/templates/runtime/model-import/formats/gltf-decode-safety.ts +84 -0
- package/templates/runtime/model-import/formats/gltf-decoded-count-validation.ts +38 -0
- package/templates/runtime/model-import/formats/gltf-document-canonicalizer.ts +328 -0
- package/templates/runtime/model-import/formats/gltf-document-sanitizer.ts +269 -0
- package/templates/runtime/model-import/formats/gltf-extension-policy.ts +59 -0
- package/templates/runtime/model-import/formats/gltf-glb-document.ts +93 -0
- package/templates/runtime/model-import/formats/gltf-json-inspection.ts +152 -0
- package/templates/runtime/model-import/formats/gltf-json-preflight.ts +128 -0
- package/templates/runtime/model-import/formats/gltf-missing-appearance.ts +158 -0
- package/templates/runtime/model-import/formats/gltf-model-format-adapter-appearance.test.ts +181 -0
- package/templates/runtime/model-import/formats/gltf-model-format-adapter-resource-limits.test.ts +236 -0
- package/templates/runtime/model-import/formats/gltf-model-format-adapter-validation.test.ts +274 -0
- package/templates/runtime/model-import/formats/gltf-model-format-adapter.test.ts +229 -0
- package/templates/runtime/model-import/formats/gltf-model-format-adapter.ts +161 -0
- package/templates/runtime/model-import/formats/gltf-node-preflight.ts +218 -0
- package/templates/runtime/model-import/formats/gltf-primitive-preflight.ts +295 -0
- package/templates/runtime/model-import/formats/gltf-source-document.ts +234 -0
- package/templates/runtime/model-import/formats/gltf-source-snapshot.ts +187 -0
- package/templates/runtime/model-import/formats/gltf-texture-resource.ts +252 -0
- package/templates/runtime/model-import/formats/index.ts +28 -0
- package/templates/runtime/model-import/formats/model-format-adapter.test.ts +165 -0
- package/templates/runtime/model-import/formats/model-format-adapter.ts +165 -0
- package/templates/runtime/model-import/formats/obj-material-library.test.ts +124 -0
- package/templates/runtime/model-import/formats/obj-material-library.ts +432 -0
- package/templates/runtime/model-import/formats/obj-model-format-adapter.test.ts +251 -0
- package/templates/runtime/model-import/formats/obj-model-format-adapter.ts +85 -0
- package/templates/runtime/model-import/formats/obj-stl-ply-model-format-adapter-support.ts +335 -0
- package/templates/runtime/model-import/formats/ply-model-format-adapter.test.ts +151 -0
- package/templates/runtime/model-import/formats/ply-model-format-adapter.ts +195 -0
- package/templates/runtime/model-import/formats/production-model-format-main-bundle.test.ts +123 -0
- package/templates/runtime/model-import/formats/production-model-format-manifest.ts +135 -0
- package/templates/runtime/model-import/formats/production-model-format-registry.test.ts +253 -0
- package/templates/runtime/model-import/formats/production-model-format-registry.ts +16 -0
- package/templates/runtime/model-import/formats/production-model-format-worker-registry.ts +68 -0
- package/templates/runtime/model-import/formats/stl-model-format-adapter.test.ts +110 -0
- package/templates/runtime/model-import/formats/stl-model-format-adapter.ts +125 -0
- package/templates/runtime/model-import/formats/three-static-appearance-canonicalizer.ts +305 -0
- package/templates/runtime/model-import/formats/three-static-geometry-canonicalizer.test.ts +245 -0
- package/templates/runtime/model-import/formats/three-static-geometry-canonicalizer.ts +434 -0
- package/templates/runtime/model-import/formats/three-static-source-bundle.ts +146 -0
- package/templates/runtime/model-import/formats/vendor/draco/LICENSE +252 -0
- package/templates/runtime/model-import/formats/vendor/draco/README.md +15 -0
- package/templates/runtime/model-import/formats/vendor/draco/draco_decoder_gltf.wasm.json +1 -0
- package/templates/runtime/model-import/formats/vendor/draco/draco_wasm_wrapper.cjs +117 -0
- package/templates/runtime/model-import/formats/vendor/draco/draco_wasm_wrapper.d.cts +9 -0
- package/templates/runtime/model-import/index.ts +125 -0
- package/templates/runtime/model-import/model-analysis-summary.test.ts +179 -0
- package/templates/runtime/model-import/model-analysis-summary.ts +164 -0
- package/templates/runtime/model-import/model-asset-metadata.ts +71 -0
- package/templates/runtime/model-import/model-import-limit-values.ts +41 -0
- package/templates/runtime/model-import/model-import-limits.test.ts +125 -0
- package/templates/runtime/model-import/model-import-limits.ts +165 -0
- package/templates/runtime/model-import/model-import-types.ts +215 -0
- package/templates/runtime/model-import/model-package-path.ts +106 -0
- package/templates/runtime/model-import/model-package-types.ts +55 -0
- package/templates/runtime/model-import/model-package-zip-preflight.ts +405 -0
- package/templates/runtime/model-import/model-package-zip.test.ts +252 -0
- package/templates/runtime/model-import/model-package-zip.ts +227 -0
- package/templates/runtime/model-import/model-persistence-appearance-resources.test.ts +69 -0
- package/templates/runtime/model-import/model-persistence-hydration-appearance.test.ts +146 -0
- package/templates/runtime/model-import/model-persistence-hydration-resources.ts +281 -0
- package/templates/runtime/model-import/model-persistence-hydration-test-support.ts +97 -0
- package/templates/runtime/model-import/model-persistence-hydration.test.ts +370 -0
- package/templates/runtime/model-import/model-persistence-hydration.ts +323 -0
- package/templates/runtime/model-import/model-source-asset-coordinator.test.ts +414 -0
- package/templates/runtime/model-import/model-source-asset-handler-appearance-resources.ts +20 -0
- package/templates/runtime/model-import/model-source-asset-handler-appearance.test.ts +169 -0
- package/templates/runtime/model-import/model-source-asset-handler-repair-controller.ts +294 -0
- package/templates/runtime/model-import/model-source-asset-handler-repair.ts +233 -0
- package/templates/runtime/model-import/model-source-asset-handler-resources.ts +54 -0
- package/templates/runtime/model-import/model-source-asset-handler.ingestion.test.ts +236 -0
- package/templates/runtime/model-import/model-source-asset-handler.lifecycle.test.ts +176 -0
- package/templates/runtime/model-import/model-source-asset-handler.test-support.ts +231 -0
- package/templates/runtime/model-import/model-source-asset-handler.ts +479 -0
- package/templates/runtime/model-import/model-source-asset-repair-coordinator.test.ts +431 -0
- package/templates/runtime/model-import/model-source-bundle-codec.test.ts +423 -0
- package/templates/runtime/model-import/model-source-bundle-codec.ts +259 -0
- package/templates/runtime/model-import/model-source-bundle-descriptor-fields.ts +369 -0
- package/templates/runtime/model-import/model-source-bundle-descriptor-validation.ts +402 -0
- package/templates/runtime/model-import/model-source-bundle-error.ts +28 -0
- package/templates/runtime/model-import/model-source-bundle-limits.ts +108 -0
- package/templates/runtime/model-import/model-source-bundle-mime-type.test.ts +21 -0
- package/templates/runtime/model-import/model-source-bundle-preflight-test-support.ts +435 -0
- package/templates/runtime/model-import/model-source-bundle-security-test-support.ts +417 -0
- package/templates/runtime/model-import/model-source-bundle-test-support.ts +83 -0
- package/templates/runtime/model-import/model-source-bundle.test.ts +427 -0
- package/templates/runtime/model-import/model-source-bundle.ts +377 -0
- package/templates/runtime/model-import/model-source-bytes.ts +78 -0
- package/templates/runtime/model-import/model-source-data-uri.ts +74 -0
- package/templates/runtime/model-import/model-source-digest.test.ts +25 -0
- package/templates/runtime/model-import/model-source-digest.ts +288 -0
- package/templates/runtime/model-import/model-source-gltf.ts +184 -0
- package/templates/runtime/model-import/model-source-json-preflight.ts +382 -0
- package/templates/runtime/model-import/model-source-lookup.ts +134 -0
- package/templates/runtime/model-import/model-source-package-normalization.test.ts +106 -0
- package/templates/runtime/model-import/model-source-path.ts +233 -0
- package/templates/runtime/model-import/test-fixtures/gltf-appearance-fixtures.ts +188 -0
- package/templates/runtime/model-import/test-fixtures/model-fixtures.ts +612 -0
- package/templates/runtime/model-import/test-fixtures/obj-appearance-fixtures.ts +76 -0
- package/templates/runtime/model-import/topology/apply-model-repair.test.ts +236 -0
- package/templates/runtime/model-import/topology/apply-model-repair.ts +31 -0
- package/templates/runtime/model-import/topology/model-repair-execution.ts +364 -0
- package/templates/runtime/model-import/topology/model-repair-geometry.ts +60 -0
- package/templates/runtime/model-import/topology/model-repair-plan-codec.test.ts +125 -0
- package/templates/runtime/model-import/topology/model-repair-plan-codec.ts +96 -0
- package/templates/runtime/model-import/topology/model-repair-plan-envelope.ts +13 -0
- package/templates/runtime/model-import/topology/model-repair-plan-validation.ts +325 -0
- package/templates/runtime/model-import/topology/model-repair-plan.ts +275 -0
- package/templates/runtime/model-import/topology/model-topology-analysis.test.ts +448 -0
- package/templates/runtime/model-import/topology/model-topology-analysis.ts +426 -0
- package/templates/runtime/model-import/topology/model-topology-digest.ts +117 -0
- package/templates/runtime/model-import/topology/model-topology-graph.ts +455 -0
- package/templates/runtime/model-import/topology/model-topology-math.ts +140 -0
- package/templates/runtime/model-import/topology/model-topology-resources.ts +126 -0
- package/templates/runtime/model-import/topology/model-topology-test-support.ts +163 -0
- package/templates/runtime/model-import/topology/model-topology-types.ts +14 -0
- package/templates/runtime/model-import/worker/bounded-worker-cache.test.ts +47 -0
- package/templates/runtime/model-import/worker/bounded-worker-cache.ts +147 -0
- package/templates/runtime/model-import/worker/cooperative-buffer-snapshot.ts +195 -0
- package/templates/runtime/model-import/worker/model-import-worker-appearance-receipt.test.ts +273 -0
- package/templates/runtime/model-import/worker/model-import-worker-client-draft-verification.ts +39 -0
- package/templates/runtime/model-import/worker/model-import-worker-client-receipt.test.ts +217 -0
- package/templates/runtime/model-import/worker/model-import-worker-client-repair-validation.test.ts +357 -0
- package/templates/runtime/model-import/worker/model-import-worker-client-repair-verification.ts +44 -0
- package/templates/runtime/model-import/worker/model-import-worker-client-result-verification.ts +68 -0
- package/templates/runtime/model-import/worker/model-import-worker-client-snapshot.test.ts +368 -0
- package/templates/runtime/model-import/worker/model-import-worker-client-snapshot.ts +478 -0
- package/templates/runtime/model-import/worker/model-import-worker-client-test-support.ts +198 -0
- package/templates/runtime/model-import/worker/model-import-worker-client-validation.test.ts +301 -0
- package/templates/runtime/model-import/worker/model-import-worker-client.test.ts +484 -0
- package/templates/runtime/model-import/worker/model-import-worker-client.ts +715 -0
- package/templates/runtime/model-import/worker/model-import-worker-diagnostics.ts +298 -0
- package/templates/runtime/model-import/worker/model-import-worker-protocol-validation.ts +714 -0
- package/templates/runtime/model-import/worker/model-import-worker-protocol.ts +192 -0
- package/templates/runtime/model-import/worker/model-import-worker-receipt.ts +221 -0
- package/templates/runtime/model-import/worker/model-import-worker-result-verification.ts +22 -0
- package/templates/runtime/model-import/worker/model-import-worker-runtime-appearance.test.ts +81 -0
- package/templates/runtime/model-import/worker/model-import-worker-runtime-envelope.test.ts +126 -0
- package/templates/runtime/model-import/worker/model-import-worker-runtime-lifecycle.test.ts +342 -0
- package/templates/runtime/model-import/worker/model-import-worker-runtime-package.test.ts +85 -0
- package/templates/runtime/model-import/worker/model-import-worker-runtime-production.test.ts +51 -0
- package/templates/runtime/model-import/worker/model-import-worker-runtime-repair.test.ts +75 -0
- package/templates/runtime/model-import/worker/model-import-worker-runtime-test-support.ts +126 -0
- package/templates/runtime/model-import/worker/model-import-worker-runtime.test.ts +472 -0
- package/templates/runtime/model-import/worker/model-import-worker-runtime.ts +804 -0
- package/templates/runtime/model-import/worker/model-import-worker-trust-boundary.test.ts +243 -0
- package/templates/runtime/model-import/worker/model-import-worker-vite-smoke.test.ts +132 -0
- package/templates/runtime/model-import/worker/model-import.worker.bundle.js +3691 -0
- package/templates/runtime/model-import/worker/model-import.worker.ts +25 -0
- package/templates/runtime/performance/index.ts +1 -0
- package/templates/runtime/performance/profile-catalog-manifest.d.mts +27 -0
- package/templates/runtime/performance/profile-catalog-manifest.mjs +42 -0
- package/templates/runtime/performance/profile-catalog.test.ts +49 -0
- package/templates/runtime/performance/profile-catalog.ts +56 -0
- package/templates/runtime/react/app-shell/runtime-public-api.test.tsx +388 -5
- package/templates/runtime/react/app-shell/settings-transfer-canvas.ts +68 -0
- package/templates/runtime/react/app-shell/settings-transfer.test.ts +94 -1
- package/templates/runtime/react/app-shell/settings-transfer.ts +61 -89
- package/templates/runtime/react/app-shell/storage-key-migration.test.ts +40 -0
- package/templates/runtime/react/app-shell/storage-key-migration.ts +13 -9
- package/templates/runtime/react/app-shell/toolbar-panel.tsx +31 -13
- package/templates/runtime/react/app-shell/toolcraft-app-panel-workspace.test.tsx +125 -0
- package/templates/runtime/react/app-shell/toolcraft-app-test-utils.tsx +72 -0
- package/templates/runtime/react/app-shell/toolcraft-app.integration.test.tsx +21 -1
- package/templates/runtime/react/app-shell/toolcraft-app.scene-export.test.tsx +68 -0
- package/templates/runtime/react/app-shell/toolcraft-app.test.tsx +10 -55
- package/templates/runtime/react/app-shell/toolcraft-app.tsx +73 -15
- package/templates/runtime/react/app-shell/toolcraft-media-presentation.test.tsx +135 -0
- package/templates/runtime/react/app-shell/toolcraft-media-presentation.tsx +190 -0
- package/templates/runtime/react/app-shell/toolcraft-model-presentation-composition.test.tsx +99 -0
- package/templates/runtime/react/app-shell/toolcraft-persistence-bootstrap.ts +111 -0
- package/templates/runtime/react/app-shell/toolcraft-pipeline-context.test.tsx +252 -0
- package/templates/runtime/react/app-shell/toolcraft-pipeline-context.tsx +44 -0
- package/templates/runtime/react/app-shell/toolcraft-pipeline-evidence.tsx +41 -0
- package/templates/runtime/react/app-shell/toolcraft-pipeline-initialization.test.tsx +301 -0
- package/templates/runtime/react/app-shell/toolcraft-playback-persistence.test.tsx +116 -0
- package/templates/runtime/react/app-shell/toolcraft-render-isolation.test.tsx +418 -0
- package/templates/runtime/react/app-shell/toolcraft-root-persistence-migration.test.tsx +297 -0
- package/templates/runtime/react/app-shell/toolcraft-root-persistence-test-utils.tsx +163 -0
- package/templates/runtime/react/app-shell/toolcraft-root-persistence.test.tsx +357 -0
- package/templates/runtime/react/app-shell/toolcraft-root.test.tsx +57 -6
- package/templates/runtime/react/app-shell/toolcraft-root.tsx +106 -94
- package/templates/runtime/react/app-shell/toolcraft-selector-lanes.test.tsx +338 -0
- package/templates/runtime/react/app-shell/toolcraft-selectors.test.tsx +241 -0
- package/templates/runtime/react/app-shell/toolcraft-selectors.ts +133 -0
- package/templates/runtime/react/app-shell/toolcraft-source-asset-context.test.tsx +467 -0
- package/templates/runtime/react/app-shell/toolcraft-source-asset-context.tsx +646 -0
- package/templates/runtime/react/app-shell/toolcraft-store-context.tsx +18 -0
- package/templates/runtime/react/app-shell/use-toolcraft-persistence.ts +203 -0
- package/templates/runtime/react/app-shell/use-toolcraft-pipeline-pass.test.tsx +220 -0
- package/templates/runtime/react/app-shell/use-toolcraft-pipeline-pass.ts +175 -0
- package/templates/runtime/react/app-shell/use-toolcraft-pipeline.ts +10 -0
- package/templates/runtime/react/app-shell/use-toolcraft-values.test.tsx +288 -0
- package/templates/runtime/react/app-shell/use-toolcraft.ts +188 -7
- package/templates/runtime/react/canvas/canvas-default-media-layer.tsx +52 -14
- package/templates/runtime/react/canvas/canvas-media-transform.ts +2 -1
- package/templates/runtime/react/canvas/canvas-scene-surface.test.tsx +51 -0
- package/templates/runtime/react/canvas/canvas-scene-surface.tsx +54 -0
- package/templates/runtime/react/canvas/canvas-shell-interactions.test.tsx +225 -3
- package/templates/runtime/react/canvas/canvas-shell-media-rendering.test.tsx +83 -0
- package/templates/runtime/react/canvas/canvas-shell-rendering.test.tsx +88 -0
- package/templates/runtime/react/canvas/canvas-shell-test-utils.tsx +42 -2
- package/templates/runtime/react/canvas/canvas-shell-upload.test.tsx +231 -16
- package/templates/runtime/react/canvas/canvas-shell.tsx +154 -63
- package/templates/runtime/react/canvas/canvas-source-asset-feedback.test.tsx +211 -0
- package/templates/runtime/react/canvas/canvas-upload-routing.ts +65 -56
- package/templates/runtime/react/canvas/canvas-viewport-world.tsx +66 -0
- package/templates/runtime/react/canvas/media-file.test.ts +102 -0
- package/templates/runtime/react/canvas/media-file.ts +80 -35
- package/templates/runtime/react/canvas/runtime-scene-export.test.ts +279 -0
- package/templates/runtime/react/canvas/runtime-scene-export.ts +167 -0
- package/templates/runtime/react/canvas/scene-element-presentation-rect.ts +35 -0
- package/templates/runtime/react/canvas/use-canvas-drop-import.ts +65 -94
- package/templates/runtime/react/canvas/use-canvas-viewport-interactions.ts +52 -17
- package/templates/runtime/react/canvas/use-toolcraft-canvas-frame.ts +20 -0
- package/templates/runtime/react/canvas-handles/canvas-handle-layer-registry.test.ts +33 -0
- package/templates/runtime/react/canvas-handles/canvas-handle-layer-registry.tsx +64 -0
- package/templates/runtime/react/controls-panel/__tests__/actions-control-loading.test.tsx +59 -0
- package/templates/runtime/react/controls-panel/__tests__/controls-panel-filedrop-reorder.test.tsx +29 -11
- package/templates/runtime/react/controls-panel/__tests__/controls-panel.control-visibility.test.tsx +52 -0
- package/templates/runtime/react/controls-panel/__tests__/controls-panel.dependency-isolation.test.tsx +332 -0
- package/templates/runtime/react/controls-panel/__tests__/controls-panel.extensions-live-state.test.tsx +135 -0
- package/templates/runtime/react/controls-panel/__tests__/controls-panel.footer-actions.test.tsx +50 -0
- package/templates/runtime/react/controls-panel/__tests__/controls-panel.inline-layout.test.tsx +25 -9
- package/templates/runtime/react/controls-panel/__tests__/controls-panel.media-upload-files.test.tsx +35 -3
- package/templates/runtime/react/controls-panel/__tests__/controls-panel.media-upload-image.test.tsx +11 -5
- package/templates/runtime/react/controls-panel/__tests__/controls-panel.media-upload-multi-image.test.tsx +167 -5
- package/templates/runtime/react/controls-panel/__tests__/controls-panel.render-isolation.test.tsx +496 -0
- package/templates/runtime/react/controls-panel/__tests__/controls-panel.reset-dependency-isolation.test.tsx +226 -0
- package/templates/runtime/react/controls-panel/__tests__/controls-panel.scene-export-actions.test.tsx +187 -0
- package/templates/runtime/react/controls-panel/__tests__/controls-panel.section-isolation.test.tsx +441 -0
- package/templates/runtime/react/controls-panel/__tests__/controls-panel.section-navigation-overflow.test.tsx +247 -0
- package/templates/runtime/react/controls-panel/__tests__/controls-panel.section-navigation.test.tsx +486 -0
- package/templates/runtime/react/controls-panel/__tests__/controls-panel.section-shell.test.tsx +24 -2
- package/templates/runtime/react/controls-panel/__tests__/controls-panel.setup-controls.test.tsx +10 -5
- package/templates/runtime/react/controls-panel/__tests__/controls-panel.tabs.test.tsx +93 -0
- package/templates/runtime/react/controls-panel/__tests__/file-drop-folder-selection.test.tsx +62 -0
- package/templates/runtime/react/controls-panel/__tests__/file-drop-presentation-accessibility.test.tsx +45 -0
- package/templates/runtime/react/controls-panel/__tests__/file-drop-presentation.test.tsx +459 -0
- package/templates/runtime/react/controls-panel/actions/controls-panel-actions.ts +159 -12
- package/templates/runtime/react/controls-panel/actions/panel-action-feedback.tsx +24 -0
- package/templates/runtime/react/controls-panel/conditions/control-condition-dependencies.ts +39 -0
- package/templates/runtime/react/controls-panel/conditions/control-conditions.ts +40 -0
- package/templates/runtime/react/controls-panel/controls-panel.tsx +286 -170
- package/templates/runtime/react/controls-panel/keyframes/controls-panel-keyframes.tsx +27 -20
- package/templates/runtime/react/controls-panel/layout/controls-panel-control-group.tsx +509 -0
- package/templates/runtime/react/controls-panel/layout/controls-panel-inline-layout.tsx +5 -3
- package/templates/runtime/react/controls-panel/layout/controls-panel-layout.tsx +33 -5
- package/templates/runtime/react/controls-panel/layout/controls-panel-section-navigation-layout.ts +169 -0
- package/templates/runtime/react/controls-panel/layout/controls-panel-section-navigation.tsx +458 -0
- package/templates/runtime/react/controls-panel/layout/controls-panel-section.tsx +324 -324
- package/templates/runtime/react/controls-panel/live-custom-control.tsx +52 -0
- package/templates/runtime/react/controls-panel/renderers/controls-panel-basic-renderers.tsx +15 -0
- package/templates/runtime/react/controls-panel/renderers/controls-panel-media-renderer.test.tsx +242 -0
- package/templates/runtime/react/controls-panel/renderers/controls-panel-media-renderer.tsx +203 -129
- package/templates/runtime/react/controls-panel/renderers/controls-panel-renderer-registry.test.ts +26 -0
- package/templates/runtime/react/controls-panel/renderers/controls-panel-renderer-registry.ts +29 -0
- package/templates/runtime/react/controls-panel/renderers/controls-panel-settings-transfer-renderer.tsx +4 -4
- package/templates/runtime/react/controls-panel/testing/controls-panel-test-utils.tsx +8 -2
- package/templates/runtime/react/controls-panel/values/controls-panel-value-labels.ts +1 -0
- package/templates/runtime/react/index.ts +32 -1
- package/templates/runtime/react/layers/layer-tree.ts +5 -32
- package/templates/runtime/react/layers/layers-panel-test-utils.tsx +3 -1
- package/templates/runtime/react/layers/layers-panel.tsx +44 -30
- package/templates/runtime/react/model-rendering/lazy-three-model-render-binding.test.ts +92 -0
- package/templates/runtime/react/model-rendering/lazy-three-model-render-binding.ts +49 -0
- package/templates/runtime/react/model-rendering/model-canvas-layer.test.tsx +491 -0
- package/templates/runtime/react/model-rendering/model-canvas-layer.tsx +459 -0
- package/templates/runtime/react/model-rendering/model-display-fit.test.ts +57 -0
- package/templates/runtime/react/model-rendering/model-display-fit.ts +110 -0
- package/templates/runtime/react/model-rendering/model-export.test.ts +179 -0
- package/templates/runtime/react/model-rendering/model-export.ts +90 -0
- package/templates/runtime/react/model-rendering/model-presentation-consumer.test.tsx +225 -0
- package/templates/runtime/react/model-rendering/model-presentation-consumer.tsx +189 -0
- package/templates/runtime/react/model-rendering/model-presentation-feedback.ts +15 -0
- package/templates/runtime/react/model-rendering/model-presentation-mode.ts +112 -0
- package/templates/runtime/react/model-rendering/model-presentation-resource-manager.test.ts +244 -0
- package/templates/runtime/react/model-rendering/model-presentation-resource-manager.ts +426 -0
- package/templates/runtime/react/model-rendering/model-render-binding.ts +233 -0
- package/templates/runtime/react/model-rendering/model-render-host.ts +339 -0
- package/templates/runtime/react/model-rendering/model-render-provider.test.tsx +457 -0
- package/templates/runtime/react/model-rendering/model-render-provider.tsx +172 -0
- package/templates/runtime/react/model-rendering/model-render-registry.test.ts +86 -0
- package/templates/runtime/react/model-rendering/model-render-registry.ts +64 -0
- package/templates/runtime/react/model-rendering/model-render-state.ts +79 -0
- package/templates/runtime/react/model-rendering/three-canonical-geometry.ts +346 -0
- package/templates/runtime/react/model-rendering/three-canonical-model.ts +150 -0
- package/templates/runtime/react/model-rendering/three-model-appearance.test.ts +125 -0
- package/templates/runtime/react/model-rendering/three-model-appearance.ts +199 -0
- package/templates/runtime/react/model-rendering/three-model-prewarm.ts +61 -0
- package/templates/runtime/react/model-rendering/three-model-render-adapter-lifecycle.test.ts +293 -0
- package/templates/runtime/react/model-rendering/three-model-render-adapter.test-support.ts +70 -0
- package/templates/runtime/react/model-rendering/three-model-render-adapter.test.ts +379 -0
- package/templates/runtime/react/model-rendering/three-model-render-adapter.ts +484 -0
- package/templates/runtime/react/orientation-gizmo/model-orbit-interaction.integration.test.tsx +129 -0
- package/templates/runtime/react/orientation-gizmo/orientation-gizmo-layer.tsx +44 -0
- package/templates/runtime/react/orientation-gizmo/orientation-gizmo-math.test.ts +217 -0
- package/templates/runtime/react/orientation-gizmo/orientation-gizmo-math.ts +299 -0
- package/templates/runtime/react/orientation-gizmo/orientation-gizmo-public-api.test.ts +12 -0
- package/templates/runtime/react/orientation-gizmo/orientation-gizmo-selection.test.ts +115 -0
- package/templates/runtime/react/orientation-gizmo/orientation-gizmo-selection.ts +46 -0
- package/templates/runtime/react/orientation-gizmo/orientation-gizmo-snap.integration.test.tsx +179 -0
- package/templates/runtime/react/orientation-gizmo/orientation-gizmo-test-harness.tsx +208 -0
- package/templates/runtime/react/orientation-gizmo/orientation-gizmo.integration.test.tsx +167 -0
- package/templates/runtime/react/orientation-gizmo/orientation-gizmo.tsx +544 -0
- package/templates/runtime/react/orientation-gizmo/orientation-interaction-coordinator.ts +112 -0
- package/templates/runtime/react/orientation-gizmo/orientation-quaternion.ts +264 -0
- package/templates/runtime/react/orientation-gizmo/use-toolcraft-model-orbit-interaction.ts +233 -0
- package/templates/runtime/react/orientation-gizmo/use-toolcraft-orientation-control-selection.ts +78 -0
- package/templates/runtime/react/panel-host/panel-host-geometry.test.ts +38 -1
- package/templates/runtime/react/panel-host/panel-host-geometry.ts +64 -6
- package/templates/runtime/react/panel-host/panel-host-runtime-placement.test.tsx +198 -0
- package/templates/runtime/react/panel-host/panel-host-types.ts +13 -2
- package/templates/runtime/react/panel-host/panel-host.test.tsx +13 -1
- package/templates/runtime/react/panel-host/panel-host.tsx +105 -20
- package/templates/runtime/react/panel-host/use-toolcraft-panel-binding.test.tsx +161 -0
- package/templates/runtime/react/panel-host/use-toolcraft-panel-binding.ts +55 -0
- package/templates/runtime/react/timeline/timeline-expanded-content.tsx +3 -0
- package/templates/runtime/react/timeline/timeline-panel-header.tsx +6 -0
- package/templates/runtime/react/timeline/timeline-panel-test-utils.tsx +1 -0
- package/templates/runtime/react/timeline/timeline-panel-transport.test.tsx +176 -2
- package/templates/runtime/react/timeline/timeline-panel.tsx +72 -19
- package/templates/runtime/react/timeline/timeline-playback-hooks.ts +58 -21
- package/templates/runtime/react/timeline/timeline-scrub-lifecycle.test.tsx +154 -0
- package/templates/runtime/rendering/index.ts +3 -0
- package/templates/runtime/rendering/renderer-pipeline-cache.ts +171 -0
- package/templates/runtime/rendering/renderer-pipeline-pass-generation.test.ts +151 -0
- package/templates/runtime/rendering/renderer-pipeline-pass-generation.ts +267 -0
- package/templates/runtime/rendering/renderer-pipeline-registration.test.ts +356 -0
- package/templates/runtime/rendering/renderer-pipeline-registration.ts +760 -0
- package/templates/runtime/rendering/renderer-pipeline-resource-lifecycle.test.ts +248 -0
- package/templates/runtime/rendering/renderer-pipeline-runtime-owner-inspection.ts +23 -0
- package/templates/runtime/rendering/renderer-pipeline-runtime-owner.test.ts +353 -0
- package/templates/runtime/rendering/renderer-pipeline-runtime-owner.ts +369 -0
- package/templates/runtime/rendering/renderer-pipeline-runtime.lifecycle.test.ts +440 -0
- package/templates/runtime/rendering/renderer-pipeline-runtime.test.ts +495 -0
- package/templates/runtime/rendering/renderer-pipeline-runtime.ts +611 -0
- package/templates/runtime/rendering/renderer-pipeline-runtime.types.test.ts +93 -0
- package/templates/runtime/rendering/renderer-pipeline-source-invalidation.test.ts +208 -0
- package/templates/runtime/rendering/structured-key-trie.test.ts +31 -0
- package/templates/runtime/rendering/structured-key-trie.ts +91 -0
- package/templates/runtime/scene/index.ts +1 -0
- package/templates/runtime/scene/scene-bounds.test.ts +242 -0
- package/templates/runtime/scene/scene-bounds.ts +190 -0
- package/templates/runtime/schema/additional-value-targets.ts +15 -0
- package/templates/runtime/schema/app-capabilities.test.ts +70 -0
- package/templates/runtime/schema/app-capabilities.ts +28 -0
- package/templates/runtime/schema/app-identity.test.ts +68 -0
- package/templates/runtime/schema/app-identity.ts +30 -0
- package/templates/runtime/schema/assembly-contract.ts +18 -2
- package/templates/runtime/schema/control-schema-normalization.ts +144 -3
- package/templates/runtime/schema/controls-panel-actions.ts +111 -44
- package/templates/runtime/schema/controls-panel-layout-groups.ts +17 -6
- package/templates/runtime/schema/controls-panel-normalization.ts +42 -7
- package/templates/runtime/schema/controls-panel-section-id.test.ts +418 -0
- package/templates/runtime/schema/controls-panel-section-id.ts +208 -0
- package/templates/runtime/schema/controls-panel-section-layout.ts +62 -23
- package/templates/runtime/schema/controls-panel-section-roundtrip.test.ts +157 -0
- package/templates/runtime/schema/controls-panel-section-titles.ts +19 -7
- package/templates/runtime/schema/define-toolcraft.assembly.test.ts +73 -0
- package/templates/runtime/schema/define-toolcraft.control-sections.test-support.ts +46 -0
- package/templates/runtime/schema/define-toolcraft.control-sections.test.ts +2 -4
- package/templates/runtime/schema/define-toolcraft.file-drop-normalization.test.ts +177 -0
- package/templates/runtime/schema/define-toolcraft.model-file-drop-formats.test.ts +181 -0
- package/templates/runtime/schema/define-toolcraft.model-file-drop-limits.test.ts +175 -0
- package/templates/runtime/schema/define-toolcraft.segmented-control-fit.test.ts +167 -0
- package/templates/runtime/schema/define-toolcraft.setup-background.test.ts +142 -0
- package/templates/runtime/schema/define-toolcraft.setup-canvas.test.ts +38 -0
- package/templates/runtime/schema/define-toolcraft.setup-persistence.test.ts +39 -31
- package/templates/runtime/schema/define-toolcraft.setup-render-scale-timeline.test.ts +33 -13
- package/templates/runtime/schema/define-toolcraft.setup-settings-transfer.test.ts +61 -1
- package/templates/runtime/schema/define-toolcraft.ts +32 -55
- package/templates/runtime/schema/keyframe-capability.test.ts +16 -5
- package/templates/runtime/schema/panels-schema-normalization.ts +17 -2
- package/templates/runtime/schema/persistence-plan.test.ts +201 -0
- package/templates/runtime/schema/persistence-plan.ts +70 -0
- package/templates/runtime/schema/runtime-setup-background.ts +158 -0
- package/templates/runtime/schema/runtime-setup-section.ts +122 -57
- package/templates/runtime/schema/runtime-targets.ts +14 -0
- package/templates/runtime/schema/schema-resolvers.ts +0 -18
- package/templates/runtime/schema/types.ts +167 -17
- package/templates/runtime/source-assets/binary-media-hydration.ts +73 -0
- package/templates/runtime/source-assets/default-binary-media-hydration.test.ts +92 -0
- package/templates/runtime/source-assets/default-model-hydration.test.ts +200 -0
- package/templates/runtime/source-assets/file-source-asset-handler.ts +157 -0
- package/templates/runtime/source-assets/image-file-source-asset-handler.test.ts +78 -0
- package/templates/runtime/source-assets/image-source-asset-handler.test.ts +202 -0
- package/templates/runtime/source-assets/image-source-asset-handler.ts +123 -0
- package/templates/runtime/source-assets/index.ts +20 -0
- package/templates/runtime/source-assets/media-resource-ref.test.ts +33 -0
- package/templates/runtime/source-assets/media-resource-ref.ts +49 -0
- package/templates/runtime/source-assets/production-source-asset-registry.ts +18 -0
- package/templates/runtime/source-assets/repository/binary-asset-dependencies.test.ts +184 -0
- package/templates/runtime/source-assets/repository/binary-asset-reachability.ts +26 -0
- package/templates/runtime/source-assets/repository/binary-asset-repository.ts +139 -0
- package/templates/runtime/source-assets/repository/indexeddb-binary-asset-lifecycle.test.ts +111 -0
- package/templates/runtime/source-assets/repository/indexeddb-binary-asset-lifecycle.ts +248 -0
- package/templates/runtime/source-assets/repository/indexeddb-binary-asset-liveness.test.ts +68 -0
- package/templates/runtime/source-assets/repository/indexeddb-binary-asset-liveness.ts +156 -0
- package/templates/runtime/source-assets/repository/indexeddb-binary-asset-metadata.ts +242 -0
- package/templates/runtime/source-assets/repository/indexeddb-binary-asset-options.ts +130 -0
- package/templates/runtime/source-assets/repository/indexeddb-binary-asset-repository-leases.test.ts +305 -0
- package/templates/runtime/source-assets/repository/indexeddb-binary-asset-repository-liveness.test.ts +217 -0
- package/templates/runtime/source-assets/repository/indexeddb-binary-asset-repository-migration.test.ts +198 -0
- package/templates/runtime/source-assets/repository/indexeddb-binary-asset-repository.test-support.ts +48 -0
- package/templates/runtime/source-assets/repository/indexeddb-binary-asset-repository.test.ts +242 -0
- package/templates/runtime/source-assets/repository/indexeddb-binary-asset-repository.ts +390 -0
- package/templates/runtime/source-assets/repository/indexeddb-binary-asset-storage.ts +238 -0
- package/templates/runtime/source-assets/repository/indexeddb-binary-asset-test-support.ts +163 -0
- package/templates/runtime/source-assets/repository/memory-binary-asset-repository.test.ts +211 -0
- package/templates/runtime/source-assets/repository/memory-binary-asset-repository.ts +149 -0
- package/templates/runtime/source-assets/repository/resource-manifest.test.ts +67 -0
- package/templates/runtime/source-assets/repository/resource-manifest.ts +122 -0
- package/templates/runtime/source-assets/repository/resource-reachability.test.ts +227 -0
- package/templates/runtime/source-assets/repository/resource-reachability.ts +153 -0
- package/templates/runtime/source-assets/repository/unavailable-binary-asset-repository.ts +24 -0
- package/templates/runtime/source-assets/source-asset-admission.ts +63 -0
- package/templates/runtime/source-assets/source-asset-batch-preparation.ts +42 -0
- package/templates/runtime/source-assets/source-asset-binary-media-hydrator.ts +137 -0
- package/templates/runtime/source-assets/source-asset-cleanup-manager.ts +110 -0
- package/templates/runtime/source-assets/source-asset-coordinator-admission.test.ts +365 -0
- package/templates/runtime/source-assets/source-asset-coordinator-lifecycle.test.ts +230 -0
- package/templates/runtime/source-assets/source-asset-coordinator-planning.test.ts +121 -0
- package/templates/runtime/source-assets/source-asset-coordinator-presentation-reachability.test.ts +54 -0
- package/templates/runtime/source-assets/source-asset-coordinator-test-support.ts +197 -0
- package/templates/runtime/source-assets/source-asset-coordinator.test.ts +495 -0
- package/templates/runtime/source-assets/source-asset-coordinator.ts +328 -0
- package/templates/runtime/source-assets/source-asset-feedback.ts +40 -0
- package/templates/runtime/source-assets/source-asset-handler-cancellation.test.ts +157 -0
- package/templates/runtime/source-assets/source-asset-import-runner.ts +462 -0
- package/templates/runtime/source-assets/source-asset-job-manager.ts +186 -0
- package/templates/runtime/source-assets/source-asset-model-hydrator.ts +241 -0
- package/templates/runtime/source-assets/source-asset-operation-store.test.ts +53 -0
- package/templates/runtime/source-assets/source-asset-operation-store.ts +132 -0
- package/templates/runtime/source-assets/source-asset-prepared-result.ts +108 -0
- package/templates/runtime/source-assets/source-asset-presentation-feedback.test.ts +34 -0
- package/templates/runtime/source-assets/source-asset-presentation-resources.test.ts +43 -0
- package/templates/runtime/source-assets/source-asset-presentation-resources.ts +144 -0
- package/templates/runtime/source-assets/source-asset-presentation.test.ts +196 -0
- package/templates/runtime/source-assets/source-asset-presentation.ts +182 -0
- package/templates/runtime/source-assets/source-asset-registry.test.ts +282 -0
- package/templates/runtime/source-assets/source-asset-registry.ts +165 -0
- package/templates/runtime/source-assets/source-asset-resource-resolver.test.ts +47 -0
- package/templates/runtime/source-assets/source-asset-resource-resolver.ts +86 -0
- package/templates/runtime/source-assets/source-asset-types.ts +173 -0
- package/templates/runtime/state/canvas-background-state.ts +73 -0
- package/templates/runtime/state/canvas-control-target-reducer.test.ts +272 -0
- package/templates/runtime/state/canvas-control-target-reducer.ts +349 -0
- package/templates/runtime/state/canvas-frame.test.ts +68 -0
- package/templates/runtime/state/canvas-frame.ts +79 -0
- package/templates/runtime/state/canvas-reducer.ts +90 -5
- package/templates/runtime/state/control-value-normalization.test.ts +141 -0
- package/templates/runtime/state/control-value-normalization.ts +222 -0
- package/templates/runtime/state/controls-reducer.ts +45 -145
- package/templates/runtime/state/create-template-state.test.ts +43 -2
- package/templates/runtime/state/create-template-state.ts +36 -5
- package/templates/runtime/state/history-patch-metadata.test.ts +36 -0
- package/templates/runtime/state/history-patch-metadata.ts +74 -0
- package/templates/runtime/state/history-patches.ts +49 -12
- package/templates/runtime/state/layer-visibility.ts +36 -0
- package/templates/runtime/state/media-defaults.ts +93 -6
- package/templates/runtime/state/media-discriminated-union.test.ts +204 -0
- package/templates/runtime/state/media-import-allocation.ts +129 -0
- package/templates/runtime/state/media-reducer.ts +395 -99
- package/templates/runtime/state/media-resource-state.ts +34 -0
- package/templates/runtime/state/media-state.ts +1 -1
- package/templates/runtime/state/panels-reducer.ts +80 -27
- package/templates/runtime/state/persistence-additional-value-targets.test.ts +67 -0
- package/templates/runtime/state/persistence-controller.test.ts +187 -0
- package/templates/runtime/state/persistence-controller.ts +195 -0
- package/templates/runtime/state/persistence-legacy-section-collapse.test.ts +75 -0
- package/templates/runtime/state/persistence-legacy-section-collapse.ts +138 -0
- package/templates/runtime/state/persistence-media-migration.test.ts +163 -0
- package/templates/runtime/state/persistence-migrations.test.ts +51 -0
- package/templates/runtime/state/persistence-migrations.ts +101 -0
- package/templates/runtime/state/persistence-reader-canvas.ts +4 -0
- package/templates/runtime/state/persistence-reader-media.ts +298 -39
- package/templates/runtime/state/persistence-reader-panels.ts +52 -5
- package/templates/runtime/state/persistence-reader-values.ts +19 -21
- package/templates/runtime/state/persistence-readers.ts +1 -1
- package/templates/runtime/state/persistence-snapshot.ts +15 -4
- package/templates/runtime/state/persistence.test.ts +228 -3
- package/templates/runtime/state/persistence.ts +53 -14
- package/templates/runtime/state/reducer-canvas-panels.test.ts +63 -0
- package/templates/runtime/state/reducer-controls.test.ts +114 -0
- package/templates/runtime/state/reducer-media-import-batch.test.ts +90 -0
- package/templates/runtime/state/reducer-media-import-sizing.test.ts +5 -3
- package/templates/runtime/state/reducer-media-reset.test.ts +18 -2
- package/templates/runtime/state/reducer-media-test-utils.ts +11 -6
- package/templates/runtime/state/reducer-media-transform.test.ts +11 -3
- package/templates/runtime/state/reducer-model-lifecycle.test.ts +307 -0
- package/templates/runtime/state/reducer.ts +9 -0
- package/templates/runtime/state/scene-element-frame.test.ts +32 -0
- package/templates/runtime/state/scene-element-frame.ts +46 -0
- package/templates/runtime/state/toolcraft-external-store-cross-lane.test.ts +475 -0
- package/templates/runtime/state/toolcraft-external-store-dependencies.test.ts +226 -0
- package/templates/runtime/state/toolcraft-external-store-dependencies.ts +291 -0
- package/templates/runtime/state/toolcraft-external-store-field-intent.test.ts +202 -0
- package/templates/runtime/state/toolcraft-external-store-history-boundary.test.ts +243 -0
- package/templates/runtime/state/toolcraft-external-store-history.ts +254 -0
- package/templates/runtime/state/toolcraft-external-store-publication.test.ts +135 -0
- package/templates/runtime/state/toolcraft-external-store-transition.ts +143 -0
- package/templates/runtime/state/toolcraft-external-store.test.ts +330 -0
- package/templates/runtime/state/toolcraft-external-store.ts +401 -0
- package/templates/runtime/state/toolcraft-keyframe-equality.ts +78 -0
- package/templates/runtime/state/types.ts +215 -13
- package/templates/runtime/testing/model-import-performance-workload.test.ts +265 -0
- package/templates/runtime/testing/model-import-performance-workload.ts +468 -0
- package/templates/runtime/testing/performance-config.ts +7 -0
- package/templates/runtime/testing/performance-control-classification.ts +3 -59
- package/templates/runtime/testing/performance-coverage-policy.ts +13 -0
- package/templates/runtime/testing/performance-coverage-validator.ts +39 -24
- package/templates/runtime/testing/performance-envelope-validation-context.ts +33 -0
- package/templates/runtime/testing/performance-fixture-adapter-types.ts +74 -0
- package/templates/runtime/testing/performance-fixture-adapters.ts +24 -0
- package/templates/runtime/testing/performance-fixture-cost-model.ts +216 -0
- package/templates/runtime/testing/performance-fixture-dimensions.ts +83 -0
- package/templates/runtime/testing/performance-fixture-discrete-adapters.ts +150 -0
- package/templates/runtime/testing/performance-fixture-discrete-domain.test.ts +274 -0
- package/templates/runtime/testing/performance-fixture-discrete-search.test.ts +119 -0
- package/templates/runtime/testing/performance-fixture-discrete-search.ts +96 -0
- package/templates/runtime/testing/performance-fixture-execution.test.ts +248 -0
- package/templates/runtime/testing/performance-fixture-execution.ts +109 -0
- package/templates/runtime/testing/performance-fixture-numeric.test.ts +15 -0
- package/templates/runtime/testing/performance-fixture-numeric.ts +24 -0
- package/templates/runtime/testing/performance-fixture-plan-analysis.ts +385 -0
- package/templates/runtime/testing/performance-fixture-plan.test-fixtures.ts +115 -0
- package/templates/runtime/testing/performance-fixture-plan.test.ts +443 -0
- package/templates/runtime/testing/performance-fixture-plan.ts +105 -0
- package/templates/runtime/testing/performance-fixture-reachable-values.test.ts +406 -0
- package/templates/runtime/testing/performance-fixture-record.ts +14 -0
- package/templates/runtime/testing/performance-fixture-registry-validation.ts +341 -0
- package/templates/runtime/testing/performance-fixture-validation-pure.test.ts +378 -0
- package/templates/runtime/testing/performance-interaction-policy.test.ts +35 -0
- package/templates/runtime/testing/performance-interaction-policy.ts +9 -0
- package/templates/runtime/testing/performance-no-legacy-semantics.test.ts +109 -0
- package/templates/runtime/testing/performance-path-codec.d.mts +42 -0
- package/templates/runtime/testing/performance-path-codec.mjs +112 -0
- package/templates/runtime/testing/performance-path-codec.test.ts +96 -0
- package/templates/runtime/testing/performance-path-coverage-policy.ts +111 -0
- package/templates/runtime/testing/performance-path-coverage.test.ts +219 -0
- package/templates/runtime/testing/performance-path-model.ts +15 -0
- package/templates/runtime/testing/performance-paths.test-fixtures.ts +165 -0
- package/templates/runtime/testing/performance-paths.test.ts +208 -0
- package/templates/runtime/testing/performance-paths.ts +84 -0
- package/templates/runtime/testing/performance-profile-validation.test.ts +42 -0
- package/templates/runtime/testing/performance-profile-validation.ts +19 -0
- package/templates/runtime/testing/performance-render-plan-assessment.test.ts +492 -0
- package/templates/runtime/testing/performance-render-plan-assessment.ts +121 -0
- package/templates/runtime/testing/performance-render-plan-benchmark-evidence.test.ts +225 -0
- package/templates/runtime/testing/performance-render-plan-benchmark-evidence.ts +185 -0
- package/templates/runtime/testing/performance-render-plan-integration.test.ts +250 -0
- package/templates/runtime/testing/performance-render-plan-model.ts +91 -0
- package/templates/runtime/testing/performance-render-plan-pass-assessment.ts +353 -0
- package/templates/runtime/testing/performance-render-plan-registration.test.ts +78 -0
- package/templates/runtime/testing/performance-render-plan-test-fixtures.ts +123 -0
- package/templates/runtime/testing/performance-render-plan-utils.ts +65 -0
- package/templates/runtime/testing/performance-renderer-pipeline-parser.ts +202 -0
- package/templates/runtime/testing/performance-renderer-pipeline-validation.ts +93 -98
- package/templates/runtime/testing/performance-renderer-technique-validation.ts +0 -155
- package/templates/runtime/testing/performance-scenario-common-validation.ts +101 -0
- package/templates/runtime/testing/performance-scenario-validation.ts +3 -40
- package/templates/runtime/testing/performance-schema-queries.ts +3 -1
- package/templates/runtime/testing/performance-test-fixtures/index.ts +0 -2
- package/templates/runtime/testing/performance-test-fixtures/renderer-pipelines.ts +0 -14
- package/templates/runtime/testing/performance-types.ts +128 -182
- package/templates/runtime/testing/performance-workload-envelope-derived-validation.test.ts +152 -0
- package/templates/runtime/testing/performance-workload-envelope-derived-validation.ts +109 -0
- package/templates/runtime/testing/performance-workload-envelope-schema-validation.test.ts +384 -0
- package/templates/runtime/testing/performance-workload-envelope-schema-validation.ts +201 -0
- package/templates/runtime/testing/performance-workload-envelope-shared.ts +97 -0
- package/templates/runtime/testing/performance-workload-envelope-test-fixtures.ts +102 -0
- package/templates/runtime/testing/performance-workload-envelope-validation.test.ts +293 -0
- package/templates/runtime/testing/performance-workload-envelope-validation.ts +222 -0
- package/templates/runtime/testing/performance-workload-types.test.ts +65 -0
- package/templates/runtime/testing/performance-workload-types.ts +34 -0
- package/templates/runtime/testing/performance.ts +47 -5
- package/templates/starter/AGENTS.md +45 -37
- package/templates/starter/docs/toolcraft/README.md +14 -16
- package/templates/starter/docs/toolcraft/acceptance-testing.md +86 -33
- package/templates/starter/docs/toolcraft/agent-worklog.md +121 -22
- package/templates/starter/docs/toolcraft/assembly-workflow.md +29 -13
- package/templates/starter/docs/toolcraft/component-rules.md +43 -5
- package/templates/starter/docs/toolcraft/core/control-selection.md +66 -0
- package/templates/starter/docs/toolcraft/core/layout.md +5 -3
- package/templates/starter/docs/toolcraft/core/media-upload.md +44 -1
- package/templates/starter/docs/toolcraft/core/performance.md +100 -67
- package/templates/starter/docs/toolcraft/core/runtime-boundary.md +14 -2
- package/templates/starter/docs/toolcraft/core/setup-export.md +40 -16
- package/templates/starter/docs/toolcraft/core/timeline-animation.md +2 -1
- package/templates/starter/docs/toolcraft/custom-controls.md +7 -1
- package/templates/starter/docs/toolcraft/decision-contract.md +8 -4
- package/templates/starter/docs/toolcraft/performance.md +115 -143
- package/templates/starter/docs/toolcraft/renderer-technique.md +90 -25
- package/templates/starter/docs/toolcraft/schema-reference.md +200 -44
- package/templates/starter/docs/toolcraft/workflow.md +35 -20
- package/templates/starter/e2e/app-browser-control-coverage.spec.ts +0 -54
- package/templates/starter/e2e/app-browser-infinity-canvas-evidence.spec.ts +86 -0
- package/templates/starter/e2e/app-browser-model-appearance-evidence.spec.ts +214 -0
- package/templates/starter/e2e/app-browser-model-import-evidence.spec.ts +422 -0
- package/templates/starter/e2e/app-browser-model-performance.spec.ts +140 -0
- package/templates/starter/e2e/app-browser-model-runtime-requirements.spec.ts +71 -0
- package/templates/starter/e2e/app-browser-orientation-evidence.spec.ts +276 -0
- package/templates/starter/e2e/app-browser-performance-evidence.spec.ts +164 -90
- package/templates/starter/e2e/app-browser-performance-probe.spec.ts +61 -0
- package/templates/starter/e2e/app-browser-proof-session.spec.ts +19 -0
- package/templates/starter/e2e/app-browser-render-scale-evidence.spec.ts +193 -0
- package/templates/starter/e2e/app-browser-render-scale-requirements.spec.ts +71 -0
- package/templates/starter/e2e/app-browser-runtime-provenance.spec.ts +12 -64
- package/templates/starter/e2e/app-browser-runtime-reporter.spec.ts +100 -50
- package/templates/starter/e2e/app-browser-runtime-requirements.spec.ts +179 -46
- package/templates/starter/e2e/app-browser-semantic-evidence.spec.ts +34 -56
- package/templates/starter/e2e/app-controls.spec.ts +1 -1
- package/templates/starter/e2e/app-kernel-benchmarks.ts +3 -0
- package/templates/starter/e2e/app-performance-path-adapters.ts +4 -0
- package/templates/starter/e2e/app-performance.spec.ts +49 -0
- package/templates/starter/e2e/app-persistence.spec.ts +209 -0
- package/templates/starter/e2e/browser-acceptance-outcome-helpers.ts +5 -1
- package/templates/starter/e2e/browser-conditional-output-evidence-helpers.ts +5 -0
- package/templates/starter/e2e/browser-execution-ledger.spec.ts +79 -0
- package/templates/starter/e2e/browser-execution-ledger.ts +115 -0
- package/templates/starter/e2e/browser-infinity-canvas-evidence.ts +729 -0
- package/templates/starter/e2e/browser-layer-evidence-helpers.ts +66 -9
- package/templates/starter/e2e/browser-model-appearance-evidence-helpers.ts +65 -0
- package/templates/starter/e2e/browser-model-appearance-evidence.ts +171 -0
- package/templates/starter/e2e/browser-model-import-evidence-helpers.ts +426 -0
- package/templates/starter/e2e/browser-orientation-gizmo-actions.ts +256 -0
- package/templates/starter/e2e/browser-orientation-gizmo-evidence-helpers.ts +433 -0
- package/templates/starter/e2e/browser-performance-evidence.ts +22 -0
- package/templates/starter/e2e/browser-performance-measurement-evidence.ts +25 -0
- package/templates/starter/e2e/browser-performance-measurement-report.spec.ts +73 -0
- package/templates/starter/e2e/browser-performance-measurement-report.ts +218 -0
- package/templates/starter/e2e/browser-performance-report.ts +246 -0
- package/templates/starter/e2e/browser-performance-reporter-evaluation.ts +317 -0
- package/templates/starter/e2e/browser-performance-reporter.spec.ts +456 -0
- package/templates/starter/e2e/browser-performance-targeted-selection.spec.ts +145 -0
- package/templates/starter/e2e/browser-proof-session.ts +31 -1
- package/templates/starter/e2e/browser-render-scale-evidence.ts +245 -0
- package/templates/starter/e2e/browser-runtime-evidence-reporter-test-fixtures.ts +55 -0
- package/templates/starter/e2e/browser-runtime-evidence-reporter.ts +146 -4
- package/templates/starter/e2e/browser-runtime-evidence-requirements.ts +133 -52
- package/templates/starter/e2e/browser-semantic-evidence-test-helpers.ts +57 -0
- package/templates/starter/e2e/browser-state-evidence-helpers.ts +7 -1
- package/templates/starter/e2e/browser-timeline-evidence-helpers.ts +4 -0
- package/templates/starter/e2e/canvas-handle-helpers.ts +3 -3
- package/templates/starter/e2e/kernel-benchmark-contract.ts +19 -0
- package/templates/starter/e2e/model-import-evidence-test-support.ts +125 -0
- package/templates/starter/e2e/performance-budget-helpers.ts +3 -107
- package/templates/starter/e2e/performance-canvas-helpers.ts +8 -8
- package/templates/starter/e2e/performance-checkpoint-report.ts +89 -0
- package/templates/starter/e2e/performance-compiled-fixture-runtime.ts +120 -0
- package/templates/starter/e2e/performance-control-helpers.ts +1 -1
- package/templates/starter/e2e/performance-control-layout-helpers.ts +24 -0
- package/templates/starter/e2e/performance-environment-evidence.ts +205 -0
- package/templates/starter/e2e/performance-fixture-helpers.ts +37 -210
- package/templates/starter/e2e/performance-fixture-selection.spec.ts +167 -0
- package/templates/starter/e2e/performance-fixture-selection.ts +82 -0
- package/templates/starter/e2e/performance-frame-metrics.spec.ts +21 -0
- package/templates/starter/e2e/performance-frame-metrics.ts +50 -0
- package/templates/starter/e2e/performance-frame-probe.ts +74 -49
- package/templates/starter/e2e/performance-helpers.ts +1 -0
- package/templates/starter/e2e/performance-interaction-measurement.ts +5 -11
- package/templates/starter/e2e/performance-measurement-evidence.ts +52 -8
- package/templates/starter/e2e/performance-model-appearance-contract.ts +11 -0
- package/templates/starter/e2e/performance-model-import-appearance-fixture-support.ts +32 -0
- package/templates/starter/e2e/performance-model-import-appearance-fixtures.spec.ts +56 -0
- package/templates/starter/e2e/performance-model-import-appearance-fixtures.ts +434 -0
- package/templates/starter/e2e/performance-model-import-binary-appearance-fixtures.ts +39 -0
- package/templates/starter/e2e/performance-model-import-fixtures.spec.ts +133 -0
- package/templates/starter/e2e/performance-model-import-fixtures.ts +439 -0
- package/templates/starter/e2e/performance-model-import-geometry-fixtures.ts +158 -0
- package/templates/starter/e2e/performance-model-import-helpers.ts +409 -0
- package/templates/starter/e2e/performance-model-import-zip-fixtures.ts +57 -0
- package/templates/starter/e2e/performance-model-orientation-helpers.ts +34 -0
- package/templates/starter/e2e/performance-model-pixel-helpers.ts +135 -0
- package/templates/starter/e2e/performance-output-action-helpers.ts +4 -4
- package/templates/starter/e2e/performance-path-adapter-contract.ts +55 -0
- package/templates/starter/e2e/performance-path-helpers.spec.ts +171 -0
- package/templates/starter/e2e/performance-path-helpers.ts +291 -0
- package/templates/starter/e2e/performance-pipeline-browser-helper.spec.ts +175 -0
- package/templates/starter/e2e/performance-pipeline-cache-fallback.spec.ts +204 -0
- package/templates/starter/e2e/performance-pipeline-evidence-continuity.spec.ts +134 -0
- package/templates/starter/e2e/performance-pipeline-evidence-test-fixtures.ts +409 -0
- package/templates/starter/e2e/performance-pipeline-evidence.spec.ts +441 -0
- package/templates/starter/e2e/performance-pipeline-evidence.ts +175 -0
- package/templates/starter/e2e/performance-pipeline-invariants.ts +359 -0
- package/templates/starter/e2e/performance-pipeline-resource-evidence.spec.ts +119 -0
- package/templates/starter/e2e/performance-profile-helpers.spec.ts +103 -0
- package/templates/starter/e2e/performance-profile-helpers.ts +52 -0
- package/templates/starter/e2e/performance-render-scale-runner.spec.ts +266 -0
- package/templates/starter/e2e/performance-slider-helpers.ts +7 -123
- package/templates/starter/e2e/product-observable-helpers.ts +109 -103
- package/templates/starter/e2e/toolcraft-delivery-catalog-reporter.ts +31 -0
- package/templates/starter/e2e/toolcraft-kernel-benchmark.spec.ts +107 -0
- package/templates/starter/e2e/toolcraft-product-test.spec.ts +14 -0
- package/templates/starter/e2e/toolcraft-product-test.ts +33 -0
- package/templates/starter/index.html +8 -0
- package/templates/starter/package.json +14 -11
- package/templates/starter/playwright.config.ts +124 -2
- package/templates/starter/scripts/check-toolcraft-code-health.mjs +66 -19
- package/templates/starter/scripts/check-toolcraft-code-health.test.mjs +151 -0
- package/templates/starter/scripts/check-toolcraft-docs.mjs +49 -3
- package/templates/starter/scripts/check-toolcraft-integrity.mjs +229 -117
- package/templates/starter/scripts/check-toolcraft-integrity.test.mjs +271 -0
- package/templates/starter/scripts/playwright-containing-file.mjs +48 -0
- package/templates/starter/scripts/playwright-test-shim-fixture.mjs +204 -0
- package/templates/starter/scripts/playwright-test-shim-fixture.test.mjs +69 -0
- package/templates/starter/scripts/playwright-test-title-selection-performance-path.test.mjs +129 -0
- package/templates/starter/scripts/playwright-test-title-selection.mjs +350 -0
- package/templates/starter/scripts/playwright-test-title-selection.test.mjs +465 -0
- package/templates/starter/scripts/run-browser-performance-test-helpers.mjs +335 -0
- package/templates/starter/scripts/run-browser-performance.mjs +71 -98
- package/templates/starter/scripts/run-browser-performance.test.mjs +266 -27
- package/templates/starter/scripts/run-delivery-verification-test-helpers.mjs +210 -0
- package/templates/starter/scripts/run-delivery-verification.mjs +47 -0
- package/templates/starter/scripts/run-delivery-verification.test.mjs +101 -0
- package/templates/starter/scripts/run-kernel-benchmarks.mjs +104 -0
- package/templates/starter/scripts/toolcraft-browser-impact-selection.mjs +26 -0
- package/templates/starter/scripts/toolcraft-checkpoint-bundle.mjs +198 -0
- package/templates/starter/scripts/toolcraft-checkpoint-bundle.test.mjs +297 -0
- package/templates/starter/scripts/toolcraft-checkpoint-capability-invariants.test.mjs +389 -0
- package/templates/starter/scripts/toolcraft-checkpoint-delivery-state.mjs +106 -0
- package/templates/starter/scripts/toolcraft-checkpoint-delivery-state.test.mjs +279 -0
- package/templates/starter/scripts/toolcraft-checkpoint-durability.test.mjs +49 -0
- package/templates/starter/scripts/toolcraft-checkpoint-durable-fs.mjs +90 -0
- package/templates/starter/scripts/toolcraft-checkpoint-ownership-policy.mjs +217 -0
- package/templates/starter/scripts/toolcraft-checkpoint-paths.mjs +35 -0
- package/templates/starter/scripts/toolcraft-checkpoint-transaction-test-helpers.mjs +12 -0
- package/templates/starter/scripts/toolcraft-checkpoint-transaction.mjs +125 -0
- package/templates/starter/scripts/toolcraft-checkpoint-transaction.test.mjs +167 -0
- package/templates/starter/scripts/toolcraft-checkpoint-write-capability.mjs +196 -0
- package/templates/starter/scripts/toolcraft-code-health-core.d.mts +46 -0
- package/templates/starter/scripts/toolcraft-code-health-core.mjs +80 -99
- package/templates/starter/scripts/toolcraft-code-health-line-budget.mjs +80 -0
- package/templates/starter/scripts/toolcraft-contract-doc-integrity.mjs +7 -3
- package/templates/starter/scripts/toolcraft-contract-doc-integrity.test.mjs +16 -0
- package/templates/starter/scripts/toolcraft-contract-manifest.json +42 -0
- package/templates/starter/scripts/toolcraft-contract-manifest.mjs +8 -0
- package/templates/starter/scripts/toolcraft-contract-manifest.test.mjs +40 -0
- package/templates/starter/scripts/toolcraft-css-source-evidence.mjs +192 -0
- package/templates/starter/scripts/toolcraft-css-source-evidence.test.mjs +336 -0
- package/templates/starter/scripts/toolcraft-css-url-graph-evidence.test.mjs +157 -0
- package/templates/starter/scripts/toolcraft-css-url-scanner.mjs +333 -0
- package/templates/starter/scripts/toolcraft-css-url-scanner.test.mjs +210 -0
- package/templates/starter/scripts/toolcraft-delivery-anchor.d.mts +46 -0
- package/templates/starter/scripts/toolcraft-delivery-anchor.mjs +84 -0
- package/templates/starter/scripts/toolcraft-delivery-anchor.test.mjs +131 -0
- package/templates/starter/scripts/toolcraft-delivery-architecture-inventory.mjs +86 -0
- package/templates/starter/scripts/toolcraft-delivery-architecture-policy.d.mts +51 -0
- package/templates/starter/scripts/toolcraft-delivery-architecture-policy.mjs +248 -0
- package/templates/starter/scripts/toolcraft-delivery-architecture-test-helpers.mjs +40 -0
- package/templates/starter/scripts/toolcraft-delivery-catalog-collector.mjs +55 -0
- package/templates/starter/scripts/toolcraft-delivery-catalog-collector.test.mjs +167 -0
- package/templates/starter/scripts/toolcraft-delivery-evidence.mjs +187 -0
- package/templates/starter/scripts/toolcraft-delivery-evidence.test.mjs +268 -0
- package/templates/starter/scripts/toolcraft-delivery-executor.mjs +294 -0
- package/templates/starter/scripts/toolcraft-delivery-executor.test.mjs +463 -0
- package/templates/starter/scripts/toolcraft-delivery-framework-refresh.test.mjs +141 -0
- package/templates/starter/scripts/toolcraft-delivery-functional-changed.test.mjs +468 -0
- package/templates/starter/scripts/toolcraft-delivery-functional-context.d.mts +72 -0
- package/templates/starter/scripts/toolcraft-delivery-functional-context.mjs +56 -0
- package/templates/starter/scripts/toolcraft-delivery-functional-context.test.mjs +231 -0
- package/templates/starter/scripts/toolcraft-delivery-functional-initial.test.mjs +212 -0
- package/templates/starter/scripts/toolcraft-delivery-functional-model-lifecycle.test.mjs +254 -0
- package/templates/starter/scripts/toolcraft-delivery-functional-semantic-regression.test.mjs +135 -0
- package/templates/starter/scripts/toolcraft-delivery-lifecycle-state.mjs +226 -0
- package/templates/starter/scripts/toolcraft-delivery-lifecycle-state.test.mjs +83 -0
- package/templates/starter/scripts/toolcraft-delivery-lifecycle.mjs +340 -0
- package/templates/starter/scripts/toolcraft-delivery-module-graph.test.mjs +393 -0
- package/templates/starter/scripts/toolcraft-delivery-performance-iteration-authority.test.mjs +88 -0
- package/templates/starter/scripts/toolcraft-delivery-performance-iteration-durability.test.mjs +329 -0
- package/templates/starter/scripts/toolcraft-delivery-performance-iteration-evidence.test.mjs +104 -0
- package/templates/starter/scripts/toolcraft-delivery-performance-iteration-lifecycle.test.mjs +478 -0
- package/templates/starter/scripts/toolcraft-delivery-performance-iteration-test-helpers.mjs +19 -0
- package/templates/starter/scripts/toolcraft-delivery-plan-authority.test.mjs +282 -0
- package/templates/starter/scripts/toolcraft-delivery-plan-construction.mjs +166 -0
- package/templates/starter/scripts/toolcraft-delivery-plan-errors.test.mjs +425 -0
- package/templates/starter/scripts/toolcraft-delivery-plan-functional-model.test.mjs +358 -0
- package/templates/starter/scripts/toolcraft-delivery-plan.d.mts +155 -0
- package/templates/starter/scripts/toolcraft-delivery-plan.mjs +334 -0
- package/templates/starter/scripts/toolcraft-delivery-plan.test.mjs +487 -0
- package/templates/starter/scripts/toolcraft-delivery-receipt-performance.test.mjs +156 -0
- package/templates/starter/scripts/toolcraft-delivery-receipt-strictness.test.mjs +220 -0
- package/templates/starter/scripts/toolcraft-delivery-receipt-test-helpers.mjs +226 -0
- package/templates/starter/scripts/toolcraft-delivery-receipt.d.mts +83 -0
- package/templates/starter/scripts/toolcraft-delivery-receipt.mjs +216 -0
- package/templates/starter/scripts/toolcraft-delivery-receipt.test.mjs +195 -0
- package/templates/starter/scripts/toolcraft-delivery-receipt.types.test.mts +161 -0
- package/templates/starter/scripts/toolcraft-dependency-source-record.mjs +59 -0
- package/templates/starter/scripts/toolcraft-fixture-module-closure.mjs +279 -0
- package/templates/starter/scripts/toolcraft-fixture-module-closure.test.mjs +184 -0
- package/templates/starter/scripts/toolcraft-full-performance-test-helpers.mjs +67 -0
- package/templates/starter/scripts/toolcraft-functional-proof-model.d.mts +47 -0
- package/templates/starter/scripts/toolcraft-functional-proof-model.mjs +198 -0
- package/templates/starter/scripts/toolcraft-functional-proof-model.test.mjs +453 -0
- package/templates/starter/scripts/toolcraft-functional-proof-model.types.test.mts +102 -0
- package/templates/starter/scripts/toolcraft-functional-proof-primitives.d.mts +6 -0
- package/templates/starter/scripts/toolcraft-functional-proof-primitives.mjs +98 -0
- package/templates/starter/scripts/toolcraft-functional-proof-primitives.test.mjs +67 -0
- package/templates/starter/scripts/toolcraft-functional-proof-regression-fixtures.mjs +298 -0
- package/templates/starter/scripts/toolcraft-graph-reachability.mjs +73 -0
- package/templates/starter/scripts/toolcraft-integrity-manifest.mjs +5 -2
- package/templates/starter/scripts/toolcraft-integrity-policy.d.mts +6 -0
- package/templates/starter/scripts/toolcraft-integrity-policy.mjs +14 -6
- package/templates/starter/scripts/toolcraft-integrity-test-utils.mjs +84 -0
- package/templates/starter/scripts/toolcraft-kernel-benchmark-receipt.d.mts +47 -0
- package/templates/starter/scripts/toolcraft-kernel-benchmark-receipt.mjs +306 -0
- package/templates/starter/scripts/toolcraft-kernel-benchmark-receipt.test.mjs +169 -0
- package/templates/starter/scripts/toolcraft-layer-evidence-facade.test.mjs +256 -0
- package/templates/starter/scripts/toolcraft-layer-evidence-reporter.test.mjs +106 -0
- package/templates/starter/scripts/toolcraft-local-dependency-evidence.test.mjs +453 -0
- package/templates/starter/scripts/toolcraft-local-dependency-graph.mjs +344 -0
- package/templates/starter/scripts/toolcraft-local-dependency-graph.test.mjs +372 -0
- package/templates/starter/scripts/toolcraft-performance-authority-policy.d.mts +40 -0
- package/templates/starter/scripts/toolcraft-performance-authority-policy.mjs +274 -0
- package/templates/starter/scripts/toolcraft-performance-checkpoint-runner.mjs +87 -0
- package/templates/starter/scripts/toolcraft-performance-checkpoint-runner.test.mjs +50 -0
- package/templates/starter/scripts/toolcraft-performance-escalation-policy.mjs +72 -0
- package/templates/starter/scripts/toolcraft-performance-escalation-policy.test.mjs +393 -0
- package/templates/starter/scripts/toolcraft-performance-iteration-comparison.mjs +127 -0
- package/templates/starter/scripts/toolcraft-performance-iteration-comparison.test.mjs +133 -0
- package/templates/starter/scripts/toolcraft-performance-receipt-policy.mjs +127 -0
- package/templates/starter/scripts/toolcraft-performance-receipt-validation.test.mjs +214 -0
- package/templates/starter/scripts/toolcraft-performance-report.d.mts +34 -0
- package/templates/starter/scripts/toolcraft-performance-report.mjs +244 -0
- package/templates/starter/scripts/toolcraft-performance-report.test.mjs +138 -0
- package/templates/starter/scripts/toolcraft-performance-request-authority.mjs +64 -0
- package/templates/starter/scripts/toolcraft-performance-request-authority.test.mjs +488 -0
- package/templates/starter/scripts/toolcraft-plan-execution-authority.mjs +143 -0
- package/templates/starter/scripts/toolcraft-playwright-evidence-authority.mjs +96 -0
- package/templates/starter/scripts/toolcraft-playwright-evidence-authority.test.mjs +94 -0
- package/templates/starter/scripts/toolcraft-product-boundary-ast.mjs +65 -51
- package/templates/starter/scripts/toolcraft-product-boundary-graph-evidence.test.mjs +161 -0
- package/templates/starter/scripts/toolcraft-product-boundary.mjs +104 -129
- package/templates/starter/scripts/toolcraft-product-boundary.test.mjs +46 -0
- package/templates/starter/scripts/toolcraft-product-dependency-resolution.mjs +61 -118
- package/templates/starter/scripts/toolcraft-product-evidence-boundary-ast.mjs +97 -31
- package/templates/starter/scripts/toolcraft-product-evidence-boundary.test.mjs +204 -1
- package/templates/starter/scripts/toolcraft-product-model-presentation-boundary.test.mjs +49 -0
- package/templates/starter/scripts/toolcraft-product-observable-facade.test.mjs +223 -0
- package/templates/starter/scripts/toolcraft-product-style-boundary.mjs +0 -136
- package/templates/starter/scripts/toolcraft-proof-process.mjs +199 -0
- package/templates/starter/scripts/toolcraft-proof-process.test.mjs +466 -0
- package/templates/starter/scripts/toolcraft-protected-browser-build.mjs +32 -0
- package/templates/starter/scripts/toolcraft-readonly-adjacency.mjs +44 -0
- package/templates/starter/scripts/toolcraft-receipt-boundary.test.mjs +285 -0
- package/templates/starter/scripts/toolcraft-receipt-file-io.mjs +16 -0
- package/templates/starter/scripts/toolcraft-source-inventory.mjs +100 -1
- package/templates/starter/scripts/toolcraft-source-inventory.test.mjs +106 -0
- package/templates/starter/scripts/toolcraft-source-ownership.mjs +15 -0
- package/templates/starter/scripts/toolcraft-source-ownership.test.mjs +31 -1
- package/templates/starter/scripts/toolcraft-state-evidence-facade.test.mjs +258 -0
- package/templates/starter/scripts/toolcraft-state-evidence-reporter.test.mjs +78 -0
- package/templates/starter/scripts/toolcraft-static-string.mjs +234 -28
- package/templates/starter/scripts/toolcraft-targeted-performance-execution.mjs +274 -0
- package/templates/starter/scripts/toolcraft-targeted-performance-execution.test.mjs +225 -0
- package/templates/starter/scripts/toolcraft-targeted-performance-report-combination.mjs +83 -0
- package/templates/starter/scripts/toolcraft-targeted-performance-report-combination.test.mjs +131 -0
- package/templates/starter/scripts/toolcraft-targeted-performance-report.d.mts +89 -0
- package/templates/starter/scripts/toolcraft-targeted-performance-report.mjs +321 -0
- package/templates/starter/scripts/toolcraft-targeted-performance-report.test.mjs +225 -0
- package/templates/starter/scripts/toolcraft-targeted-performance-report.types.test.mts +71 -0
- package/templates/starter/scripts/toolcraft-typescript-analysis.mjs +334 -0
- package/templates/starter/scripts/toolcraft-typescript-architecture-invariants.test.mjs +202 -0
- package/templates/starter/scripts/toolcraft-typescript-callables.mjs +83 -0
- package/templates/starter/scripts/toolcraft-typescript-module-shape.mjs +156 -0
- package/templates/starter/scripts/toolcraft-typescript-semantic-evidence.mjs +66 -0
- package/templates/starter/scripts/toolcraft-typescript-source-evidence-structure.test.mjs +44 -0
- package/templates/starter/scripts/toolcraft-typescript-source-evidence.d.mts +86 -0
- package/templates/starter/scripts/toolcraft-typescript-source-evidence.mjs +334 -0
- package/templates/starter/scripts/toolcraft-unavailable-resource-evidence-facade.test.mjs +439 -0
- package/templates/starter/scripts/toolcraft-verification-impact-inventory.d.mts +62 -0
- package/templates/starter/scripts/toolcraft-verification-impact-inventory.mjs +344 -0
- package/templates/starter/scripts/toolcraft-verification-impact-inventory.test.mjs +204 -0
- package/templates/starter/scripts/toolcraft-verification-impact-performance-candidates.test.mjs +210 -0
- package/templates/starter/scripts/toolcraft-verification-impact-resolution.mjs +344 -0
- package/templates/starter/scripts/toolcraft-verification-impact-resolution.test.mjs +270 -0
- package/templates/starter/scripts/toolcraft-verification-impact-semantic-resolution.test.mjs +449 -0
- package/templates/starter/scripts/toolcraft-verification-impact-support-resolution.test.mjs +195 -0
- package/templates/starter/scripts/toolcraft-verification-impact.d.mts +132 -0
- package/templates/starter/scripts/toolcraft-verification-impact.mjs +169 -0
- package/templates/starter/scripts/toolcraft-verification-impact.test.mjs +300 -0
- package/templates/starter/scripts/toolcraft-verification-input-roles.d.mts +60 -0
- package/templates/starter/scripts/toolcraft-verification-input-roles.mjs +197 -0
- package/templates/starter/scripts/toolcraft-verification-input-roles.test.mjs +225 -0
- package/templates/starter/scripts/toolcraft-verification-inventory.mjs +138 -42
- package/templates/starter/scripts/toolcraft-verification-lock.mjs +64 -0
- package/templates/starter/scripts/toolcraft-verification-receipt-test-helpers.mjs +245 -0
- package/templates/starter/scripts/toolcraft-verification-receipt.d.mts +40 -6
- package/templates/starter/scripts/toolcraft-verification-receipt.mjs +95 -229
- package/templates/starter/scripts/toolcraft-verification-receipt.test.mjs +325 -210
- package/templates/starter/scripts/toolcraft-vite-env-activation.test.mjs +131 -0
- package/templates/starter/scripts/toolcraft-vitest-runtime-contract.mjs +18 -0
- package/templates/starter/scripts/toolcraft-vitest-runtime-contract.test.mjs +36 -0
- package/templates/starter/scripts/toolcraft-vitest-runtime-evidence-reporter.test.mjs +7 -0
- package/templates/starter/scripts/toolcraft-worklog-decision-trail.d.mts +14 -0
- package/templates/starter/scripts/toolcraft-worklog-decision-trail.mjs +170 -0
- package/templates/starter/src/app/acceptance/canvas-coverage.ts +18 -0
- package/templates/starter/src/app/acceptance/canvas-handle-acceptance.ts +5 -14
- package/templates/starter/src/app/acceptance/condition-exclusivity.test.ts +60 -0
- package/templates/starter/src/app/acceptance/condition-exclusivity.ts +221 -0
- package/templates/starter/src/app/acceptance/control-acceptance-context.ts +20 -6
- package/templates/starter/src/app/acceptance/control-acceptance-coverage.ts +60 -10
- package/templates/starter/src/app/acceptance/control-acceptance-kind-rules.ts +55 -7
- package/templates/starter/src/app/acceptance/control-acceptance.ts +3 -0
- package/templates/starter/src/app/acceptance/control-component-rules.ts +0 -32
- package/templates/starter/src/app/acceptance/control-layout-entity-rules.ts +7 -4
- package/templates/starter/src/app/acceptance/control-layout-model.ts +12 -4
- package/templates/starter/src/app/acceptance/control-section-inventory.test.ts +136 -0
- package/templates/starter/src/app/acceptance/control-section-inventory.ts +69 -24
- package/templates/starter/src/app/acceptance/controls.ts +4 -0
- package/templates/starter/src/app/acceptance/infinity-canvas.ts +81 -0
- package/templates/starter/src/app/acceptance/inline-layout.ts +14 -3
- package/templates/starter/src/app/acceptance/interaction-ownership-intent.ts +31 -0
- package/templates/starter/src/app/acceptance/interaction-ownership.ts +283 -0
- package/templates/starter/src/app/acceptance/interaction-targets.ts +18 -0
- package/templates/starter/src/app/acceptance/media-upload.ts +115 -10
- package/templates/starter/src/app/acceptance/model-import-coverage.ts +42 -0
- package/templates/starter/src/app/acceptance/orientation-gizmo.ts +176 -0
- package/templates/starter/src/app/acceptance/output-background-rules.ts +58 -18
- package/templates/starter/src/app/acceptance/output-export-layout-rules.ts +4 -8
- package/templates/starter/src/app/acceptance/output-export-model.ts +17 -7
- package/templates/starter/src/app/acceptance/reference-study-types.ts +60 -0
- package/templates/starter/src/app/acceptance/render-scale.ts +107 -0
- package/templates/starter/src/app/acceptance/runtime-coverage.ts +45 -0
- package/templates/starter/src/app/acceptance/runtime-setup.ts +4 -2
- package/templates/starter/src/app/acceptance/types.ts +66 -63
- package/templates/starter/src/app/acceptance/validate-coverage.ts +76 -4
- package/templates/starter/src/app/acceptance/validation-pipeline.test.ts +5 -1
- package/templates/starter/src/app/acceptance/validation-pipeline.ts +2 -0
- package/templates/starter/src/app/acceptance/view-interaction-intent.ts +23 -0
- package/templates/starter/src/app/acceptance/view-interaction.ts +148 -0
- package/templates/starter/src/app/starter-acceptance-data.ts +28 -1
- package/templates/starter/src/app/starter-acceptance.animation-intent.test.ts +7 -4
- package/templates/starter/src/app/starter-acceptance.background-export.test.ts +17 -14
- package/templates/starter/src/app/starter-acceptance.base-coverage.test.ts +3 -0
- package/templates/starter/src/app/starter-acceptance.canvas-sizing.test.ts +133 -4
- package/templates/starter/src/app/starter-acceptance.compound-part-coverage.test.ts +6 -4
- package/templates/starter/src/app/starter-acceptance.contract-fixtures.test.ts +40 -0
- package/templates/starter/src/app/starter-acceptance.contract-fixtures.ts +20 -2
- package/templates/starter/src/app/starter-acceptance.control-label-context.test.ts +7 -5
- package/templates/starter/src/app/starter-acceptance.control-labels.test.ts +10 -8
- package/templates/starter/src/app/starter-acceptance.control-naming-rules.test.ts +6 -7
- package/templates/starter/src/app/starter-acceptance.control-order.test.ts +110 -2
- package/templates/starter/src/app/starter-acceptance.control-state.test.ts +6 -7
- package/templates/starter/src/app/starter-acceptance.curves-rules.test.ts +4 -5
- package/templates/starter/src/app/starter-acceptance.custom-control-collections.test.ts +7 -5
- package/templates/starter/src/app/starter-acceptance.custom-control-coverage.test.ts +3 -4
- package/templates/starter/src/app/starter-acceptance.custom-control-fit-check.test.ts +6 -4
- package/templates/starter/src/app/starter-acceptance.custom-control-valid.test.ts +5 -3
- package/templates/starter/src/app/starter-acceptance.image-video-export-settings.test.ts +5 -6
- package/templates/starter/src/app/starter-acceptance.interaction-ownership.test.ts +408 -0
- package/templates/starter/src/app/starter-acceptance.keyframes.test.ts +3 -2
- package/templates/starter/src/app/starter-acceptance.layers.test.ts +2 -0
- package/templates/starter/src/app/starter-acceptance.media-upload.fixtures.ts +34 -4
- package/templates/starter/src/app/starter-acceptance.media-upload.test.ts +225 -2
- package/templates/starter/src/app/starter-acceptance.orientation-gizmo.test.ts +265 -0
- package/templates/starter/src/app/starter-acceptance.output-export-rules.test.ts +14 -24
- package/templates/starter/src/app/starter-acceptance.persistence-coverage.test.ts +50 -0
- package/templates/starter/src/app/starter-acceptance.product-output-export.test.ts +7 -7
- package/templates/starter/src/app/starter-acceptance.product-readiness.test.ts +2 -0
- package/templates/starter/src/app/starter-acceptance.product-worklog.test.ts +1 -7
- package/templates/starter/src/app/starter-acceptance.range-slider-rules.test.ts +3 -4
- package/templates/starter/src/app/starter-acceptance.reference-foundation.test.ts +2 -2
- package/templates/starter/src/app/starter-acceptance.render-scale.test.ts +305 -0
- package/templates/starter/src/app/starter-acceptance.schema-test-utils.ts +1 -1
- package/templates/starter/src/app/starter-acceptance.section-cohesion.test.ts +5 -5
- package/templates/starter/src/app/starter-acceptance.section-dependencies.test.ts +11 -5
- package/templates/starter/src/app/starter-acceptance.section-titles.test.ts +4 -5
- package/templates/starter/src/app/starter-acceptance.setup-readiness.test.ts +26 -9
- package/templates/starter/src/app/starter-acceptance.slider-rules.test.ts +9 -7
- package/templates/starter/src/app/starter-acceptance.slider-unit-rules.test.ts +2 -3
- package/templates/starter/src/app/starter-acceptance.text-control-kind.test.ts +3 -4
- package/templates/starter/src/app/starter-acceptance.toggle-pair-layout.test.ts +5 -6
- package/templates/starter/src/app/starter-acceptance.toggle-parameter-layout.test.ts +63 -7
- package/templates/starter/src/app/starter-acceptance.ts +29 -0
- package/templates/starter/src/app/starter-acceptance.video-reference-study.test.ts +3 -3
- package/templates/starter/src/app/starter-acceptance.view-interaction.test.ts +282 -0
- package/templates/starter/src/app/starter-acceptance.worklog-command-authority.test.ts +123 -0
- package/templates/starter/src/app/starter-acceptance.worklog-performance-command-cases.ts +34 -0
- package/templates/starter/src/app/starter-acceptance.worklog-performance-intent-test-utils.ts +98 -0
- package/templates/starter/src/app/starter-acceptance.worklog-performance-intent.test.ts +299 -0
- package/templates/starter/src/app/starter-acceptance.worklog-test-utils.ts +76 -173
- package/templates/starter/src/app/starter-acceptance.worklog.test.ts +92 -114
- package/templates/starter/src/app/starter-automated-runtime-evidence.test.ts +0 -8
- package/templates/starter/src/app/starter-composition.tsx +1 -0
- package/templates/starter/src/app/starter-identity.ts +4 -0
- package/templates/starter/src/app/starter-performance-test-utils.ts +0 -87
- package/templates/starter/src/app/starter-performance.fixture-helper.test.ts +191 -0
- package/templates/starter/src/app/starter-performance.gates.test.ts +385 -39
- package/templates/starter/src/app/starter-performance.ts +8 -13
- package/templates/starter/src/app/starter-schema.test.ts +26 -2
- package/templates/starter/src/app/starter-schema.ts +3 -0
- package/templates/starter/src/app/starter-verification-impact.json +15 -0
- package/templates/starter/src/app/test-evidence/browser-performance-contract.ts +387 -0
- package/templates/starter/src/app/test-evidence/browser-performance-measurement-contract.ts +258 -0
- package/templates/starter/src/app/test-evidence/browser-runtime-contract.ts +31 -2
- package/templates/starter/src/router.tsx +3 -0
- package/templates/starter/src/routes/index.tsx +3 -0
- package/templates/starter/tsconfig.json +7 -1
- package/templates/ui/components/composites/tabs.tsx +10 -0
- package/templates/ui/components/controls/actions/actions-control.tsx +17 -1
- package/templates/ui/components/controls/actions/index.ts +1 -0
- package/templates/ui/components/controls/boolean/boolean-controls.tsx +5 -0
- package/templates/ui/components/controls/file-drop/file-drop-control.test.tsx +96 -0
- package/templates/ui/components/controls/file-drop/file-drop-control.tsx +325 -104
- package/templates/ui/components/controls/file-drop/file-drop-empty-state.tsx +51 -17
- package/templates/ui/components/controls/file-drop/file-drop-file-list.tsx +85 -61
- package/templates/ui/components/controls/file-drop/file-drop-folder-input.tsx +39 -0
- package/templates/ui/components/controls/file-drop/file-drop-image-grid.tsx +64 -43
- package/templates/ui/components/controls/file-drop/file-drop-presentation-messages.tsx +57 -0
- package/templates/ui/components/controls/file-drop/file-drop-presentation.test.ts +58 -0
- package/templates/ui/components/controls/file-drop/{file-drop-model.tsx → file-drop-presentation.tsx} +128 -2
- package/templates/ui/components/controls/file-drop/file-drop-single-preview.tsx +32 -25
- package/templates/ui/components/controls/file-drop/file-drop-types.ts +99 -8
- package/templates/ui/components/controls/file-drop/index.ts +5 -1
- package/templates/ui/components/controls/font-picker/font-catalog.node-import.test.ts +24 -0
- package/templates/ui/components/controls/font-picker/font-catalog.ts +1 -1
- package/templates/ui/components/controls/index.ts +7 -0
- package/templates/ui/components/controls/tabs/index.ts +4 -0
- package/templates/ui/components/controls/tabs/tabs-control.tsx +166 -0
- package/templates/ui/components/panel/panel-section.tsx +6 -1
- package/templates/ui/components/panel/panel.tsx +6 -2
- package/templates/ui/components/primitives/index.ts +1 -0
- package/templates/ui/components/primitives/scroll-fade-render.tsx +11 -2
- package/templates/ui/components/primitives/scroll-fade-types.ts +2 -0
- package/templates/ui/components/primitives/scroll-fade.test.tsx +63 -0
- package/templates/ui/components/primitives/scroll-fade.tsx +2 -0
- package/templates/ui/index.ts +1 -0
- package/templates/runtime/react/controls-panel/layout/controls-panel-collapse-storage.ts +0 -131
- package/templates/runtime/testing/performance-browser-policy.test.ts +0 -81
- package/templates/runtime/testing/performance-browser-policy.ts +0 -102
- package/templates/runtime/testing/performance-budget-validation.ts +0 -84
- package/templates/runtime/testing/performance-control-classification.test.ts +0 -106
- package/templates/runtime/testing/performance-coverage-context.ts +0 -44
- package/templates/runtime/testing/performance-coverage-renderer-policy.ts +0 -221
- package/templates/runtime/testing/performance-coverage-scenario-policy.ts +0 -147
- package/templates/runtime/testing/performance-coverage-target-policy.ts +0 -121
- package/templates/runtime/testing/performance-export-coverage.test.ts +0 -234
- package/templates/runtime/testing/performance-fixture-load-profile.test.ts +0 -360
- package/templates/runtime/testing/performance-fixture-media.test.ts +0 -80
- package/templates/runtime/testing/performance-fixture-stress.test.ts +0 -314
- package/templates/runtime/testing/performance-fixture-validation.ts +0 -255
- package/templates/runtime/testing/performance-fixture-values.ts +0 -275
- package/templates/runtime/testing/performance-fixture-workload.test.ts +0 -140
- package/templates/runtime/testing/performance-load-profile-validation.ts +0 -467
- package/templates/runtime/testing/performance-renderer-coverage.test.ts +0 -325
- package/templates/runtime/testing/performance-renderer-pipeline-coverage.test.ts +0 -115
- package/templates/runtime/testing/performance-renderer-pipeline-interactions.test.ts +0 -201
- package/templates/runtime/testing/performance-renderer-pipeline-passes.test.ts +0 -247
- package/templates/runtime/testing/performance-renderer-technique.test.ts +0 -275
- package/templates/runtime/testing/performance-renderer-validation.ts +0 -2
- package/templates/runtime/testing/performance-scenario-coverage.test.ts +0 -303
- package/templates/runtime/testing/performance-schema-derived-workloads.test.ts +0 -231
- package/templates/runtime/testing/performance-test-fixtures/scenarios.ts +0 -172
- package/templates/runtime/testing/performance-test-fixtures/stress-fixtures.ts +0 -133
- package/templates/starter/e2e/performance-render-scale-helpers.ts +0 -55
- package/templates/starter/scripts/check-ai-skills.mjs +0 -136
- package/templates/starter/scripts/check-ai-skills.test.mjs +0 -64
- package/templates/starter/scripts/toolcraft-product-boundary-ast-utils.mjs +0 -23
- package/templates/starter/scripts/toolcraft-product-dependency-graph.mjs +0 -176
- package/templates/starter/scripts/toolcraft-product-dependency-graph.test.mjs +0 -196
- package/templates/starter/src/app/starter-acceptance.video-export-test-utils.ts +0 -37
- package/templates/starter/src/app/starter-performance.budgets.test.ts +0 -374
- package/templates/starter/src/app/starter-performance.renderer-source.test.ts +0 -136
- package/templates/starter/src/app/starter-performance.renderer-technique.test.ts +0 -291
- package/templates/starter/src/app/starter-performance.scenarios.test.ts +0 -355
|
@@ -0,0 +1,426 @@
|
|
|
1
|
+
import { expect } from "@playwright/test";
|
|
2
|
+
|
|
3
|
+
import { attachToolcraftBrowserRuntimeEvidence } from "./browser-runtime-evidence";
|
|
4
|
+
import {
|
|
5
|
+
createToolcraftSemanticTransitionOptions,
|
|
6
|
+
expectToolcraftExpectedOutcomeAfterAction,
|
|
7
|
+
type ToolcraftSemanticEvidenceOptions,
|
|
8
|
+
} from "./browser-acceptance-transition-helpers";
|
|
9
|
+
import {
|
|
10
|
+
assertToolcraftBrowserProofSession,
|
|
11
|
+
readToolcraftBrowserObservation,
|
|
12
|
+
runToolcraftBrowserAction,
|
|
13
|
+
type ToolcraftBrowserAction,
|
|
14
|
+
type ToolcraftBrowserObservation,
|
|
15
|
+
} from "./browser-proof-session";
|
|
16
|
+
import {
|
|
17
|
+
expectToolcraftPersistentExpectedOutcome,
|
|
18
|
+
expectToolcraftStableOutcomeBaseline,
|
|
19
|
+
snapshotToolcraftOutcome,
|
|
20
|
+
} from "./stable-outcome-helpers";
|
|
21
|
+
import {
|
|
22
|
+
validateToolcraftModelAppearanceObservation,
|
|
23
|
+
validateToolcraftModelOutputObservation,
|
|
24
|
+
type ToolcraftModelOutputObservation,
|
|
25
|
+
type ToolcraftModelPackageObservation,
|
|
26
|
+
type ToolcraftModelPresentationObservation,
|
|
27
|
+
type ToolcraftModelResourceDisposalObservation,
|
|
28
|
+
} from "./browser-model-appearance-evidence";
|
|
29
|
+
|
|
30
|
+
export type { ToolcraftModelOutputObservation } from "./browser-model-appearance-evidence";
|
|
31
|
+
|
|
32
|
+
export type ToolcraftModelIdentityObservation = {
|
|
33
|
+
assetId: string;
|
|
34
|
+
documentId: string;
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
export type ToolcraftModelRepairProgressObservation = {
|
|
38
|
+
completed: number;
|
|
39
|
+
phase: string;
|
|
40
|
+
total: number;
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
export type ToolcraftModelImportBrowserObservation = {
|
|
44
|
+
active: ToolcraftModelIdentityObservation | null;
|
|
45
|
+
advertisedFormats: readonly string[];
|
|
46
|
+
attemptFormat: string | null;
|
|
47
|
+
draft: ToolcraftModelIdentityObservation | null;
|
|
48
|
+
exportOutput: ToolcraftModelOutputObservation | null;
|
|
49
|
+
lifecycle:
|
|
50
|
+
| "empty"
|
|
51
|
+
| "staged"
|
|
52
|
+
| "committed"
|
|
53
|
+
| "repairable"
|
|
54
|
+
| "repairing"
|
|
55
|
+
| "verified"
|
|
56
|
+
| "rejected"
|
|
57
|
+
| "restored"
|
|
58
|
+
| "unavailable";
|
|
59
|
+
package: ToolcraftModelPackageObservation | null;
|
|
60
|
+
persistenceState: "none" | "available" | "restored" | "unavailable";
|
|
61
|
+
presentation: ToolcraftModelPresentationObservation | null;
|
|
62
|
+
previewOutput: ToolcraftModelOutputObservation | null;
|
|
63
|
+
rejection: { code: string; format: string } | null;
|
|
64
|
+
repair: {
|
|
65
|
+
available: boolean;
|
|
66
|
+
diagnosisSignature: string | null;
|
|
67
|
+
geometrySignature: string | null;
|
|
68
|
+
progress: ToolcraftModelRepairProgressObservation | null;
|
|
69
|
+
verification: "pending" | "passed" | null;
|
|
70
|
+
};
|
|
71
|
+
resources: ToolcraftModelResourceDisposalObservation;
|
|
72
|
+
unavailableReason: string | null;
|
|
73
|
+
};
|
|
74
|
+
|
|
75
|
+
export type ToolcraftModelImportEvidenceOptions = ToolcraftSemanticEvidenceOptions & {
|
|
76
|
+
target: string;
|
|
77
|
+
};
|
|
78
|
+
|
|
79
|
+
const evidenceTypeByCoverage = {
|
|
80
|
+
"advertised-format-import": "model-advertised-format-import",
|
|
81
|
+
"clean-commit": "model-clean-commit",
|
|
82
|
+
"export-output": "model-export-output",
|
|
83
|
+
"fatal-rejection": "model-fatal-rejection",
|
|
84
|
+
"history-reset": "model-history-reset",
|
|
85
|
+
"persistence-restore": "model-persistence-restore",
|
|
86
|
+
"preview-output": "model-preview-output",
|
|
87
|
+
"repair-action": "model-repair-action",
|
|
88
|
+
"repair-progress": "model-repair-progress",
|
|
89
|
+
"repairable-diagnosis": "model-repairable-diagnosis",
|
|
90
|
+
"resource-unavailable": "model-resource-unavailable",
|
|
91
|
+
"staged-preview": "model-staged-preview",
|
|
92
|
+
"verified-repair": "model-verified-repair",
|
|
93
|
+
} as const;
|
|
94
|
+
|
|
95
|
+
type ModelCoverage = keyof typeof evidenceTypeByCoverage;
|
|
96
|
+
type ModelObservation = ToolcraftBrowserObservation<ToolcraftModelImportBrowserObservation>;
|
|
97
|
+
|
|
98
|
+
function message(coverage: ModelCoverage, requirementId: string): string {
|
|
99
|
+
return `Model import ${coverage} "${requirementId}" must prove the observed lifecycle and product output before evidence is attached.`;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
function expectNonEmpty(value: string, description: string): void {
|
|
103
|
+
expect(value.trim(), description).not.toBe("");
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
function validateIdentity(identity: ToolcraftModelIdentityObservation, description: string): void {
|
|
107
|
+
expectNonEmpty(identity.assetId, `${description} must identify the model asset.`);
|
|
108
|
+
expectNonEmpty(identity.documentId, `${description} must identify the model document.`);
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
function validateProgress(
|
|
112
|
+
progress: ToolcraftModelRepairProgressObservation,
|
|
113
|
+
description: string,
|
|
114
|
+
): void {
|
|
115
|
+
expectNonEmpty(progress.phase, `${description} must name the repair phase.`);
|
|
116
|
+
expect(Number.isInteger(progress.completed)).toBe(true);
|
|
117
|
+
expect(Number.isInteger(progress.total)).toBe(true);
|
|
118
|
+
expect(progress.total, `${description} total work must be positive.`).toBeGreaterThan(0);
|
|
119
|
+
expect(progress.completed, `${description} completed work cannot be negative.`).toBeGreaterThanOrEqual(0);
|
|
120
|
+
expect(progress.completed, `${description} cannot exceed total work.`).toBeLessThanOrEqual(progress.total);
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
export function validateToolcraftModelImportObservation(
|
|
124
|
+
observation: ToolcraftModelImportBrowserObservation,
|
|
125
|
+
options: ToolcraftModelImportEvidenceOptions,
|
|
126
|
+
): void {
|
|
127
|
+
const description = `Model import evidence "${options.requirementId}"`;
|
|
128
|
+
expect(new Set(observation.advertisedFormats).size).toBe(observation.advertisedFormats.length);
|
|
129
|
+
for (const format of observation.advertisedFormats) expect(format).toMatch(/^[a-z0-9]+$/u);
|
|
130
|
+
if (observation.attemptFormat !== null) expect(observation.attemptFormat).toMatch(/^[a-z0-9]+$/u);
|
|
131
|
+
if (observation.active) validateIdentity(observation.active, `${description} active identity`);
|
|
132
|
+
if (observation.draft) validateIdentity(observation.draft, `${description} draft identity`);
|
|
133
|
+
if (observation.previewOutput) {
|
|
134
|
+
validateToolcraftModelOutputObservation(
|
|
135
|
+
observation.previewOutput,
|
|
136
|
+
`${description} preview`,
|
|
137
|
+
);
|
|
138
|
+
}
|
|
139
|
+
if (observation.exportOutput) {
|
|
140
|
+
validateToolcraftModelOutputObservation(
|
|
141
|
+
observation.exportOutput,
|
|
142
|
+
`${description} export`,
|
|
143
|
+
);
|
|
144
|
+
}
|
|
145
|
+
validateToolcraftModelAppearanceObservation(observation, description);
|
|
146
|
+
if (observation.repair.progress) validateProgress(observation.repair.progress, `${description} progress`);
|
|
147
|
+
if (observation.rejection) {
|
|
148
|
+
expectNonEmpty(observation.rejection.code, `${description} rejection must have a code.`);
|
|
149
|
+
expect(observation.rejection.format).toMatch(/^[a-z0-9]+$/u);
|
|
150
|
+
}
|
|
151
|
+
if (observation.unavailableReason !== null) {
|
|
152
|
+
expectNonEmpty(observation.unavailableReason, `${description} unavailable state needs a reason.`);
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
async function expectTransition(
|
|
157
|
+
observation: ModelObservation,
|
|
158
|
+
action: ToolcraftBrowserAction,
|
|
159
|
+
expected: ToolcraftModelImportBrowserObservation,
|
|
160
|
+
coverage: ModelCoverage,
|
|
161
|
+
options: ToolcraftModelImportEvidenceOptions,
|
|
162
|
+
) {
|
|
163
|
+
validateToolcraftModelImportObservation(expected, options);
|
|
164
|
+
const result = await expectToolcraftExpectedOutcomeAfterAction(
|
|
165
|
+
observation,
|
|
166
|
+
action,
|
|
167
|
+
expected,
|
|
168
|
+
createToolcraftSemanticTransitionOptions(message(coverage, options.requirementId), options),
|
|
169
|
+
);
|
|
170
|
+
validateToolcraftModelImportObservation(result.before, options);
|
|
171
|
+
return result;
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
async function attachCoverage(
|
|
175
|
+
coverage: ModelCoverage,
|
|
176
|
+
options: ToolcraftModelImportEvidenceOptions,
|
|
177
|
+
): Promise<void> {
|
|
178
|
+
await attachToolcraftBrowserRuntimeEvidence({
|
|
179
|
+
evidenceType: evidenceTypeByCoverage[coverage],
|
|
180
|
+
requirementId: `${options.requirementId}#${coverage}`,
|
|
181
|
+
target: options.target,
|
|
182
|
+
});
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
function expectOutputForIdentity(
|
|
186
|
+
output: ToolcraftModelOutputObservation | null,
|
|
187
|
+
identity: ToolcraftModelIdentityObservation | null,
|
|
188
|
+
opacity: number,
|
|
189
|
+
description: string,
|
|
190
|
+
): asserts output is ToolcraftModelOutputObservation {
|
|
191
|
+
expect(output, `${description} must expose rendered output.`).not.toBeNull();
|
|
192
|
+
expect(identity, `${description} must identify the rendered model.`).not.toBeNull();
|
|
193
|
+
expect(output!.documentId).toBe(identity!.documentId);
|
|
194
|
+
expect(output!.modelSignature).toBe(identity!.assetId);
|
|
195
|
+
expect(output!.opacity, `${description} must use the required opacity.`).toBeCloseTo(opacity, 6);
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
export async function expectToolcraftModelAdvertisedFormatImport(
|
|
199
|
+
observation: ModelObservation, action: ToolcraftBrowserAction,
|
|
200
|
+
expected: ToolcraftModelImportBrowserObservation, options: ToolcraftModelImportEvidenceOptions,
|
|
201
|
+
) {
|
|
202
|
+
const { after, before } = await expectTransition(observation, action, expected, "advertised-format-import", options);
|
|
203
|
+
expect(after.attemptFormat).not.toBeNull();
|
|
204
|
+
expect(after.advertisedFormats).toContain(after.attemptFormat);
|
|
205
|
+
expect(after.draft, "An admitted import must create a draft identity.").not.toBeNull();
|
|
206
|
+
expect(after.active, "Admission must preserve the committed model.").toEqual(before.active);
|
|
207
|
+
expect(after.lifecycle).toBe("staged");
|
|
208
|
+
await attachCoverage("advertised-format-import", options);
|
|
209
|
+
return after;
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
export async function expectToolcraftModelStagedPreview(
|
|
213
|
+
observation: ModelObservation, action: ToolcraftBrowserAction,
|
|
214
|
+
expected: ToolcraftModelImportBrowserObservation, options: ToolcraftModelImportEvidenceOptions,
|
|
215
|
+
) {
|
|
216
|
+
const { after, before } = await expectTransition(observation, action, expected, "staged-preview", options);
|
|
217
|
+
expect(after.lifecycle).toBe("staged");
|
|
218
|
+
expect(after.active).toEqual(before.active);
|
|
219
|
+
expectOutputForIdentity(after.previewOutput, after.draft, 0.4, "Staged preview");
|
|
220
|
+
await attachCoverage("staged-preview", options);
|
|
221
|
+
return after;
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
export async function expectToolcraftModelCleanCommit(
|
|
225
|
+
observation: ModelObservation, action: ToolcraftBrowserAction,
|
|
226
|
+
expected: ToolcraftModelImportBrowserObservation, options: ToolcraftModelImportEvidenceOptions,
|
|
227
|
+
) {
|
|
228
|
+
const { after, before } = await expectTransition(observation, action, expected, "clean-commit", options);
|
|
229
|
+
expect(before.draft, "Clean commit proof requires a staged draft.").not.toBeNull();
|
|
230
|
+
expect(after.lifecycle).toBe("committed");
|
|
231
|
+
expect(after.active).toEqual(before.draft);
|
|
232
|
+
expect(after.draft).toBeNull();
|
|
233
|
+
expect(after.repair.available).toBe(false);
|
|
234
|
+
expect(after.repair.progress).toBeNull();
|
|
235
|
+
expectOutputForIdentity(after.previewOutput, after.active, 1, "Committed preview");
|
|
236
|
+
await attachCoverage("clean-commit", options);
|
|
237
|
+
return after;
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
export async function expectToolcraftModelRepairableDiagnosis(
|
|
241
|
+
observation: ModelObservation, action: ToolcraftBrowserAction,
|
|
242
|
+
expected: ToolcraftModelImportBrowserObservation, options: ToolcraftModelImportEvidenceOptions,
|
|
243
|
+
) {
|
|
244
|
+
const { after, before } = await expectTransition(observation, action, expected, "repairable-diagnosis", options);
|
|
245
|
+
expect(after.lifecycle).toBe("repairable");
|
|
246
|
+
expect(after.active).toEqual(before.active);
|
|
247
|
+
expect(after.draft).not.toBeNull();
|
|
248
|
+
expect(after.repair.available).toBe(true);
|
|
249
|
+
expectNonEmpty(after.repair.diagnosisSignature ?? "", "Repairable diagnosis must identify issues.");
|
|
250
|
+
expectNonEmpty(after.repair.geometrySignature ?? "", "Repairable diagnosis must identify geometry.");
|
|
251
|
+
expect(after.repair.progress).toBeNull();
|
|
252
|
+
expectOutputForIdentity(after.previewOutput, after.draft, 0.4, "Repairable preview");
|
|
253
|
+
await attachCoverage("repairable-diagnosis", options);
|
|
254
|
+
return after;
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
export async function expectToolcraftModelRepairAction(
|
|
258
|
+
observation: ModelObservation, action: ToolcraftBrowserAction,
|
|
259
|
+
expected: ToolcraftModelImportBrowserObservation, options: ToolcraftModelImportEvidenceOptions,
|
|
260
|
+
) {
|
|
261
|
+
const { after, before } = await expectTransition(observation, action, expected, "repair-action", options);
|
|
262
|
+
expect(before.lifecycle).toBe("repairable");
|
|
263
|
+
expect(before.repair.available).toBe(true);
|
|
264
|
+
expect(after.lifecycle).toBe("repairing");
|
|
265
|
+
expect(after.active).toEqual(before.active);
|
|
266
|
+
expect(after.draft).toEqual(before.draft);
|
|
267
|
+
expect(after.repair.progress).not.toBeNull();
|
|
268
|
+
expectOutputForIdentity(after.previewOutput, after.draft, 0.4, "Repairing preview");
|
|
269
|
+
await attachCoverage("repair-action", options);
|
|
270
|
+
return after;
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
export async function expectToolcraftModelRepairProgress(
|
|
274
|
+
observation: ModelObservation, action: ToolcraftBrowserAction,
|
|
275
|
+
expected: ToolcraftModelImportBrowserObservation, options: ToolcraftModelImportEvidenceOptions,
|
|
276
|
+
) {
|
|
277
|
+
const { after, before } = await expectTransition(observation, action, expected, "repair-progress", options);
|
|
278
|
+
expect(before.lifecycle).toBe("repairing");
|
|
279
|
+
expect(after.lifecycle).toBe("repairing");
|
|
280
|
+
expect(after.active).toEqual(before.active);
|
|
281
|
+
expect(after.draft).toEqual(before.draft);
|
|
282
|
+
expect(before.repair.progress).not.toBeNull();
|
|
283
|
+
expect(after.repair.progress).not.toBeNull();
|
|
284
|
+
expect(after.repair.progress!.total).toBe(before.repair.progress!.total);
|
|
285
|
+
expect(after.repair.progress!.completed, "Repair requires forward progress.").toBeGreaterThan(before.repair.progress!.completed);
|
|
286
|
+
expectOutputForIdentity(after.previewOutput, after.draft, 0.4, "Repair progress preview");
|
|
287
|
+
await attachCoverage("repair-progress", options);
|
|
288
|
+
return after;
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
export async function expectToolcraftModelVerifiedRepair(
|
|
292
|
+
observation: ModelObservation, action: ToolcraftBrowserAction,
|
|
293
|
+
expected: ToolcraftModelImportBrowserObservation, options: ToolcraftModelImportEvidenceOptions,
|
|
294
|
+
) {
|
|
295
|
+
const { after, before } = await expectTransition(observation, action, expected, "verified-repair", options);
|
|
296
|
+
expect(before.lifecycle).toBe("repairing");
|
|
297
|
+
expect(before.draft, "Verified repair proof requires a draft.").not.toBeNull();
|
|
298
|
+
expect(after.lifecycle).toBe("verified");
|
|
299
|
+
expect(after.active).toEqual(before.draft);
|
|
300
|
+
expect(after.draft).toBeNull();
|
|
301
|
+
expect(after.repair.available).toBe(false);
|
|
302
|
+
expect(after.repair.progress).toBeNull();
|
|
303
|
+
expect(after.repair.verification).toBe("passed");
|
|
304
|
+
expectNonEmpty(after.repair.geometrySignature ?? "", "Verified repair must identify geometry.");
|
|
305
|
+
expect(after.repair.geometrySignature).not.toBe(before.repair.geometrySignature);
|
|
306
|
+
expectOutputForIdentity(after.previewOutput, after.active, 1, "Verified preview");
|
|
307
|
+
await attachCoverage("verified-repair", options);
|
|
308
|
+
return after;
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
export async function expectToolcraftModelFatalRejection(
|
|
312
|
+
observation: ModelObservation, action: ToolcraftBrowserAction,
|
|
313
|
+
expected: ToolcraftModelImportBrowserObservation, options: ToolcraftModelImportEvidenceOptions,
|
|
314
|
+
) {
|
|
315
|
+
const { after, before } = await expectTransition(observation, action, expected, "fatal-rejection", options);
|
|
316
|
+
expect(before.active, "Rejection proof requires a committed model.").not.toBeNull();
|
|
317
|
+
expect(after.lifecycle).toBe("rejected");
|
|
318
|
+
expect(after.active).toEqual(before.active);
|
|
319
|
+
expect(after.draft).toBeNull();
|
|
320
|
+
expect(after.previewOutput).toEqual(before.previewOutput);
|
|
321
|
+
expect(after.rejection).not.toBeNull();
|
|
322
|
+
expect(after.rejection!.format).toBe(after.attemptFormat);
|
|
323
|
+
await attachCoverage("fatal-rejection", options);
|
|
324
|
+
return after;
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
export async function expectToolcraftModelPersistenceRestore(
|
|
328
|
+
observation: ModelObservation, persistAction: ToolcraftBrowserAction,
|
|
329
|
+
reloadAction: ToolcraftBrowserAction<"reload">, expected: ToolcraftModelImportBrowserObservation,
|
|
330
|
+
options: ToolcraftModelImportEvidenceOptions,
|
|
331
|
+
) {
|
|
332
|
+
assertToolcraftBrowserProofSession(observation, persistAction, reloadAction);
|
|
333
|
+
validateToolcraftModelImportObservation(expected, options);
|
|
334
|
+
expect(expected.lifecycle).toBe("restored");
|
|
335
|
+
expect(expected.persistenceState).toBe("restored");
|
|
336
|
+
expect(expected.active).not.toBeNull();
|
|
337
|
+
expectOutputForIdentity(expected.previewOutput, expected.active, 1, "Restored preview");
|
|
338
|
+
const observe = () => readToolcraftBrowserObservation(observation);
|
|
339
|
+
const proofMessage = message("persistence-restore", options.requirementId);
|
|
340
|
+
const transitionOptions = createToolcraftSemanticTransitionOptions(proofMessage, options);
|
|
341
|
+
const before = snapshotToolcraftOutcome(await observe(), proofMessage);
|
|
342
|
+
expect(before).not.toEqual(expected);
|
|
343
|
+
await expectToolcraftStableOutcomeBaseline(observe, before, transitionOptions);
|
|
344
|
+
await runToolcraftBrowserAction(persistAction);
|
|
345
|
+
await expectToolcraftPersistentExpectedOutcome(observe, expected, transitionOptions);
|
|
346
|
+
await runToolcraftBrowserAction(reloadAction, "reload");
|
|
347
|
+
const restored = await expectToolcraftPersistentExpectedOutcome(observe, expected, transitionOptions);
|
|
348
|
+
validateToolcraftModelImportObservation(restored, options);
|
|
349
|
+
await attachCoverage("persistence-restore", options);
|
|
350
|
+
return restored;
|
|
351
|
+
}
|
|
352
|
+
|
|
353
|
+
export async function expectToolcraftModelResourceUnavailable(
|
|
354
|
+
observation: ModelObservation, action: ToolcraftBrowserAction,
|
|
355
|
+
expected: ToolcraftModelImportBrowserObservation, options: ToolcraftModelImportEvidenceOptions,
|
|
356
|
+
) {
|
|
357
|
+
const { after, before } = await expectTransition(observation, action, expected, "resource-unavailable", options);
|
|
358
|
+
expect(before.active).not.toBeNull();
|
|
359
|
+
expect(after.lifecycle).toBe("unavailable");
|
|
360
|
+
expect(after.persistenceState).toBe("unavailable");
|
|
361
|
+
expect(after.active).toEqual(before.active);
|
|
362
|
+
expect(after.previewOutput).toBeNull();
|
|
363
|
+
expectNonEmpty(after.unavailableReason ?? "", "Unavailable restore needs a typed reason.");
|
|
364
|
+
await attachCoverage("resource-unavailable", options);
|
|
365
|
+
return after;
|
|
366
|
+
}
|
|
367
|
+
|
|
368
|
+
export async function expectToolcraftModelPreviewOutput(
|
|
369
|
+
observation: ModelObservation, action: ToolcraftBrowserAction,
|
|
370
|
+
expected: ToolcraftModelImportBrowserObservation, options: ToolcraftModelImportEvidenceOptions,
|
|
371
|
+
) {
|
|
372
|
+
const { after, before } = await expectTransition(observation, action, expected, "preview-output", options);
|
|
373
|
+
expect(after.lifecycle === "committed" || after.lifecycle === "verified").toBe(true);
|
|
374
|
+
expect(after.active).toEqual(before.active);
|
|
375
|
+
expectOutputForIdentity(after.previewOutput, after.active, 1, "Model preview");
|
|
376
|
+
expect(before.previewOutput).not.toBeNull();
|
|
377
|
+
expect(after.previewOutput!.outputSignature).not.toBe(before.previewOutput!.outputSignature);
|
|
378
|
+
expect(after.previewOutput!.pixelSignature).not.toBe(before.previewOutput!.pixelSignature);
|
|
379
|
+
expect(after.previewOutput!.documentId).toBe(before.previewOutput!.documentId);
|
|
380
|
+
expect(after.previewOutput!.presentationCacheKey)
|
|
381
|
+
.toBe(before.previewOutput!.presentationCacheKey);
|
|
382
|
+
await attachCoverage("preview-output", options);
|
|
383
|
+
return after;
|
|
384
|
+
}
|
|
385
|
+
|
|
386
|
+
export async function expectToolcraftModelExportOutput(
|
|
387
|
+
observation: ModelObservation, action: ToolcraftBrowserAction,
|
|
388
|
+
expected: ToolcraftModelImportBrowserObservation, options: ToolcraftModelImportEvidenceOptions,
|
|
389
|
+
) {
|
|
390
|
+
const { after, before } = await expectTransition(observation, action, expected, "export-output", options);
|
|
391
|
+
expect(after.active).toEqual(before.active);
|
|
392
|
+
expect(after.previewOutput).toEqual(before.previewOutput);
|
|
393
|
+
expect(before.exportOutput).toBeNull();
|
|
394
|
+
expectOutputForIdentity(after.exportOutput, after.active, 1, "Model export");
|
|
395
|
+
expect(after.previewOutput).not.toBeNull();
|
|
396
|
+
expect(after.exportOutput!.modelSignature).toBe(after.previewOutput!.modelSignature);
|
|
397
|
+
expect(after.exportOutput!.documentId).toBe(after.previewOutput!.documentId);
|
|
398
|
+
expect(after.exportOutput!.presentationCacheKey)
|
|
399
|
+
.toBe(after.previewOutput!.presentationCacheKey);
|
|
400
|
+
expect(
|
|
401
|
+
after.exportOutput!.pixelSignature,
|
|
402
|
+
"Model export must preserve the current preview appearance and orientation pixels.",
|
|
403
|
+
).toBe(after.previewOutput!.pixelSignature);
|
|
404
|
+
await attachCoverage("export-output", options);
|
|
405
|
+
return after;
|
|
406
|
+
}
|
|
407
|
+
|
|
408
|
+
export async function expectToolcraftModelHistoryReset(
|
|
409
|
+
observation: ModelObservation, undoAction: ToolcraftBrowserAction,
|
|
410
|
+
redoAction: ToolcraftBrowserAction, resetAction: ToolcraftBrowserAction,
|
|
411
|
+
expectedBaseline: ToolcraftModelImportBrowserObservation,
|
|
412
|
+
expectedChanged: ToolcraftModelImportBrowserObservation,
|
|
413
|
+
options: ToolcraftModelImportEvidenceOptions,
|
|
414
|
+
): Promise<void> {
|
|
415
|
+
assertToolcraftBrowserProofSession(observation, undoAction, redoAction, resetAction);
|
|
416
|
+
validateToolcraftModelImportObservation(expectedBaseline, options);
|
|
417
|
+
validateToolcraftModelImportObservation(expectedChanged, options);
|
|
418
|
+
expect(expectedBaseline.active).not.toEqual(expectedChanged.active);
|
|
419
|
+
expect(expectedBaseline.previewOutput).not.toEqual(expectedChanged.previewOutput);
|
|
420
|
+
expect(await readToolcraftBrowserObservation(observation)).toEqual(expectedChanged);
|
|
421
|
+
const transitionOptions = createToolcraftSemanticTransitionOptions(message("history-reset", options.requirementId), options);
|
|
422
|
+
await expectToolcraftExpectedOutcomeAfterAction(observation, undoAction, expectedBaseline, transitionOptions);
|
|
423
|
+
await expectToolcraftExpectedOutcomeAfterAction(observation, redoAction, expectedChanged, transitionOptions);
|
|
424
|
+
await expectToolcraftExpectedOutcomeAfterAction(observation, resetAction, expectedBaseline, transitionOptions);
|
|
425
|
+
await attachCoverage("history-reset", options);
|
|
426
|
+
}
|
|
@@ -0,0 +1,256 @@
|
|
|
1
|
+
import { expect, type Locator, type Page } from "@playwright/test";
|
|
2
|
+
|
|
3
|
+
import {
|
|
4
|
+
type ToolcraftBrowserAction,
|
|
5
|
+
type ToolcraftBrowserProofSession,
|
|
6
|
+
} from "./browser-proof-session";
|
|
7
|
+
|
|
8
|
+
export type ToolcraftOrientationAxis =
|
|
9
|
+
| "+x"
|
|
10
|
+
| "-x"
|
|
11
|
+
| "+y"
|
|
12
|
+
| "-y"
|
|
13
|
+
| "+z"
|
|
14
|
+
| "-z";
|
|
15
|
+
|
|
16
|
+
type OrientationVector = readonly [number, number, number];
|
|
17
|
+
type OrientationPose = {
|
|
18
|
+
position: OrientationVector;
|
|
19
|
+
up: OrientationVector;
|
|
20
|
+
};
|
|
21
|
+
type PointerDelta = Readonly<{ x: number; y: number }>;
|
|
22
|
+
type BeforePointerRelease = () => Promise<void>;
|
|
23
|
+
|
|
24
|
+
const axisVectors: Record<ToolcraftOrientationAxis, OrientationVector> = {
|
|
25
|
+
"+x": [1, 0, 0],
|
|
26
|
+
"-x": [-1, 0, 0],
|
|
27
|
+
"+y": [0, 1, 0],
|
|
28
|
+
"-y": [0, -1, 0],
|
|
29
|
+
"+z": [0, 0, 1],
|
|
30
|
+
"-z": [0, 0, -1],
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
const modelOrbitSurfaceSelector =
|
|
34
|
+
'[data-canvas-model-layer][data-toolcraft-model-orbit-surface="true"]';
|
|
35
|
+
const gizmoCenter = 35;
|
|
36
|
+
const gizmoReach = 24.5;
|
|
37
|
+
const gizmoSize = 70;
|
|
38
|
+
|
|
39
|
+
function crossOrientationVectors(
|
|
40
|
+
left: OrientationVector,
|
|
41
|
+
right: OrientationVector,
|
|
42
|
+
): [number, number, number] {
|
|
43
|
+
return [
|
|
44
|
+
left[1] * right[2] - left[2] * right[1],
|
|
45
|
+
left[2] * right[0] - left[0] * right[2],
|
|
46
|
+
left[0] * right[1] - left[1] * right[0],
|
|
47
|
+
];
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
function dotOrientationVectors(
|
|
51
|
+
left: OrientationVector,
|
|
52
|
+
right: OrientationVector,
|
|
53
|
+
): number {
|
|
54
|
+
return left[0] * right[0] + left[1] * right[1] + left[2] * right[2];
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
function normalizeOrientationVector(
|
|
58
|
+
vector: OrientationVector,
|
|
59
|
+
): [number, number, number] {
|
|
60
|
+
const length = Math.hypot(...vector);
|
|
61
|
+
|
|
62
|
+
if (!Number.isFinite(length) || length <= 1e-6) {
|
|
63
|
+
throw new Error("Orientation gizmo action requires a non-degenerate pose.");
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
return [vector[0] / length, vector[1] / length, vector[2] / length];
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
function expectFiniteNonZeroDragDelta(
|
|
70
|
+
dragDelta: PointerDelta,
|
|
71
|
+
description: string,
|
|
72
|
+
): void {
|
|
73
|
+
expect(
|
|
74
|
+
Number.isFinite(dragDelta.x) && Number.isFinite(dragDelta.y),
|
|
75
|
+
`${description} requires a finite pointer delta.`,
|
|
76
|
+
).toBe(true);
|
|
77
|
+
expect(
|
|
78
|
+
Math.hypot(dragDelta.x, dragDelta.y),
|
|
79
|
+
`${description} requires non-zero pointer movement.`,
|
|
80
|
+
).toBeGreaterThan(0);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
async function getOrientationGizmo(
|
|
84
|
+
page: Page,
|
|
85
|
+
target: string,
|
|
86
|
+
): Promise<Locator> {
|
|
87
|
+
const gizmo = page.getByRole("application", {
|
|
88
|
+
name: "3D orientation gizmo",
|
|
89
|
+
});
|
|
90
|
+
await expect(
|
|
91
|
+
gizmo,
|
|
92
|
+
"Orientation proof requires exactly one visible runtime orientation gizmo.",
|
|
93
|
+
).toHaveCount(1);
|
|
94
|
+
await expect(gizmo).toBeVisible();
|
|
95
|
+
await expect(
|
|
96
|
+
gizmo,
|
|
97
|
+
"Orientation proof must act on the gizmo bound to the declared target.",
|
|
98
|
+
).toHaveAttribute("data-toolcraft-orientation-target", target);
|
|
99
|
+
return gizmo;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
async function findUnmarkedGizmoPoint(
|
|
103
|
+
page: Page,
|
|
104
|
+
gizmo: Locator,
|
|
105
|
+
bounds: Readonly<{ height: number; width: number; x: number; y: number }>,
|
|
106
|
+
): Promise<{ x: number; y: number }> {
|
|
107
|
+
for (let localY = 11; localY <= 59; localY += 4) {
|
|
108
|
+
for (let localX = 11; localX <= 59; localX += 4) {
|
|
109
|
+
if (Math.hypot(localX - gizmoCenter, localY - gizmoCenter) > 30) {
|
|
110
|
+
continue;
|
|
111
|
+
}
|
|
112
|
+
const point = {
|
|
113
|
+
x: bounds.x + (localX / gizmoSize) * bounds.width,
|
|
114
|
+
y: bounds.y + (localY / gizmoSize) * bounds.height,
|
|
115
|
+
};
|
|
116
|
+
await page.mouse.move(point.x, point.y);
|
|
117
|
+
await page.evaluate(
|
|
118
|
+
() =>
|
|
119
|
+
new Promise<void>((resolve) => {
|
|
120
|
+
window.requestAnimationFrame(() => resolve());
|
|
121
|
+
}),
|
|
122
|
+
);
|
|
123
|
+
if ((await gizmo.getAttribute("data-hovered-axis")) === "") {
|
|
124
|
+
return point;
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
throw new Error(
|
|
130
|
+
"Orientation gizmo drag proof could not find unmarked circular background.",
|
|
131
|
+
);
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
function projectOrientationAxis(
|
|
135
|
+
pose: OrientationPose,
|
|
136
|
+
axis: ToolcraftOrientationAxis,
|
|
137
|
+
bounds: Readonly<{ height: number; width: number; x: number; y: number }>,
|
|
138
|
+
): { x: number; y: number } {
|
|
139
|
+
const back = normalizeOrientationVector(pose.position);
|
|
140
|
+
const cameraRight = normalizeOrientationVector(
|
|
141
|
+
crossOrientationVectors(pose.up, back),
|
|
142
|
+
);
|
|
143
|
+
const cameraUp = normalizeOrientationVector(
|
|
144
|
+
crossOrientationVectors(back, cameraRight),
|
|
145
|
+
);
|
|
146
|
+
const vector = axisVectors[axis];
|
|
147
|
+
const localX =
|
|
148
|
+
gizmoCenter + dotOrientationVectors(vector, cameraRight) * gizmoReach;
|
|
149
|
+
const localY =
|
|
150
|
+
gizmoCenter - dotOrientationVectors(vector, cameraUp) * gizmoReach;
|
|
151
|
+
|
|
152
|
+
return {
|
|
153
|
+
x: bounds.x + (localX / gizmoSize) * bounds.width,
|
|
154
|
+
y: bounds.y + (localY / gizmoSize) * bounds.height,
|
|
155
|
+
};
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
export function getToolcraftOrientationAxisPosition(
|
|
159
|
+
axis: ToolcraftOrientationAxis,
|
|
160
|
+
radius: number,
|
|
161
|
+
): readonly number[] {
|
|
162
|
+
return axisVectors[axis].map((component) => component * radius);
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
export function createToolcraftOrientationGizmoDragAction(
|
|
166
|
+
session: ToolcraftBrowserProofSession,
|
|
167
|
+
target: string,
|
|
168
|
+
dragDelta: PointerDelta,
|
|
169
|
+
beforePointerRelease?: BeforePointerRelease,
|
|
170
|
+
): ToolcraftBrowserAction {
|
|
171
|
+
expectFiniteNonZeroDragDelta(dragDelta, "Orientation gizmo drag proof");
|
|
172
|
+
return session.action(async (page) => {
|
|
173
|
+
const gizmo = await getOrientationGizmo(page, target);
|
|
174
|
+
const bounds = await gizmo.boundingBox();
|
|
175
|
+
if (!bounds) {
|
|
176
|
+
throw new Error(
|
|
177
|
+
"Orientation gizmo drag proof could not measure the runtime gizmo.",
|
|
178
|
+
);
|
|
179
|
+
}
|
|
180
|
+
const start = await findUnmarkedGizmoPoint(page, gizmo, bounds);
|
|
181
|
+
await page.mouse.move(start.x, start.y);
|
|
182
|
+
await page.mouse.down();
|
|
183
|
+
try {
|
|
184
|
+
await page.mouse.move(start.x + dragDelta.x, start.y + dragDelta.y, {
|
|
185
|
+
steps: 8,
|
|
186
|
+
});
|
|
187
|
+
await beforePointerRelease?.();
|
|
188
|
+
} finally {
|
|
189
|
+
await page.mouse.up();
|
|
190
|
+
}
|
|
191
|
+
});
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
export function createToolcraftOrientationAxisSnapAction(
|
|
195
|
+
session: ToolcraftBrowserProofSession,
|
|
196
|
+
target: string,
|
|
197
|
+
axis: ToolcraftOrientationAxis,
|
|
198
|
+
): ToolcraftBrowserAction {
|
|
199
|
+
return session.action(async (page) => {
|
|
200
|
+
const gizmo = await getOrientationGizmo(page, target);
|
|
201
|
+
const bounds = await gizmo.boundingBox();
|
|
202
|
+
if (!bounds) {
|
|
203
|
+
throw new Error(
|
|
204
|
+
"Orientation axis snap proof could not measure the runtime gizmo.",
|
|
205
|
+
);
|
|
206
|
+
}
|
|
207
|
+
const poseValue = await gizmo.getAttribute(
|
|
208
|
+
"data-toolcraft-orientation-pose",
|
|
209
|
+
);
|
|
210
|
+
if (!poseValue) {
|
|
211
|
+
throw new Error(
|
|
212
|
+
"Orientation axis snap proof requires the gizmo's canonical runtime pose.",
|
|
213
|
+
);
|
|
214
|
+
}
|
|
215
|
+
const point = projectOrientationAxis(
|
|
216
|
+
JSON.parse(poseValue) as OrientationPose,
|
|
217
|
+
axis,
|
|
218
|
+
bounds,
|
|
219
|
+
);
|
|
220
|
+
await page.mouse.click(point.x, point.y);
|
|
221
|
+
});
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
export function createToolcraftModelOrbitAction(
|
|
225
|
+
session: ToolcraftBrowserProofSession,
|
|
226
|
+
dragDelta: PointerDelta,
|
|
227
|
+
): ToolcraftBrowserAction {
|
|
228
|
+
expectFiniteNonZeroDragDelta(dragDelta, "Direct model orbit proof");
|
|
229
|
+
return session.action(async (page) => {
|
|
230
|
+
const surface = page.locator(modelOrbitSurfaceSelector);
|
|
231
|
+
await expect(
|
|
232
|
+
surface,
|
|
233
|
+
"Direct model orbit proof requires exactly one visible runtime model orbit surface.",
|
|
234
|
+
).toHaveCount(1);
|
|
235
|
+
await expect(surface).toBeVisible();
|
|
236
|
+
const box = await surface.boundingBox();
|
|
237
|
+
if (!box) {
|
|
238
|
+
throw new Error(
|
|
239
|
+
"Direct model orbit proof could not measure the runtime model surface.",
|
|
240
|
+
);
|
|
241
|
+
}
|
|
242
|
+
const startX = box.x + box.width / 2;
|
|
243
|
+
const startY = box.y + box.height / 2;
|
|
244
|
+
await page.mouse.move(startX, startY);
|
|
245
|
+
await page.mouse.down();
|
|
246
|
+
try {
|
|
247
|
+
await page.mouse.move(
|
|
248
|
+
startX + dragDelta.x,
|
|
249
|
+
startY + dragDelta.y,
|
|
250
|
+
{ steps: 8 },
|
|
251
|
+
);
|
|
252
|
+
} finally {
|
|
253
|
+
await page.mouse.up();
|
|
254
|
+
}
|
|
255
|
+
});
|
|
256
|
+
}
|