@charisol/plexo-sdk 2.0.29 → 2.0.30
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/README.md +23 -0
- package/dist/{InlineColorPicker-XesBzRsU.js → InlineColorPicker-Cb9p4I_m.js} +123 -90
- package/dist/{blank-BEl6CY5C.js → blank-Dg8GIfQP.js} +271 -246
- package/dist/{files-Df6FY0HK.js → files-Bjoz1wCf.js} +13 -13
- package/dist/index.js +9045 -9078
- package/dist/plexo-sdk.css +1 -1
- package/dist/{v1-Cn7SGvZk.js → v1-B6QkDh9R.js} +545 -545
- package/dist/v2/components/layout/TopToolbar.d.ts +7 -0
- package/dist/v2/components/simple/SimpleCoach.d.ts +8 -0
- package/dist/v2/components/simple/SimpleHint.d.ts +3 -0
- package/dist/v2/components/simple/SimpleInspector.d.ts +3 -0
- package/dist/v2/components/simple/SimpleSidebar.d.ts +3 -0
- package/dist/v2/components/simple/SimpleTopBar.d.ts +5 -0
- package/dist/v2/components/simple/words.d.ts +12 -0
- package/dist/v2/data/blankPage.d.ts +5 -0
- package/dist/v2/host/HostContext.d.ts +14 -0
- package/dist/v2/index.d.ts +2 -1
- package/dist/v2-compile.js +8 -8
- package/dist/v2-files.js +1 -1
- package/dist/v2.js +5230 -4276
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as e } from "./id-CR6Y8qD6.js";
|
|
2
|
-
import {
|
|
2
|
+
import { $t as t, H as n, Yt as r, o as i, r as a, t as o } from "./blank-Dg8GIfQP.js";
|
|
3
3
|
import { a as s, i as c, o as l, s as u } from "./pdfImport-BOev0Pc1.js";
|
|
4
4
|
//#region src/v2/files/vector.ts
|
|
5
5
|
var d = (e) => e.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """), f = (e) => String(Math.round(e * 100) / 100), p = (e) => !e || e === "transparent" || /^rgba?\([^)]*[,/]\s*0(\.0+)?\s*\)$/.test(e.trim());
|
|
@@ -1334,7 +1334,7 @@ function G(e, t, n = {}) {
|
|
|
1334
1334
|
var ze = ".plx-doc table{font-size:14px}.plx-doc td,.plx-doc th{min-width:64px}";
|
|
1335
1335
|
function Be(e) {
|
|
1336
1336
|
if (e.kind === "design") {
|
|
1337
|
-
let
|
|
1337
|
+
let n = {
|
|
1338
1338
|
designSystem: e.designSystem,
|
|
1339
1339
|
title: e.page.name,
|
|
1340
1340
|
...e.compile
|
|
@@ -1351,16 +1351,16 @@ function Be(e) {
|
|
|
1351
1351
|
name: e.page.name
|
|
1352
1352
|
};
|
|
1353
1353
|
}
|
|
1354
|
-
let
|
|
1355
|
-
...
|
|
1354
|
+
let r = i(e.page, {
|
|
1355
|
+
...n,
|
|
1356
1356
|
runtime: "none",
|
|
1357
1357
|
nodeIds: !0
|
|
1358
1358
|
}), o = e.viewport ?? "desktop", s = e.nodeIds?.length ? void 0 : Ve(e.page);
|
|
1359
1359
|
return {
|
|
1360
|
-
document:
|
|
1361
|
-
width:
|
|
1360
|
+
document: r.document,
|
|
1361
|
+
width: t[o],
|
|
1362
1362
|
nodeIds: e.nodeIds?.length ? e.nodeIds : s ? [s] : void 0,
|
|
1363
|
-
body: () =>
|
|
1363
|
+
body: () => r.html,
|
|
1364
1364
|
name: e.page.name
|
|
1365
1365
|
};
|
|
1366
1366
|
}
|
|
@@ -1387,20 +1387,20 @@ function Be(e) {
|
|
|
1387
1387
|
name: e.name
|
|
1388
1388
|
};
|
|
1389
1389
|
}
|
|
1390
|
-
let
|
|
1390
|
+
let n = Te(e.grid);
|
|
1391
1391
|
return {
|
|
1392
|
-
document: G(e.name,
|
|
1392
|
+
document: G(e.name, n, {
|
|
1393
1393
|
css: ze,
|
|
1394
1394
|
paper: !0
|
|
1395
1395
|
}),
|
|
1396
1396
|
width: Math.max(816, Math.min(2400, 140 + Math.max(0, ...e.grid.map((e) => e.length)) * 140)),
|
|
1397
|
-
body: () =>
|
|
1397
|
+
body: () => n,
|
|
1398
1398
|
name: e.name
|
|
1399
1399
|
};
|
|
1400
1400
|
}
|
|
1401
1401
|
function Ve(e) {
|
|
1402
|
-
let t = (e.rootNode.children ?? []).filter((e) => !e.hidden && !
|
|
1403
|
-
return
|
|
1402
|
+
let t = (e.rootNode.children ?? []).filter((e) => !e.hidden && !r(e)), n = t.length === 1 ? t[0] : void 0;
|
|
1403
|
+
return n && n.type === "section" && /^\d+(\.\d+)?px$/.test(n.styles.width ?? "") && /^\d+(\.\d+)?px$/.test(n.styles.height ?? "") ? n.id : void 0;
|
|
1404
1404
|
}
|
|
1405
1405
|
var He = (e) => e.replace(/[\\/:*?"<>|\u0000-\u001f]+/g, " ").replace(/\s+/g, " ").trim().slice(0, 80) || "Untitled", K = (e, t) => new Blob([e], { type: `${t};charset=utf-8` });
|
|
1406
1406
|
async function Ue(e, t) {
|
|
@@ -1912,7 +1912,7 @@ var ct = (e) => e === "design" || e === "email", lt = {
|
|
|
1912
1912
|
sheet: "Rows and columns with formulas, like Excel."
|
|
1913
1913
|
}, dt = "<!doctype html>\n<html lang=\"en\">\n<head>\n <meta charset=\"utf-8\">\n <title>My page</title>\n <style>\n body { font-family: system-ui, sans-serif; margin: 0; padding: 48px; background: #f8fafc; color: #0f172a; }\n h1 { margin: 0 0 8px; font-size: 40px; }\n p { margin: 0; color: #475569; font-size: 18px; }\n </style>\n</head>\n<body>\n <h1>Hello</h1>\n <p>Paste your own HTML here, or start typing.</p>\n</body>\n</html>\n", ft = (e) => {
|
|
1914
1914
|
switch (e) {
|
|
1915
|
-
case "design": return
|
|
1915
|
+
case "design": return n();
|
|
1916
1916
|
case "email": return o();
|
|
1917
1917
|
case "sheet": return Array.from({ length: 30 }, () => Array(12).fill(""));
|
|
1918
1918
|
case "html": return dt;
|