@snowcone-app/canvas 0.32.0 → 0.33.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/STYLING_CONTRACT.md +4 -2
- package/dist/{ContextualToolbars-BKU8IoAM.js → ContextualToolbars-CLDFENZq.js} +1144 -1086
- package/dist/ContextualToolbars-CLDFENZq.js.map +1 -0
- package/dist/{EditorCanvasImpl-4voOsj2k.js → EditorCanvasImpl-XP_t-tNl.js} +4 -4
- package/dist/{EditorCanvasImpl-4voOsj2k.js.map → EditorCanvasImpl-XP_t-tNl.js.map} +1 -1
- package/dist/{SnowconeCanvas-CgQdiBXv.js → SnowconeCanvas-wMLBZJ9z.js} +3 -3
- package/dist/{SnowconeCanvas-CgQdiBXv.js.map → SnowconeCanvas-wMLBZJ9z.js.map} +1 -1
- package/dist/advanced.mjs +4 -4
- package/dist/components/toolbars/EmbeddedToolbarLayout.d.ts +2 -0
- package/dist/components/toolbars/FloatingPanels.d.ts +10 -0
- package/dist/components/toolbars/SecondaryPanels.d.ts +13 -0
- package/dist/components/toolbars/alignButtons.d.ts +13 -0
- package/dist/components/toolbars/index.d.ts +5 -3
- package/dist/{embed-C69x0jHc.js → embed-VTcnrkRj.js} +3 -3
- package/dist/{embed-C69x0jHc.js.map → embed-VTcnrkRj.js.map} +1 -1
- package/dist/embed.mjs +1 -1
- package/dist/index.mjs +2 -2
- package/dist/{validation-DyUOjRGa.js → validation-CSa86fDE.js} +4 -4
- package/dist/{validation-DyUOjRGa.js.map → validation-CSa86fDE.js.map} +1 -1
- package/example/package.json +1 -1
- package/package.json +1 -1
- package/dist/ContextualToolbars-BKU8IoAM.js.map +0 -1
package/dist/advanced.mjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { D as te, T as M, i as D, B as re, I as q, j as I, k as ne, e as se } from "./useCommands-DwnZHUg8.js";
|
|
2
2
|
import { l as at, L as it, M as ct, m as lt, S as dt, n as ut, s as mt, o as ft } from "./useCommands-DwnZHUg8.js";
|
|
3
|
-
import { r as oe, v as ae } from "./validation-
|
|
4
|
-
import { a as pt, b as xt, c as gt, d as bt, D as yt, e as vt, f as wt, G as St, K as Ct, g as Tt, L as Et, S as $t, T as kt, Z as At, h as Ft, i as Pt, j as Nt, k as Rt, l as Bt, m as Mt, n as Dt, u as It, o as zt, p as Ot } from "./validation-
|
|
3
|
+
import { r as oe, v as ae } from "./validation-CSa86fDE.js";
|
|
4
|
+
import { a as pt, b as xt, c as gt, d as bt, D as yt, e as vt, f as wt, G as St, K as Ct, g as Tt, L as Et, S as $t, T as kt, Z as At, h as Ft, i as Pt, j as Nt, k as Rt, l as Bt, m as Mt, n as Dt, u as It, o as zt, p as Ot } from "./validation-CSa86fDE.js";
|
|
5
5
|
import { ImagePanel as Wt } from "./ImagePanel-ntJBepby.js";
|
|
6
|
-
import { P as ie, a as ce, b as le } from "./ContextualToolbars-
|
|
7
|
-
import { A as Gt, B as _t, c as Ut, C as jt, d as Jt, e as qt, F as Zt, f as Vt, I as Xt, g as Yt, M as Ht, h as Qt, S as er, T as tr, i as rr, j as nr, k as sr, U as or, l as ar, u as ir, m as cr } from "./ContextualToolbars-
|
|
6
|
+
import { P as ie, a as ce, b as le } from "./ContextualToolbars-CLDFENZq.js";
|
|
7
|
+
import { A as Gt, B as _t, c as Ut, C as jt, d as Jt, e as qt, F as Zt, f as Vt, I as Xt, g as Yt, M as Ht, h as Qt, S as er, T as tr, i as rr, j as nr, k as sr, U as or, l as ar, u as ir, m as cr } from "./ContextualToolbars-CLDFENZq.js";
|
|
8
8
|
import { u as Z } from "./design-builder-BpbYUYtK.js";
|
|
9
9
|
import { E as dr, P as ur, p as mr, b as fr, c as hr, e as pr, f as xr, g as gr, h as br, a as yr } from "./design-builder-BpbYUYtK.js";
|
|
10
10
|
import { T as wr, u as Sr } from "./ThemeContext-Rjz25x9X.js";
|
|
@@ -12,6 +12,7 @@ export interface EmbeddedToolbarLayoutProps {
|
|
|
12
12
|
transitionHeight: number | null;
|
|
13
13
|
/** Empty state message content */
|
|
14
14
|
emptyStateContent: React.ReactNode;
|
|
15
|
+
isAlignPanelOpen: boolean;
|
|
15
16
|
isCornerRadiusPanelOpen: boolean;
|
|
16
17
|
isCropPanelOpen: boolean;
|
|
17
18
|
isRotationPanelOpen: boolean;
|
|
@@ -31,6 +32,7 @@ export interface EmbeddedToolbarLayoutProps {
|
|
|
31
32
|
isKnockoutPanelOpen: boolean;
|
|
32
33
|
isDistressTexturePanelOpen: boolean;
|
|
33
34
|
isImageMaskPanelOpen: boolean;
|
|
35
|
+
alignPanel: React.ReactNode;
|
|
34
36
|
cornerRadiusPanel: React.ReactNode;
|
|
35
37
|
cropPanelContent: React.ReactNode;
|
|
36
38
|
rotationPanel: React.ReactNode;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
import { ImageElement } from '../../core/ImageElement.js';
|
|
3
|
+
import { AlignMode } from '../../utils/alignDistribute.js';
|
|
3
4
|
export interface FloatingCornerRadiusPanelProps {
|
|
4
5
|
toolbarPosition: {
|
|
5
6
|
top: number;
|
|
@@ -11,6 +12,15 @@ export interface FloatingCornerRadiusPanelProps {
|
|
|
11
12
|
onChange: (value: number) => void;
|
|
12
13
|
}
|
|
13
14
|
export declare const FloatingCornerRadiusPanel: React.FC<FloatingCornerRadiusPanelProps>;
|
|
15
|
+
export interface FloatingAlignPanelProps {
|
|
16
|
+
toolbarPosition: {
|
|
17
|
+
top: number;
|
|
18
|
+
left: number;
|
|
19
|
+
};
|
|
20
|
+
toolbarHeight: number;
|
|
21
|
+
onAlign: (mode: AlignMode) => void;
|
|
22
|
+
}
|
|
23
|
+
export declare const FloatingAlignPanel: React.FC<FloatingAlignPanelProps>;
|
|
14
24
|
export interface FloatingCropPanelProps {
|
|
15
25
|
toolbarPosition: {
|
|
16
26
|
top: number;
|
|
@@ -1,11 +1,24 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
import { ImageElement } from '../../core/ImageElement.js';
|
|
3
3
|
import { StrokeConfig, CompositingScope, ImageAdjustments, ShapeFill, ShadowConfig, StandardBlendMode } from '../../types/index.js';
|
|
4
|
+
import { AlignMode } from '../../utils/alignDistribute.js';
|
|
4
5
|
export interface CornerRadiusPanelProps {
|
|
5
6
|
value: number;
|
|
6
7
|
onChange: (value: number) => void;
|
|
7
8
|
}
|
|
8
9
|
export declare const CornerRadiusPanel: React.FC<CornerRadiusPanelProps>;
|
|
10
|
+
export interface AlignPanelProps {
|
|
11
|
+
/** Apply one alignment command. For a single selection
|
|
12
|
+
* `useAlignDistribute` aligns relative to the active artboard. */
|
|
13
|
+
onAlign: (mode: AlignMode) => void;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Position panel for a SINGLE selected element — the six align commands,
|
|
17
|
+
* relative to the artboard ("center on artboard"). Multi-selections get the
|
|
18
|
+
* same buttons inline in `MultiSelectionToolbar`, relative to the selection
|
|
19
|
+
* bbox; both surfaces share `ALIGN_BUTTONS` so they cannot drift.
|
|
20
|
+
*/
|
|
21
|
+
export declare const AlignPanel: React.FC<AlignPanelProps>;
|
|
9
22
|
export interface RotationPanelProps {
|
|
10
23
|
value: number;
|
|
11
24
|
onChange: (value: number) => void;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { AlignMode, DistributeMode } from '../../utils/alignDistribute.js';
|
|
2
|
+
export interface AlignButtonDef {
|
|
3
|
+
mode: AlignMode;
|
|
4
|
+
icon: string;
|
|
5
|
+
label: string;
|
|
6
|
+
}
|
|
7
|
+
export interface DistributeButtonDef {
|
|
8
|
+
mode: DistributeMode;
|
|
9
|
+
icon: string;
|
|
10
|
+
label: string;
|
|
11
|
+
}
|
|
12
|
+
export declare const ALIGN_BUTTONS: readonly AlignButtonDef[];
|
|
13
|
+
export declare const DISTRIBUTE_BUTTONS: readonly DistributeButtonDef[];
|
|
@@ -5,13 +5,15 @@
|
|
|
5
5
|
*/
|
|
6
6
|
export { GroupElementToolbar } from './GroupElementToolbar.js';
|
|
7
7
|
export type { GroupElementToolbarProps } from './GroupElementToolbar.js';
|
|
8
|
-
export { CornerRadiusPanel, RotationPanel, OpacityPanel, AdjustPanel, FontSizePanel, ShapeCornerRadiusPanel, ShapeTransparencyPanel, ShapeSidesPanel, ShapePointsPanel, ShapeInnerRadiusPanel, ShapeColorPanel, TextColorPanel, CompositingPanel, KnockoutPanel, StrokePanel, ShadowPanel, BlendModePanel, CropPanelContent, DistressTexturePanel, ImageMaskPanel, } from './SecondaryPanels.js';
|
|
9
|
-
export type { CompositingMode, AdjustPanelProps, StrokePanelProps, ShadowPanelProps, BlendModePanelProps, DistressTexturePanelProps, ImageMaskPanelProps, } from './SecondaryPanels.js';
|
|
8
|
+
export { AlignPanel, CornerRadiusPanel, RotationPanel, OpacityPanel, AdjustPanel, FontSizePanel, ShapeCornerRadiusPanel, ShapeTransparencyPanel, ShapeSidesPanel, ShapePointsPanel, ShapeInnerRadiusPanel, ShapeColorPanel, TextColorPanel, CompositingPanel, KnockoutPanel, StrokePanel, ShadowPanel, BlendModePanel, CropPanelContent, DistressTexturePanel, ImageMaskPanel, } from './SecondaryPanels.js';
|
|
9
|
+
export type { CompositingMode, AlignPanelProps, AdjustPanelProps, StrokePanelProps, ShadowPanelProps, BlendModePanelProps, DistressTexturePanelProps, ImageMaskPanelProps, } from './SecondaryPanels.js';
|
|
10
10
|
export { ExpandedPanelIcon } from './ExpandedPanelIcon.js';
|
|
11
11
|
export type { ExpandedPanelIconProps } from './ExpandedPanelIcon.js';
|
|
12
12
|
export { EmbeddedToolbarLayout } from './EmbeddedToolbarLayout.js';
|
|
13
13
|
export type { EmbeddedToolbarLayoutProps } from './EmbeddedToolbarLayout.js';
|
|
14
|
-
export { FloatingCornerRadiusPanel, FloatingCropPanel } from './FloatingPanels.js';
|
|
14
|
+
export { FloatingAlignPanel, FloatingCornerRadiusPanel, FloatingCropPanel } from './FloatingPanels.js';
|
|
15
|
+
export { ALIGN_BUTTONS, DISTRIBUTE_BUTTONS } from './alignButtons.js';
|
|
16
|
+
export type { AlignButtonDef, DistributeButtonDef } from './alignButtons.js';
|
|
15
17
|
export { SecondaryPanelWrapper } from './shared/SecondaryPanelWrapper.js';
|
|
16
18
|
export type { SecondaryPanelWrapperProps } from './shared/SecondaryPanelWrapper.js';
|
|
17
19
|
export { ColorPanelWrapper } from './shared/ColorPanelWrapper.js';
|
|
@@ -460,7 +460,7 @@ function Ie(t) {
|
|
|
460
460
|
// wrapper, which had no DOM at all, stays layout-identical).
|
|
461
461
|
/* @__PURE__ */ l("div", { className: "sc-root", style: { display: "contents" }, "data-sc-part": "root", children: /* @__PURE__ */ l(vt, { reportedError: c, onRetry: () => u(null), children: /* @__PURE__ */ l(bt, { ...t, internals: a, recordAudit: b }) }) });
|
|
462
462
|
}
|
|
463
|
-
let wt = () => import("./EditorCanvasImpl-
|
|
463
|
+
let wt = () => import("./EditorCanvasImpl-XP_t-tNl.js").then((t) => t.EditorCanvasImpl);
|
|
464
464
|
function Oe() {
|
|
465
465
|
return wt();
|
|
466
466
|
}
|
|
@@ -935,7 +935,7 @@ function Lt({
|
|
|
935
935
|
return $(() => {
|
|
936
936
|
if (!s) return;
|
|
937
937
|
let u = !1;
|
|
938
|
-
return import("./ContextualToolbars-
|
|
938
|
+
return import("./ContextualToolbars-CLDFENZq.js").then((a) => a.s).then(
|
|
939
939
|
(a) => {
|
|
940
940
|
u || c(() => a.ContextualToolbars);
|
|
941
941
|
},
|
|
@@ -1583,4 +1583,4 @@ export {
|
|
|
1583
1583
|
K as u,
|
|
1584
1584
|
ft as v
|
|
1585
1585
|
};
|
|
1586
|
-
//# sourceMappingURL=embed-
|
|
1586
|
+
//# sourceMappingURL=embed-VTcnrkRj.js.map
|