@character-foundry/character-foundry 0.1.6 → 0.1.8-dev.1765911776
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 +81 -32
- package/dist/app-framework.cjs +1 -1
- package/dist/app-framework.cjs.map +1 -1
- package/dist/app-framework.js +1 -1
- package/dist/app-framework.js.map +1 -1
- package/dist/charx.cjs.map +1 -1
- package/dist/charx.js.map +1 -1
- package/dist/core.cjs +1 -1
- package/dist/core.cjs.map +1 -1
- package/dist/core.d.cts +1 -1
- package/dist/core.d.ts +1 -1
- package/dist/core.js +1 -1
- package/dist/core.js.map +1 -1
- package/dist/exporter.cjs +3 -3
- package/dist/exporter.cjs.map +1 -1
- package/dist/exporter.js +3 -3
- package/dist/exporter.js.map +1 -1
- package/dist/federation.cjs +6 -6
- package/dist/federation.cjs.map +1 -1
- package/dist/federation.js +6 -6
- package/dist/federation.js.map +1 -1
- package/dist/image-utils.cjs +249 -0
- package/dist/image-utils.cjs.map +1 -0
- package/dist/image-utils.d.cts +136 -0
- package/dist/image-utils.d.ts +136 -0
- package/dist/image-utils.js +226 -0
- package/dist/image-utils.js.map +1 -0
- package/dist/index.cjs +7 -7
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +7 -7
- package/dist/index.js.map +1 -1
- package/dist/loader.cjs +4 -4
- package/dist/loader.cjs.map +1 -1
- package/dist/loader.js +4 -4
- package/dist/loader.js.map +1 -1
- package/dist/lorebook.cjs +5 -5
- package/dist/lorebook.cjs.map +1 -1
- package/dist/lorebook.js +5 -5
- package/dist/lorebook.js.map +1 -1
- package/dist/media.cjs.map +1 -1
- package/dist/media.js.map +1 -1
- package/dist/normalizer.cjs.map +1 -1
- package/dist/normalizer.js.map +1 -1
- package/dist/png.cjs +1 -1
- package/dist/png.cjs.map +1 -1
- package/dist/png.js +1 -1
- package/dist/png.js.map +1 -1
- package/dist/schemas.cjs.map +1 -1
- package/dist/schemas.js.map +1 -1
- package/dist/tokenizers.cjs.map +1 -1
- package/dist/tokenizers.js.map +1 -1
- package/dist/voxta.cjs +1 -1
- package/dist/voxta.cjs.map +1 -1
- package/dist/voxta.js +1 -1
- package/dist/voxta.js.map +1 -1
- package/package.json +14 -3
package/dist/loader.js
CHANGED
|
@@ -720,7 +720,7 @@ function inflateSyncWithLimit(compressed, maxSize = MAX_INFLATED_SIZE) {
|
|
|
720
720
|
const chunks = [];
|
|
721
721
|
let totalSize = 0;
|
|
722
722
|
let error = null;
|
|
723
|
-
const inflater = new Inflate((data,
|
|
723
|
+
const inflater = new Inflate((data, _final) => {
|
|
724
724
|
if (error) return;
|
|
725
725
|
if (data && data.length > 0) {
|
|
726
726
|
totalSize += data.length;
|
|
@@ -8313,7 +8313,7 @@ function parsePng(data, options) {
|
|
|
8313
8313
|
throw new SizeLimitError(estimatedSize, options.maxAssetSize, `Orphan chunk ${chunk.keyword}`);
|
|
8314
8314
|
}
|
|
8315
8315
|
const buffer = decode(chunk.text);
|
|
8316
|
-
|
|
8316
|
+
const extMatch = assetId.match(/\.([^.]+)$/);
|
|
8317
8317
|
let ext = extMatch ? extMatch[1] : null;
|
|
8318
8318
|
if (!ext) {
|
|
8319
8319
|
const detected = detectExtension(buffer);
|
|
@@ -8362,7 +8362,7 @@ function parseCharx(data, options) {
|
|
|
8362
8362
|
isMain: asset.descriptor.type === "icon"
|
|
8363
8363
|
// Main icon is type='icon' in descriptor
|
|
8364
8364
|
}));
|
|
8365
|
-
|
|
8365
|
+
const sourceFormat = charxData.isRisuFormat ? "charx_risu" : "charx";
|
|
8366
8366
|
return {
|
|
8367
8367
|
card: charxData.card,
|
|
8368
8368
|
assets,
|
|
@@ -8481,7 +8481,7 @@ function parseJson(data, options) {
|
|
|
8481
8481
|
}
|
|
8482
8482
|
return parseJsonFromParsed(parsed, jsonStr, data, options);
|
|
8483
8483
|
}
|
|
8484
|
-
function parseJsonFromParsed(parsed, jsonStr, rawBuffer,
|
|
8484
|
+
function parseJsonFromParsed(parsed, jsonStr, rawBuffer, _options) {
|
|
8485
8485
|
const spec = detectSpec(parsed);
|
|
8486
8486
|
let card;
|
|
8487
8487
|
let sourceFormat;
|