Skip to content

Releases: tago-io/custom-widget

v2.0.1

11 Apr 22:37
06ff993

Choose a tag to compare

What's new

The Custom Widget SDK has been rebuilt as a monorepo with three packages:

  • @tago-io/custom-widget - The vanilla JS SDK, now powered by a shared core. Same window.TagoIO API, drop-in compatible with v1.
  • @tago-io/custom-widget-core - Framework-agnostic internals: message bridge, widget store, realtime strategies, and utility functions.
  • @tago-io/custom-widget-react - React SDK with hooks for building custom widgets: useWidgetData, useRealtimeData, useSendData, useEditData, useDeleteData, useDictionary, useNavigation, useRunAnalysis, and more.

Highlights

  • React support via TagoIOProvider and a full set of hooks
  • runAnalysis(scope?) added to all SDKs
  • deleteData fix: sends the correct "id:device" payload expected by the dashboard
  • mergeStrategy fix: removes deleted records and sorts by time descending
  • Auto-fill device/origin in React mutation hooks matching JS SDK behavior
  • customPreferences and preferences exposed in useUserInformation
  • React StrictMode support via MessageBridge recreation on remount
  • Migrated from webpack to tsup, ESLint/Prettier to Oxlint/Oxfmt
  • pnpm workspaces with Turborepo for build orchestration
  • CI with GitHub Actions, npm publish with OIDC trusted publishing

Install

# Vanilla JS (same package name as v1)
npm install @tago-io/custom-widget

# React
npm install @tago-io/custom-widget-react

Breaking changes

  • Internal rewrite. The public API (window.TagoIO.*) is unchanged, but the bundle internals are different.
  • shortid replaced with crypto.randomUUID() (with Math.random fallback for older browsers).
  • Package version jumped from 1.1.0 to 2.0.1.