@life-palette/media 0.2.1 → 0.2.2
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/dist/index.cjs
CHANGED
|
@@ -2,7 +2,7 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
|
2
2
|
const require_rolldown_runtime = require("./rolldown-runtime-y5ARvAq5.cjs");
|
|
3
3
|
let metaprobe = require("metaprobe");
|
|
4
4
|
metaprobe = require_rolldown_runtime.__toESM(metaprobe, 1);
|
|
5
|
-
//#region ../../node_modules/arthash/wasm/pkg/arthash_wasm.js
|
|
5
|
+
//#region ../../node_modules/.pnpm/arthash@0.5.0/node_modules/arthash/wasm/pkg/arthash_wasm.js
|
|
6
6
|
/**
|
|
7
7
|
* Decode result for [`decode`]. JS sees `{ w, h, rgba }`.
|
|
8
8
|
*/
|
|
@@ -298,7 +298,7 @@ async function __wbg_init(module_or_path) {
|
|
|
298
298
|
return __wbg_finalize_init(instance, module);
|
|
299
299
|
}
|
|
300
300
|
//#endregion
|
|
301
|
-
//#region ../../node_modules/arthash/dist/palette.js
|
|
301
|
+
//#region ../../node_modules/.pnpm/arthash@0.5.0/node_modules/arthash/dist/palette.js
|
|
302
302
|
/**
|
|
303
303
|
* Palette type + construction helpers.
|
|
304
304
|
*
|
|
@@ -341,7 +341,7 @@ const palette = {
|
|
|
341
341
|
}
|
|
342
342
|
};
|
|
343
343
|
//#endregion
|
|
344
|
-
//#region ../../node_modules/arthash/dist/palettes.js
|
|
344
|
+
//#region ../../node_modules/.pnpm/arthash@0.5.0/node_modules/arthash/dist/palettes.js
|
|
345
345
|
/**
|
|
346
346
|
* Hand-curated retro / pixel-game palettes for the placeholder hash.
|
|
347
347
|
*
|
|
@@ -384,7 +384,7 @@ Object.freeze({
|
|
|
384
384
|
aap_splendor_32: aapSplendor32
|
|
385
385
|
});
|
|
386
386
|
//#endregion
|
|
387
|
-
//#region ../../node_modules/arthash/dist/index.js
|
|
387
|
+
//#region ../../node_modules/.pnpm/arthash@0.5.0/node_modules/arthash/dist/index.js
|
|
388
388
|
/**
|
|
389
389
|
* arthash — TypeScript SDK.
|
|
390
390
|
*
|
|
@@ -711,7 +711,7 @@ async function encode(rgb, width, height, c, opts = {}) {
|
|
|
711
711
|
return encodeRgb(rgb, width, height, codecToFfi(c), BigInt(opts.seed ?? 0), searchToFfi(opts.search));
|
|
712
712
|
}
|
|
713
713
|
//#endregion
|
|
714
|
-
//#region ../../node_modules/blurhash/dist/index.mjs
|
|
714
|
+
//#region ../../node_modules/.pnpm/blurhash@2.0.5/node_modules/blurhash/dist/index.mjs
|
|
715
715
|
var q = [
|
|
716
716
|
"0",
|
|
717
717
|
"1",
|
|
@@ -880,7 +880,7 @@ const CHUNK_SIZE = 2097152;
|
|
|
880
880
|
*/
|
|
881
881
|
async function hashBlob(blob, onProgress) {
|
|
882
882
|
if (typeof blob === "undefined" || blob.size === void 0) throw new TypeError("hashBlob 需要传入 Blob 或 File");
|
|
883
|
-
const { default: SparkMD5 } = await Promise.resolve().then(() => /* @__PURE__ */ require_rolldown_runtime.__toESM(require("./spark-md5-
|
|
883
|
+
const { default: SparkMD5 } = await Promise.resolve().then(() => /* @__PURE__ */ require_rolldown_runtime.__toESM(require("./spark-md5-BdBk4ets.cjs").default, 1));
|
|
884
884
|
const hash = new SparkMD5.ArrayBuffer();
|
|
885
885
|
const total = Math.max(1, Math.ceil(blob.size / CHUNK_SIZE));
|
|
886
886
|
for (let index = 0; index < total; index += 1) {
|
package/dist/index.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { n as __toESM } from "./rolldown-runtime-BPOCksWG.mjs";
|
|
2
2
|
import initMetaprobe, { extractMetaFastSized } from "metaprobe";
|
|
3
|
-
//#region ../../node_modules/arthash/wasm/pkg/arthash_wasm.js
|
|
3
|
+
//#region ../../node_modules/.pnpm/arthash@0.5.0/node_modules/arthash/wasm/pkg/arthash_wasm.js
|
|
4
4
|
/**
|
|
5
5
|
* Decode result for [`decode`]. JS sees `{ w, h, rgba }`.
|
|
6
6
|
*/
|
|
@@ -296,7 +296,7 @@ async function __wbg_init(module_or_path) {
|
|
|
296
296
|
return __wbg_finalize_init(instance, module);
|
|
297
297
|
}
|
|
298
298
|
//#endregion
|
|
299
|
-
//#region ../../node_modules/arthash/dist/palette.js
|
|
299
|
+
//#region ../../node_modules/.pnpm/arthash@0.5.0/node_modules/arthash/dist/palette.js
|
|
300
300
|
/**
|
|
301
301
|
* Palette type + construction helpers.
|
|
302
302
|
*
|
|
@@ -339,7 +339,7 @@ const palette = {
|
|
|
339
339
|
}
|
|
340
340
|
};
|
|
341
341
|
//#endregion
|
|
342
|
-
//#region ../../node_modules/arthash/dist/palettes.js
|
|
342
|
+
//#region ../../node_modules/.pnpm/arthash@0.5.0/node_modules/arthash/dist/palettes.js
|
|
343
343
|
/**
|
|
344
344
|
* Hand-curated retro / pixel-game palettes for the placeholder hash.
|
|
345
345
|
*
|
|
@@ -382,7 +382,7 @@ Object.freeze({
|
|
|
382
382
|
aap_splendor_32: aapSplendor32
|
|
383
383
|
});
|
|
384
384
|
//#endregion
|
|
385
|
-
//#region ../../node_modules/arthash/dist/index.js
|
|
385
|
+
//#region ../../node_modules/.pnpm/arthash@0.5.0/node_modules/arthash/dist/index.js
|
|
386
386
|
/**
|
|
387
387
|
* arthash — TypeScript SDK.
|
|
388
388
|
*
|
|
@@ -709,7 +709,7 @@ async function encode(rgb, width, height, c, opts = {}) {
|
|
|
709
709
|
return encodeRgb(rgb, width, height, codecToFfi(c), BigInt(opts.seed ?? 0), searchToFfi(opts.search));
|
|
710
710
|
}
|
|
711
711
|
//#endregion
|
|
712
|
-
//#region ../../node_modules/blurhash/dist/index.mjs
|
|
712
|
+
//#region ../../node_modules/.pnpm/blurhash@2.0.5/node_modules/blurhash/dist/index.mjs
|
|
713
713
|
var q = [
|
|
714
714
|
"0",
|
|
715
715
|
"1",
|
|
@@ -878,7 +878,7 @@ const CHUNK_SIZE = 2097152;
|
|
|
878
878
|
*/
|
|
879
879
|
async function hashBlob(blob, onProgress) {
|
|
880
880
|
if (typeof blob === "undefined" || blob.size === void 0) throw new TypeError("hashBlob 需要传入 Blob 或 File");
|
|
881
|
-
const { default: SparkMD5 } = await import("./spark-md5-
|
|
881
|
+
const { default: SparkMD5 } = await import("./spark-md5-CJ7TtZok.mjs").then((m) => /* @__PURE__ */ __toESM(m.default, 1));
|
|
882
882
|
const hash = new SparkMD5.ArrayBuffer();
|
|
883
883
|
const total = Math.max(1, Math.ceil(blob.size / CHUNK_SIZE));
|
|
884
884
|
for (let index = 0; index < total; index += 1) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
//#region ../../node_modules/spark-md5/spark-md5.js
|
|
1
|
+
//#region ../../node_modules/.pnpm/spark-md5@3.0.2/node_modules/spark-md5/spark-md5.js
|
|
2
2
|
var require_spark_md5 = /* @__PURE__ */ require("./rolldown-runtime-y5ARvAq5.cjs").__commonJSMin(((exports, module) => {
|
|
3
3
|
(function(factory) {
|
|
4
4
|
if (typeof exports === "object") module.exports = factory();
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as __commonJSMin } from "./rolldown-runtime-BPOCksWG.mjs";
|
|
2
|
-
//#region ../../node_modules/spark-md5/spark-md5.js
|
|
2
|
+
//#region ../../node_modules/.pnpm/spark-md5@3.0.2/node_modules/spark-md5/spark-md5.js
|
|
3
3
|
var require_spark_md5 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
4
4
|
(function(factory) {
|
|
5
5
|
if (typeof exports === "object") module.exports = factory();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@life-palette/media",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.2",
|
|
4
4
|
"description": "Browser-side media analysis: blurhash, arthash, dominant colors, EXIF, video technical metadata. Runs in any modern browser.",
|
|
5
5
|
"homepage": "https://github.com/Life-Palette/packages/tree/main/packages/media#readme",
|
|
6
6
|
"bugs": "https://github.com/Life-Palette/packages/issues",
|