@openleaf-editor/ui 0.1.0-beta.2 → 0.1.0-beta.3
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/README.md +85 -0
- package/dist/block-type.d.ts +5 -0
- package/dist/block-type.d.ts.map +1 -0
- package/dist/block-type.js +133 -0
- package/dist/block-type.js.map +1 -0
- package/dist/content-css.d.ts +18 -0
- package/dist/content-css.d.ts.map +1 -1
- package/dist/content-css.js +231 -16
- package/dist/content-css.js.map +1 -1
- package/dist/css.d.ts +23 -0
- package/dist/css.d.ts.map +1 -0
- package/dist/css.js +813 -0
- package/dist/css.js.map +1 -0
- package/dist/dialog.d.ts +93 -0
- package/dist/dialog.d.ts.map +1 -1
- package/dist/dialog.js +414 -86
- package/dist/dialog.js.map +1 -1
- package/dist/floating.d.ts +4 -0
- package/dist/floating.d.ts.map +1 -1
- package/dist/floating.js +50 -2
- package/dist/floating.js.map +1 -1
- package/dist/help.d.ts +1 -1
- package/dist/help.d.ts.map +1 -1
- package/dist/help.js +29 -5
- package/dist/help.js.map +1 -1
- package/dist/i18n.d.ts +8 -0
- package/dist/i18n.d.ts.map +1 -1
- package/dist/i18n.js +32 -7
- package/dist/i18n.js.map +1 -1
- package/dist/icons.d.ts +7 -1
- package/dist/icons.d.ts.map +1 -1
- package/dist/icons.js +6 -2
- package/dist/icons.js.map +1 -1
- package/dist/index.d.ts +10 -8
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +8 -6
- package/dist/index.js.map +1 -1
- package/dist/items.d.ts +0 -1
- package/dist/items.d.ts.map +1 -1
- package/dist/items.js +226 -20
- package/dist/items.js.map +1 -1
- package/dist/live.d.ts +42 -0
- package/dist/live.d.ts.map +1 -0
- package/dist/live.js +83 -0
- package/dist/live.js.map +1 -0
- package/dist/menu.d.ts +31 -2
- package/dist/menu.d.ts.map +1 -1
- package/dist/menu.js +163 -23
- package/dist/menu.js.map +1 -1
- package/dist/openleaf.css +114 -12
- package/dist/overflow.d.ts +31 -4
- package/dist/overflow.d.ts.map +1 -1
- package/dist/overflow.js +267 -82
- package/dist/overflow.js.map +1 -1
- package/dist/registry.d.ts +72 -18
- package/dist/registry.d.ts.map +1 -1
- package/dist/registry.js +7 -6
- package/dist/registry.js.map +1 -1
- package/dist/skins.d.ts.map +1 -1
- package/dist/skins.js +48 -14
- package/dist/skins.js.map +1 -1
- package/dist/styles.d.ts +61 -1
- package/dist/styles.d.ts.map +1 -1
- package/dist/styles.js +77 -637
- package/dist/styles.js.map +1 -1
- package/dist/testing.d.ts +3 -0
- package/dist/testing.d.ts.map +1 -0
- package/dist/testing.js +3 -0
- package/dist/testing.js.map +1 -0
- package/dist/toolbar.d.ts +71 -12
- package/dist/toolbar.d.ts.map +1 -1
- package/dist/toolbar.js +410 -166
- package/dist/toolbar.js.map +1 -1
- package/dist/upload.d.ts +11 -0
- package/dist/upload.d.ts.map +1 -1
- package/dist/upload.js +15 -1
- package/dist/upload.js.map +1 -1
- package/package.json +17 -3
package/dist/items.js
CHANGED
|
@@ -6,21 +6,112 @@
|
|
|
6
6
|
* document, that knowledge belongs in `@openleaf-editor/core` where a keyboard
|
|
7
7
|
* shortcut and a test can reach it too.
|
|
8
8
|
*/
|
|
9
|
-
import { activeLink,
|
|
9
|
+
import { activeFontFamily, activeFontSize, activeLineHeight, activeLink, FONT_FAMILIES, FONT_SIZE_PRESETS, indent, insertHorizontalRule, insertImage, isMarkActive, isNodeActive, LINE_HEIGHT_PRESETS, outdent, redo, safeFontFamily, selectedImage, setFontFamily, setFontSize, setLineHeight, setLink, toggleBlockquote, toggleBold, toggleBulletList, toggleCodeBlock, toggleInlineCode, toggleItalic, toggleOrderedList, toggleStrike, toggleTextAlign, toggleUnderline, undo, unsetLink, updateImage, } from '@openleaf-editor/core';
|
|
10
|
+
import { TextSelection } from 'prosemirror-state';
|
|
10
11
|
import { promptForImage, promptForLink } from './dialog.js';
|
|
11
12
|
import { promptHelp } from './help.js';
|
|
12
|
-
import { registerToolbarItem } from './registry.js';
|
|
13
|
+
import { getToolbarItem, registerToolbarItem } from './registry.js';
|
|
13
14
|
import { imageUploaderFor, runUploader } from './upload.js';
|
|
15
|
+
import { blockTypeControl } from './block-type.js';
|
|
14
16
|
/** Event the host listens for to switch between rich and source views. */
|
|
15
17
|
export const SOURCE_TOGGLE_EVENT = 'openleaf:toggle-source';
|
|
16
18
|
export const FULLSCREEN_TOGGLE_EVENT = 'openleaf:toggle-fullscreen';
|
|
17
19
|
export const VISUAL_AIDS_TOGGLE_EVENT = 'openleaf:toggle-visual-aids';
|
|
18
|
-
|
|
20
|
+
const alignCache = new WeakMap();
|
|
21
|
+
/**
|
|
22
|
+
* One selection walk per state, shared by every alignment button on every bar.
|
|
23
|
+
*
|
|
24
|
+
* Each of the four buttons used to answer `isEnabled` by dry-running its own
|
|
25
|
+
* command, and `toggleTextAlign` walks the selection twice on its own -- twelve
|
|
26
|
+
* identical walks of every selected block, per transaction, per toolbar. With
|
|
27
|
+
* two bars and two floating bars over a Select-All on a hundred-page document
|
|
28
|
+
* that was ~48,000 wasted node visits inside `dispatchTransaction`.
|
|
29
|
+
*
|
|
30
|
+
* Keyed on the state, so the second, third and fourth toolbar reading the same
|
|
31
|
+
* transaction pay nothing. Membership is "carries an align attribute", exactly
|
|
32
|
+
* as core decides it, so a plugin block that opts in still works.
|
|
33
|
+
*/
|
|
34
|
+
function alignFacts(state) {
|
|
35
|
+
const hit = alignCache.get(state);
|
|
36
|
+
if (hit)
|
|
37
|
+
return hit;
|
|
38
|
+
let any = false;
|
|
39
|
+
let mixed = false;
|
|
40
|
+
let align = null;
|
|
41
|
+
const { from, to } = state.selection;
|
|
42
|
+
state.doc.nodesBetween(from, to, (node) => {
|
|
43
|
+
if (!node.isTextblock)
|
|
44
|
+
return true;
|
|
45
|
+
if (Object.hasOwn(node.attrs, 'align')) {
|
|
46
|
+
const value = node.attrs['align'] ?? null;
|
|
47
|
+
if (!any) {
|
|
48
|
+
any = true;
|
|
49
|
+
align = value;
|
|
50
|
+
}
|
|
51
|
+
else if (value !== align) {
|
|
52
|
+
// Mixed reports null, like core: showing the first block's value as the
|
|
53
|
+
// state of all of them is a lie the author acts on.
|
|
54
|
+
mixed = true;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
return false;
|
|
58
|
+
});
|
|
59
|
+
const facts = { any, align: mixed ? null : align };
|
|
60
|
+
alignCache.set(state, facts);
|
|
61
|
+
return facts;
|
|
62
|
+
}
|
|
19
63
|
/** Register the built-in items. Idempotent. */
|
|
64
|
+
/**
|
|
65
|
+
* The span of the link the caret sits in, or null when it is not in one.
|
|
66
|
+
*
|
|
67
|
+
* `setLink` and `unsetLink` both refuse an empty selection, which is right --
|
|
68
|
+
* there is nothing to mark. But an author who right-clicks a link, or puts the
|
|
69
|
+
* caret in one and presses the toolbar button, means "this link", and the range
|
|
70
|
+
* of a mark is something only the document can answer.
|
|
71
|
+
*/
|
|
72
|
+
function linkRange(state) {
|
|
73
|
+
const type = state.schema.marks['link'];
|
|
74
|
+
if (!type || !state.selection.empty)
|
|
75
|
+
return null;
|
|
76
|
+
const $pos = state.selection.$from;
|
|
77
|
+
const mark = type.isInSet($pos.marks());
|
|
78
|
+
if (!mark)
|
|
79
|
+
return null;
|
|
80
|
+
const parent = $pos.parent;
|
|
81
|
+
let start = $pos.index();
|
|
82
|
+
let end = $pos.indexAfter();
|
|
83
|
+
while (start > 0 && mark.isInSet(parent.child(start - 1).marks))
|
|
84
|
+
start -= 1;
|
|
85
|
+
while (end < parent.childCount && mark.isInSet(parent.child(end).marks))
|
|
86
|
+
end += 1;
|
|
87
|
+
let from = $pos.start();
|
|
88
|
+
for (let i = 0; i < start; i += 1)
|
|
89
|
+
from += parent.child(i).nodeSize;
|
|
90
|
+
let to = from;
|
|
91
|
+
for (let i = start; i < end; i += 1)
|
|
92
|
+
to += parent.child(i).nodeSize;
|
|
93
|
+
return { from, to };
|
|
94
|
+
}
|
|
95
|
+
/** Widen a caret inside a link to cover the whole link, so a command can act. */
|
|
96
|
+
function selectLink(view) {
|
|
97
|
+
const range = linkRange(view.state);
|
|
98
|
+
if (!range)
|
|
99
|
+
return;
|
|
100
|
+
view.dispatch(view.state.tr.setSelection(TextSelection.create(view.state.doc, range.from, range.to)));
|
|
101
|
+
}
|
|
20
102
|
export function registerDefaultItems() {
|
|
21
|
-
if (
|
|
103
|
+
if (getToolbarItem('undo') && getToolbarItem('blockType') && getToolbarItem('source'))
|
|
22
104
|
return;
|
|
23
|
-
|
|
105
|
+
registerToolbarItem({
|
|
106
|
+
id: 'blockType',
|
|
107
|
+
// `custom`, not `select`: it builds its own DOM because it carries formats
|
|
108
|
+
// the host injects at mount time. `type: 'select'` is the declarative
|
|
109
|
+
// contract for a fixed preset list, which this is not.
|
|
110
|
+
type: 'custom',
|
|
111
|
+
kind: 'action',
|
|
112
|
+
label: 'Paragraph style',
|
|
113
|
+
render: ({ view, host, formats }) => blockTypeControl(view, host, formats ?? []),
|
|
114
|
+
});
|
|
24
115
|
registerToolbarItem({
|
|
25
116
|
id: 'undo',
|
|
26
117
|
type: 'button',
|
|
@@ -70,6 +161,49 @@ export function registerDefaultItems() {
|
|
|
70
161
|
shortcut: item.label,
|
|
71
162
|
});
|
|
72
163
|
}
|
|
164
|
+
/* ---- typography ----
|
|
165
|
+
Preset selects over core's font / size / line-height commands. The schema
|
|
166
|
+
already models these so inherited HTML stays editable; these controls are
|
|
167
|
+
the chrome that was missing from the default bar. */
|
|
168
|
+
registerToolbarItem({
|
|
169
|
+
id: 'fontFamily',
|
|
170
|
+
type: 'select',
|
|
171
|
+
label: 'Font family',
|
|
172
|
+
selectMod: 'wide',
|
|
173
|
+
options: [
|
|
174
|
+
{ value: '', label: 'Default' },
|
|
175
|
+
// Option values are the validated spelling the schema stores (quoted when
|
|
176
|
+
// the name has a space), so getValue can match them after a round-trip.
|
|
177
|
+
...FONT_FAMILIES.map((family) => ({
|
|
178
|
+
value: safeFontFamily(family) ?? family,
|
|
179
|
+
label: family,
|
|
180
|
+
})),
|
|
181
|
+
],
|
|
182
|
+
getValue: (state) => activeFontFamily(state) ?? '',
|
|
183
|
+
applyValue: (value) => setFontFamily(value === '' ? null : value),
|
|
184
|
+
});
|
|
185
|
+
registerToolbarItem({
|
|
186
|
+
id: 'fontSize',
|
|
187
|
+
type: 'select',
|
|
188
|
+
label: 'Font size',
|
|
189
|
+
options: [
|
|
190
|
+
{ value: '', label: 'Default' },
|
|
191
|
+
...FONT_SIZE_PRESETS.map((px) => ({ value: `${px}px`, label: String(px) })),
|
|
192
|
+
],
|
|
193
|
+
getValue: (state) => activeFontSize(state) ?? '',
|
|
194
|
+
applyValue: (value) => setFontSize(value === '' ? null : value),
|
|
195
|
+
});
|
|
196
|
+
registerToolbarItem({
|
|
197
|
+
id: 'lineHeight',
|
|
198
|
+
type: 'select',
|
|
199
|
+
label: 'Line height',
|
|
200
|
+
options: [
|
|
201
|
+
{ value: '', label: 'Default' },
|
|
202
|
+
...LINE_HEIGHT_PRESETS.map((value) => ({ value, label: value })),
|
|
203
|
+
],
|
|
204
|
+
getValue: (state) => activeLineHeight(state) ?? '',
|
|
205
|
+
applyValue: (value) => setLineHeight(value === '' ? null : value),
|
|
206
|
+
});
|
|
73
207
|
/* ---- block structure ----
|
|
74
208
|
These get toggle semantics too. A blockquote or a list is a state the
|
|
75
209
|
cursor is either in or not, exactly like bold, and leaving them as plain
|
|
@@ -135,10 +269,32 @@ export function registerDefaultItems() {
|
|
|
135
269
|
label: item.label,
|
|
136
270
|
icon: item.icon,
|
|
137
271
|
command: toggleTextAlign(item.align),
|
|
138
|
-
|
|
272
|
+
// Both predicates come off one cached walk. Without the explicit
|
|
273
|
+
// isEnabled the toolbar dry-runs `command`, and toggleTextAlign walks the
|
|
274
|
+
// selection twice on its own -- see alignFacts.
|
|
275
|
+
isEnabled: (state) => alignFacts(state).any,
|
|
276
|
+
isActive: (state) => alignFacts(state).align === item.align,
|
|
139
277
|
shortcut: item.label,
|
|
140
278
|
});
|
|
141
279
|
}
|
|
280
|
+
registerToolbarItem({
|
|
281
|
+
id: 'indent',
|
|
282
|
+
type: 'button',
|
|
283
|
+
kind: 'action',
|
|
284
|
+
label: 'Indent',
|
|
285
|
+
icon: 'indent',
|
|
286
|
+
command: indent,
|
|
287
|
+
shortcut: 'Indent',
|
|
288
|
+
});
|
|
289
|
+
registerToolbarItem({
|
|
290
|
+
id: 'outdent',
|
|
291
|
+
type: 'button',
|
|
292
|
+
kind: 'action',
|
|
293
|
+
label: 'Outdent',
|
|
294
|
+
icon: 'outdent',
|
|
295
|
+
command: outdent,
|
|
296
|
+
shortcut: 'Outdent',
|
|
297
|
+
});
|
|
142
298
|
/* ---- insertions ---- */
|
|
143
299
|
registerToolbarItem({
|
|
144
300
|
id: 'link',
|
|
@@ -146,16 +302,26 @@ export function registerDefaultItems() {
|
|
|
146
302
|
kind: 'toggle',
|
|
147
303
|
label: 'Link',
|
|
148
304
|
icon: 'link',
|
|
149
|
-
//
|
|
150
|
-
//
|
|
151
|
-
|
|
305
|
+
// A selection to attach the link to, or a caret already inside one. Those
|
|
306
|
+
// two used to disagree: `isActive` said "in a link" while `isEnabled` said
|
|
307
|
+
// "there is a selection", so right-clicking a link -- which places a
|
|
308
|
+
// COLLAPSED caret -- rendered a control that was aria-pressed and
|
|
309
|
+
// aria-disabled at once and refused the click. The context menu built for
|
|
310
|
+
// exactly that gesture could therefore never edit a link, and the "Edit
|
|
311
|
+
// link" dialog title was unreachable.
|
|
312
|
+
isEnabled: (state) => !state.selection.empty || linkRange(state) !== null,
|
|
152
313
|
isActive: (state) => activeLink(state) !== null,
|
|
153
314
|
run: ({ view, host }) => {
|
|
315
|
+
selectLink(view);
|
|
154
316
|
const existing = activeLink(view.state);
|
|
317
|
+
// All five modelled attrs: dropping `rel`/`id` here is how Save used to
|
|
318
|
+
// wipe them even when the author changed nothing (#108).
|
|
155
319
|
void promptForLink(host.ownerDocument, {
|
|
156
320
|
href: existing?.['href'] ?? '',
|
|
157
321
|
title: existing?.['title'] ?? null,
|
|
158
322
|
target: existing?.['target'] ?? null,
|
|
323
|
+
rel: existing?.['rel'] ?? null,
|
|
324
|
+
id: existing?.['id'] ?? null,
|
|
159
325
|
}, host).then((result) => {
|
|
160
326
|
if (!result) {
|
|
161
327
|
view.focus();
|
|
@@ -172,7 +338,12 @@ export function registerDefaultItems() {
|
|
|
172
338
|
kind: 'action',
|
|
173
339
|
label: 'Remove link',
|
|
174
340
|
icon: 'unlink',
|
|
175
|
-
|
|
341
|
+
isEnabled: (state) => unsetLink(state) || linkRange(state) !== null,
|
|
342
|
+
run: ({ view }) => {
|
|
343
|
+
selectLink(view);
|
|
344
|
+
unsetLink(view.state, view.dispatch, view);
|
|
345
|
+
view.focus();
|
|
346
|
+
},
|
|
176
347
|
});
|
|
177
348
|
registerToolbarItem({
|
|
178
349
|
id: 'image',
|
|
@@ -180,20 +351,40 @@ export function registerDefaultItems() {
|
|
|
180
351
|
kind: 'action',
|
|
181
352
|
label: 'Insert image',
|
|
182
353
|
icon: 'image',
|
|
354
|
+
// Insert and edit are the same control, as they are for media: a separate
|
|
355
|
+
// "image properties" item is one the author has to discover, and without
|
|
356
|
+
// it there is no way to revise alt text after insert.
|
|
357
|
+
labelFor: (state) => (selectedImage(state) ? 'Edit image' : 'Insert image'),
|
|
183
358
|
run: ({ view, host }) => {
|
|
184
359
|
// One item, two dialogs, decided by whether this page can upload. A file
|
|
185
360
|
// picker that appears and then fails because no uploader was registered is
|
|
186
361
|
// worse than no picker: the author has already chosen the file.
|
|
187
362
|
const uploader = imageUploaderFor(host);
|
|
188
|
-
const
|
|
189
|
-
|
|
190
|
-
|
|
363
|
+
const current = selectedImage(view.state);
|
|
364
|
+
const options = {
|
|
365
|
+
host,
|
|
366
|
+
...(uploader ? { upload: (file) => runUploader(uploader, file, host) } : {}),
|
|
367
|
+
...(current
|
|
368
|
+
? {
|
|
369
|
+
existing: {
|
|
370
|
+
src: current.src,
|
|
371
|
+
alt: current.alt,
|
|
372
|
+
title: current.title,
|
|
373
|
+
className: current.className,
|
|
374
|
+
align: current.align,
|
|
375
|
+
caption: current.caption,
|
|
376
|
+
width: current.width,
|
|
377
|
+
height: current.height,
|
|
378
|
+
},
|
|
379
|
+
}
|
|
380
|
+
: {}),
|
|
381
|
+
};
|
|
191
382
|
void promptForImage(host.ownerDocument, options).then((result) => {
|
|
192
383
|
if (!result) {
|
|
193
384
|
view.focus();
|
|
194
385
|
return;
|
|
195
386
|
}
|
|
196
|
-
|
|
387
|
+
const attrs = {
|
|
197
388
|
src: result.src,
|
|
198
389
|
alt: result.alt,
|
|
199
390
|
title: result.title,
|
|
@@ -201,8 +392,23 @@ export function registerDefaultItems() {
|
|
|
201
392
|
height: result.height,
|
|
202
393
|
align: result.align,
|
|
203
394
|
className: result.className,
|
|
204
|
-
|
|
205
|
-
}
|
|
395
|
+
caption: result.caption,
|
|
396
|
+
};
|
|
397
|
+
if (current) {
|
|
398
|
+
updateImage(attrs)(view.state, view.dispatch, view);
|
|
399
|
+
}
|
|
400
|
+
else {
|
|
401
|
+
insertImage({
|
|
402
|
+
src: result.src,
|
|
403
|
+
alt: result.alt,
|
|
404
|
+
title: result.title,
|
|
405
|
+
width: result.width,
|
|
406
|
+
height: result.height,
|
|
407
|
+
align: result.align,
|
|
408
|
+
className: result.className,
|
|
409
|
+
...(result.caption ? { caption: result.caption } : {}),
|
|
410
|
+
})(view.state, view.dispatch, view);
|
|
411
|
+
}
|
|
206
412
|
view.focus();
|
|
207
413
|
});
|
|
208
414
|
},
|
|
@@ -228,7 +434,7 @@ export function registerDefaultItems() {
|
|
|
228
434
|
// that escape hatch exists.
|
|
229
435
|
isActive: () => false,
|
|
230
436
|
run: ({ host }) => {
|
|
231
|
-
host.dispatchEvent(new CustomEvent(SOURCE_TOGGLE_EVENT, { bubbles: true }));
|
|
437
|
+
host.dispatchEvent(new CustomEvent(SOURCE_TOGGLE_EVENT, { bubbles: true, composed: true }));
|
|
232
438
|
},
|
|
233
439
|
});
|
|
234
440
|
registerToolbarItem({
|
|
@@ -239,7 +445,7 @@ export function registerDefaultItems() {
|
|
|
239
445
|
icon: 'fullscreen',
|
|
240
446
|
isActive: () => false,
|
|
241
447
|
run: ({ host }) => {
|
|
242
|
-
host.dispatchEvent(new CustomEvent(FULLSCREEN_TOGGLE_EVENT, { bubbles: true }));
|
|
448
|
+
host.dispatchEvent(new CustomEvent(FULLSCREEN_TOGGLE_EVENT, { bubbles: true, composed: true }));
|
|
243
449
|
},
|
|
244
450
|
});
|
|
245
451
|
registerToolbarItem({
|
|
@@ -250,7 +456,7 @@ export function registerDefaultItems() {
|
|
|
250
456
|
icon: 'visualAids',
|
|
251
457
|
isActive: () => false,
|
|
252
458
|
run: ({ host }) => {
|
|
253
|
-
host.dispatchEvent(new CustomEvent(VISUAL_AIDS_TOGGLE_EVENT, { bubbles: true }));
|
|
459
|
+
host.dispatchEvent(new CustomEvent(VISUAL_AIDS_TOGGLE_EVENT, { bubbles: true, composed: true }));
|
|
254
460
|
},
|
|
255
461
|
});
|
|
256
462
|
registerToolbarItem({
|
|
@@ -260,7 +466,7 @@ export function registerDefaultItems() {
|
|
|
260
466
|
label: 'Help',
|
|
261
467
|
icon: 'help',
|
|
262
468
|
run: ({ host }) => {
|
|
263
|
-
promptHelp(host.ownerDocument);
|
|
469
|
+
promptHelp(host.ownerDocument, host);
|
|
264
470
|
},
|
|
265
471
|
});
|
|
266
472
|
}
|
package/dist/items.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"items.js","sourceRoot":"","sources":["../src/items.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EACL,UAAU,EACV,eAAe,EACf,oBAAoB,EACpB,WAAW,EACX,YAAY,EACZ,YAAY,EACZ,IAAI,EACJ,OAAO,EACP,gBAAgB,EAChB,UAAU,EACV,gBAAgB,EAChB,eAAe,EACf,gBAAgB,EAChB,YAAY,EACZ,iBAAiB,EACjB,YAAY,EACZ,eAAe,EACf,eAAe,EACf,IAAI,E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E,CAAC,EAAE,IAAI,EAAE,EAAE,EAAE;YAChB,IAAI,CAAC,aAAa,CAAC,IAAI,WAAW,CAAC,wBAAwB,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC,CAAA;QAClG,CAAC;KACF,CAAC,CAAA;IAEF,mBAAmB,CAAC;QAClB,EAAE,EAAE,MAAM;QACV,IAAI,EAAE,QAAQ;QACd,IAAI,EAAE,QAAQ;QACd,KAAK,EAAE,MAAM;QACb,IAAI,EAAE,MAAM;QACZ,GAAG,EAAE,CAAC,EAAE,IAAI,EAAE,EAAE,EAAE;YAChB,UAAU,CAAC,IAAI,CAAC,aAAa,EAAE,IAAI,CAAC,CAAA;QACtC,CAAC;KACF,CAAC,CAAA;AACJ,CAAC"}
|
package/dist/live.d.ts
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The one live region an editor speaks through.
|
|
3
|
+
*
|
|
4
|
+
* Every announcement in the editor -- a formatting toggle, an import warning, a
|
|
5
|
+
* colour applied, a find result -- has to land in a node that is IN the document
|
|
6
|
+
* before the text changes. A region built and left detached is not a quiet
|
|
7
|
+
* region; it is a silent one, and nothing about the markup says so.
|
|
8
|
+
*
|
|
9
|
+
* That is exactly how the toolbar failed: each `Toolbar` built its own region and
|
|
10
|
+
* relied on the host to mount one of them, so a secondary or floating bar spoke
|
|
11
|
+
* into a detached `<div>` -- and `toolbar="none" toolbar2="bold italic"` mounted
|
|
12
|
+
* no region at all, leaving Ctrl+B completely silent.
|
|
13
|
+
*
|
|
14
|
+
* So the region belongs to the HOST, not to any one control. One per editor:
|
|
15
|
+
* two polite regions on one host race each other, and a screen reader reads
|
|
16
|
+
* whichever it noticed, in whichever order.
|
|
17
|
+
*/
|
|
18
|
+
/** The host's live region, created and mounted on first use. */
|
|
19
|
+
export declare function liveRegion(host: HTMLElement): HTMLDivElement;
|
|
20
|
+
/**
|
|
21
|
+
* Say something to a screen reader.
|
|
22
|
+
*
|
|
23
|
+
* Cleared and then set on a timer, for two reasons that both matter: replacing a
|
|
24
|
+
* region's text with the identical string is not a change and is not announced,
|
|
25
|
+
* and the delay coalesces a held shortcut into one utterance instead of thirty.
|
|
26
|
+
*/
|
|
27
|
+
export declare function announce(host: HTMLElement, message: string): void;
|
|
28
|
+
/**
|
|
29
|
+
* Remove a host's live region and cancel anything queued for it.
|
|
30
|
+
*
|
|
31
|
+
* The region is the host's, not any one toolbar's -- several bars share it --
|
|
32
|
+
* so no `Toolbar.destroy()` may take it away while another bar is still using
|
|
33
|
+
* it. It goes when the editor itself goes, and it has to go then: the element
|
|
34
|
+
* reads its own `innerHTML` back as document content when it rebuilds, so a
|
|
35
|
+
* region left behind becomes the author's document and is posted to the server.
|
|
36
|
+
*
|
|
37
|
+
* The pending timer is cleared as well. It holds a reference to the detached
|
|
38
|
+
* node and would write into it after teardown -- harmless, but it is a timer
|
|
39
|
+
* outliving the thing it was announcing for.
|
|
40
|
+
*/
|
|
41
|
+
export declare function disposeLiveRegion(host: HTMLElement): void;
|
|
42
|
+
//# sourceMappingURL=live.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"live.d.ts","sourceRoot":"","sources":["../src/live.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAcH,gEAAgE;AAChE,wBAAgB,UAAU,CAAC,IAAI,EAAE,WAAW,GAAG,cAAc,CAc5D;AAED;;;;;;GAMG;AACH,wBAAgB,QAAQ,CAAC,IAAI,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,GAAG,IAAI,CAYjE;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,WAAW,GAAG,IAAI,CAOzD"}
|
package/dist/live.js
ADDED
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The one live region an editor speaks through.
|
|
3
|
+
*
|
|
4
|
+
* Every announcement in the editor -- a formatting toggle, an import warning, a
|
|
5
|
+
* colour applied, a find result -- has to land in a node that is IN the document
|
|
6
|
+
* before the text changes. A region built and left detached is not a quiet
|
|
7
|
+
* region; it is a silent one, and nothing about the markup says so.
|
|
8
|
+
*
|
|
9
|
+
* That is exactly how the toolbar failed: each `Toolbar` built its own region and
|
|
10
|
+
* relied on the host to mount one of them, so a secondary or floating bar spoke
|
|
11
|
+
* into a detached `<div>` -- and `toolbar="none" toolbar2="bold italic"` mounted
|
|
12
|
+
* no region at all, leaving Ctrl+B completely silent.
|
|
13
|
+
*
|
|
14
|
+
* So the region belongs to the HOST, not to any one control. One per editor:
|
|
15
|
+
* two polite regions on one host race each other, and a screen reader reads
|
|
16
|
+
* whichever it noticed, in whichever order.
|
|
17
|
+
*/
|
|
18
|
+
/** Marks the host's own region, so a second call finds it rather than adding one. */
|
|
19
|
+
const REGION_CLASS = 'ol-live-region';
|
|
20
|
+
/**
|
|
21
|
+
* Pending announcements, keyed by host.
|
|
22
|
+
*
|
|
23
|
+
* Per host rather than per caller: two controls announcing in the same tick are
|
|
24
|
+
* two utterances a screen reader will queue and read one after the other, over
|
|
25
|
+
* the top of the author's typing. The last one is the one that matters.
|
|
26
|
+
*/
|
|
27
|
+
const timers = new WeakMap();
|
|
28
|
+
/** The host's live region, created and mounted on first use. */
|
|
29
|
+
export function liveRegion(host) {
|
|
30
|
+
const existing = host.querySelector(`:scope > .${REGION_CLASS}`);
|
|
31
|
+
if (existing)
|
|
32
|
+
return existing;
|
|
33
|
+
const el = host.ownerDocument.createElement('div');
|
|
34
|
+
// `ol-live` is the visually-hidden rule; the second class is the marker.
|
|
35
|
+
el.className = `ol-live ${REGION_CLASS}`;
|
|
36
|
+
// Polite and atomic: an assertive region would interrupt the author mid-word,
|
|
37
|
+
// and a non-atomic one can read partial updates.
|
|
38
|
+
el.setAttribute('role', 'status');
|
|
39
|
+
el.setAttribute('aria-live', 'polite');
|
|
40
|
+
el.setAttribute('aria-atomic', 'true');
|
|
41
|
+
host.appendChild(el);
|
|
42
|
+
return el;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Say something to a screen reader.
|
|
46
|
+
*
|
|
47
|
+
* Cleared and then set on a timer, for two reasons that both matter: replacing a
|
|
48
|
+
* region's text with the identical string is not a change and is not announced,
|
|
49
|
+
* and the delay coalesces a held shortcut into one utterance instead of thirty.
|
|
50
|
+
*/
|
|
51
|
+
export function announce(host, message) {
|
|
52
|
+
const el = liveRegion(host);
|
|
53
|
+
el.textContent = '';
|
|
54
|
+
const pending = timers.get(host);
|
|
55
|
+
if (pending !== undefined)
|
|
56
|
+
clearTimeout(pending);
|
|
57
|
+
timers.set(host, setTimeout(() => {
|
|
58
|
+
timers.delete(host);
|
|
59
|
+
el.textContent = message;
|
|
60
|
+
}, 60));
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* Remove a host's live region and cancel anything queued for it.
|
|
64
|
+
*
|
|
65
|
+
* The region is the host's, not any one toolbar's -- several bars share it --
|
|
66
|
+
* so no `Toolbar.destroy()` may take it away while another bar is still using
|
|
67
|
+
* it. It goes when the editor itself goes, and it has to go then: the element
|
|
68
|
+
* reads its own `innerHTML` back as document content when it rebuilds, so a
|
|
69
|
+
* region left behind becomes the author's document and is posted to the server.
|
|
70
|
+
*
|
|
71
|
+
* The pending timer is cleared as well. It holds a reference to the detached
|
|
72
|
+
* node and would write into it after teardown -- harmless, but it is a timer
|
|
73
|
+
* outliving the thing it was announcing for.
|
|
74
|
+
*/
|
|
75
|
+
export function disposeLiveRegion(host) {
|
|
76
|
+
const pending = timers.get(host);
|
|
77
|
+
if (pending !== undefined) {
|
|
78
|
+
clearTimeout(pending);
|
|
79
|
+
timers.delete(host);
|
|
80
|
+
}
|
|
81
|
+
host.querySelector(`:scope > .${REGION_CLASS}`)?.remove();
|
|
82
|
+
}
|
|
83
|
+
//# sourceMappingURL=live.js.map
|
package/dist/live.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file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,EAAE,CAAC,WAAW,GAAG,OAAO,CAAA;IAC1B,CAAC,EAAE,EAAE,CAAC,CACP,CAAA;AACH,CAAC;AAED;;;;;;;;;;;;GAYG;AACH,MAAM,UAAU,iBAAiB,CAAC,IAAiB;IACjD,MAAM,OAAO,GAAG,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC,CAAA;IAChC,IAAI,OAAO,KAAK,SAAS,EAAE,CAAC;QAC1B,YAAY,CAAC,OAAO,CAAC,CAAA;QACrB,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAA;IACrB,CAAC;IACD,IAAI,CAAC,aAAa,CAAC,aAAa,YAAY,EAAE,CAAC,EAAE,MAAM,EAAE,CAAA;AAC3D,CAAC"}
|
package/dist/menu.d.ts
CHANGED
|
@@ -26,6 +26,13 @@ export declare const DEFAULT_MENUBAR: readonly MenuSpec[];
|
|
|
26
26
|
export declare const LINK_CONTEXT_ITEMS: readonly MenuEntry[];
|
|
27
27
|
export declare const IMAGE_CONTEXT_ITEMS: readonly MenuEntry[];
|
|
28
28
|
export declare const TABLE_CONTEXT_ITEMS: readonly MenuEntry[];
|
|
29
|
+
export interface PopupMenuOptions {
|
|
30
|
+
/** The control that opened this menu. Owns the name and the focus return. */
|
|
31
|
+
trigger?: HTMLElement;
|
|
32
|
+
/** Accessible name, when there is no trigger to borrow one from. */
|
|
33
|
+
label?: string;
|
|
34
|
+
onClose?: () => void;
|
|
35
|
+
}
|
|
29
36
|
export declare class PopupMenu {
|
|
30
37
|
#private;
|
|
31
38
|
readonly el: HTMLDivElement;
|
|
@@ -33,8 +40,23 @@ export declare class PopupMenu {
|
|
|
33
40
|
attach(view: EditorView): void;
|
|
34
41
|
destroy(): void;
|
|
35
42
|
get open(): boolean;
|
|
36
|
-
|
|
37
|
-
|
|
43
|
+
/**
|
|
44
|
+
* Open at a point, named by whatever opened it.
|
|
45
|
+
*
|
|
46
|
+
* `trigger` is not optional decoration: without it the menu has no accessible
|
|
47
|
+
* name at all -- a screen reader announces "menu", with nothing to say which
|
|
48
|
+
* one -- and Escape has nowhere to put focus back, so it lands on the document
|
|
49
|
+
* and the author is out of the menubar entirely.
|
|
50
|
+
*/
|
|
51
|
+
show(items: readonly MenuEntry[], x: number, y: number, options?: PopupMenuOptions): void;
|
|
52
|
+
/**
|
|
53
|
+
* Close, and put focus somewhere real.
|
|
54
|
+
*
|
|
55
|
+
* `replaceChildren()` removes the node that currently has focus, and a browser
|
|
56
|
+
* whose focused element disappears falls back to `<body>` -- so without the
|
|
57
|
+
* return the author's next Tab starts from the top of the page.
|
|
58
|
+
*/
|
|
59
|
+
close(returnFocus?: boolean): void;
|
|
38
60
|
}
|
|
39
61
|
/**
|
|
40
62
|
* The menus an integrator asked for, in the order they asked for them.
|
|
@@ -51,6 +73,13 @@ export declare class MenuBar {
|
|
|
51
73
|
readonly el: HTMLDivElement;
|
|
52
74
|
constructor(host: HTMLElement, doc: Document, menus?: readonly MenuSpec[], locale?: string | null);
|
|
53
75
|
mount(view: EditorView): void;
|
|
76
|
+
/**
|
|
77
|
+
* Detach the menubar AND take its DOM with it -- see `Toolbar.destroy()`.
|
|
78
|
+
* The host reads its own `innerHTML` back as content when it rebuilds, so a
|
|
79
|
+
* menubar row left behind here would become the author's document.
|
|
80
|
+
*
|
|
81
|
+
* Idempotent: `.remove()` on a detached node is a no-op.
|
|
82
|
+
*/
|
|
54
83
|
destroy(): void;
|
|
55
84
|
}
|
|
56
85
|
//# sourceMappingURL=menu.d.ts.map
|
package/dist/menu.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"menu.d.ts","sourceRoot":"","sources":["../src/menu.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAGH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AAKlD,MAAM,WAAW,WAAW;IAC1B,EAAE,EAAE,MAAM,CAAA;IACV,yCAAyC;IACzC,KAAK,CAAC,EAAE,MAAM,CAAA;CACf;AAED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