fb-slides 0.11.1 → 0.11.3

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
@@ -7,6 +7,28 @@ this — which makes it worth being able to see what arrived.
7
7
  Entries are written as the work lands, under **Unreleased**; the release commit
8
8
  that stamps the version renames that heading to the version and its date.
9
9
 
10
+ ## 0.11.3 — 2026-09-27
11
+
12
+ - **Aurora keeps the signature in the bottom-right corner.** The pack used to
13
+ move the logo and name to the left, on top of the slide number, and put a
14
+ dashed progress bar where the signature belongs. The signature now sits where
15
+ every other theme puts it, and the dashed bar is gone; the slide number under
16
+ the arrows is the one indicator left.
17
+ - **Aurora's two lights sit a step further back.** The violet top-left and the
18
+ green bottom-right were strong enough to read as colour fields; both are now
19
+ mixed a little more towards the dark, so they stay atmosphere behind the
20
+ slide.
21
+
22
+ ## 0.11.2 — 2026-09-27
23
+
24
+ - **A second sequence diagram keeps its arrows and step numbers.** Mermaid
25
+ names a sequence diagram's markers with fixed ids — `arrowhead`,
26
+ `sequencenumber` — so with two of them in one deck the second pointed at the
27
+ first one's markers, and while that slide was hidden they did not paint: no
28
+ arrowheads, and white step numbers with no circle behind them. Every id
29
+ inside a diagram now carries the diagram's own prefix, and its references and
30
+ stylesheet follow.
31
+
10
32
  ## 0.11.1 — 2026-09-23
11
33
 
12
34
  - **`build` ships the runtime again from an installed package.** `dist/` came
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fb-slides",
3
- "version": "0.11.1",
3
+ "version": "0.11.3",
4
4
  "type": "module",
5
5
  "description": "Markdown-driven reveal.js decks: live demo embeds, annotation, mermaid, and a zero-config dev server",
