@snowcone-app/canvas 0.17.3 → 0.18.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/{ImportManager-C_wBjWaV.js → CanvasRenderer-DUc-MOeR.js} +586 -806
- package/dist/CanvasRenderer-DUc-MOeR.js.map +1 -0
- package/dist/{CanvasStateV1-BG2hEc3-.js → CanvasStateV1-Bq48qhv5.js} +3 -3
- package/dist/{CanvasStateV1-BG2hEc3-.js.map → CanvasStateV1-Bq48qhv5.js.map} +1 -1
- package/dist/ContextualToolbars-CkLjHNPn.js +5833 -0
- package/dist/ContextualToolbars-CkLjHNPn.js.map +1 -0
- package/dist/EditorCanvasImpl-Bv4yagew.js +81 -0
- package/dist/EditorCanvasImpl-Bv4yagew.js.map +1 -0
- package/dist/EditorContext-5QpqAhjh.js +1184 -0
- package/dist/{EditorContext-CGkfmbgo.js.map → EditorContext-5QpqAhjh.js.map} +1 -1
- package/dist/{FontAnalyzer-CLv7_msL.js → FontAnalyzer-DIlqmyuf.js} +35 -35
- package/dist/FontAnalyzer-DIlqmyuf.js.map +1 -0
- package/dist/{ElementFactory-CuHSAPfg.js → ImportManager-D--7JnvW.js} +699 -476
- package/dist/ImportManager-D--7JnvW.js.map +1 -0
- package/dist/MenuButton-CeoEAtzP.js +7444 -0
- package/dist/MenuButton-CeoEAtzP.js.map +1 -0
- package/dist/SnowconeCanvas-C_O-aeaQ.js +1166 -0
- package/dist/SnowconeCanvas-C_O-aeaQ.js.map +1 -0
- package/dist/advanced.mjs +266 -264
- package/dist/advanced.mjs.map +1 -1
- package/dist/api/embed.d.ts +1 -1
- package/dist/components/ContextualToolbars.d.ts +8 -0
- package/dist/components/editor/EditorAdd.d.ts +11 -0
- package/dist/components/editor/EditorCanvasImpl.d.ts +6 -0
- package/dist/components/editor/EditorControls.d.ts +14 -0
- package/dist/components/editor/EditorHistory.d.ts +11 -0
- package/dist/components/editor/EditorLayers.d.ts +16 -0
- package/dist/components/editor/EditorMenu.d.ts +11 -0
- package/dist/components/editor/RootInternals.d.ts +7 -0
- package/dist/components/editor/index.d.ts +20 -0
- package/dist/components/embed/addElementTypes.d.ts +9 -0
- package/dist/contexts/EditorContext.d.ts +38 -0
- package/dist/core/preview-registry.d.ts +34 -0
- package/dist/{editorErrors-BY4Pdg7a.js → editorErrors-DXNfVXtD.js} +2 -2
- package/dist/{editorErrors-BY4Pdg7a.js.map → editorErrors-DXNfVXtD.js.map} +1 -1
- package/dist/embed-Cdbjay9i.js +961 -0
- package/dist/embed-Cdbjay9i.js.map +1 -0
- package/dist/embed.mjs +5 -5
- package/dist/index.mjs +7 -7
- package/dist/internals.mjs +12 -12
- package/dist/{template-fields-Z9x13sjM.js → template-fields-DgoBtajp.js} +266 -240
- package/dist/template-fields-DgoBtajp.js.map +1 -0
- package/dist/testing.mjs +3 -3
- package/dist/{usePieceGuideBundle-C1ipFnZd.js → usePieceGuideBundle-DVOISsB1.js} +2 -2
- package/dist/{usePieceGuideBundle-C1ipFnZd.js.map → usePieceGuideBundle-DVOISsB1.js.map} +1 -1
- package/dist/validation-0IscSfRb.js +9304 -0
- package/dist/validation-0IscSfRb.js.map +1 -0
- package/package.json +1 -1
- package/dist/EditorCanvasImpl-DQxqdgpq.js +0 -70
- package/dist/EditorCanvasImpl-DQxqdgpq.js.map +0 -1
- package/dist/EditorContext-CGkfmbgo.js +0 -1178
- package/dist/ElementFactory-CuHSAPfg.js.map +0 -1
- package/dist/FontAnalyzer-CLv7_msL.js.map +0 -1
- package/dist/ImportManager-C_wBjWaV.js.map +0 -1
- package/dist/SnowconeCanvas-DBbmx9qW.js +0 -1187
- package/dist/SnowconeCanvas-DBbmx9qW.js.map +0 -1
- package/dist/UnifiedFontService-Dsu5cwfT.js +0 -1478
- package/dist/UnifiedFontService-Dsu5cwfT.js.map +0 -1
- package/dist/embed--B8ot6Lj.js +0 -746
- package/dist/embed--B8ot6Lj.js.map +0 -1
- package/dist/iconify-D6eVIEy4.js +0 -1089
- package/dist/iconify-D6eVIEy4.js.map +0 -1
- package/dist/template-fields-Z9x13sjM.js.map +0 -1
- package/dist/validation-C795COGQ.js +0 -19959
- package/dist/validation-C795COGQ.js.map +0 -1
|
@@ -3853,21 +3853,21 @@ function _t(r, t) {
|
|
|
3853
3853
|
r.width = t;
|
|
3854
3854
|
}
|
|
3855
3855
|
function Me(r, t, e) {
|
|
3856
|
-
const o = e.transformData, i = it(o), s = i !== void 0 ? i : e.width ?? 0, a = t / s, n =
|
|
3857
|
-
let
|
|
3858
|
-
if (
|
|
3859
|
-
const
|
|
3860
|
-
for (const
|
|
3861
|
-
if (
|
|
3862
|
-
const
|
|
3863
|
-
|
|
3856
|
+
const o = e.transformData, i = it(o), s = i !== void 0 ? i : e.width ?? 0, a = t / s, n = e.fontSize ?? r.fontSize, h = n * a;
|
|
3857
|
+
let l;
|
|
3858
|
+
if (h < 16 ? l = Math.round(h) : l = Math.round(h * 2) / 2, r.setFontSize(l), e.richText && e.richText instanceof P && typeof r.setRichText == "function") {
|
|
3859
|
+
const f = e.richText.clone();
|
|
3860
|
+
for (const u of f.spans)
|
|
3861
|
+
if (u.style.fontSize !== void 0) {
|
|
3862
|
+
const m = u.style.fontSize * a;
|
|
3863
|
+
m < 16 ? u.style.fontSize = Math.round(m) : u.style.fontSize = Math.round(m * 2) / 2;
|
|
3864
3864
|
}
|
|
3865
|
-
r.setRichText(
|
|
3865
|
+
r.setRichText(f);
|
|
3866
3866
|
}
|
|
3867
|
-
const
|
|
3868
|
-
if (it(
|
|
3869
|
-
const
|
|
3870
|
-
_t(
|
|
3867
|
+
const c = r.transformData;
|
|
3868
|
+
if (it(c) !== void 0 && i !== void 0) {
|
|
3869
|
+
const d = n > 0 ? l / n : a, f = i * d;
|
|
3870
|
+
_t(c, Math.max(20, Math.ceil(f)));
|
|
3871
3871
|
}
|
|
3872
3872
|
}
|
|
3873
3873
|
function Ae(r, t, e, o) {
|
|
@@ -7173,27 +7173,27 @@ export {
|
|
|
7173
7173
|
he as aA,
|
|
7174
7174
|
Uo as aB,
|
|
7175
7175
|
ke as aC,
|
|
7176
|
-
|
|
7177
|
-
|
|
7178
|
-
|
|
7179
|
-
|
|
7180
|
-
|
|
7181
|
-
|
|
7182
|
-
|
|
7183
|
-
|
|
7184
|
-
|
|
7185
|
-
|
|
7186
|
-
|
|
7187
|
-
|
|
7188
|
-
|
|
7189
|
-
|
|
7190
|
-
|
|
7191
|
-
|
|
7192
|
-
|
|
7193
|
-
|
|
7194
|
-
|
|
7195
|
-
|
|
7196
|
-
|
|
7176
|
+
$o as aD,
|
|
7177
|
+
fo as aE,
|
|
7178
|
+
oo as aF,
|
|
7179
|
+
io as aG,
|
|
7180
|
+
eo as aH,
|
|
7181
|
+
ne as aI,
|
|
7182
|
+
to as aJ,
|
|
7183
|
+
Qe as aK,
|
|
7184
|
+
je as aL,
|
|
7185
|
+
mo as aM,
|
|
7186
|
+
uo as aN,
|
|
7187
|
+
Ke as aO,
|
|
7188
|
+
co as aP,
|
|
7189
|
+
go as aQ,
|
|
7190
|
+
ho as aR,
|
|
7191
|
+
qe as aS,
|
|
7192
|
+
Ut as aT,
|
|
7193
|
+
jo as aU,
|
|
7194
|
+
yo as aV,
|
|
7195
|
+
He as aW,
|
|
7196
|
+
rt as aX,
|
|
7197
7197
|
Ko as aa,
|
|
7198
7198
|
Qo as ab,
|
|
7199
7199
|
ti as ac,
|
|
@@ -7246,4 +7246,4 @@ export {
|
|
|
7246
7246
|
At as y,
|
|
7247
7247
|
ri as z
|
|
7248
7248
|
};
|
|
7249
|
-
//# sourceMappingURL=FontAnalyzer-
|
|
7249
|
+
//# sourceMappingURL=FontAnalyzer-DIlqmyuf.js.map
|