@formicoidea/labre-framework-cynefin 0.33.0 → 0.34.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/commands-manifest.d.ts +18 -0
- package/dist/commands-manifest.js +42 -0
- package/dist/cynefin/toolbar/config.d.ts +5 -1
- package/dist/cynefin/toolbar/config.js +8 -3
- package/dist/estuarine/toolbar/config.d.ts +6 -1
- package/dist/estuarine/toolbar/config.js +8 -3
- package/dist/translations.js +8 -2
- package/package.json +6 -2
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { ShortcutManifestEntry } from '@formicoidea/labre-core/std';
|
|
2
|
+
/**
|
|
3
|
+
* The Cynefin / Estuarine commands as SHORTCUT-MANIFEST rows — id, label, chord, scope,
|
|
4
|
+
* owner — and nothing else.
|
|
5
|
+
*
|
|
6
|
+
* DATA ONLY, and that is the whole point (`docs/adr/0008` § Packaging). A
|
|
7
|
+
* `CommandDescriptor` carries its `run`, so a host settings pane that imports
|
|
8
|
+
* the package entry to list names and chords drags the entire action graph —
|
|
9
|
+
* the import/export machinery, the surface and gfx deep paths — into its
|
|
10
|
+
* chunk. This module has type-only imports, so the published bundle exposes it
|
|
11
|
+
* as `./commands-manifest`: a few hundred bytes that reference nothing.
|
|
12
|
+
*
|
|
13
|
+
* GENERATED-SHAPED, hand-committed: `commands-manifest.unit.spec.ts` asserts
|
|
14
|
+
* row-for-row equality with `toShortcutManifestEntry` over {@link cynefinEstuarineCommands},
|
|
15
|
+
* so this file cannot drift from the commands it projects. Add a command and
|
|
16
|
+
* the test says exactly what to add here.
|
|
17
|
+
*/
|
|
18
|
+
export declare const cynefinEstuarineCommandsManifest: ShortcutManifestEntry[];
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The Cynefin / Estuarine commands as SHORTCUT-MANIFEST rows — id, label, chord, scope,
|
|
3
|
+
* owner — and nothing else.
|
|
4
|
+
*
|
|
5
|
+
* DATA ONLY, and that is the whole point (`docs/adr/0008` § Packaging). A
|
|
6
|
+
* `CommandDescriptor` carries its `run`, so a host settings pane that imports
|
|
7
|
+
* the package entry to list names and chords drags the entire action graph —
|
|
8
|
+
* the import/export machinery, the surface and gfx deep paths — into its
|
|
9
|
+
* chunk. This module has type-only imports, so the published bundle exposes it
|
|
10
|
+
* as `./commands-manifest`: a few hundred bytes that reference nothing.
|
|
11
|
+
*
|
|
12
|
+
* GENERATED-SHAPED, hand-committed: `commands-manifest.unit.spec.ts` asserts
|
|
13
|
+
* row-for-row equality with `toShortcutManifestEntry` over {@link cynefinEstuarineCommands},
|
|
14
|
+
* so this file cannot drift from the commands it projects. Add a command and
|
|
15
|
+
* the test says exactly what to add here.
|
|
16
|
+
*/
|
|
17
|
+
export const cynefinEstuarineCommandsManifest = [
|
|
18
|
+
{
|
|
19
|
+
id: 'cynefin-estuarine.addCynefin',
|
|
20
|
+
owner: 'cynefin-estuarine',
|
|
21
|
+
labelKey: 'com.labre.commands.cynefin-estuarine.addCynefin',
|
|
22
|
+
labelFallback: 'Cynefin framework',
|
|
23
|
+
scope: 'edgeless',
|
|
24
|
+
defaultKeys: { mac: [], other: [] },
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
id: 'cynefin-estuarine.addEstuarineMap',
|
|
28
|
+
owner: 'cynefin-estuarine',
|
|
29
|
+
labelKey: 'com.labre.commands.cynefin-estuarine.addEstuarineMap',
|
|
30
|
+
labelFallback: 'Estuarine map',
|
|
31
|
+
scope: 'edgeless',
|
|
32
|
+
defaultKeys: { mac: [], other: [] },
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
id: 'cynefin-estuarine.addConstraintHexagon',
|
|
36
|
+
owner: 'cynefin-estuarine',
|
|
37
|
+
labelKey: 'com.labre.commands.cynefin-estuarine.addConstraintHexagon',
|
|
38
|
+
labelFallback: 'Hexagon node',
|
|
39
|
+
scope: 'edgeless',
|
|
40
|
+
defaultKeys: { mac: [], other: [] },
|
|
41
|
+
},
|
|
42
|
+
];
|
|
@@ -1,27 +1,31 @@
|
|
|
1
|
-
import { type ToolbarContext } from '@formicoidea/labre-core/shared/services';
|
|
1
|
+
import { type ChromeWording, type ToolbarContext } from '@formicoidea/labre-core/shared/services';
|
|
2
2
|
import { type TemplateResult } from 'lit';
|
|
3
3
|
export declare const cynefinToolbarConfig: {
|
|
4
4
|
readonly actions: [{
|
|
5
5
|
id: string;
|
|
6
6
|
tooltip: string;
|
|
7
|
+
tooltipWording: ChromeWording | undefined;
|
|
7
8
|
icon: TemplateResult;
|
|
8
9
|
active(ctx: ToolbarContext): boolean;
|
|
9
10
|
run(ctx: ToolbarContext): void;
|
|
10
11
|
}, {
|
|
11
12
|
id: string;
|
|
12
13
|
tooltip: string;
|
|
14
|
+
tooltipWording: ChromeWording | undefined;
|
|
13
15
|
icon: TemplateResult;
|
|
14
16
|
active(ctx: ToolbarContext): boolean;
|
|
15
17
|
run(ctx: ToolbarContext): void;
|
|
16
18
|
}, {
|
|
17
19
|
id: string;
|
|
18
20
|
tooltip: string;
|
|
21
|
+
tooltipWording: ChromeWording | undefined;
|
|
19
22
|
icon: TemplateResult;
|
|
20
23
|
active(ctx: ToolbarContext): boolean;
|
|
21
24
|
run(ctx: ToolbarContext): void;
|
|
22
25
|
}, {
|
|
23
26
|
id: string;
|
|
24
27
|
tooltip: string;
|
|
28
|
+
tooltipWording: ChromeWording | undefined;
|
|
25
29
|
icon: TemplateResult;
|
|
26
30
|
active(ctx: ToolbarContext): boolean;
|
|
27
31
|
run(ctx: ToolbarContext): void;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { EdgelessCRUDIdentifier } from '@formicoidea/labre-core/blocks/surface';
|
|
2
2
|
import { CynefinElementModel } from '@formicoidea/labre-core/model';
|
|
3
|
-
import { ToolbarModuleExtension, } from '@formicoidea/labre-core/shared/services';
|
|
3
|
+
import { BOARD_RESIZE_TOGGLE, ToolbarModuleExtension, } from '@formicoidea/labre-core/shared/services';
|
|
4
4
|
import { BlockFlavourIdentifier } from '@formicoidea/labre-core/std';
|
|
5
5
|
import { html } from 'lit';
|
|
6
6
|
const ResizeIcon = html `<svg
|
|
@@ -55,7 +55,12 @@ const LiminalIcon = html `<svg
|
|
|
55
55
|
function booleanToggle(id, tooltip, icon, prop) {
|
|
56
56
|
return {
|
|
57
57
|
id,
|
|
58
|
-
tooltip,
|
|
58
|
+
tooltip: typeof tooltip === 'string' ? tooltip : tooltip[1],
|
|
59
|
+
// The declared wording, when the caller gave one instead of a literal:
|
|
60
|
+
// `combine` resolves it against the host's catalogue and writes it over
|
|
61
|
+
// the English default above, so a playground with no catalogue reads
|
|
62
|
+
// exactly what it read before (#183).
|
|
63
|
+
tooltipWording: typeof tooltip === 'string' ? undefined : tooltip,
|
|
59
64
|
icon,
|
|
60
65
|
active(ctx) {
|
|
61
66
|
const models = ctx.getSurfaceModelsByType(CynefinElementModel);
|
|
@@ -75,7 +80,7 @@ function booleanToggle(id, tooltip, icon, prop) {
|
|
|
75
80
|
}
|
|
76
81
|
export const cynefinToolbarConfig = {
|
|
77
82
|
actions: [
|
|
78
|
-
booleanToggle('a.toggle-resize',
|
|
83
|
+
booleanToggle('a.toggle-resize', BOARD_RESIZE_TOGGLE, ResizeIcon, 'resizeEnabled'),
|
|
79
84
|
booleanToggle('b.toggle-titles', 'Show / hide titles', TitlesIcon, 'showTitles'),
|
|
80
85
|
booleanToggle('c.toggle-descriptions', 'Show / hide explanatory text', DescIcon, 'showDescriptions'),
|
|
81
86
|
booleanToggle('d.toggle-liminal', 'Show / hide liminal line', LiminalIcon, 'showLiminalLine'),
|
|
@@ -1,33 +1,38 @@
|
|
|
1
|
-
import { type ToolbarContext } from '@formicoidea/labre-core/shared/services';
|
|
1
|
+
import { type ChromeWording, type ToolbarContext } from '@formicoidea/labre-core/shared/services';
|
|
2
2
|
import { type TemplateResult } from 'lit';
|
|
3
3
|
export declare const estuarineToolbarConfig: {
|
|
4
4
|
readonly actions: [{
|
|
5
5
|
id: string;
|
|
6
6
|
tooltip: string;
|
|
7
|
+
tooltipWording: ChromeWording | undefined;
|
|
7
8
|
icon: TemplateResult;
|
|
8
9
|
active(ctx: ToolbarContext): boolean;
|
|
9
10
|
run(ctx: ToolbarContext): void;
|
|
10
11
|
}, {
|
|
11
12
|
id: string;
|
|
12
13
|
tooltip: string;
|
|
14
|
+
tooltipWording: ChromeWording | undefined;
|
|
13
15
|
icon: TemplateResult;
|
|
14
16
|
active(ctx: ToolbarContext): boolean;
|
|
15
17
|
run(ctx: ToolbarContext): void;
|
|
16
18
|
}, {
|
|
17
19
|
id: string;
|
|
18
20
|
tooltip: string;
|
|
21
|
+
tooltipWording: ChromeWording | undefined;
|
|
19
22
|
icon: TemplateResult;
|
|
20
23
|
active(ctx: ToolbarContext): boolean;
|
|
21
24
|
run(ctx: ToolbarContext): void;
|
|
22
25
|
}, {
|
|
23
26
|
id: string;
|
|
24
27
|
tooltip: string;
|
|
28
|
+
tooltipWording: ChromeWording | undefined;
|
|
25
29
|
icon: TemplateResult;
|
|
26
30
|
active(ctx: ToolbarContext): boolean;
|
|
27
31
|
run(ctx: ToolbarContext): void;
|
|
28
32
|
}, {
|
|
29
33
|
id: string;
|
|
30
34
|
tooltip: string;
|
|
35
|
+
tooltipWording: ChromeWording | undefined;
|
|
31
36
|
icon: TemplateResult;
|
|
32
37
|
active(ctx: ToolbarContext): boolean;
|
|
33
38
|
run(ctx: ToolbarContext): void;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { EdgelessCRUDIdentifier } from '@formicoidea/labre-core/blocks/surface';
|
|
2
2
|
import { EstuarineElementModel } from '@formicoidea/labre-core/model';
|
|
3
|
-
import { ToolbarModuleExtension, } from '@formicoidea/labre-core/shared/services';
|
|
3
|
+
import { BOARD_RESIZE_TOGGLE, ToolbarModuleExtension, } from '@formicoidea/labre-core/shared/services';
|
|
4
4
|
import { BlockFlavourIdentifier } from '@formicoidea/labre-core/std';
|
|
5
5
|
import { html } from 'lit';
|
|
6
6
|
const ResizeIcon = html `<svg
|
|
@@ -67,7 +67,12 @@ const AxisIcon = html `<svg
|
|
|
67
67
|
function booleanToggle(id, tooltip, icon, prop) {
|
|
68
68
|
return {
|
|
69
69
|
id,
|
|
70
|
-
tooltip,
|
|
70
|
+
tooltip: typeof tooltip === 'string' ? tooltip : tooltip[1],
|
|
71
|
+
// The declared wording, when the caller gave one instead of a literal:
|
|
72
|
+
// `combine` resolves it against the host's catalogue and writes it over
|
|
73
|
+
// the English default above, so a playground with no catalogue reads
|
|
74
|
+
// exactly what it read before (#183).
|
|
75
|
+
tooltipWording: typeof tooltip === 'string' ? undefined : tooltip,
|
|
71
76
|
icon,
|
|
72
77
|
active(ctx) {
|
|
73
78
|
const models = ctx.getSurfaceModelsByType(EstuarineElementModel);
|
|
@@ -87,7 +92,7 @@ function booleanToggle(id, tooltip, icon, prop) {
|
|
|
87
92
|
}
|
|
88
93
|
export const estuarineToolbarConfig = {
|
|
89
94
|
actions: [
|
|
90
|
-
booleanToggle('a.toggle-resize',
|
|
95
|
+
booleanToggle('a.toggle-resize', BOARD_RESIZE_TOGGLE, ResizeIcon, 'resizeEnabled'),
|
|
91
96
|
booleanToggle('b.toggle-liminal', 'Show / hide the Liminal line', LiminalIcon, 'showLiminal'),
|
|
92
97
|
booleanToggle('c.toggle-volatile', 'Show / hide the Volatile line', VolatileIcon, 'showVolatile'),
|
|
93
98
|
booleanToggle('d.toggle-counterfactual', 'Show / hide the Counter-factual line', CounterfactualIcon, 'showCounterfactual'),
|
package/dist/translations.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { collectTranslationKeys, commandTranslationEntries, mergeTranslationEntries, } from '@formicoidea/labre-core/std';
|
|
1
|
+
import { collectTranslationKeys, commandCategoryTranslationEntries, commandTranslationEntries, mergeTranslationEntries, } from '@formicoidea/labre-core/std';
|
|
2
2
|
import { cynefinEstuarineCommands } from './commands.js';
|
|
3
3
|
import { ESTUARINE_NUDGES } from './estuarine/nudges.js';
|
|
4
4
|
import { ESTUARINE_ROLES } from './estuarine/roles.js';
|
|
@@ -19,4 +19,10 @@ import { ESTUARINE_ROLES } from './estuarine/roles.js';
|
|
|
19
19
|
* `cynefinEstuarineCommands` into the command registry. See
|
|
20
20
|
* `packages/affine/all/src/translations.ts`.
|
|
21
21
|
*/
|
|
22
|
-
export const cynefinEstuarineTranslationEntries = mergeTranslationEntries(commandTranslationEntries(cynefinEstuarineCommands),
|
|
22
|
+
export const cynefinEstuarineTranslationEntries = mergeTranslationEntries(commandTranslationEntries(cynefinEstuarineCommands),
|
|
23
|
+
// The catalogue's own group headers, derived from the very categories
|
|
24
|
+
// these commands declare. They ship WITH the framework because core's
|
|
25
|
+
// registry names no framework category in the bundled distribution, so a
|
|
26
|
+
// host that composed core's manifest alone drew translated entries under
|
|
27
|
+
// English headers (#183).
|
|
28
|
+
commandCategoryTranslationEntries(cynefinEstuarineCommands), collectTranslationKeys('role', ESTUARINE_ROLES), collectTranslationKeys('nudge', ESTUARINE_NUDGES));
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@formicoidea/labre-framework-cynefin",
|
|
3
3
|
"description": "Labre cynefin-estuarine framework for @formicoidea/labre-core.",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.34.1",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": false,
|
|
7
7
|
"author": "lajola",
|
|
@@ -21,13 +21,17 @@
|
|
|
21
21
|
"./descriptor": {
|
|
22
22
|
"types": "./dist/descriptor.d.ts",
|
|
23
23
|
"import": "./dist/descriptor.js"
|
|
24
|
+
},
|
|
25
|
+
"./commands-manifest": {
|
|
26
|
+
"types": "./dist/commands-manifest.d.ts",
|
|
27
|
+
"import": "./dist/commands-manifest.js"
|
|
24
28
|
}
|
|
25
29
|
},
|
|
26
30
|
"files": [
|
|
27
31
|
"dist"
|
|
28
32
|
],
|
|
29
33
|
"dependencies": {
|
|
30
|
-
"@formicoidea/labre-core": "0.
|
|
34
|
+
"@formicoidea/labre-core": "0.34.1",
|
|
31
35
|
"@preact/signals-core": "^1.8.0",
|
|
32
36
|
"lit": "^3.2.0"
|
|
33
37
|
}
|