@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.
Files changed (539) hide show
  1. package/README.md +35 -17
  2. package/dist/cli/license.js +1 -1
  3. package/dist/runtime/cli/commands.d.ts +2 -0
  4. package/dist/runtime/cli/commands.d.ts.map +1 -1
  5. package/dist/runtime/cli/commands.js +56 -1
  6. package/dist/runtime/cli/commands.js.map +1 -1
  7. package/dist/runtime/cli/main.d.ts.map +1 -1
  8. package/dist/runtime/cli/main.js +5 -0
  9. package/dist/runtime/cli/main.js.map +1 -1
  10. package/dist/runtime/codesign-shim/codesign-router/protocol/types.mjs +1 -0
  11. package/dist/runtime/codesign-shim/codesign-router/release-build.generated.mjs +1 -1
  12. package/dist/server-client-types/protocol/types.d.ts +25 -3
  13. package/dist/server-client.mjs +1 -0
  14. package/dist/server.d.ts +2 -0
  15. package/dist/server.d.ts.map +1 -1
  16. package/dist/server.js +4 -2
  17. package/dist/server.js.map +1 -1
  18. package/node_modules/@imgly/codesign-billing/README.md +138 -0
  19. package/node_modules/@imgly/{codesign-sdk/dist/executor/billing → codesign-billing/dist}/charge.d.ts +30 -5
  20. package/node_modules/@imgly/codesign-billing/dist/charge.d.ts.map +1 -0
  21. package/node_modules/@imgly/{codesign-sdk/dist/executor/billing → codesign-billing/dist}/charge.js +16 -1
  22. package/node_modules/@imgly/codesign-billing/dist/charge.js.map +1 -0
  23. package/node_modules/@imgly/codesign-billing/dist/charges.d.ts +71 -0
  24. package/node_modules/@imgly/codesign-billing/dist/charges.d.ts.map +1 -0
  25. package/node_modules/@imgly/codesign-billing/dist/charges.js +198 -0
  26. package/node_modules/@imgly/codesign-billing/dist/charges.js.map +1 -0
  27. package/node_modules/@imgly/codesign-billing/dist/index.d.ts +6 -0
  28. package/node_modules/@imgly/codesign-billing/dist/index.d.ts.map +1 -0
  29. package/node_modules/@imgly/codesign-billing/dist/index.js +6 -0
  30. package/node_modules/@imgly/codesign-billing/dist/index.js.map +1 -0
  31. package/node_modules/@imgly/codesign-billing/dist/ledger.d.ts +55 -0
  32. package/node_modules/@imgly/codesign-billing/dist/ledger.d.ts.map +1 -0
  33. package/node_modules/@imgly/codesign-billing/dist/ledger.js +80 -0
  34. package/node_modules/@imgly/codesign-billing/dist/ledger.js.map +1 -0
  35. package/node_modules/@imgly/{codesign-sdk/dist/executor/billing → codesign-billing/dist}/metering.d.ts +9 -1
  36. package/node_modules/@imgly/codesign-billing/dist/metering.d.ts.map +1 -0
  37. package/node_modules/@imgly/{codesign-sdk/dist/executor/billing → codesign-billing/dist}/metering.js +77 -21
  38. package/node_modules/@imgly/codesign-billing/dist/metering.js.map +1 -0
  39. package/node_modules/@imgly/codesign-billing/dist/refusal.d.ts +20 -0
  40. package/node_modules/@imgly/codesign-billing/dist/refusal.d.ts.map +1 -0
  41. package/node_modules/@imgly/codesign-billing/dist/refusal.js +13 -0
  42. package/node_modules/@imgly/codesign-billing/dist/refusal.js.map +1 -0
  43. package/node_modules/@imgly/codesign-billing/package.json +30 -0
  44. package/node_modules/@imgly/codesign-router/dist/config/unit-config.d.ts +13 -5
  45. package/node_modules/@imgly/codesign-router/dist/config/unit-config.d.ts.map +1 -1
  46. package/node_modules/@imgly/codesign-router/dist/config/unit-config.js +18 -12
  47. package/node_modules/@imgly/codesign-router/dist/config/unit-config.js.map +1 -1
  48. package/node_modules/@imgly/codesign-router/dist/consent.d.ts +6 -2
  49. package/node_modules/@imgly/codesign-router/dist/consent.d.ts.map +1 -1
  50. package/node_modules/@imgly/codesign-router/dist/consent.js +65 -9
  51. package/node_modules/@imgly/codesign-router/dist/consent.js.map +1 -1
  52. package/node_modules/@imgly/codesign-router/dist/protocol/types.d.ts +25 -3
  53. package/node_modules/@imgly/codesign-router/dist/protocol/types.d.ts.map +1 -1
  54. package/node_modules/@imgly/codesign-router/dist/protocol/types.js +1 -0
  55. package/node_modules/@imgly/codesign-router/dist/protocol/types.js.map +1 -1
  56. package/node_modules/@imgly/codesign-router/dist/release-build.generated.d.ts +1 -1
  57. package/node_modules/@imgly/codesign-router/dist/release-build.generated.d.ts.map +1 -1
  58. package/node_modules/@imgly/codesign-router/dist/release-build.generated.js +1 -1
  59. package/node_modules/@imgly/codesign-router/dist/release-build.generated.js.map +1 -1
  60. package/node_modules/@imgly/codesign-router/dist/router/channels-v2.d.ts.map +1 -1
  61. package/node_modules/@imgly/codesign-router/dist/router/channels-v2.js +14 -4
  62. package/node_modules/@imgly/codesign-router/dist/router/channels-v2.js.map +1 -1
  63. package/node_modules/@imgly/codesign-router/dist/router/main.d.ts.map +1 -1
  64. package/node_modules/@imgly/codesign-router/dist/router/main.js +9 -1
  65. package/node_modules/@imgly/codesign-router/dist/router/main.js.map +1 -1
  66. package/node_modules/@imgly/codesign-sdk/CHANGELOG.md +24 -0
  67. package/node_modules/@imgly/codesign-sdk/README.md +8 -7
  68. package/node_modules/@imgly/codesign-sdk/dist/abort.d.ts +1 -0
  69. package/node_modules/@imgly/codesign-sdk/dist/abort.js +18 -0
  70. package/node_modules/@imgly/codesign-sdk/dist/assets/inline.generated.js +12 -12
  71. package/node_modules/@imgly/codesign-sdk/dist/browser/index.d.ts +1 -1
  72. package/node_modules/@imgly/codesign-sdk/dist/browser/worker.d.ts +1 -1
  73. package/node_modules/@imgly/codesign-sdk/dist/browser/worker.js +15 -8
  74. package/node_modules/@imgly/codesign-sdk/dist/cesdk-utils/index.js +2 -0
  75. package/node_modules/@imgly/codesign-sdk/dist/codesign-error.d.ts +38 -1
  76. package/node_modules/@imgly/codesign-sdk/dist/codesign-error.js +9 -0
  77. package/node_modules/@imgly/codesign-sdk/dist/codesign.d.ts +19 -12
  78. package/node_modules/@imgly/codesign-sdk/dist/codesign.js +268 -43
  79. package/node_modules/@imgly/codesign-sdk/dist/design/animatable.generated.js +3 -0
  80. package/node_modules/@imgly/codesign-sdk/dist/design/capabilities.generated.js +1 -0
  81. package/node_modules/@imgly/codesign-sdk/dist/design/facade.d.ts +1 -1
  82. package/node_modules/@imgly/codesign-sdk/dist/design/facade.js +128 -36
  83. package/node_modules/@imgly/codesign-sdk/dist/design/keyframes.js +2 -1
  84. package/node_modules/@imgly/codesign-sdk/dist/design/lint.d.ts +1 -1
  85. package/node_modules/@imgly/codesign-sdk/dist/design/lint.js +82 -5
  86. package/node_modules/@imgly/codesign-sdk/dist/design/props.generated.js +3 -0
  87. package/node_modules/@imgly/codesign-sdk/dist/design/run-offsets.d.ts +10 -0
  88. package/node_modules/@imgly/codesign-sdk/dist/design/run-offsets.js +26 -0
  89. package/node_modules/@imgly/codesign-sdk/dist/design/scene-lint.d.ts +23 -1
  90. package/node_modules/@imgly/codesign-sdk/dist/design/scene-lint.js +194 -3
  91. package/node_modules/@imgly/codesign-sdk/dist/design/timeline-poses.d.ts +8 -0
  92. package/node_modules/@imgly/codesign-sdk/dist/design/timeline-poses.js +53 -0
  93. package/node_modules/@imgly/codesign-sdk/dist/design/variables.d.ts +14 -0
  94. package/node_modules/@imgly/codesign-sdk/dist/design/variables.js +250 -37
  95. package/node_modules/@imgly/codesign-sdk/dist/designs/s3-presigner.d.ts +50 -0
  96. package/node_modules/@imgly/codesign-sdk/dist/designs/s3-presigner.js +116 -0
  97. package/node_modules/@imgly/codesign-sdk/dist/designs/types.d.ts +79 -3
  98. package/node_modules/@imgly/codesign-sdk/dist/engine/audio-extract.d.ts +12 -1
  99. package/node_modules/@imgly/codesign-sdk/dist/engine/audio-extract.js +20 -4
  100. package/node_modules/@imgly/codesign-sdk/dist/engine/engine-capacity.d.ts +20 -7
  101. package/node_modules/@imgly/codesign-sdk/dist/engine/engine-capacity.js +31 -14
  102. package/node_modules/@imgly/codesign-sdk/dist/engine/headless.d.ts +4 -0
  103. package/node_modules/@imgly/codesign-sdk/dist/engine/headless.js +20 -0
  104. package/node_modules/@imgly/codesign-sdk/dist/executor/billing/check.d.ts +1 -14
  105. package/node_modules/@imgly/codesign-sdk/dist/executor/billing/check.js +2 -7
  106. package/node_modules/@imgly/codesign-sdk/dist/executor/billing/metered.d.ts +1 -2
  107. package/node_modules/@imgly/codesign-sdk/dist/executor/billing/metered.js +120 -91
  108. package/node_modules/@imgly/codesign-sdk/dist/executor/encode-watchdog.d.ts +2 -2
  109. package/node_modules/@imgly/codesign-sdk/dist/executor/encode-watchdog.js +10 -4
  110. package/node_modules/@imgly/codesign-sdk/dist/executor/engine-protocol.d.ts +1 -1
  111. package/node_modules/@imgly/codesign-sdk/dist/executor/engine-protocol.js +13 -3
  112. package/node_modules/@imgly/codesign-sdk/dist/executor/executor-options.d.ts +6 -7
  113. package/node_modules/@imgly/codesign-sdk/dist/executor/executor-options.js +14 -7
  114. package/node_modules/@imgly/codesign-sdk/dist/executor/handler.d.ts +47 -2
  115. package/node_modules/@imgly/codesign-sdk/dist/executor/handler.js +519 -8
  116. package/node_modules/@imgly/codesign-sdk/dist/executor/node.d.ts +42 -6
  117. package/node_modules/@imgly/codesign-sdk/dist/executor/node.js +231 -9
  118. package/node_modules/@imgly/codesign-sdk/dist/exporters/fig.d.ts +13 -0
  119. package/node_modules/@imgly/codesign-sdk/dist/exporters/fig.js +28 -0
  120. package/node_modules/@imgly/codesign-sdk/dist/exporters/html.d.ts +18 -2
  121. package/node_modules/@imgly/codesign-sdk/dist/exporters/html.js +129 -15
  122. package/node_modules/@imgly/codesign-sdk/dist/exporters/index.d.ts +5 -2
  123. package/node_modules/@imgly/codesign-sdk/dist/exporters/index.js +2 -2
  124. package/node_modules/@imgly/codesign-sdk/dist/exporters/node.d.ts +1 -1
  125. package/node_modules/@imgly/codesign-sdk/dist/exporters/node.js +4 -3
  126. package/node_modules/@imgly/codesign-sdk/dist/exporters/psd.js +1 -1
  127. package/node_modules/@imgly/codesign-sdk/dist/formats/av-limit.d.ts +2 -0
  128. package/node_modules/@imgly/codesign-sdk/dist/formats/av-limit.js +1 -1
  129. package/node_modules/@imgly/codesign-sdk/dist/formats/design-sniff.d.ts +3 -1
  130. package/node_modules/@imgly/codesign-sdk/dist/formats/design-sniff.js +7 -0
  131. package/node_modules/@imgly/codesign-sdk/dist/formats/import-registry.d.ts +1 -1
  132. package/node_modules/@imgly/codesign-sdk/dist/formats/import-registry.js +4 -2
  133. package/node_modules/@imgly/codesign-sdk/dist/formats/import-warnings.d.ts +5 -0
  134. package/node_modules/@imgly/codesign-sdk/dist/formats/import-warnings.js +31 -0
  135. package/node_modules/@imgly/codesign-sdk/dist/formats/media-facts.d.ts +15 -0
  136. package/node_modules/@imgly/codesign-sdk/dist/formats/media-facts.js +26 -0
  137. package/node_modules/@imgly/codesign-sdk/dist/formats/mime.d.ts +6 -0
  138. package/node_modules/@imgly/codesign-sdk/dist/formats/mime.js +37 -0
  139. package/node_modules/@imgly/codesign-sdk/dist/formats/refuse-media.d.ts +7 -0
  140. package/node_modules/@imgly/codesign-sdk/dist/formats/refuse-media.js +46 -0
  141. package/node_modules/@imgly/codesign-sdk/dist/formats/svg-export.d.ts +6 -0
  142. package/node_modules/@imgly/codesign-sdk/dist/formats/svg-export.js +20 -0
  143. package/node_modules/@imgly/codesign-sdk/dist/formats/svg-import.d.ts +3 -0
  144. package/node_modules/@imgly/codesign-sdk/dist/formats/svg-import.js +25 -0
  145. package/node_modules/@imgly/codesign-sdk/dist/formats/zip-entries.d.ts +2 -0
  146. package/node_modules/@imgly/codesign-sdk/dist/formats/zip-entries.js +1 -0
  147. package/node_modules/@imgly/codesign-sdk/dist/gateway/asset-generate.d.ts +10 -4
  148. package/node_modules/@imgly/codesign-sdk/dist/gateway/asset-generate.js +205 -79
  149. package/node_modules/@imgly/codesign-sdk/dist/gateway/client.d.ts +23 -2
  150. package/node_modules/@imgly/codesign-sdk/dist/gateway/client.js +40 -41
  151. package/node_modules/@imgly/codesign-sdk/dist/gateway/index.d.ts +3 -0
  152. package/node_modules/@imgly/codesign-sdk/dist/gateway/index.js +4 -0
  153. package/node_modules/@imgly/codesign-sdk/dist/gateway/types.d.ts +18 -3
  154. package/node_modules/@imgly/codesign-sdk/dist/gateway/upload-origin.d.ts +3 -0
  155. package/node_modules/@imgly/codesign-sdk/dist/gateway/upload-origin.js +5 -0
  156. package/node_modules/@imgly/codesign-sdk/dist/host/edit-code.d.ts +2 -0
  157. package/node_modules/@imgly/codesign-sdk/dist/host/edit-code.js +8 -1
  158. package/node_modules/@imgly/codesign-sdk/dist/host/preview-size.d.ts +4 -2
  159. package/node_modules/@imgly/codesign-sdk/dist/host/preview-size.js +7 -4
  160. package/node_modules/@imgly/codesign-sdk/dist/host.d.ts +34 -5
  161. package/node_modules/@imgly/codesign-sdk/dist/host.js +6 -0
  162. package/node_modules/@imgly/codesign-sdk/dist/importers/fig.d.ts +4 -0
  163. package/node_modules/@imgly/codesign-sdk/dist/importers/fig.js +57 -0
  164. package/node_modules/@imgly/codesign-sdk/dist/importers/index.d.ts +2 -2
  165. package/node_modules/@imgly/codesign-sdk/dist/importers/index.js +38 -25
  166. package/node_modules/@imgly/codesign-sdk/dist/importers/node.d.ts +5 -0
  167. package/node_modules/@imgly/codesign-sdk/dist/importers/node.js +8 -0
  168. package/node_modules/@imgly/codesign-sdk/dist/importers/pdf-fonts.d.ts +20 -0
  169. package/node_modules/@imgly/codesign-sdk/dist/importers/pdf-fonts.js +76 -0
  170. package/node_modules/@imgly/codesign-sdk/dist/importers/shared.d.ts +14 -0
  171. package/node_modules/@imgly/codesign-sdk/dist/importers/shared.js +18 -0
  172. package/node_modules/@imgly/codesign-sdk/dist/index.d.ts +5 -4
  173. package/node_modules/@imgly/codesign-sdk/dist/index.js +2 -1
  174. package/node_modules/@imgly/codesign-sdk/dist/internal/index.d.ts +24 -17
  175. package/node_modules/@imgly/codesign-sdk/dist/internal/index.js +19 -10
  176. package/node_modules/@imgly/codesign-sdk/dist/node/edit-renders.d.ts +5 -0
  177. package/node_modules/@imgly/codesign-sdk/dist/node/edit-renders.js +73 -0
  178. package/node_modules/@imgly/codesign-sdk/dist/node/engine-child.js +18 -2
  179. package/node_modules/@imgly/codesign-sdk/dist/node/engine-http.js +8 -2
  180. package/node_modules/@imgly/codesign-sdk/dist/node/index.d.ts +1 -0
  181. package/node_modules/@imgly/codesign-sdk/dist/node/index.js +1 -0
  182. package/node_modules/@imgly/codesign-sdk/dist/node/media-probe.js +1 -1
  183. package/node_modules/@imgly/codesign-sdk/dist/sdk-version.generated.js +2 -2
  184. package/node_modules/@imgly/codesign-sdk/dist/session/engine-session.d.ts +59 -13
  185. package/node_modules/@imgly/codesign-sdk/dist/session/engine-session.js +19 -0
  186. package/node_modules/@imgly/codesign-sdk/dist/session/export-facts.d.ts +1 -14
  187. package/node_modules/@imgly/codesign-sdk/dist/session/export-facts.js +15 -4
  188. package/node_modules/@imgly/codesign-sdk/dist/session/file-formats.d.ts +5 -0
  189. package/node_modules/@imgly/codesign-sdk/dist/session/guarded-engine-session.d.ts +2 -0
  190. package/node_modules/@imgly/codesign-sdk/dist/session/guarded-engine-session.js +18 -7
  191. package/node_modules/@imgly/codesign-sdk/dist/session/local-engine-session.js +247 -68
  192. package/node_modules/@imgly/codesign-sdk/dist/session/local-engine.js +2 -2
  193. package/node_modules/@imgly/codesign-sdk/dist/session/multipart.js +10 -2
  194. package/node_modules/@imgly/codesign-sdk/dist/session/pending-video.js +2 -3
  195. package/node_modules/@imgly/codesign-sdk/dist/session/read-resolved.js +93 -6
  196. package/node_modules/@imgly/codesign-sdk/dist/session/remote.d.ts +34 -10
  197. package/node_modules/@imgly/codesign-sdk/dist/session/remote.js +377 -87
  198. package/node_modules/@imgly/codesign-sdk/dist/session/render-id.js +11 -2
  199. package/node_modules/@imgly/codesign-sdk/dist/session/session.d.ts +67 -6
  200. package/node_modules/@imgly/codesign-sdk/dist/session/session.js +213 -32
  201. package/node_modules/@imgly/codesign-sdk/dist/session/silent-audio.d.ts +18 -0
  202. package/node_modules/@imgly/codesign-sdk/dist/session/silent-audio.js +47 -0
  203. package/node_modules/@imgly/codesign-sdk/dist/session/transfers.d.ts +85 -0
  204. package/node_modules/@imgly/codesign-sdk/dist/session/transfers.js +80 -0
  205. package/node_modules/@imgly/codesign-sdk/dist/session/url-guard.d.ts +30 -0
  206. package/node_modules/@imgly/codesign-sdk/dist/session/url-guard.js +187 -0
  207. package/node_modules/@imgly/codesign-sdk/dist/session/url-source.d.ts +21 -0
  208. package/node_modules/@imgly/codesign-sdk/dist/session/url-source.js +163 -0
  209. package/node_modules/@imgly/codesign-sdk/dist/session/wire.d.ts +8 -1
  210. package/node_modules/@imgly/codesign-sdk/dist/session/wire.js +2 -1
  211. package/node_modules/@imgly/codesign-sdk/dist/session-instructions.js +2 -2
  212. package/node_modules/@imgly/codesign-sdk/dist/sessions/state.d.ts +3 -1
  213. package/node_modules/@imgly/codesign-sdk/dist/sessions/state.js +5 -1
  214. package/node_modules/@imgly/codesign-sdk/dist/signed-urls.d.ts +3 -0
  215. package/node_modules/@imgly/codesign-sdk/dist/signed-urls.js +30 -0
  216. package/node_modules/@imgly/codesign-sdk/dist/skill-tool.js +12 -12
  217. package/node_modules/@imgly/codesign-sdk/dist/sources/handshake.d.ts +2 -0
  218. package/node_modules/@imgly/codesign-sdk/dist/sources/mime.js +0 -1
  219. package/node_modules/@imgly/codesign-sdk/dist/sources/route.d.ts +8 -1
  220. package/node_modules/@imgly/codesign-sdk/dist/sources/route.js +17 -2
  221. package/node_modules/@imgly/codesign-sdk/dist/sources/search.js +9 -2
  222. package/node_modules/@imgly/codesign-sdk/dist/sources/types.d.ts +8 -1
  223. package/node_modules/@imgly/codesign-sdk/dist/testing/conformance.js +11 -6
  224. package/node_modules/@imgly/codesign-sdk/dist/testing/fake-engine.d.ts +1 -1
  225. package/node_modules/@imgly/codesign-sdk/dist/testing/fake-engine.js +11 -4
  226. package/node_modules/@imgly/codesign-sdk/dist/tools/edit.js +11 -4
  227. package/node_modules/@imgly/codesign-sdk/dist/tools/errors.js +2 -2
  228. package/node_modules/@imgly/codesign-sdk/dist/tools/export-formats/table.d.ts +4 -4
  229. package/node_modules/@imgly/codesign-sdk/dist/tools/export-formats/table.js +8 -0
  230. package/node_modules/@imgly/codesign-sdk/dist/tools/export.d.ts +3 -1
  231. package/node_modules/@imgly/codesign-sdk/dist/tools/export.js +75 -12
  232. package/node_modules/@imgly/codesign-sdk/dist/tools/omit-defaults.d.ts +3 -0
  233. package/node_modules/@imgly/codesign-sdk/dist/tools/omit-defaults.js +7 -0
  234. package/node_modules/@imgly/codesign-sdk/dist/tools/preview.js +42 -19
  235. package/node_modules/@imgly/codesign-sdk/dist/tools/source-tools.js +11 -4
  236. package/node_modules/@imgly/codesign-sdk/package.json +18 -10
  237. package/node_modules/@imgly/codesign-server/assets/ai-plugins/apps.mjs +5 -5
  238. package/node_modules/@imgly/codesign-server/assets/ai-plugins/image-gateway.mjs +5 -5
  239. package/node_modules/@imgly/codesign-server/assets/ai-plugins/version.json +1 -1
  240. package/node_modules/@imgly/codesign-server/dist/catalog/link.d.ts.map +1 -1
  241. package/node_modules/@imgly/codesign-server/dist/catalog/link.js +2 -1
  242. package/node_modules/@imgly/codesign-server/dist/catalog/link.js.map +1 -1
  243. package/node_modules/@imgly/codesign-server/dist/catalog/local-server.d.ts.map +1 -1
  244. package/node_modules/@imgly/codesign-server/dist/catalog/local-server.js +1 -0
  245. package/node_modules/@imgly/codesign-server/dist/catalog/local-server.js.map +1 -1
  246. package/node_modules/@imgly/codesign-server/dist/catalog/tools/asset-add.d.ts +59 -1
  247. package/node_modules/@imgly/codesign-server/dist/catalog/tools/asset-add.d.ts.map +1 -1
  248. package/node_modules/@imgly/codesign-server/dist/catalog/tools/asset-add.js +127 -23
  249. package/node_modules/@imgly/codesign-server/dist/catalog/tools/asset-add.js.map +1 -1
  250. package/node_modules/@imgly/codesign-server/dist/catalog/tools/asset-search.d.ts +7 -0
  251. package/node_modules/@imgly/codesign-server/dist/catalog/tools/asset-search.d.ts.map +1 -1
  252. package/node_modules/@imgly/codesign-server/dist/catalog/tools/asset-search.js +65 -15
  253. package/node_modules/@imgly/codesign-server/dist/catalog/tools/asset-search.js.map +1 -1
  254. package/node_modules/@imgly/codesign-server/dist/catalog/tools/checklist.d.ts +2 -0
  255. package/node_modules/@imgly/codesign-server/dist/catalog/tools/checklist.d.ts.map +1 -1
  256. package/node_modules/@imgly/codesign-server/dist/catalog/tools/checklist.js +15 -5
  257. package/node_modules/@imgly/codesign-server/dist/catalog/tools/checklist.js.map +1 -1
  258. package/node_modules/@imgly/codesign-server/dist/catalog/tools/export-description.d.ts +1 -1
  259. package/node_modules/@imgly/codesign-server/dist/catalog/tools/export-description.d.ts.map +1 -1
  260. package/node_modules/@imgly/codesign-server/dist/catalog/tools/export-description.js +7 -6
  261. package/node_modules/@imgly/codesign-server/dist/catalog/tools/export-description.js.map +1 -1
  262. package/node_modules/@imgly/codesign-server/dist/catalog/tools/export-formats/modules.d.ts +2 -2
  263. package/node_modules/@imgly/codesign-server/dist/catalog/tools/export-formats/modules.d.ts.map +1 -1
  264. package/node_modules/@imgly/codesign-server/dist/catalog/tools/export-formats/modules.js +14 -4
  265. package/node_modules/@imgly/codesign-server/dist/catalog/tools/export-formats/modules.js.map +1 -1
  266. package/node_modules/@imgly/codesign-server/dist/catalog/tools/import.d.ts +10 -0
  267. package/node_modules/@imgly/codesign-server/dist/catalog/tools/import.d.ts.map +1 -1
  268. package/node_modules/@imgly/codesign-server/dist/catalog/tools/import.js +106 -22
  269. package/node_modules/@imgly/codesign-server/dist/catalog/tools/import.js.map +1 -1
  270. package/node_modules/@imgly/codesign-server/dist/cli/connectors.js +1 -1
  271. package/node_modules/@imgly/codesign-server/dist/cli/connectors.js.map +1 -1
  272. package/node_modules/@imgly/codesign-server/dist/cli/doctor/checks/mcp-servers.js +1 -1
  273. package/node_modules/@imgly/codesign-server/dist/cli/doctor/checks/mcp-servers.js.map +1 -1
  274. package/node_modules/@imgly/codesign-server/dist/cli/pack.d.ts +1 -1
  275. package/node_modules/@imgly/codesign-server/dist/cli/pack.d.ts.map +1 -1
  276. package/node_modules/@imgly/codesign-server/dist/cli/pack.js +24 -18
  277. package/node_modules/@imgly/codesign-server/dist/cli/pack.js.map +1 -1
  278. package/node_modules/@imgly/codesign-server/dist/conversation/instructions.js +1 -1
  279. package/node_modules/@imgly/codesign-server/dist/conversation/instructions.js.map +1 -1
  280. package/node_modules/@imgly/codesign-server/dist/conversation/main.d.ts.map +1 -1
  281. package/node_modules/@imgly/codesign-server/dist/conversation/main.js +4 -3
  282. package/node_modules/@imgly/codesign-server/dist/conversation/main.js.map +1 -1
  283. package/node_modules/@imgly/codesign-server/dist/conversation/stage.d.ts +4 -0
  284. package/node_modules/@imgly/codesign-server/dist/conversation/stage.d.ts.map +1 -1
  285. package/node_modules/@imgly/codesign-server/dist/conversation/stage.js +13 -0
  286. package/node_modules/@imgly/codesign-server/dist/conversation/stage.js.map +1 -1
  287. package/node_modules/@imgly/codesign-server/dist/credentials/credential-store.d.ts +0 -6
  288. package/node_modules/@imgly/codesign-server/dist/credentials/credential-store.d.ts.map +1 -1
  289. package/node_modules/@imgly/codesign-server/dist/credentials/credential-store.js +0 -58
  290. package/node_modules/@imgly/codesign-server/dist/credentials/credential-store.js.map +1 -1
  291. package/node_modules/@imgly/codesign-server/dist/credentials/keychain.d.ts +10 -0
  292. package/node_modules/@imgly/codesign-server/dist/credentials/keychain.d.ts.map +1 -0
  293. package/node_modules/@imgly/codesign-server/dist/credentials/keychain.js +84 -0
  294. package/node_modules/@imgly/codesign-server/dist/credentials/keychain.js.map +1 -0
  295. package/node_modules/@imgly/codesign-server/dist/credentials/token-store.d.ts +1 -3
  296. package/node_modules/@imgly/codesign-server/dist/credentials/token-store.d.ts.map +1 -1
  297. package/node_modules/@imgly/codesign-server/dist/credentials/token-store.js +3 -23
  298. package/node_modules/@imgly/codesign-server/dist/credentials/token-store.js.map +1 -1
  299. package/node_modules/@imgly/codesign-server/dist/design/design-library-tools.d.ts +59 -8
  300. package/node_modules/@imgly/codesign-server/dist/design/design-library-tools.d.ts.map +1 -1
  301. package/node_modules/@imgly/codesign-server/dist/design/design-library-tools.js +317 -40
  302. package/node_modules/@imgly/codesign-server/dist/design/design-library-tools.js.map +1 -1
  303. package/node_modules/@imgly/codesign-server/dist/design/engine.js +4 -9
  304. package/node_modules/@imgly/codesign-server/dist/design/engine.js.map +1 -1
  305. package/node_modules/@imgly/codesign-server/dist/design/engines.d.ts +5 -0
  306. package/node_modules/@imgly/codesign-server/dist/design/engines.d.ts.map +1 -1
  307. package/node_modules/@imgly/codesign-server/dist/design/engines.js +49 -0
  308. package/node_modules/@imgly/codesign-server/dist/design/engines.js.map +1 -1
  309. package/node_modules/@imgly/codesign-server/dist/design/host.d.ts +2 -0
  310. package/node_modules/@imgly/codesign-server/dist/design/host.d.ts.map +1 -1
  311. package/node_modules/@imgly/codesign-server/dist/design/host.js +10 -6
  312. package/node_modules/@imgly/codesign-server/dist/design/host.js.map +1 -1
  313. package/node_modules/@imgly/codesign-server/dist/design/lazy-executors.d.ts.map +1 -1
  314. package/node_modules/@imgly/codesign-server/dist/design/lazy-executors.js +34 -5
  315. package/node_modules/@imgly/codesign-server/dist/design/lazy-executors.js.map +1 -1
  316. package/node_modules/@imgly/codesign-server/dist/design/local-design.d.ts +42 -5
  317. package/node_modules/@imgly/codesign-server/dist/design/local-design.d.ts.map +1 -1
  318. package/node_modules/@imgly/codesign-server/dist/design/local-design.js +175 -38
  319. package/node_modules/@imgly/codesign-server/dist/design/local-design.js.map +1 -1
  320. package/node_modules/@imgly/codesign-server/dist/design/local-tools.d.ts +27 -1
  321. package/node_modules/@imgly/codesign-server/dist/design/local-tools.d.ts.map +1 -1
  322. package/node_modules/@imgly/codesign-server/dist/design/local-tools.js +65 -7
  323. package/node_modules/@imgly/codesign-server/dist/design/local-tools.js.map +1 -1
  324. package/node_modules/@imgly/codesign-server/dist/design/main.d.ts.map +1 -1
  325. package/node_modules/@imgly/codesign-server/dist/design/main.js +23 -10
  326. package/node_modules/@imgly/codesign-server/dist/design/main.js.map +1 -1
  327. package/node_modules/@imgly/codesign-server/dist/design/node-exporters.d.ts +4 -0
  328. package/node_modules/@imgly/codesign-server/dist/design/node-exporters.d.ts.map +1 -0
  329. package/node_modules/@imgly/codesign-server/dist/design/node-exporters.js +13 -0
  330. package/node_modules/@imgly/codesign-server/dist/design/node-exporters.js.map +1 -0
  331. package/node_modules/@imgly/codesign-server/dist/design/probe-media.d.ts +2 -0
  332. package/node_modules/@imgly/codesign-server/dist/design/probe-media.d.ts.map +1 -0
  333. package/node_modules/@imgly/codesign-server/dist/design/probe-media.js +16 -0
  334. package/node_modules/@imgly/codesign-server/dist/design/probe-media.js.map +1 -0
  335. package/node_modules/@imgly/codesign-server/dist/design/remote-resources.d.ts +22 -3
  336. package/node_modules/@imgly/codesign-server/dist/design/remote-resources.d.ts.map +1 -1
  337. package/node_modules/@imgly/codesign-server/dist/design/remote-resources.js +123 -32
  338. package/node_modules/@imgly/codesign-server/dist/design/remote-resources.js.map +1 -1
  339. package/node_modules/@imgly/codesign-server/dist/design/save.d.ts +5 -0
  340. package/node_modules/@imgly/codesign-server/dist/design/save.d.ts.map +1 -1
  341. package/node_modules/@imgly/codesign-server/dist/design/save.js +9 -0
  342. package/node_modules/@imgly/codesign-server/dist/design/save.js.map +1 -1
  343. package/node_modules/@imgly/codesign-server/dist/design/sessions/store.d.ts +33 -4
  344. package/node_modules/@imgly/codesign-server/dist/design/sessions/store.d.ts.map +1 -1
  345. package/node_modules/@imgly/codesign-server/dist/design/sessions/store.js +121 -43
  346. package/node_modules/@imgly/codesign-server/dist/design/sessions/store.js.map +1 -1
  347. package/node_modules/@imgly/codesign-server/dist/design/workspace-files.d.ts +8 -0
  348. package/node_modules/@imgly/codesign-server/dist/design/workspace-files.d.ts.map +1 -1
  349. package/node_modules/@imgly/codesign-server/dist/design/workspace-files.js +50 -61
  350. package/node_modules/@imgly/codesign-server/dist/design/workspace-files.js.map +1 -1
  351. package/node_modules/@imgly/codesign-server/dist/design/workspace-library.d.ts +24 -2
  352. package/node_modules/@imgly/codesign-server/dist/design/workspace-library.d.ts.map +1 -1
  353. package/node_modules/@imgly/codesign-server/dist/design/workspace-library.js +132 -17
  354. package/node_modules/@imgly/codesign-server/dist/design/workspace-library.js.map +1 -1
  355. package/node_modules/@imgly/codesign-server/dist/services/archives/create.d.ts.map +1 -1
  356. package/node_modules/@imgly/codesign-server/dist/services/archives/create.js +19 -6
  357. package/node_modules/@imgly/codesign-server/dist/services/archives/create.js.map +1 -1
  358. package/node_modules/@imgly/codesign-server/dist/services/archives/handlers.d.ts.map +1 -1
  359. package/node_modules/@imgly/codesign-server/dist/services/archives/handlers.js +10 -7
  360. package/node_modules/@imgly/codesign-server/dist/services/archives/handlers.js.map +1 -1
  361. package/node_modules/@imgly/codesign-server/dist/services/archives/pack.d.ts +3 -1
  362. package/node_modules/@imgly/codesign-server/dist/services/archives/pack.d.ts.map +1 -1
  363. package/node_modules/@imgly/codesign-server/dist/services/archives/pack.js +5 -4
  364. package/node_modules/@imgly/codesign-server/dist/services/archives/pack.js.map +1 -1
  365. package/node_modules/@imgly/codesign-server/dist/services/archives/seed-pack.d.ts +56 -0
  366. package/node_modules/@imgly/codesign-server/dist/services/archives/seed-pack.d.ts.map +1 -0
  367. package/node_modules/@imgly/codesign-server/dist/services/archives/seed-pack.js +218 -0
  368. package/node_modules/@imgly/codesign-server/dist/services/archives/seed-pack.js.map +1 -0
  369. package/node_modules/@imgly/codesign-server/dist/services/archives/seed.d.ts.map +1 -1
  370. package/node_modules/@imgly/codesign-server/dist/services/archives/seed.js +33 -124
  371. package/node_modules/@imgly/codesign-server/dist/services/archives/seed.js.map +1 -1
  372. package/node_modules/@imgly/codesign-server/dist/services/archives/template.d.ts +1 -0
  373. package/node_modules/@imgly/codesign-server/dist/services/archives/template.d.ts.map +1 -1
  374. package/node_modules/@imgly/codesign-server/dist/services/archives/template.js +1 -1
  375. package/node_modules/@imgly/codesign-server/dist/services/archives/template.js.map +1 -1
  376. package/node_modules/@imgly/codesign-server/dist/services/auth/login-manager.d.ts.map +1 -1
  377. package/node_modules/@imgly/codesign-server/dist/services/auth/login-manager.js +2 -1
  378. package/node_modules/@imgly/codesign-server/dist/services/auth/login-manager.js.map +1 -1
  379. package/node_modules/@imgly/codesign-server/dist/services/diagnostics/status.d.ts +9 -5
  380. package/node_modules/@imgly/codesign-server/dist/services/diagnostics/status.d.ts.map +1 -1
  381. package/node_modules/@imgly/codesign-server/dist/services/diagnostics/status.js +14 -19
  382. package/node_modules/@imgly/codesign-server/dist/services/diagnostics/status.js.map +1 -1
  383. package/node_modules/@imgly/codesign-server/dist/services/diagnostics/tool.d.ts +2 -0
  384. package/node_modules/@imgly/codesign-server/dist/services/diagnostics/tool.d.ts.map +1 -1
  385. package/node_modules/@imgly/codesign-server/dist/services/diagnostics/tool.js +1 -0
  386. package/node_modules/@imgly/codesign-server/dist/services/diagnostics/tool.js.map +1 -1
  387. package/node_modules/@imgly/codesign-server/dist/services/engine/workspace-image-source.d.ts.map +1 -1
  388. package/node_modules/@imgly/codesign-server/dist/services/engine/workspace-image-source.js +4 -1
  389. package/node_modules/@imgly/codesign-server/dist/services/engine/workspace-image-source.js.map +1 -1
  390. package/node_modules/@imgly/codesign-server/dist/services/engine/workspace-source-module.d.ts +5 -1
  391. package/node_modules/@imgly/codesign-server/dist/services/engine/workspace-source-module.d.ts.map +1 -1
  392. package/node_modules/@imgly/codesign-server/dist/services/engine/workspace-source-module.js +67 -6
  393. package/node_modules/@imgly/codesign-server/dist/services/engine/workspace-source-module.js.map +1 -1
  394. package/node_modules/@imgly/codesign-server/dist/services/flags/manifest.js +2 -2
  395. package/node_modules/@imgly/codesign-server/dist/services/flags/manifest.js.map +1 -1
  396. package/node_modules/@imgly/codesign-server/dist/services/flags/release-flags.generated.d.ts +3 -3
  397. package/node_modules/@imgly/codesign-server/dist/services/flags/release-flags.generated.d.ts.map +1 -1
  398. package/node_modules/@imgly/codesign-server/dist/services/flags/release-flags.generated.js +3 -3
  399. package/node_modules/@imgly/codesign-server/dist/services/flags/release-flags.generated.js.map +1 -1
  400. package/node_modules/@imgly/codesign-server/dist/services/gateway-bearer.d.ts +15 -0
  401. package/node_modules/@imgly/codesign-server/dist/services/gateway-bearer.d.ts.map +1 -0
  402. package/node_modules/@imgly/codesign-server/dist/services/gateway-bearer.js +14 -0
  403. package/node_modules/@imgly/codesign-server/dist/services/gateway-bearer.js.map +1 -0
  404. package/node_modules/@imgly/codesign-server/dist/services/telemetry/error-policy.d.ts.map +1 -1
  405. package/node_modules/@imgly/codesign-server/dist/services/telemetry/error-policy.js +36 -0
  406. package/node_modules/@imgly/codesign-server/dist/services/telemetry/error-policy.js.map +1 -1
  407. package/node_modules/@imgly/codesign-server/dist/services/telemetry/usage-sink.d.ts +2 -2
  408. package/node_modules/@imgly/codesign-server/dist/services/telemetry/usage-sink.d.ts.map +1 -1
  409. package/node_modules/@imgly/codesign-server/dist/services/telemetry/usage-sink.js +3 -5
  410. package/node_modules/@imgly/codesign-server/dist/services/telemetry/usage-sink.js.map +1 -1
  411. package/node_modules/@imgly/codesign-server/dist/services/viewer/ai-plugin-assets.d.ts.map +1 -1
  412. package/node_modules/@imgly/codesign-server/dist/services/viewer/ai-plugin-assets.js +5 -4
  413. package/node_modules/@imgly/codesign-server/dist/services/viewer/ai-plugin-assets.js.map +1 -1
  414. package/node_modules/@imgly/codesign-server/dist/services/viewer/spa-assets.generated.d.ts.map +1 -1
  415. package/node_modules/@imgly/codesign-server/dist/services/viewer/spa-assets.generated.js +0 -64
  416. package/node_modules/@imgly/codesign-server/dist/services/viewer/spa-assets.generated.js.map +1 -1
  417. package/node_modules/@imgly/codesign-server/dist/services/viewer/url-builder.d.ts +4 -0
  418. package/node_modules/@imgly/codesign-server/dist/services/viewer/url-builder.d.ts.map +1 -1
  419. package/node_modules/@imgly/codesign-server/dist/services/viewer/url-builder.js +4 -0
  420. package/node_modules/@imgly/codesign-server/dist/services/viewer/url-builder.js.map +1 -1
  421. package/node_modules/@imgly/codesign-server/dist/services/viewer/workspace-source-route.d.ts.map +1 -1
  422. package/node_modules/@imgly/codesign-server/dist/services/viewer/workspace-source-route.js +2 -24
  423. package/node_modules/@imgly/codesign-server/dist/services/viewer/workspace-source-route.js.map +1 -1
  424. package/node_modules/@imgly/codesign-server/dist/services/workspace/asset-sidecars.d.ts +4 -2
  425. package/node_modules/@imgly/codesign-server/dist/services/workspace/asset-sidecars.d.ts.map +1 -1
  426. package/node_modules/@imgly/codesign-server/dist/services/workspace/asset-sidecars.js +15 -14
  427. package/node_modules/@imgly/codesign-server/dist/services/workspace/asset-sidecars.js.map +1 -1
  428. package/node_modules/@imgly/codesign-server/dist/services/workspace/asset-store.d.ts +12 -2
  429. package/node_modules/@imgly/codesign-server/dist/services/workspace/asset-store.d.ts.map +1 -1
  430. package/node_modules/@imgly/codesign-server/dist/services/workspace/asset-store.js +42 -12
  431. package/node_modules/@imgly/codesign-server/dist/services/workspace/asset-store.js.map +1 -1
  432. package/node_modules/@imgly/codesign-server/dist/services/workspace/assets-handlers.d.ts.map +1 -1
  433. package/node_modules/@imgly/codesign-server/dist/services/workspace/assets-handlers.js +1 -2
  434. package/node_modules/@imgly/codesign-server/dist/services/workspace/assets-handlers.js.map +1 -1
  435. package/node_modules/@imgly/codesign-server/dist/services/workspace/image-listing.d.ts.map +1 -1
  436. package/node_modules/@imgly/codesign-server/dist/services/workspace/image-listing.js +24 -2
  437. package/node_modules/@imgly/codesign-server/dist/services/workspace/image-listing.js.map +1 -1
  438. package/node_modules/@imgly/codesign-server/dist/services/workspace/layout-keys.d.ts +47 -0
  439. package/node_modules/@imgly/codesign-server/dist/services/workspace/layout-keys.d.ts.map +1 -0
  440. package/node_modules/@imgly/codesign-server/dist/services/workspace/layout-keys.js +167 -0
  441. package/node_modules/@imgly/codesign-server/dist/services/workspace/layout-keys.js.map +1 -0
  442. package/node_modules/@imgly/codesign-server/dist/services/workspace/layout.d.ts +2 -0
  443. package/node_modules/@imgly/codesign-server/dist/services/workspace/layout.d.ts.map +1 -1
  444. package/node_modules/@imgly/codesign-server/dist/services/workspace/layout.js +2 -0
  445. package/node_modules/@imgly/codesign-server/dist/services/workspace/layout.js.map +1 -1
  446. package/node_modules/@imgly/codesign-server/dist/services/workspace/object-store-fs.d.ts +32 -0
  447. package/node_modules/@imgly/codesign-server/dist/services/workspace/object-store-fs.d.ts.map +1 -0
  448. package/node_modules/@imgly/codesign-server/dist/services/workspace/object-store-fs.js +79 -0
  449. package/node_modules/@imgly/codesign-server/dist/services/workspace/object-store-fs.js.map +1 -0
  450. package/node_modules/@imgly/codesign-server/dist/services/workspace/object-store-workspace.d.ts +35 -0
  451. package/node_modules/@imgly/codesign-server/dist/services/workspace/object-store-workspace.d.ts.map +1 -0
  452. package/node_modules/@imgly/codesign-server/dist/services/workspace/object-store-workspace.js +185 -0
  453. package/node_modules/@imgly/codesign-server/dist/services/workspace/object-store-workspace.js.map +1 -0
  454. package/node_modules/@imgly/codesign-server/dist/services/workspace/object-store.d.ts +74 -0
  455. package/node_modules/@imgly/codesign-server/dist/services/workspace/object-store.d.ts.map +1 -0
  456. package/node_modules/@imgly/codesign-server/dist/services/workspace/object-store.js +82 -0
  457. package/node_modules/@imgly/codesign-server/dist/services/workspace/object-store.js.map +1 -0
  458. package/node_modules/@imgly/codesign-server/dist/services/workspace/types.d.ts +10 -0
  459. package/node_modules/@imgly/codesign-server/dist/services/workspace/types.d.ts.map +1 -1
  460. package/node_modules/@imgly/codesign-server/dist/services/workspace/types.js +1 -0
  461. package/node_modules/@imgly/codesign-server/dist/services/workspace/types.js.map +1 -1
  462. package/node_modules/@imgly/codesign-server/dist/services/workspace/write-atomic.d.ts.map +1 -1
  463. package/node_modules/@imgly/codesign-server/dist/services/workspace/write-atomic.js +5 -0
  464. package/node_modules/@imgly/codesign-server/dist/services/workspace/write-atomic.js.map +1 -1
  465. package/node_modules/@imgly/codesign-server/package.json +13 -11
  466. package/node_modules/@imgly/design-lint/dist/rules/text-legibility.d.ts +2 -1
  467. package/node_modules/@imgly/design-lint/dist/rules/text-legibility.d.ts.map +1 -1
  468. package/node_modules/@imgly/design-lint/dist/rules/text-legibility.js +5 -1
  469. package/node_modules/@imgly/design-lint/dist/rules/text-legibility.js.map +1 -1
  470. package/node_modules/@imgly/design-lint/package.json +2 -2
  471. package/node_modules/@imgly/figma-exporter/CHANGELOG.md +79 -0
  472. package/node_modules/@imgly/figma-exporter/LICENSE.md +137 -0
  473. package/node_modules/@imgly/figma-exporter/README.md +201 -0
  474. package/node_modules/@imgly/figma-exporter/THIRD_PARTY_NOTICES.md +475 -0
  475. package/node_modules/@imgly/figma-exporter/dist/index.cjs +1 -0
  476. package/node_modules/@imgly/figma-exporter/dist/index.d.cts +8833 -0
  477. package/node_modules/@imgly/figma-exporter/dist/index.d.ts +8833 -0
  478. package/node_modules/@imgly/figma-exporter/dist/index.js +1 -0
  479. package/node_modules/@imgly/figma-exporter/package.json +92 -0
  480. package/node_modules/@imgly/figma-importer/CHANGELOG.md +84 -0
  481. package/node_modules/@imgly/figma-importer/LICENSE.md +137 -0
  482. package/node_modules/@imgly/figma-importer/README.md +256 -0
  483. package/node_modules/@imgly/figma-importer/THIRD_PARTY_NOTICES.md +446 -0
  484. package/node_modules/@imgly/figma-importer/dist/index.cjs +2 -0
  485. package/node_modules/@imgly/figma-importer/dist/index.d.cts +12831 -0
  486. package/node_modules/@imgly/figma-importer/dist/index.d.ts +12831 -0
  487. package/node_modules/@imgly/figma-importer/dist/index.js +2 -0
  488. package/node_modules/@imgly/figma-importer/package.json +85 -0
  489. package/node_modules/@imgly/html-exporter/CHANGELOG.md +35 -0
  490. package/node_modules/@imgly/html-exporter/README.md +45 -4
  491. package/node_modules/@imgly/html-exporter/dist/index.cjs +610 -493
  492. package/node_modules/@imgly/html-exporter/dist/index.d.cts +235 -216
  493. package/node_modules/@imgly/html-exporter/dist/index.d.ts +235 -216
  494. package/node_modules/@imgly/html-exporter/dist/index.js +610 -493
  495. package/node_modules/@imgly/html-exporter/package.json +15 -10
  496. package/node_modules/@imgly/idml-exporter/CHANGELOG.md +10 -0
  497. package/node_modules/@imgly/idml-exporter/README.md +17 -18
  498. package/node_modules/@imgly/idml-exporter/dist/harfbuzz.browser.js +1 -1
  499. package/node_modules/@imgly/idml-exporter/dist/index.cjs +8 -11
  500. package/node_modules/@imgly/idml-exporter/dist/index.d.cts +14480 -10275
  501. package/node_modules/@imgly/idml-exporter/dist/index.d.ts +14480 -10275
  502. package/node_modules/@imgly/idml-exporter/dist/index.js +8 -10
  503. package/node_modules/@imgly/idml-exporter/dist/woff2.browser.js +14 -14
  504. package/node_modules/@imgly/idml-exporter/package.json +17 -12
  505. package/node_modules/@imgly/idml-importer/CHANGELOG.md +37 -0
  506. package/node_modules/@imgly/idml-importer/README.md +148 -17
  507. package/node_modules/@imgly/idml-importer/dist/index.cjs +6 -5
  508. package/node_modules/@imgly/idml-importer/dist/index.d.cts +1003 -632
  509. package/node_modules/@imgly/idml-importer/dist/index.d.ts +1003 -632
  510. package/node_modules/@imgly/idml-importer/dist/index.js +6 -5
  511. package/node_modules/@imgly/idml-importer/package.json +9 -9
  512. package/node_modules/@imgly/pdf-importer/CHANGELOG.md +59 -0
  513. package/node_modules/@imgly/pdf-importer/README.md +71 -7
  514. package/node_modules/@imgly/pdf-importer/dist/browser.d.ts +940 -788
  515. package/node_modules/@imgly/pdf-importer/dist/browser.js +17 -15
  516. package/node_modules/@imgly/pdf-importer/dist/node.cjs +17 -16
  517. package/node_modules/@imgly/pdf-importer/dist/node.d.cts +940 -788
  518. package/node_modules/@imgly/pdf-importer/dist/node.d.ts +940 -788
  519. package/node_modules/@imgly/pdf-importer/dist/node.js +17 -15
  520. package/node_modules/@imgly/pdf-importer/dist/pdf.worker.mjs +80265 -61990
  521. package/node_modules/@imgly/pdf-importer/package.json +13 -13
  522. package/node_modules/@imgly/psd-exporter/CHANGELOG.md +12 -0
  523. package/node_modules/@imgly/psd-exporter/README.md +50 -7
  524. package/node_modules/@imgly/psd-exporter/dist/index.cjs +5 -7
  525. package/node_modules/@imgly/psd-exporter/dist/index.d.cts +14332 -10063
  526. package/node_modules/@imgly/psd-exporter/dist/index.d.ts +14332 -10063
  527. package/node_modules/@imgly/psd-exporter/dist/index.js +5 -6
  528. package/node_modules/@imgly/psd-exporter/dist/wawoff2-LICENSE.txt +19 -0
  529. package/node_modules/@imgly/psd-exporter/dist/woff2.browser.js +19 -0
  530. package/node_modules/@imgly/psd-exporter/package.json +26 -9
  531. package/node_modules/@imgly/psd-importer/CHANGELOG.md +29 -1
  532. package/node_modules/@imgly/psd-importer/README.md +22 -30
  533. package/node_modules/@imgly/psd-importer/dist/index.cjs +11 -11
  534. package/node_modules/@imgly/psd-importer/dist/index.d.cts +10479 -12978
  535. package/node_modules/@imgly/psd-importer/dist/index.d.ts +10479 -12978
  536. package/node_modules/@imgly/psd-importer/dist/index.js +11 -11
  537. package/node_modules/@imgly/psd-importer/package.json +8 -11
  538. package/package.json +28 -17
  539. package/node_modules/@imgly/pdf-importer/dist/browser.d.cts +0 -941
