gp-dimm-city 1.1.2 → 1.1.4
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/CHANGELOG.md +33 -0
- package/components.yaml +7 -15
- package/package.json +1 -1
- package/plugin.js +2 -31
- package/styles/components/callouts.css +1 -1
- package/styles/components/chrome.css +0 -15
- package/styles/components/data.css +1 -47
- package/styles/components/section.css +3 -13
- package/styles/dc-component-defaults.css +0 -6
- package/styles/page-templates.css +7 -11
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,39 @@ cut a version that has no `## [X.Y.Z]` heading below.
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [1.1.4] - 2026-10-09
|
|
11
|
+
|
|
12
|
+
### Changed
|
|
13
|
+
|
|
14
|
+
- **The columns contract is refined.** Page and section column layouts
|
|
15
|
+
stay in `page-templates.css`. A component may lay out its own insides in
|
|
16
|
+
columns in its own sheet, on a selector rooted in its `.dc-*` class (the
|
|
17
|
+
two-column skill cards, the card grid). The integrity test enforces that
|
|
18
|
+
rule in place of an exception list. No CSS moved.
|
|
19
|
+
- The integrity test's remaining exceptions are genuine hooks: the outcome
|
|
20
|
+
tiers, the chapter classes gutterpress adds itself, and the design
|
|
21
|
+
guide's page labels.
|
|
22
|
+
- `docs/css-roadmap.md` records what the CSS review left to do, and in
|
|
23
|
+
which order.
|
|
24
|
+
|
|
25
|
+
### Removed
|
|
26
|
+
|
|
27
|
+
- Two unused design-guide classes: `dg-face-sample` and the
|
|
28
|
+
`dc-banner-demo` section class.
|
|
29
|
+
|
|
30
|
+
## [1.1.3] - 2026-10-09
|
|
31
|
+
|
|
32
|
+
### Removed
|
|
33
|
+
|
|
34
|
+
- Distance tags: the plugin no longer turns a `Distance` table inside a skill
|
|
35
|
+
into pills (`buildDistanceTags`); it now renders as a plain table. Also
|
|
36
|
+
removed `.dc-distance-tags`, `.dc-dist-tag`, `.dc-dist-ap`, `.dc-dist-name`
|
|
37
|
+
and the `--dc-dist-*` tokens. No book had such a table.
|
|
38
|
+
- Unused combinations: `.dc-flush` on `.dc-intro`, `.dc-sub-header` and
|
|
39
|
+
`.dc-steps`; `.dc-intro + .dc-alert`; `.dc-card-grid > h1/h2/.dc-intro`
|
|
40
|
+
(put headings and ledes outside the grid); `.section > h2.dc-h3:not(:first-child)`;
|
|
41
|
+
`.dc-toc ol > li > strong`.
|
|
42
|
+
|
|
10
43
|
## [1.1.2] - 2026-10-08
|
|
11
44
|
|
|
12
45
|
**Notes for books upgrading from 1.1.1:**
|
package/components.yaml
CHANGED
|
@@ -397,21 +397,6 @@ components:
|
|
|
397
397
|
breaks: none
|
|
398
398
|
notes: "The plugin emits `variable`; the CSS styles both `.variable` and the raw spelling `.var`. `.standard/.reduced/.increased/.special` (specialty-identity.css) are never emitted, only authored raw — shown in the design guide's Variant Gallery."
|
|
399
399
|
|
|
400
|
-
- name: distance-tags
|
|
401
|
-
status: unused
|
|
402
|
-
origin: plugin
|
|
403
|
-
recipe: "| Distance | AP | table inside a skill card"
|
|
404
|
-
emits: div.dc-sub-header + div.dc-distance-tags > span.dc-dist-tag > span.dc-dist-ap + span.dc-dist-name
|
|
405
|
-
css: styles/components/data.css
|
|
406
|
-
tokens: [--dc-dist-tag-surface, --dc-dist-tag-border, --dc-dist-ap-color, --dc-dist-name-color]
|
|
407
|
-
usage: ["| Distance | AP |"]
|
|
408
|
-
breaks: none
|
|
409
|
-
notes: "Emission path exists and is styled; no skill in either book writes a
|
|
410
|
-
Distance/AP table. The usage literal carries the AP column deliberately: the
|
|
411
|
-
plugin only transforms a Distance table that sits inside a skill card, and
|
|
412
|
-
field-guide chapter-05's Schraphose damage table is a four-column Distance
|
|
413
|
-
table in body prose. A bare '| Distance |' literal counted that as a use."
|
|
414
|
-
|
|
415
400
|
- name: roll-the-die
|
|
416
401
|
status: live
|
|
417
402
|
origin: plugin
|
|
@@ -683,6 +668,13 @@ components:
|
|
|
683
668
|
notes: "There is no @chapter-opener macro."
|
|
684
669
|
|
|
685
670
|
# ── Retired: no CSS, no emission, no use (tombstone comments only) ─────
|
|
671
|
+
- name: distance-tags
|
|
672
|
+
status: retired
|
|
673
|
+
origin: plugin
|
|
674
|
+
recipe: "| Distance | AP | table inside a skill card"
|
|
675
|
+
emits: div.dc-sub-header + div.dc-distance-tags > span.dc-dist-tag > span.dc-dist-ap + span.dc-dist-name
|
|
676
|
+
notes: "Removed 2026-10-09 (plugin.js buildDistanceTags, data.css, --dc-dist-* tokens): no book had an AP-by-distance table. A Distance table inside a skill now renders as a plain table."
|
|
677
|
+
|
|
686
678
|
- name: printer-page
|
|
687
679
|
status: retired
|
|
688
680
|
origin: author
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "gp-dimm-city",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.4",
|
|
4
4
|
"description": "Dimm City design system for Gutterpress: the markdown-it macros (@skill, @specialty, @learning-path, @callout, …), print stylesheets, design tokens, fonts and page templates the Dimm City TTRPG books are set in.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "plugin.js",
|
package/plugin.js
CHANGED
|
@@ -363,9 +363,6 @@ function classifyTable(headers) {
|
|
|
363
363
|
if (headers.includes('roll') && headers.includes('outcome')) {
|
|
364
364
|
return 'outcomes';
|
|
365
365
|
}
|
|
366
|
-
if (headers.includes('distance')) {
|
|
367
|
-
return 'distance';
|
|
368
|
-
}
|
|
369
366
|
return '';
|
|
370
367
|
}
|
|
371
368
|
|
|
@@ -423,29 +420,6 @@ function buildOutcomesBlock(rows, md, needsAvoid = true) {
|
|
|
423
420
|
return html;
|
|
424
421
|
}
|
|
425
422
|
|
|
426
|
-
function buildDistanceTags(rows, md) {
|
|
427
|
-
let html = '<div class="dc-sub-header">AP Cost × Distance</div>\n';
|
|
428
|
-
html += '<div class="dc-distance-tags">\n';
|
|
429
|
-
|
|
430
|
-
rows.forEach(row => {
|
|
431
|
-
if (row.length < 2) return;
|
|
432
|
-
const distance = row[0].trim();
|
|
433
|
-
const cost = row[1].trim();
|
|
434
|
-
|
|
435
|
-
// Render markdown inline content
|
|
436
|
-
const renderedDistance = md.renderInline(distance);
|
|
437
|
-
const renderedCost = md.renderInline(cost);
|
|
438
|
-
|
|
439
|
-
html += ' <span class="dc-dist-tag">\n';
|
|
440
|
-
html += ' <span class="dc-dist-ap">' + renderedCost + '</span>\n';
|
|
441
|
-
html += ' <span class="dc-dist-name">' + renderedDistance + '</span>\n';
|
|
442
|
-
html += ' </span>\n';
|
|
443
|
-
});
|
|
444
|
-
|
|
445
|
-
html += '</div>\n';
|
|
446
|
-
return html;
|
|
447
|
-
}
|
|
448
|
-
|
|
449
423
|
function buildTable(tableTokens, tableClass, md, needsAvoid = true) {
|
|
450
424
|
const rows = [];
|
|
451
425
|
let currentRow = [];
|
|
@@ -467,10 +441,7 @@ function buildTable(tableTokens, tableClass, md, needsAvoid = true) {
|
|
|
467
441
|
}
|
|
468
442
|
}
|
|
469
443
|
|
|
470
|
-
|
|
471
|
-
return buildOutcomesBlock(rows, md, needsAvoid);
|
|
472
|
-
}
|
|
473
|
-
return buildDistanceTags(rows, md);
|
|
444
|
+
return buildOutcomesBlock(rows, md, needsAvoid);
|
|
474
445
|
}
|
|
475
446
|
|
|
476
447
|
// Parse ability from list item - handles rendered HTML: "<strong>0 AP</strong> <em>Name:</em> Description"
|
|
@@ -2057,7 +2028,7 @@ export default function dimmCityPlugin(md, options = {}) {
|
|
|
2057
2028
|
continue;
|
|
2058
2029
|
}
|
|
2059
2030
|
|
|
2060
|
-
// Table = Outcomes
|
|
2031
|
+
// Table = Outcomes
|
|
2061
2032
|
if (tok.type === 'table_open' && inSkillCard) {
|
|
2062
2033
|
const tableTokens = collectTableTokens(tokens, i);
|
|
2063
2034
|
const headers = getTableHeaders(tableTokens);
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
- Component-scoped public custom properties (--dc-alert-bg, etc.)
|
|
19
19
|
|
|
20
20
|
MUST NOT CONTAIN:
|
|
21
|
-
- columns:N
|
|
21
|
+
- page/section columns:N layouts (→ page-templates.css)
|
|
22
22
|
- @page declarations or named-page assignments (→ page-rules.css)
|
|
23
23
|
- div.chapter scaffolding (→ the consuming book's own sheet)
|
|
24
24
|
- :root token definitions (→ dc-component-defaults.css)
|
|
@@ -62,14 +62,6 @@
|
|
|
62
62
|
cannot silently beat an `A + B` gap rule if there is no gap rule.
|
|
63
63
|
Iter-8 (2026-05-25). */
|
|
64
64
|
|
|
65
|
-
/* When a .dc-intro lede is followed by an alert/callout (the common
|
|
66
|
-
"lede + supporting note" pattern from How Abilities Work), tighten the
|
|
67
|
-
gap so they read as a connected pair. (@callout emits .dc-alert — the
|
|
68
|
-
former .dc-callout adjacency rule was dead and was removed 2026-06-21.) */
|
|
69
|
-
.dc-intro + .dc-alert {
|
|
70
|
-
margin-top: 6pt;
|
|
71
|
-
}
|
|
72
|
-
|
|
73
65
|
/* Adjacent callouts/alerts (e.g. Cybersuck followed by SysFAIL after
|
|
74
66
|
the Ego Points table) read as a CONNECTED PAIR rather than two
|
|
75
67
|
independent floating boxes. Per user feedback: "design elements just
|
|
@@ -445,17 +437,10 @@ hr {
|
|
|
445
437
|
|
|
446
438
|
/* ── Modifier variants — .dc-flush removes margin ─────────────────────────── */
|
|
447
439
|
.dc-stickers.dc-flush,
|
|
448
|
-
.dc-intro.dc-flush,
|
|
449
440
|
.dc-tape.dc-flush {
|
|
450
441
|
margin: 0;
|
|
451
442
|
}
|
|
452
443
|
|
|
453
|
-
.dc-sub-header.dc-flush {
|
|
454
|
-
margin: 0;
|
|
455
|
-
padding-top: 0;
|
|
456
|
-
border-top: 0;
|
|
457
|
-
}
|
|
458
|
-
|
|
459
444
|
.dc-spec-tweak.dc-no-top {
|
|
460
445
|
margin-top: 0;
|
|
461
446
|
}
|
|
@@ -151,7 +151,7 @@
|
|
|
151
151
|
padding-bottom: 6px;
|
|
152
152
|
}
|
|
153
153
|
|
|
154
|
-
/* ═══ OUTCOMES + STEPS
|
|
154
|
+
/* ═══ OUTCOMES + STEPS ═══ */
|
|
155
155
|
|
|
156
156
|
/* ── Procedure / numbered steps ───────────────────────────────────────── */
|
|
157
157
|
.dc-steps {
|
|
@@ -358,47 +358,6 @@
|
|
|
358
358
|
--row-color: var(--fungi-rot);
|
|
359
359
|
}
|
|
360
360
|
|
|
361
|
-
/* ── Distance tags (AP cost × distance block) ─────────────────────────── */
|
|
362
|
-
.dc-distance-tags {
|
|
363
|
-
display: flex;
|
|
364
|
-
flex-wrap: wrap;
|
|
365
|
-
gap: 6px;
|
|
366
|
-
margin: 10px 0;
|
|
367
|
-
}
|
|
368
|
-
|
|
369
|
-
/* Token contract for distance-tag pills:
|
|
370
|
-
--dc-dist-tag-surface → cell bg (default --paper-light)
|
|
371
|
-
--dc-dist-tag-border → cell border color (default --hud-blue-dim)
|
|
372
|
-
--dc-dist-ap-color → AP-cost number color (default --ink)
|
|
373
|
-
--dc-dist-name-color → distance-name caption color (default --hud-blue)
|
|
374
|
-
*/
|
|
375
|
-
.dc-dist-tag {
|
|
376
|
-
display: inline-flex;
|
|
377
|
-
flex-direction: column;
|
|
378
|
-
align-items: center;
|
|
379
|
-
background: var(--dc-dist-tag-surface);
|
|
380
|
-
border: 1px solid var(--dc-dist-tag-border);
|
|
381
|
-
padding: 6px 10px;
|
|
382
|
-
min-width: 52px;
|
|
383
|
-
}
|
|
384
|
-
|
|
385
|
-
.dc-dist-ap {
|
|
386
|
-
font-family: var(--font-display);
|
|
387
|
-
font-size: 14px;
|
|
388
|
-
font-weight: 700;
|
|
389
|
-
color: var(--dc-dist-ap-color);
|
|
390
|
-
line-height: 1;
|
|
391
|
-
}
|
|
392
|
-
|
|
393
|
-
.dc-dist-name {
|
|
394
|
-
font-family: var(--font-mono);
|
|
395
|
-
font-size: 8px;
|
|
396
|
-
letter-spacing: 0.12em;
|
|
397
|
-
text-transform: uppercase;
|
|
398
|
-
color: var(--dc-dist-name-color);
|
|
399
|
-
margin-top: 3px;
|
|
400
|
-
}
|
|
401
|
-
|
|
402
361
|
/* ───────── PULL-QUOTE ───────── */
|
|
403
362
|
.dc-pullquote {
|
|
404
363
|
background: var(--dc-pullquote-bg);
|
|
@@ -724,10 +683,6 @@
|
|
|
724
683
|
clip-path: polygon(0 0, 100% 0, 100% calc(100% - 4px), calc(100% - 6px) 100%, 0 100%);
|
|
725
684
|
}
|
|
726
685
|
|
|
727
|
-
.dc-toc ol>li>strong {
|
|
728
|
-
color: var(--hud-blue-dark);
|
|
729
|
-
}
|
|
730
|
-
|
|
731
686
|
.dc-toc ol>li>a {
|
|
732
687
|
font-size: 15pt;
|
|
733
688
|
font-weight: 700;
|
|
@@ -751,7 +706,6 @@
|
|
|
751
706
|
}
|
|
752
707
|
|
|
753
708
|
.dc-stat.dc-flush,
|
|
754
|
-
.dc-steps.dc-flush,
|
|
755
709
|
.dc-outcomes.dc-flush,
|
|
756
710
|
.dc-pullquote.dc-flush {
|
|
757
711
|
margin: 0;
|
|
@@ -335,8 +335,7 @@
|
|
|
335
335
|
(i.e. NOT the section's header bar) get a left-accent border matching the
|
|
336
336
|
section accent. This visually distinguishes subsection headings from the
|
|
337
337
|
section title bar. Universal across all chapters. */
|
|
338
|
-
.section > h3:where(:not(.dc-h4, .dc-h5, .dc-h6)):not(:first-child)
|
|
339
|
-
.section > h2.dc-h3:not(:first-child) {
|
|
338
|
+
.section > h3:where(:not(.dc-h4, .dc-h5, .dc-h6)):not(:first-child) {
|
|
340
339
|
border-left: 3px solid var(--dc-section-accent);
|
|
341
340
|
padding-left: var(--space-sm);
|
|
342
341
|
}
|
|
@@ -738,16 +737,14 @@ h3 + .section {
|
|
|
738
737
|
|
|
739
738
|
@page .card-grid
|
|
740
739
|
@section .dc-card-grid
|
|
741
|
-
## Choose Your Specialty
|
|
742
|
-
@lede ... @end-lede
|
|
743
740
|
@specialty .augmerc
|
|
744
741
|
@specialty-card ... @end-specialty-card
|
|
745
742
|
@end-specialty
|
|
746
743
|
[repeat for 6+ specialties]
|
|
747
744
|
@end-section
|
|
748
745
|
|
|
749
|
-
The column
|
|
750
|
-
|
|
746
|
+
The page/section column rules live in page-templates.css; the grid's own
|
|
747
|
+
columns:2 is a component-internal layout and lives below. Here we also own the chrome-reset (the
|
|
751
748
|
.dc-card-grid section has no card background/shadow — it's a pure layout
|
|
752
749
|
wrapper) plus the per-card density tweaks so all 8 specialty cards fit
|
|
753
750
|
comfortably on one page. */
|
|
@@ -780,13 +777,6 @@ h3 + .section {
|
|
|
780
777
|
column-gap: var(--gutter);
|
|
781
778
|
column-fill: balance;
|
|
782
779
|
}
|
|
783
|
-
/* Header + intro stay close to the cards below (no orphan break) */
|
|
784
|
-
.dc-card-grid > h2 { break-after: avoid; }
|
|
785
|
-
.dc-card-grid > .dc-intro {
|
|
786
|
-
break-after: avoid;
|
|
787
|
-
padding: 5px 12px 5px 16px;
|
|
788
|
-
margin: 0 0 var(--space-md);
|
|
789
|
-
}
|
|
790
780
|
.dc-card-grid .dc-specialty:first-child { break-before: avoid; }
|
|
791
781
|
|
|
792
782
|
/* Compact specialty card density: 10 cards on one page in 2 columns */
|
|
@@ -125,12 +125,6 @@
|
|
|
125
125
|
--dc-definition-block-accent-width: 4px;
|
|
126
126
|
--dc-definition-block-surface: var(--surface-orange-tint);
|
|
127
127
|
|
|
128
|
-
/* distribution table (.dc-dist-*) public API */
|
|
129
|
-
--dc-dist-ap-color: var(--ink);
|
|
130
|
-
--dc-dist-name-color: var(--hud-blue);
|
|
131
|
-
--dc-dist-tag-border: var(--hud-blue-dim);
|
|
132
|
-
--dc-dist-tag-surface: var(--paper-light);
|
|
133
|
-
|
|
134
128
|
/* .dc-fiction public API */
|
|
135
129
|
--dc-fiction-art-float: left;
|
|
136
130
|
|
|
@@ -4,9 +4,10 @@
|
|
|
4
4
|
|
|
5
5
|
── ARCHITECTURAL CONTRACT ────────────────────────────────────────────────
|
|
6
6
|
OWNS:
|
|
7
|
-
- ALL
|
|
8
|
-
a
|
|
9
|
-
|
|
7
|
+
- ALL page and section columns:N layouts — this is the ONLY file that may
|
|
8
|
+
set columns on a page template or section run. A component may column its
|
|
9
|
+
OWN internals in its own sheet (cards.css, section.css .dc-card-grid). It
|
|
10
|
+
may NOT set columns on core's `.gp-columns-*` (only their `--gp-column-gap`).
|
|
10
11
|
- .page.* content layout rules (columns, flex, grid on page content divs)
|
|
11
12
|
- .page base geometry, .column-break
|
|
12
13
|
- .dc-full-page full-bleed geometry (its named-page assignment,
|
|
@@ -26,8 +27,9 @@
|
|
|
26
27
|
- @media screen rules (print-only project)
|
|
27
28
|
|
|
28
29
|
COLUMN OWNERSHIP RULE (narrowed, dc#41): if a THEME rule sets columns:N on a PAGE TEMPLATE (.page.*) in this
|
|
29
|
-
project, it belongs here and ONLY here.
|
|
30
|
-
is a bug
|
|
30
|
+
project, it belongs here and ONLY here. A columns:N on a page/section
|
|
31
|
+
selector found in another file is a bug (a component's own-internals layout
|
|
32
|
+
in its sheet is not). Core's `.gp-columns-2` / `.gp-columns-3` are the generic column
|
|
31
33
|
vocabulary and are NOT this file's to redefine — this file may only set
|
|
32
34
|
their `--gp-column-gap`. See the column-runs block below.
|
|
33
35
|
|
|
@@ -250,12 +252,6 @@
|
|
|
250
252
|
--gp-column-gap: 0.18in; /* narrower than --gutter: three measures, less air */
|
|
251
253
|
}
|
|
252
254
|
|
|
253
|
-
.dc-card-grid > .dc-intro,
|
|
254
|
-
.dc-card-grid > h1,
|
|
255
|
-
.dc-card-grid > h2 {
|
|
256
|
-
column-span: all;
|
|
257
|
-
}
|
|
258
|
-
|
|
259
255
|
.dc-card-grid .dc-specialty,
|
|
260
256
|
.dc-card-grid .dc-specialty-card {
|
|
261
257
|
break-inside: avoid;
|