taglib-wasm 2.2.3 → 2.3.1

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 (630) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +206 -21
  3. package/dist/_virtual/_@oxc-project_runtime@0.152.0/helpers/esm/assertClassBrand.js +7 -0
  4. package/dist/_virtual/_@oxc-project_runtime@0.152.0/helpers/esm/checkPrivateRedeclaration.js +6 -0
  5. package/dist/_virtual/_@oxc-project_runtime@0.152.0/helpers/esm/classPrivateFieldGet2.js +7 -0
  6. package/dist/_virtual/_@oxc-project_runtime@0.152.0/helpers/esm/classPrivateFieldInitSpec.js +7 -0
  7. package/dist/_virtual/_@oxc-project_runtime@0.152.0/helpers/esm/classPrivateFieldSet2.js +7 -0
  8. package/dist/_virtual/_@oxc-project_runtime@0.152.0/helpers/esm/defineProperty.js +12 -0
  9. package/dist/_virtual/_@oxc-project_runtime@0.152.0/helpers/esm/toPrimitive.js +14 -0
  10. package/dist/_virtual/_@oxc-project_runtime@0.152.0/helpers/esm/toPropertyKey.js +9 -0
  11. package/dist/_virtual/_@oxc-project_runtime@0.152.0/helpers/esm/typeof.js +11 -0
  12. package/dist/_virtual/_@oxc-project_runtime@0.152.0/helpers/esm/usingCtx.js +57 -0
  13. package/dist/_virtual/_rolldown/runtime.js +13 -0
  14. package/dist/bwf/bext.d.ts.map +1 -0
  15. package/dist/bwf/bext.js +119 -0
  16. package/dist/{src/constants → constants}/additional-properties.d.ts.map +1 -1
  17. package/dist/constants/additional-properties.js +270 -0
  18. package/dist/constants/basic-properties.d.ts.map +1 -0
  19. package/dist/constants/basic-properties.js +128 -0
  20. package/dist/constants/complex-properties.d.ts.map +1 -0
  21. package/dist/constants/complex-properties.js +1 -0
  22. package/dist/constants/format-mappings.d.ts.map +1 -0
  23. package/dist/constants/format-mappings.js +58 -0
  24. package/dist/{src/constants → constants}/general-extended-properties.d.ts.map +1 -1
  25. package/dist/constants/general-extended-properties.js +272 -0
  26. package/dist/constants/index.d.ts.map +1 -0
  27. package/dist/constants/index.js +5 -0
  28. package/dist/{src/constants → constants}/properties.d.ts +1 -1
  29. package/dist/constants/properties.d.ts.map +1 -0
  30. package/dist/constants/properties.js +105 -0
  31. package/dist/constants/property-types.d.ts.map +1 -0
  32. package/dist/constants/property-types.js +1 -0
  33. package/dist/{src/constants → constants}/specialized-properties.d.ts.map +1 -1
  34. package/dist/constants/specialized-properties.js +335 -0
  35. package/dist/{src/constants → constants}/utilities.d.ts +1 -1
  36. package/dist/constants/utilities.d.ts.map +1 -0
  37. package/dist/constants/utilities.js +50 -0
  38. package/dist/constants.d.ts.map +1 -0
  39. package/dist/constants.js +5 -0
  40. package/dist/{src/deno-compile.d.ts → deno-compile.d.ts} +4 -2
  41. package/dist/deno-compile.d.ts.map +1 -0
  42. package/dist/deno-compile.js +109 -0
  43. package/dist/disc-folder.d.ts +4 -4
  44. package/dist/disc-folder.d.ts.map +1 -1
  45. package/dist/disc-folder.js +596 -544
  46. package/dist/errors/base.d.ts +38 -0
  47. package/dist/errors/base.d.ts.map +1 -0
  48. package/dist/errors/base.js +66 -0
  49. package/dist/errors/classes.d.ts.map +1 -0
  50. package/dist/errors/classes.js +164 -0
  51. package/dist/errors/guards.d.ts.map +1 -0
  52. package/dist/errors/guards.js +26 -0
  53. package/dist/errors/index.d.ts.map +1 -0
  54. package/dist/errors/index.js +4 -0
  55. package/dist/errors.d.ts.map +1 -0
  56. package/dist/errors.js +5 -0
  57. package/dist/file-utils/copy-and-find.d.ts.map +1 -0
  58. package/dist/file-utils/copy-and-find.js +107 -0
  59. package/dist/file-utils/export-operations.d.ts.map +1 -0
  60. package/dist/file-utils/export-operations.js +84 -0
  61. package/dist/file-utils/import-operations.d.ts.map +1 -0
  62. package/dist/file-utils/import-operations.js +109 -0
  63. package/dist/file-utils/index.d.ts.map +1 -0
  64. package/dist/file-utils/index.js +5 -0
  65. package/dist/file-utils/mime-detection.d.ts.map +1 -0
  66. package/dist/file-utils/mime-detection.js +44 -0
  67. package/dist/folder-api/album-corroborate.d.ts.map +1 -0
  68. package/dist/folder-api/album-corroborate.js +35 -0
  69. package/dist/folder-api/album-discs.d.ts.map +1 -0
  70. package/dist/folder-api/album-discs.js +119 -0
  71. package/dist/folder-api/album-grouping.d.ts.map +1 -0
  72. package/dist/folder-api/album-grouping.js +161 -0
  73. package/dist/folder-api/album-identity.d.ts.map +1 -0
  74. package/dist/folder-api/album-identity.js +165 -0
  75. package/dist/folder-api/album-types.d.ts.map +1 -0
  76. package/dist/folder-api/album-types.js +1 -0
  77. package/dist/folder-api/directory-walker.d.ts.map +1 -0
  78. package/dist/folder-api/directory-walker.js +27 -0
  79. package/dist/folder-api/file-processors.d.ts.map +1 -0
  80. package/dist/folder-api/file-processors.js +52 -0
  81. package/dist/folder-api/folder-disc.d.ts.map +1 -0
  82. package/dist/folder-api/folder-disc.js +166 -0
  83. package/dist/folder-api/folder-operations.d.ts.map +1 -0
  84. package/dist/folder-api/folder-operations.js +69 -0
  85. package/dist/folder-api/index.d.ts.map +1 -0
  86. package/dist/{src/folder-api → folder-api}/index.js +1 -8
  87. package/dist/folder-api/scan-for-albums.d.ts.map +1 -0
  88. package/dist/folder-api/scan-for-albums.js +25 -0
  89. package/dist/folder-api/scan-operations.d.ts.map +1 -0
  90. package/dist/folder-api/scan-operations.js +79 -0
  91. package/dist/folder-api/types.d.ts.map +1 -0
  92. package/dist/folder-api/types.js +21 -0
  93. package/dist/folder.d.ts +1 -1
  94. package/dist/folder.d.ts.map +1 -1
  95. package/dist/folder.js +7 -2
  96. package/dist/global.d.js +1 -0
  97. package/dist/index.browser.d.ts +40 -21
  98. package/dist/index.browser.d.ts.map +1 -1
  99. package/dist/index.browser.js +4194 -3656
  100. package/dist/index.d.ts +26 -25
  101. package/dist/index.d.ts.map +1 -1
  102. package/dist/index.js +40 -183
  103. package/dist/msgpack/decoder.d.ts.map +1 -0
  104. package/dist/msgpack/decoder.js +177 -0
  105. package/dist/msgpack/encoder.d.ts.map +1 -0
  106. package/dist/msgpack/encoder.js +211 -0
  107. package/dist/msgpack/index.d.ts.map +1 -0
  108. package/dist/msgpack/index.js +5 -0
  109. package/dist/{src/msgpack → msgpack}/types.d.ts +1 -1
  110. package/dist/msgpack/types.d.ts.map +1 -0
  111. package/dist/msgpack/types.js +13 -0
  112. package/dist/msgpack/utils.d.ts.map +1 -0
  113. package/dist/msgpack/utils.js +116 -0
  114. package/dist/rating.d.ts +1 -1
  115. package/dist/rating.d.ts.map +1 -1
  116. package/dist/rating.js +2 -2
  117. package/dist/runtime/deno-detect.d.ts.map +1 -0
  118. package/dist/runtime/deno-detect.js +12 -0
  119. package/dist/{src/runtime → runtime}/detector.d.ts +2 -0
  120. package/dist/runtime/detector.d.ts.map +1 -0
  121. package/dist/runtime/detector.js +173 -0
  122. package/dist/runtime/loader-types.d.ts.map +1 -0
  123. package/dist/runtime/loader-types.js +23 -0
  124. package/dist/runtime/module-loader-browser.d.ts.map +1 -0
  125. package/dist/runtime/module-loader-browser.js +33 -0
  126. package/dist/runtime/module-loader.d.ts.map +1 -0
  127. package/dist/runtime/module-loader.js +119 -0
  128. package/dist/runtime/platform-io.d.ts.map +1 -0
  129. package/dist/runtime/platform-io.js +153 -0
  130. package/dist/runtime/unified-loader/index.d.ts.map +1 -0
  131. package/dist/{src/runtime → runtime}/unified-loader/index.js +1 -7
  132. package/dist/runtime/unified-loader/loader.d.ts.map +1 -0
  133. package/dist/runtime/unified-loader/loader.js +64 -0
  134. package/dist/runtime/unified-loader/module-loading.d.ts.map +1 -0
  135. package/dist/runtime/unified-loader/module-loading.js +90 -0
  136. package/dist/runtime/unified-loader/module-selection.d.ts.map +1 -0
  137. package/dist/runtime/unified-loader/module-selection.js +25 -0
  138. package/dist/runtime/unified-loader/types.d.ts.map +1 -0
  139. package/dist/runtime/unified-loader/types.js +24 -0
  140. package/dist/{src/runtime → runtime}/wasi-adapter/adapter.d.ts +13 -1
  141. package/dist/runtime/wasi-adapter/adapter.d.ts.map +1 -0
  142. package/dist/runtime/wasi-adapter/adapter.js +114 -0
  143. package/dist/{src/runtime → runtime}/wasi-adapter/audio-properties.d.ts +4 -1
  144. package/dist/runtime/wasi-adapter/audio-properties.d.ts.map +1 -0
  145. package/dist/runtime/wasi-adapter/audio-properties.js +120 -0
  146. package/dist/runtime/wasi-adapter/file-handle.d.ts.map +1 -0
  147. package/dist/runtime/wasi-adapter/file-handle.js +181 -0
  148. package/dist/runtime/wasi-adapter/handle-state.d.ts.map +1 -0
  149. package/dist/runtime/wasi-adapter/handle-state.js +48 -0
  150. package/dist/runtime/wasi-adapter/index.d.ts.map +1 -0
  151. package/dist/{src/runtime → runtime}/wasi-adapter/index.js +1 -3
  152. package/dist/runtime/wasi-adapter/mp4-items.d.ts.map +1 -0
  153. package/dist/runtime/wasi-adapter/mp4-items.js +97 -0
  154. package/dist/runtime/wasi-adapter/path-open.d.ts +68 -0
  155. package/dist/runtime/wasi-adapter/path-open.d.ts.map +1 -0
  156. package/dist/runtime/wasi-adapter/path-open.js +101 -0
  157. package/dist/runtime/wasi-adapter/property-surface.d.ts.map +1 -0
  158. package/dist/runtime/wasi-adapter/property-surface.js +96 -0
  159. package/dist/runtime/wasi-adapter/structured-fields.d.ts.map +1 -0
  160. package/dist/runtime/wasi-adapter/structured-fields.js +144 -0
  161. package/dist/runtime/wasi-adapter/tag-keys.d.ts.map +1 -0
  162. package/dist/runtime/wasi-adapter/tag-keys.js +65 -0
  163. package/dist/runtime/wasi-adapter/wasm-io.d.ts.map +1 -0
  164. package/dist/runtime/wasi-adapter/wasm-io.js +154 -0
  165. package/dist/runtime/wasi-fs-deno.d.ts.map +1 -0
  166. package/dist/runtime/wasi-fs-deno.js +25 -0
  167. package/dist/runtime/wasi-fs-node.d.ts.map +1 -0
  168. package/dist/runtime/wasi-fs-node.js +58 -0
  169. package/dist/runtime/wasi-fs-provider.d.ts.map +1 -0
  170. package/dist/runtime/wasi-fs-provider.js +1 -0
  171. package/dist/runtime/wasi-host-loader.d.ts.map +1 -0
  172. package/dist/runtime/wasi-host-loader.js +101 -0
  173. package/dist/runtime/wasi-host.d.ts.map +1 -0
  174. package/dist/runtime/wasi-host.js +199 -0
  175. package/dist/runtime/wasi-memory.d.ts.map +1 -0
  176. package/dist/runtime/wasi-memory.js +179 -0
  177. package/dist/{src/runtime → runtime}/wasmer-sdk-loader/types.d.ts +13 -0
  178. package/dist/runtime/wasmer-sdk-loader/types.d.ts.map +1 -0
  179. package/dist/runtime/wasmer-sdk-loader/types.js +15 -0
  180. package/dist/simple/batch-operations.d.ts.map +1 -0
  181. package/dist/simple/batch-operations.js +245 -0
  182. package/dist/simple/checksum-operations.d.ts +25 -0
  183. package/dist/simple/checksum-operations.d.ts.map +1 -0
  184. package/dist/simple/checksum-operations.js +28 -0
  185. package/dist/simple/config.d.ts.map +1 -0
  186. package/dist/simple/config.js +17 -0
  187. package/dist/{src/simple → simple}/index.d.ts +2 -0
  188. package/dist/simple/index.d.ts.map +1 -0
  189. package/dist/simple/index.js +8 -0
  190. package/dist/simple/picture-operations.d.ts.map +1 -0
  191. package/dist/simple/picture-operations.js +132 -0
  192. package/dist/simple/tag-operations.d.ts.map +1 -0
  193. package/dist/simple/tag-operations.js +125 -0
  194. package/dist/simple/with-audio-file.d.ts.map +1 -0
  195. package/dist/simple/with-audio-file.js +28 -0
  196. package/dist/simple.browser.d.ts +2 -2
  197. package/dist/simple.browser.d.ts.map +1 -1
  198. package/dist/simple.browser.js +3462 -3425
  199. package/dist/simple.d.ts +1 -1
  200. package/dist/simple.d.ts.map +1 -1
  201. package/dist/simple.js +8 -2
  202. package/dist/taglib/audio-file-base.d.ts.map +1 -0
  203. package/dist/taglib/audio-file-base.js +166 -0
  204. package/dist/taglib/audio-file-bwf.d.ts.map +1 -0
  205. package/dist/taglib/audio-file-bwf.js +33 -0
  206. package/dist/taglib/audio-file-checksum.d.ts +47 -0
  207. package/dist/taglib/audio-file-checksum.d.ts.map +1 -0
  208. package/dist/taglib/audio-file-checksum.js +90 -0
  209. package/dist/{src/taglib → taglib}/audio-file-impl.d.ts +4 -0
  210. package/dist/taglib/audio-file-impl.d.ts.map +1 -0
  211. package/dist/taglib/audio-file-impl.js +234 -0
  212. package/dist/{src/taglib → taglib}/audio-file-interface.d.ts +17 -0
  213. package/dist/taglib/audio-file-interface.d.ts.map +1 -0
  214. package/dist/taglib/audio-file-interface.js +1 -0
  215. package/dist/taglib/auto-dispose.d.ts.map +1 -0
  216. package/dist/taglib/auto-dispose.js +34 -0
  217. package/dist/taglib/embind-adapter.d.ts.map +1 -0
  218. package/dist/taglib/embind-adapter.js +137 -0
  219. package/dist/taglib/extra-state-registry.d.ts.map +1 -0
  220. package/dist/taglib/extra-state-registry.js +72 -0
  221. package/dist/{src/taglib → taglib}/id3v2-frames.d.ts +0 -1
  222. package/dist/taglib/id3v2-frames.d.ts.map +1 -0
  223. package/dist/taglib/id3v2-frames.js +25 -0
  224. package/dist/taglib/index.d.ts.map +1 -0
  225. package/dist/taglib/index.js +7 -0
  226. package/dist/taglib/load-audio-data.d.ts.map +1 -0
  227. package/dist/taglib/load-audio-data.js +54 -0
  228. package/dist/taglib/media-ranges.d.ts +85 -0
  229. package/dist/taglib/media-ranges.d.ts.map +1 -0
  230. package/dist/taglib/media-ranges.js +309 -0
  231. package/dist/taglib/metadata-extent.d.ts +96 -0
  232. package/dist/taglib/metadata-extent.d.ts.map +1 -0
  233. package/dist/taglib/metadata-extent.js +394 -0
  234. package/dist/taglib/mp4-item-names.d.ts.map +1 -0
  235. package/dist/taglib/mp4-item-names.js +14 -0
  236. package/dist/taglib/mutable-tag-impl.d.ts.map +1 -0
  237. package/dist/taglib/mutable-tag-impl.js +81 -0
  238. package/dist/taglib/mutable-tag.d.ts.map +1 -0
  239. package/dist/taglib/mutable-tag.js +1 -0
  240. package/dist/taglib/save-reconstruct.d.ts.map +1 -0
  241. package/dist/taglib/save-reconstruct.js +53 -0
  242. package/dist/taglib/taglib-class.d.ts.map +1 -0
  243. package/dist/taglib/taglib-class.js +146 -0
  244. package/dist/taglib-wasi.wasm +0 -0
  245. package/dist/taglib-web.wasm +0 -0
  246. package/dist/taglib-wrapper.js +1 -1
  247. package/dist/taglib.d.ts.map +1 -0
  248. package/dist/taglib.js +7 -0
  249. package/dist/types/audio-formats.d.ts.map +1 -0
  250. package/dist/types/audio-formats.js +6 -0
  251. package/dist/types/bwf.d.ts.map +1 -0
  252. package/dist/types/bwf.js +1 -0
  253. package/dist/types/chapters.d.ts.map +1 -0
  254. package/dist/types/chapters.js +1 -0
  255. package/dist/types/config.d.ts.map +1 -0
  256. package/dist/types/config.js +1 -0
  257. package/dist/types/format-property-keys.d.ts.map +1 -0
  258. package/dist/types/format-property-keys.js +1 -0
  259. package/dist/types/index.d.ts.map +1 -0
  260. package/dist/types/index.js +9 -0
  261. package/dist/types/metadata-mappings.d.ts.map +1 -0
  262. package/dist/types/metadata-mappings.js +323 -0
  263. package/dist/types/pictures.d.ts.map +1 -0
  264. package/dist/types/pictures.js +79 -0
  265. package/dist/types/tags.d.ts.map +1 -0
  266. package/dist/types/tags.js +1 -0
  267. package/dist/types.d.ts.map +1 -0
  268. package/dist/types.js +5 -0
  269. package/dist/utils/file.d.ts.map +1 -0
  270. package/dist/utils/file.js +43 -0
  271. package/dist/utils/mirror-fields.d.ts.map +1 -0
  272. package/dist/utils/mirror-fields.js +107 -0
  273. package/dist/utils/node-fs.d.ts.map +1 -0
  274. package/dist/utils/node-fs.js +36 -0
  275. package/dist/utils/path.d.ts +26 -0
  276. package/dist/utils/path.d.ts.map +1 -0
  277. package/dist/utils/path.js +52 -0
  278. package/dist/utils/rating.d.ts.map +1 -0
  279. package/dist/utils/rating.js +150 -0
  280. package/dist/utils/tag-mapping.d.ts.map +1 -0
  281. package/dist/utils/tag-mapping.js +207 -0
  282. package/dist/utils/write.d.ts.map +1 -0
  283. package/dist/utils/write.js +18 -0
  284. package/dist/version.d.ts +2 -0
  285. package/dist/version.d.ts.map +1 -0
  286. package/dist/version.js +4 -0
  287. package/dist/{src/wasm.d.ts → wasm.d.ts} +9 -0
  288. package/dist/wasm.d.ts.map +1 -0
  289. package/dist/wasm.js +1 -0
  290. package/dist/web-utils/canvas.d.ts.map +1 -0
  291. package/dist/web-utils/canvas.js +97 -0
  292. package/dist/web-utils/data-url.d.ts.map +1 -0
  293. package/dist/web-utils/data-url.js +54 -0
  294. package/dist/web-utils/dom-integration.d.ts.map +1 -0
  295. package/dist/web-utils/dom-integration.js +105 -0
  296. package/dist/web-utils/index.d.ts.map +1 -0
  297. package/dist/web-utils/index.js +4 -0
  298. package/dist/web.browser.d.ts +13 -0
  299. package/dist/web.browser.d.ts.map +1 -0
  300. package/dist/web.browser.js +3387 -0
  301. package/dist/web.d.ts +1 -1
  302. package/dist/web.d.ts.map +1 -1
  303. package/dist/web.js +5 -2
  304. package/package.json +140 -97
  305. package/dist/src/bwf/bext.d.ts.map +0 -1
  306. package/dist/src/bwf/bext.js +0 -126
  307. package/dist/src/constants/additional-properties.js +0 -204
  308. package/dist/src/constants/basic-properties.d.ts.map +0 -1
  309. package/dist/src/constants/basic-properties.js +0 -89
  310. package/dist/src/constants/complex-properties.d.ts.map +0 -1
  311. package/dist/src/constants/complex-properties.js +0 -0
  312. package/dist/src/constants/format-mappings.d.ts.map +0 -1
  313. package/dist/src/constants/format-mappings.js +0 -54
  314. package/dist/src/constants/general-extended-properties.js +0 -254
  315. package/dist/src/constants/index.d.ts.map +0 -1
  316. package/dist/src/constants/index.js +0 -4
  317. package/dist/src/constants/properties.d.ts.map +0 -1
  318. package/dist/src/constants/properties.js +0 -95
  319. package/dist/src/constants/property-types.d.ts.map +0 -1
  320. package/dist/src/constants/property-types.js +0 -0
  321. package/dist/src/constants/specialized-properties.js +0 -223
  322. package/dist/src/constants/utilities.d.ts.map +0 -1
  323. package/dist/src/constants/utilities.js +0 -33
  324. package/dist/src/constants.d.ts.map +0 -1
  325. package/dist/src/constants.js +0 -1
  326. package/dist/src/deno-compile.d.ts.map +0 -1
  327. package/dist/src/deno-compile.js +0 -75
  328. package/dist/src/errors/base.d.ts +0 -23
  329. package/dist/src/errors/base.d.ts.map +0 -1
  330. package/dist/src/errors/base.js +0 -31
  331. package/dist/src/errors/classes.d.ts.map +0 -1
  332. package/dist/src/errors/classes.js +0 -170
  333. package/dist/src/errors/guards.d.ts.map +0 -1
  334. package/dist/src/errors/guards.js +0 -39
  335. package/dist/src/errors/index.d.ts.map +0 -1
  336. package/dist/src/errors/index.js +0 -39
  337. package/dist/src/errors.d.ts.map +0 -1
  338. package/dist/src/errors.js +0 -1
  339. package/dist/src/file-utils/copy-and-find.d.ts.map +0 -1
  340. package/dist/src/file-utils/copy-and-find.js +0 -89
  341. package/dist/src/file-utils/export-operations.d.ts.map +0 -1
  342. package/dist/src/file-utils/export-operations.js +0 -40
  343. package/dist/src/file-utils/import-operations.d.ts.map +0 -1
  344. package/dist/src/file-utils/import-operations.js +0 -42
  345. package/dist/src/file-utils/index.d.ts.map +0 -1
  346. package/dist/src/file-utils/index.js +0 -26
  347. package/dist/src/file-utils/mime-detection.d.ts.map +0 -1
  348. package/dist/src/file-utils/mime-detection.js +0 -45
  349. package/dist/src/folder-api/album-corroborate.d.ts.map +0 -1
  350. package/dist/src/folder-api/album-corroborate.js +0 -36
  351. package/dist/src/folder-api/album-discs.d.ts.map +0 -1
  352. package/dist/src/folder-api/album-discs.js +0 -122
  353. package/dist/src/folder-api/album-grouping.d.ts.map +0 -1
  354. package/dist/src/folder-api/album-grouping.js +0 -118
  355. package/dist/src/folder-api/album-identity.d.ts.map +0 -1
  356. package/dist/src/folder-api/album-identity.js +0 -151
  357. package/dist/src/folder-api/album-types.d.ts.map +0 -1
  358. package/dist/src/folder-api/album-types.js +0 -0
  359. package/dist/src/folder-api/directory-walker.d.ts.map +0 -1
  360. package/dist/src/folder-api/directory-walker.js +0 -35
  361. package/dist/src/folder-api/file-processors.d.ts.map +0 -1
  362. package/dist/src/folder-api/file-processors.js +0 -63
  363. package/dist/src/folder-api/folder-disc.d.ts.map +0 -1
  364. package/dist/src/folder-api/folder-disc.js +0 -169
  365. package/dist/src/folder-api/folder-operations.d.ts.map +0 -1
  366. package/dist/src/folder-api/folder-operations.js +0 -54
  367. package/dist/src/folder-api/index.d.ts.map +0 -1
  368. package/dist/src/folder-api/scan-for-albums.d.ts.map +0 -1
  369. package/dist/src/folder-api/scan-for-albums.js +0 -20
  370. package/dist/src/folder-api/scan-operations.d.ts.map +0 -1
  371. package/dist/src/folder-api/scan-operations.js +0 -77
  372. package/dist/src/folder-api/types.d.ts.map +0 -1
  373. package/dist/src/folder-api/types.js +0 -21
  374. package/dist/src/msgpack/decoder.d.ts.map +0 -1
  375. package/dist/src/msgpack/decoder.js +0 -215
  376. package/dist/src/msgpack/encoder.d.ts.map +0 -1
  377. package/dist/src/msgpack/encoder.js +0 -249
  378. package/dist/src/msgpack/index.d.ts.map +0 -1
  379. package/dist/src/msgpack/index.js +0 -56
  380. package/dist/src/msgpack/types.d.ts.map +0 -1
  381. package/dist/src/msgpack/types.js +0 -12
  382. package/dist/src/msgpack/utils.d.ts.map +0 -1
  383. package/dist/src/msgpack/utils.js +0 -134
  384. package/dist/src/runtime/deno-detect.d.ts.map +0 -1
  385. package/dist/src/runtime/deno-detect.js +0 -6
  386. package/dist/src/runtime/detector.d.ts.map +0 -1
  387. package/dist/src/runtime/detector.js +0 -181
  388. package/dist/src/runtime/loader-types.d.ts.map +0 -1
  389. package/dist/src/runtime/loader-types.js +0 -10
  390. package/dist/src/runtime/module-loader-browser.d.ts.map +0 -1
  391. package/dist/src/runtime/module-loader-browser.js +0 -37
  392. package/dist/src/runtime/module-loader.d.ts.map +0 -1
  393. package/dist/src/runtime/module-loader.js +0 -119
  394. package/dist/src/runtime/platform-io.d.ts.map +0 -1
  395. package/dist/src/runtime/platform-io.js +0 -188
  396. package/dist/src/runtime/unified-loader/index.d.ts.map +0 -1
  397. package/dist/src/runtime/unified-loader/loader.d.ts.map +0 -1
  398. package/dist/src/runtime/unified-loader/loader.js +0 -84
  399. package/dist/src/runtime/unified-loader/module-loading.d.ts.map +0 -1
  400. package/dist/src/runtime/unified-loader/module-loading.js +0 -122
  401. package/dist/src/runtime/unified-loader/module-selection.d.ts.map +0 -1
  402. package/dist/src/runtime/unified-loader/module-selection.js +0 -41
  403. package/dist/src/runtime/unified-loader/types.d.ts.map +0 -1
  404. package/dist/src/runtime/unified-loader/types.js +0 -25
  405. package/dist/src/runtime/wasi-adapter/adapter.d.ts.map +0 -1
  406. package/dist/src/runtime/wasi-adapter/adapter.js +0 -113
  407. package/dist/src/runtime/wasi-adapter/audio-properties.d.ts.map +0 -1
  408. package/dist/src/runtime/wasi-adapter/audio-properties.js +0 -85
  409. package/dist/src/runtime/wasi-adapter/file-handle.d.ts.map +0 -1
  410. package/dist/src/runtime/wasi-adapter/file-handle.js +0 -197
  411. package/dist/src/runtime/wasi-adapter/handle-state.d.ts.map +0 -1
  412. package/dist/src/runtime/wasi-adapter/handle-state.js +0 -58
  413. package/dist/src/runtime/wasi-adapter/index.d.ts.map +0 -1
  414. package/dist/src/runtime/wasi-adapter/mp4-items.d.ts.map +0 -1
  415. package/dist/src/runtime/wasi-adapter/mp4-items.js +0 -80
  416. package/dist/src/runtime/wasi-adapter/property-surface.d.ts.map +0 -1
  417. package/dist/src/runtime/wasi-adapter/property-surface.js +0 -104
  418. package/dist/src/runtime/wasi-adapter/structured-fields.d.ts.map +0 -1
  419. package/dist/src/runtime/wasi-adapter/structured-fields.js +0 -139
  420. package/dist/src/runtime/wasi-adapter/tag-keys.d.ts.map +0 -1
  421. package/dist/src/runtime/wasi-adapter/tag-keys.js +0 -46
  422. package/dist/src/runtime/wasi-adapter/wasm-io.d.ts.map +0 -1
  423. package/dist/src/runtime/wasi-adapter/wasm-io.js +0 -249
  424. package/dist/src/runtime/wasi-fs-deno.d.ts.map +0 -1
  425. package/dist/src/runtime/wasi-fs-deno.js +0 -26
  426. package/dist/src/runtime/wasi-fs-node.d.ts.map +0 -1
  427. package/dist/src/runtime/wasi-fs-node.js +0 -66
  428. package/dist/src/runtime/wasi-fs-provider.d.ts.map +0 -1
  429. package/dist/src/runtime/wasi-fs-provider.js +0 -0
  430. package/dist/src/runtime/wasi-host-loader.d.ts.map +0 -1
  431. package/dist/src/runtime/wasi-host-loader.js +0 -109
  432. package/dist/src/runtime/wasi-host.d.ts.map +0 -1
  433. package/dist/src/runtime/wasi-host.js +0 -202
  434. package/dist/src/runtime/wasi-memory.d.ts.map +0 -1
  435. package/dist/src/runtime/wasi-memory.js +0 -197
  436. package/dist/src/runtime/wasmer-sdk-loader/types.d.ts.map +0 -1
  437. package/dist/src/runtime/wasmer-sdk-loader/types.js +0 -12
  438. package/dist/src/simple/batch-operations.d.ts.map +0 -1
  439. package/dist/src/simple/batch-operations.js +0 -186
  440. package/dist/src/simple/config.d.ts.map +0 -1
  441. package/dist/src/simple/config.js +0 -18
  442. package/dist/src/simple/index.d.ts.map +0 -1
  443. package/dist/src/simple/index.js +0 -58
  444. package/dist/src/simple/picture-operations.d.ts.map +0 -1
  445. package/dist/src/simple/picture-operations.js +0 -68
  446. package/dist/src/simple/tag-operations.d.ts.map +0 -1
  447. package/dist/src/simple/tag-operations.js +0 -90
  448. package/dist/src/simple/with-audio-file.d.ts.map +0 -1
  449. package/dist/src/simple/with-audio-file.js +0 -39
  450. package/dist/src/taglib/audio-file-base.d.ts.map +0 -1
  451. package/dist/src/taglib/audio-file-base.js +0 -187
  452. package/dist/src/taglib/audio-file-bwf.d.ts.map +0 -1
  453. package/dist/src/taglib/audio-file-bwf.js +0 -41
  454. package/dist/src/taglib/audio-file-impl.d.ts.map +0 -1
  455. package/dist/src/taglib/audio-file-impl.js +0 -285
  456. package/dist/src/taglib/audio-file-interface.d.ts.map +0 -1
  457. package/dist/src/taglib/audio-file-interface.js +0 -0
  458. package/dist/src/taglib/auto-dispose.d.ts.map +0 -1
  459. package/dist/src/taglib/auto-dispose.js +0 -13
  460. package/dist/src/taglib/embind-adapter.d.ts.map +0 -1
  461. package/dist/src/taglib/embind-adapter.js +0 -141
  462. package/dist/src/taglib/extra-state-registry.d.ts.map +0 -1
  463. package/dist/src/taglib/extra-state-registry.js +0 -78
  464. package/dist/src/taglib/id3v2-frames.d.ts.map +0 -1
  465. package/dist/src/taglib/id3v2-frames.js +0 -42
  466. package/dist/src/taglib/index.d.ts.map +0 -1
  467. package/dist/src/taglib/index.js +0 -41
  468. package/dist/src/taglib/load-audio-data.d.ts.map +0 -1
  469. package/dist/src/taglib/load-audio-data.js +0 -51
  470. package/dist/src/taglib/metadata-extent.d.ts +0 -41
  471. package/dist/src/taglib/metadata-extent.d.ts.map +0 -1
  472. package/dist/src/taglib/metadata-extent.js +0 -171
  473. package/dist/src/taglib/mp4-item-names.d.ts.map +0 -1
  474. package/dist/src/taglib/mp4-item-names.js +0 -4
  475. package/dist/src/taglib/mutable-tag-impl.d.ts.map +0 -1
  476. package/dist/src/taglib/mutable-tag-impl.js +0 -88
  477. package/dist/src/taglib/mutable-tag.d.ts.map +0 -1
  478. package/dist/src/taglib/mutable-tag.js +0 -0
  479. package/dist/src/taglib/save-reconstruct.d.ts.map +0 -1
  480. package/dist/src/taglib/save-reconstruct.js +0 -43
  481. package/dist/src/taglib/taglib-class.d.ts.map +0 -1
  482. package/dist/src/taglib/taglib-class.js +0 -206
  483. package/dist/src/taglib.d.ts.map +0 -1
  484. package/dist/src/taglib.js +0 -1
  485. package/dist/src/types/audio-formats.d.ts.map +0 -1
  486. package/dist/src/types/audio-formats.js +0 -6
  487. package/dist/src/types/bwf.d.ts.map +0 -1
  488. package/dist/src/types/bwf.js +0 -0
  489. package/dist/src/types/chapters.d.ts.map +0 -1
  490. package/dist/src/types/chapters.js +0 -0
  491. package/dist/src/types/config.d.ts.map +0 -1
  492. package/dist/src/types/config.js +0 -0
  493. package/dist/src/types/format-property-keys.d.ts.map +0 -1
  494. package/dist/src/types/format-property-keys.js +0 -0
  495. package/dist/src/types/index.d.ts.map +0 -1
  496. package/dist/src/types/index.js +0 -8
  497. package/dist/src/types/metadata-mappings.d.ts.map +0 -1
  498. package/dist/src/types/metadata-mappings.js +0 -252
  499. package/dist/src/types/pictures.d.ts.map +0 -1
  500. package/dist/src/types/pictures.js +0 -64
  501. package/dist/src/types/tags.d.ts.map +0 -1
  502. package/dist/src/types/tags.js +0 -0
  503. package/dist/src/types.d.ts.map +0 -1
  504. package/dist/src/types.js +0 -1
  505. package/dist/src/utils/file.d.ts.map +0 -1
  506. package/dist/src/utils/file.js +0 -52
  507. package/dist/src/utils/mirror-fields.d.ts.map +0 -1
  508. package/dist/src/utils/mirror-fields.js +0 -75
  509. package/dist/src/utils/node-fs.d.ts.map +0 -1
  510. package/dist/src/utils/node-fs.js +0 -22
  511. package/dist/src/utils/path.d.ts +0 -14
  512. package/dist/src/utils/path.d.ts.map +0 -1
  513. package/dist/src/utils/path.js +0 -17
  514. package/dist/src/utils/rating.d.ts.map +0 -1
  515. package/dist/src/utils/rating.js +0 -73
  516. package/dist/src/utils/tag-mapping.d.ts.map +0 -1
  517. package/dist/src/utils/tag-mapping.js +0 -214
  518. package/dist/src/utils/write.d.ts.map +0 -1
  519. package/dist/src/utils/write.js +0 -17
  520. package/dist/src/version.d.ts +0 -2
  521. package/dist/src/version.d.ts.map +0 -1
  522. package/dist/src/version.js +0 -4
  523. package/dist/src/wasm.d.ts.map +0 -1
  524. package/dist/src/wasm.js +0 -0
  525. package/dist/src/web-utils/canvas.d.ts.map +0 -1
  526. package/dist/src/web-utils/canvas.js +0 -60
  527. package/dist/src/web-utils/data-url.d.ts.map +0 -1
  528. package/dist/src/web-utils/data-url.js +0 -34
  529. package/dist/src/web-utils/dom-integration.d.ts.map +0 -1
  530. package/dist/src/web-utils/dom-integration.js +0 -53
  531. package/dist/src/web-utils/index.d.ts.map +0 -1
  532. package/dist/src/web-utils/index.js +0 -21
  533. /package/dist/{src/bwf → bwf}/bext.d.ts +0 -0
  534. /package/dist/{src/constants → constants}/additional-properties.d.ts +0 -0
  535. /package/dist/{src/constants → constants}/basic-properties.d.ts +0 -0
  536. /package/dist/{src/constants → constants}/complex-properties.d.ts +0 -0
  537. /package/dist/{src/constants → constants}/format-mappings.d.ts +0 -0
  538. /package/dist/{src/constants → constants}/general-extended-properties.d.ts +0 -0
  539. /package/dist/{src/constants → constants}/index.d.ts +0 -0
  540. /package/dist/{src/constants → constants}/property-types.d.ts +0 -0
  541. /package/dist/{src/constants → constants}/specialized-properties.d.ts +0 -0
  542. /package/dist/{src/constants.d.ts → constants.d.ts} +0 -0
  543. /package/dist/{src/errors → errors}/classes.d.ts +0 -0
  544. /package/dist/{src/errors → errors}/guards.d.ts +0 -0
  545. /package/dist/{src/errors → errors}/index.d.ts +0 -0
  546. /package/dist/{src/errors.d.ts → errors.d.ts} +0 -0
  547. /package/dist/{src/file-utils → file-utils}/copy-and-find.d.ts +0 -0
  548. /package/dist/{src/file-utils → file-utils}/export-operations.d.ts +0 -0
  549. /package/dist/{src/file-utils → file-utils}/import-operations.d.ts +0 -0
  550. /package/dist/{src/file-utils → file-utils}/index.d.ts +0 -0
  551. /package/dist/{src/file-utils → file-utils}/mime-detection.d.ts +0 -0
  552. /package/dist/{src/folder-api → folder-api}/album-corroborate.d.ts +0 -0
  553. /package/dist/{src/folder-api → folder-api}/album-discs.d.ts +0 -0
  554. /package/dist/{src/folder-api → folder-api}/album-grouping.d.ts +0 -0
  555. /package/dist/{src/folder-api → folder-api}/album-identity.d.ts +0 -0
  556. /package/dist/{src/folder-api → folder-api}/album-types.d.ts +0 -0
  557. /package/dist/{src/folder-api → folder-api}/directory-walker.d.ts +0 -0
  558. /package/dist/{src/folder-api → folder-api}/file-processors.d.ts +0 -0
  559. /package/dist/{src/folder-api → folder-api}/folder-disc.d.ts +0 -0
  560. /package/dist/{src/folder-api → folder-api}/folder-operations.d.ts +0 -0
  561. /package/dist/{src/folder-api → folder-api}/index.d.ts +0 -0
  562. /package/dist/{src/folder-api → folder-api}/scan-for-albums.d.ts +0 -0
  563. /package/dist/{src/folder-api → folder-api}/scan-operations.d.ts +0 -0
  564. /package/dist/{src/folder-api → folder-api}/types.d.ts +0 -0
  565. /package/dist/{src/msgpack → msgpack}/decoder.d.ts +0 -0
  566. /package/dist/{src/msgpack → msgpack}/encoder.d.ts +0 -0
  567. /package/dist/{src/msgpack → msgpack}/index.d.ts +0 -0
  568. /package/dist/{src/msgpack → msgpack}/utils.d.ts +0 -0
  569. /package/dist/{src/runtime → runtime}/deno-detect.d.ts +0 -0
  570. /package/dist/{src/runtime → runtime}/loader-types.d.ts +0 -0
  571. /package/dist/{src/runtime → runtime}/module-loader-browser.d.ts +0 -0
  572. /package/dist/{src/runtime → runtime}/module-loader.d.ts +0 -0
  573. /package/dist/{src/runtime → runtime}/platform-io.d.ts +0 -0
  574. /package/dist/{src/runtime → runtime}/unified-loader/index.d.ts +0 -0
  575. /package/dist/{src/runtime → runtime}/unified-loader/loader.d.ts +0 -0
  576. /package/dist/{src/runtime → runtime}/unified-loader/module-loading.d.ts +0 -0
  577. /package/dist/{src/runtime → runtime}/unified-loader/module-selection.d.ts +0 -0
  578. /package/dist/{src/runtime → runtime}/unified-loader/types.d.ts +0 -0
  579. /package/dist/{src/runtime → runtime}/wasi-adapter/file-handle.d.ts +0 -0
  580. /package/dist/{src/runtime → runtime}/wasi-adapter/handle-state.d.ts +0 -0
  581. /package/dist/{src/runtime → runtime}/wasi-adapter/index.d.ts +0 -0
  582. /package/dist/{src/runtime → runtime}/wasi-adapter/mp4-items.d.ts +0 -0
  583. /package/dist/{src/runtime → runtime}/wasi-adapter/property-surface.d.ts +0 -0
  584. /package/dist/{src/runtime → runtime}/wasi-adapter/structured-fields.d.ts +0 -0
  585. /package/dist/{src/runtime → runtime}/wasi-adapter/tag-keys.d.ts +0 -0
  586. /package/dist/{src/runtime → runtime}/wasi-adapter/wasm-io.d.ts +0 -0
  587. /package/dist/{src/runtime → runtime}/wasi-fs-deno.d.ts +0 -0
  588. /package/dist/{src/runtime → runtime}/wasi-fs-node.d.ts +0 -0
  589. /package/dist/{src/runtime → runtime}/wasi-fs-provider.d.ts +0 -0
  590. /package/dist/{src/runtime → runtime}/wasi-host-loader.d.ts +0 -0
  591. /package/dist/{src/runtime → runtime}/wasi-host.d.ts +0 -0
  592. /package/dist/{src/runtime → runtime}/wasi-memory.d.ts +0 -0
  593. /package/dist/{src/simple → simple}/batch-operations.d.ts +0 -0
  594. /package/dist/{src/simple → simple}/config.d.ts +0 -0
  595. /package/dist/{src/simple → simple}/picture-operations.d.ts +0 -0
  596. /package/dist/{src/simple → simple}/tag-operations.d.ts +0 -0
  597. /package/dist/{src/simple → simple}/with-audio-file.d.ts +0 -0
  598. /package/dist/{src/taglib → taglib}/audio-file-base.d.ts +0 -0
  599. /package/dist/{src/taglib → taglib}/audio-file-bwf.d.ts +0 -0
  600. /package/dist/{src/taglib → taglib}/auto-dispose.d.ts +0 -0
  601. /package/dist/{src/taglib → taglib}/embind-adapter.d.ts +0 -0
  602. /package/dist/{src/taglib → taglib}/extra-state-registry.d.ts +0 -0
  603. /package/dist/{src/taglib → taglib}/index.d.ts +0 -0
  604. /package/dist/{src/taglib → taglib}/load-audio-data.d.ts +0 -0
  605. /package/dist/{src/taglib → taglib}/mp4-item-names.d.ts +0 -0
  606. /package/dist/{src/taglib → taglib}/mutable-tag-impl.d.ts +0 -0
  607. /package/dist/{src/taglib → taglib}/mutable-tag.d.ts +0 -0
  608. /package/dist/{src/taglib → taglib}/save-reconstruct.d.ts +0 -0
  609. /package/dist/{src/taglib → taglib}/taglib-class.d.ts +0 -0
  610. /package/dist/{src/taglib.d.ts → taglib.d.ts} +0 -0
  611. /package/dist/{src/types → types}/audio-formats.d.ts +0 -0
  612. /package/dist/{src/types → types}/bwf.d.ts +0 -0
  613. /package/dist/{src/types → types}/chapters.d.ts +0 -0
  614. /package/dist/{src/types → types}/config.d.ts +0 -0
  615. /package/dist/{src/types → types}/format-property-keys.d.ts +0 -0
  616. /package/dist/{src/types → types}/index.d.ts +0 -0
  617. /package/dist/{src/types → types}/metadata-mappings.d.ts +0 -0
  618. /package/dist/{src/types → types}/pictures.d.ts +0 -0
  619. /package/dist/{src/types → types}/tags.d.ts +0 -0
  620. /package/dist/{src/types.d.ts → types.d.ts} +0 -0
  621. /package/dist/{src/utils → utils}/file.d.ts +0 -0
  622. /package/dist/{src/utils → utils}/mirror-fields.d.ts +0 -0
  623. /package/dist/{src/utils → utils}/node-fs.d.ts +0 -0
  624. /package/dist/{src/utils → utils}/rating.d.ts +0 -0
  625. /package/dist/{src/utils → utils}/tag-mapping.d.ts +0 -0
  626. /package/dist/{src/utils → utils}/write.d.ts +0 -0
  627. /package/dist/{src/web-utils → web-utils}/canvas.d.ts +0 -0
  628. /package/dist/{src/web-utils → web-utils}/data-url.d.ts +0 -0
  629. /package/dist/{src/web-utils → web-utils}/dom-integration.d.ts +0 -0
  630. /package/dist/{src/web-utils → web-utils}/index.d.ts +0 -0
