Liking cljdoc? Tell your friends :D

baredom.components.x-welcome-tour.model

Pure functions for the x-welcome-tour orchestrator component. Positioning, cutout geometry, connector path computation, and attribute normalisation — no DOM or side effects.

Pure functions for the x-welcome-tour orchestrator component.
Positioning, cutout geometry, connector path computation, and
attribute normalisation — no DOM or side effects.
raw docstring

allowed-connectorscljs

source

arrow-stylecljs

(arrow-style final-placement arrow-size target-rect popover-rect)

Compute inline style for the CSS arrow element so it points at the centre of the target. target-rect and popover-rect are viewport-relative maps with :x :y :width :height. The arrow slides along the popover edge to aim at the target centre, clamped so it stays inside the popover. Returns a map of CSS property strings.

Compute inline style for the CSS arrow element so it points at the
centre of the target. target-rect and popover-rect are viewport-relative
maps with :x :y :width :height. The arrow slides along the popover edge
to aim at the target centre, clamped so it stays inside the popover.
Returns a map of CSS property strings.
sourceraw docstring

attr-connectorcljs

source

attr-countercljs

source

attr-done-labelcljs

source

attr-dotscljs

source

attr-next-labelcljs

source

attr-opencljs

source

attr-prev-labelcljs

source

attr-skip-labelcljs

source

attr-stepcljs

source

clamp-stepcljs

(clamp-step step total)

Clamp step index to valid range [0, total-1].

Clamp step index to valid range [0, total-1].
sourceraw docstring

complete-detailcljs

(complete-detail steps-completed)
source

compute-cutoutcljs

(compute-cutout target-rect padding radius)

Compute cutout rect from a target DOMRect and padding/radius values. Returns {:x :y :width :height :rx :ry}.

Compute cutout rect from a target DOMRect and padding/radius values.
Returns {:x :y :width :height :rx :ry}.
sourceraw docstring

compute-positioncljs

(compute-position placement
                  anchor-rect
                  popover-size
                  viewport-size
                  connector-type)

Compute viewport-relative position for the tour popover. Tries preferred placement, then opposite, then cross-axis placements. connector-type controls the gap: line/curve get extra distance so the connector path is visible. Returns {:x :y :final-placement}.

Compute viewport-relative position for the tour popover.
Tries preferred placement, then opposite, then cross-axis placements.
connector-type controls the gap: line/curve get extra distance so the
connector path is visible.
Returns {:x :y :final-placement}.
sourceraw docstring

connector-anchor-pointscljs

(connector-anchor-points target-rect popover-rect final-placement)

Compute connector anchor points on target and popover edges. Returns {:target-point {:x :y} :popover-point {:x :y}}.

Compute connector anchor points on target and popover edges.
Returns {:target-point {:x :y} :popover-point {:x :y}}.
sourceraw docstring

connector-path-dcljs

(connector-path-d connector-type target-point popover-point final-placement)

Returns SVG path d attribute string for the connector. connector-type is "line" or "curve". Returns nil for "arrow" or "none".

Returns SVG path d attribute string for the connector.
connector-type is "line" or "curve". Returns nil for "arrow" or "none".
sourceraw docstring

counter-textcljs

(counter-text step total)

Format the step counter string, e.g. '2 / 5'.

Format the step counter string, e.g. '2 / 5'.
sourceraw docstring

default-connectorcljs

source

default-done-labelcljs

source

default-next-labelcljs

source

default-prev-labelcljs

source

default-skip-labelcljs

source

event-completecljs

source

event-schemacljs

source

event-skipcljs

source

event-startcljs

source

event-step-changecljs

source

first-step?cljs

(first-step? step)

Return true when the current step is the first.

Return true when the current step is the first.
sourceraw docstring

last-step?cljs

(last-step? step total)

Return true when the current step is the last.

Return true when the current step is the last.
sourceraw docstring

normalizecljs

(normalize {:keys [open? step-raw connector-raw prev-label-raw next-label-raw
                   done-label-raw skip-label-raw counter? dots?]})

Normalise raw attribute inputs into a stable view-model map.

Input keys: :open? boolean :step-raw string | nil :connector-raw string | nil :prev-label-raw string | nil :next-label-raw string | nil :done-label-raw string | nil :skip-label-raw string | nil :counter? boolean :dots? boolean

Output keys: :open? boolean :step number :connector string :prev-label string :next-label string :done-label string :skip-label string :counter? boolean :dots? boolean

Normalise raw attribute inputs into a stable view-model map.

Input keys:
  :open?           boolean
  :step-raw        string | nil
  :connector-raw   string | nil
  :prev-label-raw  string | nil
  :next-label-raw  string | nil
  :done-label-raw  string | nil
  :skip-label-raw  string | nil
  :counter?        boolean
  :dots?           boolean

Output keys:
  :open?       boolean
  :step        number
  :connector   string
  :prev-label  string
  :next-label  string
  :done-label  string
  :skip-label  string
  :counter?    boolean
  :dots?       boolean
sourceraw docstring

observed-attributescljs

source

offset-for-connectorcljs

(offset-for-connector connector-type)

Return the gap between the target and popover based on connector type. Line and curve connectors need more space so the path is visible.

Return the gap between the target and popover based on connector type.
Line and curve connectors need more space so the path is visible.
sourceraw docstring

parse-connectorcljs

(parse-connector s)

Normalise a raw connector attribute string. Falls back to default.

Normalise a raw connector attribute string. Falls back to default.
sourceraw docstring

parse-stepcljs

(parse-step s)

Parse step attribute to a non-negative integer. Defaults to 0.

Parse step attribute to a non-negative integer. Defaults to 0.
sourceraw docstring

property-apicljs

source

skip-detailcljs

(skip-detail step)
source

step-change-detailcljs

(step-change-detail step previous-step)
source

tag-namecljs

source

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