Bloccs.Web.HexGlyph (bloccs_web v0.1.0)

Copy Markdown View Source

The bloccs hexagon notation as inline SVG.

One function component, hex_glyph/1, renders the canonical glyph for a node (the atoms Bloccs.Introspect.glyph/1 returns) so the dashboard and the marketing notation stay a single visual language. Live state (:idle | :running | :ok | :failed) is a CSS class on the outer <g>, flipped by an assign — no client animation framework.

Brand tokens (kept in sync with marketing/notation-icons): fill #1a1326, stroke #7c37ab, accent #c98bff, mark #fafafa.

Summary

Functions

Render the hexagon glyph for glyph at optional x/y (for placement inside a larger topology <svg>). Falls back to the plain :node glyph for an unknown atom so the viewer never crashes on a glyph it doesn't know.

Every glyph this component can render.

Functions

hex_glyph(assigns)

Render the hexagon glyph for glyph at optional x/y (for placement inside a larger topology <svg>). Falls back to the plain :node glyph for an unknown atom so the viewer never crashes on a glyph it doesn't know.

Attributes

  • :glyph — one of [:node, :node_effect, :source, :sink, :split, :batch, :join, :throttle, :delay] (required)
  • :state:idle | :running | :ok | :failed (default :idle)

  • :label — accessible label / <title> (default: the glyph name)
  • :x, :y — translate the glyph within a parent SVG (default 0)
  • :size — rendered px (default 120)

Attributes

  • glyph (:atom) (required)
  • state (:atom) - Defaults to :idle.
  • label (:string) - Defaults to nil.
  • x (:integer) - Defaults to 0.
  • y (:integer) - Defaults to 0.
  • size (:integer) - Defaults to 120.

hex_glyph_svg(assigns)

Attributes

  • glyph (:atom) (required)
  • state (:atom) - Defaults to :idle.
  • label (:string) - Defaults to nil.
  • size (:integer) - Defaults to 120.

known()

@spec known() :: [atom()]

Every glyph this component can render.