@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,69 +1,109 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
import CreativeEngine, { AssetAPI, Font, Typeface } from "@cesdk/engine";
|
|
2
|
+
/**
|
|
3
|
+
* The document profile an import asks for.
|
|
4
|
+
*/
|
|
5
|
+
type ColorProfileRequest = {
|
|
6
|
+
/**
|
|
7
|
+
* The profile the document names, for example
|
|
8
|
+
* `Coated FOGRA39 (ISO 12647-2:2004)`.
|
|
9
|
+
*/
|
|
10
|
+
name: string;
|
|
11
|
+
/**
|
|
12
|
+
* The component space the profile must describe. An IDML document names one
|
|
13
|
+
* working space per component space, so both go to the `Default` role.
|
|
14
|
+
*/
|
|
15
|
+
space: 'CMYK' | 'RGB';
|
|
16
|
+
};
|
|
17
|
+
/**
|
|
18
|
+
* Resolves a document ICC profile for the import.
|
|
19
|
+
*
|
|
20
|
+
* @param request The profile the document asks for, and the space it describes.
|
|
21
|
+
* @returns The profile as ICC bytes or as a URI the engine can fetch, or
|
|
22
|
+
* `undefined` or `null` when it is not available.
|
|
23
|
+
*
|
|
24
|
+
* Bytes are stored as a `buffer://` URI. Relocate it before `saveToString`, as
|
|
25
|
+
* "Saving Scenes with Stable URLs" in the README describes, or return a URI,
|
|
26
|
+
* which is stored as itself.
|
|
27
|
+
*/
|
|
28
|
+
type ColorProfileResolver = (request: ColorProfileRequest) => Promise<Uint8Array | string | undefined | null>;
|
|
29
|
+
/**
|
|
30
|
+
* The strings that mark a text variable in the source document, such as `[[`
|
|
31
|
+
* and `]]` around `[[First Name]]`.
|
|
32
|
+
*/
|
|
33
|
+
interface VariableDelimiter {
|
|
34
|
+
/** The string before the variable name. Must not be empty. */
|
|
35
|
+
open: string;
|
|
36
|
+
/** The string after the variable name. Must not be empty. */
|
|
37
|
+
close: string;
|
|
38
|
+
}
|
|
39
|
+
type WarningSeverity = 'error' | 'warning' | 'info';
|
|
7
40
|
interface WarningDefinition {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
41
|
+
/** Default + sole severity. Call sites do not override. */
|
|
42
|
+
severity: WarningSeverity;
|
|
43
|
+
/**
|
|
44
|
+
* Template with `{name}` placeholders. Renderer throws if a placeholder
|
|
45
|
+
* has no matching key in `params` — guards against silent typos.
|
|
46
|
+
*/
|
|
47
|
+
template: string;
|
|
15
48
|
}
|
|
16
|
-
interface LogMessage<TCode extends string = string> {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
49
|
+
interface LogMessage$1<TCode extends string = string> {
|
|
50
|
+
/** Stable machine-readable identifier — never rename once shipped. */
|
|
51
|
+
code: TCode;
|
|
52
|
+
/** Inherited from the code definition. */
|
|
53
|
+
type: WarningSeverity;
|
|
54
|
+
/** Human-readable rendered string. */
|
|
55
|
+
message: string;
|
|
56
|
+
/** Raw structured fields — superset of all `{name}` placeholders. */
|
|
57
|
+
params: Record<string, unknown>;
|
|
25
58
|
}
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
59
|
+
/**
|
|
60
|
+
* Generic structured logger. Severity is registry-driven (PostgreSQL
|
|
61
|
+
* SQLSTATE pattern) — call sites cannot override. To change severity,
|
|
62
|
+
* edit the registry.
|
|
63
|
+
*/
|
|
64
|
+
declare class Logger$1<R extends Record<string, WarningDefinition>> {
|
|
65
|
+
private readonly registry;
|
|
66
|
+
private messages;
|
|
67
|
+
constructor(registry: R);
|
|
68
|
+
emit<K extends keyof R & string>(code: K, params?: Record<string, unknown>): void;
|
|
69
|
+
getMessages(): LogMessage$1<keyof R & string>[];
|
|
32
70
|
}
|
|
33
|
-
|
|
71
|
+
/** Slice of `engine.asset` used by the font resolver. */
|
|
72
|
+
type AssetQueryAPI = Pick<AssetAPI, 'findAllSources' | 'addLocalAssetSourceFromJSONURI' | 'findAssets'> & Partial<Pick<AssetAPI, 'fetchAsset'>>;
|
|
73
|
+
/** Minimal engine slice this module needs. */
|
|
34
74
|
type AssetEngine = {
|
|
35
|
-
|
|
75
|
+
asset: AssetQueryAPI;
|
|
36
76
|
};
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
77
|
+
interface TypefaceParams {
|
|
78
|
+
family: string;
|
|
79
|
+
style?: Font['style'];
|
|
80
|
+
weight?: Font['weight'];
|
|
41
81
|
}
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
82
|
+
interface FontResolverOptions {
|
|
83
|
+
/**
|
|
84
|
+
* When the requested weight is not available in the matched typeface,
|
|
85
|
+
* pick the closest available weight using the CSS Font Matching algorithm.
|
|
86
|
+
* Defaults to false — return null instead so the caller can decide what
|
|
87
|
+
* to do (e.g. log a warning, use a different font).
|
|
88
|
+
*
|
|
89
|
+
* Only enable when the typeface name is known to be a good match. The
|
|
90
|
+
* typeface query uses fuzzy matching, so applying weight fallback to a
|
|
91
|
+
* poor name match can silently produce wildly wrong results.
|
|
92
|
+
*/
|
|
93
|
+
closestWeightMatch?: boolean;
|
|
54
94
|
}
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
95
|
+
interface FontResolverResult {
|
|
96
|
+
typeface: Typeface;
|
|
97
|
+
font: Font;
|
|
98
|
+
/**
|
|
99
|
+
* Set to the originally requested family name when the typeface came from
|
|
100
|
+
* the proprietary-fallbacks source (e.g. requested "Helvetica", got Roboto).
|
|
101
|
+
* Undefined when the family matched the main Google Fonts catalog directly.
|
|
102
|
+
* Always populated when applicable; consumers may ignore it.
|
|
103
|
+
*/
|
|
104
|
+
substitutedFrom?: string;
|
|
65
105
|
}
|
|
66
|
-
|
|
106
|
+
type TypefaceResolver = (params: TypefaceParams, engine: AssetEngine, options?: FontResolverOptions) => Promise<FontResolverResult | null>;
|
|
67
107
|
/**
|
|
68
108
|
* Register the @imgly/gfonts asset sources (Google Fonts catalog + proprietary
|
|
69
109
|
* font fallbacks) with the CE.SDK engine.
|
|
@@ -75,179 +115,251 @@ export type TypefaceResolver = (params: TypefaceParams, engine: AssetEngine, opt
|
|
|
75
115
|
*/
|
|
76
116
|
export declare function addGfontsAssetLibrary(engine: AssetEngine): Promise<void>;
|
|
77
117
|
declare const WARNING_CODES: {
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
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
|
-
|
|
118
|
+
readonly TEXT_JUSTIFICATION_UNSUPPORTED: {
|
|
119
|
+
readonly severity: "warning";
|
|
120
|
+
readonly template: "{justification} cannot be represented by this engine for the paragraph's direction. Using {alignment} alignment without justified word spacing.";
|
|
121
|
+
};
|
|
122
|
+
readonly DECORATION_UL_METRICS_UNAVAILABLE: {
|
|
123
|
+
readonly severity: "warning";
|
|
124
|
+
readonly template: "Underline font metrics were unavailable; custom weight and offset were replaced by the font defaults.";
|
|
125
|
+
};
|
|
126
|
+
readonly TEXT_STROKE_MIXED_UNSUPPORTED: {
|
|
127
|
+
readonly severity: "warning";
|
|
128
|
+
readonly template: "Different character outlines cannot be represented by one CE.SDK text stroke; the outlines were omitted.";
|
|
129
|
+
};
|
|
130
|
+
readonly EMBEDDED_PARSE_FAILED: {
|
|
131
|
+
readonly severity: "warning";
|
|
132
|
+
readonly template: "Embedded {format} could not be parsed ({reason}). The element was skipped.";
|
|
133
|
+
};
|
|
134
|
+
readonly EMBEDDED_PAGE_FAILED: {
|
|
135
|
+
readonly severity: "warning";
|
|
136
|
+
readonly template: "Embedded {format} page {pageNumber} could not be imported ({reason}). The element was skipped.";
|
|
137
|
+
};
|
|
138
|
+
readonly EMBEDDED_IMPORTER_THREW: {
|
|
139
|
+
readonly severity: "error";
|
|
140
|
+
readonly template: "Embedded {format} importer threw an unexpected error ({reason}). The element was skipped.";
|
|
141
|
+
};
|
|
142
|
+
readonly EMBEDDED_IMPORTER_FORWARDED: {
|
|
143
|
+
readonly severity: "warning";
|
|
144
|
+
readonly template: "{message}";
|
|
145
|
+
};
|
|
146
|
+
readonly EMBEDDED_CROP_UNAVAILABLE: {
|
|
147
|
+
readonly severity: "warning";
|
|
148
|
+
readonly template: "Embedded {format} was placed without its crop setting ({reason}). Content outside the cropped region and outside the frame may be visible.";
|
|
149
|
+
};
|
|
150
|
+
readonly EMBEDDED_STROKE_NOT_CLIPPED: {
|
|
151
|
+
readonly severity: "warning";
|
|
152
|
+
readonly template: "An embedded {format} line crosses the edge of its frame or crop region. It is shown in full, because it cannot be clipped: an engine before this change, a dashed closed line or a path command the importer does not read.";
|
|
153
|
+
};
|
|
154
|
+
readonly EMBEDDED_CLIP_FAILED: {
|
|
155
|
+
readonly severity: "warning";
|
|
156
|
+
readonly template: "Embedded {format} content could not be clipped to its frame ({reason}). It is shown unclipped.";
|
|
157
|
+
};
|
|
158
|
+
readonly EMBEDDED_TEXT_NOT_CLIPPED: {
|
|
159
|
+
readonly severity: "warning";
|
|
160
|
+
readonly template: "Embedded {format} text \"{text}\" crosses the edge of its frame or crop region. It stays editable and is shown in full, because text cannot be clipped.";
|
|
161
|
+
};
|
|
162
|
+
readonly EMBEDDED_EPS_UNSUPPORTED: {
|
|
163
|
+
readonly severity: "warning";
|
|
164
|
+
readonly template: "This element contains embedded EPS data, which is not supported. A placeholder image will be shown instead.";
|
|
165
|
+
};
|
|
166
|
+
readonly EMBEDDED_PSD_NO_COMPOSITE: {
|
|
167
|
+
readonly severity: "warning";
|
|
168
|
+
readonly template: "An embedded Photoshop file has no flattened image, so a placeholder image is shown instead. Resave the PSD in Photoshop with \"Maximize PSD and PSB File Compatibility\" turned on, then update the link in InDesign.";
|
|
169
|
+
};
|
|
170
|
+
readonly EMBEDDED_PSD_UNSUPPORTED: {
|
|
171
|
+
readonly severity: "warning";
|
|
172
|
+
readonly template: "An embedded Photoshop file cannot be shown ({reason}), so a placeholder image is shown instead. Resave the file in Photoshop, or embed the image as JPEG or PNG.";
|
|
173
|
+
};
|
|
174
|
+
readonly EMBEDDED_PSD_CMYK_UNMANAGED: {
|
|
175
|
+
readonly severity: "warning";
|
|
176
|
+
readonly template: "The CMYK profile could not be loaded, so embedded CMYK Photoshop images were converted to RGB without colour management. Their colours can differ from InDesign.";
|
|
177
|
+
};
|
|
178
|
+
readonly LINKED_IMAGE_UNSUPPORTED: {
|
|
179
|
+
readonly severity: "warning";
|
|
180
|
+
readonly template: "Image \"{fileName}\" is linked, not embedded in the IDML file. A placeholder is shown instead. Embed the image in InDesign, or supply the file with the linkedImageResolver option.";
|
|
181
|
+
};
|
|
182
|
+
readonly LINKED_IMAGE_UNRESOLVED: {
|
|
183
|
+
readonly severity: "warning";
|
|
184
|
+
readonly template: "Linked image \"{fileName}\" was not supplied by the linkedImageResolver option. A placeholder is shown instead. Return a URL or the file's bytes for \"{uri}\".";
|
|
185
|
+
};
|
|
186
|
+
readonly LINKED_IMAGE_RESOLVER_FAILED: {
|
|
187
|
+
readonly severity: "warning";
|
|
188
|
+
readonly template: "The linkedImageResolver option failed for linked image \"{fileName}\": {reason}. A placeholder is shown instead.";
|
|
189
|
+
};
|
|
190
|
+
readonly LINKED_IMAGE_LOAD_FAILED: {
|
|
191
|
+
readonly severity: "warning";
|
|
192
|
+
readonly template: "Linked file \"{fileName}\" could not be loaded: {reason}. A placeholder is shown instead.";
|
|
193
|
+
};
|
|
194
|
+
readonly IMAGE_CONTENT_MISSING: {
|
|
195
|
+
readonly severity: "warning";
|
|
196
|
+
readonly template: "Image \"{imageId}\" has no file data and no link in the IDML file. A placeholder is shown instead. Place the image again in InDesign.";
|
|
197
|
+
};
|
|
198
|
+
readonly IMAGE_LOAD_FAILED: {
|
|
199
|
+
readonly severity: "warning";
|
|
200
|
+
readonly template: "Image \"{imageUri}\" could not be loaded. The image will be missing from the imported design.";
|
|
201
|
+
};
|
|
202
|
+
readonly GRADIENT_MIDPOINT_APPROX: {
|
|
203
|
+
readonly severity: "warning";
|
|
204
|
+
readonly template: "Gradient \"{key}\" uses InDesign's gradient midpoint feature to control how quickly colors blend into each other. This cannot be exactly reproduced and is approximated instead. Please check the gradient visually.";
|
|
205
|
+
};
|
|
206
|
+
readonly GRADIENT_SPOT_COLOR_APPROX: {
|
|
207
|
+
readonly severity: "warning";
|
|
208
|
+
readonly template: "Gradient \"{key}\" uses spot colors. Its stops were converted to RGB previews because spot inks cannot be preserved in gradient fills.";
|
|
209
|
+
};
|
|
210
|
+
readonly GRADIENT_STOP_UNKNOWN_COLOR: {
|
|
211
|
+
readonly severity: "warning";
|
|
212
|
+
readonly template: "Gradient stop references unknown color \"{color}\". Using black as the default.";
|
|
213
|
+
};
|
|
214
|
+
readonly GRADIENT_FEATHER_UNSUPPORTED: {
|
|
215
|
+
readonly severity: "warning";
|
|
216
|
+
readonly template: "Gradient feather effect is not supported. The feather was removed.";
|
|
217
|
+
};
|
|
218
|
+
readonly PAINT_OPACITY_UNSUPPORTED: {
|
|
219
|
+
readonly severity: "warning";
|
|
220
|
+
readonly template: "{paint} opacity could not be applied to a spot or CMYK color without losing its color identity. The paint opacity was removed.";
|
|
221
|
+
};
|
|
222
|
+
readonly FONT_DEFAULT: {
|
|
223
|
+
readonly severity: "warning";
|
|
224
|
+
readonly template: "Font \"{family}\" is not available. The default font will be used. To preserve the original font, add it to the font library.";
|
|
225
|
+
};
|
|
226
|
+
readonly FONT_SUBSTITUTED: {
|
|
227
|
+
readonly severity: "warning";
|
|
228
|
+
readonly template: "Font \"{substitutedFrom}\" is not available. Substituting with \"{substitutedTo}\".";
|
|
229
|
+
};
|
|
230
|
+
readonly STORY_SPLIT: {
|
|
231
|
+
readonly severity: "info";
|
|
232
|
+
readonly template: "A story that spanned multiple text frames was split into multiple text blocks.";
|
|
233
|
+
};
|
|
234
|
+
readonly TEXT_LEADING_APPROX: {
|
|
235
|
+
readonly severity: "warning";
|
|
236
|
+
readonly template: "A text block uses explicit leading combined with mixed font sizes. Line spacing is approximated with a relative line-height multiplier and may differ from the original.";
|
|
237
|
+
};
|
|
238
|
+
readonly TEXT_SCRIPT_OT_APPROX: {
|
|
239
|
+
readonly severity: "warning";
|
|
240
|
+
readonly template: "Text block '{text}' uses OpenType superscript or subscript, which selects the font's own glyphs. It is approximated with scaled and shifted text and may differ from the original.";
|
|
241
|
+
};
|
|
242
|
+
readonly TEXT_AUTOSIZING_UNSUPPORTED: {
|
|
243
|
+
readonly severity: "warning";
|
|
244
|
+
readonly template: "Text frame autosizing is unsupported ({reason}). The declared fixed frame is retained.";
|
|
245
|
+
};
|
|
246
|
+
readonly TEXT_AUTOSIZING_PAINT_FIXED: {
|
|
247
|
+
readonly severity: "warning";
|
|
248
|
+
readonly template: "Text frame autosizing was applied to a frame with a curved outline or a gradient fill. Its fill and stroke keep the original frame shape and size.";
|
|
249
|
+
};
|
|
250
|
+
readonly TEXT_VERTICAL_ALIGN_DEFAULT: {
|
|
251
|
+
readonly severity: "warning";
|
|
252
|
+
readonly template: "Justified vertical alignment is not supported. Using top alignment.";
|
|
253
|
+
};
|
|
254
|
+
readonly TEXT_FRAME_LOOP: {
|
|
255
|
+
readonly severity: "warning";
|
|
256
|
+
readonly template: "A loop was detected in linked text frames. The chain was broken to prevent infinite processing.";
|
|
257
|
+
};
|
|
258
|
+
readonly TEXT_FRAME_ORDER_MISMATCH: {
|
|
259
|
+
readonly severity: "warning";
|
|
260
|
+
readonly template: "Text frame ordering mismatch: {orderedCount} of {totalCount} frames could be ordered. Some text frames may appear out of order.";
|
|
261
|
+
};
|
|
262
|
+
readonly TEXT_FRAME_APPLY_FAILED: {
|
|
263
|
+
readonly severity: "warning";
|
|
264
|
+
readonly template: "The story starting \"{storyStart}\" could not be split between its text frames. Its text may be repeated or incomplete. Check the text frames of this story.";
|
|
265
|
+
};
|
|
266
|
+
readonly TEXT_FRAME_UNAVAILABLE: {
|
|
267
|
+
readonly severity: "warning";
|
|
268
|
+
readonly template: "{missingCount} text frame(s) of the story starting \"{storyStart}\" are hidden or were not imported. Their text appears in the other frames of the story.";
|
|
269
|
+
};
|
|
270
|
+
readonly TEXT_VARIABLES_UNSUPPORTED: {
|
|
271
|
+
readonly severity: "warning";
|
|
272
|
+
readonly template: "The variableDelimiters option needs CE.SDK 1.85 or newer, so it was ignored. Text with variable delimiters stays as written.";
|
|
273
|
+
};
|
|
274
|
+
readonly TEXT_VARIABLE_NAME_INVALID: {
|
|
275
|
+
readonly severity: "warning";
|
|
276
|
+
readonly template: "The text \"{text}\" is marked as a variable, but its name cannot be used for a variable. It was kept as text. Rename the variable in InDesign.";
|
|
277
|
+
};
|
|
278
|
+
readonly LIST_NUMBERING_DEFAULT: {
|
|
279
|
+
readonly severity: "warning";
|
|
280
|
+
readonly template: "Numbered list format \"{numberingFormat}\" is not supported. Using default numbering (1, 2, 3).";
|
|
281
|
+
};
|
|
282
|
+
readonly LINE_INSUFFICIENT_POINTS: {
|
|
283
|
+
readonly severity: "warning";
|
|
284
|
+
readonly template: "A line element has fewer than 2 points and was skipped.";
|
|
285
|
+
};
|
|
286
|
+
readonly LINE_NO_STROKE_WEIGHT: {
|
|
287
|
+
readonly severity: "warning";
|
|
288
|
+
readonly template: "A line element has no stroke weight defined. The line may not be visible.";
|
|
289
|
+
};
|
|
290
|
+
readonly LINE_GRADIENT_STROKE_STYLE_UNSUPPORTED: {
|
|
291
|
+
readonly severity: "warning";
|
|
292
|
+
readonly template: "A line has a gradient stroke with a dotted or dashed style. The gradient was preserved, but the stroke style could not be applied.";
|
|
293
|
+
};
|
|
294
|
+
readonly BLEND_MODE_UNSUPPORTED: {
|
|
295
|
+
readonly severity: "warning";
|
|
296
|
+
readonly template: "Blend mode \"{blendMode}\" is not supported by CE.SDK and was ignored.";
|
|
297
|
+
};
|
|
298
|
+
readonly COLOR_PROFILE_UNRESOLVED: {
|
|
299
|
+
readonly severity: "warning";
|
|
300
|
+
readonly template: "The \"{name}\" {space} color profile this document asks for is not available. {consequence} Supply the profile through the colorProfileResolver option of IDMLParser.fromFile.";
|
|
301
|
+
};
|
|
302
|
+
readonly COLOR_PROFILE_FAILED: {
|
|
303
|
+
readonly severity: "warning";
|
|
304
|
+
readonly template: "The resolver for the \"{name}\" {space} color profile failed ({reason}). {consequence}";
|
|
305
|
+
};
|
|
306
|
+
readonly COLOR_PROFILE_INVALID: {
|
|
307
|
+
readonly severity: "warning";
|
|
308
|
+
readonly template: "The \"{name}\" {space} color profile could not be read ({reason}). {consequence} Check that the resolver returns an ICC profile of that space, as bytes or as a URI that serves one.";
|
|
309
|
+
};
|
|
310
|
+
readonly FILL_COLOR_UNKNOWN: {
|
|
311
|
+
readonly severity: "warning";
|
|
312
|
+
readonly template: "Fill color \"{fillColor}\" is not defined in the document color swatches. The element may appear without a fill.";
|
|
313
|
+
};
|
|
314
|
+
readonly SHADOW_SPREAD_REMOVED: {
|
|
315
|
+
readonly severity: "warning";
|
|
316
|
+
readonly template: "Drop shadow spread ({spread}%) is not supported. The spread was removed.";
|
|
317
|
+
};
|
|
318
|
+
readonly SHADOW_BLEND_MODE_DEFAULT: {
|
|
319
|
+
readonly severity: "warning";
|
|
320
|
+
readonly template: "Drop shadow blend mode \"{blendMode}\" is not supported. Using \"Multiply\" as the default.";
|
|
321
|
+
};
|
|
322
|
+
readonly SHADOW_NOISE_REMOVED: {
|
|
323
|
+
readonly severity: "warning";
|
|
324
|
+
readonly template: "Drop shadow noise ({noise}%) is not supported. The noise was removed.";
|
|
325
|
+
};
|
|
326
|
+
readonly BORDER_RADIUS_NON_RECT_IGNORED: {
|
|
327
|
+
readonly severity: "warning";
|
|
328
|
+
readonly template: "Border radius on a non-rectangle shape was ignored. Border radius is only supported on rectangles.";
|
|
329
|
+
};
|
|
330
|
+
readonly DECORATION_STYLE_MISMATCH: {
|
|
331
|
+
readonly severity: "warning";
|
|
332
|
+
readonly template: "Underline and strikethrough have different stroke styles. The underline style will be used for both.";
|
|
333
|
+
};
|
|
334
|
+
readonly DECORATION_UL_OFFSET_APPROX: {
|
|
335
|
+
readonly severity: "warning";
|
|
336
|
+
readonly template: "Underline offset conversion is approximate. Positioning may differ from InDesign.";
|
|
337
|
+
};
|
|
338
|
+
readonly DECORATION_UL_GAP_COLOR: {
|
|
339
|
+
readonly severity: "warning";
|
|
340
|
+
readonly template: "Underline gap color is not supported. The gap will be transparent.";
|
|
341
|
+
};
|
|
342
|
+
readonly DECORATION_ST_COLOR: {
|
|
343
|
+
readonly severity: "warning";
|
|
344
|
+
readonly template: "Custom strikethrough color is not supported. The text color will be used.";
|
|
345
|
+
};
|
|
346
|
+
readonly DECORATION_ST_WEIGHT: {
|
|
347
|
+
readonly severity: "warning";
|
|
348
|
+
readonly template: "Custom strikethrough weight is not supported. The default weight will be used.";
|
|
349
|
+
};
|
|
350
|
+
readonly DECORATION_ST_OFFSET: {
|
|
351
|
+
readonly severity: "warning";
|
|
352
|
+
readonly template: "Custom strikethrough offset is not supported. The default offset will be used.";
|
|
353
|
+
};
|
|
242
354
|
};
|
|
243
|
-
type LogMessage
|
|
355
|
+
type LogMessage = LogMessage$1<keyof typeof WARNING_CODES>;
|
|
244
356
|
/**
|
|
245
357
|
* IDML importer logger. Wraps the shared `@imgly/importer-exporter-utils`
|
|
246
358
|
* `Logger` with this package's `WARNING_CODES` registry baked in, so call
|
|
247
359
|
* sites use `new Logger()` without re-passing the registry.
|
|
248
360
|
*/
|
|
249
|
-
type Logger
|
|
250
|
-
declare const Logger
|
|
361
|
+
export type Logger = Logger$1<typeof WARNING_CODES>;
|
|
362
|
+
export declare const Logger: new () => Logger;
|
|
251
363
|
/**
|
|
252
364
|
* Structural shape that any embedded-format parser instance must satisfy
|
|
253
365
|
* for the IDML importer to use it. Today there's just `loadAsBlocks`; if
|
|
@@ -255,26 +367,30 @@ declare const Logger$1: new () => Logger$1;
|
|
|
255
367
|
* they'd extend a sibling interface.
|
|
256
368
|
*
|
|
257
369
|
* Why "structural": the published format parsers (e.g. `@imgly/pdf-importer`)
|
|
258
|
-
* bundle their own `.d.ts
|
|
259
|
-
*
|
|
370
|
+
* bundle their own `.d.ts`, which can inline a private-brand copy of
|
|
371
|
+
* `CreativeEngine`. Importing those classes
|
|
260
372
|
* nominally and feeding them to a shared interface would tangle this
|
|
261
373
|
* package's `CreativeEngine` with the parser's. The structural interface
|
|
262
374
|
* decouples the two — see `EmbeddedFormatParser` below for how this is
|
|
263
375
|
* resolved at call time.
|
|
264
376
|
*/
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
377
|
+
interface EmbeddedBlockLoader {
|
|
378
|
+
loadAsBlocks(opts?: {
|
|
379
|
+
pageIndex?: number;
|
|
380
|
+
preservePageBounds?: boolean;
|
|
381
|
+
units?: 'legacy' | 'scene';
|
|
382
|
+
}): Promise<{
|
|
383
|
+
blocks: number[];
|
|
384
|
+
logger: {
|
|
385
|
+
getMessages(): Array<{
|
|
386
|
+
code: string;
|
|
387
|
+
type: string;
|
|
388
|
+
message: string;
|
|
389
|
+
/** The values the message was built from, such as a page number. */
|
|
390
|
+
params?: Record<string, unknown>;
|
|
391
|
+
}>;
|
|
392
|
+
};
|
|
393
|
+
}>;
|
|
278
394
|
}
|
|
279
395
|
/**
|
|
280
396
|
* Structural shape of a format-parser class (e.g. `PDFParser`, future
|
|
@@ -284,8 +400,8 @@ export interface EmbeddedBlockLoader {
|
|
|
284
400
|
*
|
|
285
401
|
* Why the type parameters and `unknown`s:
|
|
286
402
|
*
|
|
287
|
-
* - `E` (engine):
|
|
288
|
-
*
|
|
403
|
+
* - `E` (engine): a published format parser's bundled `.d.ts` can inline a
|
|
404
|
+
* private-brand copy of `CreativeEngine`, so the
|
|
289
405
|
* parser's engine type is nominally distinct from `@cesdk/engine`'s
|
|
290
406
|
* even though they're the same class at runtime. Making the engine
|
|
291
407
|
* generic lets each parser's class be passed in without forcing
|
|
@@ -302,34 +418,39 @@ export interface EmbeddedBlockLoader {
|
|
|
302
418
|
* won't. Optional `unknown` keeps the surface minimal and
|
|
303
419
|
* format-agnostic.
|
|
304
420
|
*/
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
421
|
+
interface EmbeddedFormatParser<E = CreativeEngine> {
|
|
422
|
+
fromFile(engine: E, file: Blob | ArrayBuffer, options?: {
|
|
423
|
+
fontResolver?: unknown;
|
|
424
|
+
pageBounds?: unknown;
|
|
425
|
+
}): Promise<EmbeddedBlockLoader>;
|
|
310
426
|
}
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
427
|
+
interface EmbeddedImporterContext {
|
|
428
|
+
/** CE.SDK engine to emit blocks into. */
|
|
429
|
+
engine: CreativeEngine;
|
|
430
|
+
/**
|
|
431
|
+
* Shared font resolver. PDF text runs and PSD text layers both want
|
|
432
|
+
* Google Fonts substitution for non-embeddable fonts; routing through
|
|
433
|
+
* one resolver gives consistent behavior across formats.
|
|
434
|
+
*/
|
|
435
|
+
fontResolver: TypefaceResolver;
|
|
436
|
+
/**
|
|
437
|
+
* IDML logger. Adapters forward their own importer's structured
|
|
438
|
+
* warnings into this so users see one unified diagnostic stream.
|
|
439
|
+
*/
|
|
440
|
+
logger: Logger;
|
|
441
|
+
/**
|
|
442
|
+
* The IDML page element the embedded content lives on. Adapters need
|
|
443
|
+
* this to compute the inner content's display placement on the page —
|
|
444
|
+
* specifically, the page's `ItemTransform` and `GeometricBounds`
|
|
445
|
+
* convert spread coords to page-local coords during transform
|
|
446
|
+
* composition.
|
|
447
|
+
*/
|
|
448
|
+
page: Element;
|
|
449
|
+
/**
|
|
450
|
+
* The bytes of a linked file that the `linkedImageResolver` option
|
|
451
|
+
* supplied. Adapters use them when the element embeds no payload.
|
|
452
|
+
*/
|
|
453
|
+
linkedBytes?: Uint8Array;
|
|
333
454
|
}
|
|
334
455
|
/**
|
|
335
456
|
* Optional placement override returned by an `EmbeddedImporter`. When
|
|
@@ -350,70 +471,89 @@ export interface EmbeddedImporterContext {
|
|
|
350
471
|
* that and return it; the IDML caller composes with the outer rectangle
|
|
351
472
|
* transform to land content correctly on the page.
|
|
352
473
|
*/
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
474
|
+
interface EmbeddedContentPlacementResult {
|
|
475
|
+
/**
|
|
476
|
+
* Composed scale (rect-ancestors × inner-content) to apply via
|
|
477
|
+
* `engine.block.scale(block, scale)` — propagates to children through
|
|
478
|
+
* the block's transform, unlike `setWidth`/`setHeight` which only
|
|
479
|
+
* touch a group's bbox metadata.
|
|
480
|
+
*/
|
|
481
|
+
scale: number;
|
|
482
|
+
/**
|
|
483
|
+
* Top-left of the displayed content in IDML page-local coordinates,
|
|
484
|
+
* in points. Already includes contributions from every ancestor
|
|
485
|
+
* `ItemTransform` (rect, any `<Group>` wrappers, the inner content
|
|
486
|
+
* element itself), so the caller just divides by points-per-inch
|
|
487
|
+
* and feeds it to `engine.block.setPositionX/Y`.
|
|
488
|
+
*
|
|
489
|
+
* Why pre-composed and not "rect-relative offset": rotated rectangles
|
|
490
|
+
* make rect-relative-offset math wrong — the offset is in pre-rotation
|
|
491
|
+
* rect-local coords, but the caller would add it as if it were
|
|
492
|
+
* page-aligned. Composing the full transform chain in the adapter and
|
|
493
|
+
* exposing page-local coords makes the math unambiguous.
|
|
494
|
+
*/
|
|
495
|
+
pageX: number;
|
|
496
|
+
pageY: number;
|
|
497
|
+
/** Composed rotation in radians, in `[0, 2π)`. */
|
|
498
|
+
rotation: number;
|
|
499
|
+
/** Composed horizontal flip flag. */
|
|
500
|
+
flipHorizontal: boolean;
|
|
380
501
|
}
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
502
|
+
interface EmbeddedImporterResult {
|
|
503
|
+
/** Detached CE.SDK block id (typically a group). */
|
|
504
|
+
block: number;
|
|
505
|
+
/**
|
|
506
|
+
* Optional placement override. When present, the IDML caller positions
|
|
507
|
+
* and scales the block per these values; when absent, the caller falls
|
|
508
|
+
* back to setWidth/setHeight from the IDML frame's bounds (which is
|
|
509
|
+
* appropriate only for content that naturally fills its frame).
|
|
510
|
+
*/
|
|
511
|
+
placement?: EmbeddedContentPlacementResult;
|
|
512
|
+
/**
|
|
513
|
+
* The part of the content the embed shows, such as a PDF's `PDFCrop`
|
|
514
|
+
* region, in page-local points: the un-rotated top-left, the size and the
|
|
515
|
+
* rotation in radians around its center. The caller clips the content to
|
|
516
|
+
* it.
|
|
517
|
+
*/
|
|
518
|
+
visibleRegion?: EmbeddedVisibleRegion;
|
|
519
|
+
/**
|
|
520
|
+
* A child of `block` that only fixes its bounds for `placement`. The caller
|
|
521
|
+
* destroys it after it places `block`.
|
|
522
|
+
*/
|
|
523
|
+
pageBoundsBlock?: number;
|
|
391
524
|
}
|
|
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
|
-
|
|
525
|
+
interface EmbeddedVisibleRegion {
|
|
526
|
+
x: number;
|
|
527
|
+
y: number;
|
|
528
|
+
width: number;
|
|
529
|
+
height: number;
|
|
530
|
+
rotation: number;
|
|
531
|
+
}
|
|
532
|
+
interface EmbeddedImporter {
|
|
533
|
+
/**
|
|
534
|
+
* Format slug used in user-facing warning messages, e.g. "PDF", "PSD".
|
|
535
|
+
* Does not need to be a stable machine-readable identifier; it's purely
|
|
536
|
+
* for log messages like "Embedded PDF could not be parsed".
|
|
537
|
+
*/
|
|
538
|
+
readonly format: string;
|
|
539
|
+
/**
|
|
540
|
+
* Cheap, synchronous probe over the IDML element. MUST NOT trigger any
|
|
541
|
+
* dynamic imports — the IDML parser calls this for every graphic frame
|
|
542
|
+
* before deciding whether to load the heavy parser.
|
|
543
|
+
*/
|
|
544
|
+
canHandle(element: Element): boolean;
|
|
545
|
+
/**
|
|
546
|
+
* Parse the embedded payload and return one detached CE.SDK block (a
|
|
547
|
+
* CE.SDK group block, typically) plus optional placement metadata.
|
|
548
|
+
* Return null on graceful failure — after logging the why — so the
|
|
549
|
+
* IDML caller can fall through to the existing image-fill /
|
|
550
|
+
* default-fill paths.
|
|
551
|
+
*
|
|
552
|
+
* The returned block must be detached (`engine.block.appendChild` not
|
|
553
|
+
* called yet) — the IDML caller decides where it goes in the layer
|
|
554
|
+
* hierarchy and how it gets sized/positioned.
|
|
555
|
+
*/
|
|
556
|
+
loadBlock(ctx: EmbeddedImporterContext, element: Element): Promise<EmbeddedImporterResult | null>;
|
|
417
557
|
}
|
|
418
558
|
/**
|
|
419
559
|
* Builds the IDML embedded-importer adapter for PDF/`.ai` payloads.
|
|
@@ -438,307 +578,538 @@ export interface EmbeddedImporter {
|
|
|
438
578
|
* ```
|
|
439
579
|
*/
|
|
440
580
|
export declare function createPdfEmbeddedImporter<E>(parser: EmbeddedFormatParser<E>): EmbeddedImporter;
|
|
581
|
+
/** A placed file that the IDML references but does not embed. */
|
|
582
|
+
interface LinkedImageReference {
|
|
583
|
+
/**
|
|
584
|
+
* `LinkResourceURI` as InDesign stored it, such as
|
|
585
|
+
* `file:/Users/designer/Links/Team%20photo.png`. It is a path on the
|
|
586
|
+
* machine that authored the IDML, so the importer never reads it.
|
|
587
|
+
*/
|
|
588
|
+
uri: string;
|
|
589
|
+
/** The decoded file name, such as `Team photo.png`. */
|
|
590
|
+
fileName: string;
|
|
591
|
+
/** `LinkResourceFormat` without the `$ID/` prefix, such as `JPEG`. */
|
|
592
|
+
format: string;
|
|
593
|
+
/** The `Self` id of the IDML `<Link>` element. */
|
|
594
|
+
id: string;
|
|
595
|
+
}
|
|
596
|
+
/**
|
|
597
|
+
* Supplies the file of a linked image, SVG, PDF or Adobe Illustrator file.
|
|
598
|
+
*
|
|
599
|
+
* Return a URL that CE.SDK can load, or the file's bytes. Return `null` or
|
|
600
|
+
* `undefined` when you have no file for the reference: the importer then
|
|
601
|
+
* shows a placeholder and reports `LINKED_IMAGE_UNRESOLVED`. A rejected
|
|
602
|
+
* promise shows a placeholder and reports `LINKED_IMAGE_RESOLVER_FAILED`.
|
|
603
|
+
* The importer calls the resolver once for each `uri` in a `parse()`.
|
|
604
|
+
*/
|
|
605
|
+
type LinkedImageResolver = (reference: LinkedImageReference) => Promise<string | Blob | ArrayBuffer | Uint8Array | null | undefined>;
|
|
441
606
|
export declare class IDMLParser {
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
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
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
607
|
+
private engine;
|
|
608
|
+
private scene;
|
|
609
|
+
private idml;
|
|
610
|
+
private useLabAlternates;
|
|
611
|
+
private fontResolver;
|
|
612
|
+
private colors;
|
|
613
|
+
private gradients;
|
|
614
|
+
private spreads;
|
|
615
|
+
private textBlocksByFrameId;
|
|
616
|
+
private logger;
|
|
617
|
+
private fontMetricsCache;
|
|
618
|
+
private loggedFontSubstitutions;
|
|
619
|
+
private embeddedImporters;
|
|
620
|
+
/** The working-space profile the document names, per component space. */
|
|
621
|
+
private documentProfileNames;
|
|
622
|
+
private colorProfileResolver?;
|
|
623
|
+
private outlinesOpenStrokes?;
|
|
624
|
+
private linkedImageResolver?;
|
|
625
|
+
private linkedFiles;
|
|
626
|
+
private iccCmykConverter?;
|
|
627
|
+
private psdImageURIs;
|
|
628
|
+
private variableDelimiters;
|
|
629
|
+
private storyVariableDelimiters;
|
|
630
|
+
private variableNames;
|
|
631
|
+
private rejectedVariableTexts;
|
|
632
|
+
private constructor();
|
|
633
|
+
private defaultFontPromise?;
|
|
634
|
+
private getDefaultFont;
|
|
635
|
+
/**
|
|
636
|
+
* Resolve a font's metrics. Font metrics are required to map InDesign
|
|
637
|
+
* leading / spacing into CE.SDK's font-relative model, so a failure here is
|
|
638
|
+
* fatal — we throw rather than silently producing wrong line heights.
|
|
639
|
+
*/
|
|
640
|
+
private loadFontMetrics;
|
|
641
|
+
/**
|
|
642
|
+
* Convert an InDesign leading multiplier (leading / font size, or the
|
|
643
|
+
* Auto-leading percentage) into the CE.SDK `text/lineHeight` multiplier for
|
|
644
|
+
* a given font. InDesign measures leading as an absolute distance based on
|
|
645
|
+
* the full ascender-to-descender span and ignores the font's line gap, so we
|
|
646
|
+
* first divide by the font's `(ascender - descender) / unitsPerEm` factor
|
|
647
|
+
* (`adjustLineHeight`). Since CE.SDK 1.73 the default layout folds the line
|
|
648
|
+
* gap into the line slot, so when `features/fontLineGapEnabled` is on we
|
|
649
|
+
* additionally cancel that gap (`convertLineHeightToLineGapModel`).
|
|
650
|
+
*
|
|
651
|
+
* The conversion is font-metric-specific, which is exactly why each
|
|
652
|
+
* paragraph must be converted with its own font's metrics rather than the
|
|
653
|
+
* block's first run.
|
|
654
|
+
*/
|
|
655
|
+
private toLineHeightMultiplier;
|
|
656
|
+
/**
|
|
657
|
+
* Apply a line-height multiplier to each paragraph of a text block from its
|
|
658
|
+
* own InDesign leading and font, using the CE.SDK >= 1.76
|
|
659
|
+
* `setTextLineHeight(block, value, paragraphIndex)` API. The caller has
|
|
660
|
+
* already set the block-level default, so this only overrides paragraphs
|
|
661
|
+
* whose leading the importer can resolve.
|
|
662
|
+
*
|
|
663
|
+
* @returns `true` if any single paragraph still can't be reproduced exactly —
|
|
664
|
+
* i.e. it combines explicit leading with mixed font sizes *within that
|
|
665
|
+
* paragraph*. One line-height multiplier per paragraph cannot match an
|
|
666
|
+
* absolute point leading across different sizes on the same line, so the
|
|
667
|
+
* caller should emit `TEXT_LEADING_APPROX`. Cross-paragraph size
|
|
668
|
+
* differences are NOT approximate here — each paragraph gets its own
|
|
669
|
+
* leading — so they no longer warn.
|
|
670
|
+
*/
|
|
671
|
+
private applyPerParagraphLineHeight;
|
|
672
|
+
/**
|
|
673
|
+
* Instantiate a new IDMLParser from a File or Blob.
|
|
674
|
+
*
|
|
675
|
+
* @param engine The CreativeEngine instance to emit blocks into.
|
|
676
|
+
* @param file The IDML file (`Blob`, `File`, or `ArrayBuffer`).
|
|
677
|
+
* @param DOMParser An XML parser implementation. Use the browser's
|
|
678
|
+
* native `DOMParser` in the browser, `JSDOM` in Node.
|
|
679
|
+
* @param options
|
|
680
|
+
* @param options.fontResolver A function that resolves the font URI
|
|
681
|
+
* from the font name and style. Defaults to the bundled Google
|
|
682
|
+
* Fonts resolver.
|
|
683
|
+
* @param options.embeddedImporters Adapters for foreign-format
|
|
684
|
+
* payloads embedded in IDML graphic frames (PDF today; EPS or PSD layers
|
|
685
|
+
* in the future). Defaults to `[]` — no embedded-format import,
|
|
686
|
+
* embeds fall through to placeholder. Register adapters explicitly
|
|
687
|
+
* to opt in:
|
|
688
|
+
*
|
|
689
|
+
* ```ts
|
|
690
|
+
* import { PDFParser } from "@imgly/pdf-importer";
|
|
691
|
+
* import {
|
|
692
|
+
* IDMLParser,
|
|
693
|
+
* createPdfEmbeddedImporter,
|
|
694
|
+
* } from "@imgly/idml-importer";
|
|
695
|
+
*
|
|
696
|
+
* await IDMLParser.fromFile(engine, file, DOMParser, {
|
|
697
|
+
* embeddedImporters: [createPdfEmbeddedImporter(PDFParser)],
|
|
698
|
+
* });
|
|
699
|
+
* ```
|
|
700
|
+
* @param options.linkedImageResolver Supplies the files that the IDML
|
|
701
|
+
* links but does not embed: images, SVG, and PDF or Adobe Illustrator
|
|
702
|
+
* files (these also need `embeddedImporters`). It receives each
|
|
703
|
+
* reference and returns a URL or the file's bytes. Without it, or
|
|
704
|
+
* when it returns nothing, a linked file shows a placeholder. The
|
|
705
|
+
* importer never reads the paths of the machine that authored the
|
|
706
|
+
* IDML.
|
|
707
|
+
* @param options.variableDelimiters The strings that mark a text variable
|
|
708
|
+
* in the document, such as `{ open: '[[', close: ']]' }` for
|
|
709
|
+
* `[[First Name]]`. List each syntax that the document uses. The import
|
|
710
|
+
* replaces the delimiters with `{{` and `}}`, removes the whitespace
|
|
711
|
+
* inside them, and creates each variable once with its name as the
|
|
712
|
+
* value. The variable takes the styling of the first character of its
|
|
713
|
+
* name. An existing variable keeps its value. Defaults to `[]`, which
|
|
714
|
+
* keeps the text as written. The rules:
|
|
715
|
+
* - The text is read from left to right. At the same position the
|
|
716
|
+
* longer `open` wins, so `[[` comes before `[`, then the list order.
|
|
717
|
+
* - A name ends at the first `close`, starts after the last `open`
|
|
718
|
+
* before it, and never crosses a line break.
|
|
719
|
+
* - An existing `{{name}}` on one line stays as written, unless the
|
|
720
|
+
* list holds `{ open: '{{', close: '}}' }`.
|
|
721
|
+
* - A name that cannot name a CE.SDK variable stays as text and reports
|
|
722
|
+
* `TEXT_VARIABLE_NAME_INVALID`: an empty name, `scene_root`, a name
|
|
723
|
+
* that starts with `ubq.` or `{`, ends with `}`, or holds `{{` or `}}`,
|
|
724
|
+
* and the name of a variable of another type. The reading goes on
|
|
725
|
+
* with the next delimiter at that position, then inside the match.
|
|
726
|
+
*
|
|
727
|
+
* This needs CE.SDK 1.85 or newer, which counts a variable by its
|
|
728
|
+
* characters. An older version keeps the text as written and reports
|
|
729
|
+
* `TEXT_VARIABLES_UNSUPPORTED`.
|
|
730
|
+
*
|
|
731
|
+
* Choose delimiters that the document uses only around variables: a
|
|
732
|
+
* delimiter such as `%` also matches `50% off, 20% more`.
|
|
733
|
+
* An entry with an empty `open` or `close` rejects with a `TypeError`.
|
|
734
|
+
*
|
|
735
|
+
* @param options.colorProfileResolver Resolves a document ICC profile to
|
|
736
|
+
* bytes or to a URI. It is called once per component space the document
|
|
737
|
+
* names, `CMYK` and `RGB`, and both are assigned to the `Default` role.
|
|
738
|
+
* Only the CMYK profile converts colors today; the RGB profile is stored
|
|
739
|
+
* so the scene keeps the working space the document named.
|
|
740
|
+
*
|
|
741
|
+
* Defaults to `undefined`. The import then uses the engine's default
|
|
742
|
+
* profile and emits `COLOR_PROFILE_UNRESOLVED`. A resolver that throws
|
|
743
|
+
* emits `COLOR_PROFILE_FAILED`, and data the engine cannot use emits
|
|
744
|
+
* `COLOR_PROFILE_INVALID`. None of them stops the import.
|
|
745
|
+
*
|
|
746
|
+
* ```ts
|
|
747
|
+
* await IDMLParser.fromFile(engine, file, DOMParser, {
|
|
748
|
+
* colorProfileResolver: async ({ name, space }) => profiles[space][name],
|
|
749
|
+
* });
|
|
750
|
+
* ```
|
|
751
|
+
*
|
|
752
|
+
* @returns A new IDMLParser instance.
|
|
753
|
+
*/
|
|
754
|
+
static fromFile(engine: CreativeEngine, file: Blob | File | ArrayBuffer, DOMParser: any, options?: {
|
|
755
|
+
fontResolver?: TypefaceResolver;
|
|
756
|
+
embeddedImporters?: readonly EmbeddedImporter[];
|
|
757
|
+
colorProfileResolver?: ColorProfileResolver;
|
|
758
|
+
linkedImageResolver?: LinkedImageResolver;
|
|
759
|
+
variableDelimiters?: readonly VariableDelimiter[];
|
|
760
|
+
}): Promise<IDMLParser>;
|
|
761
|
+
/**
|
|
762
|
+
* @deprecated Use the options-object overload:
|
|
763
|
+
* `IDMLParser.fromFile(engine, file, DOMParser, { fontResolver })`.
|
|
764
|
+
*/
|
|
765
|
+
static fromFile(engine: CreativeEngine, file: Blob | File | ArrayBuffer, DOMParser: any, fontResolver: TypefaceResolver): Promise<IDMLParser>;
|
|
766
|
+
/**
|
|
767
|
+
* Resolve and apply the document profiles.
|
|
768
|
+
*
|
|
769
|
+
* Called from `parse()` rather than the constructor, because the resolver is
|
|
770
|
+
* async and the warnings belong on the logger `parse()` returns.
|
|
771
|
+
*/
|
|
772
|
+
private applyDocumentColorProfiles;
|
|
773
|
+
/** Resolve and apply the profile of one component space. */
|
|
774
|
+
private applyDocumentColorProfile;
|
|
775
|
+
/**
|
|
776
|
+
* Waits for the profile that converts CMYK, including the engine's own
|
|
777
|
+
* fallback.
|
|
778
|
+
*
|
|
779
|
+
* On web that fallback is a fetch, and a conversion before it arrives fails,
|
|
780
|
+
* so a spot color would take the formula on the first import of an engine and
|
|
781
|
+
* the profile on the next.
|
|
782
|
+
*/
|
|
783
|
+
private loadEffectiveCmykProfile;
|
|
784
|
+
/**
|
|
785
|
+
* The screen appearance of CMYK ink under the document profile.
|
|
786
|
+
*
|
|
787
|
+
* Returns undefined when the engine cannot convert, so the caller keeps its
|
|
788
|
+
* own value instead of losing the swatch.
|
|
789
|
+
*/
|
|
790
|
+
private convertSpotCmyk;
|
|
791
|
+
parse(): Promise<{
|
|
792
|
+
scene: number;
|
|
793
|
+
logger: Logger;
|
|
794
|
+
}>;
|
|
795
|
+
/**
|
|
796
|
+
* Creates a variable that converted text uses, with its name as the value,
|
|
797
|
+
* before the text is set. So each layout of the import measures the value
|
|
798
|
+
* that the text shows. An existing variable keeps its value.
|
|
799
|
+
* @returns false when the engine refuses the name, such as the name of a
|
|
800
|
+
* variable of another type, so the text keeps it as written.
|
|
801
|
+
*/
|
|
802
|
+
private defineTextVariable;
|
|
803
|
+
/** Apply declared independent-axis autosizing while this frame is a page child. */
|
|
804
|
+
private applyAuthoredAutosizing;
|
|
805
|
+
private getSpreads;
|
|
806
|
+
private getBleedMargins;
|
|
807
|
+
private generatePagesFromSpreads;
|
|
808
|
+
/**
|
|
809
|
+
* Loop over the page elements and render the CESDK blocks based on the element type
|
|
810
|
+
*
|
|
811
|
+
* @param element The page element
|
|
812
|
+
* @param spread The page element's parent page
|
|
813
|
+
* @param pageBlock The page block to append the rendered blocks to
|
|
814
|
+
* @returns An array of the rendered blocks
|
|
815
|
+
*/
|
|
816
|
+
private renderPageElements;
|
|
817
|
+
private createStyledGroup;
|
|
818
|
+
/**
|
|
819
|
+
* Parses the name of an IDML element and applies it to a CE.SDK block
|
|
820
|
+
*
|
|
821
|
+
* @param element The IDML element
|
|
822
|
+
* @param block The CE.SDK block
|
|
823
|
+
* @returns void
|
|
824
|
+
*/
|
|
825
|
+
private copyElementName;
|
|
826
|
+
/**
|
|
827
|
+
* Parses the fill styles of an IDML element and applies them to a CESDK block
|
|
828
|
+
*
|
|
829
|
+
* @param block The CESDK block to apply the fill to
|
|
830
|
+
* @param ctx The style context for the IDML element
|
|
831
|
+
* @param attributeName The name of the attribute to use as the fill color
|
|
832
|
+
* @returns void
|
|
833
|
+
*/
|
|
834
|
+
private applyFill;
|
|
835
|
+
/**
|
|
836
|
+
* Creates a graphic rect block with a stroke outline and no fill.
|
|
837
|
+
* InDesign TextFrame strokes are borders around the frame rectangle,
|
|
838
|
+
* but CE.SDK text strokes outline individual glyphs. This helper creates
|
|
839
|
+
* a separate graphic block to faithfully represent the frame border.
|
|
840
|
+
*
|
|
841
|
+
* @param scale The element's combined transform scale, forwarded to
|
|
842
|
+
* applyBorderRadius so corner radii stay proportional to the block size.
|
|
843
|
+
*/
|
|
844
|
+
private createStrokeRectBlock;
|
|
845
|
+
/**
|
|
846
|
+
* Parses the stroke styles of an IDML element and applies them to a CESDK block
|
|
847
|
+
*
|
|
848
|
+
* @param block The CESDK block to apply the stroke to
|
|
849
|
+
* @param ctx The style context for the IDML element
|
|
850
|
+
* @returns void
|
|
851
|
+
*/
|
|
852
|
+
private getStrokeStyle;
|
|
853
|
+
private applyStroke;
|
|
854
|
+
/**
|
|
855
|
+
* Parses the transparency styles of an IDML element and applies them to a CESDK block
|
|
856
|
+
*
|
|
857
|
+
* @param block The CESDK block to apply the transparency to
|
|
858
|
+
* @param ctx The style context for the IDML element
|
|
859
|
+
* @returns void
|
|
860
|
+
*/
|
|
861
|
+
private applyTransparency;
|
|
862
|
+
private consumedGradientFeathers;
|
|
863
|
+
/** Fill/stroke target opacity is independent of the object's opacity. */
|
|
864
|
+
private applyPaintOpacity;
|
|
865
|
+
/**
|
|
866
|
+
* Maps an element's Gradient Feather onto its gradient fill's stop alphas
|
|
867
|
+
* when both share the gradient type (the shape @imgly/idml-exporter
|
|
868
|
+
* writes). CE.SDK gradients carry per-stop alpha, so a feather whose
|
|
869
|
+
* geometry matches the fill is exactly a stop-alpha ramp. Feathers of a
|
|
870
|
+
* different type keep the unsupported-warning path.
|
|
871
|
+
*/
|
|
872
|
+
private applyGradientFeatherAlpha;
|
|
873
|
+
/**
|
|
874
|
+
* Parses the drop shadow settings of an IDML element and applies them to a CESDK block.
|
|
875
|
+
*
|
|
876
|
+
* @param block The CESDK block to apply the drop shadow to
|
|
877
|
+
* @param transparencySetting The TransparencySetting element containing the DropShadowSetting
|
|
878
|
+
*/
|
|
879
|
+
private applyDropShadow;
|
|
880
|
+
/**
|
|
881
|
+
* Iterates the configured `embeddedImporters` until one matches the
|
|
882
|
+
* IDML element. The matched importer parses the embedded payload (PDF,
|
|
883
|
+
* future PSD, etc.) and returns ONE detached CE.SDK block plus
|
|
884
|
+
* (optionally) placement metadata derived from the format's own inner
|
|
885
|
+
* transform. We append the block to the IDML page and apply the
|
|
886
|
+
* placement so it lands at the right size and position.
|
|
887
|
+
*
|
|
888
|
+
* Two placement paths:
|
|
889
|
+
*
|
|
890
|
+
* 1. **Inner-transform-aware** (preferred, when the adapter returns
|
|
891
|
+
* `placement`): use `engine.block.scale(...)` for the format's own
|
|
892
|
+
* scale factor — this propagates to children via the block's
|
|
893
|
+
* transform, unlike `setWidth`. Position is composed from the IDML
|
|
894
|
+
* rectangle's page-local position plus the inner transform's
|
|
895
|
+
* rectangle-local offset.
|
|
896
|
+
*
|
|
897
|
+
* 2. **Frame-bounds fallback** (when `placement` is undefined): set
|
|
898
|
+
* block bounds to the IDML rectangle's bounds. This is correct for
|
|
899
|
+
* image-fill-like formats whose content always fills the frame
|
|
900
|
+
* naturally; less correct for format groups whose natural size may
|
|
901
|
+
* differ from the frame.
|
|
902
|
+
*
|
|
903
|
+
* Adapters fail gracefully — on parse error / missing peer dependency
|
|
904
|
+
* they log a warning and return null, in which case we either try the
|
|
905
|
+
* next importer or fall through to the existing image-fill /
|
|
906
|
+
* default-fill paths.
|
|
907
|
+
*
|
|
908
|
+
* When the adapter returns a `visibleRegion`, the content is clipped to it
|
|
909
|
+
* and to the frame's shape (see `clipEmbeddedContent`).
|
|
910
|
+
*
|
|
911
|
+
* @returns true if any importer handled the element, false otherwise.
|
|
912
|
+
*/
|
|
913
|
+
/**
|
|
914
|
+
* Runs the embedded-format adapter chain for this element. On success,
|
|
915
|
+
* appends the imported block right after `frameBlock` in its parent's
|
|
916
|
+
* children list (so z-order matches IDML XML order) and returns the
|
|
917
|
+
* imported block id so the caller can include it in any enclosing
|
|
918
|
+
* `<Group>` rendering — without that, the imported content gets
|
|
919
|
+
* orphaned in `pageBlock` while the frame moves into the IDML group.
|
|
920
|
+
*
|
|
921
|
+
* Returns null when no adapter handled the element (callers should
|
|
922
|
+
* fall through to image-fill / default-fill paths). Returns
|
|
923
|
+
* `{ block: null }` when an adapter handled it but none of the content is
|
|
924
|
+
* visible after clipping.
|
|
925
|
+
*/
|
|
926
|
+
private tryEmbeddedImport;
|
|
927
|
+
/**
|
|
928
|
+
* Places imported embedded content, then clips it to its frame and the
|
|
929
|
+
* region it shows. Returns `{ block: null }` when none of it is visible.
|
|
930
|
+
*/
|
|
931
|
+
private placeEmbeddedContent;
|
|
932
|
+
/**
|
|
933
|
+
* Runs `body` with implicit engine updates on, so its getters see the
|
|
934
|
+
* layout of the blocks it changes. A host that defers layout keeps its
|
|
935
|
+
* setting, also when `body` throws.
|
|
936
|
+
*/
|
|
937
|
+
private withImplicitUpdates;
|
|
938
|
+
/**
|
|
939
|
+
* Clips imported embedded content to its IDML frame and to the region the
|
|
940
|
+
* embed shows, such as a PDF's crop. Vector, image and stroke blocks are cut
|
|
941
|
+
* by boolean intersection. The engine cannot clip text, so text outside the
|
|
942
|
+
* region is dropped and text across its edge stays whole, with a warning.
|
|
943
|
+
* Returns null when none of the content is visible.
|
|
944
|
+
*/
|
|
945
|
+
private clipEmbeddedContent;
|
|
946
|
+
/**
|
|
947
|
+
* Decides how an embedded leaf block meets its clip mask. A block inside
|
|
948
|
+
* stays as it is, a block outside goes, and a block across the edge is cut.
|
|
949
|
+
* Text across the edge stays whole, with a warning, because an intersection
|
|
950
|
+
* cannot cut it. So does a stroke on an engine that does not outline it.
|
|
951
|
+
*/
|
|
952
|
+
private classifyEmbeddedLeaf;
|
|
953
|
+
/**
|
|
954
|
+
* Whether `box` overlaps the clip mask of `leaf` (`Intersection`) or reaches
|
|
955
|
+
* outside it (`Difference`). A probe that fails counts as yes, so the block
|
|
956
|
+
* stays.
|
|
957
|
+
*/
|
|
958
|
+
private probeMask;
|
|
959
|
+
/** Whether the block draws a visible stroke. */
|
|
960
|
+
private isStroked;
|
|
961
|
+
/**
|
|
962
|
+
* Readies the stroked paths that cross the clip edge for an intersection. A
|
|
963
|
+
* path with a fill becomes two blocks, the fill below the stroke, because a
|
|
964
|
+
* cut block keeps one paint. When this engine outlines an open stroke, a
|
|
965
|
+
* closed stroke becomes an open path that traces it.
|
|
966
|
+
*/
|
|
967
|
+
private prepareEmbeddedStrokes;
|
|
968
|
+
/**
|
|
969
|
+
* Whether an intersection cuts `block` along its stroke: it is an open path
|
|
970
|
+
* with only a stroke, and this engine outlines such a stroke in combine().
|
|
971
|
+
*/
|
|
972
|
+
private cutsAsOpenStroke;
|
|
973
|
+
/**
|
|
974
|
+
* Whether combine() keeps the stroked footprint of an open stroke-only path.
|
|
975
|
+
* Engines before that change drop such a path, because it has no area.
|
|
976
|
+
*/
|
|
977
|
+
private probeOpenStrokeOutline;
|
|
978
|
+
/**
|
|
979
|
+
* Combines `first` and `second` and returns the new block. On an empty
|
|
980
|
+
* result or an error it destroys both inputs, which combine() leaves on the
|
|
981
|
+
* page, and returns `'empty'` or the error message.
|
|
982
|
+
*/
|
|
983
|
+
private intersect;
|
|
984
|
+
/**
|
|
985
|
+
* The page box of a block, in page-local points, unrotated. A stroke
|
|
986
|
+
* reaches half its width past the shape, and further at a miter, so a
|
|
987
|
+
* stroked block grows by its full stroke width.
|
|
988
|
+
*/
|
|
989
|
+
private blockBox;
|
|
990
|
+
/**
|
|
991
|
+
* A rectangle in page-local points over the middle band of a text's
|
|
992
|
+
* lines, from a quarter to three quarters of each line's height, in the
|
|
993
|
+
* text's own orientation. The engine reports line boxes, not glyph ink: a
|
|
994
|
+
* line box also covers the ascent above capitals and the descent below the
|
|
995
|
+
* baseline, so a crop edge at the baseline would count text outside it as
|
|
996
|
+
* crossing.
|
|
997
|
+
*/
|
|
998
|
+
private textInkBox;
|
|
999
|
+
/**
|
|
1000
|
+
* The rotation of `block` on the page, in radians. A flip mirrors the
|
|
1001
|
+
* rotations of the blocks inside it.
|
|
1002
|
+
*/
|
|
1003
|
+
private globalRotation;
|
|
1004
|
+
/**
|
|
1005
|
+
* Whether the rect `inner` lies inside `outer` (both page-local points,
|
|
1006
|
+
* each rotated around its center), within half a point.
|
|
1007
|
+
*/
|
|
1008
|
+
private rectLiesInside;
|
|
1009
|
+
/**
|
|
1010
|
+
* A filled rectangle mask for combine(), at a page-local rect in points
|
|
1011
|
+
* that rotates around its center.
|
|
1012
|
+
*/
|
|
1013
|
+
private createRectMaskBlock;
|
|
1014
|
+
/**
|
|
1015
|
+
* Applies the format-specific inner transform to the block.
|
|
1016
|
+
*
|
|
1017
|
+
* The adapter pre-composes the full transform chain (every ancestor
|
|
1018
|
+
* `ItemTransform` from the inner content element up to the spread)
|
|
1019
|
+
* and exposes the result as page-local pageX/pageY plus rotation /
|
|
1020
|
+
* scale / flip. We only have to convert points to inches and call
|
|
1021
|
+
* the engine.
|
|
1022
|
+
*
|
|
1023
|
+
* Why scale via `engine.block.scale` and not `setWidth/setHeight`:
|
|
1024
|
+
* `setWidth` only resizes the group's bbox metadata; children don't
|
|
1025
|
+
* scale. `block.scale` writes the factor into the block's transform,
|
|
1026
|
+
* which propagates correctly to all descendants.
|
|
1027
|
+
*/
|
|
1028
|
+
private applyEmbeddedPlacement;
|
|
1029
|
+
/**
|
|
1030
|
+
* Apply a frame's canonical T * R * S placement to an attached block.
|
|
1031
|
+
* IDML decomposition represents reflections as a horizontal flip plus
|
|
1032
|
+
* rotation. The engine flip setter reflects in world coordinates and
|
|
1033
|
+
* changes rotation/origin, so apply the flip before setting the final
|
|
1034
|
+
* rotation and origin. The parsed x subtracts width for a reflected
|
|
1035
|
+
* frame; undo that adjustment to recover the matrix's local origin.
|
|
1036
|
+
* Also used as the frame-bounds fallback for embedded content.
|
|
1037
|
+
*/
|
|
1038
|
+
private applyFrameLayout;
|
|
1039
|
+
/**
|
|
1040
|
+
* Parses the image fill of an IDML element and applies it to a CESDK block
|
|
1041
|
+
* @param block The CESDK block to apply the image fill to
|
|
1042
|
+
* @param element The IDML element
|
|
1043
|
+
* @returns Promise<boolean> True if the image fill was applied, false otherwise
|
|
1044
|
+
*/
|
|
1045
|
+
private applyImageFill;
|
|
1046
|
+
private linkedFile;
|
|
1047
|
+
/**
|
|
1048
|
+
* A loadable URI for a linked file, or the placeholder after a warning that
|
|
1049
|
+
* names the file. It does not throw, so one bad file cannot stop the import.
|
|
1050
|
+
*/
|
|
1051
|
+
private linkedImageURI;
|
|
1052
|
+
private linkedFileImageURI;
|
|
1053
|
+
private linkedSvgSize;
|
|
1054
|
+
/** The bytes of a supplied linked file, or the reason there are none. */
|
|
1055
|
+
private linkedFileBytes;
|
|
1056
|
+
/**
|
|
1057
|
+
* Converts the data URI of an embedded PSD to a `buffer://` PNG of its
|
|
1058
|
+
* flattened image, or to the placeholder image when it has none.
|
|
1059
|
+
*/
|
|
1060
|
+
private embeddedPsdImageURI;
|
|
1061
|
+
private psdImageURI;
|
|
1062
|
+
/**
|
|
1063
|
+
* Returns the converter from 4-byte CMYK ink pixels to RGB: the scene's
|
|
1064
|
+
* CMYK profile, or the plain formula when the engine cannot manage colour.
|
|
1065
|
+
*/
|
|
1066
|
+
private cmykConverter;
|
|
1067
|
+
/**
|
|
1068
|
+
* Extracts the image content transform from the IDML Image element's ItemTransform
|
|
1069
|
+
* and applies it as CE.SDK crop parameters (rotation, scale, translation).
|
|
1070
|
+
*
|
|
1071
|
+
* In IDML, the Image element inside a frame has its own ItemTransform [a,b,c,d,tx,ty]
|
|
1072
|
+
* that maps image pixel coordinates to the frame's local point coordinates.
|
|
1073
|
+
* The FrameFittingOption crop values define how far the image extends beyond
|
|
1074
|
+
* (positive) or falls short of (negative) the frame edges.
|
|
1075
|
+
*/
|
|
1076
|
+
private applyImageContentTransform;
|
|
1077
|
+
/**
|
|
1078
|
+
* Parses the corner radius of an IDML element and applies it to a CESDK block.
|
|
1079
|
+
*
|
|
1080
|
+
* @param block The CESDK block to apply the corner radius to
|
|
1081
|
+
* @param ctx The style context for the IDML element
|
|
1082
|
+
* @param scale The element's combined transform scale factor. IDML corner
|
|
1083
|
+
* radii are in the element's local coordinate space (points), but the
|
|
1084
|
+
* block's width/height have already been scaled by the transform. The
|
|
1085
|
+
* radius must be scaled by the same factor to remain proportional.
|
|
1086
|
+
*/
|
|
1087
|
+
private applyBorderRadius;
|
|
1088
|
+
/**
|
|
1089
|
+
* Creates a graphic block with a vector_path shape from the parent element's
|
|
1090
|
+
* PathGeometry, suitable for use as a clipping mask with engine.block.combine().
|
|
1091
|
+
*/
|
|
1092
|
+
private createClipMaskBlock;
|
|
1093
|
+
/**
|
|
1094
|
+
* Clips a child block to the shape of a mask block using boolean
|
|
1095
|
+
* intersection. `createMask` returns a new mask on the page for each clipped
|
|
1096
|
+
* block, because combine() consumes it.
|
|
1097
|
+
* Preserves pre-existing crop transforms on image blocks.
|
|
1098
|
+
* For group blocks, recursively clips each child in the group.
|
|
1099
|
+
*
|
|
1100
|
+
* By default, text and a block whose intersection fails stay unchanged.
|
|
1101
|
+
* For embedded content, `embedded.classify` decides each leaf first, and
|
|
1102
|
+
* an empty intersection drops the block.
|
|
1103
|
+
*/
|
|
1104
|
+
private applyClipMask;
|
|
1105
|
+
/**
|
|
1106
|
+
* Extracts the line height multiplier from IDML paragraph/character style elements.
|
|
1107
|
+
* Leading can be specified as an explicit value in points or as "Auto".
|
|
1108
|
+
*
|
|
1109
|
+
* @param paragraphStyleRange - The ParagraphStyleRange element from the story
|
|
1110
|
+
* @param appliedParagraphStyle - The resolved ParagraphStyle from Styles.xml
|
|
1111
|
+
* @returns The line height as a multiplier and whether it's auto-based leading
|
|
1112
|
+
*/
|
|
1113
|
+
private getLineHeightFromIDML;
|
|
737
1114
|
}
|
|
738
|
-
|
|
739
|
-
export {
|
|
740
|
-
LogMessage$1 as LogMessage,
|
|
741
|
-
Logger$1 as Logger,
|
|
742
|
-
};
|
|
743
|
-
|
|
744
|
-
export {};
|
|
1115
|
+
export type { ColorProfileRequest, ColorProfileResolver, EmbeddedBlockLoader, EmbeddedContentPlacementResult, EmbeddedFormatParser, EmbeddedImporter, EmbeddedImporterContext, EmbeddedImporterResult, FontResolverOptions, FontResolverResult, LinkedImageReference, LinkedImageResolver, LogMessage, TypefaceParams, TypefaceResolver, VariableDelimiter };
|