@aleph-alpha/chat-kit 6.4.1 → 6.4.3
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-BvRIp3m6.js → CkHistory.vue_vue_type_script_setup_true_lang-Bv3FuKT4.js} +85 -35
- package/dist/chat-kit.css +63 -19
- package/dist/components/base/CkCodeEditor/CkCodeEditor.stories.d.ts.map +1 -1
- package/dist/components/base/CkCodeEditor/CkCodeEditor.vue.d.ts +2 -0
- package/dist/components/base/CkCodeEditor/CkCodeEditor.vue.d.ts.map +1 -1
- package/dist/components/base/CkCodeEditor/createCodeMirror.d.ts +5 -1
- package/dist/components/base/CkCodeEditor/createCodeMirror.d.ts.map +1 -1
- package/dist/components/base/CkCodeEditor/index.d.ts +1 -0
- package/dist/components/base/CkCodeEditor/index.d.ts.map +1 -1
- package/dist/components/base/CkCodeEditor/loadCodeMirror.d.ts +17 -0
- package/dist/components/base/CkCodeEditor/loadCodeMirror.d.ts.map +1 -0
- package/dist/components/base/CkCodeEditor/types.d.ts +25 -6
- package/dist/components/base/CkCodeEditor/types.d.ts.map +1 -1
- package/dist/components/base/index.d.ts +2 -2
- 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 +3 -2
- package/dist/{createCodeMirror-BO-TWTzn.js → createCodeMirror-CN8xL8qU.js} +20 -10
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -2
- package/package.json +2 -2
- package/src/components/base/CkCodeEditor/CkCodeEditor.spec.ts +99 -0
- package/src/components/base/CkCodeEditor/CkCodeEditor.stories.ts +10 -0
- package/src/components/base/CkCodeEditor/CkCodeEditor.vue +123 -34
- package/src/components/base/CkCodeEditor/createCodeMirror.ts +34 -13
- package/src/components/base/CkCodeEditor/index.ts +1 -0
- package/src/components/base/CkCodeEditor/loadCodeMirror.ts +28 -0
- package/src/components/base/CkCodeEditor/types.ts +30 -6
- package/src/components/base/index.ts +2 -1
- package/src/components/index.ts +2 -0
- package/src/index.ts +2 -0
|
@@ -6,14 +6,24 @@ export type {
|
|
|
6
6
|
CkCodeEditorBadgeRule,
|
|
7
7
|
} from './badgeDecoration';
|
|
8
8
|
|
|
9
|
+
/**
|
|
10
|
+
* Opaque design-system surfaces the scroll fade can dissolve into, each naming
|
|
11
|
+
* a `background-surface-*` token. Translucent surfaces are left out: the fade
|
|
12
|
+
* gradient needs a solid colour to end on.
|
|
13
|
+
*/
|
|
14
|
+
export type CkCodeEditorFadeSurface =
|
|
15
|
+
| 'primary'
|
|
16
|
+
| 'secondary'
|
|
17
|
+
| 'floating'
|
|
18
|
+
| 'modal';
|
|
19
|
+
|
|
9
20
|
/**
|
|
10
21
|
* Single-document code editor built on [CodeMirror 6](https://codemirror.net/).
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
* edited here.
|
|
22
|
+
* It shares `UiCodeBlock`'s muted header, carrying the language and a copy
|
|
23
|
+
* button, and its syntax colours approximating Shiki's `github-light` /
|
|
24
|
+
* `github-dark`, so highlighted code keeps its colours between a reply and the
|
|
25
|
+
* editor. The body follows the design-system input field: body text on the
|
|
26
|
+
* input surface, with muted monospace line numbers.
|
|
17
27
|
*
|
|
18
28
|
* Use it wherever a whole document *is* code — a snippet field, a config or
|
|
19
29
|
* template editor, a "create skill" form. For prose that merely contains code,
|
|
@@ -114,6 +124,20 @@ export interface CkCodeEditorProps {
|
|
|
114
124
|
* @default true
|
|
115
125
|
*/
|
|
116
126
|
scrollFade?: boolean;
|
|
127
|
+
/**
|
|
128
|
+
* Surface the top scroll fade dissolves into, as a `background-surface-*`
|
|
129
|
+
* token name. The gradient itself is `UiFadeMask`'s; only its colour changes.
|
|
130
|
+
*
|
|
131
|
+
* @default 'secondary'
|
|
132
|
+
*/
|
|
133
|
+
fadeTopBackground?: CkCodeEditorFadeSurface;
|
|
134
|
+
/**
|
|
135
|
+
* Surface the bottom scroll fade dissolves into, as a `background-surface-*`
|
|
136
|
+
* token name. The gradient itself is `UiFadeMask`'s; only its colour changes.
|
|
137
|
+
*
|
|
138
|
+
* @default 'floating'
|
|
139
|
+
*/
|
|
140
|
+
fadeBottomBackground?: CkCodeEditorFadeSurface;
|
|
117
141
|
/**
|
|
118
142
|
* Move focus into the editor once it has been created.
|
|
119
143
|
*
|
|
@@ -86,9 +86,10 @@ export type {
|
|
|
86
86
|
CkMilkdownEditorExposed,
|
|
87
87
|
CkMilkdownEditorProps,
|
|
88
88
|
} from './CkMilkdownEditor';
|
|
89
|
-
export { CkCodeEditor } from './CkCodeEditor';
|
|
89
|
+
export { CkCodeEditor, preloadCkCodeEditor } from './CkCodeEditor';
|
|
90
90
|
export type {
|
|
91
91
|
CkCodeEditorEmits,
|
|
92
92
|
CkCodeEditorExposed,
|
|
93
|
+
CkCodeEditorFadeSurface,
|
|
93
94
|
CkCodeEditorProps,
|
|
94
95
|
} from './CkCodeEditor';
|
package/src/components/index.ts
CHANGED
|
@@ -29,6 +29,7 @@ export {
|
|
|
29
29
|
CkEditableUserMessage,
|
|
30
30
|
CkMilkdownEditor,
|
|
31
31
|
CkCodeEditor,
|
|
32
|
+
preloadCkCodeEditor,
|
|
32
33
|
} from './base';
|
|
33
34
|
export type {
|
|
34
35
|
CkAgentMessageHeaderProps,
|
|
@@ -73,6 +74,7 @@ export type {
|
|
|
73
74
|
CkMilkdownEditorProps,
|
|
74
75
|
CkCodeEditorEmits,
|
|
75
76
|
CkCodeEditorExposed,
|
|
77
|
+
CkCodeEditorFadeSurface,
|
|
76
78
|
CkCodeEditorProps,
|
|
77
79
|
} from './base';
|
|
78
80
|
|
package/src/index.ts
CHANGED
|
@@ -101,6 +101,7 @@ export {
|
|
|
101
101
|
CkEditableUserMessage,
|
|
102
102
|
CkMilkdownEditor,
|
|
103
103
|
CkCodeEditor,
|
|
104
|
+
preloadCkCodeEditor,
|
|
104
105
|
} from './components';
|
|
105
106
|
export type {
|
|
106
107
|
CkAgentMessageHeaderProps,
|
|
@@ -148,6 +149,7 @@ export type {
|
|
|
148
149
|
CkMilkdownEditorProps,
|
|
149
150
|
CkCodeEditorEmits,
|
|
150
151
|
CkCodeEditorExposed,
|
|
152
|
+
CkCodeEditorFadeSurface,
|
|
151
153
|
CkCodeEditorProps,
|
|
152
154
|
} from './components';
|
|
153
155
|
|