@zkmake/three-meter 0.10.0 → 0.11.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
@@ -277,6 +277,29 @@ The resolved theme lands on `data-theme` of `.perf-hud` and `.perf-monitor`. To
277
277
  palette, override the `--perf-*` custom properties (`bg`, `fg`, `fg-dim`, `muted`, `row`,
278
278
  `border`, `accent`, `warn`, `shadow`) on those selectors. `warn` is the over-budget amber.
279
279
 
280
+ ## The dev-panel frame
281
+
282
+ The HUD's frame is `mountDevPanel` from `@zkmake/three-meter/ui`: the docked host, a card with a
283
+ brand label on top, and the drag / expand-compact / dim-on-leave discs. Other zkmake dev panels
284
+ (`@zkmake/three-textures`) mount through it too, so they all dock, wake, dim and theme the same way.
285
+ A tool of your own can use it:
286
+
287
+ ```ts
288
+ const panel = mountDevPanel({
289
+ brand: "my-tool",
290
+ label: "My tool",
291
+ content: myElement,
292
+ theme: new HudTheme("system"),
293
+ storageKey: "my-tool",
294
+ onToggle: () => myElement.classList.toggle("is-compact"),
295
+ });
296
+
297
+ panel.detail.textContent = "3 items"; // the brand row's right-hand slot
298
+ ```
299
+
300
+ The card is `.perf-hud__card`, holding `.perf-hud__brand` and your content (the HUD's is
301
+ `.perf-monitor`).
302
+
280
303
  ## Examples
281
304
 
282
305
  [`apps/three-meter-site`](https://github.com/zkmake/three-kit/tree/main/apps/three-meter-site) is what runs at [three-meter.pages.dev](https://three-meter.pages.dev/):