@formicoidea/labre-core 0.46.2 → 0.47.1
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/dist/_pkgs/affine-block-attachment/configs/slash-menu.js +2 -2
- package/dist/_pkgs/affine-block-attachment/translations.js +2 -2
- package/dist/_pkgs/affine-block-data-view/columns/index.d.ts +1 -1
- package/dist/_pkgs/affine-block-database/data-source.d.ts +1 -1
- package/dist/_pkgs/affine-block-database/properties/converts.d.ts +4 -4
- package/dist/_pkgs/affine-block-database/properties/index.d.ts +1 -1
- package/dist/_pkgs/affine-block-embed/embed-html-block/configs/toolbar.js +1 -1
- package/dist/_pkgs/affine-block-embed/embed-iframe-block/configs/toolbar.d.ts +1 -1
- package/dist/_pkgs/affine-block-embed/embed-iframe-block/configs/toolbar.js +1 -1
- package/dist/_pkgs/affine-block-embed/translations.d.ts +1 -1
- package/dist/_pkgs/affine-block-embed/translations.js +2 -2
- package/dist/_pkgs/affine-block-embed-doc/embed-linked-doc-block/configs/slash-menu.js +6 -6
- package/dist/_pkgs/affine-block-embed-doc/embed-linked-doc-block/configs/toolbar.js +1 -1
- package/dist/_pkgs/affine-block-embed-doc/embed-synced-doc-block/configs/toolbar.js +3 -3
- package/dist/_pkgs/affine-block-embed-doc/translations.d.ts +1 -1
- package/dist/_pkgs/affine-block-embed-doc/translations.js +8 -8
- package/dist/_pkgs/affine-block-frame/commands.js +41 -1
- package/dist/_pkgs/affine-block-frame/frame-manager.d.ts +1 -1
- package/dist/_pkgs/affine-block-frame/frame-toolbar.js +2 -2
- package/dist/_pkgs/affine-block-frame/translations.js +1 -1
- package/dist/_pkgs/affine-block-frame/view.js +7 -2
- package/dist/_pkgs/affine-block-note/components/edgeless-page-block-title.d.ts +7 -0
- package/dist/_pkgs/affine-block-note/components/edgeless-page-block-title.js +15 -1
- package/dist/_pkgs/affine-block-note/translations.js +8 -8
- package/dist/_pkgs/affine-block-root/commands/copy-link-commands.js +2 -2
- package/dist/_pkgs/affine-block-root/configs/toolbar.d.ts +1 -1
- package/dist/_pkgs/affine-block-root/configs/toolbar.js +1 -1
- package/dist/_pkgs/affine-block-root/edgeless/configs/toolbar/misc.d.ts +1 -1
- package/dist/_pkgs/affine-block-root/edgeless/configs/toolbar/more.d.ts +1 -1
- package/dist/_pkgs/affine-block-root/edgeless/configs/toolbar/more.js +1 -1
- package/dist/_pkgs/affine-block-root/translations.d.ts +1 -1
- package/dist/_pkgs/affine-block-root/translations.js +2 -2
- package/dist/_pkgs/affine-block-surface/extensions/canvas-grid/commands.js +21 -7
- package/dist/_pkgs/affine-block-surface/extensions/export-manager/commands.d.ts +2 -0
- package/dist/_pkgs/affine-block-surface/extensions/export-manager/commands.js +79 -0
- package/dist/_pkgs/affine-block-surface/extensions/export-manager/export-manager.d.ts +18 -1
- package/dist/_pkgs/affine-block-surface/extensions/export-manager/export-manager.js +53 -30
- package/dist/_pkgs/affine-block-surface/extensions/export-manager/index.d.ts +1 -0
- package/dist/_pkgs/affine-block-surface/extensions/export-manager/index.js +1 -0
- package/dist/_pkgs/affine-block-surface/extensions/interchange-import.js +1 -1
- package/dist/_pkgs/affine-block-surface/extensions/selection-pane/commands.js +1 -1
- package/dist/_pkgs/affine-block-surface/renderer/element-highlight-overlay.d.ts +8 -2
- package/dist/_pkgs/affine-block-surface/renderer/element-highlight-overlay.js +11 -13
- package/dist/_pkgs/affine-block-surface/view.js +11 -2
- package/dist/_pkgs/affine-block-surface-ref/translations.js +8 -8
- package/dist/_pkgs/affine-components/translations.js +6 -6
- package/dist/_pkgs/affine-fragment-doc-title/doc-title.d.ts +8 -0
- package/dist/_pkgs/affine-fragment-doc-title/doc-title.js +65 -4
- package/dist/_pkgs/affine-fragment-doc-title/effects.d.ts +2 -0
- package/dist/_pkgs/affine-fragment-doc-title/effects.js +2 -0
- package/dist/_pkgs/affine-fragment-doc-title/index.d.ts +2 -0
- package/dist/_pkgs/affine-fragment-doc-title/index.js +2 -0
- package/dist/_pkgs/affine-fragment-doc-title/title-band/format.d.ts +69 -0
- package/dist/_pkgs/affine-fragment-doc-title/title-band/format.js +182 -0
- package/dist/_pkgs/affine-fragment-doc-title/title-band/title-band.d.ts +62 -0
- package/dist/_pkgs/affine-fragment-doc-title/title-band/title-band.js +649 -0
- package/dist/_pkgs/affine-fragment-doc-title/translations.d.ts +21 -0
- package/dist/_pkgs/affine-fragment-doc-title/translations.js +58 -0
- package/dist/_pkgs/affine-gfx-group/toolbar/config.d.ts +2 -2
- package/dist/_pkgs/affine-gfx-group/toolbar/config.js +2 -2
- package/dist/_pkgs/affine-gfx-group/translations.js +1 -1
- package/dist/_pkgs/affine-gfx-note/translations.js +2 -2
- package/dist/_pkgs/affine-shared/services/index.d.ts +2 -0
- package/dist/_pkgs/affine-shared/services/index.js +2 -0
- package/dist/_pkgs/affine-shared/services/linked-doc-creation-service.d.ts +1 -1
- package/dist/_pkgs/affine-shared/services/properties-panel-service.d.ts +50 -0
- package/dist/_pkgs/affine-shared/services/properties-panel-service.js +17 -0
- package/dist/_pkgs/affine-shared/services/title-band-service.d.ts +124 -0
- package/dist/_pkgs/affine-shared/services/title-band-service.js +17 -0
- package/dist/_pkgs/affine-shared/services/translation-service/chrome.d.ts +3 -3
- package/dist/_pkgs/affine-shared/services/translation-service/chrome.js +17 -17
- package/dist/_pkgs/affine-widget-edgeless-auto-connect/translations.js +2 -2
- package/dist/_pkgs/affine-widget-edgeless-selected-rect/translations.js +1 -1
- package/dist/_pkgs/affine-widget-linked-doc/translations.js +3 -3
- package/dist/_pkgs/affine-widget-slash-menu/translations.js +1 -1
- package/dist/_pkgs/data-view/property-presets/converts.d.ts +2 -2
- package/dist/_pkgs/data-view/property-presets/index.d.ts +1 -1
- package/dist/_pkgs/data-view/property-presets/number/cell-renderer.d.ts +1 -1
- package/dist/_pkgs/data-view/property-presets/number/define.d.ts +1 -1
- package/dist/_pkgs/data-view/property-presets/number/types.d.ts +2 -2
- package/dist/_pkgs/data-view/property-presets/pure-index.d.ts +2 -1
- package/dist/_pkgs/data-view/property-presets/pure-index.js +4 -0
- package/dist/_pkgs/std/extension/command-registry.d.ts +50 -1
- package/dist/_pkgs/std/extension/command-registry.js +26 -7
- package/dist/commands.js +2 -1
- package/dist/host-panels.d.ts +83 -2
- package/dist/host-panels.js +82 -1
- package/dist/translations.js +1 -1
- package/package.json +1 -1
- package/dist/_pkgs/affine-block-surface/extensions/export-manager/file-exporter.d.ts +0 -26
- package/dist/_pkgs/affine-block-surface/extensions/export-manager/file-exporter.js +0 -73
|
@@ -9,7 +9,7 @@ export const attachmentSlashMenuConfig = {
|
|
|
9
9
|
{
|
|
10
10
|
name: 'Attachment',
|
|
11
11
|
nameWording: ATTACHMENT_SLASH_NAME,
|
|
12
|
-
description: 'Attach a file to
|
|
12
|
+
description: 'Attach a file to the page.',
|
|
13
13
|
descriptionWording: ATTACHMENT_SLASH_DESCRIPTION,
|
|
14
14
|
icon: FileIcon(),
|
|
15
15
|
tooltip: {
|
|
@@ -35,7 +35,7 @@ export const attachmentSlashMenuConfig = {
|
|
|
35
35
|
{
|
|
36
36
|
name: 'PDF',
|
|
37
37
|
nameWording: ATTACHMENT_SLASH_PDF_NAME,
|
|
38
|
-
description: 'Upload a PDF to
|
|
38
|
+
description: 'Upload a PDF to the page.',
|
|
39
39
|
descriptionWording: ATTACHMENT_SLASH_PDF_DESCRIPTION,
|
|
40
40
|
icon: ExportToPdfIcon(),
|
|
41
41
|
tooltip: {
|
|
@@ -9,7 +9,7 @@ import { ATTACHMENT_LABEL, } from '../affine-shared/services/index.js';
|
|
|
9
9
|
export const ATTACHMENT_SLASH_NAME = ATTACHMENT_LABEL;
|
|
10
10
|
export const ATTACHMENT_SLASH_DESCRIPTION = [
|
|
11
11
|
'com.labre.attachment.slash.description',
|
|
12
|
-
'Attach a file to
|
|
12
|
+
'Attach a file to the page.',
|
|
13
13
|
];
|
|
14
14
|
/** The slash-menu "PDF" item, same pattern as {@link ATTACHMENT_SLASH_NAME}. */
|
|
15
15
|
export const ATTACHMENT_SLASH_PDF_NAME = [
|
|
@@ -18,7 +18,7 @@ export const ATTACHMENT_SLASH_PDF_NAME = [
|
|
|
18
18
|
];
|
|
19
19
|
export const ATTACHMENT_SLASH_PDF_DESCRIPTION = [
|
|
20
20
|
'com.labre.attachment.slash.pdf.description',
|
|
21
|
-
'Upload a PDF to
|
|
21
|
+
'Upload a PDF to the page.',
|
|
22
22
|
];
|
|
23
23
|
/** The toolbar's "Replace attachment" tooltip (`configs/toolbar.ts`). */
|
|
24
24
|
export const ATTACHMENT_TOOLBAR_REPLACE = [
|
|
@@ -6,7 +6,7 @@ export declare const queryBlockColumns: (PropertyMetaConfig<"checkbox", {}, bool
|
|
|
6
6
|
color: string;
|
|
7
7
|
}[];
|
|
8
8
|
}, string[], string[]> | PropertyMetaConfig<"number", {
|
|
9
|
-
format: "number" | "
|
|
9
|
+
format: "number" | "percent" | "numberWithCommas" | "currencyINR" | "currencyYen" | "currencyCNY" | "currencyUSD" | "currencyEUR" | "currencyGBP";
|
|
10
10
|
decimal?: number | undefined;
|
|
11
11
|
}, number | null, number | null> | PropertyMetaConfig<"progress", {}, number, number> | PropertyMetaConfig<"select", {
|
|
12
12
|
options: {
|
|
@@ -25,7 +25,7 @@ export declare class DatabaseBlockDataSource extends ExternalDataSourceBase {
|
|
|
25
25
|
color: string;
|
|
26
26
|
}[];
|
|
27
27
|
}, string[], string[]> | PropertyMetaConfig<"number", {
|
|
28
|
-
format: "number" | "
|
|
28
|
+
format: "number" | "percent" | "numberWithCommas" | "currencyINR" | "currencyYen" | "currencyCNY" | "currencyUSD" | "currencyEUR" | "currencyGBP";
|
|
29
29
|
decimal?: number | undefined;
|
|
30
30
|
}, number | null, number | null> | PropertyMetaConfig<"progress", {}, number, number> | PropertyMetaConfig<"select", {
|
|
31
31
|
options: {
|
|
@@ -18,14 +18,14 @@ export declare const databasePropertyConverts: ({
|
|
|
18
18
|
from: any;
|
|
19
19
|
to: any;
|
|
20
20
|
convert: import("../index.js").ConvertFunction<import("../index.js").PropertyModel<"number", {
|
|
21
|
-
format: "number" | "
|
|
21
|
+
format: "number" | "percent" | "numberWithCommas" | "currencyINR" | "currencyYen" | "currencyCNY" | "currencyUSD" | "currencyEUR" | "currencyGBP";
|
|
22
22
|
decimal?: number | undefined;
|
|
23
23
|
}, number | null, number | null>, import("../index.js").PropertyModel<"progress", {}, number, number>>;
|
|
24
24
|
} | {
|
|
25
25
|
from: any;
|
|
26
26
|
to: any;
|
|
27
27
|
convert: import("../index.js").ConvertFunction<import("../index.js").PropertyModel<"progress", {}, number, number>, import("../index.js").PropertyModel<"number", {
|
|
28
|
-
format: "number" | "
|
|
28
|
+
format: "number" | "percent" | "numberWithCommas" | "currencyINR" | "currencyYen" | "currencyCNY" | "currencyUSD" | "currencyEUR" | "currencyGBP";
|
|
29
29
|
decimal?: number | undefined;
|
|
30
30
|
}, number | null, number | null>>;
|
|
31
31
|
} | {
|
|
@@ -68,7 +68,7 @@ export declare const databasePropertyConverts: ({
|
|
|
68
68
|
from: any;
|
|
69
69
|
to: any;
|
|
70
70
|
convert: import("../index.js").ConvertFunction<import("../index.js").PropertyModel<"rich-text", {}, import("./rich-text/define.js").RichTextCellType | undefined, string>, import("../index.js").PropertyModel<"number", {
|
|
71
|
-
format: "number" | "
|
|
71
|
+
format: "number" | "percent" | "numberWithCommas" | "currencyINR" | "currencyYen" | "currencyCNY" | "currencyUSD" | "currencyEUR" | "currencyGBP";
|
|
72
72
|
decimal?: number | undefined;
|
|
73
73
|
}, number | null, number | null>>;
|
|
74
74
|
} | {
|
|
@@ -97,7 +97,7 @@ export declare const databasePropertyConverts: ({
|
|
|
97
97
|
from: any;
|
|
98
98
|
to: any;
|
|
99
99
|
convert: import("../index.js").ConvertFunction<import("../index.js").PropertyModel<"number", {
|
|
100
|
-
format: "number" | "
|
|
100
|
+
format: "number" | "percent" | "numberWithCommas" | "currencyINR" | "currencyYen" | "currencyCNY" | "currencyUSD" | "currencyEUR" | "currencyGBP";
|
|
101
101
|
decimal?: number | undefined;
|
|
102
102
|
}, number | null, number | null>, import("../index.js").PropertyModel<"rich-text", {}, import("./rich-text/define.js").RichTextCellType | undefined, string>>;
|
|
103
103
|
} | {
|
|
@@ -10,7 +10,7 @@ export declare const databaseBlockProperties: {
|
|
|
10
10
|
}[];
|
|
11
11
|
}, string[], string[]>;
|
|
12
12
|
numberColumnConfig: import("../index.js").PropertyMetaConfig<"number", {
|
|
13
|
-
format: "number" | "
|
|
13
|
+
format: "number" | "percent" | "numberWithCommas" | "currencyINR" | "currencyYen" | "currencyCNY" | "currencyUSD" | "currencyEUR" | "currencyGBP";
|
|
14
14
|
decimal?: number | undefined;
|
|
15
15
|
}, number | null, number | null>;
|
|
16
16
|
progressColumnConfig: import("../index.js").PropertyMetaConfig<"progress", {}, number, number>;
|
|
@@ -15,7 +15,7 @@ const trackBaseProps = {
|
|
|
15
15
|
const openDocAction = {
|
|
16
16
|
id: 'a.open-doc',
|
|
17
17
|
icon: ExpandFullIcon(),
|
|
18
|
-
tooltip: 'Open this
|
|
18
|
+
tooltip: 'Open this page',
|
|
19
19
|
tooltipWording: TOOLBAR_OPEN_THIS_DOC,
|
|
20
20
|
run(ctx) {
|
|
21
21
|
const block = ctx.getCurrentBlockByType(EmbedHtmlBlockComponent);
|
|
@@ -18,7 +18,7 @@ export declare const builtinToolbarConfig: {
|
|
|
18
18
|
content(ctx: ToolbarContext): import("lit-html").TemplateResult<1> | null;
|
|
19
19
|
}, ToolbarAction, {
|
|
20
20
|
readonly id: "e.convert-to-linked-doc";
|
|
21
|
-
readonly tooltip: "Create Linked
|
|
21
|
+
readonly tooltip: "Create Linked Page";
|
|
22
22
|
readonly tooltipWording: import("../../../affine-shared/services/index.js").ChromeWording;
|
|
23
23
|
readonly icon: import("lit-html").TemplateResult<1>;
|
|
24
24
|
readonly run: (ctx: ToolbarContext) => void;
|
|
@@ -153,7 +153,7 @@ export const builtinToolbarConfig = {
|
|
|
153
153
|
captionAction('d.caption'),
|
|
154
154
|
{
|
|
155
155
|
id: 'e.convert-to-linked-doc',
|
|
156
|
-
tooltip: 'Create Linked
|
|
156
|
+
tooltip: 'Create Linked Page',
|
|
157
157
|
tooltipWording: EMBED_IFRAME_TOOLBAR_CREATE_LINKED_DOC,
|
|
158
158
|
icon: LinkedPageIcon(),
|
|
159
159
|
run(ctx) {
|
|
@@ -38,7 +38,7 @@ export declare const EMBED_IFRAME_TOOLBAR_ORIGINAL: ChromeWording;
|
|
|
38
38
|
/**
|
|
39
39
|
* An alias (L7 dedupe): the same Title Case word as
|
|
40
40
|
* {@link TOOLBAR_CREATE_LINKED_DOC_TITLE}, distinct from the sentence-case
|
|
41
|
-
* `TOOLBAR_CREATE_LINKED_DOC` chrome wording ("Create linked
|
|
41
|
+
* `TOOLBAR_CREATE_LINKED_DOC` chrome wording ("Create linked page").
|
|
42
42
|
*/
|
|
43
43
|
export declare const EMBED_IFRAME_TOOLBAR_CREATE_LINKED_DOC: ChromeWording;
|
|
44
44
|
/** The "no link" notification's message (`embed-iframe-block.ts`). */
|
|
@@ -13,7 +13,7 @@ export const EMBED_CANCEL = ACTION_CANCEL;
|
|
|
13
13
|
/* ── "Create a linked doc" prompt (`common/render-linked-doc.ts`) ────────── */
|
|
14
14
|
export const EMBED_PROMPT_TITLE_MESSAGE = [
|
|
15
15
|
'com.labre.embed.prompt.title-message',
|
|
16
|
-
'Enter a title for the new
|
|
16
|
+
'Enter a title for the new page.',
|
|
17
17
|
];
|
|
18
18
|
export const EMBED_DOC_CREATED_UNDO_MESSAGE = [
|
|
19
19
|
'com.labre.embed.toast.undo-message',
|
|
@@ -103,7 +103,7 @@ export const EMBED_IFRAME_TOOLBAR_ORIGINAL = [
|
|
|
103
103
|
/**
|
|
104
104
|
* An alias (L7 dedupe): the same Title Case word as
|
|
105
105
|
* {@link TOOLBAR_CREATE_LINKED_DOC_TITLE}, distinct from the sentence-case
|
|
106
|
-
* `TOOLBAR_CREATE_LINKED_DOC` chrome wording ("Create linked
|
|
106
|
+
* `TOOLBAR_CREATE_LINKED_DOC` chrome wording ("Create linked page").
|
|
107
107
|
*/
|
|
108
108
|
export const EMBED_IFRAME_TOOLBAR_CREATE_LINKED_DOC = TOOLBAR_CREATE_LINKED_DOC_TITLE;
|
|
109
109
|
/** The "no link" notification's message (`embed-iframe-block.ts`). */
|
|
@@ -10,14 +10,14 @@ import { LinkDocTooltip, NewDocTooltip } from './tooltips.js';
|
|
|
10
10
|
const linkedDocSlashMenuConfig = {
|
|
11
11
|
items: [
|
|
12
12
|
{
|
|
13
|
-
name: 'New
|
|
13
|
+
name: 'New Page',
|
|
14
14
|
nameWording: EMBED_DOC_SLASH_NEW_DOC_NAME,
|
|
15
|
-
description: 'Start a new
|
|
15
|
+
description: 'Start a new page.',
|
|
16
16
|
descriptionWording: EMBED_DOC_SLASH_NEW_DOC_DESCRIPTION,
|
|
17
17
|
icon: PlusIcon(),
|
|
18
18
|
tooltip: {
|
|
19
19
|
figure: NewDocTooltip,
|
|
20
|
-
caption: 'New
|
|
20
|
+
caption: 'New Page',
|
|
21
21
|
captionWording: EMBED_DOC_SLASH_NEW_DOC_NAME,
|
|
22
22
|
},
|
|
23
23
|
group: '3_Page@0',
|
|
@@ -33,14 +33,14 @@ const linkedDocSlashMenuConfig = {
|
|
|
33
33
|
},
|
|
34
34
|
},
|
|
35
35
|
{
|
|
36
|
-
name: 'Linked
|
|
36
|
+
name: 'Linked Page',
|
|
37
37
|
nameWording: EMBED_DOC_SLASH_LINKED_DOC_NAME,
|
|
38
|
-
description: 'Link to another
|
|
38
|
+
description: 'Link to another page.',
|
|
39
39
|
descriptionWording: EMBED_DOC_SLASH_LINKED_DOC_DESCRIPTION,
|
|
40
40
|
icon: LinkedPageIcon(),
|
|
41
41
|
tooltip: {
|
|
42
42
|
figure: LinkDocTooltip,
|
|
43
|
-
caption: 'Link
|
|
43
|
+
caption: 'Link Page',
|
|
44
44
|
captionWording: EMBED_DOC_SLASH_LINKED_DOC_CAPTION,
|
|
45
45
|
},
|
|
46
46
|
searchAlias: ['dual link'],
|
|
@@ -32,7 +32,7 @@ const openDocActions = [
|
|
|
32
32
|
{
|
|
33
33
|
mode: 'open-in-active-view',
|
|
34
34
|
id: 'a.open-in-active-view',
|
|
35
|
-
label: 'Open this
|
|
35
|
+
label: 'Open this page',
|
|
36
36
|
labelWording: TOOLBAR_OPEN_THIS_DOC,
|
|
37
37
|
icon: ExpandFullIcon(),
|
|
38
38
|
},
|
|
@@ -228,9 +228,9 @@ const builtinSurfaceToolbarConfig = {
|
|
|
228
228
|
conversionsActionGroup,
|
|
229
229
|
{
|
|
230
230
|
id: 'b.insert-to-page',
|
|
231
|
-
label: 'Insert to
|
|
231
|
+
label: 'Insert to page',
|
|
232
232
|
labelWording: EMBED_DOC_INSERT_TO_PAGE,
|
|
233
|
-
tooltip: 'Insert to
|
|
233
|
+
tooltip: 'Insert to page',
|
|
234
234
|
tooltipWording: EMBED_DOC_INSERT_TO_PAGE,
|
|
235
235
|
icon: InsertIntoPageIcon(),
|
|
236
236
|
run: ctx => {
|
|
@@ -6,7 +6,7 @@ export declare const EMBED_DOC_SLASH_LINKED_DOC_NAME: ChromeWording;
|
|
|
6
6
|
export declare const EMBED_DOC_SLASH_LINKED_DOC_CAPTION: ChromeWording;
|
|
7
7
|
export declare const EMBED_DOC_SLASH_LINKED_DOC_DESCRIPTION: ChromeWording;
|
|
8
8
|
/**
|
|
9
|
-
* The "Open
|
|
9
|
+
* The "Open page" dropdown button — its own `aria-label`/`tooltip` AND the
|
|
10
10
|
* dropdown's single entry label, in both `embed-linked-doc-block/configs/toolbar.ts`
|
|
11
11
|
* and `embed-synced-doc-block/configs/toolbar.ts`.
|
|
12
12
|
*/
|
|
@@ -5,30 +5,30 @@ import { NEW_DOC_LABEL, } from '../affine-shared/services/index.js';
|
|
|
5
5
|
export const EMBED_DOC_SLASH_NEW_DOC_NAME = NEW_DOC_LABEL;
|
|
6
6
|
export const EMBED_DOC_SLASH_NEW_DOC_DESCRIPTION = [
|
|
7
7
|
'com.labre.embed-doc.slash.new-doc.description',
|
|
8
|
-
'Start a new
|
|
8
|
+
'Start a new page.',
|
|
9
9
|
];
|
|
10
10
|
export const EMBED_DOC_SLASH_LINKED_DOC_NAME = [
|
|
11
11
|
'com.labre.embed-doc.slash.linked-doc.name',
|
|
12
|
-
'Linked
|
|
12
|
+
'Linked Page',
|
|
13
13
|
];
|
|
14
14
|
/** The tooltip's own word — distinct from the item's name above. */
|
|
15
15
|
export const EMBED_DOC_SLASH_LINKED_DOC_CAPTION = [
|
|
16
16
|
'com.labre.embed-doc.slash.linked-doc.caption',
|
|
17
|
-
'Link
|
|
17
|
+
'Link Page',
|
|
18
18
|
];
|
|
19
19
|
export const EMBED_DOC_SLASH_LINKED_DOC_DESCRIPTION = [
|
|
20
20
|
'com.labre.embed-doc.slash.linked-doc.description',
|
|
21
|
-
'Link to another
|
|
21
|
+
'Link to another page.',
|
|
22
22
|
];
|
|
23
23
|
/* ── Toolbar chrome shared by the linked-doc and synced-doc toolbars ───── */
|
|
24
24
|
/**
|
|
25
|
-
* The "Open
|
|
25
|
+
* The "Open page" dropdown button — its own `aria-label`/`tooltip` AND the
|
|
26
26
|
* dropdown's single entry label, in both `embed-linked-doc-block/configs/toolbar.ts`
|
|
27
27
|
* and `embed-synced-doc-block/configs/toolbar.ts`.
|
|
28
28
|
*/
|
|
29
29
|
export const EMBED_DOC_OPEN_DOC = [
|
|
30
30
|
'com.labre.embed-doc.toolbar.open-doc',
|
|
31
|
-
'Open
|
|
31
|
+
'Open page',
|
|
32
32
|
];
|
|
33
33
|
/** The card's "last updated" date label (`components/embed-synced-doc-card.ts`, `embed-linked-doc-block.ts`). */
|
|
34
34
|
export const EMBED_DOC_UPDATED_LABEL = [
|
|
@@ -37,7 +37,7 @@ export const EMBED_DOC_UPDATED_LABEL = [
|
|
|
37
37
|
];
|
|
38
38
|
export const EMBED_DOC_INSERT_TO_PAGE = [
|
|
39
39
|
'com.labre.embed-doc.toolbar.insert-to-page',
|
|
40
|
-
'Insert to
|
|
40
|
+
'Insert to page',
|
|
41
41
|
];
|
|
42
42
|
export const EMBED_DOC_DUPLICATE_AS_NOTE = [
|
|
43
43
|
'com.labre.embed-doc.toolbar.duplicate-as-note',
|
|
@@ -54,7 +54,7 @@ export const EMBED_DOC_DUPLICATE_AS_NOTE_TOOLTIP = [
|
|
|
54
54
|
*/
|
|
55
55
|
export const EMBED_DOC_CARD_EMPTY_CONTENT = [
|
|
56
56
|
'com.labre.embed-doc.card.empty-content',
|
|
57
|
-
'This is a linked
|
|
57
|
+
'This is a linked page, you can add content here.',
|
|
58
58
|
];
|
|
59
59
|
/**
|
|
60
60
|
* This package's contribution to the translation-key manifest, listed in
|
|
@@ -1,5 +1,8 @@
|
|
|
1
|
+
import { EditPropsStore } from '../affine-shared/services/index.js';
|
|
2
|
+
import { GfxControllerIdentifier } from '../std/gfx/index.js';
|
|
1
3
|
import { z } from 'zod';
|
|
2
4
|
import { reorderFramePresentation } from './frame-order.js';
|
|
5
|
+
import { PresentTool } from './present-tool.js';
|
|
3
6
|
/**
|
|
4
7
|
* The frames' commands, `owner: 'core'`: a frame belongs to no framework, and
|
|
5
8
|
* `'core'` owners are exempt from the id-prefix rule (ADR 0008).
|
|
@@ -46,4 +49,41 @@ const reorderFrames = {
|
|
|
46
49
|
reorderFramePresentation(std, parsed.data.ids, parsed.data.before);
|
|
47
50
|
},
|
|
48
51
|
};
|
|
49
|
-
|
|
52
|
+
/**
|
|
53
|
+
* Start the slideshow (ADR 0034, amendment of 2026-10-13): the frames in
|
|
54
|
+
* presentation order, full screen, Esc to leave — the presentation tool owns
|
|
55
|
+
* all of it from here. The entry a host's view menu (or its header's
|
|
56
|
+
* "Present" button) runs; a document without frames gets the tool's own
|
|
57
|
+
* "no frame" notice.
|
|
58
|
+
*
|
|
59
|
+
* Edgeless only, like the tool it arms: a host showing the page view switches
|
|
60
|
+
* to the canvas with its OWN mode toggle first (it owns the toggle's state and
|
|
61
|
+
* the persisted mode), then runs this on the new editor scope once the canvas
|
|
62
|
+
* has mounted. It reads, so a reader may present. The fit or fill choice is the
|
|
63
|
+
* viewer's, stored by the frame panel's setting (`presentFillScreen`).
|
|
64
|
+
*/
|
|
65
|
+
const present = {
|
|
66
|
+
id: 'canvas.present',
|
|
67
|
+
owner: 'core',
|
|
68
|
+
kind: 'action',
|
|
69
|
+
labelKey: 'com.labre.command.canvas.present',
|
|
70
|
+
labelFallback: 'Present',
|
|
71
|
+
descriptionKey: 'com.labre.command.canvas.present.description',
|
|
72
|
+
descriptionFallback: 'Show the frames one after the other, full screen, in presentation order.',
|
|
73
|
+
category: 'present',
|
|
74
|
+
iconKey: 'canvas.present',
|
|
75
|
+
keywords: ['present', 'slides', 'slideshow', 'frames', 'presentation'],
|
|
76
|
+
surfaces: ['view-menu', 'palette'],
|
|
77
|
+
order: 20,
|
|
78
|
+
scope: 'edgeless',
|
|
79
|
+
defaultKeys: { mac: [], other: [] },
|
|
80
|
+
run: std => {
|
|
81
|
+
const fill = std
|
|
82
|
+
.getOptional(EditPropsStore)
|
|
83
|
+
?.getStorage('presentFillScreen');
|
|
84
|
+
std.get(GfxControllerIdentifier).tool.setTool(PresentTool, {
|
|
85
|
+
mode: fill ? 'fill' : 'fit',
|
|
86
|
+
});
|
|
87
|
+
},
|
|
88
|
+
};
|
|
89
|
+
export const frameCommands = [reorderFrames, present];
|
|
@@ -22,9 +22,9 @@ const builtinSurfaceToolbarConfig = {
|
|
|
22
22
|
actions: [
|
|
23
23
|
{
|
|
24
24
|
id: 'a.insert-into-page',
|
|
25
|
-
label: 'Insert into
|
|
25
|
+
label: 'Insert into Page',
|
|
26
26
|
labelWording: FRAME_TOOLBAR_INSERT_INTO_PAGE,
|
|
27
|
-
tooltip: 'Insert into
|
|
27
|
+
tooltip: 'Insert into Page',
|
|
28
28
|
tooltipWording: FRAME_TOOLBAR_INSERT_INTO_PAGE,
|
|
29
29
|
icon: InsertIntoPageIcon(),
|
|
30
30
|
when: ctx => ctx.getSurfaceModelsByType(FrameBlockModel).length === 1,
|
|
@@ -45,7 +45,7 @@ export const FRAME_TOOLBAR_INSERT_INTO_PAGE = TOOLBAR_INSERT_INTO_PAGE;
|
|
|
45
45
|
*/
|
|
46
46
|
export const FRAME_TOAST_INSERTED_MESSAGE = [
|
|
47
47
|
'com.labre.frame.toast.inserted-message',
|
|
48
|
-
'Frame has been inserted into
|
|
48
|
+
'Frame has been inserted into page',
|
|
49
49
|
];
|
|
50
50
|
export const FRAME_TOOLBAR_UNGROUP = TOOLBAR_UNGROUP;
|
|
51
51
|
export const FRAME_TOOLBAR_BACKGROUND = [
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { PresentationIcon } from '@blocksuite/icons/lit';
|
|
1
2
|
import { ViewExtensionProvider, } from '../affine-ext-loader/index.js';
|
|
2
3
|
import { CommandExtension } from '../std/index.js';
|
|
3
4
|
import { frameCommands } from './commands.js';
|
|
@@ -34,8 +35,12 @@ export class FrameViewExtension extends ViewExtensionProvider {
|
|
|
34
35
|
context.register(FrameBlockInteraction);
|
|
35
36
|
// The presentation order's one write (ADR 0034). The frame panel also
|
|
36
37
|
// mounts in page mode: it runs the imported descriptor, not this
|
|
37
|
-
// registration, so its reorder works in both modes.
|
|
38
|
-
|
|
38
|
+
// registration, so its reorder works in both modes. `canvas.present`
|
|
39
|
+
// rides along: a host's view menu lists it in edgeless mode, and a
|
|
40
|
+
// `frame: false` assembly loses it with the rest of the frame tooling.
|
|
41
|
+
context.register(CommandExtension(frameCommands, {
|
|
42
|
+
'canvas.present': PresentationIcon(),
|
|
43
|
+
}));
|
|
39
44
|
}
|
|
40
45
|
}
|
|
41
46
|
}
|
|
@@ -1,6 +1,13 @@
|
|
|
1
1
|
import { NoteBlockModel } from '../../affine-model/index.js';
|
|
2
2
|
import { type BlockStdScope, ShadowlessElement } from '../../std/index.js';
|
|
3
3
|
declare const EdgelessPageBlockTitle_base: typeof ShadowlessElement & import("../../global/utils/types.js").Constructor<import("../../global/lit/with-disposable.js").DisposableClass>;
|
|
4
|
+
/**
|
|
5
|
+
* The head of the page's note on the canvas: the host's title, if its
|
|
6
|
+
* `NoteConfigExtension` draws one, then the title band (ADR 0035 §11). The
|
|
7
|
+
* band sits inside the note's DOM so it follows the zoom like the rest of the
|
|
8
|
+
* note (REQ-PR-7); it draws nothing when the host registers no
|
|
9
|
+
* `TitleBandProvider`.
|
|
10
|
+
*/
|
|
4
11
|
export declare class EdgelessPageBlockTitle extends EdgelessPageBlockTitle_base {
|
|
5
12
|
render(): import("lit-html").TemplateResult<1> | undefined;
|
|
6
13
|
accessor std: BlockStdScope;
|
|
@@ -40,6 +40,13 @@ import { html } from 'lit';
|
|
|
40
40
|
import { property } from 'lit/decorators.js';
|
|
41
41
|
import { NoteConfigExtension } from '../config.js';
|
|
42
42
|
import * as styles from './edgeless-page-block-title.css.js';
|
|
43
|
+
/**
|
|
44
|
+
* The head of the page's note on the canvas: the host's title, if its
|
|
45
|
+
* `NoteConfigExtension` draws one, then the title band (ADR 0035 §11). The
|
|
46
|
+
* band sits inside the note's DOM so it follows the zoom like the rest of the
|
|
47
|
+
* note (REQ-PR-7); it draws nothing when the host registers no
|
|
48
|
+
* `TitleBandProvider`.
|
|
49
|
+
*/
|
|
43
50
|
let EdgelessPageBlockTitle = (() => {
|
|
44
51
|
let _classDecorators = [requiredProperties({
|
|
45
52
|
note: PropTypes.instanceOf(NoteBlockModel),
|
|
@@ -76,7 +83,14 @@ let EdgelessPageBlockTitle = (() => {
|
|
|
76
83
|
note: this.note,
|
|
77
84
|
std: this.std,
|
|
78
85
|
});
|
|
79
|
-
return html `<div class=${styles.pageBlockTitle}
|
|
86
|
+
return html `<div class=${styles.pageBlockTitle}>
|
|
87
|
+
${title}
|
|
88
|
+
<labre-title-band
|
|
89
|
+
.std=${this.std}
|
|
90
|
+
.docId=${this.std.store.id}
|
|
91
|
+
.surface=${'canvas'}
|
|
92
|
+
></labre-title-band>
|
|
93
|
+
</div>`;
|
|
80
94
|
}
|
|
81
95
|
#std_accessor_storage = __runInitializers(this, _std_initializers, void 0);
|
|
82
96
|
get std() { return this.#std_accessor_storage; }
|
|
@@ -161,23 +161,23 @@ export const NOTE_DISPLAY_MODE_PAGE = DISPLAY_MODE_PAGE;
|
|
|
161
161
|
*/
|
|
162
162
|
export const NOTE_TOAST_DISPLAYED_IN_PAGE_MODE = [
|
|
163
163
|
'com.labre.note.toast.displayed-in-page-mode',
|
|
164
|
-
'Note displayed in
|
|
164
|
+
'Note displayed in Page Mode',
|
|
165
165
|
];
|
|
166
166
|
export const NOTE_TOAST_REMOVED_FROM_PAGE_BODY = [
|
|
167
167
|
'com.labre.note.toast.removed-from-page.body',
|
|
168
|
-
'Content removed from your
|
|
168
|
+
'Content removed from your page. Find it in the TOC for quick navigation.',
|
|
169
169
|
];
|
|
170
170
|
export const NOTE_TOAST_ADDED_TO_PAGE_BODY = [
|
|
171
171
|
'com.labre.note.toast.added-to-page.body',
|
|
172
|
-
'Content added to your
|
|
172
|
+
'Content added to your page. Find it in the TOC for quick navigation.',
|
|
173
173
|
];
|
|
174
174
|
export const NOTE_TOAST_REMOVED_FROM_PAGE_BODY_NO_TOC = [
|
|
175
175
|
'com.labre.note.toast.removed-from-page.body-no-toc',
|
|
176
|
-
'Content removed from your
|
|
176
|
+
'Content removed from your page.',
|
|
177
177
|
];
|
|
178
178
|
export const NOTE_TOAST_ADDED_TO_PAGE_BODY_NO_TOC = [
|
|
179
179
|
'com.labre.note.toast.added-to-page.body-no-toc',
|
|
180
|
-
'Content added to your
|
|
180
|
+
'Content added to your page.',
|
|
181
181
|
];
|
|
182
182
|
export const NOTE_TOAST_VIEW_IN_TOC = [
|
|
183
183
|
'com.labre.note.toast.view-in-toc',
|
|
@@ -185,15 +185,15 @@ export const NOTE_TOAST_VIEW_IN_TOC = [
|
|
|
185
185
|
];
|
|
186
186
|
export const NOTE_TOOLBAR_DISPLAY_IN_PAGE = [
|
|
187
187
|
'com.labre.note.toolbar.display-in-page',
|
|
188
|
-
'Display in
|
|
188
|
+
'Display in Page',
|
|
189
189
|
];
|
|
190
190
|
export const NOTE_TOOLBAR_DISPLAYED_IN_PAGE = [
|
|
191
191
|
'com.labre.note.toolbar.displayed-in-page',
|
|
192
|
-
'Displayed in
|
|
192
|
+
'Displayed in Page',
|
|
193
193
|
];
|
|
194
194
|
export const NOTE_TOOLBAR_REMOVE_FROM_PAGE_TOOLTIP = [
|
|
195
195
|
'com.labre.note.toolbar.remove-from-page-tooltip',
|
|
196
|
-
'This note is part of
|
|
196
|
+
'This note is part of Page Mode. Click to remove it from the page.',
|
|
197
197
|
];
|
|
198
198
|
export const NOTE_TOOLBAR_SLICER = [
|
|
199
199
|
'com.labre.note.toolbar.slicer',
|
|
@@ -91,9 +91,9 @@ const copyDocLink = {
|
|
|
91
91
|
// carry a default chord, and the shortcut namespace would file it as a
|
|
92
92
|
// keymap row for a translator.
|
|
93
93
|
labelKey: 'com.labre.command.doc.copy-link',
|
|
94
|
-
labelFallback: 'Copy
|
|
94
|
+
labelFallback: 'Copy page link',
|
|
95
95
|
descriptionKey: 'com.labre.command.doc.copy-link.description',
|
|
96
|
-
descriptionFallback: 'Copy a link to this
|
|
96
|
+
descriptionFallback: 'Copy a link to this page, anchored on the selection, so it can be ' +
|
|
97
97
|
'pasted into a text as a reference.',
|
|
98
98
|
keywords: ['link', 'url', 'share', 'reference'],
|
|
99
99
|
surfaces: ['palette', 'agent'],
|
|
@@ -30,7 +30,7 @@ export declare const builtinToolbarConfig: {
|
|
|
30
30
|
readonly run: ({ host }: import("../../affine-shared/services/index.js").ToolbarContext) => void;
|
|
31
31
|
}, {
|
|
32
32
|
readonly id: "f.convert-to-linked-doc";
|
|
33
|
-
readonly tooltip: "Create Linked
|
|
33
|
+
readonly tooltip: "Create Linked Page";
|
|
34
34
|
readonly tooltipWording: import("../../affine-shared/services/index.js").ChromeWording;
|
|
35
35
|
readonly icon: import("lit-html").TemplateResult<1>;
|
|
36
36
|
readonly when: ({ chain, std }: import("../../affine-shared/services/index.js").ToolbarContext) => boolean;
|
|
@@ -168,7 +168,7 @@ const turnIntoDatabase = {
|
|
|
168
168
|
};
|
|
169
169
|
const turnIntoLinkedDoc = {
|
|
170
170
|
id: 'f.convert-to-linked-doc',
|
|
171
|
-
tooltip: 'Create Linked
|
|
171
|
+
tooltip: 'Create Linked Page',
|
|
172
172
|
tooltipWording: ROOT_TOOLBAR_CREATE_LINKED_DOC,
|
|
173
173
|
icon: LinkedPageIcon(),
|
|
174
174
|
when({ chain, std }) {
|
|
@@ -118,7 +118,7 @@ export declare const builtinMiscToolbarConfig: {
|
|
|
118
118
|
id: "d.conversions";
|
|
119
119
|
actions: [{
|
|
120
120
|
readonly id: "a.turn-into-linked-doc";
|
|
121
|
-
readonly label: "Turn into linked
|
|
121
|
+
readonly label: "Turn into linked page";
|
|
122
122
|
readonly labelWording: import("../../../../affine-shared/services/index.js").ChromeWording;
|
|
123
123
|
readonly icon: import("lit-html").TemplateResult<1>;
|
|
124
124
|
readonly when: (ctx: ToolbarContext) => boolean;
|
|
@@ -64,7 +64,7 @@ export declare const moreActions: [{
|
|
|
64
64
|
readonly id: "d.conversions";
|
|
65
65
|
readonly actions: [{
|
|
66
66
|
readonly id: "a.turn-into-linked-doc";
|
|
67
|
-
readonly label: "Turn into linked
|
|
67
|
+
readonly label: "Turn into linked page";
|
|
68
68
|
readonly labelWording: import("../../../../affine-shared/services/index.js").ChromeWording;
|
|
69
69
|
readonly icon: import("lit-html").TemplateResult<1>;
|
|
70
70
|
readonly when: (ctx: ToolbarContext) => boolean;
|
|
@@ -15,7 +15,7 @@ export declare const ROOT_TOOLBAR_CREATE_TABLE: ChromeWording;
|
|
|
15
15
|
* An alias (L7 dedupe): the same Title Case word as
|
|
16
16
|
* {@link TOOLBAR_CREATE_LINKED_DOC_TITLE}, distinct from the shared
|
|
17
17
|
* sentence-case `TOOLBAR_CREATE_LINKED_DOC` chrome wording
|
|
18
|
-
* (`com.labre.toolbar.create-linked-doc`, "Create linked
|
|
18
|
+
* (`com.labre.toolbar.create-linked-doc`, "Create linked page").
|
|
19
19
|
*/
|
|
20
20
|
export declare const ROOT_TOOLBAR_CREATE_LINKED_DOC: ChromeWording;
|
|
21
21
|
export declare const ROOT_ALIGNMENT_MENU_ARIA: ChromeWording;
|
|
@@ -19,7 +19,7 @@ export const ROOT_TOOLBAR_CREATE_TABLE = [
|
|
|
19
19
|
* An alias (L7 dedupe): the same Title Case word as
|
|
20
20
|
* {@link TOOLBAR_CREATE_LINKED_DOC_TITLE}, distinct from the shared
|
|
21
21
|
* sentence-case `TOOLBAR_CREATE_LINKED_DOC` chrome wording
|
|
22
|
-
* (`com.labre.toolbar.create-linked-doc`, "Create linked
|
|
22
|
+
* (`com.labre.toolbar.create-linked-doc`, "Create linked page").
|
|
23
23
|
*/
|
|
24
24
|
export const ROOT_TOOLBAR_CREATE_LINKED_DOC = TOOLBAR_CREATE_LINKED_DOC_TITLE;
|
|
25
25
|
/* ── The edgeless alignment menu (`edgeless/configs/toolbar/alignment.ts`) ── */
|
|
@@ -105,7 +105,7 @@ export const ROOT_TOOLBAR_SEND_BACKWARD = [
|
|
|
105
105
|
export const ROOT_TOOLBAR_RELOAD = TOOLBAR_RELOAD;
|
|
106
106
|
export const ROOT_TOOLBAR_TURN_INTO_LINKED_DOC = [
|
|
107
107
|
'com.labre.root.toolbar.turn-into-linked-doc',
|
|
108
|
-
'Turn into linked
|
|
108
|
+
'Turn into linked page',
|
|
109
109
|
];
|
|
110
110
|
export const ROOT_TOOLBAR_EDIT_LINK = [
|
|
111
111
|
'com.labre.root.toolbar.edit-link',
|