@formicoidea/labre-core 0.35.0 → 0.37.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_pkgs/affine-block-surface/extensions/reading-toolbar.js +12 -12
- package/dist/_pkgs/affine-block-surface/extensions/reading-widget.d.ts +25 -13
- package/dist/_pkgs/affine-block-surface/extensions/reading-widget.js +58 -24
- package/dist/_pkgs/affine-block-surface/extensions/reading.d.ts +83 -7
- package/dist/_pkgs/affine-block-surface/extensions/reading.js +41 -14
- package/dist/_pkgs/affine-block-surface/extensions/tags-toolbar.js +7 -0
- package/dist/_pkgs/affine-components/highlight-dropdown-menu/highlight-duotone-icon.js +8 -8
- package/dist/_pkgs/affine-components/highlight-dropdown-menu/text-duotone-icon.js +11 -11
- package/dist/_pkgs/affine-components/icons/text.js +426 -426
- package/dist/_pkgs/affine-components/toolbar/menu-button.js +13 -0
- package/dist/_pkgs/affine-gfx-shape/element-view.d.ts +42 -1
- package/dist/_pkgs/affine-gfx-shape/element-view.js +54 -0
- package/dist/_pkgs/affine-gfx-shape/toolbar/index.d.ts +1 -0
- package/dist/_pkgs/affine-gfx-shape/toolbar/index.js +1 -0
- package/dist/_pkgs/affine-gfx-shape/toolbar/palette-color-action.d.ts +25 -0
- package/dist/_pkgs/affine-gfx-shape/toolbar/palette-color-action.js +123 -0
- package/dist/_pkgs/affine-model/elements/wardley/node.d.ts +21 -6
- package/dist/_pkgs/affine-model/elements/wardley/node.js +20 -5
- package/dist/_pkgs/affine-shared/services/telemetry-service/block-lifecycle-watcher.d.ts +16 -1
- package/dist/_pkgs/affine-shared/services/telemetry-service/block-lifecycle-watcher.js +27 -2
- package/dist/_pkgs/affine-widget-edgeless-auto-connect/index.js +124 -124
- package/dist/_pkgs/affine-widget-edgeless-zoom-toolbar/index.js +26 -26
- package/dist/_pkgs/affine-widget-keyboard-toolbar/icons.js +98 -98
- package/dist/_pkgs/affine-widget-page-dragging-area/index.js +10 -10
- package/dist/_pkgs/affine-widget-viewport-overlay/index.js +13 -13
- package/dist/_pkgs/data-view/core/group-by/renderer/boolean-group.js +11 -11
- package/dist/_pkgs/data-view/core/utils/menu-title.js +17 -17
- package/dist/_pkgs/data-view/view-presets/table/pc-virtual/group/top/group-title.js +18 -18
- package/dist/_pkgs/std/extension/command-registry.d.ts +15 -8
- package/dist/extensions/command-telemetry.js +4 -0
- package/dist/translations.js +8 -2
- package/package.json +1 -1
|
@@ -2,21 +2,21 @@ import { CheckBoxCheckSolidIcon, CheckBoxUnIcon } from '@blocksuite/icons/lit';
|
|
|
2
2
|
import { css, html } from 'lit';
|
|
3
3
|
import { BaseGroup } from './base.js';
|
|
4
4
|
export class BooleanGroupView extends BaseGroup {
|
|
5
|
-
static { this.styles = css `
|
|
6
|
-
.data-view-group-title-boolean-view {
|
|
7
|
-
display: flex;
|
|
8
|
-
align-items: center;
|
|
9
|
-
}
|
|
10
|
-
.data-view-group-title-boolean-view svg {
|
|
11
|
-
width: 20px;
|
|
12
|
-
height: 20px;
|
|
13
|
-
}
|
|
5
|
+
static { this.styles = css `
|
|
6
|
+
.data-view-group-title-boolean-view {
|
|
7
|
+
display: flex;
|
|
8
|
+
align-items: center;
|
|
9
|
+
}
|
|
10
|
+
.data-view-group-title-boolean-view svg {
|
|
11
|
+
width: 20px;
|
|
12
|
+
height: 20px;
|
|
13
|
+
}
|
|
14
14
|
`; }
|
|
15
15
|
render() {
|
|
16
|
-
return html ` <div class="data-view-group-title-boolean-view">
|
|
16
|
+
return html ` <div class="data-view-group-title-boolean-view">
|
|
17
17
|
${this.value
|
|
18
18
|
? CheckBoxCheckSolidIcon({ style: `color:#1E96EB` })
|
|
19
|
-
: CheckBoxUnIcon()}
|
|
19
|
+
: CheckBoxUnIcon()}
|
|
20
20
|
</div>`;
|
|
21
21
|
}
|
|
22
22
|
}
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
import { ArrowLeftBigIcon } from '@blocksuite/icons/lit';
|
|
2
2
|
import { html } from 'lit';
|
|
3
3
|
export const menuTitle = (name, onBack) => {
|
|
4
|
-
return html `
|
|
5
|
-
<div
|
|
6
|
-
style="display:flex;align-items:center;gap: 4px;padding: 3px 3px 3px 2px"
|
|
7
|
-
>
|
|
8
|
-
<div
|
|
9
|
-
@click=${onBack}
|
|
10
|
-
class="dv-icon-20 dv-hover dv-pd-2 dv-round-4"
|
|
11
|
-
style="display:flex;"
|
|
12
|
-
>
|
|
13
|
-
${ArrowLeftBigIcon()}
|
|
14
|
-
</div>
|
|
15
|
-
<div
|
|
16
|
-
style="font-weight:500;font-size: 14px;line-height: 22px;color: var(--affine-text-primary-color)"
|
|
17
|
-
>
|
|
18
|
-
${name}
|
|
19
|
-
</div>
|
|
20
|
-
</div>
|
|
4
|
+
return html `
|
|
5
|
+
<div
|
|
6
|
+
style="display:flex;align-items:center;gap: 4px;padding: 3px 3px 3px 2px"
|
|
7
|
+
>
|
|
8
|
+
<div
|
|
9
|
+
@click=${onBack}
|
|
10
|
+
class="dv-icon-20 dv-hover dv-pd-2 dv-round-4"
|
|
11
|
+
style="display:flex;"
|
|
12
|
+
>
|
|
13
|
+
${ArrowLeftBigIcon()}
|
|
14
|
+
</div>
|
|
15
|
+
<div
|
|
16
|
+
style="font-weight:500;font-size: 14px;line-height: 22px;color: var(--affine-text-primary-color)"
|
|
17
|
+
>
|
|
18
|
+
${name}
|
|
19
|
+
</div>
|
|
20
|
+
</div>
|
|
21
21
|
`;
|
|
22
22
|
};
|
|
@@ -19,9 +19,9 @@ export const GroupTitle = (groupData, ops) => {
|
|
|
19
19
|
}
|
|
20
20
|
const icon = groupData.value == null
|
|
21
21
|
? ''
|
|
22
|
-
: html ` <uni-lit
|
|
23
|
-
class="${groupHeaderIcon}"
|
|
24
|
-
.uni="${groupData.property.icon}"
|
|
22
|
+
: html ` <uni-lit
|
|
23
|
+
class="${groupHeaderIcon}"
|
|
24
|
+
.uni="${groupData.property.icon}"
|
|
25
25
|
></uni-lit>`;
|
|
26
26
|
const props = {
|
|
27
27
|
group: groupData,
|
|
@@ -29,25 +29,25 @@ export const GroupTitle = (groupData, ops) => {
|
|
|
29
29
|
};
|
|
30
30
|
const showColumnName = groupData.property.type$.value === 'checkbox';
|
|
31
31
|
const columnName = showColumnName
|
|
32
|
-
? html `<span class="${groupHeaderTitle}"
|
|
33
|
-
>${groupData.property.name$.value}</span
|
|
32
|
+
? html `<span class="${groupHeaderTitle}"
|
|
33
|
+
>${groupData.property.name$.value}</span
|
|
34
34
|
>`
|
|
35
35
|
: nothing;
|
|
36
36
|
const opsClass = clsx(ops.groupHover && show, groupHeaderOps);
|
|
37
|
-
return html `
|
|
38
|
-
<div class="${groupTitleRow}">
|
|
39
|
-
${icon} ${renderUniLit(view, props)} ${columnName}
|
|
40
|
-
${GroupHeaderCount(groupData)}
|
|
41
|
-
</div>
|
|
37
|
+
return html `
|
|
38
|
+
<div class="${groupTitleRow}">
|
|
39
|
+
${icon} ${renderUniLit(view, props)} ${columnName}
|
|
40
|
+
${GroupHeaderCount(groupData)}
|
|
41
|
+
</div>
|
|
42
42
|
${!ops.readonly
|
|
43
|
-
? html ` <div class="${opsClass}">
|
|
44
|
-
<div @click="${ops.clickAdd}" class="${groupHeaderOp}">
|
|
45
|
-
${PlusIcon()}
|
|
46
|
-
</div>
|
|
47
|
-
<div @click="${ops.clickOps}" class="${groupHeaderOp}">
|
|
48
|
-
${MoreHorizontalIcon()}
|
|
49
|
-
</div>
|
|
43
|
+
? html ` <div class="${opsClass}">
|
|
44
|
+
<div @click="${ops.clickAdd}" class="${groupHeaderOp}">
|
|
45
|
+
${PlusIcon()}
|
|
46
|
+
</div>
|
|
47
|
+
<div @click="${ops.clickOps}" class="${groupHeaderOp}">
|
|
48
|
+
${MoreHorizontalIcon()}
|
|
49
|
+
</div>
|
|
50
50
|
</div>`
|
|
51
|
-
: nothing}
|
|
51
|
+
: nothing}
|
|
52
52
|
`;
|
|
53
53
|
};
|
|
@@ -121,11 +121,21 @@ export interface CommandDescriptor<P = void> {
|
|
|
121
121
|
* Emitted centrally by {@link runCommand} — never by the command body.
|
|
122
122
|
* `framework` is the code-side id; the reporter maps it through
|
|
123
123
|
* `FrameworkDescriptor.telemetryKey` so the wire value stays historical.
|
|
124
|
+
*
|
|
125
|
+
* `board: true` marks the command that puts a framework's BOARD on the
|
|
126
|
+
* canvas (a Wardley background, a BPMN pool, a C4 board…). Every framework
|
|
127
|
+
* names its board differently in `element` — `background:classic`, `pool`,
|
|
128
|
+
* `board`, `cynefin` — so "boards created per framework" cannot be read off
|
|
129
|
+
* a prefix; it is declared here, at the command, and the reporter forwards
|
|
130
|
+
* it as the `role` dimension.
|
|
124
131
|
*/
|
|
125
|
-
telemetry?:
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
132
|
+
telemetry?: CommandTelemetry;
|
|
133
|
+
}
|
|
134
|
+
/** See {@link CommandDescriptor.telemetry}. */
|
|
135
|
+
export interface CommandTelemetry {
|
|
136
|
+
framework: FrameworkId;
|
|
137
|
+
element: string;
|
|
138
|
+
board?: true;
|
|
129
139
|
}
|
|
130
140
|
/**
|
|
131
141
|
* A command with its parameter contract erased — what the REGISTRY holds.
|
|
@@ -189,10 +199,7 @@ export interface CommandManifestEntry {
|
|
|
189
199
|
* command is. Derived from `CommandDescriptor.params`, never authored twice.
|
|
190
200
|
*/
|
|
191
201
|
params?: CommandParam[];
|
|
192
|
-
telemetry?:
|
|
193
|
-
framework: FrameworkId;
|
|
194
|
-
element: string;
|
|
195
|
-
};
|
|
202
|
+
telemetry?: CommandTelemetry;
|
|
196
203
|
}
|
|
197
204
|
/**
|
|
198
205
|
* The per-framework identity consumers 2-5 need, and that nothing owned before
|
|
@@ -50,6 +50,10 @@ export function reportCommandTelemetry(track, command, invocation) {
|
|
|
50
50
|
// invoked the command. This is the metric that will arbitrate the 14
|
|
51
51
|
// senior slots against the sidepanel against the palette.
|
|
52
52
|
control: invocation.source,
|
|
53
|
+
// Only present on a framework's board command: the ratio "boards created
|
|
54
|
+
// / elements added" per framework is the signal that the board gesture is
|
|
55
|
+
// understood at all. Absent otherwise, so no existing event grows a key.
|
|
56
|
+
...(telemetry.board ? { role: 'board' } : {}),
|
|
53
57
|
});
|
|
54
58
|
}
|
|
55
59
|
/**
|
package/dist/translations.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { EXEMPTION_FALLBACK, PROVENANCE_FALLBACK,
|
|
1
|
+
import { EXEMPTION_FALLBACK, PROVENANCE_FALLBACK, SEVERITY_FALLBACK, } from './_pkgs/affine-block-surface/index.js';
|
|
2
2
|
import { CHROME_WORDINGS } from './_pkgs/affine-shared/services/index.js';
|
|
3
3
|
import { collectTranslationKeys, commandCategoryTranslationEntries, commandTranslationEntries, mergeTranslationEntries, } from './_pkgs/std/index.js';
|
|
4
4
|
import { getCommands } from './commands.js';
|
|
@@ -19,7 +19,13 @@ const CHROME_TABLES = [
|
|
|
19
19
|
// a host building a catalogue must not have to come back for a fourth word
|
|
20
20
|
// the day the first org profile ships.
|
|
21
21
|
['com.labre.validation.provenance.', PROVENANCE_FALLBACK],
|
|
22
|
-
|
|
22
|
+
// `com.labre.reading.relations.consumers` / `.suppliers` USED to be here, as
|
|
23
|
+
// a chrome table walked out of the reading widget. They moved to Wardley's
|
|
24
|
+
// own `ReadingProfile` when every framework gained one: the two wordings are
|
|
25
|
+
// a value chain's ("Consumers (above)"), not the panel's, and a BPMN sequence
|
|
26
|
+
// flow names its sides differently. They now arrive with the rest of the
|
|
27
|
+
// declared data, through `wardleyTranslationEntries`, under source `reading`
|
|
28
|
+
// and with the same keys and the same English.
|
|
23
29
|
];
|
|
24
30
|
const chromeTableEntries = () => CHROME_TABLES.flatMap(([prefix, table]) => Object.entries(table).map(([suffix, fallback]) => ({
|
|
25
31
|
key: `${prefix}${suffix}`,
|