@tekkare/romulus 0.1.220 → 0.1.221
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
|
@@ -406,10 +406,16 @@ function onClick(event: MouseEvent) {
|
|
|
406
406
|
// Barre d'outils
|
|
407
407
|
// ---------------------------------------------------------------------------
|
|
408
408
|
|
|
409
|
-
|
|
409
|
+
// L'etat de l'editeur n'est pas reactif pour Vue : un `computed` qui lit
|
|
410
|
+
// `isActive` garderait sa premiere valeur. Chaque transaction avance ce
|
|
411
|
+
// compteur, et les etats derives le lisent pour se recalculer.
|
|
412
|
+
const tick = ref(0)
|
|
413
|
+
watch(editor, (e) => e?.on('transaction', () => tick.value++), { immediate: true })
|
|
414
|
+
|
|
415
|
+
const inTable = computed(() => tick.value >= 0 && !!editor.value?.isActive('table'))
|
|
410
416
|
const blockStyle = computed(() => {
|
|
411
417
|
const e = editor.value
|
|
412
|
-
if (!e) return 'paragraph'
|
|
418
|
+
if (!e || tick.value < 0) return 'paragraph'
|
|
413
419
|
for (const level of [1, 2, 3] as const) if (e.isActive('heading', { level })) return `h${level}`
|
|
414
420
|
return 'paragraph'
|
|
415
421
|
})
|
|
@@ -491,14 +497,77 @@ const blocks = [
|
|
|
491
497
|
{ name: 'blockquote', icon: 'Quotes', label: 'Citation', run: (e: Editor) => e.chain().focus().toggleBlockquote().run() },
|
|
492
498
|
]
|
|
493
499
|
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
+
/**
|
|
501
|
+
* Les gestes sur un tableau, par groupes. Ils vivent dans un menu pose
|
|
502
|
+
* au-dessus du tableau, pas dans la barre d'outils : en haut de l'editeur,
|
|
503
|
+
* elle sort de l'ecran des que la note est longue, et l'on cherchait les
|
|
504
|
+
* boutons la ou l'on ecrit.
|
|
505
|
+
*/
|
|
506
|
+
const tableGroups: Array<Array<{ key: string; icon: string; label: string; run: (e: Editor) => boolean; can?: (e: Editor) => boolean; active?: (e: Editor) => boolean }>> = [
|
|
507
|
+
[
|
|
508
|
+
{ key: 'row-before', icon: 'RowsPlusTop', label: 'Insérer une ligne au-dessus', run: (e) => e.chain().focus().addRowBefore().run() },
|
|
509
|
+
{ key: 'row-after', icon: 'RowsPlusBottom', label: 'Insérer une ligne en dessous', run: (e) => e.chain().focus().addRowAfter().run() },
|
|
510
|
+
{ key: 'col-before', icon: 'ColumnsPlusLeft', label: 'Insérer une colonne à gauche', run: (e) => e.chain().focus().addColumnBefore().run() },
|
|
511
|
+
{ key: 'col-after', icon: 'ColumnsPlusRight', label: 'Insérer une colonne à droite', run: (e) => e.chain().focus().addColumnAfter().run() },
|
|
512
|
+
],
|
|
513
|
+
[
|
|
514
|
+
{ key: 'header-row', icon: 'TextHOne', label: "Ligne d'en-tête", run: (e) => e.chain().focus().toggleHeaderRow().run(), active: (e) => isHeaderRow(e) },
|
|
515
|
+
{ key: 'merge', icon: 'ArrowsInLineHorizontal', label: 'Fusionner les cellules sélectionnées', run: (e) => e.chain().focus().mergeCells().run(), can: (e) => e.can().mergeCells() },
|
|
516
|
+
{ key: 'split', icon: 'ArrowsOutLineHorizontal', label: 'Scinder la cellule', run: (e) => e.chain().focus().splitCell().run(), can: (e) => e.can().splitCell() },
|
|
517
|
+
],
|
|
518
|
+
[
|
|
519
|
+
{ key: 'del-row', icon: 'Rows', label: 'Supprimer la ligne', run: (e) => e.chain().focus().deleteRow().run() },
|
|
520
|
+
{ key: 'del-col', icon: 'Columns', label: 'Supprimer la colonne', run: (e) => e.chain().focus().deleteColumn().run() },
|
|
521
|
+
{ key: 'del-table', icon: 'Trash', label: 'Supprimer le tableau', run: (e) => e.chain().focus().deleteTable().run() },
|
|
522
|
+
],
|
|
500
523
|
]
|
|
501
524
|
|
|
525
|
+
/** La premiere ligne du tableau courant est-elle une ligne d'en-tete ? */
|
|
526
|
+
function isHeaderRow(e: Editor) {
|
|
527
|
+
const { $from } = e.state.selection
|
|
528
|
+
for (let depth = $from.depth; depth > 0; depth--) {
|
|
529
|
+
const node = $from.node(depth)
|
|
530
|
+
if (node.type.name === 'table') return node.firstChild?.firstChild?.type.name === 'tableHeader'
|
|
531
|
+
}
|
|
532
|
+
return false
|
|
533
|
+
}
|
|
534
|
+
|
|
535
|
+
// Le menu du tableau suit le tableau : place a chaque transaction, et tant
|
|
536
|
+
// qu'il est ouvert, a chaque defilement (la page defile dans un conteneur).
|
|
537
|
+
const tableMenuStyle = ref<Record<string, string>>({})
|
|
538
|
+
function tableElement(): HTMLElement | null {
|
|
539
|
+
const e = editor.value
|
|
540
|
+
if (!e || !e.isActive('table')) return null
|
|
541
|
+
const { node } = e.view.domAtPos(e.state.selection.from)
|
|
542
|
+
const el = node.nodeType === 1 ? (node as HTMLElement) : node.parentElement
|
|
543
|
+
return el?.closest('table') ?? null
|
|
544
|
+
}
|
|
545
|
+
function placeTableMenu() {
|
|
546
|
+
const rect = tableElement()?.getBoundingClientRect()
|
|
547
|
+
if (!rect) return
|
|
548
|
+
// Au-dessus du tableau ; dessous quand son haut est sorti de l'ecran.
|
|
549
|
+
const above = rect.top - 46
|
|
550
|
+
const top = above >= 8 ? above : Math.min(rect.bottom + 6, window.innerHeight - 52)
|
|
551
|
+
tableMenuStyle.value = { position: 'fixed', left: `${Math.max(8, rect.left)}px`, top: `${top}px` }
|
|
552
|
+
}
|
|
553
|
+
const showTableMenu = computed(() => props.editable && inTable.value)
|
|
554
|
+
watch(editor, (e) => e?.on('transaction', placeTableMenu), { immediate: true })
|
|
555
|
+
watch(showTableMenu, (open) => {
|
|
556
|
+
if (typeof window === 'undefined') return
|
|
557
|
+
if (open) {
|
|
558
|
+
placeTableMenu()
|
|
559
|
+
window.addEventListener('scroll', placeTableMenu, true)
|
|
560
|
+
window.addEventListener('resize', placeTableMenu)
|
|
561
|
+
} else {
|
|
562
|
+
window.removeEventListener('scroll', placeTableMenu, true)
|
|
563
|
+
window.removeEventListener('resize', placeTableMenu)
|
|
564
|
+
}
|
|
565
|
+
})
|
|
566
|
+
onBeforeUnmount(() => {
|
|
567
|
+
window.removeEventListener('scroll', placeTableMenu, true)
|
|
568
|
+
window.removeEventListener('resize', placeTableMenu)
|
|
569
|
+
})
|
|
570
|
+
|
|
502
571
|
defineExpose({ editor })
|
|
503
572
|
|
|
504
573
|
const GROUP_LABEL: Record<RmRichTextMentionItem['kind'], string> = {
|
|
@@ -594,20 +663,6 @@ const showGroup = (i: number) =>
|
|
|
594
663
|
>
|
|
595
664
|
<RmIcon name="Table" :size="16" />
|
|
596
665
|
</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
666
|
<form v-if="linkOpen" class="rm-rte__link" @submit.prevent="applyLink">
|
|
612
667
|
<input
|
|
613
668
|
ref="linkInput"
|
|
@@ -625,6 +680,35 @@ const showGroup = (i: number) =>
|
|
|
625
680
|
|
|
626
681
|
<EditorContent :editor="editor" class="rm-rte__content" @click="onClick" />
|
|
627
682
|
|
|
683
|
+
<Teleport to="body" :disabled="!showTableMenu">
|
|
684
|
+
<div
|
|
685
|
+
v-if="showTableMenu && editor"
|
|
686
|
+
class="rm-rte__layer rm-rte__tablemenu"
|
|
687
|
+
:style="tableMenuStyle"
|
|
688
|
+
role="toolbar"
|
|
689
|
+
aria-label="Tableau"
|
|
690
|
+
@mousedown.prevent
|
|
691
|
+
>
|
|
692
|
+
<template v-for="(group, g) in tableGroups" :key="g">
|
|
693
|
+
<span v-if="g" class="rm-rte__sep" />
|
|
694
|
+
<button
|
|
695
|
+
v-for="action in group"
|
|
696
|
+
:key="action.key"
|
|
697
|
+
type="button"
|
|
698
|
+
class="rm-rte__btn"
|
|
699
|
+
:class="{ 'is-active': action.active?.(editor) }"
|
|
700
|
+
:aria-pressed="action.active ? action.active(editor) : undefined"
|
|
701
|
+
:disabled="action.can ? !action.can(editor) : false"
|
|
702
|
+
:title="action.label"
|
|
703
|
+
:aria-label="action.label"
|
|
704
|
+
@click="action.run(editor)"
|
|
705
|
+
>
|
|
706
|
+
<RmIcon :name="action.icon" :size="16" />
|
|
707
|
+
</button>
|
|
708
|
+
</template>
|
|
709
|
+
</div>
|
|
710
|
+
</Teleport>
|
|
711
|
+
|
|
628
712
|
<Teleport to="body" :disabled="!colorsOpen">
|
|
629
713
|
<div
|
|
630
714
|
v-if="colorsOpen && editor"
|
|
@@ -722,5 +806,5 @@ const showGroup = (i: number) =>
|
|
|
722
806
|
</template>
|
|
723
807
|
|
|
724
808
|
<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)}
|
|
809
|
+
.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__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{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)}
|
|
726
810
|
</style>
|