@formicoidea/labre-framework-edgy 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.
@@ -37,7 +37,7 @@ export const edgyCommandsManifest = [
37
37
  labelKey: 'com.labre.commands.edgy.addBoard',
38
38
  labelFallback: 'EDGY board (hover spotlight)',
39
39
  scope: 'edgeless',
40
- defaultKeys: { mac: [], other: [] },
40
+ defaultKeys: { mac: ['g', 'b'], other: ['g', 'b'] },
41
41
  },
42
42
  {
43
43
  id: 'edgy.addPeople',
@@ -45,7 +45,7 @@ export const edgyCommandsManifest = [
45
45
  labelKey: 'com.labre.commands.edgy.addPeople',
46
46
  labelFallback: 'People',
47
47
  scope: 'edgeless',
48
- defaultKeys: { mac: [], other: [] },
48
+ defaultKeys: { mac: ['g', 'p'], other: ['g', 'p'] },
49
49
  },
50
50
  {
51
51
  id: 'edgy.addOutcome',
@@ -53,7 +53,7 @@ export const edgyCommandsManifest = [
53
53
  labelKey: 'com.labre.commands.edgy.addOutcome',
54
54
  labelFallback: 'Outcome',
55
55
  scope: 'edgeless',
56
- defaultKeys: { mac: [], other: [] },
56
+ defaultKeys: { mac: ['g', 'o'], other: ['g', 'o'] },
57
57
  },
58
58
  {
59
59
  id: 'edgy.addObject',
@@ -61,7 +61,7 @@ export const edgyCommandsManifest = [
61
61
  labelKey: 'com.labre.commands.edgy.addObject',
62
62
  labelFallback: 'Object',
63
63
  scope: 'edgeless',
64
- defaultKeys: { mac: [], other: [] },
64
+ defaultKeys: { mac: ['g', 'j'], other: ['g', 'j'] },
65
65
  },
66
66
  {
67
67
  id: 'edgy.addActivity',
@@ -69,7 +69,7 @@ export const edgyCommandsManifest = [
69
69
  labelKey: 'com.labre.commands.edgy.addActivity',
70
70
  labelFallback: 'Activity',
71
71
  scope: 'edgeless',
72
- defaultKeys: { mac: [], other: [] },
72
+ defaultKeys: { mac: ['g', 'a'], other: ['g', 'a'] },
73
73
  },
74
74
  {
75
75
  id: 'edgy.addRelation',
package/dist/commands.js CHANGED
@@ -1,13 +1,21 @@
1
+ import { frameworkChord } from '@formicoidea/labre-core/shared/utils';
1
2
  import { GfxControllerIdentifier } from '@formicoidea/labre-core/std/gfx';
2
3
  import { activateEdgyRelation, createEdgyBoard, createEdgyBox, createEdgyDynamic, createEdgyFacets, createEdgyPeople, } from './actions.js';
3
4
  import { EDGY_DYNAMIC_NODES, EDGY_ZONE_FILL, EDGY_ZONES, edgyElementLabel, edgyElementLabelKey, } from './metamodel.js';
4
5
  import { NODE_FILL, NODE_STROKE } from './node/consts.js';
5
6
  import { EDGY_ROLE } from './roles.js';
6
7
  import { edgyActivityIcon, edgyBoardIcon, edgyDynamicIcon, edgyFacetsIcon, edgyObjectIcon, edgyOutcomeIcon, edgyPeopleIcon, edgyRelationIcon, edgyToolbarIcon, } from './toolbar/icons.js';
8
+ /**
9
+ * The first keystroke of every EDGY chord (`g p` places People). Spelled again
10
+ * as `FrameworkDescriptor.chordPrefix` in `@labre/affine`'s `frameworks.ts`;
11
+ * `chord-prefixes.unit.spec.ts` holds the two together (`docs/adr/0055`).
12
+ */
13
+ const EDGY_CHORD_PREFIX = 'g';
7
14
  /**
8
15
  * The EDGY toolbox as commands. Before PF3 these seven artefacts existed ONLY
9
16
  * as hard-coded buttons, so EDGY was entirely invisible to Settings ›
10
- * Shortcuts; they are all bindable now, all keyless by default (`docs/adr/0008`).
17
+ * Shortcuts; they are all bindable now (`docs/adr/0008`), and the board and the
18
+ * four base elements carry a default `g` chord (`docs/adr/0055`).
11
19
  *
12
20
  * An eighth entry joined them on the PO recette of 26/08/2026, and it is the
13
21
  * first EDGY command that arms a TOOL rather than dropping an artefact:
@@ -114,6 +122,7 @@ const SPECS = [
114
122
  },
115
123
  {
116
124
  id: 'addBoard',
125
+ key: 'b',
117
126
  label: 'EDGY board (hover spotlight)',
118
127
  iconKey: 'edgy.board',
119
128
  category: 'diagrams',
@@ -123,6 +132,7 @@ const SPECS = [
123
132
  },
124
133
  {
125
134
  id: 'addPeople',
135
+ key: 'p',
126
136
  label: 'People',
127
137
  iconKey: 'edgy.people',
128
138
  category: 'elements',
@@ -132,6 +142,7 @@ const SPECS = [
132
142
  },
133
143
  {
134
144
  id: 'addOutcome',
145
+ key: 'o',
135
146
  label: 'Outcome',
136
147
  iconKey: 'edgy.outcome',
137
148
  category: 'elements',
@@ -141,6 +152,7 @@ const SPECS = [
141
152
  },
142
153
  {
143
154
  id: 'addObject',
155
+ key: 'j',
144
156
  label: 'Object',
145
157
  iconKey: 'edgy.object',
146
158
  category: 'elements',
@@ -150,6 +162,7 @@ const SPECS = [
150
162
  },
151
163
  {
152
164
  id: 'addActivity',
165
+ key: 'a',
153
166
  label: 'Activity',
154
167
  iconKey: 'edgy.activity',
155
168
  category: 'elements',
@@ -196,8 +209,10 @@ export const edgyCommands = SPECS.map((spec, order) => ({
196
209
  surfaces: ['senior-menu', 'catalogue', 'palette', 'agent'],
197
210
  order,
198
211
  scope: 'edgeless',
199
- defaultKeys: { mac: [], other: [] },
200
- availability: 'always',
212
+ defaultKeys: frameworkChord(EDGY_CHORD_PREFIX, spec.key),
213
+ // It WRITES: a read-only document is one it cannot run on, so no surface
214
+ // offers it there and no chord arms for it (`docs/adr/0055`).
215
+ availability: 'editable',
201
216
  run: spec.run,
202
217
  telemetry: { framework: 'edgy', element: spec.element, board: spec.board },
203
218
  ...(spec.legend ? { legend: spec.legend } : {}),
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@formicoidea/labre-framework-edgy",
3
3
  "description": "Labre edgy framework for @formicoidea/labre-core.",
4
- "version": "4.0.0",
4
+ "version": "4.1.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.1.0",
39
39
  "@preact/signals-core": "^1.8.0",
40
40
  "lit": "^3.2.0",
41
41
  "yjs": "^13.6.21"