@capyclaw/ppt-suite 2.4.10 → 2.5.68

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 (651) hide show
  1. package/README.md +45 -42
  2. package/composition.lock.json +46 -70
  3. package/contract/ppt-contract.json +310 -11
  4. package/cordis.patch.yml +5 -25
  5. package/dsh-suite.json +108 -194
  6. package/lib/index.mjs +1 -1
  7. package/node_modules/@capyclaw/asset-service/README.md +48 -0
  8. package/node_modules/@capyclaw/asset-service/cordis.patch.yml +4 -0
  9. package/node_modules/@capyclaw/asset-service/dsh-suite.json +29 -0
  10. package/node_modules/@capyclaw/asset-service/lib/host.mjs +14 -0
  11. package/node_modules/@capyclaw/asset-service/package.json +59 -0
  12. package/node_modules/@capyclaw/asset-service/src/index.mjs +304 -0
  13. package/node_modules/@capyclaw/document-workbench/README.md +125 -0
  14. package/node_modules/@capyclaw/document-workbench/package.json +44 -0
  15. package/node_modules/@capyclaw/document-workbench/src/bridge/index.mjs +321 -0
  16. package/node_modules/@capyclaw/document-workbench/src/client/index.mjs +625 -0
  17. package/node_modules/@capyclaw/document-workbench/src/client/screenshot.mjs +98 -0
  18. package/node_modules/@capyclaw/document-workbench/src/index.mjs +9 -0
  19. package/node_modules/@capyclaw/document-workbench/src/model/audit.mjs +101 -0
  20. package/node_modules/@capyclaw/document-workbench/src/model/conformance.mjs +92 -0
  21. package/node_modules/@capyclaw/document-workbench/src/model/ids.mjs +56 -0
  22. package/node_modules/@capyclaw/document-workbench/src/model/index.mjs +18 -0
  23. package/node_modules/@capyclaw/document-workbench/src/model/locate.mjs +118 -0
  24. package/node_modules/@capyclaw/document-workbench/src/model/manifest.mjs +148 -0
  25. package/node_modules/@capyclaw/document-workbench/src/model/ops.mjs +160 -0
  26. package/node_modules/@capyclaw/document-workbench/src/model/validate.mjs +72 -0
  27. package/node_modules/@capyclaw/document-workbench/src/ops/index.mjs +93 -0
  28. package/node_modules/@capyclaw/document-workbench/src/session/context.mjs +103 -0
  29. package/node_modules/@capyclaw/document-workbench/src/session/index.mjs +394 -0
  30. package/node_modules/@capyclaw/document-workbench/src/session/lease.mjs +105 -0
  31. package/node_modules/@capyclaw/document-workbench/src/session/mode.mjs +80 -0
  32. package/node_modules/@capyclaw/document-workbench/src/session/sanitize.mjs +107 -0
  33. package/node_modules/@capyclaw/document-workbench/src/session/state.mjs +159 -0
  34. package/node_modules/@capyclaw/document-workbench/src/session/watch.mjs +63 -0
  35. package/node_modules/@capyclaw/document-workbench/src/store/file-backend.mjs +158 -0
  36. package/node_modules/@capyclaw/document-workbench/src/testing/index.mjs +75 -0
  37. package/node_modules/@capyclaw/editor-host/README.md +37 -0
  38. package/node_modules/@capyclaw/editor-host/cordis.patch.yml +4 -0
  39. package/node_modules/@capyclaw/editor-host/dsh-suite.json +29 -0
  40. package/node_modules/@capyclaw/editor-host/lib/host.mjs +14 -0
  41. package/node_modules/@capyclaw/editor-host/package.json +59 -0
  42. package/node_modules/@capyclaw/editor-host/src/index.mjs +164 -0
  43. package/node_modules/@capyclaw/foundation/README.md +51 -0
  44. package/node_modules/@capyclaw/foundation/abi/bridge.mjs +86 -0
  45. package/node_modules/@capyclaw/foundation/abi/errors.mjs +63 -0
  46. package/node_modules/@capyclaw/foundation/abi/index.mjs +35 -0
  47. package/node_modules/@capyclaw/foundation/abi/kinds.mjs +271 -0
  48. package/node_modules/@capyclaw/foundation/abi/loader.mjs +345 -0
  49. package/node_modules/@capyclaw/foundation/abi/schema.mjs +98 -0
  50. package/node_modules/@capyclaw/foundation/abi/spec.mjs +255 -0
  51. package/node_modules/@capyclaw/foundation/abi/validate.mjs +24 -0
  52. package/node_modules/@capyclaw/foundation/abi/version.mjs +82 -0
  53. package/node_modules/@capyclaw/foundation/cordis.patch.yml +5 -0
  54. package/node_modules/@capyclaw/foundation/kit/index.mjs +6 -0
  55. package/node_modules/@capyclaw/foundation/lib/adapters/client-panel.mjs +98 -0
  56. package/node_modules/@capyclaw/foundation/lib/adapters/host-event.mjs +35 -0
  57. package/node_modules/@capyclaw/foundation/lib/adapters/http-router.mjs +69 -0
  58. package/node_modules/@capyclaw/foundation/lib/adapters/lifecycle-hook.mjs +55 -0
  59. package/node_modules/@capyclaw/foundation/lib/adapters/own-server.mjs +113 -0
  60. package/node_modules/@capyclaw/foundation/lib/adapters/raw.mjs +69 -0
  61. package/node_modules/@capyclaw/foundation/lib/adapters/runtime-driver.mjs +120 -0
  62. package/node_modules/@capyclaw/foundation/lib/adapters/service-provider.mjs +77 -0
  63. package/node_modules/@capyclaw/foundation/lib/adapters/skill-provider.mjs +56 -0
  64. package/node_modules/@capyclaw/foundation/lib/adapters/tool-provider.mjs +50 -0
  65. package/node_modules/@capyclaw/foundation/lib/adapters/ui-panel.mjs +64 -0
  66. package/node_modules/@capyclaw/foundation/lib/ctx-service.mjs +42 -0
  67. package/node_modules/@capyclaw/foundation/lib/host/caps.mjs +34 -0
  68. package/node_modules/@capyclaw/foundation/lib/host/contract.mjs +85 -0
  69. package/node_modules/@capyclaw/foundation/lib/host/dsh.mjs +50 -0
  70. package/node_modules/@capyclaw/foundation/lib/host/memory.mjs +160 -0
  71. package/node_modules/@capyclaw/foundation/lib/host.mjs +23 -0
  72. package/node_modules/@capyclaw/foundation/lib/kernel.mjs +185 -0
  73. package/node_modules/@capyclaw/foundation/lib/skill/scan.mjs +115 -0
  74. package/node_modules/@capyclaw/foundation/lib/subsystems/events.mjs +60 -0
  75. package/node_modules/@capyclaw/foundation/lib/subsystems/log.mjs +51 -0
  76. package/node_modules/@capyclaw/foundation/lib/subsystems/net.mjs +188 -0
  77. package/node_modules/@capyclaw/foundation/package.json +53 -0
  78. package/node_modules/@capyclaw/foundation/runtime/index.mjs +20 -0
  79. package/node_modules/@capyclaw/plugin-kit/INTEGRATION.md +100 -0
  80. package/node_modules/@capyclaw/plugin-kit/README.md +70 -0
  81. package/node_modules/@capyclaw/plugin-kit/bin/sync.mjs +103 -0
  82. package/node_modules/@capyclaw/plugin-kit/package.json +69 -0
  83. package/node_modules/@capyclaw/plugin-kit/src/cli.mjs +56 -0
  84. package/node_modules/@capyclaw/plugin-kit/src/config.mjs +142 -0
  85. package/node_modules/@capyclaw/plugin-kit/src/editor/heartbeat-worker.js +129 -0
  86. package/node_modules/@capyclaw/plugin-kit/src/editor/lease.mjs +58 -0
  87. package/node_modules/@capyclaw/plugin-kit/src/editor/shadow.mjs +219 -0
  88. package/node_modules/@capyclaw/plugin-kit/src/editor/transport.js +13 -0
  89. package/node_modules/@capyclaw/plugin-kit/src/index.mjs +13 -0
  90. package/node_modules/@capyclaw/plugin-kit/src/pack.mjs +230 -0
  91. package/node_modules/@capyclaw/plugin-kit/src/runtime/context.mjs +128 -0
  92. package/node_modules/@capyclaw/plugin-kit/src/self-contained.mjs +307 -0
  93. package/node_modules/@capyclaw/plugin-kit/src/service/api.mjs +45 -0
  94. package/node_modules/@capyclaw/plugin-kit/src/service/http.mjs +113 -0
  95. package/node_modules/@capyclaw/plugin-kit/src/service/mcp-http.mjs +150 -0
  96. package/node_modules/@capyclaw/plugin-kit/src/service/server.mjs +131 -0
  97. package/node_modules/@capyclaw/plugin-kit/src/skills/provider.mjs +82 -0
  98. package/node_modules/@capyclaw/plugin-kit/src/store/blob-store.mjs +109 -0
  99. package/node_modules/@capyclaw/plugin-kit/src/store/content-store.mjs +17 -0
  100. package/node_modules/@capyclaw/plugin-kit/src/store/journal-store.mjs +89 -0
  101. package/node_modules/@capyclaw/plugin-kit/src/tools/result.mjs +57 -0
  102. package/node_modules/@capyclaw/plugin-kit/src/tools/validate.mjs +150 -0
  103. package/node_modules/@capyclaw/plugin-kit/src/tuning.mjs +82 -0
  104. package/node_modules/@capyclaw/plugin-kit/src/util/fs-lock.mjs +132 -0
  105. package/node_modules/@capyclaw/plugin-kit/src/util/http.mjs +130 -0
  106. package/node_modules/@capyclaw/plugin-kit/src/workspace/manager.mjs +656 -0
  107. package/node_modules/@capyclaw/plugin-kit/src/zip.mjs +181 -0
  108. package/node_modules/@capyclaw/portal/README.md +70 -0
  109. package/node_modules/@capyclaw/portal/lib/index.mjs +387 -0
  110. package/node_modules/@capyclaw/portal/lib/ledger.mjs +194 -0
  111. package/node_modules/@capyclaw/portal/lib/portal-agent.ps1 +811 -0
  112. package/node_modules/@capyclaw/portal/lib/portal-darwin.mjs +183 -0
  113. package/node_modules/@capyclaw/portal/package.json +40 -0
  114. package/node_modules/@capyclaw/ppt-editor/LICENSE +661 -0
  115. package/node_modules/@capyclaw/ppt-editor/README.md +86 -0
  116. package/node_modules/@capyclaw/ppt-editor/THIRD_PARTY_NOTICES.md +21 -0
  117. package/node_modules/@capyclaw/ppt-editor/app.js +6298 -0
  118. package/node_modules/@capyclaw/ppt-editor/contract/ppt-contract.json +1828 -0
  119. package/node_modules/@capyclaw/ppt-editor/heartbeat-worker.js +129 -0
  120. package/node_modules/@capyclaw/ppt-editor/index.html +176 -0
  121. package/node_modules/@capyclaw/ppt-editor/lib/index.mjs +8 -0
  122. package/node_modules/@capyclaw/ppt-editor/package.json +57 -0
  123. package/node_modules/@capyclaw/ppt-editor/ppt-full-app.js +381 -0
  124. package/node_modules/@capyclaw/ppt-skill-api/README.md +3 -0
  125. package/node_modules/@capyclaw/ppt-skill-api/contract/ppt-contract.json +1828 -0
  126. package/node_modules/@capyclaw/ppt-skill-api/cordis.patch.yml +4 -0
  127. package/node_modules/@capyclaw/ppt-skill-api/package.json +49 -0
  128. package/node_modules/@capyclaw/ppt-skill-api/plugin.mjs +15 -0
  129. package/node_modules/@capyclaw/ppt-skill-api/skills/pptist-api/SKILL.md +137 -0
  130. package/node_modules/@capyclaw/ppt-skill-api/skills/pptist-api/references/tool-contract.md +1646 -0
  131. package/node_modules/@capyclaw/ppt-skill-api/skills/pptist-api/references/visual-qa.md +28 -0
  132. package/node_modules/@capyclaw/ppt-skill-proposal/README.md +3 -0
  133. package/node_modules/@capyclaw/ppt-skill-proposal/contract/ppt-contract.json +1828 -0
  134. package/node_modules/@capyclaw/ppt-skill-proposal/cordis.patch.yml +4 -0
  135. package/node_modules/@capyclaw/ppt-skill-proposal/package.json +49 -0
  136. package/node_modules/@capyclaw/ppt-skill-proposal/plugin.mjs +15 -0
  137. package/node_modules/@capyclaw/ppt-skill-proposal/skills/pptmaster-proposal/SKILL.md +83 -0
  138. package/node_modules/@capyclaw/ppt-skill-proposal/skills/pptmaster-proposal/references/anti-ai-slop.md +18 -0
  139. package/node_modules/@capyclaw/ppt-skill-proposal/skills/pptmaster-proposal/references/deck-structure.md +42 -0
  140. package/node_modules/@capyclaw/ppt-skill-proposal/skills/pptmaster-proposal/references/design-tokens.md +36 -0
  141. package/node_modules/@capyclaw/ppt-skill-proposal/skills/pptmaster-proposal/references/layout-system.md +30 -0
  142. package/node_modules/@capyclaw/ppt-skill-proposal/skills/pptmaster-proposal/references/page-craft.md +31 -0
  143. package/node_modules/@capyclaw/ppt-skill-proposal/skills/pptmaster-proposal/references/scqa-pyramid.md +26 -0
  144. package/node_modules/@capyclaw/ppt-workbench/LICENSE +661 -0
  145. package/node_modules/@capyclaw/ppt-workbench/README.md +173 -0
  146. package/node_modules/@capyclaw/ppt-workbench/THIRD_PARTY_NOTICES.md +21 -0
  147. package/node_modules/@capyclaw/ppt-workbench/contract/ppt-contract.json +1828 -0
  148. package/node_modules/@capyclaw/ppt-workbench/core/audit.js +507 -0
  149. package/node_modules/@capyclaw/ppt-workbench/core/chart.js +199 -0
  150. package/node_modules/@capyclaw/ppt-workbench/core/color.js +170 -0
  151. package/node_modules/@capyclaw/ppt-workbench/core/deck-layout.js +375 -0
  152. package/node_modules/@capyclaw/ppt-workbench/core/formula.js +80 -0
  153. package/node_modules/@capyclaw/ppt-workbench/core/hfmath/hershey.js +1763 -0
  154. package/node_modules/@capyclaw/ppt-workbench/core/hfmath/index.js +1176 -0
  155. package/node_modules/@capyclaw/ppt-workbench/core/hfmath/stretch.js +41 -0
  156. package/node_modules/@capyclaw/ppt-workbench/core/hfmath/symbols.js +408 -0
  157. package/node_modules/@capyclaw/ppt-workbench/core/inspect.js +366 -0
  158. package/node_modules/@capyclaw/ppt-workbench/core/manuscript/compare.mjs +103 -0
  159. package/node_modules/@capyclaw/ppt-workbench/core/manuscript/compile.mjs +322 -0
  160. package/node_modules/@capyclaw/ppt-workbench/core/manuscript/edit.mjs +239 -0
  161. package/node_modules/@capyclaw/ppt-workbench/core/manuscript/parse.mjs +346 -0
  162. package/node_modules/@capyclaw/ppt-workbench/core/manuscript/render-html.mjs +84 -0
  163. package/node_modules/@capyclaw/ppt-workbench/core/manuscript/sync.mjs +101 -0
  164. package/node_modules/@capyclaw/ppt-workbench/core/measure.js +104 -0
  165. package/node_modules/@capyclaw/ppt-workbench/core/ops/browser.js +28 -0
  166. package/node_modules/@capyclaw/ppt-workbench/core/ops/chart.js +64 -0
  167. package/node_modules/@capyclaw/ppt-workbench/core/ops/deck.js +21 -0
  168. package/node_modules/@capyclaw/ppt-workbench/core/ops/element.js +55 -0
  169. package/node_modules/@capyclaw/ppt-workbench/core/ops/history.js +11 -0
  170. package/node_modules/@capyclaw/ppt-workbench/core/ops/import.js +95 -0
  171. package/node_modules/@capyclaw/ppt-workbench/core/ops/index.js +39 -0
  172. package/node_modules/@capyclaw/ppt-workbench/core/ops/playback.js +9 -0
  173. package/node_modules/@capyclaw/ppt-workbench/core/ops/recolor.js +87 -0
  174. package/node_modules/@capyclaw/ppt-workbench/core/ops/slide.js +66 -0
  175. package/node_modules/@capyclaw/ppt-workbench/core/ops/table.js +85 -0
  176. package/node_modules/@capyclaw/ppt-workbench/core/ops/text.js +35 -0
  177. package/node_modules/@capyclaw/ppt-workbench/core/ops/view.js +13 -0
  178. package/node_modules/@capyclaw/ppt-workbench/core/ops.js +12 -0
  179. package/node_modules/@capyclaw/ppt-workbench/core/quick.js +52 -0
  180. package/node_modules/@capyclaw/ppt-workbench/core/shape-library.js +122 -0
  181. package/node_modules/@capyclaw/ppt-workbench/core/table.js +178 -0
  182. package/node_modules/@capyclaw/ppt-workbench/core/text.js +200 -0
  183. package/node_modules/@capyclaw/ppt-workbench/lib/host.mjs +1 -0
  184. package/node_modules/@capyclaw/ppt-workbench/package.json +73 -0
  185. package/node_modules/@capyclaw/ppt-workbench/plugin.mjs +1 -0
  186. package/node_modules/@capyclaw/ppt-workbench/server/audit.mjs +2 -0
  187. package/node_modules/@capyclaw/ppt-workbench/server/bridge-client.mjs +308 -0
  188. package/node_modules/@capyclaw/ppt-workbench/server/constants.mjs +21 -0
  189. package/node_modules/@capyclaw/ppt-workbench/server/contract-snapshots.mjs +89 -0
  190. package/node_modules/@capyclaw/ppt-workbench/server/contract.mjs +24 -0
  191. package/node_modules/@capyclaw/ppt-workbench/server/deck-layout.mjs +2 -0
  192. package/node_modules/@capyclaw/ppt-workbench/server/editor-assets.mjs +132 -0
  193. package/node_modules/@capyclaw/ppt-workbench/server/embedded-host.mjs +252 -0
  194. package/node_modules/@capyclaw/ppt-workbench/server/http-utils.mjs +2 -0
  195. package/node_modules/@capyclaw/ppt-workbench/server/infra/http.mjs +2 -0
  196. package/node_modules/@capyclaw/ppt-workbench/server/infra/runtime/context.mjs +2 -0
  197. package/node_modules/@capyclaw/ppt-workbench/server/infra/store/blob-store.mjs +2 -0
  198. package/node_modules/@capyclaw/ppt-workbench/server/infra/tuning.mjs +2 -0
  199. package/node_modules/@capyclaw/ppt-workbench/server/infra/util/fs-lock.mjs +2 -0
  200. package/node_modules/@capyclaw/ppt-workbench/server/infra/workspace/manager.mjs +2 -0
  201. package/node_modules/@capyclaw/ppt-workbench/server/mcp/dispatch.mjs +2 -0
  202. package/node_modules/@capyclaw/ppt-workbench/server/mcp/handler.mjs +2 -0
  203. package/node_modules/@capyclaw/ppt-workbench/server/mcp/instructions.mjs +66 -0
  204. package/node_modules/@capyclaw/ppt-workbench/server/ppt-shim.mjs +168 -0
  205. package/node_modules/@capyclaw/ppt-workbench/server/relay.mjs +282 -0
  206. package/node_modules/@capyclaw/ppt-workbench/server/routes/assets.mjs +2 -0
  207. package/node_modules/@capyclaw/ppt-workbench/server/routes/bridge.mjs +74 -0
  208. package/node_modules/@capyclaw/ppt-workbench/server/routes/editor.mjs +9 -0
  209. package/node_modules/@capyclaw/ppt-workbench/server/routes/import.mjs +260 -0
  210. package/node_modules/@capyclaw/ppt-workbench/server/routes/manuscript.mjs +414 -0
  211. package/node_modules/@capyclaw/ppt-workbench/server/routes/mcp.mjs +17 -0
  212. package/node_modules/@capyclaw/ppt-workbench/server/routes/session.mjs +36 -0
  213. package/node_modules/@capyclaw/ppt-workbench/server/runtime/recovery.mjs +9 -0
  214. package/node_modules/@capyclaw/ppt-workbench/server/runtime/watch.mjs +17 -0
  215. package/node_modules/@capyclaw/ppt-workbench/server/session-context.mjs +5 -0
  216. package/node_modules/@capyclaw/ppt-workbench/server/shared/SHARED_MANIFEST.json +70 -0
  217. package/node_modules/@capyclaw/ppt-workbench/server/shared/asset-service.mjs +2 -0
  218. package/node_modules/@capyclaw/ppt-workbench/server/shared/editor-host.mjs +2 -0
  219. package/node_modules/@capyclaw/ppt-workbench/server/shared/kit/editor/lease.mjs +2 -0
  220. package/node_modules/@capyclaw/ppt-workbench/server/shared/kit/service/api.mjs +2 -0
  221. package/node_modules/@capyclaw/ppt-workbench/server/shared/kit/service/http.mjs +2 -0
  222. package/node_modules/@capyclaw/ppt-workbench/server/shared/kit/service/mcp-http.mjs +2 -0
  223. package/node_modules/@capyclaw/ppt-workbench/server/shared/kit/tools/validate.mjs +2 -0
  224. package/node_modules/@capyclaw/ppt-workbench/server/shared/kit/tuning.mjs +2 -0
  225. package/node_modules/@capyclaw/ppt-workbench/server/shared/kit/util/fs-lock.mjs +2 -0
  226. package/node_modules/@capyclaw/ppt-workbench/server/shared/service-host.mjs +2 -0
  227. package/node_modules/@capyclaw/ppt-workbench/server/shared/tool-host.mjs +2 -0
  228. package/node_modules/@capyclaw/ppt-workbench/server/shared/tuning.mjs +2 -0
  229. package/node_modules/@capyclaw/ppt-workbench/server/store/backends/file-backend.mjs +13 -0
  230. package/node_modules/@capyclaw/ppt-workbench/server/store/checkpoints.mjs +28 -0
  231. package/node_modules/@capyclaw/ppt-workbench/server/store/deck-sanitize.mjs +68 -0
  232. package/node_modules/@capyclaw/ppt-workbench/server/store/doc.mjs +56 -0
  233. package/node_modules/@capyclaw/ppt-workbench/server/store/index.mjs +34 -0
  234. package/node_modules/@capyclaw/ppt-workbench/server/store/journal.mjs +9 -0
  235. package/node_modules/@capyclaw/ppt-workbench/server/store/lease.mjs +2 -0
  236. package/node_modules/@capyclaw/ppt-workbench/server/store/sanitize.mjs +33 -0
  237. package/node_modules/@capyclaw/ppt-workbench/server/store/sessions.mjs +314 -0
  238. package/node_modules/@capyclaw/ppt-workbench/server/store.mjs +2 -0
  239. package/node_modules/@capyclaw/ppt-workbench/server/tools/capabilities/apply.mjs +33 -0
  240. package/node_modules/@capyclaw/ppt-workbench/server/tools/capabilities/audit.mjs +28 -0
  241. package/node_modules/@capyclaw/ppt-workbench/server/tools/capabilities/chart.mjs +83 -0
  242. package/node_modules/@capyclaw/ppt-workbench/server/tools/capabilities/compose.mjs +97 -0
  243. package/node_modules/@capyclaw/ppt-workbench/server/tools/capabilities/contract.mjs +38 -0
  244. package/node_modules/@capyclaw/ppt-workbench/server/tools/capabilities/deck.mjs +27 -0
  245. package/node_modules/@capyclaw/ppt-workbench/server/tools/capabilities/element.mjs +67 -0
  246. package/node_modules/@capyclaw/ppt-workbench/server/tools/capabilities/export.mjs +99 -0
  247. package/node_modules/@capyclaw/ppt-workbench/server/tools/capabilities/formula.mjs +72 -0
  248. package/node_modules/@capyclaw/ppt-workbench/server/tools/capabilities/history.mjs +29 -0
  249. package/node_modules/@capyclaw/ppt-workbench/server/tools/capabilities/image.mjs +174 -0
  250. package/node_modules/@capyclaw/ppt-workbench/server/tools/capabilities/imagesearch.mjs +203 -0
  251. package/node_modules/@capyclaw/ppt-workbench/server/tools/capabilities/import.mjs +180 -0
  252. package/node_modules/@capyclaw/ppt-workbench/server/tools/capabilities/index.mjs +64 -0
  253. package/node_modules/@capyclaw/ppt-workbench/server/tools/capabilities/inspect.mjs +46 -0
  254. package/node_modules/@capyclaw/ppt-workbench/server/tools/capabilities/line.mjs +58 -0
  255. package/node_modules/@capyclaw/ppt-workbench/server/tools/capabilities/manuscript.mjs +208 -0
  256. package/node_modules/@capyclaw/ppt-workbench/server/tools/capabilities/notes.mjs +33 -0
  257. package/node_modules/@capyclaw/ppt-workbench/server/tools/capabilities/present.mjs +34 -0
  258. package/node_modules/@capyclaw/ppt-workbench/server/tools/capabilities/recolor.mjs +62 -0
  259. package/node_modules/@capyclaw/ppt-workbench/server/tools/capabilities/screenshot.mjs +191 -0
  260. package/node_modules/@capyclaw/ppt-workbench/server/tools/capabilities/shape.mjs +64 -0
  261. package/node_modules/@capyclaw/ppt-workbench/server/tools/capabilities/slide.mjs +81 -0
  262. package/node_modules/@capyclaw/ppt-workbench/server/tools/capabilities/style.mjs +48 -0
  263. package/node_modules/@capyclaw/ppt-workbench/server/tools/capabilities/table.mjs +127 -0
  264. package/node_modules/@capyclaw/ppt-workbench/server/tools/capabilities/task.mjs +52 -0
  265. package/node_modules/@capyclaw/ppt-workbench/server/tools/capabilities/text.mjs +82 -0
  266. package/node_modules/@capyclaw/ppt-workbench/server/tools/domains/color.mjs +4 -0
  267. package/node_modules/@capyclaw/ppt-workbench/server/tools/domains/image.mjs +78 -0
  268. package/node_modules/@capyclaw/ppt-workbench/server/tools/domains/index.mjs +7 -0
  269. package/node_modules/@capyclaw/ppt-workbench/server/tools/domains/manuscript-media.mjs +159 -0
  270. package/node_modules/@capyclaw/ppt-workbench/server/tools/domains/offline-render.mjs +256 -0
  271. package/node_modules/@capyclaw/ppt-workbench/server/tools/domains/pptx-export.mjs +577 -0
  272. package/node_modules/@capyclaw/ppt-workbench/server/tools/domains/recolor.mjs +25 -0
  273. package/node_modules/@capyclaw/ppt-workbench/server/tools/domains/remote-image.mjs +443 -0
  274. package/node_modules/@capyclaw/ppt-workbench/server/tools/domains/slide.mjs +21 -0
  275. package/node_modules/@capyclaw/ppt-workbench/server/tools/domains/text-style.mjs +11 -0
  276. package/node_modules/@capyclaw/ppt-workbench/server/tools/domains/tooling.mjs +13 -0
  277. package/node_modules/@capyclaw/ppt-workbench/server/tools/index.mjs +14 -0
  278. package/node_modules/@capyclaw/ppt-workbench/server/tools/kernel/define.mjs +5 -0
  279. package/node_modules/@capyclaw/ppt-workbench/server/tools/kernel/ports.mjs +52 -0
  280. package/node_modules/@capyclaw/ppt-workbench/server/tools/kernel/registry.mjs +17 -0
  281. package/node_modules/@capyclaw/ppt-workbench/server/tools/model/deck-schema.mjs +105 -0
  282. package/node_modules/@capyclaw/ppt-workbench/server/tools.mjs +18 -0
  283. package/node_modules/@capyclaw/ppt-workbench/server/tuning.mjs +93 -0
  284. package/node_modules/@capyclaw/ppt-workbench/server/validate.mjs +2 -0
  285. package/node_modules/@capyclaw/ppt-workbench/server/workbench-framework.mjs +305 -0
  286. package/node_modules/@capyclaw/service-broker/README.md +104 -0
  287. package/node_modules/@capyclaw/service-broker/cordis.patch.yml +8 -0
  288. package/node_modules/@capyclaw/service-broker/dsh-suite.json +21 -0
  289. package/node_modules/@capyclaw/service-broker/lib/control.mjs +193 -0
  290. package/node_modules/@capyclaw/service-broker/lib/discovery.mjs +109 -0
  291. package/node_modules/@capyclaw/service-broker/lib/engine.mjs +1236 -0
  292. package/node_modules/@capyclaw/service-broker/lib/host.mjs +182 -0
  293. package/node_modules/@capyclaw/service-broker/lib/manifest.mjs +249 -0
  294. package/node_modules/@capyclaw/service-broker/lib/recovery.mjs +275 -0
  295. package/node_modules/@capyclaw/service-broker/lib/skills-client.mjs +28 -0
  296. package/node_modules/@capyclaw/service-broker/lib/spec.mjs +78 -0
  297. package/node_modules/@capyclaw/service-broker/package.json +65 -0
  298. package/node_modules/@capyclaw/service-broker/server.mjs +81 -0
  299. package/node_modules/@capyclaw/service-broker/service.schema.json +62 -0
  300. package/node_modules/@capyclaw/service-broker/services.json +3 -0
  301. package/node_modules/@capyclaw/service-host/README.md +86 -0
  302. package/node_modules/@capyclaw/service-host/cordis.patch.yml +4 -0
  303. package/node_modules/@capyclaw/service-host/dsh-suite.json +29 -0
  304. package/node_modules/@capyclaw/service-host/lib/host.mjs +22 -0
  305. package/node_modules/@capyclaw/service-host/package.json +60 -0
  306. package/node_modules/@capyclaw/service-host/src/index.mjs +571 -0
  307. package/node_modules/@capyclaw/service-host/src/tuning.mjs +63 -0
  308. package/node_modules/@capyclaw/skills-service/README.md +31 -0
  309. package/node_modules/@capyclaw/skills-service/package.json +30 -0
  310. package/node_modules/@capyclaw/skills-service/server.mjs +237 -0
  311. package/node_modules/@capyclaw/tool-host/README.md +56 -0
  312. package/node_modules/@capyclaw/tool-host/cordis.patch.yml +4 -0
  313. package/node_modules/@capyclaw/tool-host/dsh-suite.json +30 -0
  314. package/node_modules/@capyclaw/tool-host/lib/host.mjs +16 -0
  315. package/node_modules/@capyclaw/tool-host/package.json +59 -0
  316. package/node_modules/@capyclaw/tool-host/src/descriptors.mjs +166 -0
  317. package/node_modules/@capyclaw/tool-host/src/index.mjs +416 -0
  318. package/node_modules/@types/node/LICENSE +21 -0
  319. package/node_modules/@types/node/README.md +15 -0
  320. package/node_modules/@types/node/assert/strict.d.ts +8 -0
  321. package/node_modules/@types/node/assert.d.ts +1005 -0
  322. package/node_modules/@types/node/async_hooks.d.ts +586 -0
  323. package/node_modules/@types/node/buffer.buffer.d.ts +457 -0
  324. package/node_modules/@types/node/buffer.d.ts +1901 -0
  325. package/node_modules/@types/node/child_process.d.ts +1453 -0
  326. package/node_modules/@types/node/cluster.d.ts +578 -0
  327. package/node_modules/@types/node/compatibility/disposable.d.ts +14 -0
  328. package/node_modules/@types/node/compatibility/index.d.ts +9 -0
  329. package/node_modules/@types/node/compatibility/indexable.d.ts +20 -0
  330. package/node_modules/@types/node/compatibility/iterators.d.ts +20 -0
  331. package/node_modules/@types/node/console.d.ts +452 -0
  332. package/node_modules/@types/node/constants.d.ts +21 -0
  333. package/node_modules/@types/node/crypto.d.ts +4504 -0
  334. package/node_modules/@types/node/dgram.d.ts +596 -0
  335. package/node_modules/@types/node/diagnostics_channel.d.ts +551 -0
  336. package/node_modules/@types/node/dns/promises.d.ts +477 -0
  337. package/node_modules/@types/node/dns.d.ts +860 -0
  338. package/node_modules/@types/node/domain.d.ts +170 -0
  339. package/node_modules/@types/node/events.d.ts +863 -0
  340. package/node_modules/@types/node/fs/promises.d.ts +1208 -0
  341. package/node_modules/@types/node/fs.d.ts +4332 -0
  342. package/node_modules/@types/node/globals.d.ts +170 -0
  343. package/node_modules/@types/node/globals.typedarray.d.ts +21 -0
  344. package/node_modules/@types/node/http.d.ts +1919 -0
  345. package/node_modules/@types/node/http2.d.ts +2580 -0
  346. package/node_modules/@types/node/https.d.ts +549 -0
  347. package/node_modules/@types/node/index.d.ts +92 -0
  348. package/node_modules/@types/node/inspector.generated.d.ts +2775 -0
  349. package/node_modules/@types/node/module.d.ts +503 -0
  350. package/node_modules/@types/node/net.d.ts +924 -0
  351. package/node_modules/@types/node/os.d.ts +480 -0
  352. package/node_modules/@types/node/package.json +145 -0
  353. package/node_modules/@types/node/path.d.ts +191 -0
  354. package/node_modules/@types/node/perf_hooks.d.ts +860 -0
  355. package/node_modules/@types/node/process.d.ts +1632 -0
  356. package/node_modules/@types/node/punycode.d.ts +117 -0
  357. package/node_modules/@types/node/querystring.d.ts +140 -0
  358. package/node_modules/@types/node/readline/promises.d.ts +154 -0
  359. package/node_modules/@types/node/readline.d.ts +715 -0
  360. package/node_modules/@types/node/repl.d.ts +430 -0
  361. package/node_modules/@types/node/stream/consumers.d.ts +38 -0
  362. package/node_modules/@types/node/stream/promises.d.ts +90 -0
  363. package/node_modules/@types/node/stream/web.d.ts +527 -0
  364. package/node_modules/@types/node/stream.d.ts +1680 -0
  365. package/node_modules/@types/node/string_decoder.d.ts +67 -0
  366. package/node_modules/@types/node/test.d.ts +1208 -0
  367. package/node_modules/@types/node/timers/promises.d.ts +108 -0
  368. package/node_modules/@types/node/timers.d.ts +286 -0
  369. package/node_modules/@types/node/tls.d.ts +1204 -0
  370. package/node_modules/@types/node/trace_events.d.ts +171 -0
  371. package/node_modules/@types/node/ts5.6/buffer.buffer.d.ts +455 -0
  372. package/node_modules/@types/node/ts5.6/globals.typedarray.d.ts +19 -0
  373. package/node_modules/@types/node/ts5.6/index.d.ts +92 -0
  374. package/node_modules/@types/node/tty.d.ts +206 -0
  375. package/node_modules/@types/node/url.d.ts +957 -0
  376. package/node_modules/@types/node/util.d.ts +2083 -0
  377. package/node_modules/@types/node/v8.d.ts +753 -0
  378. package/node_modules/@types/node/vm.d.ts +704 -0
  379. package/node_modules/@types/node/wasi.d.ts +160 -0
  380. package/node_modules/@types/node/web-globals/abortcontroller.d.ts +34 -0
  381. package/node_modules/@types/node/web-globals/domexception.d.ts +68 -0
  382. package/node_modules/@types/node/web-globals/events.d.ts +81 -0
  383. package/node_modules/@types/node/web-globals/fetch.d.ts +38 -0
  384. package/node_modules/@types/node/worker_threads.d.ts +698 -0
  385. package/node_modules/@types/node/zlib.d.ts +517 -0
  386. package/node_modules/core-util-is/LICENSE +19 -0
  387. package/node_modules/core-util-is/README.md +3 -0
  388. package/node_modules/core-util-is/lib/util.js +107 -0
  389. package/node_modules/core-util-is/package.json +38 -0
  390. package/node_modules/https/package.json +15 -0
  391. package/node_modules/image-size/LICENSE +9 -0
  392. package/node_modules/image-size/Readme.md +184 -0
  393. package/node_modules/image-size/bin/image-size.js +53 -0
  394. package/node_modules/image-size/dist/detector.d.ts +2 -0
  395. package/node_modules/image-size/dist/detector.js +30 -0
  396. package/node_modules/image-size/dist/index.d.ts +10 -0
  397. package/node_modules/image-size/dist/index.js +129 -0
  398. package/node_modules/image-size/dist/types/bmp.d.ts +2 -0
  399. package/node_modules/image-size/dist/types/bmp.js +11 -0
  400. package/node_modules/image-size/dist/types/cur.d.ts +2 -0
  401. package/node_modules/image-size/dist/types/cur.js +17 -0
  402. package/node_modules/image-size/dist/types/dds.d.ts +2 -0
  403. package/node_modules/image-size/dist/types/dds.js +11 -0
  404. package/node_modules/image-size/dist/types/gif.d.ts +2 -0
  405. package/node_modules/image-size/dist/types/gif.js +12 -0
  406. package/node_modules/image-size/dist/types/heif.d.ts +2 -0
  407. package/node_modules/image-size/dist/types/heif.js +40 -0
  408. package/node_modules/image-size/dist/types/icns.d.ts +2 -0
  409. package/node_modules/image-size/dist/types/icns.js +101 -0
  410. package/node_modules/image-size/dist/types/ico.d.ts +2 -0
  411. package/node_modules/image-size/dist/types/ico.js +68 -0
  412. package/node_modules/image-size/dist/types/index.d.ts +23 -0
  413. package/node_modules/image-size/dist/types/index.js +46 -0
  414. package/node_modules/image-size/dist/types/interface.d.ts +13 -0
  415. package/node_modules/image-size/dist/types/interface.js +2 -0
  416. package/node_modules/image-size/dist/types/j2c.d.ts +2 -0
  417. package/node_modules/image-size/dist/types/j2c.js +12 -0
  418. package/node_modules/image-size/dist/types/jp2.d.ts +2 -0
  419. package/node_modules/image-size/dist/types/jp2.js +27 -0
  420. package/node_modules/image-size/dist/types/jpg.d.ts +2 -0
  421. package/node_modules/image-size/dist/types/jpg.js +123 -0
  422. package/node_modules/image-size/dist/types/jxl-stream.d.ts +2 -0
  423. package/node_modules/image-size/dist/types/jxl-stream.js +45 -0
  424. package/node_modules/image-size/dist/types/jxl.d.ts +2 -0
  425. package/node_modules/image-size/dist/types/jxl.js +59 -0
  426. package/node_modules/image-size/dist/types/ktx.d.ts +2 -0
  427. package/node_modules/image-size/dist/types/ktx.js +19 -0
  428. package/node_modules/image-size/dist/types/png.d.ts +2 -0
  429. package/node_modules/image-size/dist/types/png.js +35 -0
  430. package/node_modules/image-size/dist/types/pnm.d.ts +2 -0
  431. package/node_modules/image-size/dist/types/pnm.js +72 -0
  432. package/node_modules/image-size/dist/types/psd.d.ts +2 -0
  433. package/node_modules/image-size/dist/types/psd.js +11 -0
  434. package/node_modules/image-size/dist/types/svg.d.ts +2 -0
  435. package/node_modules/image-size/dist/types/svg.js +90 -0
  436. package/node_modules/image-size/dist/types/tga.d.ts +2 -0
  437. package/node_modules/image-size/dist/types/tga.js +15 -0
  438. package/node_modules/image-size/dist/types/tiff.d.ts +2 -0
  439. package/node_modules/image-size/dist/types/tiff.js +95 -0
  440. package/node_modules/image-size/dist/types/utils.d.ts +15 -0
  441. package/node_modules/image-size/dist/types/utils.js +75 -0
  442. package/node_modules/image-size/dist/types/webp.d.ts +2 -0
  443. package/node_modules/image-size/dist/types/webp.js +60 -0
  444. package/node_modules/image-size/dist/utils/bit-reader.d.ts +10 -0
  445. package/node_modules/image-size/dist/utils/bit-reader.js +44 -0
  446. package/node_modules/image-size/package.json +81 -0
  447. package/node_modules/immediate/LICENSE.txt +20 -0
  448. package/node_modules/immediate/README.md +93 -0
  449. package/node_modules/immediate/dist/immediate.js +75 -0
  450. package/node_modules/immediate/dist/immediate.min.js +1 -0
  451. package/node_modules/immediate/lib/browser.js +69 -0
  452. package/node_modules/immediate/lib/index.js +73 -0
  453. package/node_modules/immediate/package.json +42 -0
  454. package/node_modules/inherits/LICENSE +16 -0
  455. package/node_modules/inherits/README.md +42 -0
  456. package/node_modules/inherits/inherits.js +9 -0
  457. package/node_modules/inherits/inherits_browser.js +27 -0
  458. package/node_modules/inherits/package.json +29 -0
  459. package/node_modules/isarray/.npmignore +1 -0
  460. package/node_modules/isarray/.travis.yml +4 -0
  461. package/node_modules/isarray/Makefile +6 -0
  462. package/node_modules/isarray/README.md +60 -0
  463. package/node_modules/isarray/component.json +19 -0
  464. package/node_modules/isarray/index.js +5 -0
  465. package/node_modules/isarray/package.json +45 -0
  466. package/node_modules/isarray/test.js +20 -0
  467. package/node_modules/jszip/.codeclimate.yml +16 -0
  468. package/node_modules/jszip/.editorconfig +8 -0
  469. package/node_modules/jszip/.eslintrc.js +43 -0
  470. package/node_modules/jszip/CHANGES.md +210 -0
  471. package/node_modules/jszip/LICENSE.markdown +651 -0
  472. package/node_modules/jszip/README.markdown +33 -0
  473. package/node_modules/jszip/dist/jszip.js +11586 -0
  474. package/node_modules/jszip/dist/jszip.min.js +13 -0
  475. package/node_modules/jszip/index.d.ts +344 -0
  476. package/node_modules/jszip/lib/base64.js +106 -0
  477. package/node_modules/jszip/lib/compressedObject.js +74 -0
  478. package/node_modules/jszip/lib/compressions.js +14 -0
  479. package/node_modules/jszip/lib/crc32.js +77 -0
  480. package/node_modules/jszip/lib/defaults.js +11 -0
  481. package/node_modules/jszip/lib/external.js +18 -0
  482. package/node_modules/jszip/lib/flate.js +85 -0
  483. package/node_modules/jszip/lib/generate/ZipFileWorker.js +539 -0
  484. package/node_modules/jszip/lib/generate/index.js +57 -0
  485. package/node_modules/jszip/lib/index.js +55 -0
  486. package/node_modules/jszip/lib/license_header.js +11 -0
  487. package/node_modules/jszip/lib/load.js +88 -0
  488. package/node_modules/jszip/lib/nodejs/NodejsStreamInputAdapter.js +74 -0
  489. package/node_modules/jszip/lib/nodejs/NodejsStreamOutputAdapter.js +42 -0
  490. package/node_modules/jszip/lib/nodejsUtils.js +57 -0
  491. package/node_modules/jszip/lib/object.js +384 -0
  492. package/node_modules/jszip/lib/readable-stream-browser.js +10 -0
  493. package/node_modules/jszip/lib/reader/ArrayReader.js +57 -0
  494. package/node_modules/jszip/lib/reader/DataReader.js +116 -0
  495. package/node_modules/jszip/lib/reader/NodeBufferReader.js +19 -0
  496. package/node_modules/jszip/lib/reader/StringReader.js +38 -0
  497. package/node_modules/jszip/lib/reader/Uint8ArrayReader.js +22 -0
  498. package/node_modules/jszip/lib/reader/readerFor.js +28 -0
  499. package/node_modules/jszip/lib/signature.js +7 -0
  500. package/node_modules/jszip/lib/stream/ConvertWorker.js +26 -0
  501. package/node_modules/jszip/lib/stream/Crc32Probe.js +24 -0
  502. package/node_modules/jszip/lib/stream/DataLengthProbe.js +29 -0
  503. package/node_modules/jszip/lib/stream/DataWorker.js +116 -0
  504. package/node_modules/jszip/lib/stream/GenericWorker.js +263 -0
  505. package/node_modules/jszip/lib/stream/StreamHelper.js +214 -0
  506. package/node_modules/jszip/lib/support.js +38 -0
  507. package/node_modules/jszip/lib/utf8.js +275 -0
  508. package/node_modules/jszip/lib/utils.js +510 -0
  509. package/node_modules/jszip/lib/zipEntries.js +261 -0
  510. package/node_modules/jszip/lib/zipEntry.js +293 -0
  511. package/node_modules/jszip/lib/zipObject.js +133 -0
  512. package/node_modules/jszip/package.json +67 -0
  513. package/node_modules/jszip/sponsors.md +21 -0
  514. package/node_modules/jszip/tsconfig.json +101 -0
  515. package/node_modules/jszip/vendor/FileSaver.js +247 -0
  516. package/node_modules/lie/README.md +62 -0
  517. package/node_modules/lie/dist/lie.js +350 -0
  518. package/node_modules/lie/dist/lie.min.js +1 -0
  519. package/node_modules/lie/dist/lie.polyfill.js +358 -0
  520. package/node_modules/lie/dist/lie.polyfill.min.js +1 -0
  521. package/node_modules/lie/lib/browser.js +273 -0
  522. package/node_modules/lie/lib/index.js +298 -0
  523. package/node_modules/lie/license.md +7 -0
  524. package/node_modules/lie/lie.d.ts +244 -0
  525. package/node_modules/lie/package.json +69 -0
  526. package/node_modules/lie/polyfill.js +4 -0
  527. package/node_modules/pako/LICENSE +21 -0
  528. package/node_modules/pako/README.md +191 -0
  529. package/node_modules/pako/dist/pako.js +6818 -0
  530. package/node_modules/pako/dist/pako.min.js +1 -0
  531. package/node_modules/pako/dist/pako_deflate.js +3997 -0
  532. package/node_modules/pako/dist/pako_deflate.min.js +1 -0
  533. package/node_modules/pako/dist/pako_inflate.js +3300 -0
  534. package/node_modules/pako/dist/pako_inflate.min.js +1 -0
  535. package/node_modules/pako/index.js +14 -0
  536. package/node_modules/pako/lib/deflate.js +400 -0
  537. package/node_modules/pako/lib/inflate.js +423 -0
  538. package/node_modules/pako/lib/utils/common.js +105 -0
  539. package/node_modules/pako/lib/utils/strings.js +187 -0
  540. package/node_modules/pako/lib/zlib/README +59 -0
  541. package/node_modules/pako/lib/zlib/adler32.js +51 -0
  542. package/node_modules/pako/lib/zlib/constants.js +68 -0
  543. package/node_modules/pako/lib/zlib/crc32.js +59 -0
  544. package/node_modules/pako/lib/zlib/deflate.js +1874 -0
  545. package/node_modules/pako/lib/zlib/gzheader.js +58 -0
  546. package/node_modules/pako/lib/zlib/inffast.js +345 -0
  547. package/node_modules/pako/lib/zlib/inflate.js +1556 -0
  548. package/node_modules/pako/lib/zlib/inftrees.js +343 -0
  549. package/node_modules/pako/lib/zlib/messages.js +32 -0
  550. package/node_modules/pako/lib/zlib/trees.js +1222 -0
  551. package/node_modules/pako/lib/zlib/zstream.js +47 -0
  552. package/node_modules/pako/package.json +44 -0
  553. package/node_modules/pptxgenjs/LICENSE +21 -0
  554. package/node_modules/pptxgenjs/README.md +284 -0
  555. package/node_modules/pptxgenjs/dist/pptxgen.bundle.js +3 -0
  556. package/node_modules/pptxgenjs/dist/pptxgen.bundle.js.map +1 -0
  557. package/node_modules/pptxgenjs/dist/pptxgen.cjs.js +7445 -0
  558. package/node_modules/pptxgenjs/dist/pptxgen.es.js +7439 -0
  559. package/node_modules/pptxgenjs/dist/pptxgen.min.js +3 -0
  560. package/node_modules/pptxgenjs/dist/pptxgen.min.js.map +1 -0
  561. package/node_modules/pptxgenjs/package.json +89 -0
  562. package/node_modules/pptxgenjs/types/index.d.ts +2670 -0
  563. package/node_modules/process-nextick-args/index.js +45 -0
  564. package/node_modules/process-nextick-args/license.md +19 -0
  565. package/node_modules/process-nextick-args/package.json +25 -0
  566. package/node_modules/process-nextick-args/readme.md +18 -0
  567. package/node_modules/queue/LICENSE +8 -0
  568. package/node_modules/queue/index.d.ts +173 -0
  569. package/node_modules/queue/index.js +195 -0
  570. package/node_modules/queue/package.json +43 -0
  571. package/node_modules/queue/readme.md +221 -0
  572. package/node_modules/readable-stream/.travis.yml +34 -0
  573. package/node_modules/readable-stream/CONTRIBUTING.md +38 -0
  574. package/node_modules/readable-stream/GOVERNANCE.md +136 -0
  575. package/node_modules/readable-stream/LICENSE +47 -0
  576. package/node_modules/readable-stream/README.md +58 -0
  577. package/node_modules/readable-stream/doc/wg-meetings/2015-01-30.md +60 -0
  578. package/node_modules/readable-stream/duplex-browser.js +1 -0
  579. package/node_modules/readable-stream/duplex.js +1 -0
  580. package/node_modules/readable-stream/lib/_stream_duplex.js +131 -0
  581. package/node_modules/readable-stream/lib/_stream_passthrough.js +47 -0
  582. package/node_modules/readable-stream/lib/_stream_readable.js +1019 -0
  583. package/node_modules/readable-stream/lib/_stream_transform.js +214 -0
  584. package/node_modules/readable-stream/lib/_stream_writable.js +685 -0
  585. package/node_modules/readable-stream/lib/internal/streams/BufferList.js +78 -0
  586. package/node_modules/readable-stream/lib/internal/streams/destroy.js +84 -0
  587. package/node_modules/readable-stream/lib/internal/streams/stream-browser.js +1 -0
  588. package/node_modules/readable-stream/lib/internal/streams/stream.js +1 -0
  589. package/node_modules/readable-stream/package.json +52 -0
  590. package/node_modules/readable-stream/passthrough.js +1 -0
  591. package/node_modules/readable-stream/readable-browser.js +7 -0
  592. package/node_modules/readable-stream/readable.js +19 -0
  593. package/node_modules/readable-stream/transform.js +1 -0
  594. package/node_modules/readable-stream/writable-browser.js +1 -0
  595. package/node_modules/readable-stream/writable.js +8 -0
  596. package/node_modules/safe-buffer/LICENSE +21 -0
  597. package/node_modules/safe-buffer/README.md +584 -0
  598. package/node_modules/safe-buffer/index.d.ts +187 -0
  599. package/node_modules/safe-buffer/index.js +62 -0
  600. package/node_modules/safe-buffer/package.json +37 -0
  601. package/node_modules/setimmediate/LICENSE.txt +20 -0
  602. package/node_modules/setimmediate/package.json +30 -0
  603. package/node_modules/setimmediate/setImmediate.js +186 -0
  604. package/node_modules/string_decoder/.travis.yml +50 -0
  605. package/node_modules/string_decoder/LICENSE +48 -0
  606. package/node_modules/string_decoder/README.md +47 -0
  607. package/node_modules/string_decoder/lib/string_decoder.js +296 -0
  608. package/node_modules/string_decoder/package.json +31 -0
  609. package/node_modules/undici-types/README.md +6 -0
  610. package/node_modules/undici-types/agent.d.ts +31 -0
  611. package/node_modules/undici-types/api.d.ts +43 -0
  612. package/node_modules/undici-types/balanced-pool.d.ts +18 -0
  613. package/node_modules/undici-types/cache.d.ts +36 -0
  614. package/node_modules/undici-types/client.d.ts +97 -0
  615. package/node_modules/undici-types/connector.d.ts +34 -0
  616. package/node_modules/undici-types/content-type.d.ts +21 -0
  617. package/node_modules/undici-types/cookies.d.ts +28 -0
  618. package/node_modules/undici-types/diagnostics-channel.d.ts +67 -0
  619. package/node_modules/undici-types/dispatcher.d.ts +241 -0
  620. package/node_modules/undici-types/errors.d.ts +128 -0
  621. package/node_modules/undici-types/fetch.d.ts +209 -0
  622. package/node_modules/undici-types/file.d.ts +39 -0
  623. package/node_modules/undici-types/filereader.d.ts +54 -0
  624. package/node_modules/undici-types/formdata.d.ts +108 -0
  625. package/node_modules/undici-types/global-dispatcher.d.ts +9 -0
  626. package/node_modules/undici-types/global-origin.d.ts +7 -0
  627. package/node_modules/undici-types/handlers.d.ts +9 -0
  628. package/node_modules/undici-types/header.d.ts +4 -0
  629. package/node_modules/undici-types/index.d.ts +63 -0
  630. package/node_modules/undici-types/interceptors.d.ts +5 -0
  631. package/node_modules/undici-types/mock-agent.d.ts +50 -0
  632. package/node_modules/undici-types/mock-client.d.ts +25 -0
  633. package/node_modules/undici-types/mock-errors.d.ts +12 -0
  634. package/node_modules/undici-types/mock-interceptor.d.ts +93 -0
  635. package/node_modules/undici-types/mock-pool.d.ts +25 -0
  636. package/node_modules/undici-types/package.json +55 -0
  637. package/node_modules/undici-types/patch.d.ts +71 -0
  638. package/node_modules/undici-types/pool-stats.d.ts +19 -0
  639. package/node_modules/undici-types/pool.d.ts +28 -0
  640. package/node_modules/undici-types/proxy-agent.d.ts +30 -0
  641. package/node_modules/undici-types/readable.d.ts +61 -0
  642. package/node_modules/undici-types/webidl.d.ts +220 -0
  643. package/node_modules/undici-types/websocket.d.ts +131 -0
  644. package/node_modules/util-deprecate/History.md +16 -0
  645. package/node_modules/util-deprecate/LICENSE +24 -0
  646. package/node_modules/util-deprecate/README.md +53 -0
  647. package/node_modules/util-deprecate/browser.js +67 -0
  648. package/node_modules/util-deprecate/node.js +6 -0
  649. package/node_modules/util-deprecate/package.json +27 -0
  650. package/package.json +54 -21
  651. package/services.json +1 -20
