@loadmap/react 0.7.0 → 0.9.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.
package/README.md CHANGED
@@ -72,6 +72,16 @@ a test when headroom is lost. The layout runs in a Web Worker; nothing loads it
72
72
  without a bundler (from a CDN, or one self-contained HTML file) hands in its own: `elk={workerElk(…)}`, with
73
73
  `@loadmap/react/elk.worker.js` to inline; https://jaim3r0jas.github.io/loadmap/without-a-bundler/ has both recipes.
74
74
 
75
+ `theme="inherit"` follows the page's own light and dark switch (`data-theme="dark"` or `"light"`, or a `dark` or
76
+ `light` class, on `<html>`), and the system's while the page sets none; `auto` (the default) follows the system's
77
+ only. Inside a card of its own, `.card > .lm { --lm-pad: 0; --lm-root-bg: transparent }` drops the root's padding and
78
+ background (full screen keeps both); in a grid or a flex row, give it `min-width: 0`, since it sizes the diagram to
79
+ its width.
80
+
81
+ A `.loadmap` text draws with `<LoadmapSource source={text} name="shop.loadmap" />` from `@loadmap/react/source`: it
82
+ compiles when the text changes, passes on the options the definition declares (your props win), and while the text
83
+ does not compile shows its diagnostics as `loadmap check` prints them. It is the one entry that loads the compiler.
84
+
75
85
  A scenario, a story step or a control that changes the structure (more pods, more brokers) moves the diagram to it:
76
86
  what stays moves to its new place, what is new fades in. `transition={1.2}` sets the seconds it takes (default 0.8);
77
87
  0 cuts, and so does reduced motion. The load never moves it.
@@ -82,12 +92,16 @@ pans the diagram in its own box). Each compact panel opens whole over the diagra
82
92
  'controls']}` keeps only those (`LOADMAP_PANELS` lists them all: `verdict`, `live`, `limits`, `controls`, `headroom`,
83
93
  `compare`, `assumptions`). A switch beside Close, or the F key, turns full screen into **focus**: the diagram, the
84
94
  story and, of the panels listed, the verdict and the load slider. `fullScreenMode="focus"` opens full screen there
85
- (default `'panels'`). The story bar plays the story, each step for its `seconds`.
95
+ (default `'panels'`). The story bar's Play tells the story on the diagram: the whole diagram, a close-up on what each
96
+ step changes, the change, and the whole diagram again for the step's `seconds`, a short title on the board (the step's
97
+ `title`, or what it changes). The component that runs out first wears a ring that breathes while the story plays and
98
+ once it is past the target. With reduced motion the camera cuts and the ring holds still. `ref.playStory()` plays it
99
+ on the engine's clock, which `step()` advances.
86
100
 
87
101
  `useLoadmap` with `LoadmapRoot`, `Diagram`, `Verdict`, `Limits`, `Controls` and the others builds a page of your own
88
102
  layout from the same pieces. The diagram's Full screen takes the whole root: inside a `<div className="lm-side">`
89
103
  after the `Diagram`, your pieces become a box below it that scrolls on its own; a title, the `Scenarios` and the
90
104
  `Story` stay above the diagram, and the rest waits outside. The controller has the state: `lm.fullScreen`,
91
- `lm.toggleFullScreen()`, `lm.fullScreenMode`, `lm.storyPlaying`.
105
+ `lm.toggleFullScreen()`, `lm.fullScreenMode`, `lm.storyPlaying`, `lm.cue` (what the board says about the step played).
92
106
 
93
107
  Docs, live examples and the editor: https://jaim3r0jas.github.io/loadmap/ · MIT