@popcraft/kit 0.53.17 → 0.53.19
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/chunks/{agent-76MOJF7H.js → agent-QQAYZ5WB.js} +1 -1
- package/dist/chunks/{builtin-O5D2Q6RV.js → builtin-KE5VRKPQ.js} +4 -4
- package/dist/chunks/{buy-credits-2RI5ALP3.js → buy-credits-R6PSWUM2.js} +2 -2
- package/dist/chunks/{check-template-5FJPJLKN.js → check-template-BMGDUIRP.js} +3 -3
- package/dist/chunks/{chunk-GZZNTUHF.js → chunk-2O3AJLC7.js} +5 -5
- package/dist/chunks/{chunk-MUOTQRR5.js → chunk-35ZHGX7R.js} +3 -3
- package/dist/chunks/{chunk-B4FB4B2M.js → chunk-5IRV2SAQ.js} +1 -1
- package/dist/chunks/{chunk-64TRA3OH.js → chunk-6DDTIGDY.js} +4 -4
- package/dist/chunks/{chunk-ZIOF5AO6.js → chunk-7G7UOKM4.js} +1 -1
- package/dist/chunks/{chunk-IAL55FGC.js → chunk-DSFTJ6BI.js} +2 -2
- package/dist/chunks/{chunk-YLNK64NW.js → chunk-DW7H5O5F.js} +12 -12
- package/dist/chunks/{chunk-N6T6XKGC.js → chunk-ERXWGXIF.js} +1 -1
- package/dist/chunks/{chunk-SELEMFEP.js → chunk-FIFDX2PJ.js} +1 -1
- package/dist/chunks/{chunk-NAXSGXBD.js → chunk-GYRYPM3N.js} +11 -11
- package/dist/chunks/{chunk-LVENLTN6.js → chunk-HC2BCDFS.js} +4 -4
- package/dist/chunks/{chunk-4UOE2QLJ.js → chunk-HE2HQQF7.js} +4 -4
- package/dist/chunks/{chunk-ZEERADTI.js → chunk-I5VBP754.js} +12 -12
- package/dist/chunks/{chunk-IIPH3CZZ.js → chunk-IY5UZMTO.js} +251 -2
- package/dist/chunks/{chunk-QJU5LRJX.js → chunk-J6Q7JXER.js} +2 -2
- package/dist/chunks/{chunk-NH42V7UK.js → chunk-JGJZXJRJ.js} +1 -1
- package/dist/chunks/{chunk-AMQ2XV6E.js → chunk-JUHBI75X.js} +10 -10
- package/dist/chunks/{chunk-UXNXHMBD.js → chunk-K3AZGLLD.js} +5 -7
- package/dist/chunks/{chunk-YZYQTXAK.js → chunk-KT3VWNJF.js} +4 -4
- package/dist/chunks/{chunk-U6OKU7J4.js → chunk-PIVR4JOX.js} +2 -2
- package/dist/chunks/{chunk-MEEB2X3B.js → chunk-RCYPJTDS.js} +54 -54
- package/dist/chunks/{chunk-QS4AT3DM.js → chunk-RPZJC2IG.js} +2 -4
- package/dist/chunks/{chunk-ROIDWBDQ.js → chunk-USXZ2Z7E.js} +4 -4
- package/dist/chunks/{chunk-SAUZ2HYM.js → chunk-VO5AERM4.js} +4 -4
- package/dist/chunks/{chunk-XKUI2K2V.js → chunk-X4JKF2JG.js} +214 -1
- package/dist/chunks/{chunk-K63NQAOB.js → chunk-XE6NJFI2.js} +89 -89
- package/dist/chunks/{chunk-VRGEEHBR.js → chunk-Y7SVEIXZ.js} +270 -50
- package/dist/chunks/{chunk-E4P2HVUD.js → chunk-ZDBDOXNF.js} +3 -1
- package/dist/chunks/{client-RIPJA5PK.js → client-6AZSG3ZL.js} +1 -1
- package/dist/chunks/{client-3EX4LVI6.js → client-DBACY2LR.js} +3 -3
- package/dist/chunks/{client-N525NCFB.js → client-R43QZ4QR.js} +2 -2
- package/dist/chunks/{client-actions-232DIA3G.js → client-actions-FBVLWSY2.js} +13 -14
- package/dist/chunks/{dangerous-2CPJMLP6.js → dangerous-N4RC6QXK.js} +4 -4
- package/dist/chunks/{delete-current-file-IVQD2M3K.js → delete-current-file-KB34A5H7.js} +9 -10
- package/dist/chunks/{editor-seams-AFXFNM6K.js → editor-seams-YTHZIEZ2.js} +18 -20
- package/dist/chunks/{editor-store-ZFR2ZHNM.js → editor-store-I7XK3PGQ.js} +5 -5
- package/dist/chunks/{export-FWVSW5AN.js → export-FZA6A6I6.js} +1 -1
- package/dist/chunks/{export-watermark-KT25FYVD.js → export-watermark-6YAEKDKK.js} +9 -10
- package/dist/chunks/{eyedropper-W6X2VHUB.js → eyedropper-UWISBVOX.js} +7 -11
- package/dist/chunks/{generate-media-Y3NYLLSS.js → generate-media-6VUWK57N.js} +4 -4
- package/dist/chunks/{host-PKGEIJZF.js → host-MIEETQXP.js} +14 -17
- package/dist/chunks/{integrations-4NFCLH3S.js → integrations-DWTRYAL5.js} +1 -1
- package/dist/chunks/{libraries-565L4UXX.js → libraries-LHFSA7JJ.js} +9 -10
- package/dist/chunks/{live-X3AP4MHF.js → live-6C5QKVRX.js} +5 -5
- package/dist/chunks/{lottie-AGAHYTZE.js → lottie-ZKR6H64U.js} +3 -4
- package/dist/chunks/{media-tool-HVMNAVAE.js → media-tool-Z6ND5SKE.js} +12 -126
- package/dist/chunks/{new-file-Z7EJFO2J.js → new-file-ZD27RMLG.js} +7 -7
- package/dist/chunks/{pdf-X3ZB6QKO.js → pdf-RPD6QHMP.js} +5 -7
- package/dist/chunks/{player-check-ZGWLAHXY.js → player-check-CZVWUJXW.js} +3 -4
- package/dist/chunks/{plugin-OLV3V7ZN.js → plugin-IIVMHWXJ.js} +3 -3
- package/dist/chunks/{plugin-import-SM3NLQ5A.js → plugin-import-VVPFCMMO.js} +23 -26
- package/dist/chunks/{pptx-OI7DTHPN.js → pptx-QZMA6SRM.js} +3 -4
- package/dist/chunks/{presence-TL24PA2T.js → presence-X4HNN2NN.js} +6 -6
- package/dist/chunks/{project-TS27R5XO.js → project-ZSZAT2MB.js} +3 -3
- package/dist/chunks/{publish-site-34NCZ274.js → publish-site-B36S2CS7.js} +10 -11
- package/dist/chunks/{publish-store-V27NWG4I.js → publish-store-7ZCGU56C.js} +5 -5
- package/dist/chunks/{raster-actions-PGNW6BX6.js → raster-actions-I5TJ5I7S.js} +7 -11
- package/dist/chunks/{reference-images-36D6WIRI.js → reference-images-RAJE3NRE.js} +2 -2
- package/dist/chunks/{resolvers-V6SR7XRN.js → resolvers-J3DRJJ7P.js} +5 -6
- package/dist/chunks/{runner-Q6HI2WVB.js → runner-7PSSJXP6.js} +25 -27
- package/dist/chunks/{store-SIAVD2I6.js → store-D7M2QNWT.js} +14 -15
- package/dist/chunks/{storefront-prepare-6WYLPH6E.js → storefront-prepare-S6A5FZXC.js} +1 -1
- package/dist/chunks/{svg-export-QTVHP7B2.js → svg-export-J23NHZWC.js} +4 -5
- package/dist/chunks/{sync-PQCW3ZLW.js → sync-GQHOTPE4.js} +9 -10
- package/dist/chunks/{tabs-HTDE6XGQ.js → tabs-ZRZQW5HB.js} +12 -12
- package/dist/chunks/{team-H4DYU4NF.js → team-GZOX67CF.js} +1 -1
- package/dist/chunks/{team-client-DW5CMJ4L.js → team-client-PQQV3564.js} +1 -1
- package/dist/chunks/{theme-store-FAYEXX7K.js → theme-store-CBS2LI4H.js} +2 -3
- package/dist/chunks/{tools-HBJ2I7YP.js → tools-KNCUAUHK.js} +2 -2
- package/dist/chunks/{ui-commands-NRTJFHI6.js → ui-commands-WNPLJR4F.js} +20 -22
- package/dist/chunks/{versions-22FL7N6P.js → versions-SFXXLEBS.js} +9 -10
- package/dist/index.js +1 -1
- package/package.json +1 -1
- package/dist/chunks/chunk-C3QJHVOH.js +0 -269
- package/dist/chunks/chunk-I5REOOP7.js +0 -225
- package/dist/chunks/chunk-P4LE4WLR.js +0 -25
- package/dist/chunks/chunk-ZBANBY2Q.js +0 -27
|
@@ -5,12 +5,20 @@ const require = __popcraftRequire(import.meta.url);
|
|
|
5
5
|
const __filename = __popcraftPath(import.meta.url);
|
|
6
6
|
const __dirname = __popcraftDirname(__filename);
|
|
7
7
|
import {
|
|
8
|
+
glyphOutline,
|
|
8
9
|
init_flatten,
|
|
9
10
|
init_shape_outline,
|
|
11
|
+
init_text_rings,
|
|
10
12
|
shapeToRings
|
|
11
13
|
} from "./chunk-XK54ZTFX.js";
|
|
12
14
|
import {
|
|
13
|
-
|
|
15
|
+
fitCornersToBox,
|
|
16
|
+
init_shape_to_path,
|
|
17
|
+
init_trim,
|
|
18
|
+
isFullTrim,
|
|
19
|
+
polygonCorners,
|
|
20
|
+
starCorners,
|
|
21
|
+
trimPolylines
|
|
14
22
|
} from "./chunk-HOQFG5J7.js";
|
|
15
23
|
import {
|
|
16
24
|
init_define_POPCRAFT_COMPONENT_IDS
|
|
@@ -1845,8 +1853,249 @@ function computeBooleanMultiPoly(node, allNodes) {
|
|
|
1845
1853
|
return result;
|
|
1846
1854
|
}
|
|
1847
1855
|
|
|
1856
|
+
// lib/io/export-ir/paths.ts
|
|
1857
|
+
init_define_POPCRAFT_COMPONENT_IDS();
|
|
1858
|
+
init_trim();
|
|
1859
|
+
init_shape_to_path();
|
|
1860
|
+
init_text_rings();
|
|
1861
|
+
function fmt(n) {
|
|
1862
|
+
const r = Math.round(n * 100) / 100;
|
|
1863
|
+
return Object.is(r, -0) ? "0" : String(r);
|
|
1864
|
+
}
|
|
1865
|
+
function cornerRadii(node) {
|
|
1866
|
+
const cr = node.cornerRadius;
|
|
1867
|
+
if (typeof cr === "number") return [cr, cr, cr, cr];
|
|
1868
|
+
if (Array.isArray(cr)) return cr;
|
|
1869
|
+
return [0, 0, 0, 0];
|
|
1870
|
+
}
|
|
1871
|
+
var K = 0.5522847498;
|
|
1872
|
+
function arcTo(cmds, fromX, fromY, toX, toY, cx, cy) {
|
|
1873
|
+
cmds.push({ op: "C", x1: fromX + (cx - fromX) * K, y1: fromY + (cy - fromY) * K, x2: toX + (cx - toX) * K, y2: toY + (cy - toY) * K, x: toX, y: toY });
|
|
1874
|
+
}
|
|
1875
|
+
function fittedRadii(w, h, radii) {
|
|
1876
|
+
const maxR = Math.min(w, h) / 2;
|
|
1877
|
+
const fit = (r) => Math.max(0, Math.min(r || 0, maxR));
|
|
1878
|
+
return [fit(radii[0]), fit(radii[1]), fit(radii[2]), fit(radii[3])];
|
|
1879
|
+
}
|
|
1880
|
+
function roundedRectCmds(w, h, radii) {
|
|
1881
|
+
const [tl, tr, br, bl] = fittedRadii(w, h, radii);
|
|
1882
|
+
if (!tl && !tr && !br && !bl) return [{ op: "M", x: 0, y: 0 }, { op: "L", x: w, y: 0 }, { op: "L", x: w, y: h }, { op: "L", x: 0, y: h }, { op: "Z" }];
|
|
1883
|
+
const c = [{ op: "M", x: tl, y: 0 }, { op: "L", x: w - tr, y: 0 }];
|
|
1884
|
+
if (tr) arcTo(c, w - tr, 0, w, tr, w, 0);
|
|
1885
|
+
c.push({ op: "L", x: w, y: h - br });
|
|
1886
|
+
if (br) arcTo(c, w, h - br, w - br, h, w, h);
|
|
1887
|
+
c.push({ op: "L", x: bl, y: h });
|
|
1888
|
+
if (bl) arcTo(c, bl, h, 0, h - bl, 0, h);
|
|
1889
|
+
c.push({ op: "L", x: 0, y: tl });
|
|
1890
|
+
if (tl) arcTo(c, 0, tl, tl, 0, 0, 0);
|
|
1891
|
+
c.push({ op: "Z" });
|
|
1892
|
+
return c;
|
|
1893
|
+
}
|
|
1894
|
+
function ellipseCmds(w, h) {
|
|
1895
|
+
const rx = w / 2, ry = h / 2, cx = rx, cy = ry;
|
|
1896
|
+
return [
|
|
1897
|
+
{ op: "M", x: cx + rx, y: cy },
|
|
1898
|
+
{ op: "C", x1: cx + rx, y1: cy + ry * K, x2: cx + rx * K, y2: cy + ry, x: cx, y: cy + ry },
|
|
1899
|
+
{ op: "C", x1: cx - rx * K, y1: cy + ry, x2: cx - rx, y2: cy + ry * K, x: cx - rx, y: cy },
|
|
1900
|
+
{ op: "C", x1: cx - rx, y1: cy - ry * K, x2: cx - rx * K, y2: cy - ry, x: cx, y: cy - ry },
|
|
1901
|
+
{ op: "C", x1: cx + rx * K, y1: cy - ry, x2: cx + rx, y2: cy - ry * K, x: cx + rx, y: cy },
|
|
1902
|
+
{ op: "Z" }
|
|
1903
|
+
];
|
|
1904
|
+
}
|
|
1905
|
+
function cornerCmds(pts) {
|
|
1906
|
+
return [...pts.map(([x, y], i) => ({ op: i ? "L" : "M", x, y })), { op: "Z" }];
|
|
1907
|
+
}
|
|
1908
|
+
function polygonCmds(node) {
|
|
1909
|
+
return cornerCmds(fitCornersToBox(polygonCorners(node.pointCount || 3), node.width, node.height));
|
|
1910
|
+
}
|
|
1911
|
+
function starCmds(node) {
|
|
1912
|
+
const n = node;
|
|
1913
|
+
return cornerCmds(fitCornersToBox(starCorners(n.pointCount || 5, n.innerRadius ?? 0.4), node.width, node.height));
|
|
1914
|
+
}
|
|
1915
|
+
function vectorCmds(node) {
|
|
1916
|
+
const paths = node.paths || [];
|
|
1917
|
+
const out = [];
|
|
1918
|
+
const segment = (prev, curr) => {
|
|
1919
|
+
if (prev.handleOut && curr.handleIn) return { op: "C", x1: prev.handleOut.x, y1: prev.handleOut.y, x2: curr.handleIn.x, y2: curr.handleIn.y, x: curr.x, y: curr.y };
|
|
1920
|
+
if (prev.handleOut) return { op: "Q", x1: prev.handleOut.x, y1: prev.handleOut.y, x: curr.x, y: curr.y };
|
|
1921
|
+
if (curr.handleIn) return { op: "Q", x1: curr.handleIn.x, y1: curr.handleIn.y, x: curr.x, y: curr.y };
|
|
1922
|
+
return { op: "L", x: curr.x, y: curr.y };
|
|
1923
|
+
};
|
|
1924
|
+
for (const path of paths) {
|
|
1925
|
+
const pts = path.points;
|
|
1926
|
+
if (!pts?.length) continue;
|
|
1927
|
+
out.push({ op: "M", x: pts[0].x, y: pts[0].y });
|
|
1928
|
+
for (let i = 1; i < pts.length; i++) out.push(segment(pts[i - 1], pts[i]));
|
|
1929
|
+
if (path.closed && pts.length > 1) out.push(segment(pts[pts.length - 1], pts[0]));
|
|
1930
|
+
if (path.closed) out.push({ op: "Z" });
|
|
1931
|
+
}
|
|
1932
|
+
return out;
|
|
1933
|
+
}
|
|
1934
|
+
function multiPolyCmds(mp) {
|
|
1935
|
+
const out = [];
|
|
1936
|
+
for (const poly of mp) for (const ring of poly) {
|
|
1937
|
+
if (!ring.length) continue;
|
|
1938
|
+
ring.forEach((p, i) => out.push({ op: i ? "L" : "M", x: p[0], y: p[1] }));
|
|
1939
|
+
out.push({ op: "Z" });
|
|
1940
|
+
}
|
|
1941
|
+
return out;
|
|
1942
|
+
}
|
|
1943
|
+
function ringsCmds(rings) {
|
|
1944
|
+
const out = [];
|
|
1945
|
+
for (const ring of rings) {
|
|
1946
|
+
if (ring.length < 3) continue;
|
|
1947
|
+
ring.forEach((p, i) => out.push({ op: i ? "L" : "M", x: p[0], y: p[1] }));
|
|
1948
|
+
out.push({ op: "Z" });
|
|
1949
|
+
}
|
|
1950
|
+
return out;
|
|
1951
|
+
}
|
|
1952
|
+
function glyphCmds(instances) {
|
|
1953
|
+
const out = [];
|
|
1954
|
+
for (const g of instances) {
|
|
1955
|
+
const o = glyphOutline(g);
|
|
1956
|
+
if (!o) continue;
|
|
1957
|
+
let open = false;
|
|
1958
|
+
for (const c of o.commands) {
|
|
1959
|
+
const a = c.args;
|
|
1960
|
+
switch (c.command) {
|
|
1961
|
+
case "moveTo": {
|
|
1962
|
+
if (open) out.push({ op: "Z" });
|
|
1963
|
+
const [x, y] = o.place(a[0], a[1]);
|
|
1964
|
+
out.push({ op: "M", x, y });
|
|
1965
|
+
open = true;
|
|
1966
|
+
break;
|
|
1967
|
+
}
|
|
1968
|
+
case "lineTo": {
|
|
1969
|
+
const [x, y] = o.place(a[0], a[1]);
|
|
1970
|
+
out.push({ op: "L", x, y });
|
|
1971
|
+
break;
|
|
1972
|
+
}
|
|
1973
|
+
case "quadraticCurveTo": {
|
|
1974
|
+
const [x1, y1] = o.place(a[0], a[1]), [x, y] = o.place(a[2], a[3]);
|
|
1975
|
+
out.push({ op: "Q", x1, y1, x, y });
|
|
1976
|
+
break;
|
|
1977
|
+
}
|
|
1978
|
+
case "bezierCurveTo": {
|
|
1979
|
+
const [x1, y1] = o.place(a[0], a[1]), [x2, y2] = o.place(a[2], a[3]), [x, y] = o.place(a[4], a[5]);
|
|
1980
|
+
out.push({ op: "C", x1, y1, x2, y2, x, y });
|
|
1981
|
+
break;
|
|
1982
|
+
}
|
|
1983
|
+
case "closePath":
|
|
1984
|
+
if (open) {
|
|
1985
|
+
out.push({ op: "Z" });
|
|
1986
|
+
open = false;
|
|
1987
|
+
}
|
|
1988
|
+
break;
|
|
1989
|
+
}
|
|
1990
|
+
}
|
|
1991
|
+
if (open) out.push({ op: "Z" });
|
|
1992
|
+
}
|
|
1993
|
+
return out;
|
|
1994
|
+
}
|
|
1995
|
+
function shapeCmds(node, nodes) {
|
|
1996
|
+
switch (node.type) {
|
|
1997
|
+
case "RECTANGLE":
|
|
1998
|
+
case "FRAME":
|
|
1999
|
+
case "COMPONENT":
|
|
2000
|
+
case "COMPONENT_SET":
|
|
2001
|
+
case "INSTANCE":
|
|
2002
|
+
case "IMAGE":
|
|
2003
|
+
return roundedRectCmds(node.width, node.height, cornerRadii(node));
|
|
2004
|
+
case "SECTION":
|
|
2005
|
+
return roundedRectCmds(node.width, node.height, [0, 0, 0, 0]);
|
|
2006
|
+
case "ELLIPSE":
|
|
2007
|
+
return ellipseCmds(node.width, node.height);
|
|
2008
|
+
case "POLYGON":
|
|
2009
|
+
return polygonCmds(node);
|
|
2010
|
+
case "STAR":
|
|
2011
|
+
return starCmds(node);
|
|
2012
|
+
case "VECTOR":
|
|
2013
|
+
return vectorCmds(node);
|
|
2014
|
+
case "BOOLEAN":
|
|
2015
|
+
return multiPolyCmds(computeBooleanMultiPoly(node, nodes));
|
|
2016
|
+
default:
|
|
2017
|
+
return null;
|
|
2018
|
+
}
|
|
2019
|
+
}
|
|
2020
|
+
function cmdsToPolylines(cmds, steps = 24) {
|
|
2021
|
+
const out = [];
|
|
2022
|
+
let cur = null;
|
|
2023
|
+
let x = 0, y = 0, sx = 0, sy = 0;
|
|
2024
|
+
for (const c of cmds) {
|
|
2025
|
+
if (c.op === "M") {
|
|
2026
|
+
if (cur && cur.length > 2) out.push(cur);
|
|
2027
|
+
cur = [c.x, c.y];
|
|
2028
|
+
x = sx = c.x;
|
|
2029
|
+
y = sy = c.y;
|
|
2030
|
+
continue;
|
|
2031
|
+
}
|
|
2032
|
+
if (c.op === "Z") {
|
|
2033
|
+
if (cur) {
|
|
2034
|
+
if (x !== sx || y !== sy) cur.push(sx, sy);
|
|
2035
|
+
out.push(cur);
|
|
2036
|
+
}
|
|
2037
|
+
cur = null;
|
|
2038
|
+
x = sx;
|
|
2039
|
+
y = sy;
|
|
2040
|
+
continue;
|
|
2041
|
+
}
|
|
2042
|
+
cur ??= [x, y];
|
|
2043
|
+
if (c.op === "L") cur.push(c.x, c.y);
|
|
2044
|
+
else for (let i = 1; i <= steps; i++) {
|
|
2045
|
+
const t = i / steps, u = 1 - t;
|
|
2046
|
+
if (c.op === "Q") cur.push(u * u * x + 2 * u * t * c.x1 + t * t * c.x, u * u * y + 2 * u * t * c.y1 + t * t * c.y);
|
|
2047
|
+
else cur.push(u * u * u * x + 3 * u * u * t * c.x1 + 3 * u * t * t * c.x2 + t * t * t * c.x, u * u * u * y + 3 * u * u * t * c.y1 + 3 * u * t * t * c.y2 + t * t * t * c.y);
|
|
2048
|
+
}
|
|
2049
|
+
x = c.x;
|
|
2050
|
+
y = c.y;
|
|
2051
|
+
}
|
|
2052
|
+
if (cur && cur.length > 2) out.push(cur);
|
|
2053
|
+
return out;
|
|
2054
|
+
}
|
|
2055
|
+
function trimCmds(cmds, trim) {
|
|
2056
|
+
if (isFullTrim(trim)) return cmds;
|
|
2057
|
+
const out = [];
|
|
2058
|
+
for (const p of trimPolylines(cmdsToPolylines(cmds), trim)) {
|
|
2059
|
+
for (let i = 0; i < p.length; i += 2) out.push({ op: i ? "L" : "M", x: p[i], y: p[i + 1] });
|
|
2060
|
+
}
|
|
2061
|
+
return out;
|
|
2062
|
+
}
|
|
2063
|
+
function toSvgD(cmds) {
|
|
2064
|
+
let d = "";
|
|
2065
|
+
for (const c of cmds) {
|
|
2066
|
+
switch (c.op) {
|
|
2067
|
+
case "M":
|
|
2068
|
+
d += `M${fmt(c.x)} ${fmt(c.y)}`;
|
|
2069
|
+
break;
|
|
2070
|
+
case "L":
|
|
2071
|
+
d += `L${fmt(c.x)} ${fmt(c.y)}`;
|
|
2072
|
+
break;
|
|
2073
|
+
case "Q":
|
|
2074
|
+
d += `Q${fmt(c.x1)} ${fmt(c.y1)} ${fmt(c.x)} ${fmt(c.y)}`;
|
|
2075
|
+
break;
|
|
2076
|
+
case "C":
|
|
2077
|
+
d += `C${fmt(c.x1)} ${fmt(c.y1)} ${fmt(c.x2)} ${fmt(c.y2)} ${fmt(c.x)} ${fmt(c.y)}`;
|
|
2078
|
+
break;
|
|
2079
|
+
case "Z":
|
|
2080
|
+
d += "Z";
|
|
2081
|
+
break;
|
|
2082
|
+
}
|
|
2083
|
+
}
|
|
2084
|
+
return d;
|
|
2085
|
+
}
|
|
2086
|
+
|
|
1848
2087
|
export {
|
|
1849
2088
|
require_polygon_clipping_cjs,
|
|
1850
2089
|
nonzeroMultiPoly,
|
|
1851
|
-
computeBooleanMultiPoly
|
|
2090
|
+
computeBooleanMultiPoly,
|
|
2091
|
+
fmt,
|
|
2092
|
+
cornerRadii,
|
|
2093
|
+
fittedRadii,
|
|
2094
|
+
roundedRectCmds,
|
|
2095
|
+
vectorCmds,
|
|
2096
|
+
ringsCmds,
|
|
2097
|
+
glyphCmds,
|
|
2098
|
+
shapeCmds,
|
|
2099
|
+
trimCmds,
|
|
2100
|
+
toSvgD
|
|
1852
2101
|
};
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
} from "./chunk-6TMH7HCQ.js";
|
|
10
10
|
import {
|
|
11
11
|
activeTeamWorkspaceId
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-JGJZXJRJ.js";
|
|
13
13
|
import {
|
|
14
14
|
ApiError,
|
|
15
15
|
GUEST_FILE_LIMIT,
|
|
@@ -23,7 +23,7 @@ import {
|
|
|
23
23
|
} from "./chunk-LCLQWQO2.js";
|
|
24
24
|
import {
|
|
25
25
|
markLibraryDocument
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-Y7SVEIXZ.js";
|
|
27
27
|
import {
|
|
28
28
|
create
|
|
29
29
|
} from "./chunk-RVNIEOXA.js";
|
|
@@ -150,7 +150,7 @@ function startHyperyTeams() {
|
|
|
150
150
|
maybePromptForTeam();
|
|
151
151
|
void followFileTeam(linkedKey);
|
|
152
152
|
});
|
|
153
|
-
void import("./sync-
|
|
153
|
+
void import("./sync-GQHOTPE4.js").then(({ onSyncStatus, syncStatus }) => {
|
|
154
154
|
linkedKey = syncStatus().link?.key ?? null;
|
|
155
155
|
void followFileTeam(linkedKey);
|
|
156
156
|
onSyncStatus((_s, link) => {
|
|
@@ -6,7 +6,7 @@ const __filename = __popcraftPath(import.meta.url);
|
|
|
6
6
|
const __dirname = __popcraftDirname(__filename);
|
|
7
7
|
import {
|
|
8
8
|
useThemeStore
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-RPZJC2IG.js";
|
|
10
10
|
import {
|
|
11
11
|
external_exports
|
|
12
12
|
} from "./chunk-UDDWBCFE.js";
|
|
@@ -15,27 +15,27 @@ import {
|
|
|
15
15
|
} from "./chunk-T2U7UWFL.js";
|
|
16
16
|
import {
|
|
17
17
|
syncStatus
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-K3AZGLLD.js";
|
|
19
19
|
import {
|
|
20
20
|
exportNodeToSVG
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-I5VBP754.js";
|
|
22
22
|
import {
|
|
23
23
|
exportNodeToBlob
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-35ZHGX7R.js";
|
|
25
25
|
import {
|
|
26
26
|
usePluginStore
|
|
27
27
|
} from "./chunk-N72PY6HV.js";
|
|
28
28
|
import {
|
|
29
29
|
setPluginTabs,
|
|
30
30
|
useEditorStore
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-Y7SVEIXZ.js";
|
|
32
32
|
import {
|
|
33
33
|
openBeside
|
|
34
34
|
} from "./chunk-HU75T2CC.js";
|
|
35
35
|
import {
|
|
36
36
|
TOKEN_IDS,
|
|
37
37
|
tokenVar
|
|
38
|
-
} from "./chunk-
|
|
38
|
+
} from "./chunk-X4JKF2JG.js";
|
|
39
39
|
import {
|
|
40
40
|
getActiveRenderer
|
|
41
41
|
} from "./chunk-A2DCJZGE.js";
|
|
@@ -69,7 +69,7 @@ init_define_POPCRAFT_COMPONENT_IDS();
|
|
|
69
69
|
// lib/plugins/api.ts
|
|
70
70
|
init_define_POPCRAFT_COMPONENT_IDS();
|
|
71
71
|
async function handlePluginCall(env, method, params = {}) {
|
|
72
|
-
const { dispatchPluginCall } = await import("./plugin-
|
|
72
|
+
const { dispatchPluginCall } = await import("./plugin-IIVMHWXJ.js");
|
|
73
73
|
return dispatchPluginCall(env, method, params);
|
|
74
74
|
}
|
|
75
75
|
|
|
@@ -579,7 +579,7 @@ async function runPlugin(pluginId, commandId, opts = {}) {
|
|
|
579
579
|
if (!openBeside(url)) throw new Error("The browser blocked the new tab");
|
|
580
580
|
},
|
|
581
581
|
createDocument: async (opts2) => {
|
|
582
|
-
const { createFreshFileOrExplain } = await import("./new-file-
|
|
582
|
+
const { createFreshFileOrExplain } = await import("./new-file-ZD27RMLG.js");
|
|
583
583
|
const created = await createFreshFileOrExplain({}, { name: opts2?.name });
|
|
584
584
|
if (!created.ok) throw new Error(created.reason === "plan" ? "Plan limit reached" : created.reason === "guest-limit" ? "Sign in to create another file" : `Could not create file (${created.reason})`);
|
|
585
585
|
await useEditorStore.getState().openDocument(created.docId);
|
|
@@ -600,7 +600,7 @@ async function runPlugin(pluginId, commandId, opts = {}) {
|
|
|
600
600
|
const st = useEditorStore.getState();
|
|
601
601
|
const node = nodes[0];
|
|
602
602
|
if (format === "PDF") {
|
|
603
|
-
const { exportNodesToPDF } = await import("./pdf-
|
|
603
|
+
const { exportNodesToPDF } = await import("./pdf-RPD6QHMP.js");
|
|
604
604
|
const { jobPageSize } = await import("../lib/document/print-pages.js");
|
|
605
605
|
const { loadFullBleed } = await import("./print-prefs-VVROSDT2.js");
|
|
606
606
|
const blob2 = await exportNodesToPDF(renderer, nodes, { dpi: 300, bleed: bleed ?? !loadFullBleed(), marks: false, splitSpreads: true, pageSize: jobPageSize(st.document) }, st.document, st.document.styles);
|
|
@@ -769,7 +769,7 @@ if (typeof window !== "undefined") {
|
|
|
769
769
|
const name = d.name || "Imported";
|
|
770
770
|
void (async () => {
|
|
771
771
|
try {
|
|
772
|
-
const { importViaPlugin, applyPluginLayoutIr } = await import("./plugin-import-
|
|
772
|
+
const { importViaPlugin, applyPluginLayoutIr } = await import("./plugin-import-VVPFCMMO.js");
|
|
773
773
|
if (d.ir && typeof d.ir === "object") {
|
|
774
774
|
await applyPluginLayoutIr(d.ir, { mode, name });
|
|
775
775
|
return;
|
|
@@ -4,9 +4,6 @@ import { dirname as __popcraftDirname } from 'node:path';
|
|
|
4
4
|
const require = __popcraftRequire(import.meta.url);
|
|
5
5
|
const __filename = __popcraftPath(import.meta.url);
|
|
6
6
|
const __dirname = __popcraftDirname(__filename);
|
|
7
|
-
import {
|
|
8
|
-
isAppleMobile
|
|
9
|
-
} from "./chunk-ZBANBY2Q.js";
|
|
10
7
|
import {
|
|
11
8
|
createNewFileOrExplain,
|
|
12
9
|
findLinkByKey,
|
|
@@ -16,14 +13,14 @@ import {
|
|
|
16
13
|
reportOpenStage,
|
|
17
14
|
setCloudLink,
|
|
18
15
|
trackOpen
|
|
19
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-J6Q7JXER.js";
|
|
20
17
|
import {
|
|
21
18
|
parseDeepLink,
|
|
22
19
|
withDeepLink
|
|
23
20
|
} from "./chunk-HFCMTDPQ.js";
|
|
24
21
|
import {
|
|
25
22
|
activeTeamWorkspaceId
|
|
26
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-JGJZXJRJ.js";
|
|
27
24
|
import {
|
|
28
25
|
ApiError,
|
|
29
26
|
api,
|
|
@@ -31,9 +28,10 @@ import {
|
|
|
31
28
|
} from "./chunk-7OJZZPU4.js";
|
|
32
29
|
import {
|
|
33
30
|
attachPresence
|
|
34
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-ERXWGXIF.js";
|
|
35
32
|
import {
|
|
36
33
|
fileOpeningMode,
|
|
34
|
+
isAppleMobile,
|
|
37
35
|
isPersistableDocument,
|
|
38
36
|
isUnsavedPlaceholder,
|
|
39
37
|
legacyYdocDatabase,
|
|
@@ -43,7 +41,7 @@ import {
|
|
|
43
41
|
setCollabHistory,
|
|
44
42
|
storedDocument,
|
|
45
43
|
useEditorStore
|
|
46
|
-
} from "./chunk-
|
|
44
|
+
} from "./chunk-Y7SVEIXZ.js";
|
|
47
45
|
import {
|
|
48
46
|
currentHistoryGroup
|
|
49
47
|
} from "./chunk-DUH4J3CB.js";
|
|
@@ -16,7 +16,7 @@ import {
|
|
|
16
16
|
requestImageAction,
|
|
17
17
|
sizeForAspect,
|
|
18
18
|
vectorSupport
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-ZDBDOXNF.js";
|
|
20
20
|
import {
|
|
21
21
|
external_exports
|
|
22
22
|
} from "./chunk-UDDWBCFE.js";
|
|
@@ -25,13 +25,13 @@ import {
|
|
|
25
25
|
} from "./chunk-53RJWF2A.js";
|
|
26
26
|
import {
|
|
27
27
|
exportNodeToSVG
|
|
28
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-I5VBP754.js";
|
|
29
29
|
import {
|
|
30
30
|
selectionReferenceImages
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-7G7UOKM4.js";
|
|
32
32
|
import {
|
|
33
33
|
useEditorStore
|
|
34
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-Y7SVEIXZ.js";
|
|
35
35
|
import {
|
|
36
36
|
withHistoryGroup
|
|
37
37
|
} from "./chunk-DUH4J3CB.js";
|
|
@@ -7,10 +7,10 @@ const __dirname = __popcraftDirname(__filename);
|
|
|
7
7
|
import {
|
|
8
8
|
builtinCommands,
|
|
9
9
|
registerBuiltinCommands
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-RCYPJTDS.js";
|
|
11
11
|
import {
|
|
12
12
|
toolView
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-6DDTIGDY.js";
|
|
14
14
|
import {
|
|
15
15
|
init_define_POPCRAFT_COMPONENT_IDS
|
|
16
16
|
} from "./chunk-63KP74KB.js";
|