@tekkare/romulus 0.1.220 → 0.1.222
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/module.json
CHANGED
|
@@ -70,6 +70,11 @@ const props = withDefaults(
|
|
|
70
70
|
createPage?: (title: string) => Promise<RmRichTextPage>
|
|
71
71
|
/** Affiche la barre d'outils. */
|
|
72
72
|
toolbar?: boolean
|
|
73
|
+
/**
|
|
74
|
+
* Une ligne d'explication au pied du menu `@`, quand l'appelant sait
|
|
75
|
+
* pourquoi une famille manque (« Partagez la page pour citer quelqu'un »).
|
|
76
|
+
*/
|
|
77
|
+
mentionHint?: string
|
|
73
78
|
}>(),
|
|
74
79
|
{
|
|
75
80
|
modelValue: null,
|
|
@@ -80,6 +85,7 @@ const props = withDefaults(
|
|
|
80
85
|
searchResources: undefined,
|
|
81
86
|
createPage: undefined,
|
|
82
87
|
toolbar: true,
|
|
88
|
+
mentionHint: '',
|
|
83
89
|
},
|
|
84
90
|
)
|
|
85
91
|
|
|
@@ -212,6 +218,7 @@ const NoteLink = Node.create({
|
|
|
212
218
|
'data-note-link': '',
|
|
213
219
|
'data-note-id': node.attrs.noteId,
|
|
214
220
|
'data-label': node.attrs.label,
|
|
221
|
+
title: node.attrs.label,
|
|
215
222
|
class: 'rm-rte-pagelink',
|
|
216
223
|
}),
|
|
217
224
|
`${node.attrs.icon ? `${node.attrs.icon} ` : ''}${node.attrs.label || 'Page sans titre'}`,
|
|
@@ -241,6 +248,7 @@ const RichMention = Mention.extend({
|
|
|
241
248
|
'data-id': node.attrs.id,
|
|
242
249
|
'data-label': node.attrs.label,
|
|
243
250
|
...(node.attrs.resourceType && { 'data-resource-type': node.attrs.resourceType }),
|
|
251
|
+
title: node.attrs.label,
|
|
244
252
|
class: `rm-rte-mention rm-rte-mention--${node.attrs.kind}`,
|
|
245
253
|
},
|
|
246
254
|
`@${node.attrs.label ?? node.attrs.id}`,
|
|
@@ -406,10 +414,16 @@ function onClick(event: MouseEvent) {
|
|
|
406
414
|
// Barre d'outils
|
|
407
415
|
// ---------------------------------------------------------------------------
|
|
408
416
|
|
|
409
|
-
|
|
417
|
+
// L'etat de l'editeur n'est pas reactif pour Vue : un `computed` qui lit
|
|
418
|
+
// `isActive` garderait sa premiere valeur. Chaque transaction avance ce
|
|
419
|
+
// compteur, et les etats derives le lisent pour se recalculer.
|
|
420
|
+
const tick = ref(0)
|
|
421
|
+
watch(editor, (e) => e?.on('transaction', () => tick.value++), { immediate: true })
|
|
422
|
+
|
|
423
|
+
const inTable = computed(() => tick.value >= 0 && !!editor.value?.isActive('table'))
|
|
410
424
|
const blockStyle = computed(() => {
|
|
411
425
|
const e = editor.value
|
|
412
|
-
if (!e) return 'paragraph'
|
|
426
|
+
if (!e || tick.value < 0) return 'paragraph'
|
|
413
427
|
for (const level of [1, 2, 3] as const) if (e.isActive('heading', { level })) return `h${level}`
|
|
414
428
|
return 'paragraph'
|
|
415
429
|
})
|
|
@@ -491,14 +505,77 @@ const blocks = [
|
|
|
491
505
|
{ name: 'blockquote', icon: 'Quotes', label: 'Citation', run: (e: Editor) => e.chain().focus().toggleBlockquote().run() },
|
|
492
506
|
]
|
|
493
507
|
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
508
|
+
/**
|
|
509
|
+
* Les gestes sur un tableau, par groupes. Ils vivent dans un menu pose
|
|
510
|
+
* au-dessus du tableau, pas dans la barre d'outils : en haut de l'editeur,
|
|
511
|
+
* elle sort de l'ecran des que la note est longue, et l'on cherchait les
|
|
512
|
+
* boutons la ou l'on ecrit.
|
|
513
|
+
*/
|
|
514
|
+
const tableGroups: Array<Array<{ key: string; icon: string; label: string; run: (e: Editor) => boolean; can?: (e: Editor) => boolean; active?: (e: Editor) => boolean }>> = [
|
|
515
|
+
[
|
|
516
|
+
{ key: 'row-before', icon: 'RowsPlusTop', label: 'Insérer une ligne au-dessus', run: (e) => e.chain().focus().addRowBefore().run() },
|
|
517
|
+
{ key: 'row-after', icon: 'RowsPlusBottom', label: 'Insérer une ligne en dessous', run: (e) => e.chain().focus().addRowAfter().run() },
|
|
518
|
+
{ key: 'col-before', icon: 'ColumnsPlusLeft', label: 'Insérer une colonne à gauche', run: (e) => e.chain().focus().addColumnBefore().run() },
|
|
519
|
+
{ key: 'col-after', icon: 'ColumnsPlusRight', label: 'Insérer une colonne à droite', run: (e) => e.chain().focus().addColumnAfter().run() },
|
|
520
|
+
],
|
|
521
|
+
[
|
|
522
|
+
{ key: 'header-row', icon: 'TextHOne', label: "Ligne d'en-tête", run: (e) => e.chain().focus().toggleHeaderRow().run(), active: (e) => isHeaderRow(e) },
|
|
523
|
+
{ key: 'merge', icon: 'ArrowsInLineHorizontal', label: 'Fusionner les cellules sélectionnées', run: (e) => e.chain().focus().mergeCells().run(), can: (e) => e.can().mergeCells() },
|
|
524
|
+
{ key: 'split', icon: 'ArrowsOutLineHorizontal', label: 'Scinder la cellule', run: (e) => e.chain().focus().splitCell().run(), can: (e) => e.can().splitCell() },
|
|
525
|
+
],
|
|
526
|
+
[
|
|
527
|
+
{ key: 'del-row', icon: 'Rows', label: 'Supprimer la ligne', run: (e) => e.chain().focus().deleteRow().run() },
|
|
528
|
+
{ key: 'del-col', icon: 'Columns', label: 'Supprimer la colonne', run: (e) => e.chain().focus().deleteColumn().run() },
|
|
529
|
+
{ key: 'del-table', icon: 'Trash', label: 'Supprimer le tableau', run: (e) => e.chain().focus().deleteTable().run() },
|
|
530
|
+
],
|
|
500
531
|
]
|
|
501
532
|
|
|
533
|
+
/** La premiere ligne du tableau courant est-elle une ligne d'en-tete ? */
|
|
534
|
+
function isHeaderRow(e: Editor) {
|
|
535
|
+
const { $from } = e.state.selection
|
|
536
|
+
for (let depth = $from.depth; depth > 0; depth--) {
|
|
537
|
+
const node = $from.node(depth)
|
|
538
|
+
if (node.type.name === 'table') return node.firstChild?.firstChild?.type.name === 'tableHeader'
|
|
539
|
+
}
|
|
540
|
+
return false
|
|
541
|
+
}
|
|
542
|
+
|
|
543
|
+
// Le menu du tableau suit le tableau : place a chaque transaction, et tant
|
|
544
|
+
// qu'il est ouvert, a chaque defilement (la page defile dans un conteneur).
|
|
545
|
+
const tableMenuStyle = ref<Record<string, string>>({})
|
|
546
|
+
function tableElement(): HTMLElement | null {
|
|
547
|
+
const e = editor.value
|
|
548
|
+
if (!e || !e.isActive('table')) return null
|
|
549
|
+
const { node } = e.view.domAtPos(e.state.selection.from)
|
|
550
|
+
const el = node.nodeType === 1 ? (node as HTMLElement) : node.parentElement
|
|
551
|
+
return el?.closest('table') ?? null
|
|
552
|
+
}
|
|
553
|
+
function placeTableMenu() {
|
|
554
|
+
const rect = tableElement()?.getBoundingClientRect()
|
|
555
|
+
if (!rect) return
|
|
556
|
+
// Au-dessus du tableau ; dessous quand son haut est sorti de l'ecran.
|
|
557
|
+
const above = rect.top - 46
|
|
558
|
+
const top = above >= 8 ? above : Math.min(rect.bottom + 6, window.innerHeight - 52)
|
|
559
|
+
tableMenuStyle.value = { position: 'fixed', left: `${Math.max(8, rect.left)}px`, top: `${top}px` }
|
|
560
|
+
}
|
|
561
|
+
const showTableMenu = computed(() => props.editable && inTable.value)
|
|
562
|
+
watch(editor, (e) => e?.on('transaction', placeTableMenu), { immediate: true })
|
|
563
|
+
watch(showTableMenu, (open) => {
|
|
564
|
+
if (typeof window === 'undefined') return
|
|
565
|
+
if (open) {
|
|
566
|
+
placeTableMenu()
|
|
567
|
+
window.addEventListener('scroll', placeTableMenu, true)
|
|
568
|
+
window.addEventListener('resize', placeTableMenu)
|
|
569
|
+
} else {
|
|
570
|
+
window.removeEventListener('scroll', placeTableMenu, true)
|
|
571
|
+
window.removeEventListener('resize', placeTableMenu)
|
|
572
|
+
}
|
|
573
|
+
})
|
|
574
|
+
onBeforeUnmount(() => {
|
|
575
|
+
window.removeEventListener('scroll', placeTableMenu, true)
|
|
576
|
+
window.removeEventListener('resize', placeTableMenu)
|
|
577
|
+
})
|
|
578
|
+
|
|
502
579
|
defineExpose({ editor })
|
|
503
580
|
|
|
504
581
|
const GROUP_LABEL: Record<RmRichTextMentionItem['kind'], string> = {
|
|
@@ -594,20 +671,6 @@ const showGroup = (i: number) =>
|
|
|
594
671
|
>
|
|
595
672
|
<RmIcon name="Table" :size="16" />
|
|
596
673
|
</button>
|
|
597
|
-
<template v-if="inTable">
|
|
598
|
-
<span class="rm-rte__sep" />
|
|
599
|
-
<button
|
|
600
|
-
v-for="action in tableActions"
|
|
601
|
-
:key="action.label"
|
|
602
|
-
type="button"
|
|
603
|
-
class="rm-rte__btn"
|
|
604
|
-
:title="action.label"
|
|
605
|
-
:aria-label="action.label"
|
|
606
|
-
@click="action.run(editor)"
|
|
607
|
-
>
|
|
608
|
-
<RmIcon :name="action.icon" :size="16" />
|
|
609
|
-
</button>
|
|
610
|
-
</template>
|
|
611
674
|
<form v-if="linkOpen" class="rm-rte__link" @submit.prevent="applyLink">
|
|
612
675
|
<input
|
|
613
676
|
ref="linkInput"
|
|
@@ -625,6 +688,35 @@ const showGroup = (i: number) =>
|
|
|
625
688
|
|
|
626
689
|
<EditorContent :editor="editor" class="rm-rte__content" @click="onClick" />
|
|
627
690
|
|
|
691
|
+
<Teleport to="body" :disabled="!showTableMenu">
|
|
692
|
+
<div
|
|
693
|
+
v-if="showTableMenu && editor"
|
|
694
|
+
class="rm-rte__layer rm-rte__tablemenu"
|
|
695
|
+
:style="tableMenuStyle"
|
|
696
|
+
role="toolbar"
|
|
697
|
+
aria-label="Tableau"
|
|
698
|
+
@mousedown.prevent
|
|
699
|
+
>
|
|
700
|
+
<template v-for="(group, g) in tableGroups" :key="g">
|
|
701
|
+
<span v-if="g" class="rm-rte__sep" />
|
|
702
|
+
<button
|
|
703
|
+
v-for="action in group"
|
|
704
|
+
:key="action.key"
|
|
705
|
+
type="button"
|
|
706
|
+
class="rm-rte__btn"
|
|
707
|
+
:class="{ 'is-active': action.active?.(editor) }"
|
|
708
|
+
:aria-pressed="action.active ? action.active(editor) : undefined"
|
|
709
|
+
:disabled="action.can ? !action.can(editor) : false"
|
|
710
|
+
:title="action.label"
|
|
711
|
+
:aria-label="action.label"
|
|
712
|
+
@click="action.run(editor)"
|
|
713
|
+
>
|
|
714
|
+
<RmIcon :name="action.icon" :size="16" />
|
|
715
|
+
</button>
|
|
716
|
+
</template>
|
|
717
|
+
</div>
|
|
718
|
+
</Teleport>
|
|
719
|
+
|
|
628
720
|
<Teleport to="body" :disabled="!colorsOpen">
|
|
629
721
|
<div
|
|
630
722
|
v-if="colorsOpen && editor"
|
|
@@ -716,11 +808,15 @@ const showGroup = (i: number) =>
|
|
|
716
808
|
</button>
|
|
717
809
|
</template>
|
|
718
810
|
<div v-if="menu.loading && menu.items.length" class="rm-rte__empty">Recherche des ressources…</div>
|
|
811
|
+
<p v-if="menu.kind === 'mention' && mentionHint" class="rm-rte__hint">
|
|
812
|
+
<RmIcon name="Info" :size="14" />
|
|
813
|
+
<span>{{ mentionHint }}</span>
|
|
814
|
+
</p>
|
|
719
815
|
</div>
|
|
720
816
|
</Teleport>
|
|
721
817
|
</div>
|
|
722
818
|
</template>
|
|
723
819
|
|
|
724
820
|
<style scoped>
|
|
725
|
-
.rm-rte{color:var(--text-primary);display:flex;flex-direction:column;font-family:var(--font-sans);min-height:0}.rm-rte__toolbar{align-items:center;background:var(--bg-surface);border:1px solid var(--border-soft);border-radius:var(--radius-md);display:flex;flex-wrap:wrap;gap:var(--space-2);padding:var(--space-4);position:sticky;top:0;z-index:var(--z-sticky,20)}.rm-rte__sep{background:var(--border-soft);height:20px;margin:0 var(--space-4);width:1px}.rm-rte__style{background:transparent;border:1px solid transparent;border-radius:var(--radius-sm);color:var(--text-primary);cursor:pointer;font:inherit;font-size:var(--font-13);height:28px;padding:0 var(--space-6)}.rm-rte__style:hover{background:var(--bg-hover)}.rm-rte__btn{align-items:center;background:transparent;border:0;border-radius:var(--radius-sm);color:var(--text-secondary);cursor:pointer;display:inline-flex;height:28px;justify-content:center;width:28px}.rm-rte__btn:hover:not(:disabled){background:var(--bg-hover);color:var(--text-primary)}.rm-rte__btn.is-active{background:var(--color-accent-soft);color:var(--color-primary)}.rm-rte__btn:disabled{cursor:default;opacity:.4}.rm-rte__btn:focus-visible,.rm-rte__style:focus-visible{box-shadow:var(--shadow-focus);outline:none}.rm-rte__link{align-items:center;display:flex;flex:1 1 220px;gap:var(--space-4)}.rm-rte__link input{background:var(--bg-surface);border:1px solid var(--border-default);border-radius:var(--radius-sm);color:var(--text-primary);flex:1;font:inherit;font-size:var(--font-13);height:28px;padding:0 var(--space-8)}.rm-rte__content{flex:1;min-height:0}.rm-rte__content :deep(.ProseMirror){font-size:var(--font-14);line-height:1.65;min-height:240px;outline:none;overflow-wrap:anywhere;padding:var(--space-16) var(--space-4)}.rm-rte--readonly .rm-rte__content :deep(.ProseMirror){min-height:0}.rm-rte__content :deep(.ProseMirror>*+*){margin-top:.6em}.rm-rte__content :deep(h1){font-family:var(--font-serif);font-size:var(--font-24);font-weight:var(--weight-bold);line-height:1.25;margin:1.2em 0 0}.rm-rte__content :deep(h2){font-size:var(--font-18);font-weight:var(--weight-semibold);line-height:1.3;margin:1.1em 0 0}.rm-rte__content :deep(h3){font-size:var(--font-16);font-weight:var(--weight-semibold);margin:1em 0 0}.rm-rte__content :deep(.ProseMirror>:first-child){margin-top:0}.rm-rte__content :deep(p){margin:0}.rm-rte__content :deep(ol),.rm-rte__content :deep(ul){margin:0;padding-left:1.4em}.rm-rte__content :deep(a){color:var(--color-primary);text-decoration:underline;text-underline-offset:2px}.rm-rte__content :deep(code){background:var(--bg-surface-3);border-radius:var(--radius-sm);font-family:var(--font-mono);font-size:.9em;padding:.1em .35em}.rm-rte__content :deep(pre){background:var(--bg-surface-3);border-radius:var(--radius-md);overflow-x:auto;padding:var(--space-12)}.rm-rte__content :deep(pre code){background:none;padding:0}.rm-rte__content :deep(blockquote){border-left:3px solid var(--border-default);color:var(--text-secondary);margin:0;padding-left:var(--space-12)}.rm-rte__content :deep(hr){border:0;border-top:1px solid var(--border-default);margin:1.2em 0}.rm-rte__content :deep(mark){border-radius:2px;color:inherit;padding:0 .1em}.rm-rte__content :deep(ul[data-type=taskList]){list-style:none;padding-left:.2em}.rm-rte__content :deep(ul[data-type=taskList] li){align-items:flex-start;display:flex;gap:var(--space-8)}.rm-rte__content :deep(ul[data-type=taskList] li>label){margin-top:.2em}.rm-rte__content :deep(ul[data-type=taskList] li>div){flex:1}.rm-rte__content :deep(ul[data-type=taskList] li[data-checked=true]>div){color:var(--text-muted);text-decoration:line-through}.rm-rte__content :deep(input[type=checkbox]){accent-color:var(--color-primary)}.rm-rte__content :deep(.tableWrapper){overflow-x:auto}.rm-rte__content :deep(table){border-collapse:collapse;table-layout:fixed;width:100%}.rm-rte__content :deep(td),.rm-rte__content :deep(th){border:1px solid var(--border-default);min-width:80px;padding:var(--space-6) var(--space-8);position:relative;vertical-align:top}.rm-rte__content :deep(th){background:var(--bg-surface-2);font-weight:var(--weight-semibold);text-align:left}.rm-rte__content :deep(.selectedCell):after{background:var(--color-accent-soft);content:"";inset:0;opacity:.5;pointer-events:none;position:absolute}.rm-rte__content :deep(p.is-editor-empty:first-child):before{color:var(--text-muted);content:attr(data-placeholder);float:left;height:0;pointer-events:none}.rm-rte__content :deep(.rm-rte-mention),.rm-rte__content :deep(.rm-rte-pagelink){border-radius:var(--radius-sm);cursor:pointer;display:inline-block;font-weight:var(--weight-medium);padding:0 .35em;white-space:nowrap}.rm-rte__content :deep(.rm-rte-mention--user){background:var(--color-accent-soft);color:var(--color-primary)}.rm-rte__content :deep(.rm-rte-mention--resource){background:var(--rm-text-bg-teal);color:var(--rm-text-c-teal)}.rm-rte__content :deep(.rm-rte-pagelink){color:var(--text-primary);text-decoration:underline;text-decoration-color:var(--border-default);text-underline-offset:3px}.rm-rte__content :deep(.rm-rte-pagelink:hover){background:var(--bg-hover)}.rm-rte__content :deep(.ProseMirror-selectednode){box-shadow:var(--shadow-focus)}.rm-rte__layer{background:var(--bg-surface);border:1px solid var(--border-soft);border-radius:var(--radius-md);box-shadow:var(--shadow-lg);color:var(--text-primary);font-family:var(--font-sans);font-size:var(--font-13);padding:var(--space-6);z-index:var(--z-popover,1000)}.rm-rte__menu{max-height:320px;overflow-y:auto;width:290px}.rm-rte__group,.rm-rte__layer-title{color:var(--text-muted);font-size:var(--font-11);font-weight:var(--weight-semibold);letter-spacing:.04em;padding:var(--space-6) var(--space-8) var(--space-2);text-transform:uppercase}.rm-rte__item{align-items:center;background:transparent;border:0;border-radius:var(--radius-sm);color:inherit;cursor:pointer;display:flex;font:inherit;gap:var(--space-8);padding:var(--space-6) var(--space-8);text-align:left;width:100%}.rm-rte__item.is-active{background:var(--bg-hover)}.rm-rte__item-icon{align-items:center;background:var(--bg-surface-2);border:1px solid var(--border-soft);border-radius:var(--radius-sm);color:var(--text-secondary);display:inline-flex;flex:none;height:28px;justify-content:center;width:28px}.rm-rte__item-text{display:flex;flex-direction:column;min-width:0}.rm-rte__item-text>span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.rm-rte__item-text small{color:var(--text-muted);font-size:var(--font-11)}.rm-rte__empty{color:var(--text-muted);padding:var(--space-8)}.rm-rte__swatches{display:grid;gap:var(--space-4);grid-template-columns:repeat(5,28px);padding:var(--space-4) var(--space-6) var(--space-6)}.rm-rte-swatch{align-items:center;background:var(--bg-surface);border:1px solid var(--border-soft);border-radius:var(--radius-sm);color:var(--text-primary);cursor:pointer;display:inline-flex;font-weight:var(--weight-semibold);height:28px;justify-content:center;width:28px}.rm-rte-swatch:hover{border-color:var(--border-default);box-shadow:var(--shadow-xs)}
|
|
821
|
+
.rm-rte{color:var(--text-primary);display:flex;flex-direction:column;font-family:var(--font-sans);min-height:0}.rm-rte__toolbar{align-items:center;background:var(--bg-surface);border:1px solid var(--border-soft);border-radius:var(--radius-md);display:flex;flex-wrap:wrap;gap:var(--space-2);padding:var(--space-4);position:sticky;top:0;z-index:var(--z-sticky,20)}.rm-rte__sep{background:var(--border-soft);height:20px;margin:0 var(--space-4);width:1px}.rm-rte__style{background:transparent;border:1px solid transparent;border-radius:var(--radius-sm);color:var(--text-primary);cursor:pointer;font:inherit;font-size:var(--font-13);height:28px;padding:0 var(--space-6)}.rm-rte__style:hover{background:var(--bg-hover)}.rm-rte__btn{align-items:center;background:transparent;border:0;border-radius:var(--radius-sm);color:var(--text-secondary);cursor:pointer;display:inline-flex;height:28px;justify-content:center;width:28px}.rm-rte__btn:hover:not(:disabled){background:var(--bg-hover);color:var(--text-primary)}.rm-rte__btn.is-active{background:var(--color-accent-soft);color:var(--color-primary)}.rm-rte__btn:disabled{cursor:default;opacity:.4}.rm-rte__btn:focus-visible,.rm-rte__style:focus-visible{box-shadow:var(--shadow-focus);outline:none}.rm-rte__link{align-items:center;display:flex;flex:1 1 220px;gap:var(--space-4)}.rm-rte__link input{background:var(--bg-surface);border:1px solid var(--border-default);border-radius:var(--radius-sm);color:var(--text-primary);flex:1;font:inherit;font-size:var(--font-13);height:28px;padding:0 var(--space-8)}.rm-rte__content{flex:1;min-height:0}.rm-rte__content :deep(.ProseMirror){font-size:var(--font-14);line-height:1.65;min-height:240px;outline:none;overflow-wrap:anywhere;padding:var(--space-16) var(--space-4)}.rm-rte--readonly .rm-rte__content :deep(.ProseMirror){min-height:0}.rm-rte__content :deep(.ProseMirror>*+*){margin-top:.6em}.rm-rte__content :deep(h1){font-family:var(--font-serif);font-size:var(--font-24);font-weight:var(--weight-bold);line-height:1.25;margin:1.2em 0 0}.rm-rte__content :deep(h2){font-size:var(--font-18);font-weight:var(--weight-semibold);line-height:1.3;margin:1.1em 0 0}.rm-rte__content :deep(h3){font-size:var(--font-16);font-weight:var(--weight-semibold);margin:1em 0 0}.rm-rte__content :deep(.ProseMirror>:first-child){margin-top:0}.rm-rte__content :deep(p){margin:0}.rm-rte__content :deep(ol),.rm-rte__content :deep(ul){margin:0;padding-left:1.4em}.rm-rte__content :deep(a){color:var(--color-primary);text-decoration:underline;text-underline-offset:2px}.rm-rte__content :deep(code){background:var(--bg-surface-3);border-radius:var(--radius-sm);font-family:var(--font-mono);font-size:.9em;padding:.1em .35em}.rm-rte__content :deep(pre){background:var(--bg-surface-3);border-radius:var(--radius-md);overflow-x:auto;padding:var(--space-12)}.rm-rte__content :deep(pre code){background:none;padding:0}.rm-rte__content :deep(blockquote){border-left:3px solid var(--border-default);color:var(--text-secondary);margin:0;padding-left:var(--space-12)}.rm-rte__content :deep(hr){border:0;border-top:1px solid var(--border-default);margin:1.2em 0}.rm-rte__content :deep(mark){border-radius:2px;color:inherit;padding:0 .1em}.rm-rte__content :deep(ul[data-type=taskList]){list-style:none;padding-left:.2em}.rm-rte__content :deep(ul[data-type=taskList] li){align-items:flex-start;display:flex;gap:var(--space-8)}.rm-rte__content :deep(ul[data-type=taskList] li>label){margin-top:.2em}.rm-rte__content :deep(ul[data-type=taskList] li>div){flex:1}.rm-rte__content :deep(ul[data-type=taskList] li[data-checked=true]>div){color:var(--text-muted);text-decoration:line-through}.rm-rte__content :deep(input[type=checkbox]){accent-color:var(--color-primary)}.rm-rte__content :deep(.tableWrapper){overflow-x:auto}.rm-rte__content :deep(table){border-collapse:collapse;table-layout:fixed;width:100%}.rm-rte__content :deep(td),.rm-rte__content :deep(th){border:1px solid var(--border-default);min-width:80px;padding:var(--space-6) var(--space-8);position:relative;vertical-align:top}.rm-rte__content :deep(th){background:var(--bg-surface-2);font-weight:var(--weight-semibold);text-align:left}.rm-rte__content :deep(.selectedCell):after{background:var(--color-accent-soft);content:"";inset:0;opacity:.5;pointer-events:none;position:absolute}.rm-rte__content :deep(p.is-editor-empty:first-child):before{color:var(--text-muted);content:attr(data-placeholder);float:left;height:0;pointer-events:none}.rm-rte__content :deep(.rm-rte-mention),.rm-rte__content :deep(.rm-rte-pagelink){border-radius:var(--radius-sm);cursor:pointer;display:inline-block;font-weight:var(--weight-medium);max-width:min(100%,320px);overflow:hidden;padding:0 .35em;text-overflow:ellipsis;vertical-align:bottom;white-space:nowrap}.rm-rte__content :deep(.rm-rte-mention--user){background:var(--color-accent-soft);color:var(--color-primary)}.rm-rte__content :deep(.rm-rte-mention--resource){background:var(--rm-text-bg-teal);color:var(--rm-text-c-teal)}.rm-rte__content :deep(.rm-rte-pagelink){color:var(--text-primary);text-decoration:underline;text-decoration-color:var(--border-default);text-underline-offset:3px}.rm-rte__content :deep(.rm-rte-pagelink:hover){background:var(--bg-hover)}.rm-rte__content :deep(.ProseMirror-selectednode){box-shadow:var(--shadow-focus)}.rm-rte__layer{background:var(--bg-surface);border:1px solid var(--border-soft);border-radius:var(--radius-md);box-shadow:var(--shadow-lg);color:var(--text-primary);font-family:var(--font-sans);font-size:var(--font-13);padding:var(--space-6);z-index:var(--z-popover,1000)}.rm-rte__tablemenu{align-items:center;display:flex;gap:var(--space-2);padding:var(--space-4)}.rm-rte__menu{max-height:320px;overflow-y:auto;width:290px}.rm-rte__group,.rm-rte__layer-title{color:var(--text-muted);font-size:var(--font-11);font-weight:var(--weight-semibold);letter-spacing:.04em;padding:var(--space-6) var(--space-8) var(--space-2);text-transform:uppercase}.rm-rte__item{align-items:center;background:transparent;border:0;border-radius:var(--radius-sm);color:inherit;cursor:pointer;display:flex;font:inherit;gap:var(--space-8);padding:var(--space-6) var(--space-8);text-align:left;width:100%}.rm-rte__item.is-active{background:var(--bg-hover)}.rm-rte__item-icon{align-items:center;background:var(--bg-surface-2);border:1px solid var(--border-soft);border-radius:var(--radius-sm);color:var(--text-secondary);display:inline-flex;flex:none;height:28px;justify-content:center;width:28px}.rm-rte__item-text{display:flex;flex-direction:column;min-width:0}.rm-rte__item-text>span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.rm-rte__item-text small{color:var(--text-muted);font-size:var(--font-11)}.rm-rte__empty,.rm-rte__hint{color:var(--text-muted);padding:var(--space-8)}.rm-rte__hint{align-items:flex-start;border-top:1px solid var(--border-soft);display:flex;font-size:var(--font-12);gap:var(--space-6);line-height:1.4;margin:var(--space-4) 0 0}.rm-rte__hint :deep(svg){flex:none;margin-top:1px}.rm-rte__swatches{display:grid;gap:var(--space-4);grid-template-columns:repeat(5,28px);padding:var(--space-4) var(--space-6) var(--space-6)}.rm-rte-swatch{align-items:center;background:var(--bg-surface);border:1px solid var(--border-soft);border-radius:var(--radius-sm);color:var(--text-primary);cursor:pointer;display:inline-flex;font-weight:var(--weight-semibold);height:28px;justify-content:center;width:28px}.rm-rte-swatch:hover{border-color:var(--border-default);box-shadow:var(--shadow-xs)}
|
|
726
822
|
</style>
|