6
6
  "keywords": [
package/runtime/deck.js CHANGED
@@ -384,6 +384,7 @@ for (const [i, code] of [...diagrams].entries()) {
384
384
  // does not care that the slide it is going into is currently hidden.
385
385
  const { svg } = await mermaid.render(`mermaid-${i}`, code.textContent.trim());
386
386
  holder.innerHTML = svg;
387
+ scopeIds(holder, `mermaid-${i}`);
387
388
  } catch (error) {
388
389
  console.error('[deck] mermaid failed', error);
389
390
  continue;
@@ -391,6 +392,36 @@ for (const [i, code] of [...diagrams].entries()) {
391
392
  code.closest('pre').replaceWith(holder);
392
393
  }
393
394
 
395
+ // A sequence diagram names its markers with fixed ids — `arrowhead`,
396
+ // `sequencenumber`, `crosshead` — so two of them in one deck share those ids, and
397
+ // `url(#arrowhead)` resolves to the first diagram's marker. When that slide is
398
+ // hidden (`display:none`) the marker does not paint: the second diagram loses its
399
+ // arrows and the numbered circles behind its white step numbers. Every id inside
400
+ // a diagram gets the diagram's own prefix, and the references follow.
401
+ function scopeIds(root, prefix) {
402
+ const renamed = new Map();
403
+ for (const el of root.querySelectorAll('svg [id]')) {
404
+ if (el.id.startsWith(prefix)) continue;
405
+ renamed.set(el.id, `${prefix}-${el.id}`);
406
+ el.id = renamed.get(el.id);
407
+ }
408
+ if (!renamed.size) return;
409
+ // The diagram's own stylesheet colours the markers by id (`#arrowhead path`).
410
+ for (const style of root.querySelectorAll('svg style')) {
411
+ style.textContent = style.textContent.replace(/#([\w-]+)/g, (m, id) => (renamed.has(id) ? `#${renamed.get(id)}` : m));
412
+ }
413
+ const ref = /url\(#([^)]+)\)/g;
414
+ for (const el of root.querySelectorAll('svg *')) {
415
+ for (const attr of [...el.attributes]) {
416
+ if (attr.value.includes('url(#')) {
417
+ attr.value = attr.value.replace(ref, (m, id) => (renamed.has(id) ? `url(#${renamed.get(id)})` : m));
418
+ } else if ((attr.name === 'href' || attr.name === 'xlink:href') && renamed.has(attr.value.slice(1))) {
419
+ attr.value = `#${renamed.get(attr.value.slice(1))}`;
420
+ }
421
+ }
422
+ }
423
+ }
424
+
394
425
  // ---------------------------------------------------------------------------
395
426
  // highlight.js stops at the edge of a template literal's `${…}`: it tags the
396
427
  // interpolation but leaves most of its contents untokenised, so
@@ -34,15 +34,16 @@
34
34
 
35
35
  /* The base theme paints two cool halos here. These are the same idea turned up:
36
36
  a violet pooling top-left and a green rising from the floor, both far enough
37
- off the text to stay atmosphere rather than decoration. */
37
+ off the text to stay atmosphere rather than decoration. Kept well under
38
+ full strength: at 78/70 they read as colour fields, not as light. */
38
39
  /* On <html> alone, with <body> cleared. The base theme paints the same gradient
39
40
  on both, which is invisible at its strength but not at this one: two identical
40
41
  translucent layers are darker than one, so the deck grows a seam exactly where
41
42
  <body> stops being as tall as the page. */
42
43
  html {
43
44
  background:
44
- radial-gradient(1100px 760px at 22% 8%, color-mix(in srgb, var(--aurora-1) 78%, transparent) 0%, transparent 62%),
45
- radial-gradient(900px 620px at 88% 92%, color-mix(in srgb, var(--aurora-2) 70%, transparent) 0%, transparent 58%),
45
+ radial-gradient(1430px 760px at 22% 8%, color-mix(in srgb, var(--aurora-1) 28%, transparent) 0%, transparent 62%),
46
+ radial-gradient(1170px 620px at 88% 92%, color-mix(in srgb, var(--aurora-2) 24%, transparent) 0%, transparent 58%),
46
47
  var(--bg);
47
48
  background-attachment: fixed;
48
49
  }
@@ -130,51 +131,19 @@ body,
130
131
  box-shadow: 0 6px 20px color-mix(in srgb, var(--accent) 35%, transparent);
131
132
  }
132
133
 
133
- /* --- the progress, as segments ------------------------------------------- */
134
- /* reveal's progress is one filled bar. Cut into dashes it reads as "four of
135
- these, you are on the first" from the back of the room, which a hairline
136
- never does — and it stays one element, so nothing has to count slides. */
137
- .reveal .progress {
138
- height: 6px;
139
- bottom: 14px;
140
- left: auto;
141
- right: 22px;
142
- width: 78px;
143
- background: transparent;
144
- --dash: repeating-linear-gradient(
145
- to right,
146
- currentColor 0 14px,
147
- transparent 14px 22px
148
- );
149
- }
150
- .reveal .progress::after {
151
- content: '';
152
- position: absolute;
153
- inset: 0;
154
- color: color-mix(in srgb, var(--text) 22%, transparent);
155
- background: var(--dash);
156
- border-radius: 999px;
157
- }
158
- .reveal .progress span {
159
- position: relative;
160
- z-index: 1;
161
- height: 100%;
162
- color: var(--accent);
163
- background: var(--dash);
164
- border-radius: 999px;
165
- }
134
+ /* --- no progress bar ------------------------------------------------------ */
135
+ /* The slide number under the arrows already says where you are; a second
136
+ indicator in the opposite corner competed with the signature for it.
137
+ `!important` because reveal writes `display: block` inline on the bar when
138
+ `progress` is on, and a stylesheet rule alone loses to that. */
139
+ .reveal .progress { display: none !important; }
166
140
 
167
- /* The signature moves to the left corner, opposite the progress, and loses the
168
- pill: on this much light a second bordered shape is one too many. */
169
- #deck-sig {
170
- right: auto;
171
- left: 16px;
172
- flex-direction: row;
173
- }
141
+ /* The signature keeps the base corner, bottom right, and only loses the pill:
142
+ on this much light a second bordered shape is one too many. */
174
143
  #deck-sig img { height: 54px; }
175
144
  #deck-sig .sig-name {
176
- margin: 0 0 12px -22px;
177
- padding: 5px 13px 5px 30px;
145
+ margin: 0 -22px 12px 0;
146
+ padding: 5px 30px 5px 13px;
178
147
  background: none;
179
148
  border-color: transparent;
180
149
  backdrop-filter: none;