@forgedevstack/ink 1.1.7 → 1.1.8
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/CHANGELOG.md +31 -0
- package/README.md +9 -1
- package/bin/ink.const.mjs +26 -0
- package/bin/ink.mjs +58 -0
- package/dist/components/InkEditor/InkEditor.cjs +1 -1
- package/dist/components/InkEditor/InkEditor.d.ts.map +1 -1
- package/dist/components/InkEditor/InkEditor.js +1178 -834
- package/dist/components/InkEditor/components/AiPanel/AiPanel.cjs +1 -1
- package/dist/components/InkEditor/components/AiPanel/AiPanel.d.ts.map +1 -1
- package/dist/components/InkEditor/components/AiPanel/AiPanel.js +58 -52
- package/dist/components/InkEditor/components/ExcelSheetPanel/ExcelSheetPanel.cjs +1 -0
- package/dist/components/InkEditor/components/ExcelSheetPanel/ExcelSheetPanel.d.ts +4 -0
- package/dist/components/InkEditor/components/ExcelSheetPanel/ExcelSheetPanel.d.ts.map +1 -0
- package/dist/components/InkEditor/components/ExcelSheetPanel/ExcelSheetPanel.js +209 -0
- package/dist/components/InkEditor/components/ExcelSheetPanel/ExcelSheetPanel.types.d.ts +10 -0
- package/dist/components/InkEditor/components/ExcelSheetPanel/ExcelSheetPanel.types.d.ts.map +1 -0
- package/dist/components/InkEditor/components/ExcelSheetPanel/index.d.ts +3 -0
- package/dist/components/InkEditor/components/ExcelSheetPanel/index.d.ts.map +1 -0
- package/dist/components/InkEditor/components/GraphEditModal/GraphEditModal.cjs +1 -0
- package/dist/components/InkEditor/components/GraphEditModal/GraphEditModal.d.ts +4 -0
- package/dist/components/InkEditor/components/GraphEditModal/GraphEditModal.d.ts.map +1 -0
- package/dist/components/InkEditor/components/GraphEditModal/GraphEditModal.js +91 -0
- package/dist/components/InkEditor/components/GraphEditModal/GraphEditModal.types.d.ts +11 -0
- package/dist/components/InkEditor/components/GraphEditModal/GraphEditModal.types.d.ts.map +1 -0
- package/dist/components/InkEditor/components/GraphEditModal/index.d.ts +3 -0
- package/dist/components/InkEditor/components/GraphEditModal/index.d.ts.map +1 -0
- package/dist/components/InkEditor/components/GraphPicker/GraphPicker.cjs +1 -0
- package/dist/components/InkEditor/components/GraphPicker/GraphPicker.d.ts +4 -0
- package/dist/components/InkEditor/components/GraphPicker/GraphPicker.d.ts.map +1 -0
- package/dist/components/InkEditor/components/GraphPicker/GraphPicker.js +98 -0
- package/dist/components/InkEditor/components/GraphPicker/GraphPicker.types.d.ts +10 -0
- package/dist/components/InkEditor/components/GraphPicker/GraphPicker.types.d.ts.map +1 -0
- package/dist/components/InkEditor/components/GraphPicker/index.d.ts +3 -0
- package/dist/components/InkEditor/components/GraphPicker/index.d.ts.map +1 -0
- package/dist/components/InkEditor/components/HtmlSourcePanel/HtmlSourcePanel.cjs +1 -0
- package/dist/components/InkEditor/components/HtmlSourcePanel/HtmlSourcePanel.d.ts +4 -0
- package/dist/components/InkEditor/components/HtmlSourcePanel/HtmlSourcePanel.d.ts.map +1 -0
- package/dist/components/InkEditor/components/HtmlSourcePanel/HtmlSourcePanel.js +27 -0
- package/dist/components/InkEditor/components/HtmlSourcePanel/HtmlSourcePanel.types.d.ts +7 -0
- package/dist/components/InkEditor/components/HtmlSourcePanel/HtmlSourcePanel.types.d.ts.map +1 -0
- package/dist/components/InkEditor/components/HtmlSourcePanel/index.d.ts +3 -0
- package/dist/components/InkEditor/components/HtmlSourcePanel/index.d.ts.map +1 -0
- package/dist/components/InkEditor/components/OutlineRail/OutlineRail.cjs +1 -1
- package/dist/components/InkEditor/components/OutlineRail/OutlineRail.d.ts.map +1 -1
- package/dist/components/InkEditor/components/OutlineRail/OutlineRail.js +17 -12
- package/dist/components/InkEditor/components/OutlineRail/OutlineRail.types.d.ts +1 -0
- package/dist/components/InkEditor/components/OutlineRail/OutlineRail.types.d.ts.map +1 -1
- package/dist/components/InkEditor/components/TableSizePicker/TableSizePicker.cjs +1 -0
- package/dist/components/InkEditor/components/TableSizePicker/TableSizePicker.const.cjs +1 -0
- package/dist/components/InkEditor/components/TableSizePicker/TableSizePicker.const.d.ts +10 -0
- package/dist/components/InkEditor/components/TableSizePicker/TableSizePicker.const.d.ts.map +1 -0
- package/dist/components/InkEditor/components/TableSizePicker/TableSizePicker.const.js +18 -0
- package/dist/components/InkEditor/components/TableSizePicker/TableSizePicker.d.ts +4 -0
- package/dist/components/InkEditor/components/TableSizePicker/TableSizePicker.d.ts.map +1 -0
- package/dist/components/InkEditor/components/TableSizePicker/TableSizePicker.js +95 -0
- package/dist/components/InkEditor/components/TableSizePicker/TableSizePicker.types.d.ts +11 -0
- package/dist/components/InkEditor/components/TableSizePicker/TableSizePicker.types.d.ts.map +1 -0
- package/dist/components/InkEditor/components/TableSizePicker/index.d.ts +3 -0
- package/dist/components/InkEditor/components/TableSizePicker/index.d.ts.map +1 -0
- package/dist/components/InkEditor/components/ThemePicker/ThemePicker.cjs +1 -0
- package/dist/components/InkEditor/components/ThemePicker/ThemePicker.d.ts +4 -0
- package/dist/components/InkEditor/components/ThemePicker/ThemePicker.d.ts.map +1 -0
- package/dist/components/InkEditor/components/ThemePicker/ThemePicker.js +81 -0
- package/dist/components/InkEditor/components/ThemePicker/ThemePicker.types.d.ts +12 -0
- package/dist/components/InkEditor/components/ThemePicker/ThemePicker.types.d.ts.map +1 -0
- package/dist/components/InkEditor/components/ThemePicker/index.d.ts +3 -0
- package/dist/components/InkEditor/components/ThemePicker/index.d.ts.map +1 -0
- package/dist/components/InkEditor/components/TitleGallery/TitleGallery.cjs +1 -0
- package/dist/components/InkEditor/components/TitleGallery/TitleGallery.d.ts +4 -0
- package/dist/components/InkEditor/components/TitleGallery/TitleGallery.d.ts.map +1 -0
- package/dist/components/InkEditor/components/TitleGallery/TitleGallery.js +79 -0
- package/dist/components/InkEditor/components/TitleGallery/TitleGallery.types.d.ts +10 -0
- package/dist/components/InkEditor/components/TitleGallery/TitleGallery.types.d.ts.map +1 -0
- package/dist/components/InkEditor/components/TitleGallery/index.d.ts +3 -0
- package/dist/components/InkEditor/components/TitleGallery/index.d.ts.map +1 -0
- package/dist/components/InkEditor/components/ToolbarButton/ToolbarButton.cjs +1 -1
- package/dist/components/InkEditor/components/ToolbarButton/ToolbarButton.d.ts.map +1 -1
- package/dist/components/InkEditor/components/ToolbarButton/ToolbarButton.js +41 -18
- package/dist/components/InkEditor/components/ToolbarDropdown/ToolbarDropdown.cjs +1 -1
- package/dist/components/InkEditor/components/ToolbarDropdown/ToolbarDropdown.d.ts.map +1 -1
- package/dist/components/InkEditor/components/ToolbarDropdown/ToolbarDropdown.js +25 -23
- package/dist/components/InkEditor/components/ToolbarDropdown/ToolbarDropdown.utils.cjs +1 -1
- package/dist/components/InkEditor/components/ToolbarDropdown/ToolbarDropdown.utils.d.ts +1 -1
- package/dist/components/InkEditor/components/ToolbarDropdown/ToolbarDropdown.utils.d.ts.map +1 -1
- package/dist/components/InkEditor/components/ToolbarDropdown/ToolbarDropdown.utils.js +7 -7
- package/dist/components/InkEditor/components/index.d.ts +14 -0
- package/dist/components/InkEditor/components/index.d.ts.map +1 -1
- package/dist/components/InkEditor/helpers/format.utils.cjs +2 -2
- package/dist/components/InkEditor/helpers/format.utils.d.ts +1 -1
- package/dist/components/InkEditor/helpers/format.utils.d.ts.map +1 -1
- package/dist/components/InkEditor/helpers/format.utils.js +72 -72
- package/dist/constants/colorMode.const.cjs +1 -1
- package/dist/constants/colorMode.const.d.ts +1 -1
- package/dist/constants/colorMode.const.d.ts.map +1 -1
- package/dist/constants/colorMode.const.js +4 -4
- package/dist/constants/contextMenu.const.cjs +1 -1
- package/dist/constants/contextMenu.const.d.ts +2 -0
- package/dist/constants/contextMenu.const.d.ts.map +1 -1
- package/dist/constants/contextMenu.const.js +17 -15
- package/dist/constants/defaultIcons.cjs +1 -1
- package/dist/constants/defaultIcons.d.ts.map +1 -1
- package/dist/constants/defaultIcons.js +20 -13
- package/dist/constants/defaults.const.cjs +1 -1
- package/dist/constants/defaults.const.d.ts +48 -0
- package/dist/constants/defaults.const.d.ts.map +1 -1
- package/dist/constants/defaults.const.js +201 -102
- package/dist/constants/generals.const.cjs +1 -1
- package/dist/constants/generals.const.d.ts +48 -0
- package/dist/constants/generals.const.d.ts.map +1 -1
- package/dist/constants/generals.const.js +71 -28
- package/dist/constants/index.d.ts +1 -0
- package/dist/constants/index.d.ts.map +1 -1
- package/dist/constants/numbers.cjs +1 -1
- package/dist/constants/numbers.d.ts +14 -0
- package/dist/constants/numbers.d.ts.map +1 -1
- package/dist/constants/numbers.js +44 -30
- package/dist/constants/plugins.const.cjs +1 -0
- package/dist/constants/plugins.const.d.ts +13 -0
- package/dist/constants/plugins.const.d.ts.map +1 -0
- package/dist/constants/plugins.const.js +45 -0
- package/dist/constants/table.const.cjs +1 -1
- package/dist/constants/table.const.d.ts +4 -0
- package/dist/constants/table.const.d.ts.map +1 -1
- package/dist/constants/table.const.js +10 -6
- package/dist/constants/toolbar.const.cjs +1 -1
- package/dist/constants/toolbar.const.d.ts +7 -0
- package/dist/constants/toolbar.const.d.ts.map +1 -1
- package/dist/constants/toolbar.const.js +16 -9
- package/dist/constants/toolbarMenu.const.cjs +1 -1
- package/dist/constants/toolbarMenu.const.d.ts +2 -0
- package/dist/constants/toolbarMenu.const.d.ts.map +1 -1
- package/dist/constants/toolbarMenu.const.js +80 -19
- package/dist/hooks/index.d.ts +2 -0
- package/dist/hooks/index.d.ts.map +1 -0
- package/dist/hooks/useToolbarOverflow.cjs +1 -0
- package/dist/hooks/useToolbarOverflow.d.ts +8 -0
- package/dist/hooks/useToolbarOverflow.d.ts.map +1 -0
- package/dist/hooks/useToolbarOverflow.js +29 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +5 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +117 -86
- package/dist/plugins/excel/excel.utils.cjs +1 -0
- package/dist/plugins/excel/excel.utils.d.ts +13 -0
- package/dist/plugins/excel/excel.utils.d.ts.map +1 -0
- package/dist/plugins/excel/excel.utils.js +40 -0
- package/dist/plugins/excel/index.d.ts +3 -0
- package/dist/plugins/excel/index.d.ts.map +1 -0
- package/dist/plugins/graph/graph.const.cjs +1 -0
- package/dist/plugins/graph/graph.const.d.ts +14 -0
- package/dist/plugins/graph/graph.const.d.ts.map +1 -0
- package/dist/plugins/graph/graph.const.js +24 -0
- package/dist/plugins/graph/graph.types.d.ts +7 -0
- package/dist/plugins/graph/graph.types.d.ts.map +1 -0
- package/dist/plugins/graph/graph.utils.cjs +1 -0
- package/dist/plugins/graph/graph.utils.d.ts +11 -0
- package/dist/plugins/graph/graph.utils.d.ts.map +1 -0
- package/dist/plugins/graph/graph.utils.js +76 -0
- package/dist/plugins/graph/index.d.ts +4 -0
- package/dist/plugins/graph/index.d.ts.map +1 -0
- package/dist/plugins/host/index.d.ts +2 -0
- package/dist/plugins/host/index.d.ts.map +1 -0
- package/dist/plugins/host/inkPlugins.cjs +1 -0
- package/dist/plugins/host/inkPlugins.d.ts +16 -0
- package/dist/plugins/host/inkPlugins.d.ts.map +1 -0
- package/dist/plugins/host/inkPlugins.js +20 -0
- package/dist/plugins/index.d.ts +5 -0
- package/dist/plugins/index.d.ts.map +1 -0
- package/dist/plugins/theme/index.d.ts +4 -0
- package/dist/plugins/theme/index.d.ts.map +1 -0
- package/dist/plugins/theme/inkTheme.cjs +1 -0
- package/dist/plugins/theme/inkTheme.d.ts +5 -0
- package/dist/plugins/theme/inkTheme.d.ts.map +1 -0
- package/dist/plugins/theme/inkTheme.js +30 -0
- package/dist/plugins/theme/theme.const.cjs +1 -0
- package/dist/plugins/theme/theme.const.d.ts +9 -0
- package/dist/plugins/theme/theme.const.d.ts.map +1 -0
- package/dist/plugins/theme/theme.const.js +15 -0
- package/dist/plugins/theme/theme.types.d.ts +12 -0
- package/dist/plugins/theme/theme.types.d.ts.map +1 -0
- package/dist/plugins/titles/index.d.ts +4 -0
- package/dist/plugins/titles/index.d.ts.map +1 -0
- package/dist/plugins/titles/titles.const.cjs +1 -0
- package/dist/plugins/titles/titles.const.d.ts +4 -0
- package/dist/plugins/titles/titles.const.d.ts.map +1 -0
- package/dist/plugins/titles/titles.const.js +15 -0
- package/dist/plugins/titles/titles.types.d.ts +2 -0
- package/dist/plugins/titles/titles.types.d.ts.map +1 -0
- package/dist/plugins/titles/titles.utils.cjs +1 -0
- package/dist/plugins/titles/titles.utils.d.ts +3 -0
- package/dist/plugins/titles/titles.utils.d.ts.map +1 -0
- package/dist/plugins/titles/titles.utils.js +14 -0
- package/dist/styles.css +1 -1
- package/dist/types/features.types.d.ts +1 -1
- package/dist/types/features.types.d.ts.map +1 -1
- package/dist/types/index.d.ts +1 -0
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/ink.types.d.ts +6 -2
- package/dist/types/ink.types.d.ts.map +1 -1
- package/dist/types/plugin.types.d.ts +8 -0
- package/dist/types/plugin.types.d.ts.map +1 -0
- package/dist/types/premium.types.d.ts +1 -1
- package/dist/types/premium.types.d.ts.map +1 -1
- package/dist/utils/index.d.ts +1 -1
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/outline.utils.cjs +1 -1
- package/dist/utils/outline.utils.d.ts.map +1 -1
- package/dist/utils/outline.utils.js +32 -32
- package/dist/utils/table.utils.cjs +1 -1
- package/dist/utils/table.utils.d.ts +4 -0
- package/dist/utils/table.utils.d.ts.map +1 -1
- package/dist/utils/table.utils.js +84 -45
- package/package.json +7 -1
|
@@ -1,72 +1,111 @@
|
|
|
1
|
-
import { INK_DEFAULT_TABLE_ROWS as
|
|
1
|
+
import { INK_DEFAULT_TABLE_ROWS as I, INK_DEFAULT_TABLE_COLS as S, INK_TABLE_MIN_COLS as B, INK_TABLE_MIN_ROWS as b, INK_TABLE_MAX_COLS as w, INK_TABLE_MAX_ROWS as y, INK_TABLE_COL_MIN_WIDTH_PX as M } from "../constants/numbers.js";
|
|
2
2
|
import { EMPTY_STRING as m } from "../constants/generals.const.js";
|
|
3
3
|
import "../constants/openai.const.js";
|
|
4
4
|
import "react/jsx-runtime";
|
|
5
|
-
import { TABLE_CLASS_NAME as
|
|
5
|
+
import { TABLE_HEADER_PREFIX as N, TABLE_COLGROUP as T, TABLE_COL as _, TABLE_CLASS_NAME as O, TABLE_TAG as d, TABLE_ROW_TAG as u, TABLE_CELL_SELECTOR as x, TABLE_SECTION_THEAD as R, TABLE_CELL_TAG_TH as h, TABLE_CELL_TAG_TD as A, TABLE_SECTION_TBODY as H } from "../constants/table.const.js";
|
|
6
6
|
import "./paste.utils.js";
|
|
7
7
|
import "react";
|
|
8
8
|
import "react-dom";
|
|
9
|
-
const
|
|
9
|
+
const g = (t, e, n) => Math.min(n, Math.max(e, t)), E = (t) => {
|
|
10
10
|
const e = document.createElement(t);
|
|
11
11
|
return e.contentEditable = "true", e.innerHTML = "<br>", e;
|
|
12
|
-
},
|
|
12
|
+
}, L = (t) => {
|
|
13
13
|
const e = t.parentElement;
|
|
14
14
|
return e ? Array.from(e.cells).indexOf(t) : 0;
|
|
15
|
-
},
|
|
16
|
-
const n =
|
|
15
|
+
}, q = (t = I, e = S) => {
|
|
16
|
+
const n = g(t, b, y), r = g(e, B, w), o = Array.from(
|
|
17
17
|
{ length: r },
|
|
18
|
-
(
|
|
19
|
-
).join(m),
|
|
18
|
+
(s, c) => `<th contenteditable="true">${N}${c + 1}</th>`
|
|
19
|
+
).join(m), l = Array.from({ length: Math.max(0, n - 1) }, () => `<tr>${Array.from(
|
|
20
20
|
{ length: r },
|
|
21
21
|
() => '<td contenteditable="true"><br></td>'
|
|
22
|
-
).join(m)}</tr>`).join(m)
|
|
23
|
-
return `<table class="${
|
|
24
|
-
},
|
|
22
|
+
).join(m)}</tr>`).join(m), a = `<${T}>${Array.from({ length: r }, () => `<${_}>`).join(m)}</${T}>`;
|
|
23
|
+
return `<table class="${O}">${a}<thead><tr>${o}</tr></thead><tbody>${l}</tbody></table><p><br></p>`;
|
|
24
|
+
}, F = () => {
|
|
25
25
|
const t = window.getSelection();
|
|
26
26
|
if (!t || t.rangeCount === 0) return null;
|
|
27
27
|
let e = t.anchorNode;
|
|
28
|
-
return e && e.nodeType === Node.TEXT_NODE && (e = e.parentElement), e instanceof Element ? e.closest(
|
|
29
|
-
},
|
|
30
|
-
var
|
|
31
|
-
const n = t.closest(u), r = t.closest(
|
|
28
|
+
return e && e.nodeType === Node.TEXT_NODE && (e = e.parentElement), e instanceof Element ? e.closest(x) : null;
|
|
29
|
+
}, P = (t, e) => {
|
|
30
|
+
var c, i;
|
|
31
|
+
const n = t.closest(u), r = t.closest(d);
|
|
32
32
|
if (!n || !r) return !1;
|
|
33
33
|
const o = n.cells.length;
|
|
34
|
-
if (r.rows.length >=
|
|
35
|
-
const
|
|
36
|
-
for (let
|
|
37
|
-
s.appendChild(
|
|
38
|
-
return e === "before" ? (
|
|
39
|
-
},
|
|
40
|
-
const n = t.closest(
|
|
34
|
+
if (r.rows.length >= y) return !1;
|
|
35
|
+
const a = !!n.closest(R) ? h : A, s = document.createElement(u);
|
|
36
|
+
for (let f = 0; f < o; f += 1)
|
|
37
|
+
s.appendChild(E(a));
|
|
38
|
+
return e === "before" ? (c = n.parentElement) == null || c.insertBefore(s, n) : (i = n.parentElement) == null || i.insertBefore(s, n.nextSibling), !0;
|
|
39
|
+
}, U = (t, e) => {
|
|
40
|
+
const n = t.closest(d);
|
|
41
41
|
if (!n) return !1;
|
|
42
|
-
const r =
|
|
42
|
+
const r = L(t);
|
|
43
43
|
if (r < 0) return !1;
|
|
44
44
|
const o = n.rows[0];
|
|
45
|
-
if (!o || o.cells.length >=
|
|
46
|
-
const
|
|
47
|
-
return Array.from(n.rows).forEach((
|
|
48
|
-
const s =
|
|
49
|
-
s ?
|
|
50
|
-
}), !0;
|
|
51
|
-
},
|
|
52
|
-
const e = t.closest(u), n = t.closest(
|
|
53
|
-
return !e || !n || n.rows.length <=
|
|
54
|
-
},
|
|
55
|
-
const e = t.closest(
|
|
45
|
+
if (!o || o.cells.length >= w) return !1;
|
|
46
|
+
const l = e === "before" ? r : r + 1;
|
|
47
|
+
return Array.from(n.rows).forEach((a) => {
|
|
48
|
+
const s = a.cells[l] ?? null, c = a.closest(R) ? h : A, i = E(c);
|
|
49
|
+
s ? a.insertBefore(i, s) : a.appendChild(i);
|
|
50
|
+
}), C(n), !0;
|
|
51
|
+
}, Y = (t) => {
|
|
52
|
+
const e = t.closest(u), n = t.closest(d);
|
|
53
|
+
return !e || !n || n.rows.length <= b ? !1 : (e.remove(), !0);
|
|
54
|
+
}, z = (t) => {
|
|
55
|
+
const e = t.closest(d);
|
|
56
56
|
if (!e) return !1;
|
|
57
|
-
const n =
|
|
57
|
+
const n = L(t);
|
|
58
58
|
if (n < 0) return !1;
|
|
59
59
|
const r = e.rows[0];
|
|
60
|
-
return !r || r.cells.length <=
|
|
61
|
-
const
|
|
62
|
-
|
|
63
|
-
}), !0);
|
|
60
|
+
return !r || r.cells.length <= B ? !1 : (Array.from(e.rows).forEach((o) => {
|
|
61
|
+
const l = o.cells[n];
|
|
62
|
+
l && l.remove();
|
|
63
|
+
}), C(e), !0);
|
|
64
|
+
}, k = (t) => {
|
|
65
|
+
const e = t.closest(d);
|
|
66
|
+
if (!e) return !1;
|
|
67
|
+
const n = e.tHead, r = n == null ? void 0 : n.querySelector(u);
|
|
68
|
+
if (n && r) {
|
|
69
|
+
const c = e.tBodies[0] ?? e.createTBody(), i = document.createElement(u);
|
|
70
|
+
return Array.from(r.cells).forEach((f) => {
|
|
71
|
+
const p = E(A);
|
|
72
|
+
p.innerHTML = f.innerHTML, i.appendChild(p);
|
|
73
|
+
}), c.insertBefore(i, c.firstChild), n.remove(), !0;
|
|
74
|
+
}
|
|
75
|
+
const o = e.tBodies[0] ?? e.querySelector(H), l = o == null ? void 0 : o.querySelector(u);
|
|
76
|
+
if (!o || !l) return !1;
|
|
77
|
+
const a = e.createTHead(), s = document.createElement(u);
|
|
78
|
+
return Array.from(l.cells).forEach((c, i) => {
|
|
79
|
+
const f = E(h);
|
|
80
|
+
f.innerHTML = c.innerHTML || `${N}${i + 1}`, s.appendChild(f);
|
|
81
|
+
}), a.appendChild(s), l.remove(), !0;
|
|
82
|
+
}, C = (t) => {
|
|
83
|
+
var r, o;
|
|
84
|
+
let e = t.querySelector(T);
|
|
85
|
+
const n = ((r = t.rows[0]) == null ? void 0 : r.cells.length) ?? 0;
|
|
86
|
+
for (e || (e = document.createElement(T), t.insertBefore(e, t.firstChild)); e.children.length < n; )
|
|
87
|
+
e.appendChild(document.createElement(_));
|
|
88
|
+
for (; e.children.length > n; )
|
|
89
|
+
(o = e.lastElementChild) == null || o.remove();
|
|
90
|
+
return e.getElementsByTagName(_);
|
|
91
|
+
}, J = (t, e, n) => {
|
|
92
|
+
const r = e.getBoundingClientRect();
|
|
93
|
+
return Math.abs(r.right - t) > n ? null : L(e);
|
|
94
|
+
}, Q = (t, e, n) => {
|
|
95
|
+
const o = C(t).item(e);
|
|
96
|
+
if (!o) return;
|
|
97
|
+
const l = Math.max(M, n);
|
|
98
|
+
o.style.width = `${l}px`;
|
|
64
99
|
};
|
|
65
100
|
export {
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
101
|
+
q as buildTableHtml,
|
|
102
|
+
z as deleteTableColumn,
|
|
103
|
+
Y as deleteTableRow,
|
|
104
|
+
C as ensureTableColgroup,
|
|
105
|
+
J as getColumnResizeIndex,
|
|
106
|
+
F as getTableCellFromSelection,
|
|
107
|
+
U as insertTableColumn,
|
|
108
|
+
P as insertTableRow,
|
|
109
|
+
Q as setTableColumnWidth,
|
|
110
|
+
k as toggleTableHeaderRow
|
|
72
111
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@forgedevstack/ink",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.8",
|
|
4
4
|
"description": "ForgeStack rich text editor for React — WYSIWYG with tables, track changes, comments, block handles, sign pad, and pluggable Ink AI (BYO LLM). The writing layer of ForgeStack.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.cjs",
|
|
@@ -27,8 +27,12 @@
|
|
|
27
27
|
},
|
|
28
28
|
"./styles.css": "./dist/styles.css"
|
|
29
29
|
},
|
|
30
|
+
"bin": {
|
|
31
|
+
"ink": "./bin/ink.mjs"
|
|
32
|
+
},
|
|
30
33
|
"files": [
|
|
31
34
|
"dist",
|
|
35
|
+
"bin",
|
|
32
36
|
"README.md",
|
|
33
37
|
"CHANGELOG.md",
|
|
34
38
|
"LICENSE",
|
|
@@ -42,6 +46,7 @@
|
|
|
42
46
|
"prepublishOnly": "npm run build"
|
|
43
47
|
},
|
|
44
48
|
"peerDependencies": {
|
|
49
|
+
"@forgedevstack/bear": ">=1.3.2",
|
|
45
50
|
"react": ">=18.0.0",
|
|
46
51
|
"react-dom": ">=18.0.0"
|
|
47
52
|
},
|
|
@@ -54,6 +59,7 @@
|
|
|
54
59
|
}
|
|
55
60
|
},
|
|
56
61
|
"devDependencies": {
|
|
62
|
+
"@forgedevstack/bear": "^1.3.2",
|
|
57
63
|
"@types/react": "^18.3.18",
|
|
58
64
|
"@types/react-dom": "^18.3.5",
|
|
59
65
|
"@vitejs/plugin-react": "^4.3.4",
|