@snowcone-app/canvas 0.39.3 → 0.40.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/{ContextualToolbars-C62As-xY.js → ContextualToolbars-_5zqlcSw.js} +324 -319
- package/dist/{ContextualToolbars-C62As-xY.js.map → ContextualToolbars-_5zqlcSw.js.map} +1 -1
- package/dist/{EditorCanvasImpl-DIiRhNbF.js → EditorCanvasImpl-CBl27o5h.js} +4 -4
- package/dist/{EditorCanvasImpl-DIiRhNbF.js.map → EditorCanvasImpl-CBl27o5h.js.map} +1 -1
- package/dist/{SnowconeCanvas-B9HtP9gI.js → SnowconeCanvas-uUJy5mxC.js} +3 -3
- package/dist/{SnowconeCanvas-B9HtP9gI.js.map → SnowconeCanvas-uUJy5mxC.js.map} +1 -1
- package/dist/advanced.mjs +4 -4
- package/dist/{embed-BLwf1X5u.js → embed-BY6gMPTK.js} +3 -3
- package/dist/{embed-BLwf1X5u.js.map → embed-BY6gMPTK.js.map} +1 -1
- package/dist/embed.mjs +1 -1
- package/dist/index.mjs +2 -2
- package/dist/utils/documentColors.d.ts +10 -2
- package/dist/{validation-Dh9sVEb9.js → validation-BMB6_hp4.js} +4 -4
- package/dist/{validation-Dh9sVEb9.js.map → validation-BMB6_hp4.js.map} +1 -1
- package/example/package.json +1 -1
- package/package.json +1 -1
package/dist/embed.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { C as a, g as t, h as o, K as r, N as i, O as n, P as d, Q as m, R as u, b as l, a as E, j as c, k as p, l as g } from "./useCommands-x8J7_Mzy.js";
|
|
2
|
-
import { E as C, R as S, a as T, b as f, S as P, c as R, d as b, e as B, f as F, g as v, i as y, h, p as k, s as D, j as I, k as L, l as K, v as w } from "./embed-
|
|
2
|
+
import { E as C, R as S, a as T, b as f, S as P, c as R, d as b, e as B, f as F, g as v, i as y, h, p as k, s as D, j as I, k as L, l as K, v as w } from "./embed-BY6gMPTK.js";
|
|
3
3
|
import { t as M, V as j } from "./FontAnalyzer-DWHS41ba.js";
|
|
4
4
|
import { D as N, e as V, h as _, i as z, b as H } from "./design-builder-CoCtjIwj.js";
|
|
5
5
|
import { D as O, T as Q, r as Y, u as q, a as U, b as W, c as X, d as Z, e as $, w as ee } from "./template-fields-DaLRAR5W.js";
|
package/dist/index.mjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { e as u } from "./useCommands-x8J7_Mzy.js";
|
|
2
2
|
import { C as c, f as x, g as I, h as v, b as A, a as g, j as T, k as B, l as F } from "./useCommands-x8J7_Mzy.js";
|
|
3
|
-
import { E as y, S as L, S as _, u as O, a as R } from "./SnowconeCanvas-
|
|
3
|
+
import { E as y, S as L, S as _, u as O, a as R } from "./SnowconeCanvas-uUJy5mxC.js";
|
|
4
4
|
import { b as m, d } from "./design-builder-CoCtjIwj.js";
|
|
5
5
|
import { C as z, D as w, e as D, s as K } from "./design-builder-CoCtjIwj.js";
|
|
6
6
|
import { T as V, r as b, u as h, a as G, b as H, c as U, d as Y, e as Z, w as j } from "./template-fields-DaLRAR5W.js";
|
|
7
|
-
import { A as J, C as q, E as Q, M as W, P as X, r as $, v as ee } from "./validation-
|
|
7
|
+
import { A as J, C as q, E as Q, M as W, P as X, r as $, v as ee } from "./validation-BMB6_hp4.js";
|
|
8
8
|
import { F as ae, G as te, H as oe, J as re } from "./ExportManager-BbBfO22S.js";
|
|
9
9
|
import { c as ie, e as ue } from "./compose-DtQL_oit.js";
|
|
10
10
|
import { d as de, m as Ce, s as Se, v as Ee } from "./CanvasStateV1-V8l7-6PC.js";
|
|
@@ -10,7 +10,7 @@ import { ArtboardElement } from '../core/ArtboardElement.js';
|
|
|
10
10
|
* shirt-colour preview, not part of the artwork).
|
|
11
11
|
*/
|
|
12
12
|
export declare function collectDocumentColors(elements: ReadonlyArray<BaseElement>, artboards?: ReadonlyArray<ArtboardElement>): Set<string>;
|
|
13
|
-
type RGB = {
|
|
13
|
+
export type RGB = {
|
|
14
14
|
r: number;
|
|
15
15
|
g: number;
|
|
16
16
|
b: number;
|
|
@@ -65,6 +65,15 @@ export declare function dedupeByPerceptualDistance(palette: RGB[], threshold: nu
|
|
|
65
65
|
* @internal exported for tests
|
|
66
66
|
*/
|
|
67
67
|
export declare function furthestPointPalette(candidates: RGB[], paletteSize: number, threshold: number): RGB[];
|
|
68
|
+
/**
|
|
69
|
+
* The pixel half of {@link extractImagePalette}: up to `paletteSize`
|
|
70
|
+
* obviously different colours from a pixel list (median cut, then
|
|
71
|
+
* furthest-point picking), most populous first. No canvas, so it runs
|
|
72
|
+
* anywhere (Node, workers, lab scripts) and every caller picks the
|
|
73
|
+
* same colours the editor's swatch row shows. Callers drop
|
|
74
|
+
* transparent / background pixels first.
|
|
75
|
+
*/
|
|
76
|
+
export declare function paletteFromPixels(pixels: RGB[], paletteSize?: number): string[];
|
|
68
77
|
/**
|
|
69
78
|
* Extract up to `paletteSize` dominant colours from an image URL.
|
|
70
79
|
*
|
|
@@ -105,4 +114,3 @@ export declare function collectImageColors(elements: ReadonlyArray<BaseElement>,
|
|
|
105
114
|
* @internal
|
|
106
115
|
*/
|
|
107
116
|
export declare function _resetImagePaletteCache(): void;
|
|
108
|
-
export {};
|
|
@@ -8,7 +8,7 @@ import { createPortal as dr } from "react-dom";
|
|
|
8
8
|
import { b as ro, n as ur, g as _n, c as oo, r as io, d as ao, C as Ws, e as Vs, f as gs, T as co, a as lo, A as uo, S as ho, I as fo } from "./CanvasRenderer-COO5UXtZ.js";
|
|
9
9
|
import { u as po } from "./ThemeContext-Rjz25x9X.js";
|
|
10
10
|
import { renderToStaticMarkup as mo } from "react-dom/server";
|
|
11
|
-
import { D as Ps, n as As, o as hr, p as Ns, e as go, q as Mt } from "./ContextualToolbars-
|
|
11
|
+
import { D as Ps, n as As, o as hr, p as Ns, e as go, q as Mt } from "./ContextualToolbars-_5zqlcSw.js";
|
|
12
12
|
import { L as Tt, S as fr, T as Ot, I as xo } from "./custom-icons-o1U13Vcg.js";
|
|
13
13
|
import * as ts from "@radix-ui/react-radio-group";
|
|
14
14
|
import { R as yo, S as Ks, U as Us } from "./ExportManager-BbBfO22S.js";
|
|
@@ -5649,9 +5649,9 @@ async function Za() {
|
|
|
5649
5649
|
import("./ImagePanel-BaX0UE-L.js"),
|
|
5650
5650
|
Promise.resolve().then(() => ka),
|
|
5651
5651
|
Promise.resolve().then(() => Ma),
|
|
5652
|
-
import("./ContextualToolbars-
|
|
5652
|
+
import("./ContextualToolbars-_5zqlcSw.js").then((c) => c.s),
|
|
5653
5653
|
Promise.resolve().then(() => Ta),
|
|
5654
|
-
import("./ContextualToolbars-
|
|
5654
|
+
import("./ContextualToolbars-_5zqlcSw.js").then((c) => c.r)
|
|
5655
5655
|
]);
|
|
5656
5656
|
It("effects-panel", {
|
|
5657
5657
|
component: e,
|
|
@@ -8681,4 +8681,4 @@ export {
|
|
|
8681
8681
|
ja as u,
|
|
8682
8682
|
rc as v
|
|
8683
8683
|
};
|
|
8684
|
-
//# sourceMappingURL=validation-
|
|
8684
|
+
//# sourceMappingURL=validation-BMB6_hp4.js.map
|