@aleph-alpha/chat-kit 6.2.0 → 6.3.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/dist/{CkHistory.vue_vue_type_script_setup_true_lang-DPCpIxWc.js → CkHistory.vue_vue_type_script_setup_true_lang-gV-lp0ZB.js} +345 -164
- package/dist/chat-kit.css +111 -28
- package/dist/code-palette-DAJUTnR-.js +21598 -0
- package/dist/components/base/CkCodeEditor/CkCodeEditor.stories.d.ts +43 -0
- package/dist/components/base/CkCodeEditor/CkCodeEditor.stories.d.ts.map +1 -0
- package/dist/components/base/CkCodeEditor/CkCodeEditor.vue.d.ts +39 -0
- package/dist/components/base/CkCodeEditor/CkCodeEditor.vue.d.ts.map +1 -0
- package/dist/components/base/CkCodeEditor/createCodeMirror.d.ts +44 -0
- package/dist/components/base/CkCodeEditor/createCodeMirror.d.ts.map +1 -0
- package/dist/components/base/CkCodeEditor/index.d.ts +3 -0
- package/dist/components/base/CkCodeEditor/index.d.ts.map +1 -0
- package/dist/components/base/CkCodeEditor/types.d.ts +129 -0
- package/dist/components/base/CkCodeEditor/types.d.ts.map +1 -0
- package/dist/components/base/CkMilkdownEditor/CkMilkdownEditor.stories.d.ts +6 -0
- package/dist/components/base/CkMilkdownEditor/CkMilkdownEditor.stories.d.ts.map +1 -1
- package/dist/components/base/CkMilkdownEditor/CkMilkdownEditor.vue.d.ts +1 -0
- package/dist/components/base/CkMilkdownEditor/CkMilkdownEditor.vue.d.ts.map +1 -1
- package/dist/components/base/CkMilkdownEditor/createCrepeEditor.d.ts +1 -0
- package/dist/components/base/CkMilkdownEditor/createCrepeEditor.d.ts.map +1 -1
- package/dist/components/base/CkMilkdownEditor/types.d.ts +8 -0
- package/dist/components/base/CkMilkdownEditor/types.d.ts.map +1 -1
- package/dist/components/base/index.d.ts +2 -0
- package/dist/components/base/index.d.ts.map +1 -1
- package/dist/components/index.d.ts +2 -2
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/index.js +27 -26
- package/dist/createCodeMirror-BkV6FEPn.js +101 -0
- package/dist/{createCrepeEditor-C9seqnzm.js → createCrepeEditor-Ci5FHHIV.js} +1433 -24739
- package/dist/handlers/index.js +1 -1
- package/dist/handlers/useChatKitLabels.d.ts +6 -0
- package/dist/handlers/useChatKitLabels.d.ts.map +1 -1
- package/dist/{components/base/CkMilkdownEditor/codeMirrorTheme.d.ts → helpers/codemirror/theme.d.ts} +1 -1
- package/dist/helpers/codemirror/theme.d.ts.map +1 -0
- package/dist/{index-DzpUblMx.js → index-B2tew8uf.js} +3 -3
- package/dist/{index-DLZcs4H8.js → index-BLVAx_f8.js} +2 -2
- package/dist/{index-CHtY7ztn.js → index-BUCqcTPA.js} +2 -2
- package/dist/{index-8mYiDHFC.js → index-BhvbqYsK.js} +2 -2
- package/dist/{index-B0nlcqqF.js → index-BoUJGvvQ.js} +2 -2
- package/dist/{index-U4LYutvz.js → index-BtY1uxn6.js} +3 -2
- package/dist/{index-C5UC1wP7.js → index-BvG6l44n.js} +3 -2
- package/dist/{index-D85elIIr.js → index-CB6xZVsf.js} +2 -2
- package/dist/{index-DbVRgXxM.js → index-CIF93PZF.js} +3 -3
- package/dist/{index-reQfKGuJ.js → index-CN8d3yl1.js} +1 -1
- package/dist/{index-By7WdPbk.js → index-CYk7AB8M.js} +4 -4
- package/dist/{index-DO8xk00f.js → index-Cxs6kPho.js} +3 -3
- package/dist/index-D6ftdiLa.js +1825 -0
- package/dist/{index-DXTRMb09.js → index-DgCcFC3N.js} +3 -3
- package/dist/{index-Bxg0Q_mk.js → index-DhwsowEf.js} +2 -2
- package/dist/{index-C90_LSx6.js → index-Dl24CCB3.js} +4 -4
- package/dist/{index-eZunhxNH.js → index-DqGDenO9.js} +2 -2
- package/dist/{index-DfvAv_Y2.js → index-DufAP1JF.js} +3 -2
- package/dist/{index-VbqLf82s.js → index-DxTzaHLr.js} +4 -4
- package/dist/{index-CFdcEeXx.js → index-MfXW4ZyN.js} +3 -2
- package/dist/{index-6PiPEjJd.js → index-ZHg2R9iD.js} +3 -2
- package/dist/{index-DNxEOsDD.js → index-gYt3E3Cp.js} +2 -2
- package/dist/{index-DINJn4Mn.js → index-w2yzH7vs.js} +3 -3
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +29 -28
- package/dist/{useChatKitLabels-Bz58tas9.js → useChatKitLabels-CatQSpfL.js} +2 -0
- package/package.json +5 -3
- package/src/components/base/CkCodeEditor/CkCodeEditor.spec.ts +223 -0
- package/src/components/base/CkCodeEditor/CkCodeEditor.stories.ts +311 -0
- package/src/components/base/CkCodeEditor/CkCodeEditor.vue +238 -0
- package/src/components/base/CkCodeEditor/createCodeMirror.ts +188 -0
- package/src/components/base/CkCodeEditor/index.ts +2 -0
- package/src/components/base/CkCodeEditor/types.ts +128 -0
- package/src/components/base/CkMilkdownEditor/CkMilkdownEditor.spec.ts +13 -0
- package/src/components/base/CkMilkdownEditor/CkMilkdownEditor.stories.ts +34 -0
- package/src/components/base/CkMilkdownEditor/CkMilkdownEditor.vue +3 -1
- package/src/components/base/CkMilkdownEditor/createCrepeEditor.ts +2 -1
- package/src/components/base/CkMilkdownEditor/milkdown-theme.css +39 -26
- package/src/components/base/CkMilkdownEditor/types.ts +8 -0
- package/src/components/base/index.ts +6 -0
- package/src/components/index.ts +4 -0
- package/src/handlers/useChatKitLabels.ts +6 -0
- package/src/helpers/codemirror/code-palette.css +49 -0
- package/src/{components/base/CkMilkdownEditor/codeMirrorTheme.ts → helpers/codemirror/theme.ts} +23 -12
- package/src/index.ts +4 -0
- package/dist/components/base/CkMilkdownEditor/codeMirrorTheme.d.ts.map +0 -1
package/src/{components/base/CkMilkdownEditor/codeMirrorTheme.ts → helpers/codemirror/theme.ts}
RENAMED
|
@@ -21,6 +21,7 @@ const cssVar = (name: string): string => `var(--ck-cm-${name})`;
|
|
|
21
21
|
* editor and in `CkMarkdownRenderer`.
|
|
22
22
|
*/
|
|
23
23
|
export const ckHighlightStyle = HighlightStyle.define([
|
|
24
|
+
// Keywords, and the operators GitHub colours like keywords (`=`, `:`).
|
|
24
25
|
{
|
|
25
26
|
tag: [
|
|
26
27
|
t.keyword,
|
|
@@ -29,6 +30,7 @@ export const ckHighlightStyle = HighlightStyle.define([
|
|
|
29
30
|
t.definitionKeyword,
|
|
30
31
|
t.moduleKeyword,
|
|
31
32
|
t.operatorKeyword,
|
|
33
|
+
t.operator,
|
|
32
34
|
],
|
|
33
35
|
color: cssVar('keyword'),
|
|
34
36
|
},
|
|
@@ -40,14 +42,20 @@ export const ckHighlightStyle = HighlightStyle.define([
|
|
|
40
42
|
tag: [t.comment, t.lineComment, t.blockComment, t.docComment],
|
|
41
43
|
color: cssVar('comment'),
|
|
42
44
|
},
|
|
45
|
+
// Things being declared: functions, classes, interfaces.
|
|
43
46
|
{
|
|
44
47
|
tag: [
|
|
45
48
|
t.function(t.variableName),
|
|
46
49
|
t.function(t.propertyName),
|
|
47
50
|
t.definition(t.function(t.variableName)),
|
|
51
|
+
t.definition(t.typeName),
|
|
52
|
+
t.className,
|
|
53
|
+
t.namespace,
|
|
54
|
+
t.self,
|
|
48
55
|
],
|
|
49
56
|
color: cssVar('function'),
|
|
50
57
|
},
|
|
58
|
+
// Built-in types, literals and ordinary variables.
|
|
51
59
|
{
|
|
52
60
|
tag: [
|
|
53
61
|
t.number,
|
|
@@ -56,25 +64,20 @@ export const ckHighlightStyle = HighlightStyle.define([
|
|
|
56
64
|
t.atom,
|
|
57
65
|
t.constant(t.name),
|
|
58
66
|
t.constant(t.variableName),
|
|
67
|
+
t.definition(t.variableName),
|
|
68
|
+
t.typeName,
|
|
69
|
+
t.standard(t.typeName),
|
|
59
70
|
t.propertyName,
|
|
60
71
|
t.attributeName,
|
|
61
72
|
t.attributeValue,
|
|
62
73
|
],
|
|
63
74
|
color: cssVar('constant'),
|
|
64
75
|
},
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
t.typeName,
|
|
68
|
-
t.className,
|
|
69
|
-
t.namespace,
|
|
70
|
-
t.definition(t.variableName),
|
|
71
|
-
t.self,
|
|
72
|
-
],
|
|
73
|
-
color: cssVar('entity'),
|
|
74
|
-
},
|
|
76
|
+
// A declared property name, which UiCodeBlock renders in the text token.
|
|
77
|
+
{ tag: t.definition(t.propertyName), color: cssVar('property') },
|
|
75
78
|
{ tag: [t.tagName, t.angleBracket], color: cssVar('tag') },
|
|
76
79
|
{
|
|
77
|
-
tag: [t.variableName, t.
|
|
80
|
+
tag: [t.variableName, t.punctuation, t.bracket, t.separator],
|
|
78
81
|
color: cssVar('foreground'),
|
|
79
82
|
},
|
|
80
83
|
{ tag: t.heading, fontWeight: 'bold' },
|
|
@@ -107,8 +110,16 @@ export const ckCodeMirrorTheme: Extension = [
|
|
|
107
110
|
'.cm-line': {
|
|
108
111
|
padding: '0',
|
|
109
112
|
},
|
|
113
|
+
// Gutter visibility is driven by the `showLineNumbers` prop through a root
|
|
114
|
+
// class in `milkdown-theme.css`, not from here, so it can toggle without
|
|
115
|
+
// reconfiguring CodeMirror. Only the chrome is set here.
|
|
110
116
|
'.cm-gutters': {
|
|
111
|
-
|
|
117
|
+
backgroundColor: 'transparent',
|
|
118
|
+
borderRight: 'none',
|
|
119
|
+
color: cssVar('comment'),
|
|
120
|
+
},
|
|
121
|
+
'.cm-activeLineGutter': {
|
|
122
|
+
backgroundColor: 'transparent',
|
|
112
123
|
},
|
|
113
124
|
'.cm-cursor, .cm-dropCursor': {
|
|
114
125
|
borderLeftColor: cssVar('foreground'),
|
package/src/index.ts
CHANGED
|
@@ -100,6 +100,7 @@ export {
|
|
|
100
100
|
CkUserMessage,
|
|
101
101
|
CkEditableUserMessage,
|
|
102
102
|
CkMilkdownEditor,
|
|
103
|
+
CkCodeEditor,
|
|
103
104
|
} from './components';
|
|
104
105
|
export type {
|
|
105
106
|
CkAgentMessageHeaderProps,
|
|
@@ -145,6 +146,9 @@ export type {
|
|
|
145
146
|
CkMilkdownEditorEmits,
|
|
146
147
|
CkMilkdownEditorExposed,
|
|
147
148
|
CkMilkdownEditorProps,
|
|
149
|
+
CkCodeEditorEmits,
|
|
150
|
+
CkCodeEditorExposed,
|
|
151
|
+
CkCodeEditorProps,
|
|
148
152
|
} from './components';
|
|
149
153
|
|
|
150
154
|
// Helpers
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"codeMirrorTheme.d.ts","sourceRoot":"","sources":["../../../../src/components/base/CkMilkdownEditor/codeMirrorTheme.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAsB,MAAM,sBAAsB,CAAC;AAC1E,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAInD;;;GAGG;AACH,eAAO,MAAM,gBAAgB,2FAC6D,CAAC;AAO3F;;;;GAIG;AACH,eAAO,MAAM,gBAAgB,gBA8D3B,CAAC;AAEH;;;;GAIG;AACH,eAAO,MAAM,iBAAiB,EAAE,SAwC/B,CAAC"}
|