taglib-wasm 1.0.5 → 1.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +38 -443
- package/dist/index.browser.d.ts +2 -1
- package/dist/index.browser.d.ts.map +1 -1
- package/dist/index.browser.js +76 -103
- package/dist/index.d.ts +3 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -0
- package/dist/simple.browser.js +74 -103
- package/dist/src/errors/base.d.ts +1 -1
- package/dist/src/errors/base.d.ts.map +1 -1
- package/dist/src/errors/base.js +2 -1
- package/dist/src/folder-api/folder-operations.d.ts +2 -1
- package/dist/src/folder-api/folder-operations.d.ts.map +1 -1
- package/dist/src/folder-api/types.d.ts.map +1 -1
- package/dist/src/folder-api/types.js +4 -1
- package/dist/src/runtime/wasi-adapter/file-handle.d.ts.map +1 -1
- package/dist/src/runtime/wasi-adapter/file-handle.js +12 -2
- package/dist/src/runtime/wasi-adapter/wasm-io.d.ts.map +1 -1
- package/dist/src/runtime/wasi-adapter/wasm-io.js +9 -0
- package/dist/src/runtime/wasi-host.d.ts.map +1 -1
- package/dist/src/runtime/wasi-host.js +5 -0
- package/dist/src/simple/batch-operations.d.ts +4 -4
- package/dist/src/simple/batch-operations.d.ts.map +1 -1
- package/dist/src/simple/batch-operations.js +4 -1
- package/dist/src/simple/picture-operations.d.ts.map +1 -1
- package/dist/src/simple/picture-operations.js +6 -50
- package/dist/src/simple/tag-operations.d.ts.map +1 -1
- package/dist/src/simple/tag-operations.js +12 -65
- package/dist/src/simple/with-audio-file.d.ts +5 -0
- package/dist/src/simple/with-audio-file.d.ts.map +1 -0
- package/dist/src/simple/with-audio-file.js +32 -0
- package/dist/src/taglib/audio-file-base.d.ts +3 -3
- package/dist/src/taglib/audio-file-base.d.ts.map +1 -1
- package/dist/src/taglib/audio-file-base.js +8 -2
- package/dist/src/taglib/audio-file-impl.d.ts +2 -2
- package/dist/src/taglib/audio-file-impl.d.ts.map +1 -1
- package/dist/src/taglib/audio-file-interface.d.ts +3 -1
- package/dist/src/taglib/audio-file-interface.d.ts.map +1 -1
- package/dist/src/taglib/taglib-class.d.ts +4 -2
- package/dist/src/taglib/taglib-class.d.ts.map +1 -1
- package/dist/src/taglib/taglib-class.js +19 -5
- package/dist/src/types/audio-formats.d.ts +37 -3
- package/dist/src/types/audio-formats.d.ts.map +1 -1
- package/dist/src/types/audio-formats.js +6 -0
- package/dist/src/types/format-property-keys.d.ts +1 -1
- package/dist/src/types/format-property-keys.d.ts.map +1 -1
- package/dist/src/version.d.ts +2 -0
- package/dist/src/version.d.ts.map +1 -0
- package/dist/src/version.js +4 -0
- package/dist/src/wasm.d.ts +8 -0
- package/dist/src/wasm.d.ts.map +1 -1
- package/dist/taglib-web.wasm +0 -0
- package/dist/taglib-wrapper.js +1 -1
- package/package.json +1 -1
package/dist/index.browser.js
CHANGED
|
@@ -11,6 +11,9 @@ var __export = (target, all) => {
|
|
|
11
11
|
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
12
12
|
|
|
13
13
|
// src/types/audio-formats.ts
|
|
14
|
+
function isNamedAudioInput(input) {
|
|
15
|
+
return typeof input === "object" && input !== null && "name" in input && "data" in input && !(input instanceof File) && !(input instanceof Uint8Array) && !(input instanceof ArrayBuffer);
|
|
16
|
+
}
|
|
14
17
|
var init_audio_formats = __esm({
|
|
15
18
|
"src/types/audio-formats.ts"() {
|
|
16
19
|
"use strict";
|
|
@@ -143,7 +146,8 @@ var init_base = __esm({
|
|
|
143
146
|
"M4A",
|
|
144
147
|
"FLAC",
|
|
145
148
|
"OGG",
|
|
146
|
-
"WAV"
|
|
149
|
+
"WAV",
|
|
150
|
+
"MKA"
|
|
147
151
|
];
|
|
148
152
|
TagLibError = class _TagLibError extends Error {
|
|
149
153
|
/**
|
|
@@ -1083,6 +1087,9 @@ var init_audio_file_base = __esm({
|
|
|
1083
1087
|
if (!propsWrapper) {
|
|
1084
1088
|
return void 0;
|
|
1085
1089
|
}
|
|
1090
|
+
const containerFormat = propsWrapper.containerFormat() || "unknown";
|
|
1091
|
+
const mpegVersion = propsWrapper.mpegVersion();
|
|
1092
|
+
const formatVersion = propsWrapper.formatVersion();
|
|
1086
1093
|
this.cachedAudioProperties = {
|
|
1087
1094
|
duration: propsWrapper.lengthInSeconds(),
|
|
1088
1095
|
bitrate: propsWrapper.bitrate(),
|
|
@@ -1090,8 +1097,11 @@ var init_audio_file_base = __esm({
|
|
|
1090
1097
|
channels: propsWrapper.channels(),
|
|
1091
1098
|
bitsPerSample: propsWrapper.bitsPerSample(),
|
|
1092
1099
|
codec: propsWrapper.codec() || "unknown",
|
|
1093
|
-
containerFormat
|
|
1094
|
-
isLossless: propsWrapper.isLossless()
|
|
1100
|
+
containerFormat,
|
|
1101
|
+
isLossless: propsWrapper.isLossless(),
|
|
1102
|
+
...mpegVersion > 0 ? { mpegVersion, mpegLayer: propsWrapper.mpegLayer() } : {},
|
|
1103
|
+
...containerFormat === "MP4" || containerFormat === "ASF" ? { isEncrypted: propsWrapper.isEncrypted() } : {},
|
|
1104
|
+
...formatVersion > 0 ? { formatVersion } : {}
|
|
1095
1105
|
};
|
|
1096
1106
|
}
|
|
1097
1107
|
return this.cachedAudioProperties;
|
|
@@ -1438,6 +1448,15 @@ var init_tag_mapping = __esm({
|
|
|
1438
1448
|
}
|
|
1439
1449
|
});
|
|
1440
1450
|
|
|
1451
|
+
// src/version.ts
|
|
1452
|
+
var VERSION;
|
|
1453
|
+
var init_version = __esm({
|
|
1454
|
+
"src/version.ts"() {
|
|
1455
|
+
"use strict";
|
|
1456
|
+
VERSION = "1.0.7";
|
|
1457
|
+
}
|
|
1458
|
+
});
|
|
1459
|
+
|
|
1441
1460
|
// src/runtime/module-loader-browser.ts
|
|
1442
1461
|
var module_loader_browser_exports = {};
|
|
1443
1462
|
__export(module_loader_browser_exports, {
|
|
@@ -1491,10 +1510,12 @@ var TagLib;
|
|
|
1491
1510
|
var init_taglib_class = __esm({
|
|
1492
1511
|
"src/taglib/taglib-class.ts"() {
|
|
1493
1512
|
"use strict";
|
|
1513
|
+
init_audio_formats();
|
|
1494
1514
|
init_errors2();
|
|
1495
1515
|
init_audio_file_impl();
|
|
1496
1516
|
init_load_audio_data();
|
|
1497
1517
|
init_tag_mapping();
|
|
1518
|
+
init_version();
|
|
1498
1519
|
TagLib = class _TagLib {
|
|
1499
1520
|
constructor(module) {
|
|
1500
1521
|
__publicField(this, "module");
|
|
@@ -1513,7 +1534,7 @@ var init_taglib_class = __esm({
|
|
|
1513
1534
|
}
|
|
1514
1535
|
/**
|
|
1515
1536
|
* Open an audio file for reading and writing metadata.
|
|
1516
|
-
* @param input - File path, Uint8Array, ArrayBuffer,
|
|
1537
|
+
* @param input - File path, Uint8Array, ArrayBuffer, File object, or NamedAudioInput.
|
|
1517
1538
|
* @param options - Partial-loading options for large files.
|
|
1518
1539
|
* @returns An AudioFile instance (use `using` for automatic cleanup).
|
|
1519
1540
|
* @throws {TagLibInitializationError} If the module is not properly initialized.
|
|
@@ -1525,7 +1546,8 @@ var init_taglib_class = __esm({
|
|
|
1525
1546
|
"TagLib module not properly initialized: createFileHandle not found. Make sure the module is fully loaded before calling open."
|
|
1526
1547
|
);
|
|
1527
1548
|
}
|
|
1528
|
-
const
|
|
1549
|
+
const actualInput = isNamedAudioInput(input) ? input.data : input;
|
|
1550
|
+
const sourcePath = typeof actualInput === "string" ? actualInput : void 0;
|
|
1529
1551
|
const opts = {
|
|
1530
1552
|
partial: false,
|
|
1531
1553
|
maxHeaderSize: 1024 * 1024,
|
|
@@ -1533,7 +1555,7 @@ var init_taglib_class = __esm({
|
|
|
1533
1555
|
...options
|
|
1534
1556
|
};
|
|
1535
1557
|
const { data: audioData, isPartiallyLoaded } = await loadAudioData(
|
|
1536
|
-
|
|
1558
|
+
actualInput,
|
|
1537
1559
|
opts
|
|
1538
1560
|
);
|
|
1539
1561
|
const buffer = audioData.buffer.slice(
|
|
@@ -1554,7 +1576,7 @@ var init_taglib_class = __esm({
|
|
|
1554
1576
|
this.module,
|
|
1555
1577
|
fileHandle,
|
|
1556
1578
|
sourcePath,
|
|
1557
|
-
|
|
1579
|
+
actualInput,
|
|
1558
1580
|
isPartiallyLoaded,
|
|
1559
1581
|
opts
|
|
1560
1582
|
);
|
|
@@ -1614,7 +1636,16 @@ var init_taglib_class = __esm({
|
|
|
1614
1636
|
}
|
|
1615
1637
|
/** Returns the taglib-wasm version with embedded TagLib version. */
|
|
1616
1638
|
version() {
|
|
1617
|
-
return
|
|
1639
|
+
return `${VERSION} (TagLib ${this.taglibVersion()})`;
|
|
1640
|
+
}
|
|
1641
|
+
taglibVersion() {
|
|
1642
|
+
if (this.module.getVersion) {
|
|
1643
|
+
return this.module.getVersion();
|
|
1644
|
+
}
|
|
1645
|
+
if (this.module.version) {
|
|
1646
|
+
return this.module.version();
|
|
1647
|
+
}
|
|
1648
|
+
return "unknown";
|
|
1618
1649
|
}
|
|
1619
1650
|
};
|
|
1620
1651
|
}
|
|
@@ -1662,6 +1693,7 @@ var init_taglib2 = __esm({
|
|
|
1662
1693
|
|
|
1663
1694
|
// index.browser.ts
|
|
1664
1695
|
init_taglib2();
|
|
1696
|
+
init_audio_formats();
|
|
1665
1697
|
init_errors2();
|
|
1666
1698
|
|
|
1667
1699
|
// src/simple/config.ts
|
|
@@ -1684,7 +1716,10 @@ async function getTagLib() {
|
|
|
1684
1716
|
init_errors2();
|
|
1685
1717
|
init_write();
|
|
1686
1718
|
init_tag_mapping();
|
|
1687
|
-
|
|
1719
|
+
|
|
1720
|
+
// src/simple/with-audio-file.ts
|
|
1721
|
+
init_errors2();
|
|
1722
|
+
async function withAudioFile(file, fn) {
|
|
1688
1723
|
const taglib = await getTagLib();
|
|
1689
1724
|
const audioFile = await taglib.open(file);
|
|
1690
1725
|
try {
|
|
@@ -1693,22 +1728,14 @@ async function readTags(file) {
|
|
|
1693
1728
|
"File may be corrupted or in an unsupported format"
|
|
1694
1729
|
);
|
|
1695
1730
|
}
|
|
1696
|
-
|
|
1697
|
-
return mapPropertiesToExtendedTag(props);
|
|
1731
|
+
return fn(audioFile);
|
|
1698
1732
|
} finally {
|
|
1699
1733
|
audioFile.dispose();
|
|
1700
1734
|
}
|
|
1701
1735
|
}
|
|
1702
|
-
async function
|
|
1703
|
-
|
|
1704
|
-
|
|
1705
|
-
try {
|
|
1706
|
-
if (!audioFile.isValid()) {
|
|
1707
|
-
throw new InvalidFormatError(
|
|
1708
|
-
"File may be corrupted or in an unsupported format"
|
|
1709
|
-
);
|
|
1710
|
-
}
|
|
1711
|
-
mergeTagUpdates(audioFile, tags);
|
|
1736
|
+
async function withAudioFileSave(file, fn) {
|
|
1737
|
+
return withAudioFile(file, (audioFile) => {
|
|
1738
|
+
fn(audioFile);
|
|
1712
1739
|
if (!audioFile.save()) {
|
|
1713
1740
|
throw new FileOperationError(
|
|
1714
1741
|
"save",
|
|
@@ -1716,9 +1743,20 @@ async function applyTags(file, tags) {
|
|
|
1716
1743
|
);
|
|
1717
1744
|
}
|
|
1718
1745
|
return audioFile.getFileBuffer();
|
|
1719
|
-
}
|
|
1720
|
-
|
|
1721
|
-
|
|
1746
|
+
});
|
|
1747
|
+
}
|
|
1748
|
+
|
|
1749
|
+
// src/simple/tag-operations.ts
|
|
1750
|
+
async function readTags(file) {
|
|
1751
|
+
return withAudioFile(
|
|
1752
|
+
file,
|
|
1753
|
+
(audioFile) => mapPropertiesToExtendedTag(audioFile.properties())
|
|
1754
|
+
);
|
|
1755
|
+
}
|
|
1756
|
+
async function applyTags(file, tags) {
|
|
1757
|
+
return withAudioFileSave(file, (audioFile) => {
|
|
1758
|
+
mergeTagUpdates(audioFile, tags);
|
|
1759
|
+
});
|
|
1722
1760
|
}
|
|
1723
1761
|
async function applyTagsToFile(file, tags) {
|
|
1724
1762
|
if (typeof file !== "string") {
|
|
@@ -1731,14 +1769,7 @@ async function applyTagsToFile(file, tags) {
|
|
|
1731
1769
|
await writeFileData(file, modifiedBuffer);
|
|
1732
1770
|
}
|
|
1733
1771
|
async function readProperties(file) {
|
|
1734
|
-
|
|
1735
|
-
const audioFile = await taglib.open(file);
|
|
1736
|
-
try {
|
|
1737
|
-
if (!audioFile.isValid()) {
|
|
1738
|
-
throw new InvalidFormatError(
|
|
1739
|
-
"File may be corrupted or in an unsupported format"
|
|
1740
|
-
);
|
|
1741
|
-
}
|
|
1772
|
+
return withAudioFile(file, (audioFile) => {
|
|
1742
1773
|
const props = audioFile.audioProperties();
|
|
1743
1774
|
if (!props) {
|
|
1744
1775
|
throw new MetadataError(
|
|
@@ -1748,9 +1779,7 @@ async function readProperties(file) {
|
|
|
1748
1779
|
);
|
|
1749
1780
|
}
|
|
1750
1781
|
return props;
|
|
1751
|
-
}
|
|
1752
|
-
audioFile.dispose();
|
|
1753
|
-
}
|
|
1782
|
+
});
|
|
1754
1783
|
}
|
|
1755
1784
|
async function isValidAudioFile(file) {
|
|
1756
1785
|
try {
|
|
@@ -1778,85 +1807,25 @@ async function readFormat(file) {
|
|
|
1778
1807
|
}
|
|
1779
1808
|
}
|
|
1780
1809
|
async function clearTags(file) {
|
|
1781
|
-
|
|
1782
|
-
const audioFile = await taglib.open(file);
|
|
1783
|
-
try {
|
|
1784
|
-
if (!audioFile.isValid()) {
|
|
1785
|
-
throw new InvalidFormatError(
|
|
1786
|
-
"File may be corrupted or in an unsupported format"
|
|
1787
|
-
);
|
|
1788
|
-
}
|
|
1810
|
+
return withAudioFileSave(file, (audioFile) => {
|
|
1789
1811
|
audioFile.setProperties({});
|
|
1790
1812
|
audioFile.removePictures();
|
|
1791
|
-
|
|
1792
|
-
throw new FileOperationError(
|
|
1793
|
-
"save",
|
|
1794
|
-
"Failed to save metadata changes. The file may be read-only or corrupted."
|
|
1795
|
-
);
|
|
1796
|
-
}
|
|
1797
|
-
return audioFile.getFileBuffer();
|
|
1798
|
-
} finally {
|
|
1799
|
-
audioFile.dispose();
|
|
1800
|
-
}
|
|
1813
|
+
});
|
|
1801
1814
|
}
|
|
1802
1815
|
|
|
1803
1816
|
// src/simple/picture-operations.ts
|
|
1804
|
-
init_errors2();
|
|
1805
1817
|
async function readPictures(file) {
|
|
1806
|
-
|
|
1807
|
-
const audioFile = await taglib.open(file);
|
|
1808
|
-
try {
|
|
1809
|
-
if (!audioFile.isValid()) {
|
|
1810
|
-
throw new InvalidFormatError(
|
|
1811
|
-
"File may be corrupted or in an unsupported format"
|
|
1812
|
-
);
|
|
1813
|
-
}
|
|
1814
|
-
return audioFile.getPictures();
|
|
1815
|
-
} finally {
|
|
1816
|
-
audioFile.dispose();
|
|
1817
|
-
}
|
|
1818
|
+
return withAudioFile(file, (audioFile) => audioFile.getPictures());
|
|
1818
1819
|
}
|
|
1819
1820
|
async function applyPictures(file, pictures) {
|
|
1820
|
-
|
|
1821
|
-
const audioFile = await taglib.open(file);
|
|
1822
|
-
try {
|
|
1823
|
-
if (!audioFile.isValid()) {
|
|
1824
|
-
throw new InvalidFormatError(
|
|
1825
|
-
"File may be corrupted or in an unsupported format"
|
|
1826
|
-
);
|
|
1827
|
-
}
|
|
1821
|
+
return withAudioFileSave(file, (audioFile) => {
|
|
1828
1822
|
audioFile.setPictures(pictures);
|
|
1829
|
-
|
|
1830
|
-
throw new FileOperationError(
|
|
1831
|
-
"save",
|
|
1832
|
-
"Failed to save picture changes. The file may be read-only or corrupted."
|
|
1833
|
-
);
|
|
1834
|
-
}
|
|
1835
|
-
return audioFile.getFileBuffer();
|
|
1836
|
-
} finally {
|
|
1837
|
-
audioFile.dispose();
|
|
1838
|
-
}
|
|
1823
|
+
});
|
|
1839
1824
|
}
|
|
1840
1825
|
async function addPicture(file, picture) {
|
|
1841
|
-
|
|
1842
|
-
const audioFile = await taglib.open(file);
|
|
1843
|
-
try {
|
|
1844
|
-
if (!audioFile.isValid()) {
|
|
1845
|
-
throw new InvalidFormatError(
|
|
1846
|
-
"File may be corrupted or in an unsupported format"
|
|
1847
|
-
);
|
|
1848
|
-
}
|
|
1826
|
+
return withAudioFileSave(file, (audioFile) => {
|
|
1849
1827
|
audioFile.addPicture(picture);
|
|
1850
|
-
|
|
1851
|
-
throw new FileOperationError(
|
|
1852
|
-
"save",
|
|
1853
|
-
"Failed to save picture changes. The file may be read-only or corrupted."
|
|
1854
|
-
);
|
|
1855
|
-
}
|
|
1856
|
-
return audioFile.getFileBuffer();
|
|
1857
|
-
} finally {
|
|
1858
|
-
audioFile.dispose();
|
|
1859
|
-
}
|
|
1828
|
+
});
|
|
1860
1829
|
}
|
|
1861
1830
|
async function clearPictures(file) {
|
|
1862
1831
|
return applyPictures(file, []);
|
|
@@ -1903,6 +1872,7 @@ async function readPictureMetadata(file) {
|
|
|
1903
1872
|
}
|
|
1904
1873
|
|
|
1905
1874
|
// src/simple/batch-operations.ts
|
|
1875
|
+
init_audio_formats();
|
|
1906
1876
|
init_errors2();
|
|
1907
1877
|
init_tag_mapping();
|
|
1908
1878
|
async function executeBatch(files, options, processor) {
|
|
@@ -1918,7 +1888,7 @@ async function executeBatch(files, options, processor) {
|
|
|
1918
1888
|
const chunk = files.slice(i, i + concurrency);
|
|
1919
1889
|
const chunkPromises = chunk.map(async (file, idx) => {
|
|
1920
1890
|
const index = i + idx;
|
|
1921
|
-
const fileName = typeof file === "string" ? file : `
|
|
1891
|
+
const fileName = typeof file === "string" ? file : file instanceof File ? file.name : isNamedAudioInput(file) ? file.name : `buffer-${index}`;
|
|
1922
1892
|
try {
|
|
1923
1893
|
const audioFile = await taglib.open(file);
|
|
1924
1894
|
try {
|
|
@@ -1990,6 +1960,8 @@ async function readMetadata(file) {
|
|
|
1990
1960
|
name = file;
|
|
1991
1961
|
} else if (file instanceof File) {
|
|
1992
1962
|
name = file.name;
|
|
1963
|
+
} else if (isNamedAudioInput(file)) {
|
|
1964
|
+
name = file.name;
|
|
1993
1965
|
} else {
|
|
1994
1966
|
name = `buffer (${file.byteLength} bytes)`;
|
|
1995
1967
|
}
|
|
@@ -2472,6 +2444,7 @@ export {
|
|
|
2472
2444
|
isInvalidFormatError,
|
|
2473
2445
|
isMemoryError,
|
|
2474
2446
|
isMetadataError,
|
|
2447
|
+
isNamedAudioInput,
|
|
2475
2448
|
isTagLibError,
|
|
2476
2449
|
isUnsupportedFormatError,
|
|
2477
2450
|
isValidAudioFile,
|
package/dist/index.d.ts
CHANGED
|
@@ -35,6 +35,7 @@
|
|
|
35
35
|
export type { AudioFile, TypedAudioFile, } from "./src/taglib/audio-file-interface.js";
|
|
36
36
|
export { AudioFileImpl, createTagLib, TagLib } from "./src/taglib.js";
|
|
37
37
|
export type { MutableTag } from "./src/taglib.js";
|
|
38
|
+
export { isNamedAudioInput } from "./src/types/audio-formats.js";
|
|
38
39
|
export { EnvironmentError, FileOperationError, InvalidFormatError, isEnvironmentError, isFileOperationError, isInvalidFormatError, isMemoryError, isMetadataError, isTagLibError, isUnsupportedFormatError, MemoryError, MetadataError, SUPPORTED_FORMATS, TagLibError, TagLibInitializationError, UnsupportedFormatError, } from "./src/errors.js";
|
|
39
40
|
export type { TagLibErrorCode } from "./src/errors.js";
|
|
40
41
|
export { initializeForDenoCompile, isDenoCompiled, prepareWasmForEmbedding, } from "./src/deno-compile.js";
|
|
@@ -44,10 +45,11 @@ export type { PropertyMetadata } from "./src/constants/property-types.js";
|
|
|
44
45
|
export { copyCoverArt, exportAllPictures, exportCoverArt, exportPictureByType, findCoverArtFiles, importCoverArt, importPictureWithType, loadPictureFromFile, savePictureToFile, } from "./src/file-utils/index.js";
|
|
45
46
|
export { type AudioDynamics, type AudioFileMetadata, type DuplicateGroup, exportFolderMetadata, findDuplicates, type FolderScanItem, type FolderScanOptions, type FolderScanResult, type FolderUpdateItem, type FolderUpdateResult, scanFolder, updateFolderTags, } from "./src/folder-api/index.js";
|
|
46
47
|
export { canvasToPicture, createPictureDownloadURL, createPictureGallery, dataURLToPicture, displayPicture, imageFileToPicture, pictureToDataURL, setCoverArtFromCanvas, } from "./src/web-utils/index.js";
|
|
47
|
-
export type { AudioCodec, AudioFileInput, AudioProperties, BitrateControlMode, ContainerFormat, ExtendedTag, FieldMapping, FileType, OpenOptions, Picture, PictureType, PropertyMap, Tag, TagInput, TagName, } from "./src/types.js";
|
|
48
|
+
export type { AudioCodec, AudioFileInput, AudioProperties, BitrateControlMode, ContainerFormat, ExtendedTag, FieldMapping, FileType, NamedAudioInput, OpenOptions, Picture, PictureType, PropertyMap, Tag, TagInput, TagName, } from "./src/types.js";
|
|
48
49
|
export { BITRATE_CONTROL_MODE_NAMES, BITRATE_CONTROL_MODE_VALUES, PICTURE_TYPE_NAMES, PICTURE_TYPE_VALUES, } from "./src/types.js";
|
|
49
50
|
export type { PropertyKey, PropertyValue } from "./src/constants.js";
|
|
50
51
|
export type { FormatPropertyKey, TagFormat, } from "./src/types/format-property-keys.js";
|
|
52
|
+
export type { TypedAudioProperties } from "./src/types/audio-formats.js";
|
|
51
53
|
export { COMPLEX_PROPERTIES, COMPLEX_PROPERTY_KEY, } from "./src/constants/complex-properties.js";
|
|
52
54
|
export type { ComplexPropertyKey, ComplexPropertyKeyMap, ComplexPropertyValueMap, Rating, UnsyncedLyrics, VariantMap, } from "./src/constants/complex-properties.js";
|
|
53
55
|
export { RatingUtils } from "./src/utils/rating.js";
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AAGH,YAAY,EACV,SAAS,EACT,cAAc,GACf,MAAM,sCAAsC,CAAC;AAC9C,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AACtE,YAAY,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AAGH,YAAY,EACV,SAAS,EACT,cAA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AgB,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAG1E,YAAY,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC9D,YAAY,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AACvE,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
// index.ts
|
|
2
2
|
import { AudioFileImpl, createTagLib, TagLib } from "./src/taglib.js";
|
|
3
|
+
import { isNamedAudioInput } from "./src/types/audio-formats.js";
|
|
3
4
|
import {
|
|
4
5
|
EnvironmentError,
|
|
5
6
|
FileOperationError,
|
|
@@ -155,6 +156,7 @@ export {
|
|
|
155
156
|
isInvalidFormatError,
|
|
156
157
|
isMemoryError,
|
|
157
158
|
isMetadataError,
|
|
159
|
+
isNamedAudioInput,
|
|
158
160
|
isTagLibError,
|
|
159
161
|
isUnsupportedFormatError,
|
|
160
162
|
isValidAudioFile,
|