@@ -1,69 +1,109 @@
1
- // Generated by dts-bundle-generator v9.5.1
2
-
3
- import CreativeEngine from '@cesdk/engine';
4
- import { AssetAPI, AssetFilter, Font, FontStyle, FontWeight, Typeface } from '@cesdk/engine';
5
-
6
- type WarningSeverity = "error" | "warning" | "info";
1
+ import CreativeEngine, { AssetAPI, Font, Typeface } from "@cesdk/engine";
2
+ /**
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
- /** Default + sole severity. Call sites do not override. */
9
- severity: WarningSeverity;
10
- /**
11
- * Template with `{name}` placeholders. Renderer throws if a placeholder
12
- * has no matching key in `params` — guards against silent typos.
13
- */
14
- template: string;
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
- /** Stable machine-readable identifier — never rename once shipped. */
18
- code: TCode;
19
- /** Inherited from the code definition. */
20
- type: WarningSeverity;
21
- /** Human-readable rendered string. */
22
- message: string;
23
- /** Raw structured fields — superset of all `{name}` placeholders. */
24
- params: Record<string, unknown>;
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
- declare class Logger<R extends Record<string, WarningDefinition>> {
27
- private readonly registry;
28
- private messages;
29
- constructor(registry: R);
30
- emit<K extends keyof R & string>(code: K, params?: Record<string, unknown>): void;
31
- getMessages(): LogMessage<keyof R & string>[];
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
- type AssetQueryAPI = Pick<AssetAPI, "findAllSources" | "addLocalAssetSourceFromJSONURI" | "findAssets"> & Partial<Pick<AssetAPI, "fetchAsset">>;
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
- asset: AssetQueryAPI;
75
+ asset: AssetQueryAPI;
36
76
  };
