@hakam-aldeen-kh/blix 0.3.2 → 0.3.3

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
@@ -589,6 +589,96 @@ structural typing means you just pass your store and client.)
589
589
  Passing neither still gives you a fully working capture log; you only lose the
590
590
  two features that need a live handle on the app.
591
591
 
592
+ ### Viewing payloads
593
+
594
+ Every payload pane has a format switch. The choice is remembered, so you pick
595
+ it once rather than per request.
596
+
597
+ | Format | Answers |
598
+ | --- | --- |
599
+ | **Tree** | *What's in here?* Collapsible and searchable; a collapsed subtree costs one row, so it stays fast on multi-megabyte responses. |
600
+ | **Table** | *How do these records compare?* A grid, offered when the payload is a list of records or a keyed map. Sparse and surplus columns are hidden with a count. |
601
+ | **JSON** | *What exactly came back?* Raw and syntax-coloured, with a fold caret on every object and array — plus **Collapse all**, which leaves the top-level keys readable and their contents folded. |
602
+ | **YAML** | *What shape is this?* Indentation instead of punctuation, and multi-line strings — stack traces, SQL — shown as text rather than escapes. |
603
+ | **Text** | *It isn't JSON.* An HTML error page, a CSV body, a proxy's plain-text response. |
604
+
605
+ **Copy gives you what you're looking at**: Table copies CSV, YAML copies YAML.
606
+
607
+ The switch is on every payload pane — request and response bodies, realtime
608
+ frames, the encrypted envelope, Redux actions, and both Redux state views:
609
+
610
+ - **State** shows the live store, scoped by a **slice picker**. Slices the
611
+ selected action wrote to are marked with a dot, so "what does `cart` look
612
+ like now" is one click rather than a hunt through a collapsed root object.
613
+ - **Diff** keeps its `+ / − / ±` rows as the default view and adds the other
614
+ five alongside. **Table** is the natural one — a diff *is* `path | op |
615
+ before | after` — and Tree lets you open up a `before` that was an object,
616
+ which the one-line rows could only ever summarise. Copying the rows view
617
+ gives you a plain-text diff for a ticket, not JSON.
618
+
619
+ Right-click any request for **Copy as cURL** or **Copy as fetch** — the latter
620
+ pastes straight into the browser console, with the body as an editable object
621
+ literal rather than a pre-serialized string.
622
+
623
+ ### Exporting the log
624
+
625
+ The ◐ toolbar's neighbour, the download button, offers six formats and a scope
626
+ toggle — **Shown** (what the current section and filters leave visible) or
627
+ **All**. It defaults to Shown, with both counts on the control, so an export
628
+ says what it will contain before you pick a format.
629
+
630
+ | | Format | For |
631
+ | --- | --- | --- |
632
+ | Tool | **HAR** | Chrome DevTools, Charles, Insomnia, Postman — with the decrypted bodies. HTTP entries only. |
633
+ | | **JSON** | Everything captured: frames, Redux diffs, timings. |
634
+ | | **NDJSON** | One entry per line — pipe it into `jq`. |
635
+ | Person | **Markdown** | A table plus failure bodies, copied to the clipboard for an issue, a PR or Slack. |
636
+ | | **CSV** | One row per entry, no bodies — sort and count in a spreadsheet. Opens as UTF-8 in Excel. |
637
+ | Shell | **cURL script** | Every request in order, runnable against another environment. |
638
+
639
+ Captured `Authorization` headers are masked, so cURL and fetch output carries a
640
+ placeholder rather than a working token — use **Replay** for a real re-run.
641
+
642
+ ### Themes
643
+
644
+ Twelve themes, under the ◐ button in the toolbar:
645
+
646
+ | | Theme | |
647
+ | --- | --- | --- |
648
+ | Dark | **Midnight** | Deep blue-black — the default |
649
+ | | **Carbon** | True black, high contrast; for OLED displays |
650
+ | | **Nord** | Muted arctic blues |
651
+ | | **Tokyo Night** | Deep indigo, soft neon |
652
+ | | **One Dark** | Atom's classic slate |
653
+ | | **Mocha** | Catppuccin — gentle pastels |
654
+ | | **Dracula** | Vivid purples and pinks |
655
+ | | **Gruvbox** | Warm retro browns and amber |
656
+ | Light | **Daylight** | Clean white — the light default |
657
+ | | **GitHub** | The light theme you already read all day |
658
+ | | **Latte** | Catppuccin — soft pastel light |
659
+ | | **Solar** | Warm paper, low blue light |
660
+
661
+ **Hovering a theme applies it to the panel behind the menu**, so you can see a
662
+ real payload in it before committing; moving away puts back the one you had.
663
+ Arrow keys preview the same way.
664
+
665
+ The default is **System**: the panel reads the light/dark class off `<html>`
666
+ and paints Midnight or Daylight to match, re-checking whenever your app's theme
667
+ changes. Picking a specific theme overrides that. The choice is stored with the
668
+ panel's other preferences and survives a reload.
669
+
670
+ The panel never inherits your app's styling — it portals outside every stacking
671
+ context and ships its own palettes, so nothing you do to your own theme can
672
+ distort it. Themes are complete rather than partial: every colour the panel
673
+ paints, down to the JSON syntax highlighting and the waterfall bars, comes from
674
+ the active theme. Each palette is checked against WCAG contrast targets — 4.5:1
675
+ for anything read as text, 3:1 for badges and quiet chrome — which is why a few
676
+ of the ported palettes differ by a shade from the originals in the slots used
677
+ for dense monospace.
678
+
679
+ There is no API for adding your own; a theme is ~20 colours in
680
+ `src/ui/themes/themes.ts` if you are working from source.
681
+
592
682
  ### `dbName` — when you need it
593
683
 
594
684
  The panel persists its log to IndexedDB so it survives a reload. IndexedDB is