@trafica/editor 1.0.26 → 1.0.27
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/index.js +3 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +3 -3
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1683,7 +1683,7 @@ function serializeBlock(node, idCounts = /* @__PURE__ */ new Map()) {
|
|
|
1683
1683
|
return "<hr />";
|
|
1684
1684
|
case "table": {
|
|
1685
1685
|
const rows = node.children.map((c) => serializeBlock(c)).join("");
|
|
1686
|
-
return `<table><tbody>${rows}</tbody></table>`;
|
|
1686
|
+
return `<div style="overflow-x:auto;margin:0.75em 0;"><table style="border-collapse:collapse;table-layout:fixed;width:100%;font-size:inherit;font-family:inherit;"><tbody>${rows}</tbody></table></div>`;
|
|
1687
1687
|
}
|
|
1688
1688
|
case "table_row": {
|
|
1689
1689
|
const cells = node.children.map((c) => serializeBlock(c)).join("");
|
|
@@ -1693,13 +1693,13 @@ function serializeBlock(node, idCounts = /* @__PURE__ */ new Map()) {
|
|
|
1693
1693
|
if ((_p = node.attrs) == null ? void 0 : _p.covered) return "";
|
|
1694
1694
|
const cs = ((_q = node.attrs) == null ? void 0 : _q.colspan) > 1 ? ` colspan="${(_r = node.attrs) == null ? void 0 : _r.colspan}"` : "";
|
|
1695
1695
|
const rs = ((_s = node.attrs) == null ? void 0 : _s.rowspan) > 1 ? ` rowspan="${(_t = node.attrs) == null ? void 0 : _t.rowspan}"` : "";
|
|
1696
|
-
return `<td${cs}${rs}>${serializeChildren(node.children)}</td>`;
|
|
1696
|
+
return `<td${cs}${rs} style="border:1px solid #d1d5db;padding:0.5em 0.75em;vertical-align:top;min-width:40px;word-break:break-word;">${serializeChildren(node.children)}</td>`;
|
|
1697
1697
|
}
|
|
1698
1698
|
case "table_header": {
|
|
1699
1699
|
if ((_u = node.attrs) == null ? void 0 : _u.covered) return "";
|
|
1700
1700
|
const cs = ((_v = node.attrs) == null ? void 0 : _v.colspan) > 1 ? ` colspan="${(_w = node.attrs) == null ? void 0 : _w.colspan}"` : "";
|
|
1701
1701
|
const rs = ((_x = node.attrs) == null ? void 0 : _x.rowspan) > 1 ? ` rowspan="${(_y = node.attrs) == null ? void 0 : _y.rowspan}"` : "";
|
|
1702
|
-
return `<th${cs}${rs}>${serializeChildren(node.children)}</th>`;
|
|
1702
|
+
return `<th${cs}${rs} style="border:1px solid #d1d5db;padding:0.5em 0.75em;vertical-align:top;min-width:40px;word-break:break-word;background:#f9fafb;font-weight:600;text-align:left;">${serializeChildren(node.children)}</th>`;
|
|
1703
1703
|
}
|
|
1704
1704
|
default:
|
|
1705
1705
|
return `<p>${serializeChildren(node.children)}</p>`;
|