37
- export interface TypefaceParams {
38
- family: string;
39
- style?: Font["style"];
40
- weight?: Font["weight"];
77
+ interface TypefaceParams {
78
+ family: string;
79
+ style?: Font['style'];
80
+ weight?: Font['weight'];
41
81
  }
42
- export interface FontResolverOptions {
43
- /**
44
- * When the requested weight is not available in the matched typeface,
45
- * pick the closest available weight using the CSS Font Matching algorithm.
46
- * Defaults to false — return null instead so the caller can decide what
47
- * to do (e.g. log a warning, use a different font).
48
- *
49
- * Only enable when the typeface name is known to be a good match. The
50
- * typeface query uses fuzzy matching, so applying weight fallback to a
51
- * poor name match can silently produce wildly wrong results.
52
- */
53
- closestWeightMatch?: boolean;
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
- export interface FontResolverResult {
56
- typeface: Typeface;
57
- font: Font;
58
- /**
59
- * Set to the originally requested family name when the typeface came from
60
- * the proprietary-fallbacks source (e.g. requested "Helvetica", got Roboto).
61
- * Undefined when the family matched the main Google Fonts catalog directly.
62
- * Always populated when applicable; consumers may ignore it.
63
- */
64
- substitutedFrom?: string;
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
- export type TypefaceResolver = (params: TypefaceParams, engine: AssetEngine, options?: FontResolverOptions) => Promise<FontResolverResult | null>;
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
- readonly TEXT_JUSTIFICATION_UNSUPPORTED: {
79
- readonly severity: "warning";
80
- readonly template: "{justification} cannot be represented by this engine for the paragraph's direction. Using {alignment} alignment without justified word spacing.";
81
- };
82
- readonly DECORATION_UL_METRICS_UNAVAILABLE: {
83
- readonly severity: "warning";
84
- readonly template: "Underline font metrics were unavailable; custom weight and offset were replaced by the font defaults.";
85
- };
86
- readonly TEXT_STROKE_MIXED_UNSUPPORTED: {
87
- readonly severity: "warning";
88
- readonly template: "Different character outlines cannot be represented by one CE.SDK text stroke; the outlines were omitted.";
89
- };
90
- readonly EMBEDDED_PARSE_FAILED: {
91
- readonly severity: "warning";
92
- readonly template: "Embedded {format} could not be parsed ({reason}). The element was skipped.";
93
- };
94
- readonly EMBEDDED_PAGE_FAILED: {
95
- readonly severity: "warning";
96
- readonly template: "Embedded {format} page {pageNumber} could not be imported ({reason}). The element was skipped.";
97
- };
98
- readonly EMBEDDED_IMPORTER_THREW: {
99
- readonly severity: "error";
100
- readonly template: "Embedded {format} importer threw an unexpected error ({reason}). The element was skipped.";
101
- };
102
- readonly EMBEDDED_IMPORTER_FORWARDED: {
103
- readonly severity: "warning";
104
- readonly template: "{message}";
105
- };
106
- readonly EMBEDDED_EPS_UNSUPPORTED: {
107
- readonly severity: "warning";
108
- readonly template: "This element contains embedded EPS data, which is not supported. A placeholder image will be shown instead.";
109
- };
110
- readonly LINKED_IMAGE_UNSUPPORTED: {
111
- readonly severity: "warning";
112
- readonly template: "Linked images are not supported yet. Please embed all images inside the idml file.";
113
- };
114
- readonly IMAGE_LOAD_FAILED: {
115
- readonly severity: "warning";
116
- readonly template: "Image \"{imageUri}\" could not be loaded. The image will be missing from the imported design.";
117
- };
118
- readonly GRADIENT_MIDPOINT_APPROX: {
119
- readonly severity: "warning";
120
- 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.";
121
- };
122
- readonly GRADIENT_SPOT_COLOR_APPROX: {
123
- readonly severity: "warning";
124
- readonly template: "Gradient \"{key}\" uses spot colors. Its stops were converted to RGB previews because spot inks cannot be preserved in gradient fills.";
125
- };
126
- readonly GRADIENT_STOP_UNKNOWN_COLOR: {
127
- readonly severity: "warning";
128
- readonly template: "Gradient stop references unknown color \"{color}\". Using black as the default.";
129
- };
130
- readonly GRADIENT_FEATHER_UNSUPPORTED: {
131
- readonly severity: "warning";
132
- readonly template: "Gradient feather effect is not supported. The feather was removed.";
133
- };
134
- readonly PAINT_OPACITY_UNSUPPORTED: {
135
- readonly severity: "warning";
136
- readonly template: "{paint} opacity could not be applied to a spot or CMYK color without losing its color identity. The paint opacity was removed.";
137
- };
138
- readonly FONT_DEFAULT: {
139
- readonly severity: "warning";
140
- readonly template: "Font \"{family}\" is not available. The default font will be used. To preserve the original font, add it to the font library.";
141
- };
142
- readonly FONT_SUBSTITUTED: {
143
- readonly severity: "warning";
144
- readonly template: "Font \"{substitutedFrom}\" is not available. Substituting with \"{substitutedTo}\".";
145
- };
146
- readonly STORY_SPLIT: {
147
- readonly severity: "info";
148
- readonly template: "A story that spanned multiple text frames was split into multiple text blocks.";
149
- };
150
- readonly TEXT_LEADING_APPROX: {
151
- readonly severity: "warning";
152
- 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.";
153
- };
154
- readonly TEXT_AUTOSIZING_UNSUPPORTED: {
155
- readonly severity: "warning";
156
- readonly template: "Text frame autosizing is unsupported ({reason}). The declared fixed frame is retained.";
157
- };
158
- readonly TEXT_AUTOSIZING_PAINT_FIXED: {
159
- readonly severity: "warning";
160
- readonly template: "Text frame autosizing was applied to editable text. Resizing its frame paint is unsupported; the original painted frame is retained.";
161
- };
162
- readonly TEXT_VERTICAL_ALIGN_DEFAULT: {
163
- readonly severity: "warning";
164
- readonly template: "Justified vertical alignment is not supported. Using top alignment.";
165
- };
166
- readonly TEXT_FRAME_LOOP: {
167
- readonly severity: "warning";
168
- readonly template: "A loop was detected in linked text frames. The chain was broken to prevent infinite processing.";
169
- };
170
- readonly TEXT_FRAME_ORDER_MISMATCH: {
171
- readonly severity: "warning";
172
- readonly template: "Text frame ordering mismatch: {orderedCount} of {totalCount} frames could be ordered. Some text frames may appear out of order.";
173
- };
174
- readonly TEXT_FRAME_APPLY_FAILED: {
175
- readonly severity: "warning";
176
- readonly template: "Text content could not be applied to a text block. The text may be incomplete.";
177
- };
178
- readonly LIST_NUMBERING_DEFAULT: {
179
- readonly severity: "warning";
180
- readonly template: "Numbered list format \"{numberingFormat}\" is not supported. Using default numbering (1, 2, 3).";
181
- };
182
- readonly LINE_INSUFFICIENT_POINTS: {
183
- readonly severity: "warning";
184
- readonly template: "A line element has fewer than 2 points and was skipped.";
185
- };
186
- readonly LINE_NO_STROKE_WEIGHT: {
187
- readonly severity: "warning";
188
- readonly template: "A line element has no stroke weight defined. The line may not be visible.";
189
- };
190
- readonly LINE_GRADIENT_STROKE_STYLE_UNSUPPORTED: {
191
- readonly severity: "warning";
192
- 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.";
193
- };
194
- readonly BLEND_MODE_UNSUPPORTED: {
195
- readonly severity: "warning";
196
- readonly template: "Blend mode \"{blendMode}\" is not supported by CE.SDK and was ignored.";
197
- };
198
- readonly FILL_COLOR_UNKNOWN: {
199
- readonly severity: "warning";
200
- readonly template: "Fill color \"{fillColor}\" is not defined in the document color swatches. The element may appear without a fill.";
201
- };
202
- readonly SHADOW_SPREAD_REMOVED: {
203
- readonly severity: "warning";
204
- readonly template: "Drop shadow spread ({spread}%) is not supported. The spread was removed.";
205
- };
206
- readonly SHADOW_BLEND_MODE_DEFAULT: {
207
- readonly severity: "warning";
208
- readonly template: "Drop shadow blend mode \"{blendMode}\" is not supported. Using \"Multiply\" as the default.";
209
- };
210
- readonly SHADOW_NOISE_REMOVED: {
211
- readonly severity: "warning";
212
- readonly template: "Drop shadow noise ({noise}%) is not supported. The noise was removed.";
213
- };
214
- readonly BORDER_RADIUS_NON_RECT_IGNORED: {
215
- readonly severity: "warning";
216
- readonly template: "Border radius on a non-rectangle shape was ignored. Border radius is only supported on rectangles.";
217
- };
218
- readonly DECORATION_STYLE_MISMATCH: {
219
- readonly severity: "warning";
220
- readonly template: "Underline and strikethrough have different stroke styles. The underline style will be used for both.";
221
- };
222
- readonly DECORATION_UL_OFFSET_APPROX: {
223
- readonly severity: "warning";
224
- readonly template: "Underline offset conversion is approximate. Positioning may differ from InDesign.";
225
- };
226
- readonly DECORATION_UL_GAP_COLOR: {
227
- readonly severity: "warning";
228
- readonly template: "Underline gap color is not supported. The gap will be transparent.";
229
- };
230
- readonly DECORATION_ST_COLOR: {
231
- readonly severity: "warning";
232
- readonly template: "Custom strikethrough color is not supported. The text color will be used.";
233
- };
234
- readonly DECORATION_ST_WEIGHT: {
235
- readonly severity: "warning";
236
- readonly template: "Custom strikethrough weight is not supported. The default weight will be used.";
237
- };
238
- readonly DECORATION_ST_OFFSET: {
239
- readonly severity: "warning";
240
- readonly template: "Custom strikethrough offset is not supported. The default offset will be used.";
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$1 = LogMessage<keyof typeof WARNING_CODES>;
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$1 = Logger<typeof WARNING_CODES>;
250
- declare const Logger$1: new () => Logger$1;
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` via `dts-bundle-generator`, which inlines a
259
- * private-brand copy of `CreativeEngine`. Importing those classes
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
- export interface EmbeddedBlockLoader {
266
- loadAsBlocks(opts?: {
267
- pageIndex?: number;
268
- }): Promise<{
269
- blocks: number[];
270
- logger: {
271
- getMessages(): Array<{
272
- code: string;
273
- type: string;
274
- message: string;
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): `dts-bundle-generator` inlines a private-brand copy of
288
- * `CreativeEngine` into every published format-parser `.d.ts`, so the
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
- export interface EmbeddedFormatParser<E = CreativeEngine> {
306
- fromFile(engine: E, file: Blob | ArrayBuffer, options?: {
307
- fontResolver?: unknown;
308
- pageBounds?: unknown;
309
- }): Promise<EmbeddedBlockLoader>;
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
- export interface EmbeddedImporterContext {
312
- /** CE.SDK engine to emit blocks into. */
313
- engine: CreativeEngine;
314
- /**
315
- * Shared font resolver. PDF text runs and PSD text layers both want
316
- * Google Fonts substitution for non-embeddable fonts; routing through
317
- * one resolver gives consistent behavior across formats.
318
- */
319
- fontResolver: TypefaceResolver;
320
- /**
321
- * IDML logger. Adapters forward their own importer's structured
322
- * warnings into this so users see one unified diagnostic stream.
323
- */
324
- logger: Logger$1;
325
- /**
326
- * The IDML page element the embedded content lives on. Adapters need
327
- * this to compute the inner content's display placement on the page —
328
- * specifically, the page's `ItemTransform` and `GeometricBounds`
329
- * convert spread coords to page-local coords during transform
330
- * composition.
331
- */
332
- page: Element;
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
- export interface EmbeddedContentPlacementResult {
354
- /**
355
- * Composed scale (rect-ancestors × inner-content) to apply via
356
- * `engine.block.scale(block, scale)` — propagates to children through
357
- * the block's transform, unlike `setWidth`/`setHeight` which only
358
- * touch a group's bbox metadata.
359
- */
360
- scale: number;
361
- /**
362
- * Top-left of the displayed content in IDML page-local coordinates,
363
- * in points. Already includes contributions from every ancestor
364
- * `ItemTransform` (rect, any `<Group>` wrappers, the inner content
365
- * element itself), so the caller just divides by points-per-inch
366
- * and feeds it to `engine.block.setPositionX/Y`.
367
- *
368
- * Why pre-composed and not "rect-relative offset": rotated rectangles
369
- * make rect-relative-offset math wrong — the offset is in pre-rotation
370
- * rect-local coords, but the caller would add it as if it were
371
- * page-aligned. Composing the full transform chain in the adapter and
372
- * exposing page-local coords makes the math unambiguous.
373
- */
374
- pageX: number;
375
- pageY: number;
376
- /** Composed rotation in radians, in `[0, 2π)`. */
377
- rotation: number;
378
- /** Composed horizontal flip flag. */
379
- flipHorizontal: boolean;
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
- export interface EmbeddedImporterResult {
382
- /** Detached CE.SDK block id (typically a group). */
383
- block: number;
384
- /**
385
- * Optional placement override. When present, the IDML caller positions
386
- * and scales the block per these values; when absent, the caller falls
387
- * back to setWidth/setHeight from the IDML frame's bounds (which is
388
- * appropriate only for content that naturally fills its frame).
389
- */
390
- placement?: EmbeddedContentPlacementResult;
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
- export interface EmbeddedImporter {
393
- /**
394
- * Format slug used in user-facing warning messages, e.g. "PDF", "PSD".
395
- * Does not need to be a stable machine-readable identifier; it's purely
396
- * for log messages like "Embedded PDF could not be parsed".
397
- */
398
- readonly format: string;
399
- /**
400
- * Cheap, synchronous probe over the IDML element. MUST NOT trigger any
401
- * dynamic imports — the IDML parser calls this for every graphic frame
402
- * before deciding whether to load the heavy parser.
403
- */
404
- canHandle(element: Element): boolean;
405
- /**
406
- * Parse the embedded payload and return one detached CE.SDK block (a
407
- * CE.SDK group block, typically) plus optional placement metadata.
408
- * Return null on graceful failure — after logging the why — so the
409
- * IDML caller can fall through to the existing image-fill /
410
- * default-fill paths.
411
- *
412
- * The returned block must be detached (`engine.block.appendChild` not
413
- * called yet) — the IDML caller decides where it goes in the layer
414
- * hierarchy and how it gets sized/positioned.
415
- */
416
- loadBlock(ctx: EmbeddedImporterContext, element: Element): Promise<EmbeddedImporterResult | null>;
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
- private engine;
443
- private scene;
444
- private idml;
445
- private useLabAlternates;
446
- private fontResolver;
447
- private colors;
448
- private gradients;
449
- private spreads;
450
- private logger;
451
- private fontMetricsCache;
452
- private loggedFontSubstitutions;
453
- private embeddedImporters;
454
- private constructor();
455
- private defaultFontPromise?;
456
- private getDefaultFont;
457
- /**
458
- * Resolve a font's metrics. Font metrics are required to map InDesign
459
- * leading / spacing into CE.SDK's font-relative model, so a failure here is
460
- * fatal — we throw rather than silently producing wrong line heights.
461
- */
462
- private loadFontMetrics;
463
- /**
464
- * Convert an InDesign leading multiplier (leading / font size, or the
465
- * Auto-leading percentage) into the CE.SDK `text/lineHeight` multiplier for
466
- * a given font. InDesign measures leading as an absolute distance based on
467
- * the full ascender-to-descender span and ignores the font's line gap, so we
468
- * first divide by the font's `(ascender - descender) / unitsPerEm` factor
469
- * (`adjustLineHeight`). Since CE.SDK 1.73 the default layout folds the line
470
- * gap into the line slot, so when `features/fontLineGapEnabled` is on we
471
- * additionally cancel that gap (`convertLineHeightToLineGapModel`).
472
- *
473
- * The conversion is font-metric-specific, which is exactly why each
474
- * paragraph must be converted with its own font's metrics rather than the
475
- * block's first run.
476
- */
477
- private toLineHeightMultiplier;
478
- /**
479
- * Apply a line-height multiplier to each paragraph of a text block from its
480
- * own InDesign leading and font, using the CE.SDK >= 1.76
481
- * `setTextLineHeight(block, value, paragraphIndex)` API. The caller has
482
- * already set the block-level default, so this only overrides paragraphs
483
- * whose leading the importer can resolve.
484
- *
485
- * @returns `true` if any single paragraph still can't be reproduced exactly —
486
- * i.e. it combines explicit leading with mixed font sizes *within that
487
- * paragraph*. One line-height multiplier per paragraph cannot match an
488
- * absolute point leading across different sizes on the same line, so the
489
- * caller should emit `TEXT_LEADING_APPROX`. Cross-paragraph size
490
- * differences are NOT approximate here — each paragraph gets its own
491
- * leading — so they no longer warn.
492
- */
493
- private applyPerParagraphLineHeight;
494
- /**
495
- * Instantiate a new IDMLParser from a File or Blob.
496
- *
497
- * @param engine The CreativeEngine instance to emit blocks into.
498
- * @param file The IDML file (`Blob`, `File`, or `ArrayBuffer`).
499
- * @param DOMParser An XML parser implementation. Use the browser's
500
- * native `DOMParser` in the browser, `JSDOM` in Node.
501
- * @param options
502
- * @param options.fontResolver A function that resolves the font URI
503
- * from the font name and style. Defaults to the bundled Google
504
- * Fonts resolver.
505
- * @param options.embeddedImporters Adapters for foreign-format
506
- * payloads embedded in IDML graphic frames (PDF today; PSD / EPS
507
- * in the future). Defaults to `[]` — no embedded-format import,
508
- * embeds fall through to placeholder. Register adapters explicitly
509
- * to opt in:
510
- *
511
- * ```ts
512
- * import { PDFParser } from "@imgly/pdf-importer";
513
- * import {
514
- * IDMLParser,
515
- * createPdfEmbeddedImporter,
516
- * } from "@imgly/idml-importer";
517
- *
518
- * await IDMLParser.fromFile(engine, file, DOMParser, {
519
- * embeddedImporters: [createPdfEmbeddedImporter(PDFParser)],
520
- * });
521
- * ```
522
- *
523
- * @returns A new IDMLParser instance.
524
- */
525
- static fromFile(engine: CreativeEngine, file: Blob | File | ArrayBuffer, DOMParser: any, options?: {
526
- fontResolver?: TypefaceResolver;
527
- embeddedImporters?: readonly EmbeddedImporter[];
528
- }): Promise<IDMLParser>;
529
- /**
530
- * @deprecated Use the options-object overload:
531
- * `IDMLParser.fromFile(engine, file, DOMParser, { fontResolver })`.
532
- */
533
- static fromFile(engine: CreativeEngine, file: Blob | File | ArrayBuffer, DOMParser: any, fontResolver: TypefaceResolver): Promise<IDMLParser>;
534
- parse(): Promise<{
535
- scene: number;
536
- logger: Logger$1;
537
- }>;
538
- /** Apply declared independent-axis autosizing while this frame is a page child. */
539
- private applyAuthoredAutosizing;
540
- private getSpreads;
541
- private getBleedMargins;
542
- private generatePagesFromSpreads;
543
- private processMultiFrameStories;
544
- /**
545
- * Loop over the page elements and render the CESDK blocks based on the element type
546
- *
547
- * @param element The page element
548
- * @param spread The page element's parent page
549
- * @param pageBlock The page block to append the rendered blocks to
550
- * @returns An array of the rendered blocks
551
- */
552
- private renderPageElements;
553
- private createStyledGroup;
554
- /**
555
- * Parses the name of an IDML element and applies it to a CE.SDK block
556
- *
557
- * @param element The IDML element
558
- * @param block The CE.SDK block
559
- * @returns void
560
- */
561
- private copyElementName;
562
- /**
563
- * Parses the fill styles of an IDML element and applies them to a CESDK block
564
- *
565
- * @param block The CESDK block to apply the fill to
566
- * @param ctx The style context for the IDML element
567
- * @param attributeName The name of the attribute to use as the fill color
568
- * @returns void
569
- */
570
- private applyFill;
571
- /**
572
- * Creates a graphic rect block with a stroke outline and no fill.
573
- * InDesign TextFrame strokes are borders around the frame rectangle,
574
- * but CE.SDK text strokes outline individual glyphs. This helper creates
575
- * a separate graphic block to faithfully represent the frame border.
576
- *
577
- * @param scale The element's combined transform scale, forwarded to
578
- * applyBorderRadius so corner radii stay proportional to the block size.
579
- */
580
- private createStrokeRectBlock;
581
- /**
582
- * Parses the stroke styles of an IDML element and applies them to a CESDK block
583
- *
584
- * @param block The CESDK block to apply the stroke to
585
- * @param ctx The style context for the IDML element
586
- * @returns void
587
- */
588
- private getStrokeStyle;
589
- private applyStroke;
590
- /**
591
- * Parses the transparency styles of an IDML element and applies them to a CESDK block
592
- *
593
- * @param block The CESDK block to apply the transparency to
594
- * @param ctx The style context for the IDML element
595
- * @returns void
596
- */
597
- private applyTransparency;
598
- private consumedGradientFeathers;
599
- /** Fill/stroke target opacity is independent of the object's opacity. */
600
- private applyPaintOpacity;
601
- /**
602
- * Maps an element's Gradient Feather onto its gradient fill's stop alphas
603
- * when both share the gradient type (the shape @imgly/idml-exporter
604
- * writes). CE.SDK gradients carry per-stop alpha, so a feather whose
605
- * geometry matches the fill is exactly a stop-alpha ramp. Feathers of a
606
- * different type keep the unsupported-warning path.
607
- */
608
- private applyGradientFeatherAlpha;
609
- /**
610
- * Parses the drop shadow settings of an IDML element and applies them to a CESDK block.
611
- *
612
- * @param block The CESDK block to apply the drop shadow to
613
- * @param transparencySetting The TransparencySetting element containing the DropShadowSetting
614
- */
615
- private applyDropShadow;
616
- /**
617
- * Iterates the configured `embeddedImporters` until one matches the
618
- * IDML element. The matched importer parses the embedded payload (PDF,
619
- * future PSD, etc.) and returns ONE detached CE.SDK block plus
620
- * (optionally) placement metadata derived from the format's own inner
621
- * transform. We append the block to the IDML page and apply the
622
- * placement so it lands at the right size and position.
623
- *
624
- * Two placement paths:
625
- *
626
- * 1. **Inner-transform-aware** (preferred, when the adapter returns
627
- * `placement`): use `engine.block.scale(...)` for the format's own
628
- * scale factor — this propagates to children via the block's
629
- * transform, unlike `setWidth`. Position is composed from the IDML
630
- * rectangle's page-local position plus the inner transform's
631
- * rectangle-local offset.
632
- *
633
- * 2. **Frame-bounds fallback** (when `placement` is undefined): set
634
- * block bounds to the IDML rectangle's bounds. This is correct for
635
- * image-fill-like formats whose content always fills the frame
636
- * naturally; less correct for format groups whose natural size may
637
- * differ from the frame.
638
- *
639
- * Adapters fail gracefully — on parse error / missing peer dependency
640
- * they log a warning and return null, in which case we either try the
641
- * next importer or fall through to the existing image-fill /
642
- * default-fill paths.
643
- *
644
- * Limitations (v1):
645
- * - No clipping to non-rectangular `<PathGeometry>` frames — content
646
- * that overflows the frame's bounds renders without a mask.
647
- * - Format-specific IDML attributes that aren't readable from the
648
- * payload alone (e.g. `<PDFAttribute PDFCrop>`) are not applied.
649
- *
650
- * @returns true if any importer handled the element, false otherwise.
651
- */
652
- /**
653
- * Runs the embedded-format adapter chain for this element. On success,
654
- * appends the imported block right after `frameBlock` in its parent's
655
- * children list (so z-order matches IDML XML order) and returns the
656
- * imported block id so the caller can include it in any enclosing
657
- * `<Group>` rendering — without that, the imported content gets
658
- * orphaned in `pageBlock` while the frame moves into the IDML group.
659
- *
660
- * Returns null when no adapter handled the element (callers should
661
- * fall through to image-fill / default-fill paths).
662
- */
663
- private tryEmbeddedImport;
664
- /**
665
- * Applies the format-specific inner transform to the block.
666
- *
667
- * The adapter pre-composes the full transform chain (every ancestor
668
- * `ItemTransform` from the inner content element up to the spread)
669
- * and exposes the result as page-local pageX/pageY plus rotation /
670
- * scale / flip. We only have to convert points to inches and call
671
- * the engine.
672
- *
673
- * Why scale via `engine.block.scale` and not `setWidth/setHeight`:
674
- * `setWidth` only resizes the group's bbox metadata; children don't
675
- * scale. `block.scale` writes the factor into the block's transform,
676
- * which propagates correctly to all descendants.
677
- */
678
- private applyEmbeddedPlacement;
679
- /**
680
- * Apply a frame's canonical T * R * S placement to an attached block.
681
- * IDML decomposition represents reflections as a horizontal flip plus
682
- * rotation. The engine flip setter reflects in world coordinates and
683
- * changes rotation/origin, so apply the flip before setting the final
684
- * rotation and origin. The parsed x subtracts width for a reflected
685
- * frame; undo that adjustment to recover the matrix's local origin.
686
- * Also used as the frame-bounds fallback for embedded content.
687
- */
688
- private applyFrameLayout;
689
- /**
690
- * Parses the image fill of an IDML element and applies it to a CESDK block
691
- * @param block The CESDK block to apply the image fill to
692
- * @param element The IDML element
693
- * @returns Promise<boolean> True if the image fill was applied, false otherwise
694
- */
695
- private applyImageFill;
696
- /**
697
- * Extracts the image content transform from the IDML Image element's ItemTransform
698
- * and applies it as CE.SDK crop parameters (rotation, scale, translation).
699
- *
700
- * In IDML, the Image element inside a frame has its own ItemTransform [a,b,c,d,tx,ty]
701
- * that maps image pixel coordinates to the frame's local point coordinates.
702
- * The FrameFittingOption crop values define how far the image extends beyond
703
- * (positive) or falls short of (negative) the frame edges.
704
- */
705
- private applyImageContentTransform;
706
- /**
707
- * Parses the corner radius of an IDML element and applies it to a CESDK block.
708
- *
709
- * @param block The CESDK block to apply the corner radius to
710
- * @param ctx The style context for the IDML element
711
- * @param scale The element's combined transform scale factor. IDML corner
712
- * radii are in the element's local coordinate space (points), but the
713
- * block's width/height have already been scaled by the transform. The
714
- * radius must be scaled by the same factor to remain proportional.
715
- */
716
- private applyBorderRadius;
717
- /**
718
- * Creates a graphic block with a vector_path shape from the parent element's
719
- * PathGeometry, suitable for use as a clipping mask with engine.block.combine().
720
- */
721
- private createClipMaskBlock;
722
- /**
723
- * Clips a child block to the parent element's shape using boolean intersection.
724
- * Preserves pre-existing crop transforms on image blocks.
725
- * For group blocks, recursively clips each child in the group.
726
- */
727
- private applyClipMask;
728
- /**
729
- * Extracts the line height multiplier from IDML paragraph/character style elements.
730
- * Leading can be specified as an explicit value in points or as "Auto".
731
- *
732
- * @param paragraphStyleRange - The ParagraphStyleRange element from the story
733
- * @param appliedParagraphStyle - The resolved ParagraphStyle from Styles.xml
734
- * @returns The line height as a multiplier and whether it's auto-based leading
735
- */
736
- private getLineHeightFromIDML;
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 };