@pixerate/editor 0.262.1 → 0.263.0
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 +60 -60
- package/dist/animation-editor/index.js +4 -4
- package/dist/brushes/index.cjs +52 -52
- package/dist/brushes/index.js +4 -4
- package/dist/{brushstrokeRender-N6UPZSQS.cjs → brushstrokeRender-2GBME4XD.cjs} +13 -13
- package/dist/{brushstrokeRender-25Q5BEY6.js → brushstrokeRender-S5DABANG.js} +3 -3
- package/dist/canvas/index.cjs +15 -14
- package/dist/canvas/index.js +3 -2
- package/dist/canvas/stickers.d.cts +5 -1
- package/dist/canvas/stickers.d.ts +5 -1
- package/dist/{chunk-6NZL24W4.js → chunk-34HIZXFX.js} +1 -1
- package/dist/{chunk-UVZ7RQOE.cjs → chunk-4E6BGHWN.cjs} +1 -1
- package/dist/{chunk-J5UQHWVL.js → chunk-6JL2D5SG.js} +27 -15
- package/dist/{chunk-QAR2N7HZ.js → chunk-6XX7E7O2.js} +1 -1
- package/dist/{chunk-3TQW5MPW.cjs → chunk-73QFSPDG.cjs} +23 -23
- package/dist/{chunk-APX63ILU.js → chunk-ACFSFUQH.js} +31 -0
- package/dist/{chunk-X2EXYY4J.js → chunk-CNLO6E2K.js} +2 -2
- package/dist/{chunk-F7CPSRLN.js → chunk-DOZ6F2K2.js} +12 -4
- package/dist/{chunk-CQVTGBQI.js → chunk-JGI4PZWO.js} +1 -1
- package/dist/{chunk-EHALWBBD.js → chunk-LG6MEEV7.js} +1 -1
- package/dist/{chunk-7AUQ2UJ3.cjs → chunk-LWHUU6A6.cjs} +10 -10
- package/dist/{chunk-JSDND7DF.cjs → chunk-OTN6VB5S.cjs} +32 -1
- package/dist/{chunk-5IW65VQ6.js → chunk-P5343XZO.js} +1 -1
- package/dist/{chunk-AVTPZO4Z.cjs → chunk-PE6YJMQT.cjs} +37 -25
- package/dist/{chunk-D4TE5JNW.js → chunk-QW7LKWKE.js} +1 -1
- package/dist/{chunk-YLUIFXSL.cjs → chunk-TIHW7CUY.cjs} +35 -35
- package/dist/{chunk-PYTJBVW5.cjs → chunk-TILEUVRO.cjs} +31 -31
- package/dist/{chunk-RVGP2XLF.cjs → chunk-XORJ7UZO.cjs} +21 -13
- package/dist/{chunk-43NT242D.cjs → chunk-XQW6R7VW.cjs} +86 -86
- package/dist/{chunk-TZOX7KWV.cjs → chunk-ZBACQHW3.cjs} +8 -8
- package/dist/image-editor/index.cjs +789 -788
- package/dist/image-editor/index.js +7 -6
- package/dist/image-editor/stickers.d.cts +7 -2
- package/dist/image-editor/stickers.d.ts +7 -2
- package/dist/paint-editor/controller.d.cts +7 -2
- package/dist/paint-editor/controller.d.ts +7 -2
- package/dist/paint-editor/index.cjs +574 -521
- package/dist/paint-editor/index.js +97 -44
- package/dist/paint-editor/sticker-art.d.cts +20 -10
- package/dist/paint-editor/sticker-art.d.ts +20 -10
- package/dist/paint-editor/stickers.d.cts +8 -1
- package/dist/paint-editor/stickers.d.ts +8 -1
- package/dist/paint-editor/stroke.d.cts +2 -0
- package/dist/paint-editor/stroke.d.ts +2 -0
- package/dist/stickers/browser.d.cts +10 -3
- package/dist/stickers/browser.d.ts +10 -3
- package/dist/stickers/combine.d.cts +2 -0
- package/dist/stickers/combine.d.ts +2 -0
- package/dist/stickers/conformance.d.cts +1 -1
- package/dist/stickers/conformance.d.ts +1 -1
- package/dist/stickers/errors.d.cts +1 -1
- package/dist/stickers/errors.d.ts +1 -1
- package/dist/stickers/fake.d.cts +4 -2
- package/dist/stickers/fake.d.ts +4 -2
- package/dist/stickers/helpers.d.cts +16 -2
- package/dist/stickers/helpers.d.ts +16 -2
- package/dist/stickers/index.cjs +116 -29
- package/dist/stickers/index.js +106 -19
- package/dist/stickers/tools.d.cts +9 -2
- package/dist/stickers/tools.d.ts +9 -2
- package/dist/stickers/types.d.cts +32 -5
- package/dist/stickers/types.d.ts +32 -5
- package/dist/vector/index.cjs +972 -971
- package/dist/vector/index.js +7 -6
- package/dist/vector/stickers.d.cts +7 -2
- package/dist/vector/stickers.d.ts +7 -2
- package/package.json +1 -1
- package/skills/pixerate-stickers/SKILL.md +20 -9
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
|
|
5
|
-
var
|
|
5
|
+
var _chunkOTN6VB5Scjs = require('./chunk-OTN6VB5S.cjs');
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
var _chunkWOFXZ3XUcjs = require('./chunk-WOFXZ3XU.cjs');
|
|
@@ -31,7 +31,7 @@ var DEFAULT_STICKER = { stamps: ["editor:star"], density: 0.4, sizeJitter: 0.4,
|
|
|
31
31
|
function normalizeStickerSettings(raw = {}, base = DEFAULT_STICKER) {
|
|
32
32
|
const refs = (list2) => list2.flatMap((s) => {
|
|
33
33
|
try {
|
|
34
|
-
return [
|
|
34
|
+
return [_chunkOTN6VB5Scjs.normalizeStickerRef.call(void 0, s)];
|
|
35
35
|
} catch (e2) {
|
|
36
36
|
return [];
|
|
37
37
|
}
|
|
@@ -78,7 +78,7 @@ function normalizeParticle(raw = {}, base = DEFAULT_PARTICLE) {
|
|
|
78
78
|
const texture = (t) => {
|
|
79
79
|
if (typeof t !== "string") return null;
|
|
80
80
|
const bare = t.startsWith("editor:") ? t.slice(7) : t;
|
|
81
|
-
if (
|
|
81
|
+
if (_chunkOTN6VB5Scjs.STAMP_KINDS.includes(bare)) return bare;
|
|
82
82
|
return /^[^:\s]+:\S+$/.test(t) && t.length <= 200 ? t : null;
|
|
83
83
|
};
|
|
84
84
|
const textures = Array.isArray(raw.dotTextures) ? raw.dotTextures.map(texture).filter((t) => t !== null).slice(0, MAX_DOT_TEXTURES) : [..._nullishCoalesce(base.dotTextures, () => ( []))];
|
|
@@ -214,7 +214,7 @@ var DEFAULT_SPRAY = { density: 0.5, size: 0.12 };
|
|
|
214
214
|
function readStamp(raw, base) {
|
|
215
215
|
if (raw === null) return null;
|
|
216
216
|
if (typeof raw !== "string") return base;
|
|
217
|
-
if (
|
|
217
|
+
if (_chunkOTN6VB5Scjs.STAMP_KINDS.includes(raw)) return `editor:${raw}`;
|
|
218
218
|
return /^[^:\s]+:\S+$/.test(raw) && raw.length <= 200 ? raw : base;
|
|
219
219
|
}
|
|
220
220
|
function readSpray(raw, base) {
|
|
@@ -1068,7 +1068,7 @@ var NOT = { toEngine: (v) => !v, toFacet: (v) => !v };
|
|
|
1068
1068
|
var EDITOR_STAMPS = {
|
|
1069
1069
|
toEngine: (v) => v.flatMap((ref) => {
|
|
1070
1070
|
try {
|
|
1071
|
-
const stamp =
|
|
1071
|
+
const stamp = _chunkOTN6VB5Scjs.editorStampOf.call(void 0, ref);
|
|
1072
1072
|
return stamp ? [stamp] : ref.includes(":") ? [ref] : [];
|
|
1073
1073
|
} catch (e3) {
|
|
1074
1074
|
return [];
|
|
@@ -1296,11 +1296,11 @@ var object = (description, properties, required) => ({
|
|
|
1296
1296
|
additionalProperties: false
|
|
1297
1297
|
});
|
|
1298
1298
|
var MIXING = oneOf2(["pigment", "rgb"], "How colours mix: pigment (Kubelka-Munk, blue and yellow make green) or rgb (straight averages). Default pigment; a Mixer Brush and the smudge tool default to rgb.");
|
|
1299
|
-
var BRUSH_STAMP_PATTERN = `^(?:[^:\\s]+:\\S+|${
|
|
1299
|
+
var BRUSH_STAMP_PATTERN = `^(?:[^:\\s]+:\\S+|${_chunkOTN6VB5Scjs.STAMP_KINDS.join("|")})$`;
|
|
1300
1300
|
var STAMP = {
|
|
1301
1301
|
type: "string",
|
|
1302
1302
|
pattern: BRUSH_STAMP_PATTERN,
|
|
1303
|
-
description: `A sticker ref provider:id (find_stickers lists them; the editor's own are ${
|
|
1303
|
+
description: `A sticker ref provider:id (find_stickers lists them; the editor's own are ${_chunkOTN6VB5Scjs.STAMP_KINDS.map((k) => `editor:${k}`).join(", ")}). A bare editor stamp (star) means editor:star.`
|
|
1304
1304
|
};
|
|
1305
1305
|
var BRISTLES = object("Bristle tips: the tuft. Missing fields take their defaults.", {
|
|
1306
1306
|
count: int(3, 128, "Bristles in the tuft (default 32)."),
|
|
@@ -1711,7 +1711,7 @@ function normalizeBrushSpec(raw, problems = []) {
|
|
|
1711
1711
|
delete brush.tip.stamps;
|
|
1712
1712
|
}
|
|
1713
1713
|
if (brush.tip.stamps) {
|
|
1714
|
-
const stamps = brush.tip.stamps.map((s) =>
|
|
1714
|
+
const stamps = brush.tip.stamps.map((s) => _chunkOTN6VB5Scjs.normalizeStickerRef.call(void 0, s));
|
|
1715
1715
|
if (stamps.length) brush.tip.stamps = stamps;
|
|
1716
1716
|
else {
|
|
1717
1717
|
drop("tip.stamps", "none of the stamps can be laid");
|