@celestia-island/hikari 0.55.518 → 0.55.519
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/package.json
CHANGED
|
@@ -9,10 +9,11 @@ import {
|
|
|
9
9
|
Quote,
|
|
10
10
|
Strikethrough,
|
|
11
11
|
} from "lucide-vue-next";
|
|
12
|
-
import { h, nextTick, defineComponent, ref, type Component } from "vue";
|
|
12
|
+
import { h, nextTick, onBeforeUnmount, defineComponent, ref, watch, type Component } from "vue";
|
|
13
13
|
|
|
14
14
|
import HkMarkdownRenderer from "./HkMarkdownRenderer";
|
|
15
15
|
import { useI18n } from "../i18n/context";
|
|
16
|
+
import { attachOverlayScrollbars, type OverlayScrollbarHandle } from "../composables/useOverlayScrollbar";
|
|
16
17
|
import "./HkMarkdownEditor.scss";
|
|
17
18
|
|
|
18
19
|
/** Editing dialect of the editor body. `markdown` runs the toolbar and the
|
|
@@ -223,6 +224,27 @@ export default defineComponent({
|
|
|
223
224
|
// Drag-over highlight state — an attribute so the SCSS owns the look
|
|
224
225
|
// and tests can read it without a computed style engine.
|
|
225
226
|
const dragging = ref(false);
|
|
227
|
+
// The input pane's house scrollbar: the textarea keeps its native
|
|
228
|
+
// scroll mechanics (a textarea cannot take an arbitrary wrapper) with
|
|
229
|
+
// the native bar suppressed by the shared chrome, which rides the
|
|
230
|
+
// input pane (already `position: relative`) as the tracks' host — the
|
|
231
|
+
// exact mount the master-detail rail uses.
|
|
232
|
+
let scrollRail: OverlayScrollbarHandle | null = null;
|
|
233
|
+
function syncScrollRail(): void {
|
|
234
|
+
scrollRail?.detach();
|
|
235
|
+
scrollRail = null;
|
|
236
|
+
const pane = textareaRef.value?.parentElement;
|
|
237
|
+
if (!textareaRef.value || !pane) return;
|
|
238
|
+
scrollRail = attachOverlayScrollbars(textareaRef.value, {
|
|
239
|
+
axis: "vertical",
|
|
240
|
+
host: pane,
|
|
241
|
+
});
|
|
242
|
+
}
|
|
243
|
+
watch(textareaRef, syncScrollRail, { flush: "post" });
|
|
244
|
+
onBeforeUnmount(() => {
|
|
245
|
+
scrollRail?.detach();
|
|
246
|
+
scrollRail = null;
|
|
247
|
+
});
|
|
226
248
|
|
|
227
249
|
function onInput(e: Event): void {
|
|
228
250
|
emit("update:modelValue", (e.target as HTMLTextAreaElement).value);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<!doctype html>
|
|
2
2
|
<html lang="en">
|
|
3
3
|
<head>
|
|
4
|
-
<meta name="hk-error-landing" content="v1 0.55.
|
|
4
|
+
<meta name="hk-error-landing" content="v1 0.55.519 <dev>">
|
|
5
5
|
<meta charset="utf-8" />
|
|
6
6
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
7
7
|
<meta name="robots" content="noindex" />
|