@@ -0,0 +1,68 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ICO = void 0;
4
+ const utils_1 = require("./utils");
5
+ const TYPE_ICON = 1;
6
+ /**
7
+ * ICON Header
8
+ *
9
+ * | Offset | Size | Purpose |
10
+ * | 0 | 2 | Reserved. Must always be 0. |
11
+ * | 2 | 2 | Image type: 1 for icon (.ICO) image, 2 for cursor (.CUR) image. Other values are invalid. |
12
+ * | 4 | 2 | Number of images in the file. |
13
+ *
14
+ */
15
+ const SIZE_HEADER = 2 + 2 + 2; // 6
16
+ /**
17
+ * Image Entry
18
+ *
19
+ * | Offset | Size | Purpose |
20
+ * | 0 | 1 | Image width in pixels. Can be any number between 0 and 255. Value 0 means width is 256 pixels. |
21
+ * | 1 | 1 | Image height in pixels. Can be any number between 0 and 255. Value 0 means height is 256 pixels. |
22
+ * | 2 | 1 | Number of colors in the color palette. Should be 0 if the image does not use a color palette. |
23
+ * | 3 | 1 | Reserved. Should be 0. |
24
+ * | 4 | 2 | ICO format: Color planes. Should be 0 or 1. |
25
+ * | | | CUR format: The horizontal coordinates of the hotspot in number of pixels from the left. |
26
+ * | 6 | 2 | ICO format: Bits per pixel. |
27
+ * | | | CUR format: The vertical coordinates of the hotspot in number of pixels from the top. |
28
+ * | 8 | 4 | The size of the image's data in bytes |
29
+ * | 12 | 4 | The offset of BMP or PNG data from the beginning of the ICO/CUR file |
30
+ *
31
+ */
32
+ const SIZE_IMAGE_ENTRY = 1 + 1 + 1 + 1 + 2 + 2 + 4 + 4; // 16
33
+ function getSizeFromOffset(input, offset) {
34
+ const value = input[offset];
35
+ return value === 0 ? 256 : value;
36
+ }
37
+ function getImageSize(input, imageIndex) {
38
+ const offset = SIZE_HEADER + imageIndex * SIZE_IMAGE_ENTRY;
39
+ return {
40
+ height: getSizeFromOffset(input, offset + 1),
41
+ width: getSizeFromOffset(input, offset),
42
+ };
43
+ }
44
+ exports.ICO = {
45
+ validate(input) {
46
+ const reserved = (0, utils_1.readUInt16LE)(input, 0);
47
+ const imageCount = (0, utils_1.readUInt16LE)(input, 4);
48
+ if (reserved !== 0 || imageCount === 0)
49
+ return false;
50
+ const imageType = (0, utils_1.readUInt16LE)(input, 2);
51
+ return imageType === TYPE_ICON;
52
+ },
53
+ calculate(input) {
54
+ const nbImages = (0, utils_1.readUInt16LE)(input, 4);
55
+ const imageSize = getImageSize(input, 0);
56
+ if (nbImages === 1)
57
+ return imageSize;
58
+ const imgs = [imageSize];
59
+ for (let imageIndex = 1; imageIndex < nbImages; imageIndex += 1) {
60
+ imgs.push(getImageSize(input, imageIndex));
61
+ }
62
+ return {
63
+ height: imageSize.height,
64
+ images: imgs,
65
+ width: imageSize.width,
66
+ };
67
+ },
68
+ };
@@ -0,0 +1,23 @@
1
+ export declare const typeHandlers: {
2
+ bmp: import("./interface").IImage;
3
+ cur: import("./interface").IImage;
4
+ dds: import("./interface").IImage;
5
+ gif: import("./interface").IImage;
6
+ heif: import("./interface").IImage;
7
+ icns: import("./interface").IImage;
8
+ ico: import("./interface").IImage;
9
+ j2c: import("./interface").IImage;
10
+ jp2: import("./interface").IImage;
11
+ jpg: import("./interface").IImage;
12
+ jxl: import("./interface").IImage;
13
+ 'jxl-stream': import("./interface").IImage;
14
+ ktx: import("./interface").IImage;
15
+ png: import("./interface").IImage;
16
+ pnm: import("./interface").IImage;
17
+ psd: import("./interface").IImage;
18
+ svg: import("./interface").IImage;
19
+ tga: import("./interface").IImage;
20
+ tiff: import("./interface").IImage;
21
+ webp: import("./interface").IImage;
22
+ };
23
+ export type imageType = keyof typeof typeHandlers;
@@ -0,0 +1,46 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.typeHandlers = void 0;
4
+ // load all available handlers explicitly for browserify support
5
+ const bmp_1 = require("./bmp");
6
+ const cur_1 = require("./cur");
7
+ const dds_1 = require("./dds");
8
+ const gif_1 = require("./gif");
9
+ const heif_1 = require("./heif");
10
+ const icns_1 = require("./icns");
11
+ const ico_1 = require("./ico");
12
+ const j2c_1 = require("./j2c");
13
+ const jp2_1 = require("./jp2");
14
+ const jpg_1 = require("./jpg");
15
+ const jxl_1 = require("./jxl");
16
+ const jxl_stream_1 = require("./jxl-stream");
17
+ const ktx_1 = require("./ktx");
18
+ const png_1 = require("./png");
19
+ const pnm_1 = require("./pnm");
20
+ const psd_1 = require("./psd");
21
+ const svg_1 = require("./svg");
22
+ const tga_1 = require("./tga");
23
+ const tiff_1 = require("./tiff");
24
+ const webp_1 = require("./webp");
25
+ exports.typeHandlers = {
26
+ bmp: bmp_1.BMP,
27
+ cur: cur_1.CUR,
28
+ dds: dds_1.DDS,
29
+ gif: gif_1.GIF,
30
+ heif: heif_1.HEIF,
31
+ icns: icns_1.ICNS,
32
+ ico: ico_1.ICO,
33
+ j2c: j2c_1.J2C,
34
+ jp2: jp2_1.JP2,
35
+ jpg: jpg_1.JPG,
36
+ jxl: jxl_1.JXL,
37
+ 'jxl-stream': jxl_stream_1.JXLStream,
38
+ ktx: ktx_1.KTX,
39
+ png: png_1.PNG,
40
+ pnm: pnm_1.PNM,
41
+ psd: psd_1.PSD,
42
+ svg: svg_1.SVG,
43
+ tga: tga_1.TGA,
44
+ tiff: tiff_1.TIFF,
45
+ webp: webp_1.WEBP,
46
+ };
@@ -0,0 +1,13 @@
1
+ export interface ISize {
2
+ width: number | undefined;
3
+ height: number | undefined;
4
+ orientation?: number;
5
+ type?: string;
6
+ }
7
+ export type ISizeCalculationResult = {
8
+ images?: ISize[];
9
+ } & ISize;
10
+ export interface IImage {
11
+ validate: (input: Uint8Array) => boolean;
12
+ calculate: (input: Uint8Array, filepath?: string) => ISizeCalculationResult;
13
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,2 @@
1
+ import type { IImage } from './interface';
2
+ export declare const J2C: IImage;
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.J2C = void 0;
4
+ const utils_1 = require("./utils");
5
+ exports.J2C = {
6
+ // TODO: this doesn't seem right. SIZ marker doesn't have to be right after the SOC
7
+ validate: (input) => (0, utils_1.readUInt32BE)(input, 0) === 0xff4fff51,
8
+ calculate: (input) => ({
9
+ height: (0, utils_1.readUInt32BE)(input, 12),
10
+ width: (0, utils_1.readUInt32BE)(input, 8),
11
+ }),
12
+ };
@@ -0,0 +1,2 @@
1
+ import type { IImage } from './interface';
2
+ export declare const JP2: IImage;
@@ -0,0 +1,27 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.JP2 = void 0;
4
+ const utils_1 = require("./utils");
5
+ exports.JP2 = {
6
+ validate(input) {
7
+ const boxType = (0, utils_1.toUTF8String)(input, 4, 8);
8
+ if (boxType !== 'jP ')
9
+ return false;
10
+ const ftypBox = (0, utils_1.findBox)(input, 'ftyp', 0);
11
+ if (!ftypBox)
12
+ return false;
13
+ const brand = (0, utils_1.toUTF8String)(input, ftypBox.offset + 8, ftypBox.offset + 12);
14
+ return brand === 'jp2 ';
15
+ },
16
+ calculate(input) {
17
+ const jp2hBox = (0, utils_1.findBox)(input, 'jp2h', 0);
18
+ const ihdrBox = jp2hBox && (0, utils_1.findBox)(input, 'ihdr', jp2hBox.offset + 8);
19
+ if (ihdrBox) {
20
+ return {
21
+ height: (0, utils_1.readUInt32BE)(input, ihdrBox.offset + 8),
22
+ width: (0, utils_1.readUInt32BE)(input, ihdrBox.offset + 12),
23
+ };
24
+ }
25
+ throw new TypeError('Unsupported JPEG 2000 format');
26
+ },
27
+ };
@@ -0,0 +1,2 @@
1
+ import type { IImage } from './interface';
2
+ export declare const JPG: IImage;
@@ -0,0 +1,123 @@
1
+ "use strict";
2
+ // NOTE: we only support baseline and progressive JPGs here
3
+ // due to the structure of the loader class, we only get a buffer
4
+ // with a maximum size of 4096 bytes. so if the SOF marker is outside
5
+ // if this range we can't detect the file size correctly.
6
+ Object.defineProperty(exports, "__esModule", { value: true });
7
+ exports.JPG = void 0;
8
+ const utils_1 = require("./utils");
9
+ const EXIF_MARKER = '45786966';
10
+ const APP1_DATA_SIZE_BYTES = 2;
11
+ const EXIF_HEADER_BYTES = 6;
12
+ const TIFF_BYTE_ALIGN_BYTES = 2;
13
+ const BIG_ENDIAN_BYTE_ALIGN = '4d4d';
14
+ const LITTLE_ENDIAN_BYTE_ALIGN = '4949';
15
+ // Each entry is exactly 12 bytes
16
+ const IDF_ENTRY_BYTES = 12;
17
+ const NUM_DIRECTORY_ENTRIES_BYTES = 2;
18
+ function isEXIF(input) {
19
+ return (0, utils_1.toHexString)(input, 2, 6) === EXIF_MARKER;
20
+ }
21
+ function extractSize(input, index) {
22
+ return {
23
+ height: (0, utils_1.readUInt16BE)(input, index),
24
+ width: (0, utils_1.readUInt16BE)(input, index + 2),
25
+ };
26
+ }
27
+ function extractOrientation(exifBlock, isBigEndian) {
28
+ // TODO: assert that this contains 0x002A
29
+ // let STATIC_MOTOROLA_TIFF_HEADER_BYTES = 2
30
+ // let TIFF_IMAGE_FILE_DIRECTORY_BYTES = 4
31
+ // TODO: derive from TIFF_IMAGE_FILE_DIRECTORY_BYTES
32
+ const idfOffset = 8;
33
+ // IDF osset works from right after the header bytes
34
+ // (so the offset includes the tiff byte align)
35
+ const offset = EXIF_HEADER_BYTES + idfOffset;
36
+ const idfDirectoryEntries = (0, utils_1.readUInt)(exifBlock, 16, offset, isBigEndian);
37
+ for (let directoryEntryNumber = 0; directoryEntryNumber < idfDirectoryEntries; directoryEntryNumber++) {
38
+ const start = offset +
39
+ NUM_DIRECTORY_ENTRIES_BYTES +
40
+ directoryEntryNumber * IDF_ENTRY_BYTES;
41
+ const end = start + IDF_ENTRY_BYTES;
42
+ // Skip on corrupt EXIF blocks
43
+ if (start > exifBlock.length) {
44
+ return;
45
+ }
46
+ const block = exifBlock.slice(start, end);
47
+ const tagNumber = (0, utils_1.readUInt)(block, 16, 0, isBigEndian);
48
+ // 0x0112 (decimal: 274) is the `orientation` tag ID
49
+ if (tagNumber === 274) {
50
+ const dataFormat = (0, utils_1.readUInt)(block, 16, 2, isBigEndian);
51
+ if (dataFormat !== 3) {
52
+ return;
53
+ }
54
+ // unsinged int has 2 bytes per component
55
+ // if there would more than 4 bytes in total it's a pointer
56
+ const numberOfComponents = (0, utils_1.readUInt)(block, 32, 4, isBigEndian);
57
+ if (numberOfComponents !== 1) {
58
+ return;
59
+ }
60
+ return (0, utils_1.readUInt)(block, 16, 8, isBigEndian);
61
+ }
62
+ }
63
+ }
64
+ function validateExifBlock(input, index) {
65
+ // Skip APP1 Data Size
66
+ const exifBlock = input.slice(APP1_DATA_SIZE_BYTES, index);
67
+ // Consider byte alignment
68
+ const byteAlign = (0, utils_1.toHexString)(exifBlock, EXIF_HEADER_BYTES, EXIF_HEADER_BYTES + TIFF_BYTE_ALIGN_BYTES);
69
+ // Ignore Empty EXIF. Validate byte alignment
70
+ const isBigEndian = byteAlign === BIG_ENDIAN_BYTE_ALIGN;
71
+ const isLittleEndian = byteAlign === LITTLE_ENDIAN_BYTE_ALIGN;
72
+ if (isBigEndian || isLittleEndian) {
73
+ return extractOrientation(exifBlock, isBigEndian);
74
+ }
75
+ }
76
+ function validateInput(input, index) {
77
+ // index should be within buffer limits
78
+ if (index > input.length) {
79
+ throw new TypeError('Corrupt JPG, exceeded buffer limits');
80
+ }
81
+ }
82
+ exports.JPG = {
83
+ validate: (input) => (0, utils_1.toHexString)(input, 0, 2) === 'ffd8',
84
+ calculate(input) {
85
+ // Skip 4 chars, they are for signature
86
+ input = input.slice(4);
87
+ let orientation;
88
+ let next;
89
+ while (input.length) {
90
+ // read length of the next block
91
+ const i = (0, utils_1.readUInt16BE)(input, 0);
92
+ // Every JPEG block must begin with a 0xFF
93
+ if (input[i] !== 0xff) {
94
+ input = input.slice(1);
95
+ continue;
96
+ }
97
+ if (isEXIF(input)) {
98
+ orientation = validateExifBlock(input, i);
99
+ }
100
+ // ensure correct format
101
+ validateInput(input, i);
102
+ // 0xFFC0 is baseline standard(SOF)
103
+ // 0xFFC1 is baseline optimized(SOF)
104
+ // 0xFFC2 is progressive(SOF2)
105
+ next = input[i + 1];
106
+ if (next === 0xc0 || next === 0xc1 || next === 0xc2) {
107
+ const size = extractSize(input, i + 5);
108
+ // TODO: is orientation=0 a valid answer here?
109
+ if (!orientation) {
110
+ return size;
111
+ }
112
+ return {
113
+ height: size.height,
114
+ orientation,
115
+ width: size.width,
116
+ };
117
+ }
118
+ // move to the next block
119
+ input = input.slice(i + 2);
120
+ }
121
+ throw new TypeError('Invalid JPG, no size found');
122
+ },
123
+ };
@@ -0,0 +1,2 @@
1
+ import type { IImage } from './interface';
2
+ export declare const JXLStream: IImage;
@@ -0,0 +1,45 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.JXLStream = void 0;
4
+ const utils_1 = require("./utils");
5
+ const bit_reader_1 = require("../utils/bit-reader");
6
+ function calculateImageDimension(reader, isSmallImage) {
7
+ if (isSmallImage) {
8
+ // Small images are multiples of 8 pixels, up to 256 pixels
9
+ return 8 * (1 + reader.getBits(5));
10
+ }
11
+ else {
12
+ // Larger images use a variable bit-length encoding
13
+ const sizeClass = reader.getBits(2);
14
+ const extraBits = [9, 13, 18, 30][sizeClass];
15
+ return 1 + reader.getBits(extraBits);
16
+ }
17
+ }
18
+ function calculateImageWidth(reader, isSmallImage, widthMode, height) {
19
+ if (isSmallImage && widthMode === 0) {
20
+ // Small square images
21
+ return 8 * (1 + reader.getBits(5));
22
+ }
23
+ else if (widthMode === 0) {
24
+ // Non-small images with explicitly coded width
25
+ return calculateImageDimension(reader, false);
26
+ }
27
+ else {
28
+ // Images with width derived from height and aspect ratio
29
+ const aspectRatios = [1, 1.2, 4 / 3, 1.5, 16 / 9, 5 / 4, 2];
30
+ return Math.floor(height * aspectRatios[widthMode - 1]);
31
+ }
32
+ }
33
+ exports.JXLStream = {
34
+ validate: (input) => {
35
+ return (0, utils_1.toHexString)(input, 0, 2) === 'ff0a';
36
+ },
37
+ calculate(input) {
38
+ const reader = new bit_reader_1.BitReader(input, 'little-endian');
39
+ const isSmallImage = reader.getBits(1) === 1;
40
+ const height = calculateImageDimension(reader, isSmallImage);
41
+ const widthMode = reader.getBits(3);
42
+ const width = calculateImageWidth(reader, isSmallImage, widthMode, height);
43
+ return { width, height };
44
+ },
45
+ };
@@ -0,0 +1,2 @@
1
+ import type { IImage } from './interface';
2
+ export declare const JXL: IImage;
@@ -0,0 +1,59 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.JXL = void 0;
4
+ const utils_1 = require("./utils");
5
+ const jxl_stream_1 = require("./jxl-stream");
6
+ /** Extracts the codestream from a containerized JPEG XL image */
7
+ function extractCodestream(input) {
8
+ const jxlcBox = (0, utils_1.findBox)(input, 'jxlc', 0);
9
+ if (jxlcBox) {
10
+ return input.slice(jxlcBox.offset + 8, jxlcBox.offset + jxlcBox.size);
11
+ }
12
+ const partialStreams = extractPartialStreams(input);
13
+ if (partialStreams.length > 0) {
14
+ return concatenateCodestreams(partialStreams);
15
+ }
16
+ return undefined;
17
+ }
18
+ /** Extracts partial codestreams from jxlp boxes */
19
+ function extractPartialStreams(input) {
20
+ const partialStreams = [];
21
+ let offset = 0;
22
+ while (offset < input.length) {
23
+ const jxlpBox = (0, utils_1.findBox)(input, 'jxlp', offset);
24
+ if (!jxlpBox)
25
+ break;
26
+ partialStreams.push(input.slice(jxlpBox.offset + 12, jxlpBox.offset + jxlpBox.size));
27
+ offset = jxlpBox.offset + jxlpBox.size;
28
+ }
29
+ return partialStreams;
30
+ }
31
+ /** Concatenates partial codestreams into a single codestream */
32
+ function concatenateCodestreams(partialCodestreams) {
33
+ const totalLength = partialCodestreams.reduce((acc, curr) => acc + curr.length, 0);
34
+ const codestream = new Uint8Array(totalLength);
35
+ let position = 0;
36
+ for (const partial of partialCodestreams) {
37
+ codestream.set(partial, position);
38
+ position += partial.length;
39
+ }
40
+ return codestream;
41
+ }
42
+ exports.JXL = {
43
+ validate: (input) => {
44
+ const boxType = (0, utils_1.toUTF8String)(input, 4, 8);
45
+ if (boxType !== 'JXL ')
46
+ return false;
47
+ const ftypBox = (0, utils_1.findBox)(input, 'ftyp', 0);
48
+ if (!ftypBox)
49
+ return false;
50
+ const brand = (0, utils_1.toUTF8String)(input, ftypBox.offset + 8, ftypBox.offset + 12);
51
+ return brand === 'jxl ';
52
+ },
53
+ calculate(input) {
54
+ const codestream = extractCodestream(input);
55
+ if (codestream)
56
+ return jxl_stream_1.JXLStream.calculate(codestream);
57
+ throw new Error('No codestream found in JXL container');
58
+ },
59
+ };
@@ -0,0 +1,2 @@
1
+ import type { IImage } from './interface';
2
+ export declare const KTX: IImage;
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.KTX = void 0;
4
+ const utils_1 = require("./utils");
5
+ exports.KTX = {
6
+ validate: (input) => {
7
+ const signature = (0, utils_1.toUTF8String)(input, 1, 7);
8
+ return ['KTX 11', 'KTX 20'].includes(signature);
9
+ },
10
+ calculate: (input) => {
11
+ const type = input[5] === 0x31 ? 'ktx' : 'ktx2';
12
+ const offset = type === 'ktx' ? 36 : 20;
13
+ return {
14
+ height: (0, utils_1.readUInt32LE)(input, offset + 4),
15
+ width: (0, utils_1.readUInt32LE)(input, offset),
16
+ type,
17
+ };
18
+ },
19
+ };
@@ -0,0 +1,2 @@
1
+ import type { IImage } from './interface';
2
+ export declare const PNG: IImage;
@@ -0,0 +1,35 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.PNG = void 0;
4
+ const utils_1 = require("./utils");
5
+ const pngSignature = 'PNG\r\n\x1a\n';
6
+ const pngImageHeaderChunkName = 'IHDR';
7
+ // Used to detect "fried" png's: http://www.jongware.com/pngdefry.html
8
+ const pngFriedChunkName = 'CgBI';
9
+ exports.PNG = {
10
+ validate(input) {
11
+ if (pngSignature === (0, utils_1.toUTF8String)(input, 1, 8)) {
12
+ let chunkName = (0, utils_1.toUTF8String)(input, 12, 16);
13
+ if (chunkName === pngFriedChunkName) {
14
+ chunkName = (0, utils_1.toUTF8String)(input, 28, 32);
15
+ }
16
+ if (chunkName !== pngImageHeaderChunkName) {
17
+ throw new TypeError('Invalid PNG');
18
+ }
19
+ return true;
20
+ }
21
+ return false;
22
+ },
23
+ calculate(input) {
24
+ if ((0, utils_1.toUTF8String)(input, 12, 16) === pngFriedChunkName) {
25
+ return {
26
+ height: (0, utils_1.readUInt32BE)(input, 36),
27
+ width: (0, utils_1.readUInt32BE)(input, 32),
28
+ };
29
+ }
30
+ return {
31
+ height: (0, utils_1.readUInt32BE)(input, 20),
32
+ width: (0, utils_1.readUInt32BE)(input, 16),
33
+ };
34
+ },
35
+ };
@@ -0,0 +1,2 @@
1
+ import type { IImage } from './interface';
2
+ export declare const PNM: IImage;
@@ -0,0 +1,72 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.PNM = void 0;
4
+ const utils_1 = require("./utils");
5
+ const PNMTypes = {
6
+ P1: 'pbm/ascii',
7
+ P2: 'pgm/ascii',
8
+ P3: 'ppm/ascii',
9
+ P4: 'pbm',
10
+ P5: 'pgm',
11
+ P6: 'ppm',
12
+ P7: 'pam',
13
+ PF: 'pfm',
14
+ };
15
+ const handlers = {
16
+ default: (lines) => {
17
+ let dimensions = [];
18
+ while (lines.length > 0) {
19
+ const line = lines.shift();
20
+ if (line[0] === '#') {
21
+ continue;
22
+ }
23
+ dimensions = line.split(' ');
24
+ break;
25
+ }
26
+ if (dimensions.length === 2) {
27
+ return {
28
+ height: parseInt(dimensions[1], 10),
29
+ width: parseInt(dimensions[0], 10),
30
+ };
31
+ }
32
+ else {
33
+ throw new TypeError('Invalid PNM');
34
+ }
35
+ },
36
+ pam: (lines) => {
37
+ const size = {};
38
+ while (lines.length > 0) {
39
+ const line = lines.shift();
40
+ if (line.length > 16 || line.charCodeAt(0) > 128) {
41
+ continue;
42
+ }
43
+ const [key, value] = line.split(' ');
44
+ if (key && value) {
45
+ size[key.toLowerCase()] = parseInt(value, 10);
46
+ }
47
+ if (size.height && size.width) {
48
+ break;
49
+ }
50
+ }
51
+ if (size.height && size.width) {
52
+ return {
53
+ height: size.height,
54
+ width: size.width,
55
+ };
56
+ }
57
+ else {
58
+ throw new TypeError('Invalid PAM');
59
+ }
60
+ },
61
+ };
62
+ exports.PNM = {
63
+ validate: (input) => (0, utils_1.toUTF8String)(input, 0, 2) in PNMTypes,
64
+ calculate(input) {
65
+ const signature = (0, utils_1.toUTF8String)(input, 0, 2);
66
+ const type = PNMTypes[signature];
67
+ // TODO: this probably generates garbage. move to a stream based parser
68
+ const lines = (0, utils_1.toUTF8String)(input, 3).split(/[\r\n]+/);
69
+ const handler = handlers[type] || handlers.default;
70
+ return handler(lines);
71
+ },
72
+ };
@@ -0,0 +1,2 @@
1
+ import type { IImage } from './interface';
2
+ export declare const PSD: IImage;
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.PSD = void 0;
4
+ const utils_1 = require("./utils");
5
+ exports.PSD = {
6
+ validate: (input) => (0, utils_1.toUTF8String)(input, 0, 4) === '8BPS',
7
+ calculate: (input) => ({
8
+ height: (0, utils_1.readUInt32BE)(input, 14),
9
+ width: (0, utils_1.readUInt32BE)(input, 18),
10
+ }),
11
+ };
@@ -0,0 +1,2 @@
1
+ import type { IImage } from './interface';
2
+ export declare const SVG: IImage;