The behaviour every icon set implements, and the registry of known sets.
Each set is identified by an atom (:lucide, ...) that names its component
function (Iconex.lucide/1), its config key (config :iconex, lucide: [...]),
its data file (priv/sets/lucide.json) and its sprite symbol prefix
(#lucide-house).
Data files
mix iconex.download SET fetches a set's upstream data and writes it in a
normalized form shared by every set:
{"set": "lucide", "version": "1.47.0",
"icons": {"house": {"viewBox": "0 0 24 24",
"nodes": [["path", {"d": "..."}], ...]}}}Nodes are [tag, attrs] or [tag, attrs, children] with string attribute
values.
Adding an icon set
Summary
Callbacks
The URL of the upstream data for version.
Where users can look up the set's icon names.
Converts the decoded upstream data to %{name => icon}.
The npm package the set's data is downloaded from.
Presentation attributes placed on every <symbol> of the set.
Functions
Known set ids.
The module implementing set id.
Known sets, keyed by id.
Reads a normalized data file written by mix iconex.download.
Types
Callbacks
The URL of the upstream data for version.
@callback docs_url() :: String.t()
Where users can look up the set's icon names.
Converts the decoded upstream data to %{name => icon}.
@callback npm_package() :: String.t()
The npm package the set's data is downloaded from.
Presentation attributes placed on every <symbol> of the set.
Functions
Known set ids.
The module implementing set id.
Known sets, keyed by id.
Reads a normalized data file written by mix iconex.download.