@openleaf-editor/ui 0.1.0-beta.2 → 0.1.0-beta.4
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 +846 -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 +211 -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 +147 -12
- package/dist/overflow.d.ts +47 -4
- package/dist/overflow.d.ts.map +1 -1
- package/dist/overflow.js +338 -83
- 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 +32 -7
- package/dist/upload.d.ts.map +1 -1
- package/dist/upload.js +64 -8
- package/dist/upload.js.map +1 -1
- package/package.json +17 -3
package/dist/items.js
CHANGED
|
@@ -6,21 +6,95 @@
|
|
|
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, activeTextAlign, insertHorizontalRule, insertImage, isMarkActive, isNodeActive, redo, setLink, toggleBlockquote, toggleBold, toggleBulletList, toggleCodeBlock, toggleInlineCode, toggleItalic, toggleOrderedList, toggleStrike, toggleTextAlign, toggleUnderline, undo, unsetLink, } from '@openleaf-editor/core';
|
|
9
|
+
import { activeFontFamily, activeFontSize, activeLineHeight, activeLink, activeTextAlign, FONT_FAMILIES, FONT_SIZE_PRESETS, indent, insertHorizontalRule, insertImage, isMarkActive, isNodeActive, LINE_HEIGHT_PRESETS, outdent, redo, safeFontFamily, selectedImage, setFontFamily, setFontSize, setLineHeight, setLink, setTextAlign, 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. Answers come from core (`setTextAlign` /
|
|
32
|
+
* `activeTextAlign`) so a selected image lights the same button the command
|
|
33
|
+
* will write, rather than a second walk that only saw textblocks.
|
|
34
|
+
*/
|
|
35
|
+
function alignFacts(state) {
|
|
36
|
+
const hit = alignCache.get(state);
|
|
37
|
+
if (hit)
|
|
38
|
+
return hit;
|
|
39
|
+
const facts = {
|
|
40
|
+
any: setTextAlign('left')(state),
|
|
41
|
+
align: activeTextAlign(state),
|
|
42
|
+
};
|
|
43
|
+
alignCache.set(state, facts);
|
|
44
|
+
return facts;
|
|
45
|
+
}
|
|
19
46
|
/** Register the built-in items. Idempotent. */
|
|
47
|
+
/**
|
|
48
|
+
* The span of the link the caret sits in, or null when it is not in one.
|
|
49
|
+
*
|
|
50
|
+
* `setLink` and `unsetLink` both refuse an empty selection, which is right --
|
|
51
|
+
* there is nothing to mark. But an author who right-clicks a link, or puts the
|
|
52
|
+
* caret in one and presses the toolbar button, means "this link", and the range
|
|
53
|
+
* of a mark is something only the document can answer.
|
|
54
|
+
*/
|
|
55
|
+
function linkRange(state) {
|
|
56
|
+
const type = state.schema.marks['link'];
|
|
57
|
+
if (!type || !state.selection.empty)
|
|
58
|
+
return null;
|
|
59
|
+
const $pos = state.selection.$from;
|
|
60
|
+
const mark = type.isInSet($pos.marks());
|
|
61
|
+
if (!mark)
|
|
62
|
+
return null;
|
|
63
|
+
const parent = $pos.parent;
|
|
64
|
+
let start = $pos.index();
|
|
65
|
+
let end = $pos.indexAfter();
|
|
66
|
+
while (start > 0 && mark.isInSet(parent.child(start - 1).marks))
|
|
67
|
+
start -= 1;
|
|
68
|
+
while (end < parent.childCount && mark.isInSet(parent.child(end).marks))
|
|
69
|
+
end += 1;
|
|
70
|
+
let from = $pos.start();
|
|
71
|
+
for (let i = 0; i < start; i += 1)
|
|
72
|
+
from += parent.child(i).nodeSize;
|
|
73
|
+
let to = from;
|
|
74
|
+
for (let i = start; i < end; i += 1)
|
|
75
|
+
to += parent.child(i).nodeSize;
|
|
76
|
+
return { from, to };
|
|
77
|
+
}
|
|
78
|
+
/** Widen a caret inside a link to cover the whole link, so a command can act. */
|
|
79
|
+
function selectLink(view) {
|
|
80
|
+
const range = linkRange(view.state);
|
|
81
|
+
if (!range)
|
|
82
|
+
return;
|
|
83
|
+
view.dispatch(view.state.tr.setSelection(TextSelection.create(view.state.doc, range.from, range.to)));
|
|
84
|
+
}
|
|
20
85
|
export function registerDefaultItems() {
|
|
21
|
-
if (
|
|
86
|
+
if (getToolbarItem('undo') && getToolbarItem('blockType') && getToolbarItem('source'))
|
|
22
87
|
return;
|
|
23
|
-
|
|
88
|
+
registerToolbarItem({
|
|
89
|
+
id: 'blockType',
|
|
90
|
+
// `custom`, not `select`: it builds its own DOM because it carries formats
|
|
91
|
+
// the host injects at mount time. `type: 'select'` is the declarative
|
|
92
|
+
// contract for a fixed preset list, which this is not.
|
|
93
|
+
type: 'custom',
|
|
94
|
+
kind: 'action',
|
|
95
|
+
label: 'Paragraph style',
|
|
96
|
+
render: ({ view, host, formats }) => blockTypeControl(view, host, formats ?? []),
|
|
97
|
+
});
|
|
24
98
|
registerToolbarItem({
|
|
25
99
|
id: 'undo',
|
|
26
100
|
type: 'button',
|
|
@@ -70,6 +144,49 @@ export function registerDefaultItems() {
|
|
|
70
144
|
shortcut: item.label,
|
|
71
145
|
});
|
|
72
146
|
}
|
|
147
|
+
/* ---- typography ----
|
|
148
|
+
Preset selects over core's font / size / line-height commands. The schema
|
|
149
|
+
already models these so inherited HTML stays editable; these controls are
|
|
150
|
+
the chrome that was missing from the default bar. */
|
|
151
|
+
registerToolbarItem({
|
|
152
|
+
id: 'fontFamily',
|
|
153
|
+
type: 'select',
|
|
154
|
+
label: 'Font family',
|
|
155
|
+
selectMod: 'wide',
|
|
156
|
+
options: [
|
|
157
|
+
{ value: '', label: 'Default' },
|
|
158
|
+
// Option values are the validated spelling the schema stores (quoted when
|
|
159
|
+
// the name has a space), so getValue can match them after a round-trip.
|
|
160
|
+
...FONT_FAMILIES.map((family) => ({
|
|
161
|
+
value: safeFontFamily(family) ?? family,
|
|
162
|
+
label: family,
|
|
163
|
+
})),
|
|
164
|
+
],
|
|
165
|
+
getValue: (state) => activeFontFamily(state) ?? '',
|
|
166
|
+
applyValue: (value) => setFontFamily(value === '' ? null : value),
|
|
167
|
+
});
|
|
168
|
+
registerToolbarItem({
|
|
169
|
+
id: 'fontSize',
|
|
170
|
+
type: 'select',
|
|
171
|
+
label: 'Font size',
|
|
172
|
+
options: [
|
|
173
|
+
{ value: '', label: 'Default' },
|
|
174
|
+
...FONT_SIZE_PRESETS.map((px) => ({ value: `${px}px`, label: String(px) })),
|
|
175
|
+
],
|
|
176
|
+
getValue: (state) => activeFontSize(state) ?? '',
|
|
177
|
+
applyValue: (value) => setFontSize(value === '' ? null : value),
|
|
178
|
+
});
|
|
179
|
+
registerToolbarItem({
|
|
180
|
+
id: 'lineHeight',
|
|
181
|
+
type: 'select',
|
|
182
|
+
label: 'Line height',
|
|
183
|
+
options: [
|
|
184
|
+
{ value: '', label: 'Default' },
|
|
185
|
+
...LINE_HEIGHT_PRESETS.map((value) => ({ value, label: value })),
|
|
186
|
+
],
|
|
187
|
+
getValue: (state) => activeLineHeight(state) ?? '',
|
|
188
|
+
applyValue: (value) => setLineHeight(value === '' ? null : value),
|
|
189
|
+
});
|
|
73
190
|
/* ---- block structure ----
|
|
74
191
|
These get toggle semantics too. A blockquote or a list is a state the
|
|
75
192
|
cursor is either in or not, exactly like bold, and leaving them as plain
|
|
@@ -135,10 +252,32 @@ export function registerDefaultItems() {
|
|
|
135
252
|
label: item.label,
|
|
136
253
|
icon: item.icon,
|
|
137
254
|
command: toggleTextAlign(item.align),
|
|
138
|
-
|
|
255
|
+
// Both predicates come off one cached walk. Without the explicit
|
|
256
|
+
// isEnabled the toolbar dry-runs `command`, and toggleTextAlign walks the
|
|
257
|
+
// selection twice on its own -- see alignFacts.
|
|
258
|
+
isEnabled: (state) => alignFacts(state).any,
|
|
259
|
+
isActive: (state) => alignFacts(state).align === item.align,
|
|
139
260
|
shortcut: item.label,
|
|
140
261
|
});
|
|
141
262
|
}
|
|
263
|
+
registerToolbarItem({
|
|
264
|
+
id: 'indent',
|
|
265
|
+
type: 'button',
|
|
266
|
+
kind: 'action',
|
|
267
|
+
label: 'Indent',
|
|
268
|
+
icon: 'indent',
|
|
269
|
+
command: indent,
|
|
270
|
+
shortcut: 'Indent',
|
|
271
|
+
});
|
|
272
|
+
registerToolbarItem({
|
|
273
|
+
id: 'outdent',
|
|
274
|
+
type: 'button',
|
|
275
|
+
kind: 'action',
|
|
276
|
+
label: 'Outdent',
|
|
277
|
+
icon: 'outdent',
|
|
278
|
+
command: outdent,
|
|
279
|
+
shortcut: 'Outdent',
|
|
280
|
+
});
|
|
142
281
|
/* ---- insertions ---- */
|
|
143
282
|
registerToolbarItem({
|
|
144
283
|
id: 'link',
|
|
@@ -146,16 +285,26 @@ export function registerDefaultItems() {
|
|
|
146
285
|
kind: 'toggle',
|
|
147
286
|
label: 'Link',
|
|
148
287
|
icon: 'link',
|
|
149
|
-
//
|
|
150
|
-
//
|
|
151
|
-
|
|
288
|
+
// A selection to attach the link to, or a caret already inside one. Those
|
|
289
|
+
// two used to disagree: `isActive` said "in a link" while `isEnabled` said
|
|
290
|
+
// "there is a selection", so right-clicking a link -- which places a
|
|
291
|
+
// COLLAPSED caret -- rendered a control that was aria-pressed and
|
|
292
|
+
// aria-disabled at once and refused the click. The context menu built for
|
|
293
|
+
// exactly that gesture could therefore never edit a link, and the "Edit
|
|
294
|
+
// link" dialog title was unreachable.
|
|
295
|
+
isEnabled: (state) => !state.selection.empty || linkRange(state) !== null,
|
|
152
296
|
isActive: (state) => activeLink(state) !== null,
|
|
153
297
|
run: ({ view, host }) => {
|
|
298
|
+
selectLink(view);
|
|
154
299
|
const existing = activeLink(view.state);
|
|
300
|
+
// All five modelled attrs: dropping `rel`/`id` here is how Save used to
|
|
301
|
+
// wipe them even when the author changed nothing (#108).
|
|
155
302
|
void promptForLink(host.ownerDocument, {
|
|
156
303
|
href: existing?.['href'] ?? '',
|
|
157
304
|
title: existing?.['title'] ?? null,
|
|
158
305
|
target: existing?.['target'] ?? null,
|
|
306
|
+
rel: existing?.['rel'] ?? null,
|
|
307
|
+
id: existing?.['id'] ?? null,
|
|
159
308
|
}, host).then((result) => {
|
|
160
309
|
if (!result) {
|
|
161
310
|
view.focus();
|
|
@@ -172,7 +321,12 @@ export function registerDefaultItems() {
|
|
|
172
321
|
kind: 'action',
|
|
173
322
|
label: 'Remove link',
|
|
174
323
|
icon: 'unlink',
|
|
175
|
-
|
|
324
|
+
isEnabled: (state) => unsetLink(state) || linkRange(state) !== null,
|
|
325
|
+
run: ({ view }) => {
|
|
326
|
+
selectLink(view);
|
|
327
|
+
unsetLink(view.state, view.dispatch, view);
|
|
328
|
+
view.focus();
|
|
329
|
+
},
|
|
176
330
|
});
|
|
177
331
|
registerToolbarItem({
|
|
178
332
|
id: 'image',
|
|
@@ -180,20 +334,42 @@ export function registerDefaultItems() {
|
|
|
180
334
|
kind: 'action',
|
|
181
335
|
label: 'Insert image',
|
|
182
336
|
icon: 'image',
|
|
337
|
+
// Insert and edit are the same control, as they are for media: a separate
|
|
338
|
+
// "image properties" item is one the author has to discover, and without
|
|
339
|
+
// it there is no way to revise alt text after insert.
|
|
340
|
+
labelFor: (state) => (selectedImage(state) ? 'Edit image' : 'Insert image'),
|
|
183
341
|
run: ({ view, host }) => {
|
|
184
342
|
// One item, two dialogs, decided by whether this page can upload. A file
|
|
185
343
|
// picker that appears and then fails because no uploader was registered is
|
|
186
344
|
// worse than no picker: the author has already chosen the file.
|
|
187
345
|
const uploader = imageUploaderFor(host);
|
|
188
|
-
const
|
|
189
|
-
|
|
190
|
-
|
|
346
|
+
const current = selectedImage(view.state);
|
|
347
|
+
const options = {
|
|
348
|
+
host,
|
|
349
|
+
...(uploader ? { upload: (file) => runUploader(uploader, file, host) } : {}),
|
|
350
|
+
...(current
|
|
351
|
+
? {
|
|
352
|
+
existing: {
|
|
353
|
+
src: current.src,
|
|
354
|
+
alt: current.alt,
|
|
355
|
+
title: current.title,
|
|
356
|
+
className: current.className,
|
|
357
|
+
align: current.align,
|
|
358
|
+
caption: current.caption,
|
|
359
|
+
width: current.width,
|
|
360
|
+
height: current.height,
|
|
361
|
+
},
|
|
362
|
+
}
|
|
363
|
+
: {}),
|
|
364
|
+
};
|
|
191
365
|
void promptForImage(host.ownerDocument, options).then((result) => {
|
|
366
|
+
if (view.isDestroyed)
|
|
367
|
+
return;
|
|
192
368
|
if (!result) {
|
|
193
369
|
view.focus();
|
|
194
370
|
return;
|
|
195
371
|
}
|
|
196
|
-
|
|
372
|
+
const attrs = {
|
|
197
373
|
src: result.src,
|
|
198
374
|
alt: result.alt,
|
|
199
375
|
title: result.title,
|
|
@@ -201,8 +377,23 @@ export function registerDefaultItems() {
|
|
|
201
377
|
height: result.height,
|
|
202
378
|
align: result.align,
|
|
203
379
|
className: result.className,
|
|
204
|
-
|
|
205
|
-
}
|
|
380
|
+
caption: result.caption,
|
|
381
|
+
};
|
|
382
|
+
if (current) {
|
|
383
|
+
updateImage(attrs)(view.state, view.dispatch, view);
|
|
384
|
+
}
|
|
385
|
+
else {
|
|
386
|
+
insertImage({
|
|
387
|
+
src: result.src,
|
|
388
|
+
alt: result.alt,
|
|
389
|
+
title: result.title,
|
|
390
|
+
width: result.width,
|
|
391
|
+
height: result.height,
|
|
392
|
+
align: result.align,
|
|
393
|
+
className: result.className,
|
|
394
|
+
...(result.caption ? { caption: result.caption } : {}),
|
|
395
|
+
})(view.state, view.dispatch, view);
|
|
396
|
+
}
|
|
206
397
|
view.focus();
|
|
207
398
|
});
|
|
208
399
|
},
|
|
@@ -228,7 +419,7 @@ export function registerDefaultItems() {
|
|
|
228
419
|
// that escape hatch exists.
|
|
229
420
|
isActive: () => false,
|
|
230
421
|
run: ({ host }) => {
|
|
231
|
-
host.dispatchEvent(new CustomEvent(SOURCE_TOGGLE_EVENT, { bubbles: true }));
|
|
422
|
+
host.dispatchEvent(new CustomEvent(SOURCE_TOGGLE_EVENT, { bubbles: true, composed: true }));
|
|
232
423
|
},
|
|
233
424
|
});
|
|
234
425
|
registerToolbarItem({
|
|
@@ -239,7 +430,7 @@ export function registerDefaultItems() {
|
|
|
239
430
|
icon: 'fullscreen',
|
|
240
431
|
isActive: () => false,
|
|
241
432
|
run: ({ host }) => {
|
|
242
|
-
host.dispatchEvent(new CustomEvent(FULLSCREEN_TOGGLE_EVENT, { bubbles: true }));
|
|
433
|
+
host.dispatchEvent(new CustomEvent(FULLSCREEN_TOGGLE_EVENT, { bubbles: true, composed: true }));
|
|
243
434
|
},
|
|
244
435
|
});
|
|
245
436
|
registerToolbarItem({
|
|
@@ -250,7 +441,7 @@ export function registerDefaultItems() {
|
|
|
250
441
|
icon: 'visualAids',
|
|
251
442
|
isActive: () => false,
|
|
252
443
|
run: ({ host }) => {
|
|
253
|
-
host.dispatchEvent(new CustomEvent(VISUAL_AIDS_TOGGLE_EVENT, { bubbles: true }));
|
|
444
|
+
host.dispatchEvent(new CustomEvent(VISUAL_AIDS_TOGGLE_EVENT, { bubbles: true, composed: true }));
|
|
254
445
|
},
|
|
255
446
|
});
|
|
256
447
|
registerToolbarItem({
|
|
@@ -260,7 +451,7 @@ export function registerDefaultItems() {
|
|
|
260
451
|
label: 'Help',
|
|
261
452
|
icon: 'help',
|
|
262
453
|
run: ({ host }) => {
|
|
263
|
-
promptHelp(host.ownerDocument);
|
|
454
|
+
promptHelp(host.ownerDocument, host);
|
|
264
455
|
},
|
|
265
456
|
});
|
|
266
457
|
}
|
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,EACJ,SAAS,GAEV,MAAM,uBAAuB,CAAA;AAE9B,OAAO,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,aAAa,CAAA;AAC3D,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAA;AAEtC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AAI,EAAE,EAAE,EAAE;YAChB,IAAI,CAAC,aAAa,CAAC,IAAI,WAAW,CAAC,uBAAuB,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC,CAAA;QACjG,CAAC;KACF,CAAC,CAAA;IAEF,mBAAmB,CAAC;QAClB,EAAE,EAAE,YAAY;QAChB,IAAI,EAAE,QAAQ;QACd,IAAI,EAAE,QAAQ;QACd,KAAK,EAAE,aAAa;QACpB,IAAI,EAAE,YAAY;QAClB,QAAQ,EAAE,GAAG,EAAE,CAAC,KAAK;QACrB,GAAG,EAAE,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":"live.js","sourceRoot":"","sources":["../src/live.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,qFAAqF;AACrF,MAAM,YAAY,GAAG,gBAAgB,CAAA;AAErC;;;;;;GAMG;AACH,MAAM,MAAM,GAAG,IAAI,OAAO,EAA8C,CAAA;AAExE,gEAAgE;AAChE,MAAM,UAAU,UAAU,CAAC,IAAiB;IAC1C,MAAM,QAAQ,GAAG,IAAI,CAAC,aAAa,CAAiB,aAAa,YAAY,EAAE,CAAC,CAAA;IAChF,IAAI,QAAQ;QAAE,OAAO,QAAQ,CAAA;IAE7B,MAAM,EAAE,GAAG,IAAI,CAAC,aAAa,CAAC,aAAa,CAAC,KAAK,CAAC,CAAA;IAClD,yEAAyE;IACzE,EAAE,CAAC,SAAS,GAAG,WAAW,YAAY,EAAE,CAAA;IACxC,8EAA8E;IAC9E,iDAAiD;IACjD,EAAE,CAAC,YAAY,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAA;IACjC,EAAE,CAAC,YAAY,CAAC,WAAW,EAAE,QAAQ,CAAC,CAAA;IACtC,EAAE,CAAC,YAAY,CAAC,aAAa,EAAE,MAAM,CAAC,CAAA;IACtC,IAAI,CAAC,WAAW,CAAC,EAAE,CAAC,CAAA;IACpB,OAAO,EAAE,CAAA;AACX,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,QAAQ,CAAC,IAAiB,EAAE,OAAe;IACzD,MAAM,EAAE,GAAG,UAAU,CAAC,IAAI,CAAC,CAAA;IAC3B,EAAE,CAAC,WAAW,GAAG,EAAE,CAAA;IACnB,MAAM,OAAO,GAAG,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC,CAAA;IAChC,IAAI,OAAO,KAAK,SAAS;QAAE,YAAY,CAAC,OAAO,CAAC,CAAA;IAChD,MAAM,CAAC,GAAG,CACR,IAAI,EACJ,UAAU,CAAC,GAAG,EAAE;QACd,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAA;QACnB,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,MAAM,MAAM,SAAS,GAAG,WAAW,GAAG,GAAG,CAAA;AAEzC,MAAM,WAAW,QAAQ;IACvB,EAAE,EAAE,MAAM,CAAA;IACV,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,EAAE,SAAS,SAAS,EAAE,CAAA;CAC5B;AAED,eAAO,MAAM,eAAe,EAAE,SAAS,QAAQ,
|
|
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,MAAM,MAAM,SAAS,GAAG,WAAW,GAAG,GAAG,CAAA;AAEzC,MAAM,WAAW,QAAQ;IACvB,EAAE,EAAE,MAAM,CAAA;IACV,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,EAAE,SAAS,SAAS,EAAE,CAAA;CAC5B;AAED,eAAO,MAAM,eAAe,EAAE,SAAS,QAAQ,EAgD9C,CAAA;AAED,eAAO,MAAM,kBAAkB,EAAE,SAAS,SAAS,EAAuC,CAAA;AAC1F,eAAO,MAAM,mBAAmB,EAAE,SAAS,SAAS,EAAsB,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