package/LICENSE CHANGED
@@ -42,7 +42,7 @@ The WebAssembly binaries are subject to LGPL requirements. This means:
42
42
  To rebuild the WebAssembly binaries with a modified TagLib:
43
43
  1. Modify the TagLib source in lib/taglib/
44
44
  2. Run: npm run build:wasm (builds both backends; requires the
45
- Emscripten SDK and WASI SDK 34 — see CONTRIBUTING.md)
45
+ Emscripten SDK and WASI SDK 34 — see .github/CONTRIBUTING.md)
46
46
  3. The new binaries will be in build/taglib-web.wasm and
47
47
  build/taglib-wasi.wasm
48
48
 
package/README.md CHANGED
@@ -37,9 +37,10 @@ TagLib-Wasm is the **universal tagging library for TypeScript/JavaScript**
37
37
  zero-padded `"03"` is preserved, and MP4 freeform atoms keep their exact
38
38
  casing and vendor `mean`, so other tools still recognise them
39
39
  - **Zero dependencies** – Self-contained Wasm bundle
40
- - **Tested** – 448 tests across all formats, with cross-backend parity coverage
41
- - **Two API styles** – Use the "Simple" API (3 functions), or the full "Core"
42
- API for more advanced applications
40
+ - **Tested** – Cross-backend parity coverage across the supported formats
41
+ - **Two API styles** – Use the "Simple" API for one-shot reads and writes, batch
42
+ helpers, cover art, and checksums, or the full "Core" API for more advanced
43
+ applications
43
44
  - **Batch folder operations** – Scan directories, process multiple files, find
