@loadmap/react 0.6.0 → 0.8.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
@@ -68,7 +68,19 @@ export function App() {
68
68
 
69
69
  Every capacity says where it came from (`measured`, `estimated`, or a fit from measurements), and `± 30 %` turns
70
70
  each limit into a range. Add `scenarios` to compare designs, `growth` to turn multiples into dates, `expect` to fail
71
- a test when headroom is lost. The layout runs in a Web Worker; nothing loads it before the first diagram.
71
+ a test when headroom is lost. The layout runs in a Web Worker; nothing loads it before the first diagram. A page
72
+ without a bundler (from a CDN, or one self-contained HTML file) hands in its own: `elk={workerElk(…)}`, with
73
+ `@loadmap/react/elk.worker.js` to inline; https://jaim3r0jas.github.io/loadmap/without-a-bundler/ has both recipes.
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.
72
84
 
73
85
  A scenario, a story step or a control that changes the structure (more pods, more brokers) moves the diagram to it:
74
86
  what stays moves to its new place, what is new fades in. `transition={1.2}` sets the seconds it takes (default 0.8);