@issuegraph/viewer 0.2.0 → 0.5.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.
Files changed (52) hide show
  1. package/README.md +39 -2
  2. package/dist/document.d.ts +286 -3
  3. package/dist/document.d.ts.map +1 -1
  4. package/dist/document.js +247 -1
  5. package/dist/document.js.map +1 -1
  6. package/dist/element.d.ts +11 -0
  7. package/dist/element.d.ts.map +1 -1
  8. package/dist/element.js.map +1 -1
  9. package/dist/index.d.ts +6 -6
  10. package/dist/index.d.ts.map +1 -1
  11. package/dist/index.js +30 -4
  12. package/dist/index.js.map +1 -1
  13. package/dist/layout.d.ts +51 -50
  14. package/dist/layout.d.ts.map +1 -1
  15. package/dist/layout.js +364 -168
  16. package/dist/layout.js.map +1 -1
  17. package/dist/mount.d.ts +13 -0
  18. package/dist/mount.d.ts.map +1 -1
  19. package/dist/mount.js +94 -3
  20. package/dist/mount.js.map +1 -1
  21. package/dist/navigation.d.ts +14 -0
  22. package/dist/navigation.d.ts.map +1 -1
  23. package/dist/navigation.js +20 -0
  24. package/dist/navigation.js.map +1 -1
  25. package/dist/parts.d.ts +338 -1
  26. package/dist/parts.d.ts.map +1 -1
  27. package/dist/parts.js +899 -30
  28. package/dist/parts.js.map +1 -1
  29. package/dist/projections/graph.d.ts +10 -0
  30. package/dist/projections/graph.d.ts.map +1 -1
  31. package/dist/projections/graph.js +413 -311
  32. package/dist/projections/graph.js.map +1 -1
  33. package/dist/projections/linear.d.ts +90 -0
  34. package/dist/projections/linear.d.ts.map +1 -1
  35. package/dist/projections/linear.js +220 -28
  36. package/dist/projections/linear.js.map +1 -1
  37. package/dist/projections/tree.d.ts.map +1 -1
  38. package/dist/projections/tree.js +29 -3
  39. package/dist/projections/tree.js.map +1 -1
  40. package/dist/styles.d.ts +10 -1
  41. package/dist/styles.d.ts.map +1 -1
  42. package/dist/styles.js +825 -68
  43. package/dist/styles.js.map +1 -1
  44. package/dist/theme.d.ts +41 -10
  45. package/dist/theme.d.ts.map +1 -1
  46. package/dist/theme.js +265 -11
  47. package/dist/theme.js.map +1 -1
  48. package/dist/vocabulary.d.ts +39 -0
  49. package/dist/vocabulary.d.ts.map +1 -1
  50. package/dist/vocabulary.js +27 -0
  51. package/dist/vocabulary.js.map +1 -1
  52. package/package.json +2 -2
