@imgly/codesign-mcp 0.7.2 → 0.7.3-next.20261125135902.gfdc6ee3
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 +35 -17
- package/dist/cli/license.js +1 -1
- package/dist/runtime/cli/commands.d.ts +2 -0
- package/dist/runtime/cli/commands.d.ts.map +1 -1
- package/dist/runtime/cli/commands.js +56 -1
- package/dist/runtime/cli/commands.js.map +1 -1
- package/dist/runtime/cli/main.d.ts.map +1 -1
- package/dist/runtime/cli/main.js +5 -0
- package/dist/runtime/cli/main.js.map +1 -1
- package/dist/runtime/codesign-shim/codesign-router/protocol/types.mjs +1 -0
- package/dist/runtime/codesign-shim/codesign-router/release-build.generated.mjs +1 -1
- package/dist/server-client-types/protocol/types.d.ts +25 -3
- package/dist/server-client.mjs +1 -0
- package/dist/server.d.ts +2 -0
- package/dist/server.d.ts.map +1 -1
- package/dist/server.js +4 -2
- package/dist/server.js.map +1 -1
- package/node_modules/@imgly/codesign-billing/README.md +138 -0
- package/node_modules/@imgly/{codesign-sdk/dist/executor/billing → codesign-billing/dist}/charge.d.ts +30 -5
- package/node_modules/@imgly/codesign-billing/dist/charge.d.ts.map +1 -0
- package/node_modules/@imgly/{codesign-sdk/dist/executor/billing → codesign-billing/dist}/charge.js +16 -1
- package/node_modules/@imgly/codesign-billing/dist/charge.js.map +1 -0
- package/node_modules/@imgly/codesign-billing/dist/charges.d.ts +71 -0
- package/node_modules/@imgly/codesign-billing/dist/charges.d.ts.map +1 -0
- package/node_modules/@imgly/codesign-billing/dist/charges.js +198 -0
- package/node_modules/@imgly/codesign-billing/dist/charges.js.map +1 -0
- package/node_modules/@imgly/codesign-billing/dist/index.d.ts +6 -0
- package/node_modules/@imgly/codesign-billing/dist/index.d.ts.map +1 -0
- package/node_modules/@imgly/codesign-billing/dist/index.js +6 -0
- package/node_modules/@imgly/codesign-billing/dist/index.js.map +1 -0
- package/node_modules/@imgly/codesign-billing/dist/ledger.d.ts +55 -0
- package/node_modules/@imgly/codesign-billing/dist/ledger.d.ts.map +1 -0
- package/node_modules/@imgly/codesign-billing/dist/ledger.js +80 -0
- package/node_modules/@imgly/codesign-billing/dist/ledger.js.map +1 -0
- package/node_modules/@imgly/{codesign-sdk/dist/executor/billing → codesign-billing/dist}/metering.d.ts +9 -1
- package/node_modules/@imgly/codesign-billing/dist/metering.d.ts.map +1 -0
- package/node_modules/@imgly/{codesign-sdk/dist/executor/billing → codesign-billing/dist}/metering.js +77 -21
- package/node_modules/@imgly/codesign-billing/dist/metering.js.map +1 -0
- package/node_modules/@imgly/codesign-billing/dist/refusal.d.ts +20 -0
- package/node_modules/@imgly/codesign-billing/dist/refusal.d.ts.map +1 -0
- package/node_modules/@imgly/codesign-billing/dist/refusal.js +13 -0
- package/node_modules/@imgly/codesign-billing/dist/refusal.js.map +1 -0
- package/node_modules/@imgly/codesign-billing/package.json +30 -0
- package/node_modules/@imgly/codesign-router/dist/config/unit-config.d.ts +13 -5
- package/node_modules/@imgly/codesign-router/dist/config/unit-config.d.ts.map +1 -1
- package/node_modules/@imgly/codesign-router/dist/config/unit-config.js +18 -12
- package/node_modules/@imgly/codesign-router/dist/config/unit-config.js.map +1 -1
- package/node_modules/@imgly/codesign-router/dist/consent.d.ts +6 -2
- package/node_modules/@imgly/codesign-router/dist/consent.d.ts.map +1 -1
- package/node_modules/@imgly/codesign-router/dist/consent.js +65 -9
- package/node_modules/@imgly/codesign-router/dist/consent.js.map +1 -1
- package/node_modules/@imgly/codesign-router/dist/protocol/types.d.ts +25 -3
- package/node_modules/@imgly/codesign-router/dist/protocol/types.d.ts.map +1 -1
- package/node_modules/@imgly/codesign-router/dist/protocol/types.js +1 -0
- package/node_modules/@imgly/codesign-router/dist/protocol/types.js.map +1 -1
- package/node_modules/@imgly/codesign-router/dist/release-build.generated.d.ts +1 -1
- package/node_modules/@imgly/codesign-router/dist/release-build.generated.d.ts.map +1 -1
- package/node_modules/@imgly/codesign-router/dist/release-build.generated.js +1 -1
- package/node_modules/@imgly/codesign-router/dist/release-build.generated.js.map +1 -1
- package/node_modules/@imgly/codesign-router/dist/router/channels-v2.d.ts.map +1 -1
- package/node_modules/@imgly/codesign-router/dist/router/channels-v2.js +14 -4
- package/node_modules/@imgly/codesign-router/dist/router/channels-v2.js.map +1 -1
- package/node_modules/@imgly/codesign-router/dist/router/main.d.ts.map +1 -1
- package/node_modules/@imgly/codesign-router/dist/router/main.js +9 -1
- package/node_modules/@imgly/codesign-router/dist/router/main.js.map +1 -1
- package/node_modules/@imgly/codesign-sdk/CHANGELOG.md +24 -0
- package/node_modules/@imgly/codesign-sdk/README.md +8 -7
- package/node_modules/@imgly/codesign-sdk/dist/abort.d.ts +1 -0
- package/node_modules/@imgly/codesign-sdk/dist/abort.js +18 -0
- package/node_modules/@imgly/codesign-sdk/dist/assets/inline.generated.js +12 -12
- package/node_modules/@imgly/codesign-sdk/dist/browser/index.d.ts +1 -1
- package/node_modules/@imgly/codesign-sdk/dist/browser/worker.d.ts +1 -1
- package/node_modules/@imgly/codesign-sdk/dist/browser/worker.js +15 -8
- package/node_modules/@imgly/codesign-sdk/dist/cesdk-utils/index.js +2 -0
- package/node_modules/@imgly/codesign-sdk/dist/codesign-error.d.ts +38 -1
- package/node_modules/@imgly/codesign-sdk/dist/codesign-error.js +9 -0
- package/node_modules/@imgly/codesign-sdk/dist/codesign.d.ts +19 -12
- package/node_modules/@imgly/codesign-sdk/dist/codesign.js +268 -43
- package/node_modules/@imgly/codesign-sdk/dist/design/animatable.generated.js +3 -0
- package/node_modules/@imgly/codesign-sdk/dist/design/capabilities.generated.js +1 -0
- package/node_modules/@imgly/codesign-sdk/dist/design/facade.d.ts +1 -1
- package/node_modules/@imgly/codesign-sdk/dist/design/facade.js +128 -36
- package/node_modules/@imgly/codesign-sdk/dist/design/keyframes.js +2 -1
- package/node_modules/@imgly/codesign-sdk/dist/design/lint.d.ts +1 -1
- package/node_modules/@imgly/codesign-sdk/dist/design/lint.js +82 -5
- package/node_modules/@imgly/codesign-sdk/dist/design/props.generated.js +3 -0
- package/node_modules/@imgly/codesign-sdk/dist/design/run-offsets.d.ts +10 -0
- package/node_modules/@imgly/codesign-sdk/dist/design/run-offsets.js +26 -0
- package/node_modules/@imgly/codesign-sdk/dist/design/scene-lint.d.ts +23 -1
- package/node_modules/@imgly/codesign-sdk/dist/design/scene-lint.js +194 -3
- package/node_modules/@imgly/codesign-sdk/dist/design/timeline-poses.d.ts +8 -0
- package/node_modules/@imgly/codesign-sdk/dist/design/timeline-poses.js +53 -0
- package/node_modules/@imgly/codesign-sdk/dist/design/variables.d.ts +14 -0
- package/node_modules/@imgly/codesign-sdk/dist/design/variables.js +250 -37
- package/node_modules/@imgly/codesign-sdk/dist/designs/s3-presigner.d.ts +50 -0
- package/node_modules/@imgly/codesign-sdk/dist/designs/s3-presigner.js +116 -0
- package/node_modules/@imgly/codesign-sdk/dist/designs/types.d.ts +79 -3
- package/node_modules/@imgly/codesign-sdk/dist/engine/audio-extract.d.ts +12 -1
- package/node_modules/@imgly/codesign-sdk/dist/engine/audio-extract.js +20 -4
- package/node_modules/@imgly/codesign-sdk/dist/engine/engine-capacity.d.ts +20 -7
- package/node_modules/@imgly/codesign-sdk/dist/engine/engine-capacity.js +31 -14
- package/node_modules/@imgly/codesign-sdk/dist/engine/headless.d.ts +4 -0
- package/node_modules/@imgly/codesign-sdk/dist/engine/headless.js +20 -0
- package/node_modules/@imgly/codesign-sdk/dist/executor/billing/check.d.ts +1 -14
- package/node_modules/@imgly/codesign-sdk/dist/executor/billing/check.js +2 -7
- package/node_modules/@imgly/codesign-sdk/dist/executor/billing/metered.d.ts +1 -2
- package/node_modules/@imgly/codesign-sdk/dist/executor/billing/metered.js +120 -91
- package/node_modules/@imgly/codesign-sdk/dist/executor/encode-watchdog.d.ts +2 -2
- package/node_modules/@imgly/codesign-sdk/dist/executor/encode-watchdog.js +10 -4
- package/node_modules/@imgly/codesign-sdk/dist/executor/engine-protocol.d.ts +1 -1
- package/node_modules/@imgly/codesign-sdk/dist/executor/engine-protocol.js +13 -3
- package/node_modules/@imgly/codesign-sdk/dist/executor/executor-options.d.ts +6 -7
- package/node_modules/@imgly/codesign-sdk/dist/executor/executor-options.js +14 -7
- package/node_modules/@imgly/codesign-sdk/dist/executor/handler.d.ts +47 -2
- package/node_modules/@imgly/codesign-sdk/dist/executor/handler.js +519 -8
- package/node_modules/@imgly/codesign-sdk/dist/executor/node.d.ts +42 -6
- package/node_modules/@imgly/codesign-sdk/dist/executor/node.js +231 -9
- package/node_modules/@imgly/codesign-sdk/dist/exporters/fig.d.ts +13 -0
- package/node_modules/@imgly/codesign-sdk/dist/exporters/fig.js +28 -0
- package/node_modules/@imgly/codesign-sdk/dist/exporters/html.d.ts +18 -2
- package/node_modules/@imgly/codesign-sdk/dist/exporters/html.js +129 -15
- package/node_modules/@imgly/codesign-sdk/dist/exporters/index.d.ts +5 -2
- package/node_modules/@imgly/codesign-sdk/dist/exporters/index.js +2 -2
- package/node_modules/@imgly/codesign-sdk/dist/exporters/node.d.ts +1 -1
- package/node_modules/@imgly/codesign-sdk/dist/exporters/node.js +4 -3
- package/node_modules/@imgly/codesign-sdk/dist/exporters/psd.js +1 -1
- package/node_modules/@imgly/codesign-sdk/dist/formats/av-limit.d.ts +2 -0
- package/node_modules/@imgly/codesign-sdk/dist/formats/av-limit.js +1 -1
- package/node_modules/@imgly/codesign-sdk/dist/formats/design-sniff.d.ts +3 -1
- package/node_modules/@imgly/codesign-sdk/dist/formats/design-sniff.js +7 -0
- package/node_modules/@imgly/codesign-sdk/dist/formats/import-registry.d.ts +1 -1
- package/node_modules/@imgly/codesign-sdk/dist/formats/import-registry.js +4 -2
- package/node_modules/@imgly/codesign-sdk/dist/formats/import-warnings.d.ts +5 -0
- package/node_modules/@imgly/codesign-sdk/dist/formats/import-warnings.js +31 -0
- package/node_modules/@imgly/codesign-sdk/dist/formats/media-facts.d.ts +15 -0
- package/node_modules/@imgly/codesign-sdk/dist/formats/media-facts.js +26 -0
- package/node_modules/@imgly/codesign-sdk/dist/formats/mime.d.ts +6 -0
- package/node_modules/@imgly/codesign-sdk/dist/formats/mime.js +37 -0
- package/node_modules/@imgly/codesign-sdk/dist/formats/refuse-media.d.ts +7 -0
- package/node_modules/@imgly/codesign-sdk/dist/formats/refuse-media.js +46 -0
- package/node_modules/@imgly/codesign-sdk/dist/formats/svg-export.d.ts +6 -0
- package/node_modules/@imgly/codesign-sdk/dist/formats/svg-export.js +20 -0
- package/node_modules/@imgly/codesign-sdk/dist/formats/svg-import.d.ts +3 -0
- package/node_modules/@imgly/codesign-sdk/dist/formats/svg-import.js +25 -0
- package/node_modules/@imgly/codesign-sdk/dist/formats/zip-entries.d.ts +2 -0
- package/node_modules/@imgly/codesign-sdk/dist/formats/zip-entries.js +1 -0
- package/node_modules/@imgly/codesign-sdk/dist/gateway/asset-generate.d.ts +10 -4
- package/node_modules/@imgly/codesign-sdk/dist/gateway/asset-generate.js +205 -79
- package/node_modules/@imgly/codesign-sdk/dist/gateway/client.d.ts +23 -2
- package/node_modules/@imgly/codesign-sdk/dist/gateway/client.js +40 -41
- package/node_modules/@imgly/codesign-sdk/dist/gateway/index.d.ts +3 -0
- package/node_modules/@imgly/codesign-sdk/dist/gateway/index.js +4 -0
- package/node_modules/@imgly/codesign-sdk/dist/gateway/types.d.ts +18 -3
- package/node_modules/@imgly/codesign-sdk/dist/gateway/upload-origin.d.ts +3 -0
- package/node_modules/@imgly/codesign-sdk/dist/gateway/upload-origin.js +5 -0
- package/node_modules/@imgly/codesign-sdk/dist/host/edit-code.d.ts +2 -0
- package/node_modules/@imgly/codesign-sdk/dist/host/edit-code.js +8 -1
- package/node_modules/@imgly/codesign-sdk/dist/host/preview-size.d.ts +4 -2
- package/node_modules/@imgly/codesign-sdk/dist/host/preview-size.js +7 -4
- package/node_modules/@imgly/codesign-sdk/dist/host.d.ts +34 -5
- package/node_modules/@imgly/codesign-sdk/dist/host.js +6 -0
- package/node_modules/@imgly/codesign-sdk/dist/importers/fig.d.ts +4 -0
- package/node_modules/@imgly/codesign-sdk/dist/importers/fig.js +57 -0
- package/node_modules/@imgly/codesign-sdk/dist/importers/index.d.ts +2 -2
- package/node_modules/@imgly/codesign-sdk/dist/importers/index.js +38 -25
- package/node_modules/@imgly/codesign-sdk/dist/importers/node.d.ts +5 -0
- package/node_modules/@imgly/codesign-sdk/dist/importers/node.js +8 -0
- package/node_modules/@imgly/codesign-sdk/dist/importers/pdf-fonts.d.ts +20 -0
- package/node_modules/@imgly/codesign-sdk/dist/importers/pdf-fonts.js +76 -0
- package/node_modules/@imgly/codesign-sdk/dist/importers/shared.d.ts +14 -0
- package/node_modules/@imgly/codesign-sdk/dist/importers/shared.js +18 -0
- package/node_modules/@imgly/codesign-sdk/dist/index.d.ts +5 -4
- package/node_modules/@imgly/codesign-sdk/dist/index.js +2 -1
- package/node_modules/@imgly/codesign-sdk/dist/internal/index.d.ts +24 -17
- package/node_modules/@imgly/codesign-sdk/dist/internal/index.js +19 -10
- package/node_modules/@imgly/codesign-sdk/dist/node/edit-renders.d.ts +5 -0
- package/node_modules/@imgly/codesign-sdk/dist/node/edit-renders.js +73 -0
- package/node_modules/@imgly/codesign-sdk/dist/node/engine-child.js +18 -2
- package/node_modules/@imgly/codesign-sdk/dist/node/engine-http.js +8 -2
- package/node_modules/@imgly/codesign-sdk/dist/node/index.d.ts +1 -0
- package/node_modules/@imgly/codesign-sdk/dist/node/index.js +1 -0
- package/node_modules/@imgly/codesign-sdk/dist/node/media-probe.js +1 -1
- package/node_modules/@imgly/codesign-sdk/dist/sdk-version.generated.js +2 -2
- package/node_modules/@imgly/codesign-sdk/dist/session/engine-session.d.ts +59 -13
- package/node_modules/@imgly/codesign-sdk/dist/session/engine-session.js +19 -0
- package/node_modules/@imgly/codesign-sdk/dist/session/export-facts.d.ts +1 -14
- package/node_modules/@imgly/codesign-sdk/dist/session/export-facts.js +15 -4
- package/node_modules/@imgly/codesign-sdk/dist/session/file-formats.d.ts +5 -0
- package/node_modules/@imgly/codesign-sdk/dist/session/guarded-engine-session.d.ts +2 -0
- package/node_modules/@imgly/codesign-sdk/dist/session/guarded-engine-session.js +18 -7
- package/node_modules/@imgly/codesign-sdk/dist/session/local-engine-session.js +247 -68
- package/node_modules/@imgly/codesign-sdk/dist/session/local-engine.js +2 -2
- package/node_modules/@imgly/codesign-sdk/dist/session/multipart.js +10 -2
- package/node_modules/@imgly/codesign-sdk/dist/session/pending-video.js +2 -3
- package/node_modules/@imgly/codesign-sdk/dist/session/read-resolved.js +93 -6
- package/node_modules/@imgly/codesign-sdk/dist/session/remote.d.ts +34 -10
- package/node_modules/@imgly/codesign-sdk/dist/session/remote.js +377 -87
- package/node_modules/@imgly/codesign-sdk/dist/session/render-id.js +11 -2
- package/node_modules/@imgly/codesign-sdk/dist/session/session.d.ts +67 -6
- package/node_modules/@imgly/codesign-sdk/dist/session/session.js +213 -32
- package/node_modules/@imgly/codesign-sdk/dist/session/silent-audio.d.ts +18 -0
- package/node_modules/@imgly/codesign-sdk/dist/session/silent-audio.js +47 -0
- package/node_modules/@imgly/codesign-sdk/dist/session/transfers.d.ts +85 -0
- package/node_modules/@imgly/codesign-sdk/dist/session/transfers.js +80 -0
- package/node_modules/@imgly/codesign-sdk/dist/session/url-guard.d.ts +30 -0
- package/node_modules/@imgly/codesign-sdk/dist/session/url-guard.js +187 -0
- package/node_modules/@imgly/codesign-sdk/dist/session/url-source.d.ts +21 -0
- package/node_modules/@imgly/codesign-sdk/dist/session/url-source.js +163 -0
- package/node_modules/@imgly/codesign-sdk/dist/session/wire.d.ts +8 -1
- package/node_modules/@imgly/codesign-sdk/dist/session/wire.js +2 -1
- package/node_modules/@imgly/codesign-sdk/dist/session-instructions.js +2 -2
- package/node_modules/@imgly/codesign-sdk/dist/sessions/state.d.ts +3 -1
- package/node_modules/@imgly/codesign-sdk/dist/sessions/state.js +5 -1
- package/node_modules/@imgly/codesign-sdk/dist/signed-urls.d.ts +3 -0
- package/node_modules/@imgly/codesign-sdk/dist/signed-urls.js +30 -0
- package/node_modules/@imgly/codesign-sdk/dist/skill-tool.js +12 -12
- package/node_modules/@imgly/codesign-sdk/dist/sources/handshake.d.ts +2 -0
- package/node_modules/@imgly/codesign-sdk/dist/sources/mime.js +0 -1
- package/node_modules/@imgly/codesign-sdk/dist/sources/route.d.ts +8 -1
- package/node_modules/@imgly/codesign-sdk/dist/sources/route.js +17 -2
- package/node_modules/@imgly/codesign-sdk/dist/sources/search.js +9 -2
- package/node_modules/@imgly/codesign-sdk/dist/sources/types.d.ts +8 -1
- package/node_modules/@imgly/codesign-sdk/dist/testing/conformance.js +11 -6
- package/node_modules/@imgly/codesign-sdk/dist/testing/fake-engine.d.ts +1 -1
- package/node_modules/@imgly/codesign-sdk/dist/testing/fake-engine.js +11 -4
- package/node_modules/@imgly/codesign-sdk/dist/tools/edit.js +11 -4
- package/node_modules/@imgly/codesign-sdk/dist/tools/errors.js +2 -2
- package/node_modules/@imgly/codesign-sdk/dist/tools/export-formats/table.d.ts +4 -4
- package/node_modules/@imgly/codesign-sdk/dist/tools/export-formats/table.js +8 -0
- package/node_modules/@imgly/codesign-sdk/dist/tools/export.d.ts +3 -1
- package/node_modules/@imgly/codesign-sdk/dist/tools/export.js +75 -12
- package/node_modules/@imgly/codesign-sdk/dist/tools/omit-defaults.d.ts +3 -0
- package/node_modules/@imgly/codesign-sdk/dist/tools/omit-defaults.js +7 -0
- package/node_modules/@imgly/codesign-sdk/dist/tools/preview.js +42 -19
- package/node_modules/@imgly/codesign-sdk/dist/tools/source-tools.js +11 -4
- package/node_modules/@imgly/codesign-sdk/package.json +18 -10
- package/node_modules/@imgly/codesign-server/assets/ai-plugins/apps.mjs +5 -5
- package/node_modules/@imgly/codesign-server/assets/ai-plugins/image-gateway.mjs +5 -5
- package/node_modules/@imgly/codesign-server/assets/ai-plugins/version.json +1 -1
- package/node_modules/@imgly/codesign-server/dist/catalog/link.d.ts.map +1 -1
- package/node_modules/@imgly/codesign-server/dist/catalog/link.js +2 -1
- package/node_modules/@imgly/codesign-server/dist/catalog/link.js.map +1 -1
- package/node_modules/@imgly/codesign-server/dist/catalog/local-server.d.ts.map +1 -1
- package/node_modules/@imgly/codesign-server/dist/catalog/local-server.js +1 -0
- package/node_modules/@imgly/codesign-server/dist/catalog/local-server.js.map +1 -1
- package/node_modules/@imgly/codesign-server/dist/catalog/tools/asset-add.d.ts +59 -1
- package/node_modules/@imgly/codesign-server/dist/catalog/tools/asset-add.d.ts.map +1 -1
- package/node_modules/@imgly/codesign-server/dist/catalog/tools/asset-add.js +127 -23
- package/node_modules/@imgly/codesign-server/dist/catalog/tools/asset-add.js.map +1 -1
- package/node_modules/@imgly/codesign-server/dist/catalog/tools/asset-search.d.ts +7 -0
- package/node_modules/@imgly/codesign-server/dist/catalog/tools/asset-search.d.ts.map +1 -1
- package/node_modules/@imgly/codesign-server/dist/catalog/tools/asset-search.js +65 -15
- package/node_modules/@imgly/codesign-server/dist/catalog/tools/asset-search.js.map +1 -1
- package/node_modules/@imgly/codesign-server/dist/catalog/tools/checklist.d.ts +2 -0
- package/node_modules/@imgly/codesign-server/dist/catalog/tools/checklist.d.ts.map +1 -1
- package/node_modules/@imgly/codesign-server/dist/catalog/tools/checklist.js +15 -5
- package/node_modules/@imgly/codesign-server/dist/catalog/tools/checklist.js.map +1 -1
- package/node_modules/@imgly/codesign-server/dist/catalog/tools/export-description.d.ts +1 -1
- package/node_modules/@imgly/codesign-server/dist/catalog/tools/export-description.d.ts.map +1 -1
- package/node_modules/@imgly/codesign-server/dist/catalog/tools/export-description.js +7 -6
- package/node_modules/@imgly/codesign-server/dist/catalog/tools/export-description.js.map +1 -1
- package/node_modules/@imgly/codesign-server/dist/catalog/tools/export-formats/modules.d.ts +2 -2
- package/node_modules/@imgly/codesign-server/dist/catalog/tools/export-formats/modules.d.ts.map +1 -1
- package/node_modules/@imgly/codesign-server/dist/catalog/tools/export-formats/modules.js +14 -4
- package/node_modules/@imgly/codesign-server/dist/catalog/tools/export-formats/modules.js.map +1 -1
- package/node_modules/@imgly/codesign-server/dist/catalog/tools/import.d.ts +10 -0
- package/node_modules/@imgly/codesign-server/dist/catalog/tools/import.d.ts.map +1 -1
- package/node_modules/@imgly/codesign-server/dist/catalog/tools/import.js +106 -22
- package/node_modules/@imgly/codesign-server/dist/catalog/tools/import.js.map +1 -1
- package/node_modules/@imgly/codesign-server/dist/cli/connectors.js +1 -1
- package/node_modules/@imgly/codesign-server/dist/cli/connectors.js.map +1 -1
- package/node_modules/@imgly/codesign-server/dist/cli/doctor/checks/mcp-servers.js +1 -1
- package/node_modules/@imgly/codesign-server/dist/cli/doctor/checks/mcp-servers.js.map +1 -1
- package/node_modules/@imgly/codesign-server/dist/cli/pack.d.ts +1 -1
- package/node_modules/@imgly/codesign-server/dist/cli/pack.d.ts.map +1 -1
- package/node_modules/@imgly/codesign-server/dist/cli/pack.js +24 -18
- package/node_modules/@imgly/codesign-server/dist/cli/pack.js.map +1 -1
- package/node_modules/@imgly/codesign-server/dist/conversation/instructions.js +1 -1
- package/node_modules/@imgly/codesign-server/dist/conversation/instructions.js.map +1 -1
- package/node_modules/@imgly/codesign-server/dist/conversation/main.d.ts.map +1 -1
- package/node_modules/@imgly/codesign-server/dist/conversation/main.js +4 -3
- package/node_modules/@imgly/codesign-server/dist/conversation/main.js.map +1 -1
- package/node_modules/@imgly/codesign-server/dist/conversation/stage.d.ts +4 -0
- package/node_modules/@imgly/codesign-server/dist/conversation/stage.d.ts.map +1 -1
- package/node_modules/@imgly/codesign-server/dist/conversation/stage.js +13 -0
- package/node_modules/@imgly/codesign-server/dist/conversation/stage.js.map +1 -1
- package/node_modules/@imgly/codesign-server/dist/credentials/credential-store.d.ts +0 -6
- package/node_modules/@imgly/codesign-server/dist/credentials/credential-store.d.ts.map +1 -1
- package/node_modules/@imgly/codesign-server/dist/credentials/credential-store.js +0 -58
- package/node_modules/@imgly/codesign-server/dist/credentials/credential-store.js.map +1 -1
- package/node_modules/@imgly/codesign-server/dist/credentials/keychain.d.ts +10 -0
- package/node_modules/@imgly/codesign-server/dist/credentials/keychain.d.ts.map +1 -0
- package/node_modules/@imgly/codesign-server/dist/credentials/keychain.js +84 -0
- package/node_modules/@imgly/codesign-server/dist/credentials/keychain.js.map +1 -0
- package/node_modules/@imgly/codesign-server/dist/credentials/token-store.d.ts +1 -3
- package/node_modules/@imgly/codesign-server/dist/credentials/token-store.d.ts.map +1 -1
- package/node_modules/@imgly/codesign-server/dist/credentials/token-store.js +3 -23
- package/node_modules/@imgly/codesign-server/dist/credentials/token-store.js.map +1 -1
- package/node_modules/@imgly/codesign-server/dist/design/design-library-tools.d.ts +59 -8
- package/node_modules/@imgly/codesign-server/dist/design/design-library-tools.d.ts.map +1 -1
- package/node_modules/@imgly/codesign-server/dist/design/design-library-tools.js +317 -40
- package/node_modules/@imgly/codesign-server/dist/design/design-library-tools.js.map +1 -1
- package/node_modules/@imgly/codesign-server/dist/design/engine.js +4 -9
- package/node_modules/@imgly/codesign-server/dist/design/engine.js.map +1 -1
- package/node_modules/@imgly/codesign-server/dist/design/engines.d.ts +5 -0
- package/node_modules/@imgly/codesign-server/dist/design/engines.d.ts.map +1 -1
- package/node_modules/@imgly/codesign-server/dist/design/engines.js +49 -0
- package/node_modules/@imgly/codesign-server/dist/design/engines.js.map +1 -1
- package/node_modules/@imgly/codesign-server/dist/design/host.d.ts +2 -0
- package/node_modules/@imgly/codesign-server/dist/design/host.d.ts.map +1 -1
- package/node_modules/@imgly/codesign-server/dist/design/host.js +10 -6
- package/node_modules/@imgly/codesign-server/dist/design/host.js.map +1 -1
- package/node_modules/@imgly/codesign-server/dist/design/lazy-executors.d.ts.map +1 -1
- package/node_modules/@imgly/codesign-server/dist/design/lazy-executors.js +34 -5
- package/node_modules/@imgly/codesign-server/dist/design/lazy-executors.js.map +1 -1
- package/node_modules/@imgly/codesign-server/dist/design/local-design.d.ts +42 -5
- package/node_modules/@imgly/codesign-server/dist/design/local-design.d.ts.map +1 -1
- package/node_modules/@imgly/codesign-server/dist/design/local-design.js +175 -38
- package/node_modules/@imgly/codesign-server/dist/design/local-design.js.map +1 -1
- package/node_modules/@imgly/codesign-server/dist/design/local-tools.d.ts +27 -1
- package/node_modules/@imgly/codesign-server/dist/design/local-tools.d.ts.map +1 -1
- package/node_modules/@imgly/codesign-server/dist/design/local-tools.js +65 -7
- package/node_modules/@imgly/codesign-server/dist/design/local-tools.js.map +1 -1
- package/node_modules/@imgly/codesign-server/dist/design/main.d.ts.map +1 -1
- package/node_modules/@imgly/codesign-server/dist/design/main.js +23 -10
- package/node_modules/@imgly/codesign-server/dist/design/main.js.map +1 -1
- package/node_modules/@imgly/codesign-server/dist/design/node-exporters.d.ts +4 -0
- package/node_modules/@imgly/codesign-server/dist/design/node-exporters.d.ts.map +1 -0
- package/node_modules/@imgly/codesign-server/dist/design/node-exporters.js +13 -0
- package/node_modules/@imgly/codesign-server/dist/design/node-exporters.js.map +1 -0
- package/node_modules/@imgly/codesign-server/dist/design/probe-media.d.ts +2 -0
- package/node_modules/@imgly/codesign-server/dist/design/probe-media.d.ts.map +1 -0
- package/node_modules/@imgly/codesign-server/dist/design/probe-media.js +16 -0
- package/node_modules/@imgly/codesign-server/dist/design/probe-media.js.map +1 -0
- package/node_modules/@imgly/codesign-server/dist/design/remote-resources.d.ts +22 -3
- package/node_modules/@imgly/codesign-server/dist/design/remote-resources.d.ts.map +1 -1
- package/node_modules/@imgly/codesign-server/dist/design/remote-resources.js +123 -32
- package/node_modules/@imgly/codesign-server/dist/design/remote-resources.js.map +1 -1
- package/node_modules/@imgly/codesign-server/dist/design/save.d.ts +5 -0
- package/node_modules/@imgly/codesign-server/dist/design/save.d.ts.map +1 -1
- package/node_modules/@imgly/codesign-server/dist/design/save.js +9 -0
- package/node_modules/@imgly/codesign-server/dist/design/save.js.map +1 -1
- package/node_modules/@imgly/codesign-server/dist/design/sessions/store.d.ts +33 -4
- package/node_modules/@imgly/codesign-server/dist/design/sessions/store.d.ts.map +1 -1
- package/node_modules/@imgly/codesign-server/dist/design/sessions/store.js +121 -43
- package/node_modules/@imgly/codesign-server/dist/design/sessions/store.js.map +1 -1
- package/node_modules/@imgly/codesign-server/dist/design/workspace-files.d.ts +8 -0
- package/node_modules/@imgly/codesign-server/dist/design/workspace-files.d.ts.map +1 -1
- package/node_modules/@imgly/codesign-server/dist/design/workspace-files.js +50 -61
- package/node_modules/@imgly/codesign-server/dist/design/workspace-files.js.map +1 -1
- package/node_modules/@imgly/codesign-server/dist/design/workspace-library.d.ts +24 -2
- package/node_modules/@imgly/codesign-server/dist/design/workspace-library.d.ts.map +1 -1
- package/node_modules/@imgly/codesign-server/dist/design/workspace-library.js +132 -17
- package/node_modules/@imgly/codesign-server/dist/design/workspace-library.js.map +1 -1
- package/node_modules/@imgly/codesign-server/dist/services/archives/create.d.ts.map +1 -1
- package/node_modules/@imgly/codesign-server/dist/services/archives/create.js +19 -6
- package/node_modules/@imgly/codesign-server/dist/services/archives/create.js.map +1 -1
- package/node_modules/@imgly/codesign-server/dist/services/archives/handlers.d.ts.map +1 -1
- package/node_modules/@imgly/codesign-server/dist/services/archives/handlers.js +10 -7
- package/node_modules/@imgly/codesign-server/dist/services/archives/handlers.js.map +1 -1
- package/node_modules/@imgly/codesign-server/dist/services/archives/pack.d.ts +3 -1
- package/node_modules/@imgly/codesign-server/dist/services/archives/pack.d.ts.map +1 -1
- package/node_modules/@imgly/codesign-server/dist/services/archives/pack.js +5 -4
- package/node_modules/@imgly/codesign-server/dist/services/archives/pack.js.map +1 -1
- package/node_modules/@imgly/codesign-server/dist/services/archives/seed-pack.d.ts +56 -0
- package/node_modules/@imgly/codesign-server/dist/services/archives/seed-pack.d.ts.map +1 -0
- package/node_modules/@imgly/codesign-server/dist/services/archives/seed-pack.js +218 -0
- package/node_modules/@imgly/codesign-server/dist/services/archives/seed-pack.js.map +1 -0
- package/node_modules/@imgly/codesign-server/dist/services/archives/seed.d.ts.map +1 -1
- package/node_modules/@imgly/codesign-server/dist/services/archives/seed.js +33 -124
- package/node_modules/@imgly/codesign-server/dist/services/archives/seed.js.map +1 -1
- package/node_modules/@imgly/codesign-server/dist/services/archives/template.d.ts +1 -0
- package/node_modules/@imgly/codesign-server/dist/services/archives/template.d.ts.map +1 -1
- package/node_modules/@imgly/codesign-server/dist/services/archives/template.js +1 -1
- package/node_modules/@imgly/codesign-server/dist/services/archives/template.js.map +1 -1
- package/node_modules/@imgly/codesign-server/dist/services/auth/login-manager.d.ts.map +1 -1
- package/node_modules/@imgly/codesign-server/dist/services/auth/login-manager.js +2 -1
- package/node_modules/@imgly/codesign-server/dist/services/auth/login-manager.js.map +1 -1
- package/node_modules/@imgly/codesign-server/dist/services/diagnostics/status.d.ts +9 -5
- package/node_modules/@imgly/codesign-server/dist/services/diagnostics/status.d.ts.map +1 -1
- package/node_modules/@imgly/codesign-server/dist/services/diagnostics/status.js +14 -19
- package/node_modules/@imgly/codesign-server/dist/services/diagnostics/status.js.map +1 -1
- package/node_modules/@imgly/codesign-server/dist/services/diagnostics/tool.d.ts +2 -0
- package/node_modules/@imgly/codesign-server/dist/services/diagnostics/tool.d.ts.map +1 -1
- package/node_modules/@imgly/codesign-server/dist/services/diagnostics/tool.js +1 -0
- package/node_modules/@imgly/codesign-server/dist/services/diagnostics/tool.js.map +1 -1
- package/node_modules/@imgly/codesign-server/dist/services/engine/workspace-image-source.d.ts.map +1 -1
- package/node_modules/@imgly/codesign-server/dist/services/engine/workspace-image-source.js +4 -1
- package/node_modules/@imgly/codesign-server/dist/services/engine/workspace-image-source.js.map +1 -1
- package/node_modules/@imgly/codesign-server/dist/services/engine/workspace-source-module.d.ts +5 -1
- package/node_modules/@imgly/codesign-server/dist/services/engine/workspace-source-module.d.ts.map +1 -1
- package/node_modules/@imgly/codesign-server/dist/services/engine/workspace-source-module.js +67 -6
- package/node_modules/@imgly/codesign-server/dist/services/engine/workspace-source-module.js.map +1 -1
- package/node_modules/@imgly/codesign-server/dist/services/flags/manifest.js +2 -2
- package/node_modules/@imgly/codesign-server/dist/services/flags/manifest.js.map +1 -1
- package/node_modules/@imgly/codesign-server/dist/services/flags/release-flags.generated.d.ts +3 -3
- package/node_modules/@imgly/codesign-server/dist/services/flags/release-flags.generated.d.ts.map +1 -1
- package/node_modules/@imgly/codesign-server/dist/services/flags/release-flags.generated.js +3 -3
- package/node_modules/@imgly/codesign-server/dist/services/flags/release-flags.generated.js.map +1 -1
- package/node_modules/@imgly/codesign-server/dist/services/gateway-bearer.d.ts +15 -0
- package/node_modules/@imgly/codesign-server/dist/services/gateway-bearer.d.ts.map +1 -0
- package/node_modules/@imgly/codesign-server/dist/services/gateway-bearer.js +14 -0
- package/node_modules/@imgly/codesign-server/dist/services/gateway-bearer.js.map +1 -0
- package/node_modules/@imgly/codesign-server/dist/services/telemetry/error-policy.d.ts.map +1 -1
- package/node_modules/@imgly/codesign-server/dist/services/telemetry/error-policy.js +36 -0
- package/node_modules/@imgly/codesign-server/dist/services/telemetry/error-policy.js.map +1 -1
- package/node_modules/@imgly/codesign-server/dist/services/telemetry/usage-sink.d.ts +2 -2
- package/node_modules/@imgly/codesign-server/dist/services/telemetry/usage-sink.d.ts.map +1 -1
- package/node_modules/@imgly/codesign-server/dist/services/telemetry/usage-sink.js +3 -5
- package/node_modules/@imgly/codesign-server/dist/services/telemetry/usage-sink.js.map +1 -1
- package/node_modules/@imgly/codesign-server/dist/services/viewer/ai-plugin-assets.d.ts.map +1 -1
- package/node_modules/@imgly/codesign-server/dist/services/viewer/ai-plugin-assets.js +5 -4
- package/node_modules/@imgly/codesign-server/dist/services/viewer/ai-plugin-assets.js.map +1 -1
- package/node_modules/@imgly/codesign-server/dist/services/viewer/spa-assets.generated.d.ts.map +1 -1
- package/node_modules/@imgly/codesign-server/dist/services/viewer/spa-assets.generated.js +0 -64
- package/node_modules/@imgly/codesign-server/dist/services/viewer/spa-assets.generated.js.map +1 -1
- package/node_modules/@imgly/codesign-server/dist/services/viewer/url-builder.d.ts +4 -0
- package/node_modules/@imgly/codesign-server/dist/services/viewer/url-builder.d.ts.map +1 -1
- package/node_modules/@imgly/codesign-server/dist/services/viewer/url-builder.js +4 -0
- package/node_modules/@imgly/codesign-server/dist/services/viewer/url-builder.js.map +1 -1
- package/node_modules/@imgly/codesign-server/dist/services/viewer/workspace-source-route.d.ts.map +1 -1
- package/node_modules/@imgly/codesign-server/dist/services/viewer/workspace-source-route.js +2 -24
- package/node_modules/@imgly/codesign-server/dist/services/viewer/workspace-source-route.js.map +1 -1
- package/node_modules/@imgly/codesign-server/dist/services/workspace/asset-sidecars.d.ts +4 -2
- package/node_modules/@imgly/codesign-server/dist/services/workspace/asset-sidecars.d.ts.map +1 -1
- package/node_modules/@imgly/codesign-server/dist/services/workspace/asset-sidecars.js +15 -14
- package/node_modules/@imgly/codesign-server/dist/services/workspace/asset-sidecars.js.map +1 -1
- package/node_modules/@imgly/codesign-server/dist/services/workspace/asset-store.d.ts +12 -2
- package/node_modules/@imgly/codesign-server/dist/services/workspace/asset-store.d.ts.map +1 -1
- package/node_modules/@imgly/codesign-server/dist/services/workspace/asset-store.js +42 -12
- package/node_modules/@imgly/codesign-server/dist/services/workspace/asset-store.js.map +1 -1
- package/node_modules/@imgly/codesign-server/dist/services/workspace/assets-handlers.d.ts.map +1 -1
- package/node_modules/@imgly/codesign-server/dist/services/workspace/assets-handlers.js +1 -2
- package/node_modules/@imgly/codesign-server/dist/services/workspace/assets-handlers.js.map +1 -1
- package/node_modules/@imgly/codesign-server/dist/services/workspace/image-listing.d.ts.map +1 -1
- package/node_modules/@imgly/codesign-server/dist/services/workspace/image-listing.js +24 -2
- package/node_modules/@imgly/codesign-server/dist/services/workspace/image-listing.js.map +1 -1
- package/node_modules/@imgly/codesign-server/dist/services/workspace/layout-keys.d.ts +47 -0
- package/node_modules/@imgly/codesign-server/dist/services/workspace/layout-keys.d.ts.map +1 -0
- package/node_modules/@imgly/codesign-server/dist/services/workspace/layout-keys.js +167 -0
- package/node_modules/@imgly/codesign-server/dist/services/workspace/layout-keys.js.map +1 -0
- package/node_modules/@imgly/codesign-server/dist/services/workspace/layout.d.ts +2 -0
- package/node_modules/@imgly/codesign-server/dist/services/workspace/layout.d.ts.map +1 -1
- package/node_modules/@imgly/codesign-server/dist/services/workspace/layout.js +2 -0
- package/node_modules/@imgly/codesign-server/dist/services/workspace/layout.js.map +1 -1
- package/node_modules/@imgly/codesign-server/dist/services/workspace/object-store-fs.d.ts +32 -0
- package/node_modules/@imgly/codesign-server/dist/services/workspace/object-store-fs.d.ts.map +1 -0
- package/node_modules/@imgly/codesign-server/dist/services/workspace/object-store-fs.js +79 -0
- package/node_modules/@imgly/codesign-server/dist/services/workspace/object-store-fs.js.map +1 -0
- package/node_modules/@imgly/codesign-server/dist/services/workspace/object-store-workspace.d.ts +35 -0
- package/node_modules/@imgly/codesign-server/dist/services/workspace/object-store-workspace.d.ts.map +1 -0
- package/node_modules/@imgly/codesign-server/dist/services/workspace/object-store-workspace.js +185 -0
- package/node_modules/@imgly/codesign-server/dist/services/workspace/object-store-workspace.js.map +1 -0
- package/node_modules/@imgly/codesign-server/dist/services/workspace/object-store.d.ts +74 -0
- package/node_modules/@imgly/codesign-server/dist/services/workspace/object-store.d.ts.map +1 -0
- package/node_modules/@imgly/codesign-server/dist/services/workspace/object-store.js +82 -0
- package/node_modules/@imgly/codesign-server/dist/services/workspace/object-store.js.map +1 -0
- package/node_modules/@imgly/codesign-server/dist/services/workspace/types.d.ts +10 -0
- package/node_modules/@imgly/codesign-server/dist/services/workspace/types.d.ts.map +1 -1
- package/node_modules/@imgly/codesign-server/dist/services/workspace/types.js +1 -0
- package/node_modules/@imgly/codesign-server/dist/services/workspace/types.js.map +1 -1
- package/node_modules/@imgly/codesign-server/dist/services/workspace/write-atomic.d.ts.map +1 -1
- package/node_modules/@imgly/codesign-server/dist/services/workspace/write-atomic.js +5 -0
- package/node_modules/@imgly/codesign-server/dist/services/workspace/write-atomic.js.map +1 -1
- package/node_modules/@imgly/codesign-server/package.json +13 -11
- package/node_modules/@imgly/design-lint/dist/rules/text-legibility.d.ts +2 -1
- package/node_modules/@imgly/design-lint/dist/rules/text-legibility.d.ts.map +1 -1
- package/node_modules/@imgly/design-lint/dist/rules/text-legibility.js +5 -1
- package/node_modules/@imgly/design-lint/dist/rules/text-legibility.js.map +1 -1
- package/node_modules/@imgly/design-lint/package.json +2 -2
- package/node_modules/@imgly/figma-exporter/CHANGELOG.md +79 -0
- package/node_modules/@imgly/figma-exporter/LICENSE.md +137 -0
- package/node_modules/@imgly/figma-exporter/README.md +201 -0
- package/node_modules/@imgly/figma-exporter/THIRD_PARTY_NOTICES.md +475 -0
- package/node_modules/@imgly/figma-exporter/dist/index.cjs +1 -0
- package/node_modules/@imgly/figma-exporter/dist/index.d.cts +8833 -0
- package/node_modules/@imgly/figma-exporter/dist/index.d.ts +8833 -0
- package/node_modules/@imgly/figma-exporter/dist/index.js +1 -0
- package/node_modules/@imgly/figma-exporter/package.json +92 -0
- package/node_modules/@imgly/figma-importer/CHANGELOG.md +84 -0
- package/node_modules/@imgly/figma-importer/LICENSE.md +137 -0
- package/node_modules/@imgly/figma-importer/README.md +256 -0
- package/node_modules/@imgly/figma-importer/THIRD_PARTY_NOTICES.md +446 -0
- package/node_modules/@imgly/figma-importer/dist/index.cjs +2 -0
- package/node_modules/@imgly/figma-importer/dist/index.d.cts +12831 -0
- package/node_modules/@imgly/figma-importer/dist/index.d.ts +12831 -0
- package/node_modules/@imgly/figma-importer/dist/index.js +2 -0
- package/node_modules/@imgly/figma-importer/package.json +85 -0
- package/node_modules/@imgly/html-exporter/CHANGELOG.md +35 -0
- package/node_modules/@imgly/html-exporter/README.md +45 -4
- package/node_modules/@imgly/html-exporter/dist/index.cjs +610 -493
- package/node_modules/@imgly/html-exporter/dist/index.d.cts +235 -216
- package/node_modules/@imgly/html-exporter/dist/index.d.ts +235 -216
- package/node_modules/@imgly/html-exporter/dist/index.js +610 -493
- package/node_modules/@imgly/html-exporter/package.json +15 -10
- package/node_modules/@imgly/idml-exporter/CHANGELOG.md +10 -0
- package/node_modules/@imgly/idml-exporter/README.md +17 -18
- package/node_modules/@imgly/idml-exporter/dist/harfbuzz.browser.js +1 -1
- package/node_modules/@imgly/idml-exporter/dist/index.cjs +8 -11
- package/node_modules/@imgly/idml-exporter/dist/index.d.cts +14480 -10275
- package/node_modules/@imgly/idml-exporter/dist/index.d.ts +14480 -10275
- package/node_modules/@imgly/idml-exporter/dist/index.js +8 -10
- package/node_modules/@imgly/idml-exporter/dist/woff2.browser.js +14 -14
- package/node_modules/@imgly/idml-exporter/package.json +17 -12
- package/node_modules/@imgly/idml-importer/CHANGELOG.md +37 -0
- package/node_modules/@imgly/idml-importer/README.md +148 -17
- package/node_modules/@imgly/idml-importer/dist/index.cjs +6 -5
- package/node_modules/@imgly/idml-importer/dist/index.d.cts +1003 -632
- package/node_modules/@imgly/idml-importer/dist/index.d.ts +1003 -632
- package/node_modules/@imgly/idml-importer/dist/index.js +6 -5
- package/node_modules/@imgly/idml-importer/package.json +9 -9
- package/node_modules/@imgly/pdf-importer/CHANGELOG.md +59 -0
- package/node_modules/@imgly/pdf-importer/README.md +71 -7
- package/node_modules/@imgly/pdf-importer/dist/browser.d.ts +940 -788
- package/node_modules/@imgly/pdf-importer/dist/browser.js +17 -15
- package/node_modules/@imgly/pdf-importer/dist/node.cjs +17 -16
- package/node_modules/@imgly/pdf-importer/dist/node.d.cts +940 -788
- package/node_modules/@imgly/pdf-importer/dist/node.d.ts +940 -788
- package/node_modules/@imgly/pdf-importer/dist/node.js +17 -15
- package/node_modules/@imgly/pdf-importer/dist/pdf.worker.mjs +80265 -61990
- package/node_modules/@imgly/pdf-importer/package.json +13 -13
- package/node_modules/@imgly/psd-exporter/CHANGELOG.md +12 -0
- package/node_modules/@imgly/psd-exporter/README.md +50 -7
- package/node_modules/@imgly/psd-exporter/dist/index.cjs +5 -7
- package/node_modules/@imgly/psd-exporter/dist/index.d.cts +14332 -10063
- package/node_modules/@imgly/psd-exporter/dist/index.d.ts +14332 -10063
- package/node_modules/@imgly/psd-exporter/dist/index.js +5 -6
- package/node_modules/@imgly/psd-exporter/dist/wawoff2-LICENSE.txt +19 -0
- package/node_modules/@imgly/psd-exporter/dist/woff2.browser.js +19 -0
- package/node_modules/@imgly/psd-exporter/package.json +26 -9
- package/node_modules/@imgly/psd-importer/CHANGELOG.md +29 -1
- package/node_modules/@imgly/psd-importer/README.md +22 -30
- package/node_modules/@imgly/psd-importer/dist/index.cjs +11 -11
- package/node_modules/@imgly/psd-importer/dist/index.d.cts +10479 -12978
- package/node_modules/@imgly/psd-importer/dist/index.d.ts +10479 -12978
- package/node_modules/@imgly/psd-importer/dist/index.js +11 -11
- package/node_modules/@imgly/psd-importer/package.json +8 -11
- package/package.json +28 -17
- package/node_modules/@imgly/pdf-importer/dist/browser.d.cts +0 -941
|
@@ -1,27 +1,23 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
import CreativeEngine from '@cesdk/engine';
|
|
4
|
-
import { AssetAPI, AssetFilter, Font, FontStyle, FontWeight, Typeface } from '@cesdk/engine';
|
|
5
|
-
|
|
6
|
-
type WarningSeverity = "error" | "warning" | "info";
|
|
1
|
+
import CreativeEngine, { AssetAPI, Font, Typeface } from "@cesdk/engine";
|
|
2
|
+
type WarningSeverity = 'error' | 'warning' | 'info';
|
|
7
3
|
interface WarningDefinition {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
4
|
+
/** Default + sole severity. Call sites do not override. */
|
|
5
|
+
severity: WarningSeverity;
|
|
6
|
+
/**
|
|
7
|
+
* Template with `{name}` placeholders. Renderer throws if a placeholder
|
|
8
|
+
* has no matching key in `params` — guards against silent typos.
|
|
9
|
+
*/
|
|
10
|
+
template: string;
|
|
15
11
|
}
|
|
16
12
|
interface LogMessage<TCode extends string = string> {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
13
|
+
/** Stable machine-readable identifier — never rename once shipped. */
|
|
14
|
+
code: TCode;
|
|
15
|
+
/** Inherited from the code definition. */
|
|
16
|
+
type: WarningSeverity;
|
|
17
|
+
/** Human-readable rendered string. */
|
|
18
|
+
message: string;
|
|
19
|
+
/** Raw structured fields — superset of all `{name}` placeholders. */
|
|
20
|
+
params: Record<string, unknown>;
|
|
25
21
|
}
|
|
26
22
|
/**
|
|
27
23
|
* Generic structured logger. Severity is registry-driven (PostgreSQL
|
|
@@ -29,44 +25,46 @@ interface LogMessage<TCode extends string = string> {
|
|
|
29
25
|
* edit the registry.
|
|
30
26
|
*/
|
|
31
27
|
export declare class Logger<R extends Record<string, WarningDefinition>> {
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
28
|
+
private readonly registry;
|
|
29
|
+
private messages;
|
|
30
|
+
constructor(registry: R);
|
|
31
|
+
emit<K extends keyof R & string>(code: K, params?: Record<string, unknown>): void;
|
|
32
|
+
getMessages(): LogMessage<keyof R & string>[];
|
|
37
33
|
}
|
|
38
|
-
|
|
34
|
+
/** Slice of `engine.asset` used by the font resolver. */
|
|
35
|
+
type AssetQueryAPI = Pick<AssetAPI, 'findAllSources' | 'addLocalAssetSourceFromJSONURI' | 'findAssets'> & Partial<Pick<AssetAPI, 'fetchAsset'>>;
|
|
36
|
+
/** Minimal engine slice this module needs. */
|
|
39
37
|
type AssetEngine = {
|
|
40
|
-
|
|
38
|
+
asset: AssetQueryAPI;
|
|
41
39
|
};
|
|
42
40
|
interface TypefaceParams {
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
41
|
+
family: string;
|
|
42
|
+
style?: Font['style'];
|
|
43
|
+
weight?: Font['weight'];
|
|
46
44
|
}
|
|
47
45
|
interface FontResolverOptions {
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
46
|
+
/**
|
|
47
|
+
* When the requested weight is not available in the matched typeface,
|
|
48
|
+
* pick the closest available weight using the CSS Font Matching algorithm.
|
|
49
|
+
* Defaults to false — return null instead so the caller can decide what
|
|
50
|
+
* to do (e.g. log a warning, use a different font).
|
|
51
|
+
*
|
|
52
|
+
* Only enable when the typeface name is known to be a good match. The
|
|
53
|
+
* typeface query uses fuzzy matching, so applying weight fallback to a
|
|
54
|
+
* poor name match can silently produce wildly wrong results.
|
|
55
|
+
*/
|
|
56
|
+
closestWeightMatch?: boolean;
|
|
59
57
|
}
|
|
60
58
|
interface FontResolverResult {
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
59
|
+
typeface: Typeface;
|
|
60
|
+
font: Font;
|
|
61
|
+
/**
|
|
62
|
+
* Set to the originally requested family name when the typeface came from
|
|
63
|
+
* the proprietary-fallbacks source (e.g. requested "Helvetica", got Roboto).
|
|
64
|
+
* Undefined when the family matched the main Google Fonts catalog directly.
|
|
65
|
+
* Always populated when applicable; consumers may ignore it.
|
|
66
|
+
*/
|
|
67
|
+
substitutedFrom?: string;
|
|
70
68
|
}
|
|
71
69
|
type TypefaceResolver = (params: TypefaceParams, engine: AssetEngine, options?: FontResolverOptions) => Promise<FontResolverResult | null>;
|
|
72
70
|
/**
|
|
@@ -80,519 +78,669 @@ type TypefaceResolver = (params: TypefaceParams, engine: AssetEngine, options?:
|
|
|
80
78
|
*/
|
|
81
79
|
export declare function addGfontsAssetLibrary(engine: AssetEngine): Promise<void>;
|
|
82
80
|
declare const WARNING_CODES: {
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
81
|
+
readonly DOC_PAGE_COUNT: {
|
|
82
|
+
readonly severity: "info";
|
|
83
|
+
readonly template: "PDF has {count} page(s)";
|
|
84
|
+
};
|
|
85
|
+
readonly DOC_PAGE_BLOCK_COUNT: {
|
|
86
|
+
readonly severity: "info";
|
|
87
|
+
readonly template: "Page {page}: {imageCount} image, {vectorCount} vector, {textCount} text, {outlineCount} outline";
|
|
88
|
+
};
|
|
89
|
+
readonly DOC_PAGE_ROTATION_DROPPED: {
|
|
90
|
+
readonly severity: "warning";
|
|
91
|
+
readonly template: "{prefix}PDF declares /Rotate {pageRotation}; the importer does not apply page rotation, so the imported page is in its un-rotated (native) orientation. Viewer-rendered output may differ from the source's display orientation.";
|
|
92
|
+
};
|
|
93
|
+
readonly BLOCK_KIND_UNKNOWN: {
|
|
94
|
+
readonly severity: "error";
|
|
95
|
+
readonly template: "An unknown block kind \"{kind}\" was encountered and was skipped.";
|
|
96
|
+
};
|
|
97
|
+
readonly PAGE_INDEX_OUT_OF_RANGE: {
|
|
98
|
+
readonly severity: "warning";
|
|
99
|
+
readonly template: "Requested page index {requested} is out of range; PDF has {available} page(s). No blocks were emitted.";
|
|
100
|
+
};
|
|
101
|
+
readonly FONT_OPENTYPE_PARSE_FAILED: {
|
|
102
|
+
readonly severity: "warning";
|
|
103
|
+
readonly template: "{prefix}font \"{fontName}\" could not be parsed as OpenType{reason}. Glyph outlines will fall back to pdf.js raster paths — some shapes may render without stroke/anti-aliasing detail.";
|
|
104
|
+
};
|
|
105
|
+
readonly FONT_CMAP_AUGMENTED: {
|
|
106
|
+
readonly severity: "info";
|
|
107
|
+
readonly template: "Font \"{fontName}\" character map was augmented (cmap patches={cmapPatches}, injected glyphs={injectedGlyphs}).";
|
|
108
|
+
};
|
|
109
|
+
readonly FONT_CMAP_AUGMENT_FAILED: {
|
|
110
|
+
readonly severity: "warning";
|
|
111
|
+
readonly template: "Font \"{fontName}\" character map could not be augmented. Using the original font data — some glyphs may render incorrectly.";
|
|
112
|
+
};
|
|
113
|
+
readonly FONT_RESOLVER_MISS: {
|
|
114
|
+
readonly severity: "warning";
|
|
115
|
+
readonly template: "Font \"{fontFamily}\" could not be resolved. The text was rendered as a vector outline.";
|
|
116
|
+
};
|
|
117
|
+
readonly FONT_NOT_FOUND_IN_ASSETS: {
|
|
118
|
+
readonly severity: "warning";
|
|
119
|
+
readonly template: "Font \"{fontFamily}\" was not found in the asset library. The text was rendered as a vector outline.";
|
|
120
|
+
};
|
|
121
|
+
readonly FONT_SUBSTITUTED: {
|
|
122
|
+
readonly severity: "info";
|
|
123
|
+
readonly template: "Font \"{fontFamily}\" was substituted with \"{substitutedName}\" from the asset library.";
|
|
124
|
+
};
|
|
125
|
+
readonly FONT_REF_NOT_EXTRACTED: {
|
|
126
|
+
readonly severity: "error";
|
|
127
|
+
readonly template: "Text run references font \"{fontRef}\" which was not extracted. The text was skipped.";
|
|
128
|
+
};
|
|
129
|
+
readonly FONT_SUBSTITUTIONS: {
|
|
130
|
+
readonly severity: "warning";
|
|
131
|
+
readonly template: "Substituted {count} font famil{plural} during import: {pairs}.";
|
|
132
|
+
};
|
|
133
|
+
readonly FONT_SUBSET_FALLBACK: {
|
|
134
|
+
readonly severity: "warning";
|
|
135
|
+
readonly template: string;
|
|
136
|
+
};
|
|
137
|
+
readonly TEXT_OUTLINE_NO_FONT_FAMILY: {
|
|
138
|
+
readonly severity: "warning";
|
|
139
|
+
readonly template: "Text outline has no declared font family. The run was skipped.";
|
|
140
|
+
};
|
|
141
|
+
readonly TEXT_RUN_SKIPPED_NO_RESOLUTION: {
|
|
142
|
+
readonly severity: "warning";
|
|
143
|
+
readonly template: "No typeface or glyph outlines for \"{fontFamily}\"; run skipped.";
|
|
144
|
+
};
|
|
145
|
+
readonly TEXT_RENDER_MODE_SKIPPED: {
|
|
146
|
+
readonly severity: "warning";
|
|
147
|
+
readonly template: "Text item{pageTag}: skipped \"{text}\" — PDF text rendering mode {modeLabel}. This text paints no ink; for mode 7 it acts as a clipping mask for following images, an effect the importer does not currently reproduce.";
|
|
148
|
+
};
|
|
149
|
+
readonly TEXT_OVERFLOW_AFTER_AUTOSIZE: {
|
|
150
|
+
readonly severity: "warning";
|
|
151
|
+
readonly template: "Text \"{text}\" did not fit after auto-sizing; it still overflows by {overflowLines} line(s). The text was kept; some content may be clipped.";
|
|
152
|
+
};
|
|
153
|
+
readonly TEXT_FONTS_READY_TIMEOUT: {
|
|
154
|
+
readonly severity: "warning";
|
|
155
|
+
readonly template: "{count} text block(s) were still loading fonts after {timeoutMs} ms. Their letter spacing and width were fitted to fallback fonts. When the real fonts arrive, these blocks can wrap differently, so their lines and baselines can move.";
|
|
156
|
+
};
|
|
157
|
+
readonly TEXT_CLIP_MODE_7_DROPPED: {
|
|
158
|
+
readonly severity: "warning";
|
|
159
|
+
readonly template: "{prefix}{label} at ({bbox}) {bboxSize} pt: dropped because text in PDF render mode 7 clips it, and the shape of some letters is unknown. The artwork would otherwise show outside the letters.";
|
|
160
|
+
};
|
|
161
|
+
readonly IMAGE_ENCODER_MISS: {
|
|
162
|
+
readonly severity: "warning";
|
|
163
|
+
readonly template: "{prefix}an image{idLabel} ({width}×{height} raw pixels{kind}) could not be encoded ({reason}). The image was dropped from the imported design.";
|
|
164
|
+
};
|
|
165
|
+
readonly IMAGE_PDFJS_UNRESOLVED: {
|
|
166
|
+
readonly severity: "error";
|
|
167
|
+
readonly template: "{prefix}image placement {idLabel} at ({bboxX}, {bboxY}) {bboxW}×{bboxH} pt could not be resolved by pdf.js (reason={reason}) and was dropped.";
|
|
168
|
+
};
|
|
169
|
+
readonly IMAGE_NO_PIXELS: {
|
|
170
|
+
readonly severity: "warning";
|
|
171
|
+
readonly template: "An image element has no pixel data and was skipped.";
|
|
172
|
+
};
|
|
173
|
+
readonly IMAGE_PROFILE_BUDGET_EXCEEDED: {
|
|
174
|
+
readonly severity: "warning";
|
|
175
|
+
readonly template: "{prefix}the images of this import pass 512 MiB of ICC profile data. Later images with an ICC profile keep their decoded pixels instead of their original JPEG colors.";
|
|
176
|
+
};
|
|
177
|
+
readonly IMAGE_DEFINITION_FALLBACK: {
|
|
178
|
+
readonly severity: "warning";
|
|
179
|
+
readonly template: "{prefix}an image at {bbox} could not keep its original JPEG colors ({error}). It was imported from its decoded pixels.";
|
|
180
|
+
};
|
|
181
|
+
readonly IMAGE_PROFILE_REFUSED: {
|
|
182
|
+
readonly severity: "warning";
|
|
183
|
+
readonly template: "{prefix}the ICC profile of an image at {bbox} cannot be used ({reason}). The image keeps its decoded pixels instead of its original JPEG colors.";
|
|
184
|
+
};
|
|
185
|
+
readonly IMAGE_FLIP_UNSUPPORTED: {
|
|
186
|
+
readonly severity: "warning";
|
|
187
|
+
readonly template: "Image flip could not be applied (engine version too old). The image will display without flip.";
|
|
188
|
+
};
|
|
189
|
+
readonly IMAGE_PLACEMENT_UNSUPPORTED: {
|
|
190
|
+
readonly severity: "warning";
|
|
191
|
+
readonly template: "Image placement could not be applied (engine version too old). The image will be scaled evenly to cover its box and can be cut off.";
|
|
192
|
+
};
|
|
193
|
+
readonly IMAGE_SKEW_DROPPED: {
|
|
194
|
+
readonly severity: "warning";
|
|
195
|
+
readonly template: "{prefix}an image{idLabel} at ({bboxX}, {bboxY}) {bboxW}×{bboxH} pt has a skewed transform ctm={ctm}{residualStr} that cannot be represented. The image keeps its rotation, width and area, but appears without the skew.";
|
|
196
|
+
};
|
|
197
|
+
readonly IMAGE_CLIPPED_NO_BYTES: {
|
|
198
|
+
readonly severity: "warning";
|
|
199
|
+
readonly template: "{prefix}a clipped image at {bbox} had no decoded bytes; the placement was dropped before combining clip shapes.";
|
|
200
|
+
};
|
|
201
|
+
readonly IMAGE_CLIP_UNUSABLE: {
|
|
202
|
+
readonly severity: "warning";
|
|
203
|
+
readonly template: "{prefix}a clipped image at {bbox} with {clipCount} clip path(s) has no usable clip — {degenerateCount} degenerate, {disjointCount} disjoint from the image. The image was dropped.";
|
|
204
|
+
};
|
|
205
|
+
readonly IMAGE_CLIPPED_TO_EMPTY: {
|
|
206
|
+
readonly severity: "info";
|
|
207
|
+
readonly template: "{prefix}a clipped image at {bbox} with {clipCount} clip path(s) lies entirely outside its clip region ({disjointCount} clip path(s) disjoint from the image); the source draws nothing there, so the placement was skipped.";
|
|
208
|
+
};
|
|
209
|
+
readonly IMAGE_CLIP_EMPTY_INTERSECTION: {
|
|
210
|
+
readonly severity: "warning";
|
|
211
|
+
readonly template: "{prefix}a clipped image at {bbox} with {clipCount} clip path(s) had an empty intersection. The image was dropped.";
|
|
212
|
+
};
|
|
213
|
+
readonly IMAGE_CLIP_COMBINE_FAILED: {
|
|
214
|
+
readonly severity: "error";
|
|
215
|
+
readonly template: "{prefix}a clipped image at {bbox} with {clipCount} clip path(s) could not be combined. The image was dropped from the imported design.";
|
|
216
|
+
};
|
|
217
|
+
readonly IMAGE_MASK_NO_FILL_COLOR: {
|
|
218
|
+
readonly severity: "warning";
|
|
219
|
+
readonly template: "{prefix}a stencil ImageMask paint (objId={objId}) had no current fill colour to composite with. The mask was dropped from the imported design.";
|
|
220
|
+
};
|
|
221
|
+
readonly IMAGE_MASK_COMPOSITE_FAIL: {
|
|
222
|
+
readonly severity: "warning";
|
|
223
|
+
readonly template: "{prefix}a stencil ImageMask (objId={objId}) at ({bboxX}, {bboxY}) {bboxW}×{bboxH} pt could not be composited with the current fill colour (space={colourSpace}). The mask was dropped from the imported design.";
|
|
224
|
+
};
|
|
225
|
+
readonly IMAGE_SOFT_MASK_DROPPED: {
|
|
226
|
+
readonly severity: "warning";
|
|
227
|
+
readonly template: "{prefix}{detail} The masked content was dropped from the imported design.";
|
|
228
|
+
};
|
|
229
|
+
readonly IMAGE_SOFT_MASK_IGNORED: {
|
|
230
|
+
readonly severity: "warning";
|
|
231
|
+
readonly template: "{prefix}a luminosity soft mask at {bbox} modulates content other than images. That content was kept without the mask, so it can look harder or more opaque than in the PDF.";
|
|
232
|
+
};
|
|
233
|
+
readonly IMAGE_MASK_GROUP_UNSUPPORTED: {
|
|
234
|
+
readonly severity: "warning";
|
|
235
|
+
readonly template: "{prefix}a paintImageMaskXObjectGroup batch of {count} stencil paints is not supported by the importer. The masks were dropped.";
|
|
236
|
+
};
|
|
237
|
+
readonly IMAGE_MASK_REPEAT_UNSUPPORTED: {
|
|
238
|
+
readonly severity: "warning";
|
|
239
|
+
readonly template: "{prefix}a paintImageMaskXObjectRepeat tiling {count} stencil paints is not supported by the importer. The masks were dropped.";
|
|
240
|
+
};
|
|
241
|
+
readonly CLIP_DEGENERATE_FALLBACK: {
|
|
242
|
+
readonly severity: "warning";
|
|
243
|
+
readonly template: "{prefix}a clipped vector path at {bbox} with {clipCount} clip path(s) has no usable clip — {degenerateCount} degenerate (zero width or height). Falling back to the unclipped path.";
|
|
244
|
+
};
|
|
245
|
+
readonly CLIP_COMBINE_STROKE_ONLY: {
|
|
246
|
+
readonly severity: "warning";
|
|
247
|
+
readonly template: "{prefix}a clipped stroke-only vector path at {bbox} with {clipCount} clip path(s) could not be outlined for clipping, because its path data is unreadable or the CE.SDK version has no non-zero fill rule. Falling back to the unclipped path.";
|
|
248
|
+
};
|
|
249
|
+
readonly CLIP_STROKE_DROPPED: {
|
|
250
|
+
readonly severity: "warning";
|
|
251
|
+
readonly template: "{prefix}a clipped vector path at {bbox} that fills and strokes keeps its clipped fill but loses its stroke, because the stroke could not be outlined for clipping (path data too large or unreadable, or a CE.SDK version without the non-zero fill rule).";
|
|
252
|
+
};
|
|
253
|
+
readonly CLIP_COMBINE_FAILED: {
|
|
254
|
+
readonly severity: "warning";
|
|
255
|
+
readonly template: "{prefix}a vector path at {bbox} with {clipCount} clip path(s) could not be combined. Rendered without its clip — some content may extend beyond the intended mask.";
|
|
256
|
+
};
|
|
257
|
+
readonly CLIP_COMBINE_TOO_FEW_INPUTS: {
|
|
258
|
+
readonly severity: "warning";
|
|
259
|
+
readonly template: "{prefix}clip combine was called with {inputCount} input block(s) (need at least 2). The owner block was emitted without its clips.";
|
|
260
|
+
};
|
|
261
|
+
readonly CLIP_COMBINE_NOT_COMBINABLE: {
|
|
262
|
+
readonly severity: "warning";
|
|
263
|
+
readonly template: "{prefix}clip combine rejected {inputCount} input block(s) as not combinable (nested or incompatible shapes). The owner block was emitted without its clips.";
|
|
264
|
+
};
|
|
265
|
+
readonly CLIP_COMBINE_THREW: {
|
|
266
|
+
readonly severity: "warning";
|
|
267
|
+
readonly template: "{prefix}clip combine of {inputCount} input block(s) failed ({reason}). The owner block was emitted without its clips.";
|
|
268
|
+
};
|
|
269
|
+
readonly COLOR_TYPE_UNSUPPORTED: {
|
|
270
|
+
readonly severity: "warning";
|
|
271
|
+
readonly template: "{prefix}{subject}color of type \"{colorType}\" is not supported. Rendered as black.";
|
|
272
|
+
};
|
|
273
|
+
readonly COLOR_SPACE_UNSUPPORTED: {
|
|
274
|
+
readonly severity: "warning";
|
|
275
|
+
readonly template: "{prefix}{elementLabel}color space \"{space}\" ({color}) at {bbox} is not supported. Rendered as black.";
|
|
276
|
+
};
|
|
277
|
+
readonly COLOR_DEVICEN_INKS_NOT_PRESERVED: {
|
|
278
|
+
readonly severity: "warning";
|
|
279
|
+
readonly template: "{prefix}the page declares DeviceN color resources. Imported DeviceN colors use their alternate color space; independent ink channels are not preserved.";
|
|
280
|
+
};
|
|
281
|
+
readonly COLOR_DEVICEN_TINT_UNRESOLVED: {
|
|
282
|
+
readonly severity: "warning";
|
|
283
|
+
readonly template: "{prefix}the PDF decoder did not resolve DeviceN tint values. The all-inks-solid alternate color was used; colors can differ from the source. Use the bundled PDF decoder.";
|
|
284
|
+
};
|
|
285
|
+
readonly SPOT_COLOR_NO_ALTERNATE: {
|
|
286
|
+
readonly severity: "warning";
|
|
287
|
+
readonly template: "Spot color \"{name}\" has no resolvable alternate; leaving at engine default.";
|
|
288
|
+
};
|
|
289
|
+
readonly SPOT_COLOR_REGISTER_FAILED: {
|
|
290
|
+
readonly severity: "warning";
|
|
291
|
+
readonly template: "Failed to register spot color \"{name}\": {error}";
|
|
292
|
+
};
|
|
293
|
+
readonly SPOT_COLOR_DEFINITION_PRESERVED: {
|
|
294
|
+
readonly severity: "warning";
|
|
295
|
+
readonly template: "Spot color \"{name}\" is already defined differently in the destination. Imported content uses the existing definition.";
|
|
296
|
+
};
|
|
297
|
+
readonly OUTPUT_INTENT_APPLIED: {
|
|
298
|
+
readonly severity: "info";
|
|
299
|
+
readonly template: "PDF output intent \"{identifier}\" was applied. Its {space} profile is the output profile of the document.";
|
|
300
|
+
};
|
|
301
|
+
readonly OUTPUT_INTENT_UNREADABLE: {
|
|
302
|
+
readonly severity: "warning";
|
|
303
|
+
readonly template: "The PDF output intents could not be read ({error}). The pages were imported without an output profile, so colors use the default profile.";
|
|
304
|
+
};
|
|
305
|
+
readonly OUTPUT_INTENT_PROFILE_MISSING: {
|
|
306
|
+
readonly severity: "info";
|
|
307
|
+
readonly template: "PDF output intent \"{identifier}\" embeds no usable ICC profile. Colors use the default profile.";
|
|
308
|
+
};
|
|
309
|
+
readonly OUTPUT_INTENT_SPACE_UNSUPPORTED: {
|
|
310
|
+
readonly severity: "warning";
|
|
311
|
+
readonly template: "PDF output intent \"{identifier}\" has a {space} profile, which a document cannot hold. Colors use the default profile.";
|
|
312
|
+
};
|
|
313
|
+
readonly OUTPUT_INTENT_REJECTED: {
|
|
314
|
+
readonly severity: "warning";
|
|
315
|
+
readonly template: "The profile of PDF output intent \"{identifier}\" could not be used: {error}. Colors use the default profile.";
|
|
316
|
+
};
|
|
317
|
+
readonly OUTPUT_INTENT_ENGINE_UNSUPPORTED: {
|
|
318
|
+
readonly severity: "warning";
|
|
319
|
+
readonly template: "PDF output intent \"{identifier}\" was not applied, because this engine version cannot store an output profile in the document. Colors use the default profile. Use engine version 1.86 or later to keep the profile.";
|
|
320
|
+
};
|
|
321
|
+
readonly OUTPUT_INTENT_DROPPED_DETACHED: {
|
|
322
|
+
readonly severity: "warning";
|
|
323
|
+
readonly template: "PDF output intent \"{identifier}\" was not applied, because placed pages keep the color profiles of the destination design. To keep the profile, import the PDF with parse() instead of loadAsBlocks().";
|
|
324
|
+
};
|
|
325
|
+
readonly RENDERING_INTENT_PER_OBJECT: {
|
|
326
|
+
readonly severity: "warning";
|
|
327
|
+
readonly template: "{prefix}the page sets the rendering intent {intents} on single objects. The imported objects use the rendering intent of the document instead.";
|
|
328
|
+
};
|
|
329
|
+
readonly VECTOR_PATH_FILL_RULE_UNSUPPORTED: {
|
|
330
|
+
readonly severity: "warning";
|
|
331
|
+
readonly template: "CE.SDK does not expose `{property}` on `vector_path` shapes (added in CE.SDK {sinceVersion}); the source PDF used non-zero winding fill, but imported paths render with the engine default (even-odd) winding. Self-overlapping or compound paths may render with holes inverted. Upgrade `@cesdk/engine` to {sinceVersion} or newer to preserve the source winding rule.";
|
|
332
|
+
};
|
|
333
|
+
readonly BLEND_MODE_UNSUPPORTED: {
|
|
334
|
+
readonly severity: "warning";
|
|
335
|
+
readonly template: "Blend mode \"{mode}\" is not supported. Using \"Normal\" as the default.";
|
|
336
|
+
};
|
|
337
|
+
readonly SHADING_COLORSPACE_CONVERTED: {
|
|
338
|
+
readonly severity: "warning";
|
|
339
|
+
readonly template: "{prefix}gradient pattern colors were converted to sampled RGB stops by the PDF decoder. Original CMYK or spot-color definitions are not preserved.";
|
|
340
|
+
};
|
|
341
|
+
readonly SHADING_PATTERN_TRANSFORM_UNSUPPORTED: {
|
|
342
|
+
readonly severity: "warning";
|
|
343
|
+
readonly template: "{prefix}a gradient fill inside a transformed PDF form was dropped because its placement cannot be preserved.";
|
|
344
|
+
};
|
|
345
|
+
readonly SHADING_UNRESOLVED: {
|
|
346
|
+
readonly severity: "error";
|
|
347
|
+
readonly template: "{prefix}gradient shading could not be resolved by pdf.js and was removed. The painted region will be missing in the imported scene.";
|
|
348
|
+
};
|
|
349
|
+
/** @deprecated Decoded meshes now retain their geometry with a solid fill. */
|
|
350
|
+
readonly SHADING_MESH_UNSUPPORTED: {
|
|
351
|
+
readonly severity: "warning";
|
|
352
|
+
readonly template: "{prefix}gradient shading uses an unsupported mesh variant (PDF ShadingType 4–7). The region was dropped because mesh gradients can't be represented as a CE.SDK gradient fill.";
|
|
353
|
+
};
|
|
354
|
+
readonly SHADING_MESH_FLATTENED: {
|
|
355
|
+
readonly severity: "warning";
|
|
356
|
+
readonly template: "{prefix}mesh at {at} retains {triangles} triangle(s) as editable vector geometry. Its corner-color gradient was replaced by the solid average color {fill}.{background}";
|
|
357
|
+
};
|
|
358
|
+
readonly SHADING_MESH_GEOMETRY_DROPPED: {
|
|
359
|
+
readonly severity: "warning";
|
|
360
|
+
readonly template: "{prefix}mesh shading was omitted because {reason}. Its vector geometry could not be retained.";
|
|
361
|
+
};
|
|
362
|
+
readonly SHADING_UNKNOWN_IR_TAG: {
|
|
363
|
+
readonly severity: "error";
|
|
364
|
+
readonly template: "{prefix}gradient shading reported unknown IR tag \"{tag}\" and was dropped.";
|
|
365
|
+
};
|
|
366
|
+
readonly SHADING_INSUFFICIENT_STOPS: {
|
|
367
|
+
readonly severity: "warning";
|
|
368
|
+
readonly template: "{prefix}gradient shading produced fewer than two color stops and was dropped.";
|
|
369
|
+
};
|
|
370
|
+
readonly SHADING_NO_CLIP_FALLBACK_BBOX: {
|
|
371
|
+
readonly severity: "info";
|
|
372
|
+
readonly template: "{prefix}gradient shading was painted without an active clip path. Falling back to the shading /BBox; if this scene shows gradient bands outside the intended shape, file a bug.";
|
|
373
|
+
};
|
|
374
|
+
readonly SHADING_CLIP_DEGENERATE: {
|
|
375
|
+
readonly severity: "warning";
|
|
376
|
+
readonly template: "{prefix}gradient shading clip path was degenerate and the region was dropped.";
|
|
377
|
+
};
|
|
378
|
+
readonly SHADING_RADIAL_FOCAL_DROPPED: {
|
|
379
|
+
readonly severity: "info";
|
|
380
|
+
readonly template: "{prefix}radial gradient declared a non-zero inner radius (PDF Shading Type 3 focal point). It was approximated as a centered radial; the focal offset was dropped.";
|
|
381
|
+
};
|
|
382
|
+
readonly SHADING_UNKNOWN_RADIAL_SUBTYPE: {
|
|
383
|
+
readonly severity: "error";
|
|
384
|
+
readonly template: "{prefix}gradient shading reported unknown RadialAxial subtype \"{kind}\" and was dropped.";
|
|
385
|
+
};
|
|
386
|
+
readonly SHADING_NO_PATTERN_REF: {
|
|
387
|
+
readonly severity: "error";
|
|
388
|
+
readonly template: "{prefix}gradient shading was emitted without a pattern reference and was dropped.";
|
|
389
|
+
};
|
|
390
|
+
readonly IMAGE_TILES_MERGED: {
|
|
391
|
+
readonly severity: "info";
|
|
392
|
+
readonly template: "{prefix}{count} image pieces at ({bbox}) {bboxSize} pt were joined into one image. The PDF stores the picture in pieces, as the transparency flattener of a PDF/X-1a export does.";
|
|
393
|
+
};
|
|
394
|
+
readonly IMAGE_TILES_MERGE_FAILED: {
|
|
395
|
+
readonly severity: "warning";
|
|
396
|
+
readonly template: "{prefix}the image pieces on this page could not be joined ({reason}). They were imported as separate images.";
|
|
397
|
+
};
|
|
398
|
+
readonly PATTERN_PAINT_UNSUPPORTED: {
|
|
399
|
+
readonly severity: "warning";
|
|
400
|
+
readonly template: "{prefix}the {paint} of a vector path at {at} uses a {pattern} that cannot be imported. It was painted with the solid color {fallback} instead.";
|
|
401
|
+
};
|
|
402
|
+
readonly TILING_PATTERN_AS_IMAGE: {
|
|
403
|
+
readonly severity: "info";
|
|
404
|
+
readonly template: "{prefix}tiling pattern \"{patternId}\" was imported as an image (single-image tiling pattern, e.g. Skia/Chrome PDF export of an embedded bitmap).";
|
|
405
|
+
};
|
|
406
|
+
readonly TILING_PATTERN_UNSUPPORTED: {
|
|
407
|
+
readonly severity: "warning";
|
|
408
|
+
readonly template: "{prefix}tiling pattern \"{patternId}\" could not be imported as a bounded, opaque vector tile or a single-image pattern. The pattern fill was dropped.";
|
|
409
|
+
};
|
|
410
|
+
readonly TILING_PATTERN_UNRESOLVED: {
|
|
411
|
+
readonly severity: "error";
|
|
412
|
+
readonly template: "{prefix}tiling pattern \"{patternId}\" could not be resolved by pdf.js and was dropped.";
|
|
413
|
+
};
|
|
414
|
+
readonly TILING_PATTERN_IMAGE_DECODE_FAILED: {
|
|
415
|
+
readonly severity: "warning";
|
|
416
|
+
readonly template: "{prefix}tiling pattern \"{patternId}\" referenced image \"{imageObjId}\" but the image bytes could not be decoded. The pattern fill was dropped.";
|
|
417
|
+
};
|
|
352
418
|
};
|
|
419
|
+
/** PDF importer's stable warning code union. */
|
|
353
420
|
type PdfWarningCode = keyof typeof WARNING_CODES;
|
|
354
421
|
/** PDF-typed `LogMessage` so `.assert.ts` files autocomplete on `code`. */
|
|
355
422
|
type PdfLogMessage = LogMessage<PdfWarningCode>;
|
|
423
|
+
/**
|
|
424
|
+
* Intermediate Representation (IR) for PDF -> CE.SDK conversion.
|
|
425
|
+
*
|
|
426
|
+
* Units: **PDF points** (1/72 in), origin **top-left** (Y already flipped
|
|
427
|
+
* from native PDF bottom-left). Conversion to CE.SDK inches happens only in
|
|
428
|
+
* the emitter.
|
|
429
|
+
*
|
|
430
|
+
* IR is plain JSON-serializable so it can cross worker/network boundaries
|
|
431
|
+
* and be diffed in tests.
|
|
432
|
+
*/
|
|
356
433
|
interface Color {
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
434
|
+
space: 'rgb' | 'cmyk' | 'gray';
|
|
435
|
+
/** in [0..1]. rgb:[r,g,b] cmyk:[c,m,y,k] gray:[g] */
|
|
436
|
+
values: number[];
|
|
437
|
+
/** in [0..1]; defaults to 1 */
|
|
438
|
+
alpha?: number;
|
|
439
|
+
/**
|
|
440
|
+
* The paint overprints (PDF `op` for a fill, `OP` for a stroke). Only a
|
|
441
|
+
* spot color carries it (`withOverprint`). The emitter sets it on the
|
|
442
|
+
* block, because CE.SDK keeps overprint per block.
|
|
443
|
+
*/
|
|
444
|
+
overprint?: boolean;
|
|
362
445
|
}
|
|
363
|
-
type CesdkFontWeight =
|
|
446
|
+
type CesdkFontWeight = 'thin' | 'extraLight' | 'light' | 'normal' | 'medium' | 'semiBold' | 'bold' | 'extraBold' | 'heavy';
|
|
447
|
+
/**
|
|
448
|
+
* Text rendered as a set of glyph outlines. We emit ONE TextOutline per
|
|
449
|
+
* glyph run (same font/size/color) — each containing the concatenated
|
|
450
|
+
* glyph paths in local coordinates.
|
|
451
|
+
*/
|
|
364
452
|
interface TextOutline {
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
453
|
+
kind: 'text-outline';
|
|
454
|
+
/** pt, run bbox top-left */
|
|
455
|
+
x: number;
|
|
456
|
+
y: number;
|
|
457
|
+
width: number;
|
|
458
|
+
height: number;
|
|
459
|
+
/** SVG path data (all glyphs concatenated) */
|
|
460
|
+
d: string;
|
|
461
|
+
/** Original text (for diffing / accessibility) */
|
|
462
|
+
text: string;
|
|
463
|
+
/**
|
|
464
|
+
* Family base parsed from the PDF PostScript name (subset prefix and
|
|
465
|
+
* recognized weight/style/width suffix stripped — e.g.
|
|
466
|
+
* `WTNEYF+Poppins-ExtraBold` → `Poppins`). Falls back to the full
|
|
467
|
+
* subset-stripped name when no recognized suffix is present, so families
|
|
468
|
+
* with internal hyphens like `SVN-BlogScript` survive intact. Suitable
|
|
469
|
+
* as a font-resolver query.
|
|
470
|
+
*/
|
|
471
|
+
fontFamily: string;
|
|
472
|
+
/** pt */
|
|
473
|
+
fontSize: number;
|
|
474
|
+
/** Derived from fontObj.italic + name suffix. */
|
|
475
|
+
fontStyle?: 'normal' | 'italic';
|
|
476
|
+
/**
|
|
477
|
+
* CE.SDK weight string. Together with `fontStyle` and `fontFamily` lets
|
|
478
|
+
* the font-resolver substitute the correct typeface variant for an
|
|
479
|
+
* editable text block, or — on resolver miss — be preserved as block
|
|
480
|
+
* metadata.
|
|
481
|
+
*/
|
|
482
|
+
fontWeight?: CesdkFontWeight;
|
|
483
|
+
fill: Color | null;
|
|
484
|
+
/**
|
|
485
|
+
* pt, pen x of the first glyph in device coords. Used by the
|
|
486
|
+
* resolver-substitution path to place the editable text block at the
|
|
487
|
+
* generator's setPositionX rather than the ink-bbox left edge (which is
|
|
488
|
+
* shifted by the first glyph's LSB, typically ~1–2pt for caps).
|
|
489
|
+
*/
|
|
490
|
+
textOriginX?: number;
|
|
491
|
+
/**
|
|
492
|
+
* Radians in CE.SDK screen (y-down) frame, 0 for horizontal. Optional;
|
|
493
|
+
* absent on truly horizontal runs. Mirrors the `rotation` field on
|
|
494
|
+
* TextRun so both emit paths can apply `setRotation` from the same
|
|
495
|
+
* source. Sign convention: PDF's y-up Tm rotation atan2(b,a) negated to
|
|
496
|
+
* match CE.SDK's y-down screen frame.
|
|
497
|
+
*/
|
|
498
|
+
rotation?: number;
|
|
499
|
+
/**
|
|
500
|
+
* pt, ink-bbox width in the un-rotated text frame. Equals `width` for
|
|
501
|
+
* horizontal runs; differs for ±90°/180° runs where `width`/`height`
|
|
502
|
+
* describe the rotated AABB.
|
|
503
|
+
*/
|
|
504
|
+
unrotWidth?: number;
|
|
505
|
+
/**
|
|
506
|
+
* pt, ink-bbox height in the un-rotated text frame. Pair with
|
|
507
|
+
* `unrotWidth` to size the editable text block at its natural
|
|
508
|
+
* pre-rotation dimensions; CE.SDK then auto-fits to its own typeface
|
|
509
|
+
* metrics.
|
|
510
|
+
*/
|
|
511
|
+
unrotHeight?: number;
|
|
512
|
+
/**
|
|
513
|
+
* [0..1], default 1. Like `VectorPath.opacity` and `ImageBox.opacity`,
|
|
514
|
+
* lets the emitter apply `setOpacity` to text-outline blocks (the
|
|
515
|
+
* walker uses this for runs that inherited a reduced fill alpha).
|
|
516
|
+
*/
|
|
517
|
+
opacity?: number;
|
|
518
|
+
/**
|
|
519
|
+
* pt, baseline y in device (top-down) coords. Pen origin's y, used by
|
|
520
|
+
* the resolver-substitution path to position the editable text block
|
|
521
|
+
* at the baseline rather than the ink-bbox top.
|
|
522
|
+
*/
|
|
523
|
+
textOriginY?: number;
|
|
436
524
|
}
|
|
525
|
+
/**
|
|
526
|
+
* Raw font bytes harvested from pdf.js `fontObj.data` (post Phase-4),
|
|
527
|
+
* suitable for registration as a CE.SDK typeface. Deduped per Document
|
|
528
|
+
* via `postScriptName` (unique per distinct subset — see below).
|
|
529
|
+
*/
|
|
437
530
|
interface EmbeddedFont {
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
531
|
+
/**
|
|
532
|
+
* Unique per subset. When a PDF embeds multiple subsets that share a PS
|
|
533
|
+
* family name (common: one subset per chapter/page), this field is
|
|
534
|
+
* suffixed with a hash of the font bytes (e.g.
|
|
535
|
+
* `PublicSans-Light#1c9a3f0e52b7d4`) so each subset keeps its own entry in
|
|
536
|
+
* `Document.fonts`. Use `family` for display.
|
|
537
|
+
*/
|
|
538
|
+
postScriptName: string;
|
|
539
|
+
/**
|
|
540
|
+
* Human typeface name from the font's opentype name table (falls back to
|
|
541
|
+
* the PS family name).
|
|
542
|
+
*/
|
|
543
|
+
family: string;
|
|
544
|
+
/** 400 | 700 | 900 (pdf.js bold/black flags) */
|
|
545
|
+
weight?: number;
|
|
546
|
+
style?: 'normal' | 'italic';
|
|
547
|
+
/**
|
|
548
|
+
* Width-axis label (OS/2 `usWidthClass` mapped to a normalized string,
|
|
549
|
+
* or parsed from the PostScript suffix's width token: `cond`,
|
|
550
|
+
* `extended`, `narrow`, …). Distinguishes condensed-width subsets
|
|
551
|
+
* from normal-width subsets so the merger does not collapse them.
|
|
552
|
+
* Absent when neither source carries width information.
|
|
553
|
+
*/
|
|
554
|
+
width?: string;
|
|
555
|
+
/** Raw TTF/OTF bytes */
|
|
556
|
+
data: Uint8Array;
|
|
557
|
+
/** 'font/otf' | 'font/ttf' */
|
|
558
|
+
mimeType: string;
|
|
466
559
|
}
|
|
467
560
|
interface ColorSpan {
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
561
|
+
from: number;
|
|
562
|
+
to: number;
|
|
563
|
+
fill: Color | null;
|
|
471
564
|
}
|
|
565
|
+
/**
|
|
566
|
+
* Per-character (UTF-16) weight/style range within a merged TextRun's text.
|
|
567
|
+
*
|
|
568
|
+
* Built by `mergeRuns` only when adjacent same-line runs share a logical
|
|
569
|
+
* font `family` but use different weight/style variants (e.g. inline bold
|
|
570
|
+
* inside a paragraph: `Helvetica` + `Helvetica-Bold` on the same baseline).
|
|
571
|
+
* The emitter applies each span via `engine.block.setTextFontWeightAndStyle(id,
|
|
572
|
+
* weight, style, from, to)` when the span sets both, and otherwise, or on an
|
|
573
|
+
* older engine, via `setTextFontWeight` and `setTextFontStyle`. Range indices
|
|
574
|
+
* match those setters' contract.
|
|
575
|
+
*
|
|
576
|
+
* `fontRef` carries the EmbeddedFont reference for the originating run so
|
|
577
|
+
* the emitter can register the per-range subset typeface (or look up the
|
|
578
|
+
* resolver result) when the base typeface lacks the variant. Always
|
|
579
|
+
* present on every span, even when it matches the block-level `fontRef`,
|
|
580
|
+
* mirroring how `ColorSpan.fill` is always present.
|
|
581
|
+
*/
|
|
472
582
|
interface StyleSpan {
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
583
|
+
from: number;
|
|
584
|
+
to: number;
|
|
585
|
+
/** PostScript name from the originating run. */
|
|
586
|
+
fontRef: string;
|
|
587
|
+
/** CSS 100..900; matches `EmbeddedFont.weight`. */
|
|
588
|
+
fontWeight?: number;
|
|
589
|
+
/** Matches `EmbeddedFont.style`. */
|
|
590
|
+
fontStyle?: 'normal' | 'italic';
|
|
591
|
+
}
|
|
592
|
+
interface WordSpacingSpan {
|
|
593
|
+
from: number;
|
|
594
|
+
to: number;
|
|
595
|
+
em: number;
|
|
596
|
+
}
|
|
597
|
+
/** Extra advance after each character of a UTF-16 range, in em. */
|
|
598
|
+
interface LetterSpacingSpan {
|
|
599
|
+
from: number;
|
|
600
|
+
to: number;
|
|
601
|
+
em: number;
|
|
602
|
+
}
|
|
603
|
+
/** Semantic underline ranges, indexed in UTF-16 code units. */
|
|
604
|
+
interface UnderlineSpan {
|
|
605
|
+
from: number;
|
|
606
|
+
to: number;
|
|
607
|
+
color?: Color;
|
|
608
|
+
thickness?: number;
|
|
609
|
+
offset?: number;
|
|
481
610
|
}
|
|
611
|
+
/**
|
|
612
|
+
* Editable text. Position/size describe the run's bbox; CE.SDK re-typesets
|
|
613
|
+
* the string using the typeface registered from `fontRef`. Per-glyph
|
|
614
|
+
* positions are NOT preserved — this is the trade for editability.
|
|
615
|
+
*/
|
|
482
616
|
interface TextRun {
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
617
|
+
kind: 'text-run';
|
|
618
|
+
/** pt, unrotated bbox top-left */
|
|
619
|
+
x: number;
|
|
620
|
+
/** pt */
|
|
621
|
+
y: number;
|
|
622
|
+
/** pt (with a small advance padding) */
|
|
623
|
+
width: number;
|
|
624
|
+
/** pt (ascender - descender, scaled by fontSize) */
|
|
625
|
+
height: number;
|
|
626
|
+
/** Rendered string (Unicode, not glyph codes) */
|
|
627
|
+
text: string;
|
|
628
|
+
/** postScriptName; resolves via Document.fonts */
|
|
629
|
+
fontRef: string;
|
|
630
|
+
/**
|
|
631
|
+
* Logical font family (subset prefix + weight/style suffix stripped),
|
|
632
|
+
* mirroring `EmbeddedFont.family`. Populated by `text-items.ts` from
|
|
633
|
+
* the resolved EmbeddedFont so `postprocess-text.ts::canGroup` can
|
|
634
|
+
* decide whether two distinct `fontRef`s (e.g. `Helvetica` +
|
|
635
|
+
* `Helvetica-Bold`) belong to the same logical typeface and should
|
|
636
|
+
* merge into one block with `styleSpans`. Absent on legacy inputs
|
|
637
|
+
* (synthetic IR, older callers) — `canGroup` then falls back to the
|
|
638
|
+
* stricter `fontRef === fontRef` test and keeps the runs split.
|
|
639
|
+
*/
|
|
640
|
+
family?: string;
|
|
641
|
+
/**
|
|
642
|
+
* CSS 100..900, mirroring `EmbeddedFont.weight`. Used as the per-run
|
|
643
|
+
* weight contribution when the merger bridges variants of the same
|
|
644
|
+
* `family`. Absent on legacy inputs (merger then refuses to merge
|
|
645
|
+
* across `fontRef` mismatches — see `family`).
|
|
646
|
+
*/
|
|
647
|
+
fontWeight?: number;
|
|
648
|
+
/** Mirrors `EmbeddedFont.style`. Pairs with `fontWeight`. */
|
|
649
|
+
fontStyle?: 'normal' | 'italic';
|
|
650
|
+
/**
|
|
651
|
+
* Width-axis label, mirroring `EmbeddedFont.width`. Distinguishes
|
|
652
|
+
* `Helvetica-Condensed` from `Helvetica-Regular` so the merger does
|
|
653
|
+
* not collapse them — CE.SDK's per-range setters (`setTextFontWeight`,
|
|
654
|
+
* `setTextFontStyle`) have no width parameter and would silently
|
|
655
|
+
* render condensed glyphs at normal width.
|
|
656
|
+
*
|
|
657
|
+
* Values follow OS/2 `usWidthClass` semantics, normalized to a small
|
|
658
|
+
* string set: `'ultraCondensed' | 'extraCondensed' | 'condensed' |
|
|
659
|
+
* 'semiCondensed' | 'normal' | 'semiExpanded' | 'expanded' |
|
|
660
|
+
* 'extraExpanded' | 'ultraExpanded'`. Absent on legacy inputs.
|
|
661
|
+
*/
|
|
662
|
+
fontWidth?: string;
|
|
663
|
+
/** pt */
|
|
664
|
+
fontSize: number;
|
|
665
|
+
/**
|
|
666
|
+
* Radians, 0 for horizontal text. x/y place the block so rotation around
|
|
667
|
+
* its center matches the PDF.
|
|
668
|
+
*/
|
|
669
|
+
rotation: number;
|
|
670
|
+
fill: Color | null;
|
|
671
|
+
/**
|
|
672
|
+
* pt, pen origin x in PDF view-frame (top-left origin), pre-pivot-comp.
|
|
673
|
+
* Populated by `text-items.ts`; used by `groupLineRuns` to test
|
|
674
|
+
* pen-origin continuity between runs that pdf.js split mid-line for
|
|
675
|
+
* kerning.
|
|
676
|
+
*/
|
|
677
|
+
baselineXPt?: number;
|
|
678
|
+
/** pt, pen origin y, same frame. */
|
|
679
|
+
baselineYPt?: number;
|
|
680
|
+
/**
|
|
681
|
+
* pt, raw along-baseline advance from pdf.js (`item.width`). Distinct
|
|
682
|
+
* from `width`, which carries a small rendering padding that is
|
|
683
|
+
* intentionally invisible to merger logic.
|
|
684
|
+
*/
|
|
685
|
+
advanceWidthPt?: number;
|
|
686
|
+
/**
|
|
687
|
+
* Per-character (UTF-16) color ranges within `text`. Set by `mergeRuns`
|
|
688
|
+
* only when constituent runs differ in fill; absent for single-run
|
|
689
|
+
* blocks and for merged groups with uniform fill (back-compat). Range
|
|
690
|
+
* indices match `engine.block.setTextColor(id, color, from, to)`'s
|
|
691
|
+
* contract.
|
|
692
|
+
*/
|
|
693
|
+
colorSpans?: ColorSpan[];
|
|
694
|
+
/**
|
|
695
|
+
* Per-character (UTF-16) weight/style ranges within `text`. Set by
|
|
696
|
+
* `mergeRuns` only when the merger bridged adjacent same-family runs
|
|
697
|
+
* that use different weight/style variants (e.g. inline bold inside a
|
|
698
|
+
* paragraph). Absent for single-run blocks and for merged groups with
|
|
699
|
+
* uniform variant. Range indices match the text range setters, such as
|
|
700
|
+
* `engine.block.setTextFontWeightAndStyle(id, weight, style, from, to)`.
|
|
701
|
+
*/
|
|
702
|
+
styleSpans?: StyleSpan[];
|
|
703
|
+
/** Extra PDF word spacing in em, applied only to original ASCII spaces.
|
|
704
|
+
* UTF-16 ranges exclude synthesized spaces between soft-wrapped lines. */
|
|
705
|
+
wordSpacingSpans?: WordSpacingSpan[];
|
|
706
|
+
/** Positive PDF character spacing (`Tc`) in em. A range has
|
|
707
|
+
* the text of one PDF line; text outside every range has no extra spacing. */
|
|
708
|
+
letterSpacingSpans?: LetterSpacingSpan[];
|
|
709
|
+
/** Underline artwork recognized after fitting the source text. */
|
|
710
|
+
underlineSpans?: UnderlineSpan[];
|
|
711
|
+
/**
|
|
712
|
+
* Lazy builder for the run's glyph outline as a vector path. Captures
|
|
713
|
+
* the walker's pending run + glyph + font references; invoked by
|
|
714
|
+
* `emit/cesdk.ts::emitGlyphsAsVectorPath` only when the font-strategy
|
|
715
|
+
* cascade returns null and emission needs a fallback. Returns the SVG
|
|
716
|
+
* `d` plus bbox geometry, or null when path extraction is unavailable
|
|
717
|
+
* (Type 3 glyph charproc missing, opentype parse failure).
|
|
718
|
+
*
|
|
719
|
+
* Populated by `text-items.ts::extractTextRuns` from a per-BT/ET queue
|
|
720
|
+
* stashed by the walker (`placeholder._lazyGlyphOutlines`). Holds
|
|
721
|
+
* references — discarded when the IR is GC'd after emit. Builder is
|
|
722
|
+
* called at most once per run (cascade-null is rare for asset-library
|
|
723
|
+
* coverage).
|
|
724
|
+
*/
|
|
725
|
+
_buildGlyphOutline?: () => GlyphOutlineData | null;
|
|
584
726
|
}
|
|
727
|
+
/**
|
|
728
|
+
* Output of `TextRun._buildGlyphOutline`. Mirrors the relevant subset of
|
|
729
|
+
* `TextOutline`: a single SVG `d` in bbox-local coords, plus the bbox in
|
|
730
|
+
* page coords (top-left origin, pt). Consumed only by the emission
|
|
731
|
+
* layer's vector-fallback path.
|
|
732
|
+
*/
|
|
585
733
|
interface GlyphOutlineData {
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
734
|
+
/** SVG path data in local bbox coordinates (top-left origin). */
|
|
735
|
+
d: string;
|
|
736
|
+
/** pt, bbox top-left in page coords. */
|
|
737
|
+
x: number;
|
|
738
|
+
/** pt */
|
|
739
|
+
y: number;
|
|
740
|
+
/** pt */
|
|
741
|
+
width: number;
|
|
742
|
+
/** pt */
|
|
743
|
+
height: number;
|
|
596
744
|
}
|
|
597
745
|
/**
|
|
598
746
|
* Per-run input to the cascade and emission layers. Built by
|
|
@@ -608,70 +756,70 @@ interface GlyphOutlineData {
|
|
|
608
756
|
* the cascade returns null and a vector fallback is needed — most
|
|
609
757
|
* documents have asset-library coverage and never call it.
|
|
610
758
|
*/
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
759
|
+
interface FontRequest {
|
|
760
|
+
/** Display family (subset prefix stripped). */
|
|
761
|
+
family: string;
|
|
762
|
+
style: "normal" | "italic";
|
|
763
|
+
weight: Font["weight"];
|
|
764
|
+
/** Original text content; preserved for metadata + recovery. */
|
|
765
|
+
text: string;
|
|
766
|
+
/** Embedded subset bytes — present when the source was a TextRun. */
|
|
767
|
+
embeddedFont?: EmbeddedFont;
|
|
768
|
+
/** Concatenated glyph paths in local coords — present when the source was a TextOutline. */
|
|
769
|
+
glyphPaths?: string;
|
|
770
|
+
/** Lazy glyph-outline builder (TextRun sources). Built by walker;
|
|
771
|
+
* invoked at most once by emission when the cascade returns null. */
|
|
772
|
+
buildGlyphOutline?: () => GlyphOutlineData | null;
|
|
773
|
+
/** Original IR block — used by emission for geometry, fills, rotation, etc. */
|
|
774
|
+
source: TextRun | TextOutline;
|
|
627
775
|
}
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
776
|
+
type CascadeResolution = {
|
|
777
|
+
kind: "typeface";
|
|
778
|
+
typeface: Typeface;
|
|
779
|
+
font?: Font;
|
|
780
|
+
/** Identifies which stage produced this resolution. */
|
|
781
|
+
provenance: string;
|
|
782
|
+
/** Forwarded from `FontResolverResult.substitutedFrom`. When set, the
|
|
783
|
+
* emission layer treats the resolution as substituted and recomputes
|
|
784
|
+
* layout. */
|
|
785
|
+
substitutedFrom?: string;
|
|
638
786
|
} | {
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
787
|
+
kind: "subset";
|
|
788
|
+
embeddedFont: EmbeddedFont;
|
|
789
|
+
provenance: "embedded-subset";
|
|
642
790
|
};
|
|
643
791
|
/**
|
|
644
792
|
* Stage outcome. Distinguishing "pass with reason" from `null` lets debug
|
|
645
793
|
* logs explain *why* the cascade reached a given stage's neighbour. Cheap
|
|
646
794
|
* to carry now; expensive to retrofit.
|
|
647
795
|
*/
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
796
|
+
type StageOutcome = CascadeResolution | {
|
|
797
|
+
kind: "pass";
|
|
798
|
+
reason: string;
|
|
651
799
|
};
|
|
652
800
|
interface CascadeLogger {
|
|
653
|
-
|
|
654
|
-
|
|
801
|
+
emit?: (code: string, params: Record<string, unknown>) => void;
|
|
802
|
+
log?: (message: string, level?: string) => void;
|
|
655
803
|
}
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
804
|
+
interface FontStageContext {
|
|
805
|
+
engine: CreativeEngine;
|
|
806
|
+
resolver: TypefaceResolver | null;
|
|
807
|
+
/**
|
|
808
|
+
* Per-import-call cache. Same `family|style|weight` resolves once per
|
|
809
|
+
* `PDFParser.fromFile` invocation; reopening the PDF produces a fresh
|
|
810
|
+
* cache. Created in the parser entry, discarded on completion.
|
|
811
|
+
*/
|
|
812
|
+
resolverCache: Map<string, FontResolverResult | null>;
|
|
813
|
+
logger: CascadeLogger | null;
|
|
666
814
|
}
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
815
|
+
interface FontStage {
|
|
816
|
+
/** Stable identifier for logs and tests. */
|
|
817
|
+
readonly name: string;
|
|
818
|
+
resolve(req: FontRequest, ctx: FontStageContext): Promise<StageOutcome>;
|
|
671
819
|
}
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
820
|
+
interface FontCascade {
|
|
821
|
+
readonly stages: readonly FontStage[];
|
|
822
|
+
resolve(req: FontRequest, ctx: FontStageContext): Promise<CascadeResolution | null>;
|
|
675
823
|
}
|
|
676
824
|
/**
|
|
677
825
|
* Result of a single emission call. The emission layer may produce zero,
|
|
@@ -680,13 +828,13 @@ export interface FontCascade {
|
|
|
680
828
|
* substitution that the dispatcher should account against the
|
|
681
829
|
* per-import substitution-count log.
|
|
682
830
|
*/
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
831
|
+
interface EmissionResult {
|
|
832
|
+
/** CE.SDK block ids created. Empty array means the run was skipped. */
|
|
833
|
+
blocks: number[];
|
|
834
|
+
/** True when the resolution involved a font substitution. */
|
|
835
|
+
substituted: boolean;
|
|
836
|
+
/** Display name of the typeface the run resolved to, if any. */
|
|
837
|
+
resolvedFamily?: string;
|
|
690
838
|
}
|
|
691
839
|
/**
|
|
692
840
|
* Block-creation primitives that emission delegates to. The dispatcher
|
|
@@ -695,47 +843,47 @@ export interface EmissionResult {
|
|
|
695
843
|
* the emission policy testable in isolation: each callback can be
|
|
696
844
|
* stubbed.
|
|
697
845
|
*/
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
846
|
+
interface EmissionHelpers {
|
|
847
|
+
/**
|
|
848
|
+
* Create an editable text block with the request's geometry and the
|
|
849
|
+
* caller-supplied `applyFont` callback (called between layout and
|
|
850
|
+
* properties — order matters for CE.SDK's `replaceText` wrap-marker).
|
|
851
|
+
* `layoutIr` may be the original block or a typeface-aware substitute
|
|
852
|
+
* (see `resolveLayoutForSubstitution` below).
|
|
853
|
+
*/
|
|
854
|
+
createEditableText(req: FontRequest, layoutIr: TextOutline | TextRun, applyFont: (engine: CreativeEngine, block: number) => void): number;
|
|
855
|
+
/**
|
|
856
|
+
* Emit the request's `glyphPaths` as a `vector_path` graphic block at
|
|
857
|
+
* the source bbox. Returns null when the request carries no
|
|
858
|
+
* `glyphPaths` (TextRun source).
|
|
859
|
+
*/
|
|
860
|
+
emitGlyphsAsVectorPath(req: FontRequest): number | null;
|
|
861
|
+
/**
|
|
862
|
+
* Compute the layout-aware IR for a substituted typeface. For TextRun
|
|
863
|
+
* sources this is a no-op (returns `req.source`); for TextOutline
|
|
864
|
+
* sources it derives the unrotated bbox CE.SDK needs using the
|
|
865
|
+
* substitute's font metrics.
|
|
866
|
+
*/
|
|
867
|
+
resolveLayoutForSubstitution(req: FontRequest, resolution: CascadeResolution): Promise<TextOutline | TextRun>;
|
|
720
868
|
}
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
869
|
+
interface EmissionContext {
|
|
870
|
+
engine: CreativeEngine;
|
|
871
|
+
logger: CascadeLogger | null;
|
|
872
|
+
/** Page index (1-based) for diagnostic context. */
|
|
873
|
+
pageIndex?: number;
|
|
874
|
+
helpers: EmissionHelpers;
|
|
727
875
|
}
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
876
|
+
interface FontEmission {
|
|
877
|
+
readonly name: string;
|
|
878
|
+
emit(req: FontRequest, resolution: CascadeResolution | null, ctx: EmissionContext): Promise<EmissionResult>;
|
|
731
879
|
}
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
880
|
+
interface FontStrategy {
|
|
881
|
+
readonly cascade: FontCascade;
|
|
882
|
+
readonly emission: FontEmission;
|
|
735
883
|
}
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
884
|
+
declare const perfectMatchResolverStage: FontStage;
|
|
885
|
+
declare const embeddedSubsetStage: FontStage;
|
|
886
|
+
declare const anyMatchResolverStage: FontStage;
|
|
739
887
|
export declare const defaultEmission: FontEmission;
|
|
740
888
|
/**
|
|
741
889
|
* Build a cascade from an ordered list of stages. The cascade walks the
|
|
@@ -744,8 +892,8 @@ export declare const defaultEmission: FontEmission;
|
|
|
744
892
|
*/
|
|
745
893
|
export declare function createFontCascade(stages: FontStage[]): FontCascade;
|
|
746
894
|
interface FontStrategyDef {
|
|
747
|
-
|
|
748
|
-
|
|
895
|
+
cascade: FontCascade;
|
|
896
|
+
emission: FontEmission;
|
|
749
897
|
}
|
|
750
898
|
export declare function createFontStrategy(def: FontStrategyDef): FontStrategy;
|
|
751
899
|
/**
|
|
@@ -788,154 +936,158 @@ export declare const exactFidelityStrategy: FontStrategy;
|
|
|
788
936
|
*/
|
|
789
937
|
export declare const assetLibraryStrategy: FontStrategy;
|
|
790
938
|
export declare const defaultStrategy: FontStrategy;
|
|
791
|
-
type PageBounds =
|
|
939
|
+
type PageBounds = 'trim' | 'media';
|
|
940
|
+
type TextLayout = 'paragraphs' | 'lines';
|
|
792
941
|
type PdfLogger = Logger<typeof WARNING_CODES>;
|
|
793
942
|
type LoadAsBlocksOptions = {
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
943
|
+
/**
|
|
944
|
+
* `scene` follows the destination's design units, DPI and font-size unit.
|
|
945
|
+
* Defaults to the deprecated `legacy` mode: inch geometry and unchanged
|
|
946
|
+
* PDF font-size numbers. Existing manual conversions remain valid.
|
|
947
|
+
*/
|
|
948
|
+
units?: 'legacy' | 'scene';
|
|
949
|
+
pageIndex?: number;
|
|
950
|
+
preservePageBounds?: boolean;
|
|
951
|
+
signal?: AbortSignal;
|
|
952
|
+
maxBlocks?: number;
|
|
804
953
|
};
|
|
805
954
|
type LoadAsBlocksResult = {
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
955
|
+
blocks: number[];
|
|
956
|
+
logger: PdfLogger;
|
|
957
|
+
dispose: () => void;
|
|
809
958
|
};
|
|
810
959
|
export declare class PDFParser {
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
960
|
+
private engine;
|
|
961
|
+
private pdfBytes;
|
|
962
|
+
private fontResolver;
|
|
963
|
+
private fontStrategy;
|
|
964
|
+
private pageBounds;
|
|
965
|
+
private preserveWhitePageBackground;
|
|
966
|
+
private textLayout;
|
|
967
|
+
private logger;
|
|
968
|
+
private ir?;
|
|
969
|
+
private constructor();
|
|
970
|
+
/**
|
|
971
|
+
* Create a PDFParser instance from a PDF file.
|
|
972
|
+
*
|
|
973
|
+
* @param engine - CE.SDK engine instance
|
|
974
|
+
* @param file - PDF file as Blob, File, or ArrayBuffer
|
|
975
|
+
* @param options - Optional configuration
|
|
976
|
+
* @param options.fontResolver - Custom font resolver. Invoked by the
|
|
977
|
+
* cascade's resolver-using stages (`perfectMatchResolverStage`,
|
|
978
|
+
* `anyMatchResolverStage`). Requires `addGfontsAssetLibrary` to be
|
|
979
|
+
* called on the engine before parse.
|
|
980
|
+
* @param options.fontStrategy - Strategy controlling how text runs
|
|
981
|
+
* become blocks. Default: `editableFirstStrategy` — prefers a perfect
|
|
982
|
+
* asset-library match, falls back to the PDF-embedded subset, then to
|
|
983
|
+
* resolver substitution (any-match), and finally to vector outline
|
|
984
|
+
* when nothing else hits. Other shipped presets:
|
|
985
|
+
* `exactFidelityStrategy` (never substitute), `assetLibraryStrategy`
|
|
986
|
+
* (drop subset). Build custom strategies with `createFontStrategy({
|
|
987
|
+
* cascade, emission })`. See `packages/pdf-importer/CLAUDE.md` →
|
|
988
|
+
* "Font resolution" for the mental model and offline-safe recipe.
|
|
989
|
+
* @returns A new PDFParser instance
|
|
990
|
+
*/
|
|
991
|
+
static fromFile(engine: CreativeEngine, file: Blob | File | ArrayBuffer, options?: {
|
|
992
|
+
fontResolver?: TypefaceResolver;
|
|
993
|
+
fontStrategy?: FontStrategy;
|
|
994
|
+
/**
|
|
995
|
+
* Which PDF page box the emitted CE.SDK pages are sized to. Defaults
|
|
996
|
+
* to `"trim"` (designed page + bleed margin, the end-user view).
|
|
997
|
+
* `"media"` keeps pages at MediaBox (aka `page.view`) dimensions
|
|
998
|
+
* with children unshifted — used by the regression pixel-diff harness
|
|
999
|
+
* so CE.SDK exports match `pdftoppm`'s full-MediaBox reference images.
|
|
1000
|
+
*/
|
|
1001
|
+
pageBounds?: PageBounds;
|
|
1002
|
+
/**
|
|
1003
|
+
* Keep full-page white rectangles as artwork. Defaults to false,
|
|
1004
|
+
* which removes them as redundant page backgrounds. Enable when
|
|
1005
|
+
* placing imported artwork on a background of another color.
|
|
1006
|
+
*/
|
|
1007
|
+
preserveWhitePageBackground?: boolean;
|
|
1008
|
+
/**
|
|
1009
|
+
* Reconstruct editable paragraphs with soft wrapping when their line
|
|
1010
|
+
* geometry can be preserved. Defaults to `paragraphs`. Use `lines`
|
|
1011
|
+
* to retain one text block per PDF line. `loadAsBlocks()` retains
|
|
1012
|
+
* lines in the legacy unit mode and when `maxBlocks` is set.
|
|
1013
|
+
*/
|
|
1014
|
+
textLayout?: TextLayout;
|
|
1015
|
+
}): Promise<PDFParser>;
|
|
1016
|
+
/**
|
|
1017
|
+
* @deprecated Use options object instead: `fromFile(engine, file, { fontResolver })`
|
|
1018
|
+
*/
|
|
1019
|
+
static fromFile(engine: CreativeEngine, file: Blob | File | ArrayBuffer, fontResolver?: TypefaceResolver): Promise<PDFParser>;
|
|
1020
|
+
/**
|
|
1021
|
+
* Parse the PDF file and emit a CE.SDK scene with all pages.
|
|
1022
|
+
*
|
|
1023
|
+
* Pipeline: pdf.js → IR (`extractDocument`) → line-run grouping →
|
|
1024
|
+
* CE.SDK scene (`emitInto`). Compatible adjacent lines become soft-wrapped
|
|
1025
|
+
* paragraphs when their visible content and geometry remain unchanged.
|
|
1026
|
+
* `textLayout: 'lines'` keeps each PDF line in its own editable block.
|
|
1027
|
+
*
|
|
1028
|
+
* Mirrors `engine.scene.loadFromString`: replaces the engine's current
|
|
1029
|
+
* scene with the imported PDF. Leaves the camera zoomed onto the first
|
|
1030
|
+
* imported page, so an interactive host opens the document in view
|
|
1031
|
+
* instead of at the previous scene's zoom.
|
|
1032
|
+
*
|
|
1033
|
+
* @returns Parse result containing the scene ID and logger
|
|
1034
|
+
*/
|
|
1035
|
+
parse(): Promise<{
|
|
1036
|
+
scene: number;
|
|
1037
|
+
logger: PdfLogger;
|
|
1038
|
+
}>;
|
|
1039
|
+
/**
|
|
1040
|
+
* Fit the camera to the first imported page. Best effort: a missing API
|
|
1041
|
+
* or a camera the engine cannot fit (headless engines have no canvas)
|
|
1042
|
+
* must never fail the import.
|
|
1043
|
+
*/
|
|
1044
|
+
private zoomToFirstPage;
|
|
1045
|
+
/**
|
|
1046
|
+
* Parse the PDF and return the imported pages as detached CE.SDK groups.
|
|
1047
|
+
*
|
|
1048
|
+
* Mirrors `engine.block.loadFromString`: returned blocks are NOT attached
|
|
1049
|
+
* to a scene. Caller appends and positions them however they want.
|
|
1050
|
+
*
|
|
1051
|
+
* Each non-empty PDF page yields one `group` with the page's content as
|
|
1052
|
+
* children. By default, geometry uses numeric inch coordinates and PDF
|
|
1053
|
+
* font-size numbers pass unchanged to the engine, preserving existing calls.
|
|
1054
|
+
* This legacy unit mode is deprecated. Set `units: 'scene'` to use the
|
|
1055
|
+
* destination scene's design units, DPI and font-size unit, and remove the
|
|
1056
|
+
* corresponding manual conversions. With no scene, scene mode uses inch
|
|
1057
|
+
* geometry and point font sizes. Attach a group before using
|
|
1058
|
+
* `engine.block.scale` to fit it proportionally into a destination frame. Groups do not clip their content.
|
|
1059
|
+
*
|
|
1060
|
+
* @param options
|
|
1061
|
+
* @param options.units Unit mode. Defaults to `legacy` for compatibility.
|
|
1062
|
+
* Use `scene` for automatic unit conversion into an existing scene.
|
|
1063
|
+
* @param options.pageIndex 0-based page to load. Omit to load all pages
|
|
1064
|
+
* (returns one group per non-empty page, in document order).
|
|
1065
|
+
* @param options.preservePageBounds Keep the PDF page's whitespace and origin
|
|
1066
|
+
* with a non-selectable bounds child. Defaults to false, so group bounds
|
|
1067
|
+
* follow the imported artwork after layout.
|
|
1068
|
+
* @param options.signal Cancels preparation or emission. Rejects with an
|
|
1069
|
+
* `AbortError`; partial imported blocks are destroyed.
|
|
1070
|
+
* @param options.maxBlocks Optional positive integer limiting engine block
|
|
1071
|
+
* allocations, including shapes, fills and temporary clipping blocks.
|
|
1072
|
+
* Keeps separate text lines to avoid speculative paragraph allocations.
|
|
1073
|
+
* @returns Detached group IDs, the logger, and an idempotent `dispose`
|
|
1074
|
+
* callback to discard the import and its unused buffers and spot colors.
|
|
1075
|
+
* Dispose only before committing the groups to your document's undo history.
|
|
1076
|
+
* Empty pages are omitted.
|
|
1077
|
+
*/
|
|
1078
|
+
loadAsBlocks(options?: LoadAsBlocksOptions): Promise<LoadAsBlocksResult>;
|
|
1079
|
+
/**
|
|
1080
|
+
* Number of pages in the PDF document.
|
|
1081
|
+
*
|
|
1082
|
+
* Triggers a full IR extraction on first call (the same work `parse` /
|
|
1083
|
+
* `loadAsBlocks` does), then caches it. Subsequent calls — including
|
|
1084
|
+
* `parse` and `loadAsBlocks` themselves — reuse the cached IR.
|
|
1085
|
+
*/
|
|
1086
|
+
getPageCount(): Promise<number>;
|
|
1087
|
+
/**
|
|
1088
|
+
* Get the logger for this parser instance.
|
|
1089
|
+
*/
|
|
1090
|
+
getLogger(): PdfLogger;
|
|
1091
|
+
private ensureIR;
|
|
935
1092
|
}
|
|
936
|
-
|
|
937
|
-
export {
|
|
938
|
-
PdfLogMessage as LogMessage,
|
|
939
|
-
};
|
|
940
|
-
|
|
941
|
-
export {};
|
|
1093
|
+
export { type CascadeResolution, type EmissionContext, type EmissionHelpers, type EmissionResult, type FontCascade, type FontEmission, type FontRequest, type FontStage, type FontStageContext, type FontStrategy, type PdfLogMessage as LogMessage, type StageOutcome, type TextLayout, anyMatchResolverStage, embeddedSubsetStage, perfectMatchResolverStage };
|