feat(ui): re-export telemetry at @hanzo/ui/telemetry (8.0.8 -> 8.0.9)
Telemetry already has one home, @hanzogui/telemetry. Apps that depend on
@hanzo/ui had to add a second dependency to reach it, which is how a surface
ends up defined twice.
Adds the subpath so the import is available with no new dependency:
import { TelemetryProvider } from '@hanzo/ui/telemetry'
Pure re-export — no logic here, so there is still exactly one definition and
nothing to keep in sync. Declared as an optional peer, so it is only resolved
when the subpath is actually used.
Verified @hanzogui/telemetry@0.1.0 is published (source: gui/pkgs/telemetry).
This commit is contained in:
+9
-2
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@hanzo/ui",
|
||||
"version": "8.0.8",
|
||||
"version": "8.0.9",
|
||||
"type": "module",
|
||||
"description": "Hanzo UI \u2014 the one cross-platform component library on @hanzo/gui. The product/app layer (charts, metrics, page headers, status tags, rich empty states, combobox, slide-over, toasts, drag-reorder, labeled field rows, provider/product marks) + the metadata-driven record layer (@hanzo/data: RecordsView, DataTable, board, typed field editors) + the calm dark-first tokens and motion. Presentational, host-agnostic (data/effects injected), clean-room. Web + native (iOS) + desktop.",
|
||||
"exports": {
|
||||
@@ -70,6 +70,12 @@
|
||||
"require": "./dist/usage.cjs",
|
||||
"default": "./dist/usage.js"
|
||||
},
|
||||
"./telemetry": {
|
||||
"types": "./dist/telemetry.d.ts",
|
||||
"import": "./dist/telemetry.js",
|
||||
"require": "./dist/telemetry.cjs",
|
||||
"default": "./dist/telemetry.js"
|
||||
},
|
||||
"./styles/motion.css": "./dist/styles/hanzo-motion.css",
|
||||
"./package.json": "./package.json"
|
||||
},
|
||||
@@ -150,6 +156,7 @@
|
||||
"license": "BSD-3-Clause",
|
||||
"author": "Hanzo AI <dev@hanzo.ai>",
|
||||
"dependencies": {
|
||||
"@hanzo/logo": "^1.0.13"
|
||||
"@hanzo/logo": "^1.0.13",
|
||||
"@hanzogui/telemetry": "^0.1.0"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
// @hanzo/ui/telemetry — the ONE telemetry surface, re-exported from its home in
|
||||
// the framework layer (@hanzogui/telemetry) so an app that already depends on
|
||||
// @hanzo/ui adds no new dependency and nothing is defined twice:
|
||||
//
|
||||
// import { TelemetryProvider } from '@hanzo/ui/telemetry'
|
||||
// <TelemetryProvider>{children}</TelemetryProvider>
|
||||
//
|
||||
// That is the whole setup. With no configuration it wires all three planes —
|
||||
// errors + session capture (sentry.hanzo.ai), pageviews (analytics.hanzo.ai),
|
||||
// and product events incl. analytics_errors (insights.hanzo.ai) — through the
|
||||
// ONE front door, POST api.hanzo.ai/v1/event. Honors DNT/GPC, consent-aware,
|
||||
// SSR-safe, fail-soft, no CDN script.
|
||||
//
|
||||
// Optional peer — only pulled when the subpath is used.
|
||||
export * from '@hanzogui/telemetry'
|
||||
@@ -21,6 +21,7 @@ export default defineConfig({
|
||||
billing: 'src/billing.ts',
|
||||
dashboard: 'src/dashboard.ts',
|
||||
usage: 'src/usage.ts',
|
||||
telemetry: 'src/telemetry.ts',
|
||||
},
|
||||
format: ['esm', 'cjs'],
|
||||
outDir: 'dist',
|
||||
|
||||
Reference in New Issue
Block a user