@issuegraph/editor 0.4.0 → 0.22.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/README.md +65 -9
- package/dist/a11y/baseline.d.ts +182 -0
- package/dist/a11y/baseline.d.ts.map +1 -0
- package/dist/a11y/baseline.js +434 -0
- package/dist/a11y/baseline.js.map +1 -0
- package/dist/audit/findings.d.ts +107 -1
- package/dist/audit/findings.d.ts.map +1 -1
- package/dist/audit/findings.js +113 -6
- package/dist/audit/findings.js.map +1 -1
- package/dist/audit/panel.d.ts +277 -0
- package/dist/audit/panel.d.ts.map +1 -0
- package/dist/audit/panel.js +462 -0
- package/dist/audit/panel.js.map +1 -0
- package/dist/audit/refused.d.ts +99 -0
- package/dist/audit/refused.d.ts.map +1 -0
- package/dist/audit/refused.js +276 -0
- package/dist/audit/refused.js.map +1 -0
- package/dist/audit/styles.d.ts +1 -1
- package/dist/audit/styles.d.ts.map +1 -1
- package/dist/audit/styles.js +429 -1
- package/dist/audit/styles.js.map +1 -1
- package/dist/audit/surface.d.ts +54 -12
- package/dist/audit/surface.d.ts.map +1 -1
- package/dist/audit/surface.js +53 -13
- package/dist/audit/surface.js.map +1 -1
- package/dist/create/draft.d.ts +36 -0
- package/dist/create/draft.d.ts.map +1 -1
- package/dist/create/draft.js +40 -0
- package/dist/create/draft.js.map +1 -1
- package/dist/create/keys.d.ts +134 -9
- package/dist/create/keys.d.ts.map +1 -1
- package/dist/create/keys.js +119 -20
- package/dist/create/keys.js.map +1 -1
- package/dist/firstpass/candidates.d.ts +17 -1
- package/dist/firstpass/candidates.d.ts.map +1 -1
- package/dist/index.d.ts +42 -17
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +45 -14
- package/dist/index.js.map +1 -1
- package/dist/overlay/render.d.ts +11 -3
- package/dist/overlay/render.d.ts.map +1 -1
- package/dist/overlay/render.js +76 -20
- package/dist/overlay/render.js.map +1 -1
- package/dist/overlay/request.d.ts +71 -0
- package/dist/overlay/request.d.ts.map +1 -0
- package/dist/overlay/request.js +129 -0
- package/dist/overlay/request.js.map +1 -0
- package/dist/overlay/styles.d.ts +1 -1
- package/dist/overlay/styles.d.ts.map +1 -1
- package/dist/overlay/styles.js +78 -7
- package/dist/overlay/styles.js.map +1 -1
- package/dist/picker/render.d.ts +26 -16
- package/dist/picker/render.d.ts.map +1 -1
- package/dist/picker/render.js +25 -36
- package/dist/picker/render.js.map +1 -1
- package/dist/picker/styles.d.ts +7 -7
- package/dist/picker/styles.d.ts.map +1 -1
- package/dist/picker/styles.js +7 -36
- package/dist/picker/styles.js.map +1 -1
- package/dist/picker/view.d.ts +8 -4
- package/dist/picker/view.d.ts.map +1 -1
- package/dist/picker/view.js +4 -3
- package/dist/picker/view.js.map +1 -1
- package/dist/picker/words.d.ts +12 -10
- package/dist/picker/words.d.ts.map +1 -1
- package/dist/picker/words.js +12 -8
- package/dist/picker/words.js.map +1 -1
- package/dist/reevaluate/parts.d.ts +130 -0
- package/dist/reevaluate/parts.d.ts.map +1 -0
- package/dist/reevaluate/parts.js +260 -0
- package/dist/reevaluate/parts.js.map +1 -0
- package/dist/reevaluate/render.d.ts +18 -11
- package/dist/reevaluate/render.d.ts.map +1 -1
- package/dist/reevaluate/render.js +21 -135
- package/dist/reevaluate/render.js.map +1 -1
- package/dist/reevaluate/styles.d.ts +1 -1
- package/dist/reevaluate/styles.d.ts.map +1 -1
- package/dist/reevaluate/styles.js +26 -0
- package/dist/reevaluate/styles.js.map +1 -1
- package/dist/reevaluate/view.d.ts +16 -1
- package/dist/reevaluate/view.d.ts.map +1 -1
- package/dist/reevaluate/view.js +21 -1
- package/dist/reevaluate/view.js.map +1 -1
- package/dist/reevaluate/words.d.ts +7 -0
- package/dist/reevaluate/words.d.ts.map +1 -1
- package/dist/scale/ladder.d.ts +62 -6
- package/dist/scale/ladder.d.ts.map +1 -1
- package/dist/scale/ladder.js +129 -11
- package/dist/scale/ladder.js.map +1 -1
- package/dist/scale/render.d.ts +44 -0
- package/dist/scale/render.d.ts.map +1 -1
- package/dist/scale/render.js +206 -28
- package/dist/scale/render.js.map +1 -1
- package/dist/scale/styles.d.ts +11 -5
- package/dist/scale/styles.d.ts.map +1 -1
- package/dist/scale/styles.js +133 -4
- package/dist/scale/styles.js.map +1 -1
- package/dist/workspace/chrome.d.ts +1 -1
- package/dist/workspace/chrome.d.ts.map +1 -1
- package/dist/workspace/chrome.js +48 -0
- package/dist/workspace/chrome.js.map +1 -1
- package/dist/workspace/firstpass.d.ts +166 -0
- package/dist/workspace/firstpass.d.ts.map +1 -0
- package/dist/workspace/firstpass.js +151 -0
- package/dist/workspace/firstpass.js.map +1 -0
- package/dist/workspace/host.d.ts +283 -11
- package/dist/workspace/host.d.ts.map +1 -1
- package/dist/workspace/host.js +614 -43
- package/dist/workspace/host.js.map +1 -1
- package/dist/workspace/inspector.d.ts +72 -2
- package/dist/workspace/inspector.d.ts.map +1 -1
- package/dist/workspace/inspector.js +26 -0
- package/dist/workspace/inspector.js.map +1 -1
- package/dist/workspace/mount.d.ts +75 -6
- package/dist/workspace/mount.d.ts.map +1 -1
- package/dist/workspace/mount.js +1851 -60
- package/dist/workspace/mount.js.map +1 -1
- package/dist/workspace/rail.d.ts +5 -2
- package/dist/workspace/rail.d.ts.map +1 -1
- package/dist/workspace/rail.js.map +1 -1
- package/dist/workspace/recovery.d.ts +155 -0
- package/dist/workspace/recovery.d.ts.map +1 -0
- package/dist/workspace/recovery.js +156 -0
- package/dist/workspace/recovery.js.map +1 -0
- package/dist/workspace/render.d.ts +779 -2
- package/dist/workspace/render.d.ts.map +1 -1
- package/dist/workspace/render.js +1727 -61
- package/dist/workspace/render.js.map +1 -1
- package/dist/workspace/selection.d.ts +11 -0
- package/dist/workspace/selection.d.ts.map +1 -1
- package/dist/workspace/selection.js +10 -0
- package/dist/workspace/selection.js.map +1 -1
- package/dist/workspace/styles.d.ts +1 -1
- package/dist/workspace/styles.d.ts.map +1 -1
- package/dist/workspace/styles.js +1405 -42
- package/dist/workspace/styles.js.map +1 -1
- package/package.json +4 -4
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"surface.js","sourceRoot":"","sources":["../../src/audit/surface.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"surface.js","sourceRoot":"","sources":["../../src/audit/surface.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoDG;AAIH,OAAO,EAAE,aAAa,EAAE,iBAAiB,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAGhF;;;;GAIG;AACH,MAAM,CAAC,MAAM,wBAAwB,GAAG,eAAe,CAAC;AAExD,kFAAkF;AAClF,MAAM,CAAC,MAAM,qBAAqB,GAAG,qBAAqB,CAAC;AAE3D;;;GAGG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAG,sBAAsB,CAAC;AAE7D;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAG,qBAAqB,CAAC;AAqD3D,MAAM,WAAW,GAAoC,IAAI,GAAG,CAC1D,aAAa,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC,CAClD,CAAC;AAEF;;;;;;;;;;;GAWG;AACH,MAAM,UAAU,YAAY,CAAC,KAAiB;IAC5C,0EAA0E;IAC1E,6EAA6E;IAC7E,6EAA6E;IAC7E,2EAA2E;IAC3E,uEAAuE;IACvE,8EAA8E;IAC9E,wEAAwE;IACxE,EAAE;IACF,8EAA8E;IAC9E,qEAAqE;IACrE,+DAA+D;IAC/D,MAAM,QAAQ,GAAG,aAAa,CAAC,KAAK,CAAC,CAAC;IACtC,yEAAyE;IACzE,6EAA6E;IAC7E,2EAA2E;IAC3E,2EAA2E;IAC3E,4EAA4E;IAC5E,6EAA6E;IAC7E,wDAAwD;IACxD,MAAM,OAAO,GAAG,IAAI,GAAG,CAA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AAClB,CAAC;AAcD;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,UAAU,iBAAiB,CAAC,OAAqB,EAAE,UAA8B,EAAE;IACvF,MAAM,KAAK,GAAG,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;IACpC,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,KAAK,IAAI,CAAC;IACnC,OAAO;QACL,yBAAyB,qBAAqB,KAAK,KAAK,IAAI;QAC5D,4EAA4E;QAC5E,2EAA2E;QAC3E,4EAA4E;QAC5E,sEAAsE;QACtE,2DAA2D;QAC3D,gEAAgE,MAAM,CAAC,IAAI,CAAC,GAAG;QAC/E,IAAI,qBAAqB,GAAG;QAC5B,gCAAgC,KAAK,SAAS;QAC9C,2CAA2C;QAC3C,WAAW;QACX,QAAQ;KACT,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AACb,CAAC"}
|
package/dist/create/draft.d.ts
CHANGED
|
@@ -65,6 +65,42 @@ export interface CreateDraft {
|
|
|
65
65
|
}
|
|
66
66
|
/** Nothing gathered. The state before a create starts and after one emits. */
|
|
67
67
|
export declare const IDLE_CREATE_DRAFT: CreateDraft;
|
|
68
|
+
/**
|
|
69
|
+
* Whether the draft is at the KIND step: a source gathered, no kind yet.
|
|
70
|
+
*
|
|
71
|
+
* A PREDICATE RATHER THAN A SHELL'S TWO NULL CHECKS, because two of them
|
|
72
|
+
* disagreed. `render.ts`'s panel asks this question to draw the kind list and
|
|
73
|
+
* `mount.ts` now asks it to classify the keyboard, and a step whose definition
|
|
74
|
+
* is written out at each site is one a later edit can move at one of them —
|
|
75
|
+
* which is how the chooser came to be drawn at a moment the key map did not
|
|
76
|
+
* recognise (`#152`).
|
|
77
|
+
*
|
|
78
|
+
* IT ASKS ABOUT THE DRAFT ALONE, and deliberately says nothing about focus or
|
|
79
|
+
* about which of the two choosers is on screen. Whether a drop is live decides
|
|
80
|
+
* WHICH renderer draws the step, never WHETHER the reader is at it; folding that
|
|
81
|
+
* in would give this predicate a second subject and make it false for the
|
|
82
|
+
* floating chooser, which is the one opened by a pointer.
|
|
83
|
+
*/
|
|
84
|
+
export declare function isChoosingKind(draft: CreateDraft): boolean;
|
|
85
|
+
/**
|
|
86
|
+
* Whether anything has been gathered at all — the opposite of idle.
|
|
87
|
+
*
|
|
88
|
+
* IT IS NOT `isChoosingKind`'S COMPLEMENT, AND THAT IS THE WHOLE REASON IT
|
|
89
|
+
* EXISTS. The kind can be chosen before the source on the keyboard path, so
|
|
90
|
+
* `{ kind: 'blocked-by' }` with no source is a draft the reader is in the
|
|
91
|
+
* middle of and one `isChoosingKind` answers `false` for. A shell asking
|
|
92
|
+
* "is a draft live" through that predicate would treat a half-built
|
|
93
|
+
* keyboard draft as no draft at all.
|
|
94
|
+
*
|
|
95
|
+
* WHAT ASKS IT, and why the question is worth a name: `mount.ts` decides
|
|
96
|
+
* whether Escape belongs to the draft or to §17k's transient surfaces. The
|
|
97
|
+
* wrong answer either abandons a relationship the reader was building or
|
|
98
|
+
* leaves a panel that will not close, and both are silent.
|
|
99
|
+
*
|
|
100
|
+
* THREE FIELDS, NOT TWO, on this file's own standing rule: a definition
|
|
101
|
+
* written out at each call site is one a later edit can move at one of them.
|
|
102
|
+
*/
|
|
103
|
+
export declare function isDraftLive(draft: CreateDraft): boolean;
|
|
68
104
|
/**
|
|
69
105
|
* One fact arriving, from whichever path gathered it.
|
|
70
106
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"draft.d.ts","sourceRoot":"","sources":["../../src/create/draft.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgDG;AAEH,OAAO,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAEtE;;;;;;GAMG;AACH,MAAM,WAAW,WAAW;IAC1B,wDAAwD;IACxD,QAAQ,CAAC,MAAM,EAAE,QAAQ,GAAG,IAAI,C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
|
|
57
|
+
* Whether the draft is at the KIND step: a source gathered, no kind yet.
|
|
58
|
+
*
|
|
59
|
+
* A PREDICATE RATHER THAN A SHELL'S TWO NULL CHECKS, because two of them
|
|
60
|
+
* disagreed. `render.ts`'s panel asks this question to draw the kind list and
|
|
61
|
+
* `mount.ts` now asks it to classify the keyboard, and a step whose definition
|
|
62
|
+
* is written out at each site is one a later edit can move at one of them —
|
|
63
|
+
* which is how the chooser came to be drawn at a moment the key map did not
|
|
64
|
+
* recognise (`#152`).
|
|
65
|
+
*
|
|
66
|
+
* IT ASKS ABOUT THE DRAFT ALONE, and deliberately says nothing about focus or
|
|
67
|
+
* about which of the two choosers is on screen. Whether a drop is live decides
|
|
68
|
+
* WHICH renderer draws the step, never WHETHER the reader is at it; folding that
|
|
69
|
+
* in would give this predicate a second subject and make it false for the
|
|
70
|
+
* floating chooser, which is the one opened by a pointer.
|
|
71
|
+
*/
|
|
72
|
+
export function isChoosingKind(draft) {
|
|
73
|
+
return draft.source !== null && draft.kind === null;
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* Whether anything has been gathered at all — the opposite of idle.
|
|
77
|
+
*
|
|
78
|
+
* IT IS NOT `isChoosingKind`'S COMPLEMENT, AND THAT IS THE WHOLE REASON IT
|
|
79
|
+
* EXISTS. The kind can be chosen before the source on the keyboard path, so
|
|
80
|
+
* `{ kind: 'blocked-by' }` with no source is a draft the reader is in the
|
|
81
|
+
* middle of and one `isChoosingKind` answers `false` for. A shell asking
|
|
82
|
+
* "is a draft live" through that predicate would treat a half-built
|
|
83
|
+
* keyboard draft as no draft at all.
|
|
84
|
+
*
|
|
85
|
+
* WHAT ASKS IT, and why the question is worth a name: `mount.ts` decides
|
|
86
|
+
* whether Escape belongs to the draft or to §17k's transient surfaces. The
|
|
87
|
+
* wrong answer either abandons a relationship the reader was building or
|
|
88
|
+
* leaves a panel that will not close, and both are silent.
|
|
89
|
+
*
|
|
90
|
+
* THREE FIELDS, NOT TWO, on this file's own standing rule: a definition
|
|
91
|
+
* written out at each call site is one a later edit can move at one of them.
|
|
92
|
+
*/
|
|
93
|
+
export function isDraftLive(draft) {
|
|
94
|
+
return draft.source !== null || draft.target !== null || draft.kind !== null;
|
|
95
|
+
}
|
|
56
96
|
function complete(draft) {
|
|
57
97
|
const { source, target, kind } = draft;
|
|
58
98
|
if (source === null || target === null || kind === null)
|
package/dist/create/draft.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"draft.js","sourceRoot":"","sources":["../../src/create/draft.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgDG;AAoBH,8EAA8E;AAC9E,MAAM,CAAC,MAAM,iBAAiB,GAAgB,MAAM,CAAC,MAAM,CAAC;IAC1D,MAAM,EAAE,IAAI;IACZ,MAAM,EAAE,IAAI;IACZ,IAAI,EAAE,IAAI;CACX,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"draft.js","sourceRoot":"","sources":["../../src/create/draft.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgDG;AAoBH,8EAA8E;AAC9E,MAAM,CAAC,MAAM,iBAAiB,GAAgB,MAAM,CAAC,MAAM,CAAC;IAC1D,MAAM,EAAE,IAAI;IACZ,MAAM,EAAE,IAAI;IACZ,IAAI,EAAE,IAAI;CACX,CAAC,CAAC;AAEH;;;;;;;;;;;;;;;GAeG;AACH,MAAM,UAAU,cAAc,CAAC,KAAkB;IAC/C,OAAO,KAAK,CAAC,MAAM,KAAK,IAAI,IAAI,KAAK,CAAC,IAAI,KAAK,IAAI,CAAC;AACtD,CAAC;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,UAAU,WAAW,CAAC,KAAkB;IAC5C,OAAO,KAAK,CAAC,MAAM,KAAK,IAAI,IAAI,KAAK,CAAC,MAAM,KAAK,IAAI,IAAI,KAAK,CA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EAA2E;IAC3E,2EAA2E;IAC3E,sEAAsE;IACtE,OAAO;QACL,KAAK,EAAE,iBAAiB;QACxB,QAAQ,EAAE,EAAE,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,KAAK,CAAC,IAAI,EAAE,IAAI,EAAE,KAAK,CAAC,MAAM,EAAE,EAAE,EAAE,KAAK,CAAC,MAAM,EAAE;KACnF,CAAC;AACJ,CAAC"}
|
package/dist/create/keys.d.ts
CHANGED
|
@@ -22,6 +22,12 @@
|
|
|
22
22
|
* itself, a sixth field gets a `6` for free and the picker and the keyboard
|
|
23
23
|
* cannot disagree about which digit means what.
|
|
24
24
|
*
|
|
25
|
+
* A SURFACE THAT DRAWS THE DIGITS READS {@link KIND_KEYS}, which is the same
|
|
26
|
+
* table filtered rather than a second walk of `EDGE_FIELDS`. The renderer and
|
|
27
|
+
* the key map then cannot disagree about which digit means what either, which
|
|
28
|
+
* is the half the paragraph above did not cover and the half that had already
|
|
29
|
+
* drifted.
|
|
30
|
+
*
|
|
25
31
|
* ## Retype opens the picker; it does not emit a retype
|
|
26
32
|
*
|
|
27
33
|
* `T` answers with the edge to open {@link ../picker/view.ts pickerView} on,
|
|
@@ -48,10 +54,15 @@
|
|
|
48
54
|
* it, and gets one more entry every time a host grows a control.
|
|
49
55
|
*
|
|
50
56
|
* So the question is inverted. {@link CreateInteraction} enumerates OUR OWN
|
|
51
|
-
* interaction
|
|
52
|
-
* is in. A
|
|
53
|
-
* map is silent. What was an open-ended list of other
|
|
54
|
-
* closed description of this design's own flow.
|
|
57
|
+
* interaction — one state per step of the create flow §17b specifies — and the
|
|
58
|
+
* host says which one it is in. A new widget adds no code here: the host reports
|
|
59
|
+
* `elsewhere` and the map is silent. What was an open-ended list of other
|
|
60
|
+
* people's claims became a closed description of this design's own flow.
|
|
61
|
+
*
|
|
62
|
+
* THE SET IS CLOSED BY THE FLOW, NOT BY A COUNT. It has grown twice, both times
|
|
63
|
+
* because a step of this flow was missing from it rather than because the
|
|
64
|
+
* closure argument failed — see {@link CreateInteraction}. The invariant that
|
|
65
|
+
* has never moved is the one that matters: no state here names a host's widget.
|
|
55
66
|
*
|
|
56
67
|
* Two press-level facts remain, and they are bounded in a way the widget list
|
|
57
68
|
* never was — a modifier set and a composition flag are fields on the event
|
|
@@ -63,7 +74,7 @@
|
|
|
63
74
|
* Which bindings reach the target search is DATA on the binding table, so no
|
|
64
75
|
* call site decides it and a sixth binding cannot be added without answering.
|
|
65
76
|
*/
|
|
66
|
-
import type { EdgeId, IssueRef, Proposal } from '@issuegraph/store';
|
|
77
|
+
import type { EdgeId, EdgeKind, IssueRef, Proposal } from '@issuegraph/store';
|
|
67
78
|
import type { CreateCommand } from './draft.ts';
|
|
68
79
|
/**
|
|
69
80
|
* What the shell knows when a key arrives.
|
|
@@ -113,33 +124,87 @@ export interface KeyboardContext {
|
|
|
113
124
|
* The host answers it because the host is the only one who can: this package
|
|
114
125
|
* has no DOM, and which control holds focus is visible only to the shell.
|
|
115
126
|
* Crucially, answering it needs no knowledge of THIS package — a host maps
|
|
116
|
-
* its own world onto
|
|
127
|
+
* its own world onto states it already understands.
|
|
117
128
|
*/
|
|
118
129
|
readonly interaction: CreateInteraction;
|
|
119
130
|
}
|
|
120
131
|
/**
|
|
121
132
|
* Where the keyboard is, in terms of the create flow §17b specifies.
|
|
122
133
|
*
|
|
123
|
-
*
|
|
134
|
+
* Four states, and the set is closed by the DESIGN rather than by the host's
|
|
124
135
|
* inventory of controls — which is the whole reason it replaced a growing list
|
|
125
136
|
* of other owners.
|
|
126
137
|
*
|
|
127
138
|
* - `canvas` — the create vocabulary is live. Every binding reaches it.
|
|
139
|
+
* - `kind-chooser` — the draft has a source and no kind, and the reader is
|
|
140
|
+
* answering the chooser this package drew for it. The digits reach, and
|
|
141
|
+
* `Escape` withdraws. `⏎` DOES NOT, and it is the reason this state exists
|
|
142
|
+
* rather than folding into `canvas`: `commit-target` fires on
|
|
143
|
+
* {@link KeyboardContext.match }, which is derived from a target query that
|
|
144
|
+
* survives a second `begin` — so a reader who typed a query, restarted the
|
|
145
|
+
* draft, and pressed `⏎` at the kind step would commit a target with no kind
|
|
146
|
+
* chosen, while the press was also taken from the kind button under focus.
|
|
128
147
|
* - `target-search` — the create flow's OWN search box has focus. Only the
|
|
129
148
|
* bindings that must survive it reach: `⏎` commits the target and `Escape`
|
|
130
149
|
* withdraws, which is precisely the middle of `R → digit → search → ⏎`. Its
|
|
131
150
|
* printable keys belong to the box — most issue references carry a digit, so
|
|
132
151
|
* a map that claimed `1`–`5` here would eat nearly every query — and `⌫`
|
|
133
152
|
* deletes a CHARACTER rather than the reader's selected edge.
|
|
153
|
+
* - `add-control` — the create flow's OWN begin control holds focus: §17b's
|
|
154
|
+
* inspector path, the `+ add` button, which draws {@link RELATE_KEY} beside
|
|
155
|
+
* its own word. Only `relate` reaches, for the reason the state exists at all
|
|
156
|
+
* (below). A press at this position begins the draft the control would have
|
|
157
|
+
* begun, from the subject the control publishes.
|
|
134
158
|
* - `elsewhere` — something else owns the keyboard entirely: an inline title,
|
|
135
159
|
* a filter box, a modal, a control this package has never heard of. NOTHING
|
|
136
160
|
* reaches, `Escape` included, because that control needs `Escape` to cancel
|
|
137
161
|
* its own edit.
|
|
138
162
|
*
|
|
139
163
|
* `elsewhere` is what makes the set closed. It is the state for everything not
|
|
140
|
-
* named, so a host growing
|
|
164
|
+
* named, so a host growing another control changes nothing here.
|
|
165
|
+
*
|
|
166
|
+
* ## Why this grew to four, when the whole point was that it does not grow
|
|
167
|
+
*
|
|
168
|
+
* It grew because it was UNDER-COUNTED, not because the closure argument
|
|
169
|
+
* failed. The header's rule is that this enumerates OUR OWN flow; the kind
|
|
170
|
+
* chooser is a step in that flow, and it was folded into `canvas` on the
|
|
171
|
+
* assumption that focus stays on the row the draft was begun from. `#152` is
|
|
172
|
+
* the evidence that it does not: activating `add` REPLACES that control with
|
|
173
|
+
* the kind list, so the mount's focus restore lands on whatever command control
|
|
174
|
+
* is nearest, and where the audit filter has emptied the rail there is no row to
|
|
175
|
+
* land on at all. `canvas` answers only for a focused ROW, so every create
|
|
176
|
+
* binding — the chooser's own digits included — returned `none` at exactly the
|
|
177
|
+
* step whose whole purpose is to be answered with a digit.
|
|
178
|
+
*
|
|
179
|
+
* A HOST STILL ANSWERS IT WITHOUT KNOWING THIS PACKAGE: "my reader is choosing
|
|
180
|
+
* a relationship kind" is a fact about the host's own screen, the same shape as
|
|
181
|
+
* the other three. What did NOT change is the thing the closure protects — no
|
|
182
|
+
* state here names a host's widget, and another control still adds no code.
|
|
183
|
+
*
|
|
184
|
+
* ## And then to five, by the same argument and for the same kind of step
|
|
185
|
+
*
|
|
186
|
+
* `#173`. §17b gives the create flow three equivalent entries — canvas, keyboard
|
|
187
|
+
* and the inspector's `+ add` — and the third one's control was `elsewhere`, so
|
|
188
|
+
* `R` was inert at exactly the position that DRAWS `R` as its own hint. That is
|
|
189
|
+
* the `#152` shape again: a step of this flow classified as somebody else's
|
|
190
|
+
* widget.
|
|
191
|
+
*
|
|
192
|
+
* THE DIFFERENCE IS NAMABLE, WHICH IS WHAT KEEPS THIS FROM BEING A SLOPE. It is
|
|
193
|
+
* the test the kind chooser already passes and the audit filter already fails:
|
|
194
|
+
* the chooser IS the key map rendered — its digits are {@link KIND_KEYS} — and
|
|
195
|
+
* `+ add` IS this binding rendered, drawing {@link RELATE_KEY} itself. A control
|
|
196
|
+
* that tells the reader to press a key cannot be a control that key is refused
|
|
197
|
+
* by. A delete button, a filter box or a host's own control shares no vocabulary
|
|
198
|
+
* with this map and stays `elsewhere`, which is where every control that draws
|
|
199
|
+
* no key belongs.
|
|
200
|
+
*
|
|
201
|
+
* ONLY `relate` REACHES IT, and that follows from the same sentence rather than
|
|
202
|
+
* from caution: the argument is about the ONE binding this control renders, and
|
|
203
|
+
* it says nothing about any other. `⌫` there would delete a selected edge the
|
|
204
|
+
* reader is not looking at, and a digit would fill a kind slot on a draft that
|
|
205
|
+
* has not begun.
|
|
141
206
|
*/
|
|
142
|
-
export type CreateInteraction = 'canvas' | 'target-search' | 'elsewhere';
|
|
207
|
+
export type CreateInteraction = 'canvas' | 'kind-chooser' | 'target-search' | 'add-control' | 'elsewhere';
|
|
143
208
|
/**
|
|
144
209
|
* What a key means. `none` leaves the key to the host.
|
|
145
210
|
*
|
|
@@ -161,6 +226,66 @@ export type KeyIntent = {
|
|
|
161
226
|
readonly kind: 'retype';
|
|
162
227
|
readonly edgeId: EdgeId;
|
|
163
228
|
};
|
|
229
|
+
/**
|
|
230
|
+
* The key that begins a relationship — §17b's `R`, and the one key a surface
|
|
231
|
+
* DRAWS beside a control rather than in a legend.
|
|
232
|
+
*
|
|
233
|
+
* DECLARED ABOVE THE TABLE AND USED AS ITS KEY, so the binding and the drawn
|
|
234
|
+
* hint are the same literal by construction. The obvious alternative — deriving
|
|
235
|
+
* it the way {@link KIND_KEYS} is derived — does not survive this package's
|
|
236
|
+
* rules: a `find` over `BINDINGS` is `string | undefined`, and every way to
|
|
237
|
+
* discharge that nil is worse than the problem. A `?? 'r'` fallback is the
|
|
238
|
+
* second literal this constant exists to prevent; a module-load `throw` puts a
|
|
239
|
+
* side effect in a package published `"sideEffects": false`; and exporting
|
|
240
|
+
* `string | undefined` pushes an impossible case onto every renderer. `KIND_KEYS`
|
|
241
|
+
* escapes it only because `flatMap` makes "no entries" a legal value, and a
|
|
242
|
+
* single key has no such empty form.
|
|
243
|
+
*
|
|
244
|
+
* LOWERCASE, BECAUSE THAT IS WHAT THE TABLE MATCHES. {@link normalize} lowercases
|
|
245
|
+
* every press before the lookup, so this is the value a key press actually
|
|
246
|
+
* resolves to. §17a draws it uppercase; that is the stylesheet's `text-transform`
|
|
247
|
+
* and never a second string here.
|
|
248
|
+
*
|
|
249
|
+
* IT IS A LAYOUT VALUE, NOT A PHYSICAL POSITION. `KeyboardEvent.key` reports what
|
|
250
|
+
* the layout produces, so on a layout with no Latin `r` this binding is
|
|
251
|
+
* unreachable and a surface drawing the hint promises a key that does nothing.
|
|
252
|
+
* That is a property of the whole table rather than of this constant, and it is
|
|
253
|
+
* recorded here because publishing the letter is what makes the promise visible.
|
|
254
|
+
*/
|
|
255
|
+
export declare const RELATE_KEY = "r";
|
|
256
|
+
/** A digit the reader can press, and the kind it chooses. */
|
|
257
|
+
export interface KindKey {
|
|
258
|
+
/** The key as {@link keyIntent} spells it — `'1'`, `'2'`, … */
|
|
259
|
+
readonly key: string;
|
|
260
|
+
readonly edgeKind: EdgeKind;
|
|
261
|
+
}
|
|
262
|
+
/**
|
|
263
|
+
* The numbered kind list, for a surface that DRAWS the digits this map reads.
|
|
264
|
+
*
|
|
265
|
+
* ONE CONSTRUCTION, FILTERED — not a second `EDGE_FIELDS.map((_, i) => …)`
|
|
266
|
+
* somewhere a renderer can see. `workspace/mount.ts` had exactly that second
|
|
267
|
+
* copy: its chooser built `${index + 1} ${word}` from a `KINDS` alias — since
|
|
268
|
+
* removed with it — while this table built the same digits from `EDGE_FIELDS`,
|
|
269
|
+
* and the two agreed only because both happened to walk the same array (the
|
|
270
|
+
* alias WAS `EDGE_FIELDS`). Nothing pinned them, so a change to
|
|
271
|
+
* either — a reordering, a skipped digit, a sixth field — would have left the
|
|
272
|
+
* chooser telling the reader to press a key the keyboard resolves differently.
|
|
273
|
+
* That is the drift this module's header rejects in terms, live in the package
|
|
274
|
+
* that reads this module.
|
|
275
|
+
*
|
|
276
|
+
* DERIVED FROM `BINDINGS`, which stays private. Exporting the map itself would
|
|
277
|
+
* publish `survives` and the five non-kind actions, leaving every
|
|
278
|
+
* consumer to work out which entries name a kind — the same "here is the whole
|
|
279
|
+
* table, sort it out" surface a decision table exists to remove. `Map`
|
|
280
|
+
* preserves insertion order and the digits are spread from `EDGE_FIELDS.map`,
|
|
281
|
+
* so this comes out in the format's own order without sorting it.
|
|
282
|
+
*
|
|
283
|
+
* `binding.kind === 'choose-type'` narrows through the intersection for the
|
|
284
|
+
* reason {@link Binding} records: it is written as an intersection precisely so
|
|
285
|
+
* the discriminated union still narrows, which is what lets `edgeKind` be read
|
|
286
|
+
* here without a cast.
|
|
287
|
+
*/
|
|
288
|
+
export declare const KIND_KEYS: readonly KindKey[];
|
|
164
289
|
/**
|
|
165
290
|
* One key press. Structurally a subset of the DOM's `KeyboardEvent`, so a host
|
|
166
291
|
* passes the event straight in rather than unpacking it.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"keys.d.ts","sourceRoot":"","sources":["../../src/create/keys.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"keys.d.ts","sourceRoot":"","sources":["../../src/create/keys.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2EG;AAGH,OAAO,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAE9E,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAEhD;;;;;;;GAOG;AACH,MAAM,WAAW,eAAe;IAC9B;;;;;OAKG;IACH,QAAQ,CAAC,OAAO,EAAE,QAAQ,GAAG,IAAI,CAAC;IAClC;;;;;;;;OAQG;IACH,QAAQ,CAAC,KAAK,EAAE,QAAQ,GAAG,IAAI,CAAC;IAChC;;;;;;;;;;OAUG;IACH,QAAQ,CAAC,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IACrC;;;;;;;;;;;OAWG;IACH,QAAQ,CAAC,WAAW,EAAE,iBAAiB,CAAC;CACzC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2EG;AACH,MAAM,MAAM,iBAAiB,GACzB,QAAQ,GACR,cAAc,GACd,eAAe,GACf,aAAa,GACb,WAAW,CAAC;AAEhB;;;;;;GAMG;AACH,MAAM,MAAM,SAAS,GACjB;IAAE,QAAQ,CAAC,IAAI,EAAE,MAAM,C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,12 @@
|
|
|
22
22
|
* itself, a sixth field gets a `6` for free and the picker and the keyboard
|
|
23
23
|
* cannot disagree about which digit means what.
|
|
24
24
|
*
|
|
25
|
+
* A SURFACE THAT DRAWS THE DIGITS READS {@link KIND_KEYS}, which is the same
|
|
26
|
+
* table filtered rather than a second walk of `EDGE_FIELDS`. The renderer and
|
|
27
|
+
* the key map then cannot disagree about which digit means what either, which
|
|
28
|
+
* is the half the paragraph above did not cover and the half that had already
|
|
29
|
+
* drifted.
|
|
30
|
+
*
|
|
25
31
|
* ## Retype opens the picker; it does not emit a retype
|
|
26
32
|
*
|
|
27
33
|
* `T` answers with the edge to open {@link ../picker/view.ts pickerView} on,
|
|
@@ -48,10 +54,15 @@
|
|
|
48
54
|
* it, and gets one more entry every time a host grows a control.
|
|
49
55
|
*
|
|
50
56
|
* So the question is inverted. {@link CreateInteraction} enumerates OUR OWN
|
|
51
|
-
* interaction
|
|
52
|
-
* is in. A
|
|
53
|
-
* map is silent. What was an open-ended list of other
|
|
54
|
-
* closed description of this design's own flow.
|
|
57
|
+
* interaction — one state per step of the create flow §17b specifies — and the
|
|
58
|
+
* host says which one it is in. A new widget adds no code here: the host reports
|
|
59
|
+
* `elsewhere` and the map is silent. What was an open-ended list of other
|
|
60
|
+
* people's claims became a closed description of this design's own flow.
|
|
61
|
+
*
|
|
62
|
+
* THE SET IS CLOSED BY THE FLOW, NOT BY A COUNT. It has grown twice, both times
|
|
63
|
+
* because a step of this flow was missing from it rather than because the
|
|
64
|
+
* closure argument failed — see {@link CreateInteraction}. The invariant that
|
|
65
|
+
* has never moved is the one that matters: no state here names a host's widget.
|
|
55
66
|
*
|
|
56
67
|
* Two press-level facts remain, and they are bounded in a way the widget list
|
|
57
68
|
* never was — a modifier set and a composition flag are fields on the event
|
|
@@ -64,6 +75,33 @@
|
|
|
64
75
|
* call site decides it and a sixth binding cannot be added without answering.
|
|
65
76
|
*/
|
|
66
77
|
import { EDGE_FIELDS } from '@issuegraph/core';
|
|
78
|
+
/**
|
|
79
|
+
* The key that begins a relationship — §17b's `R`, and the one key a surface
|
|
80
|
+
* DRAWS beside a control rather than in a legend.
|
|
81
|
+
*
|
|
82
|
+
* DECLARED ABOVE THE TABLE AND USED AS ITS KEY, so the binding and the drawn
|
|
83
|
+
* hint are the same literal by construction. The obvious alternative — deriving
|
|
84
|
+
* it the way {@link KIND_KEYS} is derived — does not survive this package's
|
|
85
|
+
* rules: a `find` over `BINDINGS` is `string | undefined`, and every way to
|
|
86
|
+
* discharge that nil is worse than the problem. A `?? 'r'` fallback is the
|
|
87
|
+
* second literal this constant exists to prevent; a module-load `throw` puts a
|
|
88
|
+
* side effect in a package published `"sideEffects": false`; and exporting
|
|
89
|
+
* `string | undefined` pushes an impossible case onto every renderer. `KIND_KEYS`
|
|
90
|
+
* escapes it only because `flatMap` makes "no entries" a legal value, and a
|
|
91
|
+
* single key has no such empty form.
|
|
92
|
+
*
|
|
93
|
+
* LOWERCASE, BECAUSE THAT IS WHAT THE TABLE MATCHES. {@link normalize} lowercases
|
|
94
|
+
* every press before the lookup, so this is the value a key press actually
|
|
95
|
+
* resolves to. §17a draws it uppercase; that is the stylesheet's `text-transform`
|
|
96
|
+
* and never a second string here.
|
|
97
|
+
*
|
|
98
|
+
* IT IS A LAYOUT VALUE, NOT A PHYSICAL POSITION. `KeyboardEvent.key` reports what
|
|
99
|
+
* the layout produces, so on a layout with no Latin `r` this binding is
|
|
100
|
+
* unreachable and a surface drawing the hint promises a key that does nothing.
|
|
101
|
+
* That is a property of the whole table rather than of this constant, and it is
|
|
102
|
+
* recorded here because publishing the letter is what makes the promise visible.
|
|
103
|
+
*/
|
|
104
|
+
export const RELATE_KEY = 'r';
|
|
67
105
|
/**
|
|
68
106
|
* The vocabulary, as data.
|
|
69
107
|
*
|
|
@@ -76,10 +114,22 @@ import { EDGE_FIELDS } from '@issuegraph/core';
|
|
|
76
114
|
const BINDINGS = new Map([
|
|
77
115
|
// `r`, the digits and `t` are PRINTABLE. While a text control has focus they
|
|
78
116
|
// are that control's characters, so they do not survive editing.
|
|
79
|
-
|
|
117
|
+
// `r` SURVIVES THE CHOOSER because restarting is ordinary: `draft.ts` says on
|
|
118
|
+
// `begin` that the reader changing their mind about the subject is expected,
|
|
119
|
+
// and it already clears what a previous draft gathered. Withholding it would
|
|
120
|
+
// take the restart away from a reader whose focus is off the rail while
|
|
121
|
+
// leaving it for one whose focus is on it — a difference with no meaning.
|
|
122
|
+
// `r` ALSO SURVIVES `add-control`, and this is the one binding that does:
|
|
123
|
+
// that state IS this binding rendered as a button, drawing this very letter
|
|
124
|
+
// as its hint (`#173`). The entry is the whole of the fix — the state admits
|
|
125
|
+
// what it renders and nothing else.
|
|
126
|
+
[RELATE_KEY, { kind: 'relate', survives: ['kind-chooser', 'add-control'] }],
|
|
127
|
+
// THE DIGITS ARE WHAT THE CHOOSER IS FOR. `#152`: with focus anywhere but a
|
|
128
|
+
// keyed row the interaction read `elsewhere` and these returned `none` at the
|
|
129
|
+
// one step whose whole purpose is to be answered with a digit.
|
|
80
130
|
...EDGE_FIELDS.map((edgeKind, index) => [
|
|
81
131
|
String(index + 1),
|
|
82
|
-
{ kind: 'choose-type', edgeKind,
|
|
132
|
+
{ kind: 'choose-type', edgeKind, survives: ['kind-chooser'] },
|
|
83
133
|
]),
|
|
84
134
|
// `⏎` and `Escape` SURVIVE, and they are the reason this is a per-binding flag
|
|
85
135
|
// rather than one "printable" test: the flow §17b specifies is
|
|
@@ -88,7 +138,14 @@ const BINDINGS = new Map([
|
|
|
88
138
|
// while editing would break the loop it exists to deliver. `Escape` survives
|
|
89
139
|
// for the same reason it is always available: a draft you cannot abandon is
|
|
90
140
|
// worse than one you cannot start.
|
|
91
|
-
|
|
141
|
+
// NOT IN THE CHOOSER, which is the whole reason `kind-chooser` is a state of
|
|
142
|
+
// its own rather than an alias for `canvas`. `commit-target` fires on `match`,
|
|
143
|
+
// and `match` is derived from a target query the host clears on `cancel` only
|
|
144
|
+
// — so `R → 1 → type a query → R` leaves a kind-step draft whose `match` is
|
|
145
|
+
// still set, and `⏎` there would commit a target before a kind was chosen.
|
|
146
|
+
// It would also be `preventDefault()`ed away from the kind button under focus,
|
|
147
|
+
// so one press would do the wrong thing twice.
|
|
148
|
+
['enter', { kind: 'commit-target', survives: ['target-search'] }],
|
|
92
149
|
// BOTH SPELLINGS OF THE DELETE KEY. §17b writes it `⌫`, which is `Backspace`
|
|
93
150
|
// on the keyboards that have it and `Delete` on those that do not — most
|
|
94
151
|
// notably Apple's, where the key in that position reports `Backspace` and the
|
|
@@ -97,11 +154,44 @@ const BINDINGS = new Map([
|
|
|
97
154
|
// NOT SURVIVING EDITING is the non-obvious half: in a focused text box `⌫`
|
|
98
155
|
// deletes a CHARACTER, and a map that claimed it would delete the reader's
|
|
99
156
|
// selected edge while they were correcting a typo in the search.
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
157
|
+
// NEITHER SURVIVES THE CHOOSER, and the reason is the design rather than the
|
|
158
|
+
// guard that happens to cover it today. `reduceHost` replaces the selection
|
|
159
|
+
// with the draft's source when `begin` reduces, so `selectedEdge` is null
|
|
160
|
+
// through the kind step and both of these would answer `none` anyway — but
|
|
161
|
+
// that is a fact about ANOTHER module's reducer, and a table that relied on it
|
|
162
|
+
// would silently start claiming presses the day the selection rule changed.
|
|
163
|
+
['backspace', { kind: 'delete-edge', survives: [] }],
|
|
164
|
+
['delete', { kind: 'delete-edge', survives: [] }],
|
|
165
|
+
['t', { kind: 'retype-edge', survives: [] }],
|
|
166
|
+
['escape', { kind: 'cancel', survives: ['target-search', 'kind-chooser'] }],
|
|
104
167
|
]);
|
|
168
|
+
/**
|
|
169
|
+
* The numbered kind list, for a surface that DRAWS the digits this map reads.
|
|
170
|
+
*
|
|
171
|
+
* ONE CONSTRUCTION, FILTERED — not a second `EDGE_FIELDS.map((_, i) => …)`
|
|
172
|
+
* somewhere a renderer can see. `workspace/mount.ts` had exactly that second
|
|
173
|
+
* copy: its chooser built `${index + 1} ${word}` from a `KINDS` alias — since
|
|
174
|
+
* removed with it — while this table built the same digits from `EDGE_FIELDS`,
|
|
175
|
+
* and the two agreed only because both happened to walk the same array (the
|
|
176
|
+
* alias WAS `EDGE_FIELDS`). Nothing pinned them, so a change to
|
|
177
|
+
* either — a reordering, a skipped digit, a sixth field — would have left the
|
|
178
|
+
* chooser telling the reader to press a key the keyboard resolves differently.
|
|
179
|
+
* That is the drift this module's header rejects in terms, live in the package
|
|
180
|
+
* that reads this module.
|
|
181
|
+
*
|
|
182
|
+
* DERIVED FROM `BINDINGS`, which stays private. Exporting the map itself would
|
|
183
|
+
* publish `survives` and the five non-kind actions, leaving every
|
|
184
|
+
* consumer to work out which entries name a kind — the same "here is the whole
|
|
185
|
+
* table, sort it out" surface a decision table exists to remove. `Map`
|
|
186
|
+
* preserves insertion order and the digits are spread from `EDGE_FIELDS.map`,
|
|
187
|
+
* so this comes out in the format's own order without sorting it.
|
|
188
|
+
*
|
|
189
|
+
* `binding.kind === 'choose-type'` narrows through the intersection for the
|
|
190
|
+
* reason {@link Binding} records: it is written as an intersection precisely so
|
|
191
|
+
* the discriminated union still narrows, which is what lets `edgeKind` be read
|
|
192
|
+
* here without a cast.
|
|
193
|
+
*/
|
|
194
|
+
export const KIND_KEYS = Object.freeze([...BINDINGS].flatMap(([key, binding]) => binding.kind === 'choose-type' ? [{ key, edgeKind: binding.edgeKind }] : []));
|
|
105
195
|
const NONE = Object.freeze({ kind: 'none' });
|
|
106
196
|
/**
|
|
107
197
|
* Whether this press is a chord that belongs to the platform, not to us.
|
|
@@ -141,19 +231,28 @@ function repeated(press) {
|
|
|
141
231
|
/**
|
|
142
232
|
* Whether a binding is live in the interaction the host reports.
|
|
143
233
|
*
|
|
144
|
-
* A DECISION TABLE OVER THE
|
|
234
|
+
* A DECISION TABLE OVER THE FOUR STATES, exhaustive so a fifth interaction —
|
|
145
235
|
* were the design ever to grow one — is a compile error here rather than a
|
|
146
|
-
* silently permissive default.
|
|
147
|
-
*
|
|
148
|
-
*
|
|
149
|
-
*
|
|
236
|
+
* silently permissive default. This is the ONLY site a new interaction breaks:
|
|
237
|
+
* {@link Restricted } widens on its own and every existing `survives` list keeps
|
|
238
|
+
* compiling, so the answer for the bindings is decided here or not at all.
|
|
239
|
+
*
|
|
240
|
+
* `elsewhere` returning `false` for EVERY binding is the whole of the fix for an
|
|
241
|
+
* unrelated control's `Escape`: that control needs `Escape` to cancel its own
|
|
242
|
+
* edit, and a create draft it knows nothing about must not consume it. The two
|
|
243
|
+
* middle arms read the table rather than naming keys, so the vocabulary stays in
|
|
244
|
+
* one place.
|
|
150
245
|
*/
|
|
151
246
|
function reaches(binding, interaction) {
|
|
152
247
|
switch (interaction) {
|
|
153
248
|
case 'canvas':
|
|
154
249
|
return true;
|
|
250
|
+
case 'kind-chooser':
|
|
251
|
+
return binding.survives.includes('kind-chooser');
|
|
155
252
|
case 'target-search':
|
|
156
|
-
return binding.
|
|
253
|
+
return binding.survives.includes('target-search');
|
|
254
|
+
case 'add-control':
|
|
255
|
+
return binding.survives.includes('add-control');
|
|
157
256
|
case 'elsewhere':
|
|
158
257
|
return false;
|
|
159
258
|
}
|
|
@@ -187,9 +286,9 @@ export function keyIntent(press, context) {
|
|
|
187
286
|
// whether it is a fresh ACT at all, which is a different thing and the reason
|
|
188
287
|
// it is its own predicate.
|
|
189
288
|
// COMPOSITION BITES THE TWO BINDINGS THAT REACH THE TARGET SEARCH, which is
|
|
190
|
-
// why it cannot be folded into `
|
|
191
|
-
//
|
|
192
|
-
//
|
|
289
|
+
// why it cannot be folded into `survives`: `⏎` and `Escape` are exactly the
|
|
290
|
+
// two that reach a focused search box, and exactly the two an IME needs while
|
|
291
|
+
// composing.
|
|
193
292
|
if (chorded(press) || composing(press) || repeated(press))
|
|
194
293
|
return NONE;
|
|
195
294
|
const binding = BINDINGS.get(normalize(press.key));
|
package/dist/create/keys.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"keys.js","sourceRoot":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C,YAAY,KAAK,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,EAAE,OAAO,CAAC,YAAY,EAAE,CAAC;QACjG,KAAK,QAAQ;YACX,uEAAuE;YACvE,6DAA6D;YAC7D,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE,CAAC;IAC3D,CAAC;AACH,CAAC"}
|
|
@@ -37,7 +37,23 @@
|
|
|
37
37
|
*/
|
|
38
38
|
import type { EdgeKind, IssueRef } from '@issuegraph/store';
|
|
39
39
|
/**
|
|
40
|
-
* A candidate's identity, stable across a queue's life
|
|
40
|
+
* A candidate's identity, stable across a queue's life — and across the SCANS of
|
|
41
|
+
* one host, which is a stronger requirement and a deliberate one.
|
|
42
|
+
*
|
|
43
|
+
* ## Why one queue's life is not enough
|
|
44
|
+
*
|
|
45
|
+
* A first pass is left and returned to. A shell that composes this surface has
|
|
46
|
+
* to know which questions the reader already decided, or a re-open re-asks every
|
|
47
|
+
* rejection — and the only thing it can compare across two scans is this id. So
|
|
48
|
+
* a host that reuses an id for a DIFFERENT finding on a later scan makes that
|
|
49
|
+
* question indistinguishable from one already answered, and it is silently
|
|
50
|
+
* dropped.
|
|
51
|
+
*
|
|
52
|
+
* The requirement is stated here rather than worked around downstream because
|
|
53
|
+
* the alternative deletes the feature: decisions scoped to a single scan mean
|
|
54
|
+
* every re-open starts from nothing. A host with no stable identity of its own
|
|
55
|
+
* should derive one from what it detected — the pair, the kind and the detector
|
|
56
|
+
* — rather than counting.
|
|
41
57
|
*
|
|
42
58
|
* OPAQUE TO THIS PACKAGE, and deliberately not derived from the relationship it
|
|
43
59
|
* proposes. Two candidates can legitimately propose the same pair with the same
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"candidates.d.ts","sourceRoot":"","sources":["../../src/firstpass/candidates.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AAEH,OAAO,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAE5D
|
|
1
|
+
{"version":3,"file":"candidates.d.ts","sourceRoot":"","sources":["../../src/firstpass/candidates.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AAEH,OAAO,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAE5D;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,MAAM,MAAM,WAAW,GAAG,MAAM,CAAC;AAEjC;;;;;GAKG;AACH,MAAM,WAAW,iBAAiB;IAChC;;;;;;;;;OASG;IACH,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,+CAA+C;IAC/C,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;CACvB;AAED;;;;;;;;GAQG;AACH,MAAM,WAAW,SAAS;IACxB,QAAQ,CAAC,EAAE,EAAE,WAAW,CAAC;IACzB,4CAA4C;IAC5C,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAC;IACxB,wDAAwD;IACxD,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAC;IACxB,wCAAwC;IACxC,QAAQ,CAAC,EAAE,EAAE,QAAQ,CAAC;IACtB;;;;;OAKG;IACH,QAAQ,CAAC,QAAQ,EAAE,SAAS,iBAAiB,EAAE,CAAC;CACjD;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,WAAW,eAAe;IAC9B;;;;;;;;OAQG;IACH,QAAQ,CAAC,cAAc,EAAE,MAAM,OAAO,CAAC,SAAS,SAAS,EAAE,CAAC,CAAC;CAC9D"}
|