origam 2.37.3 → 2.37.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 CHANGED
@@ -18,6 +18,16 @@ This project follows [Semantic Versioning](https://semver.org).
18
18
 
19
19
  ## [Unreleased]
20
20
 
21
+ ## [2.37.4] - 2026-10-20
22
+
23
+ ### Fixed — `OrigamCode` : une ligne vide tombait à 0 px et un numéro fantôme suivait le saut de ligne final (#1216)
24
+
25
+ Avec `line-numbers`, la rangée d'une ligne vide avait `min-height: var(--origam-code---line-height)`, or ce token vaut `1.6` sans unité : la déclaration était invalide et la rangée vide mesurait 0 px, son numéro se superposant à celui de la ligne suivante.
26
+
27
+ - La rangée prend désormais `min-height: 1lh`, la hauteur de ligne calculée.
28
+ - Le dernier `<span class="line"></span>` vide que shiki émet après le saut de ligne final n'est plus compté : plus de rangée ni de numéro en trop.
29
+ - Vérifié : spec e2e rouge sur le parent, verte après ; TU Code + CodeGroup 49/49 (PR #1219).
30
+
21
31
  ## [2.37.3] - 2026-10-19
22
32
 
23
33
  ### Fixed — `v-intersect` lié avec le tuple `withDirectives` : handler jamais appelé (#1205)
@@ -286,7 +286,7 @@ function paintIntoDom(rawHtml) {
286
286
  if (!target) return;
287
287
  const innerMatch = rawHtml.match(/<code[^>]*>([\s\S]*?)<\/code>/);
288
288
  const inner = innerMatch ? innerMatch[1] : rawHtml;
289
- const lines = inner.split(/\n/).filter((l, idx, arr) => !(idx === arr.length - 1 && l.trim() === ""));
289
+ const lines = inner.split(/\n/).filter((l, idx, arr) => !(idx === arr.length - 1 && l.replace(/<span class="line"><\/span>/, "").trim() === ""));
290
290
  const highlightSet = highlightedLines.value;
291
291
  const rows = lines.map((line, i) => {
292
292
  const lineNo = i + 1;
@@ -531,7 +531,11 @@ defineExpose({ rebuild, copied, codeRef });
531
531
  display: block;
532
532
  padding-inline: var(--origam-code__row---padding-inline);
533
533
  white-space: pre;
534
- min-height: var(--origam-code---line-height);
534
+ /**
535
+ * 1lh = the row's own computed line-height. The token is unitless (1.6),
536
+ * so it was an invalid min-height and an empty row collapsed to 0 px (#1216).
537
+ */
538
+ min-height: 1lh;
535
539
  }
536
540
 
537
541
  .origam-code--wrap .origam-code__row {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "origam",
3
- "version": "2.37.3",
3
+ "version": "2.37.4",
4
4
  "type": "module",
5
5
  "description": "origam — a Vue 3 design system with multi-theme design tokens, CSS-first components and TypeScript types.",
6
6
  "keywords": [