@@ -1 +1 @@
1
- {"version":3,"file":"styles.js","sourceRoot":"","sources":["../src/styles.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,MAAM,CAAC,MAAM,gBAAgB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoX/B,CAAC"}
1
+ {"version":3,"file":"styles.js","sourceRoot":"","sources":["../src/styles.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,MAAM,CAAC,MAAM,gBAAgB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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-text-muted", "--ig-accent", "--ig-focus", "--ig-station-ready", "--ig-station-pending", "--ig-station-held", "--ig-edge-blocked-by", "--ig-edge-serialize-with", "--ig-edge-together-with", "--ig-edge-duplicate-of", "--ig-edge-decomposed-from", "--ig-state-invalid", "--ig-state-failed", "--ig-state-conflict"];
24
24
  export type ColorToken = (typeof COLOR_TOKENS)[number];
25
- /** Type tokens. `lineHeight` is unitless; the rest carry their own units. */
26
- export declare const TYPE_TOKENS: readonly ["--ig-font-ui", "--ig-font-mono", "--ig-font-size", "--ig-font-size-small", "--ig-line-height"];
25
+ /**
26
+ * Type tokens. `lineHeight` is unitless; the rest carry their own units.
27
+ *
28
+ * WEIGHT AND TRACKING ARE TYPE, NOT GEOMETRY, even though a reader might file
29
+ * them under either. They are emitted VERBATIM, which is the property that
30
+ * settles it: a weight is a unitless number and a tracking value is an `em`,
31
+ * and {@link METRIC_TOKENS} would give both a `px` unit and silently void the
32
+ * declaration.
33
+ */
34
+ export declare const TYPE_TOKENS: readonly ["--ig-font-ui", "--ig-font-mono", "--ig-font-size", "--ig-font-size-small", "--ig-line-height", "--ig-font-size-micro", "--ig-font-size-pill", "--ig-weight-regular", "--ig-weight-medium", "--ig-weight-strong", "--ig-weight-heavy", "--ig-tracking-label", "--ig-tracking-group", "--ig-tracking-pill", "--ig-tracking-badge", "--ig-font-size-meta", "--ig-font-size-compact", "--ig-font-size-row", "--ig-font-size-rank"];
27
35
  export type TypeToken = (typeof TYPE_TOKENS)[number];
28
36
  /** Geometry tokens. Every value is a number of CSS pixels. */
29
- export declare const METRIC_TOKENS: readonly ["--ig-space", "--ig-space-tight", "--ig-radius", "--ig-row-height", "--ig-station-size", "--ig-station-halo", "--ig-stroke", "--ig-stroke-connector", "--ig-terminal-length", "--ig-terminal-width", "--ig-gutter-width", "--ig-spine-width", "--ig-char-width", "--ig-label-char-width", "--ig-focus-ring"];
37
+ export declare const METRIC_TOKENS: readonly ["--ig-space", "--ig-space-tight", "--ig-radius", "--ig-row-height", "--ig-station-size", "--ig-station-halo", "--ig-stroke", "--ig-stroke-connector", "--ig-stroke-audit", "--ig-terminal-length", "--ig-terminal-width", "--ig-gutter-width", "--ig-spine-width", "--ig-char-width", "--ig-label-char-width", "--ig-focus-ring", "--ig-space-micro", "--ig-space-snug", "--ig-space-loose", "--ig-space-wide", "--ig-radius-small", "--ig-radius-large", "--ig-row-min-height", "--ig-row-padding-block", "--ig-band-rail", "--ig-rank-column", "--ig-station-box", "--ig-card-line"];
30
38
  export type MetricToken = (typeof METRIC_TOKENS)[number];
39
+ /**
40
+ * Surface-treatment tokens: values that are none of a colour, a type value or
41
+ * a pixel length, and so belong to none of the three groups above.
42
+ *
43
+ * A FOURTH GROUP RATHER THAN A HOME OF CONVENIENCE IN AN EXISTING ONE. A tint
44
+ * strength is a proportion and an elevation is a whole `box-shadow`; put
45
+ * either in {@link METRIC_TOKENS} and `themeCss` appends `px` to it, which is
46
+ * not a value any browser reads. Put them in {@link TYPE_TOKENS} and the group
47
+ * that documents itself as "type" starts carrying shadows — the same
48
+ * one-token-two-meanings problem the edit-state hues are kept apart from.
49
+ *
50
+ * NO TINT CARRIES A COLOUR. A tint is a PROPORTION, applied by the consumer
51
+ * against a colour token that already exists — `color-mix(in srgb,
52
+ * var(--ig-edge-blocked-by) var(--ig-tint-fill), transparent)` — so the
53
+ * palette stays fixed and a host retheming a relationship retints it too. The
54
+ * two ELEVATIONS are the exception and the only values here that name a
55
+ * colour; `theme.test.ts` pins that split rather than checking the tints
56
+ * alone, so a colour cannot arrive in this group unannounced.
57
+ */
58
+ export declare const EFFECT_TOKENS: readonly ["--ig-tint-fill", "--ig-tint-border", "--ig-tint-wash", "--ig-tint-unit", "--ig-elevation-raised", "--ig-elevation-overlay"];
59
+ export type EffectToken = (typeof EFFECT_TOKENS)[number];
31
60
  /** Every custom property the stylesheet may reference. */
32
61
  export declare const THEME_TOKENS: readonly string[];
33
62
  export interface Theme {
@@ -35,6 +64,8 @@ export interface Theme {
35
64
  readonly type: Readonly<Record<TypeToken, string>>;
36
65
  /** Numbers, in CSS pixels. Layout reads these; `themeCss` renders them. */
37
66
  readonly metrics: Readonly<Record<MetricToken, number>>;
67
+ /** Strings, emitted verbatim — proportions and whole shadow values. */
68
+ readonly effects: Readonly<Record<EffectToken, string>>;
38
69
  }
39
70
  /**
40
71
  * The default theme.
@@ -51,6 +82,7 @@ export interface ThemeOverride {
51
82
  readonly colors?: Partial<Record<ColorToken, string>> | undefined;
52
83
  readonly type?: Partial<Record<TypeToken, string>> | undefined;
53
84
  readonly metrics?: Partial<Record<MetricToken, number>> | undefined;
85
+ readonly effects?: Partial<Record<EffectToken, string>> | undefined;
54
86
  }
55
87
  /**
56
88
  * Merge an override onto a base theme, per token.
@@ -68,10 +100,9 @@ export declare function extendTheme(base: Theme, override: ThemeOverride): Theme
68
100
  * package and stored. Adding a token then puts a hole in it, and the hole does
69
101
  * not fail loudly: a missing metric reads `undefined`, arithmetic on it yields
70
102
  * `NaN`, and every comparison against `NaN` is false. Measured when
71
- * `--ig-label-char-width` was added — a 0.1.0 theme made `fitLabel` return a
72
- * 60-character title with an ellipsis APPENDED, which is worse overflow than
73
- * the defect that token was added to fix, and `themeCss` emitted
74
- * `undefinedpx`.
103
+ * `--ig-label-char-width` was added — a 0.1.0 theme made every measured width
104
+ * `NaN`, so a card's height came out `NaN` and every station stacked at the
105
+ * same y, and `themeCss` emitted `undefinedpx`.
75
106
  *
76
107
  * A TypeScript caller is told about a new token by the compiler; a JavaScript
77
108
  * one is not, and neither is a theme deserialized from storage. This is the
@@ -84,9 +115,9 @@ export declare function resolveTheme(theme?: Theme | undefined): Theme;
84
115
  /**
85
116
  * Render a theme as one CSS rule of custom properties.
86
117
  *
87
- * Values are emitted verbatim for colours and type — a theme's author owns
88
- * their spelling — and metrics gain a `px` unit here, which is the single place
89
- * the numbers become CSS.
118
+ * Values are emitted verbatim for colours, type and effects — a theme's author
119
+ * owns their spelling — and metrics gain a `px` unit here, which is the single
120
+ * place the numbers become CSS.
90
121
  */
91
122
  export declare function themeCss(theme: Theme, selector?: string): string;
92
123
  //# sourceMappingURL=theme.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"theme.d.ts","sourceRoot":"","sources":["../src/theme.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH;;;;GAIG;AACH,eAAO,MAAM,YAAY,+ZAgCd,CAAC;AAEZ,MAAM,MAAM,UAAU,GAAG,CAAC,OAAO,YAAY,CAAC,CAAC,MAAM,CAAC,CAAC;AAEvD,6EAA6E;AAC7E,eAAO,MAAM,WAAW,2GAMb,CAAC;AAEZ,MAAM,MAAM,SAAS,GAAG,CAAC,OAAO,WAAW,CAAC,CAAC,MAAM,CAAC,CAAC;AAErD,8DAA8D;AAC9D,eAAO,MAAM,aAAa,wTAgBf,CAAC;AAEZ,MAAM,MAAM,WAAW,GAAG,CAAC,OAAO,aAAa,CAAC,CAAC,MAAM,CAAC,CAAC;AAEzD,0DAA0D;AAC1D,eAAO,MAAM,YAAY,EAAE,SAAS,MAAM,EAIxC,CAAC;AAEH,MAAM,WAAW,KAAK;IACpB,QAAQ,CAAC,MAAM,EAAE,QAAQ,CAAC,MAAM,CAAC,UAAU,EAAE,MAAM,CAAC,CAAC,CAAC;IACtD,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAC,MAAM,CAAC,SAAS,EAAE,MAAM,CAAC,CAAC,CAAC;IACnD,2EAA2E;IAC3E,QAAQ,CAAC,OAAO,EAAE,QAAQ,CAAC,MAAM,CAAC,WAAW,EAAE,MAAM,CAAC,CAAC,CAAC;CACzD;AAED;;;;;;;;GAQG;AACH,eAAO,MAAM,YAAY,EAAE,KAqFzB,CAAC;AAEH,mEAAmE;AACnE,MAAM,WAAW,aAAa;IAC5B,QAAQ,CAAC,MAAM,CAAC,EAAE,OAAO,CAAC,MAAM,CAAC,UAAU,EAAE,MAAM,CAAC,CAAC,GAAG,SAAS,CAAC;IAClE,QAAQ,CAAC,IAAI,CAAC,EAAE,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,QAAQ,CAAC,KAAK,EAAE,KAAK,EAAE,QAAQ,SAAU,GAAG,MAAM,CAWjE"}
package/dist/theme.js CHANGED
@@ -53,13 +53,63 @@ export const COLOR_TOKENS = Object.freeze([
53
53
  '--ig-state-failed',
54
54
  '--ig-state-conflict',
55
55
  ]);
56
- /** Type tokens. `lineHeight` is unitless; the rest carry their own units. */
56
+ /**
57
+ * Type tokens. `lineHeight` is unitless; the rest carry their own units.
58
+ *
59
+ * WEIGHT AND TRACKING ARE TYPE, NOT GEOMETRY, even though a reader might file
60
+ * them under either. They are emitted VERBATIM, which is the property that
61
+ * settles it: a weight is a unitless number and a tracking value is an `em`,
62
+ * and {@link METRIC_TOKENS} would give both a `px` unit and silently void the
63
+ * declaration.
64
+ */
57
65
  export const TYPE_TOKENS = Object.freeze([
58
66
  '--ig-font-ui',
59
67
  '--ig-font-mono',
60
68
  '--ig-font-size',
61
69
  '--ig-font-size-small',
62
70
  '--ig-line-height',
71
+ // ADDED IN SOURCE ORDER, AFTER THE ONES THAT SHIPPED, in this group and in
72
+ // {@link METRIC_TOKENS} both. `themeCss` emits in list order, so appending
73
+ // rather than interleaving keeps every declaration a host already had in the
74
+ // position it already had — the emitted rule stays a strict superset instead
75
+ // of a reshuffle a snapshotting consumer has to re-approve. Reading order
76
+ // loses a little; the diff a host sees loses nothing.
77
+ //
78
+ // TWO SIZE STEPS BELOW `--ig-font-size-small`, because the design draws two
79
+ // and this file named neither. A relationship badge is 10px and an uppercase
80
+ // status pill is 9.5px (§16a); with 11px as the smallest token, both had to
81
+ // be drawn a size too large, which is why the badge row reads as body copy.
82
+ '--ig-font-size-micro',
83
+ '--ig-font-size-pill',
84
+ // THE FOUR WEIGHTS THE DESIGN USES, and the reason a rail row read as one
85
+ // undifferentiated object: with no weight token every string rendered at
86
+ // 400, so a row's title and its metadata carried the same emphasis.
87
+ '--ig-weight-regular',
88
+ '--ig-weight-medium',
89
+ '--ig-weight-strong',
90
+ '--ig-weight-heavy',
91
+ // Uppercase labels are TRACKED in this design, and tracking is NOT derivable
92
+ // from the size — §16a sets `.06em` and `.08em` on two pills of the same
93
+ // 9.5px sitting in the same list. One token reused for all of them is the
94
+ // approximation that makes uppercase type look mechanically stretched, so
95
+ // there is one per value the frames draw.
96
+ '--ig-tracking-label',
97
+ '--ig-tracking-group',
98
+ '--ig-tracking-pill',
99
+ '--ig-tracking-badge',
100
+ // THE FOUR STEPS BETWEEN `--ig-font-size-micro` AND `--ig-font-size`, for the
101
+ // same reason the two below `small` were added: the frames draw them and this
102
+ // file named none of them, so every one had to be approximated by 11px or
103
+ // 13px. §16a alone spends 10.5 (a footer row's id), 12.5 (a footer row's
104
+ // title and §16b's node title), 13.5 (a rank row's title) and 14 (the rank
105
+ // number itself) — four values in one frame, none of them derivable from the
106
+ // two that shipped. Approximating them is what made a rank row read as one
107
+ // undifferentiated block of body copy: with title, id and provenance all at
108
+ // 11-13px, the row had no type hierarchy to see.
109
+ '--ig-font-size-meta',
110
+ '--ig-font-size-compact',
111
+ '--ig-font-size-row',
112
+ '--ig-font-size-rank',
63
113
  ]);
64
114
  /** Geometry tokens. Every value is a number of CSS pixels. */
65
115
  export const METRIC_TOKENS = Object.freeze([
@@ -71,6 +121,7 @@ export const METRIC_TOKENS = Object.freeze([
71
121
  '--ig-station-halo',
72
122
  '--ig-stroke',
73
123
  '--ig-stroke-connector',
124
+ '--ig-stroke-audit',
74
125
  '--ig-terminal-length',
75
126
  '--ig-terminal-width',
76
127
  '--ig-gutter-width',
@@ -78,12 +129,95 @@ export const METRIC_TOKENS = Object.freeze([
78
129
  '--ig-char-width',
79
130
  '--ig-label-char-width',
80
131
  '--ig-focus-ring',
132
+ // Appended, for the reason {@link TYPE_TOKENS} gives.
133
+ //
134
+ // SIX SPACING STEPS, WHICH IS A CHOICE AND SAYS SO. §16a and §16b do not run
135
+ // a scale — they spend a near-continuum from 2px to 20px, with 7px and 9px
136
+ // as common as any tokenised step — so a token set has to pick, and the
137
+ // honest statement is which values it rounds. These six span the range the
138
+ // frames spend and keep the two that shipped exactly where they were: a
139
+ // chip's `2px 7px` padding draws its inline half at `--ig-space-tight`, and
140
+ // a 9px or 10px gap at `--ig-space-snug` or `--ig-space`. What two steps
141
+ // could not do is span it at all — a 2px gap between a title and its
142
+ // metadata and a 20px panel inset both resolved to 6px or 12px, and the rail
143
+ // lost its grouping.
144
+ '--ig-space-micro',
145
+ '--ig-space-snug',
146
+ '--ig-space-loose',
147
+ '--ig-space-wide',
148
+ '--ig-radius-small',
149
+ '--ig-radius-large',
150
+ // A ROW WHOSE HEIGHT CAN FOLLOW ITS CONTENT. `--ig-row-height` stays what it
151
+ // has always been — the FIXED height of a rail row — because a host has that
152
+ // number and its meaning must not move under them. These two are the
153
+ // vocabulary a content-sized row needs instead: a floor, and the padding its
154
+ // content grows against.
155
+ '--ig-row-min-height',
156
+ '--ig-row-padding-block',
157
+ // The accent rail a banded row carries down its leading edge (§16a's
158
+ // WORKING NOW band, `inset 3px 0 0`). It pairs with `--ig-tint-wash`: the
159
+ // wash is the band's fill and this is its edge.
160
+ '--ig-band-rail',
161
+ // §16a's rank TRACK, `grid-template-columns: 34px 1fr`. It is a column width
162
+ // rather than a derived one because the frame fixes it: the rank figure and
163
+ // the readiness dot stack inside it and the title column starts at the same
164
+ // x on every row, held or not. Deriving it from the station size and a gap
165
+ // would make the alignment grid move whenever either did, which is the one
166
+ // thing this column exists to prevent.
167
+ '--ig-rank-column',
168
+ // §16b's spine furniture: the station disc that sits ON the spine line, and
169
+ // the line height a card's own height is counted in.
170
+ '--ig-station-box',
171
+ '--ig-card-line',
172
+ ]);
173
+ /**
174
+ * Surface-treatment tokens: values that are none of a colour, a type value or
175
+ * a pixel length, and so belong to none of the three groups above.
176
+ *
177
+ * A FOURTH GROUP RATHER THAN A HOME OF CONVENIENCE IN AN EXISTING ONE. A tint
178
+ * strength is a proportion and an elevation is a whole `box-shadow`; put
179
+ * either in {@link METRIC_TOKENS} and `themeCss` appends `px` to it, which is
180
+ * not a value any browser reads. Put them in {@link TYPE_TOKENS} and the group
181
+ * that documents itself as "type" starts carrying shadows — the same
182
+ * one-token-two-meanings problem the edit-state hues are kept apart from.
183
+ *
184
+ * NO TINT CARRIES A COLOUR. A tint is a PROPORTION, applied by the consumer
185
+ * against a colour token that already exists — `color-mix(in srgb,
186
+ * var(--ig-edge-blocked-by) var(--ig-tint-fill), transparent)` — so the
187
+ * palette stays fixed and a host retheming a relationship retints it too. The
188
+ * two ELEVATIONS are the exception and the only values here that name a
189
+ * colour; `theme.test.ts` pins that split rather than checking the tints
190
+ * alone, so a colour cannot arrive in this group unannounced.
191
+ */
192
+ export const EFFECT_TOKENS = Object.freeze([
193
+ // Read from §16a's badge row, where a relationship chip is a fill of its own
194
+ // hue inside a heavier border of the same hue. That is what "badges with
195
+ // tinted fills rather than bare borders" costs in tokens, and with no way to
196
+ // express it every badge shipped as a bare outline.
197
+ '--ig-tint-fill',
198
+ '--ig-tint-border',
199
+ // Two washes, and they are not interchangeable: the band marking the row
200
+ // being worked NOW sits at 5% of the accent, and the together-unit row at
201
+ // 3%. Collapsing them to one value either loses the band or draws every
202
+ // compound station as loud as the one in flight.
203
+ '--ig-tint-wash',
204
+ '--ig-tint-unit',
205
+ // Elevation, and it is the one pair here NOT read from a §16 frame — §16
206
+ // draws no drop shadow at all, separating its panels with `1px solid
207
+ // var(--ig-line)`. The values are the kit's own two, from the surfaces that
208
+ // do float: the device frame the comps sit in, and a floating toast. They
209
+ // are here because the token set is the whole visual vocabulary and an
210
+ // overlay has nowhere else to come from; a §16 panel keeps its border, and
211
+ // reaching for one of these to lift a panel is a decision, not a default.
212
+ '--ig-elevation-raised',
213
+ '--ig-elevation-overlay',
81
214
  ]);
82
215
  /** Every custom property the stylesheet may reference. */
83
216
  export const THEME_TOKENS = Object.freeze([
84
217
  ...COLOR_TOKENS,
85
218
  ...TYPE_TOKENS,
86
219
  ...METRIC_TOKENS,
220
+ ...EFFECT_TOKENS,
87
221
  ]);
88
222
  /**
89
223
  * The default theme.
@@ -139,6 +273,42 @@ export const defaultTheme = Object.freeze({
139
273
  '--ig-font-size': '13px',
140
274
  '--ig-font-size-small': '11px',
141
275
  '--ig-line-height': '1.45',
276
+ // §16a draws a relationship badge at 10px and an uppercase status pill
277
+ // ("now", "⧉ one unit · 2 issues") at 9.5px. Both are read values, not a
278
+ // ratio continued downward — the design does not run a scale here.
279
+ '--ig-font-size-micro': '10px',
280
+ '--ig-font-size-pill': '9.5px',
281
+ // Regular is the ground the file already rendered everything at; medium is
282
+ // §16's emphasis weight; strong is §16a's list rank number, its active
283
+ // toggle and its pills, and is the most-used weight in the frames. Heavy
284
+ // is §16b's STATION rank numbers, which are 700 where §16a's list numbers
285
+ // are 600 — the same figure at two weights in two projections, so three
286
+ // weights could not draw both.
287
+ '--ig-weight-regular': '400',
288
+ '--ig-weight-medium': '500',
289
+ '--ig-weight-strong': '600',
290
+ '--ig-weight-heavy': '700',
291
+ // "Order preview", the panel's own label, at 11px uppercase.
292
+ '--ig-tracking-label': '0.14em',
293
+ // §16b's column headers — "The work order ↓", "Explains the order", "Not
294
+ // worked" — which name a group WITHIN a frame rather than the frame.
295
+ '--ig-tracking-group': '0.1em',
296
+ // §16a's status pill ("now") and its unit badge ("⧉ one unit · 2 issues"),
297
+ // both 9.5px uppercase and sitting in the same list at DIFFERENT tracking.
298
+ // That pair is the reason tracking is its own axis here: it cannot be
299
+ // derived from the size, because these two share one.
300
+ '--ig-tracking-pill': '0.08em',
301
+ '--ig-tracking-badge': '0.06em',
302
+ // Read values, in the same sense as `micro` and `pill`: §16a's footer row
303
+ // prints its id at 10.5 and its title at 12.5, its rank rows print titles
304
+ // at 13.5, and the rank figure itself is 14. §16b reuses `compact` for a
305
+ // node title and `meta` for a node id, which is why they are named for
306
+ // their ROLE rather than for a position in a scale — there is no scale
307
+ // here to be a position in.
308
+ '--ig-font-size-meta': '10.5px',
309
+ '--ig-font-size-compact': '12.5px',
310
+ '--ig-font-size-row': '13.5px',
311
+ '--ig-font-size-rank': '14px',
142
312
  }),
143
313
  metrics: Object.freeze({
144
314
  '--ig-space': 12,
@@ -153,13 +323,32 @@ export const defaultTheme = Object.freeze({
153
323
  // The `together-with` hairline connector, which is deliberately finer than
154
324
  // an ordinary edge so the enclosure stays the primary read.
155
325
  '--ig-stroke-connector': 1.6,
326
+ // §17d's ambient audit bar, which the design fixes at 2px in those words —
327
+ // heavier than an edge stroke because it has to be findable while the
328
+ // reader is scrolling past it doing something else, and no heavier because
329
+ // §17d's whole argument is attention without nagging.
330
+ //
331
+ // IT LIVES IN THIS THEME, NOT THE AUDIT'S. `editor/src/audit/styles.ts`
332
+ // records shipping an `--ig-audit-bar` of its own behind a second theme
333
+ // function and reversing it: a host that installed the viewer's theme and
334
+ // forgot the second got a `var()` resolving to nothing, and the bar
335
+ // silently stopped drawing. A token here has no such state — every host
336
+ // installs this theme — so the value stays retunable without the failure
337
+ // that reversal was paid for.
338
+ '--ig-stroke-audit': 2,
156
339
  // The terminal marker's own box. It is theme data rather than a constant
157
340
  // in the drawing code because it is a SIZE, and R5 admits no exceptions:
158
341
  // a host scaling the type up needs the arrowheads to follow.
159
342
  '--ig-terminal-length': 9,
160
343
  '--ig-terminal-width': 8,
161
- '--ig-gutter-width': 208,
162
- '--ig-spine-width': 360,
344
+ // §16b's own column widths: a 250px left gutter, a 330px spine card and a
345
+ // 270px right gutter, inside an 1180px panel. One gutter token serves both
346
+ // sides — the frame's 20px difference between them carries no stated
347
+ // meaning, and two tokens would ask a host to reproduce an asymmetry it
348
+ // cannot read a reason for. The sum lands the canvas at 1164, which is the
349
+ // frame's panel less its own border and scroll allowance.
350
+ '--ig-gutter-width': 260,
351
+ '--ig-spine-width': 330,
163
352
  // The advance width of one character at `--ig-font-size` in the mono face.
164
353
  // Layout measures text with it, so a host changing the type scale changes
165
354
  // this too and the boxes stay around their contents.
@@ -171,13 +360,76 @@ export const defaultTheme = Object.freeze({
171
360
  // title overflow its node: 24 all-capital characters "fitted" 187.2px of
172
361
  // room and drew about 240px, straight across the routing channel.
173
362
  //
174
- // AN AVERAGE, because `fitLabel` scales it per character class rather than
363
+ // AN AVERAGE, because `labelWidth` scales it per character class rather than
175
364
  // assuming every glyph is the same width — see `labelWidth` there. A flat
176
365
  // CEILING was tried and is wrong in the other direction: at the widest
177
366
  // glyph's advance, ordinary titles truncate at roughly half their length,
178
367
  // which this package's own fixtures caught immediately.
179
368
  '--ig-label-char-width': 6,
180
369
  '--ig-focus-ring': 2,
370
+ // Read off §16a: 2px between a row title and its metadata, 8px between the
371
+ // row's blocks, 16px and 20px for the panel's own inset
372
+ // (`padding: 16px 20px`). 6px and 12px are the two that already shipped
373
+ // and did not move.
374
+ '--ig-space-micro': 2,
375
+ '--ig-space-snug': 8,
376
+ '--ig-space-loose': 16,
377
+ '--ig-space-wide': 20,
378
+ // §16a's micro badge is 4px and its outer panel 14px. The existing 6px
379
+ // sits between them and is the chip's, so neither end could be drawn.
380
+ '--ig-radius-small': 4,
381
+ '--ig-radius-large': 14,
382
+ // The FLOOR, matching today's fixed height so a row that grows starts from
383
+ // exactly where a rail row sits now; the same number carries a different
384
+ // meaning, which is why it is a different token rather than a reuse.
385
+ '--ig-row-min-height': 44,
386
+ // §16a's rank row is `padding: 13px 20px`. The block half is what a
387
+ // content-sized row grows against; the inline half is `--ig-space-wide`.
388
+ '--ig-row-padding-block': 13,
389
+ // §16a's WORKING NOW band, `box-shadow: inset 3px 0 0 var(--cyan)`.
390
+ '--ig-band-rail': 3,
391
+ // §16a's rank track, read straight off `grid-template-columns: 34px 1fr`.
392
+ '--ig-rank-column': 34,
393
+ // §16b's station disc, 26px across on the spine.
394
+ '--ig-station-box': 26,
395
+ // One line of text inside a §16b node card, which is what lets the layout
396
+ // give a card a height WITHOUT measuring one. A card's contents are known
397
+ // — a title that may wrap, an identity, a badge row — so its height is a
398
+ // count of lines times this. Chosen as a CEILING on the compact size times
399
+ // the line height (12.5 x 1.45 = 18.1), for the reason `measureLabel` gives
400
+ // about its own metric: a card that reserves slightly too much leaves a
401
+ // gap, and one that reserves too little overlaps the row beneath it.
402
+ '--ig-card-line': 18,
403
+ }),
404
+ effects: Object.freeze({
405
+ // ONE PAIR FOR ALL FIVE RELATIONSHIP CHIPS, at the value §16a draws most
406
+ // often: the fills across its chips are `.08 .08 .08 .09 .09 .10` and the
407
+ // borders `.28 .28 .30 .30 .30 .30 .30 .35 .35 .35`, so the mode is 8% and
408
+ // 30%. Five hues at five alphas would be a palette rather than a
409
+ // treatment, and the chips that draw hotter are the ACCENT ones — a host
410
+ // wanting that emphasis raises the pair rather than being given it by
411
+ // default on a blocked-by.
412
+ '--ig-tint-fill': '8%',
413
+ '--ig-tint-border': '30%',
414
+ // §16a's WORKING NOW band, `background: rgba(23,188,238,.05)`.
415
+ '--ig-tint-wash': '5%',
416
+ // §16a's rank-2 row, `background: rgba(23,188,238,.03)` — the ONE row that
417
+ // carries a fill, and it carries it because it is the `together-with`
418
+ // compound station. The other four rank rows have no background: this is
419
+ // not a zebra stripe and drawing it as one would invent a treatment §16
420
+ // does not have.
421
+ '--ig-tint-unit': '3%',
422
+ // The kit's own two drop shadows, verbatim: the floating toast, and the
423
+ // device frame the comps are mounted in. See EFFECT_TOKENS on why they are
424
+ // here rather than read from a §16 frame.
425
+ //
426
+ // DELIBERATELY LITERAL rather than mixed against `--ig-bg`. A shadow is
427
+ // dark on a light ground as well as a dark one, so expressing it against
428
+ // the background would turn it white on the documented paper theme and
429
+ // delete it. These two are the only values in this group that carry a
430
+ // colour, and a host retheming to a light palette owns them.
431
+ '--ig-elevation-raised': '0 16px 40px -16px rgba(0, 0, 0, 0.9)',
432
+ '--ig-elevation-overlay': '0 30px 80px -40px rgba(0, 0, 0, 0.8)',
181
433
  }),
182
434
  });
183
435
  /**
@@ -192,6 +444,7 @@ export function extendTheme(base, override) {
192
444
  colors: Object.freeze({ ...base.colors, ...override.colors }),
193
445
  type: Object.freeze({ ...base.type, ...override.type }),
194
446
  metrics: Object.freeze({ ...base.metrics, ...override.metrics }),
447
+ effects: Object.freeze({ ...base.effects, ...override.effects }),
195
448
  });
196
449
  }
197
450
  /**
@@ -202,10 +455,9 @@ export function extendTheme(base, override) {
202
455
  * package and stored. Adding a token then puts a hole in it, and the hole does
203
456
  * not fail loudly: a missing metric reads `undefined`, arithmetic on it yields
204
457
  * `NaN`, and every comparison against `NaN` is false. Measured when
205
- * `--ig-label-char-width` was added — a 0.1.0 theme made `fitLabel` return a
206
- * 60-character title with an ellipsis APPENDED, which is worse overflow than
207
- * the defect that token was added to fix, and `themeCss` emitted
208
- * `undefinedpx`.
458
+ * `--ig-label-char-width` was added — a 0.1.0 theme made every measured width
459
+ * `NaN`, so a card's height came out `NaN` and every station stacked at the
460
+ * same y, and `themeCss` emitted `undefinedpx`.
209
461
  *
210
462
  * A TypeScript caller is told about a new token by the compiler; a JavaScript
211
463
  * one is not, and neither is a theme deserialized from storage. This is the
@@ -220,9 +472,9 @@ export function resolveTheme(theme) {
220
472
  /**
221
473
  * Render a theme as one CSS rule of custom properties.
222
474
  *
223
- * Values are emitted verbatim for colours and type — a theme's author owns
224
- * their spelling — and metrics gain a `px` unit here, which is the single place
225
- * the numbers become CSS.
475
+ * Values are emitted verbatim for colours, type and effects — a theme's author
476
+ * owns their spelling — and metrics gain a `px` unit here, which is the single
477
+ * place the numbers become CSS.
226
478
  */
227
479
  export function themeCss(theme, selector = ':root') {
228
480
  // RESOLVED HERE TOO: this is an exported entry point taking a caller's theme
@@ -236,6 +488,8 @@ export function themeCss(theme, selector = ':root') {
236
488
  lines.push(` ${token}: ${filled.type[token]};`);
237
489
  for (const token of METRIC_TOKENS)
238
490
  lines.push(` ${token}: ${String(filled.metrics[token])}px;`);
491
+ for (const token of EFFECT_TOKENS)
492
+ lines.push(` ${token}: ${filled.effects[token]};`);
239
493
  return `${selector} {\n${lines.join('\n')}\n}\n`;
240
494
  }
241
495
  //# sourceMappingURL=theme.js.map
package/dist/theme.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"theme.js","sourceRoot":"","sources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AG,OAAO;IACvD,6EAA6E;IAC7E,4EAA4E;IAC5E,yDAAyD;IACzD,MAAM,MAAM,GAAG,YAAY,CAAC,KAAK,CAAC,CAAC;IACnC,MAAM,KAAK,GAAa,EAAE,CAAC;IAC3B,KAAK,MAAM,KAAK,IAAI,YAAY;QAAE,KAAK,CAAC,IAAI,CAAC,KAAK,KAAK,KAAK,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IACrF,KAAK,MAAM,KAAK,IAAI,WAAW;QAAE,KAAK,CAAC,IAAI,CAAC,KAAK,KAAK,KAAK,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IAClF,KAAK,MAAM,KAAK,IAAI,aAAa;QAAE,KAAK,CAAC,IAAI,CAAC,KAAK,KAAK,KAAK,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,KAAK,CAAC,CAAC;IACjG,KAAK,MAAM,KAAK,IAAI,aAAa;QAAE,KAAK,CAAC,IAAI,CAAC,KAAK,KAAK,KAAK,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IACvF,OAAO,GAAG,QAAQ,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC;AACnD,CAAC"}
@@ -27,6 +27,20 @@ export interface EdgeTreatment {
27
27
  readonly hueToken: string;
28
28
  /** Announced to a screen reader, and used as the badge's accessible name. */
29
29
  readonly label: string;
30
+ /**
31
+ * The same relationship read from the OTHER end.
32
+ *
33
+ * A directed edge states one fact, and which end you stand at decides the
34
+ * verb: #488 is what #512 is blocked by, and #512 is what #488 BLOCKS. The
35
+ * badge that shipped said "blocked by #512 (incoming)" on #488's row —
36
+ * technically true, and it asks a reader to invert a sentence in their head
37
+ * on the row where the plain reading was available. §16a draws the plain
38
+ * reading, so the vocabulary carries it.
39
+ *
40
+ * A symmetric edge reads the same both ways and carries none: `undefined`
41
+ * here is what says so, rather than a duplicate of {@link label}.
42
+ */
43
+ readonly reverseLabel?: string;
30
44
  readonly ordering: OrderingEffect;
31
45
  /**
32
46
  * Whether the edge reads the same both ways. A symmetric edge is drawn once
@@ -47,6 +61,7 @@ export declare const EDGE_TREATMENTS: Readonly<{
47
61
  readonly glyph: "⊘";
48
62
  readonly hueToken: "--ig-edge-blocked-by";
49
63
  readonly label: "blocked by";
64
+ readonly reverseLabel: "blocks";
50
65
  readonly ordering: "strict-directed";
51
66
  readonly symmetric: false;
52
67
  };
@@ -74,6 +89,7 @@ export declare const EDGE_TREATMENTS: Readonly<{
74
89
  readonly glyph: "≡";
75
90
  readonly hueToken: "--ig-edge-duplicate-of";
76
91
  readonly label: "duplicate of";
92
+ readonly reverseLabel: "duplicated by";
77
93
  readonly ordering: "never-worked";
78
94
  readonly symmetric: false;
79
95
  };
@@ -83,12 +99,35 @@ export declare const EDGE_TREATMENTS: Readonly<{
83
99
  readonly glyph: "⑃";
84
100
  readonly hueToken: "--ig-edge-decomposed-from";
85
101
  readonly label: "decomposed from";
102
+ readonly reverseLabel: "decomposed into";
86
103
  readonly ordering: "provenance-only";
87
104
  readonly symmetric: false;
88
105
  };
89
106
  }>;
90
107
  /** The treatment for a relationship. Total over the format's fields. */
91
108
  export declare function treatmentFor(field: EdgeField): EdgeTreatment;
109
+ /**
110
+ * A relationship's word, read from the end the reader is standing at.
111
+ *
112
+ * THE VERB CHANGES, NOT THE NOUN. Read from the far end an asymmetric edge has
113
+ * its own plain wording and the vocabulary carries it, so a surface never has
114
+ * to say "(incoming)" and leave the reader to invert a sentence in their head.
115
+ *
116
+ * IT IS A FUNCTION HERE RATHER THAN A TEST AT EACH CALL SITE, and that is the
117
+ * whole reason it exists: the badge row in `parts.ts` and §17a's inspector row
118
+ * in `@issuegraph/editor` draw the SAME edge one zone apart on one screen, and
119
+ * two copies of this expression would be free to disagree the moment either was
120
+ * edited. They were, briefly, and a comment at one of them claimed to be "layer
121
+ * 1's own expression" while being a second copy of it — which is the failure
122
+ * this package names everywhere else: not a wrong answer, a second answer.
123
+ *
124
+ * A symmetric kind takes {@link EdgeTreatment.label} at either end, because
125
+ * `serialize-with` and `together-with` state one fact whichever way round they
126
+ * are stored; `reverseLabel` is `undefined` on them for that reason rather than
127
+ * by omission. The `??` is not a second answer to that question — it is what
128
+ * the optional field's type requires, and it lands on the same string.
129
+ */
130
+ export declare function labelFrom(treatment: EdgeTreatment, outgoing: boolean): string;
92
131
  /**
93
132
  * The dash patterns, as SVG `stroke-dasharray` values keyed by dash name.
94
133
  *
@@ -1 +1 @@
1
- {"version":3,"file":"vocabulary.d.ts","sourceRoot":"","sources":["../src/vocabulary.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAe,KAAK,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAE/D,kFAAkF;AAClF,MAAM,MAAM,QAAQ,GAAG,OAAO,GAAG,QAAQ,GAAG,QAAQ,GAAG,QAAQ,GAAG,WAAW,CAAC;AAE9E,iFAAiF;AACjF,MAAM,MAAM,YAAY,GAAG,OAAO,GAAG,MAAM,GAAG,WAAW,GAAG,eAAe,GAAG,KAAK,CAAC;AAEpF,+CAA+C;AAC/C,MAAM,MAAM,cAAc,GACtB,iBAAiB,GACjB,qBAAqB,GACrB,aAAa,GACb,cAAc,GACd,iBAAiB,CAAC;AAEtB,MAAM,WAAW,aAAa;IAC5B,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAC;IACxB,QAAQ,CAAC,QAAQ,EAAE,YAAY,CAAC;IAChC,uEAAuE;IACvE,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,4EAA4E;IAC5E,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,6EAA6E;IAC7E,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,QAAQ,EAAE,cAAc,CAAC;IAClC;;;;OAIG;IACH,QAAQ,CAAC,SAAS,EAAE,OAAO,CAAC;CAC7B;AA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,EAAE,cAAc,CAAC;IAClC;;;;OAIG;IACH,QAAQ,CAAC,SAAS,EAAE,OAAO,CAAC;CAC7B;AAED;;;;GAIG;AACH,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAiD0B,CAAC;AAEvD,wEAAwE;AACxE,wBAAgB,YAAY,CAAC,KAAK,EAAE,SAAS,GAAG,aAAa,CAE5D;AAED;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,SAAS,CAAC,SAAS,EAAE,aAAa,EAAE,QAAQ,EAAE,OAAO,GAAG,MAAM,CAE7E;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,YAAY,CAAC,IAAI,EAAE,QAAQ,GAAG,MAAM,GAAG,IAAI,CAY1D;AAED,0FAA0F;AAC1F,eAAO,MAAM,UAAU,EAAE,SAAS,SAAS,EAAgB,CAAC"}
@@ -24,6 +24,7 @@ export const EDGE_TREATMENTS = Object.freeze({
24
24
  glyph: '⊘',
25
25
  hueToken: '--ig-edge-blocked-by',
26
26
  label: 'blocked by',
27
+ reverseLabel: 'blocks',
27
28
  ordering: 'strict-directed',
28
29
  symmetric: false,
29
30
  },
@@ -51,6 +52,7 @@ export const EDGE_TREATMENTS = Object.freeze({
51
52
  glyph: '≡',
52
53
  hueToken: '--ig-edge-duplicate-of',
53
54
  label: 'duplicate of',
55
+ reverseLabel: 'duplicated by',
54
56
  ordering: 'never-worked',
55
57
  symmetric: false,
56
58
  },
@@ -60,6 +62,7 @@ export const EDGE_TREATMENTS = Object.freeze({
60
62
  glyph: '⑃',
61
63
  hueToken: '--ig-edge-decomposed-from',
62
64
  label: 'decomposed from',
65
+ reverseLabel: 'decomposed into',
63
66
  ordering: 'provenance-only',
64
67
  symmetric: false,
65
68
  },
@@ -68,6 +71,30 @@ export const EDGE_TREATMENTS = Object.freeze({
68
71
  export function treatmentFor(field) {
69
72
  return EDGE_TREATMENTS[field];
70
73
  }
74
+ /**
75
+ * A relationship's word, read from the end the reader is standing at.
76
+ *
77
+ * THE VERB CHANGES, NOT THE NOUN. Read from the far end an asymmetric edge has
78
+ * its own plain wording and the vocabulary carries it, so a surface never has
79
+ * to say "(incoming)" and leave the reader to invert a sentence in their head.
80
+ *
81
+ * IT IS A FUNCTION HERE RATHER THAN A TEST AT EACH CALL SITE, and that is the
82
+ * whole reason it exists: the badge row in `parts.ts` and §17a's inspector row
83
+ * in `@issuegraph/editor` draw the SAME edge one zone apart on one screen, and
84
+ * two copies of this expression would be free to disagree the moment either was
85
+ * edited. They were, briefly, and a comment at one of them claimed to be "layer
86
+ * 1's own expression" while being a second copy of it — which is the failure
87
+ * this package names everywhere else: not a wrong answer, a second answer.
88
+ *
89
+ * A symmetric kind takes {@link EdgeTreatment.label} at either end, because
90
+ * `serialize-with` and `together-with` state one fact whichever way round they
91
+ * are stored; `reverseLabel` is `undefined` on them for that reason rather than
92
+ * by omission. The `??` is not a second answer to that question — it is what
93
+ * the optional field's type requires, and it lands on the same string.
94
+ */
95
+ export function labelFrom(treatment, outgoing) {
96
+ return outgoing || treatment.symmetric ? treatment.label : (treatment.reverseLabel ?? treatment.label);
97
+ }
71
98
  /**
72
99
  * The dash patterns, as SVG `stroke-dasharray` values keyed by dash name.
73
100
  *