44
45
  duplicates, and export metadata catalogs
45
46
 
@@ -58,8 +59,11 @@ npm install taglib-wasm
58
59
 
59
60
  ### Deno
60
61
 
62
+ Deno installs from npm (Deno's `npm:` specifiers), not from JSR — the JSR
63
+ package `@charlesw/taglib-wasm` is deprecated.
64
+
61
65
  ```typescript
62
- import { TagLib } from "@charlesw/taglib-wasm";
66
+ import { TagLib } from "npm:taglib-wasm";
63
67
  ```
64
68
 
65
69
  ### Bun
@@ -92,11 +96,11 @@ file:
92
96
 
93
97
  ```typescript
94
98
  // 1. Prepare your build by copying the WASM file
95
- import { prepareWasmForEmbedding } from "@charlesw/taglib-wasm";
99
+ import { prepareWasmForEmbedding } from "npm:taglib-wasm";
96
100
  await prepareWasmForEmbedding("./taglib-web.wasm");
97
101
 
98
102
  // 2. In your application, use the helper for automatic handling
99
- import { initializeForDenoCompile } from "@charlesw/taglib-wasm";
103
+ import { initializeForDenoCompile } from "npm:taglib-wasm";
100
104
  const taglib = await initializeForDenoCompile();
101
105
 
102
106
  // 3. Compile with the embedded WASM
@@ -107,6 +111,14 @@ See the
107
111
  [complete Deno compile guide](https://charleswiltgen.github.io/TagLib-Wasm/guide/deno-compile.html)
108
112
  for more options including CDN loading.
109
113
 
114
+ `prepareWasmForEmbedding` and `initializeForDenoCompile` resolve a Deno main
115
+ module and file paths, so they belong to the Node/Deno entry: they are absent
116
+ from the `browser` condition, and a browser-targeted build reports them as
117
+ missing exports — the section below, "Bundle Size and Tree-Shaking", shows how
118
+ to get that as a TypeScript error instead of a bundler error. `isDenoCompiled`,
119
+ the `typeof Deno` probe under them, is exported by both: in a browser it answers
120
+ `false`.
121
+
110
122
  For manual control:
111
123
 
112
124
  ```typescript
@@ -123,8 +135,8 @@ path or URL instead — use `wasmUrl` with it.
123
135
 
124
136
  ## Quick Start
125
137
 
126
- > **Import paths:** Deno uses `@charlesw/taglib-wasm`, npm uses `taglib-wasm`.
127
- > Examples below use npm paths — substitute accordingly.
138
+ > **Import paths:** all runtimes use the npm package `taglib-wasm` (Deno via
139
+ > `npm:taglib-wasm`); the old JSR package `@charlesw/taglib-wasm` is deprecated.
128
140
 
129
141
  ### Simple API
130
142
 
@@ -248,6 +260,16 @@ Wasm-free — import them from the dedicated subpath in browser/UI contexts
248
260
  import { discFolderInfo, groupAlbums } from "taglib-wasm/disc-folder";
249
261
  ```
250
262
 
263
+ `scanFolder`, `scanForAlbums`, `findDuplicates` and `exportFolderMetadata` read
264
+ and write a filesystem, so they are **Node/Deno/Bun-only**, and so is the
265
+ `taglib-wasm/folder` subpath that exports them: it declares no `browser`
266
+ `exports` condition, which makes a browser-targeted build fail loudly (esbuild:
267
+ `Could not resolve "node:fs/promises"`). That failure is deliberate — a browser
268
+ stub that threw at runtime would move the same mistake from build time to the
269
+ first call in production. In a browser, scan on a server and post the result:
270
+ `groupAlbums` and `discFolderInfo` are exported from both `taglib-wasm` and
271
+ `taglib-wasm/disc-folder` and run anywhere.
272
+
251
273
  ### Working with Cover Art
252
274
 
253
275
  ```typescript
@@ -427,8 +449,16 @@ Supported formats:
427
449
  ### Guides
428
450
 
429
451
  - [API Reference](https://charleswiltgen.github.io/TagLib-Wasm/api/)
452
+ - [Folder API](https://charleswiltgen.github.io/TagLib-Wasm/api/folder-api.html)
453
+ - [Property Map](https://charleswiltgen.github.io/TagLib-Wasm/api/property-map.html)
454
+ - [Tag Name Constants](https://charleswiltgen.github.io/TagLib-Wasm/api/tag-constants.html)
430
455
  - [Performance Guide](https://charleswiltgen.github.io/TagLib-Wasm/concepts/performance.html)
456
+ - [Memory Management](https://charleswiltgen.github.io/TagLib-Wasm/concepts/memory-management.html)
457
+ - [Runtime Compatibility](https://charleswiltgen.github.io/TagLib-Wasm/concepts/runtime-compatibility.html)
431
458
  - [Album Processing Guide](https://charleswiltgen.github.io/TagLib-Wasm/guide/album-processing.html)
459
+ - [Folder Operations](https://charleswiltgen.github.io/TagLib-Wasm/guide/folder-operations.html)
460
+ - [Codec Detection](https://charleswiltgen.github.io/TagLib-Wasm/guide/codec-detection.html)
461
+ - [Deno Compile](https://charleswiltgen.github.io/TagLib-Wasm/guide/deno-compile.html)
432
462
  - [Platform Examples](https://charleswiltgen.github.io/TagLib-Wasm/guide/platform-examples.html)
433
463
  - [Working with Cover Art](https://charleswiltgen.github.io/TagLib-Wasm/guide/cover-art.html)
434
464
  - [Track Ratings](https://charleswiltgen.github.io/TagLib-Wasm/guide/ratings.html)
@@ -436,12 +466,14 @@ Supported formats:
436
466
  - [Broadcast Metadata (BWF bext / iXML)](https://charleswiltgen.github.io/TagLib-Wasm/guide/broadcast-metadata.html)
437
467
  - [Cloudflare Workers](https://charleswiltgen.github.io/TagLib-Wasm/advanced/cloudflare-workers.html)
438
468
  - [Error Handling](https://charleswiltgen.github.io/TagLib-Wasm/concepts/error-handling.html)
439
- - [Contributing](CONTRIBUTING.md)
469
+ - [Contributing](.github/CONTRIBUTING.md)
440
470
  - [AI Agent Documentation](AGENTS.md)
441
471
 
442
472
  ## Supported Formats
443
473
 
444
- `taglib-wasm` is designed to support all formats supported by TagLib:
474
+ `taglib-wasm` is designed to support all formats supported by TagLib. The
475
+ authoritative list is the [`SUPPORTED_FORMATS`](src/errors/base.ts) constant
476
+ (the names `getFormat()` answers):
445
477
 
446
478
  - **.mp3** – ID3v2 and ID3v1 tags
447
479
  - **.aac** – ADTS / raw AAC streams (ID3v2 metadata, read through the MPEG reader)
@@ -450,8 +482,15 @@ Supported formats:
450
482
  - **.ogg** – Ogg container: Vorbis with full metadata support, plus FLAC-in-Ogg
451
483
  and Speex
452
484
  - **.wav** – INFO chunk metadata, plus BWF `bext` and iXML
453
- - **Additional formats** – Opus, APE, MPC, WavPack, TrueAudio, AIFF, WMA, and
454
- more
485
+ - **Additional formats** – Opus, AIFF (`.aiff`/`.aif`), WMA (`.wma`, the ASF
486
+ container), APE, WavPack (`.wv`), Musepack (`.mpc`), TrueAudio (`.tta`), DSD
487
+ (`.dsf`/`.dff`), Shorten (`.shn`), the tracker modules
488
+ (`.mod`/`.s3m`/`.it`/`.xm`), and Matroska (`.mka`/`.mkv`/`.webm`)
489
+
490
+ These open and report their format on both backends. One difference remains: on
491
+ Emscripten, `audioProperties().containerFormat` and `.codec` still report
492
+ `"unknown"` for the formats its sniffer cannot place (APE, DSF, DSDIFF, MPC,
493
+ SHN, and the tracker modules) — their tags and remaining properties load.
455
494
 
456
495
  ## Performance and Best Practices
457
496
 
@@ -515,12 +554,152 @@ await file.saveToFile(); // Full file loaded only here
515
554
 
516
555
  taglib-wasm auto-selects the fastest available backend — no configuration needed:
517
556
 
518
- | Environment | Backend | How it works | Performance |
519
- | ------------------------ | ----------------- | ------------------------------------------------------ | ----------- |
520
- | **Node.js / Deno / Bun** | WASI (auto) | Seek-based filesystem I/O; reads only headers and tags | Fastest |
521
- | **Browsers / Workers** | Emscripten (auto) | Entire file loaded into memory as buffer | Baseline |
557
+ | Environment | Backend | How it works | Performance |
558
+ | ------------------------ | ----------------- | -------------------------------------------------------------------------------------------------------- | ----------- |
559
+ | **Node.js / Deno / Bun** | WASI (auto) | Seek-based filesystem I/O; reads only headers and tags | Fastest |
560
+ | **Browsers / Workers** | Emscripten (auto) | Buffer-based: the whole file by default, or a header/footer window for a `File` with `{ partial: true }` | Baseline |
522
561
 
523
562
  On Node.js, Deno, and Bun you get WASI automatically — nothing to configure.
563
+ Partial loading (`{ partial: true }`) works on both paths; see the
564
+ [Performance Guide](https://charleswiltgen.github.io/TagLib-Wasm/concepts/performance.html#smart-partial-loading).
565
+
566
+ ### Bundle Size and Tree-Shaking
567
+
568
+ Importing the barrel (`taglib-wasm`) does **not** pull in the Folder or Web API:
569
+ every bundler tested here tree-shakes to leaf granularity. Measured from a packed
570
+ tarball of this repository's build (`npm pack` → `npm install <tarball>`),
571
+ minified ES2022 ESM bundles on Node 24.21.0 with esbuild 0.28.2, rollup 4.63.3,
572
+ vite 8.3.0 and webpack 5.111.1. Figures are minified JavaScript bytes — the
573
+ ~700 KB Wasm binary is loaded at runtime and is not part of the bundle in any
574
+ scenario below.
575
+
576
+ Each row is a one-file app whose whole body is that import plus the call the row
577
+ names, keeping the imported function reachable (`globalThis.__app = { … }`).
578
+ Where a build splits its output into several files, the figure is the total of
579
+ every JavaScript chunk it emits. Exact invocations, so the table can be
580
+ reproduced:
581
+
582
+ - **esbuild 0.28.2** — `esbuild <app> --bundle --minify --format=esm
583
+ --target=es2022 --platform=browser --external:node:module` for the browser
584
+ column; the same with `--platform=node` and no `--external` for the Node
585
+ column. The `--external` matches the dynamic `import("node:module")` in
586
+ `dist/taglib-wrapper.js`. (`--external` takes a colon, not `=`.)
587
+ - **rollup 4.63.3** — `input: <app>`, plugins `@rollup/plugin-node-resolve`
588
+ (`{ browser: true, exportConditions: ["browser", "default"] }` for the browser
589
+ column, default options for the Node column) and `@rollup/plugin-terser`,
590
+ output `{ format: "esm", inlineDynamicImports: true }`.
591
+ - **vite 8.3.0** — a real app build: `index.html` plus a
592
+ `<script type="module">` pointing at the entry, `build.minify: "esbuild"`,
593
+ `target: "es2022"`. Vite builds for the browser; the figures below that name
594
+ the `node` condition instead add `resolve.conditions: ["node"]`.
595
+ - **webpack 5.111.1** — `mode: "production"`, `target: "web"`,
596
+ `externals: { module: "module" }`. `target: "web"` alone fails on the
597
+ `import("node:module")` inside `dist/taglib-wrapper.js`.
598
+
599
+ | Consumer app | esbuild (browser)¹ | rollup (browser)¹ | vite (app) | webpack (web)² | esbuild (Node)³ | rollup (Node)³ |
600
+ | ------------------------------------- | ------------------ | ----------------- | ---------- | -------------- | --------------- | -------------- |
601
+ | `taglib-wasm` — `TagLib.initialize()` | 79,826 | 77,058 | 82,778 | 80,736 | 143,600 | 133,060 |
602
+ | `taglib-wasm/simple` — `getTagLib()` | 79,548 | 77,316 | 82,512 | 81,554 | 144,602 | 133,431 |
603
+ | `taglib-wasm/folder` — `scanFolder`⁴ | — | 136,822⁴ | 145,895⁴ | — | 147,942 | 136,822 |
604
+
605
+ ¹ the `browser` `exports` condition. ² `target: "web"`. ³ the Node `exports`
606
+ condition. ⁴ Node-only entry — see below.
607
+
608
+ **`./folder` is Node-only.** The subpath declares no `browser` export condition
609
+ because `scanFolder` and friends read and write a filesystem, so a
610
+ browser-targeted build resolves the Node-oriented graph and fails: esbuild
611
+ `--platform=browser` reports `Could not resolve "node:fs/promises"`, and webpack
612
+ `target: "web"` fails with three errors (`node:buffer`, `node:fs/promises`,
613
+ `node:fs`). That outcome is the design: a build error beats a stub that throws
614
+ on the first call in production. If the same cells were reachable they would
615
+ come from shimming Node builtins into a bundle that cannot work — which is
616
+ exactly what vite and rollup did before the condition was declared. `./rating`
617
+ and `./disc-folder` are pure JavaScript and build for either target. In a
618
+ browser, scan on a server and post the result; the pure
619
+ `groupAlbums` / `discFolderInfo` half is exported from `taglib-wasm` and
620
+ `taglib-wasm/disc-folder` and runs anywhere.
621
+
622
+ **`./web` builds for the browser.** It declares a `browser` condition, so a
623
+ browser-targeted build resolves an Emscripten-only build of that entry and pulls
624
+ **`taglib-web.wasm` alone** — measured with the vite invocation above on
625
+ `pictureToDataURL` from `taglib-wasm/web`: one 703,477-byte Wasm asset, where
626
+ the vite build on the `node` condition instead emits both `taglib-web.wasm` and
627
+ `taglib-wasi.wasm` (1,458,150 bytes of assets for a call that needs neither
628
+ engine). The browser build is a pre-bundled file like `index.browser.js`, so it
629
+ barely tree-shakes: that call is 81,006 bytes in the vite app build and 78,528
630
+ under the esbuild browser column, against 205 bytes under esbuild's Node column —
631
+ and importing any pure helper from the barrel costs ~80 KB there too. Rollup is
632
+ the exception: it shakes the pre-bundled file down to 745 bytes, though still
633
+ not to the 210-byte leaf its Node column reaches. That granularity is a property
634
+ of the pre-bundled browser entries, not of this subpath.
635
+
636
+ **TypeScript resolves the same condition.** A browser consumer gets the matching
637
+ type surface only if TypeScript is told about it — in `tsconfig.json`:
638
+
639
+ ```json
640
+ {
641
+ "compilerOptions": {
642
+ "moduleResolution": "bundler",
643
+ "customConditions": ["browser"]
644
+ }
645
+ }
646
+ ```
647
+
648
+ With that condition, `dist/index.browser.d.ts` is the declaration file used, so
649
+ `import { scanFolder } from "taglib-wasm"` is a compile error naming the missing
650
+ export (`TS2305: Module '"taglib-wasm"' has no exported member 'scanFolder'`)
651
+ instead of a bundler error — and importing `bwf`, `groupAlbums`,
652
+ `discFolderInfo`, or any type (including `FolderScanResult`) compiles. Without
653
+ `customConditions`, TypeScript reads the Node declarations from
654
+ `dist/index.d.ts` while the bundler still ships `dist/index.browser.js`; that
655
+ mismatch is what produced the original silent failure.
656
+
657
+ **Bundler interop.** `dist/taglib-wrapper.js` — the Emscripten glue — contains a
658
+ dynamic `import("node:module")`, and browser targets have no such builtin, so the
659
+ two targets need one line each: esbuild `--external:node:module`, webpack
660
+ `externals: { module: "module" }` (webpack `target: "web"` alone fails on it).
661
+ Rollup needs nothing extra; vite externalizes it for the browser with a warning.
662
+ The `browser` condition itself is resolved by default by esbuild
663
+ (`--platform=browser`), vite, and webpack (`target: "web"`); rollup needs
664
+ `nodeResolve({ browser: true, exportConditions: ["browser", "default"] })`.
665
+
666
+ **The barrel is not a tax.** Adding an API to an import that already loads the
667
+ engine costs only that API. Against the `taglib-wasm` row above (esbuild, Node
668
+ column): adding `scanFolder` costs **4,376 bytes** and adding
669
+ `pictureToDataURL` costs **187 bytes**, because neither drags in the rest of the
670
+ Folder or Web module tree.
671
+
672
+ **The browser barrel's export list is already paid for.** The browser entry is a
673
+ pre-bundled file, so a consumer of the barrel downloads the whole file whatever
674
+ it imports; adding the pure `bwf` / `groupAlbums` / `discFolderInfo` exports to
675
+ that file's export list therefore costs nothing measurable. Bundling
676
+ `import { TagLib }` against the entry with and without those three export names
677
+ gives identical bytes under esbuild (79,826) and rollup (77,058) and 12 bytes
678
+ more under vite (82,764 → 82,776). Nothing else moved: the Folder and Web APIs
679
+ are still reached only when imported, and the Node entries are unchanged.
680
+
681
+ **Entry-point choice is not a size lever.** `taglib-wasm` and
682
+ `taglib-wasm/simple` differ by about a kilobyte either way — in a browser bundle
683
+ `simple` is 278 bytes _smaller_, on Node 1,002 bytes _larger_, because
684
+ `getTagLib()` reaches the full `TagLib` class through a dynamic import. Pick by
685
+ API surface. The lever that does matter is the `browser` export condition: a
686
+ browser-targeted bundle is ~80 KB where a Node-targeted one is ~144 KB.
687
+
688
+ **`"sideEffects": false`** is set in `package.json`, so a bundler may drop any
689
+ module whose exports go unused. Before that field, importers of the sub-entries
690
+ paid ~17 KB for property-metadata tables that were kept only because module-level
691
+ table building looked impure; those bundles are now a few hundred bytes or less.
692
+ Measured on the **`node` condition** — esbuild `--platform=node`, rollup with
693
+ default `node-resolve` options, and vite's app build with
694
+ `resolve.conditions: ["node"]` — the combination under which all four apps build
695
+ under every bundler:
696
+
697
+ | Consumer app | esbuild off → on | rollup off → on | vite off → on |
698
+ | -------------------------------------------------------------- | ----------------- | ----------------- | ----------------- |
699
+ | `import "taglib-wasm/web"` (uses nothing) | 17,224 → 0 | 16,428 → 1 | 17,328 → 711 |
700
+ | `import "taglib-wasm/folder"` (uses nothing) | 17,428 → 0 | 16,479 → 1 | 17,669 → 711 |
701
+ | `pictureToDataURL` from `taglib-wasm/web` | 17,428 → 205 | 16,637 → 210 | 17,540 → 923 |
702
+ | `import { TagLib } from "taglib-wasm"`, referenced by `typeof` | 144,582 → 143,579 | 133,090 → 133,039 | 141,847 → 141,456 |
524
703
 
525
704
  ## Runtime Compatibility
526
705
 
@@ -530,21 +709,24 @@ On Node.js, Deno, and Bun you get WASI automatically — nothing to configure.
530
709
  | ---------------------- | ------- | ------------------------- | -------------------------------------------------------------------------------------------------- |
531
710
  | **Node.js** | Full | `npm install taglib-wasm` | TypeScript via tsx |
532
711
  | **Deno** | Full | `npm:taglib-wasm` | Native TypeScript |
533
- | **Bun** | Partial | `bun add taglib-wasm` | Import + init verified; full test suite is Deno-only |
712
+ | **Bun** | Partial | `bun add taglib-wasm` | Import + init verified; covered by `npm run test:bun` and the cross-runtime smoke |
534
713
  | **Browser** | Full | Via bundler | Full API support |
535
714
  | **Cloudflare Workers** | Full | `npm install taglib-wasm` | Buffer-based (Emscripten); no filesystem. See [Workers guide](docs/advanced/cloudflare-workers.md) |
536
715
  | **Electron** | Node.js | `npm install taglib-wasm` | Main process; renderer via IPC |
537
716
 
538
717
  ## Known Limitations
539
718
 
540
- - **Memory Usage (browsers)** – In browser environments, entire files are loaded
541
- into memory. On Node.js/Deno, WASI reads only headers and tags from disk.
719
+ - **Memory Usage (browsers)** – By default, browser environments load the entire
720
+ file into memory; with `{ partial: true }` a `File` reads only the
721
+ header/footer window through `File.slice()`, falling back to the whole file
722
+ when the metadata overruns that window. On Node.js/Deno, WASI reads only
723
+ headers and tags from disk. See the [Performance Guide](https://charleswiltgen.github.io/TagLib-Wasm/concepts/performance.html#smart-partial-loading).
542
724
  - **Concurrent Access** – Not thread-safe (JavaScript single-threaded nature
543
725
  mitigates this)
544
726
 
545
727
  ## Contributing
546
728
 
547
- Contributions are welcome! Please read our [Contributing Guide](CONTRIBUTING.md)
729
+ Contributions are welcome! Please read our [Contributing Guide](.github/CONTRIBUTING.md)
548
730
  for details on our code of conduct and the process for submitting pull requests.
549
731
 
550
732
  ## License
@@ -563,7 +745,10 @@ means:
563
745
  - If you modify the TagLib C++ code, you must share those changes
564
746
  - You must provide a way for users to relink with a modified TagLib
565
747
 
566
- For details, see [lib/taglib/COPYING.LGPL](lib/taglib/COPYING.LGPL)
748
+ For details, see [TagLib's COPYING.LGPL](https://github.com/taglib/taglib/blob/master/COPYING.LGPL)
749
+ — this repository vendors TagLib as a git submodule at `lib/taglib`, so that
750
+ path belongs to the submodule and is not part of this tree (the npm package
751
+ ships `LICENSE` only).
567
752
 
568
753
  ## Acknowledgments
569
754
 
@@ -0,0 +1,7 @@
1
+ //#region \0@oxc-project+runtime@0.152.0/helpers/esm/assertClassBrand.js
2
+ function _assertClassBrand(e, t, n) {
3
+ if ("function" == typeof e ? e === t : e.has(t)) return arguments.length < 3 ? t : n;
4
+ throw new TypeError("Private element is not present on this object");
5
+ }
6
+ //#endregion
7
+ export { _assertClassBrand as default };
@@ -0,0 +1,6 @@
1
+ //#region \0@oxc-project+runtime@0.152.0/helpers/esm/checkPrivateRedeclaration.js
2
+ function _checkPrivateRedeclaration(e, t) {
3
+ if (t.has(e)) throw new TypeError("Cannot initialize the same private elements twice on an object");
4
+ }
5
+ //#endregion
6
+ export { _checkPrivateRedeclaration as default };
@@ -0,0 +1,7 @@
1
+ import _assertClassBrand from "./assertClassBrand.js";
2
+ //#region \0@oxc-project+runtime@0.152.0/helpers/esm/classPrivateFieldGet2.js
3
+ function _classPrivateFieldGet2(s, a) {
4
+ return s.get(_assertClassBrand(s, a));
5
+ }
6
+ //#endregion
7
+ export { _classPrivateFieldGet2 as default };
@@ -0,0 +1,7 @@
1
+ import _checkPrivateRedeclaration from "./checkPrivateRedeclaration.js";
2
+ //#region \0@oxc-project+runtime@0.152.0/helpers/esm/classPrivateFieldInitSpec.js
3
+ function _classPrivateFieldInitSpec(e, t, a) {
4
+ _checkPrivateRedeclaration(e, t), t.set(e, a);
5
+ }
6
+ //#endregion
7
+ export { _classPrivateFieldInitSpec as default };
@@ -0,0 +1,7 @@
1
+ import _assertClassBrand from "./assertClassBrand.js";
2
+ //#region \0@oxc-project+runtime@0.152.0/helpers/esm/classPrivateFieldSet2.js
3
+ function _classPrivateFieldSet2(s, a, r) {
4
+ return s.set(_assertClassBrand(s, a), r), r;
5
+ }
6
+ //#endregion
7
+ export { _classPrivateFieldSet2 as default };
@@ -0,0 +1,12 @@
1
+ import toPropertyKey from "./toPropertyKey.js";
2
+ //#region \0@oxc-project+runtime@0.152.0/helpers/esm/defineProperty.js
3
+ function _defineProperty(e, r, t) {
4
+ return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
5
+ value: t,
6
+ enumerable: !0,
7
+ configurable: !0,
8
+ writable: !0
9
+ }) : e[r] = t, e;
10
+ }
11
+ //#endregion
12
+ export { _defineProperty as default };
@@ -0,0 +1,14 @@
1
+ import _typeof from "./typeof.js";
2
+ //#region \0@oxc-project+runtime@0.152.0/helpers/esm/toPrimitive.js
3
+ function toPrimitive(t, r) {
4
+ if ("object" != _typeof(t) || !t) return t;
5
+ var e = t[Symbol.toPrimitive];
6
+ if (void 0 !== e) {
7
+ var i = e.call(t, r || "default");
8
+ if ("object" != _typeof(i)) return i;
9
+ throw new TypeError("@@toPrimitive must return a primitive value.");
10
+ }
11
+ return ("string" === r ? String : Number)(t);
12
+ }
13
+ //#endregion
14
+ export { toPrimitive as default };
@@ -0,0 +1,9 @@
1
+ import _typeof from "./typeof.js";
2
+ import toPrimitive from "./toPrimitive.js";
3
+ //#region \0@oxc-project+runtime@0.152.0/helpers/esm/toPropertyKey.js
4
+ function toPropertyKey(t) {
5
+ var i = toPrimitive(t, "string");
6
+ return "symbol" == _typeof(i) ? i : i + "";
7
+ }
8
+ //#endregion
9
+ export { toPropertyKey as default };
@@ -0,0 +1,11 @@
1
+ //#region \0@oxc-project+runtime@0.152.0/helpers/esm/typeof.js
2
+ function _typeof(o) {
3
+ "@babel/helpers - typeof";
4
+ return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o) {
5
+ return typeof o;
6
+ } : function(o) {
7
+ return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
8
+ }, _typeof(o);
9
+ }
10
+ //#endregion
11
+ export { _typeof as default };
@@ -0,0 +1,57 @@
1
+ //#region \0@oxc-project+runtime@0.152.0/helpers/esm/usingCtx.js
2
+ function _usingCtx() {
3
+ var r = "function" == typeof SuppressedError ? SuppressedError : function(r, e) {
4
+ var n = Error();
5
+ return n.name = "SuppressedError", n.error = r, n.suppressed = e, n;
6
+ }, e = {}, n = [];
7
+ function using(r, e) {
8
+ if (null != e) {
9
+ if (Object(e) !== e) throw new TypeError("using declarations can only be used with objects, functions, null, or undefined.");
10
+ if (r) var o = e[Symbol.asyncDispose || Symbol["for"]("Symbol.asyncDispose")];
11
+ if (void 0 === o && (o = e[Symbol.dispose || Symbol["for"]("Symbol.dispose")], r)) var t = o;
12
+ if ("function" != typeof o) throw new TypeError("Object is not disposable.");
13
+ t && (o = function o() {
14
+ try {
15
+ t.call(e);
16
+ } catch (r) {
17
+ return Promise.reject(r);
18
+ }
19
+ }), n.push({
20
+ v: e,
21
+ d: o,
22
+ a: r
23
+ });
24
+ } else r && n.push({
25
+ d: e,
26
+ a: r
27
+ });
28
+ return e;
29
+ }
30
+ return {
31
+ e,
32
+ u: using.bind(null, !1),
33
+ a: using.bind(null, !0),
34
+ d: function d() {
35
+ var o, t = this.e, s = 0;
36
+ function next() {
37
+ for (; o = n.pop();) try {
38
+ if (!o.a && 1 === s) return s = 0, n.push(o), Promise.resolve().then(next);
39
+ if (o.d) {
40
+ var r = o.d.call(o.v);
41
+ if (o.a) return s |= 2, Promise.resolve(r).then(next, err);
42
+ } else s |= 1;
43
+ } catch (r) {
44
+ return err(r);
45
+ }
46
+ if (1 === s) return t !== e ? Promise.reject(t) : Promise.resolve();
47
+ if (t !== e) throw t;
48
+ }
49
+ function err(n) {
50
+ return t = t !== e ? new r(n, t) : n, next();
51
+ }
52
+ return next();
53
+ }
54
+ };
55
+ }
56
+ //#endregion
57
+ export { _usingCtx as default };
@@ -0,0 +1,13 @@
1
+ //#region \0rolldown/runtime.js
2
+ var __defProp = Object.defineProperty;
3
+ var __exportAll = (all, no_symbols) => {
4
+ let target = {};
5
+ for (var name in all) __defProp(target, name, {
6
+ get: all[name],
7
+ enumerable: true
8
+ });
9
+ if (!no_symbols) __defProp(target, Symbol.toStringTag, { value: "Module" });
10
+ return target;
11
+ };
12
+ //#endregion
13
+ export { __exportAll };
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bext.d.ts","sourceRoot":"","sources":["../../src/bwf/bext.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,iBAAiB,CAAC;AA6D/D;;;;;GAKG;AACH,wBAAgB,UAAU,CACxB,KAAK,EAAE,UAAU,GAChB,uBAAuB,GAAG,SAAS,CAyCrC;AAED;;;;;;;GAOG;AACH,wBAAgB,UAAU,CAAC,CAAC,EAAE,uBAAuB,GAAG,UAAU,CAmDjE"}
@@ -0,0 +1,119 @@
1
+ import { __exportAll } from "../_virtual/_rolldown/runtime.js";
2
+ //#region src/bwf/bext.ts
3
+ var bext_exports = /* @__PURE__ */ __exportAll({
4
+ decodeBext: () => decodeBext,
5
+ encodeBext: () => encodeBext
6
+ });
7
+ const FIXED_PREFIX_LEN = 602;
8
+ const VERSION_OFFSET = 346;
9
+ const UMID_OFFSET = 348;
10
+ const UMID_LEN = 64;
11
+ const LOUDNESS_OFFSET = 412;
12
+ const LOUDNESS_UNSET = 32767;
13
+ function readFixedString(bytes, offset, len) {
14
+ let end = offset;
15
+ const max = Math.min(offset + len, bytes.length);
16
+ while (end < max && bytes[end] !== 0) end++;
17
+ let s = "";
18
+ for (let i = offset; i < end; i++) s += String.fromCharCode(bytes[i]);
19
+ return s;
20
+ }
21
+ function writeFixedString(bytes, offset, len, value) {
22
+ for (let i = 0; i < len; i++) bytes[offset + i] = i < value.length ? value.charCodeAt(i) & 255 : 0;
23
+ }
24
+ function clampInt16(n) {
25
+ return Math.max(-32768, Math.min(32767, Math.round(n)));
26
+ }
27
+ function loudnessRaw(v) {
28
+ return v === void 0 ? LOUDNESS_UNSET : clampInt16(v * 100);
29
+ }
30
+ function loudnessFromRaw(raw) {
31
+ return raw === LOUDNESS_UNSET ? void 0 : raw / 100;
32
+ }
33
+ function bytesToHex(bytes) {
34
+ let s = "";
35
+ for (const b of bytes) s += b.toString(16).padStart(2, "0");
36
+ return s;
37
+ }
38
+ function hexToBytes(hex, outLen) {
39
+ const clean = hex.replace(/[^0-9a-fA-F]/g, "");
40
+ const out = new Uint8Array(outLen);
41
+ for (let i = 0; i + 1 < clean.length + 1 && i / 2 < outLen; i += 2) {
42
+ const pair = clean.slice(i, i + 2);
43
+ if (pair.length === 2) out[i / 2] = parseInt(pair, 16);
44
+ }
45
+ return out;
46
+ }
47
+ /**
48
+ * Parse a raw `bext` chunk. Returns `undefined` only if `bytes` is shorter than
49
+ * 348 (cannot even read the `Version` field). Optional fields are populated per
50
+ * the chunk's declared version and the available length, so compact/legacy v0
51
+ * chunks parse into a partial struct.
52
+ */
53
+ function decodeBext(bytes) {
54
+ if (bytes.length < 348) return void 0;
55
+ const dv = new DataView(bytes.buffer, bytes.byteOffset, bytes.byteLength);
56
+ const timeRefLow = dv.getUint32(338, true);
57
+ const timeRefHigh = dv.getUint32(342, true);
58
+ const version = dv.getUint16(VERSION_OFFSET, true);
59
+ const result = {
60
+ description: readFixedString(bytes, 0, 256),
61
+ originator: readFixedString(bytes, 256, 32),
62
+ originatorReference: readFixedString(bytes, 288, 32),
63
+ originationDate: readFixedString(bytes, 320, 10),
64
+ originationTime: readFixedString(bytes, 330, 8),
65
+ timeReferenceSamples: BigInt(timeRefHigh) << 32n | BigInt(timeRefLow),
66
+ version,
67
+ codingHistory: bytes.length > FIXED_PREFIX_LEN ? readFixedString(bytes, FIXED_PREFIX_LEN, bytes.length - FIXED_PREFIX_LEN) : ""
68
+ };
69
+ if (version >= 1 && bytes.length >= 412) result.umid = bytesToHex(bytes.subarray(UMID_OFFSET, 412));
70
+ if (version >= 2 && bytes.length >= 422) {
71
+ const lv = loudnessFromRaw(dv.getInt16(LOUDNESS_OFFSET, true));
72
+ const lr = loudnessFromRaw(dv.getInt16(414, true));
73
+ const mtp = loudnessFromRaw(dv.getInt16(416, true));
74
+ const mml = loudnessFromRaw(dv.getInt16(418, true));
75
+ const msl = loudnessFromRaw(dv.getInt16(420, true));
76
+ if (lv !== void 0) result.loudnessValueDb = lv;
77
+ if (lr !== void 0) result.loudnessRangeDb = lr;
78
+ if (mtp !== void 0) result.maxTruePeakLevelDbtp = mtp;
79
+ if (mml !== void 0) result.maxMomentaryLoudnessDb = mml;
80
+ if (msl !== void 0) result.maxShortTermLoudnessDb = msl;
81
+ }
82
+ return result;
83
+ }
84
+ /**
85
+ * Serialize a `bext` chunk. The result is always `602 + codingHistory.length`
86
+ * bytes. `version` defaults to 2 when any loudness field is present (else 1 if
87
+ * `umid` is set, else 0). Over-long string fields are truncated to their widths;
88
+ * loudness values are clamped to the Int16 range after ×100, with `undefined`
89
+ * written as the EBU `0x7FFF` "not set" sentinel; UMID is written only for
90
+ * version ≥ 1.
91
+ */
92
+ function encodeBext(b) {
93
+ const codingHistory = b.codingHistory ?? "";
94
+ const bytes = new Uint8Array(FIXED_PREFIX_LEN + codingHistory.length);
95
+ const dv = new DataView(bytes.buffer);
96
+ const hasLoudness = b.loudnessValueDb !== void 0 || b.loudnessRangeDb !== void 0 || b.maxTruePeakLevelDbtp !== void 0 || b.maxMomentaryLoudnessDb !== void 0 || b.maxShortTermLoudnessDb !== void 0;
97
+ const version = Number.isInteger(b.version) ? b.version : hasLoudness ? 2 : b.umid ? 1 : 0;
98
+ writeFixedString(bytes, 0, 256, b.description ?? "");
99
+ writeFixedString(bytes, 256, 32, b.originator ?? "");
100
+ writeFixedString(bytes, 288, 32, b.originatorReference ?? "");
101
+ writeFixedString(bytes, 320, 10, b.originationDate ?? "");
102
+ writeFixedString(bytes, 330, 8, b.originationTime ?? "");
103
+ const tr = b.timeReferenceSamples ?? 0n;
104
+ dv.setUint32(338, Number(tr & 4294967295n), true);
105
+ dv.setUint32(342, Number(tr >> 32n & 4294967295n), true);
106
+ dv.setUint16(VERSION_OFFSET, version, true);
107
+ if (version >= 1 && b.umid) bytes.set(hexToBytes(b.umid, UMID_LEN), UMID_OFFSET);
108
+ if (version >= 2) {
109
+ dv.setInt16(LOUDNESS_OFFSET, loudnessRaw(b.loudnessValueDb), true);
110
+ dv.setInt16(414, loudnessRaw(b.loudnessRangeDb), true);
111
+ dv.setInt16(416, loudnessRaw(b.maxTruePeakLevelDbtp), true);
112
+ dv.setInt16(418, loudnessRaw(b.maxMomentaryLoudnessDb), true);
113
+ dv.setInt16(420, loudnessRaw(b.maxShortTermLoudnessDb), true);
114
+ }
115
+ writeFixedString(bytes, FIXED_PREFIX_LEN, codingHistory.length, codingHistory);
116
+ return bytes;
117
+ }
118
+ //#endregion
119
+ export { bext_exports, decodeBext, encodeBext };
@@ -1 +1 @@
1
- {"version":3,"file":"additional-properties.d.ts","sourceRoot":"","sources":["../../../src/constants/additional-properties.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAwMxB,CAAC"}
1
+ {"version":3,"file":"additional-properties.d.ts","sourceRoot":"","sources":["../../src/constants/additional-properties.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAwMxB,CAAC"}