rshow 0.0.4 → 0.0.5

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/dist/main.js CHANGED
@@ -13,7 +13,7 @@ import process from "node:process";
13
13
  // src/version.ts
14
14
  import { readFileSync } from "node:fs";
15
15
  import { fileURLToPath } from "node:url";
16
- var VERSION = true ? "0.0.4" : versionFromPackage();
16
+ var VERSION = true ? "0.0.5" : versionFromPackage();
17
17
 
18
18
  // src/binary.ts
19
19
  var ASSET_MANIFEST = "assets.json";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rshow",
3
- "version": "0.0.4",
3
+ "version": "0.0.5",
4
4
  "description": "Publish static artifacts to rshow",
5
5
  "license": "MIT",
6
6
  "homepage": "https://rslib.github.io/rshow",
@@ -47,8 +47,13 @@ Copy this checklist into the reply and tick it as you go.
47
47
  The only exceptions are `/_themes/...` and `/_data/...`.
48
48
  - Link the theme, never copy it.
49
49
  The stylesheet links and `mode.js` in the head all carry the same `<name>@<n>` version.
50
- - Override tokens in one `:root` block, five declarations at most.
51
- No selectors, no rules, no `!important`.
50
+ - The theme is the base, not a cage.
51
+ A page may carry one inline `<style>` block with its own classes and its own layouts when the content needs them.
52
+ Own CSS takes colour, type and space from the theme tokens with `var(--...)`, so light, dark, print and a theme swap keep working.
53
+ A hard-coded colour sits inside a figure only.
54
+ - Own CSS adds a class and never restyles a theme class globally.
55
+ Scope a new deck layout as `.slide.<name>` and scope a page part under its own class name, and use no `!important`.
56
+ - A token override still goes in one `:root` block, with no limit on the declarations.
52
57
  - Keep the script and the styles inline.
53
58
  Add a framework only when the page needs one.
54
59
  - `connect-src` is `'self'`.
@@ -64,9 +69,10 @@ Copy this checklist into the reply and tick it as you go.
64
69
  Print `[PLACEHOLDER]` and say so in the footer.
65
70
  - The look is IBM Carbon on IBM Plex, and every colour has one job.
66
71
  `themes/DESIGN.md` in the rshow repo holds the system, the type scale and the layout set.
67
- - Fixed templates carry decks, reports, posters, project pages and dashboards, so the sections are set and the content is the work.
72
+ - Documented templates carry decks, reports, posters, project pages and dashboards, so the markup is documented and the content is the work.
73
+ The markup is the starting point, and a page adds its own parts with its own classes when it needs them.
68
74
  - Guided kits carry mockups, sketches and TUIs, so the kit gives you a frame, a floor and a checklist and the drawing is the work.
69
- Starting a kit at its highest fidelity is the same mistake as decorating a fixed template.
75
+ Starting a kit at its highest fidelity is the same mistake as decorating a documented template.
70
76
 
71
77
  ## Audience
72
78
 
@@ -11,7 +11,7 @@
11
11
  - Checks
12
12
 
13
13
  A results dashboard is the page a reader works in rather than reads: a filter bar, a summary, small multiples and the table of rows behind them.
14
- It is a fixed template, so the four blocks are set and the data is the work.
14
+ It is a documented template, so the four blocks are the starting point and the data is the work, and a page may add its own parts with its own classes.
15
15
  `dashboard.css` sets the look and `dashboard.js` reads the data, draws the chart and keeps the view in the link.
16
16
 
17
17
  ## What it is for
@@ -13,15 +13,17 @@
13
13
  - Look at it
14
14
 
15
15
  A mockup is a drawing of a product that does not exist yet, so it follows that product and not rshow.
16
- Decks, reports, posters, project pages and dashboards are fixed templates, while a mockup is a guided kit: the kit gives you a frame, a floor and a checklist, and the drawing is the work.
16
+ Decks, reports, posters, project pages and dashboards are documented templates, while a mockup is a guided kit: the kit gives you a frame, a floor and a checklist, and the drawing is the work.
17
17
  `themes/MOCKUPS.md` in the rshow repo holds the kit itself, and this file is what to do with it.
18
18
 
19
19
  ## A guided kit
20
20
 
