@aleph-alpha/chat-kit 6.4.1 → 6.4.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/dist/{CkHistory.vue_vue_type_script_setup_true_lang-BvRIp3m6.js → CkHistory.vue_vue_type_script_setup_true_lang-wu1Zrvgc.js} +8 -3
- package/dist/chat-kit.css +32 -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/types.d.ts +25 -6
- package/dist/components/base/CkCodeEditor/types.d.ts.map +1 -1
- package/dist/components/base/index.d.ts +1 -1
- package/dist/components/base/index.d.ts.map +1 -1
- package/dist/components/index.d.ts +1 -1
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/index.js +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
- package/src/components/base/CkCodeEditor/CkCodeEditor.spec.ts +28 -0
- package/src/components/base/CkCodeEditor/CkCodeEditor.stories.ts +10 -0
- package/src/components/base/CkCodeEditor/CkCodeEditor.vue +34 -14
- package/src/components/base/CkCodeEditor/types.ts +30 -6
- package/src/components/base/index.ts +1 -0
- package/src/components/index.ts +1 -0
- package/src/index.ts +1 -0
|
@@ -2844,6 +2844,8 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
2844
2844
|
lineWrapping: { type: Boolean, default: false },
|
|
2845
2845
|
maxHeight: { default: void 0 },
|
|
2846
2846
|
scrollFade: { type: Boolean, default: true },
|
|
2847
|
+
fadeTopBackground: { default: "secondary" },
|
|
2848
|
+
fadeBottomBackground: { default: "floating" },
|
|
2847
2849
|
autofocus: { type: Boolean, default: false },
|
|
2848
2850
|
badge: { default: void 0 },
|
|
2849
2851
|
writeToClipboard: { type: Function, default: void 0 }
|
|
@@ -2879,8 +2881,11 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
2879
2881
|
const down = canScrollDown.value;
|
|
2880
2882
|
return {
|
|
2881
2883
|
position: edgeToFade(up, down),
|
|
2882
|
-
|
|
2883
|
-
|
|
2884
|
+
style: {
|
|
2885
|
+
"--ui-fade-mask-height": up || down ? FADE_HEIGHT : "0px",
|
|
2886
|
+
"--ck-code-fade-top": `var(--background-surface-${props.fadeTopBackground})`,
|
|
2887
|
+
"--ck-code-fade-bottom": `var(--background-surface-${props.fadeBottomBackground})`
|
|
2888
|
+
}
|
|
2884
2889
|
};
|
|
2885
2890
|
});
|
|
2886
2891
|
function syncScrollFades() {
|
|
@@ -3048,7 +3053,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
3048
3053
|
};
|
|
3049
3054
|
}
|
|
3050
3055
|
});
|
|
3051
|
-
const CkCodeEditor = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-
|
|
3056
|
+
const CkCodeEditor = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-6dfa80b5"]]);
|
|
3052
3057
|
const _hoisted_1 = {
|
|
3053
3058
|
key: 1,
|
|
3054
3059
|
class: "flex size-8 shrink-0 items-center justify-center rounded-2xl bg-background-surface-muted-subtle"
|
package/dist/chat-kit.css
CHANGED
|
@@ -176,21 +176,17 @@
|
|
|
176
176
|
* `helpers/codemirror/code-palette.css`). The overrides live here, not in
|
|
177
177
|
* `theme.ts`, because `CkMilkdownEditor`'s code blocks use that theme too and
|
|
178
178
|
* must keep matching the rendered block. */
|
|
179
|
-
.ck-code-editor[data-v-
|
|
179
|
+
.ck-code-editor[data-v-6dfa80b5] {
|
|
180
|
+
/* `theme.ts` paints the editor from these; transparent lets the root's
|
|
181
|
+
* input surface show through. */
|
|
180
182
|
--ck-cm-bg: transparent;
|
|
181
183
|
--ck-cm-foreground: oklch(var(--content-on-surface-primary));
|
|
182
184
|
--ck-cm-line-number: oklch(var(--content-on-surface-muted));
|
|
183
185
|
}
|
|
184
186
|
|
|
185
|
-
/*
|
|
186
|
-
*
|
|
187
|
-
.ck-code-editor__host[data-v-
|
|
188
|
-
background: var(--ck-cm-bg);
|
|
189
|
-
color: var(--ck-cm-foreground);
|
|
190
|
-
}
|
|
191
|
-
|
|
192
|
-
/* Same declarations as the `body-14-regular` typography utility. */
|
|
193
|
-
.ck-code-editor__host[data-v-75f52b7e] .cm-scroller {
|
|
187
|
+
/* `:deep` is needed below because CodeMirror builds its own DOM, which scoped
|
|
188
|
+
* styles do not reach. Same declarations as the `body-14-regular` typography utility. */
|
|
189
|
+
.ck-code-editor__host[data-v-6dfa80b5] .cm-scroller {
|
|
194
190
|
max-height: var(--ck-code-max-height, none);
|
|
195
191
|
font-family: Saans, sans-serif;
|
|
196
192
|
font-size: 0.875rem;
|
|
@@ -200,20 +196,20 @@
|
|
|
200
196
|
|
|
201
197
|
/* 12px below the header, 16px above the bottom edge, and a 20px right inset,
|
|
202
198
|
* as in the design. */
|
|
203
|
-
.ck-code-editor__host[data-v-
|
|
199
|
+
.ck-code-editor__host[data-v-6dfa80b5] .cm-content {
|
|
204
200
|
padding: 0.75rem 1.25rem 1rem 1rem;
|
|
205
201
|
}
|
|
206
202
|
|
|
207
203
|
/* The number column already carries the 1rem left inset, so the code must not
|
|
208
204
|
* pay for it a second time. The sibling selector only matches while the gutter
|
|
209
205
|
* is mounted, which is exactly when `showLineNumbers` is on. */
|
|
210
|
-
.ck-code-editor__host[data-v-
|
|
206
|
+
.ck-code-editor__host[data-v-6dfa80b5] .cm-gutters ~ .cm-content {
|
|
211
207
|
padding-left: 0;
|
|
212
208
|
}
|
|
213
209
|
|
|
214
210
|
/* Numbers stay monospaced so the column does not jitter as digits change; the
|
|
215
211
|
* 12px right padding is the gap before the code. */
|
|
216
|
-
.ck-code-editor__host[data-v-
|
|
212
|
+
.ck-code-editor__host[data-v-6dfa80b5] .cm-lineNumbers .cm-gutterElement {
|
|
217
213
|
min-width: 0;
|
|
218
214
|
padding: 0 0.75rem 0 1rem;
|
|
219
215
|
/* `CODE_FONT_FAMILY` from `theme.ts`, repeated because importing it here
|
|
@@ -223,16 +219,33 @@
|
|
|
223
219
|
monospace;
|
|
224
220
|
font-weight: 500;
|
|
225
221
|
}
|
|
226
|
-
.ck-code-editor__host[data-v-
|
|
222
|
+
.ck-code-editor__host[data-v-6dfa80b5] .cm-placeholder {
|
|
227
223
|
color: oklch(var(--content-on-surface-muted));
|
|
228
224
|
}
|
|
229
225
|
|
|
230
|
-
/*
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
226
|
+
/* Each band fades into its own surface (`fadeTopBackground` /
|
|
227
|
+
* `fadeBottomBackground`), whereas `UiFadeMask`'s `background` sets one for
|
|
228
|
+
* both and only knows `primary` and `secondary`. The gradient, edges and band
|
|
229
|
+
* height stay the mask's own. `[data-background]` outranks the mask's
|
|
230
|
+
* per-surface rule regardless of stylesheet order. */
|
|
231
|
+
.ck-code-editor__body[data-v-6dfa80b5]
|
|
232
|
+
.ui-fade-mask__band[data-background][data-position='top'] {
|
|
233
|
+
--ui-fade-mask-surface: var(--ck-code-fade-top);
|
|
234
|
+
/* The mask turns its top band opaque halfway down on desktop, which left a
|
|
235
|
+
* solid strip under the header; mirror the bottom band's stops instead. */
|
|
236
|
+
--ui-fade-mask-stop: 20%;
|
|
237
|
+
}
|
|
238
|
+
.ck-code-editor__body[data-v-6dfa80b5]
|
|
239
|
+
.ui-fade-mask__band[data-background][data-position='bottom'] {
|
|
240
|
+
--ui-fade-mask-surface: var(--ck-code-fade-bottom);
|
|
241
|
+
}
|
|
242
|
+
@media (min-width: 768px) {
|
|
243
|
+
.ck-code-editor__body[data-v-6dfa80b5]
|
|
244
|
+
.ui-fade-mask__band[data-background][data-position='top'] {
|
|
245
|
+
--ui-fade-mask-stop: 100%;
|
|
246
|
+
}
|
|
234
247
|
}
|
|
235
|
-
.ck-code-editor--disabled[data-v-
|
|
248
|
+
.ck-code-editor--disabled[data-v-6dfa80b5] {
|
|
236
249
|
opacity: 0.6;
|
|
237
250
|
cursor: not-allowed;
|
|
238
251
|
pointer-events: none;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CkCodeEditor.stories.d.ts","sourceRoot":"","sources":["../../../../src/components/base/CkCodeEditor/CkCodeEditor.stories.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAC3D,OAAO,YAAY,MAAM,oBAAoB,CAAC;AA6B9C,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,YAAY,
|
|
1
|
+
{"version":3,"file":"CkCodeEditor.stories.d.ts","sourceRoot":"","sources":["../../../../src/components/base/CkCodeEditor/CkCodeEditor.stories.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAC3D,OAAO,YAAY,MAAM,oBAAoB,CAAC;AA6B9C,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,YAAY,CA0DnC,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAgKnC;;;GAGG;AACH,eAAO,MAAM,OAAO,EAAE,KAWrB,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,YAAY,EAAE,KAW1B,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,SAAS,EAAE,KAevB,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,QAAQ,EAAE,KAOtB,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,aAAa,EAAE,KAO3B,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,oBAAoB,EAAE,KAsBlC,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,UAAU,EAAE,KAgBxB,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,kBAAkB,EAAE,KAwBhC,CAAC"}
|
|
@@ -34,6 +34,8 @@ declare const __VLS_export: import("vue").DefineComponent<CkCodeEditorProps, {
|
|
|
34
34
|
lineWrapping: boolean;
|
|
35
35
|
maxHeight: string;
|
|
36
36
|
scrollFade: boolean;
|
|
37
|
+
fadeTopBackground: import("./types").CkCodeEditorFadeSurface;
|
|
38
|
+
fadeBottomBackground: import("./types").CkCodeEditorFadeSurface;
|
|
37
39
|
badge: import("./badgeDecoration").CkCodeEditorBadgeRule;
|
|
38
40
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
39
41
|
declare const _default: typeof __VLS_export;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CkCodeEditor.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/base/CkCodeEditor/CkCodeEditor.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"CkCodeEditor.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/base/CkCodeEditor/CkCodeEditor.vue"],"names":[],"mappings":"AA4YA,OAAO,KAAK,EAAqB,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAqOpE,iBAAS,KAAK,IAAI,IAAI,CAErB;AAED,iBAAS,OAAO,IAAI,MAAM,CAEzB;AAmLD,QAAA,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6EAKhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
|
|
@@ -1,13 +1,18 @@
|
|
|
1
1
|
import type { CkCodeEditorBadgeRule } from './badgeDecoration';
|
|
2
2
|
export type { CkCodeEditorBadgeContent, CkCodeEditorBadgeRule, } from './badgeDecoration';
|
|
3
|
+
/**
|
|
4
|
+
* Opaque design-system surfaces the scroll fade can dissolve into, each naming
|
|
5
|
+
* a `background-surface-*` token. Translucent surfaces are left out: the fade
|
|
6
|
+
* gradient needs a solid colour to end on.
|
|
7
|
+
*/
|
|
8
|
+
export type CkCodeEditorFadeSurface = 'primary' | 'secondary' | 'floating' | 'modal';
|
|
3
9
|
/**
|
|
4
10
|
* Single-document code editor built on [CodeMirror 6](https://codemirror.net/).
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
* edited here.
|
|
11
|
+
* It shares `UiCodeBlock`'s muted header, carrying the language and a copy
|
|
12
|
+
* button, and its syntax colours approximating Shiki's `github-light` /
|
|
13
|
+
* `github-dark`, so highlighted code keeps its colours between a reply and the
|
|
14
|
+
* editor. The body follows the design-system input field: body text on the
|
|
15
|
+
* input surface, with muted monospace line numbers.
|
|
11
16
|
*
|
|
12
17
|
* Use it wherever a whole document *is* code — a snippet field, a config or
|
|
13
18
|
* template editor, a "create skill" form. For prose that merely contains code,
|
|
@@ -108,6 +113,20 @@ export interface CkCodeEditorProps {
|
|
|
108
113
|
* @default true
|
|
109
114
|
*/
|
|
110
115
|
scrollFade?: boolean;
|
|
116
|
+
/**
|
|
117
|
+
* Surface the top scroll fade dissolves into, as a `background-surface-*`
|
|
118
|
+
* token name. The gradient itself is `UiFadeMask`'s; only its colour changes.
|
|
119
|
+
*
|
|
120
|
+
* @default 'secondary'
|
|
121
|
+
*/
|
|
122
|
+
fadeTopBackground?: CkCodeEditorFadeSurface;
|
|
123
|
+
/**
|
|
124
|
+
* Surface the bottom scroll fade dissolves into, as a `background-surface-*`
|
|
125
|
+
* token name. The gradient itself is `UiFadeMask`'s; only its colour changes.
|
|
126
|
+
*
|
|
127
|
+
* @default 'floating'
|
|
128
|
+
*/
|
|
129
|
+
fadeBottomBackground?: CkCodeEditorFadeSurface;
|
|
111
130
|
/**
|
|
112
131
|
* Move focus into the editor once it has been created.
|
|
113
132
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/components/base/CkCodeEditor/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;AAG/D,YAAY,EACV,wBAAwB,EACxB,qBAAqB,GACtB,MAAM,mBAAmB,CAAC;AAE3B
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/components/base/CkCodeEditor/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;AAG/D,YAAY,EACV,wBAAwB,EACxB,qBAAqB,GACtB,MAAM,mBAAmB,CAAC;AAE3B;;;;GAIG;AACH,MAAM,MAAM,uBAAuB,GAC/B,SAAS,GACT,WAAW,GACX,UAAU,GACV,OAAO,CAAC;AAEZ;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,MAAM,WAAW,iBAAiB;IAChC;;;;;;;OAOG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;;;;;;OAOG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;;OAGG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,8CAA8C;IAC9C,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;;;OAKG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;;OAIG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,+CAA+C;IAC/C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;;;OAKG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;;;OAIG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB;;;;;;OAMG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B;;;;;OAKG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;;;;;;;;OAUG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;;;;OAKG;IACH,iBAAiB,CAAC,EAAE,uBAAuB,CAAC;IAC5C;;;;;OAKG;IACH,oBAAoB,CAAC,EAAE,uBAAuB,CAAC;IAC/C;;;;OAIG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;;;;;;;;;;;;;;;OAgBG;IACH,KAAK,CAAC,EAAE,qBAAqB,CAAC;IAC9B;;;OAGG;IACH,gBAAgB,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;CACpD;AAED,8CAA8C;AAC9C,MAAM,WAAW,iBAAiB;IAChC,4DAA4D;IAC5D,mBAAmB,EAAE,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;IACrC,iDAAiD;IACjD,KAAK,EAAE,EAAE,CAAC;IACV,sEAAsE;IACtE,IAAI,EAAE,EAAE,CAAC;IACT,8EAA8E;IAC9E,IAAI,EAAE,CAAC,OAAO,EAAE;QAAE,OAAO,EAAE,OAAO,CAAA;KAAE,CAAC,CAAC;CACvC;AAED,sEAAsE;AACtE,MAAM,WAAW,mBAAmB;IAClC,uEAAuE;IACvE,KAAK,EAAE,MAAM,IAAI,CAAC;IAClB,+CAA+C;IAC/C,OAAO,EAAE,MAAM,MAAM,CAAC;CACvB"}
|
|
@@ -44,5 +44,5 @@ export type { CkEditableUserMessageEmits, CkEditableUserMessageProps, } from './
|
|
|
44
44
|
export { CkMilkdownEditor } from './CkMilkdownEditor';
|
|
45
45
|
export type { CkMilkdownEditorEmits, CkMilkdownEditorExposed, CkMilkdownEditorProps, } from './CkMilkdownEditor';
|
|
46
46
|
export { CkCodeEditor } from './CkCodeEditor';
|
|
47
|
-
export type { CkCodeEditorEmits, CkCodeEditorExposed, CkCodeEditorProps, } from './CkCodeEditor';
|
|
47
|
+
export type { CkCodeEditorEmits, CkCodeEditorExposed, CkCodeEditorFadeSurface, CkCodeEditorProps, } from './CkCodeEditor';
|
|
48
48
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts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AsB,CAAC;AAC1D,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,YAAY,EAAE,uBAAuB,EAAE,MAAM,sBAAsB,CAAC;AACpE,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AACpE,OAAO,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAC;AACxE,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,YAAY,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAC1D,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAChE,YAAY,EACV,0BAA0B,EAC1B,0BAA0B,GAC3B,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,YAAY,EACV,qBAAqB,EACrB,uBAAuB,EACvB,qBAAqB,GACtB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,YAAY,EACV,iBAAiB,EACjB,mBAAmB,EACnB,uBAAuB,EACvB,iBAAiB,GAClB,MAAM,gBAAgB,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { CkAgentMessage, CkAgentMessageHeader, CkHeaderActivityButton, CkCitation, CkCitationLabel, CkCitationCard, CkConversationLayout, CkCopyMessageButton, CkDropZoneOverlay, CkFeedbackButton, CkFeedbackDialog, CkFileItemsList, CkHistoryItem, CkHistoryWrapper, CkMarkdownRenderer, CkMessageButton, CkModelSelector, CkPromptSendButton, CkPromptMenuButton, CkPromptStopButton, CkPromptInput, CkPromptInputDisclaimer, CkRegenerateMessageButton, CkSendIcon, CkStopIcon, CkUserMessage, CkEditableUserMessage, CkMilkdownEditor, CkCodeEditor, } from './base';
|
|
2
|
-
export type { CkAgentMessageHeaderProps, CkHeaderActivityButtonProps, CkHeaderActivityButtonEmits, CkCitationProps, CkCitationEmits, CkCitationSource, CkCitationLabelProps, CkCitationCardProps, CkCitationCardEmits, CkConversationLayoutProps, CkDropZoneOverlayProps, CkDropZoneOverlayEmits, CkDropZoneRejection, CkDropZoneRejectionReason, CkFeedbackButtonProps, CkFeedbackDialogEmits, CkFeedbackDialogProps, CkFeedbackDialogSubmitPayload, CkFeedbackReason, CkFeedbackSentiment, CkFeedbackValue, CkFileEntry, CkFileItemsListEmits, CkFileItemsListProps, CkHistoryItemEmits, CkHistoryItemProps, CkHistoryWrapperProps, CkMarkdownElementClasses, CkMarkdownRendererProps, CkMarkdownRendererEmits, CkModelOption, CkModelSelectorProps, CkModelSelectorEmits, CkPromptMenuButtonProps, CkUserMessageProps, CkEditableUserMessageProps, CkEditableUserMessageEmits, CkMilkdownEditorEmits, CkMilkdownEditorExposed, CkMilkdownEditorProps, CkCodeEditorEmits, CkCodeEditorExposed, CkCodeEditorProps, } from './base';
|
|
2
|
+
export type { CkAgentMessageHeaderProps, CkHeaderActivityButtonProps, CkHeaderActivityButtonEmits, CkCitationProps, CkCitationEmits, CkCitationSource, CkCitationLabelProps, CkCitationCardProps, CkCitationCardEmits, CkConversationLayoutProps, CkDropZoneOverlayProps, CkDropZoneOverlayEmits, CkDropZoneRejection, CkDropZoneRejectionReason, CkFeedbackButtonProps, CkFeedbackDialogEmits, CkFeedbackDialogProps, CkFeedbackDialogSubmitPayload, CkFeedbackReason, CkFeedbackSentiment, CkFeedbackValue, CkFileEntry, CkFileItemsListEmits, CkFileItemsListProps, CkHistoryItemEmits, CkHistoryItemProps, CkHistoryWrapperProps, CkMarkdownElementClasses, CkMarkdownRendererProps, CkMarkdownRendererEmits, CkModelOption, CkModelSelectorProps, CkModelSelectorEmits, CkPromptMenuButtonProps, CkUserMessageProps, CkEditableUserMessageProps, CkEditableUserMessageEmits, CkMilkdownEditorEmits, CkMilkdownEditorExposed, CkMilkdownEditorProps, CkCodeEditorEmits, CkCodeEditorExposed, CkCodeEditorFadeSurface, CkCodeEditorProps, } from './base';
|
|
3
3
|
export { CkConversation, CkHistory } from './composed';
|
|
4
4
|
export type { CkConversationProps, CkHistoryEmits, CkHistoryProps, } from './composed';
|
|
5
5
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AACA,OAAO,EACL,cAAc,EACd,oBAAoB,EACpB,sBAAsB,EACtB,UAAU,EACV,eAAe,EACf,cAAc,EACd,oBAAoB,EACpB,mBAAmB,EACnB,iBAAiB,EACjB,gBAAgB,EAChB,gBAAgB,EAChB,eAAe,EACf,aAAa,EACb,gBAAgB,EAChB,kBAAkB,EAClB,eAAe,EACf,eAAe,EACf,kBAAkB,EAClB,kBAAkB,EAClB,kBAAkB,EAClB,aAAa,EACb,uBAAuB,EACvB,yBAAyB,EACzB,UAAU,EACV,UAAU,EACV,aAAa,EACb,qBAAqB,EACrB,gBAAgB,EAChB,YAAY,GACb,MAAM,QAAQ,CAAC;AAChB,YAAY,EACV,yBAAyB,EACzB,2BAA2B,EAC3B,2BAA2B,EAC3B,eAAe,EACf,eAAe,EACf,gBAAgB,EAChB,oBAAoB,EACpB,mBAAmB,EACnB,mBAAmB,EACnB,yBAAyB,EACzB,sBAAsB,EACtB,sBAAsB,EACtB,mBAAmB,EACnB,yBAAyB,EACzB,qBAAqB,EACrB,qBAAqB,EACrB,qBAAqB,EACrB,6BAA6B,EAC7B,gBAAgB,EAChB,mBAAmB,EACnB,eAAe,EACf,WAAW,EACX,oBAAoB,EACpB,oBAAoB,EACpB,kBAAkB,EAClB,kBAAkB,EAClB,qBAAqB,EACrB,wBAAwB,EACxB,uBAAuB,EACvB,uBAAuB,EACvB,aAAa,EACb,oBAAoB,EACpB,oBAAoB,EACpB,uBAAuB,EACvB,kBAAkB,EAClB,0BAA0B,EAC1B,0BAA0B,EAC1B,qBAAqB,EACrB,uBAAuB,EACvB,qBAAqB,EACrB,iBAAiB,EACjB,mBAAmB,EACnB,iBAAiB,GAClB,MAAM,QAAQ,CAAC;AAGhB,OAAO,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AACvD,YAAY,EACV,mBAAmB,EACnB,cAAc,EACd,cAAc,GACf,MAAM,YAAY,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AACA,OAAO,EACL,cAAc,EACd,oBAAoB,EACpB,sBAAsB,EACtB,UAAU,EACV,eAAe,EACf,cAAc,EACd,oBAAoB,EACpB,mBAAmB,EACnB,iBAAiB,EACjB,gBAAgB,EAChB,gBAAgB,EAChB,eAAe,EACf,aAAa,EACb,gBAAgB,EAChB,kBAAkB,EAClB,eAAe,EACf,eAAe,EACf,kBAAkB,EAClB,kBAAkB,EAClB,kBAAkB,EAClB,aAAa,EACb,uBAAuB,EACvB,yBAAyB,EACzB,UAAU,EACV,UAAU,EACV,aAAa,EACb,qBAAqB,EACrB,gBAAgB,EAChB,YAAY,GACb,MAAM,QAAQ,CAAC;AAChB,YAAY,EACV,yBAAyB,EACzB,2BAA2B,EAC3B,2BAA2B,EAC3B,eAAe,EACf,eAAe,EACf,gBAAgB,EAChB,oBAAoB,EACpB,mBAAmB,EACnB,mBAAmB,EACnB,yBAAyB,EACzB,sBAAsB,EACtB,sBAAsB,EACtB,mBAAmB,EACnB,yBAAyB,EACzB,qBAAqB,EACrB,qBAAqB,EACrB,qBAAqB,EACrB,6BAA6B,EAC7B,gBAAgB,EAChB,mBAAmB,EACnB,eAAe,EACf,WAAW,EACX,oBAAoB,EACpB,oBAAoB,EACpB,kBAAkB,EAClB,kBAAkB,EAClB,qBAAqB,EACrB,wBAAwB,EACxB,uBAAuB,EACvB,uBAAuB,EACvB,aAAa,EACb,oBAAoB,EACpB,oBAAoB,EACpB,uBAAuB,EACvB,kBAAkB,EAClB,0BAA0B,EAC1B,0BAA0B,EAC1B,qBAAqB,EACrB,uBAAuB,EACvB,qBAAqB,EACrB,iBAAiB,EACjB,mBAAmB,EACnB,uBAAuB,EACvB,iBAAiB,GAClB,MAAM,QAAQ,CAAC;AAGhB,OAAO,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AACvD,YAAY,EACV,mBAAmB,EACnB,cAAc,EACd,cAAc,GACf,MAAM,YAAY,CAAC"}
|
package/dist/components/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { _, a, b, c, C, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, A, B, D } from "../CkHistory.vue_vue_type_script_setup_true_lang-
|
|
1
|
+
import { _, a, b, c, C, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, A, B, D } from "../CkHistory.vue_vue_type_script_setup_true_lang-wu1Zrvgc.js";
|
|
2
2
|
export {
|
|
3
3
|
_ as CkAgentMessage,
|
|
4
4
|
a as CkAgentMessageHeader,
|
package/dist/index.d.ts
CHANGED
|
@@ -7,7 +7,7 @@ export type { ChatActions, ChatState, ConversationSession, CreateConversationInp
|
|
|
7
7
|
export { SdkError, createDocumentUploadProvider, defaultDocumentUploadConfig, defaultEndpoints, useDocumentUploadWithDefaultConfig, } from './composables/fileUpload';
|
|
8
8
|
export type { DocumentUploadConfig, DocumentUploadProvider, FileEntry, FileStatus, } from './composables/fileUpload';
|
|
9
9
|
export { CkAgentMessage, CkAgentMessageHeader, CkHeaderActivityButton, CkCitation, CkCitationLabel, CkCitationCard, CkConversation, CkConversationLayout, CkCopyMessageButton, CkDropZoneOverlay, CkFeedbackButton, CkFeedbackDialog, CkFileItemsList, CkHistory, CkHistoryItem, CkHistoryWrapper, CkMarkdownRenderer, CkMessageButton, CkModelSelector, CkPromptSendButton, CkPromptMenuButton, CkPromptStopButton, CkPromptInput, CkPromptInputDisclaimer, CkRegenerateMessageButton, CkSendIcon, CkStopIcon, CkUserMessage, CkEditableUserMessage, CkMilkdownEditor, CkCodeEditor, } from './components';
|
|
10
|
-
export type { CkAgentMessageHeaderProps, CkHeaderActivityButtonProps, CkHeaderActivityButtonEmits, CkCitationProps, CkCitationEmits, CkCitationSource, CkCitationLabelProps, CkCitationCardProps, CkCitationCardEmits, CkConversationLayoutProps, CkConversationProps, CkDropZoneOverlayProps, CkDropZoneOverlayEmits, CkDropZoneRejection, CkDropZoneRejectionReason, CkFeedbackButtonProps, CkFeedbackDialogEmits, CkFeedbackDialogProps, CkFeedbackDialogSubmitPayload, CkFeedbackReason, CkFeedbackSentiment, CkFeedbackValue, CkFileEntry, CkFileItemsListEmits, CkFileItemsListProps, CkHistoryEmits, CkHistoryItemEmits, CkHistoryItemProps, CkHistoryProps, CkHistoryWrapperProps, CkMarkdownElementClasses, CkMarkdownRendererProps, CkMarkdownRendererEmits, CkModelOption, CkModelSelectorProps, CkModelSelectorEmits, CkPromptMenuButtonProps, CkUserMessageProps, CkEditableUserMessageProps, CkEditableUserMessageEmits, CkMilkdownEditorEmits, CkMilkdownEditorExposed, CkMilkdownEditorProps, CkCodeEditorEmits, CkCodeEditorExposed, CkCodeEditorProps, } from './components';
|
|
10
|
+
export type { CkAgentMessageHeaderProps, CkHeaderActivityButtonProps, CkHeaderActivityButtonEmits, CkCitationProps, CkCitationEmits, CkCitationSource, CkCitationLabelProps, CkCitationCardProps, CkCitationCardEmits, CkConversationLayoutProps, CkConversationProps, CkDropZoneOverlayProps, CkDropZoneOverlayEmits, CkDropZoneRejection, CkDropZoneRejectionReason, CkFeedbackButtonProps, CkFeedbackDialogEmits, CkFeedbackDialogProps, CkFeedbackDialogSubmitPayload, CkFeedbackReason, CkFeedbackSentiment, CkFeedbackValue, CkFileEntry, CkFileItemsListEmits, CkFileItemsListProps, CkHistoryEmits, CkHistoryItemEmits, CkHistoryItemProps, CkHistoryProps, CkHistoryWrapperProps, CkMarkdownElementClasses, CkMarkdownRendererProps, CkMarkdownRendererEmits, CkModelOption, CkModelSelectorProps, CkModelSelectorEmits, CkPromptMenuButtonProps, CkUserMessageProps, CkEditableUserMessageProps, CkEditableUserMessageEmits, CkMilkdownEditorEmits, CkMilkdownEditorExposed, CkMilkdownEditorProps, CkCodeEditorEmits, CkCodeEditorExposed, CkCodeEditorFadeSurface, CkCodeEditorProps, } from './components';
|
|
11
11
|
export { formatRelativeTime, markdownToPlainText } from './helpers';
|
|
12
12
|
export type { ActiveComparison, BaseMessage, ComparisonLane, Conversation, ConversationTree, MessageContent, MessageContentStatus, MessageMetadata, MessageReasoningContent, MessageRole, MessageStatus, MessageTextContent, MessageToolContent, TreeMessage, } from './types';
|
|
13
13
|
//# 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":"AAMA,OAAO,iBAAiB,CAAC;AAGzB,OAAO,EACL,KAAK,UAAU,EACf,KAAK,WAAW,EAChB,KAAK,YAAY,EACjB,KAAK,mBAAmB,EACxB,KAAK,UAAU,EACf,KAAK,eAAe,EACpB,KAAK,mBAAmB,EACxB,KAAK,WAAW,GACjB,MAAM,YAAY,CAAC;AASpB,OAAO,EACL,iBAAiB,EACjB,iBAAiB,EACjB,oBAAoB,EACpB,gBAAgB,EAChB,oBAAoB,EACpB,eAAe,GAChB,MAAM,YAAY,CAAC;AACpB,YAAY,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAGhD,OAAO,EACL,OAAO,EACP,uBAAuB,EACvB,gBAAgB,GACjB,MAAM,eAAe,CAAC;AACvB,YAAY,EACV,WAAW,EACX,SAAS,EACT,mBAAmB,EACnB,uBAAuB,EACvB,cAAc,EACd,eAAe,EACf,aAAa,EACb,6BAA6B,EAC7B,uBAAuB,EACvB,sBAAsB,GACvB,MAAM,eAAe,CAAC;AAEvB,OAAO,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,iBAAiB,EACjB,mBAAmB,EACnB,iBAAiB,GAClB,MAAM,cAAc,CAAC;AAGtB,OAAO,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,MAAM,WAAW,CAAC;AAGpE,YAAY,EACV,gBAAgB,EAChB,WAAW,EACX,cAAc,EACd,YAAY,EACZ,gBAAgB,EAChB,cAAc,EACd,oBAAoB,EACpB,eAAe,EACf,uBAAuB,EACvB,WAAW,EACX,aAAa,EACb,kBAAkB,EAClB,kBAAkB,EAClB,WAAW,GACZ,MAAM,SAAS,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAMA,OAAO,iBAAiB,CAAC;AAGzB,OAAO,EACL,KAAK,UAAU,EACf,KAAK,WAAW,EAChB,KAAK,YAAY,EACjB,KAAK,mBAAmB,EACxB,KAAK,UAAU,EACf,KAAK,eAAe,EACpB,KAAK,mBAAmB,EACxB,KAAK,WAAW,GACjB,MAAM,YAAY,CAAC;AASpB,OAAO,EACL,iBAAiB,EACjB,iBAAiB,EACjB,oBAAoB,EACpB,gBAAgB,EAChB,oBAAoB,EACpB,eAAe,GAChB,MAAM,YAAY,CAAC;AACpB,YAAY,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAGhD,OAAO,EACL,OAAO,EACP,uBAAuB,EACvB,gBAAgB,GACjB,MAAM,eAAe,CAAC;AACvB,YAAY,EACV,WAAW,EACX,SAAS,EACT,mBAAmB,EACnB,uBAAuB,EACvB,cAAc,EACd,eAAe,EACf,aAAa,EACb,6BAA6B,EAC7B,uBAAuB,EACvB,sBAAsB,GACvB,MAAM,eAAe,CAAC;AAEvB,OAAO,EACL,QAAQ,EACR,4BAA4B,EAC5B,2BAA2B,EAC3B,gBAAgB,EAChB,kCAAkC,GACnC,MAAM,0BAA0B,CAAC;AAClC,YAAY,EACV,oBAAoB,EACpB,sBAAsB,EACtB,SAAS,EACT,UAAU,GACX,MAAM,0BAA0B,CAAC;AAG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Ac,EACd,YAAY,EACZ,gBAAgB,EAChB,cAAc,EACd,oBAAoB,EACpB,eAAe,EACf,uBAAuB,EACvB,WAAW,EACX,aAAa,EACb,kBAAkB,EAClB,kBAAkB,EAClB,WAAW,GACZ,MAAM,SAAS,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { u } from "./useMessageHandler-Bkzrdgfj.js";
|
|
2
2
|
import { C, d, p, u as u2, b } from "./useChatKitLabels-DxW0N5U-.js";
|
|
3
3
|
import { S, c, d as d2, f, u as u3, a, b as b2, e } from "./index-D0DQjdsq.js";
|
|
4
|
-
import { _, a as a2, b as b3, c as c2, C as C2, d as d3, e as e2, f as f2, g, h, i, j, k, l, m, n, o, p as p2, q, r, s, t, u as u4, v, w, x, y, z, A, B, D, E } from "./CkHistory.vue_vue_type_script_setup_true_lang-
|
|
4
|
+
import { _, a as a2, b as b3, c as c2, C as C2, d as d3, e as e2, f as f2, g, h, i, j, k, l, m, n, o, p as p2, q, r, s, t, u as u4, v, w, x, y, z, A, B, D, E } from "./CkHistory.vue_vue_type_script_setup_true_lang-wu1Zrvgc.js";
|
|
5
5
|
import { m as m2 } from "./markdownToPlainText-DN_G-I6g.js";
|
|
6
6
|
export {
|
|
7
7
|
C as CHAT_KIT_LABELS,
|
package/package.json
CHANGED
|
@@ -273,6 +273,34 @@ describe('CkCodeEditor', () => {
|
|
|
273
273
|
).toBe('0px');
|
|
274
274
|
});
|
|
275
275
|
|
|
276
|
+
it('fades into the design surfaces by default', async () => {
|
|
277
|
+
const { container } = await renderEditor({ modelValue: 'a\nb' });
|
|
278
|
+
|
|
279
|
+
const mask = container.querySelector('.ui-fade-mask') as HTMLElement;
|
|
280
|
+
expect(mask.style.getPropertyValue('--ck-code-fade-top')).toBe(
|
|
281
|
+
'var(--background-surface-secondary)',
|
|
282
|
+
);
|
|
283
|
+
expect(mask.style.getPropertyValue('--ck-code-fade-bottom')).toBe(
|
|
284
|
+
'var(--background-surface-floating)',
|
|
285
|
+
);
|
|
286
|
+
});
|
|
287
|
+
|
|
288
|
+
it('fades each edge into the surface its prop names', async () => {
|
|
289
|
+
const { container } = await renderEditor({
|
|
290
|
+
modelValue: 'a\nb',
|
|
291
|
+
fadeTopBackground: 'modal',
|
|
292
|
+
fadeBottomBackground: 'primary',
|
|
293
|
+
});
|
|
294
|
+
|
|
295
|
+
const mask = container.querySelector('.ui-fade-mask') as HTMLElement;
|
|
296
|
+
expect(mask.style.getPropertyValue('--ck-code-fade-top')).toBe(
|
|
297
|
+
'var(--background-surface-modal)',
|
|
298
|
+
);
|
|
299
|
+
expect(mask.style.getPropertyValue('--ck-code-fade-bottom')).toBe(
|
|
300
|
+
'var(--background-surface-primary)',
|
|
301
|
+
);
|
|
302
|
+
});
|
|
303
|
+
|
|
276
304
|
it('omits the fade mask when `scrollFade` is off', async () => {
|
|
277
305
|
const { container } = await renderEditor({
|
|
278
306
|
modelValue: 'a\nb',
|
|
@@ -58,6 +58,16 @@ const meta: Meta<typeof CkCodeEditor> = {
|
|
|
58
58
|
lineWrapping: { control: 'boolean' },
|
|
59
59
|
autofocus: { control: 'boolean' },
|
|
60
60
|
scrollFade: { control: 'boolean' },
|
|
61
|
+
fadeTopBackground: {
|
|
62
|
+
control: 'inline-radio',
|
|
63
|
+
options: ['primary', 'secondary', 'floating', 'modal'],
|
|
64
|
+
description: 'Surface the top scroll fade dissolves into.',
|
|
65
|
+
},
|
|
66
|
+
fadeBottomBackground: {
|
|
67
|
+
control: 'inline-radio',
|
|
68
|
+
options: ['primary', 'secondary', 'floating', 'modal'],
|
|
69
|
+
description: 'Surface the bottom scroll fade dissolves into.',
|
|
70
|
+
},
|
|
61
71
|
// A regex plus a callback cannot be typed into a control, so the rule is
|
|
62
72
|
// offered as named presets instead. Without this, badges could only be seen
|
|
63
73
|
// on the one story that hard-codes a rule.
|
|
@@ -30,6 +30,8 @@ const props = withDefaults(defineProps<CkCodeEditorProps>(), {
|
|
|
30
30
|
maxHeight: undefined,
|
|
31
31
|
autofocus: false,
|
|
32
32
|
scrollFade: true,
|
|
33
|
+
fadeTopBackground: 'secondary',
|
|
34
|
+
fadeBottomBackground: 'floating',
|
|
33
35
|
badge: undefined,
|
|
34
36
|
writeToClipboard: undefined,
|
|
35
37
|
});
|
|
@@ -84,8 +86,11 @@ const fadeProps = computed(() => {
|
|
|
84
86
|
const down = canScrollDown.value;
|
|
85
87
|
return {
|
|
86
88
|
position: edgeToFade(up, down),
|
|
87
|
-
|
|
88
|
-
|
|
89
|
+
style: {
|
|
90
|
+
'--ui-fade-mask-height': up || down ? FADE_HEIGHT : '0px',
|
|
91
|
+
'--ck-code-fade-top': `var(--background-surface-${props.fadeTopBackground})`,
|
|
92
|
+
'--ck-code-fade-bottom': `var(--background-surface-${props.fadeBottomBackground})`,
|
|
93
|
+
},
|
|
89
94
|
};
|
|
90
95
|
});
|
|
91
96
|
|
|
@@ -296,19 +301,15 @@ defineExpose({ focus, getCode });
|
|
|
296
301
|
* `theme.ts`, because `CkMilkdownEditor`'s code blocks use that theme too and
|
|
297
302
|
* must keep matching the rendered block. */
|
|
298
303
|
.ck-code-editor {
|
|
304
|
+
/* `theme.ts` paints the editor from these; transparent lets the root's
|
|
305
|
+
* input surface show through. */
|
|
299
306
|
--ck-cm-bg: transparent;
|
|
300
307
|
--ck-cm-foreground: oklch(var(--content-on-surface-primary));
|
|
301
308
|
--ck-cm-line-number: oklch(var(--content-on-surface-muted));
|
|
302
309
|
}
|
|
303
310
|
|
|
304
|
-
/*
|
|
305
|
-
*
|
|
306
|
-
.ck-code-editor__host :deep(.cm-editor) {
|
|
307
|
-
background: var(--ck-cm-bg);
|
|
308
|
-
color: var(--ck-cm-foreground);
|
|
309
|
-
}
|
|
310
|
-
|
|
311
|
-
/* Same declarations as the `body-14-regular` typography utility. */
|
|
311
|
+
/* `:deep` is needed below because CodeMirror builds its own DOM, which scoped
|
|
312
|
+
* styles do not reach. Same declarations as the `body-14-regular` typography utility. */
|
|
312
313
|
.ck-code-editor__host :deep(.cm-scroller) {
|
|
313
314
|
max-height: var(--ck-code-max-height, none);
|
|
314
315
|
font-family: Saans, sans-serif;
|
|
@@ -347,10 +348,29 @@ defineExpose({ focus, getCode });
|
|
|
347
348
|
color: oklch(var(--content-on-surface-muted));
|
|
348
349
|
}
|
|
349
350
|
|
|
350
|
-
/*
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
351
|
+
/* Each band fades into its own surface (`fadeTopBackground` /
|
|
352
|
+
* `fadeBottomBackground`), whereas `UiFadeMask`'s `background` sets one for
|
|
353
|
+
* both and only knows `primary` and `secondary`. The gradient, edges and band
|
|
354
|
+
* height stay the mask's own. `[data-background]` outranks the mask's
|
|
355
|
+
* per-surface rule regardless of stylesheet order. */
|
|
356
|
+
.ck-code-editor__body
|
|
357
|
+
:deep(.ui-fade-mask__band[data-background][data-position='top']) {
|
|
358
|
+
--ui-fade-mask-surface: var(--ck-code-fade-top);
|
|
359
|
+
/* The mask turns its top band opaque halfway down on desktop, which left a
|
|
360
|
+
* solid strip under the header; mirror the bottom band's stops instead. */
|
|
361
|
+
--ui-fade-mask-stop: 20%;
|
|
362
|
+
}
|
|
363
|
+
|
|
364
|
+
.ck-code-editor__body
|
|
365
|
+
:deep(.ui-fade-mask__band[data-background][data-position='bottom']) {
|
|
366
|
+
--ui-fade-mask-surface: var(--ck-code-fade-bottom);
|
|
367
|
+
}
|
|
368
|
+
|
|
369
|
+
@media (min-width: 768px) {
|
|
370
|
+
.ck-code-editor__body
|
|
371
|
+
:deep(.ui-fade-mask__band[data-background][data-position='top']) {
|
|
372
|
+
--ui-fade-mask-stop: 100%;
|
|
373
|
+
}
|
|
354
374
|
}
|
|
355
375
|
|
|
356
376
|
.ck-code-editor--disabled {
|
|
@@ -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
|
*
|
package/src/components/index.ts
CHANGED