website-xp-phone 2.3.0 → 2.5.1

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 (101) hide show
  1. package/build/blogDirsPlugin.ts +100 -0
  2. package/package.json +15 -8
  3. package/public/blog/archive/eighth-post-lost-in-the-sauce.json +36 -0
  4. package/public/blog/archive/noise/eleventh-post-discussion-java-gist.md +5 -0
  5. package/public/blog/archive/noise/fifteenth-post-very-rare-windows-funny.md +8 -0
  6. package/public/blog/archive/noise/fourth-post-meta-blog.md +3 -0
  7. package/public/blog/archive/noise/sixteenth-post-meta-fantasy-blog.md +4 -0
  8. package/public/blog/archive/noise/tenth-post-meta-funny-redacted-and-timetravelled.md +3 -0
  9. package/public/blog/archive/noise/twelfth-post-mixing-phase-technique-audio-music.md +48 -0
  10. package/public/blog/archive/noise/welcome-back-ramble-meta.md +6 -0
  11. package/public/blog/archive/noise/welcome-to-my-blog-meta-blog-welcome-to-my-website.md +7 -0
  12. package/public/blog/archive/seventh-post-lie-theory-na2000.json +22 -0
  13. package/public/blog/archive/sophus-lie.json +36 -0
  14. package/public/blog/hlwm_and_herbstutil.md +74 -0
  15. package/public/blog/writing/hot-action-under-a-cold-moon.json +9 -0
  16. package/public/checksums.txt +90 -67
  17. package/public/documents/drift-report.json +13 -1
  18. package/scripts/refresh-soundcloud.mjs +54 -8
  19. package/sonar-project.properties +12 -0
  20. package/src/content/addons.json +2 -2
  21. package/src/content/blog.json +17 -365
  22. package/src/content/blogDirs.ts +197 -0
  23. package/src/content/configs.json +5 -3
  24. package/src/content/contacts.json +7 -5
  25. package/src/content/index.ts +155 -57
  26. package/src/content/music-ext.json +1 -1
  27. package/src/content/pages.json +2 -1
  28. package/src/content/projects/development.json +2 -2
  29. package/src/content/projects/doftiles.json +63 -7
  30. package/src/content/projects/frontend.json +2 -2
  31. package/src/content/projects/graphbrowser.json +2 -2
  32. package/src/content/projects/herbctl.json +213 -0
  33. package/src/content/projects/herbstutil.json +66 -36
  34. package/src/content/projects/lightdni-jssas-toggle.json +2 -2
  35. package/src/content/projects/on-deploy.json +67 -0
  36. package/src/content/projects/pagerts.json +4 -4
  37. package/src/content/projects/polyframes.json +83 -0
  38. package/src/content/projects/rarebert.json +2 -2
  39. package/src/content/projects/webuser.json +2 -2
  40. package/src/content/schema.ts +7 -4
  41. package/src/content/sections.json +20 -13
  42. package/src/content/soundcloud.json +61 -13
  43. package/src/lib/clippy.ts +29 -8
  44. package/src/lib/history.ts +152 -0
  45. package/src/lib/markdown.tsx +11 -1
  46. package/src/lib/scrollTo.ts +45 -0
  47. package/src/lib/signals.tsx +271 -0
  48. package/src/lib/slashes.ts +20 -0
  49. package/src/lib/tabNav.ts +192 -0
  50. package/src/main.tsx +20 -4
  51. package/src/pages/BlogDirPage.tsx +37 -0
  52. package/src/pages/BlogPostPage.tsx +78 -3
  53. package/src/pages/ProjectPage.tsx +9 -3
  54. package/src/pages/WowPage.tsx +8 -3
  55. package/src/pages/index.ts +2 -0
  56. package/src/shell/App.tsx +19 -8
  57. package/src/shell/Clippy.tsx +13 -3
  58. package/src/shell/MenuBar.tsx +7 -4
  59. package/src/shell/resolveRoute.ts +43 -3
  60. package/src/shell/routerSignals.ts +34 -0
  61. package/src/styles/extras.css +20 -0
  62. package/src/styles/layout.css +2 -3
  63. package/src/styles/menu.css +1 -1
  64. package/src/styles/window.css +20 -8
  65. package/src/themes/pageSlide/index.ts +120 -42
  66. package/src/themes/pageSlide/pageSlide.css +20 -9
  67. package/src/virtual.d.ts +14 -0
  68. package/src/window/MaximizedWindow.tsx +100 -64
  69. package/src/window/OkButton.tsx +42 -25
  70. package/src/window/PageWindows.tsx +7 -0
  71. package/src/window/TitleBar.tsx +3 -1
  72. package/src/window/Window.tsx +132 -87
  73. package/src/window/closeSounds.ts +27 -0
  74. package/src/window/model.ts +11 -0
  75. package/src/window/state.tsx +301 -54
  76. package/src/window/themes.ts +23 -2
  77. package/test/content.test.js +15 -10
  78. package/test/deploy-pipeline.test.js +11 -11
  79. package/test/markdown-tables.test.js +96 -0
  80. package/test/soundcloud-refresh.test.js +68 -0
  81. package/test/tabNav.test.js +137 -0
  82. package/tsconfig.node.tsbuildinfo +1 -1
  83. package/tsconfig.tsbuildinfo +1 -1
  84. package/vite.config.ts +7 -1
  85. package/xp.css/dist/98.css +2 -0
  86. package/xp.css/dist/98.css.map +1 -0
  87. package/xp.css/dist/GUI.css +2 -0
  88. package/xp.css/dist/GUI.css.map +1 -0
  89. package/xp.css/dist/XP.css +2 -0
  90. package/xp.css/dist/XP.css.map +1 -0
  91. package/xp.css/dist/fonts/converted/PerfectDOSVGA437Win.woff +0 -0
  92. package/xp.css/dist/fonts/converted/PerfectDOSVGA437Win.woff2 +0 -0
  93. package/xp.css/dist/fonts/converted/ms_sans_serif.woff +0 -0
  94. package/xp.css/dist/fonts/converted/ms_sans_serif.woff2 +0 -0
  95. package/xp.css/dist/fonts/converted/ms_sans_serif_bold.woff +0 -0
  96. package/xp.css/dist/fonts/converted/ms_sans_serif_bold.woff2 +0 -0
  97. package/public/blog/4th.md +0 -28
  98. package/public/blog/wsl.1.md +0 -40
  99. package/src/window/hidden.ts +0 -22
  100. /package/public/blog/{ → archive/noise/}/321/200/321/203/320/275/320/270/321/201/321/207-/320/263/320/273/320/276/321/201/321/201/320/260/321/200/320/270/320/271.md" +0 -0
  101. /package/src/content/{characters.json → includes/characters.json} +0 -0
