@luscious-garden/aster-core
v0.1.1
Published
Portable icon definitions and render-neutral contracts for Aster.
Readme
@luscious-garden/aster-core
Dependency-free ES2022 ESM contracts and immutable construction for portable, render-neutral icons and collections. Definitions are data, not renderers or mutable registries.
Usage
pnpm add @luscious-garden/aster-coreimport { Collection, Icon } from "@luscious-garden/aster-core";
const Disc = Icon.define({
identity: { namespace: "example", name: "disc" },
viewBox: { minX: 0, minY: 0, width: 24, height: 24 },
nodes: [{ kind: "circle", cx: 12, cy: 12, radius: 4 }],
metadata: {
displayName: "Disc",
rtl: "preserve",
presentation: { defaults: { fill: "currentColor" }, overrides: [] },
deprecated: false,
},
});
const InterfaceIcons = Collection.define({
identity: { name: "interface-icons" },
icons: { disc: Disc },
metadata: { displayName: "Interface Icons" },
});The collection exposes the same definition through InterfaceIcons.icons.disc and its ordered
members view. Construction
owns validation and immutability guarantees.
Documentation
- Package guide: exports, contracts and feature guides.
- Version history: changes and migrations.
Licence
Software and documentation follow ISC.
