@devicechain/widgets 1.5.0-rc.1 → 1.6.0-rc.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (113) hide show
  1. package/README.md +14 -1
  2. package/dist/access-strings.d.ts +1 -1
  3. package/dist/aggregate-strings.d.ts +3 -1
  4. package/dist/alarm-strings.d.ts +4 -1
  5. package/dist/chunks/{aggregate-feed-HCF5FYIJ.js → aggregate-feed-QJRO7Y4V.js} +7 -4
  6. package/dist/chunks/aggregate-feed-QJRO7Y4V.js.map +7 -0
  7. package/dist/chunks/{aggregate-widgets-IFZUFYXV.js → aggregate-widgets-SHPHUHNL.js} +39 -62
  8. package/dist/chunks/aggregate-widgets-SHPHUHNL.js.map +7 -0
  9. package/dist/chunks/{alarm-widgets-TTQYBKMZ.js → alarm-widgets-DQEITFVN.js} +2 -2
  10. package/dist/chunks/alarm-widgets-DQEITFVN.js.map +7 -0
  11. package/dist/chunks/{chunk-FM7OI5TQ.js → chunk-2GMBZTQD.js} +44 -5
  12. package/dist/chunks/chunk-2GMBZTQD.js.map +7 -0
  13. package/dist/chunks/{chunk-AF4M5OXQ.js → chunk-4BEFYYM3.js} +3 -3
  14. package/dist/chunks/chunk-5UDZ5R5F.js +60 -0
  15. package/dist/chunks/chunk-5UDZ5R5F.js.map +7 -0
  16. package/dist/chunks/{chunk-VTGKDO44.js → chunk-7TEFJ64H.js} +19 -5
  17. package/dist/chunks/chunk-7TEFJ64H.js.map +7 -0
  18. package/dist/chunks/{chunk-GUCEPNGM.js → chunk-EFTUK5YX.js} +1 -1
  19. package/dist/chunks/chunk-EFTUK5YX.js.map +7 -0
  20. package/dist/chunks/{chunk-EQOWBDS7.js → chunk-G5UBMPMX.js} +2 -2
  21. package/dist/chunks/{chunk-EQOWBDS7.js.map → chunk-G5UBMPMX.js.map} +2 -2
  22. package/dist/chunks/{chunk-RG2AYYKO.js → chunk-GWH5AHG3.js} +6 -4
  23. package/dist/chunks/chunk-GWH5AHG3.js.map +7 -0
  24. package/dist/chunks/{chunk-XJ7UF2CP.js → chunk-O763YMOG.js} +1 -1
  25. package/dist/chunks/chunk-O763YMOG.js.map +7 -0
  26. package/dist/chunks/{chunk-ZX4K3GT5.js → chunk-R2XEYQEJ.js} +45 -24
  27. package/dist/chunks/chunk-R2XEYQEJ.js.map +7 -0
  28. package/dist/chunks/{chunk-JVC6JYUR.js → chunk-RLVZXNPJ.js} +1 -1
  29. package/dist/chunks/{chunk-JVC6JYUR.js.map → chunk-RLVZXNPJ.js.map} +1 -1
  30. package/dist/chunks/{chunk-QHTO5ZEM.js → chunk-UDQVBVXJ.js} +1 -1
  31. package/dist/chunks/chunk-UDQVBVXJ.js.map +7 -0
  32. package/dist/chunks/chunk-UVLEBGAC.js +17 -0
  33. package/dist/chunks/chunk-UVLEBGAC.js.map +7 -0
  34. package/dist/chunks/chunk-VR6643C7.js +119 -0
  35. package/dist/chunks/chunk-VR6643C7.js.map +7 -0
  36. package/dist/chunks/{chunk-ZR74ORIT.js → chunk-XDHKONWK.js} +1 -1
  37. package/dist/chunks/chunk-XDHKONWK.js.map +7 -0
  38. package/dist/chunks/{chunk-3FSXS67N.js → chunk-ZKR5WDF5.js} +68 -18
  39. package/dist/chunks/chunk-ZKR5WDF5.js.map +7 -0
  40. package/dist/chunks/{compare-feed-MLHG7YFN.js → compare-feed-K46QVE5D.js} +28 -16
  41. package/dist/chunks/compare-feed-K46QVE5D.js.map +7 -0
  42. package/dist/chunks/{control-widgets-KTH6BWMH.js → control-widgets-VMWBTRC6.js} +70 -34
  43. package/dist/chunks/control-widgets-VMWBTRC6.js.map +7 -0
  44. package/dist/chunks/entity-selector-IRUFUDQ6.js +7 -0
  45. package/dist/chunks/{event-markers-feed-BQO4T367.js → event-markers-feed-TOAQ53YC.js} +29 -11
  46. package/dist/chunks/event-markers-feed-TOAQ53YC.js.map +7 -0
  47. package/dist/chunks/{export-rows-OEWIBIUY.js → export-rows-XKIVLOM3.js} +3 -3
  48. package/dist/chunks/{fleet-feed-AKJ7QIMP.js → fleet-feed-AYNL3CC2.js} +6 -6
  49. package/dist/chunks/{history-widgets-7GNKTE5X.js → history-widgets-WJ4KRTG7.js} +55 -20
  50. package/dist/chunks/history-widgets-WJ4KRTG7.js.map +7 -0
  51. package/dist/chunks/{level-widgets-DKCQT2XF.js → level-widgets-3SRESJYW.js} +46 -14
  52. package/dist/chunks/level-widgets-3SRESJYW.js.map +7 -0
  53. package/dist/chunks/{natural-earth-data-VMKQ6LY3.js → natural-earth-data-R7NPQARR.js} +1 -1
  54. package/dist/chunks/natural-earth-data-R7NPQARR.js.map +7 -0
  55. package/dist/chunks/{no-reading-B4MPXAS2.js → no-reading-CTQCMNYA.js} +4 -4
  56. package/dist/chunks/{presence-widgets-7OGANOLB.js → presence-widgets-P2H3A2SD.js} +34 -16
  57. package/dist/chunks/presence-widgets-P2H3A2SD.js.map +7 -0
  58. package/dist/chunks/table-HAKFOUMS.js +8 -0
  59. package/dist/command-control-strings.d.ts +1 -1
  60. package/dist/compare-strings.d.ts +1 -1
  61. package/dist/event-markers-strings.d.ts +1 -1
  62. package/dist/fleet-strings.d.ts +1 -1
  63. package/dist/history-strings.d.ts +1 -1
  64. package/dist/host-context.js +1 -1
  65. package/dist/index.d.ts +112 -4
  66. package/dist/index.js +338 -131
  67. package/dist/index.js.map +4 -4
  68. package/dist/level-strings.d.ts +1 -1
  69. package/dist/presence-strings.d.ts +1 -1
  70. package/dist/registry.d.ts +2 -0
  71. package/dist/scada-strings.d.ts +1 -1
  72. package/dist/selection-strings.d.ts +10 -0
  73. package/dist/shared-strings.d.ts +38 -0
  74. package/dist/state-timeline-strings.d.ts +1 -1
  75. package/dist/status-grid-strings.d.ts +1 -1
  76. package/dist/table-strings.d.ts +1 -1
  77. package/dist/time-range-bar.d.ts +1 -2
  78. package/dist/time-range-strings.d.ts +8 -0
  79. package/dist/vite.js.map +1 -1
  80. package/dist/widgets/command-status.d.ts +1 -0
  81. package/dist/widgets/map-geometry.d.ts +2 -0
  82. package/package.json +8 -8
  83. package/dist/chunks/aggregate-feed-HCF5FYIJ.js.map +0 -7
  84. package/dist/chunks/aggregate-widgets-IFZUFYXV.js.map +0 -7
  85. package/dist/chunks/alarm-widgets-TTQYBKMZ.js.map +0 -7
  86. package/dist/chunks/chunk-3FSXS67N.js.map +0 -7
  87. package/dist/chunks/chunk-BRH66T5F.js +0 -15
  88. package/dist/chunks/chunk-BRH66T5F.js.map +0 -7
  89. package/dist/chunks/chunk-FM7OI5TQ.js.map +0 -7
  90. package/dist/chunks/chunk-GUCEPNGM.js.map +0 -7
  91. package/dist/chunks/chunk-QHTO5ZEM.js.map +0 -7
  92. package/dist/chunks/chunk-QMGKB6J3.js +0 -84
  93. package/dist/chunks/chunk-QMGKB6J3.js.map +0 -7
  94. package/dist/chunks/chunk-RG2AYYKO.js.map +0 -7
  95. package/dist/chunks/chunk-VTGKDO44.js.map +0 -7
  96. package/dist/chunks/chunk-XJ7UF2CP.js.map +0 -7
  97. package/dist/chunks/chunk-ZR74ORIT.js.map +0 -7
  98. package/dist/chunks/chunk-ZX4K3GT5.js.map +0 -7
  99. package/dist/chunks/compare-feed-MLHG7YFN.js.map +0 -7
  100. package/dist/chunks/control-widgets-KTH6BWMH.js.map +0 -7
  101. package/dist/chunks/entity-selector-3JJFI4DT.js +0 -7
  102. package/dist/chunks/event-markers-feed-BQO4T367.js.map +0 -7
  103. package/dist/chunks/history-widgets-7GNKTE5X.js.map +0 -7
  104. package/dist/chunks/level-widgets-DKCQT2XF.js.map +0 -7
  105. package/dist/chunks/natural-earth-data-VMKQ6LY3.js.map +0 -7
  106. package/dist/chunks/presence-widgets-7OGANOLB.js.map +0 -7
  107. package/dist/chunks/table-2UGM2Q4H.js +0 -8
  108. /package/dist/chunks/{chunk-AF4M5OXQ.js.map → chunk-4BEFYYM3.js.map} +0 -0
  109. /package/dist/chunks/{entity-selector-3JJFI4DT.js.map → entity-selector-IRUFUDQ6.js.map} +0 -0
  110. /package/dist/chunks/{export-rows-OEWIBIUY.js.map → export-rows-XKIVLOM3.js.map} +0 -0
  111. /package/dist/chunks/{fleet-feed-AKJ7QIMP.js.map → fleet-feed-AYNL3CC2.js.map} +0 -0
  112. /package/dist/chunks/{no-reading-B4MPXAS2.js.map → no-reading-CTQCMNYA.js.map} +0 -0
  113. /package/dist/chunks/{table-2UGM2Q4H.js.map → table-HAKFOUMS.js.map} +0 -0
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/widgets/device-status.tsx", "../../src/presence-model.ts", "../../src/presence-strings.ts", "../../src/widgets/online-doughnut.tsx", "../../src/presence-feed.tsx"],
4
+ "sourcesContent": ["// Copyright The DeviceChain Authors\n// SPDX-License-Identifier: Apache-2.0\n\n// device-status -- one device's connectivity: Online or Offline in words, and when it was last seen.\n// It reads device-state through the presence feed (presence-feed.tsx), not the device's readings.\n//\n// - ISA-101: the normal state is neutral. Online keeps the foreground; only Offline takes a colour,\n// and the word says which, so colour is never the only signal;\n// - a device with no state row has never sent anything: it reads \"No status yet\", muted, and is not\n// painted as an outage;\n// - \"last seen\" is the device's last activity. The frame's age readout is the age of the STATUS\n// (when device-state was last read), with a stale badge past `staleAfterSeconds` -- never the\n// device's silence, which would grey out the very Offline it explains (presence-feed.tsx);\n// - the card shows ONE device: a group reaching it is refused in words, with where the group can be shown.\n//\n// DOM text, so the readability gate sees it.\n\nimport {\n css,\n FIT_MIN_FONT_PX,\n fontVar,\n levelColor,\n optString,\n spaceVar,\n useSeverityColors,\n viewerLocale,\n WidgetFrame,\n type WidgetProps,\n} from '@devicechain/widget-sdk';\n\nimport { fleetStrings } from '../fleet-strings';\nimport { LevelEmpty, LevelReadout } from '../level-readout';\nimport { Explained } from '../no-reading';\nimport { lastActivityMs, presenceKind } from '../presence-model';\nimport { presenceStrings } from '../presence-strings';\n\n// The level an offline device is drawn at: attention, short of the alarm a rule would raise.\nexport const OFFLINE_LEVEL = 'major' as const;\n\n// The room the caption line needs, before the density scale.\nconst CAPTION_ROOM_PX = 22;\n\n// \"Oct 21, 2026, 10:32 AM\" in the viewer's language; an unparseable <html lang> falls back to the runtime's.\nexport function formatLastSeen(at: number, locale: string | undefined = viewerLocale()): string {\n try {\n return new Intl.DateTimeFormat(locale, { dateStyle: 'medium', timeStyle: 'short' }).format(at);\n } catch {\n return new Intl.DateTimeFormat(undefined, { dateStyle: 'medium', timeStyle: 'short' }).format(at);\n }\n}\n\nexport function DeviceStatus({ widget, data }: WidgetProps) {\n const strings = presenceStrings();\n const fleet = fleetStrings();\n const severity = useSeverityColors();\n const feed = data.members;\n const title = optString(widget.options, 'title');\n\n const empty = (message: string, kind?: 'unbound' | 'forbidden') => (\n <WidgetFrame title={title}>\n {kind ? <Explained kind={kind} message={message} /> : <LevelEmpty message={message} />}\n </WidgetFrame>\n );\n if (!feed || feed.status === 'loading') return empty(fleet.loading);\n if (feed.status === 'unbound') return empty(strings.unbound, 'unbound');\n if (feed.status === 'forbidden') return empty(fleet.forbidden, 'forbidden');\n if (feed.status === 'unsupported') return empty(strings.unsupported);\n if (feed.members.length === 0) return empty(fleet.noMembers);\n if (feed.members.length > 1 || feed.total > 1) return empty(`${strings.oneDevice} ${strings.useDoughnut}`);\n\n const presence = feed.members[0].presence;\n const kind = presenceKind(presence);\n if (kind === 'pending') return empty(fleet.loading);\n if (kind === 'failed') return empty(strings.failed);\n\n const figure = kind === 'online' ? strings.online : kind === 'offline' ? strings.offline : strings.unknown;\n const color = kind === 'offline' ? levelColor(severity, OFFLINE_LEVEL) : kind === 'unknown' ? css('muted-foreground') : undefined;\n const seen = lastActivityMs(presence);\n const caption = seen !== undefined ? strings.lastSeen(formatLastSeen(seen)) : strings.neverSeen;\n\n return (\n <WidgetFrame title={title}>\n {({ size, scale }) => {\n const room = Math.round(CAPTION_ROOM_PX * scale);\n const fit = { width: size.width, height: Math.max(Math.round(FIT_MIN_FONT_PX * scale), size.height - room) };\n return (\n <div\n data-device-status={kind}\n style={{ display: 'flex', flexDirection: 'column', justifyContent: 'safe center', height: '100%', overflow: 'hidden' }}\n >\n <div style={{ flex: '1 1 0', minHeight: 0, display: 'flex', alignItems: 'center', justifyContent: 'center' }}>\n <LevelReadout text={figure} color={color} size={fit} scale={scale} />\n </div>\n <div\n data-device-status-caption=\"\"\n style={{\n flex: '0 0 auto',\n marginTop: spaceVar(1),\n textAlign: 'center',\n fontSize: fontVar('sm'),\n color: css('muted-foreground'),\n overflow: 'hidden',\n textOverflow: 'ellipsis',\n whiteSpace: 'nowrap',\n }}\n >\n {caption}\n </div>\n </div>\n );\n }}\n </WidgetFrame>\n );\n}\n", "// Copyright The DeviceChain Authors\n// SPDX-License-Identifier: Apache-2.0\n\n// What the device status card and the online doughnut say, decided apart from the drawing. Pure, so\n// each rule is a test.\n//\n// - a device is ONLINE when device-state considers it connected, and OFFLINE when it does not.\n// Which of the two it is comes from the platform (an inferred device goes offline after its\n// inactivity timeout; an asserted one follows its transport's connect and disconnect), never\n// from this widget's idea of how long is too long;\n// - a device with NO state row has never sent anything: it is neither online nor offline, and is\n// counted apart (\"no status yet\"), never folded into the offline figure -- a device that was never\n// commissioned is not an outage;\n// - a member whose read is still pending, or failed, is counted apart again. While any is pending\n// there is no tally: a share over the members read so far would be an answer that looks final;\n// - \"last seen\" is the device's last activity (device-state's lastActivityTime), the time of its\n// newest event, not the time it was last marked connected.\n\nimport type { FleetMember, MemberPresence } from '@devicechain/dashboards';\n\nexport type PresenceKind = 'online' | 'offline' | 'unknown' | 'pending' | 'failed';\n\nexport function presenceKind(presence: MemberPresence | undefined): PresenceKind {\n if (!presence) return 'pending';\n if (presence.status === 'ready') return presence.active ? 'online' : 'offline';\n return presence.status;\n}\n\n// The device's last activity (epoch ms), or undefined when it has none or it does not parse.\nexport function lastActivityMs(presence: MemberPresence | undefined): number | undefined {\n if (presence?.status !== 'ready' || !presence.lastActivityTime) return undefined;\n const at = Date.parse(presence.lastActivityTime);\n return Number.isNaN(at) ? undefined : at;\n}\n\nexport interface PresenceTally {\n online: number;\n offline: number;\n // No state row: the device has never sent anything.\n unknown: number;\n pending: number;\n failed: number;\n // The newest last-activity time among the members (epoch ms), when any has one.\n newest: number | undefined;\n}\n\nexport function tallyPresence(members: readonly FleetMember[]): PresenceTally {\n const tally: PresenceTally = { online: 0, offline: 0, unknown: 0, pending: 0, failed: 0, newest: undefined };\n for (const m of members) {\n tally[presenceKind(m.presence)]++;\n const at = lastActivityMs(m.presence);\n if (at !== undefined && (tally.newest === undefined || at > tally.newest)) tally.newest = at;\n }\n return tally;\n}\n", "// Copyright The DeviceChain Authors\n// SPDX-License-Identifier: Apache-2.0\n\n// The fixed words the device status card and the online doughnut render themselves. The widget\n// packages carry no i18n runtime, so this is the one small per-language table (modelled on\n// fleet-strings.ts); option labels are translated in the console's catalogs, not here.\n\nimport { viewerLocale } from '@devicechain/widget-sdk';\n\nexport interface PresenceStrings {\n online: string;\n offline: string;\n // The device has never sent anything, so device-state holds no row for it.\n unknown: string;\n neverSeen: string;\n lastSeen: (when: string) => string;\n failed: string;\n unsupported: string;\n // The card is bound to a slot with nothing chosen in it yet.\n unbound: string;\n // The card is bound to a group: it shows one device.\n oneDevice: string;\n useDoughnut: string;\n // The doughnut's figure and its caption.\n ofTotal: (total: number) => string;\n onlineCaption: string;\n notRead: (n: number) => string;\n noStatusYet: (n: number) => string;\n chartLabel: (online: number, offline: number, unknown: number) => string;\n}\n\nexport const PRESENCE_STRINGS: Record<'en' | 'es' | 'zh-CN', PresenceStrings> = {\n en: {\n online: 'Online',\n offline: 'Offline',\n unknown: 'No status yet',\n neverSeen: 'Never seen',\n lastSeen: (when) => `Last seen ${when}`,\n failed: 'Status could not be read',\n unsupported: 'This data source cannot read device status',\n unbound: 'Choose a device for this widget',\n oneDevice: 'This card shows one device, and it is bound to a group.',\n useDoughnut: 'Bind it to one device, or show the group in an online / offline doughnut.',\n ofTotal: (total) => `of ${total}`,\n onlineCaption: 'online',\n notRead: (n) => `${n} could not be read`,\n noStatusYet: (n) => `${n} with no status yet`,\n chartLabel: (online, offline, unknown) => `${online} online, ${offline} offline, ${unknown} with no status yet`,\n },\n es: {\n online: 'En línea',\n offline: 'Sin conexión',\n unknown: 'Sin estado todavía',\n neverSeen: 'Nunca visto',\n lastSeen: (when) => `Visto por última vez ${when}`,\n failed: 'No se pudo leer el estado',\n unsupported: 'Esta fuente de datos no puede leer el estado de los dispositivos',\n unbound: 'Elija un dispositivo para este widget',\n oneDevice: 'Esta tarjeta muestra un solo dispositivo y está vinculada a un grupo.',\n useDoughnut: 'Vincúlela a un dispositivo o muestre el grupo en un anillo de conectados / desconectados.',\n ofTotal: (total) => `de ${total}`,\n onlineCaption: 'en línea',\n notRead: (n) => `${n} sin leer`,\n noStatusYet: (n) => `${n} sin estado todavía`,\n chartLabel: (online, offline, unknown) => `${online} en línea, ${offline} sin conexión, ${unknown} sin estado todavía`,\n },\n 'zh-CN': {\n online: '在线', offline: '离线', unknown: '暂无状态', neverSeen: '从未上报',\n lastSeen: (when) => `最后上报于 ${when}`, failed: '无法读取状态', unsupported: '此数据源无法读取设备状态',\n unbound: '请为此组件选择设备', oneDevice: '此卡片显示单台设备,但当前绑定的是设备组。',\n useDoughnut: '请将其绑定到单台设备,或使用在线/离线环形图显示此组。',\n ofTotal: (total) => `共 ${total} 台`, onlineCaption: '在线', notRead: (n) => `${n} 台无法读取`,\n noStatusYet: (n) => `${n} 台暂无状态`,\n chartLabel: (online, offline, unknown) => `${online} 台在线,${offline} 台离线,${unknown} 台暂无状态`,\n },\n};\n\nexport function presenceStrings(locale: string | undefined = viewerLocale()): PresenceStrings {\n const language = locale?.toLowerCase().split('-')[0];\n return language === 'es' ? PRESENCE_STRINGS.es : language === 'zh' ? PRESENCE_STRINGS['zh-CN'] : PRESENCE_STRINGS.en;\n}\n", "// Copyright The DeviceChain Authors\n// SPDX-License-Identifier: Apache-2.0\n\n// online-doughnut -- how many of a group's devices are online: a ring of online, offline and\n// \"no status yet\", with the online count in the middle and every figure in a legend. Reads\n// device-state through the presence feed (presence-feed.tsx).\n//\n// - ISA-101: the normal state is neutral. Online is the quiet grey that fills most of a healthy\n// ring; only the offline slice takes a colour, and the legend names every count, so colour is\n// never the only signal. A group with nothing offline draws no colour at all;\n// - a device with no state row has never sent anything: its own pale slice (\"no status yet\"), not\n// offline. A device whose read failed is noted apart and left out of the ring;\n// - while any member's read is pending there is no ring: a share over the members read so far would\n// be an answer that looks final;\n// - a group larger than the feed reads says so (\"Showing 500 of 812 devices\") instead of presenting\n// the subset as the fleet.\n//\n// Drawn as SVG strokes with the figures as DOM text (the readability gate sees it).\n\nimport {\n css,\n FIT_MIN_FONT_PX,\n fontVar,\n levelColor,\n optString,\n spaceVar,\n useSeverityColors,\n WidgetFrame,\n type WidgetProps,\n} from '@devicechain/widget-sdk';\n\nimport { arcPath } from '../category-geometry';\nimport { fleetStrings } from '../fleet-strings';\nimport { LevelEmpty } from '../level-readout';\nimport { Explained } from '../no-reading';\nimport { tallyPresence } from '../presence-model';\nimport { presenceStrings } from '../presence-strings';\nimport { OFFLINE_LEVEL } from './device-status';\n\n// The ring, in a 100-unit box.\nconst RADIUS = 38;\nconst THICKNESS = 14;\n// How much of the online grey the no-status slice keeps.\nconst UNKNOWN_OPACITY = 0.3;\n// The room one legend line needs below the ring, before the density scale.\nconst LEGEND_LINE_PX = 18;\n\nexport function OnlineDoughnut({ widget, data }: WidgetProps) {\n const strings = presenceStrings();\n const fleet = fleetStrings();\n const severity = useSeverityColors();\n const feed = data.members;\n const title = optString(widget.options, 'title');\n\n const empty = (message: string, kind?: 'unbound' | 'forbidden') => (\n <WidgetFrame title={title}>\n {kind ? <Explained kind={kind} message={message} /> : <LevelEmpty message={message} />}\n </WidgetFrame>\n );\n if (!feed || feed.status === 'loading') return empty(fleet.loading);\n if (feed.status === 'unbound') return empty(fleet.unbound, 'unbound');\n if (feed.status === 'forbidden') return empty(fleet.forbidden, 'forbidden');\n if (feed.status === 'unsupported') return empty(strings.unsupported);\n if (feed.members.length === 0) return empty(fleet.noMembers);\n const tally = tallyPresence(feed.members);\n // A share over the members read so far would be an undercount that looks like an answer.\n if (tally.pending > 0) return empty(fleet.loading);\n const counted = tally.online + tally.offline + tally.unknown;\n if (counted === 0) return empty(strings.failed);\n\n const offlineColor = levelColor(severity, OFFLINE_LEVEL) ?? css('foreground');\n const segments = [\n { kind: 'online', count: tally.online, stroke: css('muted-foreground'), opacity: 1, label: strings.online },\n { kind: 'offline', count: tally.offline, stroke: offlineColor, opacity: 1, label: strings.offline },\n // The same neutral as online, pale: a device we know nothing of is less than one that is connected.\n { kind: 'unknown', count: tally.unknown, stroke: css('muted-foreground'), opacity: UNKNOWN_OPACITY, label: strings.unknown },\n ];\n let at = 0;\n const arcs = segments.map((s) => {\n const from = at;\n at += s.count / counted;\n return { ...s, from, to: at };\n });\n // Online and offline always have a line (a zero is an answer); no-status only when some device has none.\n const legend = arcs.filter((a) => a.kind !== 'unknown' || a.count > 0);\n const notes: string[] = [];\n if (tally.failed > 0) notes.push(strings.notRead(tally.failed));\n if (feed.truncated) notes.push(fleet.truncated(feed.members.length, feed.total));\n\n return (\n <WidgetFrame title={title}>\n {({ size, scale }) => {\n const legendRoom = Math.round(LEGEND_LINE_PX * scale) * (legend.length + notes.length);\n const box = Math.max(0, Math.min(size.width, size.height - legendRoom));\n const figure = Math.max(Math.round(FIT_MIN_FONT_PX * scale), Math.round(box * 0.2));\n return (\n <div\n data-online-doughnut=\"\"\n data-online={tally.online}\n data-offline={tally.offline}\n data-no-status={tally.unknown}\n style={{ display: 'flex', flexDirection: 'column', height: '100%', overflow: 'hidden', gap: spaceVar(1) }}\n >\n <div style={{ position: 'relative', flex: '1 1 0', minHeight: 0 }}>\n <svg\n data-doughnut=\"\"\n viewBox=\"0 0 100 100\"\n preserveAspectRatio=\"xMidYMid meet\"\n role=\"img\"\n aria-label={strings.chartLabel(tally.online, tally.offline, tally.unknown)}\n style={{ position: 'absolute', inset: 0, width: '100%', height: '100%', display: 'block' }}\n >\n {arcs.map((a) => {\n if (a.count === 0) return null;\n const common = { fill: 'none', stroke: a.stroke, strokeWidth: THICKNESS, strokeOpacity: a.opacity } as const;\n const d = arcPath(50, 50, RADIUS, a.from, a.to);\n return d ? (\n <path key={a.kind} data-segment={a.kind} data-count={a.count} d={d} style={common} />\n ) : (\n <circle key={a.kind} data-segment={a.kind} data-count={a.count} cx={50} cy={50} r={RADIUS} style={common} />\n );\n })}\n </svg>\n <div\n data-doughnut-figure=\"\"\n style={{\n position: 'absolute',\n inset: 0,\n display: 'flex',\n flexDirection: 'column',\n alignItems: 'center',\n justifyContent: 'center',\n fontVariantNumeric: 'tabular-nums',\n pointerEvents: 'none',\n }}\n >\n <span style={{ fontSize: figure, fontWeight: 600, lineHeight: 1.1, color: css('foreground') }}>{tally.online}</span>\n <span style={{ fontSize: fontVar('xs'), color: css('muted-foreground') }}>{`${strings.ofTotal(counted)} ${strings.onlineCaption}`}</span>\n </div>\n </div>\n <ul\n data-doughnut-legend=\"\"\n style={{ flex: '0 0 auto', margin: 0, padding: 0, listStyle: 'none', fontSize: fontVar('xs'), color: css('muted-foreground') }}\n >\n {legend.map((a) => (\n <li key={a.kind} data-legend={a.kind} style={{ display: 'flex', alignItems: 'center', gap: spaceVar(1), whiteSpace: 'nowrap', overflow: 'hidden' }}>\n <span\n aria-hidden=\"true\"\n style={{\n flex: '0 0 auto',\n width: '0.7em',\n height: '0.7em',\n borderRadius: '50%',\n background: a.stroke,\n opacity: a.opacity,\n }}\n />\n <span style={{ flex: '1 1 auto', overflow: 'hidden', textOverflow: 'ellipsis' }}>{a.label}</span>\n <span style={{ color: a.kind === 'offline' && a.count > 0 ? offlineColor : css('foreground'), fontVariantNumeric: 'tabular-nums' }}>{a.count}</span>\n </li>\n ))}\n {notes.map((note) => (\n <li key={note} data-doughnut-note=\"\" style={{ whiteSpace: 'nowrap', overflow: 'hidden', textOverflow: 'ellipsis' }}>\n {note}\n </li>\n ))}\n </ul>\n </div>\n );\n }}\n </WidgetFrame>\n );\n}\n", "// Copyright The DeviceChain Authors\n// SPDX-License-Identifier: Apache-2.0\n\n// The data feed of a presence widget (the device status card, the online doughnut): the roster of\n// the datasource, then device-state's connectivity for it on a poll. Loaded on first use\n// (connected-widget.tsx imports it dynamically), so a board with no presence widget never downloads it.\n//\n// It hands the widget the SAME `data.members` a fleet widget reads, with each member's `presence`\n// filled and no readings -- connectivity folded into the measurement channel's member feed rather than\n// a channel of its own, so the exported channel union does not move.\n//\n// - ONE subscription per widget (hub.subscribePresence), one batch read per poll however many members;\n// - a member the snapshot does not carry has no state row (it has never sent anything): `unknown`,\n// a settled answer, never `pending`;\n// - a read that fails before any snapshot has landed leaves every member `failed`; once one has, a\n// later blip keeps the last good answer (the poll heals it), as the alarm and location channels do;\n// - a paused board holds the snapshot on screen (useHeld) rather than moving under a \"Paused\" badge;\n// - the frame's freshness is the age of the STATUS -- when device-state was last read successfully --\n// not the devices' last activity. What these widgets show is the platform's verdict (online or\n// offline), and that verdict is current as long as it keeps being read: an offline device is silent\n// by definition, and an asserted device can be connected and quiet, so greying a card out for the\n// device's silence would strip the one colour an outage takes, or grey out a true \"Online\". A read\n// that keeps failing is what makes the answer old, and that is what goes stale. \"Last seen\" (the\n// device's last activity) is the widget's own caption.\n\nimport {\n type DevicePresence,\n type FleetMember,\n type FleetState,\n type MeasurementStreamState,\n type MemberRoster,\n type WidgetActions,\n type WidgetDataSource,\n type WidgetDescriptor,\n type WidgetInstance,\n} from '@devicechain/dashboards';\nimport { resolveStaleAfterSeconds, useWidgetTimeRange, WidgetFreshnessProvider } from '@devicechain/widget-sdk';\nimport { useEffect, useMemo, useState, type ComponentType } from 'react';\n\nimport { useHeld } from './use-held';\n\nexport interface PresenceFeedProps {\n hub: WidgetDataSource;\n widget: WidgetInstance;\n descriptor: WidgetDescriptor;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n Component: ComponentType<any>;\n actions: WidgetActions | undefined;\n ErrorFrame: ComponentType<{ widget: WidgetInstance; error: unknown }>;\n}\n\ninterface Store {\n // The selector this store was filled for: a render carrying a new selector must not show the\n // previous one's members under it while the effect that resets the store has yet to run.\n key: string | null;\n roster: MemberRoster | null;\n states: Map<string, DevicePresence> | null;\n forbidden: boolean;\n error: unknown | null;\n // When the last snapshot landed (epoch ms): the age of the status on screen.\n readAt: number | null;\n}\n\nconst emptyStore = (key: string | null): Store => ({ key, roster: null, states: null, forbidden: false, error: null, readAt: null });\n\n// The state a presence widget renders from, built from the store. Exported for the tests.\nexport function buildPresenceFleet(store: Pick<Store, 'roster' | 'states' | 'forbidden' | 'error'>): FleetState {\n if (store.forbidden) return { status: 'forbidden', members: [], total: 0, truncated: false };\n if (!store.roster) return { status: 'loading', members: [], total: 0, truncated: false };\n if (store.roster.unbound) return { status: 'unbound', members: [], total: 0, truncated: false };\n const { states, error } = store;\n const members = store.roster.members.map((ref): FleetMember => {\n const state = states?.get(ref.token);\n return {\n token: ref.token,\n name: ref.name,\n latest: {},\n seed: 'ready',\n observed: [],\n presence: state\n ? { status: 'ready', active: state.active, lastActivityTime: state.lastActivityTime, inactivityTimeout: state.inactivityTimeout }\n : states\n ? { status: 'unknown' }\n : error\n ? { status: 'failed' }\n : { status: 'pending' },\n };\n });\n return { status: 'ready', members, total: store.roster.total, truncated: store.roster.total > members.length };\n}\n\nexport default function PresenceFeed({ hub, widget, descriptor, Component, actions }: PresenceFeedProps) {\n const range = useWidgetTimeRange();\n const ds = widget.datasource;\n const dsKey = JSON.stringify(ds ?? null);\n const supported = hub.subscribePresence !== undefined;\n const [store, setStore] = useState<Store>(() => emptyStore(dsKey));\n\n useEffect(() => {\n setStore(emptyStore(dsKey));\n if (!ds || !supported) return;\n return hub.subscribePresence!(ds, {\n roster: (roster) => setStore((s) => ({ ...s, roster })),\n next: (states) => setStore((s) => ({ ...s, states: new Map(states.map((p) => [p.deviceToken, p])), error: null, readAt: Date.now() })),\n forbidden: () => setStore((s) => ({ ...s, forbidden: true })),\n error: (error) => setStore((s) => ({ ...s, error })),\n });\n // `ds` is read through `dsKey` (value identity), not by reference.\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [hub, dsKey, supported]);\n\n const live = useMemo<{ fleet: FleetState; readAt: number | null }>(() => {\n if (!supported) return { fleet: { status: 'unsupported', members: [], total: 0, truncated: false }, readAt: null };\n const current = store.key === dsKey ? store : emptyStore(dsKey);\n return { fleet: buildPresenceFleet(current), readAt: current.readAt };\n }, [store, dsKey, supported]);\n // Held together, so a paused board's frame ages from the snapshot it is showing.\n const held = useHeld(live, range?.paused === true, (s) => s.fleet.status !== 'loading');\n const members = held.fleet;\n\n const freshness = useMemo(\n () =>\n descriptor.freshness === true\n ? { at: held.readAt ?? undefined, staleAfterSeconds: resolveStaleAfterSeconds(widget.options) }\n : undefined,\n [descriptor, widget.options, held.readAt],\n );\n const data: MeasurementStreamState = { latest: {}, samples: [], error: null, members };\n return (\n <WidgetFreshnessProvider freshness={freshness}>\n <Component widget={widget} data={data} actions={actions} />\n </WidgetFreshnessProvider>\n );\n}\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;AAiBA;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,gBAAAA;AAAA,EACA;AAAA,OAEK;;;ACNA,SAAS,aAAa,UAAoD;AAC/E,MAAI,CAAC,SAAU,QAAO;AACtB,MAAI,SAAS,WAAW,QAAS,QAAO,SAAS,SAAS,WAAW;AACrE,SAAO,SAAS;AAClB;AAGO,SAAS,eAAe,UAA0D;AACvF,MAAI,UAAU,WAAW,WAAW,CAAC,SAAS,iBAAkB,QAAO;AACvE,QAAM,KAAK,KAAK,MAAM,SAAS,gBAAgB;AAC/C,SAAO,OAAO,MAAM,EAAE,IAAI,SAAY;AACxC;AAaO,SAAS,cAAc,SAAgD;AAC5E,QAAM,QAAuB,EAAE,QAAQ,GAAG,SAAS,GAAG,SAAS,GAAG,SAAS,GAAG,QAAQ,GAAG,QAAQ,OAAU;AAC3G,aAAW,KAAK,SAAS;A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AW,KAAK,EAAE;AAAA,MAC5D,OAAO,CAAC,UAAU,SAAS,CAAC,OAAO,EAAE,GAAG,GAAG,MAAM,EAAE;AAAA,IACrD,CAAC;AAAA,EAGH,GAAG,CAAC,KAAK,OAAO,SAAS,CAAC;AAE1B,QAAM,OAAO,QAAsD,MAAM;AACvE,QAAI,CAAC,UAAW,QAAO,EAAE,OAAO,EAAE,QAAQ,eAAe,SAAS,CAAC,GAAG,OAAO,GAAG,WAAW,MAAM,GAAG,QAAQ,KAAK;AACjH,UAAM,UAAU,MAAM,QAAQ,QAAQ,QAAQ,WAAW,KAAK;AAC9D,WAAO,EAAE,OAAO,mBAAmB,OAAO,GAAG,QAAQ,QAAQ,OAAO;AAAA,EACtE,GAAG,CAAC,OAAO,OAAO,SAAS,CAAC;AAE5B,QAAM,OAAO,QAAQ,MAAM,OAAO,WAAW,MAAM,CAAC,MAAM,EAAE,MAAM,WAAW,SAAS;AACtF,QAAM,UAAU,KAAK;AAErB,QAAM,YAAY;AAAA,IAChB,MACE,WAAW,cAAc,OACrB,EAAE,IAAI,KAAK,UAAU,QAAW,mBAAmB,yBAAyB,OAAO,OAAO,EAAE,IAC5F;AAAA,IACN,CAAC,YAAY,OAAO,SAAS,KAAK,MAAM;AAAA,EAC1C;AACA,QAAM,OAA+B,EAAE,QAAQ,CAAC,GAAG,SAAS,CAAC,GAAG,OAAO,MAAM,QAAQ;AACrF,SACE,gBAAAA,KAAC,2BAAwB,WACvB,0BAAAA,KAAC,aAAU,QAAgB,MAAY,SAAkB,GAC3D;AAEJ;",
6
+ "names": ["viewerLocale", "viewerLocale", "kind", "css", "FIT_MIN_FONT_PX", "fontVar", "levelColor", "optString", "spaceVar", "useSeverityColors", "WidgetFrame", "jsx", "jsxs", "useSeverityColors", "optString", "WidgetFrame", "levelColor", "css", "FIT_MIN_FONT_PX", "spaceVar", "fontVar", "jsx"]
7
+ }
@@ -0,0 +1,8 @@
1
+ import {
2
+ Table
3
+ } from "./chunk-GWH5AHG3.js";
4
+ import "./chunk-RLVZXNPJ.js";
5
+ export {
6
+ Table
7
+ };
8
+ //# sourceMappingURL=table-HAKFOUMS.js.map
@@ -33,5 +33,5 @@ export interface ControlStrings {
33
33
  noDevice: string;
34
34
  sendFailed: string;
35
35
  }
