events.ts — ui Source File
Architecture documentation for events.ts, a typescript file in the ui codebase. 2 imports, 0 dependents.
Entity Profile
Dependency Diagram
graph LR 61b36e58_e757_00ca_49aa_66eb9023ffc8["events.ts"] 3e86e93a_5f16_ded6_e0c4_1a91ee73a159["analytics"] 61b36e58_e757_00ca_49aa_66eb9023ffc8 --> 3e86e93a_5f16_ded6_e0c4_1a91ee73a159 6802ce19_522d_e5fb_e458_8826d9f6952e["zod"] 61b36e58_e757_00ca_49aa_66eb9023ffc8 --> 6802ce19_522d_e5fb_e458_8826d9f6952e style 61b36e58_e757_00ca_49aa_66eb9023ffc8 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
import va from "@vercel/analytics"
import { z } from "zod"
const eventSchema = z.object({
name: z.enum([
"copy_npm_command",
"copy_usage_import_code",
"copy_usage_code",
"copy_primitive_code",
"copy_theme_code",
"copy_block_code",
"copy_chunk_code",
"enable_lift_mode",
"copy_chart_code",
"copy_chart_theme",
"copy_chart_data",
"copy_color",
]),
// declare type AllowedPropertyValues = string | number | boolean | null
properties: z
.record(z.union([z.string(), z.number(), z.boolean(), z.null()]))
.optional(),
})
export type Event = z.infer<typeof eventSchema>
export function trackEvent(input: Event): void {
const event = eventSchema.parse(input)
if (event) {
va.track(event.name, event.properties)
}
}
Domain
Subdomains
Functions
Types
Dependencies
- analytics
- zod
Source
Frequently Asked Questions
What does events.ts do?
events.ts is a source file in the ui codebase, written in typescript. It belongs to the ComponentRegistry domain, Styles subdomain.
What functions are defined in events.ts?
events.ts defines 1 function(s): trackEvent.
What does events.ts depend on?
events.ts imports 2 module(s): analytics, zod.
Where is events.ts in the architecture?
events.ts is located at deprecated/www/lib/events.ts (domain: ComponentRegistry, subdomain: Styles, directory: deprecated/www/lib).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free