@forgedevstack/ink 1.0.0 → 1.1.0
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 +34 -0
- package/README.md +103 -38
- package/dist/components/InkEditor/InkEditor.cjs +1 -1
- package/dist/components/InkEditor/InkEditor.d.ts.map +1 -1
- package/dist/components/InkEditor/InkEditor.js +495 -156
- package/dist/components/InkEditor/components/AiPanel/AiPanel.cjs +1 -0
- package/dist/components/InkEditor/components/AiPanel/AiPanel.d.ts +11 -0
- package/dist/components/InkEditor/components/AiPanel/AiPanel.d.ts.map +1 -0
- package/dist/components/InkEditor/components/AiPanel/AiPanel.js +178 -0
- package/dist/components/InkEditor/components/AiPanel/index.d.ts +3 -0
- package/dist/components/InkEditor/components/AiPanel/index.d.ts.map +1 -0
- package/dist/components/InkEditor/components/BlockHandles/BlockHandles.cjs +1 -0
- package/dist/components/InkEditor/components/BlockHandles/BlockHandles.d.ts +9 -0
- package/dist/components/InkEditor/components/BlockHandles/BlockHandles.d.ts.map +1 -0
- package/dist/components/InkEditor/components/BlockHandles/BlockHandles.js +12 -0
- package/dist/components/InkEditor/components/BlockHandles/index.d.ts +3 -0
- package/dist/components/InkEditor/components/BlockHandles/index.d.ts.map +1 -0
- package/dist/components/InkEditor/components/CommentsPanel/CommentsPanel.cjs +1 -0
- package/dist/components/InkEditor/components/CommentsPanel/CommentsPanel.d.ts +11 -0
- package/dist/components/InkEditor/components/CommentsPanel/CommentsPanel.d.ts.map +1 -0
- package/dist/components/InkEditor/components/CommentsPanel/CommentsPanel.js +61 -0
- package/dist/components/InkEditor/components/CommentsPanel/index.d.ts +3 -0
- package/dist/components/InkEditor/components/CommentsPanel/index.d.ts.map +1 -0
- package/dist/components/InkEditor/components/SlashMenu/SlashMenu.cjs +1 -0
- package/dist/components/InkEditor/components/SlashMenu/SlashMenu.d.ts +10 -0
- package/dist/components/InkEditor/components/SlashMenu/SlashMenu.d.ts.map +1 -0
- package/dist/components/InkEditor/components/SlashMenu/SlashMenu.js +20 -0
- package/dist/components/InkEditor/components/SlashMenu/index.d.ts +3 -0
- package/dist/components/InkEditor/components/SlashMenu/index.d.ts.map +1 -0
- package/dist/components/InkEditor/components/TrackChangesBar/TrackChangesBar.cjs +1 -0
- package/dist/components/InkEditor/components/TrackChangesBar/TrackChangesBar.d.ts +11 -0
- package/dist/components/InkEditor/components/TrackChangesBar/TrackChangesBar.d.ts.map +1 -0
- package/dist/components/InkEditor/components/TrackChangesBar/TrackChangesBar.js +27 -0
- package/dist/components/InkEditor/components/TrackChangesBar/index.d.ts +3 -0
- package/dist/components/InkEditor/components/TrackChangesBar/index.d.ts.map +1 -0
- package/dist/components/InkEditor/components/index.d.ts +5 -0
- package/dist/components/InkEditor/components/index.d.ts.map +1 -1
- package/dist/constants/aiModels.const.cjs +1 -0
- package/dist/constants/aiModels.const.d.ts +5 -0
- package/dist/constants/aiModels.const.d.ts.map +1 -0
- package/dist/constants/aiModels.const.js +31 -0
- package/dist/constants/defaults.const.cjs +1 -1
- package/dist/constants/defaults.const.d.ts +32 -1
- package/dist/constants/defaults.const.d.ts.map +1 -1
- package/dist/constants/defaults.const.js +124 -20
- package/dist/constants/index.d.ts +1 -0
- package/dist/constants/index.d.ts.map +1 -1
- package/dist/constants/numbers.const.cjs +1 -1
- package/dist/constants/numbers.const.d.ts +13 -0
- package/dist/constants/numbers.const.d.ts.map +1 -1
- package/dist/constants/numbers.const.js +13 -3
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +3 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +32 -13
- package/dist/plugins/ai/aiPlugin.cjs +1 -1
- package/dist/plugins/ai/aiPlugin.d.ts.map +1 -1
- package/dist/plugins/ai/aiPlugin.js +40 -18
- package/dist/plugins/ai/demoProvider.cjs +1 -0
- package/dist/plugins/ai/demoProvider.d.ts +3 -0
- package/dist/plugins/ai/demoProvider.d.ts.map +1 -0
- package/dist/plugins/ai/demoProvider.js +130 -0
- package/dist/plugins/ai/index.cjs +1 -1
- package/dist/plugins/ai/index.d.ts +4 -1
- package/dist/plugins/ai/index.d.ts.map +1 -1
- package/dist/plugins/ai/index.js +15 -3
- package/dist/plugins/ai/stubs.cjs +1 -0
- package/dist/plugins/ai/stubs.d.ts +7 -0
- package/dist/plugins/ai/stubs.d.ts.map +1 -0
- package/dist/plugins/ai/stubs.js +23 -0
- package/dist/styles.css +515 -16
- package/dist/types/ai.types.d.ts +111 -2
- package/dist/types/ai.types.d.ts.map +1 -1
- package/dist/types/comments.types.d.ts +17 -0
- package/dist/types/comments.types.d.ts.map +1 -0
- package/dist/types/features.types.d.ts +5 -0
- package/dist/types/features.types.d.ts.map +1 -0
- package/dist/types/index.d.ts +5 -2
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/ink.types.d.ts +26 -1
- package/dist/types/ink.types.d.ts.map +1 -1
- package/dist/types/trackChanges.types.d.ts +12 -0
- package/dist/types/trackChanges.types.d.ts.map +1 -0
- package/dist/utils/blocks.utils.cjs +1 -0
- package/dist/utils/blocks.utils.d.ts +4 -0
- package/dist/utils/blocks.utils.d.ts.map +1 -0
- package/dist/utils/blocks.utils.js +41 -0
- package/dist/utils/comments.utils.cjs +1 -0
- package/dist/utils/comments.utils.d.ts +5 -0
- package/dist/utils/comments.utils.d.ts.map +1 -0
- package/dist/utils/comments.utils.js +32 -0
- package/dist/utils/history.utils.cjs +1 -0
- package/dist/utils/history.utils.d.ts +13 -0
- package/dist/utils/history.utils.d.ts.map +1 -0
- package/dist/utils/history.utils.js +29 -0
- package/dist/utils/id.utils.cjs +1 -0
- package/dist/utils/id.utils.d.ts +2 -0
- package/dist/utils/id.utils.d.ts.map +1 -0
- package/dist/utils/id.utils.js +4 -0
- package/dist/utils/index.d.ts +7 -0
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/slash.utils.cjs +1 -0
- package/dist/utils/slash.utils.d.ts +4 -0
- package/dist/utils/slash.utils.d.ts.map +1 -0
- package/dist/utils/slash.utils.js +13 -0
- package/dist/utils/table.utils.cjs +1 -0
- package/dist/utils/table.utils.d.ts +2 -0
- package/dist/utils/table.utils.d.ts.map +1 -0
- package/dist/utils/table.utils.js +13 -0
- package/dist/utils/trackChanges.utils.cjs +1 -0
- package/dist/utils/trackChanges.utils.d.ts +7 -0
- package/dist/utils/trackChanges.utils.d.ts.map +1 -0
- package/dist/utils/trackChanges.utils.js +34 -0
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"defaults.const.d.ts","sourceRoot":"","sources":["../../src/constants/defaults.const.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"defaults.const.d.ts","sourceRoot":"","sources":["../../src/constants/defaults.const.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,gBAAgB,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAChF,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAMlD,eAAO,MAAM,mBAAmB,EAAE,aAAa,EA0B9C,CAAC;AAEF,eAAO,MAAM,kBAAkB,EAAE,aAAa,EAO7C,CAAC;AAEF,eAAO,MAAM,kBAAkB,EAAE,aAAa,EAiB7C,CAAC;AAEF,eAAO,MAAM,mBAAmB,EAAE,cAAc,EAQ/C,CAAC;AAEF,eAAO,MAAM,iBAAiB,EAAE,MAAM,CACpC,MAAM,EACN;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,CA0BnD,CAAC;AAEF,eAAO,MAAM,kBAAkB,UAS9B,CAAC;AAEF,eAAO,MAAM,uBAAuB,oBAAoB,CAAC;AACzD,eAAO,MAAM,cAAc,eAAe,CAAC;AAC3C,eAAO,MAAM,iBAAiB,wBAAwB,CAAC;AACvD,eAAO,MAAM,iBAAiB,wBAAwB,CAAC;AACvD,eAAO,MAAM,iBAAiB,wBAAwB,CAAC;AACvD,eAAO,MAAM,gBAAgB,uBAAuB,CAAC;AACrD,eAAO,MAAM,uBAAuB,+BAA+B,CAAC;AACpE,eAAO,MAAM,gBAAgB,uBAAuB,CAAC;AACrD,eAAO,MAAM,eAAe,sBAAsB,CAAC;AACnD,eAAO,MAAM,cAAc,qBAAqB,CAAC;AACjD,eAAO,MAAM,sBAAsB,sBAAsB,CAAC;AAC1D,eAAO,MAAM,mBAAmB,kBAAkB,CAAC;AACnD,eAAO,MAAM,mBAAmB,kBAAkB,CAAC;AACnD,eAAO,MAAM,sBAAsB,qBAAqB,CAAC;AACzD,eAAO,MAAM,kBAAkB,QAAQ,CAAC;AACxC,eAAO,MAAM,mBAAmB,EAAG,SAAkB,CAAC;AACtD,eAAO,MAAM,oBAAoB,EAAE,iBASlC,CAAC;AACF,eAAO,MAAM,sBAAsB,IAAyB,CAAC;AAC7D,eAAO,MAAM,sBAAsB,IAAyB,CAAC;AAE7D,eAAO,MAAM,kBAAkB,EAAE,gBAAgB,EAqChD,CAAC;AAEF,eAAO,MAAM,uBAAuB,uIAW1B,CAAC;AAEX,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;IAK7B,CAAC"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
import { INK_DEFAULT_TABLE_ROWS as e, INK_DEFAULT_TABLE_COLS as t } from "./numbers.const.js";
|
|
2
|
+
const a = [
|
|
2
3
|
"headingDropdown",
|
|
3
4
|
"divider",
|
|
4
5
|
"bold",
|
|
@@ -14,16 +15,41 @@ const t = [
|
|
|
14
15
|
"divider",
|
|
15
16
|
"link",
|
|
16
17
|
"image",
|
|
18
|
+
"table",
|
|
19
|
+
"divider",
|
|
20
|
+
"undo",
|
|
21
|
+
"redo",
|
|
22
|
+
"divider",
|
|
23
|
+
"trackChanges",
|
|
24
|
+
"comments",
|
|
25
|
+
"ai",
|
|
17
26
|
"divider",
|
|
18
27
|
"clearFormat"
|
|
19
|
-
],
|
|
28
|
+
], l = [
|
|
20
29
|
"bold",
|
|
21
30
|
"italic",
|
|
22
31
|
"underline",
|
|
23
32
|
"divider",
|
|
24
33
|
"bulletList",
|
|
25
34
|
"orderedList"
|
|
26
|
-
],
|
|
35
|
+
], n = [
|
|
36
|
+
"headingDropdown",
|
|
37
|
+
"divider",
|
|
38
|
+
"bold",
|
|
39
|
+
"italic",
|
|
40
|
+
"underline",
|
|
41
|
+
"divider",
|
|
42
|
+
"bulletList",
|
|
43
|
+
"orderedList",
|
|
44
|
+
"table",
|
|
45
|
+
"divider",
|
|
46
|
+
"trackChanges",
|
|
47
|
+
"comments",
|
|
48
|
+
"ai",
|
|
49
|
+
"divider",
|
|
50
|
+
"undo",
|
|
51
|
+
"redo"
|
|
52
|
+
], d = [
|
|
27
53
|
{ value: "p", label: "Paragraph" },
|
|
28
54
|
{ value: "h1", label: "Heading 1" },
|
|
29
55
|
{ value: "h2", label: "Heading 2" },
|
|
@@ -31,7 +57,7 @@ const t = [
|
|
|
31
57
|
{ value: "h4", label: "Heading 4" },
|
|
32
58
|
{ value: "h5", label: "Heading 5" },
|
|
33
59
|
{ value: "h6", label: "Heading 6" }
|
|
34
|
-
],
|
|
60
|
+
], o = {
|
|
35
61
|
bold: { title: "Bold (Ctrl+B)", command: "bold" },
|
|
36
62
|
italic: { title: "Italic (Ctrl+I)", command: "italic" },
|
|
37
63
|
underline: { title: "Underline (Ctrl+U)", command: "underline" },
|
|
@@ -53,29 +79,107 @@ const t = [
|
|
|
53
79
|
alignJustify: { title: "Justify", command: "justifyFull" },
|
|
54
80
|
indent: { title: "Indent", command: "indent" },
|
|
55
81
|
outdent: { title: "Outdent", command: "outdent" },
|
|
56
|
-
clearFormat: { title: "Clear formatting", command: "removeFormat" }
|
|
57
|
-
|
|
82
|
+
clearFormat: { title: "Clear formatting", command: "removeFormat" },
|
|
83
|
+
undo: { title: "Undo", command: "undo" },
|
|
84
|
+
redo: { title: "Redo", command: "redo" }
|
|
85
|
+
}, r = [
|
|
58
86
|
"#111827",
|
|
59
87
|
"#dc2626",
|
|
60
88
|
"#ea580c",
|
|
61
89
|
"#ca8a04",
|
|
62
90
|
"#16a34a",
|
|
63
91
|
"#2563eb",
|
|
64
|
-
"#
|
|
92
|
+
"#0f766e",
|
|
65
93
|
"#db2777"
|
|
66
|
-
],
|
|
94
|
+
], s = "Start typing...", c = "Ink-Editor", m = "Ink-Editor__toolbar", _ = "Ink-Editor__content", u = "Ink-Editor__divider", I = "Ink-Editor__button", L = "Ink-Editor__button--active", g = "Ink-Editor__footer", h = "Ink-Editor__shell", b = "Ink-Editor__body", A = "Ink-tc-insert", N = "Ink-tc-delete", S = "Ink-comment-mark", E = "You", T = "classic", k = {
|
|
95
|
+
table: !0,
|
|
96
|
+
trackChanges: !0,
|
|
97
|
+
comments: !0,
|
|
98
|
+
ai: !0,
|
|
99
|
+
blocks: !0,
|
|
100
|
+
slash: !0,
|
|
101
|
+
history: !0,
|
|
102
|
+
typoAutoFix: !0
|
|
103
|
+
}, C = e, O = t, K = [
|
|
104
|
+
{
|
|
105
|
+
id: "heading1",
|
|
106
|
+
label: "Heading 1",
|
|
107
|
+
keywords: ["h1", "title", "heading"],
|
|
108
|
+
insert: "heading1"
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
id: "heading2",
|
|
112
|
+
label: "Heading 2",
|
|
113
|
+
keywords: ["h2", "subtitle", "heading"],
|
|
114
|
+
insert: "heading2"
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
id: "bullet",
|
|
118
|
+
label: "Bullet list",
|
|
119
|
+
keywords: ["ul", "list", "bullet"],
|
|
120
|
+
insert: "bulletList"
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
id: "ordered",
|
|
124
|
+
label: "Numbered list",
|
|
125
|
+
keywords: ["ol", "list", "numbered"],
|
|
126
|
+
insert: "orderedList"
|
|
127
|
+
},
|
|
128
|
+
{
|
|
129
|
+
id: "table",
|
|
130
|
+
label: "Table",
|
|
131
|
+
keywords: ["table", "grid"],
|
|
132
|
+
insert: "table"
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
id: "ai",
|
|
136
|
+
label: "Ask AI",
|
|
137
|
+
keywords: ["ai", "assistant", "chat"],
|
|
138
|
+
insert: "ai"
|
|
139
|
+
}
|
|
140
|
+
], v = [
|
|
141
|
+
"English",
|
|
142
|
+
"Spanish",
|
|
143
|
+
"French",
|
|
144
|
+
"German",
|
|
145
|
+
"Chinese (Simplified)",
|
|
146
|
+
"Japanese",
|
|
147
|
+
"Russian",
|
|
148
|
+
"Portuguese",
|
|
149
|
+
"Korean",
|
|
150
|
+
"Italian"
|
|
151
|
+
], B = [
|
|
152
|
+
{ id: "rewrite", label: "Rewrite", capability: "rewrite" },
|
|
153
|
+
{ id: "summarize", label: "Summarize", capability: "summarize" },
|
|
154
|
+
{ id: "expand", label: "Expand", capability: "expand" },
|
|
155
|
+
{ id: "tone", label: "Adjust tone", capability: "tone" }
|
|
156
|
+
];
|
|
67
157
|
export {
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
158
|
+
o as INK_BUTTON_CONFIG,
|
|
159
|
+
b as INK_CLASS_BODY,
|
|
160
|
+
I as INK_CLASS_BUTTON,
|
|
161
|
+
L as INK_CLASS_BUTTON_ACTIVE,
|
|
162
|
+
S as INK_CLASS_COMMENT_MARK,
|
|
163
|
+
_ as INK_CLASS_CONTENT,
|
|
164
|
+
u as INK_CLASS_DIVIDER,
|
|
73
165
|
g as INK_CLASS_FOOTER,
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
166
|
+
c as INK_CLASS_ROOT,
|
|
167
|
+
h as INK_CLASS_SHELL,
|
|
168
|
+
N as INK_CLASS_TC_DELETE,
|
|
169
|
+
A as INK_CLASS_TC_INSERT,
|
|
170
|
+
m as INK_CLASS_TOOLBAR,
|
|
171
|
+
n as INK_COLLAB_TOOLBAR,
|
|
172
|
+
r as INK_COLOR_SWATCHES,
|
|
173
|
+
E as INK_DEFAULT_AUTHOR,
|
|
174
|
+
k as INK_DEFAULT_FEATURES,
|
|
175
|
+
a as INK_DEFAULT_TOOLBAR,
|
|
176
|
+
T as INK_DEFAULT_VARIANT,
|
|
177
|
+
d as INK_HEADING_OPTIONS,
|
|
178
|
+
s as INK_PLACEHOLDER_DEFAULT,
|
|
179
|
+
B as INK_QUICK_ACTIONS,
|
|
180
|
+
l as INK_SIMPLE_TOOLBAR,
|
|
181
|
+
K as INK_SLASH_COMMANDS,
|
|
182
|
+
O as INK_TABLE_DEFAULT_COLS,
|
|
183
|
+
C as INK_TABLE_DEFAULT_ROWS,
|
|
184
|
+
v as INK_TRANSLATE_LANGUAGES
|
|
81
185
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/constants/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,cAAc,eAAe,CAAC;AAC9B,cAAc,kBAAkB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/constants/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,cAAc,eAAe,CAAC;AAC9B,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const _=150,I="#111827",
|
|
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;
|
|
@@ -2,4 +2,17 @@ export declare const INK_MIN_HEIGHT = 150;
|
|
|
2
2
|
export declare const INK_DEFAULT_TEXT_COLOR = "#111827";
|
|
3
3
|
export declare const INK_DEFAULT_HIGHLIGHT_COLOR = "#fef08a";
|
|
4
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;
|
|
5
18
|
//# sourceMappingURL=numbers.const.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
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"}
|
|
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,6 +1,16 @@
|
|
|
1
|
-
const _ = 150, I = "#111827",
|
|
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
2
|
export {
|
|
3
|
-
|
|
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,
|
|
4
7
|
I as INK_DEFAULT_TEXT_COLOR,
|
|
5
|
-
|
|
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
|
|
6
16
|
};
|
package/dist/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./components/InkEditor/InkEditor.cjs"),A=require("./utils/cn.utils.cjs"),r=require("./utils/typo.utils.cjs"),i=require("./utils/id.utils.cjs"),n=require("./utils/table.utils.cjs"),O=require("./utils/trackChanges.utils.cjs"),N=require("./utils/comments.utils.cjs"),o=require("./utils/history.utils.cjs"),T=require("./constants/typos.const.cjs"),_=require("./constants/defaults.const.cjs"),e=require("./constants/aiModels.const.cjs"),I=require("./plugins/ai/aiPlugin.cjs");exports.InkEditor=t.InkEditor;exports.cn=A.cn;exports.applyTypoAutoFix=r.applyTypoAutoFix;exports.createInkId=i.createInkId;exports.buildTableHtml=n.buildTableHtml;exports.createTrackChange=O.createTrackChange;exports.createCommentThread=N.createCommentThread;exports.InkHistoryStack=o.InkHistoryStack;exports.TYPO_DICTIONARY=T.TYPO_DICTIONARY;exports.INK_COLLAB_TOOLBAR=_.INK_COLLAB_TOOLBAR;exports.INK_DEFAULT_FEATURES=_.INK_DEFAULT_FEATURES;exports.INK_DEFAULT_TOOLBAR=_.INK_DEFAULT_TOOLBAR;exports.INK_HEADING_OPTIONS=_.INK_HEADING_OPTIONS;exports.INK_QUICK_ACTIONS=_.INK_QUICK_ACTIONS;exports.INK_SIMPLE_TOOLBAR=_.INK_SIMPLE_TOOLBAR;exports.INK_SLASH_COMMANDS=_.INK_SLASH_COMMANDS;exports.INK_TRANSLATE_LANGUAGES=_.INK_TRANSLATE_LANGUAGES;exports.INK_AI_DEMO_MODEL_ID=e.INK_AI_DEMO_MODEL_ID;exports.INK_AI_DEMO_PROVIDER_ID=e.INK_AI_DEMO_PROVIDER_ID;exports.INK_AI_MODEL_CATALOG=e.INK_AI_MODEL_CATALOG;exports.createInkAiPlugin=I.createInkAiPlugin;exports.inkAi=I.inkAi;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { InkEditor } from './components';
|
|
2
|
-
export { applyTypoAutoFix, cn } from './utils';
|
|
2
|
+
export { applyTypoAutoFix, cn, buildTableHtml, createInkId, createCommentThread, createTrackChange, InkHistoryStack, } from './utils';
|
|
3
3
|
export { inkAi, createInkAiPlugin } from './plugins/ai';
|
|
4
|
-
export { INK_DEFAULT_TOOLBAR, INK_SIMPLE_TOOLBAR, INK_HEADING_OPTIONS, TYPO_DICTIONARY, } from './constants';
|
|
5
|
-
export type { InkEditorProps, ToolbarOption, TypoFixResult, InkAiCapability, InkAiRequest, InkAiResponse, InkAiAgent, InkAiPlugin, } from './types';
|
|
4
|
+
export { INK_DEFAULT_TOOLBAR, INK_SIMPLE_TOOLBAR, INK_COLLAB_TOOLBAR, INK_HEADING_OPTIONS, INK_SLASH_COMMANDS, INK_AI_MODEL_CATALOG, INK_AI_DEMO_PROVIDER_ID, INK_AI_DEMO_MODEL_ID, INK_TRANSLATE_LANGUAGES, INK_QUICK_ACTIONS, INK_DEFAULT_FEATURES, TYPO_DICTIONARY, } from './constants';
|
|
5
|
+
export type { InkEditorProps, ToolbarOption, TypoFixResult, SlashCommandItem, InkAiCapability, InkAiRequest, InkAiResponse, InkAiAgent, InkAiPlugin, InkAiChatTurn, InkAiDiffSuggestion, InkAiReviewSuggestion, InkAiContextFile, InkAiDocumentSnapshot, InkAiModelCatalogEntry, InkAiProvider, InkAiConfig, InkAiUiTheme, InkCommentReply, InkCommentThread, InkTrackChange, InkTrackChangeType, InkFeaturesConfig, InkFeatureName, InkEditorVariant, InkAiPlacement, } from './types';
|
|
6
6
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EACL,gBAAgB,EAChB,EAAE,EACF,cAAc,EACd,WAAW,EACX,mBAAmB,EACnB,iBAAiB,EACjB,eAAe,GAChB,MAAM,SAAS,CAAC;AACjB,OAAO,EAAE,KAAK,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AACxD,OAAO,EACL,mBAAmB,EACnB,kBAAkB,EAClB,kBAAkB,EAClB,mBAAmB,EACnB,kBAAkB,EAClB,oBAAoB,EACpB,uBAAuB,EACvB,oBAAoB,EACpB,uBAAuB,EACvB,iBAAiB,EACjB,oBAAoB,EACpB,eAAe,GAChB,MAAM,aAAa,CAAC;AACrB,YAAY,EACV,cAAc,EACd,aAAa,EACb,aAAa,EACb,gBAAgB,EAChB,eAAe,EACf,YAAY,EACZ,aAAa,EACb,UAAU,EACV,WAAW,EACX,aAAa,EACb,mBAAmB,EACnB,qBAAqB,EACrB,gBAAgB,EAChB,qBAAqB,EACrB,sBAAsB,EACtB,aAAa,EACb,WAAW,EACX,YAAY,EACZ,eAAe,EACf,gBAAgB,EAChB,cAAc,EACd,kBAAkB,EAClB,iBAAiB,EACjB,cAAc,EACd,gBAAgB,EAChB,cAAc,GACf,MAAM,SAAS,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,17 +1,36 @@
|
|
|
1
1
|
import { InkEditor as I } from "./components/InkEditor/InkEditor.js";
|
|
2
|
-
import { cn as
|
|
3
|
-
import { applyTypoAutoFix as
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
2
|
+
import { cn as e } from "./utils/cn.utils.js";
|
|
3
|
+
import { applyTypoAutoFix as t } from "./utils/typo.utils.js";
|
|
4
|
+
import { createInkId as N } from "./utils/id.utils.js";
|
|
5
|
+
import { buildTableHtml as m } from "./utils/table.utils.js";
|
|
6
|
+
import { createTrackChange as E } from "./utils/trackChanges.utils.js";
|
|
7
|
+
import { createCommentThread as x } from "./utils/comments.utils.js";
|
|
8
|
+
import { InkHistoryStack as D } from "./utils/history.utils.js";
|
|
9
|
+
import { TYPO_DICTIONARY as a } from "./constants/typos.const.js";
|
|
10
|
+
import { INK_COLLAB_TOOLBAR as n, INK_DEFAULT_FEATURES as i, INK_DEFAULT_TOOLBAR as C, INK_HEADING_OPTIONS as R, INK_QUICK_ACTIONS as c, INK_SIMPLE_TOOLBAR as k, INK_SLASH_COMMANDS as M, INK_TRANSLATE_LANGUAGES as l } from "./constants/defaults.const.js";
|
|
11
|
+
import { INK_AI_DEMO_MODEL_ID as U, INK_AI_DEMO_PROVIDER_ID as d, INK_AI_MODEL_CATALOG as B } from "./constants/aiModels.const.js";
|
|
12
|
+
import { createInkAiPlugin as G, inkAi as H } from "./plugins/ai/aiPlugin.js";
|
|
7
13
|
export {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
14
|
+
U as INK_AI_DEMO_MODEL_ID,
|
|
15
|
+
d as INK_AI_DEMO_PROVIDER_ID,
|
|
16
|
+
B as INK_AI_MODEL_CATALOG,
|
|
17
|
+
n as INK_COLLAB_TOOLBAR,
|
|
18
|
+
i as INK_DEFAULT_FEATURES,
|
|
19
|
+
C as INK_DEFAULT_TOOLBAR,
|
|
20
|
+
R as INK_HEADING_OPTIONS,
|
|
21
|
+
c as INK_QUICK_ACTIONS,
|
|
22
|
+
k as INK_SIMPLE_TOOLBAR,
|
|
23
|
+
M as INK_SLASH_COMMANDS,
|
|
24
|
+
l as INK_TRANSLATE_LANGUAGES,
|
|
11
25
|
I as InkEditor,
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
t as
|
|
15
|
-
|
|
16
|
-
|
|
26
|
+
D as InkHistoryStack,
|
|
27
|
+
a as TYPO_DICTIONARY,
|
|
28
|
+
t as applyTypoAutoFix,
|
|
29
|
+
m as buildTableHtml,
|
|
30
|
+
e as cn,
|
|
31
|
+
x as createCommentThread,
|
|
32
|
+
G as createInkAiPlugin,
|
|
33
|
+
N as createInkId,
|
|
34
|
+
E as createTrackChange,
|
|
35
|
+
H as inkAi
|
|
17
36
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("./demoProvider.cjs"),n=new Map,e=new Map,o=()=>{if(!e.has("demo")){const r=u.createDemoAiProvider();e.set(r.id,r)}},s=()=>(o(),{register:r=>{n.set(r.id,r)},unregister:r=>{n.delete(r)},getAgent:r=>n.get(r),listAgents:()=>Array.from(n.values()),run:async(r,i)=>{const t=n.get(r);if(!t)throw new Error(`Ink AI agent "${r}" is not registered.`);if(!t.capabilities.includes(i.capability))throw new Error(`Ink AI agent "${r}" does not support "${i.capability}".`);return t.run(i)},registerProvider:r=>{e.set(r.id,r)},unregisterProvider:r=>{r!=="demo"&&e.delete(r)},getProvider:r=>(o(),e.get(r)),listProviders:()=>(o(),Array.from(e.values())),runProvider:async(r,i)=>{o();const t=e.get(r);if(!t)throw new Error(`Ink AI provider "${r}" is not registered. Bring your own LLM via inkAi.registerProvider.`);return t.run(i)},exportHistory:r=>JSON.stringify(r,null,2)}),a=s();exports.createInkAiPlugin=s;exports.inkAi=a;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"aiPlugin.d.ts","sourceRoot":"","sources":["../../../src/plugins/ai/aiPlugin.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"aiPlugin.d.ts","sourceRoot":"","sources":["../../../src/plugins/ai/aiPlugin.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAA6B,WAAW,EAA8C,MAAM,aAAa,CAAC;AAatH,eAAO,MAAM,iBAAiB,QAAO,WA+CpC,CAAC;AAEF,eAAO,MAAM,KAAK,aAAsB,CAAC"}
|
|
@@ -1,22 +1,44 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import { createDemoAiProvider as s } from "./demoProvider.js";
|
|
2
|
+
const n = /* @__PURE__ */ new Map(), e = /* @__PURE__ */ new Map(), o = () => {
|
|
3
|
+
if (!e.has("demo")) {
|
|
4
|
+
const r = s();
|
|
5
|
+
e.set(r.id, r);
|
|
6
|
+
}
|
|
7
|
+
}, a = () => (o(), {
|
|
8
|
+
register: (r) => {
|
|
9
|
+
n.set(r.id, r);
|
|
4
10
|
},
|
|
5
|
-
unregister: (
|
|
6
|
-
|
|
11
|
+
unregister: (r) => {
|
|
12
|
+
n.delete(r);
|
|
7
13
|
},
|
|
8
|
-
getAgent: (
|
|
9
|
-
listAgents: () => Array.from(
|
|
10
|
-
run: async (
|
|
11
|
-
const
|
|
12
|
-
if (!
|
|
13
|
-
throw new Error(`Ink AI agent "${
|
|
14
|
-
if (!
|
|
15
|
-
throw new Error(`Ink AI agent "${
|
|
16
|
-
return
|
|
17
|
-
}
|
|
18
|
-
|
|
14
|
+
getAgent: (r) => n.get(r),
|
|
15
|
+
listAgents: () => Array.from(n.values()),
|
|
16
|
+
run: async (r, i) => {
|
|
17
|
+
const t = n.get(r);
|
|
18
|
+
if (!t)
|
|
19
|
+
throw new Error(`Ink AI agent "${r}" is not registered.`);
|
|
20
|
+
if (!t.capabilities.includes(i.capability))
|
|
21
|
+
throw new Error(`Ink AI agent "${r}" does not support "${i.capability}".`);
|
|
22
|
+
return t.run(i);
|
|
23
|
+
},
|
|
24
|
+
registerProvider: (r) => {
|
|
25
|
+
e.set(r.id, r);
|
|
26
|
+
},
|
|
27
|
+
unregisterProvider: (r) => {
|
|
28
|
+
r !== "demo" && e.delete(r);
|
|
29
|
+
},
|
|
30
|
+
getProvider: (r) => (o(), e.get(r)),
|
|
31
|
+
listProviders: () => (o(), Array.from(e.values())),
|
|
32
|
+
runProvider: async (r, i) => {
|
|
33
|
+
o();
|
|
34
|
+
const t = e.get(r);
|
|
35
|
+
if (!t)
|
|
36
|
+
throw new Error(`Ink AI provider "${r}" is not registered. Bring your own LLM via inkAi.registerProvider.`);
|
|
37
|
+
return t.run(i);
|
|
38
|
+
},
|
|
39
|
+
exportHistory: (r) => JSON.stringify(r, null, 2)
|
|
40
|
+
}), u = a();
|
|
19
41
|
export {
|
|
20
|
-
|
|
21
|
-
|
|
42
|
+
a as createInkAiPlugin,
|
|
43
|
+
u as inkAi
|
|
22
44
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("../../constants/numbers.const.cjs"),i=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(),o=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:i.INK_AI_DEMO_PROVIDER_ID,model:i.INK_AI_DEMO_MODEL_ID}}}case"summarize":{const e=o(`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=o(`${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=o(`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=o(`[${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=o(`Rewritten (demo): ${s}`);return{html:e,diff:{id:r.createInkId("diff"),originalHtml:n,suggestedHtml:e,summary:"Demo rewrite suggestion"}}}}},I=()=>({id:i.INK_AI_DEMO_PROVIDER_ID,name:"Ink Demo Provider",models:[{id:i.INK_AI_DEMO_MODEL_ID,provider:"demo",label:"Ink Demo (local)",family:"Demo"}],run:p});exports.createDemoAiProvider=I;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"demoProvider.d.ts","sourceRoot":"","sources":["../../../src/plugins/ai/demoProvider.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAA+B,MAAM,aAAa,CAAC;AAiI9E,eAAO,MAAM,oBAAoB,QAAO,aAYtC,CAAC"}
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
import { INK_DEMO_AI_DELAY_MS as u } from "../../constants/numbers.const.js";
|
|
2
|
+
import { INK_AI_DEMO_MODEL_ID as d, INK_AI_DEMO_PROVIDER_ID as g } from "../../constants/aiModels.const.js";
|
|
3
|
+
import { createInkId as i } from "../../utils/id.utils.js";
|
|
4
|
+
const p = (t) => new Promise((o) => {
|
|
5
|
+
window.setTimeout(o, t);
|
|
6
|
+
}), a = (t) => t.replace(/<[^>]+>/g, " ").replace(/\s+/g, " ").trim(), n = (t) => `<p>${t}</p>`, f = async (t) => {
|
|
7
|
+
var c, l;
|
|
8
|
+
await p(u);
|
|
9
|
+
const o = t.selectionHtml || t.html || "", s = a(o) || "your content", m = ((c = t.prompt) == null ? void 0 : c.trim()) || "";
|
|
10
|
+
switch (t.capability) {
|
|
11
|
+
case "chat": {
|
|
12
|
+
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)}…`;
|
|
13
|
+
return {
|
|
14
|
+
text: e,
|
|
15
|
+
turns: [
|
|
16
|
+
{
|
|
17
|
+
id: i("turn"),
|
|
18
|
+
role: "assistant",
|
|
19
|
+
content: e,
|
|
20
|
+
timestamp: Date.now(),
|
|
21
|
+
capability: "chat"
|
|
22
|
+
}
|
|
23
|
+
],
|
|
24
|
+
meta: { provider: g, model: d }
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
case "summarize": {
|
|
28
|
+
const e = n(`Summary (demo): ${s.slice(0, 160)}${s.length > 160 ? "…" : ""}`);
|
|
29
|
+
return {
|
|
30
|
+
html: e,
|
|
31
|
+
text: a(e),
|
|
32
|
+
diff: {
|
|
33
|
+
id: i("diff"),
|
|
34
|
+
originalHtml: o,
|
|
35
|
+
suggestedHtml: e,
|
|
36
|
+
summary: "Demo summary of the selection"
|
|
37
|
+
}
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
case "expand": {
|
|
41
|
+
const e = n(
|
|
42
|
+
`${s} Additionally, this demo expansion adds clarifying context, examples, and a short closing sentence so you can preview apply/reject flows.`
|
|
43
|
+
);
|
|
44
|
+
return {
|
|
45
|
+
html: e,
|
|
46
|
+
diff: {
|
|
47
|
+
id: i("diff"),
|
|
48
|
+
originalHtml: o,
|
|
49
|
+
suggestedHtml: e,
|
|
50
|
+
summary: "Demo expansion"
|
|
51
|
+
}
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
case "tone": {
|
|
55
|
+
const e = n(`In a clearer, more professional tone: ${s}`);
|
|
56
|
+
return {
|
|
57
|
+
html: e,
|
|
58
|
+
diff: {
|
|
59
|
+
id: i("diff"),
|
|
60
|
+
originalHtml: o,
|
|
61
|
+
suggestedHtml: e,
|
|
62
|
+
summary: "Demo tone adjustment"
|
|
63
|
+
}
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
case "translate": {
|
|
67
|
+
const e = ((l = t.options) == null ? void 0 : l.language) || "Spanish", r = n(`[${e} demo] ${s}`);
|
|
68
|
+
return {
|
|
69
|
+
html: r,
|
|
70
|
+
text: a(r),
|
|
71
|
+
diff: {
|
|
72
|
+
id: i("diff"),
|
|
73
|
+
originalHtml: o,
|
|
74
|
+
suggestedHtml: r,
|
|
75
|
+
summary: `Demo translation to ${e}`
|
|
76
|
+
}
|
|
77
|
+
};
|
|
78
|
+
}
|
|
79
|
+
case "review":
|
|
80
|
+
return {
|
|
81
|
+
text: "Demo review complete",
|
|
82
|
+
reviewSuggestions: [
|
|
83
|
+
{
|
|
84
|
+
id: i("rev"),
|
|
85
|
+
message: "Consider shortening long sentences for clarity.",
|
|
86
|
+
severity: "info",
|
|
87
|
+
originalText: s.slice(0, 40),
|
|
88
|
+
suggestedText: s.slice(0, 40)
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
id: i("rev"),
|
|
92
|
+
message: "Possible passive voice — prefer active constructions.",
|
|
93
|
+
severity: "warning",
|
|
94
|
+
originalText: "was processed",
|
|
95
|
+
suggestedText: "the team processed"
|
|
96
|
+
}
|
|
97
|
+
]
|
|
98
|
+
};
|
|
99
|
+
case "suggestDiff":
|
|
100
|
+
case "quickAction":
|
|
101
|
+
case "rewrite":
|
|
102
|
+
default: {
|
|
103
|
+
const e = n(`Rewritten (demo): ${s}`);
|
|
104
|
+
return {
|
|
105
|
+
html: e,
|
|
106
|
+
diff: {
|
|
107
|
+
id: i("diff"),
|
|
108
|
+
originalHtml: o,
|
|
109
|
+
suggestedHtml: e,
|
|
110
|
+
summary: "Demo rewrite suggestion"
|
|
111
|
+
}
|
|
112
|
+
};
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
}, h = () => ({
|
|
116
|
+
id: g,
|
|
117
|
+
name: "Ink Demo Provider",
|
|
118
|
+
models: [
|
|
119
|
+
{
|
|
120
|
+
id: d,
|
|
121
|
+
provider: "demo",
|
|
122
|
+
label: "Ink Demo (local)",
|
|
123
|
+
family: "Demo"
|
|
124
|
+
}
|
|
125
|
+
],
|
|
126
|
+
run: f
|
|
127
|
+
});
|
|
128
|
+
export {
|
|
129
|
+
h as createDemoAiProvider
|
|
130
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./aiPlugin.cjs"),t=require("./demoProvider.cjs"),e=require("./stubs.cjs"),o=require("../../constants/aiModels.const.cjs");exports.createInkAiPlugin=r.createInkAiPlugin;exports.inkAi=r.inkAi;exports.createDemoAiProvider=t.createDemoAiProvider;exports.createNoopCostControl=e.createNoopCostControl;exports.createNoopExternalKnowledge=e.createNoopExternalKnowledge;exports.createNoopModeration=e.createNoopModeration;exports.createNoopQualityEval=e.createNoopQualityEval;exports.createOpenPermissions=e.createOpenPermissions;exports.INK_AI_DEMO_MODEL_ID=o.INK_AI_DEMO_MODEL_ID;exports.INK_AI_DEMO_PROVIDER_ID=o.INK_AI_DEMO_PROVIDER_ID;exports.INK_AI_MODEL_CATALOG=o.INK_AI_MODEL_CATALOG;
|
|
@@ -1,3 +1,6 @@
|
|
|
1
1
|
export { createInkAiPlugin, inkAi } from './aiPlugin';
|
|
2
|
-
export
|
|
2
|
+
export { createDemoAiProvider } from './demoProvider';
|
|
3
|
+
export { createNoopCostControl, createNoopModeration, createOpenPermissions, createNoopExternalKnowledge, createNoopQualityEval, } from './stubs';
|
|
4
|
+
export { INK_AI_MODEL_CATALOG, INK_AI_DEMO_PROVIDER_ID, INK_AI_DEMO_MODEL_ID } from '../../constants';
|
|
5
|
+
export type { InkAiCapability, InkAiRequest, InkAiResponse, InkAiAgent, InkAiPlugin, InkAiChatTurn, InkAiDiffSuggestion, InkAiReviewSuggestion, InkAiContextFile, InkAiDocumentSnapshot, InkAiModelCatalogEntry, InkAiProvider, InkAiCostControlHooks, InkAiModerationHook, InkAiPermissionsHook, InkAiExternalKnowledgeHook, InkAiQualityEvalHook, InkAiFallbackChain, InkAiUiTheme, InkAiConfig, } from '../../types';
|
|
3
6
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/plugins/ai/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AACtD,YAAY,EACV,eAAe,EACf,YAAY,EACZ,aAAa,EACb,UAAU,EACV,WAAW,GACZ,MAAM,aAAa,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/plugins/ai/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AACtD,OAAO,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AACtD,OAAO,EACL,qBAAqB,EACrB,oBAAoB,EACpB,qBAAqB,EACrB,2BAA2B,EAC3B,qBAAqB,GACtB,MAAM,SAAS,CAAC;AACjB,OAAO,EAAE,oBAAoB,EAAE,uBAAuB,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;AACtG,YAAY,EACV,eAAe,EACf,YAAY,EACZ,aAAa,EACb,UAAU,EACV,WAAW,EACX,aAAa,EACb,mBAAmB,EACnB,qBAAqB,EACrB,gBAAgB,EAChB,qBAAqB,EACrB,sBAAsB,EACtB,aAAa,EACb,qBAAqB,EACrB,mBAAmB,EACnB,oBAAoB,EACpB,0BAA0B,EAC1B,oBAAoB,EACpB,kBAAkB,EAClB,YAAY,EACZ,WAAW,GACZ,MAAM,aAAa,CAAC"}
|
package/dist/plugins/ai/index.js
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
|
-
import { createInkAiPlugin as
|
|
1
|
+
import { createInkAiPlugin as r, inkAi as t } from "./aiPlugin.js";
|
|
2
|
+
import { createDemoAiProvider as _ } from "./demoProvider.js";
|
|
3
|
+
import { createNoopCostControl as I, createNoopExternalKnowledge as n, createNoopModeration as p, createNoopQualityEval as A, createOpenPermissions as D } from "./stubs.js";
|
|
4
|
+
import { INK_AI_DEMO_MODEL_ID as E, INK_AI_DEMO_PROVIDER_ID as N, INK_AI_MODEL_CATALOG as O } from "../../constants/aiModels.const.js";
|
|
2
5
|
export {
|
|
3
|
-
|
|
4
|
-
|
|
6
|
+
E as INK_AI_DEMO_MODEL_ID,
|
|
7
|
+
N as INK_AI_DEMO_PROVIDER_ID,
|
|
8
|
+
O as INK_AI_MODEL_CATALOG,
|
|
9
|
+
_ as createDemoAiProvider,
|
|
10
|
+
r as createInkAiPlugin,
|
|
11
|
+
I as createNoopCostControl,
|
|
12
|
+
n as createNoopExternalKnowledge,
|
|
13
|
+
p as createNoopModeration,
|
|
14
|
+
A as createNoopQualityEval,
|
|
15
|
+
D as createOpenPermissions,
|
|
16
|
+
t as inkAi
|
|
5
17
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=()=>({cacheGet:async()=>{},cacheSet:async()=>{},rateLimitCheck:async()=>!0,preferCheaperModel:(n,e)=>e}),t=()=>({screen:async()=>({allowed:!0})}),a=()=>({canUse:()=>!0}),r=()=>({retrieve:async()=>[]}),c=()=>({evaluate:async()=>({score:1,notes:"MVP stub — no remote eval suite"})});exports.createNoopCostControl=o;exports.createNoopExternalKnowledge=r;exports.createNoopModeration=t;exports.createNoopQualityEval=c;exports.createOpenPermissions=a;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { InkAiCostControlHooks, InkAiExternalKnowledgeHook, InkAiModerationHook, InkAiPermissionsHook, InkAiQualityEvalHook } from '../../types';
|
|
2
|
+
export declare const createNoopCostControl: () => InkAiCostControlHooks;
|
|
3
|
+
export declare const createNoopModeration: () => InkAiModerationHook;
|
|
4
|
+
export declare const createOpenPermissions: () => InkAiPermissionsHook;
|
|
5
|
+
export declare const createNoopExternalKnowledge: () => InkAiExternalKnowledgeHook;
|
|
6
|
+
export declare const createNoopQualityEval: () => InkAiQualityEvalHook;
|
|
7
|
+
//# sourceMappingURL=stubs.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stubs.d.ts","sourceRoot":"","sources":["../../../src/plugins/ai/stubs.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,qBAAqB,EACrB,0BAA0B,EAC1B,mBAAmB,EACnB,oBAAoB,EACpB,oBAAoB,EACrB,MAAM,aAAa,CAAC;AAErB,eAAO,MAAM,qBAAqB,QAAO,qBAKvC,CAAC;AAEH,eAAO,MAAM,oBAAoB,QAAO,mBAEtC,CAAC;AAEH,eAAO,MAAM,qBAAqB,QAAO,oBAEvC,CAAC;AAEH,eAAO,MAAM,2BAA2B,QAAO,0BAE7C,CAAC;AAEH,eAAO,MAAM,qBAAqB,QAAO,oBAEvC,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
const o = () => ({
|
|
2
|
+
cacheGet: async () => {
|
|
3
|
+
},
|
|
4
|
+
cacheSet: async () => {
|
|
5
|
+
},
|
|
6
|
+
rateLimitCheck: async () => !0,
|
|
7
|
+
preferCheaperModel: (t, e) => e
|
|
8
|
+
}), a = () => ({
|
|
9
|
+
screen: async () => ({ allowed: !0 })
|
|
10
|
+
}), c = () => ({
|
|
11
|
+
canUse: () => !0
|
|
12
|
+
}), r = () => ({
|
|
13
|
+
retrieve: async () => []
|
|
14
|
+
}), n = () => ({
|
|
15
|
+
evaluate: async () => ({ score: 1, notes: "MVP stub — no remote eval suite" })
|
|
16
|
+
});
|
|
17
|
+
export {
|
|
18
|
+
o as createNoopCostControl,
|
|
19
|
+
r as createNoopExternalKnowledge,
|
|
20
|
+
a as createNoopModeration,
|
|
21
|
+
n as createNoopQualityEval,
|
|
22
|
+
c as createOpenPermissions
|
|
23
|
+
};
|