@formicoidea/labre-framework-cynefin 4.0.0 → 4.2.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.
@@ -21,7 +21,7 @@ export const cynefinEstuarineCommandsManifest = [
21
21
  labelKey: 'com.labre.commands.cynefin-estuarine.addCynefin',
22
22
  labelFallback: 'Cynefin framework',
23
23
  scope: 'edgeless',
24
- defaultKeys: { mac: [], other: [] },
24
+ defaultKeys: { mac: ['y', 'c'], other: ['y', 'c'] },
25
25
  },
26
26
  {
27
27
  id: 'cynefin-estuarine.addEstuarineMap',
@@ -29,7 +29,7 @@ export const cynefinEstuarineCommandsManifest = [
29
29
  labelKey: 'com.labre.commands.cynefin-estuarine.addEstuarineMap',
30
30
  labelFallback: 'Estuarine map',
31
31
  scope: 'edgeless',
32
- defaultKeys: { mac: [], other: [] },
32
+ defaultKeys: { mac: ['y', 'e'], other: ['y', 'e'] },
33
33
  },
34
34
  {
35
35
  id: 'cynefin-estuarine.addConstraintHexagon',
@@ -37,6 +37,6 @@ export const cynefinEstuarineCommandsManifest = [
37
37
  labelKey: 'com.labre.commands.cynefin-estuarine.addConstraintHexagon',
38
38
  labelFallback: 'Hexagon node',
39
39
  scope: 'edgeless',
40
- defaultKeys: { mac: [], other: [] },
40
+ defaultKeys: { mac: ['y', 'h'], other: ['y', 'h'] },
41
41
  },
42
42
  ];
package/dist/commands.js CHANGED
@@ -1,8 +1,18 @@
1
+ import { frameworkChord } from '@formicoidea/labre-core/shared/utils';
1
2
  import { createConstraintHexagon, createCynefin, createEstuarineMap, } from './actions.js';
2
3
  import { cynefinMenuIcon, cynefinToolbarIcon, estuarineMenuIcon, hexagonMenuIcon, } from './toolbar/icons.js';
4
+ /**
5
+ * The first keystroke of every Cynefin / Estuarine chord (`y c` places a
6
+ * Cynefin framework): `c` is the connector tool, so the second letter of the
7
+ * name. Spelled again as `FrameworkDescriptor.chordPrefix` in
8
+ * `@labre/affine`'s `frameworks.ts`; `chord-prefixes.unit.spec.ts` holds the
9
+ * two together (`docs/adr/0055`).
10
+ */
11
+ const CYNEFIN_CHORD_PREFIX = 'y';
3
12
  const SPECS = [
4
13
  {
5
14
  id: 'addCynefin',
15
+ key: 'c',
6
16
  label: 'Cynefin framework',
7
17
  iconKey: 'cynefin.frame',
8
18
  element: 'cynefin',
@@ -11,6 +21,7 @@ const SPECS = [
11
21
  },
12
22
  {
13
23
  id: 'addEstuarineMap',
24
+ key: 'e',
14
25
  label: 'Estuarine map',
15
26
  iconKey: 'estuarine.map',
16
27
  element: 'estuarine',
@@ -19,6 +30,7 @@ const SPECS = [
19
30
  },
20
31
  {
21
32
  id: 'addConstraintHexagon',
33
+ key: 'h',
22
34
  label: 'Hexagon node',
23
35
  iconKey: 'estuarine.hexagon',
24
36
  element: 'node:hexagon',
@@ -36,8 +48,10 @@ export const cynefinEstuarineCommands = SPECS.map((spec, order) => ({
36
48
  surfaces: ['senior-menu', 'catalogue', 'palette', 'agent'],
37
49
  order,
38
50
  scope: 'edgeless',
39
- defaultKeys: { mac: [], other: [] },
40
- availability: 'always',
51
+ defaultKeys: frameworkChord(CYNEFIN_CHORD_PREFIX, spec.key),
52
+ // It WRITES: a read-only document is one it cannot run on, so no surface
53
+ // offers it there and no chord arms for it (`docs/adr/0055`).
54
+ availability: 'editable',
41
55
  run: spec.run,
42
56
  telemetry: {
43
57
  framework: 'cynefin-estuarine',
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": "4.0.0",
4
+ "version": "4.2.0",
5
5
  "type": "module",
6
6
  "sideEffects": false,
7
7
  "author": "lajola",
@@ -35,7 +35,7 @@
35
35
  "dist"
36
36
  ],
37
37
  "dependencies": {
38
- "@formicoidea/labre-core": "4.0.0",
38
+ "@formicoidea/labre-core": "4.2.0",
39
39
  "@preact/signals-core": "^1.8.0",
40
40
  "lit": "^3.2.0"
41
41
  }