@pixerate/editor 0.140.2 → 0.140.4
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/animation-editor/index.cjs +55 -55
- package/dist/animation-editor/index.js +2 -2
- package/dist/{chunk-XGOU44RJ.js → chunk-77SG47WT.js} +80 -9
- package/dist/{chunk-2SHFIVC3.js → chunk-DAS7M4RY.js} +1 -1
- package/dist/{chunk-VSR5A22L.cjs → chunk-H6FX45CP.cjs} +35 -35
- package/dist/{chunk-RCUX6CT2.cjs → chunk-HRI3ZMDM.cjs} +110 -39
- package/dist/{chunk-QKREDTPW.js → chunk-VM6JYWXQ.js} +7 -2
- package/dist/{chunk-V4GUQCDZ.cjs → chunk-XNZWATSB.cjs} +87 -82
- package/dist/image-editor/index.cjs +614 -614
- package/dist/image-editor/index.js +2 -2
- package/dist/image-editor/layers/text.d.cts +1 -1
- package/dist/image-editor/layers/text.d.ts +1 -1
- package/dist/paint-editor/index.cjs +7 -7
- package/dist/paint-editor/index.js +2 -2
- package/dist/vector/index.cjs +945 -945
- package/dist/vector/index.js +2 -2
- package/package.json +1 -1
|
@@ -363,7 +363,7 @@ import {
|
|
|
363
363
|
writePsd,
|
|
364
364
|
xyToTempTint,
|
|
365
365
|
xyToUv
|
|
366
|
-
} from "../chunk-
|
|
366
|
+
} from "../chunk-VM6JYWXQ.js";
|
|
367
367
|
import {
|
|
368
368
|
parseCssColor
|
|
369
369
|
} from "../chunk-3CI7FRMK.js";
|
|
@@ -622,7 +622,7 @@ import {
|
|
|
622
622
|
warpMeshParamAt,
|
|
623
623
|
warpMeshRows,
|
|
624
624
|
warpPresetMesh
|
|
625
|
-
} from "../chunk-
|
|
625
|
+
} from "../chunk-77SG47WT.js";
|
|
626
626
|
import "../chunk-ORDXMBD4.js";
|
|
627
627
|
import "../chunk-M6DNZNVY.js";
|
|
628
628
|
import "../chunk-WEIK3UYB.js";
|
|
@@ -48,7 +48,7 @@ export declare function renderText(layer: TypeLayer, env: TextEnv): {
|
|
|
48
48
|
/** The layer drawn again (`rendering` and `missingFonts` updated); refuses when nothing can draw it. */
|
|
49
49
|
export declare function rerenderText(layer: TypeLayer, env: TextEnv): TypeLayer;
|
|
50
50
|
/** Fields of `TextStyle` an edit can set (`null` clears an optional one). */
|
|
51
|
-
export declare const TEXT_STYLE_FIELDS: readonly ["fontFamily", "fontWeight", "italic", "fontSize", "color", "opacity", "tracking", "leading", "baselineShift", "underline", "strikethrough"];
|
|
51
|
+
export declare const TEXT_STYLE_FIELDS: readonly ["fontFamily", "fontWeight", "italic", "fontSize", "color", "opacity", "tracking", "leading", "baselineShift", "underline", "strikethrough", "postScriptName"];
|
|
52
52
|
/** `base` with the given style fields changed, validated (`null` clears leading, tracking, …). */
|
|
53
53
|
export declare function patchTextStyle(base: TextStyle, patch: Record<string, unknown>, path?: string): TextStyle;
|
|
54
54
|
export declare const PARAGRAPH_STYLE_FIELDS: readonly ["align", "autoLeading", "firstLineIndent", "startIndent", "endIndent", "spaceBefore", "spaceAfter"];
|
|
@@ -48,7 +48,7 @@ export declare function renderText(layer: TypeLayer, env: TextEnv): {
|
|
|
48
48
|
/** The layer drawn again (`rendering` and `missingFonts` updated); refuses when nothing can draw it. */
|
|
49
49
|
export declare function rerenderText(layer: TypeLayer, env: TextEnv): TypeLayer;
|
|
50
50
|
/** Fields of `TextStyle` an edit can set (`null` clears an optional one). */
|
|
51
|
-
export declare const TEXT_STYLE_FIELDS: readonly ["fontFamily", "fontWeight", "italic", "fontSize", "color", "opacity", "tracking", "leading", "baselineShift", "underline", "strikethrough"];
|
|
51
|
+
export declare const TEXT_STYLE_FIELDS: readonly ["fontFamily", "fontWeight", "italic", "fontSize", "color", "opacity", "tracking", "leading", "baselineShift", "underline", "strikethrough", "postScriptName"];
|
|
52
52
|
/** `base` with the given style fields changed, validated (`null` clears leading, tracking, …). */
|
|
53
53
|
export declare function patchTextStyle(base: TextStyle, patch: Record<string, unknown>, path?: string): TextStyle;
|
|
54
54
|
export declare const PARAGRAPH_STYLE_FIELDS: readonly ["align", "autoLeading", "firstLineIndent", "startIndent", "endIndent", "spaceBefore", "spaceAfter"];
|
|
@@ -7,7 +7,7 @@ var _chunkVKF3PWKRcjs = require('../chunk-VKF3PWKR.cjs');
|
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
var
|
|
10
|
+
var _chunkXNZWATSBcjs = require('../chunk-XNZWATSB.cjs');
|
|
11
11
|
require('../chunk-A2IS7EHE.cjs');
|
|
12
12
|
|
|
13
13
|
|
|
@@ -54,7 +54,7 @@ var _chunkJLWLX52Lcjs = require('../chunk-JLWLX52L.cjs');
|
|
|
54
54
|
|
|
55
55
|
|
|
56
56
|
var _chunkGEY73RUWcjs = require('../chunk-GEY73RUW.cjs');
|
|
57
|
-
require('../chunk-
|
|
57
|
+
require('../chunk-HRI3ZMDM.cjs');
|
|
58
58
|
|
|
59
59
|
|
|
60
60
|
|
|
@@ -1627,11 +1627,11 @@ function header(state, options) {
|
|
|
1627
1627
|
return out;
|
|
1628
1628
|
}
|
|
1629
1629
|
function serializePaintDocument(state, options = {}) {
|
|
1630
|
-
const { layers, assets } =
|
|
1630
|
+
const { layers, assets } = _chunkXNZWATSBcjs.serializeLayers.call(void 0, state.layers);
|
|
1631
1631
|
return { ...header(state, options), layers, assets };
|
|
1632
1632
|
}
|
|
1633
1633
|
async function serializePaintDocumentExternal(state, store, options = {}) {
|
|
1634
|
-
const { layers, assets } = await
|
|
1634
|
+
const { layers, assets } = await _chunkXNZWATSBcjs.serializeLayersExternal.call(void 0, state.layers, store);
|
|
1635
1635
|
return { ...header(state, options), layers, assets };
|
|
1636
1636
|
}
|
|
1637
1637
|
function paintLayersOnly(layers, problems) {
|
|
@@ -1668,7 +1668,7 @@ function deserializePaintDocument(raw) {
|
|
|
1668
1668
|
const canvas = normalizeCanvas({ width: r.width, height: r.height, dpi: _nullishCoalesce(r.dpi, () => ( void 0)) });
|
|
1669
1669
|
const paper = _chunkBXMIBMVGcjs.normalizePaper.call(void 0, _nullishCoalesce(r.paper, () => ( {})));
|
|
1670
1670
|
const assets = r.assets && typeof r.assets === "object" ? r.assets : {};
|
|
1671
|
-
const layers = paintLayersOnly(
|
|
1671
|
+
const layers = paintLayersOnly(_chunkXNZWATSBcjs.deserializeLayers.call(void 0, r.layers, { assets, problems }), problems);
|
|
1672
1672
|
const wanted = typeof r.activeLayerId === "string" ? r.activeLayerId : null;
|
|
1673
1673
|
const activeLayerId = wanted && _chunkHGTDMKNEcjs.findLayer.call(void 0, layers, wanted) ? wanted : _nullishCoalesce(_optionalChain([_chunkHGTDMKNEcjs.flattenLayers.call(void 0, layers), 'access', _70 => _70.filter, 'call', _71 => _71((l) => l.type === "pixel"), 'access', _72 => _72.pop, 'call', _73 => _73(), 'optionalAccess', _74 => _74.id]), () => ( null));
|
|
1674
1674
|
const wetEvents = Array.isArray(r.wetEvents) ? r.wetEvents.filter((e) => e && typeof e === "object" && Number.isInteger(e.clock) && typeof e.kind === "string") : [];
|
|
@@ -1682,7 +1682,7 @@ async function deserializePaintDocumentAsync(raw, store) {
|
|
|
1682
1682
|
if (!raw || typeof raw !== "object") throw new Error("Not a paint document: expected a JSON object.");
|
|
1683
1683
|
const r = raw;
|
|
1684
1684
|
const problems = [];
|
|
1685
|
-
const assets = await
|
|
1685
|
+
const assets = await _chunkXNZWATSBcjs.resolveExternalAssets.call(void 0, _nullishCoalesce(r.assets, () => ( {})), store, problems);
|
|
1686
1686
|
const loaded = deserializePaintDocument({ ...r, assets });
|
|
1687
1687
|
return { ...loaded, problems: [...problems, ...loaded.problems] };
|
|
1688
1688
|
}
|
|
@@ -5346,7 +5346,7 @@ var PaintEditorController = (_class10 = class _PaintEditorController {
|
|
|
5346
5346
|
return next.type === "group" ? { ...next, children: toStandard(next.children) } : next;
|
|
5347
5347
|
});
|
|
5348
5348
|
const layers = toStandard(dried);
|
|
5349
|
-
const result =
|
|
5349
|
+
const result = _chunkXNZWATSBcjs.exportPsd.call(void 0, { width, height, layers: [paperLayer, ...layers], merged, resolution: dpi });
|
|
5350
5350
|
for (const [mode, names] of changed) {
|
|
5351
5351
|
const label = _nullishCoalesce(_optionalChain([_chunkCWM3CUUXcjs.BLEND_MODES, 'access', _268 => _268.find, 'call', _269 => _269((m) => m.id === mode), 'optionalAccess', _270 => _270.label]), () => ( mode));
|
|
5352
5352
|
const std = _nullishCoalesce(_optionalChain([_chunkCWM3CUUXcjs.BLEND_MODES, 'access', _271 => _271.find, 'call', _272 => _272((m) => m.id === _chunkCWM3CUUXcjs.standardBlendMode.call(void 0, mode)), 'optionalAccess', _273 => _273.label]), () => ( _chunkCWM3CUUXcjs.standardBlendMode.call(void 0, mode)));
|
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
resolveExternalAssets,
|
|
8
8
|
serializeLayers,
|
|
9
9
|
serializeLayersExternal
|
|
10
|
-
} from "../chunk-
|
|
10
|
+
} from "../chunk-VM6JYWXQ.js";
|
|
11
11
|
import "../chunk-3CI7FRMK.js";
|
|
12
12
|
import {
|
|
13
13
|
EffectRendererPool
|
|
@@ -54,7 +54,7 @@ import {
|
|
|
54
54
|
realPresenceClock,
|
|
55
55
|
tweenPresenceCursor
|
|
56
56
|
} from "../chunk-BSGPXPTW.js";
|
|
57
|
-
import "../chunk-
|
|
57
|
+
import "../chunk-77SG47WT.js";
|
|
58
58
|
import {
|
|
59
59
|
BRUSH_ID,
|
|
60
60
|
BRUSH_ROTATIONS,
|