@aleph-alpha/chat-kit 6.4.0 → 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-B0WUzTHa.js → CkHistory.vue_vue_type_script_setup_true_lang-wu1Zrvgc.js} +76 -14
- package/dist/adapters/responses-api.js +1 -1
- package/dist/chat-kit.css +101 -18
- package/dist/{code-palette-DH_G7mZ5.js → code-palette-BWrZDi47.js} +71 -35
- package/dist/components/base/CkCodeEditor/CkCodeEditor.stories.d.ts +2 -1
- package/dist/components/base/CkCodeEditor/CkCodeEditor.stories.d.ts.map +1 -1
- package/dist/components/base/CkCodeEditor/CkCodeEditor.vue.d.ts +3 -0
- package/dist/components/base/CkCodeEditor/CkCodeEditor.vue.d.ts.map +1 -1
- package/dist/components/base/CkCodeEditor/badgeDecoration.d.ts +2 -2
- package/dist/components/base/CkCodeEditor/createCodeMirror.d.ts +15 -1
- package/dist/components/base/CkCodeEditor/createCodeMirror.d.ts.map +1 -1
- package/dist/components/base/CkCodeEditor/types.d.ts +37 -6
- package/dist/components/base/CkCodeEditor/types.d.ts.map +1 -1
- package/dist/components/base/CkMarkdownRenderer/CkMarkdownRenderer.stories.d.ts +7 -0
- package/dist/components/base/CkMarkdownRenderer/CkMarkdownRenderer.stories.d.ts.map +1 -1
- package/dist/components/base/CkMarkdownRenderer/CkMarkdownRenderer.vue.d.ts +9 -0
- package/dist/components/base/CkMarkdownRenderer/CkMarkdownRenderer.vue.d.ts.map +1 -1
- package/dist/components/base/CkMarkdownRenderer/types.d.ts +13 -0
- package/dist/components/base/CkMarkdownRenderer/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/composables/index.js +1 -1
- package/dist/{createCodeMirror-5iswYetS.js → createCodeMirror-BO-TWTzn.js} +27 -9
- package/dist/{createCrepeEditor-C-AQ1w_e.js → createCrepeEditor-BGSlwmKn.js} +4 -4
- package/dist/handlers/index.js +2 -2
- package/dist/helpers/codemirror/theme.d.ts.map +1 -1
- package/dist/helpers/unified/remarkBreaks.d.ts +15 -0
- package/dist/helpers/unified/remarkBreaks.d.ts.map +1 -0
- package/dist/{index-DLjsqQHx.js → index--Yonjzfi.js} +3 -3
- package/dist/{index-Mh3WUU-6.js → index-2YPxXIaf.js} +1 -1
- package/dist/{index-CWp_t8Wl.js → index-B4uqe-fL.js} +2 -2
- package/dist/{index-hEJ_Bavx.js → index-Bfo4U-Al.js} +2 -2
- package/dist/{index-g2X42srv.js → index-Bw39pbRL.js} +3 -3
- package/dist/{index-CIF4qQzR.js → index-CGEgwupi.js} +4 -4
- package/dist/{index-Dbi75pKH.js → index-CZmdzLaU.js} +3 -3
- package/dist/{index-CR2kGrpY.js → index-CeaT_FBl.js} +3 -3
- package/dist/{index-DfLCrnVq.js → index-CefLTKmi.js} +2 -2
- package/dist/{index-CLdXUpL8.js → index-CfVHzirA.js} +5 -5
- package/dist/{index-D0IZW-Up.js → index-CrBanggA.js} +2 -2
- package/dist/{index-BlIc9r0r.js → index-Cx5ThXzs.js} +3 -3
- package/dist/{index-CZFx44C7.js → index-D0DQjdsq.js} +2 -2
- package/dist/{index-DPgw0Cf_.js → index-DH9e_hqJ.js} +2 -2
- package/dist/{index-hbS5PDHj.js → index-DTomeh-p.js} +3 -3
- package/dist/{index-GpSpJ3ti.js → index-DZGfsazg.js} +3 -3
- package/dist/{index-QAs789O5.js → index-DlLnTKv3.js} +2 -2
- package/dist/{index-ABUMl7H3.js → index-DqUiBDRo.js} +3 -3
- package/dist/{index-CFGO7LRz.js → index-GDUM7K5V.js} +2 -2
- package/dist/{index-Db5-PJG-.js → index-Hro6EPZS.js} +2 -2
- package/dist/{index-CG8e3146.js → index-KgumaL1c.js} +1 -1
- package/dist/{index-XZeturb3.js → index-TemHfU1M.js} +3 -3
- package/dist/{index-DKwEe_Tu.js → index-g_Bs6dNr.js} +4 -4
- package/dist/{index-S4ylc8JK.js → index-oO_X5wU0.js} +3 -3
- package/dist/{index-BqWO6mvz.js → index-ptbBQ53d.js} +4 -4
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5 -5
- package/dist/{markdownToPlainText-BOtlQ_BY.js → markdownToPlainText-DN_G-I6g.js} +1 -1
- package/dist/{useChatKitLabels-CatQSpfL.js → useChatKitLabels-DxW0N5U-.js} +1 -1
- package/dist/{useMessageHandler-nnsort0-.js → useMessageHandler-Bkzrdgfj.js} +1 -1
- package/package.json +1 -1
- package/src/components/base/CkCodeEditor/CkCodeEditor.spec.ts +128 -1
- package/src/components/base/CkCodeEditor/CkCodeEditor.stories.ts +13 -1
- package/src/components/base/CkCodeEditor/CkCodeEditor.vue +156 -19
- package/src/components/base/CkCodeEditor/badgeDecoration.ts +2 -2
- package/src/components/base/CkCodeEditor/createCodeMirror.ts +45 -8
- package/src/components/base/CkCodeEditor/types.ts +42 -6
- package/src/components/base/CkMarkdownRenderer/CkMarkdownRenderer.spec.ts +40 -0
- package/src/components/base/CkMarkdownRenderer/CkMarkdownRenderer.stories.ts +31 -0
- package/src/components/base/CkMarkdownRenderer/CkMarkdownRenderer.vue +3 -0
- package/src/components/base/CkMarkdownRenderer/types.ts +13 -0
- package/src/components/base/CkMilkdownEditor/milkdown-theme.css +6 -3
- package/src/components/base/index.ts +1 -0
- package/src/components/index.ts +1 -0
- package/src/helpers/codemirror/code-palette.css +23 -3
- package/src/helpers/codemirror/theme.ts +44 -8
- package/src/helpers/unified/remarkBreaks.ts +32 -0
- package/src/index.ts +1 -0
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { defineComponent, openBlock, createBlock, unref, createElementBlock, createElementVNode, normalizeClass, renderSlot, createCommentVNode, mergeProps, withCtx, ref, watch, onScopeDispose, computed, useTemplateRef, createVNode, toDisplayString, resolveDynamicComponent, onBeforeUnmount, useSlots, onMounted, nextTick, onUnmounted, Fragment, renderList, normalizeStyle, Transition, createStaticVNode, Teleport, withModifiers, toValue, h, toRefs, useId, createTextVNode, useAttrs, onUpdated, createSlots, normalizeProps, guardReactiveProps, Comment, Text } from "vue";
|
|
2
|
-
import { UiIcon, UiButton, UiFileType, UiTooltip, UiPopover, UiPopoverTrigger, UiPopoverContent, formatFileSize, UiDialog, UiDialogContent, UiDialogDescription, UiFieldLabel, UiToggleGroup, UiToggleGroupItem, UiField, UiTextarea, UiFileItem, UiProgress, Primitive, UiFloatActions, UiFloatActionItems, UiCodeBlock, UiAvatar, UiAvatarImage, UiSpinner, UiAvatarFallback, UiSidebarPopoverMenu, UiSidebarPopoverMenuItem } from "@aleph-alpha/ui-library";
|
|
3
|
-
import { u as useChatKitLabels, d as defaultChatKitLabels, r as remarkCitations, b as useMarkdownParser } from "./useChatKitLabels-
|
|
2
|
+
import { UiIcon, UiButton, UiFileType, UiTooltip, UiPopover, UiPopoverTrigger, UiPopoverContent, formatFileSize, UiDialog, UiDialogContent, UiDialogDescription, UiFieldLabel, UiToggleGroup, UiToggleGroupItem, UiField, UiTextarea, UiFileItem, UiProgress, Primitive, UiFloatActions, UiFloatActionItems, UiFadeMask, UiCodeBlock, UiAvatar, UiAvatarImage, UiSpinner, UiAvatarFallback, UiSidebarPopoverMenu, UiSidebarPopoverMenuItem } from "@aleph-alpha/ui-library";
|
|
3
|
+
import { u as useChatKitLabels, d as defaultChatKitLabels, r as remarkCitations, b as useMarkdownParser } from "./useChatKitLabels-DxW0N5U-.js";
|
|
4
|
+
import { f as findAndReplace } from "./index-CfVHzirA.js";
|
|
4
5
|
const MINUTE = 60;
|
|
5
6
|
const HOUR = 60 * MINUTE;
|
|
6
7
|
const DAY = 24 * HOUR;
|
|
@@ -1160,6 +1161,15 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
|
|
|
1160
1161
|
}
|
|
1161
1162
|
});
|
|
1162
1163
|
const CkFeedbackButton = /* @__PURE__ */ _export_sfc(_sfc_main$j, [["__scopeId", "data-v-c4c638c3"]]);
|
|
1164
|
+
const SOFT_BREAK_RE = /\r?\n/g;
|
|
1165
|
+
const remarkBreaks = () => {
|
|
1166
|
+
return (tree) => {
|
|
1167
|
+
findAndReplace(tree, [
|
|
1168
|
+
SOFT_BREAK_RE,
|
|
1169
|
+
() => ({ type: "break" })
|
|
1170
|
+
]);
|
|
1171
|
+
};
|
|
1172
|
+
};
|
|
1163
1173
|
function useCitationRendering(citations, onOpenSource) {
|
|
1164
1174
|
const sourcesByIndex = computed(
|
|
1165
1175
|
() => new Map(
|
|
@@ -1251,6 +1261,7 @@ const _sfc_main$i = defineComponent({
|
|
|
1251
1261
|
default: () => ({})
|
|
1252
1262
|
},
|
|
1253
1263
|
plugins: { type: Array, default: void 0 },
|
|
1264
|
+
breaks: { type: Boolean, default: false },
|
|
1254
1265
|
citations: {
|
|
1255
1266
|
type: Array,
|
|
1256
1267
|
default: void 0
|
|
@@ -1271,6 +1282,7 @@ const _sfc_main$i = defineComponent({
|
|
|
1271
1282
|
);
|
|
1272
1283
|
const effectivePlugins = computed(() => [
|
|
1273
1284
|
...props.plugins ?? [],
|
|
1285
|
+
...props.breaks ? [remarkBreaks] : [],
|
|
1274
1286
|
...citationPlugins.value
|
|
1275
1287
|
]);
|
|
1276
1288
|
const { html } = useMarkdownParser(content, effectivePlugins);
|
|
@@ -2733,7 +2745,7 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
2733
2745
|
onMounted(async () => {
|
|
2734
2746
|
const root = rootRef.value;
|
|
2735
2747
|
if (!root) return;
|
|
2736
|
-
const { createCrepeEditor } = await import("./createCrepeEditor-
|
|
2748
|
+
const { createCrepeEditor } = await import("./createCrepeEditor-BGSlwmKn.js");
|
|
2737
2749
|
if (destroyed) return;
|
|
2738
2750
|
const initialMarkdown = props.modelValue;
|
|
2739
2751
|
lastKnownMarkdown = initialMarkdown;
|
|
@@ -2814,6 +2826,7 @@ const _hoisted_2 = {
|
|
|
2814
2826
|
class: "bg-background-surface-muted-subtle flex h-9 items-center justify-between px-3"
|
|
2815
2827
|
};
|
|
2816
2828
|
const _hoisted_3 = { class: "text-content-on-surface-secondary label-12-regular" };
|
|
2829
|
+
const FADE_HEIGHT = "53px";
|
|
2817
2830
|
const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
2818
2831
|
...{ name: "CkCodeEditor" },
|
|
2819
2832
|
__name: "CkCodeEditor",
|
|
@@ -2830,6 +2843,9 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
2830
2843
|
showLineNumbers: { type: Boolean, default: true },
|
|
2831
2844
|
lineWrapping: { type: Boolean, default: false },
|
|
2832
2845
|
maxHeight: { default: void 0 },
|
|
2846
|
+
scrollFade: { type: Boolean, default: true },
|
|
2847
|
+
fadeTopBackground: { default: "secondary" },
|
|
2848
|
+
fadeBottomBackground: { default: "floating" },
|
|
2833
2849
|
autofocus: { type: Boolean, default: false },
|
|
2834
2850
|
badge: { default: void 0 },
|
|
2835
2851
|
writeToClipboard: { type: Function, default: void 0 }
|
|
@@ -2851,6 +2867,43 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
2851
2867
|
const copyLabel = computed(
|
|
2852
2868
|
() => isCopied.value ? labels.value.codeEditorCopied ?? "Copied" : labels.value.codeEditorCopy ?? "Copy code"
|
|
2853
2869
|
);
|
|
2870
|
+
const canScrollUp = ref(false);
|
|
2871
|
+
const canScrollDown = ref(false);
|
|
2872
|
+
let scrollTarget;
|
|
2873
|
+
let scrollObserver;
|
|
2874
|
+
function edgeToFade(up, down) {
|
|
2875
|
+
if (up && down) return "both";
|
|
2876
|
+
return up ? "top" : "bottom";
|
|
2877
|
+
}
|
|
2878
|
+
const fadeProps = computed(() => {
|
|
2879
|
+
if (!props.scrollFade) return {};
|
|
2880
|
+
const up = canScrollUp.value;
|
|
2881
|
+
const down = canScrollDown.value;
|
|
2882
|
+
return {
|
|
2883
|
+
position: edgeToFade(up, down),
|
|
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
|
+
}
|
|
2889
|
+
};
|
|
2890
|
+
});
|
|
2891
|
+
function syncScrollFades() {
|
|
2892
|
+
if (!scrollTarget) return;
|
|
2893
|
+
const { scrollTop, scrollHeight, clientHeight } = scrollTarget;
|
|
2894
|
+
canScrollUp.value = scrollTop > 1;
|
|
2895
|
+
canScrollDown.value = scrollTop + clientHeight < scrollHeight - 1;
|
|
2896
|
+
}
|
|
2897
|
+
function watchScrolling(scroller, content) {
|
|
2898
|
+
scrollTarget = scroller;
|
|
2899
|
+
scroller.addEventListener("scroll", syncScrollFades, { passive: true });
|
|
2900
|
+
if (typeof ResizeObserver !== "undefined") {
|
|
2901
|
+
scrollObserver = new ResizeObserver(syncScrollFades);
|
|
2902
|
+
scrollObserver.observe(scroller);
|
|
2903
|
+
scrollObserver.observe(content);
|
|
2904
|
+
}
|
|
2905
|
+
syncScrollFades();
|
|
2906
|
+
}
|
|
2854
2907
|
let editor;
|
|
2855
2908
|
let destroyed = false;
|
|
2856
2909
|
let lastKnownCode = props.modelValue;
|
|
@@ -2863,7 +2916,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
2863
2916
|
onMounted(async () => {
|
|
2864
2917
|
const parent = hostRef.value;
|
|
2865
2918
|
if (!parent) return;
|
|
2866
|
-
const { createCodeMirror } = await import("./createCodeMirror-
|
|
2919
|
+
const { createCodeMirror } = await import("./createCodeMirror-BO-TWTzn.js");
|
|
2867
2920
|
if (destroyed) return;
|
|
2868
2921
|
const initialCode = props.modelValue;
|
|
2869
2922
|
lastKnownCode = initialCode;
|
|
@@ -2878,8 +2931,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
2878
2931
|
lineWrapping: props.lineWrapping,
|
|
2879
2932
|
badge: props.badge,
|
|
2880
2933
|
onChange: handleChange,
|
|
2881
|
-
onFocus: () => emit("focus")
|
|
2882
|
-
onBlur: () => emit("blur")
|
|
2934
|
+
onFocus: () => emit("focus")
|
|
2883
2935
|
});
|
|
2884
2936
|
if (destroyed) {
|
|
2885
2937
|
handle.destroy();
|
|
@@ -2887,6 +2939,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
2887
2939
|
}
|
|
2888
2940
|
editor = handle;
|
|
2889
2941
|
if (props.modelValue !== initialCode) handle.setCode(props.modelValue);
|
|
2942
|
+
watchScrolling(handle.view.scrollDOM, handle.view.contentDOM);
|
|
2890
2943
|
isReady.value = true;
|
|
2891
2944
|
if (props.autofocus) handle.focus();
|
|
2892
2945
|
});
|
|
@@ -2896,6 +2949,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
2896
2949
|
if (next === lastKnownCode) return;
|
|
2897
2950
|
lastKnownCode = next;
|
|
2898
2951
|
editor?.setCode(next);
|
|
2952
|
+
void nextTick(syncScrollFades);
|
|
2899
2953
|
}
|
|
2900
2954
|
);
|
|
2901
2955
|
watch(
|
|
@@ -2920,6 +2974,9 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
2920
2974
|
onBeforeUnmount(() => {
|
|
2921
2975
|
destroyed = true;
|
|
2922
2976
|
clearTimeout(copyTimer);
|
|
2977
|
+
scrollTarget?.removeEventListener("scroll", syncScrollFades);
|
|
2978
|
+
scrollObserver?.disconnect();
|
|
2979
|
+
scrollTarget = void 0;
|
|
2923
2980
|
editor?.destroy();
|
|
2924
2981
|
editor = void 0;
|
|
2925
2982
|
});
|
|
@@ -2955,7 +3012,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
2955
3012
|
ref_key: "rootRef",
|
|
2956
3013
|
ref: rootRef,
|
|
2957
3014
|
class: normalizeClass([
|
|
2958
|
-
"ck-code-editor ck-code-surface border-border-surface-default min-w-0 overflow-hidden rounded-
|
|
3015
|
+
"ck-code-editor ck-code-surface border-border-surface-default bg-background-input-default min-w-0 overflow-hidden rounded-xl border",
|
|
2959
3016
|
isReady.value && "ck-code-editor--ready",
|
|
2960
3017
|
isLocked.value && "ck-code-editor--readonly",
|
|
2961
3018
|
__props.disabled && "ck-code-editor--disabled"
|
|
@@ -2981,17 +3038,22 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
2981
3038
|
_: 1
|
|
2982
3039
|
}, 8, ["aria-label"])) : createCommentVNode("", true)
|
|
2983
3040
|
])) : createCommentVNode("", true),
|
|
2984
|
-
|
|
2985
|
-
|
|
2986
|
-
|
|
2987
|
-
|
|
2988
|
-
|
|
2989
|
-
|
|
3041
|
+
(openBlock(), createBlock(resolveDynamicComponent(__props.scrollFade ? unref(UiFadeMask) : "div"), mergeProps(fadeProps.value, { class: "ck-code-editor__body min-w-0" }), {
|
|
3042
|
+
default: withCtx(() => [
|
|
3043
|
+
createElementVNode("div", {
|
|
3044
|
+
ref_key: "hostRef",
|
|
3045
|
+
ref: hostRef,
|
|
3046
|
+
class: "ck-code-editor__host",
|
|
3047
|
+
style: normalizeStyle(__props.maxHeight ? { "--ck-code-max-height": __props.maxHeight } : void 0)
|
|
3048
|
+
}, null, 4)
|
|
3049
|
+
]),
|
|
3050
|
+
_: 1
|
|
3051
|
+
}, 16))
|
|
2990
3052
|
], 42, _hoisted_1$1);
|
|
2991
3053
|
};
|
|
2992
3054
|
}
|
|
2993
3055
|
});
|
|
2994
|
-
const CkCodeEditor = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-
|
|
3056
|
+
const CkCodeEditor = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-6dfa80b5"]]);
|
|
2995
3057
|
const _hoisted_1 = {
|
|
2996
3058
|
key: 1,
|
|
2997
3059
|
class: "flex size-8 shrink-0 items-center justify-center rounded-2xl bg-background-surface-muted-subtle"
|
package/dist/chat-kit.css
CHANGED
|
@@ -170,22 +170,82 @@
|
|
|
170
170
|
pointer-events: none;
|
|
171
171
|
}
|
|
172
172
|
|
|
173
|
-
/* The
|
|
174
|
-
*
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
.ck-code-
|
|
173
|
+
/* The body follows the design-system field rather than `UiCodeBlock`: body
|
|
174
|
+
* text in the primary content colour on the input surface, with muted mono
|
|
175
|
+
* line numbers. Only the syntax colours stay shared with `UiCodeBlock` (see
|
|
176
|
+
* `helpers/codemirror/code-palette.css`). The overrides live here, not in
|
|
177
|
+
* `theme.ts`, because `CkMilkdownEditor`'s code blocks use that theme too and
|
|
178
|
+
* must keep matching the rendered block. */
|
|
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. */
|
|
182
|
+
--ck-cm-bg: transparent;
|
|
183
|
+
--ck-cm-foreground: oklch(var(--content-on-surface-primary));
|
|
184
|
+
--ck-cm-line-number: oklch(var(--content-on-surface-muted));
|
|
185
|
+
}
|
|
186
|
+
|
|
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 {
|
|
180
190
|
max-height: var(--ck-code-max-height, none);
|
|
191
|
+
font-family: Saans, sans-serif;
|
|
192
|
+
font-size: 0.875rem;
|
|
193
|
+
font-weight: 400;
|
|
194
|
+
line-height: 1.25rem;
|
|
181
195
|
}
|
|
182
196
|
|
|
183
|
-
/*
|
|
184
|
-
|
|
185
|
-
.ck-code-
|
|
186
|
-
|
|
197
|
+
/* 12px below the header, 16px above the bottom edge, and a 20px right inset,
|
|
198
|
+
* as in the design. */
|
|
199
|
+
.ck-code-editor__host[data-v-6dfa80b5] .cm-content {
|
|
200
|
+
padding: 0.75rem 1.25rem 1rem 1rem;
|
|
187
201
|
}
|
|
188
|
-
|
|
202
|
+
|
|
203
|
+
/* The number column already carries the 1rem left inset, so the code must not
|
|
204
|
+
* pay for it a second time. The sibling selector only matches while the gutter
|
|
205
|
+
* is mounted, which is exactly when `showLineNumbers` is on. */
|
|
206
|
+
.ck-code-editor__host[data-v-6dfa80b5] .cm-gutters ~ .cm-content {
|
|
207
|
+
padding-left: 0;
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
/* Numbers stay monospaced so the column does not jitter as digits change; the
|
|
211
|
+
* 12px right padding is the gap before the code. */
|
|
212
|
+
.ck-code-editor__host[data-v-6dfa80b5] .cm-lineNumbers .cm-gutterElement {
|
|
213
|
+
min-width: 0;
|
|
214
|
+
padding: 0 0.75rem 0 1rem;
|
|
215
|
+
/* `CODE_FONT_FAMILY` from `theme.ts`, repeated because importing it here
|
|
216
|
+
* would pull CodeMirror out of its lazy chunk. */
|
|
217
|
+
font-family:
|
|
218
|
+
ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, 'Liberation Mono',
|
|
219
|
+
monospace;
|
|
220
|
+
font-weight: 500;
|
|
221
|
+
}
|
|
222
|
+
.ck-code-editor__host[data-v-6dfa80b5] .cm-placeholder {
|
|
223
|
+
color: oklch(var(--content-on-surface-muted));
|
|
224
|
+
}
|
|
225
|
+
|
|
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
|
+
}
|
|
247
|
+
}
|
|
248
|
+
.ck-code-editor--disabled[data-v-6dfa80b5] {
|
|
189
249
|
opacity: 0.6;
|
|
190
250
|
cursor: not-allowed;
|
|
191
251
|
pointer-events: none;
|
|
@@ -207,11 +267,23 @@
|
|
|
207
267
|
* Exact parity is not achievable for every token: Shiki classifies with
|
|
208
268
|
* TextMate grammars and CodeMirror with Lezer, and the two disagree at the
|
|
209
269
|
* edges. The mapping in `theme.ts` targets the classes that actually occur in
|
|
210
|
-
* everyday code.
|
|
270
|
+
* everyday code. Where one Lezer tag covers cases the GitHub themes colour
|
|
271
|
+
* differently, the mapping follows the more common one, which leaves a few
|
|
272
|
+
* known gaps: YAML keys and plain scalars both arrive as tags that mean
|
|
273
|
+
* something else in JavaScript, so they stay unhighlighted; `typeName` is blue
|
|
274
|
+
* here because that is right for TypeScript's primitives, though Rust and Go
|
|
275
|
+
* would want purple and red; and a fenced code block inside a Markdown
|
|
276
|
+
* document is not highlighted in its own language the way Shiki's embedded
|
|
277
|
+
* grammars do it.
|
|
211
278
|
*/
|
|
212
279
|
|
|
213
280
|
.ck-code-surface {
|
|
214
|
-
|
|
281
|
+
/* Held as bare oklch components, not a hex, because that is the form both
|
|
282
|
+
* `oklch()` and `UiFadeMask`'s surface variable need in order to fade the
|
|
283
|
+
* colour out to zero alpha. `--ck-cm-bg` is derived from it so there is one
|
|
284
|
+
* source of truth. */
|
|
285
|
+
--ck-cm-bg-components: 100% 0 89.88;
|
|
286
|
+
--ck-cm-bg: oklch(var(--ck-cm-bg-components));
|
|
215
287
|
--ck-cm-foreground: #24292e;
|
|
216
288
|
--ck-cm-keyword: #d73a49;
|
|
217
289
|
--ck-cm-string: #032f62;
|
|
@@ -226,10 +298,18 @@
|
|
|
226
298
|
--ck-cm-tag: #22863a;
|
|
227
299
|
--ck-cm-error: #b31d28;
|
|
228
300
|
--ck-cm-selection: oklch(var(--background-accent-soft));
|
|
301
|
+
/* Line numbers. `UiCodeBlock` draws its gutter as the code foreground at
|
|
302
|
+
* 40% opacity rather than as a colour of its own, so this is derived from
|
|
303
|
+
* `--ck-cm-foreground` and needs no dark-mode counterpart. */
|
|
304
|
+
--ck-cm-line-number: color-mix(
|
|
305
|
+
in oklab,
|
|
306
|
+
var(--ck-cm-foreground) 40%,
|
|
307
|
+
transparent
|
|
308
|
+
);
|
|
229
309
|
}
|
|
230
310
|
|
|
231
311
|
html.dark .ck-code-surface {
|
|
232
|
-
--ck-cm-bg:
|
|
312
|
+
--ck-cm-bg-components: 27.81% 0.0117 248.25;
|
|
233
313
|
--ck-cm-foreground: #e1e4e8;
|
|
234
314
|
--ck-cm-keyword: #f97583;
|
|
235
315
|
--ck-cm-string: #9ecbff;
|
|
@@ -1372,9 +1452,12 @@ img.ProseMirror-separator {
|
|
|
1372
1452
|
.milkdown-code-block
|
|
1373
1453
|
.cm-lineNumbers
|
|
1374
1454
|
.cm-gutterElement {
|
|
1375
|
-
|
|
1376
|
-
|
|
1377
|
-
|
|
1455
|
+
/* Geometry and colour come from `theme.ts`, which matches `UiCodeBlock`'s
|
|
1456
|
+
* gutter; this rule only exists because Crepe's own code-block styles would
|
|
1457
|
+
* otherwise win on specificity. */
|
|
1458
|
+
min-width: 4rem;
|
|
1459
|
+
padding: 0 1rem;
|
|
1460
|
+
color: var(--ck-cm-line-number);
|
|
1378
1461
|
text-align: right;
|
|
1379
1462
|
}
|
|
1380
1463
|
|
|
@@ -19273,7 +19273,7 @@ function legacy(parser) {
|
|
|
19273
19273
|
return new LanguageSupport(StreamLanguage.define(parser));
|
|
19274
19274
|
}
|
|
19275
19275
|
function sql(dialectName) {
|
|
19276
|
-
return import("./index-
|
|
19276
|
+
return import("./index-DZGfsazg.js").then((m) => m.sql({ dialect: m[dialectName] }));
|
|
19277
19277
|
}
|
|
19278
19278
|
const languages = [
|
|
19279
19279
|
// New-style language modes
|
|
@@ -19281,7 +19281,7 @@ const languages = [
|
|
|
19281
19281
|
name: "C",
|
|
19282
19282
|
extensions: ["c", "h", "ino"],
|
|
19283
19283
|
load() {
|
|
19284
|
-
return import("./index-
|
|
19284
|
+
return import("./index-B4uqe-fL.js").then((m) => m.cpp());
|
|
19285
19285
|
}
|
|
19286
19286
|
}),
|
|
19287
19287
|
/* @__PURE__ */ LanguageDescription.of({
|
|
@@ -19289,7 +19289,7 @@ const languages = [
|
|
|
19289
19289
|
alias: ["cpp"],
|
|
19290
19290
|
extensions: ["cpp", "c++", "cc", "cxx", "hpp", "h++", "hh", "hxx"],
|
|
19291
19291
|
load() {
|
|
19292
|
-
return import("./index-
|
|
19292
|
+
return import("./index-B4uqe-fL.js").then((m) => m.cpp());
|
|
19293
19293
|
}
|
|
19294
19294
|
}),
|
|
19295
19295
|
/* @__PURE__ */ LanguageDescription.of({
|
|
@@ -19304,14 +19304,14 @@ const languages = [
|
|
|
19304
19304
|
name: "CSS",
|
|
19305
19305
|
extensions: ["css"],
|
|
19306
19306
|
load() {
|
|
19307
|
-
return import("./index-
|
|
19307
|
+
return import("./index-CefLTKmi.js").then((m) => m.css());
|
|
19308
19308
|
}
|
|
19309
19309
|
}),
|
|
19310
19310
|
/* @__PURE__ */ LanguageDescription.of({
|
|
19311
19311
|
name: "Go",
|
|
19312
19312
|
extensions: ["go"],
|
|
19313
19313
|
load() {
|
|
19314
|
-
return import("./index-
|
|
19314
|
+
return import("./index-Bw39pbRL.js").then((m) => m.go());
|
|
19315
19315
|
}
|
|
19316
19316
|
}),
|
|
19317
19317
|
/* @__PURE__ */ LanguageDescription.of({
|
|
@@ -19319,14 +19319,14 @@ const languages = [
|
|
|
19319
19319
|
alias: ["xhtml"],
|
|
19320
19320
|
extensions: ["html", "htm", "handlebars", "hbs"],
|
|
19321
19321
|
load() {
|
|
19322
|
-
return import("./index-
|
|
19322
|
+
return import("./index-ptbBQ53d.js").then((m) => m.html());
|
|
19323
19323
|
}
|
|
19324
19324
|
}),
|
|
19325
19325
|
/* @__PURE__ */ LanguageDescription.of({
|
|
19326
19326
|
name: "Java",
|
|
19327
19327
|
extensions: ["java"],
|
|
19328
19328
|
load() {
|
|
19329
|
-
return import("./index-
|
|
19329
|
+
return import("./index-Bfo4U-Al.js").then((m) => m.java());
|
|
19330
19330
|
}
|
|
19331
19331
|
}),
|
|
19332
19332
|
/* @__PURE__ */ LanguageDescription.of({
|
|
@@ -19334,14 +19334,14 @@ const languages = [
|
|
|
19334
19334
|
alias: ["ecmascript", "js", "node"],
|
|
19335
19335
|
extensions: ["js", "mjs", "cjs"],
|
|
19336
19336
|
load() {
|
|
19337
|
-
return import("./index-
|
|
19337
|
+
return import("./index-Cx5ThXzs.js").then((m) => m.javascript());
|
|
19338
19338
|
}
|
|
19339
19339
|
}),
|
|
19340
19340
|
/* @__PURE__ */ LanguageDescription.of({
|
|
19341
19341
|
name: "Jinja",
|
|
19342
19342
|
extensions: ["j2", "jinja", "jinja2"],
|
|
19343
19343
|
load() {
|
|
19344
|
-
return import("./index
|
|
19344
|
+
return import("./index--Yonjzfi.js").then((m) => m.jinja());
|
|
19345
19345
|
}
|
|
19346
19346
|
}),
|
|
19347
19347
|
/* @__PURE__ */ LanguageDescription.of({
|
|
@@ -19349,28 +19349,28 @@ const languages = [
|
|
|
19349
19349
|
alias: ["json5"],
|
|
19350
19350
|
extensions: ["json", "map"],
|
|
19351
19351
|
load() {
|
|
19352
|
-
return import("./index-
|
|
19352
|
+
return import("./index-Hro6EPZS.js").then((m) => m.json());
|
|
19353
19353
|
}
|
|
19354
19354
|
}),
|
|
19355
19355
|
/* @__PURE__ */ LanguageDescription.of({
|
|
19356
19356
|
name: "JSX",
|
|
19357
19357
|
extensions: ["jsx"],
|
|
19358
19358
|
load() {
|
|
19359
|
-
return import("./index-
|
|
19359
|
+
return import("./index-Cx5ThXzs.js").then((m) => m.javascript({ jsx: true }));
|
|
19360
19360
|
}
|
|
19361
19361
|
}),
|
|
19362
19362
|
/* @__PURE__ */ LanguageDescription.of({
|
|
19363
19363
|
name: "LESS",
|
|
19364
19364
|
extensions: ["less"],
|
|
19365
19365
|
load() {
|
|
19366
|
-
return import("./index-
|
|
19366
|
+
return import("./index-TemHfU1M.js").then((m) => m.less());
|
|
19367
19367
|
}
|
|
19368
19368
|
}),
|
|
19369
19369
|
/* @__PURE__ */ LanguageDescription.of({
|
|
19370
19370
|
name: "Liquid",
|
|
19371
19371
|
extensions: ["liquid"],
|
|
19372
19372
|
load() {
|
|
19373
|
-
return import("./index-
|
|
19373
|
+
return import("./index-oO_X5wU0.js").then((m) => m.liquid());
|
|
19374
19374
|
}
|
|
19375
19375
|
}),
|
|
19376
19376
|
/* @__PURE__ */ LanguageDescription.of({
|
|
@@ -19383,7 +19383,7 @@ const languages = [
|
|
|
19383
19383
|
name: "Markdown",
|
|
19384
19384
|
extensions: ["md", "markdown", "mkd"],
|
|
19385
19385
|
load() {
|
|
19386
|
-
return import("./index-
|
|
19386
|
+
return import("./index-DTomeh-p.js").then((m) => m.markdown());
|
|
19387
19387
|
}
|
|
19388
19388
|
}),
|
|
19389
19389
|
/* @__PURE__ */ LanguageDescription.of({
|
|
@@ -19402,7 +19402,7 @@ const languages = [
|
|
|
19402
19402
|
name: "PHP",
|
|
19403
19403
|
extensions: ["php", "php3", "php4", "php5", "php7", "phtml"],
|
|
19404
19404
|
load() {
|
|
19405
|
-
return import("./index-
|
|
19405
|
+
return import("./index-CeaT_FBl.js").then((m) => m.php());
|
|
19406
19406
|
}
|
|
19407
19407
|
}),
|
|
19408
19408
|
/* @__PURE__ */ LanguageDescription.of({
|
|
@@ -19423,28 +19423,28 @@ const languages = [
|
|
|
19423
19423
|
extensions: ["BUILD", "bzl", "py", "pyw"],
|
|
19424
19424
|
filename: /^(BUCK|BUILD)$/,
|
|
19425
19425
|
load() {
|
|
19426
|
-
return import("./index-
|
|
19426
|
+
return import("./index-CZmdzLaU.js").then((m) => m.python());
|
|
19427
19427
|
}
|
|
19428
19428
|
}),
|
|
19429
19429
|
/* @__PURE__ */ LanguageDescription.of({
|
|
19430
19430
|
name: "Rust",
|
|
19431
19431
|
extensions: ["rs"],
|
|
19432
19432
|
load() {
|
|
19433
|
-
return import("./index-
|
|
19433
|
+
return import("./index-GDUM7K5V.js").then((m) => m.rust());
|
|
19434
19434
|
}
|
|
19435
19435
|
}),
|
|
19436
19436
|
/* @__PURE__ */ LanguageDescription.of({
|
|
19437
19437
|
name: "Sass",
|
|
19438
19438
|
extensions: ["sass"],
|
|
19439
19439
|
load() {
|
|
19440
|
-
return import("./index-
|
|
19440
|
+
return import("./index-DqUiBDRo.js").then((m) => m.sass({ indented: true }));
|
|
19441
19441
|
}
|
|
19442
19442
|
}),
|
|
19443
19443
|
/* @__PURE__ */ LanguageDescription.of({
|
|
19444
19444
|
name: "SCSS",
|
|
19445
19445
|
extensions: ["scss"],
|
|
19446
19446
|
load() {
|
|
19447
|
-
return import("./index-
|
|
19447
|
+
return import("./index-DqUiBDRo.js").then((m) => m.sass());
|
|
19448
19448
|
}
|
|
19449
19449
|
}),
|
|
19450
19450
|
/* @__PURE__ */ LanguageDescription.of({
|
|
@@ -19464,7 +19464,7 @@ const languages = [
|
|
|
19464
19464
|
name: "TSX",
|
|
19465
19465
|
extensions: ["tsx"],
|
|
19466
19466
|
load() {
|
|
19467
|
-
return import("./index-
|
|
19467
|
+
return import("./index-Cx5ThXzs.js").then((m) => m.javascript({ jsx: true, typescript: true }));
|
|
19468
19468
|
}
|
|
19469
19469
|
}),
|
|
19470
19470
|
/* @__PURE__ */ LanguageDescription.of({
|
|
@@ -19472,14 +19472,14 @@ const languages = [
|
|
|
19472
19472
|
alias: ["ts"],
|
|
19473
19473
|
extensions: ["ts", "mts", "cts"],
|
|
19474
19474
|
load() {
|
|
19475
|
-
return import("./index-
|
|
19475
|
+
return import("./index-Cx5ThXzs.js").then((m) => m.javascript({ typescript: true }));
|
|
19476
19476
|
}
|
|
19477
19477
|
}),
|
|
19478
19478
|
/* @__PURE__ */ LanguageDescription.of({
|
|
19479
19479
|
name: "WebAssembly",
|
|
19480
19480
|
extensions: ["wat", "wast"],
|
|
19481
19481
|
load() {
|
|
19482
|
-
return import("./index-
|
|
19482
|
+
return import("./index-DlLnTKv3.js").then((m) => m.wast());
|
|
19483
19483
|
}
|
|
19484
19484
|
}),
|
|
19485
19485
|
/* @__PURE__ */ LanguageDescription.of({
|
|
@@ -19487,7 +19487,7 @@ const languages = [
|
|
|
19487
19487
|
alias: ["rss", "wsdl", "xsd"],
|
|
19488
19488
|
extensions: ["xml", "xsl", "xsd", "svg"],
|
|
19489
19489
|
load() {
|
|
19490
|
-
return import("./index-
|
|
19490
|
+
return import("./index-CrBanggA.js").then((m) => m.xml());
|
|
19491
19491
|
}
|
|
19492
19492
|
}),
|
|
19493
19493
|
/* @__PURE__ */ LanguageDescription.of({
|
|
@@ -19495,7 +19495,7 @@ const languages = [
|
|
|
19495
19495
|
alias: ["yml"],
|
|
19496
19496
|
extensions: ["yaml", "yml"],
|
|
19497
19497
|
load() {
|
|
19498
|
-
return import("./index-
|
|
19498
|
+
return import("./index-DH9e_hqJ.js").then((m) => m.yaml());
|
|
19499
19499
|
}
|
|
19500
19500
|
}),
|
|
19501
19501
|
// Legacy modes ported from CodeMirror 5
|
|
@@ -20284,13 +20284,13 @@ const languages = [
|
|
|
20284
20284
|
name: "Vue",
|
|
20285
20285
|
extensions: ["vue"],
|
|
20286
20286
|
load() {
|
|
20287
|
-
return import("./index-
|
|
20287
|
+
return import("./index-CGEgwupi.js").then((m) => m.vue());
|
|
20288
20288
|
}
|
|
20289
20289
|
}),
|
|
20290
20290
|
/* @__PURE__ */ LanguageDescription.of({
|
|
20291
20291
|
name: "Angular Template",
|
|
20292
20292
|
load() {
|
|
20293
|
-
return import("./index-
|
|
20293
|
+
return import("./index-g_Bs6dNr.js").then((m) => m.angular());
|
|
20294
20294
|
}
|
|
20295
20295
|
})
|
|
20296
20296
|
];
|
|
@@ -21398,12 +21398,22 @@ const ckHighlightStyle = HighlightStyle.define([
|
|
|
21398
21398
|
tags.definitionKeyword,
|
|
21399
21399
|
tags.moduleKeyword,
|
|
21400
21400
|
tags.operatorKeyword,
|
|
21401
|
-
tags.operator
|
|
21401
|
+
tags.operator,
|
|
21402
|
+
// CSS units (`px`, `rem`) are `keyword.other.unit` to a TextMate grammar.
|
|
21403
|
+
tags.unit
|
|
21402
21404
|
],
|
|
21403
21405
|
color: cssVar("keyword")
|
|
21404
21406
|
},
|
|
21405
21407
|
{
|
|
21406
|
-
tag: [
|
|
21408
|
+
tag: [
|
|
21409
|
+
tags.string,
|
|
21410
|
+
tags.special(tags.string),
|
|
21411
|
+
tags.regexp,
|
|
21412
|
+
tags.escape,
|
|
21413
|
+
tags.character,
|
|
21414
|
+
// `class="card"` — the quoted value is a string, not a constant.
|
|
21415
|
+
tags.attributeValue
|
|
21416
|
+
],
|
|
21407
21417
|
color: cssVar("string")
|
|
21408
21418
|
},
|
|
21409
21419
|
{
|
|
@@ -21419,7 +21429,8 @@ const ckHighlightStyle = HighlightStyle.define([
|
|
|
21419
21429
|
tags.definition(tags.typeName),
|
|
21420
21430
|
tags.className,
|
|
21421
21431
|
tags.namespace,
|
|
21422
|
-
|
|
21432
|
+
// `entity.other.attribute-name`, which GitHub colours like any entity.
|
|
21433
|
+
tags.attributeName
|
|
21423
21434
|
],
|
|
21424
21435
|
color: cssVar("function")
|
|
21425
21436
|
},
|
|
@@ -21436,19 +21447,35 @@ const ckHighlightStyle = HighlightStyle.define([
|
|
|
21436
21447
|
tags.typeName,
|
|
21437
21448
|
tags.standard(tags.typeName),
|
|
21438
21449
|
tags.propertyName,
|
|
21439
|
-
|
|
21440
|
-
tags.
|
|
21450
|
+
// `this` / `self` are `variable.language`, which GitHub paints blue.
|
|
21451
|
+
tags.self,
|
|
21452
|
+
// CSS colour literals (`#ff0066`), `constant.other.color-*`.
|
|
21453
|
+
tags.color,
|
|
21454
|
+
// Bare identifiers a grammar cannot classify further — SQL column and
|
|
21455
|
+
// table names, for one. Every more specific name tag has its own rule
|
|
21456
|
+
// above, so this only catches what would otherwise be unstyled.
|
|
21457
|
+
tags.name
|
|
21441
21458
|
],
|
|
21442
21459
|
color: cssVar("constant")
|
|
21443
21460
|
},
|
|
21444
21461
|
// A declared property name, which UiCodeBlock renders in the text token.
|
|
21445
21462
|
{ tag: tags.definition(tags.propertyName), color: cssVar("property") },
|
|
21446
|
-
{ tag:
|
|
21463
|
+
{ tag: tags.tagName, color: cssVar("tag") },
|
|
21464
|
+
// Markdown blockquotes are `markup.quote`, the same green as a tag name.
|
|
21465
|
+
{ tag: tags.quote, color: cssVar("tag") },
|
|
21447
21466
|
{
|
|
21448
|
-
tag: [
|
|
21467
|
+
tag: [
|
|
21468
|
+
tags.variableName,
|
|
21469
|
+
tags.punctuation,
|
|
21470
|
+
tags.bracket,
|
|
21471
|
+
tags.separator,
|
|
21472
|
+
// `<`, `>` and `</` are plain text in the GitHub themes; only the tag
|
|
21473
|
+
// name inside them is green.
|
|
21474
|
+
tags.angleBracket
|
|
21475
|
+
],
|
|
21449
21476
|
color: cssVar("foreground")
|
|
21450
21477
|
},
|
|
21451
|
-
{ tag: tags.heading, fontWeight: "bold" },
|
|
21478
|
+
{ tag: tags.heading, color: cssVar("constant"), fontWeight: "bold" },
|
|
21452
21479
|
{ tag: tags.strong, fontWeight: "bold" },
|
|
21453
21480
|
{ tag: tags.emphasis, fontStyle: "italic" },
|
|
21454
21481
|
{ tag: tags.link, textDecoration: "underline" },
|
|
@@ -21478,7 +21505,16 @@ const ckCodeMirrorTheme = [
|
|
|
21478
21505
|
".cm-gutters": {
|
|
21479
21506
|
backgroundColor: "transparent",
|
|
21480
21507
|
borderRight: "none",
|
|
21481
|
-
color: cssVar("
|
|
21508
|
+
color: cssVar("line-number")
|
|
21509
|
+
},
|
|
21510
|
+
// `UiCodeBlock` draws its numbers as a 2rem right-aligned column inside the
|
|
21511
|
+
// block's 1rem padding, with a 1rem gap before the code. CodeMirror puts
|
|
21512
|
+
// the gutter outside `.cm-content`, so the same geometry is expressed as
|
|
21513
|
+
// padding on the number cell.
|
|
21514
|
+
".cm-lineNumbers .cm-gutterElement": {
|
|
21515
|
+
minWidth: "4rem",
|
|
21516
|
+
padding: "0 1rem",
|
|
21517
|
+
textAlign: "right"
|
|
21482
21518
|
},
|
|
21483
21519
|
".cm-activeLineGutter": {
|
|
21484
21520
|
backgroundColor: "transparent"
|