artu-widget
Use /latest/widget.min.js for auto-updates or pin a specific release for deterministic embeds.
Every version includes patch notes and a dedicated detail page.
Latest URL
<script
src="./latest/widget.min.js"
data-app-id="app_xxx"
data-publishable-key="webchat_pk_xxx"
></script>
Live examples
Published releases
Each embed must pass both data-app-id and data-publishable-key at runtime.
Machine-readable metadata at releases.json.
-
v5.1.0 latest
Adds embeddable cart/catalog widget as a separate bundle (cart.min.js) for displaying product menus from WhatsApp-linked ordering flows.
- New cart widget bundle (cart.min.js, 49KB / 16KB gzip) — independent from chat, shares auth infrastructure.
- Product catalog displayed as a card grid grouped by category with scrollable pill tabs.
- Zustand-powered cart with localStorage persistence across sessions.
- Two modes: fullscreen (for WhatsApp deep links) and embedded (data-mode="cart-embedded" with data-target selector).
- Bottom drawer with editable item list, quantities, notes field, and total.
- Shadow DOM isolation, theming via --wc-* CSS variables, i18n (es/en).
- Public API: window.WebcartWidget with setTheme(), setLocale(), destroy().
- CDN build now includes cart.min.js alongside widget.min.js with live example pages.
-
v5.0.0
Adds embedded chat mode, Artu brand identity, and default logo avatar.
- New embedded mode: render a full-size inline chat via data-mode="embedded" and data-target="#selector" — no floating bubble, always visible.
- Extracts all session/message logic into a reusable useChatSession hook shared by both bubble and embedded modes.
- Rebrands default theme to Artu colors: primary #2B5EA7, silver/gray #A8AAAE throughout the widget and CDN pages.
- Replaces the default lock icon avatar with the Artu logo embedded as base64 WebP in the bundle.
- CDN catalog page updated with Artu brand palette and live example links (bubble, dark, embedded).
Breaking changes: Default theme colors changed from purple (#7C3AED) to Artu blue (#2B5EA7) — existing embeds using data-theme overrides are unaffected.
-
v4.1.0
Adds data-visible-class attribute for conditional widget visibility based on a body CSS class.
- New data-visible-class attribute: when set, the widget host is hidden by default and only shown when document.body contains the specified CSS class.
- Uses a MutationObserver on body class changes for instant show/hide without polling.
- Enables host apps to control widget visibility during client-side navigation (e.g. hide on login, show on dashboard) without needing to destroy/recreate the widget.
-
v4.0.0
Replaces Supabase Realtime with AWS AppSync Events and migrates the entire API surface from v2 to v3.
- Replaces @supabase/realtime-js with a native WebSocket transport that connects directly to AWS AppSync Events using the aws-appsync-event-ws subprotocol.
- Migrates all API calls from /api/webchat/v2/{appId}/* to /api/webchat/v3/{appId}/* endpoints.
- Session response now provides realtimeUrl and httpHost from the backend, eliminating all client-side Supabase configuration.
- Removes VITE_SUPABASE_URL and VITE_SUPABASE_PUBLISHABLE_KEY environment variables — the only required env var is VITE_WEBCHAT_API_URL.
- Topic format changes from conv:{appId}:{senderId} to webchat/{senderId}-{appId} to match the AppSync channel namespace.
- Adds automatic exponential-backoff reconnection (1s–30s) on WebSocket disconnects.
Breaking changes: Requires backend v3 endpoints deployed with AppSync configuration (APPSYNC_REALTIME_URL, APPSYNC_HTTP_HOST, WEBCHAT_JWT_SECRET). · Removes all Supabase dependencies and environment variables — v2 backend is no longer supported. · Session response shape now includes realtimeUrl and httpHost fields; older v2 responses will be rejected.
-
v3.0.4
Improves local embed preview behavior and dark example validation surfaces.
- Updates local Vite dev server behavior to serve /dist/*.min.js bundles as raw scripts so classic script-tag embeds mount correctly in /dist/examples pages.
- Adds a theme-aware background surface for the open Powered by badge to preserve contrast across host page backgrounds without adding extra shadow.
- Expands the dark example template with a richer validation footer placed lower in the page to stress-test widget overlap and readability scenarios.
- Bumps @padawan-way/r2-chat-ui from 0.1.8 to 0.1.9 in package metadata and lockfile resolution.
-
v3.0.3
Updates the widget to consume @padawan-way/r2-chat-ui 0.1.8.
- Bumps @padawan-way/r2-chat-ui from 0.1.7 to 0.1.8 in package metadata and lockfile resolution.
- Rebuilds the CDN widget bundle so the shipped UI layer matches the latest shared chat-ui package output.
- Keeps the existing embed/runtime API contracts unchanged while refreshing internal UI dependency bytes.
-
v3.0.2
Refreshes the generated release page to use the webchat dark palette by default.
- Switches the per-release page to always render in dark mode using the widget palette: #10A37F accent, #212121 background family, and muted #A1A1AA text.
- Updates the generated panel, code block, and hero styling so the release detail page visually matches the shipped webchat examples instead of the previous light blue theme.
- Locks the dark release-page styling with CDN generator tests so future builds keep the same visual direction.
-
v3.0.1
Moves VITE_WEBCHAT_APP_ID to generated local examples only and keeps the real embed contract fully runtime-driven.
- Generates dist/examples/*.html from templates and injects VITE_WEBCHAT_APP_ID there without reintroducing that env var into the widget bundle.
- Turns root examples/*.html into redirects to the built examples so the documented local URLs keep working after npm run build.
- Clarifies in the README and release catalog that real integrations still require data-app-id in the script tag, while VITE_WEBCHAT_APP_ID is example-only.
-
v3.0.0
Moves the Webchat V2 app id into the public embed contract so each widget instance routes itself at runtime.
- Requires data-app-id in the script tag and uses that runtime value for /api/webchat/v2/{appId}/session, /messages, and conv:<appId>:<sender_id> topic validation.
- Updates the CDN catalog, per-release pages, README, and local examples so every embed snippet includes both data-app-id and data-publishable-key.
- Removes the bundle dependency on VITE_WEBCHAT_APP_ID while keeping VITE_WEBCHAT_API_URL and Supabase env values as build-time configuration.
Breaking changes: Embeds must now pass data-app-id; widgets that only set data-publishable-key will fail fast before mounting. · VITE_WEBCHAT_APP_ID is no longer read by the frontend bundle and should be removed from widget build configuration.
-
v2.0.0
Moves the widget to the Webchat V2 backend contract and publishes a navigable CDN release catalog.
- Switches session and message requests to /api/webchat/v2/{appId} with topic validation against VITE_WEBCHAT_APP_ID.
- Generates the CDN catalog with /latest/widget.min.js, versioned release pages, and machine-readable releases.json metadata.
- Reuses shared widget styles from @padawan-way/r2-chat-ui/styles and documents the correct local preview flow for built examples.
Breaking changes: Builds now require VITE_WEBCHAT_APP_ID and backend routes moved from /api/v1/* to /api/webchat/v2/{appId}/*. · Realtime session responses must now return topic conv:<appId>:<sender_id>; old topic shapes are rejected by the widget.
-
v1.0.0
Initial public CDN release for the embeddable webchat widget.
- Publishes a stable embeddable widget bundle for external sites.
- Introduces a Vercel-friendly static catalog with pinned release assets.
- Establishes formal patch notes metadata for future releases.