@liminis/editor 0.3.0 → 0.4.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 (31) hide show
  1. package/LICENSE +0 -13
  2. package/README.md +90 -68
  3. package/dist/app/editor/CorrectionPanelPlugin.js +10 -11
  4. package/dist/app/editor/DragHandlePlugin.js +1 -1
  5. package/dist/app/editor/SelectionContextMenuPlugin.js +4 -4
  6. package/dist/app/editor/nodes/C4Component.js +8 -10
  7. package/dist/app/editor/nodes/C4Node.d.ts +1 -1
  8. package/dist/app/editor/nodes/DiagramContextMenu.js +5 -5
  9. package/dist/headless.d.ts +3 -5
  10. package/dist/headless.js +2 -4
  11. package/dist/index.d.ts +1 -1
  12. package/dist/styles.css +425 -454
  13. package/docs/decisions/adr-93-liminis-editor-defined-aliases.md +28 -1
  14. package/docs/decisions/adr-98-invert-token-direction.md +309 -0
  15. package/package.json +2 -2
  16. package/dist/app/editor/c4/C4InteractiveRenderer.d.ts +0 -35
  17. package/dist/app/editor/c4/C4InteractiveRenderer.js +0 -299
  18. package/dist/app/editor/c4/edge-clipping.d.ts +0 -24
  19. package/dist/app/editor/c4/edge-clipping.js +0 -139
  20. package/dist/app/editor/c4/hooks/useC4DiagramDrag.d.ts +0 -38
  21. package/dist/app/editor/c4/hooks/useC4DiagramDrag.js +0 -112
  22. package/dist/app/editor/c4/layout.d.ts +0 -25
  23. package/dist/app/editor/c4/layout.js +0 -839
  24. package/dist/app/editor/c4/parser.d.ts +0 -19
  25. package/dist/app/editor/c4/parser.js +0 -410
  26. package/dist/app/editor/c4/render-to-string.d.ts +0 -24
  27. package/dist/app/editor/c4/render-to-string.js +0 -34
  28. package/dist/app/editor/c4/renderer.d.ts +0 -64
  29. package/dist/app/editor/c4/renderer.js +0 -569
  30. package/dist/app/editor/c4/types.d.ts +0 -203
  31. package/dist/app/editor/c4/types.js +0 -43
@@ -1,9 +1,10 @@
1
1
  # ADR-93: `--liminis-editor-*` Names Are Defined as Aliases of Their Legacy Names
2
2
 
3
3
  **Date:** 2026-08-20
4
- **Status:** Accepted
4
+ **Status:** Accepted (amended by ADR-98 — see the note marked *Amended by ADR-98* below; the alias direction this ADR chose is reversed)
5
5
  **Supersedes:** none
6
6
  **Amends:** none
