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