rikiki-deck 0.4.0 → 0.5.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.
@@ -1,6 +1,6 @@
1
1
  # Rikiki · LLM reference
2
2
 
3
- This reference documents rikiki v0.4.0.
3
+ This reference documents rikiki v0.5.0.
4
4
 
5
5
  Exhaustive, self-consistent reference for authoring valid **rikiki** decks. Every
6
6
  tag, attribute, slot, and token below was derived from the source in this repo
@@ -129,10 +129,20 @@ Chevron styling tokens: `--deck-root-nav-color`, `--deck-root-nav-bg`,
129
129
  | `nav` | `2d` | Opt into 2D (chapter/slide) navigation · see above |
130
130
  | `mouse-nav` | *(absent)* / `none` / subset of `click wheel arrows aux` | Mouse navigation config · see above |
131
131
  | `transition` | `slide` (default-ish) / `slide-up` / `slide-down` / `slide-right` / `fade` / `zoom` / `flip` | Deck-wide slide transition (see table below) |
132
+ | `fluid` | *(boolean)* | Fluid rendering · the deck fills its box and reflows like a web page (no logical canvas, no zoom-to-fit scale, no letterbox). Default is zoom-to-fit · see Rendering & sizing below |
133
+ | `width` / `height` | integers (default `1920` / `1080`) | Logical canvas size for zoom-to-fit · only the aspect ratio and the rem baseline depend on these. Ignored in `fluid` mode |
132
134
  | `autoplay` | integer ms (e.g. `8000`) | Auto-advance every N ms; pauses on hover, resets on any manual nav. `0`/absent = off |
133
135
  | `loop` | *(boolean)* | With `autoplay`, wraps from the last slide back to the first |
134
136
  | `swipe` | *(boolean)* | Pointer-driven horizontal swipe (touch + mouse): a swipe ≥ 60 px advances / goes back |
135
137
 
138
+ **Rendering & sizing.** By default a deck renders into a fixed logical canvas
139
+ (`width`×`height`, 1920×1080 by default) scaled uniformly to fit the host box,
140
+ so a slide's layout is identical at any window size and the deck is letterboxed
141
+ when the aspect differs. Set `fluid` to opt out: the deck then fills its box and
142
+ reflows like a web page. Either mode is embed-safe · a `<deck-root>` placed
143
+ inside a larger document scales to (or fills) its own container and never
144
+ touches the host page's scroll or typography.
145
+
136
146
  **Transition values** (deck-wide via `transition="…"` on `<deck-root>`, or
137
147
  per-slide via `data-transition="…"` on a slide host). When unset, the effective
138
148
  default is `fade`:
package/llms.txt CHANGED
@@ -5,7 +5,7 @@
5
5
  > stylesheet, then the component bundle, then write a `<deck-root>` wrapping
6
6
  > `deck-*` slide elements. No build step to author or run a deck.
7
7
 
8
- This reference documents rikiki v0.4.0.
8
+ This reference documents rikiki v0.5.0.
9
9
 
10
10
  The framework is opinionated:
11
11
 
