Liking cljdoc? Tell your friends :D

dev.zeko.stube.halos

Development overlay — Seaside-style halos.

Off by default; activated when (a) the server was started with :halos? true and (b) the conversation carries :conv/halos? true (set by the shell handler when the URL has ?halos=1).

Three layers live here:

  1. Hiccup decorationdecorate-root merges data-stube-iid / data-stube-type into every instance's outer hiccup attrs. The kernel calls this once per render when halos are active.
  2. Side-panel hiccuppanel-hiccup builds the inspector content fetched by halos.js from <base>/halos/<cid>/panel. The panel is plain server-rendered HTML; no SSE / no extra conv.
  3. REPL helperstree, instance, history, where. Re-exported by dev.zeko.stube.core.

No I/O lives here. The http layer turns these values into responses.

Development overlay — Seaside-style halos.

Off by default; activated when (a) the server was started with
`:halos? true` and (b) the conversation carries `:conv/halos? true`
(set by the shell handler when the URL has `?halos=1`).

Three layers live here:

1. **Hiccup decoration** — [[decorate-root]] merges
   `data-stube-iid` / `data-stube-type` into every instance's outer
   hiccup attrs. The kernel calls this once per render when halos are
   active.
2. **Side-panel hiccup** — [[panel-hiccup]] builds the inspector
   content fetched by `halos.js` from `<base>/halos/<cid>/panel`.
   The panel is plain server-rendered HTML; no SSE / no extra conv.
3. **REPL helpers** — [[tree]], [[instance]], [[history]],
   [[where]]. Re-exported by `dev.zeko.stube.core`.

No I/O lives here. The http layer turns these values into responses.
raw docstring

decorate-rootclj

(decorate-root hiccup inst)

Merge halo data-attrs onto the outer attribute map of hiccup so the client overlay can find the instance root.

Three shapes show up in practice:

  • [:tag {…} …children…] — common case; merge into the attr map
  • [:tag …children…] (no attrs) — splice a fresh attr map in
  • anything else — leave untouched (the overlay simply skips this root)
Merge halo data-attrs onto the outer attribute map of `hiccup` so the
client overlay can find the instance root.

Three shapes show up in practice:

* `[:tag {…} …children…]`         — common case; merge into the attr map
* `[:tag …children…]` (no attrs)  — splice a fresh attr map in
* anything else                   — leave untouched (the overlay simply
                                     skips this root)
sourceraw docstring

historyclj

(history conv)

Summarise :conv/history as [{:idx :touched :top-iid :top-type}].

Summarise `:conv/history` as `[{:idx :touched :top-iid :top-type}]`.
sourceraw docstring

inspect-summaryclj

(inspect-summary c)

Compact summary of a conversation value, used by s/inspect to pretty-print at the REPL. Pure: returns plain data, no I/O.

Compact summary of a conversation value, used by `s/inspect` to
pretty-print at the REPL.  Pure: returns plain data, no I/O.
sourceraw docstring

instanceclj

(instance conv iid)

Return the instance map for iid.

Return the instance map for `iid`.
sourceraw docstring

instance-history-dataclj

(instance-history-data conv iid)

State of iid across each historical conversation snapshot, oldest first, plus the current state as the final entry. Snapshots where the instance did not yet (or no longer) exist are skipped.

State of `iid` across each historical conversation snapshot, oldest
first, plus the current state as the final entry. Snapshots where the
instance did not yet (or no longer) exist are skipped.
sourceraw docstring

panel-hiccupclj

(panel-hiccup conv {:keys [iid tab]})

Return the hiccup for one panel fetch. tab is one of :tree :instance :html :history (defaults to :tree); iid is the currently-selected instance (defaults to the top of the stack).

Return the hiccup for one panel fetch. `tab` is one of
`:tree :instance :html :history` (defaults to `:tree`); `iid` is the
currently-selected instance (defaults to the top of the stack).
sourceraw docstring

treeclj

(tree conv)

Pretty-print the conversation's component tree. Returns the tree data so it stays REPL-inspectable.

Pretty-print the conversation's component tree. Returns the tree
data so it stays REPL-inspectable.
sourceraw docstring

tree-dataclj

(tree-data conv)

Plain-data view of the conversation's instance tree. Order: top of stack first, embedded children indented under their parent.

Each node carries:

  • :slots — fixed :instance/children slots (sorted by key)
  • :keyed-slots:instance/keyed-slots content; each entry has :slot + :children (ordered [{:key … :child …}])
Plain-data view of the conversation's instance tree. Order: top of
stack first, embedded children indented under their parent.

Each node carries:

* `:slots`        — fixed `:instance/children` slots (sorted by key)
* `:keyed-slots`  — `:instance/keyed-slots` content; each entry has
                    `:slot` + `:children` (ordered `[{:key … :child …}]`)
sourceraw docstring

whereclj

(where type-kw)

Return the registered source location for component type-kw ({:file … :line …} if available), captured by the defcomponent macro at definition time.

Return the registered source location for component `type-kw`
(`{:file … :line …}` if available), captured by the `defcomponent`
macro at definition time.
sourceraw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close