36
- export declare const CONTROL_STRINGS: Record<'en' | 'es', ControlStrings>;
36
+ export declare const CONTROL_STRINGS: Record<'en' | 'es' | 'zh-CN', ControlStrings>;
37
37
  export declare function controlStrings(locale?: string | undefined): ControlStrings;
@@ -9,5 +9,5 @@ export interface CompareStrings {
9
9
  thresholdShort: string;
10
10
  historyFailedShort: (n: number) => string;
11
11
  }
12
- export declare const COMPARE_STRINGS: Record<'en' | 'es', CompareStrings>;
12
+ export declare const COMPARE_STRINGS: Record<'en' | 'es' | 'zh-CN', CompareStrings>;
13
13
  export declare function compareStrings(locale?: string | undefined): CompareStrings;
@@ -16,5 +16,5 @@ export interface EventMarkerStrings {
16
16
  notInRecording: Record<EventKind, string>;
17
17
  failed: Record<EventKind, string>;
18
18
  }
19
- export declare const EVENT_MARKER_STRINGS: Record<'en' | 'es', EventMarkerStrings>;
19
+ export declare const EVENT_MARKER_STRINGS: Record<'en' | 'es' | 'zh-CN', EventMarkerStrings>;
20
20
  export declare function eventMarkerStrings(locale?: string | undefined): EventMarkerStrings;