21
- - Start in `wire` every time, because a tidy drawing invites a room to argue about the colour of a button instead of the order of the steps.
22
- - Move to `sketch` when the room is too polite about a finished looking picture.
23
- - Move to a platform skin only when the look of the product is the decision.
21
+ - Pick the skin from the question.
22
+ - Use `wire` when the flow or the order of the layout is the question, because a tidy drawing invites a room to argue about the colour of a button instead of the order of the steps.
23
+ - Use `sketch` for an early rough idea, or when the room is too polite about a finished looking picture.
24
+ - Use a platform skin, or `tui` and `terminal` for a terminal, when the look is the decision or the person asks for the look.
24
25
  - Keep the inventing to layout, spacing, hierarchy and the order of steps.
26
+ Own CSS inside a screen is allowed for the part the kit lacks, and it takes colour from the `--mk-*` and theme tokens so a skin swap and dark mode still read.
25
27
  Data, copy, names and prices are placeholders and say so.
26
28
 
27
29
  ## Markup
@@ -71,9 +71,11 @@ Every link carries the same version on purpose, because a mixed version renders
71
71
  ```
72
72
 
73
73
  `page.css` gives you `lede`, `table`, `num-cell`, `muted`, `small` and `mono`, plus the heading, list, figure, table and code rules.
74
- Use them and keep your own CSS to the one `:root` block.
74
+ The theme is the base, not a cage.
75
+ Use these classes first, and add a class of your own in one inline `<style>` block when the page needs a part the theme does not carry.
76
+ Own CSS takes colour, type and space from the tokens with `var(--...)`, and it never restyles a theme class globally.
75
77
  There is no card class, no label class and no number tile.
76
- A page that needs one is usually a page with a table it has not written yet.
78
+ A page that needs one writes it, and a page that needs only a table writes the table.
77
79
 
78
80
  The theme carries both modes, so the same page reads on white and on g100 with nothing in the page itself.
79
81
 
@@ -96,8 +98,8 @@ Print is always light, whatever the screen was.
96
98
 
97
99
  ## Token overrides
98
100
 
99
- Override a token instead of writing rules.
100
- Five declarations cover most restyling.
101
+ Override a token instead of restyling a theme class.
102
+ A few declarations cover most restyling, and there is no limit on how many.
101
103
 
102
104
  ```html
