wysio 0.0.1 → 0.2.0-alpha.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/CHANGELOG.md +25 -0
- package/LICENSE +21 -0
- package/README.md +241 -3
- package/dist/auto-init.d.ts +12 -0
- package/dist/auto-init.d.ts.map +1 -0
- package/dist/cdn-full.d.ts +3 -0
- package/dist/cdn-full.d.ts.map +1 -0
- package/dist/cdn.d.ts +2 -0
- package/dist/cdn.d.ts.map +1 -0
- package/dist/commands.d.ts +19 -0
- package/dist/commands.d.ts.map +1 -0
- package/dist/content.d.ts +31 -0
- package/dist/content.d.ts.map +1 -0
- package/dist/editor.d.ts +158 -0
- package/dist/editor.d.ts.map +1 -0
- package/dist/emitter.d.ts +9 -0
- package/dist/emitter.d.ts.map +1 -0
- package/dist/format-html.d.ts +7 -0
- package/dist/format-html.d.ts.map +1 -0
- package/dist/i18n.d.ts +16 -0
- package/dist/i18n.d.ts.map +1 -0
- package/dist/icons.d.ts +34 -0
- package/dist/icons.d.ts.map +1 -0
- package/dist/index.d.ts +17 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/locales/nl.d.ts +81 -0
- package/dist/locales/nl.d.ts.map +1 -0
- package/dist/markdown/index.d.ts +17 -0
- package/dist/markdown/index.d.ts.map +1 -0
- package/dist/markdown.js +179 -0
- package/dist/markdown.js.map +1 -0
- package/dist/messages.d.ts +83 -0
- package/dist/messages.d.ts.map +1 -0
- package/dist/plugin.d.ts +94 -0
- package/dist/plugin.d.ts.map +1 -0
- package/dist/plugins/alignment.d.ts +10 -0
- package/dist/plugins/alignment.d.ts.map +1 -0
- package/dist/plugins/base.d.ts +7 -0
- package/dist/plugins/base.d.ts.map +1 -0
- package/dist/plugins/blocks.d.ts +4 -0
- package/dist/plugins/blocks.d.ts.map +1 -0
- package/dist/plugins/clear-formatting.d.ts +10 -0
- package/dist/plugins/clear-formatting.d.ts.map +1 -0
- package/dist/plugins/color.d.ts +36 -0
- package/dist/plugins/color.d.ts.map +1 -0
- package/dist/plugins/heading.d.ts +3 -0
- package/dist/plugins/heading.d.ts.map +1 -0
- package/dist/plugins/history.d.ts +2 -0
- package/dist/plugins/history.d.ts.map +1 -0
- package/dist/plugins/image.d.ts +56 -0
- package/dist/plugins/image.d.ts.map +1 -0
- package/dist/plugins/index.d.ts +29 -0
- package/dist/plugins/index.d.ts.map +1 -0
- package/dist/plugins/link.d.ts +15 -0
- package/dist/plugins/link.d.ts.map +1 -0
- package/dist/plugins/lists.d.ts +2 -0
- package/dist/plugins/lists.d.ts.map +1 -0
- package/dist/plugins/marks.d.ts +7 -0
- package/dist/plugins/marks.d.ts.map +1 -0
- package/dist/plugins/paste.d.ts +9 -0
- package/dist/plugins/paste.d.ts.map +1 -0
- package/dist/plugins/placeholder.d.ts +3 -0
- package/dist/plugins/placeholder.d.ts.map +1 -0
- package/dist/plugins/source.d.ts +5 -0
- package/dist/plugins/source.d.ts.map +1 -0
- package/dist/plugins/table.d.ts +14 -0
- package/dist/plugins/table.d.ts.map +1 -0
- package/dist/registry-BfhH2s8N.js +19 -0
- package/dist/registry-BfhH2s8N.js.map +1 -0
- package/dist/registry.d.ts +10 -0
- package/dist/registry.d.ts.map +1 -0
- package/dist/schema.d.ts +5 -0
- package/dist/schema.d.ts.map +1 -0
- package/dist/style.css +824 -0
- package/dist/toolbar/toolbar.d.ts +56 -0
- package/dist/toolbar/toolbar.d.ts.map +1 -0
- package/dist/ui/menu.d.ts +20 -0
- package/dist/ui/menu.d.ts.map +1 -0
- package/dist/ui/popover.d.ts +29 -0
- package/dist/ui/popover.d.ts.map +1 -0
- package/dist/url.d.ts +23 -0
- package/dist/url.d.ts.map +1 -0
- package/dist/web-component.d.ts +21 -0
- package/dist/web-component.d.ts.map +1 -0
- package/dist/wysio.full.iife.js +72 -0
- package/dist/wysio.iife.js +49 -0
- package/dist/wysio.js +2668 -0
- package/dist/wysio.js.map +1 -0
- package/package.json +68 -6
- package/index.js +0 -1
package/dist/style.css
ADDED
|
@@ -0,0 +1,824 @@
|
|
|
1
|
+
/* Wysio Editor theme. Override any --wysio-* variable to customise. */
|
|
2
|
+
.wysio {
|
|
3
|
+
--wysio-font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
|
|
4
|
+
--wysio-font-size: 1rem;
|
|
5
|
+
--wysio-line-height: 1.6;
|
|
6
|
+
--wysio-radius: 8px;
|
|
7
|
+
--wysio-bg: #ffffff;
|
|
8
|
+
--wysio-fg: #1f2328;
|
|
9
|
+
--wysio-muted: #6e7781;
|
|
10
|
+
--wysio-border: #d0d7de;
|
|
11
|
+
--wysio-accent: #2563eb;
|
|
12
|
+
--wysio-focus-ring: color-mix(in srgb, var(--wysio-accent) 40%, transparent);
|
|
13
|
+
--wysio-toolbar-bg: #f6f8fa;
|
|
14
|
+
--wysio-tool-hover: rgb(0 0 0 / 0.06);
|
|
15
|
+
--wysio-tool-active-bg: color-mix(in srgb, var(--wysio-accent) 14%, transparent);
|
|
16
|
+
/* Darker than the accent so pressed menu items keep 4.5:1 text contrast. */
|
|
17
|
+
--wysio-tool-active-fg: #1d4ed8;
|
|
18
|
+
--wysio-button-primary-fg: #ffffff;
|
|
19
|
+
--wysio-code-bg: rgb(0 0 0 / 0.06);
|
|
20
|
+
--wysio-quote-border: #d0d7de;
|
|
21
|
+
--wysio-link: var(--wysio-accent);
|
|
22
|
+
--wysio-error: #cf222e;
|
|
23
|
+
--wysio-popover-bg: var(--wysio-bg);
|
|
24
|
+
--wysio-shadow: 0 8px 24px rgb(0 0 0 / 0.12);
|
|
25
|
+
--wysio-min-height: 10rem;
|
|
26
|
+
--wysio-padding: 0.75rem 1rem;
|
|
27
|
+
|
|
28
|
+
position: relative;
|
|
29
|
+
display: block;
|
|
30
|
+
font-family: var(--wysio-font-family);
|
|
31
|
+
font-size: var(--wysio-font-size);
|
|
32
|
+
line-height: var(--wysio-line-height);
|
|
33
|
+
color: var(--wysio-fg);
|
|
34
|
+
background: var(--wysio-bg);
|
|
35
|
+
border: 1px solid var(--wysio-border);
|
|
36
|
+
border-radius: var(--wysio-radius);
|
|
37
|
+
color-scheme: light;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.wysio[data-theme='dark'],
|
|
41
|
+
[data-theme='dark'] .wysio {
|
|
42
|
+
--wysio-bg: #0d1117;
|
|
43
|
+
--wysio-fg: #e6edf3;
|
|
44
|
+
--wysio-muted: #8b949e;
|
|
45
|
+
--wysio-border: #30363d;
|
|
46
|
+
--wysio-accent: #4493f8;
|
|
47
|
+
--wysio-tool-active-fg: #79b8ff;
|
|
48
|
+
/* Dark text: white on the lighter dark-mode accent is only about 3:1. */
|
|
49
|
+
--wysio-button-primary-fg: #0d1117;
|
|
50
|
+
--wysio-toolbar-bg: #161b22;
|
|
51
|
+
--wysio-tool-hover: rgb(255 255 255 / 0.08);
|
|
52
|
+
--wysio-code-bg: rgb(255 255 255 / 0.1);
|
|
53
|
+
--wysio-quote-border: #3d444d;
|
|
54
|
+
--wysio-error: #f85149;
|
|
55
|
+
--wysio-shadow: 0 8px 24px rgb(0 0 0 / 0.5);
|
|
56
|
+
color-scheme: dark;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
wysio-editor {
|
|
60
|
+
display: block;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.wysio:focus-within {
|
|
64
|
+
border-color: var(--wysio-accent);
|
|
65
|
+
box-shadow: 0 0 0 3px var(--wysio-focus-ring);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
/* Toolbar */
|
|
69
|
+
.wysio-toolbar {
|
|
70
|
+
position: relative;
|
|
71
|
+
display: flex;
|
|
72
|
+
flex-wrap: wrap;
|
|
73
|
+
align-items: center;
|
|
74
|
+
gap: 2px;
|
|
75
|
+
padding: 4px;
|
|
76
|
+
background: var(--wysio-toolbar-bg);
|
|
77
|
+
border-bottom: 1px solid var(--wysio-border);
|
|
78
|
+
border-radius: var(--wysio-radius) var(--wysio-radius) 0 0;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
.wysio-tool,
|
|
82
|
+
.wysio-select {
|
|
83
|
+
font: inherit;
|
|
84
|
+
font-size: 0.875rem;
|
|
85
|
+
color: inherit;
|
|
86
|
+
background: transparent;
|
|
87
|
+
border: 1px solid transparent;
|
|
88
|
+
border-radius: calc(var(--wysio-radius) - 2px);
|
|
89
|
+
height: 2rem;
|
|
90
|
+
cursor: pointer;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
.wysio-tool {
|
|
94
|
+
display: inline-flex;
|
|
95
|
+
align-items: center;
|
|
96
|
+
justify-content: center;
|
|
97
|
+
min-width: 2rem;
|
|
98
|
+
padding: 0 0.375rem;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
.wysio-glyph {
|
|
102
|
+
font-size: 1rem;
|
|
103
|
+
line-height: 1;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
.wysio-select {
|
|
107
|
+
padding: 0 0.5rem;
|
|
108
|
+
background: var(--wysio-bg);
|
|
109
|
+
border-color: var(--wysio-border);
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
.wysio-tool:hover {
|
|
113
|
+
background: var(--wysio-tool-hover);
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
.wysio-tool[aria-pressed='true'] {
|
|
117
|
+
background: var(--wysio-tool-active-bg);
|
|
118
|
+
color: var(--wysio-tool-active-fg);
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
.wysio-tool[aria-disabled='true'],
|
|
122
|
+
.wysio-select:disabled {
|
|
123
|
+
opacity: 0.4;
|
|
124
|
+
cursor: default;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
.wysio-tool[aria-disabled='true']:hover {
|
|
128
|
+
background: transparent;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
.wysio-tool:focus-visible,
|
|
132
|
+
.wysio-select:focus-visible,
|
|
133
|
+
.wysio-button:focus-visible,
|
|
134
|
+
.wysio-input:focus-visible {
|
|
135
|
+
outline: 2px solid var(--wysio-accent);
|
|
136
|
+
outline-offset: 1px;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
.wysio-separator {
|
|
140
|
+
width: 1px;
|
|
141
|
+
align-self: stretch;
|
|
142
|
+
margin: 4px 4px;
|
|
143
|
+
background: var(--wysio-border);
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
/* Editing area (includes the essentials of prosemirror-view/style/prosemirror.css) */
|
|
147
|
+
.wysio-content {
|
|
148
|
+
position: relative;
|
|
149
|
+
min-height: var(--wysio-min-height);
|
|
150
|
+
padding: var(--wysio-padding);
|
|
151
|
+
outline: none;
|
|
152
|
+
word-wrap: break-word;
|
|
153
|
+
white-space: pre-wrap;
|
|
154
|
+
white-space: break-spaces;
|
|
155
|
+
font-variant-ligatures: none;
|
|
156
|
+
font-feature-settings: 'liga' 0;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
.wysio-content pre {
|
|
160
|
+
white-space: pre-wrap;
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
.wysio-content li {
|
|
164
|
+
position: relative;
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
.ProseMirror-hideselection *::selection {
|
|
168
|
+
background: transparent;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
.ProseMirror-hideselection {
|
|
172
|
+
caret-color: transparent;
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
.ProseMirror [draggable][contenteditable='false'] {
|
|
176
|
+
user-select: text;
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
.ProseMirror-selectednode {
|
|
180
|
+
outline: 2px solid var(--wysio-accent);
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
.wysio-content > :first-child {
|
|
184
|
+
margin-top: 0;
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
.wysio-content > :last-child {
|
|
188
|
+
margin-bottom: 0;
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
.wysio-content p {
|
|
192
|
+
margin: 0 0 0.75em;
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
.wysio-content h1,
|
|
196
|
+
.wysio-content h2,
|
|
197
|
+
.wysio-content h3,
|
|
198
|
+
.wysio-content h4 {
|
|
199
|
+
line-height: 1.25;
|
|
200
|
+
margin: 1.25em 0 0.5em;
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
.wysio-content h1 {
|
|
204
|
+
font-size: 2em;
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
.wysio-content h2 {
|
|
208
|
+
font-size: 1.5em;
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
.wysio-content h3 {
|
|
212
|
+
font-size: 1.25em;
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
.wysio-content h4 {
|
|
216
|
+
font-size: 1em;
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
.wysio-content ul,
|
|
220
|
+
.wysio-content ol {
|
|
221
|
+
margin: 0 0 0.75em;
|
|
222
|
+
padding-left: 1.5em;
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
.wysio-content li > p {
|
|
226
|
+
margin: 0.125em 0;
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
.wysio-content blockquote {
|
|
230
|
+
margin: 0 0 0.75em;
|
|
231
|
+
padding-left: 1em;
|
|
232
|
+
border-left: 3px solid var(--wysio-quote-border);
|
|
233
|
+
color: var(--wysio-muted);
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
.wysio-content code {
|
|
237
|
+
font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
|
|
238
|
+
font-size: 0.875em;
|
|
239
|
+
padding: 0.1em 0.3em;
|
|
240
|
+
border-radius: 4px;
|
|
241
|
+
background: var(--wysio-code-bg);
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
.wysio-content a {
|
|
245
|
+
color: var(--wysio-link);
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
.wysio-content hr {
|
|
249
|
+
border: none;
|
|
250
|
+
border-top: 1px solid var(--wysio-border);
|
|
251
|
+
margin: 1.25em 0;
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
.wysio-content.ProseMirror-focused hr.ProseMirror-selectednode {
|
|
255
|
+
outline-offset: 4px;
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
.wysio-placeholder::before {
|
|
259
|
+
content: attr(data-placeholder);
|
|
260
|
+
position: absolute;
|
|
261
|
+
color: var(--wysio-muted);
|
|
262
|
+
pointer-events: none;
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
.wysio-content[contenteditable='false'] {
|
|
266
|
+
cursor: default;
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
/* Link popover */
|
|
270
|
+
.wysio-popover {
|
|
271
|
+
position: absolute;
|
|
272
|
+
z-index: 10;
|
|
273
|
+
top: 3rem;
|
|
274
|
+
left: 0.5rem;
|
|
275
|
+
width: min(22rem, calc(100% - 1rem));
|
|
276
|
+
padding: 0.75rem;
|
|
277
|
+
background: var(--wysio-popover-bg);
|
|
278
|
+
border: 1px solid var(--wysio-border);
|
|
279
|
+
border-radius: var(--wysio-radius);
|
|
280
|
+
box-shadow: var(--wysio-shadow);
|
|
281
|
+
font-size: 0.875rem;
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
.wysio-popover[hidden] {
|
|
285
|
+
display: none;
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
.wysio-popover form {
|
|
289
|
+
display: grid;
|
|
290
|
+
gap: 0.5rem;
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
.wysio-field {
|
|
294
|
+
font-weight: 600;
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
.wysio-input {
|
|
298
|
+
font: inherit;
|
|
299
|
+
color: inherit;
|
|
300
|
+
background: var(--wysio-bg);
|
|
301
|
+
border: 1px solid var(--wysio-border);
|
|
302
|
+
border-radius: calc(var(--wysio-radius) - 2px);
|
|
303
|
+
padding: 0.375rem 0.5rem;
|
|
304
|
+
}
|
|
305
|
+
|
|
306
|
+
.wysio-input[aria-invalid='true'] {
|
|
307
|
+
border-color: var(--wysio-error);
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
.wysio-error {
|
|
311
|
+
margin: 0;
|
|
312
|
+
color: var(--wysio-error);
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
.wysio-check {
|
|
316
|
+
display: flex;
|
|
317
|
+
align-items: center;
|
|
318
|
+
gap: 0.375rem;
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
.wysio-actions {
|
|
322
|
+
display: flex;
|
|
323
|
+
gap: 0.375rem;
|
|
324
|
+
justify-content: flex-end;
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
.wysio-button {
|
|
328
|
+
font: inherit;
|
|
329
|
+
color: inherit;
|
|
330
|
+
background: transparent;
|
|
331
|
+
border: 1px solid var(--wysio-border);
|
|
332
|
+
border-radius: calc(var(--wysio-radius) - 2px);
|
|
333
|
+
padding: 0.25rem 0.75rem;
|
|
334
|
+
cursor: pointer;
|
|
335
|
+
}
|
|
336
|
+
|
|
337
|
+
.wysio-button[hidden] {
|
|
338
|
+
display: none;
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
.wysio-button-primary {
|
|
342
|
+
background: var(--wysio-accent);
|
|
343
|
+
border-color: var(--wysio-accent);
|
|
344
|
+
color: var(--wysio-button-primary-fg);
|
|
345
|
+
}
|
|
346
|
+
|
|
347
|
+
/* Images */
|
|
348
|
+
.wysio-content img {
|
|
349
|
+
max-width: 100%;
|
|
350
|
+
height: auto;
|
|
351
|
+
vertical-align: bottom;
|
|
352
|
+
}
|
|
353
|
+
|
|
354
|
+
.wysio-content img.ProseMirror-selectednode {
|
|
355
|
+
outline: 2px solid var(--wysio-accent);
|
|
356
|
+
outline-offset: 2px;
|
|
357
|
+
}
|
|
358
|
+
|
|
359
|
+
.wysio-upload {
|
|
360
|
+
position: relative;
|
|
361
|
+
display: inline-block;
|
|
362
|
+
min-width: 4rem;
|
|
363
|
+
min-height: 3rem;
|
|
364
|
+
vertical-align: bottom;
|
|
365
|
+
background: var(--wysio-code-bg);
|
|
366
|
+
border-radius: 4px;
|
|
367
|
+
overflow: hidden;
|
|
368
|
+
}
|
|
369
|
+
|
|
370
|
+
.wysio-upload img {
|
|
371
|
+
display: block;
|
|
372
|
+
max-width: 100%;
|
|
373
|
+
max-height: 12rem;
|
|
374
|
+
opacity: 0.5;
|
|
375
|
+
}
|
|
376
|
+
|
|
377
|
+
.wysio-upload-bar {
|
|
378
|
+
position: absolute;
|
|
379
|
+
left: 0;
|
|
380
|
+
bottom: 0;
|
|
381
|
+
height: 3px;
|
|
382
|
+
width: calc(var(--wysio-progress, 0) * 100%);
|
|
383
|
+
background: var(--wysio-accent);
|
|
384
|
+
transition: width 0.2s;
|
|
385
|
+
}
|
|
386
|
+
|
|
387
|
+
.wysio-hint {
|
|
388
|
+
margin: 0;
|
|
389
|
+
color: var(--wysio-muted);
|
|
390
|
+
font-size: 0.8125rem;
|
|
391
|
+
}
|
|
392
|
+
|
|
393
|
+
.wysio-upload-row[hidden] {
|
|
394
|
+
display: none;
|
|
395
|
+
}
|
|
396
|
+
|
|
397
|
+
.wysio-content img.wysio-image-left {
|
|
398
|
+
float: left;
|
|
399
|
+
margin: 0.25em 1em 0.5em 0;
|
|
400
|
+
}
|
|
401
|
+
|
|
402
|
+
.wysio-content img.wysio-image-right {
|
|
403
|
+
float: right;
|
|
404
|
+
margin: 0.25em 0 0.5em 1em;
|
|
405
|
+
}
|
|
406
|
+
|
|
407
|
+
.wysio-content img.wysio-image-center {
|
|
408
|
+
display: block;
|
|
409
|
+
margin: 0.5em auto;
|
|
410
|
+
}
|
|
411
|
+
|
|
412
|
+
.wysio-content::after {
|
|
413
|
+
content: '';
|
|
414
|
+
display: table;
|
|
415
|
+
clear: both;
|
|
416
|
+
}
|
|
417
|
+
|
|
418
|
+
/* Tables */
|
|
419
|
+
.wysio-content table {
|
|
420
|
+
border-collapse: collapse;
|
|
421
|
+
table-layout: fixed;
|
|
422
|
+
width: 100%;
|
|
423
|
+
margin: 0 0 0.75em;
|
|
424
|
+
overflow: hidden;
|
|
425
|
+
}
|
|
426
|
+
|
|
427
|
+
.wysio-content td,
|
|
428
|
+
.wysio-content th {
|
|
429
|
+
position: relative;
|
|
430
|
+
min-width: 1em;
|
|
431
|
+
padding: 0.375em 0.5em;
|
|
432
|
+
border: 1px solid var(--wysio-border);
|
|
433
|
+
vertical-align: top;
|
|
434
|
+
box-sizing: border-box;
|
|
435
|
+
}
|
|
436
|
+
|
|
437
|
+
.wysio-content th {
|
|
438
|
+
font-weight: 600;
|
|
439
|
+
text-align: left;
|
|
440
|
+
background: var(--wysio-toolbar-bg);
|
|
441
|
+
}
|
|
442
|
+
|
|
443
|
+
.wysio-content td > p,
|
|
444
|
+
.wysio-content th > p {
|
|
445
|
+
margin: 0;
|
|
446
|
+
}
|
|
447
|
+
|
|
448
|
+
.wysio-content .selectedCell::after {
|
|
449
|
+
content: '';
|
|
450
|
+
position: absolute;
|
|
451
|
+
inset: 0;
|
|
452
|
+
background: color-mix(in srgb, var(--wysio-accent) 15%, transparent);
|
|
453
|
+
pointer-events: none;
|
|
454
|
+
}
|
|
455
|
+
|
|
456
|
+
.wysio-popover-table {
|
|
457
|
+
width: auto;
|
|
458
|
+
}
|
|
459
|
+
|
|
460
|
+
.wysio-table-grid {
|
|
461
|
+
display: grid;
|
|
462
|
+
/* 24px targets (WCAG 2.2 target size). */
|
|
463
|
+
grid-template-columns: repeat(10, 1.5rem);
|
|
464
|
+
gap: 2px;
|
|
465
|
+
}
|
|
466
|
+
|
|
467
|
+
.wysio-table-cell {
|
|
468
|
+
width: 1.5rem;
|
|
469
|
+
height: 1.5rem;
|
|
470
|
+
padding: 0;
|
|
471
|
+
border: 1px solid var(--wysio-border);
|
|
472
|
+
border-radius: 2px;
|
|
473
|
+
background: var(--wysio-bg);
|
|
474
|
+
cursor: pointer;
|
|
475
|
+
}
|
|
476
|
+
|
|
477
|
+
.wysio-table-cell.wysio-active {
|
|
478
|
+
background: var(--wysio-tool-active-bg);
|
|
479
|
+
border-color: var(--wysio-accent);
|
|
480
|
+
}
|
|
481
|
+
|
|
482
|
+
.wysio-table-cell:focus-visible {
|
|
483
|
+
outline: 2px solid var(--wysio-accent);
|
|
484
|
+
outline-offset: 1px;
|
|
485
|
+
}
|
|
486
|
+
|
|
487
|
+
.wysio-table-size {
|
|
488
|
+
margin: 0;
|
|
489
|
+
text-align: center;
|
|
490
|
+
color: var(--wysio-muted);
|
|
491
|
+
}
|
|
492
|
+
|
|
493
|
+
.wysio-table-picker[hidden],
|
|
494
|
+
.wysio-table-actions[hidden] {
|
|
495
|
+
display: none;
|
|
496
|
+
}
|
|
497
|
+
|
|
498
|
+
.wysio-table-picker {
|
|
499
|
+
display: grid;
|
|
500
|
+
gap: 0.5rem;
|
|
501
|
+
}
|
|
502
|
+
|
|
503
|
+
.wysio-table-actions {
|
|
504
|
+
display: grid;
|
|
505
|
+
min-width: 13rem;
|
|
506
|
+
}
|
|
507
|
+
|
|
508
|
+
.wysio-menu-item {
|
|
509
|
+
display: flex;
|
|
510
|
+
align-items: center;
|
|
511
|
+
gap: 0.5rem;
|
|
512
|
+
font: inherit;
|
|
513
|
+
color: inherit;
|
|
514
|
+
text-align: left;
|
|
515
|
+
background: transparent;
|
|
516
|
+
border: none;
|
|
517
|
+
border-radius: 4px;
|
|
518
|
+
padding: 0.375rem 0.5rem;
|
|
519
|
+
cursor: pointer;
|
|
520
|
+
}
|
|
521
|
+
|
|
522
|
+
.wysio-menu-item:hover:not(:disabled) {
|
|
523
|
+
background: var(--wysio-tool-hover);
|
|
524
|
+
}
|
|
525
|
+
|
|
526
|
+
.wysio-menu-item:disabled {
|
|
527
|
+
opacity: 0.4;
|
|
528
|
+
cursor: default;
|
|
529
|
+
}
|
|
530
|
+
|
|
531
|
+
.wysio-menu-item:focus-visible {
|
|
532
|
+
outline: 2px solid var(--wysio-accent);
|
|
533
|
+
outline-offset: -2px;
|
|
534
|
+
}
|
|
535
|
+
|
|
536
|
+
/* Gap and drop cursor */
|
|
537
|
+
.wysio-content .ProseMirror-gapcursor {
|
|
538
|
+
display: none;
|
|
539
|
+
position: absolute;
|
|
540
|
+
pointer-events: none;
|
|
541
|
+
}
|
|
542
|
+
|
|
543
|
+
.wysio-content .ProseMirror-gapcursor::after {
|
|
544
|
+
content: '';
|
|
545
|
+
display: block;
|
|
546
|
+
position: absolute;
|
|
547
|
+
top: -2px;
|
|
548
|
+
width: 20px;
|
|
549
|
+
border-top: 1px solid var(--wysio-fg);
|
|
550
|
+
animation: wysio-gapcursor-blink 1.1s steps(2, start) infinite;
|
|
551
|
+
}
|
|
552
|
+
|
|
553
|
+
@keyframes wysio-gapcursor-blink {
|
|
554
|
+
to {
|
|
555
|
+
visibility: hidden;
|
|
556
|
+
}
|
|
557
|
+
}
|
|
558
|
+
|
|
559
|
+
.wysio-content.ProseMirror-focused .ProseMirror-gapcursor {
|
|
560
|
+
display: block;
|
|
561
|
+
}
|
|
562
|
+
|
|
563
|
+
.wysio-dropcursor {
|
|
564
|
+
background: var(--wysio-accent);
|
|
565
|
+
}
|
|
566
|
+
|
|
567
|
+
/* Alignment (also needed on pages that display the content) */
|
|
568
|
+
.wysio-content .wysio-align-center,
|
|
569
|
+
.wysio-align-center {
|
|
570
|
+
text-align: center;
|
|
571
|
+
}
|
|
572
|
+
|
|
573
|
+
.wysio-content .wysio-align-right,
|
|
574
|
+
.wysio-align-right {
|
|
575
|
+
text-align: right;
|
|
576
|
+
}
|
|
577
|
+
|
|
578
|
+
.wysio-content .wysio-align-justify,
|
|
579
|
+
.wysio-align-justify {
|
|
580
|
+
text-align: justify;
|
|
581
|
+
}
|
|
582
|
+
|
|
583
|
+
/* Highlight */
|
|
584
|
+
.wysio-content mark {
|
|
585
|
+
color: inherit;
|
|
586
|
+
padding: 0 0.1em;
|
|
587
|
+
border-radius: 2px;
|
|
588
|
+
}
|
|
589
|
+
|
|
590
|
+
/* Menus and palettes */
|
|
591
|
+
.wysio-menu {
|
|
592
|
+
display: grid;
|
|
593
|
+
min-width: 12rem;
|
|
594
|
+
}
|
|
595
|
+
|
|
596
|
+
.wysio-menu-item[aria-pressed='true'] {
|
|
597
|
+
background: var(--wysio-tool-active-bg);
|
|
598
|
+
color: var(--wysio-tool-active-fg);
|
|
599
|
+
}
|
|
600
|
+
|
|
601
|
+
.wysio-popover:has(.wysio-palette),
|
|
602
|
+
.wysio-popover:has(.wysio-menu) {
|
|
603
|
+
width: auto;
|
|
604
|
+
}
|
|
605
|
+
|
|
606
|
+
.wysio-palette {
|
|
607
|
+
display: grid;
|
|
608
|
+
grid-template-columns: repeat(4, 2rem);
|
|
609
|
+
gap: 0.375rem;
|
|
610
|
+
margin-bottom: 0.5rem;
|
|
611
|
+
}
|
|
612
|
+
|
|
613
|
+
.wysio-swatch {
|
|
614
|
+
width: 2rem;
|
|
615
|
+
height: 2rem;
|
|
616
|
+
padding: 0;
|
|
617
|
+
font: inherit;
|
|
618
|
+
font-weight: 700;
|
|
619
|
+
border: 1px solid var(--wysio-border);
|
|
620
|
+
border-radius: 6px;
|
|
621
|
+
cursor: pointer;
|
|
622
|
+
}
|
|
623
|
+
|
|
624
|
+
.wysio-swatch-text {
|
|
625
|
+
color: var(--wysio-swatch);
|
|
626
|
+
background: var(--wysio-bg);
|
|
627
|
+
}
|
|
628
|
+
|
|
629
|
+
.wysio-swatch-background {
|
|
630
|
+
background: var(--wysio-swatch);
|
|
631
|
+
}
|
|
632
|
+
|
|
633
|
+
.wysio-swatch[aria-pressed='true'] {
|
|
634
|
+
outline: 2px solid var(--wysio-accent);
|
|
635
|
+
outline-offset: 1px;
|
|
636
|
+
}
|
|
637
|
+
|
|
638
|
+
.wysio-swatch:focus-visible {
|
|
639
|
+
outline: 2px solid var(--wysio-accent);
|
|
640
|
+
outline-offset: 2px;
|
|
641
|
+
}
|
|
642
|
+
|
|
643
|
+
.wysio-palette-remove {
|
|
644
|
+
width: 100%;
|
|
645
|
+
}
|
|
646
|
+
|
|
647
|
+
/* Default palettes (also needed on pages that display the content) */
|
|
648
|
+
.wysio-color-gray {
|
|
649
|
+
color: #868e96;
|
|
650
|
+
}
|
|
651
|
+
.wysio-color-red {
|
|
652
|
+
color: #e03131;
|
|
653
|
+
}
|
|
654
|
+
.wysio-color-orange {
|
|
655
|
+
color: #e8590c;
|
|
656
|
+
}
|
|
657
|
+
.wysio-color-green {
|
|
658
|
+
color: #2f9e44;
|
|
659
|
+
}
|
|
660
|
+
.wysio-color-teal {
|
|
661
|
+
color: #0c8599;
|
|
662
|
+
}
|
|
663
|
+
.wysio-color-blue {
|
|
664
|
+
color: #1971c2;
|
|
665
|
+
}
|
|
666
|
+
.wysio-color-violet {
|
|
667
|
+
color: #6741d9;
|
|
668
|
+
}
|
|
669
|
+
.wysio-color-pink {
|
|
670
|
+
color: #c2255c;
|
|
671
|
+
}
|
|
672
|
+
.wysio-highlight-yellow {
|
|
673
|
+
background-color: #ffec99;
|
|
674
|
+
}
|
|
675
|
+
.wysio-highlight-green {
|
|
676
|
+
background-color: #b2f2bb;
|
|
677
|
+
}
|
|
678
|
+
.wysio-highlight-blue {
|
|
679
|
+
background-color: #a5d8ff;
|
|
680
|
+
}
|
|
681
|
+
.wysio-highlight-pink {
|
|
682
|
+
background-color: #fcc2d7;
|
|
683
|
+
}
|
|
684
|
+
.wysio-highlight-orange {
|
|
685
|
+
background-color: #ffd8a8;
|
|
686
|
+
}
|
|
687
|
+
.wysio-highlight-violet {
|
|
688
|
+
background-color: #d0bfff;
|
|
689
|
+
}
|
|
690
|
+
.wysio-highlight-red {
|
|
691
|
+
background-color: #ffc9c9;
|
|
692
|
+
}
|
|
693
|
+
.wysio-highlight-gray {
|
|
694
|
+
background-color: #e9ecef;
|
|
695
|
+
}
|
|
696
|
+
|
|
697
|
+
/* Source view */
|
|
698
|
+
.wysio-source {
|
|
699
|
+
display: block;
|
|
700
|
+
box-sizing: border-box;
|
|
701
|
+
width: 100%;
|
|
702
|
+
min-height: var(--wysio-min-height);
|
|
703
|
+
padding: var(--wysio-padding);
|
|
704
|
+
font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
|
|
705
|
+
font-size: 0.8125rem;
|
|
706
|
+
line-height: 1.5;
|
|
707
|
+
color: var(--wysio-fg);
|
|
708
|
+
background: var(--wysio-bg);
|
|
709
|
+
border: none;
|
|
710
|
+
border-radius: 0 0 var(--wysio-radius) var(--wysio-radius);
|
|
711
|
+
outline: none;
|
|
712
|
+
resize: vertical;
|
|
713
|
+
tab-size: 2;
|
|
714
|
+
white-space: pre-wrap;
|
|
715
|
+
overflow-wrap: anywhere;
|
|
716
|
+
overflow: auto;
|
|
717
|
+
}
|
|
718
|
+
|
|
719
|
+
.wysio-source[hidden],
|
|
720
|
+
.wysio-body[hidden] {
|
|
721
|
+
display: none;
|
|
722
|
+
}
|
|
723
|
+
|
|
724
|
+
/* Toolbar: overflow ("More") and sticky */
|
|
725
|
+
.wysio-toolbar[data-mode='overflow'] {
|
|
726
|
+
flex-wrap: nowrap;
|
|
727
|
+
}
|
|
728
|
+
|
|
729
|
+
.wysio-toolbar > * {
|
|
730
|
+
flex-shrink: 0;
|
|
731
|
+
}
|
|
732
|
+
|
|
733
|
+
.wysio-toolbar-panel {
|
|
734
|
+
position: absolute;
|
|
735
|
+
z-index: 3;
|
|
736
|
+
top: 100%;
|
|
737
|
+
right: 4px;
|
|
738
|
+
display: flex;
|
|
739
|
+
flex-wrap: wrap;
|
|
740
|
+
align-items: center;
|
|
741
|
+
gap: 2px;
|
|
742
|
+
max-width: min(22rem, calc(100% - 8px));
|
|
743
|
+
margin-top: 4px;
|
|
744
|
+
padding: 4px;
|
|
745
|
+
background: var(--wysio-toolbar-bg);
|
|
746
|
+
border: 1px solid var(--wysio-border);
|
|
747
|
+
border-radius: var(--wysio-radius);
|
|
748
|
+
box-shadow: var(--wysio-shadow);
|
|
749
|
+
}
|
|
750
|
+
|
|
751
|
+
.wysio-toolbar-panel[hidden],
|
|
752
|
+
.wysio-more[hidden] {
|
|
753
|
+
display: none;
|
|
754
|
+
}
|
|
755
|
+
|
|
756
|
+
.wysio-toolbar-panel > .wysio-separator:first-child {
|
|
757
|
+
display: none;
|
|
758
|
+
}
|
|
759
|
+
|
|
760
|
+
.wysio-more {
|
|
761
|
+
margin-left: auto;
|
|
762
|
+
}
|
|
763
|
+
|
|
764
|
+
.wysio-more[aria-expanded='true'] {
|
|
765
|
+
background: var(--wysio-tool-active-bg);
|
|
766
|
+
}
|
|
767
|
+
|
|
768
|
+
.wysio-sticky > .wysio-toolbar {
|
|
769
|
+
position: sticky;
|
|
770
|
+
top: var(--wysio-sticky-top, 0px);
|
|
771
|
+
z-index: 2;
|
|
772
|
+
}
|
|
773
|
+
|
|
774
|
+
.wysio-icon {
|
|
775
|
+
display: inline-flex;
|
|
776
|
+
}
|
|
777
|
+
|
|
778
|
+
.wysio-caret {
|
|
779
|
+
margin-left: 1px;
|
|
780
|
+
opacity: 0.7;
|
|
781
|
+
}
|
|
782
|
+
|
|
783
|
+
.wysio-tool[aria-expanded='true'] {
|
|
784
|
+
background: var(--wysio-tool-hover);
|
|
785
|
+
}
|
|
786
|
+
|
|
787
|
+
/* Accessibility: reduced motion and forced colours (Windows high contrast) */
|
|
788
|
+
@media (prefers-reduced-motion: reduce) {
|
|
789
|
+
.wysio-content .ProseMirror-gapcursor::after {
|
|
790
|
+
animation: none;
|
|
791
|
+
}
|
|
792
|
+
|
|
793
|
+
.wysio-upload-bar {
|
|
794
|
+
transition: none;
|
|
795
|
+
}
|
|
796
|
+
}
|
|
797
|
+
|
|
798
|
+
@media (forced-colors: active) {
|
|
799
|
+
/* Backgrounds are removed in forced colours: show states with outlines instead. */
|
|
800
|
+
.wysio-tool[aria-pressed='true'],
|
|
801
|
+
.wysio-tool[aria-expanded='true'],
|
|
802
|
+
.wysio-menu-item[aria-pressed='true'],
|
|
803
|
+
.wysio-table-cell.wysio-active,
|
|
804
|
+
.wysio-swatch[aria-pressed='true'] {
|
|
805
|
+
outline: 2px solid Highlight;
|
|
806
|
+
outline-offset: -2px;
|
|
807
|
+
}
|
|
808
|
+
|
|
809
|
+
.wysio-swatch {
|
|
810
|
+
forced-color-adjust: none;
|
|
811
|
+
}
|
|
812
|
+
|
|
813
|
+
.wysio-separator,
|
|
814
|
+
.wysio-upload-bar,
|
|
815
|
+
.wysio-content .selectedCell::after {
|
|
816
|
+
background: Highlight;
|
|
817
|
+
}
|
|
818
|
+
|
|
819
|
+
.wysio-tool[aria-disabled='true'],
|
|
820
|
+
.wysio-select:disabled,
|
|
821
|
+
.wysio-menu-item:disabled {
|
|
822
|
+
color: GrayText;
|
|
823
|
+
}
|
|
824
|
+
}
|