@forgedevstack/ink 1.1.1 → 1.1.2
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 +19 -6
- package/README.md +77 -19
- package/dist/components/InkEditor/InkEditor.cjs +1 -1
- package/dist/components/InkEditor/InkEditor.d.ts.map +1 -1
- package/dist/components/InkEditor/InkEditor.js +421 -351
- package/dist/components/InkEditor/components/FindReplace/FindReplace.cjs +1 -0
- package/dist/components/InkEditor/components/FindReplace/FindReplace.const.cjs +1 -0
- package/dist/components/InkEditor/components/FindReplace/FindReplace.const.d.ts +11 -0
- package/dist/components/InkEditor/components/FindReplace/FindReplace.const.d.ts.map +1 -0
- package/dist/components/InkEditor/components/FindReplace/FindReplace.const.js +13 -0
- package/dist/components/InkEditor/components/FindReplace/FindReplace.d.ts +4 -0
- package/dist/components/InkEditor/components/FindReplace/FindReplace.d.ts.map +1 -0
- package/dist/components/InkEditor/components/FindReplace/FindReplace.js +49 -0
- package/dist/components/InkEditor/components/FindReplace/FindReplace.types.d.ts +12 -0
- package/dist/components/InkEditor/components/FindReplace/FindReplace.types.d.ts.map +1 -0
- package/dist/components/InkEditor/components/FindReplace/index.d.ts +3 -0
- package/dist/components/InkEditor/components/FindReplace/index.d.ts.map +1 -0
- package/dist/components/InkEditor/components/SignPad/SignPad.cjs +1 -0
- package/dist/components/InkEditor/components/SignPad/SignPad.const.cjs +1 -0
- package/dist/components/InkEditor/components/SignPad/SignPad.const.d.ts +17 -0
- package/dist/components/InkEditor/components/SignPad/SignPad.const.d.ts.map +1 -0
- package/dist/components/InkEditor/components/SignPad/SignPad.const.js +20 -0
- package/dist/components/InkEditor/components/SignPad/SignPad.d.ts +4 -0
- package/dist/components/InkEditor/components/SignPad/SignPad.d.ts.map +1 -0
- package/dist/components/InkEditor/components/SignPad/SignPad.js +76 -0
- package/dist/components/InkEditor/components/SignPad/SignPad.types.d.ts +10 -0
- package/dist/components/InkEditor/components/SignPad/SignPad.types.d.ts.map +1 -0
- package/dist/components/InkEditor/components/SignPad/SignPad.utils.cjs +1 -0
- package/dist/components/InkEditor/components/SignPad/SignPad.utils.d.ts +6 -0
- package/dist/components/InkEditor/components/SignPad/SignPad.utils.d.ts.map +1 -0
- package/dist/components/InkEditor/components/SignPad/SignPad.utils.js +19 -0
- package/dist/components/InkEditor/components/SignPad/SignPad.utils.test.d.ts +2 -0
- package/dist/components/InkEditor/components/SignPad/SignPad.utils.test.d.ts.map +1 -0
- package/dist/components/InkEditor/components/SignPad/index.d.ts +3 -0
- package/dist/components/InkEditor/components/SignPad/index.d.ts.map +1 -0
- package/dist/components/InkEditor/components/index.d.ts +2 -0
- package/dist/components/InkEditor/components/index.d.ts.map +1 -1
- package/dist/constants/defaults.const.cjs +1 -1
- package/dist/constants/defaults.const.d.ts.map +1 -1
- package/dist/constants/defaults.const.js +46 -39
- package/dist/constants/generals.const.cjs +1 -0
- package/dist/constants/generals.const.d.ts +6 -0
- package/dist/constants/generals.const.d.ts.map +1 -0
- package/dist/constants/generals.const.js +5 -0
- package/dist/constants/index.d.ts +3 -1
- package/dist/constants/index.d.ts.map +1 -1
- package/dist/constants/numbers.cjs +1 -0
- package/dist/constants/numbers.d.ts +119 -0
- package/dist/constants/numbers.d.ts.map +1 -0
- package/dist/constants/numbers.js +20 -0
- package/dist/constants/premium.const.cjs +1 -1
- package/dist/constants/premium.const.d.ts.map +1 -1
- package/dist/constants/premium.const.js +3 -0
- package/dist/constants/toolbar.const.cjs +1 -0
- package/dist/constants/toolbar.const.d.ts +4 -0
- package/dist/constants/toolbar.const.d.ts.map +1 -0
- package/dist/constants/toolbar.const.js +6 -0
- package/dist/plugins/ai/demoProvider.cjs +1 -1
- package/dist/plugins/ai/demoProvider.js +1 -1
- package/dist/styles.css +51 -0
- package/dist/types/features.types.d.ts +1 -1
- package/dist/types/features.types.d.ts.map +1 -1
- package/dist/types/ink.types.d.ts +3 -1
- package/dist/types/ink.types.d.ts.map +1 -1
- package/dist/types/premium.types.d.ts +1 -1
- package/dist/types/premium.types.d.ts.map +1 -1
- package/dist/utils/comments.utils.cjs +1 -1
- package/dist/utils/comments.utils.js +1 -1
- package/dist/utils/findReplace.utils.cjs +1 -0
- package/dist/utils/findReplace.utils.d.ts +3 -0
- package/dist/utils/findReplace.utils.d.ts.map +1 -0
- package/dist/utils/findReplace.utils.js +26 -0
- package/dist/utils/history.utils.cjs +1 -1
- package/dist/utils/history.utils.js +1 -1
- package/dist/utils/index.d.ts +3 -0
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/ink.features.test.d.ts +2 -0
- package/dist/utils/ink.features.test.d.ts.map +1 -0
- package/dist/utils/memory.utils.cjs +1 -0
- package/dist/utils/memory.utils.d.ts +5 -0
- package/dist/utils/memory.utils.d.ts.map +1 -0
- package/dist/utils/memory.utils.js +10 -0
- package/dist/utils/slash.utils.cjs +1 -1
- package/dist/utils/slash.utils.js +1 -1
- package/dist/utils/storage.utils.cjs +1 -0
- package/dist/utils/storage.utils.d.ts +2 -0
- package/dist/utils/storage.utils.d.ts.map +1 -0
- package/dist/utils/storage.utils.js +4 -0
- package/dist/utils/table.utils.cjs +1 -1
- package/dist/utils/table.utils.js +1 -1
- package/package.json +3 -2
- package/dist/constants/numbers.const.cjs +0 -1
- package/dist/constants/numbers.const.d.ts +0 -18
- package/dist/constants/numbers.const.d.ts.map +0 -1
- package/dist/constants/numbers.const.js +0 -16
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
export declare const INK_MIN_HEIGHT = 150;
|
|
2
|
+
export declare const INK_DEFAULT_TEXT_COLOR = "#111827";
|
|
3
|
+
export declare const INK_DEFAULT_HIGHLIGHT_COLOR = "#fef08a";
|
|
4
|
+
export declare const INK_COLOR_SWATCH_COUNT = 8;
|
|
5
|
+
export declare const INK_DEFAULT_TABLE_ROWS = 3;
|
|
6
|
+
export declare const INK_DEFAULT_TABLE_COLS = 3;
|
|
7
|
+
export declare const INK_TABLE_MIN_ROWS = 1;
|
|
8
|
+
export declare const INK_TABLE_MIN_COLS = 1;
|
|
9
|
+
export declare const INK_TABLE_MAX_ROWS = 12;
|
|
10
|
+
export declare const INK_TABLE_MAX_COLS = 12;
|
|
11
|
+
export declare const INK_HISTORY_MAX = 50;
|
|
12
|
+
export declare const INK_COMMENT_HIGHLIGHT_COLOR = "#fde047";
|
|
13
|
+
export declare const INK_BLOCK_HANDLE_OFFSET_PX = 28;
|
|
14
|
+
export declare const INK_SLASH_MENU_MAX_ITEMS = 8;
|
|
15
|
+
export declare const INK_AI_PANEL_WIDTH_PX = 320;
|
|
16
|
+
export declare const INK_COMMENTS_PANEL_WIDTH_PX = 300;
|
|
17
|
+
export declare const INK_DEMO_AI_DELAY_MS = 180;
|
|
18
|
+
export declare const NUMBER_ZERO = 0;
|
|
19
|
+
export declare const NUMBER_ONE = 1;
|
|
20
|
+
export declare const NUMBER_TWO = 2;
|
|
21
|
+
export declare const NUMBER_THREE = 3;
|
|
22
|
+
export declare const NUMBER_FOUR = 4;
|
|
23
|
+
export declare const NUMBER_FIVE = 5;
|
|
24
|
+
export declare const NUMBER_SIX = 6;
|
|
25
|
+
export declare const NUMBER_SEVEN = 7;
|
|
26
|
+
export declare const NUMBER_EIGHT = 8;
|
|
27
|
+
export declare const NUMBER_NINE = 9;
|
|
28
|
+
export declare const NUMBER_TEN = 10;
|
|
29
|
+
export declare const NUMBER_ELEVEN = 11;
|
|
30
|
+
export declare const NUMBER_TWELVE = 12;
|
|
31
|
+
export declare const NUMBER_THIRTEEN = 13;
|
|
32
|
+
export declare const NUMBER_FOURTEEN = 14;
|
|
33
|
+
export declare const NUMBER_FIFTEEN = 15;
|
|
34
|
+
export declare const NUMBER_SIXTEEN = 16;
|
|
35
|
+
export declare const NUMBER_SEVENTEEN = 17;
|
|
36
|
+
export declare const NUMBER_EIGHTEEN = 18;
|
|
37
|
+
export declare const NUMBER_NINETEEN = 19;
|
|
38
|
+
export declare const NUMBER_TWENTY = 20;
|
|
39
|
+
export declare const NUMBER_TWENTY_ONE = 21;
|
|
40
|
+
export declare const NUMBER_TWENTY_TWO = 22;
|
|
41
|
+
export declare const NUMBER_TWENTY_THREE = 23;
|
|
42
|
+
export declare const NUMBER_TWENTY_FOUR = 24;
|
|
43
|
+
export declare const NUMBER_TWENTY_FIVE = 25;
|
|
44
|
+
export declare const NUMBER_TWENTY_SIX = 26;
|
|
45
|
+
export declare const NUMBER_TWENTY_SEVEN = 27;
|
|
46
|
+
export declare const NUMBER_TWENTY_EIGHT = 28;
|
|
47
|
+
export declare const NUMBER_TWENTY_NINE = 29;
|
|
48
|
+
export declare const NUMBER_THIRTY = 30;
|
|
49
|
+
export declare const NUMBER_THIRTY_ONE = 31;
|
|
50
|
+
export declare const NUMBER_THIRTY_TWO = 32;
|
|
51
|
+
export declare const NUMBER_THIRTY_THREE = 33;
|
|
52
|
+
export declare const NUMBER_THIRTY_FOUR = 34;
|
|
53
|
+
export declare const NUMBER_THIRTY_FIVE = 35;
|
|
54
|
+
export declare const NUMBER_THIRTY_SIX = 36;
|
|
55
|
+
export declare const NUMBER_THIRTY_SEVEN = 37;
|
|
56
|
+
export declare const NUMBER_THIRTY_EIGHT = 38;
|
|
57
|
+
export declare const NUMBER_THIRTY_NINE = 39;
|
|
58
|
+
export declare const NUMBER_FORTY = 40;
|
|
59
|
+
export declare const NUMBER_FORTY_ONE = 41;
|
|
60
|
+
export declare const NUMBER_FORTY_TWO = 42;
|
|
61
|
+
export declare const NUMBER_FORTY_THREE = 43;
|
|
62
|
+
export declare const NUMBER_FORTY_FOUR = 44;
|
|
63
|
+
export declare const NUMBER_FORTY_FIVE = 45;
|
|
64
|
+
export declare const NUMBER_FORTY_SIX = 46;
|
|
65
|
+
export declare const NUMBER_FORTY_SEVEN = 47;
|
|
66
|
+
export declare const NUMBER_FORTY_EIGHT = 48;
|
|
67
|
+
export declare const NUMBER_FORTY_NINE = 49;
|
|
68
|
+
export declare const NUMBER_FIFTY = 50;
|
|
69
|
+
export declare const NUMBER_FIFTY_ONE = 51;
|
|
70
|
+
export declare const NUMBER_FIFTY_TWO = 52;
|
|
71
|
+
export declare const NUMBER_FIFTY_THREE = 53;
|
|
72
|
+
export declare const NUMBER_FIFTY_FOUR = 54;
|
|
73
|
+
export declare const NUMBER_FIFTY_FIVE = 55;
|
|
74
|
+
export declare const NUMBER_FIFTY_SIX = 56;
|
|
75
|
+
export declare const NUMBER_FIFTY_SEVEN = 57;
|
|
76
|
+
export declare const NUMBER_FIFTY_EIGHT = 58;
|
|
77
|
+
export declare const NUMBER_FIFTY_NINE = 59;
|
|
78
|
+
export declare const NUMBER_SIXTY = 60;
|
|
79
|
+
export declare const NUMBER_SIXTY_ONE = 61;
|
|
80
|
+
export declare const NUMBER_SIXTY_TWO = 62;
|
|
81
|
+
export declare const NUMBER_SIXTY_THREE = 63;
|
|
82
|
+
export declare const NUMBER_SIXTY_FOUR = 64;
|
|
83
|
+
export declare const NUMBER_SIXTY_FIVE = 65;
|
|
84
|
+
export declare const NUMBER_SIXTY_SIX = 66;
|
|
85
|
+
export declare const NUMBER_SIXTY_SEVEN = 67;
|
|
86
|
+
export declare const NUMBER_SIXTY_EIGHT = 68;
|
|
87
|
+
export declare const NUMBER_SIXTY_NINE = 69;
|
|
88
|
+
export declare const NUMBER_SEVENTY = 70;
|
|
89
|
+
export declare const NUMBER_SEVENTY_ONE = 71;
|
|
90
|
+
export declare const NUMBER_SEVENTY_TWO = 72;
|
|
91
|
+
export declare const NUMBER_SEVENTY_THREE = 73;
|
|
92
|
+
export declare const NUMBER_SEVENTY_FOUR = 74;
|
|
93
|
+
export declare const NUMBER_SEVENTY_FIVE = 75;
|
|
94
|
+
export declare const NUMBER_SEVENTY_SIX = 76;
|
|
95
|
+
export declare const NUMBER_SEVENTY_SEVEN = 77;
|
|
96
|
+
export declare const NUMBER_SEVENTY_EIGHT = 78;
|
|
97
|
+
export declare const NUMBER_SEVENTY_NINE = 79;
|
|
98
|
+
export declare const NUMBER_EIGHTY = 80;
|
|
99
|
+
export declare const NUMBER_EIGHTY_ONE = 81;
|
|
100
|
+
export declare const NUMBER_EIGHTY_TWO = 82;
|
|
101
|
+
export declare const NUMBER_EIGHTY_THREE = 83;
|
|
102
|
+
export declare const NUMBER_EIGHTY_FOUR = 84;
|
|
103
|
+
export declare const NUMBER_EIGHTY_FIVE = 85;
|
|
104
|
+
export declare const NUMBER_EIGHTY_SIX = 86;
|
|
105
|
+
export declare const NUMBER_EIGHTY_SEVEN = 87;
|
|
106
|
+
export declare const NUMBER_EIGHTY_EIGHT = 88;
|
|
107
|
+
export declare const NUMBER_EIGHTY_NINE = 89;
|
|
108
|
+
export declare const NUMBER_NINETY = 90;
|
|
109
|
+
export declare const NUMBER_NINETY_ONE = 91;
|
|
110
|
+
export declare const NUMBER_NINETY_TWO = 92;
|
|
111
|
+
export declare const NUMBER_NINETY_THREE = 93;
|
|
112
|
+
export declare const NUMBER_NINETY_FOUR = 94;
|
|
113
|
+
export declare const NUMBER_NINETY_FIVE = 95;
|
|
114
|
+
export declare const NUMBER_NINETY_SIX = 96;
|
|
115
|
+
export declare const NUMBER_NINETY_SEVEN = 97;
|
|
116
|
+
export declare const NUMBER_NINETY_EIGHT = 98;
|
|
117
|
+
export declare const NUMBER_NINETY_NINE = 99;
|
|
118
|
+
export declare const NUMBER_ONE_HUNDRED = 100;
|
|
119
|
+
//# sourceMappingURL=numbers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"numbers.d.ts","sourceRoot":"","sources":["../../src/constants/numbers.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,cAAc,MAAM,CAAC;AAClC,eAAO,MAAM,sBAAsB,YAAY,CAAC;AAChD,eAAO,MAAM,2BAA2B,YAAY,CAAC;AACrD,eAAO,MAAM,sBAAsB,IAAI,CAAC;AACxC,eAAO,MAAM,sBAAsB,IAAI,CAAC;AACxC,eAAO,MAAM,sBAAsB,IAAI,CAAC;AACxC,eAAO,MAAM,kBAAkB,IAAI,CAAC;AACpC,eAAO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,mBAAmB,KAAK,CAAC;AACtC,eAAO,MAAM,mBAAmB,KAAK,CAAC;AACtC,eAAO,MAAM,kBAAkB,KAAK,CAAC;AACrC,eAAO,MAAM,aAAa,KAAK,CAAC;AAChC,eAAO,MAAM,iBAAiB,KAAK,CAAC;AACpC,eAAO,MAAM,iBAAiB,KAAK,CAAC;AACpC,eAAO,MAAM,mBAAmB,KAAK,CAAC;AACtC,eAAO,MAAM,kBAAkB,KAAK,CAAC;AACrC,eAAO,MAAM,kBAAkB,KAAK,CAAC;AACrC,eAAO,MAAM,iBAAiB,KAAK,CAAC;AACpC,eAAO,MAAM,mBAAmB,KAAK,CAAC;AACtC,eAAO,MAAM,mBAAmB,KAAK,CAAC;AACtC,eAAO,MAAM,kBAAkB,KAAK,CAAC;AACrC,eAAO,MAAM,kBAAkB,MAAM,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
const _ = 150, I = "#111827", E = "#fef08a", N = 3, L = 3, T = 1, o = 1, t = 12, O = 12, c = 50, n = "#fde047", s = 8, A = 180, M = 0, K = 2, R = 4, S = 6;
|
|
2
|
+
export {
|
|
3
|
+
n as INK_COMMENT_HIGHLIGHT_COLOR,
|
|
4
|
+
E as INK_DEFAULT_HIGHLIGHT_COLOR,
|
|
5
|
+
L as INK_DEFAULT_TABLE_COLS,
|
|
6
|
+
N as INK_DEFAULT_TABLE_ROWS,
|
|
7
|
+
I as INK_DEFAULT_TEXT_COLOR,
|
|
8
|
+
A as INK_DEMO_AI_DELAY_MS,
|
|
9
|
+
c as INK_HISTORY_MAX,
|
|
10
|
+
_ as INK_MIN_HEIGHT,
|
|
11
|
+
s as INK_SLASH_MENU_MAX_ITEMS,
|
|
12
|
+
O as INK_TABLE_MAX_COLS,
|
|
13
|
+
t as INK_TABLE_MAX_ROWS,
|
|
14
|
+
o as INK_TABLE_MIN_COLS,
|
|
15
|
+
T as INK_TABLE_MIN_ROWS,
|
|
16
|
+
R as NUMBER_FOUR,
|
|
17
|
+
S as NUMBER_SIX,
|
|
18
|
+
K as NUMBER_TWO,
|
|
19
|
+
M as NUMBER_ZERO
|
|
20
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t="ink_prem_",e=["icons","theme","richPaste","imageUpload","wysiwyg"],i={bold:"B",italic:"I",underline:"U",strikethrough:"S",bulletList:"•",orderedList:"1.",link:"🔗",image:"🖼",table:"▦",undo:"↶",redo:"↷",trackChanges:"±",comments:"💬",ai:"✦",clearFormat:"⌫",alignLeft:"⫷",alignCenter:"☰",alignRight:"⫸",alignJustify:"≡",indent:"→",outdent:"←",blockquote:"“",code:"</>"},n={border:"--ink-border",background:"--ink-bg",toolbar:"--ink-toolbar",text:"--ink-text",muted:"--ink-muted",accent:"--ink-accent",accentSoft:"--ink-accent-soft",shadow:"--ink-shadow",radius:"--ink-radius",fontFamily:"--ink-font-family"},o=["p","br","div","span","strong","b","em","i","u","s","strike","h1","h2","h3","h4","h5","h6","ul","ol","li","blockquote","pre","code","a","img","table","thead","tbody","tr","th","td","hr","sub","sup"],a=["href","src","alt","title","style","colspan","rowspan","width","height","target","rel"];exports.INK_DEFAULT_ICONS=i;exports.INK_PASTE_ALLOWED_ATTRS=a;exports.INK_PASTE_ALLOWED_TAGS=o;exports.INK_PREMIUM_FEATURES=e;exports.INK_PREMIUM_LICENSE_PREFIX=t;exports.INK_THEME_CSS_VARS=n;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t="ink_prem_",e=["icons","theme","richPaste","imageUpload","wysiwyg"],i={bold:"B",italic:"I",underline:"U",strikethrough:"S",bulletList:"•",orderedList:"1.",link:"🔗",image:"🖼",table:"▦",signature:"✍",findReplace:"⌕",horizontalRule:"―",undo:"↶",redo:"↷",trackChanges:"±",comments:"💬",ai:"✦",clearFormat:"⌫",alignLeft:"⫷",alignCenter:"☰",alignRight:"⫸",alignJustify:"≡",indent:"→",outdent:"←",blockquote:"“",code:"</>"},n={border:"--ink-border",background:"--ink-bg",toolbar:"--ink-toolbar",text:"--ink-text",muted:"--ink-muted",accent:"--ink-accent",accentSoft:"--ink-accent-soft",shadow:"--ink-shadow",radius:"--ink-radius",fontFamily:"--ink-font-family"},o=["p","br","div","span","strong","b","em","i","u","s","strike","h1","h2","h3","h4","h5","h6","ul","ol","li","blockquote","pre","code","a","img","table","thead","tbody","tr","th","td","hr","sub","sup"],a=["href","src","alt","title","style","colspan","rowspan","width","height","target","rel"];exports.INK_DEFAULT_ICONS=i;exports.INK_PASTE_ALLOWED_ATTRS=a;exports.INK_PASTE_ALLOWED_TAGS=o;exports.INK_PREMIUM_FEATURES=e;exports.INK_PREMIUM_LICENSE_PREFIX=t;exports.INK_THEME_CSS_VARS=n;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"premium.const.d.ts","sourceRoot":"","sources":["../../src/constants/premium.const.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,iBAAiB,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAE9E,eAAO,MAAM,0BAA0B,cAAc,CAAC;AAEtD,eAAO,MAAM,oBAAoB,EAAE,iBAAiB,EAMnD,CAAC;AAEF,eAAO,MAAM,iBAAiB,EAAE,MAAM,CAAC,UAAU,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"premium.const.d.ts","sourceRoot":"","sources":["../../src/constants/premium.const.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,iBAAiB,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAE9E,eAAO,MAAM,0BAA0B,cAAc,CAAC;AAEtD,eAAO,MAAM,oBAAoB,EAAE,iBAAiB,EAMnD,CAAC;AAEF,eAAO,MAAM,iBAAiB,EAAE,MAAM,CAAC,UAAU,EAAE,MAAM,CA2BxD,CAAC;AAEF,eAAO,MAAM,kBAAkB,EAAE,MAAM,CAAC,MAAM,cAAc,EAAE,MAAM,CAWnE,CAAC;AAEF,eAAO,MAAM,sBAAsB,mPAmCzB,CAAC;AAEX,eAAO,MAAM,uBAAuB,6GAY1B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const O="signature",T="findReplace",R="horizontalRule";exports.TOOLBAR_OPTION_FIND_REPLACE=T;exports.TOOLBAR_OPTION_HORIZONTAL_RULE=R;exports.TOOLBAR_OPTION_SIGNATURE=O;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"toolbar.const.d.ts","sourceRoot":"","sources":["../../src/constants/toolbar.const.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,wBAAwB,EAAG,WAAoB,CAAC;AAC7D,eAAO,MAAM,2BAA2B,EAAG,aAAsB,CAAC;AAClE,eAAO,MAAM,8BAA8B,EAAG,gBAAyB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("../../constants/numbers.
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("../../constants/numbers.cjs"),o=require("../../constants/aiModels.const.cjs"),r=require("../../utils/id.utils.cjs"),g=t=>new Promise(n=>{window.setTimeout(n,t)}),c=t=>t.replace(/<[^>]+>/g," ").replace(/\s+/g," ").trim(),i=t=>`<p>${t}</p>`,p=async t=>{var d,l;await g(u.INK_DEMO_AI_DELAY_MS);const n=t.selectionHtml||t.html||"",s=c(n)||"your content",m=((d=t.prompt)==null?void 0:d.trim())||"";switch(t.capability){case"chat":{const e=m?`Demo assistant: regarding “${m.slice(0,120)}”, here’s a concise take based on the current document (${s.slice(0,80)}…). Connect your own LLM provider for production answers.`:`Demo assistant ready. Ask a question about: ${s.slice(0,100)}…`;return{text:e,turns:[{id:r.createInkId("turn"),role:"assistant",content:e,timestamp:Date.now(),capability:"chat"}],meta:{provider:o.INK_AI_DEMO_PROVIDER_ID,model:o.INK_AI_DEMO_MODEL_ID}}}case"summarize":{const e=i(`Summary (demo): ${s.slice(0,160)}${s.length>160?"…":""}`);return{html:e,text:c(e),diff:{id:r.createInkId("diff"),originalHtml:n,suggestedHtml:e,summary:"Demo summary of the selection"}}}case"expand":{const e=i(`${s} Additionally, this demo expansion adds clarifying context, examples, and a short closing sentence so you can preview apply/reject flows.`);return{html:e,diff:{id:r.createInkId("diff"),originalHtml:n,suggestedHtml:e,summary:"Demo expansion"}}}case"tone":{const e=i(`In a clearer, more professional tone: ${s}`);return{html:e,diff:{id:r.createInkId("diff"),originalHtml:n,suggestedHtml:e,summary:"Demo tone adjustment"}}}case"translate":{const e=((l=t.options)==null?void 0:l.language)||"Spanish",a=i(`[${e} demo] ${s}`);return{html:a,text:c(a),diff:{id:r.createInkId("diff"),originalHtml:n,suggestedHtml:a,summary:`Demo translation to ${e}`}}}case"review":return{text:"Demo review complete",reviewSuggestions:[{id:r.createInkId("rev"),message:"Consider shortening long sentences for clarity.",severity:"info",originalText:s.slice(0,40),suggestedText:s.slice(0,40)},{id:r.createInkId("rev"),message:"Possible passive voice — prefer active constructions.",severity:"warning",originalText:"was processed",suggestedText:"the team processed"}]};case"suggestDiff":case"quickAction":case"rewrite":default:{const e=i(`Rewritten (demo): ${s}`);return{html:e,diff:{id:r.createInkId("diff"),originalHtml:n,suggestedHtml:e,summary:"Demo rewrite suggestion"}}}}},I=()=>({id:o.INK_AI_DEMO_PROVIDER_ID,name:"Ink Demo Provider",models:[{id:o.INK_AI_DEMO_MODEL_ID,provider:"demo",label:"Ink Demo (local)",family:"Demo"}],run:p});exports.createDemoAiProvider=I;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { INK_DEMO_AI_DELAY_MS as u } from "../../constants/numbers.
|
|
1
|
+
import { INK_DEMO_AI_DELAY_MS as u } from "../../constants/numbers.js";
|
|
2
2
|
import { INK_AI_DEMO_MODEL_ID as d, INK_AI_DEMO_PROVIDER_ID as g } from "../../constants/aiModels.const.js";
|
|
3
3
|
import { createInkId as i } from "../../utils/id.utils.js";
|
|
4
4
|
const p = (t) => new Promise((o) => {
|
package/dist/styles.css
CHANGED
|
@@ -668,3 +668,54 @@
|
|
|
668
668
|
.ink-theme-minimal.Ink-Editor .Ink-Editor__toolbar {
|
|
669
669
|
border-bottom: 1px solid var(--ink-border);
|
|
670
670
|
}
|
|
671
|
+
|
|
672
|
+
.Ink-SignPad,
|
|
673
|
+
.Ink-FindReplace {
|
|
674
|
+
border-bottom-color: var(--ink-border);
|
|
675
|
+
background: var(--ink-toolbar);
|
|
676
|
+
color: var(--ink-text);
|
|
677
|
+
}
|
|
678
|
+
|
|
679
|
+
.Ink-SignPad__title,
|
|
680
|
+
.Ink-FindReplace__title {
|
|
681
|
+
color: var(--ink-text);
|
|
682
|
+
}
|
|
683
|
+
|
|
684
|
+
.Ink-SignPad__canvas {
|
|
685
|
+
max-width: 480px;
|
|
686
|
+
height: 180px;
|
|
687
|
+
border-color: var(--ink-border);
|
|
688
|
+
touch-action: none;
|
|
689
|
+
}
|
|
690
|
+
|
|
691
|
+
.Ink-FindReplace__field {
|
|
692
|
+
color: var(--ink-muted);
|
|
693
|
+
}
|
|
694
|
+
|
|
695
|
+
.Ink-FindReplace__field input {
|
|
696
|
+
border: 1px solid var(--ink-border);
|
|
697
|
+
border-radius: 0.4rem;
|
|
698
|
+
padding: 0.4rem 0.55rem;
|
|
699
|
+
background: var(--ink-bg);
|
|
700
|
+
color: var(--ink-text);
|
|
701
|
+
font: inherit;
|
|
702
|
+
}
|
|
703
|
+
|
|
704
|
+
.flex { display: flex; }
|
|
705
|
+
.flex-col { flex-direction: column; }
|
|
706
|
+
.flex-wrap { flex-wrap: wrap; }
|
|
707
|
+
.gap-1 { gap: 0.25rem; }
|
|
708
|
+
.gap-2 { gap: 0.5rem; }
|
|
709
|
+
.p-3 { padding: 0.75rem; }
|
|
710
|
+
.m-0 { margin: 0; }
|
|
711
|
+
.w-full { width: 100%; }
|
|
712
|
+
.max-w-xl { max-width: 36rem; }
|
|
713
|
+
.h-44 { height: 11rem; }
|
|
714
|
+
.border { border-width: 1px; border-style: solid; }
|
|
715
|
+
.border-b { border-bottom-width: 1px; border-bottom-style: solid; }
|
|
716
|
+
.border-dashed { border-style: dashed; }
|
|
717
|
+
.rounded-lg { border-radius: 0.5rem; }
|
|
718
|
+
.bg-white { background-color: #fff; }
|
|
719
|
+
.cursor-crosshair { cursor: crosshair; }
|
|
720
|
+
.text-sm { font-size: 0.875rem; }
|
|
721
|
+
.font-semibold { font-weight: 600; }
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export type InkFeatureName = 'table' | 'trackChanges' | 'comments' | 'ai' | 'blocks' | 'slash' | 'history' | 'typoAutoFix';
|
|
1
|
+
export type InkFeatureName = 'table' | 'trackChanges' | 'comments' | 'ai' | 'blocks' | 'slash' | 'history' | 'typoAutoFix' | 'signature' | 'findReplace' | 'horizontalRule';
|
|
2
2
|
export type InkFeaturesConfig = Partial<Record<InkFeatureName, boolean>>;
|
|
3
3
|
export type InkEditorVariant = 'classic' | 'document';
|
|
4
4
|
export type InkAiPlacement = 'sidebar' | 'drawer' | 'floating';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"features.types.d.ts","sourceRoot":"","sources":["../../src/types/features.types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,cAAc,GACtB,OAAO,GACP,cAAc,GACd,UAAU,GACV,IAAI,GACJ,QAAQ,GACR,OAAO,GACP,SAAS,GACT,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"features.types.d.ts","sourceRoot":"","sources":["../../src/types/features.types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,cAAc,GACtB,OAAO,GACP,cAAc,GACd,UAAU,GACV,IAAI,GACJ,QAAQ,GACR,OAAO,GACP,SAAS,GACT,aAAa,GACb,WAAW,GACX,aAAa,GACb,gBAAgB,CAAC;AAErB,MAAM,MAAM,iBAAiB,GAAG,OAAO,CAAC,MAAM,CAAC,cAAc,EAAE,OAAO,CAAC,CAAC,CAAC;AAEzE,MAAM,MAAM,gBAAgB,GAAG,SAAS,GAAG,UAAU,CAAC;AAEtD,MAAM,MAAM,cAAc,GAAG,SAAS,GAAG,QAAQ,GAAG,UAAU,CAAC"}
|
|
@@ -4,7 +4,7 @@ import { InkCommentThread, InkCommentsChangeHandler } from './comments.types';
|
|
|
4
4
|
import { InkEditorVariant, InkFeaturesConfig } from './features.types';
|
|
5
5
|
import { InkIconMap, InkImageUploadHandler, InkPasteMode, InkPremiumConfig, InkThemeTokens } from './premium.types';
|
|
6
6
|
import { InkTrackChange, InkTrackChangesChangeHandler } from './trackChanges.types';
|
|
7
|
-
export type ToolbarOption = 'bold' | 'italic' | 'underline' | 'strikethrough' | 'heading1' | 'heading2' | 'heading3' | 'heading4' | 'heading5' | 'heading6' | 'paragraph' | 'headingDropdown' | 'bulletList' | 'orderedList' | 'blockquote' | 'code' | 'link' | 'image' | 'table' | 'undo' | 'redo' | 'trackChanges' | 'comments' | 'ai' | 'textColor' | 'highlightColor' | 'alignLeft' | 'alignCenter' | 'alignRight' | 'alignJustify' | 'indent' | 'outdent' | 'clearFormat' | 'divider';
|
|
7
|
+
export type ToolbarOption = 'bold' | 'italic' | 'underline' | 'strikethrough' | 'heading1' | 'heading2' | 'heading3' | 'heading4' | 'heading5' | 'heading6' | 'paragraph' | 'headingDropdown' | 'bulletList' | 'orderedList' | 'blockquote' | 'code' | 'link' | 'image' | 'table' | 'signature' | 'findReplace' | 'horizontalRule' | 'undo' | 'redo' | 'trackChanges' | 'comments' | 'ai' | 'textColor' | 'highlightColor' | 'alignLeft' | 'alignCenter' | 'alignRight' | 'alignJustify' | 'indent' | 'outdent' | 'clearFormat' | 'divider';
|
|
8
8
|
export interface InkEditorProps extends Omit<HTMLAttributes<HTMLDivElement>, 'onChange'> {
|
|
9
9
|
value?: string;
|
|
10
10
|
defaultValue?: string;
|
|
@@ -41,6 +41,8 @@ export interface InkEditorProps extends Omit<HTMLAttributes<HTMLDivElement>, 'on
|
|
|
41
41
|
pasteMode?: InkPasteMode;
|
|
42
42
|
onImageUpload?: InkImageUploadHandler;
|
|
43
43
|
wysiwyg?: boolean;
|
|
44
|
+
keepInMemory?: boolean;
|
|
45
|
+
memoryKey?: string;
|
|
44
46
|
}
|
|
45
47
|
export interface ToolbarButtonProps {
|
|
46
48
|
icon: ReactNode;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ink.types.d.ts","sourceRoot":"","sources":["../../src/types/ink.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAC9C,OAAO,KAAK,EAAE,gBAAgB,EAAE,wBAAwB,EAAE,MAAM,kBAAkB,CAAC;AACnF,OAAO,KAAK,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAC5E,OAAO,KAAK,EACV,UAAU,EACV,qBAAqB,EACrB,YAAY,EACZ,gBAAgB,EAChB,cAAc,EACf,MAAM,iBAAiB,CAAC;AACzB,OAAO,KAAK,EAAE,cAAc,EAAE,4BAA4B,EAAE,MAAM,sBAAsB,CAAC;AAEzF,MAAM,MAAM,aAAa,GACrB,MAAM,GACN,QAAQ,GACR,WAAW,GACX,eAAe,GACf,UAAU,GACV,UAAU,GACV,UAAU,GACV,UAAU,GACV,UAAU,GACV,UAAU,GACV,WAAW,GACX,iBAAiB,GACjB,YAAY,GACZ,aAAa,GACb,YAAY,GACZ,MAAM,GACN,MAAM,GACN,OAAO,GACP,OAAO,GACP,MAAM,GACN,MAAM,GACN,cAAc,GACd,UAAU,GACV,IAAI,GACJ,WAAW,GACX,gBAAgB,GAChB,WAAW,GACX,aAAa,GACb,YAAY,GACZ,cAAc,GACd,QAAQ,GACR,SAAS,GACT,aAAa,GACb,SAAS,CAAC;AAEd,MAAM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E,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,gBAAgB;IAC/B,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,MAAM,EAAE,UAAU,GAAG,UAAU,GAAG,YAAY,GAAG,aAAa,GAAG,OAAO,GAAG,IAAI,CAAC;CACjF"}
|
|
@@ -2,7 +2,7 @@ import { CSSProperties, ReactNode } from 'react';
|
|
|
2
2
|
import { ToolbarOption } from './ink.types';
|
|
3
3
|
export type InkPremiumFeature = 'icons' | 'theme' | 'richPaste' | 'imageUpload' | 'wysiwyg';
|
|
4
4
|
export type InkPasteMode = 'plain' | 'rich';
|
|
5
|
-
export type InkIconKey = Extract<ToolbarOption, 'bold' | 'italic' | 'underline' | 'strikethrough' | 'bulletList' | 'orderedList' | 'link' | 'image' | 'table' | 'undo' | 'redo' | 'trackChanges' | 'comments' | 'ai' | 'clearFormat' | 'alignLeft' | 'alignCenter' | 'alignRight' | 'alignJustify' | 'indent' | 'outdent' | 'blockquote' | 'code'>;
|
|
5
|
+
export type InkIconKey = Extract<ToolbarOption, 'bold' | 'italic' | 'underline' | 'strikethrough' | 'bulletList' | 'orderedList' | 'link' | 'image' | 'table' | 'signature' | 'findReplace' | 'horizontalRule' | 'undo' | 'redo' | 'trackChanges' | 'comments' | 'ai' | 'clearFormat' | 'alignLeft' | 'alignCenter' | 'alignRight' | 'alignJustify' | 'indent' | 'outdent' | 'blockquote' | 'code'>;
|
|
6
6
|
export type InkIconMap = Partial<Record<InkIconKey, ReactNode>>;
|
|
7
7
|
export interface InkThemeTokens {
|
|
8
8
|
border?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"premium.types.d.ts","sourceRoot":"","sources":["../../src/types/premium.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACtD,OAAO,KAAK,EAAE,aAAa,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;IAChB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,gBAAgB;IAC/B,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,OAAO,CAAC,MAAM,CAAC,iBAAiB,EAAE,OAAO,CAAC,CAAC,CAAC;CACxD;AAED,MAAM,WAAW,kBAAkB;IACjC,MAAM,EAAE,OAAO,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC,iBAAiB,EAAE,OAAO,CAAC,CAAC;CAC9C;AAED,MAAM,MAAM,qBAAqB,GAAG,CAAC,IAAI,EAAE,IAAI,KAAK,OAAO,CAAC,MAAM,CAAC,GAAG,MAAM,CAAC;AAE7E,MAAM,MAAM,aAAa,GAAG,aAAa,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("../constants/numbers.cjs"),c=require("../constants/defaults.const.cjs"),m=require("./id.utils.cjs"),i=(r,e,n)=>({id:m.createInkId("cmt"),author:r,body:e,timestamp:Date.now(),highlightId:n,replies:[]}),l=r=>{const e=window.getSelection();if(!e||e.rangeCount===0||e.isCollapsed)return!1;const n=e.getRangeAt(0),t=document.createElement("mark");t.className=c.INK_CLASS_COMMENT_MARK,t.dataset.inkComment=r,t.style.backgroundColor=s.INK_COMMENT_HIGHLIGHT_COLOR;try{return n.surroundContents(t),e.removeAllRanges(),!0}catch{const o=n.extractContents();return t.appendChild(o),n.insertNode(t),e.removeAllRanges(),!0}},d=(r,e)=>{const o=new DOMParser().parseFromString(`<div>${r}</div>`,"text/html").body.firstElementChild;return o?(o.querySelectorAll(`mark[data-ink-comment="${e}"]`).forEach(a=>{a.replaceWith(...Array.from(a.childNodes))}),o.innerHTML):r};exports.createCommentThread=i;exports.removeCommentMark=d;exports.wrapSelectionAsComment=l;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { INK_COMMENT_HIGHLIGHT_COLOR as s } from "../constants/numbers.
|
|
1
|
+
import { INK_COMMENT_HIGHLIGHT_COLOR as s } from "../constants/numbers.js";
|
|
2
2
|
import { INK_CLASS_COMMENT_MARK as m } from "../constants/defaults.const.js";
|
|
3
3
|
import { createInkId as c } from "./id.utils.js";
|
|
4
4
|
const C = (r, e, n) => ({
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("../constants/generals.const.cjs"),c=require("../constants/numbers.cjs"),d=(t,n,o,r)=>{const e=t.nodeValue??l.EMPTY_STRING,s=e.indexOf(n);return s<c.NUMBER_ZERO?!1:r?(t.nodeValue=e.split(n).join(o),!0):(t.nodeValue=e.slice(c.NUMBER_ZERO,s)+o+e.slice(s+n.length),!0)},u=(t,n)=>{const o=Array.from(t.childNodes);for(const r of o){if(r.nodeType===Node.TEXT_NODE){if(n(r))return!0;continue}if(r.nodeType===Node.ELEMENT_NODE&&u(r,n))return!0}return!1},a=(t,n,o,r)=>{if(!n||typeof document>"u")return t;const e=document.createElement("div");e.innerHTML=t;let s=!1;return u(e,i=>d(i,n,o,r)?(s=!0,!r):!1),s?e.innerHTML:t};exports.replaceInHtml=a;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"findReplace.utils.d.ts","sourceRoot":"","sources":["../../src/utils/findReplace.utils.ts"],"names":[],"mappings":"AAuCA,eAAO,MAAM,aAAa,GACxB,MAAM,MAAM,EACZ,MAAM,MAAM,EACZ,SAAS,MAAM,EACf,YAAY,OAAO,KAClB,MAYF,CAAC;AAEF,eAAO,MAAM,gBAAgB,GAAI,MAAM,MAAM,EAAE,MAAM,MAAM,KAAG,MAW7D,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { EMPTY_STRING as d } from "../constants/generals.const.js";
|
|
2
|
+
import { NUMBER_ZERO as s } from "../constants/numbers.js";
|
|
3
|
+
const l = (t, r, o, n) => {
|
|
4
|
+
const e = t.nodeValue ?? d, c = e.indexOf(r);
|
|
5
|
+
return c < s ? !1 : n ? (t.nodeValue = e.split(r).join(o), !0) : (t.nodeValue = e.slice(s, c) + o + e.slice(c + r.length), !0);
|
|
6
|
+
}, u = (t, r) => {
|
|
7
|
+
const o = Array.from(t.childNodes);
|
|
8
|
+
for (const n of o) {
|
|
9
|
+
if (n.nodeType === Node.TEXT_NODE) {
|
|
10
|
+
if (r(n)) return !0;
|
|
11
|
+
continue;
|
|
12
|
+
}
|
|
13
|
+
if (n.nodeType === Node.ELEMENT_NODE && u(n, r))
|
|
14
|
+
return !0;
|
|
15
|
+
}
|
|
16
|
+
return !1;
|
|
17
|
+
}, T = (t, r, o, n) => {
|
|
18
|
+
if (!r || typeof document > "u") return t;
|
|
19
|
+
const e = document.createElement("div");
|
|
20
|
+
e.innerHTML = t;
|
|
21
|
+
let c = !1;
|
|
22
|
+
return u(e, (i) => l(i, r, o, n) ? (c = !0, !n) : !1), c ? e.innerHTML : t;
|
|
23
|
+
};
|
|
24
|
+
export {
|
|
25
|
+
T as replaceInHtml
|
|
26
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("../constants/numbers.
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("../constants/numbers.cjs");class s{constructor(t=""){this.past=[],this.future=[],this.current="",this.current=t}push(t){t!==this.current&&(this.past.push(this.current),this.past.length>r.INK_HISTORY_MAX&&this.past.shift(),this.current=t,this.future=[])}undo(){const t=this.past.pop();return t===void 0?null:(this.future.push(this.current),this.current=t,this.current)}redo(){const t=this.future.pop();return t===void 0?null:(this.past.push(this.current),this.current=t,this.current)}canUndo(){return this.past.length>0}canRedo(){return this.future.length>0}getCurrent(){return this.current}}exports.InkHistoryStack=s;
|
package/dist/utils/index.d.ts
CHANGED
|
@@ -10,4 +10,7 @@ export { filterSlashCommands, extractSlashQuery } from './slash.utils';
|
|
|
10
10
|
export { resolveInkPremium, hasInkPremiumFeature, isInkPremiumLicenseKey, themeTokensToStyle, } from './premium.utils';
|
|
11
11
|
export { mintInkPremiumLicenseKey } from './license.utils';
|
|
12
12
|
export { sanitizePastedHtml, extractClipboardHtml, extractClipboardText, } from './paste.utils';
|
|
13
|
+
export { buildInkMemoryKey, readInkMemory, writeInkMemory, clearInkMemory, } from './memory.utils';
|
|
14
|
+
export { isLocalStorageAvailable } from './storage.utils';
|
|
15
|
+
export { replaceInHtml, countOccurrences } from './findReplace.utils';
|
|
13
16
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,YAAY,CAAC;AAChC,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAChD,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AACzC,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,EAAE,eAAe,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAC7E,OAAO,EACL,cAAc,EACd,cAAc,EACd,iBAAiB,EACjB,uBAAuB,EACvB,uBAAuB,GACxB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EACL,mBAAmB,EACnB,sBAAsB,EACtB,iBAAiB,GAClB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;A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AiB,CAAC;AAC1D,OAAO,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ink.features.test.d.ts","sourceRoot":"","sources":["../../src/utils/ink.features.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("../constants/generals.const.cjs"),o=require("./storage.utils.cjs"),t=e=>`${r.LOCAL_STORAGE_PREFIX}${e||"default"}`,l=e=>o.isLocalStorageAvailable()?localStorage.getItem(t(e))??r.EMPTY_STRING:r.EMPTY_STRING,n=(e,a)=>{o.isLocalStorageAvailable()&&localStorage.setItem(t(a),e)};exports.buildInkMemoryKey=t;exports.readInkMemory=l;exports.writeInkMemory=n;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export declare const buildInkMemoryKey: (memoryKey?: string) => string;
|
|
2
|
+
export declare const readInkMemory: (memoryKey?: string) => string;
|
|
3
|
+
export declare const writeInkMemory: (html: string, memoryKey?: string) => void;
|
|
4
|
+
export declare const clearInkMemory: (memoryKey?: string) => void;
|
|
5
|
+
//# sourceMappingURL=memory.utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"memory.utils.d.ts","sourceRoot":"","sources":["../../src/utils/memory.utils.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,iBAAiB,GAAI,YAAY,MAAM,KAAG,MACH,CAAC;AAErD,eAAO,MAAM,aAAa,GAAI,YAAY,MAAM,KAAG,MAGlD,CAAC;AAEF,eAAO,MAAM,cAAc,GAAI,MAAM,MAAM,EAAE,YAAY,MAAM,KAAG,IAGjE,CAAC;AAEF,eAAO,MAAM,cAAc,GAAI,YAAY,MAAM,KAAG,IAGnD,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { EMPTY_STRING as r, LOCAL_STORAGE_PREFIX as l } from "../constants/generals.const.js";
|
|
2
|
+
import { isLocalStorageAvailable as t } from "./storage.utils.js";
|
|
3
|
+
const o = (e) => `${l}${e || "default"}`, i = (e) => t() ? localStorage.getItem(o(e)) ?? r : r, I = (e, a) => {
|
|
4
|
+
t() && localStorage.setItem(o(a), e);
|
|
5
|
+
};
|
|
6
|
+
export {
|
|
7
|
+
o as buildInkMemoryKey,
|
|
8
|
+
i as readInkMemory,
|
|
9
|
+
I as writeInkMemory
|
|
10
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("../constants/numbers.
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("../constants/numbers.cjs"),n=require("../constants/defaults.const.cjs"),o=r=>{const e=r.trim().toLowerCase();return e?n.INK_SLASH_COMMANDS.filter(t=>t.label.toLowerCase().includes(e)?!0:t.keywords.some(l=>l.includes(e))).slice(0,s.INK_SLASH_MENU_MAX_ITEMS):n.INK_SLASH_COMMANDS.slice(0,s.INK_SLASH_MENU_MAX_ITEMS)},u=r=>{const e=r.match(/(?:^|\s)\/([^\s]*)$/);return e?e[1]??"":null};exports.extractSlashQuery=u;exports.filterSlashCommands=o;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { INK_SLASH_MENU_MAX_ITEMS as o } from "../constants/numbers.
|
|
1
|
+
import { INK_SLASH_MENU_MAX_ITEMS as o } from "../constants/numbers.js";
|
|
2
2
|
import { INK_SLASH_COMMANDS as s } from "../constants/defaults.const.js";
|
|
3
3
|
const c = (e) => {
|
|
4
4
|
const r = e.trim().toLowerCase();
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=()=>typeof localStorage<"u";exports.isLocalStorageAvailable=e;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"storage.utils.d.ts","sourceRoot":"","sources":["../../src/utils/storage.utils.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,uBAAuB,QAAO,OACN,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("../constants/numbers.
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("../constants/numbers.cjs"),a=(e,r,l)=>Math.min(l,Math.max(r,e)),c=(e=t.INK_DEFAULT_TABLE_ROWS,r=t.INK_DEFAULT_TABLE_COLS)=>{const l=a(e,t.INK_TABLE_MIN_ROWS,t.INK_TABLE_MAX_ROWS),o=a(r,t.INK_TABLE_MIN_COLS,t.INK_TABLE_MAX_COLS),n=Array.from({length:o},(_,b)=>`<th contenteditable="true">Header ${b+1}</th>`).join(""),s=Array.from({length:Math.max(0,l-1)},()=>`<tr>${Array.from({length:o},()=>'<td contenteditable="true"><br></td>').join("")}</tr>`).join("");return`<table class="Ink-table"><thead><tr>${n}</tr></thead><tbody>${s}</tbody></table><p><br></p>`};exports.buildTableHtml=c;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { INK_DEFAULT_TABLE_ROWS as c, INK_DEFAULT_TABLE_COLS as A, INK_TABLE_MAX_ROWS as b, INK_TABLE_MIN_ROWS as d, INK_TABLE_MAX_COLS as h, INK_TABLE_MIN_COLS as L } from "../constants/numbers.
|
|
1
|
+
import { INK_DEFAULT_TABLE_ROWS as c, INK_DEFAULT_TABLE_COLS as A, INK_TABLE_MAX_ROWS as b, INK_TABLE_MIN_ROWS as d, INK_TABLE_MAX_COLS as h, INK_TABLE_MIN_COLS as L } from "../constants/numbers.js";
|
|
2
2
|
const a = (t, e, r) => Math.min(r, Math.max(e, t)), I = (t = c, e = A) => {
|
|
3
3
|
const r = a(t, d, b), o = a(e, L, h), n = Array.from(
|
|
4
4
|
{ length: o },
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@forgedevstack/ink",
|
|
3
|
-
"version": "1.1.
|
|
4
|
-
"description": "ForgeStack rich text editor for React —
|
|
3
|
+
"version": "1.1.2",
|
|
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",
|
|
7
7
|
"module": "./dist/index.js",
|
|
@@ -57,6 +57,7 @@
|
|
|
57
57
|
"@types/react": "^18.3.18",
|
|
58
58
|
"@types/react-dom": "^18.3.5",
|
|
59
59
|
"@vitejs/plugin-react": "^4.3.4",
|
|
60
|
+
"happy-dom": "15.11.7",
|
|
60
61
|
"react": "^18.3.1",
|
|
61
62
|
"react-dom": "^18.3.1",
|
|
62
63
|
"typescript": "^5.7.3",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const _=150,I="#111827",L="#fef08a",T=3,N=3,A=1,E=1,O=12,M=12,K=50,S="#fde047",H=8,t=180;exports.INK_COMMENT_HIGHLIGHT_COLOR=S;exports.INK_DEFAULT_HIGHLIGHT_COLOR=L;exports.INK_DEFAULT_TABLE_COLS=N;exports.INK_DEFAULT_TABLE_ROWS=T;exports.INK_DEFAULT_TEXT_COLOR=I;exports.INK_DEMO_AI_DELAY_MS=t;exports.INK_HISTORY_MAX=K;exports.INK_MIN_HEIGHT=_;exports.INK_SLASH_MENU_MAX_ITEMS=H;exports.INK_TABLE_MAX_COLS=M;exports.INK_TABLE_MAX_ROWS=O;exports.INK_TABLE_MIN_COLS=E;exports.INK_TABLE_MIN_ROWS=A;
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
export declare const INK_MIN_HEIGHT = 150;
|
|
2
|
-
export declare const INK_DEFAULT_TEXT_COLOR = "#111827";
|
|
3
|
-
export declare const INK_DEFAULT_HIGHLIGHT_COLOR = "#fef08a";
|
|
4
|
-
export declare const INK_COLOR_SWATCH_COUNT = 8;
|
|
5
|
-
export declare const INK_DEFAULT_TABLE_ROWS = 3;
|
|
6
|
-
export declare const INK_DEFAULT_TABLE_COLS = 3;
|
|
7
|
-
export declare const INK_TABLE_MIN_ROWS = 1;
|
|
8
|
-
export declare const INK_TABLE_MIN_COLS = 1;
|
|
9
|
-
export declare const INK_TABLE_MAX_ROWS = 12;
|
|
10
|
-
export declare const INK_TABLE_MAX_COLS = 12;
|
|
11
|
-
export declare const INK_HISTORY_MAX = 50;
|
|
12
|
-
export declare const INK_COMMENT_HIGHLIGHT_COLOR = "#fde047";
|
|
13
|
-
export declare const INK_BLOCK_HANDLE_OFFSET_PX = 28;
|
|
14
|
-
export declare const INK_SLASH_MENU_MAX_ITEMS = 8;
|
|
15
|
-
export declare const INK_AI_PANEL_WIDTH_PX = 320;
|
|
16
|
-
export declare const INK_COMMENTS_PANEL_WIDTH_PX = 300;
|
|
17
|
-
export declare const INK_DEMO_AI_DELAY_MS = 180;
|
|
18
|
-
//# sourceMappingURL=numbers.const.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"numbers.const.d.ts","sourceRoot":"","sources":["../../src/constants/numbers.const.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,cAAc,MAAM,CAAC;AAClC,eAAO,MAAM,sBAAsB,YAAY,CAAC;AAChD,eAAO,MAAM,2BAA2B,YAAY,CAAC;AACrD,eAAO,MAAM,sBAAsB,IAAI,CAAC;AACxC,eAAO,MAAM,sBAAsB,IAAI,CAAC;AACxC,eAAO,MAAM,sBAAsB,IAAI,CAAC;AACxC,eAAO,MAAM,kBAAkB,IAAI,CAAC;AACpC,eAAO,MAAM,kBAAkB,IAAI,CAAC;AACpC,eAAO,MAAM,kBAAkB,KAAK,CAAC;AACrC,eAAO,MAAM,kBAAkB,KAAK,CAAC;AACrC,eAAO,MAAM,eAAe,KAAK,CAAC;AAClC,eAAO,MAAM,2BAA2B,YAAY,CAAC;AACrD,eAAO,MAAM,0BAA0B,KAAK,CAAC;AAC7C,eAAO,MAAM,wBAAwB,IAAI,CAAC;AAC1C,eAAO,MAAM,qBAAqB,MAAM,CAAC;AACzC,eAAO,MAAM,2BAA2B,MAAM,CAAC;AAC/C,eAAO,MAAM,oBAAoB,MAAM,CAAC"}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
const _ = 150, I = "#111827", L = "#fef08a", N = 3, T = 3, A = 1, E = 1, O = 12, o = 12, t = 50, c = "#fde047", n = 8, s = 180;
|
|
2
|
-
export {
|
|
3
|
-
c as INK_COMMENT_HIGHLIGHT_COLOR,
|
|
4
|
-
L as INK_DEFAULT_HIGHLIGHT_COLOR,
|
|
5
|
-
T as INK_DEFAULT_TABLE_COLS,
|
|
6
|
-
N as INK_DEFAULT_TABLE_ROWS,
|
|
7
|
-
I as INK_DEFAULT_TEXT_COLOR,
|
|
8
|
-
s as INK_DEMO_AI_DELAY_MS,
|
|
9
|
-
t as INK_HISTORY_MAX,
|
|
10
|
-
_ as INK_MIN_HEIGHT,
|
|
11
|
-
n as INK_SLASH_MENU_MAX_ITEMS,
|
|
12
|
-
o as INK_TABLE_MAX_COLS,
|
|
13
|
-
O as INK_TABLE_MAX_ROWS,
|
|
14
|
-
E as INK_TABLE_MIN_COLS,
|
|
15
|
-
A as INK_TABLE_MIN_ROWS
|
|
16
|
-
};
|