@@ -0,0 +1,34 @@
1
+ import { dispatchSignal, onSignal } from "@/lib/signals";
2
+
3
+ /** The shell's router-aware signal behaviours. Handlers live OUT of the
4
+ * components: components only ever dispatch, and the behaviours they
5
+ * trigger are attached once at boot (main.tsx) — no per-component
6
+ * subscription effects. */
7
+
8
+ /** The route-change performer. Until the router binds its navigate,
9
+ * the honest fallback is a full document assign. */
10
+ let go: (to: string) => void = (to) => window.location.assign(to);
11
+
12
+ /** Hands the bus the router's navigate implementation. App binds it
13
+ * while rendering against the router context: an idempotent reference
14
+ * swap of a stable framework function, nothing more. */
15
+ export function bindNavigate(impl: (to: string) => void): void {
16
+ go = impl;
17
+ }
18
+
19
+ /** Attaches the shell's handlers and announces the boot route. The
20
+ * handler is app-lifetime; the unsubscribe return is for symmetry —
21
+ * main.tsx calls this once at boot and never detaches. */
22
+ export function attachRouterSignals(): () => void {
23
+ // The navigation command: dispatching arrives from anywhere (menu
24
+ // hotkeys, OK buttons, page Cancel buttons) and lands HERE, then the
25
+ // pageSlide choreography rides the pushState it triggers, exactly as
26
+ // a direct navigate() would.
27
+ const offNavigate = onSignal("app:navigate", ({ to }) => go(to));
28
+ // The boot announcement: the first route is live as soon as the
29
+ // shell attaches — before the first paint, no post-render effect.
30
+ // Every route change from here on arrives as the theme's
31
+ // "page:navigated" (the authoritative commit point it owns).
32
+ dispatchSignal("page:loaded", { path: location.pathname });
33
+ return offNavigate;
34
+ }
@@ -405,3 +405,23 @@ main.feef69-page {
405
405
  .window-body iframe:not(.embed) {
406
406
  max-width: 100%;
407
407
  }
408
+
409
+ /* Content tables: GFM pipe tables via remark-gfm (added to the Md
410
+ pipeline) — content files stay plain markdown. td/th are missing from
411
+ window.css's color list — color inherits fine, but UA styles leave the
412
+ cells plain (and th centered): give them terminal-style rules and
413
+ even, padded cells. */
414
+ .window-body table {
415
+ border-collapse: collapse;
416
+ width: 100%;
417
+ margin: var(--gap-size) 0;
418
+ font-size: inherit;
419
+ }
420
+
421
+ .window-body th,
422
+ .window-body td {
423
+ border: 1px solid var(--text-color);
424
+ padding: 0.25em 0.5em;
425
+ text-align: left;
426
+ vertical-align: top;
427
+ }
@@ -3,7 +3,6 @@ body main {
3
3
  display: flex;
4
4
  flex-direction: column;
5
5
  justify-content: center;
6
- min-height: 0;
7
6
  height: 100%;
8
7
  min-height: 100%;
9
8
  }
@@ -97,7 +96,7 @@ body:has([data-debug-bar]) .page {
97
96
 
98
97
  .menu-bar menu a {
99
98
  padding: 6px 12px;
100
- font-size: 14px;
99
+ font-size: 16px;
101
100
  white-space: nowrap;
102
101
  }
103
102
 
@@ -170,7 +169,7 @@ body:has([data-debug-bar]) .page {
170
169
 
171
170
  .minimized-menu-button {
172
171
  top: var(--menu-bar-height);
173
- font-size: 14px !important;
172
+ font-size: 16px !important;
174
173
  text-align: center;
175
174
  z-index: 98;
176
175
  }
@@ -29,7 +29,7 @@
29
29
  padding: 4px 8px;
30
30
  text-decoration: none;
31
31
  color: #000 !important;
32
- font-size: 16px;
32
+ font-size: 18px;
33
33
  font-family: "Tahoma", "MS Sans Serif", sans-serif;
34
34
  white-space: nowrap;
35
35
  transition: background-color 0.1s ease;
@@ -19,13 +19,13 @@
19
19
  the last row of content. */
20
20
  --debug-bar-height: 2.5em;
21
21
  --clippy-border-flash-color: transparent;
22
- font-size: 16px;
22
+ font-size: 18px;
23
23
  }
24
24
  /* Force title bar text to dark gray for readability */
25
25
  .title-bar-text,
26
26
  .title-bar-text a {
27
27
  color: #eee !important;
28
- font-size: 0.85rem;
28
+ font-size: 1rem;
29
29
  }
30
30
 
31
31
  :root.theme-border-flash .window,
@@ -410,16 +410,28 @@ form#form > label {
410
410
  box-sizing: border-box;
411
411
  }
412
412
 
413
- .resource-embed-scroll pre {
413
+ .resource-embed-scroll pre,
414
+ .window-body pre {
415
+ /* Code soft-wraps, but NOT the min-content-destroying way:
416
+ * pre-wrap + overflow-wrap:anywhere on a pre inside a flex column
417
+ * reports the box's min-content width as ~one character, so the
418
+ * window can shrink below the code's natural width and every
419
+ * line's last word dangles onto its own line. overflow-wrap:
420
+ * break-word keeps the full natural width as the minimum (the
421
+ * window is sized to the code's longest line) and only breaks a
422
+ * word when the code is genuinely wider than the window. */
414
423
  white-space: pre-wrap;
415
- overflow-wrap: anywhere;
424
+ overflow-wrap: break-word;
416
425
  word-break: break-word;
426
+ max-width: 100%;
427
+ box-sizing: border-box;
417
428
  }
418
429
 
419
- .window-body pre {
420
- white-space: pre-wrap;
421
- overflow-wrap: anywhere;
422
- word-break: break-word;
430
+ /* 98.css pins window text to its Win98 chrome size: .window{font-size:11px}.
431
+ Content windows read like documents — body text follows the root size,
432
+ the same 1rem the pre blocks above (98.css) already render at. */
433
+ .window-body {
434
+ font-size: 0.78rem;
423
435
  }
424
436
 
425
437
  /* xp.css sets very large heading sizes; keep markdown headings readable in content windows. */
@@ -5,6 +5,9 @@ import {
5
5
  type ThemeDefinition,
6
6
  } from "lightdni-jssas-toggle";
7
7
  import { playMinimizeClick } from "@/lib/audio";
8
+ import { windowBookmark } from "@/lib/history";
9
+ import { dispatchSignal } from "@/lib/signals";
10
+ import { scrollToId } from "@/lib/scrollTo";
8
11
  import { resolveDirection, type Direction } from "./direction";
9
12
  import "./pageSlide.css";
10
13
 
@@ -47,7 +50,7 @@ const themes: Record<Direction | "parked", ThemeDefinition> = {
47
50
  /** Initial load ONTO a hyperlinked window target: the slide theme is
48
51
  * fully installed (its class drives minimize folds and the navigation
49
52
  * hooks) but with a zero-distance entrance — nothing visibly moves
50
- * while the maximized overlay is the page's first paint. */
53
+ * while the reveal scrolls to the linked section. */
51
54
  parked: slide("parked", "0", "0"),
52
55
  };
53
56
 
@@ -88,8 +91,12 @@ function leaveGhost(): void {
88
91
  height: `${rect.height}px`,
89
92
  minHeight: "0",
90
93
  });
91
- const pageEl = main.querySelector<HTMLElement>(".page");
92
- const ghostPage = ghost.querySelector<HTMLElement>(".page");
94
+ const pageEl = main.matches(".page")
95
+ ? main
96
+ : main.querySelector<HTMLElement>(".page");
97
+ const ghostPage = ghost.matches(".page")
98
+ ? ghost
99
+ : ghost.querySelector<HTMLElement>(".page");
93
100
  if (pageEl && ghostPage) {
94
101
  // Page padding can depend on elements (debug bar) that unmount with the
95
102
  // route: freeze it on the ghost and ease the new page away from it.
@@ -153,7 +160,7 @@ function leaveGhost(): void {
153
160
  const leaving = bar.cloneNode(true) as HTMLElement;
154
161
  leaving.classList.add("page-slide-bar");
155
162
  // Layout rules key off this attribute; the clone must not keep them alive.
156
- leaving.removeAttribute("data-debug-bar");
163
+ delete leaving.dataset.debugBar;
157
164
  document.body.appendChild(leaving);
158
165
  // The live bar yields to the clone in the same frame — visibility,
159
166
  // not display, so the body padding rules keep reserving its row —
@@ -184,8 +191,10 @@ function leaveGhost(): void {
184
191
 
185
192
  let current = "";
186
193
  let originalPushState: History["pushState"] | null = null;
187
- /** Mutes the next transition's fold click: a window ✕ that navigates
188
- * closes with its own crunchy kick — no Click.ogg on top of it. */
194
+ let originalReplaceState: History["replaceState"] | null = null;
195
+ /** Mutes the next transition's fold click: the navigating window ✕
196
+ * declares its own Click.ogg through the bus (closeSounds) — no second
197
+ * click on top of the navigation fold. */
189
198
  let clickSuppressed = false;
190
199
 
191
200
  export function suppressNextSlideClick(): void {
@@ -199,6 +208,9 @@ const isMobileLayout = () => window.matchMedia("(max-width: 768px)").matches;
199
208
 
200
209
  function transition(to: string, hash: string): void {
201
210
  if (to === current) return;
211
+ // The committed navigation rides the signal bus as a notice —
212
+ // monitoring handlers subscribe; the choreography itself stays here.
213
+ dispatchSignal("page:navigated", { from: current, to });
202
214
  if (clickSuppressed) clickSuppressed = false;
203
215
  else playMinimizeClick();
204
216
  const direction = isMobileLayout()
@@ -219,48 +231,52 @@ function restartArrival(): void {
219
231
  const main = document.querySelector("main");
220
232
  if (!main) return;
221
233
  main.style.animation = "none";
222
- void main.offsetWidth;
234
+ // void main.offsetWidth;
223
235
  main.style.animation = "";
224
- const pageEl = main.querySelector<HTMLElement>(".page");
225
- if (pageEl) {
226
- pageEl.style.animation = "none";
227
- void pageEl.offsetWidth;
228
- pageEl.style.animation = "";
236
+ // The page element is main itself in the normalized shell (main.page):
237
+ // a nested .page resets separately, in whatever shape the document has.
238
+ const page = main.matches(".page")
239
+ ? null
240
+ : main.querySelector<HTMLElement>(".page");
241
+ if (page) {
242
+ page.style.animation = "none";
243
+ // void page.offsetWidth;
244
+ page.style.animation = "";
229
245
  }
230
246
  }
231
247
 
232
248
  const onPopState = () => {
249
+ const arrival = { path: location.pathname, hash: location.hash };
233
250
  if (location.pathname === current) {
234
- // Same-page history traversal only moves the hash: bring the
235
- // hyperlinked element into view (inside its scrolling window).
251
+ // Same-page history traversal only moves the shape of the URL:
252
+ // bring the hyperlinked element into view (inside its scrolling
253
+ // window) — and announce the RETURN, so holders of pre-departure
254
+ // state (the window store, same-path traversals never remount) can
255
+ // repair themselves.
236
256
  if (location.hash) scrollToHash(location.hash);
257
+ // A hash-free bookmarked destination names its section in STATE:
258
+ // the same landing rule.
259
+ else scrollToId(windowBookmark() ?? "");
260
+ dispatchSignal("page:returned", arrival);
237
261
  return;
238
262
  }
239
263
  transition(location.pathname, location.hash);
264
+ if (location.hash) scrollToHash(location.hash);
265
+ // A hash-free bookmarked return (the window departures' form — the
266
+ // entry names its section in STATE alone): land on it like any hash
267
+ // target. The reveal is the store's; the landing scroll is ours.
268
+ else scrollToId(windowBookmark() ?? "");
269
+ // History traversal onto another page keeps the same rule: a hashed
270
+ // window target lands on its element (the reveal is the store's),
271
+ // and the traversal is announced as a return.
272
+ dispatchSignal("page:returned", arrival);
240
273
  };
241
274
 
242
- /** Scrolls the hash element into view — inside its scrolling window
243
- * (a maximized window scrolls its own revealed content) or the page.
244
- * The element can mount after the route commit (lazy pages), hence the
245
- * deferred retries. */
275
+ /** Scrolls the hash element into view — the aim implementation lives in
276
+ * @/lib/scrollTo, shared with the window system's dismissal landings. */
246
277
  function scrollToHash(hash: string, attempts = 12): void {
247
278
  const id = decodeURIComponent(hash.slice(1));
248
- if (!id) return;
249
- const tick = () => {
250
- const el = document.getElementById(id);
251
- if (el) {
252
- // Maximized windows are viewport-fixed overlays; scrolling the page
253
- // behind them just resets the background while the overlay hides
254
- // it. The restored window scrolls itself to the hash element on
255
- // dismissal instead.
256
- if (!el.closest(".maximized-backdrop")) {
257
- el.scrollIntoView({ behavior: "smooth", block: "start" });
258
- }
259
- return;
260
- }
261
- if (attempts > 0) window.setTimeout(tick, 100);
262
- };
263
- tick();
279
+ scrollToId(id, attempts);
264
280
  }
265
281
 
266
282
  /**
@@ -273,28 +289,88 @@ export function enablePageSlide(): void {
273
289
  if (originalPushState || typeof document === "undefined") return;
274
290
  current = location.pathname;
275
291
  // Initial load ONTO a hyperlinked window target (#hash or a blog
276
- // ?post= the route maximizes): install the theme "parked" so the
277
- // entrance slide plays from nowhere — the maximized overlay is the
278
- // only visible first paint, and minimize folds / navigation hooks
279
- // stay functional. Plain loads slide in from the top as before.
292
+ // ?post= the route reveals): install the theme "parked" so the
293
+ // entrance slide plays from nowhere, then land the page on the target
294
+ // — the return-to-page choreography (the reveal is the window store's,
295
+ // the landing scroll is this theme's, like every hash navigation).
296
+ // Minimize folds / navigation hooks stay functional. Plain loads slide
297
+ // in from the top as before.
280
298
  const linkedWindowTarget =
281
- !!location.hash || new URLSearchParams(location.search).has("post");
299
+ !!location.hash ||
300
+ new URLSearchParams(location.search).has("post") ||
301
+ // A returned-to entry may name its section in STATE alone (the
302
+ // off-site bookmark is hash-free by design): that arrival is a
303
+ // landing on a target too — parked, reveal + scroll, nothing moves.
304
+ !!windowBookmark();
282
305
  applyDirection(linkedWindowTarget ? "parked" : "down");
306
+ if (linkedWindowTarget) {
307
+ if (location.hash) scrollToHash(location.hash);
308
+ // A hash-free bookmarked target (the off-site return's form): the
309
+ // entry names its section in STATE alone — land on it the same way
310
+ // the hash form lands.
311
+ else scrollToId(windowBookmark() ?? "");
312
+ }
283
313
 
284
314
  const original = history.pushState.bind(history);
285
315
  originalPushState = history.pushState;
316
+ /** Set inside the pushState wrapper when a same-path commit
317
+ * re-addresses the content: the announcement dispatches only after
318
+ * the original pushState has committed, so repair handlers read the
319
+ * NEW address. */
320
+ let samePathReaddress = false;
286
321
  history.pushState = (data, unused, url) => {
287
322
  if (url != null) {
288
323
  const target = new URL(url, location.href);
289
324
  if (target.pathname !== current) {
290
325
  transition(target.pathname, target.hash);
291
326
  if (target.hash) scrollToHash(target.hash);
292
- } else if (target.hash && target.hash !== location.hash) {
293
- // Same pathname, new hash: no page transition — scroll instead.
294
- scrollToHash(target.hash);
327
+ } else if (
328
+ (data as { window?: unknown } | null)?.window == null &&
329
+ (target.search !== location.search || target.hash !== location.hash)
330
+ ) {
331
+ // Same-path CONTENT re-address: the router pushed a query or
332
+ // hash that names a new target (?post=, #id) — announced AFTER
333
+ // the commit below, so the repair reads the new address. The
334
+ // window system's own anchor pushes carry the state bookmark
335
+ // and stay silent (they are UI entries, not content addresses).
336
+ samePathReaddress = true;
295
337
  }
338
+ // Pure same-path pushes without a re-address stay silent: they
339
+ // are UI history entries, NOT page arrivals — no landing scroll
340
+ // exists for them. Hash landings for real arrivals come from the
341
+ // boot branch, the popstate branches and hashchange.
296
342
  }
297
343
  original(data, unused, url);
344
+ if (samePathReaddress) {
345
+ samePathReaddress = false;
346
+ dispatchSignal("page:addressed", {
347
+ path: location.pathname,
348
+ hash: location.hash,
349
+ });
350
+ }
351
+ };
352
+ // The ALIAS re-land: a shorthand path (/addons) boots as its own
353
+ // document and the router commits the destination (<Navigate
354
+ // to="/wow#addons" replace>) with a replaceState — the only
355
+ // path-changing commit the pushState wrapper cannot see. It is not a
356
+ // traversal (nothing announces it; the fresh-arrival gate decides the
357
+ // store's landing by the referrer alone) — but the page must still be
358
+ // LANDED on the destination's hash element like every boot: aim the
359
+ // scroll at it (the retrying scrollToId absorbs the remount delay),
360
+ // and take over `current` so later pushes compare against the true
361
+ // destination path. Same-path replaceStates (the window system's
362
+ // bookmark writes) stay silent.
363
+ const originalReplaceState = history.replaceState.bind(history);
364
+ history.replaceState = (data, unused, url) => {
365
+ if (url != null) {
366
+ const target = new URL(url, location.href);
367
+ if (target.pathname !== current) {
368
+ current = target.pathname;
369
+ if (target.hash) scrollToHash(target.hash);
370
+ else scrollToId(windowBookmark() ?? "");
371
+ }
372
+ }
373
+ originalReplaceState(data, unused, url);
298
374
  };
299
375
  // Same-page hyperlinks to hash elements change the hash natively.
300
376
  window.addEventListener("hashchange", (event) =>
@@ -308,6 +384,8 @@ export function disablePageSlide(): void {
308
384
  if (!originalPushState) return;
309
385
  history.pushState = originalPushState;
310
386
  originalPushState = null;
387
+ if (originalReplaceState) history.replaceState = originalReplaceState;
388
+ originalReplaceState = null;
311
389
  window.removeEventListener("popstate", onPopState);
312
390
  applyTheme({}, { previousClassNames: [CLASS] });
313
391
  clearThemeVariables(VARIABLES);
@@ -28,9 +28,12 @@ html.theme-page-slide .page-slide-ghost {
28
28
  forwards;
29
29
  }
30
30
 
31
- /* The live <main> has an indefinite height, so its page sizes to content;
32
- the ghost has a fixed height and must not stretch the page to fill it. */
33
- html.theme-page-slide .page-slide-ghost > .page {
31
+ /* The live <main> has an indefinite height, so its page sizes to content
32
+ (a nested .page in the ghost's fixed-height main, or main itself — the
33
+ normalized shell makes main the page); the ghost must not stretch the
34
+ page to fill its box. */
35
+ html.theme-page-slide .page-slide-ghost > .page,
36
+ html.theme-page-slide .page-slide-ghost.page {
34
37
  height: auto;
35
38
  min-height: 0;
36
39
  }
@@ -70,7 +73,9 @@ html.theme-page-slide[data-page-slide] main:not(.page-slide-ghost) > .page {
70
73
  whole window is drawn the last stretch toward the measured fold point.
71
74
  Contents ride the squash, as in XP itself. */
72
75
  html.theme-page-slide .page-slide-ghost .page > .window,
73
- html.theme-page-slide .page-slide-ghost .page > .maximized-shell > .window {
76
+ html.theme-page-slide .page-slide-ghost .page > .maximized-shell > .window,
77
+ html.theme-page-slide .page-slide-ghost > .window,
78
+ html.theme-page-slide .page-slide-ghost > .maximized-shell > .window {
74
79
  transform-origin: bottom center;
75
80
  /* Linear, per preference: the top edge falls towards the taskbar line
76
81
  at a constant rate for the entire fold. */
@@ -141,8 +146,7 @@ html.theme-page-slide .page-slide-ghost .page-slide-placeholder-frame {
141
146
  html.theme-page-slide .window.window-minimize {
142
147
  z-index: 4001;
143
148
  transform-origin: bottom center;
144
- animation: window-minimize-exit var(--ps-minimize, 98ms) linear forwards
145
- !important;
149
+ animation: window-minimize-exit var(--ps-minimize, 98ms) linear forwards !important;
146
150
  }
147
151
 
148
152
  @keyframes window-minimize-exit {
@@ -151,8 +155,7 @@ html.theme-page-slide .window.window-minimize {
151
155
  100% offset the squashed sliver would rest exactly AT the bottom
152
156
  edge (the page drop that normally carries it away doesn't exist
153
157
  for a standalone dismissal). */
154
- transform: translateY(calc(var(--page-fold-dy, 80vh) + 100%))
155
- scaleY(0.06);
158
+ transform: translateY(calc(var(--page-fold-dy, 80vh) + 100%)) scaleY(0.06);
156
159
  }
157
160
  }
158
161
 
@@ -167,7 +170,15 @@ html.theme-page-slide[data-page-slide="parked"] main:not(.page-slide-ghost) {
167
170
  animation: none;
168
171
  }
169
172
 
170
- html.theme-page-slide[data-page-slide="parked"] main:not(.page-slide-ghost)
173
+ /* The parked "none" must also hold for the normalized shell (main.page),
174
+ whose combined entrance animation above declares at higher specificity
175
+ than the un-classed main rule: this later, equal-specificity rule wins
176
+ and keeps main transform-free — the maximized backdrop stays
177
+ viewport-anchored. */
178
+ html.theme-page-slide[data-page-slide="parked"]
179
+ main:not(.page-slide-ghost).page,
180
+ html.theme-page-slide[data-page-slide="parked"]
181
+ main:not(.page-slide-ghost)
171
182
  > .page {
172
183
  animation: none;
173
184
  }
@@ -0,0 +1,14 @@
1
+ /** The blog directory listing is served by build/blogDirsPlugin.ts as a
2
+ * virtual module: a live walk of public/blog/'s subdirectories. There is
3
+ * no snapshot file — the filesystem is the only source (recomputed on
4
+ * dev-server watch changes and at every build). */
5
+ declare module "virtual:blog-dirs" {
6
+ const blogDirs: {
7
+ directories: Array<{
8
+ path: string;
9
+ files: string[];
10
+ dirs: string[];
11
+ }>;
12
+ };
13
+ export default blogDirs;
14
+ }