@alien6-studio/elea-content-editor 0.0.0-stage → 0.1.0
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/LICENSE +202 -0
- package/README.md +164 -2
- package/dist/AddBlockButton.d.ts +16 -0
- package/dist/AddBlockButton.d.ts.map +1 -0
- package/dist/AddBlockButton.js +103 -0
- package/dist/AddBlockButton.js.map +1 -0
- package/dist/BlockEditor.d.ts +46 -0
- package/dist/BlockEditor.d.ts.map +1 -0
- package/dist/BlockEditor.js +397 -0
- package/dist/BlockEditor.js.map +1 -0
- package/dist/ContentEditor.d.ts +59 -0
- package/dist/ContentEditor.d.ts.map +1 -0
- package/dist/ContentEditor.js +460 -0
- package/dist/ContentEditor.js.map +1 -0
- package/dist/EditorPreview.d.ts +12 -0
- package/dist/EditorPreview.d.ts.map +1 -0
- package/dist/EditorPreview.js +10 -0
- package/dist/EditorPreview.js.map +1 -0
- package/dist/MarkdownEditor.d.ts +14 -0
- package/dist/MarkdownEditor.d.ts.map +1 -0
- package/dist/MarkdownEditor.js +30 -0
- package/dist/MarkdownEditor.js.map +1 -0
- package/dist/QuickAddButtons.d.ts +10 -0
- package/dist/QuickAddButtons.d.ts.map +1 -0
- package/dist/QuickAddButtons.js +19 -0
- package/dist/QuickAddButtons.js.map +1 -0
- package/dist/RichTextField.d.ts +72 -0
- package/dist/RichTextField.d.ts.map +1 -0
- package/dist/RichTextField.js +1008 -0
- package/dist/RichTextField.js.map +1 -0
- package/dist/RichTextInput.d.ts +12 -0
- package/dist/RichTextInput.d.ts.map +1 -0
- package/dist/RichTextInput.js +148 -0
- package/dist/RichTextInput.js.map +1 -0
- package/dist/SlashMenu.d.ts +27 -0
- package/dist/SlashMenu.d.ts.map +1 -0
- package/dist/SlashMenu.js +59 -0
- package/dist/SlashMenu.js.map +1 -0
- package/dist/Toolbar.d.ts +15 -0
- package/dist/Toolbar.d.ts.map +1 -0
- package/dist/Toolbar.js +27 -0
- package/dist/Toolbar.js.map +1 -0
- package/dist/VirtualizedBlockList.d.ts +40 -0
- package/dist/VirtualizedBlockList.d.ts.map +1 -0
- package/dist/VirtualizedBlockList.js +51 -0
- package/dist/VirtualizedBlockList.js.map +1 -0
- package/dist/blockPaste.d.ts +17 -0
- package/dist/blockPaste.d.ts.map +1 -0
- package/dist/blockPaste.js +50 -0
- package/dist/blockPaste.js.map +1 -0
- package/dist/blocks/AttachmentBlock.d.ts +3 -0
- package/dist/blocks/AttachmentBlock.d.ts.map +1 -0
- package/dist/blocks/AttachmentBlock.js +55 -0
- package/dist/blocks/AttachmentBlock.js.map +1 -0
- package/dist/blocks/ImageBlock.d.ts +14 -0
- package/dist/blocks/ImageBlock.d.ts.map +1 -0
- package/dist/blocks/ImageBlock.js +137 -0
- package/dist/blocks/ImageBlock.js.map +1 -0
- package/dist/blocks/MediaActions.d.ts +15 -0
- package/dist/blocks/MediaActions.d.ts.map +1 -0
- package/dist/blocks/MediaActions.js +7 -0
- package/dist/blocks/MediaActions.js.map +1 -0
- package/dist/blocks/VideoBlock.d.ts +3 -0
- package/dist/blocks/VideoBlock.d.ts.map +1 -0
- package/dist/blocks/VideoBlock.js +47 -0
- package/dist/blocks/VideoBlock.js.map +1 -0
- package/dist/blocks/cropper.d.ts +2 -0
- package/dist/blocks/cropper.d.ts.map +1 -0
- package/dist/blocks/cropper.js +3 -0
- package/dist/blocks/cropper.js.map +1 -0
- package/dist/bundle.css +6 -0
- package/dist/caret.d.ts +13 -0
- package/dist/caret.d.ts.map +1 -0
- package/dist/caret.js +52 -0
- package/dist/caret.js.map +1 -0
- package/dist/clipboardHtml.d.ts +4 -0
- package/dist/clipboardHtml.d.ts.map +1 -0
- package/dist/clipboardHtml.js +18 -0
- package/dist/clipboardHtml.js.map +1 -0
- package/dist/editorChrome.d.ts +53 -0
- package/dist/editorChrome.d.ts.map +1 -0
- package/dist/editorChrome.js +35 -0
- package/dist/editorChrome.js.map +1 -0
- package/dist/hooks/useBlockDrag.d.ts +26 -0
- package/dist/hooks/useBlockDrag.d.ts.map +1 -0
- package/dist/hooks/useBlockDrag.js +57 -0
- package/dist/hooks/useBlockDrag.js.map +1 -0
- package/dist/hooks/useBlockFocus.d.ts +13 -0
- package/dist/hooks/useBlockFocus.d.ts.map +1 -0
- package/dist/hooks/useBlockFocus.js +95 -0
- package/dist/hooks/useBlockFocus.js.map +1 -0
- package/dist/hooks/useBlockManagement.d.ts +27 -0
- package/dist/hooks/useBlockManagement.d.ts.map +1 -0
- package/dist/hooks/useBlockManagement.js +120 -0
- package/dist/hooks/useBlockManagement.js.map +1 -0
- package/dist/hooks/useBlockSelection.d.ts +30 -0
- package/dist/hooks/useBlockSelection.d.ts.map +1 -0
- package/dist/hooks/useBlockSelection.js +166 -0
- package/dist/hooks/useBlockSelection.js.map +1 -0
- package/dist/hooks/useBlockVisibility.d.ts +10 -0
- package/dist/hooks/useBlockVisibility.d.ts.map +1 -0
- package/dist/hooks/useBlockVisibility.js +48 -0
- package/dist/hooks/useBlockVisibility.js.map +1 -0
- package/dist/hooks/useDocumentHistory.d.ts +29 -0
- package/dist/hooks/useDocumentHistory.d.ts.map +1 -0
- package/dist/hooks/useDocumentHistory.js +75 -0
- package/dist/hooks/useDocumentHistory.js.map +1 -0
- package/dist/hooks/useTextareaResize.d.ts +6 -0
- package/dist/hooks/useTextareaResize.d.ts.map +1 -0
- package/dist/hooks/useTextareaResize.js +30 -0
- package/dist/hooks/useTextareaResize.js.map +1 -0
- package/dist/icons.d.ts +28 -0
- package/dist/icons.d.ts.map +1 -0
- package/dist/icons.js +37 -0
- package/dist/icons.js.map +1 -0
- package/dist/index.d.ts +24 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +24 -0
- package/dist/index.js.map +1 -0
- package/dist/listCommands.d.ts +11 -0
- package/dist/listCommands.d.ts.map +1 -0
- package/dist/listCommands.js +190 -0
- package/dist/listCommands.js.map +1 -0
- package/dist/listHtml.d.ts +20 -0
- package/dist/listHtml.d.ts.map +1 -0
- package/dist/listHtml.js +108 -0
- package/dist/listHtml.js.map +1 -0
- package/dist/markdownSource.d.ts +40 -0
- package/dist/markdownSource.d.ts.map +1 -0
- package/dist/markdownSource.js +205 -0
- package/dist/markdownSource.js.map +1 -0
- package/dist/parts.d.ts +34 -0
- package/dist/parts.d.ts.map +1 -0
- package/dist/parts.js +68 -0
- package/dist/parts.js.map +1 -0
- package/dist/paste.d.ts +21 -0
- package/dist/paste.d.ts.map +1 -0
- package/dist/paste.js +273 -0
- package/dist/paste.js.map +1 -0
- package/dist/provider.d.ts +73 -0
- package/dist/provider.d.ts.map +1 -0
- package/dist/provider.js +16 -0
- package/dist/provider.js.map +1 -0
- package/dist/selection.d.ts +17 -0
- package/dist/selection.d.ts.map +1 -0
- package/dist/selection.js +88 -0
- package/dist/selection.js.map +1 -0
- package/dist/styles.css +668 -0
- package/package.json +64 -4
package/dist/styles.css
ADDED
|
@@ -0,0 +1,668 @@
|
|
|
1
|
+
@layer elea.tokens, elea.base, elea.components;
|
|
2
|
+
@layer elea.components {
|
|
3
|
+
/* Elea editor: every value comes from the tokens of @alien6-studio/elea-tokens (elea.css).
|
|
4
|
+
The editor is a writing surface: blocks sit flush like the rendered document, the controls
|
|
5
|
+
live in the left margin and appear on hover or focus. */
|
|
6
|
+
|
|
7
|
+
.elea-content-editor {
|
|
8
|
+
--elea-editor-gutter: 5rem;
|
|
9
|
+
position: relative;
|
|
10
|
+
color: var(--elea-color-text-default);
|
|
11
|
+
font-family: var(--elea-font-family-sans);
|
|
12
|
+
max-width: calc(var(--elea-size-measure) + var(--elea-editor-gutter));
|
|
13
|
+
padding-left: var(--elea-editor-gutter);
|
|
14
|
+
}
|
|
15
|
+
.elea-content-editor__title, .elea-content-editor__summary {
|
|
16
|
+
display: block;
|
|
17
|
+
width: 100%;
|
|
18
|
+
border: 0;
|
|
19
|
+
padding: 0;
|
|
20
|
+
background: transparent;
|
|
21
|
+
outline: none;
|
|
22
|
+
resize: none;
|
|
23
|
+
overflow: hidden;
|
|
24
|
+
color: var(--elea-color-text-default);
|
|
25
|
+
font-family: inherit;
|
|
26
|
+
}
|
|
27
|
+
.elea-textarea.elea-content-editor__title { font-size: var(--elea-font-size-4xl); font-weight: var(--elea-font-weight-bold); line-height: var(--elea-font-leading-tight); letter-spacing: -0.015em; margin-bottom: var(--elea-space-3); }
|
|
28
|
+
.elea-textarea.elea-content-editor__summary { font-size: var(--elea-font-size-xl); line-height: var(--elea-font-leading-normal); color: var(--elea-color-text-muted); margin-bottom: var(--elea-space-8); }
|
|
29
|
+
.elea-content-editor__title::placeholder, .elea-content-editor__summary::placeholder, .elea-textarea::placeholder, .elea-input::placeholder { color: var(--elea-color-text-subtle); opacity: 1; }
|
|
30
|
+
.elea-content-editor__blocks { display: flex; flex-direction: column; }
|
|
31
|
+
.elea-content-editor__add { margin: var(--elea-space-4) 0 0 calc(-1 * var(--elea-editor-gutter)); }
|
|
32
|
+
.elea-content-editor__preview-title { font-size: var(--elea-font-size-4xl); font-weight: var(--elea-font-weight-bold); line-height: var(--elea-font-leading-tight); letter-spacing: -0.015em; margin: 0 0 var(--elea-space-3); }
|
|
33
|
+
.elea-content-editor__preview-summary { font-size: var(--elea-font-size-xl); color: var(--elea-color-text-muted); margin: 0 0 var(--elea-space-8); }
|
|
34
|
+
|
|
35
|
+
/* Fields */
|
|
36
|
+
.elea-textarea, .elea-input {
|
|
37
|
+
font-family: inherit;
|
|
38
|
+
font-size: var(--elea-font-size-base);
|
|
39
|
+
color: var(--elea-color-text-default);
|
|
40
|
+
background: transparent;
|
|
41
|
+
border: 0;
|
|
42
|
+
padding: 0;
|
|
43
|
+
outline: none;
|
|
44
|
+
}
|
|
45
|
+
.elea-textarea { display: block; width: 100%; resize: none; overflow: hidden; line-height: var(--elea-font-leading-relaxed); }
|
|
46
|
+
.elea-input { width: 100%; }
|
|
47
|
+
.elea-icon-button:focus-visible, .elea-editor-button:focus-visible, .elea-toolbar__button:focus-visible {
|
|
48
|
+
outline: 2px solid var(--elea-color-focus);
|
|
49
|
+
outline-offset: 2px;
|
|
50
|
+
}
|
|
51
|
+
.elea-field-error { font-size: var(--elea-font-size-sm); margin: var(--elea-space-2) 0 0; }
|
|
52
|
+
.elea-visually-hidden { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
|
|
53
|
+
|
|
54
|
+
/* Buttons */
|
|
55
|
+
.elea-icon-button {
|
|
56
|
+
display: inline-flex;
|
|
57
|
+
align-items: center;
|
|
58
|
+
justify-content: center;
|
|
59
|
+
width: 1.5rem;
|
|
60
|
+
height: 1.5rem;
|
|
61
|
+
border: 0;
|
|
62
|
+
border-radius: var(--elea-radius-md);
|
|
63
|
+
background: transparent;
|
|
64
|
+
color: var(--elea-color-text-subtle);
|
|
65
|
+
cursor: pointer;
|
|
66
|
+
transition: background-color var(--elea-motion-duration-base) var(--elea-motion-easing-standard), color var(--elea-motion-duration-base) var(--elea-motion-easing-standard);
|
|
67
|
+
}
|
|
68
|
+
.elea-icon-button:hover { background: var(--elea-color-surface-muted); color: var(--elea-color-text-default); }
|
|
69
|
+
.elea-editor-button {
|
|
70
|
+
border: 0;
|
|
71
|
+
border-radius: var(--elea-radius-md);
|
|
72
|
+
padding: var(--elea-space-2) var(--elea-space-4);
|
|
73
|
+
font: inherit;
|
|
74
|
+
font-size: var(--elea-font-size-sm);
|
|
75
|
+
font-weight: var(--elea-font-weight-medium);
|
|
76
|
+
cursor: pointer;
|
|
77
|
+
}
|
|
78
|
+
.elea-editor-button--primary {
|
|
79
|
+
background: var(--elea-color-action-primary);
|
|
80
|
+
color: var(--elea-color-action-primary-text);
|
|
81
|
+
&:not(:disabled, [aria-disabled="true"]) {
|
|
82
|
+
&:hover { background: var(--elea-color-action-primary-hover); }
|
|
83
|
+
&:active { background: var(--elea-color-action-primary-pressed); }
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
.elea-editor-button--link { background: transparent; color: var(--elea-color-text-link); padding: 0; font-size: var(--elea-font-size-sm); }
|
|
87
|
+
.elea-editor-button--link:hover { text-decoration: underline; }
|
|
88
|
+
.elea-editor-button:disabled, .elea-icon-button:disabled { opacity: 0.6; cursor: default; }
|
|
89
|
+
|
|
90
|
+
/* Toolbar */
|
|
91
|
+
.elea-toolbar {
|
|
92
|
+
display: flex;
|
|
93
|
+
flex-wrap: wrap;
|
|
94
|
+
align-items: center;
|
|
95
|
+
gap: 2px;
|
|
96
|
+
padding: var(--elea-space-1);
|
|
97
|
+
background: var(--elea-color-surface-default);
|
|
98
|
+
border: 1px solid var(--elea-color-border-default);
|
|
99
|
+
border-radius: var(--elea-radius-lg);
|
|
100
|
+
box-shadow: var(--elea-shadow-md);
|
|
101
|
+
}
|
|
102
|
+
.elea-bubble { z-index: 30; }
|
|
103
|
+
.elea-toolbar__button {
|
|
104
|
+
display: inline-flex;
|
|
105
|
+
align-items: center;
|
|
106
|
+
justify-content: center;
|
|
107
|
+
min-width: 1.75rem;
|
|
108
|
+
height: 1.75rem;
|
|
109
|
+
padding: 0 var(--elea-space-1);
|
|
110
|
+
border: 0;
|
|
111
|
+
border-radius: var(--elea-radius-sm);
|
|
112
|
+
background: transparent;
|
|
113
|
+
color: var(--elea-color-text-muted);
|
|
114
|
+
font: inherit;
|
|
115
|
+
font-size: var(--elea-font-size-xs);
|
|
116
|
+
cursor: pointer;
|
|
117
|
+
}
|
|
118
|
+
.elea-toolbar__button:hover { background: var(--elea-color-surface-muted); color: var(--elea-color-text-default); }
|
|
119
|
+
.elea-toolbar__button--active { background: var(--elea-color-surface-muted); color: var(--elea-color-text-default); }
|
|
120
|
+
:is(.elea-header-editor__level, .elea-toolbar__headings) .elea-ui-select__option--selected { color: var(--elea-color-text-default); }
|
|
121
|
+
.elea-toolbar__text { font-weight: var(--elea-font-weight-bold); line-height: 1; }
|
|
122
|
+
.elea-toolbar__separator { width: 1px; height: 1rem; background: var(--elea-color-border-default); margin: 0 var(--elea-space-1); }
|
|
123
|
+
|
|
124
|
+
/* Block: content first, controls in the margin */
|
|
125
|
+
.elea-block-editor { position: relative; }
|
|
126
|
+
.elea-block-editor + .elea-block-editor, .elea-block-slot + .elea-block-slot { margin-top: var(--elea-space-5); }
|
|
127
|
+
.elea-block-editor__gutter {
|
|
128
|
+
position: absolute;
|
|
129
|
+
top: 0;
|
|
130
|
+
left: calc(-1 * var(--elea-editor-gutter));
|
|
131
|
+
width: calc(var(--elea-editor-gutter) - var(--elea-space-2));
|
|
132
|
+
display: flex;
|
|
133
|
+
justify-content: flex-end;
|
|
134
|
+
align-items: center;
|
|
135
|
+
gap: 2px;
|
|
136
|
+
opacity: 0;
|
|
137
|
+
transition: opacity var(--elea-motion-duration-base) var(--elea-motion-easing-standard);
|
|
138
|
+
}
|
|
139
|
+
.elea-block-menu { position: relative; }
|
|
140
|
+
.elea-block-menu__list {
|
|
141
|
+
position: absolute;
|
|
142
|
+
top: 1.75rem;
|
|
143
|
+
left: 0;
|
|
144
|
+
z-index: 20;
|
|
145
|
+
min-width: 12rem;
|
|
146
|
+
padding: var(--elea-space-1);
|
|
147
|
+
font-family: var(--elea-font-family-sans);
|
|
148
|
+
background: var(--elea-color-surface-default);
|
|
149
|
+
border: 1px solid var(--elea-color-border-default);
|
|
150
|
+
border-radius: var(--elea-radius-lg);
|
|
151
|
+
box-shadow: var(--elea-shadow-md);
|
|
152
|
+
}
|
|
153
|
+
.elea-block-menu__item { display: flex; align-items: center; gap: var(--elea-space-2); width: 100%; padding: var(--elea-space-2) var(--elea-space-3); border: 0; border-radius: var(--elea-radius-md); background: transparent; color: var(--elea-color-text-default); font: inherit; font-size: var(--elea-font-size-sm); text-align: left; cursor: pointer; }
|
|
154
|
+
.elea-block-menu__item svg { color: var(--elea-color-text-subtle); }
|
|
155
|
+
.elea-block-menu__item:hover { background: var(--elea-color-surface-muted); }
|
|
156
|
+
.elea-block-menu__item--current { font-weight: var(--elea-font-weight-semibold); }
|
|
157
|
+
.elea-field-error, .elea-link-popover__error, .elea-block-menu__item--danger { color: var(--elea-color-action-danger-ink, var(--elea-color-danger)); }
|
|
158
|
+
.elea-block-menu__item--current svg, .elea-block-menu__item--danger svg { color: currentColor; }
|
|
159
|
+
.elea-block-menu__separator { display: block; height: 1px; margin: var(--elea-space-1) 0; background: var(--elea-color-border-default); }
|
|
160
|
+
.elea-block-editor:hover .elea-block-editor__gutter, .elea-block-editor--focused .elea-block-editor__gutter, .elea-block-editor__gutter:focus-within { opacity: 1; }
|
|
161
|
+
.elea-block-editor__gutter:has(.elea-add-block[data-open="true"]) { z-index: 22; opacity: 1; }
|
|
162
|
+
/* A narrow margin holds one control: the plus of an empty paragraph stands alone. */
|
|
163
|
+
@media (max-width: 40rem) { .elea-block-editor__gutter:has(.elea-add-block) > :not(.elea-add-block) { display: none; } }
|
|
164
|
+
.elea-block-editor__grip { cursor: grab; }
|
|
165
|
+
.elea-block-editor__grip:active { cursor: grabbing; }
|
|
166
|
+
.elea-block-editor__card { min-width: 0; position: relative; }
|
|
167
|
+
.elea-block-editor__content { font-family: var(--elea-font-family-content); }
|
|
168
|
+
.elea-block-placeholder { background: var(--elea-color-surface-subtle); border-radius: var(--elea-radius-lg); animation: elea-content-skeleton-pulse 1.5s ease-in-out infinite; }
|
|
169
|
+
@media (prefers-reduced-motion: reduce) { .elea-block-placeholder { animation: none; } }
|
|
170
|
+
|
|
171
|
+
/* Text blocks: the same type scale as the viewer */
|
|
172
|
+
.elea-header-editor { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: var(--elea-space-2); }
|
|
173
|
+
.elea-header-editor :is(.elea-header-editor__text, .elea-richtext__placeholder) { font-family: var(--elea-font-family-sans); font-size: var(--elea-header-size); font-weight: var(--elea-font-weight-bold); line-height: var(--elea-font-leading-tight); letter-spacing: -0.01em; }
|
|
174
|
+
.elea-header-editor--1 { --elea-header-size: var(--elea-font-size-4xl); }
|
|
175
|
+
.elea-header-editor--2 { --elea-header-size: var(--elea-font-size-3xl); }
|
|
176
|
+
.elea-header-editor--3 { --elea-header-size: var(--elea-font-size-2xl); }
|
|
177
|
+
.elea-header-editor--4 { --elea-header-size: var(--elea-font-size-xl); }
|
|
178
|
+
.elea-header-editor--5 { --elea-header-size: var(--elea-font-size-lg); }
|
|
179
|
+
.elea-header-editor--6 { --elea-header-size: var(--elea-font-size-base); }
|
|
180
|
+
.elea-header-editor__level { min-width: 0; opacity: 0; transition: opacity var(--elea-motion-duration-base) var(--elea-motion-easing-standard); }
|
|
181
|
+
.elea-header-editor:hover .elea-header-editor__level, .elea-header-editor:focus-within .elea-header-editor__level { opacity: 1; }
|
|
182
|
+
.elea-header-editor__level.elea-ui-select--open { opacity: 1; transition: none; }
|
|
183
|
+
.elea-header-editor__level .elea-ui-select__list { left: auto; right: 0; }
|
|
184
|
+
@media (any-pointer: coarse) { .elea-header-editor__level { opacity: 1; } }
|
|
185
|
+
.elea-list-editor .elea-richtext__editable ul, .elea-list-editor .elea-richtext__editable ol { padding-left: var(--elea-space-6); margin: 0; }
|
|
186
|
+
.elea-list-editor .elea-richtext__editable ul { list-style: disc; }
|
|
187
|
+
.elea-list-editor .elea-richtext__editable ol { list-style: decimal; }
|
|
188
|
+
.elea-list-editor .elea-richtext__editable li > ul { list-style: circle; }
|
|
189
|
+
.elea-list-editor .elea-richtext__editable li > ol { list-style: lower-alpha; }
|
|
190
|
+
.elea-list-editor .elea-richtext__editable li li > ul { list-style: square; }
|
|
191
|
+
.elea-list-editor .elea-richtext__editable li li > ol { list-style: lower-roman; }
|
|
192
|
+
.elea-list-editor .elea-richtext__editable .elea-list-marker-disc { list-style-type: disc; }
|
|
193
|
+
.elea-list-editor .elea-richtext__editable .elea-list-marker-circle { list-style-type: circle; }
|
|
194
|
+
.elea-list-editor .elea-richtext__editable .elea-list-marker-square { list-style-type: square; }
|
|
195
|
+
.elea-list-editor .elea-richtext__editable .elea-list-marker-decimal { list-style-type: decimal; }
|
|
196
|
+
.elea-list-editor .elea-richtext__editable .elea-list-marker-lower-alpha { list-style-type: lower-alpha; }
|
|
197
|
+
.elea-list-editor .elea-richtext__editable .elea-list-marker-lower-roman { list-style-type: lower-roman; }
|
|
198
|
+
.elea-list-editor .elea-richtext__editable li { padding-left: var(--elea-space-2); }
|
|
199
|
+
.elea-list-editor .elea-richtext__editable li + li, .elea-list-editor .elea-richtext__editable li > ul, .elea-list-editor .elea-richtext__editable li > ol { margin-top: var(--elea-space-2); }
|
|
200
|
+
.elea-list-editor .elea-richtext__editable li::marker { color: var(--elea-color-text-muted); }
|
|
201
|
+
.elea-list-editor .elea-richtext__editable .elea-list-checklist {
|
|
202
|
+
&, & :is(ul, ol) { list-style: none; padding-left: 0; }
|
|
203
|
+
& li { position: relative; padding-left: 1.75em; }
|
|
204
|
+
& li::before { content: ""; position: absolute; left: 0; top: calc((1lh - 1em) / 2); box-sizing: border-box; width: 1em; height: 1em; border: 1px solid var(--elea-color-border-strong); border-radius: 0.2em; cursor: pointer; }
|
|
205
|
+
& li.elea-list-checked::before { background: var(--elea-color-action-primary); border-color: var(--elea-color-action-primary); }
|
|
206
|
+
& li.elea-list-checked::after { content: ""; position: absolute; left: 0.35em; top: calc((1lh - 1em) / 2 + 0.14em); box-sizing: border-box; width: 0.3em; height: 0.58em; border: solid var(--elea-color-action-primary-text); border-width: 0 2px 2px 0; rotate: 45deg; pointer-events: none; }
|
|
207
|
+
}
|
|
208
|
+
.elea-quote-editor { border-left: 4px solid var(--elea-color-border-accent); background: var(--elea-color-surface-subtle); border-radius: 0 var(--elea-radius-md) var(--elea-radius-md) 0; padding: var(--elea-space-2) var(--elea-space-4); }
|
|
209
|
+
.elea-quote-editor .elea-quote-editor__text, .elea-quote-editor .elea-richtext__placeholder { font-size: var(--elea-font-size-xl); font-style: italic; color: var(--elea-color-text-muted); }
|
|
210
|
+
.elea-quote-editor__caption { font-family: var(--elea-font-family-sans); font-size: var(--elea-font-size-sm); color: var(--elea-color-text-muted); margin-top: var(--elea-space-2); }
|
|
211
|
+
.elea-quote-editor input::placeholder { color: var(--elea-color-text-muted); }
|
|
212
|
+
.elea-code-editor::placeholder { color: var(--elea-color-neutral-500); }
|
|
213
|
+
.elea-delimiter-editor { border: 0; height: auto; margin: var(--elea-space-2) auto; text-align: center; }
|
|
214
|
+
.elea-delimiter-editor::before { content: "\2022 \2022 \2022"; color: var(--elea-color-text-subtle); letter-spacing: 0.5em; }
|
|
215
|
+
.elea-kept-block { font-family: var(--elea-font-family-sans); border: 1px dashed var(--elea-color-border-strong); border-radius: var(--elea-radius-lg); padding: var(--elea-space-3) var(--elea-space-4); color: var(--elea-color-text-muted); }
|
|
216
|
+
.elea-kept-block__type { display: inline-flex; align-items: center; gap: var(--elea-space-2); font-size: var(--elea-font-size-sm); font-weight: var(--elea-font-weight-medium); color: var(--elea-color-text-subtle); }
|
|
217
|
+
.elea-kept-block__text { margin: var(--elea-space-2) 0 0; font-size: var(--elea-font-size-sm); white-space: pre-line; }
|
|
218
|
+
|
|
219
|
+
/* Rich text */
|
|
220
|
+
.elea-richtext__area { position: relative; }
|
|
221
|
+
.elea-richtext__placeholder { position: absolute; inset: 0; pointer-events: none; color: var(--elea-color-text-subtle); font-size: var(--elea-font-size-lg); line-height: var(--elea-font-leading-relaxed); }
|
|
222
|
+
.elea-richtext__editable {
|
|
223
|
+
outline: none;
|
|
224
|
+
min-height: 1.5rem;
|
|
225
|
+
font-size: var(--elea-font-size-lg);
|
|
226
|
+
line-height: var(--elea-font-leading-relaxed);
|
|
227
|
+
}
|
|
228
|
+
.elea-richtext__editable p { margin: 0 0 var(--elea-space-4); }
|
|
229
|
+
.elea-richtext__editable p:last-child { margin-bottom: 0; }
|
|
230
|
+
.elea-richtext__editable h1, .elea-richtext__editable h2, .elea-richtext__editable h3, .elea-richtext__editable h4, .elea-richtext__editable h5, .elea-richtext__editable h6 { font-family: var(--elea-font-family-sans); font-weight: var(--elea-font-weight-bold); line-height: var(--elea-font-leading-tight); margin: 0; }
|
|
231
|
+
.elea-richtext__editable h1 { font-size: var(--elea-font-size-3xl); }
|
|
232
|
+
.elea-richtext__editable h2 { font-size: var(--elea-font-size-2xl); }
|
|
233
|
+
.elea-richtext__editable h3 { font-size: var(--elea-font-size-xl); }
|
|
234
|
+
.elea-richtext__editable h4 { font-size: var(--elea-font-size-lg); font-weight: var(--elea-font-weight-semibold); }
|
|
235
|
+
.elea-richtext__editable h5 { font-size: var(--elea-font-size-base); font-weight: var(--elea-font-weight-semibold); }
|
|
236
|
+
.elea-richtext__editable h6 { font-size: var(--elea-font-size-sm); font-weight: var(--elea-font-weight-semibold); text-transform: uppercase; letter-spacing: 0.05em; }
|
|
237
|
+
.elea-richtext__editable blockquote { border-left: 4px solid var(--elea-color-border-strong); padding-left: var(--elea-space-4); font-style: italic; color: var(--elea-color-text-muted); margin: 0; }
|
|
238
|
+
.elea-richtext__editable strong { font-weight: var(--elea-font-weight-bold); }
|
|
239
|
+
.elea-richtext__editable em { font-style: italic; }
|
|
240
|
+
.elea-richtext__editable u { text-decoration: underline; }
|
|
241
|
+
.elea-richtext__editable a { color: var(--elea-color-text-link); text-decoration: underline; text-underline-offset: 0.15em; }
|
|
242
|
+
.elea-richtext__editable ul, .elea-richtext__editable ol { padding-left: var(--elea-space-6); margin: 0; }
|
|
243
|
+
.elea-richtext__editable ul { list-style: disc; }
|
|
244
|
+
.elea-richtext__editable ol { list-style: decimal; }
|
|
245
|
+
.elea-richtext__editable li { padding-left: var(--elea-space-2); }
|
|
246
|
+
|
|
247
|
+
.elea-link-popover {
|
|
248
|
+
display: flex;
|
|
249
|
+
align-items: center;
|
|
250
|
+
gap: var(--elea-space-1);
|
|
251
|
+
padding: var(--elea-space-1) var(--elea-space-2);
|
|
252
|
+
font-family: var(--elea-font-family-sans);
|
|
253
|
+
background: var(--elea-color-surface-default);
|
|
254
|
+
border: 1px solid var(--elea-color-border-default);
|
|
255
|
+
border-radius: var(--elea-radius-lg);
|
|
256
|
+
box-shadow: var(--elea-shadow-md);
|
|
257
|
+
z-index: 9999;
|
|
258
|
+
}
|
|
259
|
+
.elea-link-popover__input {
|
|
260
|
+
width: 16rem;
|
|
261
|
+
font: inherit;
|
|
262
|
+
font-size: var(--elea-font-size-sm);
|
|
263
|
+
padding: 2px var(--elea-space-2);
|
|
264
|
+
border: 1px solid var(--elea-color-border-strong);
|
|
265
|
+
border-radius: var(--elea-radius-sm);
|
|
266
|
+
outline: none;
|
|
267
|
+
color: var(--elea-color-text-default);
|
|
268
|
+
background: var(--elea-color-surface-default);
|
|
269
|
+
}
|
|
270
|
+
.elea-link-popover__input:focus { border-color: var(--elea-color-focus); }
|
|
271
|
+
.elea-link-popover__input--invalid { border-color: var(--elea-color-action-danger-ink, var(--elea-color-danger)); }
|
|
272
|
+
.elea-link-popover__error { font-size: var(--elea-font-size-xs); white-space: nowrap; }
|
|
273
|
+
.elea-link-popover__button { display: inline-flex; padding: var(--elea-space-1); border: 0; background: transparent; color: var(--elea-color-text-subtle); cursor: pointer; }
|
|
274
|
+
.elea-link-popover__button--confirm { color: var(--elea-color-action-success-ink, var(--elea-color-success)); }
|
|
275
|
+
|
|
276
|
+
/* Simple rich text */
|
|
277
|
+
.elea-richtext-input { border: 1px solid var(--elea-color-border-strong); border-radius: var(--elea-radius-lg); overflow: hidden; background: var(--elea-color-surface-default); }
|
|
278
|
+
.elea-richtext-input .elea-toolbar { background: var(--elea-color-surface-subtle); border: 0; border-bottom: 1px solid var(--elea-color-border-default); border-radius: 0; box-shadow: none; }
|
|
279
|
+
.elea-richtext-input__editable { min-height: 12rem; padding: var(--elea-space-4); outline: none; white-space: pre-wrap; overflow-wrap: anywhere; }
|
|
280
|
+
.elea-richtext-input--disabled .elea-richtext-input__editable { background: var(--elea-color-surface-subtle); color: var(--elea-color-text-muted); cursor: not-allowed; }
|
|
281
|
+
.elea-richtext-input__editable:empty::before { content: attr(data-placeholder); color: var(--elea-color-text-subtle); pointer-events: none; }
|
|
282
|
+
.elea-richtext-input__editable ul, .elea-richtext-input__editable ol { margin: var(--elea-space-3) 0; padding-left: var(--elea-space-8); }
|
|
283
|
+
.elea-richtext-input__editable ul { list-style: disc; }
|
|
284
|
+
.elea-richtext-input__editable ol { list-style: decimal; }
|
|
285
|
+
.elea-richtext-input__editable li { margin: var(--elea-space-1) 0; }
|
|
286
|
+
.elea-richtext-input__editable strong { font-weight: var(--elea-font-weight-semibold); }
|
|
287
|
+
|
|
288
|
+
/* Media blocks */
|
|
289
|
+
.elea-media-block { font-family: var(--elea-font-family-sans); }
|
|
290
|
+
.elea-media-block__image { display: block; width: 100%; height: auto; border-radius: var(--elea-radius-lg); }
|
|
291
|
+
.elea-media-block__caption { width: 100%; margin-top: var(--elea-space-3); text-align: center; font-size: var(--elea-font-size-sm); font-style: italic; color: var(--elea-color-text-subtle); border: 0; background: transparent; outline: none; font-family: var(--elea-font-family-content); }
|
|
292
|
+
.elea-media-block__frame { position: relative; }
|
|
293
|
+
.elea-upload-status { display: flex; flex-direction: column; align-items: center; text-align: center; }
|
|
294
|
+
.elea-upload-status__label:not(:empty) { margin-top: var(--elea-space-2); font-size: var(--elea-font-size-sm); color: var(--elea-color-text-subtle); }
|
|
295
|
+
.elea-upload-status__bar { margin-top: var(--elea-space-2); inline-size: min(100%, 16rem); block-size: 0.375rem; accent-color: var(--elea-color-action-primary-ink); }
|
|
296
|
+
.elea-media-block__actions {
|
|
297
|
+
position: absolute;
|
|
298
|
+
inset-block-start: var(--elea-space-2);
|
|
299
|
+
inset-inline-end: var(--elea-space-2);
|
|
300
|
+
display: flex;
|
|
301
|
+
align-items: center;
|
|
302
|
+
gap: var(--elea-space-1);
|
|
303
|
+
}
|
|
304
|
+
@media (hover: hover) and (pointer: fine) and (not (any-pointer: coarse)) {
|
|
305
|
+
.elea-media-block__frame:not(:hover):not(:focus-within) .elea-media-block__actions { opacity: 0; pointer-events: none; }
|
|
306
|
+
}
|
|
307
|
+
.elea-video-form { padding: var(--elea-space-8); text-align: center; }
|
|
308
|
+
.elea-video-form .elea-dropzone__icon { margin: 0 auto var(--elea-space-3); }
|
|
309
|
+
.elea-dropzone__form { display: flex; flex-direction: column; gap: var(--elea-space-3); max-width: 28rem; margin: 0 auto; }
|
|
310
|
+
.elea-dropzone__form .elea-input { border: 1px solid var(--elea-color-border-strong); border-radius: var(--elea-radius-md); padding: var(--elea-space-2) var(--elea-space-3); background: var(--elea-color-surface-default); }
|
|
311
|
+
.elea-picker { border: 1px solid var(--elea-color-border-default); border-radius: var(--elea-radius-lg); overflow: hidden; }
|
|
312
|
+
.elea-picker__header { display: flex; align-items: center; gap: var(--elea-space-2); padding: var(--elea-space-3) var(--elea-space-4); background: var(--elea-color-surface-subtle); border-bottom: 1px solid var(--elea-color-border-default); font-size: var(--elea-font-size-sm); font-weight: var(--elea-font-weight-medium); }
|
|
313
|
+
.elea-picker__body { background: var(--elea-color-surface-default); }
|
|
314
|
+
.elea-picker__empty { text-align: center; color: var(--elea-color-text-subtle); padding: var(--elea-space-8); margin: 0; }
|
|
315
|
+
.elea-attachment-card { display: flex; align-items: flex-start; gap: var(--elea-space-3); padding: var(--elea-space-4); border: 1px solid var(--elea-color-border-default); border-radius: var(--elea-radius-lg); background: var(--elea-color-surface-default); }
|
|
316
|
+
.elea-attachment-card .elea-attachment__body { flex: 1; display: flex; flex-direction: column; min-width: 0; }
|
|
317
|
+
.elea-attachment-card .elea-media-block__actions { position: static; flex-shrink: 0; align-self: center; }
|
|
318
|
+
.elea-picker__header .elea-editor-button { margin-inline-start: auto; }
|
|
319
|
+
|
|
320
|
+
/* Only the two small drops pass through the liquid filter, and only while moving.
|
|
321
|
+
The menu and its text stay sharp, including over photographs and in dark themes. */
|
|
322
|
+
.elea-add-block {
|
|
323
|
+
--elea-add-size: 1.5rem;
|
|
324
|
+
--elea-drop-distance: 60;
|
|
325
|
+
--elea-drop-travel: calc(var(--elea-add-size) * var(--elea-drop-distance) / 44);
|
|
326
|
+
--elea-drop-x: var(--elea-drop-travel);
|
|
327
|
+
--elea-menu-width: min(var(--elea-menu-max, 38rem), calc(var(--elea-menu-room, 100vw - 1rem) - var(--elea-drop-travel)));
|
|
328
|
+
/* The menu is a pill at least as tall as a comfortable target, centred on its trigger. */
|
|
329
|
+
--elea-menu-size: max(var(--elea-add-size), 2rem);
|
|
330
|
+
--elea-menu-y: calc((var(--elea-add-size) - var(--elea-menu-size)) / 2);
|
|
331
|
+
position: relative;
|
|
332
|
+
display: inline-flex;
|
|
333
|
+
width: var(--elea-add-size);
|
|
334
|
+
height: var(--elea-add-size);
|
|
335
|
+
z-index: 1;
|
|
336
|
+
isolation: isolate;
|
|
337
|
+
font-family: var(--elea-font-family-sans);
|
|
338
|
+
}
|
|
339
|
+
.elea-add-block[data-mode-picker] {
|
|
340
|
+
--elea-add-size: 2.75rem;
|
|
341
|
+
--elea-drop-distance: 48;
|
|
342
|
+
--elea-menu-max: 28rem;
|
|
343
|
+
}
|
|
344
|
+
.elea-content-editor__add .elea-add-block { --elea-add-size: 2rem; }
|
|
345
|
+
.elea-add-block__surface, .elea-add-block__drops, .elea-add-block__menu { position: absolute; top: 0; left: 0; box-sizing: border-box; }
|
|
346
|
+
.elea-add-block[data-left] { --elea-drop-x: calc(-1 * var(--elea-drop-travel)); }
|
|
347
|
+
.elea-add-block[data-left] :is(.elea-add-block__surface, .elea-add-block__drops, .elea-add-block__menu) { left: auto; right: 0; }
|
|
348
|
+
.elea-add-block[data-above] { --elea-menu-y: calc((var(--elea-menu-size) - var(--elea-add-size)) / 2); }
|
|
349
|
+
.elea-add-block[data-above] :is(.elea-add-block__surface, .elea-add-block__menu) { top: auto; bottom: 0; }
|
|
350
|
+
.elea-add-block__surface {
|
|
351
|
+
width: var(--elea-add-size);
|
|
352
|
+
height: var(--elea-add-size);
|
|
353
|
+
border-radius: calc(var(--elea-add-size) / 2);
|
|
354
|
+
background: var(--elea-color-neutral-100);
|
|
355
|
+
pointer-events: none;
|
|
356
|
+
translate: 0;
|
|
357
|
+
transition: width 190ms ease, height 135ms ease, border-radius 160ms ease,
|
|
358
|
+
translate 240ms ease-in-out 145ms, box-shadow 120ms ease;
|
|
359
|
+
}
|
|
360
|
+
.elea-add-block[data-open="true"] .elea-add-block__surface {
|
|
361
|
+
translate: var(--elea-drop-x) var(--elea-menu-y);
|
|
362
|
+
width: var(--elea-menu-width);
|
|
363
|
+
height: var(--elea-menu-size);
|
|
364
|
+
border-radius: calc(var(--elea-menu-size) / 2);
|
|
365
|
+
transition: translate 260ms ease-in-out 35ms, width 185ms ease-out 207ms, height 145ms ease 260ms,
|
|
366
|
+
border-radius 120ms ease 255ms;
|
|
367
|
+
}
|
|
368
|
+
.elea-add-block__drops {
|
|
369
|
+
width: calc(var(--elea-add-size) * 104 / 44);
|
|
370
|
+
height: var(--elea-add-size);
|
|
371
|
+
overflow: visible;
|
|
372
|
+
pointer-events: none;
|
|
373
|
+
visibility: hidden;
|
|
374
|
+
color: var(--elea-color-neutral-100);
|
|
375
|
+
}
|
|
376
|
+
.elea-add-block[data-left] .elea-add-block__drops { scale: -1 1; }
|
|
377
|
+
.elea-add-block__drop { translate: 0; transition: translate 240ms ease-in-out 145ms; }
|
|
378
|
+
.elea-add-block[data-open="true"] .elea-add-block__drop { translate: calc(var(--elea-drop-distance) * 1px); transition: translate 260ms ease-in-out 35ms; }
|
|
379
|
+
@starting-style { .elea-add-block[data-open="true"] .elea-add-block__drop { translate: 0; } }
|
|
380
|
+
.elea-add-block[data-open="true"] .elea-add-block__drops { animation: elea-drop-bridge 300ms; }
|
|
381
|
+
.elea-add-block[data-open="false"] .elea-add-block__drops { animation: elea-drop-bridge 250ms 140ms; }
|
|
382
|
+
@keyframes elea-drop-bridge { from, to { visibility: visible; } }
|
|
383
|
+
.elea-add-block__drops circle { transform-box: fill-box; transform-origin: center; }
|
|
384
|
+
.elea-add-block[data-open="true"] .elea-add-block__surface,
|
|
385
|
+
.elea-add-block[data-open="true"] .elea-add-block__trigger::before,
|
|
386
|
+
.elea-add-block[data-open="true"] .elea-add-block__drops circle { animation: elea-drop-press 140ms ease-in-out; }
|
|
387
|
+
@keyframes elea-drop-press { 0%, 100% { scale: 1; } 40% { scale: .76; } }
|
|
388
|
+
.elea-add-block .elea-add-block__trigger.elea-button--disc {
|
|
389
|
+
position: relative;
|
|
390
|
+
z-index: 1;
|
|
391
|
+
width: var(--elea-add-size);
|
|
392
|
+
height: var(--elea-add-size);
|
|
393
|
+
min-height: 0;
|
|
394
|
+
background: transparent;
|
|
395
|
+
}
|
|
396
|
+
.elea-add-block__trigger::before {
|
|
397
|
+
content: "";
|
|
398
|
+
position: absolute;
|
|
399
|
+
inset: 0;
|
|
400
|
+
z-index: -1;
|
|
401
|
+
border-radius: inherit;
|
|
402
|
+
background: var(--elea-color-neutral-100);
|
|
403
|
+
}
|
|
404
|
+
.elea-add-block__trigger:not([aria-expanded="true"]):is(:hover, :focus-visible)::before { background: var(--elea-color-neutral-200); }
|
|
405
|
+
.elea-add-block__menu {
|
|
406
|
+
translate: var(--elea-drop-x) var(--elea-menu-y);
|
|
407
|
+
container-type: inline-size;
|
|
408
|
+
display: grid;
|
|
409
|
+
grid-auto-flow: column;
|
|
410
|
+
grid-auto-columns: minmax(min-content, 1fr);
|
|
411
|
+
width: var(--elea-menu-width);
|
|
412
|
+
height: var(--elea-menu-size);
|
|
413
|
+
border-radius: calc(var(--elea-menu-size) / 2);
|
|
414
|
+
overflow: auto hidden;
|
|
415
|
+
overscroll-behavior: contain;
|
|
416
|
+
scrollbar-width: none;
|
|
417
|
+
color: var(--elea-color-neutral-800);
|
|
418
|
+
transition: opacity 85ms ease 380ms;
|
|
419
|
+
}
|
|
420
|
+
.elea-add-block__menu[aria-hidden="true"] { opacity: 0; pointer-events: none; visibility: hidden; transition: opacity 75ms ease, visibility 0s 75ms; }
|
|
421
|
+
@starting-style { .elea-add-block__menu[aria-hidden="false"] { opacity: 0; } }
|
|
422
|
+
@media (prefers-reduced-motion: reduce) {
|
|
423
|
+
.elea-add-block[data-open] *, .elea-add-block[data-open] .elea-add-block__trigger::before { animation: none !important; transition: none !important; }
|
|
424
|
+
}
|
|
425
|
+
.elea-add-block__menu .elea-quick-add { display: contents; }
|
|
426
|
+
.elea-add-block__menu button {
|
|
427
|
+
display: flex;
|
|
428
|
+
align-items: center;
|
|
429
|
+
justify-content: center;
|
|
430
|
+
gap: var(--elea-space-1);
|
|
431
|
+
min-height: 0;
|
|
432
|
+
padding: 0 var(--elea-space-2);
|
|
433
|
+
border: 0;
|
|
434
|
+
border-radius: calc(var(--elea-menu-size) / 2);
|
|
435
|
+
background: transparent;
|
|
436
|
+
color: inherit;
|
|
437
|
+
cursor: pointer;
|
|
438
|
+
font: inherit;
|
|
439
|
+
font-size: var(--elea-font-size-sm);
|
|
440
|
+
text-align: center;
|
|
441
|
+
}
|
|
442
|
+
.elea-add-block__menu .elea-quick-add__item { font-size: var(--elea-font-size-xs); white-space: nowrap; }
|
|
443
|
+
.elea-add-block__menu .elea-quick-add__item svg { flex: none; width: 1rem; height: 1rem; color: inherit; }
|
|
444
|
+
.elea-add-block__menu [aria-checked="true"] { color: var(--elea-color-neutral-950); font-weight: var(--elea-font-weight-semibold); }
|
|
445
|
+
@container (max-width: 24rem) {
|
|
446
|
+
.elea-add-block__menu > button { padding: 0 2px; min-width: var(--elea-add-size); font-size: var(--elea-font-size-xs); }
|
|
447
|
+
.elea-add-block__menu [aria-checked="true"] { background: var(--elea-color-neutral-200); }
|
|
448
|
+
.elea-add-block__menu > button svg { display: none; }
|
|
449
|
+
}
|
|
450
|
+
.elea-add-block__menu button:hover, .elea-add-block__menu button:focus-visible { background: var(--elea-color-neutral-200); }
|
|
451
|
+
.elea-add-block__menu button:focus-visible { outline: 2px solid var(--elea-color-neutral-600); outline-offset: -2px; }
|
|
452
|
+
@media (forced-colors: active) {
|
|
453
|
+
.elea-add-block__surface, .elea-add-block__trigger::before { background: Canvas; border: 1px solid ButtonText; }
|
|
454
|
+
.elea-add-block__drops { display: none; }
|
|
455
|
+
}
|
|
456
|
+
.elea-quick-add { display: flex; flex-direction: column; align-items: stretch; gap: 2px; min-width: 12rem; }
|
|
457
|
+
.elea-quick-add--row { flex-direction: row; flex-wrap: wrap; min-width: 0; }
|
|
458
|
+
.elea-quick-add--row .elea-quick-add__item { padding: var(--elea-space-1) var(--elea-space-2); font-size: var(--elea-font-size-xs); }
|
|
459
|
+
.elea-quick-add__item { display: flex; align-items: center; gap: var(--elea-space-2); padding: var(--elea-space-2) var(--elea-space-3); border: 0; border-radius: var(--elea-radius-md); background: transparent; color: var(--elea-color-text-default); font: inherit; font-size: var(--elea-font-size-sm); text-align: left; cursor: pointer; }
|
|
460
|
+
.elea-quick-add__item:hover { background: var(--elea-color-surface-muted); }
|
|
461
|
+
.elea-quick-add__item svg { color: var(--elea-color-text-subtle); }
|
|
462
|
+
|
|
463
|
+
@keyframes elea-content-skeleton-pulse {
|
|
464
|
+
0%, 100% { opacity: 1; }
|
|
465
|
+
50% { opacity: 0.5; }
|
|
466
|
+
}
|
|
467
|
+
|
|
468
|
+
/* Block selection and its toolbar */
|
|
469
|
+
.elea-content-editor:focus { outline: none; }
|
|
470
|
+
.elea-content-editor--selecting, .elea-content-editor--selecting * { user-select: none; }
|
|
471
|
+
:is(.elea-content-editor, .elea-content) ::selection { background: color-mix(in srgb, var(--elea-color-selection, var(--elea-color-action-primary-ink)) 28%, transparent); }
|
|
472
|
+
.elea-block-editor--selected .elea-block-editor__card { z-index: 0; }
|
|
473
|
+
.elea-block-slot:has([aria-haspopup][aria-expanded="true"]) { z-index: 2; }
|
|
474
|
+
.elea-block-editor--selected .elea-block-editor__card::before {
|
|
475
|
+
content: "";
|
|
476
|
+
position: absolute;
|
|
477
|
+
inset: calc(-1 * var(--elea-space-1)) calc(-1 * var(--elea-space-2));
|
|
478
|
+
z-index: -1;
|
|
479
|
+
border-radius: var(--elea-radius-md);
|
|
480
|
+
background: color-mix(in srgb, var(--elea-color-selection, var(--elea-color-action-primary-ink)) 12%, transparent);
|
|
481
|
+
pointer-events: none;
|
|
482
|
+
}
|
|
483
|
+
.elea-block-editor--selected .elea-block-editor__gutter { opacity: 1; }
|
|
484
|
+
.elea-block-slot:has(> .elea-selection-bar) { display: grid; grid-template-columns: minmax(0, 1fr); }
|
|
485
|
+
.elea-selection-bar {
|
|
486
|
+
grid-row: 1;
|
|
487
|
+
margin-block-end: var(--elea-space-2);
|
|
488
|
+
width: fit-content;
|
|
489
|
+
max-width: 100%;
|
|
490
|
+
font-family: var(--elea-font-family-sans);
|
|
491
|
+
}
|
|
492
|
+
.elea-content-editor--selecting .elea-selection-bar { display: none; }
|
|
493
|
+
.elea-selection-bar__count { font-size: var(--elea-font-size-xs); font-weight: var(--elea-font-weight-medium); padding: 0 var(--elea-space-2); white-space: nowrap; }
|
|
494
|
+
.elea-selection-bar .elea-editor-button--link { padding: var(--elea-space-1) var(--elea-space-2); font-size: var(--elea-font-size-xs); }
|
|
495
|
+
|
|
496
|
+
/* Slash menu */
|
|
497
|
+
.elea-slash-menu {
|
|
498
|
+
z-index: 30;
|
|
499
|
+
min-width: 14rem;
|
|
500
|
+
padding: var(--elea-space-1);
|
|
501
|
+
font-family: var(--elea-font-family-sans);
|
|
502
|
+
background: var(--elea-color-surface-default);
|
|
503
|
+
border: 1px solid var(--elea-color-border-default);
|
|
504
|
+
border-radius: var(--elea-radius-lg);
|
|
505
|
+
box-shadow: var(--elea-shadow-md);
|
|
506
|
+
}
|
|
507
|
+
.elea-slash-menu__item {
|
|
508
|
+
display: flex;
|
|
509
|
+
align-items: center;
|
|
510
|
+
gap: var(--elea-space-2);
|
|
511
|
+
width: 100%;
|
|
512
|
+
padding: var(--elea-space-2) var(--elea-space-3);
|
|
513
|
+
border: 0;
|
|
514
|
+
border-radius: var(--elea-radius-md);
|
|
515
|
+
background: transparent;
|
|
516
|
+
color: var(--elea-color-text-default);
|
|
517
|
+
font: inherit;
|
|
518
|
+
font-size: var(--elea-font-size-sm);
|
|
519
|
+
text-align: left;
|
|
520
|
+
cursor: pointer;
|
|
521
|
+
}
|
|
522
|
+
.elea-slash-menu__item--active, .elea-slash-menu__item:hover { background: var(--elea-color-surface-muted); }
|
|
523
|
+
.elea-slash-menu__empty { padding: var(--elea-space-2) var(--elea-space-3); color: var(--elea-color-text-subtle); font-size: var(--elea-font-size-sm); }
|
|
524
|
+
|
|
525
|
+
/* Drag and drop */
|
|
526
|
+
.elea-block-slot { position: relative; }
|
|
527
|
+
.elea-block-slot--dragging { opacity: 0.4; }
|
|
528
|
+
.elea-block-slot--drop-before::before, .elea-block-slot--drop-after::after {
|
|
529
|
+
content: "";
|
|
530
|
+
position: absolute;
|
|
531
|
+
left: 0;
|
|
532
|
+
right: 0;
|
|
533
|
+
height: 3px;
|
|
534
|
+
border-radius: var(--elea-radius-full);
|
|
535
|
+
background: var(--elea-color-focus);
|
|
536
|
+
pointer-events: none;
|
|
537
|
+
}
|
|
538
|
+
.elea-block-slot--drop-before::before { top: calc(-1 * var(--elea-space-3)); }
|
|
539
|
+
.elea-block-slot--drop-after::after { bottom: calc(-1 * var(--elea-space-3)); }
|
|
540
|
+
|
|
541
|
+
.elea-content-editor--classic, .elea-content-editor--markdown { padding-left: 0; max-width: var(--elea-size-measure); }
|
|
542
|
+
.elea-classic-editor {
|
|
543
|
+
min-width: 0;
|
|
544
|
+
border: 1px solid var(--elea-color-border-strong);
|
|
545
|
+
border-radius: var(--elea-radius-lg);
|
|
546
|
+
background: var(--elea-color-surface-default);
|
|
547
|
+
}
|
|
548
|
+
.elea-richtext-input:has(.elea-richtext-input__editable:focus),
|
|
549
|
+
.elea-classic-editor:has(:is(.elea-input, .elea-textarea, [contenteditable]):focus),
|
|
550
|
+
.elea-markdown-editor__source:focus-within {
|
|
551
|
+
border-color: transparent;
|
|
552
|
+
outline: 2px solid var(--elea-color-focus);
|
|
553
|
+
outline-offset: -2px;
|
|
554
|
+
}
|
|
555
|
+
.elea-classic-editor__canvas {
|
|
556
|
+
box-sizing: border-box;
|
|
557
|
+
display: flex;
|
|
558
|
+
flex-direction: column;
|
|
559
|
+
height: clamp(14rem, 52vh, 32rem);
|
|
560
|
+
overflow: auto;
|
|
561
|
+
padding: clamp(var(--elea-space-3), 3%, var(--elea-space-6));
|
|
562
|
+
scroll-padding-block: var(--elea-space-4);
|
|
563
|
+
}
|
|
564
|
+
.elea-classic-editor__end {
|
|
565
|
+
display: flex;
|
|
566
|
+
align-items: flex-start;
|
|
567
|
+
flex: 1 0 var(--elea-space-8);
|
|
568
|
+
padding: 0;
|
|
569
|
+
border: 0;
|
|
570
|
+
background: transparent;
|
|
571
|
+
color: var(--elea-color-text-subtle);
|
|
572
|
+
font: inherit;
|
|
573
|
+
text-align: start;
|
|
574
|
+
cursor: text;
|
|
575
|
+
}
|
|
576
|
+
.elea-classic-editor__end:focus-visible { outline: 2px solid var(--elea-color-focus); outline-offset: 2px; }
|
|
577
|
+
.elea-doc-toolbar {
|
|
578
|
+
position: sticky;
|
|
579
|
+
top: 0;
|
|
580
|
+
z-index: 15;
|
|
581
|
+
display: flex;
|
|
582
|
+
flex-wrap: wrap;
|
|
583
|
+
align-items: center;
|
|
584
|
+
gap: var(--elea-space-2) var(--elea-space-4);
|
|
585
|
+
margin-bottom: var(--elea-space-5);
|
|
586
|
+
padding: var(--elea-space-2) var(--elea-space-3);
|
|
587
|
+
font-family: var(--elea-font-family-sans);
|
|
588
|
+
background: var(--elea-color-surface-default);
|
|
589
|
+
border: 1px solid var(--elea-color-border-default);
|
|
590
|
+
border-radius: var(--elea-radius-lg);
|
|
591
|
+
box-shadow: var(--elea-shadow-sm);
|
|
592
|
+
}
|
|
593
|
+
.elea-doc-toolbar .elea-toolbar { border: 0; box-shadow: none; padding: 0; background: transparent; }
|
|
594
|
+
.elea-toolbar__headings { min-width: 0; }
|
|
595
|
+
.elea-toolbar__headings .elea-ui-select__list { min-width: max-content; }
|
|
596
|
+
.elea-doc-toolbar__group { display: flex; min-width: 0; align-items: center; gap: var(--elea-space-1); }
|
|
597
|
+
.elea-doc-toolbar__group:has(.elea-quick-add--row) { flex-wrap: wrap; gap: 2px; }
|
|
598
|
+
.elea-doc-toolbar .elea-quick-add--row { display: contents; }
|
|
599
|
+
.elea-doc-toolbar__label { color: var(--elea-color-text-muted); font-size: var(--elea-font-size-xs); font-weight: var(--elea-font-weight-semibold); }
|
|
600
|
+
.elea-doc-toolbar .elea-quick-add__item { min-height: 2rem; gap: var(--elea-space-1); }
|
|
601
|
+
@media (max-width: 40rem) {
|
|
602
|
+
.elea-content-editor--toolbar > .elea-doc-toolbar { margin-inline-start: calc(-1 * var(--elea-editor-gutter)); padding-inline: var(--elea-space-2); }
|
|
603
|
+
.elea-doc-toolbar .elea-quick-add__item { padding-inline: var(--elea-space-1); }
|
|
604
|
+
}
|
|
605
|
+
.elea-doc-toolbar fieldset { margin: 0; padding: 0; border: 0; }
|
|
606
|
+
.elea-doc-toolbar__group--idle { opacity: 0.4; pointer-events: none; }
|
|
607
|
+
.elea-classic-editor > .elea-doc-toolbar {
|
|
608
|
+
position: relative;
|
|
609
|
+
gap: var(--elea-space-1) var(--elea-space-2);
|
|
610
|
+
padding: var(--elea-space-2);
|
|
611
|
+
margin: 0;
|
|
612
|
+
border: 0;
|
|
613
|
+
border-bottom: 1px solid var(--elea-color-border-default);
|
|
614
|
+
border-radius: var(--elea-radius-lg) var(--elea-radius-lg) 0 0;
|
|
615
|
+
background: var(--elea-color-surface-subtle);
|
|
616
|
+
box-shadow: none;
|
|
617
|
+
}
|
|
618
|
+
.elea-classic-editor .elea-doc-toolbar__group:has(.elea-toolbar) { flex: 1 1 12rem; }
|
|
619
|
+
|
|
620
|
+
.elea-editor-workspace { min-inline-size: 0; }
|
|
621
|
+
.elea-content-editor__mode { display: flex; align-items: center; gap: var(--elea-space-1); position: relative; z-index: 21; margin-block-end: var(--elea-space-4); }
|
|
622
|
+
:is(.elea-add-block[data-open="true"], .elea-doc-toolbar__group:has(.elea-add-block[data-open="true"])) ~ * { visibility: hidden; }
|
|
623
|
+
@media (prefers-reduced-motion: no-preference) {
|
|
624
|
+
/* Restore history when the pencil finishes closing. */
|
|
625
|
+
.elea-add-block[data-open="false"] + .elea-doc-toolbar__group--history { transition: visibility 0s 385ms; }
|
|
626
|
+
}
|
|
627
|
+
.elea-content-editor--markdown .elea-content-editor__add { margin-inline-start: 0; }
|
|
628
|
+
.elea-markdown-editor, .elea-markdown-editor__source { min-width: 0; }
|
|
629
|
+
.elea-markdown-editor__source {
|
|
630
|
+
display: grid;
|
|
631
|
+
grid-template-columns: auto minmax(0, 1fr);
|
|
632
|
+
height: clamp(14rem, 52vh, 32rem);
|
|
633
|
+
border: 1px solid var(--elea-color-border-strong);
|
|
634
|
+
border-radius: var(--elea-radius-lg);
|
|
635
|
+
background: var(--elea-color-surface-default);
|
|
636
|
+
overflow: hidden;
|
|
637
|
+
}
|
|
638
|
+
.elea-markdown-editor__lines, .elea-markdown-editor__input {
|
|
639
|
+
box-sizing: border-box;
|
|
640
|
+
min-height: 0;
|
|
641
|
+
margin: 0;
|
|
642
|
+
padding: var(--elea-space-3);
|
|
643
|
+
border: 0;
|
|
644
|
+
border-radius: 0;
|
|
645
|
+
font: var(--elea-font-size-sm)/var(--elea-font-leading-relaxed) var(--elea-font-family-mono);
|
|
646
|
+
white-space: pre;
|
|
647
|
+
}
|
|
648
|
+
.elea-markdown-editor__lines {
|
|
649
|
+
overflow: hidden;
|
|
650
|
+
text-align: end;
|
|
651
|
+
background: var(--elea-color-surface-muted);
|
|
652
|
+
color: var(--elea-color-text-muted);
|
|
653
|
+
user-select: none;
|
|
654
|
+
}
|
|
655
|
+
.elea-markdown-editor__input {
|
|
656
|
+
width: 100%;
|
|
657
|
+
resize: none;
|
|
658
|
+
outline: none;
|
|
659
|
+
background: transparent;
|
|
660
|
+
color: var(--elea-color-text-default);
|
|
661
|
+
}
|
|
662
|
+
.elea-markdown-editor__media {
|
|
663
|
+
margin: var(--elea-space-3) 0 0;
|
|
664
|
+
color: var(--elea-color-text-muted);
|
|
665
|
+
font-size: var(--elea-font-size-sm);
|
|
666
|
+
}
|
|
667
|
+
.elea-markdown-editor__media summary { cursor: pointer; }
|
|
668
|
+
}
|