@agent-native/creative-context 0.1.0
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/README.md +108 -0
- package/agent-native.package.json +104 -0
- package/dist/actions/confirm-canonical-logo.d.ts +6 -0
- package/dist/actions/confirm-canonical-logo.d.ts.map +1 -0
- package/dist/actions/confirm-canonical-logo.js +19 -0
- package/dist/actions/confirm-canonical-logo.js.map +1 -0
- package/dist/actions/continue-context-import.d.ts +7 -0
- package/dist/actions/continue-context-import.d.ts.map +1 -0
- package/dist/actions/continue-context-import.js +10 -0
- package/dist/actions/continue-context-import.js.map +1 -0
- package/dist/actions/creative-context-a2a.d.ts +10 -0
- package/dist/actions/creative-context-a2a.d.ts.map +1 -0
- package/dist/actions/creative-context-a2a.js +66 -0
- package/dist/actions/creative-context-a2a.js.map +1 -0
- package/dist/actions/get-brand-profile.d.ts +33 -0
- package/dist/actions/get-brand-profile.d.ts.map +1 -0
- package/dist/actions/get-brand-profile.js +13 -0
- package/dist/actions/get-brand-profile.js.map +1 -0
- package/dist/actions/get-context-import-status.d.ts +22 -0
- package/dist/actions/get-context-import-status.d.ts.map +1 -0
- package/dist/actions/get-context-import-status.js +12 -0
- package/dist/actions/get-context-import-status.js.map +1 -0
- package/dist/actions/get-context-item.d.ts +2 -0
- package/dist/actions/get-context-item.d.ts.map +1 -0
- package/dist/actions/get-context-item.js +2 -0
- package/dist/actions/get-context-item.js.map +1 -0
- package/dist/actions/get-context-pack.d.ts +7 -0
- package/dist/actions/get-context-pack.d.ts.map +1 -0
- package/dist/actions/get-context-pack.js +12 -0
- package/dist/actions/get-context-pack.js.map +1 -0
- package/dist/actions/get-creative-context.d.ts +119 -0
- package/dist/actions/get-creative-context.d.ts.map +1 -0
- package/dist/actions/get-creative-context.js +112 -0
- package/dist/actions/get-creative-context.js.map +1 -0
- package/dist/actions/index.d.ts +3 -0
- package/dist/actions/index.d.ts.map +1 -0
- package/dist/actions/index.js +63 -0
- package/dist/actions/index.js.map +1 -0
- package/dist/actions/infer-brand-dna.d.ts +52 -0
- package/dist/actions/infer-brand-dna.d.ts.map +1 -0
- package/dist/actions/infer-brand-dna.js +13 -0
- package/dist/actions/infer-brand-dna.js.map +1 -0
- package/dist/actions/list-canonical-logo-candidates.d.ts +9 -0
- package/dist/actions/list-canonical-logo-candidates.d.ts.map +1 -0
- package/dist/actions/list-canonical-logo-candidates.js +82 -0
- package/dist/actions/list-canonical-logo-candidates.js.map +1 -0
- package/dist/actions/list-context-connections.d.ts +22 -0
- package/dist/actions/list-context-connections.d.ts.map +1 -0
- package/dist/actions/list-context-connections.js +43 -0
- package/dist/actions/list-context-connections.js.map +1 -0
- package/dist/actions/list-context-packs.d.ts +10 -0
- package/dist/actions/list-context-packs.d.ts.map +1 -0
- package/dist/actions/list-context-packs.js +16 -0
- package/dist/actions/list-context-packs.js.map +1 -0
- package/dist/actions/list-context-sources.d.ts +12 -0
- package/dist/actions/list-context-sources.d.ts.map +1 -0
- package/dist/actions/list-context-sources.js +20 -0
- package/dist/actions/list-context-sources.js.map +1 -0
- package/dist/actions/list-context-suggestions.d.ts +13 -0
- package/dist/actions/list-context-suggestions.d.ts.map +1 -0
- package/dist/actions/list-context-suggestions.js +28 -0
- package/dist/actions/list-context-suggestions.js.map +1 -0
- package/dist/actions/manage-brand-profile.d.ts +28 -0
- package/dist/actions/manage-brand-profile.d.ts.map +1 -0
- package/dist/actions/manage-brand-profile.js +47 -0
- package/dist/actions/manage-brand-profile.js.map +1 -0
- package/dist/actions/manage-context-pack.d.ts +33 -0
- package/dist/actions/manage-context-pack.d.ts.map +1 -0
- package/dist/actions/manage-context-pack.js +65 -0
- package/dist/actions/manage-context-pack.js.map +1 -0
- package/dist/actions/manage-context-source.d.ts +51 -0
- package/dist/actions/manage-context-source.d.ts.map +1 -0
- package/dist/actions/manage-context-source.js +137 -0
- package/dist/actions/manage-context-source.js.map +1 -0
- package/dist/actions/manage-layout-template.d.ts +13 -0
- package/dist/actions/manage-layout-template.d.ts.map +1 -0
- package/dist/actions/manage-layout-template.js +43 -0
- package/dist/actions/manage-layout-template.js.map +1 -0
- package/dist/actions/preview-context-import.d.ts +23 -0
- package/dist/actions/preview-context-import.d.ts.map +1 -0
- package/dist/actions/preview-context-import.js +57 -0
- package/dist/actions/preview-context-import.js.map +1 -0
- package/dist/actions/process-context-purge.d.ts +22 -0
- package/dist/actions/process-context-purge.d.ts.map +1 -0
- package/dist/actions/process-context-purge.js +19 -0
- package/dist/actions/process-context-purge.js.map +1 -0
- package/dist/actions/propose-brand-dna.d.ts +15 -0
- package/dist/actions/propose-brand-dna.d.ts.map +1 -0
- package/dist/actions/propose-brand-dna.js +19 -0
- package/dist/actions/propose-brand-dna.js.map +1 -0
- package/dist/actions/propose-canonical-logo.d.ts +9 -0
- package/dist/actions/propose-canonical-logo.d.ts.map +1 -0
- package/dist/actions/propose-canonical-logo.js +16 -0
- package/dist/actions/propose-canonical-logo.js.map +1 -0
- package/dist/actions/publish-brand-dna.d.ts +13 -0
- package/dist/actions/publish-brand-dna.d.ts.map +1 -0
- package/dist/actions/publish-brand-dna.js +23 -0
- package/dist/actions/publish-brand-dna.js.map +1 -0
- package/dist/actions/recommend-context-roots.d.ts +14 -0
- package/dist/actions/recommend-context-roots.d.ts.map +1 -0
- package/dist/actions/recommend-context-roots.js +22 -0
- package/dist/actions/recommend-context-roots.js.map +1 -0
- package/dist/actions/record-context-feedback.d.ts +10 -0
- package/dist/actions/record-context-feedback.d.ts.map +1 -0
- package/dist/actions/record-context-feedback.js +14 -0
- package/dist/actions/record-context-feedback.js.map +1 -0
- package/dist/actions/review-context-items.d.ts +35 -0
- package/dist/actions/review-context-items.d.ts.map +1 -0
- package/dist/actions/review-context-items.js +65 -0
- package/dist/actions/review-context-items.js.map +1 -0
- package/dist/actions/run-embedding-bakeoff.d.ts +15 -0
- package/dist/actions/run-embedding-bakeoff.d.ts.map +1 -0
- package/dist/actions/run-embedding-bakeoff.js +72 -0
- package/dist/actions/run-embedding-bakeoff.js.map +1 -0
- package/dist/actions/search-creative-context.d.ts +75 -0
- package/dist/actions/search-creative-context.d.ts.map +1 -0
- package/dist/actions/search-creative-context.js +41 -0
- package/dist/actions/search-creative-context.js.map +1 -0
- package/dist/actions/set-brand-dna.d.ts +15 -0
- package/dist/actions/set-brand-dna.d.ts.map +1 -0
- package/dist/actions/set-brand-dna.js +19 -0
- package/dist/actions/set-brand-dna.js.map +1 -0
- package/dist/actions/start-context-enrichment.d.ts +10 -0
- package/dist/actions/start-context-enrichment.d.ts.map +1 -0
- package/dist/actions/start-context-enrichment.js +46 -0
- package/dist/actions/start-context-enrichment.js.map +1 -0
- package/dist/actions/start-context-import.d.ts +9 -0
- package/dist/actions/start-context-import.d.ts.map +1 -0
- package/dist/actions/start-context-import.js +36 -0
- package/dist/actions/start-context-import.js.map +1 -0
- package/dist/client/CreativeContextChip.d.ts +13 -0
- package/dist/client/CreativeContextChip.d.ts.map +1 -0
- package/dist/client/CreativeContextChip.js +45 -0
- package/dist/client/CreativeContextChip.js.map +1 -0
- package/dist/client/CreativeContextPanel.d.ts +131 -0
- package/dist/client/CreativeContextPanel.d.ts.map +1 -0
- package/dist/client/CreativeContextPanel.js +778 -0
- package/dist/client/CreativeContextPanel.js.map +1 -0
- package/dist/client/CreativeContextSettingsLink.d.ts +4 -0
- package/dist/client/CreativeContextSettingsLink.d.ts.map +1 -0
- package/dist/client/CreativeContextSettingsLink.js +8 -0
- package/dist/client/CreativeContextSettingsLink.js.map +1 -0
- package/dist/client/actions.d.ts +256 -0
- package/dist/client/actions.d.ts.map +1 -0
- package/dist/client/actions.js +89 -0
- package/dist/client/actions.js.map +1 -0
- package/dist/client/agent-tab.d.ts +9 -0
- package/dist/client/agent-tab.d.ts.map +1 -0
- package/dist/client/agent-tab.js +32 -0
- package/dist/client/agent-tab.js.map +1 -0
- package/dist/client/application-state.d.ts +22 -0
- package/dist/client/application-state.d.ts.map +1 -0
- package/dist/client/application-state.js +88 -0
- package/dist/client/application-state.js.map +1 -0
- package/dist/client/index.d.ts +8 -0
- package/dist/client/index.d.ts.map +1 -0
- package/dist/client/index.js +8 -0
- package/dist/client/index.js.map +1 -0
- package/dist/client/messages.d.ts +5 -0
- package/dist/client/messages.d.ts.map +1 -0
- package/dist/client/messages.js +1059 -0
- package/dist/client/messages.js.map +1 -0
- package/dist/connectors/context.d.ts +9 -0
- package/dist/connectors/context.d.ts.map +1 -0
- package/dist/connectors/context.js +59 -0
- package/dist/connectors/context.js.map +1 -0
- package/dist/connectors/document-parser.d.ts +2 -0
- package/dist/connectors/document-parser.d.ts.map +1 -0
- package/dist/connectors/document-parser.js +2 -0
- package/dist/connectors/document-parser.js.map +1 -0
- package/dist/connectors/figma-native.d.ts +18 -0
- package/dist/connectors/figma-native.d.ts.map +1 -0
- package/dist/connectors/figma-native.js +883 -0
- package/dist/connectors/figma-native.js.map +1 -0
- package/dist/connectors/figma.d.ts +10 -0
- package/dist/connectors/figma.d.ts.map +1 -0
- package/dist/connectors/figma.js +166 -0
- package/dist/connectors/figma.js.map +1 -0
- package/dist/connectors/google-slides-native.d.ts +58 -0
- package/dist/connectors/google-slides-native.d.ts.map +1 -0
- package/dist/connectors/google-slides-native.js +1118 -0
- package/dist/connectors/google-slides-native.js.map +1 -0
- package/dist/connectors/google-slides.d.ts +15 -0
- package/dist/connectors/google-slides.d.ts.map +1 -0
- package/dist/connectors/google-slides.js +896 -0
- package/dist/connectors/google-slides.js.map +1 -0
- package/dist/connectors/index.d.ts +20 -0
- package/dist/connectors/index.d.ts.map +1 -0
- package/dist/connectors/index.js +44 -0
- package/dist/connectors/index.js.map +1 -0
- package/dist/connectors/manual.d.ts +9 -0
- package/dist/connectors/manual.d.ts.map +1 -0
- package/dist/connectors/manual.js +91 -0
- package/dist/connectors/manual.js.map +1 -0
- package/dist/connectors/normalize.d.ts +35 -0
- package/dist/connectors/normalize.d.ts.map +1 -0
- package/dist/connectors/normalize.js +216 -0
- package/dist/connectors/normalize.js.map +1 -0
- package/dist/connectors/notion.d.ts +10 -0
- package/dist/connectors/notion.d.ts.map +1 -0
- package/dist/connectors/notion.js +393 -0
- package/dist/connectors/notion.js.map +1 -0
- package/dist/connectors/private-artifacts.d.ts +39 -0
- package/dist/connectors/private-artifacts.d.ts.map +1 -0
- package/dist/connectors/private-artifacts.js +175 -0
- package/dist/connectors/private-artifacts.js.map +1 -0
- package/dist/connectors/provider-response.d.ts +20 -0
- package/dist/connectors/provider-response.d.ts.map +1 -0
- package/dist/connectors/provider-response.js +98 -0
- package/dist/connectors/provider-response.js.map +1 -0
- package/dist/connectors/recommendations.d.ts +25 -0
- package/dist/connectors/recommendations.d.ts.map +1 -0
- package/dist/connectors/recommendations.js +172 -0
- package/dist/connectors/recommendations.js.map +1 -0
- package/dist/connectors/registry.d.ts +10 -0
- package/dist/connectors/registry.d.ts.map +1 -0
- package/dist/connectors/registry.js +34 -0
- package/dist/connectors/registry.js.map +1 -0
- package/dist/connectors/rendered-page.d.ts +101 -0
- package/dist/connectors/rendered-page.d.ts.map +1 -0
- package/dist/connectors/rendered-page.js +504 -0
- package/dist/connectors/rendered-page.js.map +1 -0
- package/dist/connectors/smart-defaults.d.ts +9 -0
- package/dist/connectors/smart-defaults.d.ts.map +1 -0
- package/dist/connectors/smart-defaults.js +72 -0
- package/dist/connectors/smart-defaults.js.map +1 -0
- package/dist/connectors/types.d.ts +79 -0
- package/dist/connectors/types.d.ts.map +1 -0
- package/dist/connectors/types.js +2 -0
- package/dist/connectors/types.js.map +1 -0
- package/dist/connectors/upload.d.ts +9 -0
- package/dist/connectors/upload.d.ts.map +1 -0
- package/dist/connectors/upload.js +440 -0
- package/dist/connectors/upload.js.map +1 -0
- package/dist/connectors/website.d.ts +20 -0
- package/dist/connectors/website.d.ts.map +1 -0
- package/dist/connectors/website.js +616 -0
- package/dist/connectors/website.js.map +1 -0
- package/dist/embeddings/index.d.ts +3 -0
- package/dist/embeddings/index.d.ts.map +1 -0
- package/dist/embeddings/index.js +3 -0
- package/dist/embeddings/index.js.map +1 -0
- package/dist/embeddings/providers.d.ts +7 -0
- package/dist/embeddings/providers.d.ts.map +1 -0
- package/dist/embeddings/providers.js +176 -0
- package/dist/embeddings/providers.js.map +1 -0
- package/dist/embeddings/types.d.ts +19 -0
- package/dist/embeddings/types.d.ts.map +1 -0
- package/dist/embeddings/types.js +2 -0
- package/dist/embeddings/types.js.map +1 -0
- package/dist/eval/acceptance-fixtures.d.ts +3 -0
- package/dist/eval/acceptance-fixtures.d.ts.map +1 -0
- package/dist/eval/acceptance-fixtures.js +84 -0
- package/dist/eval/acceptance-fixtures.js.map +1 -0
- package/dist/eval/acceptance.d.ts +114 -0
- package/dist/eval/acceptance.d.ts.map +1 -0
- package/dist/eval/acceptance.js +260 -0
- package/dist/eval/acceptance.js.map +1 -0
- package/dist/eval/fixtures.d.ts +16 -0
- package/dist/eval/fixtures.d.ts.map +1 -0
- package/dist/eval/fixtures.js +119 -0
- package/dist/eval/fixtures.js.map +1 -0
- package/dist/eval/index.d.ts +63 -0
- package/dist/eval/index.d.ts.map +1 -0
- package/dist/eval/index.js +174 -0
- package/dist/eval/index.js.map +1 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +5 -0
- package/dist/index.js.map +1 -0
- package/dist/jobs/background-worker.d.ts +31 -0
- package/dist/jobs/background-worker.d.ts.map +1 -0
- package/dist/jobs/background-worker.js +315 -0
- package/dist/jobs/background-worker.js.map +1 -0
- package/dist/jobs/import-runner.d.ts +3 -0
- package/dist/jobs/import-runner.d.ts.map +1 -0
- package/dist/jobs/import-runner.js +613 -0
- package/dist/jobs/import-runner.js.map +1 -0
- package/dist/jobs/index.d.ts +9 -0
- package/dist/jobs/index.d.ts.map +1 -0
- package/dist/jobs/index.js +8 -0
- package/dist/jobs/index.js.map +1 -0
- package/dist/jobs/progress.d.ts +3 -0
- package/dist/jobs/progress.d.ts.map +1 -0
- package/dist/jobs/progress.js +30 -0
- package/dist/jobs/progress.js.map +1 -0
- package/dist/jobs/rebuild.d.ts +13 -0
- package/dist/jobs/rebuild.d.ts.map +1 -0
- package/dist/jobs/rebuild.js +178 -0
- package/dist/jobs/rebuild.js.map +1 -0
- package/dist/jobs/server-worker.d.ts +16 -0
- package/dist/jobs/server-worker.d.ts.map +1 -0
- package/dist/jobs/server-worker.js +252 -0
- package/dist/jobs/server-worker.js.map +1 -0
- package/dist/jobs/store-adapter.d.ts +3 -0
- package/dist/jobs/store-adapter.d.ts.map +1 -0
- package/dist/jobs/store-adapter.js +37 -0
- package/dist/jobs/store-adapter.js.map +1 -0
- package/dist/jobs/types.d.ts +138 -0
- package/dist/jobs/types.d.ts.map +1 -0
- package/dist/jobs/types.js +2 -0
- package/dist/jobs/types.js.map +1 -0
- package/dist/jobs/worker.d.ts +27 -0
- package/dist/jobs/worker.d.ts.map +1 -0
- package/dist/jobs/worker.js +90 -0
- package/dist/jobs/worker.js.map +1 -0
- package/dist/media-url.d.ts +7 -0
- package/dist/media-url.d.ts.map +1 -0
- package/dist/media-url.js +15 -0
- package/dist/media-url.js.map +1 -0
- package/dist/native-artifact-reassembly.d.ts +25 -0
- package/dist/native-artifact-reassembly.d.ts.map +1 -0
- package/dist/native-artifact-reassembly.js +262 -0
- package/dist/native-artifact-reassembly.js.map +1 -0
- package/dist/native-artifact.d.ts +88 -0
- package/dist/native-artifact.d.ts.map +1 -0
- package/dist/native-artifact.js +86 -0
- package/dist/native-artifact.js.map +1 -0
- package/dist/schema/index.d.ts +5519 -0
- package/dist/schema/index.d.ts.map +1 -0
- package/dist/schema/index.js +374 -0
- package/dist/schema/index.js.map +1 -0
- package/dist/schema/migrations.d.ts +10 -0
- package/dist/schema/migrations.d.ts.map +1 -0
- package/dist/schema/migrations.js +253 -0
- package/dist/schema/migrations.js.map +1 -0
- package/dist/search/fusion.d.ts +15 -0
- package/dist/search/fusion.d.ts.map +1 -0
- package/dist/search/fusion.js +25 -0
- package/dist/search/fusion.js.map +1 -0
- package/dist/search/mode.d.ts +4 -0
- package/dist/search/mode.d.ts.map +1 -0
- package/dist/search/mode.js +13 -0
- package/dist/search/mode.js.map +1 -0
- package/dist/search/postgres-fts.d.ts +22 -0
- package/dist/search/postgres-fts.d.ts.map +1 -0
- package/dist/search/postgres-fts.js +83 -0
- package/dist/search/postgres-fts.js.map +1 -0
- package/dist/server/brand-context.d.ts +15 -0
- package/dist/server/brand-context.d.ts.map +1 -0
- package/dist/server/brand-context.js +149 -0
- package/dist/server/brand-context.js.map +1 -0
- package/dist/server/context.d.ts +77 -0
- package/dist/server/context.d.ts.map +1 -0
- package/dist/server/context.js +63 -0
- package/dist/server/context.js.map +1 -0
- package/dist/server/enrichment.d.ts +23 -0
- package/dist/server/enrichment.d.ts.map +1 -0
- package/dist/server/enrichment.js +136 -0
- package/dist/server/enrichment.js.map +1 -0
- package/dist/server/generation-artifact-access.d.ts +21 -0
- package/dist/server/generation-artifact-access.d.ts.map +1 -0
- package/dist/server/generation-artifact-access.js +111 -0
- package/dist/server/generation-artifact-access.js.map +1 -0
- package/dist/server/generation-context.d.ts +204 -0
- package/dist/server/generation-context.d.ts.map +1 -0
- package/dist/server/generation-context.js +310 -0
- package/dist/server/generation-context.js.map +1 -0
- package/dist/server/index.d.ts +22 -0
- package/dist/server/index.d.ts.map +1 -0
- package/dist/server/index.js +96 -0
- package/dist/server/index.js.map +1 -0
- package/dist/server/isolated-a2a.d.ts +172 -0
- package/dist/server/isolated-a2a.d.ts.map +1 -0
- package/dist/server/isolated-a2a.js +310 -0
- package/dist/server/isolated-a2a.js.map +1 -0
- package/dist/server/media.d.ts +15 -0
- package/dist/server/media.d.ts.map +1 -0
- package/dist/server/media.js +93 -0
- package/dist/server/media.js.map +1 -0
- package/dist/server/prompt-provider.d.ts +5 -0
- package/dist/server/prompt-provider.d.ts.map +1 -0
- package/dist/server/prompt-provider.js +59 -0
- package/dist/server/prompt-provider.js.map +1 -0
- package/dist/server/public-serialization.d.ts +160 -0
- package/dist/server/public-serialization.d.ts.map +1 -0
- package/dist/server/public-serialization.js +108 -0
- package/dist/server/public-serialization.js.map +1 -0
- package/dist/server/resource-paths.d.ts +3 -0
- package/dist/server/resource-paths.d.ts.map +1 -0
- package/dist/server/resource-paths.js +5 -0
- package/dist/server/resource-paths.js.map +1 -0
- package/dist/server/retrieval.d.ts +78 -0
- package/dist/server/retrieval.d.ts.map +1 -0
- package/dist/server/retrieval.js +443 -0
- package/dist/server/retrieval.js.map +1 -0
- package/dist/server/untrusted-reference.d.ts +8 -0
- package/dist/server/untrusted-reference.d.ts.map +1 -0
- package/dist/server/untrusted-reference.js +19 -0
- package/dist/server/untrusted-reference.js.map +1 -0
- package/dist/store/brand.d.ts +47 -0
- package/dist/store/brand.d.ts.map +1 -0
- package/dist/store/brand.js +360 -0
- package/dist/store/brand.js.map +1 -0
- package/dist/store/content.d.ts +120 -0
- package/dist/store/content.d.ts.map +1 -0
- package/dist/store/content.js +1437 -0
- package/dist/store/content.js.map +1 -0
- package/dist/store/generation.d.ts +28 -0
- package/dist/store/generation.d.ts.map +1 -0
- package/dist/store/generation.js +140 -0
- package/dist/store/generation.js.map +1 -0
- package/dist/store/helpers.d.ts +12 -0
- package/dist/store/helpers.d.ts.map +1 -0
- package/dist/store/helpers.js +41 -0
- package/dist/store/helpers.js.map +1 -0
- package/dist/store/index.d.ts +10 -0
- package/dist/store/index.d.ts.map +1 -0
- package/dist/store/index.js +10 -0
- package/dist/store/index.js.map +1 -0
- package/dist/store/inference.d.ts +57 -0
- package/dist/store/inference.d.ts.map +1 -0
- package/dist/store/inference.js +279 -0
- package/dist/store/inference.js.map +1 -0
- package/dist/store/jobs.d.ts +80 -0
- package/dist/store/jobs.d.ts.map +1 -0
- package/dist/store/jobs.js +428 -0
- package/dist/store/jobs.js.map +1 -0
- package/dist/store/packs.d.ts +33 -0
- package/dist/store/packs.d.ts.map +1 -0
- package/dist/store/packs.js +321 -0
- package/dist/store/packs.js.map +1 -0
- package/dist/store/purge.d.ts +16 -0
- package/dist/store/purge.d.ts.map +1 -0
- package/dist/store/purge.js +256 -0
- package/dist/store/purge.js.map +1 -0
- package/dist/store/sources.d.ts +76 -0
- package/dist/store/sources.d.ts.map +1 -0
- package/dist/store/sources.js +538 -0
- package/dist/store/sources.js.map +1 -0
- package/dist/store/suggestions.d.ts +28 -0
- package/dist/store/suggestions.d.ts.map +1 -0
- package/dist/store/suggestions.js +250 -0
- package/dist/store/suggestions.js.map +1 -0
- package/dist/types.d.ts +493 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +2 -0
- package/dist/types.js.map +1 -0
- package/dist/vector/index.d.ts +2 -0
- package/dist/vector/index.d.ts.map +1 -0
- package/dist/vector/index.js +2 -0
- package/dist/vector/index.js.map +1 -0
- package/dist/vector/pgvector.d.ts +28 -0
- package/dist/vector/pgvector.d.ts.map +1 -0
- package/dist/vector/pgvector.js +117 -0
- package/dist/vector/pgvector.js.map +1 -0
- package/docs/evaluation.md +92 -0
- package/docs/llms-full.txt +168 -0
- package/docs/llms.txt +76 -0
- package/docs/skills/creative-context/SKILL.md +74 -0
- package/package.json +91 -0
- package/src/actions/agent-input-schemas.spec.ts +46 -0
- package/src/actions/confirm-canonical-logo.ts +20 -0
- package/src/actions/continue-context-import.ts +12 -0
- package/src/actions/creative-context-a2a.spec.ts +64 -0
- package/src/actions/creative-context-a2a.ts +88 -0
- package/src/actions/get-brand-profile.ts +16 -0
- package/src/actions/get-context-import-status.ts +13 -0
- package/src/actions/get-context-item.ts +1 -0
- package/src/actions/get-context-pack.ts +14 -0
- package/src/actions/get-creative-context.spec.ts +315 -0
- package/src/actions/get-creative-context.ts +148 -0
- package/src/actions/index.ts +65 -0
- package/src/actions/infer-brand-dna.ts +15 -0
- package/src/actions/list-canonical-logo-candidates.ts +121 -0
- package/src/actions/list-context-connections.spec.ts +23 -0
- package/src/actions/list-context-connections.ts +51 -0
- package/src/actions/list-context-packs.ts +17 -0
- package/src/actions/list-context-sources.ts +21 -0
- package/src/actions/list-context-suggestions.ts +30 -0
- package/src/actions/manage-brand-profile.ts +58 -0
- package/src/actions/manage-context-pack.ts +75 -0
- package/src/actions/manage-context-source.ts +154 -0
- package/src/actions/manage-layout-template.ts +51 -0
- package/src/actions/preview-context-import.spec.ts +64 -0
- package/src/actions/preview-context-import.ts +61 -0
- package/src/actions/process-context-purge.ts +25 -0
- package/src/actions/propose-brand-dna.ts +22 -0
- package/src/actions/propose-canonical-logo.ts +19 -0
- package/src/actions/publish-brand-dna.ts +25 -0
- package/src/actions/recommend-context-roots.ts +24 -0
- package/src/actions/record-context-feedback.ts +16 -0
- package/src/actions/review-context-items.ts +69 -0
- package/src/actions/run-embedding-bakeoff.ts +90 -0
- package/src/actions/search-creative-context.ts +47 -0
- package/src/actions/set-brand-dna.ts +22 -0
- package/src/actions/start-context-enrichment.ts +50 -0
- package/src/actions/start-context-import.ts +37 -0
- package/src/client/CreativeContextChip.tsx +162 -0
- package/src/client/CreativeContextPanel.tsx +2442 -0
- package/src/client/CreativeContextSettingsLink.tsx +30 -0
- package/src/client/actions.ts +438 -0
- package/src/client/agent-tab.tsx +58 -0
- package/src/client/application-state.spec.ts +41 -0
- package/src/client/application-state.ts +130 -0
- package/src/client/index.ts +62 -0
- package/src/client/messages.ts +1240 -0
- package/src/client/source-config.spec.ts +152 -0
- package/src/connectors/connectors.spec.ts +778 -0
- package/src/connectors/context.ts +83 -0
- package/src/connectors/document-parser.ts +5 -0
- package/src/connectors/figma-native.ts +1192 -0
- package/src/connectors/figma-native.visual.spec.ts +221 -0
- package/src/connectors/figma.spec.ts +812 -0
- package/src/connectors/figma.ts +257 -0
- package/src/connectors/fixtures/google-slides-native.json +353 -0
- package/src/connectors/google-slides-native.spec.ts +804 -0
- package/src/connectors/google-slides-native.ts +1656 -0
- package/src/connectors/google-slides-native.visual.spec.ts +119 -0
- package/src/connectors/google-slides.ts +1172 -0
- package/src/connectors/index.ts +103 -0
- package/src/connectors/manual.ts +132 -0
- package/src/connectors/normalize.ts +277 -0
- package/src/connectors/notion.ts +529 -0
- package/src/connectors/private-artifacts.spec.ts +95 -0
- package/src/connectors/private-artifacts.ts +248 -0
- package/src/connectors/provider-response.ts +144 -0
- package/src/connectors/recommendations.ts +237 -0
- package/src/connectors/registry.ts +48 -0
- package/src/connectors/rendered-page.ts +705 -0
- package/src/connectors/smart-defaults.spec.ts +135 -0
- package/src/connectors/smart-defaults.ts +87 -0
- package/src/connectors/types.ts +115 -0
- package/src/connectors/upload.spec.ts +175 -0
- package/src/connectors/upload.ts +548 -0
- package/src/connectors/website.spec.ts +509 -0
- package/src/connectors/website.ts +777 -0
- package/src/embeddings/index.ts +2 -0
- package/src/embeddings/providers.spec.ts +73 -0
- package/src/embeddings/providers.ts +228 -0
- package/src/embeddings/types.ts +24 -0
- package/src/eval/acceptance-fixtures.ts +97 -0
- package/src/eval/acceptance.spec.ts +92 -0
- package/src/eval/acceptance.ts +371 -0
- package/src/eval/connectors-golden.spec.ts +421 -0
- package/src/eval/eval.spec.ts +166 -0
- package/src/eval/fixtures/README.md +17 -0
- package/src/eval/fixtures/figma-brand-system-v1.json +140 -0
- package/src/eval/fixtures/figma-brand-system-v2.json +127 -0
- package/src/eval/fixtures/launch-hero.png +0 -0
- package/src/eval/fixtures/launch-system-v1.pptx +0 -0
- package/src/eval/fixtures/launch-system-v2.pptx +0 -0
- package/src/eval/fixtures/notion-brand-root.json +218 -0
- package/src/eval/fixtures/pricing-hero.png +0 -0
- package/src/eval/fixtures/rendered-brand-page.html +76 -0
- package/src/eval/fixtures.spec.ts +43 -0
- package/src/eval/fixtures.ts +136 -0
- package/src/eval/index.ts +291 -0
- package/src/eval/library-flow.acceptance.spec.tsx +141 -0
- package/src/index.ts +4 -0
- package/src/jobs/background-worker.ts +423 -0
- package/src/jobs/import-runner.spec.ts +582 -0
- package/src/jobs/import-runner.ts +792 -0
- package/src/jobs/index.ts +40 -0
- package/src/jobs/progress.ts +37 -0
- package/src/jobs/rebuild.ts +245 -0
- package/src/jobs/server-worker.spec.ts +159 -0
- package/src/jobs/server-worker.ts +344 -0
- package/src/jobs/store-adapter.ts +52 -0
- package/src/jobs/types.ts +147 -0
- package/src/jobs/worker.ts +152 -0
- package/src/manifest.spec.ts +26 -0
- package/src/media-url.ts +17 -0
- package/src/native-artifact-reassembly.spec.ts +386 -0
- package/src/native-artifact-reassembly.ts +406 -0
- package/src/native-artifact.ts +102 -0
- package/src/schema/index.ts +411 -0
- package/src/schema/migrations.spec.ts +41 -0
- package/src/schema/migrations.ts +258 -0
- package/src/search/fusion.spec.ts +21 -0
- package/src/search/fusion.ts +39 -0
- package/src/search/mode.spec.ts +28 -0
- package/src/search/mode.ts +21 -0
- package/src/search/postgres-fts.spec.ts +71 -0
- package/src/search/postgres-fts.ts +112 -0
- package/src/server/brand-context.spec.ts +43 -0
- package/src/server/brand-context.ts +160 -0
- package/src/server/context.ts +162 -0
- package/src/server/enrichment.ts +163 -0
- package/src/server/generation-artifact-access.ts +216 -0
- package/src/server/generation-context-a2a.spec.ts +131 -0
- package/src/server/generation-context-off.spec.ts +213 -0
- package/src/server/generation-context.spec.ts +124 -0
- package/src/server/generation-context.ts +493 -0
- package/src/server/index.ts +135 -0
- package/src/server/isolated-a2a.spec.ts +164 -0
- package/src/server/isolated-a2a.ts +413 -0
- package/src/server/media.spec.ts +92 -0
- package/src/server/media.ts +117 -0
- package/src/server/prompt-provider.spec.ts +78 -0
- package/src/server/prompt-provider.ts +73 -0
- package/src/server/public-serialization.spec.ts +149 -0
- package/src/server/public-serialization.ts +130 -0
- package/src/server/resource-paths.spec.ts +9 -0
- package/src/server/resource-paths.ts +5 -0
- package/src/server/retrieval-vector.spec.ts +180 -0
- package/src/server/retrieval.ts +587 -0
- package/src/server/untrusted-reference.spec.ts +22 -0
- package/src/server/untrusted-reference.ts +24 -0
- package/src/store/access.integration.spec.ts +1922 -0
- package/src/store/brand.ts +477 -0
- package/src/store/content.ts +1900 -0
- package/src/store/generation.ts +226 -0
- package/src/store/helpers.ts +53 -0
- package/src/store/index.ts +9 -0
- package/src/store/inference.spec.ts +84 -0
- package/src/store/inference.ts +339 -0
- package/src/store/invariants.spec.ts +119 -0
- package/src/store/jobs.ts +672 -0
- package/src/store/packs.ts +466 -0
- package/src/store/purge.ts +321 -0
- package/src/store/sources.spec.ts +102 -0
- package/src/store/sources.ts +708 -0
- package/src/store/suggestions.ts +333 -0
- package/src/types.ts +571 -0
- package/src/vector/index.ts +1 -0
- package/src/vector/pgvector.spec.ts +98 -0
- package/src/vector/pgvector.ts +164 -0
|
@@ -0,0 +1,804 @@
|
|
|
1
|
+
import { readFileSync } from "node:fs";
|
|
2
|
+
|
|
3
|
+
import { describe, expect, it, vi } from "vitest";
|
|
4
|
+
|
|
5
|
+
import { validateCompiledNativeHtml } from "../native-artifact-reassembly.js";
|
|
6
|
+
import { parseNativeCreativeArtifact } from "../native-artifact.js";
|
|
7
|
+
import { compileGoogleSlidesPresentation } from "./google-slides-native.js";
|
|
8
|
+
import { normalizeContextItem } from "./normalize.js";
|
|
9
|
+
|
|
10
|
+
const presentation = JSON.parse(
|
|
11
|
+
readFileSync(
|
|
12
|
+
new URL("./fixtures/google-slides-native.json", import.meta.url),
|
|
13
|
+
"utf8",
|
|
14
|
+
),
|
|
15
|
+
) as Record<string, unknown>;
|
|
16
|
+
|
|
17
|
+
describe("Google Slides native compiler", () => {
|
|
18
|
+
it("compiles realistic API JSON into editable bounded HTML with explicit fidelity", async () => {
|
|
19
|
+
const resolveAsset = vi.fn(async () => ({
|
|
20
|
+
id: `ccm_${"a".repeat(28)}`,
|
|
21
|
+
kind: "image" as const,
|
|
22
|
+
mimeType: "image/png",
|
|
23
|
+
accessMode: "private" as const,
|
|
24
|
+
storageKey: "creative-context-blob:v1:fixture-image",
|
|
25
|
+
contentHash: "image-hash",
|
|
26
|
+
url: `/_agent-native/creative-context/media?mediaId=ccm_${"a".repeat(28)}`,
|
|
27
|
+
}));
|
|
28
|
+
const resolveFallback = vi.fn(async () => ({
|
|
29
|
+
id: `ccm_${"b".repeat(28)}`,
|
|
30
|
+
kind: "image" as const,
|
|
31
|
+
mimeType: "image/png",
|
|
32
|
+
accessMode: "private" as const,
|
|
33
|
+
storageKey: "creative-context-blob:v1:fixture-fallback",
|
|
34
|
+
contentHash: "fallback-hash",
|
|
35
|
+
url: `/_agent-native/creative-context/media?mediaId=ccm_${"b".repeat(28)}`,
|
|
36
|
+
}));
|
|
37
|
+
|
|
38
|
+
const [slide] = await compileGoogleSlidesPresentation(presentation, {
|
|
39
|
+
presentationId: "fixture-deck-2026",
|
|
40
|
+
revisionId: "revision-42",
|
|
41
|
+
resolveAsset,
|
|
42
|
+
resolveFallback,
|
|
43
|
+
});
|
|
44
|
+
|
|
45
|
+
expect(slide).toBeDefined();
|
|
46
|
+
expect(slide!.html).toContain('class="fmd-slide google-slides-native"');
|
|
47
|
+
expect(slide!.html).toContain("matrix(1,0,0.1,1,48,264)");
|
|
48
|
+
expect(slide!.html).toContain("border-radius:50%");
|
|
49
|
+
expect(slide!.html).toContain("<table");
|
|
50
|
+
expect(slide!.html).toContain("Revenue <script>");
|
|
51
|
+
expect(slide!.html).not.toContain("<script>");
|
|
52
|
+
expect(slide!.html).not.toMatch(/https?:\/\//);
|
|
53
|
+
expect(slide!.html).toContain(
|
|
54
|
+
`src="/_agent-native/creative-context/media?mediaId=ccm_${"a".repeat(28)}"`,
|
|
55
|
+
);
|
|
56
|
+
expect(slide!.html).toContain('data-source-object-id="word-art-1"');
|
|
57
|
+
expect(slide!.html).toContain("gslide-image-fallback");
|
|
58
|
+
expect(slide!.plainText).toContain("Revenue <script>alert('x')</script>");
|
|
59
|
+
expect(slide!.lexicalText).toContain("gslide-shape");
|
|
60
|
+
expect(Buffer.byteLength(slide!.html, "utf8")).toBeLessThanOrEqual(
|
|
61
|
+
128 * 1024,
|
|
62
|
+
);
|
|
63
|
+
expect(resolveAsset).toHaveBeenCalledWith(
|
|
64
|
+
expect.objectContaining({
|
|
65
|
+
slideObjectId: "slide-1",
|
|
66
|
+
elementObjectId: "image-1",
|
|
67
|
+
kind: "image",
|
|
68
|
+
}),
|
|
69
|
+
);
|
|
70
|
+
expect(resolveFallback).toHaveBeenCalledWith(
|
|
71
|
+
expect.objectContaining({
|
|
72
|
+
elementObjectId: "word-art-1",
|
|
73
|
+
reason: expect.stringContaining("WordArt"),
|
|
74
|
+
}),
|
|
75
|
+
);
|
|
76
|
+
expect(parseNativeCreativeArtifact(slide!.nativeArtifact)).toMatchObject({
|
|
77
|
+
schemaVersion: 1,
|
|
78
|
+
app: "slides",
|
|
79
|
+
format: "slides-html",
|
|
80
|
+
rootExternalId: "fixture-deck-2026:slide-1",
|
|
81
|
+
fidelityReport: {
|
|
82
|
+
exact: { count: 6 },
|
|
83
|
+
approximated: { count: 0, reasons: [] },
|
|
84
|
+
imageFallback: {
|
|
85
|
+
count: 1,
|
|
86
|
+
reasons: [expect.objectContaining({ nodeId: "word-art-1" })],
|
|
87
|
+
},
|
|
88
|
+
},
|
|
89
|
+
});
|
|
90
|
+
expect(slide!.media).toHaveLength(2);
|
|
91
|
+
});
|
|
92
|
+
|
|
93
|
+
it("fails closed when an indivisible element cannot receive a localized fallback", async () => {
|
|
94
|
+
await expect(
|
|
95
|
+
compileGoogleSlidesPresentation(presentation, {
|
|
96
|
+
presentationId: "fixture-deck-2026",
|
|
97
|
+
revisionId: "revision-42",
|
|
98
|
+
resolveAsset: async () => ({
|
|
99
|
+
id: `ccm_${"a".repeat(28)}`,
|
|
100
|
+
kind: "image",
|
|
101
|
+
accessMode: "private",
|
|
102
|
+
storageKey: "creative-context-blob:v1:image",
|
|
103
|
+
url: `/_agent-native/creative-context/media?mediaId=ccm_${"a".repeat(28)}`,
|
|
104
|
+
}),
|
|
105
|
+
resolveFallback: async () => null,
|
|
106
|
+
}),
|
|
107
|
+
).rejects.toThrow(
|
|
108
|
+
"Localized raster fallback for word-art-1 was unavailable",
|
|
109
|
+
);
|
|
110
|
+
});
|
|
111
|
+
|
|
112
|
+
it("produces a new content hash for resync while preserving prior version evidence", async () => {
|
|
113
|
+
const revised = structuredClone(presentation);
|
|
114
|
+
const revisedSlides = revised.slides as Array<Record<string, any>>;
|
|
115
|
+
revisedSlides[0]!.pageElements[0]!.shape.text.textElements[1]!.textRun.content =
|
|
116
|
+
"Updated revenue";
|
|
117
|
+
const resolveAsset = async () => ({
|
|
118
|
+
id: `ccm_${"a".repeat(28)}`,
|
|
119
|
+
kind: "image" as const,
|
|
120
|
+
accessMode: "private" as const,
|
|
121
|
+
storageKey: "creative-context-blob:v1:image",
|
|
122
|
+
url: `/_agent-native/creative-context/media?mediaId=ccm_${"a".repeat(28)}`,
|
|
123
|
+
});
|
|
124
|
+
const resolveFallback = async () => ({
|
|
125
|
+
id: `ccm_${"b".repeat(28)}`,
|
|
126
|
+
kind: "image" as const,
|
|
127
|
+
accessMode: "private" as const,
|
|
128
|
+
storageKey: "creative-context-blob:v1:fallback",
|
|
129
|
+
url: `/_agent-native/creative-context/media?mediaId=ccm_${"b".repeat(28)}`,
|
|
130
|
+
});
|
|
131
|
+
const [[first], [second]] = await Promise.all([
|
|
132
|
+
compileGoogleSlidesPresentation(presentation, {
|
|
133
|
+
presentationId: "fixture-deck-2026",
|
|
134
|
+
revisionId: "revision-42",
|
|
135
|
+
resolveAsset,
|
|
136
|
+
resolveFallback,
|
|
137
|
+
}),
|
|
138
|
+
compileGoogleSlidesPresentation(revised, {
|
|
139
|
+
presentationId: "fixture-deck-2026",
|
|
140
|
+
revisionId: "revision-43",
|
|
141
|
+
resolveAsset,
|
|
142
|
+
resolveFallback,
|
|
143
|
+
}),
|
|
144
|
+
]);
|
|
145
|
+
const versionOne = normalizeContextItem({
|
|
146
|
+
externalId: "fixture-deck-2026:slide-1",
|
|
147
|
+
kind: "google-slides-slide",
|
|
148
|
+
title: "Slide",
|
|
149
|
+
mimeType: "text/html",
|
|
150
|
+
content: first!.html,
|
|
151
|
+
sourceVersion: "revision-42",
|
|
152
|
+
});
|
|
153
|
+
const versionTwo = normalizeContextItem({
|
|
154
|
+
externalId: "fixture-deck-2026:slide-1",
|
|
155
|
+
kind: "google-slides-slide",
|
|
156
|
+
title: "Slide",
|
|
157
|
+
mimeType: "text/html",
|
|
158
|
+
content: second!.html,
|
|
159
|
+
sourceVersion: "revision-43",
|
|
160
|
+
});
|
|
161
|
+
|
|
162
|
+
expect(versionOne.contentHash).not.toBe(versionTwo.contentHash);
|
|
163
|
+
expect(versionOne.content).toContain("Revenue <script>");
|
|
164
|
+
expect(versionOne.content).not.toContain("Updated revenue");
|
|
165
|
+
expect(versionTwo.content).toContain("Updated revenue");
|
|
166
|
+
});
|
|
167
|
+
|
|
168
|
+
it("preserves native HTML whitespace before immutable hashing", () => {
|
|
169
|
+
const html =
|
|
170
|
+
'<div class="fmd-slide google-slides-native"><span>Two spaces</span>\n <span>Indented</span></div>';
|
|
171
|
+
const item = normalizeContextItem({
|
|
172
|
+
externalId: "deck:slide",
|
|
173
|
+
kind: "google-slides-slide",
|
|
174
|
+
title: "Whitespace",
|
|
175
|
+
mimeType: "text/html",
|
|
176
|
+
content: html,
|
|
177
|
+
metadata: {
|
|
178
|
+
nativeArtifact: {
|
|
179
|
+
format: "slides-html",
|
|
180
|
+
},
|
|
181
|
+
},
|
|
182
|
+
chunks: [{ ordinal: 0, text: "Two spaces Indented" }],
|
|
183
|
+
});
|
|
184
|
+
|
|
185
|
+
expect(item.content).toBe(html);
|
|
186
|
+
});
|
|
187
|
+
|
|
188
|
+
it("handles real inheritance, nested transforms, crop/effects, and honest fallback reasons", async () => {
|
|
189
|
+
const fallbackRequests: Array<{
|
|
190
|
+
elementObjectId: string;
|
|
191
|
+
bounds: { x: number; y: number; width: number; height: number };
|
|
192
|
+
reason: string;
|
|
193
|
+
}> = [];
|
|
194
|
+
const [slide] = await compileGoogleSlidesPresentation(
|
|
195
|
+
{
|
|
196
|
+
pageSize: {
|
|
197
|
+
width: { magnitude: 960, unit: "PX" },
|
|
198
|
+
height: { magnitude: 540, unit: "PX" },
|
|
199
|
+
},
|
|
200
|
+
masters: [
|
|
201
|
+
{
|
|
202
|
+
objectId: "master",
|
|
203
|
+
pageProperties: {
|
|
204
|
+
colorScheme: {
|
|
205
|
+
colors: [
|
|
206
|
+
{
|
|
207
|
+
type: "ACCENT1",
|
|
208
|
+
color: {
|
|
209
|
+
rgbColor: { red: 0.2, green: 0.4, blue: 0.6 },
|
|
210
|
+
},
|
|
211
|
+
},
|
|
212
|
+
],
|
|
213
|
+
},
|
|
214
|
+
},
|
|
215
|
+
pageElements: [
|
|
216
|
+
{
|
|
217
|
+
objectId: "master-title",
|
|
218
|
+
size: {
|
|
219
|
+
width: { magnitude: 400, unit: "PX" },
|
|
220
|
+
height: { magnitude: 80, unit: "PX" },
|
|
221
|
+
},
|
|
222
|
+
shape: {
|
|
223
|
+
shapeType: "TEXT_BOX",
|
|
224
|
+
placeholder: { type: "TITLE", index: 0 },
|
|
225
|
+
text: {
|
|
226
|
+
textElements: [
|
|
227
|
+
{
|
|
228
|
+
paragraphMarker: {
|
|
229
|
+
style: { alignment: "START" },
|
|
230
|
+
},
|
|
231
|
+
},
|
|
232
|
+
{
|
|
233
|
+
textRun: {
|
|
234
|
+
content: "Master",
|
|
235
|
+
style: {
|
|
236
|
+
fontSize: { magnitude: 24, unit: "PT" },
|
|
237
|
+
foregroundColor: {
|
|
238
|
+
opaqueColor: { themeColor: "ACCENT1" },
|
|
239
|
+
},
|
|
240
|
+
},
|
|
241
|
+
},
|
|
242
|
+
},
|
|
243
|
+
],
|
|
244
|
+
},
|
|
245
|
+
},
|
|
246
|
+
},
|
|
247
|
+
],
|
|
248
|
+
},
|
|
249
|
+
],
|
|
250
|
+
layouts: [
|
|
251
|
+
{
|
|
252
|
+
objectId: "layout",
|
|
253
|
+
layoutProperties: { masterObjectId: "master" },
|
|
254
|
+
pageElements: [
|
|
255
|
+
{
|
|
256
|
+
objectId: "layout-title",
|
|
257
|
+
shape: {
|
|
258
|
+
shapeType: "TEXT_BOX",
|
|
259
|
+
placeholder: {
|
|
260
|
+
type: "TITLE",
|
|
261
|
+
index: 0,
|
|
262
|
+
parentObjectId: "master-title",
|
|
263
|
+
},
|
|
264
|
+
text: {
|
|
265
|
+
textElements: [
|
|
266
|
+
{ paragraphMarker: { style: {} } },
|
|
267
|
+
{
|
|
268
|
+
textRun: {
|
|
269
|
+
content: "Layout",
|
|
270
|
+
style: {
|
|
271
|
+
weightedFontFamily: {
|
|
272
|
+
fontFamily: "Inter",
|
|
273
|
+
weight: 600,
|
|
274
|
+
},
|
|
275
|
+
},
|
|
276
|
+
},
|
|
277
|
+
},
|
|
278
|
+
],
|
|
279
|
+
},
|
|
280
|
+
},
|
|
281
|
+
},
|
|
282
|
+
],
|
|
283
|
+
},
|
|
284
|
+
],
|
|
285
|
+
slides: [
|
|
286
|
+
{
|
|
287
|
+
objectId: "adversarial",
|
|
288
|
+
slideProperties: { layoutObjectId: "layout" },
|
|
289
|
+
pageProperties: {
|
|
290
|
+
pageBackgroundFill: {
|
|
291
|
+
stretchedPictureFill: {
|
|
292
|
+
contentUrl: "https://assets.example.test/background.png",
|
|
293
|
+
},
|
|
294
|
+
},
|
|
295
|
+
},
|
|
296
|
+
pageElements: [
|
|
297
|
+
{
|
|
298
|
+
objectId: "title",
|
|
299
|
+
transform: {
|
|
300
|
+
scaleX: 1,
|
|
301
|
+
scaleY: 1,
|
|
302
|
+
translateX: 20,
|
|
303
|
+
translateY: 20,
|
|
304
|
+
unit: "PX",
|
|
305
|
+
},
|
|
306
|
+
shape: {
|
|
307
|
+
shapeType: "TEXT_BOX",
|
|
308
|
+
placeholder: {
|
|
309
|
+
type: "TITLE",
|
|
310
|
+
index: 0,
|
|
311
|
+
parentObjectId: "layout-title",
|
|
312
|
+
},
|
|
313
|
+
text: {
|
|
314
|
+
textElements: [
|
|
315
|
+
{
|
|
316
|
+
paragraphMarker: {
|
|
317
|
+
style: { alignment: "END" },
|
|
318
|
+
},
|
|
319
|
+
},
|
|
320
|
+
{
|
|
321
|
+
textRun: {
|
|
322
|
+
content: "<Inherited & escaped>",
|
|
323
|
+
style: { bold: true },
|
|
324
|
+
},
|
|
325
|
+
},
|
|
326
|
+
],
|
|
327
|
+
},
|
|
328
|
+
},
|
|
329
|
+
},
|
|
330
|
+
{
|
|
331
|
+
objectId: "cropped-image",
|
|
332
|
+
title: "Photo & chart",
|
|
333
|
+
size: {
|
|
334
|
+
width: { magnitude: 200, unit: "PX" },
|
|
335
|
+
height: { magnitude: 100, unit: "PX" },
|
|
336
|
+
},
|
|
337
|
+
transform: {
|
|
338
|
+
scaleX: 1,
|
|
339
|
+
scaleY: 1,
|
|
340
|
+
shearX: 0.25,
|
|
341
|
+
translateX: 500,
|
|
342
|
+
translateY: 30,
|
|
343
|
+
unit: "PX",
|
|
344
|
+
},
|
|
345
|
+
image: {
|
|
346
|
+
contentUrl: "https://assets.example.test/image.png",
|
|
347
|
+
imageProperties: {
|
|
348
|
+
cropProperties: { leftOffset: 0.25 },
|
|
349
|
+
transparency: 0.2,
|
|
350
|
+
brightness: 0.1,
|
|
351
|
+
contrast: -0.2,
|
|
352
|
+
},
|
|
353
|
+
},
|
|
354
|
+
},
|
|
355
|
+
{
|
|
356
|
+
objectId: "bordered-table",
|
|
357
|
+
size: {
|
|
358
|
+
width: { magnitude: 200, unit: "PX" },
|
|
359
|
+
height: { magnitude: 80, unit: "PX" },
|
|
360
|
+
},
|
|
361
|
+
table: {
|
|
362
|
+
horizontalBorderRows: [{}],
|
|
363
|
+
tableRows: [
|
|
364
|
+
{
|
|
365
|
+
tableCells: [
|
|
366
|
+
{
|
|
367
|
+
text: {
|
|
368
|
+
textElements: [{ textRun: { content: "Cell" } }],
|
|
369
|
+
},
|
|
370
|
+
},
|
|
371
|
+
],
|
|
372
|
+
},
|
|
373
|
+
],
|
|
374
|
+
},
|
|
375
|
+
},
|
|
376
|
+
{
|
|
377
|
+
objectId: "scaled-group",
|
|
378
|
+
size: {
|
|
379
|
+
width: { magnitude: 200, unit: "PX" },
|
|
380
|
+
height: { magnitude: 100, unit: "PX" },
|
|
381
|
+
},
|
|
382
|
+
transform: {
|
|
383
|
+
scaleX: 2,
|
|
384
|
+
scaleY: 2,
|
|
385
|
+
translateX: 100,
|
|
386
|
+
translateY: 50,
|
|
387
|
+
unit: "PX",
|
|
388
|
+
},
|
|
389
|
+
elementGroup: {
|
|
390
|
+
children: [
|
|
391
|
+
{
|
|
392
|
+
objectId: "nested-word-art",
|
|
393
|
+
size: {
|
|
394
|
+
width: { magnitude: 40, unit: "PX" },
|
|
395
|
+
height: { magnitude: 20, unit: "PX" },
|
|
396
|
+
},
|
|
397
|
+
transform: {
|
|
398
|
+
scaleX: 1,
|
|
399
|
+
scaleY: 1,
|
|
400
|
+
translateX: 20,
|
|
401
|
+
translateY: 30,
|
|
402
|
+
unit: "PX",
|
|
403
|
+
},
|
|
404
|
+
wordArt: { renderedText: "Nested" },
|
|
405
|
+
},
|
|
406
|
+
],
|
|
407
|
+
},
|
|
408
|
+
},
|
|
409
|
+
{
|
|
410
|
+
objectId: "arrow-line",
|
|
411
|
+
size: {
|
|
412
|
+
width: { magnitude: 100, unit: "PX" },
|
|
413
|
+
height: { magnitude: 10, unit: "PX" },
|
|
414
|
+
},
|
|
415
|
+
line: {
|
|
416
|
+
lineType: "STRAIGHT_CONNECTOR_1",
|
|
417
|
+
lineProperties: { endArrow: "ARROW" },
|
|
418
|
+
},
|
|
419
|
+
},
|
|
420
|
+
],
|
|
421
|
+
},
|
|
422
|
+
],
|
|
423
|
+
},
|
|
424
|
+
{
|
|
425
|
+
presentationId: "adversarial-deck",
|
|
426
|
+
revisionId: "v1",
|
|
427
|
+
resolveAsset: async () => ({
|
|
428
|
+
id: `ccm_${"a".repeat(28)}`,
|
|
429
|
+
kind: "image",
|
|
430
|
+
accessMode: "private",
|
|
431
|
+
storageKey: "creative-context-blob:v1:image",
|
|
432
|
+
url: `/_agent-native/creative-context/media?mediaId=ccm_${"a".repeat(28)}`,
|
|
433
|
+
}),
|
|
434
|
+
resolveFallback: async (request) => {
|
|
435
|
+
fallbackRequests.push(request);
|
|
436
|
+
return {
|
|
437
|
+
id: `ccm_${"b".repeat(28)}`,
|
|
438
|
+
kind: "image",
|
|
439
|
+
accessMode: "private",
|
|
440
|
+
storageKey: "creative-context-blob:v1:fallback",
|
|
441
|
+
url: `/_agent-native/creative-context/media?mediaId=ccm_${"b".repeat(28)}`,
|
|
442
|
+
};
|
|
443
|
+
},
|
|
444
|
+
},
|
|
445
|
+
);
|
|
446
|
+
|
|
447
|
+
expect(slide!.html).toContain("<Inherited & escaped>");
|
|
448
|
+
expect(slide!.html).toContain("font-family:'Inter'");
|
|
449
|
+
expect(slide!.html).toContain("font-size:32px");
|
|
450
|
+
expect(slide!.html).toContain("font-weight:600");
|
|
451
|
+
expect(slide!.html).toContain("color:#336699");
|
|
452
|
+
expect(slide!.html).toContain("left:-33.333%");
|
|
453
|
+
expect(slide!.html).toContain("opacity:0.8");
|
|
454
|
+
expect(slide!.html).toContain("brightness(1.1) contrast(0.8)");
|
|
455
|
+
expect(fallbackRequests).toEqual(
|
|
456
|
+
expect.arrayContaining([
|
|
457
|
+
expect.objectContaining({
|
|
458
|
+
elementObjectId: "nested-word-art",
|
|
459
|
+
bounds: { x: 140, y: 110, width: 80, height: 40 },
|
|
460
|
+
}),
|
|
461
|
+
expect.objectContaining({
|
|
462
|
+
elementObjectId: "arrow-line",
|
|
463
|
+
reason: expect.stringContaining("arrowed"),
|
|
464
|
+
}),
|
|
465
|
+
]),
|
|
466
|
+
);
|
|
467
|
+
expect(slide!.nativeArtifact.fidelityReport).toMatchObject({
|
|
468
|
+
exact: { count: 2 },
|
|
469
|
+
approximated: {
|
|
470
|
+
count: 3,
|
|
471
|
+
reasons: expect.arrayContaining([
|
|
472
|
+
expect.objectContaining({
|
|
473
|
+
nodeId: "adversarial:background",
|
|
474
|
+
nodeType: "pageBackground",
|
|
475
|
+
}),
|
|
476
|
+
expect.objectContaining({ nodeId: "cropped-image" }),
|
|
477
|
+
expect.objectContaining({ nodeId: "bordered-table" }),
|
|
478
|
+
]),
|
|
479
|
+
},
|
|
480
|
+
imageFallback: { count: 2 },
|
|
481
|
+
});
|
|
482
|
+
});
|
|
483
|
+
|
|
484
|
+
it("inherits a directly referenced master font and renders omitted zero-scale line axes", async () => {
|
|
485
|
+
const [slide] = await compileGoogleSlidesPresentation(
|
|
486
|
+
{
|
|
487
|
+
pageSize: {
|
|
488
|
+
width: { magnitude: 960, unit: "PX" },
|
|
489
|
+
height: { magnitude: 540, unit: "PX" },
|
|
490
|
+
},
|
|
491
|
+
masters: [
|
|
492
|
+
{
|
|
493
|
+
objectId: "master",
|
|
494
|
+
pageProperties: {
|
|
495
|
+
colorScheme: {
|
|
496
|
+
colors: [
|
|
497
|
+
{
|
|
498
|
+
type: "LIGHT1",
|
|
499
|
+
color: { red: 1, green: 1, blue: 1 },
|
|
500
|
+
},
|
|
501
|
+
],
|
|
502
|
+
},
|
|
503
|
+
},
|
|
504
|
+
pageElements: [
|
|
505
|
+
{
|
|
506
|
+
objectId: "master-title",
|
|
507
|
+
size: {
|
|
508
|
+
width: { magnitude: 300, unit: "PX" },
|
|
509
|
+
height: { magnitude: 100, unit: "PX" },
|
|
510
|
+
},
|
|
511
|
+
transform: { scaleX: 2, scaleY: 0.5, unit: "PX" },
|
|
512
|
+
shape: {
|
|
513
|
+
shapeType: "TEXT_BOX",
|
|
514
|
+
placeholder: { type: "TITLE" },
|
|
515
|
+
shapeProperties: {
|
|
516
|
+
shapeBackgroundFill: {
|
|
517
|
+
propertyState: "NOT_RENDERED",
|
|
518
|
+
solidFill: {
|
|
519
|
+
color: {
|
|
520
|
+
rgbColor: { red: 1, green: 1, blue: 1 },
|
|
521
|
+
},
|
|
522
|
+
},
|
|
523
|
+
},
|
|
524
|
+
outline: { propertyState: "NOT_RENDERED" },
|
|
525
|
+
},
|
|
526
|
+
text: {
|
|
527
|
+
textElements: [
|
|
528
|
+
{ paragraphMarker: { style: { lineSpacing: 90 } } },
|
|
529
|
+
{
|
|
530
|
+
textRun: {
|
|
531
|
+
content: "Master title\n",
|
|
532
|
+
style: {
|
|
533
|
+
fontFamily: "Fixture Sans",
|
|
534
|
+
weightedFontFamily: {
|
|
535
|
+
fontFamily: "Fixture Sans",
|
|
536
|
+
weight: 700,
|
|
537
|
+
},
|
|
538
|
+
},
|
|
539
|
+
},
|
|
540
|
+
},
|
|
541
|
+
],
|
|
542
|
+
},
|
|
543
|
+
},
|
|
544
|
+
},
|
|
545
|
+
{
|
|
546
|
+
objectId: "grid",
|
|
547
|
+
transform: { scaleX: 1, scaleY: 1, unit: "PX" },
|
|
548
|
+
elementGroup: {
|
|
549
|
+
children: [
|
|
550
|
+
{
|
|
551
|
+
objectId: "vertical-grid-line",
|
|
552
|
+
size: {
|
|
553
|
+
width: { magnitude: 100, unit: "PX" },
|
|
554
|
+
height: { magnitude: 100, unit: "PX" },
|
|
555
|
+
},
|
|
556
|
+
transform: {
|
|
557
|
+
scaleY: -5.4,
|
|
558
|
+
translateX: 120,
|
|
559
|
+
translateY: 540,
|
|
560
|
+
unit: "PX",
|
|
561
|
+
},
|
|
562
|
+
line: {
|
|
563
|
+
lineType: "STRAIGHT_CONNECTOR_1",
|
|
564
|
+
lineProperties: {
|
|
565
|
+
dashStyle: "SOLID",
|
|
566
|
+
startArrow: "NONE",
|
|
567
|
+
endArrow: "NONE",
|
|
568
|
+
},
|
|
569
|
+
},
|
|
570
|
+
},
|
|
571
|
+
],
|
|
572
|
+
},
|
|
573
|
+
},
|
|
574
|
+
],
|
|
575
|
+
},
|
|
576
|
+
],
|
|
577
|
+
layouts: [
|
|
578
|
+
{
|
|
579
|
+
objectId: "layout",
|
|
580
|
+
layoutProperties: { masterObjectId: "master" },
|
|
581
|
+
pageElements: [],
|
|
582
|
+
},
|
|
583
|
+
],
|
|
584
|
+
slides: [
|
|
585
|
+
{
|
|
586
|
+
objectId: "slide",
|
|
587
|
+
slideProperties: {
|
|
588
|
+
layoutObjectId: "layout",
|
|
589
|
+
masterObjectId: "master",
|
|
590
|
+
},
|
|
591
|
+
pageElements: [
|
|
592
|
+
{
|
|
593
|
+
objectId: "slide-title",
|
|
594
|
+
shape: {
|
|
595
|
+
shapeType: "TEXT_BOX",
|
|
596
|
+
placeholder: {
|
|
597
|
+
type: "TITLE",
|
|
598
|
+
parentObjectId: "master-title",
|
|
599
|
+
},
|
|
600
|
+
shapeProperties: {
|
|
601
|
+
shapeBackgroundFill: { propertyState: "INHERIT" },
|
|
602
|
+
outline: { propertyState: "INHERIT" },
|
|
603
|
+
},
|
|
604
|
+
text: {
|
|
605
|
+
textElements: [
|
|
606
|
+
{ paragraphMarker: { style: { lineSpacing: 100 } } },
|
|
607
|
+
{
|
|
608
|
+
textRun: {
|
|
609
|
+
content: "Inherited\u000btitle",
|
|
610
|
+
style: {
|
|
611
|
+
backgroundColor: {},
|
|
612
|
+
foregroundColor: {
|
|
613
|
+
opaqueColor: { themeColor: "LIGHT1" },
|
|
614
|
+
},
|
|
615
|
+
fontSize: { magnitude: 39, unit: "PT" },
|
|
616
|
+
},
|
|
617
|
+
},
|
|
618
|
+
},
|
|
619
|
+
],
|
|
620
|
+
},
|
|
621
|
+
},
|
|
622
|
+
},
|
|
623
|
+
{
|
|
624
|
+
objectId: "bullet-body",
|
|
625
|
+
size: {
|
|
626
|
+
width: { magnitude: 500, unit: "PX" },
|
|
627
|
+
height: { magnitude: 120, unit: "PX" },
|
|
628
|
+
},
|
|
629
|
+
transform: {
|
|
630
|
+
scaleX: 1,
|
|
631
|
+
scaleY: 1,
|
|
632
|
+
translateY: 120,
|
|
633
|
+
unit: "PX",
|
|
634
|
+
},
|
|
635
|
+
shape: {
|
|
636
|
+
shapeType: "TEXT_BOX",
|
|
637
|
+
text: {
|
|
638
|
+
textElements: [
|
|
639
|
+
{
|
|
640
|
+
paragraphMarker: {
|
|
641
|
+
style: {
|
|
642
|
+
indentStart: { magnitude: 36, unit: "PT" },
|
|
643
|
+
indentFirstLine: { magnitude: 18, unit: "PT" },
|
|
644
|
+
},
|
|
645
|
+
bullet: {
|
|
646
|
+
listId: "fixture-list",
|
|
647
|
+
glyph: "●",
|
|
648
|
+
bulletStyle: {
|
|
649
|
+
foregroundColor: {
|
|
650
|
+
opaqueColor: { themeColor: "LIGHT1" },
|
|
651
|
+
},
|
|
652
|
+
fontSize: { magnitude: 15, unit: "PT" },
|
|
653
|
+
},
|
|
654
|
+
},
|
|
655
|
+
},
|
|
656
|
+
},
|
|
657
|
+
{
|
|
658
|
+
textRun: {
|
|
659
|
+
content: "Hanging bullet",
|
|
660
|
+
style: {
|
|
661
|
+
foregroundColor: {
|
|
662
|
+
opaqueColor: { themeColor: "LIGHT1" },
|
|
663
|
+
},
|
|
664
|
+
fontSize: { magnitude: 15, unit: "PT" },
|
|
665
|
+
},
|
|
666
|
+
},
|
|
667
|
+
},
|
|
668
|
+
],
|
|
669
|
+
},
|
|
670
|
+
},
|
|
671
|
+
},
|
|
672
|
+
],
|
|
673
|
+
},
|
|
674
|
+
],
|
|
675
|
+
},
|
|
676
|
+
{
|
|
677
|
+
presentationId: "direct-master-fixture",
|
|
678
|
+
resolveAsset: async () => {
|
|
679
|
+
throw new Error("fixture has no image assets");
|
|
680
|
+
},
|
|
681
|
+
},
|
|
682
|
+
);
|
|
683
|
+
|
|
684
|
+
expect(slide!.html).toContain("font-family:'Fixture Sans'");
|
|
685
|
+
expect(slide!.html).toContain("font-weight:700");
|
|
686
|
+
expect(slide!.html).toContain("font-size:52px");
|
|
687
|
+
expect(slide!.html).toContain("color:#ffffff");
|
|
688
|
+
expect(slide!.html).toContain("Inherited<br>title");
|
|
689
|
+
expect(slide!.html).toContain("padding:9.6px");
|
|
690
|
+
expect(slide!.html).toContain(
|
|
691
|
+
'gslide-shape-text_box" data-source-object-id="slide-title" style="',
|
|
692
|
+
);
|
|
693
|
+
expect(slide!.html).toContain("overflow:visible");
|
|
694
|
+
expect(slide!.html).toContain("padding-left:48px");
|
|
695
|
+
expect(slide!.html).toContain(
|
|
696
|
+
'<span class="gslide-bullet" style="display:inline-block;margin:0 0 0 -33.6px;width:33.6px;font-size:20px;color:#ffffff">● </span>',
|
|
697
|
+
);
|
|
698
|
+
expect(slide!.html).not.toContain("background-color:#000000");
|
|
699
|
+
expect(slide!.html).not.toContain("\u000b");
|
|
700
|
+
expect(slide!.html).toContain("rotate(-90deg)");
|
|
701
|
+
expect(slide!.html).toContain("translate(120px,540px)");
|
|
702
|
+
expect(slide!.html).toMatch(
|
|
703
|
+
/data-source-object-id="slide-title"[^>]*background:transparent;border:none/,
|
|
704
|
+
);
|
|
705
|
+
});
|
|
706
|
+
|
|
707
|
+
it("splits oversized slides into immutable native parts and localizes an indivisible oversized element", async () => {
|
|
708
|
+
const pageElements = Array.from({ length: 700 }, (_, index) => ({
|
|
709
|
+
objectId: `rect-${index}`,
|
|
710
|
+
size: {
|
|
711
|
+
width: { magnitude: 10, unit: "PX" },
|
|
712
|
+
height: { magnitude: 10, unit: "PX" },
|
|
713
|
+
},
|
|
714
|
+
transform: {
|
|
715
|
+
translateX: index % 100,
|
|
716
|
+
translateY: index % 50,
|
|
717
|
+
unit: "PX",
|
|
718
|
+
},
|
|
719
|
+
shape: { shapeType: "RECT" },
|
|
720
|
+
}));
|
|
721
|
+
const [split] = await compileGoogleSlidesPresentation(
|
|
722
|
+
{ slides: [{ objectId: "large-slide", pageElements }] },
|
|
723
|
+
{
|
|
724
|
+
presentationId: "large-deck",
|
|
725
|
+
revisionId: "v1",
|
|
726
|
+
resolveAsset: async () => {
|
|
727
|
+
throw new Error("fixture has no image assets");
|
|
728
|
+
},
|
|
729
|
+
},
|
|
730
|
+
);
|
|
731
|
+
|
|
732
|
+
expect(split!.childArtifacts).toHaveLength(700);
|
|
733
|
+
expect(split!.nativeArtifact.manifest?.children).toHaveLength(700);
|
|
734
|
+
expect(Buffer.byteLength(split!.html, "utf8")).toBeLessThanOrEqual(
|
|
735
|
+
128 * 1024,
|
|
736
|
+
);
|
|
737
|
+
validateCompiledNativeHtml(split!.html, split!.nativeArtifact);
|
|
738
|
+
for (const child of split!.childArtifacts) {
|
|
739
|
+
expect(Buffer.byteLength(child.html, "utf8")).toBeLessThanOrEqual(
|
|
740
|
+
128 * 1024,
|
|
741
|
+
);
|
|
742
|
+
validateCompiledNativeHtml(child.html, child.nativeArtifact);
|
|
743
|
+
}
|
|
744
|
+
|
|
745
|
+
const resolveFallback = vi.fn(async () => ({
|
|
746
|
+
id: `ccm_${"b".repeat(28)}`,
|
|
747
|
+
kind: "image" as const,
|
|
748
|
+
accessMode: "private" as const,
|
|
749
|
+
storageKey: "creative-context-blob:v1:fallback",
|
|
750
|
+
url: `/_agent-native/creative-context/media?mediaId=ccm_${"b".repeat(28)}`,
|
|
751
|
+
}));
|
|
752
|
+
const [localized] = await compileGoogleSlidesPresentation(
|
|
753
|
+
{
|
|
754
|
+
slides: [
|
|
755
|
+
{
|
|
756
|
+
objectId: "indivisible-slide",
|
|
757
|
+
pageElements: [
|
|
758
|
+
{
|
|
759
|
+
objectId: "huge-text",
|
|
760
|
+
size: {
|
|
761
|
+
width: { magnitude: 900, unit: "PX" },
|
|
762
|
+
height: { magnitude: 500, unit: "PX" },
|
|
763
|
+
},
|
|
764
|
+
shape: {
|
|
765
|
+
shapeType: "TEXT_BOX",
|
|
766
|
+
text: {
|
|
767
|
+
textElements: [
|
|
768
|
+
{ textRun: { content: "x".repeat(140 * 1024) } },
|
|
769
|
+
],
|
|
770
|
+
},
|
|
771
|
+
},
|
|
772
|
+
},
|
|
773
|
+
],
|
|
774
|
+
},
|
|
775
|
+
],
|
|
776
|
+
},
|
|
777
|
+
{
|
|
778
|
+
presentationId: "indivisible-deck",
|
|
779
|
+
revisionId: "v1",
|
|
780
|
+
resolveAsset: async () => {
|
|
781
|
+
throw new Error("fixture has no image assets");
|
|
782
|
+
},
|
|
783
|
+
resolveFallback,
|
|
784
|
+
},
|
|
785
|
+
);
|
|
786
|
+
|
|
787
|
+
expect(localized!.childArtifacts).toHaveLength(0);
|
|
788
|
+
expect(Buffer.byteLength(localized!.html, "utf8")).toBeLessThanOrEqual(
|
|
789
|
+
128 * 1024,
|
|
790
|
+
);
|
|
791
|
+
expect(resolveFallback).toHaveBeenCalledWith(
|
|
792
|
+
expect.objectContaining({
|
|
793
|
+
elementObjectId: "huge-text",
|
|
794
|
+
reason: expect.stringContaining("inline artifact budget"),
|
|
795
|
+
}),
|
|
796
|
+
);
|
|
797
|
+
expect(localized!.nativeArtifact.fidelityReport).toMatchObject({
|
|
798
|
+
imageFallback: {
|
|
799
|
+
count: 1,
|
|
800
|
+
reasons: [expect.objectContaining({ nodeId: "huge-text" })],
|
|
801
|
+
},
|
|
802
|
+
});
|
|
803
|
+
});
|
|
804
|
+
});
|