103
105
  <style>:root{
@@ -11,7 +11,7 @@
11
11
  - Checks
12
12
 
13
13
  A poster is one sheet that prints from the browser, in the same theme as a page, a report and a project page.
14
- It is a fixed template, so the sheet, the columns and the print are set and the blocks are the work.
14
+ It is a documented template, so the sheet, the columns and the print are set and the blocks are the starting point, and a page may add its own parts with its own classes.
15
15
  `poster.css` sets the look and `poster.js` sets the scale, the QR code and the one page print.
16
16
 
17
17
  ## The sheet
@@ -11,7 +11,7 @@
11
11
  - Checks
12
12
 
13
13
  A project page is the landing page of a paper, and it uses the same theme as a page, a report and a poster.
14
- It is a fixed template, so the sections are set and the content is the work.
14
+ It is a documented template, so the sections are the starting point and the content is the work, and a page may add its own parts with its own classes.
15
15
  `project.css` sets the look and `project.js` does one thing, the copy button on the BibTeX entry.
16
16
 
17
17
  A project page is not a project.
@@ -11,7 +11,7 @@
11
11
  - Checks
12
12
 
13
13
  A sketch is a hand drawn figure from Excalidraw, read in the page and edited in place.
14
- It is a guided kit rather than a fixed template: `sketch.css` is the bar around the canvas and `sketch.js` is the canvas.
14
+ It is a guided kit rather than a documented template: `sketch.css` is the bar around the canvas and `sketch.js` is the canvas.
15
15
  Use it for an architecture drawing, a flow of systems or an idea that should look unfinished.
16
16
 
17
17
  ## When a sketch
@@ -6,8 +6,8 @@ description: Load before you build or revise a talk, deck or presentation. Load
6
6
  # rshow slides
7
7
 
8
8
  A deck is a folder with one `index.html` in it, published to `https://art.example.com/<slug>/`.
9
- It links the deck half of a published theme, so the folder holds no CSS, no font and no script of its own.
10
- The theme does the layout, and the deck only picks a layout per slide.
9
+ It links the deck half of a published theme, so the folder holds no copy of the theme, no font and no script of its own.
10
+ The theme does the layout, and the deck picks a layout per slide or adds one of its own in an inline `<style>` block.
11
11
  The look is IBM Carbon on IBM Plex, and `themes/DESIGN.md` in the rshow repo holds the whole system.
12
12
 
13
13
  ## 1. Outline first
@@ -23,6 +23,7 @@ A topic on its own is not a slide.
23
23
  - Open with a `title` slide and close with a `title` slide or a `big-number` that says what to do next.
24
24
  - Put one `section` slide before each move in the argument.
25
25
  - Give the evidence slides the layout that carries the claim: `figure`, `chart`, `table` or `figure-two` for a research or systems talk.
26
+ - Name the layout of each line in the outline, including any layout the deck adds for itself.
26
27
  - In a research talk the figure, the plot and the table are the hero.
27
28
  The title says what the evidence shows and the type stays out of the way.
28
29
  - Say which slide carries the headline number, and put the number in it once.
@@ -71,11 +72,12 @@ Replace `<name>@<n>` with the `theme` value that `rshow config <dir>` prints, wh
71
72
 
72
73
  The three stylesheet links and the script carry the same `<n>` on purpose, because a mixed version renders somewhere between two designs.
73
74
  The deck needs no `mode.js`, because `deck.js` reads the same key and `t` does the same work.
74
- Override a token in one `:root` block after the theme links when the deck needs its own accent, and keep it to a few declarations.
75
+ Override a token in one `:root` block after the theme links when the deck needs its own accent, with no limit on the declarations.
76
+ An inline `<style>` block after the theme links may also carry a layout of the deck's own, as section 3 says.
75
77
 
76
78
  ## 3. Layouts
77
79
 
78
- Every slide is a `<section class="slide ...">`, and the second class is one of twelve.
80
+ Every slide is a `<section class="slide ...">`, and the second class is one of twelve or one the deck adds.
79
81
 
80
82
  - `title` for the opener, `section` for a divider and `statement` for one claim set large.
81
83
  - `bullets` for a takeaway title and at most five short points.
@@ -89,8 +91,11 @@ A bullets slide puts its points under the title at 28px with a 1.4 line, five at
89
91
  A figure slide starts at the top and lets the figure take the rest.
90
92
  A figure is `<figure>` with a `figcaption`, and two figures are `<div class="pair">` with two `<figure>` inside.
91
93
  A big number is `<p class="value">` plus `<p class="caption">`, and the value is a short statement with the figure inside it, never a bare digit.
92
- Do not invent a thirteenth layout and do not write the layout CSS yourself, because the theme owns it and a copy drifts.
93
- [layouts](reference/layouts.md) holds one markup example per layout. Read it before you write a slide that is not `title`, `bullets` or `section`.
94
+ The twelve layouts are a starting set and not a ceiling.
95
+ Invent a layout when none of them carries the claim, such as an annotated figure, a figure with a callout, a diagram built in HTML or SVG, a timeline, a before and after or a comparison grid.
96
+ Give it a short class name and put its CSS in the deck's own `<style>` block, scoped to `.slide.<name>` and taken from the tokens.
97
+ Vary the rhythm: do not run more than three text slides (`two-col` or `bullets`) in a row, and turn a text slide that explains a figure into an annotated figure.
98
+ [layouts](reference/layouts.md) holds one markup example per layout and one worked example of your own layout. Read it before you write a slide that is not `title`, `bullets` or `section`.
94
99
 
95
100
  ## 4. Notes and steps
96
101
 
@@ -99,7 +104,8 @@ Do not invent a thirteenth layout and do not write the layout CSS yourself, beca
99
104
  It is what you say, not what the room reads.
100
105
  - Press `n` for the notes window, which also names the next slide.
101
106
  - Press `p` for the presenter view: the current slide, the next slide, the notes and an elapsed timer, kept in step with the deck.
102
- - Put `class="step"` on an `<li>` to reveal it one press later.
107
+ - Put `class="step"` on any element inside a slide to reveal it one press later, because `deck.js` selects every `.step` in the slide.
108
+ That is how a diagram builds up in steps.
103
109
  - Every step is a reveal, so a slide with four steps needs four presses.
104
110
  Five is the ceiling before the slide drags.
105
111
  - Press `f` for fullscreen and arrows or space to advance.
@@ -132,5 +138,6 @@ Publish again after a fix instead of making a second slug, because the link in t
132
138
  - Never use a hairline rule as decoration.
133
139
  - Never use Inter, Space Grotesk, Geist, Fraunces or Instrument Serif as the gesture.
134
140
  - Never use gradient text, glass, a large shadow or an emoji.
135
- - Never animate a slide in, because a reveal is the only motion a deck needs.
141
+ - Never animate a slide in for decoration.
142
+ Motion is allowed when it explains something, such as a step that builds a diagram or a short transition that shows a change.
136
143
  - Never invent a number and never present example data without saying so in the caption.
@@ -14,9 +14,11 @@
14
14
  - two-col
15
15
  - quote
16
16
  - big-number
17
+ - your own layout
17
18
 
18
19
  One markup example per layout, all inside `<main class="deck">`.
19
20
  Every slide carries `slide` plus one layout class, and the layout class goes second.
21
+ The twelve are a starting set: a deck may add a layout of its own when none of them carries the claim.
20
22
  Nothing sits above a title: no kicker, no label, no number.
21
23
 
22
24
  A sparse slide (`title`, `section`, `statement`, `quote`, `big-number`, `bullets`) is centred a little above the middle of the 1280x720 canvas, so the air sits under the block instead of closing it in.
@@ -249,3 +251,51 @@ The unit belongs in the statement and the source goes under it.
249
251
  ```
250
252
 
251
253
  A number you cannot measure is `[PLACEHOLDER]` until it is real, and a number that stands for an example says so in the source line.
254
+
255
+ ## your own layout
256
+
257
+ A layout of your own takes a short class name and sits second on the slide, in the same slot as the twelve.
258
+ Pick the shape the claim needs, such as an annotated figure, a figure with a callout, a diagram built in HTML or SVG, a timeline, a before and after or a comparison grid.
259
+ Its CSS goes in one inline `<style>` block after the theme links, scoped to `.slide.<name>`, with colour, type and space from the tokens.
260
+ Here one figure carries three callouts, and they stack under it below 640px.
261
+
262
+ ```html
263
+ <style>
264
+ .slide.annotated .annotated-fig { position: relative; margin: 0; }
265
+ .slide.annotated .annotated-fig img { display: block; width: 100%; }
266
+ .slide.annotated .callout {
267
+ position: absolute;
268
+ max-width: 30%;
269
+ padding: var(--space-03) var(--space-04);
270
+ background: var(--layer-01);
271
+ border: 1px solid var(--border-strong);
272
+ color: var(--fg);
273
+ font-size: 18px;
274
+ line-height: 1.4;
275
+ }
276
+ .slide.annotated .callout.one { top: 6%; left: 3%; }
277
+ .slide.annotated .callout.two { top: 40%; right: 3%; }
278
+ .slide.annotated .callout.three { bottom: 6%; left: 30%; }
279
+ @media (max-width: 640px) {
280
+ .slide.annotated .callout {
281
+ position: static;
282
+ max-width: none;
283
+ margin: var(--space-03) 0 0;
284
+ padding: 0;
285
+ border: 0;
286
+ }
287
+ }
288
+ </style>
289
+
290
+ <section class="slide annotated">
291
+ <h2>The tail of the log is what a restart replays</h2>
292
+ <figure class="annotated-fig">
293
+ <img src="write-path.svg" alt="A log appended before the map is updated, with three stages marked.">
294
+ <p class="callout one">The append lands first.</p>
295
+ <p class="callout two">The map follows it.</p>
296
+ <p class="callout three">A crash replays the tail.</p>
297
+ <figcaption>A restart loses nothing after step 2.</figcaption>
298
+ </figure>
299
+ <aside class="notes"><p>Trace the three callouts in order.</p></aside>
300
+ </section>
301
+ ```
@@ -409,9 +409,11 @@
409
409
  <p>Every layout the theme ships, one frame each. A frame is lazy loaded, so
410
410
  the page stays light on a phone, and the link under it opens the same example
411
411
  full size. The deck, the page, the report, the project page, the poster and
412
- the dashboard are fixed templates with a documented markup. The mockups, the
413
- sketches, the terminals and the tuis are guided kits: they give an agent a
414
- frame, a floor and a set of rules, and the drawing is the work.</p>
412
+ the dashboard are documented templates: the markup is the starting point, and
413
+ a page may add its own layouts and classes on top, with colours from the
414
+ tokens. The mockups, the sketches, the terminals and the tuis are guided kits:
415
+ they give an agent a frame, a floor and a set of rules, and the drawing is the
416
+ work.</p>
415
417
 
416
418
  <div class="layouts">
417
419
  <article class="layout">