package/package.json CHANGED
@@ -1,7 +1,8 @@
1
1
  {
2
2
  "name": "rikiki-deck",
3
- "version": "0.4.0",
3
+ "version": "0.5.0",
4
4
  "description": "A tiny Lit Web Components framework for technical presentations · zero-build for consumers, TypeScript for contributors.",
5
+ "author": "Cédric Chariere Fiedler <cedric@siliceum.com>",
5
6
  "homepage": "https://rikiki.tordu-jardin.fr",
6
7
  "repository": {
7
8
  "type": "git",
@@ -39,7 +40,7 @@
39
40
  "docs/llms"
40
41
  ],
41
42
  "scripts": {
42
- "build": "node build-vendor.mjs && node build.mjs && node build-standalone.mjs && tsc --emitDeclarationOnly",
43
+ "build": "node build-vendor.mjs && node build.mjs && node build-standalone.mjs && tsc --emitDeclarationOnly -p tsconfig.build.json",
43
44
  "vendor": "node build-vendor.mjs",
44
45
  "watch": "node build.mjs --watch",
45
46
  "typecheck": "tsc --noEmit",
@@ -48,9 +49,16 @@
48
49
  "deck": "node build/vite-deck.mjs",
49
50
  "deck:example": "node build/vite-deck.mjs decks/example/deck.config.js",
50
51
  "test": "vitest run",
51
- "bump": "node scripts/bump-version.mjs"
52
+ "test:e2e": "playwright test",
53
+ "test:smoke": "playwright test --grep @smoke",
54
+ "lint": "biome check src scripts",
55
+ "format": "biome format --write src scripts",
56
+ "bump": "node scripts/bump-version.mjs",
57
+ "prepublishOnly": "npm run build && npm test"
52
58
  },
53
59
  "devDependencies": {
60
+ "@biomejs/biome": "^2.4.16",
61
+ "@playwright/test": "^1.60.0",
54
62
  "esbuild": "^0.24.0",
55
63
  "lit": "^3.3.3",
56
64
  "marked": "^12.0.2",
package/themes/rikiki.css CHANGED
@@ -177,7 +177,8 @@
177
177
  --rik-font-mono: 'Space Mono', 'JetBrains Mono', ui-monospace, monospace;
178
178
 
179
179
  /* Typography · body scale · modular ratio 1.25 (major third) from 1rem.
180
- html root-size is `clamp(14px, 2.35vh, 42px)` so rems scale with viewport.
180
+ html root-size is constant (`canvas-h × 0.0235` ≈ 25px); the deck-root
181
+ transform scales the whole canvas to fit, so rems never touch the viewport.
181
182
  New `--rik-text-*` aliases follow a documented t-shirt scale; the
182
183
  historical `--rik-font-size-*` names map to the same values for back-compat. */
183
184
  --rik-text-2xs: 0.64rem; /* 1 / 1.25^2 */
@@ -277,14 +278,10 @@
277
278
  *, *::before, *::after { box-sizing: border-box; }
278
279
  body, h1, h2, h3, h4, p, ul, ol, li, blockquote, pre, table, td, th,
279
280
  figure, dl, dd { margin: 0; padding: 0; }
280
- html { font-size: clamp(14px, 2.35vh, 42px); }
281
- /* Fixed-viewport decks (<deck-root fixed>) anchor the root font-size to the
282
- logical canvas height instead of the window, so every rem-based size scales
283
- with the letterboxed stage rather than the screen · no reflow off-ratio. */
284
- html:has(deck-root[fixed]) {
285
- font-size: calc(min(100vh, 100vw * var(--deck-canvas-h, 1080) / var(--deck-canvas-w, 1920)) * 0.0235);
286
- }
287
- html, body { width: 100%; height: 100%; overflow: hidden; background: var(--rik-surface-page); }
281
+ /* The rem baseline and the no-scroll reset are injected globally by deck-root
282
+ (theme-independent · see _injectGlobals). The theme only owns the page surface
283
+ and the type below. */
284
+ html, body { background: var(--rik-surface-page); }
288
285
  body { font-family: var(--rik-font-sans); color: var(--rik-text-default); }
289
286
 
290
287
  ::selection { background: var(--rik-selection__bg); color: var(--rik-selection__text); }
@@ -236,14 +236,10 @@
236
236
  *, *::before, *::after { box-sizing: border-box; }
237
237
  body, h1, h2, h3, h4, p, ul, ol, li, blockquote, pre, table, td, th,
238
238
  figure, dl, dd { margin: 0; padding: 0; }
239
- html { font-size: clamp(14px, 2.35vh, 42px); }
240
- /* Fixed-viewport decks (<deck-root fixed>) anchor the root font-size to the
241
- logical canvas height instead of the window, so every rem-based size scales
242
- with the letterboxed stage rather than the screen · no reflow off-ratio. */
243
- html:has(deck-root[fixed]) {
244
- font-size: calc(min(100vh, 100vw * var(--deck-canvas-h, 1080) / var(--deck-canvas-w, 1920)) * 0.0235);
245
- }
246
- html, body { width: 100%; height: 100%; overflow: hidden; background: var(--rik-surface-page); }
239
+ /* The rem baseline and the no-scroll reset are injected globally by deck-root
240
+ (theme-independent · see _injectGlobals). The theme only owns the page surface
241
+ and the type below. */
242
+ html, body { background: var(--rik-surface-page); }
247
243
  body { font-family: var(--rik-font-sans); color: var(--rik-text-default); }
248
244
 
249
245
  ::selection { background: var(--rik-selection__bg); color: var(--rik-selection__text); }