WireKit v2.0.0
Major release. First publicly-cut tag after v1.6.3, aggregating every change since. Two breaking changes (both in ### Changed): custom Pushery\ implementations must add three new methods to satisfy the expanded interface, AND <x-wirekit:: inline-padding tiers now read from the --padding-wk-x-* token family instead of --space-wk-* so a container nested in <x-wirekit:: inherits the same content-edge spine. Developers using only the built-in ChartJsAdapter or the new Apex, and developers using <x-wirekit:: with default padding values, see no behavioral change beyond a 0.5-rem horizontal alignment correction. Every other change is additive and back-compatible.
Added
- Optional ApexCharts chart adapter alongside the existing Chart.js adapter. Switch with one line in
config/:wirekit. php 'charts' => ['library' => 'apexcharts']. Same<x-wirekit::Blade tag for both libraries; zero breaking change. ApexCharts unlocks 9 chart types Chart.js does not ship natively — candlestick, boxplot, range-bar, range-area, heatmap, treemap, funnel, radial-bar, sparkline. Dedicatedchart> dist/adapter bundle (~2 KB gzip glue, no ApexCharts library code; the developer installswirekit-apex. js apexchartsvia npm). Note: ApexCharts is not MIT-licensed — the free Community License covers organizations under $2M USD annual revenue; Commercial License required above. WireKit ships only the adapter glue (MIT). See docs/components/chart.md#license-apexcharts-only for the full terms. <x-wirekit::— NEW first-class component. Inline trend sparkline (axis-less line chart) for KPI strips and dashboard cells. Six props (sparkline> data/trend/inline/height/scope). Auto-detects trend from first-vs-last data and tints green / red / muted accordingly; manualtrend="up|down|neutral"override available. Inline mode renders at surrounding text height (1.25em / 4rem width); block mode at configurable height (default 2.5rem). Delegates to<x-wirekit::so both adapters render correctly — ApexCharts uses native sparkline mode, Chart.js falls back to a plain line.chart type="sparkline"> <x-wirekit::— NEW component for multi-axis dashboards. Each dataset declares its ownchart-mixed> type(line / bar / column / area) plus an optionalyAxisIDfor multi-axis configurations. Both adapters consume the per-dataset type field natively — Chart.js via the per-datasettypefield, ApexCharts viaseries[].type.wireStreamprop on<x-wirekit::for real-time data updates. Subscribe a chart to a Livewire-emitted event and append each fired payload via the library's imperative API (chart> chart.for Chart.js /update('none') chart.for ApexCharts).appendData() wire(default) FIFO-trims atStream Mode="strict" wireStreamCappoints (default 100);wiregrows unbounded.Stream Mode="stream" annotationsprop on<x-wirekit::for vertical lines / horizontal regions / point callouts. ApexCharts has annotations built-in; Chart.js requireschart> chartjs-plugin-annotation(the Alpine factory emits a console.warn when annotations are supplied but the plugin is missing — graceful degradation).- Smooth dark-mode preset transitions on chart re-theming (~250 ms ease-out). Both adapters interpolate colors during
.darktoggle instead of snapping. Collapsed to instant underprefers-reduced-motion: reduce. - Two new chart-system docs subhierarchies on docs.wirekit.app:
/components/(full Chart.js demo set — bar / line / area / pie-doughnut / scatter-bubble / radar-polar / advanced / theming) andcharts-chartjs/ /components/(full ApexCharts demo set — line / area / bar / column / range-bar / pie-donut / radial-bar / radar / scatter-bubble / heatmap / treemap / candlestick / boxplot / funnel / timeline / sparklines / annotations / streaming / mixed / motion / theming). Every page ships realistic seed data drawn from B2B SaaS, e-commerce, DevOps, finance, marketing domains.charts-apex/ wirekit:install --apex-license=community|commercial|oemflag. Records the developer's license tier intoconfig/wirekit. php charts.after printing the License Notice once at install time. Suppresses theapex_ license wirekit:doctorreminder forcommercialandoemtiers.wirekit:doctorApexCharts checks. Detectsapexchartsnpm package presence, validates the active license tier, confirmsdist/is published.wirekit-apex. js wirekit-apex.jsregistered as publishable under both thewirekit-scriptsandwirekit-assetstags. Runningphp artisan vendor:publish --tag=wirekit-assetsnow copies the adapter glue topublic/alongside the other JS bundles. The route fallback atvendor/ wirekit/ wirekit-apex. js /wirekit/also works for setups that prefer route-based serving over publishing. Eliminates the manualwirekit-apex. js cp vendor/.../dist/step that ApexCharts adopters previously had to run after everywirekit-apex. js public/ vendor/ wirekit/ composer update.<x-wirekit::— NEW primitive in the reading family. Horizontal sticky-strip TOC sibling toreading-toc> reading-spine. Same auto-build-from-headings + IntersectionObserver active-section model, different rendered shape (a flat row of links across the top or bottom of the article container). Use case: marketing landing pages with 3-4 anchored sections (Hero, Features, Pricing, FAQ) where a vertical sidebar feels excessive. Seven props (target,levels,position,offset,hideBelow,flush,scope). Defaults tolevels="2"for landing-page flat structure; mobile-hidden viahideBelow="sm"since narrow viewports cannot host a horizontal strip without overflow. Theflushprop zeroes the first link's left-edge padding and the last link's right-edge padding so the visible text aligns flush with the strip's content edges (use when the TOC sits directly under<x-wirekit::orbrand-bar> <x-wirekit::and the developer wants the first link on the same vertical content-edge spine as the surrounding brand text and h2 headings). Realmain> <a href="#section-id">links inside a<nav aria-label="Page sections">landmark — keyboard-navigable + screen-reader native.prefers-reduced-motion: reducecollapses smooth-scroll to instant. Reuses spine's--reading-spine-color-idle/-activefor theme consistency; adds 5 layout-specific tokens (--reading-toc-bg/-padding-y/-padding-x/-gap/-link-max-width) plus 2 color aliases.<x-wirekit::— NEW navigation primitive. Page-chrome wrapper for the canonical "logo + tagline + actions" header pattern. Three named slots:brand-bar> brand(typically a<x-wirekit::primitive),brand> tagline(secondary muted text),actions(right-anchored sign-in / theme-toggle / account-widget content viamargin-left: auto). Props:as(header|nav),divider(bottom|none),padding(none/sm/md/lg/xl),sticky(pins totop: 0during scroll with an opaque background fallback). Carries the content-edge spine viapadding="lg"reading from--padding-wk-x-lg, so the brand visible-text aligns with<x-wirekit::,main padding="lg"> <x-wirekit::, and the article h2 headings below on the same vertical X-coordinate — out of the box, no custom CSS.reading-toc flush> <x-wirekit::— NEW prop on the existing component.prose :density> comfortable(default) keeps the long-form-article heading scale (h2 mt = 2.5 rem for generous section breaks, h1 = 1.875 rem).compacttightens for marketing pages (h2 mt = 0.75 rem, h1 one type-scale tier smaller, p mb = 0.5 rem). Eliminates the need to override prose typography with developer-side.my-section h2 { margin: ... }rules when the prose lives inside a tight marketing layout. Defaultcomfortablekeeps backward-compatible rendering.<x-wirekit::— opt-in toc toggle. Defaults toreading-shell :toc="true"> falsein every density preset (comfortable / compact / minimal). Marketing landing pages explicitly opt in via:toc="true" :spine="false"; blog posts and docs pages keep the spine sidebar.- Marketing Landing TOC recipe at
/recipes/— sibling to long-form-article. Demonstrates the canonical Hero / Features / Pricing / FAQ landing-page pattern with the new sticky TOC strip, plus themarketing-landing-toc offsetprop pattern for layouts with a fixed nav above the strip. - Long-form Article recipe at
/recipes/— canonical Medium / Substack-style article layout: reading-progress bar at the top, reading-spine sidebar on the right, reading-bookmark resume pill, reading-meta time-to-read. Demonstrates the full reading-* family in one composition, both via thelong-form-article <x-wirekit::sugar wrapper and via direct primitive composition for power-user customization.reading-shell> - Documentation Reader recipe at
/recipes/— documentation-style article shell with reading-progress bar, dense-section reading-spine, fixed-nav offset on the TOC strip, reading-bookmark across multi-page-session reads. Shows the docs-rhythm pattern (heading-scale + dense per-paragraph code blocks) alongside the same reading-* primitives.documentation-reader <x-wirekit::— NEW primitive in the reading family. Every-item density overview of a scrollable container, with two rendering modes:reading-minimap> mode="stripes"(default) — every item matched byitemSelectorrenders as a 1–2 px stripe at proportional vertical position.itemupgrades to per-paragraph rectangles whose height tracks the source item's natural height (skeleton-style content texture).Style="block" mode="rendered"— code-editor-style abstract content canvas. Walks every text-bearing node viaTreeWalker, gets per-rendered-line rects viaRange., draws each as a rectangle on a DPR-aware canvas. Per-element-type color palette (h1–h6 each its own alpha tier, code indigo, table rose, blockquote slate-bolder, image amber, WireKitget Client Rects() wk-*components emerald, prose / default slate-muted). 13--reading-minimap-color-{h1..h6,code,table,blockquote,prose,wirekit,image,default}tokens for full re-theming without JS.- Translucent viewport-overlay rectangle tracks the host's visible region; click stripe → smooth-scroll target so item is centered (instant under
prefers-reduced-motion: reduce); drag overlay → pan host scroll position with browser-scrollbar-matched translation; hover stripe (non-touch) → tooltip following the cursor with the item label. - Two canonical use cases: long-form article density-overview (sibling to
reading-spine) and sidebar navigation density-overview. - 5000-tag silent fallback to stripe mode on very long articles. No DOM clone in rendered mode → no parse step → no surface for HTML-injection vectors.
<x-wirekit::— Medium-style inline annotations. Opt-in mode that injects smallreading-meta perParagraph> <span class="wk-reading-meta-paragraph">N min</span>annotations immediately before each<p>in the target with at leastparagraphwords (default 30). Annotations show estimated remaining-time FROM that paragraph onward, re-computed on scroll.Min Words aria-hidden="true"on every annotation — canonical SR text remains the total/remaining display. Default off; opt-in.<x-wirekit::— theme-reactive fill mode. Falls back toreading-progress variant="auto"> currentColorwhen the developer hasn't set--reading-progress-fill— useful for embedded contexts (iframes, browser extensions) where the bar should match the surrounding text color. Joins the canonical 6-value variant set (primary | neutral | success | warning | danger | info).<x-wirekit::preset prop. Three values (reading-shell density> comfortable|compact|minimal) adjust the shell's per-primitive defaults: progress-bar height, spine expand mode, which primitives render by default. Per-primitive toggles (:spine="false"etc.) win over the density preset.- 14 new design tokens for the reading- family*: 1 on
reading-progress(--reading-progress-fill), 7 on the newreading-minimap(width, stripe-height, stripe-gap, color-idle, color-active, viewport-bg, viewport-border), 2 onreading-metaperParagraph mode (paragraph-color, paragraph-spacing). All themeable in:root {}. <x-wirekit::composesstat> animate(counter count-up) withanimateIn(entrance reveal). The Blade template emits an outer wrapper that carries the entrance reveal while the inner element keeps the counter handler — the two scopes layer cleanly. Single-flag usages render byte-identical.<x-wirekit::andcta> <x-wirekit::accept thefooter> animateInprop. Both marketing primitives now match the existinganimateInsurface on<x-wirekit::,card> <x-wirekit::,feature> <x-wirekit::, and others. Passinghero> animate(or any of the 11 base presets) wiresIn="slide-up" <x-wirekit::semantics inline without an extra wrapper element. Honorsreveal> prefers-reduced-motion: reduce.staggerprop on<x-wirekit::andfeature-grid> <x-wirekit::. When set on the wrapper and an entrance preset is configured on the children, each child's animation fires with an incremental delay — produces a clean cascade instead of every card landing at once. Boolean form uses a 75ms step (stats> stagger); integer form overrides for custom rhythm (:stagger="125"). Pure CSS via:nth-childrules with an index cap at 8 to bound delay on long lists; collapses to 0 under reduced motion. Zero JS bundle impact.delayprop on<x-wirekit::. Holds the entrance for a beat before it begins — useful for sequencing cards or letting a hero-section heading land before the supporting copy follows. Accepts five named tokens (reveal> none,sm,md,lg,xl) mapping to themeable CSS variables, or a raw integer in milliseconds for one-offs. Composed via inlineanimation-delayon the existingwk-animate-{preset}class — no JS plugin change needed. Collapses to0msunderprefers-reduced-motion: reduce.- Five new motion-delay tokens in
dist/:wirekit. css --motion-wk-delay-none(0ms),--motion-wk-delay-sm(75ms),--motion-wk-delay-md(150ms),--motion-wk-delay-lg(300ms),--motion-wk-delay-xl(500ms). All developer-overridable in:root {}. - CSS class
.wk-staggerplus eight:nth-childrules and a cap-at-8 index ceiling. Drives thestaggerprop on feature-grid and stats. Reduced-motion override zeroes per-child delays inside the existing@media (prefers-reduced-motion: reduce)block. wirekit:doctorthirteenth check —:rootvs.darkcolor-token symmetry. The doctor now reads the developer'sresources/, extracts thecss/ app. css :root {}and.dark {}blocks, and emits a warning when--color-wk-*tokens are declared in one block but missing from the other. Asymmetric color tokens produce theme drift the developer sees as "looks wrong in dark mode" without an obvious cause.<x-wirekit::— viewport-pinned reading-progress indicator for long-form articles. Bar (default) or dot (reading-progress> indicator="dot") variants; both fill 0 → 100% on scroll using compositor-only properties (transform: scaleX/stroke-dasharray). Fivevariantcolors, threeheighttokens (sm/2px,md/3px,lg/5px),showAfterscroll threshold,target=selector,segmentschapter markers,milestonesevents (wirekit:reading-progress:milestoneAlpine dispatch fired ONCE per session at 25 / 50 / 75 / 100% boundaries).role="progressbar"+ dynamicaria-valuenow. Zero-KB bundle impact.<x-wirekit::— sidebar mini-TOC that auto-builds from page headings. Pins to the right edge at md+ breakpoints; tracks scroll position viareading-spine> Intersection; expands on hover or focus. ConfigurableObserver target=,levels=,position=,expand=(hover/focus/always/always-md),offset=. Real anchor links so navigation works without JS. Five opt-in extensions:numbered,fillSections,backToTop,expand="always-md", and awirekit:reading-spine:section-changedevent. Filter slot composition pattern. Bundle impact: ~600 bytes gzip.<x-wirekit::— persists scroll position toreading-bookmark> localStoragewhile reading; surfaces a "Resume reading where you left off?" pill on return-visit when conditions are met (previous-session dwell time ≥minDwellSeconds, scroll moved pastthreshold * scrollHeight). Cross-tab consistency viastorageevent.try/catchwrapping every storage op — silently degrades on private-browsing / quota-exceeded. Requiredkeyprop (typically"article-{slug}").<x-wirekit::— small text element showingreading-meta> ~12 min read(initial estimate) and optionally~5 min remaining(live-tracking on scroll). Skips non-prose nodes (pre,code,figure,figcaption,img,picture,svg,[data-language]). CJK-aware: when more than 40% of text is CJK ideographs, falls back to character-based estimation with a configurablecjkbaseline (default 500).Chars Per Minute wpmclamps to≥ 50;totalMinutesfloors to 1.role="status" aria-live="polite".<x-wirekit::— composition wrapper that rendersreading-shell> <x-wirekit::+reading-progress> <x-wirekit::+reading-spine> <x-wirekit::+reading-bookmark> <x-wirekit::+reading-minimap> <x-wirekit::around the slot content in one tag. Mirrors thereading-meta> <x-wirekit::"one tag, full UX" pattern. Per-component opt-out viaapp-shell> :progress="false"etc. Forwards every documented child prop via flat surface.- CSS variable tokens for the reading- family in
dist/:* three height tokens for the bar (wirekit. css --reading-progress-height-{sm,md,lg}), the dot diameter (--reading-progress-dot-size), seven spine layout / color tokens, three bookmark pill tokens, two reading-meta tokens. @media print { display: none !important }rule for every reading-* primitive — only the article body prints, not the reading chrome.prefers-reduced-motion: reducegating for the entire reading- family* in the global@media (prefers-reduced-motion: reduce)block.<x-wirekit::— NEW companion primitive. Renders an icon-button that walks the closestreplay-button> [data-replay-target]ancestor and re-mounts it (Alpine.initTree) so itsx-data="wirekit/ counter / chart-motion fires again. Standardizes the "re-play this animation" affordance every animation-capable component carries via theAnimate(...)" data-replayable="true"contract — developers can place the button explicitly anywhere alongside a primitive, or rely on docs.wirekit.app's preview chrome auto-injecting it. Two props:label(buttonaria-label, default"Replay"),scope(named personalization scope).replayableprop on<x-wirekit-chart>. Opt INTO the docs.wirekit.app↻ Replaybutton surface by emittingdata-replayable="true"on the chart root. Set it explicitly when the entrance animation is worth re-watching (bar-grow / line-trace / slice-sweep on/components/), or rely on the auto-detect path: whenevercharts-apex/ motion wireStreamis bound (every streaming chart on/components/), the attribute is emitted automatically. Back-compat preserved: callers who already passedcharts-apex/ streaming data-replayableraw via the attribute bag continue to work — the Blade view skips its own emission to avoid duplication.
Changed
Pushery\interface expanded from 4 → 7 methods. Net-new:WireKit\ Contracts\ ChartAdapter name()/rendersTo()/supported. ExistingTypes() scripts()/normalizeData()/default/Options() alpineunchanged. Developers using only built-in adapters see no impact (bothComponent() ChartJsAdapterandApexship the new methods). Custom adapter implementations need to add the three new methods to satisfy the interface. BREAKING for developers with a hand-writtenCharts Adapter ChartAdapterimplementation.<x-wirekit::inline-padding moved fromcontainer> --space-wk-*to--padding-wk-x-*.padding="sm|md|lg|xl"now reads from the--padding-wk-x-*content-edge spine instead of the--space-wk-*block-rhythm scale. Resolves a silent 0.5 rem horizontal drift when nesting<x-wirekit::insidecontainer padding="lg"> <x-wirekit::— both now share the same content-edge X-coordinate. Developers who depended on the wider previous value (e.g.main padding="lg"> padding="lg"was 1.5 rem, now 1 rem) should bump topadding="xl"(also 1.5 rem) for unchanged visual output. BREAKING for developers relying on the exact pixel value of container's horizontal padding.<x-wirekit::inline-padding fixed. Was applyingsidebar> --padding-wk-y-sm(the y-axis token) on all four edges; now correctly splits intopx-[var(--padding-wk-x-sm)] py-[var(--padding-wk-y-sm)]and moves the inter-itemgapto--space-wk-sm(the canonical gap token). Sidebar items at the inboard edge now align with<x-wirekit::andheader> <x-wirekit::rendered alongside on the same vertical content-edge spine. Back-compat: visual change is a few-pixel adjustment to the sidebar's internal padding; no API change.main> - Color-prop unification across
<x-wirekit::,message> <x-wirekit::,alert> <x-wirekit::, andcallout> <x-wirekit::. Every component that exposes a color prop now accepts the same canonical six-value set (progress> primary, neutral, success, warning, danger, info).progressadoptsprimaryas the canonical name; the historicalaccentvalue continues to work as a back-compat alias. New Variants & Intents page documents the canonical set, the per-component prop tables, and the visual-synonym semantics in one place. - Bundle size:
dist/wirekit.jsgrew from 25 → 26 KB gzip (83 → 86 KB raw) covering the new reading-* family and chart-adapter expansion. Stays within the ±2 KB drift budget perdocs/. Core bundle (chart-only) unchanged at ~2 KB gzip / 11 KB raw. ESM bundle ~25 KB gzip / 82 KB raw.dependencies. md .wk-reading-toc__listinline-padding ships without!important. Developers running a typography prose-wrapper (e.g. a@tailwindcss/body or anytypography body.prose-style class) should carve out[class*="wk-"]from theirul/ol/lirules — same pattern they already use for themax-width: 75chtypography clamp. Without the carve-out thepadding-left: 1.75remin a typical prose stylesheet wins on specificity over.wk-reading-toc__list { padding-inline: 0.25rem }and pushes WireKit list-based components (reading-toc, list, breadcrumb) off the content-edge spine. Recommended typography rule shape:.prose ul:not([class*="wk-"]), .prose ol:not([class*="wk-"]) { padding-left: 1.75rem }.
Documentation
docs/— new "Performance — Conditional Asset Loading" section documenting a server-side flag pattern for emittingintegration. md highlight.jsandChart.js<script>tags only on pages that actually use<x-wirekit::orcode-block> <x-wirekit::. Saves ~95 KB gzip on lightweight routes (landing pages, theming guide, recipes without code/charts) without breaking caching or first-paint correctness. Pattern is documentation-only; no helper class shipped — adapt thechart> str_contains()detection to your DocsParser / class-naming conventions./theming/— NEW comprehensive reference page for every WireKit CSS variable: colors, typography, motion, sizing, component-specific tokens, and the chart-theming palette. Single landing page where developers can find any token by name before reaching for its component's docs page.design-tokens /getting-started/— NEW recipe page for fitting WireKit into an existing Livewire Starter Kit project. Walks the four touchpoints where Starter-Kit defaults differ from a clean-roomlivewire-starter-kit wirekit:install(theme preset, font stack, dark-mode flip, sidebar conflict resolution) so existing Starter-Kit developers don't have to discover them ad-hoc.