@@ -32,5 +32,5 @@ export interface FleetStrings {
32
32
  sortBy: (column: string) => string;
33
33
  drill: (device: string) => string;
34
34
  }
35
- export declare const FLEET_STRINGS: Record<'en' | 'es', FleetStrings>;
35
+ export declare const FLEET_STRINGS: Record<'en' | 'es' | 'zh-CN', FleetStrings>;
36
36
  export declare function fleetStrings(locale?: string | undefined): FleetStrings;
@@ -16,5 +16,5 @@ export interface HistoryStrings {
16
16
  previous: string;
17
17
  next: string;
18
18
  }
19
- export declare const HISTORY_STRINGS: Record<'en' | 'es', HistoryStrings>;
19
+ export declare const HISTORY_STRINGS: Record<'en' | 'es' | 'zh-CN', HistoryStrings>;
20
20
  export declare function historyStrings(): HistoryStrings;
@@ -3,7 +3,7 @@ import {
3
3
  TenantBasemapProvider,
4
4
  useMapRuntime,
5
5
  useTenantBasemap
6
- } from "./chunks/chunk-QHTO5ZEM.js";
6
+ } from "./chunks/chunk-UDQVBVXJ.js";
7
7
  export {
8
8
  MapRuntimeProvider,
9
9
  TenantBasemapProvider,
package/dist/index.d.ts CHANGED
@@ -7,10 +7,20 @@ export { builtinWidgetCatalog, builtinWidgetDescriptors, builtinWidgetDefinition
7
7
  export { builtinWidgetDefinitions as builtinWidgetDefinitionsWithoutDocs } from './builtin-registry';
8
8
  export { preloadWidgets } from './preload';
9
9
  export { WIDGET_CHANNEL, WIDGET_BINDS_DATASOURCE, type WidgetChannel } from './registry';
10
- export { pickSample, optBoolean, type WidgetProps, type WidgetComponent } from '@devicechain/widget-sdk';
10
+ export {
11
+ /** @deprecated Import pickSample from `@devicechain/widget-sdk` instead. */
12
+ pickSample,
13
+ /** @deprecated Import optBoolean from `@devicechain/widget-sdk` instead. */
14
+ optBoolean,
15
+ /** @deprecated Import WidgetProps from `@devicechain/widget-sdk` instead. */
16
+ type WidgetProps,
17
+ /** @deprecated Import WidgetComponent from `@devicechain/widget-sdk` instead. */
18
+ type WidgetComponent, } from '@devicechain/widget-sdk';
11
19
  export { TenantBasemapProvider, useTenantBasemap } from './basemap-context';
12
20
  export { MapRuntimeProvider, useMapRuntime, type MapRuntime } from './map-runtime-context';
13
- export { validateWidgetOptions, numberOptionSpec, clampNumberOption, enumOptionValues, type WidgetOptions, type WidgetOptionSpecs, type OptionSpec, type StringOptionSpec, type NumberOptionSpec, type BooleanOptionSpec, type EnumOptionSpec, type ListItemFieldSpec, type ListOptionSpec, type OptionIssue, type OptionIssueCode, } from './options';
21
+ export { validateWidgetOptions, numberOptionSpec, clampNumberOption, enumOptionValues, type WidgetOptions, type WidgetOptionSpecs, type OptionSpec, type StringOptionSpec, type NumberOptionSpec, type BooleanOptionSpec, type EnumOptionSpec, type ListItemFieldSpec, type ListOptionSpec,
22
+ /** @deprecated Use BuiltinOptionIssue from `@devicechain/widgets` instead. */
23
+ type OptionIssue, type OptionIssue as BuiltinOptionIssue, type OptionIssueCode, } from './options';
14
24
  export { validateDefinitionOptions, stripUnknownOptions, type DefinitionOptionIssue, type DefinitionValidationOptions, } from './definition-options';
15
25
  export { LatestCard } from './widgets/latest-card';
16
26
  export { Gauge } from './widgets/gauge';
@@ -28,5 +38,103 @@ export { placeable, projectToPanel, describePosition, formatDegrees, rasterStyle
28
38
  export { severityColor, severityLabel, severityRank, highestSeverity, } from './widgets/severity';
29
39
  export { commandStatusColor, commandStatusLabel, isTerminalStatus } from './widgets/command-status';
30
40
  export { parseParameterSchema, defaultValues, validateParams, buildPayload, isScalar, } from './widgets/command-params';
31
- export { WidgetFrame, WidgetSubjectProvider, WidgetSelectProvider, useWidgetSelect, WidgetTimeZoneProvider, useWidgetTimeZone, WidgetThemeRootProvider, useWidgetThemeRoot, WidgetCandidatesProvider, useWidgetCandidates, useFlashOnChange, flashTextStyle, flashBackgroundStyle, FlashValue, fitValueFont, useMeasurementStream, useAlarmStream, useCommandStream, useLocationStream, useDatasourceAvailability, useDashboardHub, useHubConnectionState, HubConnectionBadge, useResolvedBindings, useViewerBindings, useSlotCandidates, useCandidates, css, type FlashDirection, type WidgetFrameProps, type WidgetSelect, type WidgetCandidates, type MeasurementStreamState, type AlarmStreamState, type CommandStreamState, type LocationStreamState, type CandidatesState, type DatasourceAvailability, type HubConnectionBadgeProps, type ThemeVar, } from '@devicechain/widget-sdk';
32
- export { EChart, buildLineOption, buildGaugeOption, resolveChartTheme, useChartTheme, type EChartOption, type LineChartOptions, type GaugeChartOptions, type ChartTheme, } from '@devicechain/widget-sdk/echarts';
41
+ export {
42
+ /** @deprecated Import WidgetFrame from `@devicechain/widget-sdk` instead. */
43
+ WidgetFrame,
44
+ /** @deprecated Import WidgetSubjectProvider from `@devicechain/widget-sdk` instead. */
45
+ WidgetSubjectProvider,
46
+ /** @deprecated Import WidgetSelectProvider from `@devicechain/widget-sdk` instead. */
47
+ WidgetSelectProvider,
48
+ /** @deprecated Import useWidgetSelect from `@devicechain/widget-sdk` instead. */
49
+ useWidgetSelect,
50
+ /** @deprecated Import WidgetTimeZoneProvider from `@devicechain/widget-sdk` instead. */
51
+ WidgetTimeZoneProvider,
52
+ /** @deprecated Import useWidgetTimeZone from `@devicechain/widget-sdk` instead. */
53
+ useWidgetTimeZone,
54
+ /** @deprecated Import WidgetThemeRootProvider from `@devicechain/widget-sdk` instead. */
55
+ WidgetThemeRootProvider,
56
+ /** @deprecated Import useWidgetThemeRoot from `@devicechain/widget-sdk` instead. */
57
+ useWidgetThemeRoot,
58
+ /** @deprecated Import WidgetCandidatesProvider from `@devicechain/widget-sdk` instead. */
59
+ WidgetCandidatesProvider,
60
+ /** @deprecated Import useWidgetCandidates from `@devicechain/widget-sdk` instead. */
61
+ useWidgetCandidates,
62
+ /** @deprecated Import useFlashOnChange from `@devicechain/widget-sdk` instead. */
63
+ useFlashOnChange,
64
+ /** @deprecated Import flashTextStyle from `@devicechain/widget-sdk` instead. */
65
+ flashTextStyle,
66
+ /** @deprecated Import flashBackgroundStyle from `@devicechain/widget-sdk` instead. */
67
+ flashBackgroundStyle,
68
+ /** @deprecated Import FlashValue from `@devicechain/widget-sdk` instead. */
69
+ FlashValue,
70
+ /** @deprecated Import fitValueFont from `@devicechain/widget-sdk` instead. */
71
+ fitValueFont,
72
+ /** @deprecated Import useMeasurementStream from `@devicechain/widget-sdk` instead. */
73
+ useMeasurementStream,
74
+ /** @deprecated Import useAlarmStream from `@devicechain/widget-sdk` instead. */
75
+ useAlarmStream,
76
+ /** @deprecated Import useCommandStream from `@devicechain/widget-sdk` instead. */
77
+ useCommandStream,
78
+ /** @deprecated Import useLocationStream from `@devicechain/widget-sdk` instead. */
79
+ useLocationStream,
80
+ /** @deprecated Import useDatasourceAvailability from `@devicechain/widget-sdk` instead. */
81
+ useDatasourceAvailability,
82
+ /** @deprecated Import useDashboardHub from `@devicechain/widget-sdk` instead. */
83
+ useDashboardHub,
84
+ /** @deprecated Import useHubConnectionState from `@devicechain/widget-sdk` instead. */
85
+ useHubConnectionState,
86
+ /** @deprecated Import HubConnectionBadge from `@devicechain/widget-sdk` instead. */
87
+ HubConnectionBadge,
88
+ /** @deprecated Import useResolvedBindings from `@devicechain/widget-sdk` instead. */
89
+ useResolvedBindings,
90
+ /** @deprecated Import useViewerBindings from `@devicechain/widget-sdk` instead. */
91
+ useViewerBindings,
92
+ /** @deprecated Import useSlotCandidates from `@devicechain/widget-sdk` instead. */
93
+ useSlotCandidates,
94
+ /** @deprecated Import useCandidates from `@devicechain/widget-sdk` instead. */
95
+ useCandidates,
96
+ /** @deprecated Import css from `@devicechain/widget-sdk` instead. */
97
+ css,
98
+ /** @deprecated Import FlashDirection from `@devicechain/widget-sdk` instead. */
99
+ type FlashDirection,
100
+ /** @deprecated Import WidgetFrameProps from `@devicechain/widget-sdk` instead. */
101
+ type WidgetFrameProps,
102
+ /** @deprecated Import WidgetSelect from `@devicechain/widget-sdk` instead. */
103
+ type WidgetSelect,
104
+ /** @deprecated Import WidgetCandidates from `@devicechain/widget-sdk` instead. */
105
+ type WidgetCandidates,
106
+ /** @deprecated Import MeasurementStreamState from `@devicechain/widget-sdk` instead. */
107
+ type MeasurementStreamState,
108
+ /** @deprecated Import AlarmStreamState from `@devicechain/widget-sdk` instead. */
109
+ type AlarmStreamState,
110
+ /** @deprecated Import CommandStreamState from `@devicechain/widget-sdk` instead. */
111
+ type CommandStreamState,
112
+ /** @deprecated Import LocationStreamState from `@devicechain/widget-sdk` instead. */
113
+ type LocationStreamState,
114
+ /** @deprecated Import CandidatesState from `@devicechain/widget-sdk` instead. */
115
+ type CandidatesState,
116
+ /** @deprecated Import DatasourceAvailability from `@devicechain/widget-sdk` instead. */
117
+ type DatasourceAvailability,
118
+ /** @deprecated Import HubConnectionBadgeProps from `@devicechain/widget-sdk` instead. */
119
+ type HubConnectionBadgeProps,
120
+ /** @deprecated Import ThemeVar from `@devicechain/widget-sdk` instead. */
121
+ type ThemeVar, } from '@devicechain/widget-sdk';
122
+ export {
123
+ /** @deprecated Import EChart from `@devicechain/widget-sdk/echarts` instead. */
124
+ EChart,
125
+ /** @deprecated Import buildLineOption from `@devicechain/widget-sdk/echarts` instead. */
126
+ buildLineOption,
127
+ /** @deprecated Import buildGaugeOption from `@devicechain/widget-sdk/echarts` instead. */
128
+ buildGaugeOption,
129
+ /** @deprecated Import resolveChartTheme from `@devicechain/widget-sdk/echarts` instead. */
130
+ resolveChartTheme,
131
+ /** @deprecated Import useChartTheme from `@devicechain/widget-sdk/echarts` instead. */
132
+ useChartTheme,
133
+ /** @deprecated Import EChartOption from `@devicechain/widget-sdk/echarts` instead. */
134
+ type EChartOption,
135
+ /** @deprecated Import LineChartOptions from `@devicechain/widget-sdk/echarts` instead. */
136
+ type LineChartOptions,
137
+ /** @deprecated Import GaugeChartOptions from `@devicechain/widget-sdk/echarts` instead. */
138
+ type GaugeChartOptions,
139
+ /** @deprecated Import ChartTheme from `@devicechain/widget-sdk/echarts` instead. */
140
+ type ChartTheme, } from '@devicechain/widget-sdk/echarts';