@dxos/ui-editor 0.8.4-main.2244d791bb → 0.8.4-main.4a85c3132b
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/lib/browser/index.mjs +405 -377
- package/dist/lib/browser/index.mjs.map +4 -4
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/node-esm/index.mjs +405 -377
- package/dist/lib/node-esm/index.mjs.map +4 -4
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/types/src/defaults.d.ts +1 -1
- package/dist/types/src/defaults.d.ts.map +1 -1
- package/dist/types/src/extensions/auto-scroll.d.ts +2 -15
- package/dist/types/src/extensions/auto-scroll.d.ts.map +1 -1
- package/dist/types/src/extensions/factories.d.ts.map +1 -1
- package/dist/types/src/extensions/index.d.ts +1 -1
- package/dist/types/src/extensions/index.d.ts.map +1 -1
- package/dist/types/src/extensions/markdown/decorate.d.ts.map +1 -1
- package/dist/types/src/extensions/markdown/highlight.d.ts.map +1 -1
- package/dist/types/src/extensions/markdown/link.d.ts.map +1 -1
- package/dist/types/src/extensions/scroller.d.ts +66 -0
- package/dist/types/src/extensions/scroller.d.ts.map +1 -0
- package/dist/types/src/styles/index.d.ts +0 -2
- package/dist/types/src/styles/index.d.ts.map +1 -1
- package/dist/types/src/styles/theme.d.ts +15 -0
- package/dist/types/src/styles/theme.d.ts.map +1 -1
- package/dist/types/src/util/cursor.d.ts +1 -1
- package/dist/types/src/util/cursor.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +28 -28
- package/src/defaults.ts +4 -4
- package/src/extensions/annotations.ts +1 -1
- package/src/extensions/auto-scroll.ts +36 -115
- package/src/extensions/automerge/automerge.test.tsx +2 -2
- package/src/extensions/blocks.ts +5 -5
- package/src/extensions/comments.ts +5 -5
- package/src/extensions/dnd.ts +2 -2
- package/src/extensions/factories.ts +6 -7
- package/src/extensions/folding.ts +2 -2
- package/src/extensions/index.ts +1 -1
- package/src/extensions/markdown/decorate.ts +4 -3
- package/src/extensions/markdown/highlight.ts +25 -11
- package/src/extensions/markdown/link.ts +27 -33
- package/src/extensions/markdown/styles.ts +6 -6
- package/src/extensions/outliner/outliner.ts +3 -3
- package/src/extensions/preview/preview.ts +1 -1
- package/src/extensions/scroller.ts +232 -0
- package/src/extensions/tags/streamer.ts +1 -1
- package/src/extensions/tags/xml-tags.ts +7 -4
- package/src/styles/index.ts +0 -2
- package/src/styles/theme.ts +95 -31
- package/src/util/cursor.ts +1 -1
- package/dist/types/src/extensions/smooth-scroll.d.ts +0 -78
- package/dist/types/src/extensions/smooth-scroll.d.ts.map +0 -1
- package/dist/types/src/styles/markdown.d.ts +0 -8
- package/dist/types/src/styles/markdown.d.ts.map +0 -1
- package/dist/types/src/styles/tokens.d.ts +0 -3
- package/dist/types/src/styles/tokens.d.ts.map +0 -1
- package/src/extensions/smooth-scroll.ts +0 -195
- package/src/styles/markdown.ts +0 -26
- package/src/styles/tokens.ts +0 -17
|
@@ -13,17 +13,17 @@ import { TextKind } from "@dxos/protocols/proto/dxos/echo/model/text";
|
|
|
13
13
|
|
|
14
14
|
// src/defaults.ts
|
|
15
15
|
import { mx } from "@dxos/ui-theme";
|
|
16
|
-
var editorWidth = "!
|
|
16
|
+
var editorWidth = "!mx-auto w-full max-w-[min(50rem,100%-4rem)]";
|
|
17
17
|
var editorSlots = {
|
|
18
18
|
scroll: {
|
|
19
|
-
className: "
|
|
19
|
+
className: "pt-2"
|
|
20
20
|
},
|
|
21
21
|
content: {
|
|
22
22
|
className: editorWidth
|
|
23
23
|
}
|
|
24
24
|
};
|
|
25
25
|
var editorWithToolbarLayout = "grid grid-cols-1 grid-rows-[min-content_1fr] data-[toolbar=disabled]:grid-rows-[1fr] justify-center content-start overflow-hidden";
|
|
26
|
-
var stackItemContentEditorClassNames = (role) => mx("p-0.5 dx-focus-ring-inset
|
|
26
|
+
var stackItemContentEditorClassNames = (role) => mx("dx-attention-surface p-0.5 dx-focus-ring-inset data-[toolbar=disabled]:pt-2", role === "section" ? "[&_.cm-scroller]:overflow-hidden [&_.cm-scroller]:min-h-24" : "dx-container overflow-hidden");
|
|
27
27
|
|
|
28
28
|
// src/extensions/annotations.ts
|
|
29
29
|
import { RangeSetBuilder } from "@codemirror/state";
|
|
@@ -58,7 +58,7 @@ var annotations = ({ match } = {}) => {
|
|
|
58
58
|
".cm-annotation": {
|
|
59
59
|
textDecoration: "underline",
|
|
60
60
|
textDecorationStyle: "wavy",
|
|
61
|
-
textDecorationColor: "var(--
|
|
61
|
+
textDecorationColor: "var(--color-error-text)"
|
|
62
62
|
}
|
|
63
63
|
})
|
|
64
64
|
];
|
|
@@ -503,155 +503,179 @@ var typeahead = ({ onComplete } = {}) => {
|
|
|
503
503
|
|
|
504
504
|
// src/extensions/auto-scroll.ts
|
|
505
505
|
import { EditorView as EditorView5, ViewPlugin as ViewPlugin6 } from "@codemirror/view";
|
|
506
|
-
import { addEventListener, combine } from "@dxos/async";
|
|
506
|
+
import { addEventListener, combine, throttle } from "@dxos/async";
|
|
507
507
|
import { Domino } from "@dxos/ui";
|
|
508
508
|
|
|
509
|
-
// src/extensions/
|
|
509
|
+
// src/extensions/scroller.ts
|
|
510
510
|
import { StateEffect } from "@codemirror/state";
|
|
511
511
|
import { EditorView as EditorView4, ViewPlugin as ViewPlugin5 } from "@codemirror/view";
|
|
512
|
-
|
|
513
|
-
var
|
|
514
|
-
|
|
512
|
+
import { log as log2 } from "@dxos/log";
|
|
513
|
+
var __dxlog_file2 = "/__w/dxos/dxos/packages/ui/ui-editor/src/extensions/scroller.ts";
|
|
514
|
+
var scrollerLineEffect = StateEffect.define();
|
|
515
|
+
var scrollerCrawlEffect = StateEffect.define();
|
|
516
|
+
var scrollToLine = (view, options) => {
|
|
517
|
+
view.dispatch({
|
|
518
|
+
effects: scrollerLineEffect.of(options)
|
|
519
|
+
});
|
|
520
|
+
};
|
|
521
|
+
var scroller = ({ overScroll = 0 } = {}) => {
|
|
522
|
+
const scrollPlugin = ViewPlugin5.fromClass(class ScrollerPlugin {
|
|
515
523
|
view;
|
|
524
|
+
crawler;
|
|
516
525
|
constructor(view) {
|
|
517
526
|
this.view = view;
|
|
527
|
+
this.crawler = createCrawler(this.view);
|
|
518
528
|
}
|
|
519
529
|
// No-op.
|
|
520
530
|
destroy() {
|
|
531
|
+
this.crawler.cancel();
|
|
521
532
|
}
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
const doc = this.view.state.doc;
|
|
529
|
-
const targetLine = Math.max(0, lineNumber - 1);
|
|
530
|
-
if (behavior === "instant") {
|
|
531
|
-
requestAnimationFrame(() => {
|
|
532
|
-
this.view.dispatch({
|
|
533
|
-
selection: {
|
|
534
|
-
anchor: doc.line(targetLine + 1).from
|
|
535
|
-
},
|
|
536
|
-
scrollIntoView: true
|
|
537
|
-
});
|
|
538
|
-
});
|
|
539
|
-
return;
|
|
540
|
-
}
|
|
541
|
-
if (lineNumber === -1) {
|
|
542
|
-
this.animateScroll(scroller, scroller.scrollHeight - scroller.clientHeight);
|
|
543
|
-
return;
|
|
544
|
-
}
|
|
545
|
-
if (targetLine >= doc.lines) {
|
|
546
|
-
const targetScrollTop2 = scroller.scrollHeight - scroller.clientHeight + (animOffset || 0);
|
|
547
|
-
this.animateScroll(scroller, targetScrollTop2);
|
|
548
|
-
return;
|
|
549
|
-
}
|
|
550
|
-
const lineStart = doc.line(targetLine + 1).from;
|
|
551
|
-
const coords = this.view.coordsAtPos(lineStart);
|
|
552
|
-
if (!coords) {
|
|
553
|
-
return;
|
|
554
|
-
}
|
|
555
|
-
const currentScrollTop = scroller.scrollTop;
|
|
556
|
-
const scrollerRect = scroller.getBoundingClientRect();
|
|
557
|
-
const maxScrollTop = scroller.scrollHeight - scroller.clientHeight;
|
|
558
|
-
let targetScrollTop;
|
|
559
|
-
if (animPosition === "end") {
|
|
560
|
-
targetScrollTop = currentScrollTop + coords.bottom - scrollerRect.bottom + animOffset;
|
|
533
|
+
cancel() {
|
|
534
|
+
this.crawler.cancel();
|
|
535
|
+
}
|
|
536
|
+
crawl(start = false) {
|
|
537
|
+
if (start) {
|
|
538
|
+
this.crawler.scroll();
|
|
561
539
|
} else {
|
|
562
|
-
|
|
540
|
+
this.crawler.cancel();
|
|
563
541
|
}
|
|
564
|
-
const clampedScrollTop = Math.max(0, Math.min(targetScrollTop, maxScrollTop));
|
|
565
|
-
this.animateScroll(scroller, clampedScrollTop);
|
|
566
542
|
}
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
543
|
+
scroll({ line, offset = 0, position, behavior = "instant" }) {
|
|
544
|
+
const { scrollTop, scrollHeight, clientHeight } = this.view.scrollDOM;
|
|
545
|
+
const scrollerRect = this.view.scrollDOM.getBoundingClientRect();
|
|
546
|
+
const doc = this.view.state.doc;
|
|
547
|
+
let targetScrollTop = scrollHeight - clientHeight + offset;
|
|
548
|
+
if (line >= 0 && line <= doc.lines - 1) {
|
|
549
|
+
const lineStart = doc.line(line + 1).from;
|
|
550
|
+
const coords = this.view.coordsAtPos(lineStart);
|
|
551
|
+
if (coords) {
|
|
552
|
+
const currentScrollTop = scrollTop;
|
|
553
|
+
const maxScrollTop = scrollHeight - clientHeight;
|
|
554
|
+
if (position === "end") {
|
|
555
|
+
targetScrollTop = currentScrollTop + coords.bottom - scrollerRect.bottom + offset;
|
|
556
|
+
} else {
|
|
557
|
+
targetScrollTop = currentScrollTop + coords.top - scrollerRect.top + offset;
|
|
558
|
+
}
|
|
559
|
+
targetScrollTop = Math.max(0, Math.min(targetScrollTop, maxScrollTop));
|
|
560
|
+
}
|
|
573
561
|
}
|
|
574
|
-
|
|
575
|
-
|
|
562
|
+
requestAnimationFrame(() => {
|
|
563
|
+
this.view.scrollDOM.scrollTo({
|
|
576
564
|
top: targetScrollTop,
|
|
577
|
-
behavior
|
|
565
|
+
behavior
|
|
578
566
|
});
|
|
579
|
-
}
|
|
567
|
+
});
|
|
580
568
|
}
|
|
581
569
|
});
|
|
582
570
|
return [
|
|
583
571
|
scrollPlugin,
|
|
584
|
-
//
|
|
572
|
+
// Listen for effect.s
|
|
585
573
|
EditorView4.updateListener.of((update2) => {
|
|
586
574
|
update2.transactions.forEach((transaction) => {
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
const
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
});
|
|
575
|
+
try {
|
|
576
|
+
const plugin = update2.view.plugin(scrollPlugin);
|
|
577
|
+
if (plugin) {
|
|
578
|
+
for (const effect of transaction.effects) {
|
|
579
|
+
if (effect.is(scrollerCrawlEffect)) {
|
|
580
|
+
plugin.crawl(effect.value);
|
|
581
|
+
} else if (effect.is(scrollerLineEffect)) {
|
|
582
|
+
plugin.scroll(effect.value);
|
|
583
|
+
}
|
|
597
584
|
}
|
|
598
585
|
}
|
|
586
|
+
} catch (err) {
|
|
587
|
+
log2.catch(err, void 0, {
|
|
588
|
+
F: __dxlog_file2,
|
|
589
|
+
L: 145,
|
|
590
|
+
S: void 0,
|
|
591
|
+
C: (f, a) => f(...a)
|
|
592
|
+
});
|
|
599
593
|
}
|
|
600
594
|
});
|
|
595
|
+
}),
|
|
596
|
+
// Styles.
|
|
597
|
+
EditorView4.theme({
|
|
598
|
+
".cm-content": {
|
|
599
|
+
paddingBottom: `${overScroll}px`
|
|
600
|
+
},
|
|
601
|
+
".cm-scroller": {
|
|
602
|
+
overflowAnchor: "none",
|
|
603
|
+
paddingBottom: "0"
|
|
604
|
+
},
|
|
605
|
+
".cm-scroller.cm-hide-scrollbar::-webkit-scrollbar": {
|
|
606
|
+
display: "none"
|
|
607
|
+
},
|
|
608
|
+
".cm-scroller::-webkit-scrollbar-thumb": {
|
|
609
|
+
background: "transparent",
|
|
610
|
+
transition: "background 0.15s"
|
|
611
|
+
},
|
|
612
|
+
"&:hover .cm-scroller::-webkit-scrollbar-thumb": {
|
|
613
|
+
background: "var(--color-scrollbar-thumb)"
|
|
614
|
+
},
|
|
615
|
+
".cm-scroll-button": {
|
|
616
|
+
position: "absolute",
|
|
617
|
+
bottom: "0.5rem",
|
|
618
|
+
right: "1rem"
|
|
619
|
+
}
|
|
601
620
|
})
|
|
602
621
|
];
|
|
603
622
|
};
|
|
604
|
-
|
|
605
|
-
view.
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
623
|
+
function createCrawler(view, k = 0.3, maxStep = 2, targetDelta = 0.5) {
|
|
624
|
+
const el = view.scrollDOM;
|
|
625
|
+
let currentTop = 0;
|
|
626
|
+
let rafId = null;
|
|
627
|
+
function frame() {
|
|
628
|
+
const targetTop = el.scrollHeight - el.clientHeight;
|
|
629
|
+
const delta = targetTop - currentTop;
|
|
630
|
+
const absDelta = Math.abs(delta);
|
|
631
|
+
if (absDelta < targetDelta) {
|
|
632
|
+
el.scrollTop = targetTop;
|
|
633
|
+
currentTop = targetTop;
|
|
634
|
+
rafId = null;
|
|
635
|
+
return;
|
|
636
|
+
}
|
|
637
|
+
const step = Math.sign(delta) * Math.min(absDelta, Math.max(1, Math.min(absDelta * k, maxStep)));
|
|
638
|
+
currentTop += step;
|
|
639
|
+
el.scrollTop = currentTop;
|
|
640
|
+
rafId = requestAnimationFrame(frame);
|
|
641
|
+
}
|
|
642
|
+
return {
|
|
643
|
+
scroll: () => {
|
|
644
|
+
if (rafId === null) {
|
|
645
|
+
currentTop = el.scrollTop;
|
|
646
|
+
rafId = requestAnimationFrame(frame);
|
|
647
|
+
}
|
|
648
|
+
},
|
|
649
|
+
cancel: () => {
|
|
650
|
+
if (rafId !== null) {
|
|
651
|
+
cancelAnimationFrame(rafId);
|
|
652
|
+
rafId = null;
|
|
653
|
+
}
|
|
654
|
+
}
|
|
655
|
+
};
|
|
656
|
+
}
|
|
612
657
|
|
|
613
658
|
// src/extensions/auto-scroll.ts
|
|
614
|
-
var autoScroll = (
|
|
659
|
+
var autoScroll = (_ = {}) => {
|
|
615
660
|
let buttonContainer;
|
|
616
|
-
let isPinned =
|
|
617
|
-
const setPinned = (
|
|
618
|
-
buttonContainer?.classList.toggle("opacity-0",
|
|
619
|
-
isPinned =
|
|
661
|
+
let isPinned = true;
|
|
662
|
+
const setPinned = (pinned) => {
|
|
663
|
+
buttonContainer?.classList.toggle("opacity-0", pinned);
|
|
664
|
+
isPinned = pinned;
|
|
620
665
|
};
|
|
621
|
-
const scrollToBottom = (view, behavior) => {
|
|
622
|
-
setPinned(true);
|
|
623
|
-
view.dispatch({
|
|
624
|
-
effects: scrollToLineEffect.of({
|
|
625
|
-
line: -1,
|
|
626
|
-
options: {
|
|
627
|
-
position: "end",
|
|
628
|
-
behavior
|
|
629
|
-
}
|
|
630
|
-
})
|
|
631
|
-
});
|
|
632
|
-
};
|
|
633
|
-
const triggerUpdate = intervalUntilQuiet((view) => {
|
|
634
|
-
if (isPinned) {
|
|
635
|
-
scrollToBottom(view);
|
|
636
|
-
}
|
|
637
|
-
}, throttleDelay);
|
|
638
666
|
return [
|
|
639
667
|
// Update listener for logging when scrolling is needed.
|
|
640
668
|
EditorView5.updateListener.of(({ view, heightChanged, state }) => {
|
|
641
669
|
if (heightChanged) {
|
|
642
670
|
if (isPinned) {
|
|
643
|
-
const
|
|
644
|
-
const
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
if (shouldScroll) {
|
|
652
|
-
triggerUpdate(view);
|
|
653
|
-
}
|
|
654
|
-
} else if (distanceFromBottom < 0) {
|
|
671
|
+
const { scrollTop, scrollHeight, clientHeight } = view.scrollDOM;
|
|
672
|
+
const delta = scrollHeight - scrollTop - clientHeight;
|
|
673
|
+
if (delta > 0 && scrollTop > 0) {
|
|
674
|
+
setPinned(true);
|
|
675
|
+
view.dispatch({
|
|
676
|
+
effects: scrollerCrawlEffect.of(true)
|
|
677
|
+
});
|
|
678
|
+
} else if (delta < 0) {
|
|
655
679
|
setPinned(false);
|
|
656
680
|
}
|
|
657
681
|
} else {
|
|
@@ -665,13 +689,19 @@ var autoScroll = ({ pinned = true, threshold = 100, throttleDelay = 500, onAutoS
|
|
|
665
689
|
ViewPlugin6.fromClass(class {
|
|
666
690
|
cleanup;
|
|
667
691
|
constructor(view) {
|
|
668
|
-
this.cleanup = createUserScrollDetector(view.scrollDOM, () => {
|
|
692
|
+
this.cleanup = createUserScrollDetector(view.scrollDOM, throttle(() => {
|
|
669
693
|
requestAnimationFrame(() => {
|
|
670
694
|
const { scrollTop, scrollHeight, clientHeight } = view.scrollDOM;
|
|
671
|
-
const
|
|
672
|
-
|
|
695
|
+
const delta = scrollHeight - scrollTop - clientHeight;
|
|
696
|
+
const pinned = delta === 0;
|
|
697
|
+
setPinned(pinned);
|
|
698
|
+
if (!pinned) {
|
|
699
|
+
view.dispatch({
|
|
700
|
+
effects: scrollerCrawlEffect.of(false)
|
|
701
|
+
});
|
|
702
|
+
}
|
|
673
703
|
});
|
|
674
|
-
});
|
|
704
|
+
}, 500));
|
|
675
705
|
}
|
|
676
706
|
destroy() {
|
|
677
707
|
this.cleanup();
|
|
@@ -683,38 +713,21 @@ var autoScroll = ({ pinned = true, threshold = 100, throttleDelay = 500, onAutoS
|
|
|
683
713
|
const icon = Domino.of("dx-icon").attributes({
|
|
684
714
|
icon: "ph--arrow-down--regular"
|
|
685
715
|
});
|
|
686
|
-
const button = Domino.of("button").classNames("dx-button bg-
|
|
716
|
+
const button = Domino.of("button").classNames("dx-button bg-accent-surface").attributes({
|
|
687
717
|
"data-density": "fine"
|
|
688
718
|
}).children(icon).on("click", () => {
|
|
689
|
-
|
|
719
|
+
setPinned(true);
|
|
720
|
+
view.dispatch({
|
|
721
|
+
effects: scrollerLineEffect.of({
|
|
722
|
+
line: -1,
|
|
723
|
+
position: "end",
|
|
724
|
+
behavior: "smooth"
|
|
725
|
+
})
|
|
726
|
+
});
|
|
690
727
|
});
|
|
691
728
|
buttonContainer = Domino.of("div").classNames("cm-scroll-button transition-opacity duration-300 opacity-0").children(button).root;
|
|
692
729
|
view.scrollDOM.parentElement.appendChild(buttonContainer);
|
|
693
730
|
}
|
|
694
|
-
}),
|
|
695
|
-
// Styles.
|
|
696
|
-
EditorView5.theme({
|
|
697
|
-
".cm-content": {
|
|
698
|
-
paddingBottom: `${threshold}px`
|
|
699
|
-
},
|
|
700
|
-
".cm-scroller": {
|
|
701
|
-
paddingBottom: "0"
|
|
702
|
-
},
|
|
703
|
-
".cm-scroller.cm-hide-scrollbar::-webkit-scrollbar": {
|
|
704
|
-
display: "none"
|
|
705
|
-
},
|
|
706
|
-
".cm-scroller::-webkit-scrollbar-thumb": {
|
|
707
|
-
background: "transparent",
|
|
708
|
-
transition: "background 0.15s"
|
|
709
|
-
},
|
|
710
|
-
"&:hover .cm-scroller::-webkit-scrollbar-thumb": {
|
|
711
|
-
background: "var(--dx-scrollbarThumb)"
|
|
712
|
-
},
|
|
713
|
-
".cm-scroll-button": {
|
|
714
|
-
position: "absolute",
|
|
715
|
-
bottom: "0.5rem",
|
|
716
|
-
right: "1rem"
|
|
717
|
-
}
|
|
718
731
|
})
|
|
719
732
|
];
|
|
720
733
|
};
|
|
@@ -727,28 +740,6 @@ function createUserScrollDetector(element, onUserScroll) {
|
|
|
727
740
|
}
|
|
728
741
|
}));
|
|
729
742
|
}
|
|
730
|
-
function intervalUntilQuiet(fn, interval) {
|
|
731
|
-
let timer = null;
|
|
732
|
-
let quietTimer = null;
|
|
733
|
-
let latestArgs;
|
|
734
|
-
return (...args) => {
|
|
735
|
-
latestArgs = args;
|
|
736
|
-
if (quietTimer) {
|
|
737
|
-
clearTimeout(quietTimer);
|
|
738
|
-
}
|
|
739
|
-
quietTimer = setTimeout(() => {
|
|
740
|
-
if (timer) {
|
|
741
|
-
clearInterval(timer);
|
|
742
|
-
timer = null;
|
|
743
|
-
}
|
|
744
|
-
quietTimer = null;
|
|
745
|
-
}, interval);
|
|
746
|
-
if (!timer) {
|
|
747
|
-
fn(...latestArgs);
|
|
748
|
-
timer = setInterval(() => fn(...latestArgs), interval);
|
|
749
|
-
}
|
|
750
|
-
};
|
|
751
|
-
}
|
|
752
743
|
|
|
753
744
|
// src/extensions/automerge/automerge.ts
|
|
754
745
|
import { next as A3 } from "@automerge/automerge";
|
|
@@ -762,15 +753,15 @@ var initialSync = Transaction.userEvent.of("initial.sync");
|
|
|
762
753
|
|
|
763
754
|
// src/extensions/automerge/cursor.ts
|
|
764
755
|
import { fromCursor, toCursor } from "@dxos/echo-db";
|
|
765
|
-
import { log as
|
|
766
|
-
var
|
|
756
|
+
import { log as log3 } from "@dxos/log";
|
|
757
|
+
var __dxlog_file3 = "/__w/dxos/dxos/packages/ui/ui-editor/src/extensions/automerge/cursor.ts";
|
|
767
758
|
var cursorConverter = (accessor) => ({
|
|
768
759
|
toCursor: (pos, assoc) => {
|
|
769
760
|
try {
|
|
770
761
|
return toCursor(accessor, pos, assoc);
|
|
771
762
|
} catch (err) {
|
|
772
|
-
|
|
773
|
-
F:
|
|
763
|
+
log3.catch(err, void 0, {
|
|
764
|
+
F: __dxlog_file3,
|
|
774
765
|
L: 15,
|
|
775
766
|
S: void 0,
|
|
776
767
|
C: (f, a) => f(...a)
|
|
@@ -782,8 +773,8 @@ var cursorConverter = (accessor) => ({
|
|
|
782
773
|
try {
|
|
783
774
|
return fromCursor(accessor, cursor2);
|
|
784
775
|
} catch (err) {
|
|
785
|
-
|
|
786
|
-
F:
|
|
776
|
+
log3.catch(err, void 0, {
|
|
777
|
+
F: __dxlog_file3,
|
|
787
778
|
L: 24,
|
|
788
779
|
S: void 0,
|
|
789
780
|
C: (f, a) => f(...a)
|
|
@@ -808,7 +799,7 @@ var isReconcile = (tr) => {
|
|
|
808
799
|
|
|
809
800
|
// src/extensions/automerge/sync.ts
|
|
810
801
|
import { next as A2 } from "@automerge/automerge";
|
|
811
|
-
import { log as
|
|
802
|
+
import { log as log4 } from "@dxos/log";
|
|
812
803
|
|
|
813
804
|
// src/extensions/automerge/update-automerge.ts
|
|
814
805
|
import { next as A } from "@automerge/automerge";
|
|
@@ -949,7 +940,7 @@ var charPath = (textPath, candidatePath) => {
|
|
|
949
940
|
};
|
|
950
941
|
|
|
951
942
|
// src/extensions/automerge/sync.ts
|
|
952
|
-
var
|
|
943
|
+
var __dxlog_file4 = "/__w/dxos/dxos/packages/ui/ui-editor/src/extensions/automerge/sync.ts";
|
|
953
944
|
var Syncer = class {
|
|
954
945
|
_handle;
|
|
955
946
|
_state;
|
|
@@ -972,8 +963,8 @@ var Syncer = class {
|
|
|
972
963
|
this._pending = false;
|
|
973
964
|
}
|
|
974
965
|
onEditorChange(view) {
|
|
975
|
-
|
|
976
|
-
F:
|
|
966
|
+
log4("onEditorChange", void 0, {
|
|
967
|
+
F: __dxlog_file4,
|
|
977
968
|
L: 45,
|
|
978
969
|
S: this,
|
|
979
970
|
C: (f, a) => f(...a)
|
|
@@ -988,8 +979,8 @@ var Syncer = class {
|
|
|
988
979
|
}
|
|
989
980
|
}
|
|
990
981
|
onAutomergeChange(view) {
|
|
991
|
-
|
|
992
|
-
F:
|
|
982
|
+
log4("onAutomergeChange", void 0, {
|
|
983
|
+
F: __dxlog_file4,
|
|
993
984
|
L: 60,
|
|
994
985
|
S: this,
|
|
995
986
|
C: (f, a) => f(...a)
|
|
@@ -1082,7 +1073,7 @@ import { Annotation as Annotation2, RangeSet } from "@codemirror/state";
|
|
|
1082
1073
|
import { Decoration as Decoration5, EditorView as EditorView7, ViewPlugin as ViewPlugin8, WidgetType as WidgetType3 } from "@codemirror/view";
|
|
1083
1074
|
import { Event } from "@dxos/async";
|
|
1084
1075
|
import { Context } from "@dxos/context";
|
|
1085
|
-
var
|
|
1076
|
+
var __dxlog_file5 = "/__w/dxos/dxos/packages/ui/ui-editor/src/extensions/awareness/awareness.ts";
|
|
1086
1077
|
var dummyProvider = {
|
|
1087
1078
|
remoteStateChange: new Event(),
|
|
1088
1079
|
open: () => {
|
|
@@ -1106,7 +1097,7 @@ var awareness = (provider = dummyProvider) => {
|
|
|
1106
1097
|
};
|
|
1107
1098
|
var RemoteSelectionsDecorator = class {
|
|
1108
1099
|
_ctx = new Context(void 0, {
|
|
1109
|
-
F:
|
|
1100
|
+
F: __dxlog_file5,
|
|
1110
1101
|
L: 80
|
|
1111
1102
|
});
|
|
1112
1103
|
_cursorConverter;
|
|
@@ -1319,8 +1310,8 @@ var styles = EditorView7.theme({
|
|
|
1319
1310
|
import { DeferredTask, Event as Event2, sleep } from "@dxos/async";
|
|
1320
1311
|
import { Context as Context2 } from "@dxos/context";
|
|
1321
1312
|
import { invariant } from "@dxos/invariant";
|
|
1322
|
-
import { log as
|
|
1323
|
-
var
|
|
1313
|
+
import { log as log5 } from "@dxos/log";
|
|
1314
|
+
var __dxlog_file6 = "/__w/dxos/dxos/packages/ui/ui-editor/src/extensions/awareness/awareness-provider.ts";
|
|
1324
1315
|
var DEBOUNCE_INTERVAL = 100;
|
|
1325
1316
|
var SpaceAwarenessProvider = class {
|
|
1326
1317
|
_remoteStates = /* @__PURE__ */ new Map();
|
|
@@ -1340,7 +1331,7 @@ var SpaceAwarenessProvider = class {
|
|
|
1340
1331
|
}
|
|
1341
1332
|
open() {
|
|
1342
1333
|
this._ctx = new Context2(void 0, {
|
|
1343
|
-
F:
|
|
1334
|
+
F: __dxlog_file6,
|
|
1344
1335
|
L: 57
|
|
1345
1336
|
});
|
|
1346
1337
|
this._postTask = new DeferredTask(this._ctx, async () => {
|
|
@@ -1367,10 +1358,10 @@ var SpaceAwarenessProvider = class {
|
|
|
1367
1358
|
void this._messenger.postMessage(this._channel, {
|
|
1368
1359
|
kind: "query"
|
|
1369
1360
|
}).catch((err) => {
|
|
1370
|
-
|
|
1361
|
+
log5.debug("failed to query awareness", {
|
|
1371
1362
|
err
|
|
1372
1363
|
}, {
|
|
1373
|
-
F:
|
|
1364
|
+
F: __dxlog_file6,
|
|
1374
1365
|
L: 91,
|
|
1375
1366
|
S: this,
|
|
1376
1367
|
C: (f, a) => f(...a)
|
|
@@ -1387,7 +1378,7 @@ var SpaceAwarenessProvider = class {
|
|
|
1387
1378
|
}
|
|
1388
1379
|
update(position) {
|
|
1389
1380
|
invariant(this._postTask, void 0, {
|
|
1390
|
-
F:
|
|
1381
|
+
F: __dxlog_file6,
|
|
1391
1382
|
L: 106,
|
|
1392
1383
|
S: this,
|
|
1393
1384
|
A: [
|
|
@@ -1404,7 +1395,7 @@ var SpaceAwarenessProvider = class {
|
|
|
1404
1395
|
}
|
|
1405
1396
|
_handleQueryMessage() {
|
|
1406
1397
|
invariant(this._postTask, void 0, {
|
|
1407
|
-
F:
|
|
1398
|
+
F: __dxlog_file6,
|
|
1408
1399
|
L: 117,
|
|
1409
1400
|
S: this,
|
|
1410
1401
|
A: [
|
|
@@ -1416,7 +1407,7 @@ var SpaceAwarenessProvider = class {
|
|
|
1416
1407
|
}
|
|
1417
1408
|
_handlePostMessage(message) {
|
|
1418
1409
|
invariant(message.kind === "post", void 0, {
|
|
1419
|
-
F:
|
|
1410
|
+
F: __dxlog_file6,
|
|
1420
1411
|
L: 122,
|
|
1421
1412
|
S: this,
|
|
1422
1413
|
A: [
|
|
@@ -1432,9 +1423,9 @@ var SpaceAwarenessProvider = class {
|
|
|
1432
1423
|
// src/extensions/blast.ts
|
|
1433
1424
|
import { EditorView as EditorView8, keymap as keymap3 } from "@codemirror/view";
|
|
1434
1425
|
import defaultsDeep from "lodash.defaultsdeep";
|
|
1435
|
-
import { throttle } from "@dxos/async";
|
|
1426
|
+
import { throttle as throttle2 } from "@dxos/async";
|
|
1436
1427
|
import { invariant as invariant2 } from "@dxos/invariant";
|
|
1437
|
-
var
|
|
1428
|
+
var __dxlog_file7 = "/__w/dxos/dxos/packages/ui/ui-editor/src/extensions/blast.ts";
|
|
1438
1429
|
var defaultOptions = {
|
|
1439
1430
|
effect: 2,
|
|
1440
1431
|
maxParticles: 200,
|
|
@@ -1553,7 +1544,7 @@ var Blaster = class {
|
|
|
1553
1544
|
}
|
|
1554
1545
|
initialize() {
|
|
1555
1546
|
invariant2(!this._canvas && !this._ctx, void 0, {
|
|
1556
|
-
F:
|
|
1547
|
+
F: __dxlog_file7,
|
|
1557
1548
|
L: 142,
|
|
1558
1549
|
S: this,
|
|
1559
1550
|
A: [
|
|
@@ -1590,7 +1581,7 @@ var Blaster = class {
|
|
|
1590
1581
|
}
|
|
1591
1582
|
start() {
|
|
1592
1583
|
invariant2(this._canvas && this._ctx, void 0, {
|
|
1593
|
-
F:
|
|
1584
|
+
F: __dxlog_file7,
|
|
1594
1585
|
L: 181,
|
|
1595
1586
|
S: this,
|
|
1596
1587
|
A: [
|
|
@@ -1624,11 +1615,11 @@ var Blaster = class {
|
|
|
1624
1615
|
this.drawParticles();
|
|
1625
1616
|
requestAnimationFrame(this.loop.bind(this));
|
|
1626
1617
|
}
|
|
1627
|
-
shake =
|
|
1618
|
+
shake = throttle2(({ time }) => {
|
|
1628
1619
|
this._shakeTime = this._shakeTimeMax || time;
|
|
1629
1620
|
this._shakeTimeMax = time;
|
|
1630
1621
|
}, 100);
|
|
1631
|
-
spawn =
|
|
1622
|
+
spawn = throttle2(({ element, point }) => {
|
|
1632
1623
|
const color = getRGBComponents(element, this._options.color);
|
|
1633
1624
|
const numParticles = random(this._options.particleNumRange.min, this._options.particleNumRange.max);
|
|
1634
1625
|
const dir = this._lastPoint.x === point.x ? 0 : this._lastPoint.x < point.x ? 1 : -1;
|
|
@@ -1802,11 +1793,11 @@ var blocks = () => [
|
|
|
1802
1793
|
".cm-line.block-line": {
|
|
1803
1794
|
paddingLeft: "0.75rem",
|
|
1804
1795
|
paddingRight: "0.75rem",
|
|
1805
|
-
borderLeft: "1px solid var(--
|
|
1806
|
-
borderRight: "1px solid var(--
|
|
1796
|
+
borderLeft: "1px solid var(--color-subdued-separator)",
|
|
1797
|
+
borderRight: "1px solid var(--color-subdued-separator)"
|
|
1807
1798
|
},
|
|
1808
1799
|
".cm-line.block-single": {
|
|
1809
|
-
border: "1px solid var(--
|
|
1800
|
+
border: "1px solid var(--color-subdued-separator)",
|
|
1810
1801
|
borderRadius: "6px",
|
|
1811
1802
|
paddingTop: "0.5rem",
|
|
1812
1803
|
paddingBottom: "0.5rem",
|
|
@@ -1814,7 +1805,7 @@ var blocks = () => [
|
|
|
1814
1805
|
marginBottom: "0.5rem"
|
|
1815
1806
|
},
|
|
1816
1807
|
".cm-line.block-first": {
|
|
1817
|
-
borderTop: "1px solid var(--
|
|
1808
|
+
borderTop: "1px solid var(--color-subdued-separator)",
|
|
1818
1809
|
borderTopLeftRadius: "6px",
|
|
1819
1810
|
borderTopRightRadius: "6px",
|
|
1820
1811
|
paddingTop: "0.5rem",
|
|
@@ -1822,7 +1813,7 @@ var blocks = () => [
|
|
|
1822
1813
|
},
|
|
1823
1814
|
".cm-line.block-middle": {},
|
|
1824
1815
|
".cm-line.block-last": {
|
|
1825
|
-
borderBottom: "1px solid var(--
|
|
1816
|
+
borderBottom: "1px solid var(--color-subdued-separator)",
|
|
1826
1817
|
borderBottomLeftRadius: "6px",
|
|
1827
1818
|
borderBottomRightRadius: "6px",
|
|
1828
1819
|
paddingBottom: "0.5rem",
|
|
@@ -1834,8 +1825,8 @@ var blocks = () => [
|
|
|
1834
1825
|
// src/extensions/bookmarks.ts
|
|
1835
1826
|
import { Prec as Prec3, StateEffect as StateEffect3, StateField as StateField2 } from "@codemirror/state";
|
|
1836
1827
|
import { keymap as keymap4 } from "@codemirror/view";
|
|
1837
|
-
import { log as
|
|
1838
|
-
var
|
|
1828
|
+
import { log as log6 } from "@dxos/log";
|
|
1829
|
+
var __dxlog_file8 = "/__w/dxos/dxos/packages/ui/ui-editor/src/extensions/bookmarks.ts";
|
|
1839
1830
|
var addBookmark = StateEffect3.define();
|
|
1840
1831
|
var removeBookmark = StateEffect3.define();
|
|
1841
1832
|
var clearBookmarks = StateEffect3.define();
|
|
@@ -1847,8 +1838,8 @@ var bookmarks = () => {
|
|
|
1847
1838
|
key: "Mod-ArrowUp",
|
|
1848
1839
|
run: (view) => {
|
|
1849
1840
|
const bookmarks2 = view.state.field(bookmarksField);
|
|
1850
|
-
|
|
1851
|
-
F:
|
|
1841
|
+
log6("up", bookmarks2, {
|
|
1842
|
+
F: __dxlog_file8,
|
|
1852
1843
|
L: 29,
|
|
1853
1844
|
S: void 0,
|
|
1854
1845
|
C: (f, a) => f(...a)
|
|
@@ -1860,8 +1851,8 @@ var bookmarks = () => {
|
|
|
1860
1851
|
key: "Mod-ArrowDown",
|
|
1861
1852
|
run: (view) => {
|
|
1862
1853
|
const bookmarks2 = view.state.field(bookmarksField);
|
|
1863
|
-
|
|
1864
|
-
F:
|
|
1854
|
+
log6("down", bookmarks2, {
|
|
1855
|
+
F: __dxlog_file8,
|
|
1865
1856
|
L: 37,
|
|
1866
1857
|
S: void 0,
|
|
1867
1858
|
C: (f, a) => f(...a)
|
|
@@ -1906,7 +1897,7 @@ import { StateEffect as StateEffect4, StateField as StateField3 } from "@codemir
|
|
|
1906
1897
|
import { Decoration as Decoration7, EditorView as EditorView11, ViewPlugin as ViewPlugin10, hoverTooltip, keymap as keymap6 } from "@codemirror/view";
|
|
1907
1898
|
import sortBy from "lodash.sortby";
|
|
1908
1899
|
import { debounce as debounce2 } from "@dxos/async";
|
|
1909
|
-
import { log as
|
|
1900
|
+
import { log as log7 } from "@dxos/log";
|
|
1910
1901
|
import { isNonNullable } from "@dxos/util";
|
|
1911
1902
|
|
|
1912
1903
|
// src/extensions/selection.ts
|
|
@@ -1915,7 +1906,7 @@ import { EditorView as EditorView10, keymap as keymap5 } from "@codemirror/view"
|
|
|
1915
1906
|
import { debounce } from "@dxos/async";
|
|
1916
1907
|
import { invariant as invariant3 } from "@dxos/invariant";
|
|
1917
1908
|
import { isTruthy } from "@dxos/util";
|
|
1918
|
-
var
|
|
1909
|
+
var __dxlog_file9 = "/__w/dxos/dxos/packages/ui/ui-editor/src/extensions/selection.ts";
|
|
1919
1910
|
var documentId = singleValueFacet();
|
|
1920
1911
|
var stateRestoreAnnotation = "dxos.org/cm/state-restore";
|
|
1921
1912
|
var createEditorStateTransaction = ({ scrollTo, selection }) => {
|
|
@@ -1931,7 +1922,7 @@ var createEditorStateTransaction = ({ scrollTo, selection }) => {
|
|
|
1931
1922
|
var createEditorStateStore = (keyPrefix) => ({
|
|
1932
1923
|
getState: (id) => {
|
|
1933
1924
|
invariant3(id, void 0, {
|
|
1934
|
-
F:
|
|
1925
|
+
F: __dxlog_file9,
|
|
1935
1926
|
L: 47,
|
|
1936
1927
|
S: void 0,
|
|
1937
1928
|
A: [
|
|
@@ -1944,7 +1935,7 @@ var createEditorStateStore = (keyPrefix) => ({
|
|
|
1944
1935
|
},
|
|
1945
1936
|
setState: (id, state) => {
|
|
1946
1937
|
invariant3(id, void 0, {
|
|
1947
|
-
F:
|
|
1938
|
+
F: __dxlog_file9,
|
|
1948
1939
|
L: 53,
|
|
1949
1940
|
S: void 0,
|
|
1950
1941
|
A: [
|
|
@@ -2003,7 +1994,7 @@ var selectionState = ({ getState, setState } = {}) => {
|
|
|
2003
1994
|
};
|
|
2004
1995
|
|
|
2005
1996
|
// src/extensions/comments.ts
|
|
2006
|
-
var
|
|
1997
|
+
var __dxlog_file10 = "/__w/dxos/dxos/packages/ui/ui-editor/src/extensions/comments.ts";
|
|
2007
1998
|
var setComments = StateEffect4.define();
|
|
2008
1999
|
var setSelection = StateEffect4.define();
|
|
2009
2000
|
var setCommentState = StateEffect4.define();
|
|
@@ -2048,14 +2039,14 @@ var commentsState = StateField3.define({
|
|
|
2048
2039
|
var styles2 = EditorView11.theme({
|
|
2049
2040
|
".cm-comment, .cm-comment-current": {
|
|
2050
2041
|
padding: "3px 0",
|
|
2051
|
-
color: "var(--
|
|
2052
|
-
backgroundColor: "var(--
|
|
2042
|
+
color: "var(--color-cm-comment-text)",
|
|
2043
|
+
backgroundColor: "var(--color-cm-comment-surface)"
|
|
2053
2044
|
},
|
|
2054
2045
|
".cm-comment > span, .cm-comment-current > span": {
|
|
2055
2046
|
boxDecorationBreak: "clone",
|
|
2056
|
-
boxShadow: "0 0 1px 3px var(--
|
|
2057
|
-
backgroundColor: "var(--
|
|
2058
|
-
color: "var(--
|
|
2047
|
+
boxShadow: "0 0 1px 3px var(--color-cm-comment-surface)",
|
|
2048
|
+
backgroundColor: "var(--color-cm-comment-surface)",
|
|
2049
|
+
color: "var(--color-cm-comment-text)",
|
|
2059
2050
|
cursor: "pointer"
|
|
2060
2051
|
}
|
|
2061
2052
|
});
|
|
@@ -2073,8 +2064,8 @@ var commentsDecorations = EditorView11.decorations.compute([
|
|
|
2073
2064
|
const decorations2 = sortBy(comments2 ?? [], (range) => range.range.from)?.flatMap((comment) => {
|
|
2074
2065
|
const range = comment.range;
|
|
2075
2066
|
if (!range) {
|
|
2076
|
-
|
|
2077
|
-
F:
|
|
2067
|
+
log7.warn("Invalid range:", range, {
|
|
2068
|
+
F: __dxlog_file10,
|
|
2078
2069
|
L: 140,
|
|
2079
2070
|
S: void 0,
|
|
2080
2071
|
C: (f, a) => f(...a)
|
|
@@ -2418,9 +2409,9 @@ var createExternalCommentSync = (id, subscribe, getComments) => ViewPlugin10.fro
|
|
|
2418
2409
|
// src/extensions/debug.ts
|
|
2419
2410
|
import { syntaxTree } from "@codemirror/language";
|
|
2420
2411
|
import { StateField as StateField4 } from "@codemirror/state";
|
|
2421
|
-
var debugNodeLogger = (
|
|
2412
|
+
var debugNodeLogger = (log12 = console.log) => {
|
|
2422
2413
|
const logTokens = (state) => syntaxTree(state).iterate({
|
|
2423
|
-
enter: (node) =>
|
|
2414
|
+
enter: (node) => log12(node.type)
|
|
2424
2415
|
});
|
|
2425
2416
|
return StateField4.define({
|
|
2426
2417
|
create: (state) => logTokens(state),
|
|
@@ -2455,8 +2446,8 @@ var dropFile = (options = {}) => {
|
|
|
2455
2446
|
};
|
|
2456
2447
|
var styles3 = EditorView12.theme({
|
|
2457
2448
|
".cm-dropCursor": {
|
|
2458
|
-
borderLeft: "2px solid var(--
|
|
2459
|
-
color: "var(--
|
|
2449
|
+
borderLeft: "2px solid var(--color-accent-text)",
|
|
2450
|
+
color: "var(--color-accent-text)",
|
|
2460
2451
|
padding: "0 4px"
|
|
2461
2452
|
},
|
|
2462
2453
|
".cm-dropCursor:after": {
|
|
@@ -2474,42 +2465,58 @@ import { EditorView as EditorView15, ViewPlugin as ViewPlugin11, drawSelection,
|
|
|
2474
2465
|
import { vscodeDarkStyle, vscodeLightStyle } from "@uiw/codemirror-theme-vscode";
|
|
2475
2466
|
import defaultsDeep2 from "lodash.defaultsdeep";
|
|
2476
2467
|
import { generateName } from "@dxos/display-name";
|
|
2477
|
-
import { log as
|
|
2468
|
+
import { log as log8 } from "@dxos/log";
|
|
2478
2469
|
import { hexToHue, isTruthy as isTruthy2 } from "@dxos/util";
|
|
2479
2470
|
|
|
2480
|
-
// src/styles/
|
|
2471
|
+
// src/styles/theme.ts
|
|
2472
|
+
import { EditorView as EditorView13 } from "@codemirror/view";
|
|
2481
2473
|
import { mx as mx3 } from "@dxos/ui-theme";
|
|
2482
2474
|
var headings = {
|
|
2483
|
-
1:
|
|
2484
|
-
|
|
2485
|
-
|
|
2486
|
-
|
|
2487
|
-
|
|
2488
|
-
|
|
2475
|
+
1: {
|
|
2476
|
+
className: "text-4xl",
|
|
2477
|
+
fontSize: "var(--text-4xl)",
|
|
2478
|
+
lineHeight: "var(--text-4xl--line-height)"
|
|
2479
|
+
},
|
|
2480
|
+
2: {
|
|
2481
|
+
className: "text-3xl",
|
|
2482
|
+
fontSize: "var(--text-3xl)",
|
|
2483
|
+
lineHeight: "var(--text-3xl--line-height)"
|
|
2484
|
+
},
|
|
2485
|
+
3: {
|
|
2486
|
+
className: "text-2xl",
|
|
2487
|
+
fontSize: "var(--text-2xl)",
|
|
2488
|
+
lineHeight: "var(--text-2xl--line-height)"
|
|
2489
|
+
},
|
|
2490
|
+
4: {
|
|
2491
|
+
className: "text-xl",
|
|
2492
|
+
fontSize: "var(--text-xl)",
|
|
2493
|
+
lineHeight: "var(--text-xl--line-height)"
|
|
2494
|
+
},
|
|
2495
|
+
5: {
|
|
2496
|
+
className: "text-lg",
|
|
2497
|
+
fontSize: "var(--text-lg)",
|
|
2498
|
+
lineHeight: "var(--text-lg--line-height)"
|
|
2499
|
+
},
|
|
2500
|
+
6: {
|
|
2501
|
+
className: "text-base",
|
|
2502
|
+
fontSize: "var(--text-base)",
|
|
2503
|
+
lineHeight: "var(--text-base--line-height)"
|
|
2504
|
+
}
|
|
2489
2505
|
};
|
|
2490
2506
|
var markdownTheme = {
|
|
2491
|
-
code: "font-mono
|
|
2492
|
-
codeMark: "font-mono text-
|
|
2507
|
+
code: "font-mono no-underline! text-cm-code",
|
|
2508
|
+
codeMark: "font-mono text-cm-code-mark",
|
|
2493
2509
|
mark: "opacity-50",
|
|
2494
|
-
heading: (level) => {
|
|
2495
|
-
|
|
2496
|
-
|
|
2510
|
+
heading: (level) => ({
|
|
2511
|
+
className: mx3(headings[level].className, "font-light text-cm-heading"),
|
|
2512
|
+
color: "var(--color-cm-heading) !important",
|
|
2513
|
+
lineHeight: headings[level].lineHeight,
|
|
2514
|
+
fontSize: headings[level].fontSize,
|
|
2515
|
+
fontWeight: "100 !important"
|
|
2516
|
+
})
|
|
2497
2517
|
};
|
|
2498
|
-
|
|
2499
|
-
|
|
2500
|
-
import { EditorView as EditorView13 } from "@codemirror/view";
|
|
2501
|
-
|
|
2502
|
-
// src/styles/tokens.ts
|
|
2503
|
-
import { tokens } from "@dxos/ui-theme";
|
|
2504
|
-
import { get } from "@dxos/util";
|
|
2505
|
-
var getToken = (path, defaultValue) => {
|
|
2506
|
-
const value = get(tokens, path, defaultValue);
|
|
2507
|
-
return value?.toString() ?? "";
|
|
2508
|
-
};
|
|
2509
|
-
var fontBody = getToken("fontFamily.body");
|
|
2510
|
-
var fontMono = getToken("fontFamily.mono");
|
|
2511
|
-
|
|
2512
|
-
// src/styles/theme.ts
|
|
2518
|
+
var fontBody = "Inter Variable, ui-sans-serif, system-ui, sans-serif";
|
|
2519
|
+
var fontMono = "JetBrains Mono Variable, ui-monospace, Cascadia Code, Source Code Pro, monospace";
|
|
2513
2520
|
var baseTheme = EditorView13.baseTheme({
|
|
2514
2521
|
/**
|
|
2515
2522
|
* Outer frame.
|
|
@@ -2521,7 +2528,9 @@ var baseTheme = EditorView13.baseTheme({
|
|
|
2521
2528
|
/**
|
|
2522
2529
|
* Scroller
|
|
2523
2530
|
*/
|
|
2524
|
-
".cm-scroller": {
|
|
2531
|
+
".cm-scroller": {
|
|
2532
|
+
overflowAnchor: "none"
|
|
2533
|
+
},
|
|
2525
2534
|
".cm-scroller::-webkit-scrollbar": {
|
|
2526
2535
|
width: "8px"
|
|
2527
2536
|
},
|
|
@@ -2531,7 +2540,7 @@ var baseTheme = EditorView13.baseTheme({
|
|
|
2531
2540
|
transition: "background 0.15s"
|
|
2532
2541
|
},
|
|
2533
2542
|
"&:hover .cm-scroller::-webkit-scrollbar-thumb": {
|
|
2534
|
-
background: "var(--
|
|
2543
|
+
background: "var(--color-scrollbar-thumb)"
|
|
2535
2544
|
},
|
|
2536
2545
|
/**
|
|
2537
2546
|
* Content
|
|
@@ -2553,8 +2562,8 @@ var baseTheme = EditorView13.baseTheme({
|
|
|
2553
2562
|
".cm-gutter": {},
|
|
2554
2563
|
".cm-gutter.cm-lineNumbers": {
|
|
2555
2564
|
paddingRight: "4px",
|
|
2556
|
-
borderRight: "1px solid var(--
|
|
2557
|
-
color: "var(--
|
|
2565
|
+
borderRight: "1px solid var(--color-subdued-separator)",
|
|
2566
|
+
color: "var(--color-subdued)"
|
|
2558
2567
|
},
|
|
2559
2568
|
".cm-gutter.cm-lineNumbers .cm-gutterElement": {
|
|
2560
2569
|
minWidth: "40px"
|
|
@@ -2574,25 +2583,25 @@ var baseTheme = EditorView13.baseTheme({
|
|
|
2574
2583
|
paddingInline: 0
|
|
2575
2584
|
},
|
|
2576
2585
|
".cm-activeLine": {
|
|
2577
|
-
background: "var(--
|
|
2586
|
+
background: "var(--color-cm-active-line)"
|
|
2578
2587
|
},
|
|
2579
2588
|
/**
|
|
2580
2589
|
* Cursor (layer).
|
|
2581
2590
|
*/
|
|
2582
2591
|
".cm-cursor, .cm-dropCursor": {
|
|
2583
|
-
borderLeft: "2px solid var(--
|
|
2592
|
+
borderLeft: "2px solid var(--color-cm-cursor)"
|
|
2584
2593
|
},
|
|
2585
2594
|
".cm-placeholder": {
|
|
2586
|
-
color: "var(--
|
|
2595
|
+
color: "var(--color-placeholder)"
|
|
2587
2596
|
},
|
|
2588
2597
|
/**
|
|
2589
2598
|
* Selection (layer).
|
|
2590
2599
|
*/
|
|
2591
2600
|
".cm-selectionBackground": {
|
|
2592
|
-
background: "var(--
|
|
2601
|
+
background: "var(--color-cm-selection)"
|
|
2593
2602
|
},
|
|
2594
2603
|
"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground": {
|
|
2595
|
-
background: "var(--
|
|
2604
|
+
background: "var(--color-cm-focused-selection)"
|
|
2596
2605
|
},
|
|
2597
2606
|
/**
|
|
2598
2607
|
* Search.
|
|
@@ -2602,8 +2611,8 @@ var baseTheme = EditorView13.baseTheme({
|
|
|
2602
2611
|
margin: "0 -3px",
|
|
2603
2612
|
padding: "3px",
|
|
2604
2613
|
borderRadius: "3px",
|
|
2605
|
-
background: "var(--
|
|
2606
|
-
color: "var(--
|
|
2614
|
+
background: "var(--color-cm-highlight-surface)",
|
|
2615
|
+
color: "var(--color-cm-highlight)"
|
|
2607
2616
|
},
|
|
2608
2617
|
".cm-searchMatch-selected": {
|
|
2609
2618
|
textDecoration: "underline"
|
|
@@ -2614,20 +2623,29 @@ var baseTheme = EditorView13.baseTheme({
|
|
|
2614
2623
|
".cm-link": {
|
|
2615
2624
|
textDecorationLine: "underline",
|
|
2616
2625
|
textDecorationThickness: "1px",
|
|
2617
|
-
textDecorationColor: "var(--
|
|
2626
|
+
textDecorationColor: "var(--color-separator)",
|
|
2618
2627
|
textUnderlineOffset: "2px",
|
|
2619
2628
|
borderRadius: ".125rem"
|
|
2620
2629
|
},
|
|
2621
2630
|
".cm-link > span": {
|
|
2622
|
-
color: "var(--
|
|
2631
|
+
color: "var(--color-accent-text)"
|
|
2632
|
+
},
|
|
2633
|
+
".cm-link > span:hover": {
|
|
2634
|
+
color: "var(--color-accent-text-hover)"
|
|
2623
2635
|
},
|
|
2624
2636
|
/**
|
|
2625
2637
|
* Tooltip.
|
|
2626
2638
|
*/
|
|
2627
2639
|
".cm-tooltip": {
|
|
2628
|
-
background: "var(--
|
|
2640
|
+
background: "var(--color-modal-surface)"
|
|
2629
2641
|
},
|
|
2630
2642
|
".cm-tooltip-below": {},
|
|
2643
|
+
".cm-tooltip-hover": {
|
|
2644
|
+
background: "var(--color-modal-surface)",
|
|
2645
|
+
border: "1px solid var(--color-separator)",
|
|
2646
|
+
borderRadius: "4px",
|
|
2647
|
+
overflow: "hidden"
|
|
2648
|
+
},
|
|
2631
2649
|
/**
|
|
2632
2650
|
* Autocomplete.
|
|
2633
2651
|
* https://github.com/codemirror/autocomplete/blob/main/src/completion.ts
|
|
@@ -2635,7 +2653,7 @@ var baseTheme = EditorView13.baseTheme({
|
|
|
2635
2653
|
".cm-tooltip.cm-tooltip-autocomplete": {
|
|
2636
2654
|
marginTop: "6px",
|
|
2637
2655
|
marginLeft: "-10px",
|
|
2638
|
-
border: "2px solid var(--
|
|
2656
|
+
border: "2px solid var(--color-separator)",
|
|
2639
2657
|
borderRadius: "4px"
|
|
2640
2658
|
},
|
|
2641
2659
|
".cm-tooltip.cm-tooltip-autocomplete > ul": {
|
|
@@ -2645,12 +2663,12 @@ var baseTheme = EditorView13.baseTheme({
|
|
|
2645
2663
|
padding: "4px"
|
|
2646
2664
|
},
|
|
2647
2665
|
".cm-tooltip.cm-tooltip-autocomplete > ul > li[aria-selected]": {
|
|
2648
|
-
background: "var(--
|
|
2649
|
-
color: "var(--
|
|
2666
|
+
background: "var(--color-active-surface)",
|
|
2667
|
+
color: "var(--color-base-surface-text)"
|
|
2650
2668
|
},
|
|
2651
2669
|
".cm-tooltip.cm-tooltip-autocomplete > ul > completion-section": {
|
|
2652
2670
|
paddingLeft: "4px !important",
|
|
2653
|
-
color: "var(--
|
|
2671
|
+
color: "var(--color-base-surface-text)"
|
|
2654
2672
|
},
|
|
2655
2673
|
/**
|
|
2656
2674
|
* Completion info.
|
|
@@ -2659,17 +2677,17 @@ var baseTheme = EditorView13.baseTheme({
|
|
|
2659
2677
|
width: "360px !important",
|
|
2660
2678
|
margin: "-10px 1px 0 1px",
|
|
2661
2679
|
padding: "8px !important",
|
|
2662
|
-
borderColor: "var(--
|
|
2680
|
+
borderColor: "var(--color-separator)"
|
|
2663
2681
|
},
|
|
2664
2682
|
".cm-completionIcon": {
|
|
2665
2683
|
display: "none"
|
|
2666
2684
|
},
|
|
2667
2685
|
".cm-completionLabel": {
|
|
2668
|
-
color: "var(--
|
|
2686
|
+
color: "var(--color-description)",
|
|
2669
2687
|
padding: "0 4px"
|
|
2670
2688
|
},
|
|
2671
2689
|
".cm-completionMatchedText": {
|
|
2672
|
-
color: "var(--
|
|
2690
|
+
color: "var(--color-base-surface-text)",
|
|
2673
2691
|
textDecoration: "none !important"
|
|
2674
2692
|
},
|
|
2675
2693
|
/**
|
|
@@ -2693,7 +2711,7 @@ var baseTheme = EditorView13.baseTheme({
|
|
|
2693
2711
|
backgroundColor: "var(--surface-bg)"
|
|
2694
2712
|
},
|
|
2695
2713
|
".cm-panel input, .cm-panel button, .cm-panel label": {
|
|
2696
|
-
color: "var(--
|
|
2714
|
+
color: "var(--color-subdued)",
|
|
2697
2715
|
fontSize: "14px",
|
|
2698
2716
|
all: "unset",
|
|
2699
2717
|
margin: "3px !important",
|
|
@@ -2701,10 +2719,10 @@ var baseTheme = EditorView13.baseTheme({
|
|
|
2701
2719
|
outline: "1px solid transparent"
|
|
2702
2720
|
},
|
|
2703
2721
|
".cm-panel input, .cm-panel button": {
|
|
2704
|
-
backgroundColor: "var(--
|
|
2722
|
+
backgroundColor: "var(--color-input-surface)"
|
|
2705
2723
|
},
|
|
2706
2724
|
".cm-panel input:focus, .cm-panel button:focus": {
|
|
2707
|
-
outline: "1px solid var(--
|
|
2725
|
+
outline: "1px solid var(--color-neutral-focus-indicator)"
|
|
2708
2726
|
},
|
|
2709
2727
|
".cm-panel label": {
|
|
2710
2728
|
display: "inline-flex",
|
|
@@ -2717,26 +2735,26 @@ var baseTheme = EditorView13.baseTheme({
|
|
|
2717
2735
|
height: "8px",
|
|
2718
2736
|
marginRight: "6px !important",
|
|
2719
2737
|
padding: "2px !important",
|
|
2720
|
-
color: "var(--
|
|
2738
|
+
color: "var(--color-neutral-focus-indicator)"
|
|
2721
2739
|
},
|
|
2722
2740
|
".cm-panel button": {
|
|
2723
2741
|
"&:hover": {
|
|
2724
|
-
// TODO(burdon): Replace with layer and @apply bg-
|
|
2725
|
-
backgroundColor: "var(--
|
|
2742
|
+
// TODO(burdon): Replace with layer and @apply bg-accent-surface-hover
|
|
2743
|
+
backgroundColor: "var(--color-accent-surface-hover) !important"
|
|
2726
2744
|
},
|
|
2727
2745
|
"&:active": {
|
|
2728
|
-
backgroundColor: "var(--
|
|
2746
|
+
backgroundColor: "var(--color-accent-surface-hover)"
|
|
2729
2747
|
}
|
|
2730
2748
|
},
|
|
2731
2749
|
".cm-panel.cm-search": {
|
|
2732
2750
|
padding: "4px",
|
|
2733
|
-
borderTop: "1px solid var(--
|
|
2751
|
+
borderTop: "1px solid var(--color-separator)"
|
|
2734
2752
|
}
|
|
2735
2753
|
});
|
|
2736
2754
|
var editorGutter = EditorView13.theme({
|
|
2737
2755
|
".cm-gutters": {
|
|
2738
2756
|
// NOTE: Non-transparent background required to cover content if scrolling horizontally.
|
|
2739
|
-
background: "var(--
|
|
2757
|
+
background: "var(--color-base-surface) !important",
|
|
2740
2758
|
paddingRight: "1rem"
|
|
2741
2759
|
}
|
|
2742
2760
|
});
|
|
@@ -2785,7 +2803,7 @@ var focus = [
|
|
|
2785
2803
|
];
|
|
2786
2804
|
|
|
2787
2805
|
// src/extensions/factories.ts
|
|
2788
|
-
var
|
|
2806
|
+
var __dxlog_file11 = "/__w/dxos/dxos/packages/ui/ui-editor/src/extensions/factories.ts";
|
|
2789
2807
|
var tabbable = EditorView15.contentAttributes.of({
|
|
2790
2808
|
tabindex: "0"
|
|
2791
2809
|
});
|
|
@@ -2840,9 +2858,9 @@ var createBasicExtensions = (propsProp) => {
|
|
|
2840
2858
|
return [
|
|
2841
2859
|
// NOTE: Doesn't catch errors in keymap functions.
|
|
2842
2860
|
EditorView15.exceptionSink.of((err) => {
|
|
2843
|
-
|
|
2844
|
-
F:
|
|
2845
|
-
L:
|
|
2861
|
+
log8.catch(err, void 0, {
|
|
2862
|
+
F: __dxlog_file11,
|
|
2863
|
+
L: 131,
|
|
2846
2864
|
S: void 0,
|
|
2847
2865
|
C: (f, a) => f(...a)
|
|
2848
2866
|
});
|
|
@@ -2894,12 +2912,12 @@ var createBasicExtensions = (propsProp) => {
|
|
|
2894
2912
|
};
|
|
2895
2913
|
var grow = {
|
|
2896
2914
|
editor: {
|
|
2897
|
-
className: "
|
|
2915
|
+
className: "h-full w-full"
|
|
2898
2916
|
}
|
|
2899
2917
|
};
|
|
2900
2918
|
var fullWidth = {
|
|
2901
2919
|
editor: {
|
|
2902
|
-
className: "
|
|
2920
|
+
className: "w-full"
|
|
2903
2921
|
}
|
|
2904
2922
|
};
|
|
2905
2923
|
var defaultThemeSlots = grow;
|
|
@@ -2942,8 +2960,8 @@ var createDataExtensions = ({ id, text, messenger, identity }) => {
|
|
|
2942
2960
|
channel: `awareness.${id}`,
|
|
2943
2961
|
peerId: identity.identityKey.toHex(),
|
|
2944
2962
|
info: {
|
|
2945
|
-
darkColor: `var(--
|
|
2946
|
-
lightColor: `var(--
|
|
2963
|
+
darkColor: `var(--color-${hue}-border)`,
|
|
2964
|
+
lightColor: `var(--color-${hue}-border)`,
|
|
2947
2965
|
displayName: identity.profile?.displayName ?? generateName(identity.identityKey.toHex())
|
|
2948
2966
|
}
|
|
2949
2967
|
})));
|
|
@@ -2962,7 +2980,7 @@ var folding = () => {
|
|
|
2962
2980
|
}),
|
|
2963
2981
|
foldGutter({
|
|
2964
2982
|
markerDOM: (open) => {
|
|
2965
|
-
return Domino2.of("div").classNames("flex
|
|
2983
|
+
return Domino2.of("div").classNames("flex h-full justify-center items-center").children(Domino2.of("svg", Domino2.SVG).classNames(mx4("w-4 h-4 cursor-pointer", open && "rotate-90")).children(Domino2.of("use", Domino2.SVG).attributes({
|
|
2966
2984
|
href: Domino2.icon("ph--caret-right--regular")
|
|
2967
2985
|
}))).root;
|
|
2968
2986
|
}
|
|
@@ -4258,6 +4276,11 @@ import { markdownLanguage } from "@codemirror/lang-markdown";
|
|
|
4258
4276
|
import { HighlightStyle as HighlightStyle2 } from "@codemirror/language";
|
|
4259
4277
|
import { Tag, styleTags, tags } from "@lezer/highlight";
|
|
4260
4278
|
import { Table } from "@lezer/markdown";
|
|
4279
|
+
var styles4 = {
|
|
4280
|
+
code: "font-mono no-underline! text-cm-code",
|
|
4281
|
+
codeMark: "font-mono text-cm-code-mark",
|
|
4282
|
+
mark: "opacity-50"
|
|
4283
|
+
};
|
|
4261
4284
|
var markdownTags = {
|
|
4262
4285
|
Blockquote: Tag.define(),
|
|
4263
4286
|
CodeMark: Tag.define(),
|
|
@@ -4339,7 +4362,7 @@ var markdownHighlightStyle = (_options = {}) => {
|
|
|
4339
4362
|
markdownTags.LinkReference,
|
|
4340
4363
|
markdownTags.ListMark
|
|
4341
4364
|
],
|
|
4342
|
-
class:
|
|
4365
|
+
class: styles4.mark
|
|
4343
4366
|
},
|
|
4344
4367
|
// Markdown marks.
|
|
4345
4368
|
{
|
|
@@ -4350,7 +4373,7 @@ var markdownHighlightStyle = (_options = {}) => {
|
|
|
4350
4373
|
markdownTags.QuoteMark,
|
|
4351
4374
|
markdownTags.EmphasisMark
|
|
4352
4375
|
],
|
|
4353
|
-
class:
|
|
4376
|
+
class: styles4.mark
|
|
4354
4377
|
},
|
|
4355
4378
|
// E.g., code block language (after ```).
|
|
4356
4379
|
{
|
|
@@ -4359,7 +4382,7 @@ var markdownHighlightStyle = (_options = {}) => {
|
|
|
4359
4382
|
tags.function(tags.variableName),
|
|
4360
4383
|
tags.labelName
|
|
4361
4384
|
],
|
|
4362
|
-
class:
|
|
4385
|
+
class: styles4.codeMark
|
|
4363
4386
|
},
|
|
4364
4387
|
// Fonts.
|
|
4365
4388
|
{
|
|
@@ -4369,30 +4392,38 @@ var markdownHighlightStyle = (_options = {}) => {
|
|
|
4369
4392
|
],
|
|
4370
4393
|
class: "font-mono"
|
|
4371
4394
|
},
|
|
4372
|
-
// Headings
|
|
4395
|
+
// Headings — use CSS properties only (no class:) so CodeMirror generates scoped CSS via
|
|
4396
|
+
// StyleModule that overrides vscodeDarkStyle's t.heading rule. When class: is present,
|
|
4397
|
+
// HighlightStyle silently ignores all other CSS properties (they're mutually exclusive).
|
|
4398
|
+
// Font sizes use Tailwind v4 CSS variables so nothing is hardcoded.
|
|
4399
|
+
{
|
|
4400
|
+
tag: tags.heading,
|
|
4401
|
+
color: "var(--color-cm-heading) !important",
|
|
4402
|
+
fontWeight: "300"
|
|
4403
|
+
},
|
|
4373
4404
|
{
|
|
4374
4405
|
tag: tags.heading1,
|
|
4375
|
-
|
|
4406
|
+
...markdownTheme.heading(1)
|
|
4376
4407
|
},
|
|
4377
4408
|
{
|
|
4378
4409
|
tag: tags.heading2,
|
|
4379
|
-
|
|
4410
|
+
...markdownTheme.heading(2)
|
|
4380
4411
|
},
|
|
4381
4412
|
{
|
|
4382
4413
|
tag: tags.heading3,
|
|
4383
|
-
|
|
4414
|
+
...markdownTheme.heading(3)
|
|
4384
4415
|
},
|
|
4385
4416
|
{
|
|
4386
4417
|
tag: tags.heading4,
|
|
4387
|
-
|
|
4418
|
+
...markdownTheme.heading(4)
|
|
4388
4419
|
},
|
|
4389
4420
|
{
|
|
4390
4421
|
tag: tags.heading5,
|
|
4391
|
-
|
|
4422
|
+
...markdownTheme.heading(5)
|
|
4392
4423
|
},
|
|
4393
4424
|
{
|
|
4394
4425
|
tag: tags.heading6,
|
|
4395
|
-
|
|
4426
|
+
...markdownTheme.heading(6)
|
|
4396
4427
|
},
|
|
4397
4428
|
// Emphasis.
|
|
4398
4429
|
{
|
|
@@ -4417,7 +4448,7 @@ var markdownHighlightStyle = (_options = {}) => {
|
|
|
4417
4448
|
markdownTags.CodeText,
|
|
4418
4449
|
markdownTags.InlineCode
|
|
4419
4450
|
],
|
|
4420
|
-
class:
|
|
4451
|
+
class: styles4.code
|
|
4421
4452
|
},
|
|
4422
4453
|
{
|
|
4423
4454
|
tag: [
|
|
@@ -4774,7 +4805,7 @@ var formattingStyles = EditorView21.theme({
|
|
|
4774
4805
|
width: "100%",
|
|
4775
4806
|
height: "0",
|
|
4776
4807
|
verticalAlign: "middle",
|
|
4777
|
-
borderTop: "1px solid var(--
|
|
4808
|
+
borderTop: "1px solid var(--color-cm-separator)",
|
|
4778
4809
|
opacity: 0.5
|
|
4779
4810
|
},
|
|
4780
4811
|
/**
|
|
@@ -4797,8 +4828,8 @@ var formattingStyles = EditorView21.theme({
|
|
|
4797
4828
|
* Blockquote.
|
|
4798
4829
|
*/
|
|
4799
4830
|
"& .cm-blockquote": {
|
|
4800
|
-
background: "var(--
|
|
4801
|
-
borderLeft: "2px solid var(--
|
|
4831
|
+
background: "var(--color-cm-codeblock)",
|
|
4832
|
+
borderLeft: "2px solid var(--color-cm-separator)",
|
|
4802
4833
|
paddingLeft: "1rem",
|
|
4803
4834
|
margin: "0"
|
|
4804
4835
|
},
|
|
@@ -4809,7 +4840,7 @@ var formattingStyles = EditorView21.theme({
|
|
|
4809
4840
|
fontFamily: fontMono
|
|
4810
4841
|
},
|
|
4811
4842
|
"& .cm-codeblock-line": {
|
|
4812
|
-
background: "var(--
|
|
4843
|
+
background: "var(--color-cm-codeblock)",
|
|
4813
4844
|
paddingInline: "1rem !important"
|
|
4814
4845
|
},
|
|
4815
4846
|
"& .cm-codeblock-start": {
|
|
@@ -4843,8 +4874,8 @@ var formattingStyles = EditorView21.theme({
|
|
|
4843
4874
|
".cm-table-head": {
|
|
4844
4875
|
padding: "2px 16px 2px 0px",
|
|
4845
4876
|
textAlign: "left",
|
|
4846
|
-
borderBottom: "1px solid var(--
|
|
4847
|
-
color: "var(--
|
|
4877
|
+
borderBottom: "1px solid var(--color-cm-separator)",
|
|
4878
|
+
color: "var(--color-subdued)"
|
|
4848
4879
|
},
|
|
4849
4880
|
".cm-table-cell": {
|
|
4850
4881
|
padding: "2px 16px 2px 0px"
|
|
@@ -4984,7 +5015,7 @@ var TableWidget = class extends WidgetType6 {
|
|
|
4984
5015
|
};
|
|
4985
5016
|
|
|
4986
5017
|
// src/extensions/markdown/decorate.ts
|
|
4987
|
-
var
|
|
5018
|
+
var __dxlog_file12 = "/__w/dxos/dxos/packages/ui/ui-editor/src/extensions/markdown/decorate.ts";
|
|
4988
5019
|
var Unicode = {
|
|
4989
5020
|
emDash: "\u2014",
|
|
4990
5021
|
bullet: "\u2022",
|
|
@@ -5007,7 +5038,6 @@ var LinkButton = class extends WidgetType7 {
|
|
|
5007
5038
|
eq(other) {
|
|
5008
5039
|
return this.url === other.url;
|
|
5009
5040
|
}
|
|
5010
|
-
// TODO(burdon): Create icon and link directly without react?
|
|
5011
5041
|
toDOM(view) {
|
|
5012
5042
|
const el = document.createElement("span");
|
|
5013
5043
|
this.render(el, {
|
|
@@ -5120,8 +5150,8 @@ var buildDecorations2 = (view, options, focus2) => {
|
|
|
5120
5150
|
const headerLevels = [];
|
|
5121
5151
|
const getHeaderLevels = (node, level) => {
|
|
5122
5152
|
invariant4(level > 0, void 0, {
|
|
5123
|
-
F:
|
|
5124
|
-
L:
|
|
5153
|
+
F: __dxlog_file12,
|
|
5154
|
+
L: 179,
|
|
5125
5155
|
S: void 0,
|
|
5126
5156
|
A: [
|
|
5127
5157
|
"level > 0",
|
|
@@ -5159,8 +5189,8 @@ var buildDecorations2 = (view, options, focus2) => {
|
|
|
5159
5189
|
};
|
|
5160
5190
|
const getCurrentListLevel = () => {
|
|
5161
5191
|
invariant4(listLevels.length, void 0, {
|
|
5162
|
-
F:
|
|
5163
|
-
L:
|
|
5192
|
+
F: __dxlog_file12,
|
|
5193
|
+
L: 201,
|
|
5164
5194
|
S: void 0,
|
|
5165
5195
|
A: [
|
|
5166
5196
|
"listLevels.length",
|
|
@@ -5210,7 +5240,7 @@ var buildDecorations2 = (view, options, focus2) => {
|
|
|
5210
5240
|
from: mark.from,
|
|
5211
5241
|
to: mark.from + len,
|
|
5212
5242
|
deco: Decoration11.replace({
|
|
5213
|
-
widget: new TextWidget(num, markdownTheme.heading(level))
|
|
5243
|
+
widget: new TextWidget(num, markdownTheme.heading(level).className)
|
|
5214
5244
|
})
|
|
5215
5245
|
});
|
|
5216
5246
|
}
|
|
@@ -5549,8 +5579,7 @@ var linkTooltip = (renderTooltip) => {
|
|
|
5549
5579
|
return {
|
|
5550
5580
|
pos: link.from,
|
|
5551
5581
|
end: link.to,
|
|
5552
|
-
|
|
5553
|
-
// above: true,
|
|
5582
|
+
above: true,
|
|
5554
5583
|
create: () => {
|
|
5555
5584
|
const el = document.createElement("div");
|
|
5556
5585
|
el.className = tooltipContent({});
|
|
@@ -5566,16 +5595,13 @@ var linkTooltip = (renderTooltip) => {
|
|
|
5566
5595
|
};
|
|
5567
5596
|
}
|
|
5568
5597
|
};
|
|
5569
|
-
}, {
|
|
5570
|
-
// NOTE: 0 = default of 300ms.
|
|
5571
|
-
hoverTime: 1
|
|
5572
5598
|
});
|
|
5573
5599
|
};
|
|
5574
5600
|
|
|
5575
5601
|
// src/extensions/mention.ts
|
|
5576
5602
|
import { autocompletion } from "@codemirror/autocomplete";
|
|
5577
|
-
import { log as
|
|
5578
|
-
var
|
|
5603
|
+
import { log as log9 } from "@dxos/log";
|
|
5604
|
+
var __dxlog_file13 = "/__w/dxos/dxos/packages/ui/ui-editor/src/extensions/mention.ts";
|
|
5579
5605
|
var mention = ({ debug, onSearch }) => {
|
|
5580
5606
|
return autocompletion({
|
|
5581
5607
|
// TODO(burdon): Not working.
|
|
@@ -5587,10 +5613,10 @@ var mention = ({ debug, onSearch }) => {
|
|
|
5587
5613
|
icons: false,
|
|
5588
5614
|
override: [
|
|
5589
5615
|
(context) => {
|
|
5590
|
-
|
|
5616
|
+
log9.info("completion context", {
|
|
5591
5617
|
context
|
|
5592
5618
|
}, {
|
|
5593
|
-
F:
|
|
5619
|
+
F: __dxlog_file13,
|
|
5594
5620
|
L: 27,
|
|
5595
5621
|
S: void 0,
|
|
5596
5622
|
C: (f, a) => f(...a)
|
|
@@ -5673,7 +5699,7 @@ import { syntaxTree as syntaxTree9 } from "@codemirror/language";
|
|
|
5673
5699
|
import { StateField as StateField10 } from "@codemirror/state";
|
|
5674
5700
|
import { Facet as Facet2 } from "@codemirror/state";
|
|
5675
5701
|
import { invariant as invariant5 } from "@dxos/invariant";
|
|
5676
|
-
var
|
|
5702
|
+
var __dxlog_file14 = "/__w/dxos/dxos/packages/ui/ui-editor/src/extensions/outliner/tree.ts";
|
|
5677
5703
|
var itemToJSON = ({ type, index, level, lineRange, contentRange, children }) => {
|
|
5678
5704
|
return {
|
|
5679
5705
|
type,
|
|
@@ -5828,7 +5854,7 @@ var outlinerTree = (_options = {}) => {
|
|
|
5828
5854
|
}
|
|
5829
5855
|
case "BulletList": {
|
|
5830
5856
|
invariant5(current, void 0, {
|
|
5831
|
-
F:
|
|
5857
|
+
F: __dxlog_file14,
|
|
5832
5858
|
L: 219,
|
|
5833
5859
|
S: void 0,
|
|
5834
5860
|
A: [
|
|
@@ -5845,7 +5871,7 @@ var outlinerTree = (_options = {}) => {
|
|
|
5845
5871
|
}
|
|
5846
5872
|
case "ListItem": {
|
|
5847
5873
|
invariant5(parent, void 0, {
|
|
5848
|
-
F:
|
|
5874
|
+
F: __dxlog_file14,
|
|
5849
5875
|
L: 228,
|
|
5850
5876
|
S: void 0,
|
|
5851
5877
|
A: [
|
|
@@ -5887,7 +5913,7 @@ var outlinerTree = (_options = {}) => {
|
|
|
5887
5913
|
}
|
|
5888
5914
|
case "ListMark": {
|
|
5889
5915
|
invariant5(current, void 0, {
|
|
5890
|
-
F:
|
|
5916
|
+
F: __dxlog_file14,
|
|
5891
5917
|
L: 272,
|
|
5892
5918
|
S: void 0,
|
|
5893
5919
|
A: [
|
|
@@ -5901,7 +5927,7 @@ var outlinerTree = (_options = {}) => {
|
|
|
5901
5927
|
}
|
|
5902
5928
|
case "Task": {
|
|
5903
5929
|
invariant5(current, void 0, {
|
|
5904
|
-
F:
|
|
5930
|
+
F: __dxlog_file14,
|
|
5905
5931
|
L: 278,
|
|
5906
5932
|
S: void 0,
|
|
5907
5933
|
A: [
|
|
@@ -5914,7 +5940,7 @@ var outlinerTree = (_options = {}) => {
|
|
|
5914
5940
|
}
|
|
5915
5941
|
case "TaskMarker": {
|
|
5916
5942
|
invariant5(current, void 0, {
|
|
5917
|
-
F:
|
|
5943
|
+
F: __dxlog_file14,
|
|
5918
5944
|
L: 283,
|
|
5919
5945
|
S: void 0,
|
|
5920
5946
|
A: [
|
|
@@ -5930,7 +5956,7 @@ var outlinerTree = (_options = {}) => {
|
|
|
5930
5956
|
leave: (node) => {
|
|
5931
5957
|
if (node.name === "BulletList") {
|
|
5932
5958
|
invariant5(parent, void 0, {
|
|
5933
|
-
F:
|
|
5959
|
+
F: __dxlog_file14,
|
|
5934
5960
|
L: 291,
|
|
5935
5961
|
S: void 0,
|
|
5936
5962
|
A: [
|
|
@@ -5944,7 +5970,7 @@ var outlinerTree = (_options = {}) => {
|
|
|
5944
5970
|
}
|
|
5945
5971
|
});
|
|
5946
5972
|
invariant5(tree, void 0, {
|
|
5947
|
-
F:
|
|
5973
|
+
F: __dxlog_file14,
|
|
5948
5974
|
L: 298,
|
|
5949
5975
|
S: void 0,
|
|
5950
5976
|
A: [
|
|
@@ -6242,8 +6268,8 @@ import { mx as mx7 } from "@dxos/ui-theme";
|
|
|
6242
6268
|
// src/extensions/outliner/editor.ts
|
|
6243
6269
|
import { EditorSelection as EditorSelection4, EditorState as EditorState2 } from "@codemirror/state";
|
|
6244
6270
|
import { ViewPlugin as ViewPlugin15 } from "@codemirror/view";
|
|
6245
|
-
import { log as
|
|
6246
|
-
var
|
|
6271
|
+
import { log as log10 } from "@dxos/log";
|
|
6272
|
+
var __dxlog_file15 = "/__w/dxos/dxos/packages/ui/ui-editor/src/extensions/outliner/editor.ts";
|
|
6247
6273
|
var LIST_ITEM_REGEX = /^\s*- (\[ \]|\[x\])? /;
|
|
6248
6274
|
var initialize = () => {
|
|
6249
6275
|
return ViewPlugin15.fromClass(class {
|
|
@@ -6375,7 +6401,7 @@ var editor = () => [
|
|
|
6375
6401
|
cancel = true;
|
|
6376
6402
|
return;
|
|
6377
6403
|
}
|
|
6378
|
-
|
|
6404
|
+
log10("change", {
|
|
6379
6405
|
item,
|
|
6380
6406
|
line: {
|
|
6381
6407
|
from: line.from,
|
|
@@ -6394,7 +6420,7 @@ var editor = () => [
|
|
|
6394
6420
|
length: insert.length
|
|
6395
6421
|
}
|
|
6396
6422
|
}, {
|
|
6397
|
-
F:
|
|
6423
|
+
F: __dxlog_file15,
|
|
6398
6424
|
L: 164,
|
|
6399
6425
|
S: void 0,
|
|
6400
6426
|
C: (f, a) => f(...a)
|
|
@@ -6402,10 +6428,10 @@ var editor = () => [
|
|
|
6402
6428
|
}
|
|
6403
6429
|
});
|
|
6404
6430
|
if (changes.length > 0) {
|
|
6405
|
-
|
|
6431
|
+
log10("modified,", {
|
|
6406
6432
|
changes
|
|
6407
6433
|
}, {
|
|
6408
|
-
F:
|
|
6434
|
+
F: __dxlog_file15,
|
|
6409
6435
|
L: 175,
|
|
6410
6436
|
S: void 0,
|
|
6411
6437
|
C: (f, a) => f(...a)
|
|
@@ -6416,8 +6442,8 @@ var editor = () => [
|
|
|
6416
6442
|
}
|
|
6417
6443
|
];
|
|
6418
6444
|
} else if (cancel) {
|
|
6419
|
-
|
|
6420
|
-
F:
|
|
6445
|
+
log10("cancel", void 0, {
|
|
6446
|
+
F: __dxlog_file15,
|
|
6421
6447
|
L: 178,
|
|
6422
6448
|
S: void 0,
|
|
6423
6449
|
C: (f, a) => f(...a)
|
|
@@ -6531,7 +6557,7 @@ var outliner = (_options = {}) => [
|
|
|
6531
6557
|
}),
|
|
6532
6558
|
// Researve space for menu.
|
|
6533
6559
|
EditorView25.contentAttributes.of({
|
|
6534
|
-
class: "
|
|
6560
|
+
class: "w-full !mr-[3rem]"
|
|
6535
6561
|
})
|
|
6536
6562
|
];
|
|
6537
6563
|
var decorations = () => [
|
|
@@ -6595,10 +6621,10 @@ var decorations = () => [
|
|
|
6595
6621
|
marginBottom: "2px"
|
|
6596
6622
|
},
|
|
6597
6623
|
".cm-list-item-focused": {
|
|
6598
|
-
borderColor: "var(--
|
|
6624
|
+
borderColor: "var(--color-neutral-focus-indicator)"
|
|
6599
6625
|
},
|
|
6600
6626
|
"&:focus-within .cm-list-item-selected": {
|
|
6601
|
-
borderColor: "var(--
|
|
6627
|
+
borderColor: "var(--color-separator)"
|
|
6602
6628
|
}
|
|
6603
6629
|
}))
|
|
6604
6630
|
];
|
|
@@ -6715,7 +6741,7 @@ var PreviewBlockWidget = class extends WidgetType8 {
|
|
|
6715
6741
|
}
|
|
6716
6742
|
toDOM(_view) {
|
|
6717
6743
|
const root = document.createElement("div");
|
|
6718
|
-
root.classList.add("cm-preview-block", "density-fine");
|
|
6744
|
+
root.classList.add("cm-preview-block", "dx-density-fine");
|
|
6719
6745
|
this._options.addBlockContainer?.({
|
|
6720
6746
|
link: this._link,
|
|
6721
6747
|
el: root
|
|
@@ -7012,7 +7038,7 @@ var CursorWidget = class extends WidgetType9 {
|
|
|
7012
7038
|
};
|
|
7013
7039
|
var fadeIn = (options = {}) => {
|
|
7014
7040
|
const FADE_IN_DURATION = 1e3;
|
|
7015
|
-
const DEFAULT_REMOVAL_DELAY =
|
|
7041
|
+
const DEFAULT_REMOVAL_DELAY = 3e3;
|
|
7016
7042
|
const removalDelay = options.removalDelay ?? DEFAULT_REMOVAL_DELAY;
|
|
7017
7043
|
const removeDecoration = StateEffect8.define();
|
|
7018
7044
|
const fadeField = StateField12.define({
|
|
@@ -7127,14 +7153,14 @@ import { syntaxTree as syntaxTree11 } from "@codemirror/language";
|
|
|
7127
7153
|
import { Prec as Prec7, RangeSetBuilder as RangeSetBuilder7, StateEffect as StateEffect9, StateField as StateField13 } from "@codemirror/state";
|
|
7128
7154
|
import { Decoration as Decoration15, EditorView as EditorView29, ViewPlugin as ViewPlugin19, WidgetType as WidgetType10, keymap as keymap13 } from "@codemirror/view";
|
|
7129
7155
|
import { invariant as invariant7 } from "@dxos/invariant";
|
|
7130
|
-
import { log as
|
|
7156
|
+
import { log as log11 } from "@dxos/log";
|
|
7131
7157
|
|
|
7132
7158
|
// src/extensions/tags/xml-util.ts
|
|
7133
7159
|
import { invariant as invariant6 } from "@dxos/invariant";
|
|
7134
|
-
var
|
|
7160
|
+
var __dxlog_file16 = "/__w/dxos/dxos/packages/ui/ui-editor/src/extensions/tags/xml-util.ts";
|
|
7135
7161
|
var nodeToJson = (state, node) => {
|
|
7136
7162
|
invariant6(node.type.name === "Element", "Node is not an Element", {
|
|
7137
|
-
F:
|
|
7163
|
+
F: __dxlog_file16,
|
|
7138
7164
|
L: 18,
|
|
7139
7165
|
S: void 0,
|
|
7140
7166
|
A: [
|
|
@@ -7198,7 +7224,7 @@ var nodeToJson = (state, node) => {
|
|
|
7198
7224
|
};
|
|
7199
7225
|
|
|
7200
7226
|
// src/extensions/tags/xml-tags.ts
|
|
7201
|
-
var
|
|
7227
|
+
var __dxlog_file17 = "/__w/dxos/dxos/packages/ui/ui-editor/src/extensions/tags/xml-tags.ts";
|
|
7202
7228
|
var navigatePreviousEffect = StateEffect9.define();
|
|
7203
7229
|
var navigateNextEffect = StateEffect9.define();
|
|
7204
7230
|
var getXmlTextChild = (children) => {
|
|
@@ -7228,11 +7254,11 @@ var widgetStateMapStateField = StateField13.define({
|
|
|
7228
7254
|
}
|
|
7229
7255
|
if (effect.is(xmlTagUpdateEffect)) {
|
|
7230
7256
|
const { id, value } = effect.value;
|
|
7231
|
-
|
|
7257
|
+
log11("widget updated", {
|
|
7232
7258
|
id,
|
|
7233
7259
|
value
|
|
7234
7260
|
}, {
|
|
7235
|
-
F:
|
|
7261
|
+
F: __dxlog_file17,
|
|
7236
7262
|
L: 153,
|
|
7237
7263
|
S: void 0,
|
|
7238
7264
|
C: (f, a) => f(...a)
|
|
@@ -7263,11 +7289,11 @@ var createWidgetMap = (setWidgets) => {
|
|
|
7263
7289
|
const widgets = /* @__PURE__ */ new Map();
|
|
7264
7290
|
const notifier = {
|
|
7265
7291
|
mounted: (state) => {
|
|
7266
|
-
|
|
7292
|
+
log11("widget mounted", {
|
|
7267
7293
|
id: state.id,
|
|
7268
7294
|
tag: state.props._tag
|
|
7269
7295
|
}, {
|
|
7270
|
-
F:
|
|
7296
|
+
F: __dxlog_file17,
|
|
7271
7297
|
L: 206,
|
|
7272
7298
|
S: void 0,
|
|
7273
7299
|
C: (f, a) => f(...a)
|
|
@@ -7279,11 +7305,11 @@ var createWidgetMap = (setWidgets) => {
|
|
|
7279
7305
|
},
|
|
7280
7306
|
unmounted: (id) => {
|
|
7281
7307
|
const state = widgets.get(id);
|
|
7282
|
-
|
|
7308
|
+
log11("widget unmounted", {
|
|
7283
7309
|
id,
|
|
7284
7310
|
tag: state?.props._tag
|
|
7285
7311
|
}, {
|
|
7286
|
-
F:
|
|
7312
|
+
F: __dxlog_file17,
|
|
7287
7313
|
L: 212,
|
|
7288
7314
|
S: void 0,
|
|
7289
7315
|
C: (f, a) => f(...a)
|
|
@@ -7345,11 +7371,9 @@ var createNavigationEffectPlugin = (widgetDecorationsField, bookmarks2) => {
|
|
|
7345
7371
|
anchor: line.from,
|
|
7346
7372
|
head: line.from
|
|
7347
7373
|
},
|
|
7348
|
-
effects:
|
|
7349
|
-
line: line.number,
|
|
7350
|
-
|
|
7351
|
-
offset: -16
|
|
7352
|
-
}
|
|
7374
|
+
effects: scrollerLineEffect.of({
|
|
7375
|
+
line: line.number - 1,
|
|
7376
|
+
offset: -16
|
|
7353
7377
|
})
|
|
7354
7378
|
});
|
|
7355
7379
|
continue;
|
|
@@ -7380,11 +7404,9 @@ var createNavigationEffectPlugin = (widgetDecorationsField, bookmarks2) => {
|
|
|
7380
7404
|
anchor: line.to,
|
|
7381
7405
|
head: line.to
|
|
7382
7406
|
},
|
|
7383
|
-
effects:
|
|
7384
|
-
line: line.number,
|
|
7385
|
-
|
|
7386
|
-
offset: -16
|
|
7387
|
-
}
|
|
7407
|
+
effects: scrollerLineEffect.of({
|
|
7408
|
+
line: line.number - 1,
|
|
7409
|
+
offset: -16
|
|
7388
7410
|
})
|
|
7389
7411
|
});
|
|
7390
7412
|
} else {
|
|
@@ -7394,11 +7416,9 @@ var createNavigationEffectPlugin = (widgetDecorationsField, bookmarks2) => {
|
|
|
7394
7416
|
anchor: line.to,
|
|
7395
7417
|
head: line.to
|
|
7396
7418
|
},
|
|
7397
|
-
effects:
|
|
7398
|
-
line: line.number,
|
|
7399
|
-
|
|
7400
|
-
position: "end"
|
|
7401
|
-
}
|
|
7419
|
+
effects: scrollerLineEffect.of({
|
|
7420
|
+
line: line.number - 1,
|
|
7421
|
+
position: "end"
|
|
7402
7422
|
})
|
|
7403
7423
|
});
|
|
7404
7424
|
}
|
|
@@ -7445,6 +7465,12 @@ var createWidgetDecorationsField = (registry = {}, notifier) => StateField13.def
|
|
|
7445
7465
|
update: ({ from, decorations: decorations2 }, tr) => {
|
|
7446
7466
|
for (const effect of tr.effects) {
|
|
7447
7467
|
if (effect.is(xmlTagResetEffect)) {
|
|
7468
|
+
if (tr.docChanged) {
|
|
7469
|
+
return buildDecorations4(tr.state, {
|
|
7470
|
+
from: 0,
|
|
7471
|
+
to: tr.state.doc.length
|
|
7472
|
+
}, registry, notifier);
|
|
7473
|
+
}
|
|
7448
7474
|
return {
|
|
7449
7475
|
from: 0,
|
|
7450
7476
|
decorations: Decoration15.none
|
|
@@ -7455,12 +7481,12 @@ var createWidgetDecorationsField = (registry = {}, notifier) => StateField13.def
|
|
|
7455
7481
|
const { state } = tr;
|
|
7456
7482
|
const reset = tr.changes.touchesRange(0, from);
|
|
7457
7483
|
if (reset) {
|
|
7458
|
-
|
|
7484
|
+
log11("document reset", {
|
|
7459
7485
|
from,
|
|
7460
7486
|
to: state.doc.length
|
|
7461
7487
|
}, {
|
|
7462
|
-
F:
|
|
7463
|
-
L:
|
|
7488
|
+
F: __dxlog_file17,
|
|
7489
|
+
L: 374,
|
|
7464
7490
|
S: void 0,
|
|
7465
7491
|
C: (f, a) => f(...a)
|
|
7466
7492
|
});
|
|
@@ -7541,9 +7567,9 @@ var buildDecorations4 = (state, range, registry, notifier) => {
|
|
|
7541
7567
|
}
|
|
7542
7568
|
}
|
|
7543
7569
|
} catch (err) {
|
|
7544
|
-
|
|
7545
|
-
F:
|
|
7546
|
-
L:
|
|
7570
|
+
log11.catch(err, void 0, {
|
|
7571
|
+
F: __dxlog_file17,
|
|
7572
|
+
L: 459,
|
|
7547
7573
|
S: void 0,
|
|
7548
7574
|
C: (f, a) => f(...a)
|
|
7549
7575
|
});
|
|
@@ -7567,8 +7593,8 @@ var PlaceholderWidget2 = class extends WidgetType10 {
|
|
|
7567
7593
|
constructor(id, Component, props, notifier) {
|
|
7568
7594
|
super(), this.id = id, this.Component = Component, this.props = props, this.notifier = notifier;
|
|
7569
7595
|
invariant7(id, void 0, {
|
|
7570
|
-
F:
|
|
7571
|
-
L:
|
|
7596
|
+
F: __dxlog_file17,
|
|
7597
|
+
L: 485,
|
|
7572
7598
|
S: this,
|
|
7573
7599
|
A: [
|
|
7574
7600
|
"id",
|
|
@@ -7697,6 +7723,7 @@ export {
|
|
|
7697
7723
|
convertTreeToJson,
|
|
7698
7724
|
createBasicExtensions,
|
|
7699
7725
|
createComment,
|
|
7726
|
+
createCrawler,
|
|
7700
7727
|
createDataExtensions,
|
|
7701
7728
|
createEditorStateStore,
|
|
7702
7729
|
createEditorStateTransaction,
|
|
@@ -7778,7 +7805,9 @@ export {
|
|
|
7778
7805
|
replacer,
|
|
7779
7806
|
scrollThreadIntoView,
|
|
7780
7807
|
scrollToLine,
|
|
7781
|
-
|
|
7808
|
+
scroller,
|
|
7809
|
+
scrollerCrawlEffect,
|
|
7810
|
+
scrollerLineEffect,
|
|
7782
7811
|
selectionState,
|
|
7783
7812
|
setBlockquote,
|
|
7784
7813
|
setComments,
|
|
@@ -7786,7 +7815,6 @@ export {
|
|
|
7786
7815
|
setSelection,
|
|
7787
7816
|
setStyle,
|
|
7788
7817
|
singleValueFacet,
|
|
7789
|
-
smoothScroll,
|
|
7790
7818
|
stackItemContentEditorClassNames,
|
|
7791
7819
|
staticCompletion,
|
|
7792
7820
|
streamer,
|