@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
package/dist/index.d.ts
CHANGED
|
@@ -33,17 +33,36 @@
|
|
|
33
33
|
* globals removed, which is what catches a computed access like
|
|
34
34
|
* `globalThis['fet' + 'ch']`.
|
|
35
35
|
*
|
|
36
|
-
* ## The
|
|
37
|
-
*
|
|
38
|
-
*
|
|
39
|
-
*
|
|
40
|
-
*
|
|
41
|
-
*
|
|
42
|
-
*
|
|
43
|
-
*
|
|
44
|
-
*
|
|
45
|
-
*
|
|
46
|
-
*
|
|
36
|
+
* ## The declared crossings
|
|
37
|
+
*
|
|
38
|
+
* Two, and both are the same argument: only the layer that computes the layout
|
|
39
|
+
* knows where anything is, so a thing that needs a POSITION is drawn there.
|
|
40
|
+
*
|
|
41
|
+
* **The `together-with` connector lives in the VIEWER, not here.** A
|
|
42
|
+
* `together-with` edge must be individually selectable, retypeable and
|
|
43
|
+
* deletable, and an enclosure has no edge to click — so the connector is a hit
|
|
44
|
+
* target, and only the layer that computes the layout knows where its endpoints
|
|
45
|
+
* are. Adding it from out here would mean re-deriving positions layer 1 already
|
|
46
|
+
* has, which is the drifting second implementation the package split exists to
|
|
47
|
+
* avoid.
|
|
48
|
+
*
|
|
49
|
+
* **The four edge MARKS are drawn by the viewer, from a request built here.** A
|
|
50
|
+
* `writing…` chip sits on two nodes, a ✕ beside a terminal, a reason beside the
|
|
51
|
+
* line, and a conflict's second version on the line's perpendicular. None of
|
|
52
|
+
* those is the path's own position, and `overlay/render.ts` records four review
|
|
53
|
+
* rounds of what happens when this layer tries to guess one — each fix correct,
|
|
54
|
+
* each followed by another, because the missing thing was never a property but
|
|
55
|
+
* the geometry.
|
|
56
|
+
*
|
|
57
|
+
* What crosses is a vocabulary of POSITIONS — `companion`, never `conflict` —
|
|
58
|
+
* built by `overlay/request.ts` and consumed by the viewer's `marks.ts`. So the
|
|
59
|
+
* viewer gains no edit awareness: it learns where to put a second line, not that
|
|
60
|
+
* a write can conflict. Every state word, glyph and hue token stays on this side.
|
|
61
|
+
*
|
|
62
|
+
* Both are written down as declared crossings rather than discovered later.
|
|
63
|
+
* Treat them as the precedent for DECLARING a crossing, never as permission for
|
|
64
|
+
* more — and note that neither publishes layer 1's geometry outward, which is
|
|
65
|
+
* the move both of them rejected.
|
|
47
66
|
*
|
|
48
67
|
* ## The surface
|
|
49
68
|
*
|
|
@@ -114,10 +133,14 @@
|
|
|
114
133
|
export type { AuditClass, AuditClassSpec, AuditFinding, AuditGraph, AuditInput, AuditSeverity, EncodingRefusal, } from './audit/findings.ts';
|
|
115
134
|
export { AUDIT_CLASSES, AUDIT_CLASS_SPECS, auditDocument } from './audit/findings.ts';
|
|
116
135
|
export type { AuditHeaderOptions, AuditOverlay, AuditRow } from './audit/surface.ts';
|
|
117
|
-
export { AUDIT_COUNT_ATTRIBUTE, AUDIT_FILTER_ATTRIBUTE, AUDIT_SEVERITY_ATTRIBUTE, auditFilterKeeps, auditOverlay, auditRowAttributes, renderAuditHeader, } from './audit/surface.ts';
|
|
136
|
+
export { AUDIT_COUNT_ATTRIBUTE, AUDIT_FILTER_ATTRIBUTE, AUDIT_PANEL_ATTRIBUTE, AUDIT_SEVERITY_ATTRIBUTE, auditFilterKeeps, auditOverlay, auditRowAttributes, renderAuditHeader, } from './audit/surface.ts';
|
|
137
|
+
export type { AuditPanelOptions, AuditWords } from './audit/panel.ts';
|
|
138
|
+
export { AUDIT_KIND_ATTRIBUTE, renderAuditPanel } from './audit/panel.ts';
|
|
139
|
+
export type { EncodingRefusedBlockOptions } from './audit/refused.ts';
|
|
140
|
+
export { renderEncodingRefusedBlock } from './audit/refused.ts';
|
|
118
141
|
export { auditStylesheet } from './audit/styles.ts';
|
|
119
142
|
export { INITIAL_SCALE_STATE, type ScaleCommand, type ScaleState, scaleReducer, } from './scale/commands.ts';
|
|
120
|
-
export { type IsolatedChip, type ScaleCapsule, type ScaleLadder, type ScaleMatch, type ScaleRefusal, type ScaleRoute, type ScaleRouteKind, type ScaleSearch, type ScaleTier, scaleLadder, } from './scale/ladder.ts';
|
|
143
|
+
export { type IsolatedChip, type OmittedComponents, type ScaleCapsule, type ScaleLadder, type ScaleMatch, type ScaleRefusal, type ScaleRoute, type ScaleRouteKind, type ScaleSearch, type ScaleTier, type SizeRange, scaleLadder, } from './scale/ladder.ts';
|
|
121
144
|
export { type ScaleLadderOptions, type ScaleLadderResult, renderScaleLadder, } from './scale/render.ts';
|
|
122
145
|
export { scaleLadderStylesheet } from './scale/styles.ts';
|
|
123
146
|
export { OVERLAY_TREATMENTS, STATE_ATTRIBUTE, type EdgeOverlay, type OverlayAffordance, type OverlayDash, type OverlayMark, type OverlayStroke, type OverlayTreatment, overlayFor, overlayLabel, treatmentForState, } from './overlay/grammar.ts';
|
|
@@ -128,7 +151,7 @@ export { type PickerWords } from './picker/words.ts';
|
|
|
128
151
|
export { type PickerOptions, type PickerResult, renderPicker, } from './picker/render.ts';
|
|
129
152
|
export { pickerStylesheet } from './picker/styles.ts';
|
|
130
153
|
export { type CreateCommand, type CreateDraft, type CreateResult, IDLE_CREATE_DRAFT, createReducer, } from './create/draft.ts';
|
|
131
|
-
export { type CreateInteraction, type KeyIntent, type KeyPress, type KeyboardContext, keyIntent, } from './create/keys.ts';
|
|
154
|
+
export { type CreateInteraction, type KeyIntent, type KeyPress, type KeyboardContext, type KindKey, KIND_KEYS, RELATE_KEY, keyIntent, } from './create/keys.ts';
|
|
132
155
|
export { type Bounds, type PickerPlacement, type Point, type Size, pickerPlacement, } from './create/placement.ts';
|
|
133
156
|
export { type ChangeFacet, type ChangeSummary, type PlacedChip, type ReevaluateView, type SummaryPart, CHANGE_FACETS, reevaluateView, summaryOf, } from './reevaluate/view.ts';
|
|
134
157
|
export { type ChangeWords } from './reevaluate/words.ts';
|
|
@@ -143,11 +166,13 @@ export { type FirstPassWords } from './firstpass/words.ts';
|
|
|
143
166
|
export { ANSWERED_ATTRIBUTE, ANSWER_ATTRIBUTE, COMMAND_ATTRIBUTE, EVIDENCE_TOKEN_ATTRIBUTE, FOUND_ATTRIBUTE, type FirstPassOptions, type FirstPassResult, renderFirstPass, } from './firstpass/render.ts';
|
|
144
167
|
export { firstPassStylesheet } from './firstpass/styles.ts';
|
|
145
168
|
export { type SelectionCommand, type WorkspaceSelection, INITIAL_SELECTION, selectedEdgeId, selectedKey, selectionReducer, } from './workspace/selection.ts';
|
|
169
|
+
export { type FirstPassCommand, type FirstPassOutcome, type FirstPassPhase, type FirstPassState, INITIAL_FIRST_PASS, firstPassReducer, openQueueOf, } from './workspace/firstpass.ts';
|
|
146
170
|
export { type RailWindow, type RailWindowOptions, RAIL_WINDOW, railWindow, } from './workspace/rail.ts';
|
|
147
171
|
export { type InspectorPosition, type InspectorRelationship, type InspectorView, inspectorView, } from './workspace/inspector.ts';
|
|
148
|
-
export { type
|
|
172
|
+
export { type ConflictDiff, type ConflictIssueChange, conflictDiff, diffIsEmpty, diffWithin, } from './workspace/recovery.ts';
|
|
173
|
+
export { type Zone, type WorkspaceOptions, type WorkspaceRefusal, type WorkspaceRecovery, type WorkspaceResult, type WorkspaceView, type WorkspaceWords, type RecoveryWords, type CanvasWords, type RailWords, ZONES, renderWorkspace, } from './workspace/render.ts';
|
|
149
174
|
export { workspaceStylesheet } from './workspace/styles.ts';
|
|
150
|
-
export { type HostCommand, type HostEffect, type HostResult, type HostState, INITIAL_HOST_STATE,
|
|
151
|
-
export { type CanvasMode, type MountWords, type MountWorkspaceOptions, type WorkspaceHandle, type WorkspaceProjection, type WorkspaceUpdate, CANVAS_MODES, MOUNT_RAIL_COUNT, mountWorkspace, } from './workspace/mount.ts';
|
|
175
|
+
export { type HostCommand, type HostEffect, type HostResult, type HostState, INITIAL_HOST_STATE, RAIL_SLACK, editCarrier, railSlackFor, railWindowTarget, reconcileHost, reduceHost, targetMatches, } from './workspace/host.ts';
|
|
176
|
+
export { type CanvasMode, type FirstPassOption, type MountWords, type MountWorkspaceOptions, type WorkspaceHandle, type WorkspaceProjection, type WorkspaceUpdate, CANVAS_MODES, MOUNT_RAIL_COUNT, mountWorkspace, } from './workspace/mount.ts';
|
|
152
177
|
export { mountStylesheet } from './workspace/chrome.ts';
|
|
153
178
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmIG;AAEH,YAAY,EACV,UAAU,EACV,cAAc,EACd,YAAY,EACZ,UAAU,EACV,UAAU,EACV,aAAa,EACb,eAAe,GAChB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,aAAa,EAAE,iBAAiB,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEtF,YAAY,EAAE,kBAAkB,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AACrF,OAAO,EACL,qBAAqB,EACrB,sBAAsB,EACtB,qBAAqB,EACrB,wBAAwB,EACxB,gBAAgB,EAChB,YAAY,EACZ,kBAAkB,EAClB,iBAAiB,GAClB,MAAM,oBAAoB,CAAC;AAE5B,YAAY,EAAE,iBAAiB,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AACtE,OAAO,EAAE,oBAAoB,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAE1E,YAAY,EAAE,2BAA2B,EAAE,MAAM,oBAAoB,CAAC;AACtE,OAAO,EAAE,0BAA0B,EAAE,MAAM,oBAAoB,CAAC;AAEhE,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEpD,OAAO,EACL,mBAAmB,EACnB,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,MAAM,uBAAuB,CAAC;AAE/B,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAE5D,OAAO,EACL,KAAK,WAAW,EAChB,KAAK,UAAU,EACf,KAAK,UAAU,EACf,KAAK,SAAS,EACd,kBAAkB,EAClB,UAAU,EAQV,WAAW,EACX,YAAY,EACZ,gBAAgB,EAChB,aAAa,EACb,UAAU,EACV,aAAa,GACd,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EACL,KAAK,UAAU,EACf,KAAK,eAAe,EACpB,KAAK,UAAU,EACf,KAAK,qBAAqB,EAC1B,KAAK,eAAe,EACpB,KAAK,mBAAmB,EACxB,KAAK,eAAe,EACpB,YAAY,EACZ,gBAAgB,EAChB,cAAc,GACf,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -33,17 +33,36 @@
|
|
|
33
33
|
* globals removed, which is what catches a computed access like
|
|
34
34
|
* `globalThis['fet' + 'ch']`.
|
|
35
35
|
*
|
|
36
|
-
* ## The
|
|
37
|
-
*
|
|
38
|
-
*
|
|
39
|
-
*
|
|
40
|
-
*
|
|
41
|
-
*
|
|
42
|
-
*
|
|
43
|
-
*
|
|
44
|
-
*
|
|
45
|
-
*
|
|
46
|
-
*
|
|
36
|
+
* ## The declared crossings
|
|
37
|
+
*
|
|
38
|
+
* Two, and both are the same argument: only the layer that computes the layout
|
|
39
|
+
* knows where anything is, so a thing that needs a POSITION is drawn there.
|
|
40
|
+
*
|
|
41
|
+
* **The `together-with` connector lives in the VIEWER, not here.** A
|
|
42
|
+
* `together-with` edge must be individually selectable, retypeable and
|
|
43
|
+
* deletable, and an enclosure has no edge to click — so the connector is a hit
|
|
44
|
+
* target, and only the layer that computes the layout knows where its endpoints
|
|
45
|
+
* are. Adding it from out here would mean re-deriving positions layer 1 already
|
|
46
|
+
* has, which is the drifting second implementation the package split exists to
|
|
47
|
+
* avoid.
|
|
48
|
+
*
|
|
49
|
+
* **The four edge MARKS are drawn by the viewer, from a request built here.** A
|
|
50
|
+
* `writing…` chip sits on two nodes, a ✕ beside a terminal, a reason beside the
|
|
51
|
+
* line, and a conflict's second version on the line's perpendicular. None of
|
|
52
|
+
* those is the path's own position, and `overlay/render.ts` records four review
|
|
53
|
+
* rounds of what happens when this layer tries to guess one — each fix correct,
|
|
54
|
+
* each followed by another, because the missing thing was never a property but
|
|
55
|
+
* the geometry.
|
|
56
|
+
*
|
|
57
|
+
* What crosses is a vocabulary of POSITIONS — `companion`, never `conflict` —
|
|
58
|
+
* built by `overlay/request.ts` and consumed by the viewer's `marks.ts`. So the
|
|
59
|
+
* viewer gains no edit awareness: it learns where to put a second line, not that
|
|
60
|
+
* a write can conflict. Every state word, glyph and hue token stays on this side.
|
|
61
|
+
*
|
|
62
|
+
* Both are written down as declared crossings rather than discovered later.
|
|
63
|
+
* Treat them as the precedent for DECLARING a crossing, never as permission for
|
|
64
|
+
* more — and note that neither publishes layer 1's geometry outward, which is
|
|
65
|
+
* the move both of them rejected.
|
|
47
66
|
*
|
|
48
67
|
* ## The surface
|
|
49
68
|
*
|
|
@@ -112,7 +131,9 @@
|
|
|
112
131
|
* @see https://github.com/autnmy/issuegraph/blob/main/SPEC.md
|
|
113
132
|
*/
|
|
114
133
|
export { AUDIT_CLASSES, AUDIT_CLASS_SPECS, auditDocument } from "./audit/findings.js";
|
|
115
|
-
export { AUDIT_COUNT_ATTRIBUTE, AUDIT_FILTER_ATTRIBUTE, AUDIT_SEVERITY_ATTRIBUTE, auditFilterKeeps, auditOverlay, auditRowAttributes, renderAuditHeader, } from "./audit/surface.js";
|
|
134
|
+
export { AUDIT_COUNT_ATTRIBUTE, AUDIT_FILTER_ATTRIBUTE, AUDIT_PANEL_ATTRIBUTE, AUDIT_SEVERITY_ATTRIBUTE, auditFilterKeeps, auditOverlay, auditRowAttributes, renderAuditHeader, } from "./audit/surface.js";
|
|
135
|
+
export { AUDIT_KIND_ATTRIBUTE, renderAuditPanel } from "./audit/panel.js";
|
|
136
|
+
export { renderEncodingRefusedBlock } from "./audit/refused.js";
|
|
116
137
|
export { auditStylesheet } from "./audit/styles.js";
|
|
117
138
|
export { INITIAL_SCALE_STATE, scaleReducer, } from "./scale/commands.js";
|
|
118
139
|
export { scaleLadder, } from "./scale/ladder.js";
|
|
@@ -126,7 +147,7 @@ export {} from "./picker/words.js";
|
|
|
126
147
|
export { renderPicker, } from "./picker/render.js";
|
|
127
148
|
export { pickerStylesheet } from "./picker/styles.js";
|
|
128
149
|
export { IDLE_CREATE_DRAFT, createReducer, } from "./create/draft.js";
|
|
129
|
-
export { keyIntent, } from "./create/keys.js";
|
|
150
|
+
export { KIND_KEYS, RELATE_KEY, keyIntent, } from "./create/keys.js";
|
|
130
151
|
export { pickerPlacement, } from "./create/placement.js";
|
|
131
152
|
export { CHANGE_FACETS, reevaluateView, summaryOf, } from "./reevaluate/view.js";
|
|
132
153
|
export {} from "./reevaluate/words.js";
|
|
@@ -140,11 +161,21 @@ export {} from "./firstpass/words.js";
|
|
|
140
161
|
export { ANSWERED_ATTRIBUTE, ANSWER_ATTRIBUTE, COMMAND_ATTRIBUTE, EVIDENCE_TOKEN_ATTRIBUTE, FOUND_ATTRIBUTE, renderFirstPass, } from "./firstpass/render.js";
|
|
141
162
|
export { firstPassStylesheet } from "./firstpass/styles.js";
|
|
142
163
|
export { INITIAL_SELECTION, selectedEdgeId, selectedKey, selectionReducer, } from "./workspace/selection.js";
|
|
164
|
+
export { INITIAL_FIRST_PASS, firstPassReducer, openQueueOf, } from "./workspace/firstpass.js";
|
|
143
165
|
export { RAIL_WINDOW, railWindow, } from "./workspace/rail.js";
|
|
144
166
|
export { inspectorView, } from "./workspace/inspector.js";
|
|
167
|
+
export { conflictDiff, diffIsEmpty, diffWithin, } from "./workspace/recovery.js";
|
|
145
168
|
export { ZONES, renderWorkspace, } from "./workspace/render.js";
|
|
146
169
|
export { workspaceStylesheet } from "./workspace/styles.js";
|
|
147
|
-
export { INITIAL_HOST_STATE,
|
|
170
|
+
export { INITIAL_HOST_STATE, RAIL_SLACK,
|
|
171
|
+
// ON THE SURFACE BECAUSE `WorkspaceRefusal` REQUIRES WHAT IT ANSWERS. A host
|
|
172
|
+
// rendering without `mountWorkspace` has to say which issue each refusal is
|
|
173
|
+
// about, and working that out from the refused edge's endpoints is the exact
|
|
174
|
+
// derivation the `carrier` field exists to replace — so the answer ships
|
|
175
|
+
// beside the field that asks for it. ASK IT AS THE EDIT GOES OUT AND KEEP THE
|
|
176
|
+
// ANSWER: it reads the document, and by the time a refusal comes back the
|
|
177
|
+
// relationship it was about may be gone. See its own header.
|
|
178
|
+
editCarrier, railSlackFor, railWindowTarget, reconcileHost, reduceHost, targetMatches, } from "./workspace/host.js";
|
|
148
179
|
export { CANVAS_MODES, MOUNT_RAIL_COUNT, mountWorkspace, } from "./workspace/mount.js";
|
|
149
180
|
export { mountStylesheet } from "./workspace/chrome.js";
|
|
150
181
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmIG;AAWH,OAAO,EAAE,aAAa,EAAE,iBAAiB,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAGtF,OAAO,EACL,qBAAqB,EACrB,sBAAsB,EACtB,qBAAqB,EACrB,wBAAwB,EACxB,gBAAgB,EAChB,YAAY,EACZ,kBAAkB,EAClB,iBAAiB,GAClB,MAAM,oBAAoB,CAAC;AAG5B,OAAO,EAAE,o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EAChB,cAAc,GACf,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC"}
|
package/dist/overlay/render.d.ts
CHANGED
|
@@ -45,9 +45,17 @@
|
|
|
45
45
|
*
|
|
46
46
|
* ## How an edge is recognised
|
|
47
47
|
*
|
|
48
|
-
*
|
|
49
|
-
*
|
|
50
|
-
*
|
|
48
|
+
* Edge paths publish `edgeIdentity(field, from, to)` on `data-ig-group`, and that
|
|
49
|
+
* is the key an edge is matched by. The accessible name — `${from}
|
|
50
|
+
* ${treatment.label} ${to}` — is the FALLBACK, kept for a viewer that has not
|
|
51
|
+
* shipped the identity yet; `overlayOn` below states the full reasoning.
|
|
52
|
+
*
|
|
53
|
+
* This paragraph used to say the opposite, that only the `together-with`
|
|
54
|
+
* connector carried an identity and the name was the only key. It was true when
|
|
55
|
+
* it was written and stopped being true when the paths gained one, while the
|
|
56
|
+
* correct version sat 140 lines below it in the same file. A reader consulting
|
|
57
|
+
* the design record before touching this seam would have concluded the key it
|
|
58
|
+
* rests on does not exist.
|
|
51
59
|
*
|
|
52
60
|
* The label is read from the viewer's OWN `treatmentFor`, never from a copy, so
|
|
53
61
|
* a renamed relationship moves both sides at once. What stays local is the
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"render.d.ts","sourceRoot":"","sources":["../../src/overlay/render.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"render.d.ts","sourceRoot":"","sources":["../../src/overlay/render.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2FG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AACvD,OAAO,EAEL,KAAK,WAAW,EAChB,KAAK,KAAK,EAEV,KAAK,KAAK,EAIX,MAAM,oBAAoB,CAAC;AAE5B,OAAO,EAGL,KAAK,WAAW,EAGjB,MAAM,cAAc,CAAC;AAEtB,8EAA8E;AAC9E,eAAO,MAAM,aAAa,eAAe,CAAC;AA4B1C,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,KAAK,CAAC,EAAE,KAAK,GAAG,SAAS,CAAC;CACpC;AAED,MAAM,WAAW,YAAY;IAC3B,QAAQ,CAAC,KAAK,EAAE,KAAK,CAAC;IACtB;;;;OAIG;IACH,QAAQ,CAAC,QAAQ,EAAE,SAAS,WAAW,EAAE,CAAC;IAC1C,2EAA2E;IAC3E,QAAQ,CAAC,UAAU,EAAE,SAAS,WAAW,EAAE,CAAC;CAC7C;AA2TD;;;;;;GAMG;AACH,wBAAgB,kBAAkB,CAChC,KAAK,EAAE,KAAK,EACZ,KAAK,EAAE,SAAS,aAAa,EAAE,EAC/B,OAAO,GAAE,cAAmB,GAC3B,YAAY,CAyCd;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,iBAAiB,CAC/B,OAAO,EAAE,WAAW,EACpB,IAAI,EAAE,WAAW,CAAC,OAAO,CAAC,CAAC,MAAM,CAAC,EAClC,UAAU,CAAC,EAAE,MAAM,GAClB,WAAW,CA+Db"}
|
package/dist/overlay/render.js
CHANGED
|
@@ -45,9 +45,17 @@
|
|
|
45
45
|
*
|
|
46
46
|
* ## How an edge is recognised
|
|
47
47
|
*
|
|
48
|
-
*
|
|
49
|
-
*
|
|
50
|
-
*
|
|
48
|
+
* Edge paths publish `edgeIdentity(field, from, to)` on `data-ig-group`, and that
|
|
49
|
+
* is the key an edge is matched by. The accessible name — `${from}
|
|
50
|
+
* ${treatment.label} ${to}` — is the FALLBACK, kept for a viewer that has not
|
|
51
|
+
* shipped the identity yet; `overlayOn` below states the full reasoning.
|
|
52
|
+
*
|
|
53
|
+
* This paragraph used to say the opposite, that only the `together-with`
|
|
54
|
+
* connector carried an identity and the name was the only key. It was true when
|
|
55
|
+
* it was written and stopped being true when the paths gained one, while the
|
|
56
|
+
* correct version sat 140 lines below it in the same file. A reader consulting
|
|
57
|
+
* the design record before touching this seam would have concluded the key it
|
|
58
|
+
* rests on does not exist.
|
|
51
59
|
*
|
|
52
60
|
* The label is read from the viewer's OWN `treatmentFor`, never from a copy, so
|
|
53
61
|
* a renamed relationship moves both sides at once. What stays local is the
|
|
@@ -91,15 +99,21 @@ const EDGE_CLASS = 'ig-edge';
|
|
|
91
99
|
/** The class the viewer puts on a terminal marker. NEVER matched — see below. */
|
|
92
100
|
const TERMINAL_CLASS = 'ig-terminal';
|
|
93
101
|
/**
|
|
94
|
-
* The class the viewer puts on a
|
|
102
|
+
* The class the viewer puts on a relationship BADGE.
|
|
103
|
+
*
|
|
104
|
+
* A `together-with` relationship is NOT drawn as an edge path — it shares a
|
|
105
|
+
* rank rather than ordering anything, and layer 1's §16 pass draws the unit as
|
|
106
|
+
* ONE card with its members listed inside, so there is no line between two
|
|
107
|
+
* boxes left to overlay. What still carries the relationship, in every
|
|
108
|
+
* projection, is the badge that names it: it publishes the same
|
|
109
|
+
* `edgeIdentity(...)` on `data-ig-group` that the connector did.
|
|
95
110
|
*
|
|
96
|
-
*
|
|
97
|
-
*
|
|
98
|
-
*
|
|
99
|
-
*
|
|
100
|
-
* `together-with` came back `unattached`.
|
|
111
|
+
* WITHOUT MATCHING IT, one of the five relationships could never be overlaid at
|
|
112
|
+
* all — every state on a `together-with` came back `unattached`, which is the
|
|
113
|
+
* exact defect the connector match was added to fix, returning by a different
|
|
114
|
+
* route when the connector went away.
|
|
101
115
|
*/
|
|
102
|
-
const
|
|
116
|
+
const BADGE_CLASS = 'ig-badge';
|
|
103
117
|
/** The attribute the connector publishes its edge identity on. */
|
|
104
118
|
const GROUP_ATTRIBUTE = 'data-ig-group';
|
|
105
119
|
/** The accessible name the viewer gives an edge, reconstructed from its parts. */
|
|
@@ -111,8 +125,26 @@ function classesOf(attrs) {
|
|
|
111
125
|
return typeof value === 'string' ? value.split(' ').filter((name) => name !== '') : [];
|
|
112
126
|
}
|
|
113
127
|
function isEdgePath(spec) {
|
|
114
|
-
|
|
115
|
-
|
|
128
|
+
return classesOf(spec.attrs).includes(EDGE_CLASS);
|
|
129
|
+
}
|
|
130
|
+
/**
|
|
131
|
+
* Whether this element is a relationship BADGE — the chip naming an edge.
|
|
132
|
+
*
|
|
133
|
+
* IT TAKES THE STATE ATTRIBUTES AND NONE OF THE DRAWN MARKS, and that split is
|
|
134
|
+
* the whole point of it being a separate test. Every mark this module draws is
|
|
135
|
+
* CLONED from the element it matched — a halo is a fatter copy of the stroke, a
|
|
136
|
+
* ghost is a dashed copy of it — and a copy of an HTML span is not a mark, it is
|
|
137
|
+
* a second chip. So a badge is an attachment point for what a state SAYS and
|
|
138
|
+
* never for what a state DRAWS.
|
|
139
|
+
*
|
|
140
|
+
* IT IS ALSO WHAT KEEPS `together-with` OVERLAYABLE. That relationship is drawn
|
|
141
|
+
* as no line at all — it shares a rank rather than ordering anything, and layer
|
|
142
|
+
* 1 draws the unit as one card with its members listed inside — so the badge is
|
|
143
|
+
* the only mark left that carries its identity. Without this, every state on one
|
|
144
|
+
* of the five relationships came back `unattached`.
|
|
145
|
+
*/
|
|
146
|
+
function isEdgeBadge(spec) {
|
|
147
|
+
return classesOf(spec.attrs).includes(BADGE_CLASS);
|
|
116
148
|
}
|
|
117
149
|
/**
|
|
118
150
|
* Which overlay this element carries, if any.
|
|
@@ -239,7 +271,16 @@ function overlayMarks(spec, overlay, edge, theme) {
|
|
|
239
271
|
* from the edge every time makes a second attach a no-op, which is what a
|
|
240
272
|
* caller re-rendering on every state change will do.
|
|
241
273
|
*/
|
|
242
|
-
function edgeAttributes(base, overlay
|
|
274
|
+
function edgeAttributes(base, overlay,
|
|
275
|
+
/**
|
|
276
|
+
* Whether the element being written to is a drawn STROKE.
|
|
277
|
+
*
|
|
278
|
+
* `opacity` is an SVG presentation attribute. On a badge — an HTML span — it
|
|
279
|
+
* renders as an attribute no browser reads, so the state's dimming would
|
|
280
|
+
* silently not apply while the markup claimed it did. The chip is dimmed by
|
|
281
|
+
* the stylesheet's own state rule or not at all.
|
|
282
|
+
*/
|
|
283
|
+
stroke) {
|
|
243
284
|
const opacity = overlay.line?.opacity;
|
|
244
285
|
return {
|
|
245
286
|
[STATE_ATTRIBUTE]: overlay.attribute,
|
|
@@ -248,7 +289,7 @@ function edgeAttributes(base, overlay) {
|
|
|
248
289
|
'aria-label': overlayLabel(base, overlay),
|
|
249
290
|
// The table is the single source for this number; the stylesheet
|
|
250
291
|
// deliberately carries no opacity rule for a state.
|
|
251
|
-
...(opacity === null || opacity === undefined ? {} : { opacity }),
|
|
292
|
+
...(!stroke || opacity === null || opacity === undefined ? {} : { opacity }),
|
|
252
293
|
};
|
|
253
294
|
}
|
|
254
295
|
/**
|
|
@@ -275,7 +316,7 @@ function overlayTree(spec, context) {
|
|
|
275
316
|
next.push(child);
|
|
276
317
|
continue;
|
|
277
318
|
}
|
|
278
|
-
if (!isEdgePath(child)) {
|
|
319
|
+
if (!isEdgePath(child) && !isEdgeBadge(child)) {
|
|
279
320
|
next.push(overlayTree(child, context));
|
|
280
321
|
continue;
|
|
281
322
|
}
|
|
@@ -322,8 +363,15 @@ function overlayTree(spec, context) {
|
|
|
322
363
|
// The marks that are genuinely per-edge — the chips, the ✕, the reason —
|
|
323
364
|
// are not built here at all. They need a position this layer does not have,
|
|
324
365
|
// so they travel as declared marks and are placed once by the composer.
|
|
325
|
-
|
|
326
|
-
|
|
366
|
+
// A BADGE TAKES THE WORDS AND NOT THE MARKS — see `isEdgeBadge`.
|
|
367
|
+
const stroke = isEdgePath(child);
|
|
368
|
+
const { behind, front } = stroke
|
|
369
|
+
? overlayMarks(child, match.overlay, edge, context.theme)
|
|
370
|
+
: { behind: [], front: [] };
|
|
371
|
+
next.push(...behind, {
|
|
372
|
+
...child,
|
|
373
|
+
attrs: { ...child.attrs, ...edgeAttributes(edgeName(edge), match.overlay, stroke) },
|
|
374
|
+
}, ...front);
|
|
327
375
|
}
|
|
328
376
|
return { ...spec, children: next };
|
|
329
377
|
}
|
|
@@ -425,9 +473,17 @@ export function renderOverlayMark(overlay, mark, reasonCode) {
|
|
|
425
473
|
'data-ig-code': reasonCode ?? null,
|
|
426
474
|
});
|
|
427
475
|
case 'second-version':
|
|
428
|
-
// Also a slot
|
|
429
|
-
//
|
|
430
|
-
//
|
|
476
|
+
// Also a slot, and this comment used to say the held version was drawn
|
|
477
|
+
// "by `attachEdgeOverlays` as the companion stroke". That contradicted the
|
|
478
|
+
// module note at the top of this file, which is the half that was true:
|
|
479
|
+
// the companion needs the path's PERPENDICULAR, which cannot be recovered
|
|
480
|
+
// from a `d` this layer does not interpret, so it is not drawn here and
|
|
481
|
+
// never was after the fourth round removed it.
|
|
482
|
+
//
|
|
483
|
+
// It is drawn by layer 1 now, from the `companion` placement `request.ts`
|
|
484
|
+
// asks for — the layer that computed the layout is the one that can put a
|
|
485
|
+
// line beside a line. What a host adds HERE is whatever labels or offers
|
|
486
|
+
// to act on it — view-diff, retry-on-latest, discard-mine. Never a merge.
|
|
431
487
|
return element('span', {
|
|
432
488
|
class: `${OVERLAY_CLASS} ig-overlay-held`,
|
|
433
489
|
'data-ig-overlay': 'conflict',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"render.js","sourceRoot":"","sources":["../../src/overlay/render.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"render.js","sourceRoot":"","sources":["../../src/overlay/render.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2FG;AAGH,OAAO,EAML,OAAO,EACP,YAAY,EACZ,YAAY,GACb,MAAM,oBAAoB,CAAC;AAE5B,OAAO,EACL,YAAY,EACZ,eAAe,EAEf,UAAU,EACV,YAAY,GACb,MAAM,cAAc,CAAC;AAEtB,8EAA8E;AAC9E,MAAM,CAAC,MAAM,aAAa,GAAG,YAAY,C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1E,yEAAyE;YACzE,0EAA0E;YAC1E,OAAO,OAAO,CAAC,MAAM,EAAE;gBACrB,KAAK,EAAE,GAAG,aAAa,kBAAkB;gBACzC,iBAAiB,EAAE,UAAU;gBAC7B,cAAc,EAAE,cAAc;gBAC9B,YAAY,EAAE,YAAY,CAAC,EAAE,EAAE,OAAO,CAAC,CAAC,IAAI,EAAE;aAC/C,CAAC,CAAC;IACP,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The one place a write state becomes a position.
|
|
3
|
+
*
|
|
4
|
+
* ## What this module is for
|
|
5
|
+
*
|
|
6
|
+
* `attachEdgeOverlays` draws everything an overlay can say by reusing the path's
|
|
7
|
+
* own position — a halo is the path stroked wider, a ghost is the path dashed
|
|
8
|
+
* differently. What it cannot draw is the half that needs a NEW position: a chip
|
|
9
|
+
* on the two nodes, a cross beside the terminal, a reason beside the line, and a
|
|
10
|
+
* conflict's second version on the line's perpendicular. Those travel as
|
|
11
|
+
* {@link EdgeOverlay.marks}, declared here rather than half-drawn there.
|
|
12
|
+
*
|
|
13
|
+
* Layer 1 places them, because it is the layer that computed the layout. This
|
|
14
|
+
* module is the translation that lets it do so without learning anything: it
|
|
15
|
+
* turns each declared mark into an {@link EdgeMark} whose vocabulary is
|
|
16
|
+
* POSITIONAL, so the viewer receives `companion` and never `conflict`.
|
|
17
|
+
*
|
|
18
|
+
* ## The mapping is the seam, so it lives on one table
|
|
19
|
+
*
|
|
20
|
+
* One entry per mark the grammar can declare, and the table is exhaustive over
|
|
21
|
+
* that union rather than a switch with a default — a fifth mark added to the
|
|
22
|
+
* grammar should fail to compile here, not silently stop being drawn. That is
|
|
23
|
+
* the failure this whole area has had twice: a channel declared in a table and
|
|
24
|
+
* rendered by nothing.
|
|
25
|
+
*
|
|
26
|
+
* ## The words stay on this side
|
|
27
|
+
*
|
|
28
|
+
* `writing…` and `✕` are this package's vocabulary — the same strings
|
|
29
|
+
* `renderOverlayMark` puts in the host-facing slot — and they are handed over as
|
|
30
|
+
* opaque content. A host that translates translates one vocabulary, and the
|
|
31
|
+
* viewer never holds a word it could be asked to translate.
|
|
32
|
+
*
|
|
33
|
+
* The hue travels as a token NAME, read from the treatment table rather than
|
|
34
|
+
* copied, so a retheme moves the mark and the stroke together. Where a state has
|
|
35
|
+
* no hue of its own this asks for NONE, and layer 1 fills in the relationship's.
|
|
36
|
+
*
|
|
37
|
+
* That last clause used to say the mark "inherits the relationship's — which is
|
|
38
|
+
* the same rule the dashed clone follows", and both halves were wrong. A mark is
|
|
39
|
+
* a SIBLING of the edge, so it inherits the viewer's body text and not the hue
|
|
40
|
+
* `.ig-edge[data-edge=…]` gives the line; and the dashed clone does not inherit
|
|
41
|
+
* either — `render.ts` states its stroke inline for exactly that reason, in a
|
|
42
|
+
* comment about exactly this trap. A `pending-write` chip therefore rendered
|
|
43
|
+
* grey beside the red line it belonged to.
|
|
44
|
+
*
|
|
45
|
+
* So "no tone" is a REQUEST for the kind's hue rather than a decision to have
|
|
46
|
+
* none, and the layer that owns the relationship vocabulary is the one that
|
|
47
|
+
* resolves it.
|
|
48
|
+
*/
|
|
49
|
+
import type { ProjectedEdge } from '@issuegraph/store';
|
|
50
|
+
import type { EdgeMark } from '@issuegraph/viewer';
|
|
51
|
+
import { type EdgeOverlay } from './grammar.ts';
|
|
52
|
+
/**
|
|
53
|
+
* The marks one overlay asks layer 1 to draw.
|
|
54
|
+
*
|
|
55
|
+
* Empty for an overlay with no marks, which is most of them: `selected` declares
|
|
56
|
+
* none at all, and its halo is drawn from the path's own position.
|
|
57
|
+
*/
|
|
58
|
+
export declare function marksFor(overlay: EdgeOverlay): readonly EdgeMark[];
|
|
59
|
+
/**
|
|
60
|
+
* Every overlay's marks, keyed the way layer 1 keys its edges.
|
|
61
|
+
*
|
|
62
|
+
* `ProjectedEdge.id` is `edgeIdentity(field, from, to)` — the same string the
|
|
63
|
+
* viewer publishes on `data-ig-group` — so the two sides agree with no
|
|
64
|
+
* reconstruction and nothing to keep in step.
|
|
65
|
+
*
|
|
66
|
+
* An overlay with no marks is left OUT rather than mapped to an empty list: the
|
|
67
|
+
* absence of a key and a key with nothing under it should not be two ways of
|
|
68
|
+
* saying the same thing to a reader of this map.
|
|
69
|
+
*/
|
|
70
|
+
export declare function edgeMarkRequests(edges: readonly ProjectedEdge[]): ReadonlyMap<string, readonly EdgeMark[]>;
|
|
71
|
+
//# sourceMappingURL=request.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"request.d.ts","sourceRoot":"","sources":["../../src/overlay/request.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+CG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AACvD,OAAO,KAAK,EAAE,QAAQ,EAAqB,MAAM,oBAAoB,CAAC;AAEtE,OAAO,EACL,KAAK,WAAW,EAIjB,MAAM,cAAc,CAAC;AA4BtB;;;;;GAKG;AACH,wBAAgB,QAAQ,CAAC,OAAO,EAAE,WAAW,GAAG,SAAS,QAAQ,EAAE,CA2BlE;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,gBAAgB,CAC9B,KAAK,EAAE,SAAS,aAAa,EAAE,GAC9B,WAAW,CAAC,MAAM,EAAE,SAAS,QAAQ,EAAE,CAAC,CAW1C"}
|