@formicoidea/labre-core-database 4.0.0 → 4.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.
|
@@ -36,6 +36,14 @@ export declare class DatabasePageHost extends DatabasePageHost_base {
|
|
|
36
36
|
connectedCallback(): void;
|
|
37
37
|
disconnectedCallback(): void;
|
|
38
38
|
protected willUpdate(changed: PropertyValues<this>): void;
|
|
39
|
+
/**
|
|
40
|
+
* The page's editor host is a tab stop of its own (`tabindex="0"`, set on
|
|
41
|
+
* connect for the keys of a block selection), and the root keeps the Tab
|
|
42
|
+
* pressed there (`fallbackKeymap`): between the heading and the views, Tab
|
|
43
|
+
* from the title stopped on it, and so did Shift+Tab from the view toolbar
|
|
44
|
+
* (#678). Out of the tab order, the host stays focusable by script.
|
|
45
|
+
*/
|
|
46
|
+
protected updated(changed: PropertyValues<this>): void;
|
|
39
47
|
render(): import("lit-html").TemplateResult<1>;
|
|
40
48
|
accessor store: BlockStdOptions['store'];
|
|
41
49
|
/** The page-scope view extensions the host mounts its page editor with. */
|
|
@@ -203,6 +203,8 @@ let DatabasePageHost = (() => {
|
|
|
203
203
|
this.addEventListener('dragover', stopFileDrop, true);
|
|
204
204
|
this.addEventListener('drop', stopFileDrop, true);
|
|
205
205
|
this.holdSelection();
|
|
206
|
+
// Reconnected, the editor host takes its tab stop back: drop it again.
|
|
207
|
+
this.requestUpdate();
|
|
206
208
|
}
|
|
207
209
|
disconnectedCallback() {
|
|
208
210
|
super.disconnectedCallback();
|
|
@@ -232,6 +234,19 @@ let DatabasePageHost = (() => {
|
|
|
232
234
|
// `std.render()` builds a new editor host each call: once per editor.
|
|
233
235
|
this.editorHost = this._std?.render();
|
|
234
236
|
}
|
|
237
|
+
/**
|
|
238
|
+
* The page's editor host is a tab stop of its own (`tabindex="0"`, set on
|
|
239
|
+
* connect for the keys of a block selection), and the root keeps the Tab
|
|
240
|
+
* pressed there (`fallbackKeymap`): between the heading and the views, Tab
|
|
241
|
+
* from the title stopped on it, and so did Shift+Tab from the view toolbar
|
|
242
|
+
* (#678). Out of the tab order, the host stays focusable by script.
|
|
243
|
+
*/
|
|
244
|
+
updated(changed) {
|
|
245
|
+
super.updated(changed);
|
|
246
|
+
if (this.editorHost && this.editorHost.tabIndex !== -1) {
|
|
247
|
+
this.editorHost.tabIndex = -1;
|
|
248
|
+
}
|
|
249
|
+
}
|
|
235
250
|
render() {
|
|
236
251
|
// The page viewport the page extensions, and `<doc-title>`, look for
|
|
237
252
|
// above their host.
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@formicoidea/labre-core-database",
|
|
3
3
|
"description": "Labre core-database editing chrome for @formicoidea/labre-core.",
|
|
4
|
-
"version": "4.
|
|
4
|
+
"version": "4.1.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": false,
|
|
7
7
|
"author": "lajola",
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"dist"
|
|
28
28
|
],
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@formicoidea/labre-core": "4.
|
|
30
|
+
"@formicoidea/labre-core": "4.1.0",
|
|
31
31
|
"@blocksuite/icons": "^2.2.12",
|
|
32
32
|
"@preact/signals-core": "^1.8.0",
|
|
33
33
|
"lit": "^3.2.0"
|