7
+ **Amended by:** ADR-98 (#98 inverts this ADR's alias direction — the legacy names stop carrying the real defaults, and become shims to `--liminis-editor-*` instead)
7
8
  **Issue:** #93 (verveguy/liminis-editor)
8
9
 
9
10
  ## Context
@@ -61,6 +62,25 @@ anticipated by the plan:
61
62
 
62
63
  ## Decision
63
64
 
65
+ > **Amended 2026-08-22 by ADR-98 (#98) — this clause no longer holds.** The
66
+ > direction chosen here is reversed: `--liminis-editor-*` names now carry the
67
+ > real defaults, and the legacy names below become one-line shims
68
+ > (`<legacy>: var(--liminis-editor-x);`). This ADR's own reasoning for why
69
+ > the *opposite* direction was unsafe — "adding `--liminis-editor-foreground:
70
+ > <default>` unconditionally would resolve every consumption chain at the
71
+ > new name before ever reaching the old one" — no longer applies once every
72
+ > internal consumption site reads `--liminis-editor-*` only (ADR-98's FR-003),
73
+ > which removes the nested legacy fallback this ADR's Decision explicitly
74
+ > chose to leave in place. This also reverses this ADR's own non-breaking
75
+ > guarantee below for one direction: a host that only *reads* a legacy name
76
+ > still gets a real value (the shim resolves fine), but a host that only
77
+ > *sets* a legacy name no longer themes the editor, since nothing internal
78
+ > reads that name to pick the override up — verified empirically, not
79
+ > assumed, and accepted as an intentional breaking change. See ADR-98's
80
+ > "Verified, not assumed" section for the full rationale. The rest of this
81
+ > section is kept as the historical record of what was decided and why in
82
+ > 2026-08-20, not edited to match the new direction.
83
+
64
84
  **Legacy names keep carrying the real defaults. Each `--liminis-editor-*`
65
85
  name becomes a new declaration that reads its legacy name via `var()`** —
66
86
  `--liminis-editor-foreground: var(--vscode-foreground);` — added in a new
@@ -125,6 +145,13 @@ comment noting they are superseded by the new canonical default. The
125
145
  spec's Out of Scope section explicitly permits this as a side effect of
126
146
  choosing FR-001's value, not as a design goal in its own right.
127
147
 
148
+ > **Amended 2026-08-22 by ADR-98 (#98) — this clause no longer holds.** Every
149
+ > consumption site's nested legacy fallback, called "provably dead code"
150
+ > below, is removed by ADR-98 — precisely because leaving it in place would
151
+ > mean this package still textually reads the legacy vocabulary ADR-98's
152
+ > FR-003 forbids. The "materially larger, coordinated change deferred out of
153
+ > this issue's scope" this paragraph anticipated is ADR-98 itself.
154
+
128
155
  **Consumption sites are left untouched.** All 224 `styles.css` sites and 26
129
156
  `.tsx` sites keep their existing `var(--liminis-editor-x, var(--old-name-x, ...))`
130
157
  chains. Simplifying them to a single `var(--liminis-editor-x)` call was
@@ -0,0 +1,309 @@
1
+ # ADR-98: Invert the Token Direction — `--liminis-editor-*` Carries the Values, Legacy Names Become Shims
2
+
3
+ **Date:** 2026-08-22
4
+ **Status:** Accepted
5
+ **Supersedes:** none
6
+ **Amends:** none
7
+ **Issue:** #98 (verveguy/liminis-editor)
8
+
9
+ ## Context
10
+
11
+ ADR-93 (#93) gave every `--liminis-editor-*` name a real `:root`/`.dark`
12
+ declaration, but as a forward to its legacy name —
13
+ `--liminis-editor-foreground: var(--vscode-foreground);`. The real values
14
+ kept living on the legacy side. That was a deliberate, narrow fix for a
15
+ narrow problem (a host reading `--liminis-editor-*` got nothing at all,
16
+ zusammen#129); it was never the end state, and ADR-092's own "Not decided
17
+ here" section named the inversion as an open item.
18
+
19
+ The narrowness became a concrete defect. verveguy/zusammen#134 migrated its
20
+ shadcn palette onto `--liminis-editor-*` and had to leave three tokens
21
+ behind, because their aliases lead to a literal, not a value:
22
+ `--liminis-editor-primary: var(--color-primary, #3b82f6)`,
23
+ `--liminis-editor-errorForeground: var(--vscode-errorForeground, #f14c4c)`,
24
+ `--liminis-editor-focus-border: var(--vscode-focus-border, #007acc)`. Wiring
25
+ Zusammen's `--primary` to the first would have replaced its purple brand
26
+ colour with an unrelated blue — a visible, app-wide regression, and not a
27
+ Zusammen problem to work around: `--color-primary` has zero definitions in
28
+ this package, so the alias never led anywhere real to begin with.
29
+
30
+ **Verified against the current codebase, not the issue's approximate
31
+ counts** (the spec's own Assumptions permit this — Implement diffs against
32
+ real source, not the issue's illustrative numbers):
33
+
34
+ - 59 `--liminis-editor-*` names are declared (the issue said 65).
35
+ - 26 legacy names need a shim: 24 distinct `--vscode-*` names,
36
+ `--checkbox-border`, and `--editor-brand`.
37
+ - The 61 `--slashmd-*` names need no shim — verified zero hits across both
38
+ `verveguy/zusammen` and `verveguy/liminis` (the one `slashmd` string that
39
+ does appear, `.slashmd-editor`, is an unrelated CSS class name). They are
40
+ upstream vocabulary no known consumer reads, so #98 deletes them outright.
41
+ - `--slashmd-heading-color` is declared three times (twice in the `:root`/
42
+ `.dark` blocks ADR-93 left in place, once in `@media print`) but consumed
43
+ nowhere and has no `--liminis-editor-*` counterpart — dropped entirely,
44
+ including from the print block, rather than inventing one.
45
+ - Exactly 10 `var(--color-*)` references exist in `src/`: 4 in the
46
+ `styles.css` alias block this ADR deletes, and 6 in `C4Component.tsx`
47
+ (the C4 diagram layout-toggle buttons) — the only place
48
+ `--color-primary`/`--color-muted-foreground`/their `-100` variants are
49
+ read anywhere in this package.
50
+
51
+ ## Decision
52
+
53
+ **Invert the direction.** Each `--liminis-editor-*` name now carries its own
54
+ literal (or, for two names, a value built only from another
55
+ `--liminis-editor-*` name) at `:root`/`.dark`. Each of the 26 legacy names
56
+ above becomes a one-line shim, `<legacy>: var(--liminis-editor-x);`, in a
57
+ new `:root`-only block — no `.dark` duplicate is needed, since
58
+ `var(--liminis-editor-x)` re-resolves against whichever cascade value is
59
+ active at the point of use, the same reasoning ADR-93 already relied on in
60
+ the opposite direction. **The physical structure of `styles.css`'s two
61
+ blocks swaps roles, not position**, so the diff reads as "these two blocks
62
+ traded places" rather than a scrambled rewrite.
63
+
64
+ ### Verified, not assumed: the shim preserves reads, not writes
65
+
66
+ The issue asked for this to be verified, not assumed, and it was — with a
67
+ real, corrected finding, not a confirmation of the original premise. The
68
+ issue's own proposed mechanism claimed a host *setting* only a legacy name
69
+ would still theme the editor, "because the package consumes
70
+ `--liminis-editor-foreground` and the host's declaration wins by cascade."
71
+ That is false, and checking it (a static HTML fixture opened in a real
72
+ Chromium via Playwright's cached binary, then the same check repeated
73
+ against `examples/electron/e2e/theming-aliases.spec.ts`'s running shell)
74
+ shows why: a `var()` reference resolves the cascade of the *exact* property
75
+ name written inside it. `--liminis-editor-foreground`'s own declaration is
76
+ a literal, containing no reference to `--vscode-foreground` at all — so a
77
+ host's override of `--vscode-foreground` changes what `--vscode-foreground`
78
+ itself computes to, and nothing else. Nothing inside this package reads
79
+ `--vscode-foreground`, so the override never reaches the editor. Two custom
80
+ properties do not auto-synchronize; only a `var()` reference that names one
81
+ inside the other's declaration creates any relationship between them, and
82
+ here the reference runs one way only (legacy → new, in the shim), not both
83
+ — a bidirectional shim (each side referencing the other via `var()`) is a
84
+ CSS cycle, which the spec defines as producing a guaranteed-invalid value on
85
+ *both* properties, so that was never an option either.
86
+
87
+ **The corrected, accepted guarantee: a shim preserves reads, not writes.** A
88
+ host that *reads* a legacy name (e.g. Zusammen's
89
+ `--vscode-errorForeground`/`--vscode-focus-border`) still gets the real,
90
+ current value, since the shim's `var(--liminis-editor-x)` reference resolves
91
+ normally. A host that *sets* only a legacy name no longer themes the editor
92
+ — this is accepted as an intentional breaking change (see CHANGELOG's
93
+ `## Unreleased` / Breaking changes), not a regression to silently work
94
+ around, because the only alternative (`--liminis-editor-x: var(--legacy-x,
95
+ <literal>)`, checking the legacy name first at the *definition* site) would
96
+ keep the legacy name in the resolution path for every one of the 26 shimmed
97
+ tokens — reintroducing, in a new shape, the exact dependence on the legacy
98
+ vocabulary this issue exists to remove. Measured directly: neither
99
+ `liminis-app` nor Zusammen sets a legacy name today (`liminis-app` sets
100
+ `--liminis-editor-primary`/`--liminis-editor-muted-foreground`; Zusammen
101
+ only reads), so this break has no currently-known victim, and it is also
102
+ `0.2.0`'s already-announced deprecation ("removed in a future major
103
+ release") completing on schedule rather than early.
104
+ `examples/electron/e2e/theming-aliases.spec.ts` pins both halves directly
105
+ with `getComputedStyle` in a running Electron shell: a legacy-name read
106
+ still resolves, and a legacy-name-only *write* no longer reaches the
107
+ editor's computed style — a deliberate assertion of the new, documented
108
+ behavior, not a gap left uncovered.
109
+
110
+ **FR-003 ("no internal code may read a `--vscode-*`/`--slashmd-*`/
111
+ `--checkbox-*` property") is taken literally.** All CSS and TSX consumption
112
+ sites under `src/` lose their now-redundant nested `var(--legacy-x, …)`
113
+ fallback, becoming a bare `var(--liminis-editor-x)`. Every name now has an
114
+ unconditional default, so the fallback was provably dead weight, not a
115
+ safety net — the same "provably dead code" ADR-93 left in place in the
116
+ other direction, except this time removed, because leaving it would mean
117
+ this package still textually reads the legacy vocabulary FR-003 forbids.
118
+ The `@media print` block — an *internal* consumer, not a host — is migrated
119
+ the same way, overriding `--liminis-editor-*` names directly.
120
+
121
+ **`--liminis-editor-primary`/`-100` are brand-derived, not host-borrowed.**
122
+ `--editor-brand` — this package's own, already-themed purple,
123
+ `oklch(0.55 0.20 303)` light / `oklch(0.70 0.20 303)` dark — becomes
124
+ `--liminis-editor-primary`'s value directly; no new public token name is
125
+ invented. `--editor-brand` itself becomes a one-line shim,
126
+ `--editor-brand: var(--liminis-editor-primary);`.
127
+ `--liminis-editor-primary-100` becomes the same brand colour at 10% alpha,
128
+ mirroring how the existing callout tokens already derive a tint from
129
+ `--editor-brand`. This replaces the previous forward to liminis-app's
130
+ `--color-primary`/`-100` (§the issue's point 3: "this looks like a defect
131
+ introduced by #93 rather than a deliberate default") — this package never
132
+ defined `--color-primary`, so that forward never had a real value behind
133
+ it; a package-owned brand colour is a deliberate default the package
134
+ actually owns.
135
+
136
+ **`--color-primary`/`--color-muted-foreground`/their `-100` variants are not
137
+ part of this package's legacy vocabulary and stay outside FR-003's
138
+ forbidden list** (only `--vscode-*`/`--slashmd-*`/`--checkbox-*` are
139
+ forbidden). liminis-app sets `--color-primary`/`--color-muted-foreground`
140
+ today, and that override must keep working unmodified. Once
141
+ `--liminis-editor-primary`'s *definition* no longer forwards to
142
+ `--color-primary`, the only place left to preserve that override is
143
+ `C4Component.tsx`'s own 6 consumption sites — so, uniquely, those sites are
144
+ **not** simplified to a bare `var(--liminis-editor-x)` like every other
145
+ site in this package. They are reordered to
146
+ `var(--color-x, var(--liminis-editor-x))`, checking liminis-app's token
147
+ first and falling back to this package's own default, dropping only the
148
+ now-redundant third-level literal. **This is the one deliberate exception
149
+ to "strip every legacy fallback," and it is the single highest-risk spot in
150
+ this change** — a future pass that "simplifies" it to match every other
151
+ call site would silently stop liminis-app's existing override from working.
152
+ An inline comment at the site says so explicitly, not only this ADR.
153
+
154
+ > **Amended 2026-08-22 (#101) — this exception is removed.** Measured
155
+ > against both known consumers' current `main`, the two arms resolved
156
+ > identically in liminis-app (`--color-primary` and `--liminis-editor-primary`
157
+ > both trace to `var(--primary)`) and the `--color-*` arm was dead in
158
+ > Zusammen (neither `--color-primary-100` nor `--color-muted-100` was ever
159
+ > defined there). The fallback changed no observable outcome anywhere it was
160
+ > deployed, while permanently coupling this package to a host's Tailwind
161
+ > `@theme` namespace it does not define or control. `C4Component.tsx`'s six
162
+ > sites now read `var(--liminis-editor-x)` only, the same as every other
163
+ > consumption site; a host that wants to override the C4 diagram colours
164
+ > sets `--liminis-editor-primary` and its siblings, exactly as it would for
165
+ > any other token. This confirms the risk this ADR itself flagged above —
166
+ > the "single highest-risk spot" and "permanent asymmetry" — rather than
167
+ > contradicting it.
168
+
169
+ **`PREVIOUS_NAME` in `scripts/lib/theming-tokens.mjs` drops its `-primary-100`/
170
+ `-muted-foreground`/`-muted-100` entries** (they pointed at `--color-*`,
171
+ which this package never defined — keeping them implied a migration
172
+ relationship that never existed) **and repoints `-primary` at
173
+ `--editor-brand`**, the name it now genuinely shims. The map's remaining
174
+ entries (`--slashmd-*`, most `--vscode-*`) are kept as a historical
175
+ migration record for the README's "Previous name" column, even though
176
+ `--slashmd-*` itself is deleted — the record of what a token used to be
177
+ called remains useful to a host migrating an old override, and nothing
178
+ about deleting the definition requires deleting the history of the rename.
179
+
180
+ **`resolvesToPreviousName()` is deleted, not just updated, and replaced with
181
+ `LEGACY_SHIM_TARGET` + `resolvesToShimTarget()`.** The old guard's premise —
182
+ a consumption-site fallback protects a host still supplying only the legacy
183
+ name — is exactly what this ADR inverts: that protection now lives in the
184
+ `:root` shim declaration, not at the consumption site. The new guard checks
185
+ the new invariant directly: every one of the 26 legacy names in
186
+ `LEGACY_SHIM_TARGET` is declared in `styles.css` as a one-line `var()`
187
+ forward to its `--liminis-editor-*` target (FR-002), and — a second,
188
+ independent check — nothing under `src/` contains `var(--vscode-`,
189
+ `var(--slashmd-`, or `var(--checkbox-` at all (FR-003). A plain-text scan
190
+ is sufficient for the second check and more robust than the old paren-depth
191
+ -aware fallback check, because after this change there is no longer any
192
+ legitimate reason for those substrings to appear inside a `var()` call
193
+ anywhere in this package.
194
+
195
+ **One side effect of the `C4Component.tsx` exception, not separately
196
+ designed:** `scripts/lib/theming-tokens.mjs`'s `consumedTokens()` treats the
197
+ outermost (depth-0) name in a `var()` fallback chain as the "primary"
198
+ consumed name — the same logic ADR-93 relied on to keep alias declarations
199
+ out of the consumed set. Since `var(--color-x, var(--liminis-editor-x))`'s
200
+ outer argument is `--color-x`, that is now the name the README's generated
201
+ table documents at those 4 token pairs, not `--liminis-editor-primary`/
202
+ `-100`/`-muted-foreground`/`-muted-100` — those four remain fully real,
203
+ declared defaults (verified by the baseline and by `defaultedTokens()`),
204
+ just no longer the *documented-as-consumed* name at this one file's sites.
205
+ `TOKEN_DESCRIPTIONS` gains four new entries for the `--color-*` names
206
+ instead, describing the override relationship in both directions.
207
+
208
+ ## Consequences
209
+
210
+ **Good:**
211
+
212
+ - A host reading `--liminis-editor-*` now gets a real value in every case,
213
+ including the 23 aliases that previously baked a literal — the entire
214
+ point of this issue and the prerequisite for zusammen#134's read
215
+ migration (FR-001, SC-001).
216
+ - A host supplying only a legacy name keeps *reading* a real value, verified
217
+ by `getComputedStyle` in a running Electron shell, not assumed from
218
+ cascade theory alone (FR-002, FR-003) — see "Verified, not assumed" above
219
+ for the corrected scope of this guarantee (reads, not writes).
220
+ - `--liminis-editor-primary` now resolves to a value this package actually
221
+ owns, closing the defect the issue's point 3 named (FR-008).
222
+ - The ADR-092 baseline guard now protects the 26 shim declarations the same
223
+ way it already protected every other definition — an accidental deletion
224
+ of a shim fails `pnpm test`, naming the token.
225
+ - `--slashmd-*`'s 61 names are gone entirely — the largest single reduction
226
+ in this package's declared token surface since #51, with a verified
227
+ absence of consumers backing the removal, not a guess.
228
+
229
+ **Bad / accepted:**
230
+
231
+ - **A host that sets only a legacy name no longer themes the editor** — this
232
+ package's initial framing of this issue called the whole change
233
+ "non-breaking," and that framing was wrong for this one direction (see
234
+ "Verified, not assumed" above). Accepted because the only fix would keep
235
+ the legacy name in every shimmed token's resolution path, defeating the
236
+ purpose of the inversion, and because neither known consumer (`liminis-app`,
237
+ Zusammen) currently sets a legacy name — this is documented in the
238
+ CHANGELOG's `## Unreleased` / Breaking changes as of this decision.
239
+ - **`--liminis-editor-primary`/`-100`'s new computed value is a real,
240
+ visible change** for anything relying on the old `#3b82f6`-derived default
241
+ rather than overriding it. This is out of this repository's control —
242
+ `zusammen`/`liminis-app` are separate repositories — but is a deliberate,
243
+ known consequence of FR-008, not an oversight, and is called out
244
+ prominently in the PR description.
245
+ - **The `C4Component.tsx` `--color-*` exception is a permanent asymmetry** in
246
+ an otherwise uniform "every consumption site reads `--liminis-editor-*`
247
+ only" rule. It is the one place a future contributor could plausibly
248
+ "clean up" into a silent regression against liminis-app. The inline
249
+ comment at the site and this ADR are the two places that asymmetry is
250
+ recorded; there is no CI guard that would catch a well-intentioned but
251
+ wrong simplification here, because the wrong version is textually
252
+ indistinguishable from a normal consumption site.
253
+ > **Amended 2026-08-22 (#101) — removed.** The exception is gone; see the
254
+ > amendment in the Decision section above. `--color-*` is now forbidden
255
+ > under `src/` on the same footing as `--vscode-*`/`--slashmd-*`/
256
+ > `--checkbox-*`, with no per-file carve-out.
257
+ - **The README's generated token table no longer lists
258
+ `--liminis-editor-primary`/`-100`/`-muted-foreground`/`-muted-100` as
259
+ their own rows** — `--color-primary`/`-100`/`-muted-foreground`/`-muted-100`
260
+ appear instead, as a direct consequence of which name is "outermost" in
261
+ `C4Component.tsx`'s reordered fallback chain (see Decision). The four
262
+ `--liminis-editor-*` names remain fully real, declared, overridable
263
+ defaults; they are simply not the *documented-as-consumed* name at this
264
+ one file's sites. A future contributor auditing "does every
265
+ `--liminis-editor-*` name have a row in the README" needs to know this
266
+ before treating the absence as a bug.
267
+ - **`--editor-brand` was never itself part of `PREVIOUS_NAME`'s renamed-token
268
+ history before this change** (it had no consumption site to preserve a
269
+ fallback for), so its entry is new, not migrated — a minor asymmetry with
270
+ every other `PREVIOUS_NAME` entry, which all trace back to #51.
271
+
272
+ **Neutral:**
273
+
274
+ - `scripts/lib/theming-tokens.mjs`'s `consumptionSitesIn()`/
275
+ `isCustomPropertyDeclarationValue()` machinery (ADR-93) needed no change:
276
+ it is direction-agnostic, and correctly treats this ADR's new shim
277
+ declarations as declaration-side values, not consumption sites, the same
278
+ way it treated ADR-93's aliases.
279
+ - `resolvesWithoutHost()` needed no change either: once every
280
+ `--liminis-editor-*` name has a real `:root`/`.dark` declaration, a bare
281
+ `var(--liminis-editor-x)` with no fallback resolves without a host by
282
+ construction — the guard's existing logic already covers this.
283
+
284
+ ## References
285
+
286
+ - Issue #98 (this decision); ADR-092's "Not decided here," Item 3 — this
287
+ decision's direct origin
288
+ - `docs/decisions/adr-93-liminis-editor-defined-aliases.md` — the decision
289
+ this one inverts; amended to note its alias direction is superseded here
290
+ - `docs/decisions/adr-092.md` — the checked-in baseline guard this
291
+ decision's shim declarations and dropped `--slashmd-*` names are
292
+ reconciled against (`pnpm docs:theming-baseline`)
293
+ - `docs/decisions/adr-087.md` — the consumption-side rename and
294
+ `PREVIOUS_NAME`/fallback design this decision's `resolvesToPreviousName()`
295
+ retirement supersedes for the definition side
296
+ - `src/styles.css` — the swapped shim/definition blocks; the migrated
297
+ `@media print` block; the inline comment at `C4Component.tsx`'s
298
+ `--color-*` sites
299
+ - `scripts/lib/theming-tokens.mjs` — `LEGACY_SHIM_TARGET`,
300
+ `resolvesToShimTarget()`, the adjusted `PREVIOUS_NAME`
301
+ - `scripts/lib/theming-defined-tokens-baseline.json` — regenerated via
302
+ `pnpm docs:theming-baseline` (61 `--slashmd-*` removed, 13
303
+ previously-undeclared `--vscode-*` shims added)
304
+ - `README.md`, "Theming: CSS custom properties" — regenerated table and
305
+ hand-rewritten prose describing the inverted mechanism
306
+ - [verveguy/zusammen#134](https://github.com/verveguy/zusammen/issues/134) —
307
+ the downstream migration this decision unblocks
308
+ - [verveguy/zusammen#129](https://github.com/verveguy/zusammen/issues/129) —
309
+ the earlier, narrower migration ADR-93 unblocked
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@liminis/editor",
3
- "version": "0.3.0",
3
+ "version": "0.4.0",
4
4
  "//publishing": "Publishing is deliberate, never incidental. `private: true` was this package's guard until verveguy/liminis-editor#39 took the publish decision; it is gone because that decision was taken, not because it was tidied away. The guard is now `prepublishOnly` -> scripts/guard-publish.mjs, which refuses unless LIMINIS_ALLOW_PUBLISH=1 is set explicitly. That variable is set at step scope in .github/workflows/publish.yml and nowhere else, so a release is the only path that publishes. Note that `npm publish --dry-run` does NOT report a private package as blocked (npm 10.8.2), which is why the guard is a script rather than a flag.",
5
5
  "license": "MIT",
6
6
  "description": "Lexical-based markdown WYSIWYG editor with mdast round-trip and a host-injection seam",
@@ -99,7 +99,7 @@
99
99
  "react-dom": "^19.2.0"
100
100
  },
101
101
  "dependencies": {
102
- "@dagrejs/dagre": "^3.0.0",
102
+ "@liminis/diagrams": "^0.1.1",
103
103
  "@mathjax/src": "^4.1.1",
104
104
  "lucide-react": "^1.11.0",
105
105
  "mdast-util-definition-list": "^2.0.0",
@@ -1,35 +0,0 @@
1
- /**
2
- * C4InteractiveRenderer - Interactive SVG renderer with drag support
3
- *
4
- * Wraps the C4Renderer with drag-and-drop functionality for manual layout mode.
5
- * Maintains local position state during drag and recalculates edges in real-time.
6
- */
7
- import type { C4Diagram } from './types.js';
8
- /** Synthetic ID used to store legend position in manual positions map */
9
- export declare const LEGEND_POSITION_ID = "__legend__";
10
- export interface C4InteractiveRendererProps {
11
- /** Parsed C4 diagram */
12
- diagram: C4Diagram;
13
- /** Whether dark mode is enabled */
14
- isDarkMode: boolean;
15
- /** Whether edit mode (drag) is enabled */
16
- isEditMode: boolean;
17
- /** Current manual positions */
18
- manualPositions: Record<string, {
19
- x: number;
20
- y: number;
21
- }>;
22
- /** Callback when positions change (during drag or on drag end) */
23
- onPositionChange: (positions: Record<string, {
24
- x: number;
25
- y: number;
26
- }>) => void;
27
- }
28
- /**
29
- * Interactive C4 diagram renderer with drag support.
30
- *
31
- * When isEditMode is true, nodes can be dragged to new positions.
32
- * Edges and boundaries are recalculated in real-time during drag.
33
- */
34
- export declare function C4InteractiveRenderer({ diagram, isDarkMode, isEditMode, manualPositions, onPositionChange, }: C4InteractiveRendererProps): JSX.Element;
35
- export default C4InteractiveRenderer;