@burdenoff/website-sdk 0.0.0-dev

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 (119) hide show
  1. package/LICENSE +24 -0
  2. package/README.md +357 -0
  3. package/dist/analytics/index.d.mts +27 -0
  4. package/dist/analytics/index.d.ts +27 -0
  5. package/dist/analytics/index.js +36 -0
  6. package/dist/analytics/index.js.map +1 -0
  7. package/dist/analytics/index.mjs +34 -0
  8. package/dist/analytics/index.mjs.map +1 -0
  9. package/dist/client/index.d.mts +29 -0
  10. package/dist/client/index.d.ts +29 -0
  11. package/dist/client/index.js +261 -0
  12. package/dist/client/index.js.map +1 -0
  13. package/dist/client/index.mjs +255 -0
  14. package/dist/client/index.mjs.map +1 -0
  15. package/dist/components/contact.d.mts +144 -0
  16. package/dist/components/contact.d.ts +144 -0
  17. package/dist/components/contact.js +806 -0
  18. package/dist/components/contact.js.map +1 -0
  19. package/dist/components/contact.mjs +780 -0
  20. package/dist/components/contact.mjs.map +1 -0
  21. package/dist/components/electron-download.d.mts +32 -0
  22. package/dist/components/electron-download.d.ts +32 -0
  23. package/dist/components/electron-download.js +131 -0
  24. package/dist/components/electron-download.js.map +1 -0
  25. package/dist/components/electron-download.mjs +108 -0
  26. package/dist/components/electron-download.mjs.map +1 -0
  27. package/dist/components/launch-countdown.d.mts +15 -0
  28. package/dist/components/launch-countdown.d.ts +15 -0
  29. package/dist/components/launch-countdown.js +89 -0
  30. package/dist/components/launch-countdown.js.map +1 -0
  31. package/dist/components/launch-countdown.mjs +87 -0
  32. package/dist/components/launch-countdown.mjs.map +1 -0
  33. package/dist/components/newsletter.d.mts +155 -0
  34. package/dist/components/newsletter.d.ts +155 -0
  35. package/dist/components/newsletter.js +880 -0
  36. package/dist/components/newsletter.js.map +1 -0
  37. package/dist/components/newsletter.mjs +854 -0
  38. package/dist/components/newsletter.mjs.map +1 -0
  39. package/dist/components/partners.d.mts +88 -0
  40. package/dist/components/partners.d.ts +88 -0
  41. package/dist/components/partners.js +1169 -0
  42. package/dist/components/partners.js.map +1 -0
  43. package/dist/components/partners.mjs +1143 -0
  44. package/dist/components/partners.mjs.map +1 -0
  45. package/dist/components/pricing.d.mts +194 -0
  46. package/dist/components/pricing.d.ts +194 -0
  47. package/dist/components/pricing.js +813 -0
  48. package/dist/components/pricing.js.map +1 -0
  49. package/dist/components/pricing.mjs +791 -0
  50. package/dist/components/pricing.mjs.map +1 -0
  51. package/dist/components/problems-solved.d.mts +37 -0
  52. package/dist/components/problems-solved.d.ts +37 -0
  53. package/dist/components/problems-solved.js +157 -0
  54. package/dist/components/problems-solved.js.map +1 -0
  55. package/dist/components/problems-solved.mjs +135 -0
  56. package/dist/components/problems-solved.mjs.map +1 -0
  57. package/dist/components/resource-links.d.mts +28 -0
  58. package/dist/components/resource-links.d.ts +28 -0
  59. package/dist/components/resource-links.js +229 -0
  60. package/dist/components/resource-links.js.map +1 -0
  61. package/dist/components/resource-links.mjs +227 -0
  62. package/dist/components/resource-links.mjs.map +1 -0
  63. package/dist/components/social-links.d.mts +37 -0
  64. package/dist/components/social-links.d.ts +37 -0
  65. package/dist/components/social-links.js +268 -0
  66. package/dist/components/social-links.js.map +1 -0
  67. package/dist/components/social-links.mjs +266 -0
  68. package/dist/components/social-links.mjs.map +1 -0
  69. package/dist/components/unsubscribe.d.mts +14 -0
  70. package/dist/components/unsubscribe.d.ts +14 -0
  71. package/dist/components/unsubscribe.js +538 -0
  72. package/dist/components/unsubscribe.js.map +1 -0
  73. package/dist/components/unsubscribe.mjs +517 -0
  74. package/dist/components/unsubscribe.mjs.map +1 -0
  75. package/dist/components/waitlist.d.mts +70 -0
  76. package/dist/components/waitlist.d.ts +70 -0
  77. package/dist/components/waitlist.js +864 -0
  78. package/dist/components/waitlist.js.map +1 -0
  79. package/dist/components/waitlist.mjs +841 -0
  80. package/dist/components/waitlist.mjs.map +1 -0
  81. package/dist/components/website-switcher.d.mts +27 -0
  82. package/dist/components/website-switcher.d.ts +27 -0
  83. package/dist/components/website-switcher.js +168 -0
  84. package/dist/components/website-switcher.js.map +1 -0
  85. package/dist/components/website-switcher.mjs +146 -0
  86. package/dist/components/website-switcher.mjs.map +1 -0
  87. package/dist/content/index.d.mts +247 -0
  88. package/dist/content/index.d.ts +247 -0
  89. package/dist/content/index.js +2458 -0
  90. package/dist/content/index.js.map +1 -0
  91. package/dist/content/index.mjs +2428 -0
  92. package/dist/content/index.mjs.map +1 -0
  93. package/dist/index.d.mts +72 -0
  94. package/dist/index.d.ts +72 -0
  95. package/dist/index.js +6273 -0
  96. package/dist/index.js.map +1 -0
  97. package/dist/index.mjs +6204 -0
  98. package/dist/index.mjs.map +1 -0
  99. package/dist/product/index.d.mts +94 -0
  100. package/dist/product/index.d.ts +94 -0
  101. package/dist/product/index.js +282 -0
  102. package/dist/product/index.js.map +1 -0
  103. package/dist/product/index.mjs +278 -0
  104. package/dist/product/index.mjs.map +1 -0
  105. package/dist/provider-D7Rij9UM.d.mts +86 -0
  106. package/dist/provider-D7Rij9UM.d.ts +86 -0
  107. package/dist/seo/index.d.mts +64 -0
  108. package/dist/seo/index.d.ts +64 -0
  109. package/dist/seo/index.js +61 -0
  110. package/dist/seo/index.js.map +1 -0
  111. package/dist/seo/index.mjs +59 -0
  112. package/dist/seo/index.mjs.map +1 -0
  113. package/dist/utils/index.d.mts +21 -0
  114. package/dist/utils/index.d.ts +21 -0
  115. package/dist/utils/index.js +12 -0
  116. package/dist/utils/index.js.map +1 -0
  117. package/dist/utils/index.mjs +10 -0
  118. package/dist/utils/index.mjs.map +1 -0
  119. package/package.json +168 -0
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/client/security.ts","../../src/client/graphql-client.ts","../../src/client/provider.tsx","../../src/product/product-provider.tsx","../../src/seo/page-head.tsx","../../src/utils/cn.ts","../../src/ui/button.tsx","../../src/ui/input.tsx","../../src/ui/label.tsx","../../src/ui/textarea.tsx","../../src/components/waitlist.tsx"],"names":["createContext","useContext","jsx","React2","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A,gBACX,QAAA,EAAA;AAAA;AAAA,aAED;AAAA,4BAEFA,GAAAA;AAAA,cAAC,KAAA;AAAA,cAAA;AAAA,gBACC,EAAA,EAAG,uBAAA;AAAA,gBACH,IAAA,EAAK,OAAA;AAAA,gBACL,WAAA,EAAY,kBAAA;AAAA,gBACZ,KAAA,EAAO,KAAA;AAAA,gBACP,UAAU,CAAC,CAAA,KAAM,QAAA,CAAS,CAAA,CAAE,OAAO,KAAK,CAAA;AAAA,gBACxC,QAAA,EAAU,SAAA;AAAA,gBACV,QAAA,EAAQ,IAAA;AAAA,gBACR,SAAA,EAAU;AAAA;AAAA;AACZ,WAAA,EACF,CAAA;AAAA,0BACAA,GAAAA;AAAA,YAAC,MAAA;AAAA,YAAA;AAAA,cACC,IAAA,EAAK,QAAA;AAAA,cACL,QAAA,EAAU,SAAA;AAAA,cACV,SAAA,EAAW,WAAW,mBAAA,GAAsB,QAAA;AAAA,cAE3C,sBAAY,YAAA,GAAe;AAAA;AAAA;AAC9B;AAAA;AAAA;AACF,GAAA,EACF,CAAA;AAEJ","file":"waitlist.mjs","sourcesContent":["const LOOPBACK_HOSTS = new Set([\"localhost\", \"127.0.0.1\", \"::1\"]);\nconst RESERVED_HEADERS = new Set([\n \"authorization\",\n \"cookie\",\n \"x-actor-id\",\n \"x-actor-type\",\n \"x-consent-granted-by\",\n \"x-consent-scope\",\n \"x-consent-granted-at\",\n \"x-consent-expires-at\",\n]);\n\nexport function validateGatewayUrl(value: string): string {\n let url: URL;\n\n try {\n url = new URL(value);\n } catch {\n throw new Error(\"Gateway URL must be a valid absolute URL\");\n }\n\n if (url.protocol === \"https:\") {\n return url.toString();\n }\n\n if (\n url.protocol === \"http:\" &&\n LOOPBACK_HOSTS.has(url.hostname.toLowerCase())\n ) {\n return url.toString();\n }\n\n throw new Error(\"Gateway URL must use HTTPS unless it targets localhost\");\n}\n\nexport function sanitizeHeaders(\n headers?: Record<string, string>,\n): Record<string, string> | undefined {\n if (!headers) return undefined;\n\n return Object.fromEntries(\n Object.entries(headers).filter(\n ([key]) => !RESERVED_HEADERS.has(key.toLowerCase()),\n ),\n );\n}\n","/**\n * Lightweight GraphQL client for the Burdenoff Web SDK.\n * Uses native fetch - zero external dependencies.\n * All calls are unauthenticated (public gateway operations only).\n */\n\nimport { sanitizeHeaders, validateGatewayUrl } from \"./security\";\n\nexport interface WebSDKClientConfig {\n /** Global public gateway URL (e.g. \"https://api.burdenoff.com/global/graphql\") */\n gatewayUrl: string;\n /** Platform product ID for scoping operations */\n productId: string;\n /** Product slug (used for public product queries) */\n productSlug?: string;\n /** reCAPTCHA site key (if not fetched from product config) */\n recaptchaSiteKey?: string;\n /** Rybbit analytics site ID */\n rybbitSiteId?: string;\n /** Custom headers to include in all requests */\n headers?: Record<string, string>;\n}\n\nexport interface GraphQLResponse<T = Record<string, unknown>> {\n data?: T;\n errors?: Array<{\n message: string;\n locations?: Array<{ line: number; column: number }>;\n path?: Array<string | number>;\n extensions?: Record<string, unknown>;\n }>;\n}\n\nexport class WebSDKClient {\n private config: WebSDKClientConfig;\n private queryCache = new Map<\n string,\n { data: GraphQLResponse<unknown>; ts: number }\n >();\n private inflight = new Map<string, Promise<GraphQLResponse<unknown>>>();\n private static CACHE_TTL = 5 * 60 * 1000; // 5 minutes\n private static MAX_CACHE_ENTRIES = 100;\n\n constructor(config: WebSDKClientConfig) {\n this.config = {\n ...config,\n gatewayUrl: validateGatewayUrl(config.gatewayUrl),\n headers: sanitizeHeaders(config.headers),\n };\n }\n\n getConfig(): WebSDKClientConfig {\n return this.config;\n }\n\n /**\n * Execute a GraphQL query (with deduplication and caching)\n */\n async query<T = Record<string, unknown>>(\n query: string,\n variables?: Record<string, unknown>,\n ): Promise<GraphQLResponse<T>> {\n const cacheKey = JSON.stringify({ query, variables });\n\n // Return cached response if still valid, evict if expired\n const cached = this.queryCache.get(cacheKey);\n if (cached) {\n if (Date.now() - cached.ts < WebSDKClient.CACHE_TTL) {\n return cached.data as GraphQLResponse<T>;\n }\n this.queryCache.delete(cacheKey);\n }\n\n // Deduplicate: if same query is already in-flight, reuse the promise\n const existing = this.inflight.get(cacheKey);\n if (existing) {\n return existing as Promise<GraphQLResponse<T>>;\n }\n\n const promise = this.request<T>(query, variables)\n .then((result) => {\n // Cache successful responses only\n if (result.data && !result.errors?.length) {\n if (this.queryCache.size >= WebSDKClient.MAX_CACHE_ENTRIES) {\n const oldestEntry = this.queryCache.keys().next().value;\n if (oldestEntry) {\n this.queryCache.delete(oldestEntry);\n }\n }\n this.queryCache.set(cacheKey, { data: result, ts: Date.now() });\n }\n return result;\n })\n .finally(() => {\n this.inflight.delete(cacheKey);\n });\n\n this.inflight.set(cacheKey, promise);\n return promise;\n }\n\n /**\n * Execute a GraphQL mutation\n */\n async mutate<T = Record<string, unknown>>(\n mutation: string,\n variables?: Record<string, unknown>,\n ): Promise<GraphQLResponse<T>> {\n return this.request<T>(mutation, variables);\n }\n\n private async request<T>(\n query: string,\n variables?: Record<string, unknown>,\n ): Promise<GraphQLResponse<T>> {\n try {\n const response = await fetch(this.config.gatewayUrl, {\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"x-product-id\": this.config.productId,\n ...this.config.headers,\n },\n body: JSON.stringify({ query, variables }),\n });\n\n if (!response.ok) {\n console.error(\n \"[WebSDK] GraphQL request failed\",\n response.status,\n response.statusText,\n );\n return {\n errors: [\n {\n message: `HTTP ${response.status}: ${response.statusText}`,\n extensions: { code: `HTTP_${response.status}` },\n },\n ],\n };\n }\n\n return (await response.json()) as GraphQLResponse<T>;\n } catch (error) {\n console.error(\n \"[WebSDK] Network error\",\n error instanceof Error ? error.message : \"unknown error\",\n );\n return {\n errors: [\n {\n message: error instanceof Error ? error.message : \"Network error\",\n extensions: { code: \"NETWORK_ERROR\" },\n },\n ],\n };\n }\n }\n}\n","/**\n * React context provider for the Web SDK client.\n * Wraps the application with WebSDKClient configuration.\n */\n\"use client\";\n\nimport { createContext, useContext, useMemo } from \"react\";\nimport type { ReactNode } from \"react\";\n\nimport { resolveGatewayUrl } from \"./gateway-resolver\";\nimport { WebSDKClient, type WebSDKClientConfig } from \"./graphql-client\";\n\nconst WebSDKContext = createContext<WebSDKClient | null>(null);\n\nexport interface WebSDKProviderProps {\n /** SDK client configuration */\n config: WebSDKClientConfig;\n /** Child components */\n children: ReactNode;\n}\n\n/**\n * Provider component that makes the WebSDKClient available to all child components.\n *\n * @example\n * ```tsx\n * <WebSDKProvider config={{\n * gatewayUrl: \"https://api.burdenoff.com/global/graphql\",\n * productId: \"your-product-id\",\n * productSlug: \"your-product\",\n * }}>\n * <App />\n * </WebSDKProvider>\n * ```\n */\nexport function WebSDKProvider({ config, children }: WebSDKProviderProps) {\n const client = useMemo(() => {\n const resolvedConfig = {\n ...config,\n gatewayUrl: resolveGatewayUrl(config.gatewayUrl),\n };\n return new WebSDKClient(resolvedConfig);\n }, [config]);\n\n return (\n <WebSDKContext.Provider value={client}>{children}</WebSDKContext.Provider>\n );\n}\n\n/**\n * Hook to access the WebSDKClient instance.\n * Must be used within a WebSDKProvider.\n */\nexport function useWebSDK(): WebSDKClient {\n const client = useContext(WebSDKContext);\n if (!client) {\n throw new Error(\"useWebSDK must be used within a WebSDKProvider\");\n }\n return client;\n}\n\n/**\n * Hook to access the SDK configuration.\n * Useful for components that need config values like productId, recaptchaSiteKey, etc.\n */\nexport function useWebSDKConfig(): WebSDKClientConfig {\n const client = useWebSDK();\n return client.getConfig();\n}\n","/**\n * Product Provider\n *\n * React context and hooks for accessing product metadata from the global tenant service.\n * Fetches product info (name, logo, SEO, contact, reCAPTCHA key, etc.) on mount\n * and provides it to all child components.\n */\n\"use client\";\n\nimport {\n createContext,\n useContext,\n useState,\n useLayoutEffect,\n useCallback,\n useMemo,\n} from \"react\";\nimport type { ReactNode } from \"react\";\n\nimport { useWebSDK, useWebSDKConfig } from \"../client/provider\";\n\n// ============================================================================\n// Types\n// ============================================================================\n\nexport interface ProductData {\n id: string;\n name: string;\n slug: string;\n description?: string | null;\n status: string;\n logoUrl?: string | null;\n website?: string | null;\n appUrl?: string | null;\n docsUrl?: string | null;\n contactEmail?: string | null;\n supportEmail?: string | null;\n contactPhone?: string | null;\n contactAddress?: string | null;\n seoTitle?: string | null;\n seoDescription?: string | null;\n seoKeywords?: string | null;\n ogImage?: string | null;\n socialLinks?: Record<string, string> | null;\n /**\n * Resource links for the website footer \"Resources\" column\n * (JSON: { docs, community, careers, team, companies, ... }).\n * Same shape as socialLinks. Free-form keys; the ResourceLinks\n * component renders known keys and silently ignores the rest.\n * Backed by Product.resourceLinks on the backend (global-tenant-svc).\n */\n resourceLinks?: Record<string, string> | null;\n recaptchaSiteKey?: string | null;\n rybbitSiteId?: string | null;\n notificationEmail?: string | null;\n metadata?: Record<string, unknown> | null;\n}\n\nexport interface ProductProviderProps {\n /** Child components */\n children: ReactNode;\n /** Optional fallback product data (used while loading) */\n fallback?: Partial<ProductData>;\n}\n\n// ============================================================================\n// GraphQL Query\n// ============================================================================\n\n/**\n * Body of fields requested for every product fetch — shared by the primary\n * query and the legacy-backend fallback below. Kept as a string fragment\n * (not a real GraphQL `fragment` block) so we can append/strip\n * `resourceLinks` without touching anything else.\n */\nconst PRODUCT_FIELDS_BASE = `\n id\n name\n slug\n description\n status\n logoUrl\n website\n appUrl\n docsUrl\n contactEmail\n supportEmail\n contactPhone\n contactAddress\n seoTitle\n seoDescription\n seoKeywords\n ogImage\n socialLinks\n recaptchaSiteKey\n rybbitSiteId\n notificationEmail\n metadata\n`;\n\n/**\n * Primary query — includes the recently-added `resourceLinks` field.\n * Backends that have run the corresponding `global-tenant-svc` migration\n * (PR #64) expose this field; older ones don't, in which case\n * GraphQL validation rejects the whole query with\n * `Cannot query field \"resourceLinks\" on type \"PublicProduct\"`. The fetch\n * helper detects that specific error and transparently retries the\n * fallback below, so the SDK works on both pre- and post-migration\n * deployments without consumer-side gating.\n */\nconst PUBLIC_PRODUCT_QUERY = `\n query PublicProduct($slug: String!) {\n publicProduct(slug: $slug) {\n ${PRODUCT_FIELDS_BASE}\n resourceLinks\n }\n }\n`;\n\n/**\n * Fallback query for older backend deployments. Identical to the primary\n * minus `resourceLinks`. Consumers see `product.resourceLinks === undefined`\n * and any consumer (e.g. `<ResourceLinks/>`) falls through to prop / default\n * resolution paths.\n */\nconst PUBLIC_PRODUCT_QUERY_FALLBACK = `\n query PublicProductFallback($slug: String!) {\n publicProduct(slug: $slug) {\n ${PRODUCT_FIELDS_BASE}\n }\n }\n`;\n\n// ============================================================================\n// Context\n// ============================================================================\n\ninterface ProductContextValue {\n product: ProductData | null;\n loading: boolean;\n error: string | null;\n hasProvider: boolean;\n refetch: () => void;\n}\n\nconst ProductContext = createContext<ProductContextValue>({\n product: null,\n loading: true,\n error: null,\n hasProvider: false,\n refetch: () => {},\n});\n\n// ============================================================================\n// Provider\n// ============================================================================\n\n/**\n * ProductProvider fetches and provides product metadata to child components.\n * Uses the product slug from WebSDKConfig to fetch from the public API.\n *\n * @example\n * ```tsx\n * <WebSDKProvider config={sdkConfig}>\n * <ProductProvider>\n * <App />\n * </ProductProvider>\n * </WebSDKProvider>\n * ```\n */\nexport function ProductProvider({ children, fallback }: ProductProviderProps) {\n const client = useWebSDK();\n const config = useWebSDKConfig();\n const [product, setProduct] = useState<ProductData | null>(\n fallback ? (fallback as ProductData) : null,\n );\n const [loading, setLoading] = useState(true);\n const [error, setError] = useState<string | null>(null);\n const fetchProduct = useCallback(async () => {\n if (!config.productSlug) {\n setLoading(false);\n return;\n }\n\n setLoading(true);\n setError(null);\n\n try {\n let result = await client.query<{ publicProduct: ProductData | null }>(\n PUBLIC_PRODUCT_QUERY,\n { slug: config.productSlug },\n );\n\n // Backwards-compat fallback: if the backend's `publicProduct` schema\n // doesn't yet expose `resourceLinks` (deployed before\n // `global-tenant-svc` PR #64), the primary query fails validation\n // with a \"Cannot query field …\" error and `result.data` is null.\n // Retry the fallback query that omits `resourceLinks`; consumers\n // gracefully see `product.resourceLinks === undefined` and fall\n // through their own resolution paths.\n const schemaMissingResourceLinks = result.errors?.some((e) =>\n /Cannot query field [\"']?resourceLinks[\"']?/i.test(e?.message ?? \"\"),\n );\n if (schemaMissingResourceLinks) {\n result = await client.query<{ publicProduct: ProductData | null }>(\n PUBLIC_PRODUCT_QUERY_FALLBACK,\n { slug: config.productSlug },\n );\n }\n\n if (result.errors?.length) {\n setError(result.errors[0]?.message ?? \"Unknown error\");\n } else if (result.data?.publicProduct) {\n setProduct(result.data.publicProduct);\n }\n } catch (err) {\n setError(err instanceof Error ? err.message : \"Failed to fetch product\");\n } finally {\n setLoading(false);\n }\n }, [client, config.productSlug]);\n\n // Use useLayoutEffect for earliest possible fetch after commit (before paint).\n // Runs when slug or client changes. Client-side query cache + dedup ensures\n // no duplicate network requests even if React StrictMode fires this twice.\n useLayoutEffect(() => {\n fetchProduct();\n }, [fetchProduct]);\n\n const value = useMemo(\n () => ({\n product,\n loading,\n error,\n hasProvider: true,\n refetch: fetchProduct,\n }),\n [product, loading, error, fetchProduct],\n );\n\n return (\n <ProductContext.Provider value={value}>{children}</ProductContext.Provider>\n );\n}\n\n// ============================================================================\n// Hooks\n// ============================================================================\n\n/**\n * Hook to access the current product data.\n *\n * @example\n * ```tsx\n * const { product, loading } = useProduct();\n * if (loading) return <Loading />;\n * return <h1>{product?.name}</h1>;\n * ```\n */\nexport function useProduct(): ProductContextValue {\n return useContext(ProductContext);\n}\n\n/**\n * Hook to get product-specific configuration.\n * Merges SDK config with fetched product data.\n * Useful for getting reCAPTCHA keys, analytics IDs, etc.\n *\n * @example\n * ```tsx\n * const { recaptchaSiteKey, rybbitSiteId } = useProductConfig();\n * ```\n */\nexport function useProductConfig(): {\n recaptchaSiteKey: string | null;\n rybbitSiteId: string | null;\n contactEmail: string | null;\n supportEmail: string | null;\n notificationEmail: string | null;\n productName: string | null;\n logoUrl: string | null;\n} {\n const { product } = useProduct();\n const config = useWebSDKConfig();\n\n return {\n // Prefer product-level config, fall back to SDK config\n recaptchaSiteKey:\n product?.recaptchaSiteKey ?? config.recaptchaSiteKey ?? null,\n rybbitSiteId: product?.rybbitSiteId ?? config.rybbitSiteId ?? null,\n contactEmail: product?.contactEmail ?? null,\n supportEmail: product?.supportEmail ?? null,\n notificationEmail:\n product?.notificationEmail ?? product?.contactEmail ?? null,\n productName: product?.name ?? null,\n logoUrl: product?.logoUrl ?? null,\n };\n}\n","/**\n * PageHead Component\n * Manages dynamic meta tags for SEO optimization on a per-page basis.\n * Supports JSON-LD structured data, Open Graph, Twitter Cards, favicons, and robots directives.\n *\n * @example\n * ```tsx\n * <PageHead\n * title=\"About Us\"\n * description=\"Learn about our mission and team\"\n * productName=\"MyProduct\"\n * keywords=\"about, team, mission\"\n * image=\"/og-about.png\"\n * url=\"https://myproduct.com/about\"\n * favicon=\"/favicon.ico\"\n * robots=\"index, follow\"\n * locale=\"en_US\"\n * twitterHandle=\"@burdenoff\"\n * themeColor=\"#1a1a2e\"\n * structuredData={{\n * \"@context\": \"https://schema.org\",\n * \"@type\": \"WebPage\",\n * name: \"About Us\",\n * }}\n * />\n * ```\n */\n\nimport { Helmet } from \"react-helmet-async\";\n\nexport interface PageHeadProps {\n /** Page title */\n title: string;\n /** Meta description */\n description?: string;\n /** Product/brand name (appended to title) */\n productName?: string;\n /** SEO keywords */\n keywords?: string;\n /** Open Graph image URL */\n image?: string;\n /** Page canonical URL */\n url?: string;\n /** Favicon URL */\n favicon?: string;\n /** Robots directive (e.g., \"index, follow\") */\n robots?: string;\n /** Open Graph locale (e.g., \"en_US\") */\n locale?: string;\n /** Twitter handle (e.g., \"@burdenoff\") */\n twitterHandle?: string;\n /** Theme color for mobile browsers */\n themeColor?: string;\n /** JSON-LD structured data objects */\n structuredData?: Record<string, unknown> | Array<Record<string, unknown>>;\n /** Additional meta tags */\n additionalMeta?: Array<{\n name?: string;\n property?: string;\n content: string;\n }>;\n}\n\nexport function PageHead({\n title,\n description,\n productName,\n keywords,\n image,\n url,\n favicon,\n robots = \"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\",\n locale = \"en_US\",\n twitterHandle,\n themeColor = \"#000000\",\n structuredData,\n additionalMeta,\n}: PageHeadProps) {\n const fullTitle =\n productName && !title.includes(productName)\n ? `${title} | ${productName}`\n : title;\n\n const fullImageUrl =\n image && !image.startsWith(\"http\") && url\n ? `${url.replace(/\\/$/, \"\")}${image}`\n : image;\n\n // Normalize structured data to an array\n const structuredDataItems: Array<Record<string, unknown>> = structuredData\n ? Array.isArray(structuredData)\n ? structuredData\n : [structuredData]\n : [];\n\n return (\n <Helmet>\n {/* Primary Meta Tags */}\n <title>{fullTitle}</title>\n <meta name=\"title\" content={fullTitle} />\n {description && <meta name=\"description\" content={description} />}\n {keywords && <meta name=\"keywords\" content={keywords} />}\n <meta name=\"author\" content=\"Burdenoff Consultancy Services Pvt Ltd\" />\n <meta name=\"robots\" content={robots} />\n\n {/* Canonical URL */}\n {url && <link rel=\"canonical\" href={url} />}\n\n {/* Favicon */}\n {favicon && <link rel=\"icon\" href={favicon} />}\n\n {/* Open Graph / Facebook */}\n <meta property=\"og:type\" content=\"website\" />\n <meta property=\"og:title\" content={fullTitle} />\n {description && <meta property=\"og:description\" content={description} />}\n {fullImageUrl && <meta property=\"og:image\" content={fullImageUrl} />}\n {url && <meta property=\"og:url\" content={url} />}\n <meta property=\"og:locale\" content={locale} />\n {productName && <meta property=\"og:site_name\" content={productName} />}\n\n {/* Twitter Card */}\n <meta name=\"twitter:card\" content=\"summary_large_image\" />\n <meta name=\"twitter:title\" content={fullTitle} />\n {description && <meta name=\"twitter:description\" content={description} />}\n {fullImageUrl && <meta name=\"twitter:image\" content={fullImageUrl} />}\n {twitterHandle && <meta name=\"twitter:creator\" content={twitterHandle} />}\n\n {/* Theme Color */}\n <meta name=\"theme-color\" content={themeColor} />\n\n {/* JSON-LD Structured Data */}\n {structuredDataItems.map((data, index) => (\n <script key={`ld-${index}`} type=\"application/ld+json\">\n {JSON.stringify(data)}\n </script>\n ))}\n\n {/* Additional Meta Tags */}\n {additionalMeta?.map((meta, index) => (\n <meta\n key={`meta-${index}`}\n {...(meta.name ? { name: meta.name } : {})}\n {...(meta.property ? { property: meta.property } : {})}\n content={meta.content}\n />\n ))}\n </Helmet>\n );\n}\n","/**\n * Utility function to merge Tailwind CSS classes\n * Combines clsx and tailwind-merge for optimal class handling\n */\n\nimport { type ClassValue, clsx } from \"clsx\";\nimport { twMerge } from \"tailwind-merge\";\n\n/**\n * Merge multiple class names intelligently\n * - Handles conditional classes via clsx\n * - Deduplicates and resolves Tailwind conflicts via tailwind-merge\n *\n * @example\n * ```ts\n * cn('px-4 py-2', 'bg-blue-500', { 'text-white': isActive })\n * // => 'px-4 py-2 bg-blue-500 text-white' (if isActive is true)\n * ```\n */\nexport function cn(...inputs: ClassValue[]): string {\n return twMerge(clsx(inputs));\n}\n","import * as React from \"react\";\n\nimport { Slot } from \"@radix-ui/react-slot\";\nimport { cva, type VariantProps } from \"class-variance-authority\";\n\nimport { cn } from \"../utils/cn\";\n\nconst buttonVariants = cva(\n \"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0\",\n {\n variants: {\n variant: {\n default:\n \"bg-primary text-primary-foreground shadow hover:bg-primary/90\",\n destructive:\n \"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90\",\n outline:\n \"border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground\",\n secondary:\n \"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80\",\n ghost: \"hover:bg-accent hover:text-accent-foreground\",\n link: \"text-primary underline-offset-4 hover:underline\",\n },\n size: {\n default: \"h-9 px-4 py-2\",\n sm: \"h-8 rounded-md px-3 text-xs\",\n lg: \"h-10 rounded-md px-8\",\n icon: \"h-9 w-9\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n size: \"default\",\n },\n },\n);\n\nexport interface ButtonProps\n extends\n React.ButtonHTMLAttributes<HTMLButtonElement>,\n VariantProps<typeof buttonVariants> {\n asChild?: boolean;\n}\n\nconst Button = React.forwardRef<HTMLButtonElement, ButtonProps>(\n ({ className, variant, size, asChild = false, ...props }, ref) => {\n const Comp = asChild ? Slot : \"button\";\n return (\n <Comp\n className={cn(buttonVariants({ variant, size, className }))}\n ref={ref}\n {...props}\n />\n );\n },\n);\nButton.displayName = \"Button\";\n\nexport { Button, buttonVariants };\n","import * as React from \"react\";\n\nimport { cn } from \"../utils/cn\";\n\nconst Input = React.forwardRef<HTMLInputElement, React.ComponentProps<\"input\">>(\n ({ className, type, ...props }, ref) => {\n return (\n <input\n type={type}\n className={cn(\n \"flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm\",\n className,\n )}\n ref={ref}\n {...props}\n />\n );\n },\n);\nInput.displayName = \"Input\";\n\nexport { Input };\n","import * as React from \"react\";\n\nimport * as LabelPrimitive from \"@radix-ui/react-label\";\nimport { cva, type VariantProps } from \"class-variance-authority\";\n\nimport { cn } from \"../utils/cn\";\n\nconst labelVariants = cva(\n \"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70\",\n);\n\nconst Label = React.forwardRef<\n React.ElementRef<typeof LabelPrimitive.Root>,\n React.ComponentPropsWithoutRef<typeof LabelPrimitive.Root> &\n VariantProps<typeof labelVariants>\n>(({ className, ...props }, ref) => (\n <LabelPrimitive.Root\n ref={ref}\n className={cn(labelVariants(), className)}\n {...props}\n />\n));\nLabel.displayName = LabelPrimitive.Root.displayName;\n\nexport { Label };\n","import * as React from \"react\";\n\nimport { cn } from \"../utils/cn\";\n\nconst Textarea = React.forwardRef<\n HTMLTextAreaElement,\n React.ComponentProps<\"textarea\">\n>(({ className, ...props }, ref) => {\n return (\n <textarea\n className={cn(\n \"flex min-h-[60px] w-full rounded-md border border-input bg-transparent px-3 py-2 text-base shadow-sm placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm\",\n className,\n )}\n ref={ref}\n {...props}\n />\n );\n});\nTextarea.displayName = \"Textarea\";\n\nexport { Textarea };\n","/**\n * Waitlist Components\n * Full-page and inline waitlist signup forms using GraphQL via WebSDKClient.\n *\n * @example\n * ```tsx\n * // Full-page waitlist\n * import { WaitlistPage } from '@burdenoff/website-sdk/components/waitlist'\n *\n * <WaitlistPage\n * productName=\"BigConsole\"\n * heroTitle=\"Join the Waitlist\"\n * heroSubtitle=\"Be among the first to try BigConsole\"\n * />\n *\n * // Inline waitlist form (for hero sections / footers)\n * import { WaitlistForm } from '@burdenoff/website-sdk/components/waitlist'\n *\n * <WaitlistForm variant=\"inline\" buttonText=\"Join Waitlist\" />\n * ```\n */\n\n\"use client\";\n\nimport { useState, useRef } from \"react\";\n\nimport { zodResolver } from \"@hookform/resolvers/zod\";\nimport { useForm } from \"react-hook-form\";\nimport { toast } from \"sonner\";\nimport { z } from \"zod\";\n\nimport { useWebSDK, useWebSDKConfig } from \"../client/provider\";\nimport { useProduct } from \"../product/product-provider\";\nimport { PageHead } from \"../seo/page-head\";\nimport { Button } from \"../ui/button\";\nimport { Input } from \"../ui/input\";\nimport { Label } from \"../ui/label\";\nimport { Textarea } from \"../ui/textarea\";\n\nimport type { WebSDKClient } from \"../client/graphql-client\";\n\n// ============================================================================\n// TYPES & INTERFACES\n// ============================================================================\n\nexport interface WaitlistPageProps {\n /** Product name. Falls back to SDK config productId if not provided. */\n productName?: string;\n /** Hero title */\n heroTitle?: string;\n /** Hero subtitle */\n heroSubtitle?: string;\n /** Hero description */\n heroDescription?: string;\n /** Message shown on successful signup */\n successMessage?: string;\n /** Message shown on error */\n errorMessage?: string;\n /** Custom CSS class for container */\n className?: string;\n /** SEO metadata */\n seo?: {\n title?: string;\n description?: string;\n keywords?: string;\n image?: string;\n url?: string;\n };\n}\n\nexport interface WaitlistFormProps {\n /** Layout variant */\n variant?: \"inline\" | \"stacked\";\n /** Show email label */\n showLabel?: boolean;\n /** Show description text */\n showDescription?: boolean;\n /** Whether to show the name field */\n showNameField?: boolean;\n /** Description text */\n description?: string;\n /** Button text */\n buttonText?: string;\n /** Custom CSS class */\n className?: string;\n}\n\ninterface RateLimitState {\n attempts: number;\n resetTime: number;\n}\n\n// ============================================================================\n// VALIDATION SCHEMAS\n// ============================================================================\n\nconst waitlistPageSchema = z.object({\n name: z.string().min(1, \"Name is required\"),\n email: z.string().email(\"Please enter a valid email address\"),\n company: z.string().optional(),\n reason: z.string().optional(),\n});\n\ntype WaitlistPageFormData = z.infer<typeof waitlistPageSchema>;\n\n// ============================================================================\n// GRAPHQL MUTATION\n// ============================================================================\n\nconst JOIN_WAITLIST_MUTATION = /* GraphQL */ `\n mutation JoinWaitlist($input: JoinWaitlistInput!) {\n joinWaitlist(input: $input) {\n id\n email\n name\n status\n createdAt\n }\n }\n`;\n\n// ============================================================================\n// API SERVICE\n// ============================================================================\n\nasync function joinWaitlist(\n client: WebSDKClient,\n data: {\n email: string;\n name?: string;\n company?: string;\n reason?: string;\n },\n productId: string,\n): Promise<{ success: boolean; message?: string }> {\n try {\n const result = await client.mutate<{\n joinWaitlist: {\n id: string;\n email: string;\n name: string | null;\n status: string;\n createdAt: string;\n };\n }>(JOIN_WAITLIST_MUTATION, {\n input: {\n email: data.email.trim().toLowerCase(),\n platformProductId: productId,\n name: data.name?.trim() || undefined,\n company: data.company?.trim() || undefined,\n reason: data.reason?.trim() || undefined,\n context: {\n source: \"website\",\n referrer: typeof window !== \"undefined\" ? window.location.href : \"\",\n timestamp: new Date().toISOString(),\n },\n },\n });\n\n if (result.errors?.length) {\n const errorMsg = result.errors[0]?.message ?? \"Failed to join waitlist\";\n if (errorMsg.toLowerCase().includes(\"already\")) {\n return {\n success: false,\n message: \"You are already on the waitlist!\",\n };\n }\n return { success: false, message: errorMsg };\n }\n\n return { success: true, message: \"You have been added to the waitlist!\" };\n } catch (error) {\n console.error(\"Waitlist signup error:\", error);\n return { success: false, message: \"Network error. Please try again.\" };\n }\n}\n\n// ============================================================================\n// RATE LIMITING (in-memory for SSR compatibility)\n// ============================================================================\n\nfunction useRateLimit(maxAttempts: number, windowMinutes: number) {\n const rateLimitRef = useRef<RateLimitState | null>(null);\n const [isLimited, setIsLimited] = useState(false);\n const [resetTime, setResetTime] = useState<Date | null>(null);\n\n function recordAttempt(): boolean {\n const now = Date.now();\n const state = rateLimitRef.current;\n\n // Reset if window expired\n if (state && now > state.resetTime) {\n rateLimitRef.current = null;\n }\n\n const current = rateLimitRef.current;\n\n if (!current) {\n rateLimitRef.current = {\n attempts: 1,\n resetTime: now + windowMinutes * 60 * 1000,\n };\n return false;\n }\n\n current.attempts += 1;\n\n if (current.attempts >= maxAttempts) {\n setIsLimited(true);\n setResetTime(new Date(current.resetTime));\n return true;\n }\n\n return false;\n }\n\n function checkLimit(): boolean {\n const state = rateLimitRef.current;\n if (!state) return false;\n if (Date.now() > state.resetTime) {\n rateLimitRef.current = null;\n setIsLimited(false);\n setResetTime(null);\n return false;\n }\n return state.attempts >= maxAttempts;\n }\n\n return { isLimited, resetTime, recordAttempt, checkLimit };\n}\n\n// ============================================================================\n// WAITLIST PAGE (Full-page component)\n// ============================================================================\n\nexport function WaitlistPage({\n productName,\n heroTitle = \"Join the Waitlist\",\n heroSubtitle = \"Be among the first to experience what's coming next\",\n heroDescription,\n successMessage = \"You have been added to the waitlist!\",\n errorMessage = \"Failed to join waitlist. Please try again.\",\n className,\n seo,\n}: WaitlistPageProps) {\n const client = useWebSDK();\n const config = useWebSDKConfig();\n const {\n product,\n loading: productLoading,\n error: productError,\n hasProvider,\n } = useProduct();\n const displayName = productName ?? product?.name ?? config.productId;\n const productStatus = product?.status;\n const canCheckStatus = Boolean(config.productSlug);\n\n const [isSubmitting, setIsSubmitting] = useState(false);\n const { isLimited, resetTime, recordAttempt, checkLimit } = useRateLimit(\n 3,\n 15,\n );\n\n const {\n register,\n handleSubmit,\n formState: { errors },\n reset,\n } = useForm<WaitlistPageFormData>({\n resolver: zodResolver(waitlistPageSchema),\n });\n\n if (canCheckStatus && !hasProvider) {\n return (\n <div className={className}>\n {seo && (\n <PageHead\n title={seo.title ?? \"\"}\n description={seo.description ?? \"\"}\n keywords={seo.keywords}\n image={seo.image}\n url={seo.url}\n />\n )}\n <section className=\"relative overflow-hidden py-24 lg:py-32\">\n <div className=\"relative max-w-3xl mx-auto px-4 sm:px-6 lg:px-8 text-center space-y-6\">\n <h1 className=\"text-4xl font-bold tracking-tight sm:text-5xl text-foreground\">\n Waitlist Unavailable\n </h1>\n <p className=\"text-lg text-muted-foreground\">\n Product status checks require <code>ProductProvider</code> to be\n mounted. Please update your integration configuration.\n </p>\n </div>\n </section>\n </div>\n );\n }\n\n if (canCheckStatus && productLoading) {\n return (\n <div className={className}>\n {seo && (\n <PageHead\n title={seo.title ?? \"\"}\n description={seo.description ?? \"\"}\n keywords={seo.keywords}\n image={seo.image}\n url={seo.url}\n />\n )}\n <section className=\"relative overflow-hidden py-24 lg:py-32\">\n <div className=\"relative max-w-3xl mx-auto px-4 sm:px-6 lg:px-8 text-center space-y-6\">\n <h1 className=\"text-4xl font-bold tracking-tight sm:text-5xl text-foreground\">\n Loading…\n </h1>\n <p className=\"text-lg text-muted-foreground\">\n Fetching product status.\n </p>\n </div>\n </section>\n </div>\n );\n }\n\n if (canCheckStatus && (productError || !productStatus)) {\n return (\n <div className={className}>\n {seo && (\n <PageHead\n title={seo.title ?? \"\"}\n description={seo.description ?? \"\"}\n keywords={seo.keywords}\n image={seo.image}\n url={seo.url}\n />\n )}\n <section className=\"relative overflow-hidden py-24 lg:py-32\">\n <div className=\"relative max-w-3xl mx-auto px-4 sm:px-6 lg:px-8 text-center space-y-6\">\n <h1 className=\"text-4xl font-bold tracking-tight sm:text-5xl text-foreground\">\n Waitlist Unavailable\n </h1>\n <p className=\"text-lg text-muted-foreground\">\n We can’t confirm waitlist availability right now. Please try again\n later.\n </p>\n </div>\n </section>\n </div>\n );\n }\n\n // If product is already available, show \"already available\" instead of waitlist form\n if (\n canCheckStatus &&\n (productStatus === \"ACTIVE\" || productStatus === \"RELEASED\")\n ) {\n const appUrl = product?.appUrl || product?.website || \"#\";\n return (\n <div className={className}>\n {seo && (\n <PageHead\n title={seo.title ?? \"\"}\n description={seo.description ?? \"\"}\n keywords={seo.keywords}\n image={seo.image}\n url={seo.url}\n />\n )}\n <section className=\"relative overflow-hidden py-24 lg:py-32\">\n <div className=\"relative max-w-3xl mx-auto px-4 sm:px-6 lg:px-8 text-center space-y-8\">\n <h1 className=\"text-4xl font-bold tracking-tight sm:text-5xl text-foreground\">\n {displayName} is now available!\n </h1>\n <p className=\"text-lg text-muted-foreground\">\n Great news — {displayName} is open to everyone. Sign up or log in\n to get started.\n </p>\n <Button size=\"lg\" asChild>\n <a href={appUrl} target=\"_blank\" rel=\"noopener noreferrer\">\n Get Started\n </a>\n </Button>\n </div>\n </section>\n </div>\n );\n }\n\n // If product is DRAFT or COMING_SOON, don't show waitlist form\n if (\n canCheckStatus &&\n (productStatus === \"DRAFT\" || productStatus === \"COMING_SOON\")\n ) {\n return (\n <div className={className}>\n {seo && (\n <PageHead\n title={seo.title ?? \"\"}\n description={seo.description ?? \"\"}\n keywords={seo.keywords}\n image={seo.image}\n url={seo.url}\n />\n )}\n <section className=\"relative overflow-hidden py-24 lg:py-32\">\n <div className=\"relative max-w-3xl mx-auto px-4 sm:px-6 lg:px-8 text-center space-y-8\">\n <h1 className=\"text-4xl font-bold tracking-tight sm:text-5xl text-foreground\">\n Coming Soon\n </h1>\n <p className=\"text-lg text-muted-foreground\">\n {displayName} is not yet accepting waitlist signups. Check back\n soon!\n </p>\n </div>\n </section>\n </div>\n );\n }\n\n // Defensive: if backend introduces a new status we don't recognize, don't render a signup form.\n if (canCheckStatus && productStatus !== \"WAITLIST\") {\n return (\n <div className={className}>\n {seo && (\n <PageHead\n title={seo.title ?? \"\"}\n description={seo.description ?? \"\"}\n keywords={seo.keywords}\n image={seo.image}\n url={seo.url}\n />\n )}\n <section className=\"relative overflow-hidden py-24 lg:py-32\">\n <div className=\"relative max-w-3xl mx-auto px-4 sm:px-6 lg:px-8 text-center space-y-6\">\n <h1 className=\"text-4xl font-bold tracking-tight sm:text-5xl text-foreground\">\n Waitlist Unavailable\n </h1>\n <p className=\"text-lg text-muted-foreground\">\n {displayName} is not accepting waitlist signups right now.\n </p>\n </div>\n </section>\n </div>\n );\n }\n\n const onSubmit = async (data: WaitlistPageFormData) => {\n if (canCheckStatus && productStatus !== \"WAITLIST\") {\n toast.error(\"This product is not accepting waitlist signups right now.\");\n return;\n }\n\n if (checkLimit()) {\n toast.error(\n `Too many attempts. Please try again after ${resetTime?.toLocaleTimeString()}`,\n );\n return;\n }\n\n setIsSubmitting(true);\n\n try {\n const result = await joinWaitlist(\n client,\n data,\n product?.id || config.productId,\n );\n\n if (result.success) {\n toast.success(result.message ?? successMessage);\n reset();\n } else {\n toast.error(result.message ?? errorMessage);\n }\n\n recordAttempt();\n } catch (_error) {\n toast.error(errorMessage);\n } finally {\n setIsSubmitting(false);\n }\n };\n\n return (\n <>\n {seo && (\n <PageHead\n title={seo.title ?? `Join the Waitlist - ${displayName}`}\n description={seo.description ?? heroDescription ?? heroSubtitle}\n productName={displayName}\n keywords={seo.keywords}\n image={seo.image}\n url={seo.url}\n />\n )}\n\n <div className={className}>\n <div className=\"min-h-screen flex items-center justify-center px-4 py-12\">\n <div className=\"max-w-lg w-full space-y-8\">\n {/* Hero */}\n <div className=\"text-center\">\n <h1 className=\"text-4xl font-bold tracking-tight\">{heroTitle}</h1>\n <p className=\"mt-2 text-lg text-muted-foreground\">\n {heroSubtitle}\n </p>\n {heroDescription && (\n <p className=\"mt-4 text-sm text-muted-foreground\">\n {heroDescription}\n </p>\n )}\n </div>\n\n {/* Form */}\n <form onSubmit={handleSubmit(onSubmit)} className=\"space-y-5\">\n <div className=\"space-y-2\">\n <Label htmlFor=\"waitlist-name\">Name *</Label>\n <Input\n id=\"waitlist-name\"\n type=\"text\"\n placeholder=\"Your name\"\n disabled={isSubmitting || isLimited}\n {...register(\"name\")}\n />\n {errors.name && (\n <p className=\"text-sm text-destructive\">\n {errors.name.message}\n </p>\n )}\n </div>\n\n <div className=\"space-y-2\">\n <Label htmlFor=\"waitlist-email\">Email *</Label>\n <Input\n id=\"waitlist-email\"\n type=\"email\"\n placeholder=\"you@example.com\"\n disabled={isSubmitting || isLimited}\n {...register(\"email\")}\n />\n {errors.email && (\n <p className=\"text-sm text-destructive\">\n {errors.email.message}\n </p>\n )}\n </div>\n\n <div className=\"space-y-2\">\n <Label htmlFor=\"waitlist-company\">Company</Label>\n <Input\n id=\"waitlist-company\"\n type=\"text\"\n placeholder=\"Your company (optional)\"\n disabled={isSubmitting || isLimited}\n {...register(\"company\")}\n />\n </div>\n\n <div className=\"space-y-2\">\n <Label htmlFor=\"waitlist-reason\">Why are you interested?</Label>\n <Textarea\n id=\"waitlist-reason\"\n placeholder=\"Tell us what excites you about the product (optional)\"\n rows={3}\n disabled={isSubmitting || isLimited}\n className=\"resize-y\"\n {...register(\"reason\")}\n />\n </div>\n\n <Button\n type=\"submit\"\n className=\"w-full\"\n disabled={isSubmitting || isLimited}\n >\n {isSubmitting ? \"Joining...\" : \"Join Waitlist\"}\n </Button>\n\n {isLimited && resetTime && (\n <p className=\"text-sm text-muted-foreground text-center\">\n Rate limit reached. Try again after{\" \"}\n {resetTime.toLocaleTimeString()}\n </p>\n )}\n </form>\n\n {/* Privacy Notice */}\n <p className=\"text-xs text-muted-foreground text-center\">\n By joining the waitlist, you agree to receive updates from{\" \"}\n {displayName}. We respect your privacy and will never share your\n information.\n </p>\n </div>\n </div>\n </div>\n </>\n );\n}\n\n// ============================================================================\n// WAITLIST FORM (Inline Component)\n// ============================================================================\n\n/**\n * Lightweight inline waitlist signup form for hero sections, footers, etc.\n */\nexport function WaitlistForm({\n variant = \"inline\",\n showLabel = false,\n showDescription = false,\n showNameField = false,\n description = \"Join our waitlist to get early access\",\n buttonText = \"Join Waitlist\",\n className = \"\",\n}: WaitlistFormProps) {\n const client = useWebSDK();\n const config = useWebSDKConfig();\n const {\n product,\n loading: productLoading,\n error: productError,\n hasProvider,\n } = useProduct();\n const productStatus = product?.status;\n const canCheckStatus = Boolean(config.productSlug);\n\n const [email, setEmail] = useState(\"\");\n const [name, setName] = useState(\"\");\n const [isLoading, setIsLoading] = useState(false);\n\n const handleSubmit = async (e: React.FormEvent) => {\n e.preventDefault();\n\n if (canCheckStatus && productStatus !== \"WAITLIST\") {\n toast.error(\"This product is not accepting waitlist signups right now.\");\n return;\n }\n\n if (!email || !email.includes(\"@\")) {\n toast.error(\"Please enter a valid email address\");\n return;\n }\n\n setIsLoading(true);\n\n try {\n const result = await joinWaitlist(\n client,\n { email, name: name || undefined },\n product?.id || config.productId,\n );\n\n if (result.success) {\n toast.success(result.message ?? \"You have been added to the waitlist!\");\n setEmail(\"\");\n setName(\"\");\n } else {\n toast.error(result.message ?? \"Failed to join waitlist\");\n }\n } catch (_error) {\n toast.error(\"An error occurred. Please try again.\");\n } finally {\n setIsLoading(false);\n }\n };\n\n const isInline = variant === \"inline\";\n\n if (canCheckStatus && !hasProvider) {\n return (\n <div className={className}>\n {showDescription && (\n <p className=\"text-sm text-muted-foreground mb-3\">{description}</p>\n )}\n <p className=\"text-sm text-muted-foreground\">\n Product status checks require <code>ProductProvider</code> to be\n mounted.\n </p>\n </div>\n );\n }\n\n if (canCheckStatus && productLoading) {\n return (\n <div className={className}>\n {showDescription && (\n <p className=\"text-sm text-muted-foreground mb-3\">{description}</p>\n )}\n <p className=\"text-sm text-muted-foreground\">Loading waitlist…</p>\n </div>\n );\n }\n\n if (canCheckStatus && (productError || productStatus !== \"WAITLIST\")) {\n return (\n <div className={className}>\n {showDescription && (\n <p className=\"text-sm text-muted-foreground mb-3\">{description}</p>\n )}\n <p className=\"text-sm text-muted-foreground\">\n Waitlist signups are not available right now.\n </p>\n </div>\n );\n }\n\n return (\n <div className={className}>\n {showDescription && (\n <p className=\"text-sm text-muted-foreground mb-3\">{description}</p>\n )}\n <form\n onSubmit={handleSubmit}\n className={isInline ? \"flex gap-2\" : \"flex flex-col gap-2\"}\n >\n {showNameField && (\n <div className={isInline ? \"flex-1\" : \"w-full\"}>\n {showLabel && (\n <Label\n htmlFor=\"waitlist-inline-name\"\n className=\"text-sm mb-1 block\"\n >\n Name\n </Label>\n )}\n <Input\n id=\"waitlist-inline-name\"\n type=\"text\"\n placeholder=\"Your name\"\n value={name}\n onChange={(e) => setName(e.target.value)}\n disabled={isLoading}\n className=\"w-full\"\n />\n </div>\n )}\n <div className={isInline ? \"flex-1\" : \"w-full\"}>\n {showLabel && (\n <Label\n htmlFor=\"waitlist-inline-email\"\n className=\"text-sm mb-1 block\"\n >\n Email\n </Label>\n )}\n <Input\n id=\"waitlist-inline-email\"\n type=\"email\"\n placeholder=\"Enter your email\"\n value={email}\n onChange={(e) => setEmail(e.target.value)}\n disabled={isLoading}\n required\n className=\"w-full\"\n />\n </div>\n <Button\n type=\"submit\"\n disabled={isLoading}\n className={isInline ? \"whitespace-nowrap\" : \"w-full\"}\n >\n {isLoading ? \"Joining...\" : buttonText}\n </Button>\n </form>\n </div>\n );\n}\n"]}
@@ -0,0 +1,27 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+
3
+ interface WebsiteSwitcherProduct {
4
+ /** Stable identifier for the product. */
5
+ slug: string;
6
+ /** Human-readable product name. */
7
+ name: string;
8
+ /** URL to the product logo (absolute or relative). */
9
+ logoUrl?: string | null;
10
+ /** Product marketing site URL. */
11
+ websiteUrl: string;
12
+ }
13
+ interface WebsiteSwitcherProps {
14
+ /** All Burdenoff ecosystem products to display. */
15
+ products: WebsiteSwitcherProduct[];
16
+ /** Accessible label for the trigger. */
17
+ triggerLabel?: string;
18
+ /** Placeholder text for the search input. */
19
+ searchPlaceholder?: string;
20
+ /** Empty-state text when filtering returns no results. */
21
+ emptyText?: string;
22
+ /** Optional additional CSS class for the trigger. */
23
+ className?: string;
24
+ }
25
+ declare function WebsiteSwitcher({ products, triggerLabel, searchPlaceholder, emptyText, className, }: WebsiteSwitcherProps): react_jsx_runtime.JSX.Element;
26
+
27
+ export { WebsiteSwitcher, type WebsiteSwitcherProduct, type WebsiteSwitcherProps };
@@ -0,0 +1,27 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+
3
+ interface WebsiteSwitcherProduct {
4
+ /** Stable identifier for the product. */
5
+ slug: string;
6
+ /** Human-readable product name. */
7
+ name: string;
8
+ /** URL to the product logo (absolute or relative). */
9
+ logoUrl?: string | null;
10
+ /** Product marketing site URL. */
11
+ websiteUrl: string;
12
+ }
13
+ interface WebsiteSwitcherProps {
14
+ /** All Burdenoff ecosystem products to display. */
15
+ products: WebsiteSwitcherProduct[];
16
+ /** Accessible label for the trigger. */
17
+ triggerLabel?: string;
18
+ /** Placeholder text for the search input. */
19
+ searchPlaceholder?: string;
20
+ /** Empty-state text when filtering returns no results. */
21
+ emptyText?: string;
22
+ /** Optional additional CSS class for the trigger. */
23
+ className?: string;
24
+ }
25
+ declare function WebsiteSwitcher({ products, triggerLabel, searchPlaceholder, emptyText, className, }: WebsiteSwitcherProps): react_jsx_runtime.JSX.Element;
26
+
27
+ export { WebsiteSwitcher, type WebsiteSwitcherProduct, type WebsiteSwitcherProps };
@@ -0,0 +1,168 @@
1
+ 'use strict';
2
+
3
+ var React = require('react');
4
+ var DropdownMenu = require('@radix-ui/react-dropdown-menu');
5
+ var lucideReact = require('lucide-react');
6
+ var clsx = require('clsx');
7
+ var tailwindMerge = require('tailwind-merge');
8
+ var jsxRuntime = require('react/jsx-runtime');
9
+
10
+ function _interopNamespace(e) {
11
+ if (e && e.__esModule) return e;
12
+ var n = Object.create(null);
13
+ if (e) {
14
+ Object.keys(e).forEach(function (k) {
15
+ if (k !== 'default') {
16
+ var d = Object.getOwnPropertyDescriptor(e, k);
17
+ Object.defineProperty(n, k, d.get ? d : {
18
+ enumerable: true,
19
+ get: function () { return e[k]; }
20
+ });
21
+ }
22
+ });
23
+ }
24
+ n.default = e;
25
+ return Object.freeze(n);
26
+ }
27
+
28
+ var React__namespace = /*#__PURE__*/_interopNamespace(React);
29
+ var DropdownMenu__namespace = /*#__PURE__*/_interopNamespace(DropdownMenu);
30
+
31
+ function cn(...inputs) {
32
+ return tailwindMerge.twMerge(clsx.clsx(inputs));
33
+ }
34
+ var Input = React__namespace.forwardRef(
35
+ ({ className, type, ...props }, ref) => {
36
+ return /* @__PURE__ */ jsxRuntime.jsx(
37
+ "input",
38
+ {
39
+ type,
40
+ className: cn(
41
+ "flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",
42
+ className
43
+ ),
44
+ ref,
45
+ ...props
46
+ }
47
+ );
48
+ }
49
+ );
50
+ Input.displayName = "Input";
51
+ function normalizeSearch(value) {
52
+ return value.toLowerCase().trim();
53
+ }
54
+ function filterProducts(products, query) {
55
+ const normalized = normalizeSearch(query);
56
+ if (!normalized) return products;
57
+ return products.filter((p) => normalizeSearch(p.name).includes(normalized));
58
+ }
59
+ function WebsiteSwitcher({
60
+ products,
61
+ triggerLabel = "Explore products",
62
+ searchPlaceholder = "Find a product\u2026",
63
+ emptyText = "No products match your search.",
64
+ className
65
+ }) {
66
+ const [open, setOpen] = React.useState(false);
67
+ const [query, setQuery] = React.useState("");
68
+ const filtered = React.useMemo(
69
+ () => filterProducts(products, query),
70
+ [products, query]
71
+ );
72
+ return /* @__PURE__ */ jsxRuntime.jsxs(DropdownMenu__namespace.Root, { open, onOpenChange: setOpen, children: [
73
+ /* @__PURE__ */ jsxRuntime.jsxs(
74
+ DropdownMenu__namespace.Trigger,
75
+ {
76
+ className: cn(
77
+ "inline-flex items-center gap-1.5 text-sm font-medium transition-colors",
78
+ "text-muted-foreground hover:text-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring rounded-md",
79
+ className
80
+ ),
81
+ "aria-label": triggerLabel,
82
+ children: [
83
+ /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Globe, { className: "h-4 w-4", "aria-hidden": "true" }),
84
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "hidden sm:inline", children: triggerLabel }),
85
+ /* @__PURE__ */ jsxRuntime.jsx(
86
+ lucideReact.ChevronDown,
87
+ {
88
+ className: cn(
89
+ "h-3.5 w-3.5 transition-transform duration-200",
90
+ open && "rotate-180"
91
+ ),
92
+ "aria-hidden": "true"
93
+ }
94
+ )
95
+ ]
96
+ }
97
+ ),
98
+ /* @__PURE__ */ jsxRuntime.jsx(DropdownMenu__namespace.Portal, { children: /* @__PURE__ */ jsxRuntime.jsxs(
99
+ DropdownMenu__namespace.Content,
100
+ {
101
+ className: "z-50 min-w-[16rem] max-w-[20rem] rounded-lg border border-border/60 bg-popover p-2 shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2",
102
+ sideOffset: 8,
103
+ align: "end",
104
+ avoidCollisions: true,
105
+ children: [
106
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "px-2 pb-2 pt-1", children: [
107
+ /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs font-medium text-muted-foreground mb-2", children: "Burdenoff ecosystem" }),
108
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative", children: [
109
+ /* @__PURE__ */ jsxRuntime.jsx(
110
+ lucideReact.Search,
111
+ {
112
+ className: "absolute left-2.5 top-1/2 -translate-y-1/2 h-3.5 w-3.5 text-muted-foreground",
113
+ "aria-hidden": "true"
114
+ }
115
+ ),
116
+ /* @__PURE__ */ jsxRuntime.jsx(
117
+ Input,
118
+ {
119
+ type: "search",
120
+ value: query,
121
+ onChange: (e) => setQuery(e.target.value),
122
+ placeholder: searchPlaceholder,
123
+ className: "h-8 pl-8 text-sm",
124
+ "aria-label": searchPlaceholder,
125
+ onKeyDown: (e) => {
126
+ if (e.key === "Escape") {
127
+ setQuery("");
128
+ }
129
+ }
130
+ }
131
+ )
132
+ ] })
133
+ ] }),
134
+ /* @__PURE__ */ jsxRuntime.jsx(DropdownMenu__namespace.Separator, { className: "my-1 h-px bg-border/60" }),
135
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "max-h-[min(60vh,24rem)] overflow-y-auto py-1", children: filtered.length === 0 ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "px-3 py-4 text-center text-sm text-muted-foreground", children: emptyText }) : filtered.map((product) => /* @__PURE__ */ jsxRuntime.jsx(DropdownMenu__namespace.Item, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsxs(
136
+ "a",
137
+ {
138
+ href: product.websiteUrl,
139
+ target: "_blank",
140
+ rel: "noopener noreferrer",
141
+ className: cn(
142
+ "flex items-center gap-3 rounded-md px-2 py-2 text-sm outline-none",
143
+ "text-foreground hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground"
144
+ ),
145
+ children: [
146
+ product.logoUrl ? /* @__PURE__ */ jsxRuntime.jsx(
147
+ "img",
148
+ {
149
+ src: product.logoUrl,
150
+ alt: "",
151
+ "aria-hidden": "true",
152
+ className: "h-5 w-5 shrink-0 rounded object-contain"
153
+ }
154
+ ) : /* @__PURE__ */ jsxRuntime.jsx("span", { className: "flex h-5 w-5 shrink-0 items-center justify-center rounded bg-primary/10 text-[10px] font-bold text-primary", children: product.name.charAt(0) }),
155
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "truncate", children: product.name })
156
+ ]
157
+ }
158
+ ) }, product.slug)) }),
159
+ /* @__PURE__ */ jsxRuntime.jsx(DropdownMenu__namespace.Arrow, { className: "fill-popover" })
160
+ ]
161
+ }
162
+ ) })
163
+ ] });
164
+ }
165
+
166
+ exports.WebsiteSwitcher = WebsiteSwitcher;
167
+ //# sourceMappingURL=website-switcher.js.map
168
+ //# sourceMappingURL=website-switcher.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/utils/cn.ts","../../src/ui/input.tsx","../../src/components/website-switcher.tsx"],"names":["twMerge","clsx","React","jsx","useState","useMemo","jsxs","DropdownMenu","Globe","ChevronDown","Search"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmBO,SAAS,MAAM,MAAA,EAA8B;AAClD,EAAA,OAAOA,qBAAA,CAAQC,SAAA,CAAK,MAAM,CAAC,CAAA;AAC7B;ACjBA,IAAM,KAAA,GAAcC,gBAAA,CAAA,UAAA;AAAA,EAClB,CAAC,EAAE,SAAA,EAAW,MAAM,GAAG,KAAA,IAAS,GAAA,KAAQ;AACtC,IAAA,uBACEC,cAAA;AAAA,MAAC,OAAA;AAAA,MAAA;AAAA,QACC,IAAA;AAAA,QACA,SAAA,EAAW,EAAA;AAAA,UACT,yWAAA;AAAA,UACA;AAAA,SACF;AAAA,QACA,GAAA;AAAA,QACC,GAAG;AAAA;AAAA,KACN;AAAA,EAEJ;AACF,CAAA;AACA,KAAA,CAAM,WAAA,GAAc,OAAA;AC0CpB,SAAS,gBAAgB,KAAA,EAAuB;AAC9C,EAAA,OAAO,KAAA,CAAM,WAAA,EAAY,CAAE,IAAA,EAAK;AAClC;AAEA,SAAS,cAAA,CACP,UACA,KAAA,EAC0B;AAC1B,EAAA,MAAM,UAAA,GAAa,gBAAgB,KAAK,CAAA;AACxC,EAAA,IAAI,CAAC,YAAY,OAAO,QAAA;AACxB,EAAA,OAAO,QAAA,CAAS,MAAA,CAAO,CAAC,CAAA,KAAM,eAAA,CAAgB,EAAE,IAAI,CAAA,CAAE,QAAA,CAAS,UAAU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AAA,EACZ,mBAAS,MAAA,KAAW,CAAA,mBACnBA,cAAAA,CAAC,KAAA,EAAA,EAAI,SAAA,EAAU,uDACZ,QAAA,EAAA,SAAA,EACH,CAAA,GAEA,QAAA,CAAS,GAAA,CAAI,CAAC,OAAA,qBACZA,cAAAA,CAAcI,uBAAA,CAAA,IAAA,EAAb,EAAqC,OAAA,EAAO,IAAA,EAC3C,QAAA,kBAAAD,eAAA;AAAA,YAAC,GAAA;AAAA,YAAA;AAAA,cACC,MAAM,OAAA,CAAQ,UAAA;AAAA,cACd,MAAA,EAAO,QAAA;AAAA,cACP,GAAA,EAAI,qBAAA;AAAA,cACJ,SAAA,EAAW,EAAA;AAAA,gBACT,mEAAA;AAAA,gBACA;AAAA,eACF;AAAA,cAEC,QAAA,EAAA;AAAA,gBAAA,OAAA,CAAQ,0BACPH,cAAAA;AAAA,kBAAC,KAAA;AAAA,kBAAA;AAAA,oBACC,KAAK,OAAA,CAAQ,OAAA;AAAA,oBACb,GAAA,EAAI,EAAA;AAAA,oBACJ,aAAA,EAAY,MAAA;AAAA,oBACZ,SAAA,EAAU;AAAA;AAAA,iBACZ,mBAEAA,cAAAA,CAAC,MAAA,EAAA,EAAK,SAAA,EAAU,8GACb,QAAA,EAAA,OAAA,CAAQ,IAAA,CAAK,MAAA,CAAO,CAAC,CAAA,EACxB,CAAA;AAAA,gCAEFA,cAAAA,CAAC,MAAA,EAAA,EAAK,SAAA,EAAU,UAAA,EAAY,kBAAQ,IAAA,EAAK;AAAA;AAAA;AAAA,WAC3C,EAAA,EAvBsB,OAAA,CAAQ,IAwBhC,CACD,CAAA,EAEL,CAAA;AAAA,0BAEAA,cAAAA,CAAcI,uBAAA,CAAA,KAAA,EAAb,EAAmB,WAAU,cAAA,EAAe;AAAA;AAAA;AAAA,KAC/C,EACF;AAAA,GAAA,EACF,CAAA;AAEJ","file":"website-switcher.js","sourcesContent":["/**\n * Utility function to merge Tailwind CSS classes\n * Combines clsx and tailwind-merge for optimal class handling\n */\n\nimport { type ClassValue, clsx } from \"clsx\";\nimport { twMerge } from \"tailwind-merge\";\n\n/**\n * Merge multiple class names intelligently\n * - Handles conditional classes via clsx\n * - Deduplicates and resolves Tailwind conflicts via tailwind-merge\n *\n * @example\n * ```ts\n * cn('px-4 py-2', 'bg-blue-500', { 'text-white': isActive })\n * // => 'px-4 py-2 bg-blue-500 text-white' (if isActive is true)\n * ```\n */\nexport function cn(...inputs: ClassValue[]): string {\n return twMerge(clsx(inputs));\n}\n","import * as React from \"react\";\n\nimport { cn } from \"../utils/cn\";\n\nconst Input = React.forwardRef<HTMLInputElement, React.ComponentProps<\"input\">>(\n ({ className, type, ...props }, ref) => {\n return (\n <input\n type={type}\n className={cn(\n \"flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm\",\n className,\n )}\n ref={ref}\n {...props}\n />\n );\n },\n);\nInput.displayName = \"Input\";\n\nexport { Input };\n","\"use client\";\n\n/**\n * WebsiteSwitcher Component\n *\n * A dropdown menu for navigating between Burdenoff ecosystem product websites.\n * Includes a search filter and renders each product with its logo and name.\n *\n * @example\n * ```tsx\n * import { WebsiteSwitcher } from '@burdenoff/website-sdk'\n *\n * <WebsiteSwitcher\n * products={[\n * { slug: 'vibecontrols', name: 'VibeControls', logoUrl: '/vibe.svg', websiteUrl: 'https://vibecontrols.com' },\n * { slug: 'fluidgrids', name: 'FluidGrids', logoUrl: '/fg.svg', websiteUrl: 'https://fluidgrids.com' },\n * ]}\n * />\n * ```\n */\n\nimport { useMemo, useState } from \"react\";\n\nimport * as DropdownMenu from \"@radix-ui/react-dropdown-menu\";\nimport { ChevronDown, Globe, Search } from \"lucide-react\";\n\nimport { Input } from \"../ui/input\";\nimport { cn } from \"../utils/cn\";\n\n// ============================================================================\n// Types\n// ============================================================================\n\nexport interface WebsiteSwitcherProduct {\n /** Stable identifier for the product. */\n slug: string;\n /** Human-readable product name. */\n name: string;\n /** URL to the product logo (absolute or relative). */\n logoUrl?: string | null;\n /** Product marketing site URL. */\n websiteUrl: string;\n}\n\nexport interface WebsiteSwitcherProps {\n /** All Burdenoff ecosystem products to display. */\n products: WebsiteSwitcherProduct[];\n /** Accessible label for the trigger. */\n triggerLabel?: string;\n /** Placeholder text for the search input. */\n searchPlaceholder?: string;\n /** Empty-state text when filtering returns no results. */\n emptyText?: string;\n /** Optional additional CSS class for the trigger. */\n className?: string;\n}\n\n// ============================================================================\n// Helpers\n// ============================================================================\n\nfunction normalizeSearch(value: string): string {\n return value.toLowerCase().trim();\n}\n\nfunction filterProducts(\n products: WebsiteSwitcherProduct[],\n query: string,\n): WebsiteSwitcherProduct[] {\n const normalized = normalizeSearch(query);\n if (!normalized) return products;\n return products.filter((p) => normalizeSearch(p.name).includes(normalized));\n}\n\n// ============================================================================\n// Component\n// ============================================================================\n\nexport function WebsiteSwitcher({\n products,\n triggerLabel = \"Explore products\",\n searchPlaceholder = \"Find a product…\",\n emptyText = \"No products match your search.\",\n className,\n}: WebsiteSwitcherProps) {\n const [open, setOpen] = useState(false);\n const [query, setQuery] = useState(\"\");\n\n const filtered = useMemo(\n () => filterProducts(products, query),\n [products, query],\n );\n\n return (\n <DropdownMenu.Root open={open} onOpenChange={setOpen}>\n <DropdownMenu.Trigger\n className={cn(\n \"inline-flex items-center gap-1.5 text-sm font-medium transition-colors\",\n \"text-muted-foreground hover:text-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring rounded-md\",\n className,\n )}\n aria-label={triggerLabel}\n >\n <Globe className=\"h-4 w-4\" aria-hidden=\"true\" />\n <span className=\"hidden sm:inline\">{triggerLabel}</span>\n <ChevronDown\n className={cn(\n \"h-3.5 w-3.5 transition-transform duration-200\",\n open && \"rotate-180\",\n )}\n aria-hidden=\"true\"\n />\n </DropdownMenu.Trigger>\n\n <DropdownMenu.Portal>\n <DropdownMenu.Content\n className=\"z-50 min-w-[16rem] max-w-[20rem] rounded-lg border border-border/60 bg-popover p-2 shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2\"\n sideOffset={8}\n align=\"end\"\n avoidCollisions\n >\n <div className=\"px-2 pb-2 pt-1\">\n <p className=\"text-xs font-medium text-muted-foreground mb-2\">\n Burdenoff ecosystem\n </p>\n <div className=\"relative\">\n <Search\n className=\"absolute left-2.5 top-1/2 -translate-y-1/2 h-3.5 w-3.5 text-muted-foreground\"\n aria-hidden=\"true\"\n />\n <Input\n type=\"search\"\n value={query}\n onChange={(e) => setQuery(e.target.value)}\n placeholder={searchPlaceholder}\n className=\"h-8 pl-8 text-sm\"\n aria-label={searchPlaceholder}\n onKeyDown={(e) => {\n if (e.key === \"Escape\") {\n setQuery(\"\");\n }\n }}\n />\n </div>\n </div>\n\n <DropdownMenu.Separator className=\"my-1 h-px bg-border/60\" />\n\n <div className=\"max-h-[min(60vh,24rem)] overflow-y-auto py-1\">\n {filtered.length === 0 ? (\n <div className=\"px-3 py-4 text-center text-sm text-muted-foreground\">\n {emptyText}\n </div>\n ) : (\n filtered.map((product) => (\n <DropdownMenu.Item key={product.slug} asChild>\n <a\n href={product.websiteUrl}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n className={cn(\n \"flex items-center gap-3 rounded-md px-2 py-2 text-sm outline-none\",\n \"text-foreground hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground\",\n )}\n >\n {product.logoUrl ? (\n <img\n src={product.logoUrl}\n alt=\"\"\n aria-hidden=\"true\"\n className=\"h-5 w-5 shrink-0 rounded object-contain\"\n />\n ) : (\n <span className=\"flex h-5 w-5 shrink-0 items-center justify-center rounded bg-primary/10 text-[10px] font-bold text-primary\">\n {product.name.charAt(0)}\n </span>\n )}\n <span className=\"truncate\">{product.name}</span>\n </a>\n </DropdownMenu.Item>\n ))\n )}\n </div>\n\n <DropdownMenu.Arrow className=\"fill-popover\" />\n </DropdownMenu.Content>\n </DropdownMenu.Portal>\n </DropdownMenu.Root>\n );\n}\n"]}
@@ -0,0 +1,146 @@
1
+ import * as React from 'react';
2
+ import { useState, useMemo } from 'react';
3
+ import * as DropdownMenu from '@radix-ui/react-dropdown-menu';
4
+ import { Globe, ChevronDown, Search } from 'lucide-react';
5
+ import { clsx } from 'clsx';
6
+ import { twMerge } from 'tailwind-merge';
7
+ import { jsx, jsxs } from 'react/jsx-runtime';
8
+
9
+ function cn(...inputs) {
10
+ return twMerge(clsx(inputs));
11
+ }
12
+ var Input = React.forwardRef(
13
+ ({ className, type, ...props }, ref) => {
14
+ return /* @__PURE__ */ jsx(
15
+ "input",
16
+ {
17
+ type,
18
+ className: cn(
19
+ "flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",
20
+ className
21
+ ),
22
+ ref,
23
+ ...props
24
+ }
25
+ );
26
+ }
27
+ );
28
+ Input.displayName = "Input";
29
+ function normalizeSearch(value) {
30
+ return value.toLowerCase().trim();
31
+ }
32
+ function filterProducts(products, query) {
33
+ const normalized = normalizeSearch(query);
34
+ if (!normalized) return products;
35
+ return products.filter((p) => normalizeSearch(p.name).includes(normalized));
36
+ }
37
+ function WebsiteSwitcher({
38
+ products,
39
+ triggerLabel = "Explore products",
40
+ searchPlaceholder = "Find a product\u2026",
41
+ emptyText = "No products match your search.",
42
+ className
43
+ }) {
44
+ const [open, setOpen] = useState(false);
45
+ const [query, setQuery] = useState("");
46
+ const filtered = useMemo(
47
+ () => filterProducts(products, query),
48
+ [products, query]
49
+ );
50
+ return /* @__PURE__ */ jsxs(DropdownMenu.Root, { open, onOpenChange: setOpen, children: [
51
+ /* @__PURE__ */ jsxs(
52
+ DropdownMenu.Trigger,
53
+ {
54
+ className: cn(
55
+ "inline-flex items-center gap-1.5 text-sm font-medium transition-colors",
56
+ "text-muted-foreground hover:text-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring rounded-md",
57
+ className
58
+ ),
59
+ "aria-label": triggerLabel,
60
+ children: [
61
+ /* @__PURE__ */ jsx(Globe, { className: "h-4 w-4", "aria-hidden": "true" }),
62
+ /* @__PURE__ */ jsx("span", { className: "hidden sm:inline", children: triggerLabel }),
63
+ /* @__PURE__ */ jsx(
64
+ ChevronDown,
65
+ {
66
+ className: cn(
67
+ "h-3.5 w-3.5 transition-transform duration-200",
68
+ open && "rotate-180"
69
+ ),
70
+ "aria-hidden": "true"
71
+ }
72
+ )
73
+ ]
74
+ }
75
+ ),
76
+ /* @__PURE__ */ jsx(DropdownMenu.Portal, { children: /* @__PURE__ */ jsxs(
77
+ DropdownMenu.Content,
78
+ {
79
+ className: "z-50 min-w-[16rem] max-w-[20rem] rounded-lg border border-border/60 bg-popover p-2 shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2",
80
+ sideOffset: 8,
81
+ align: "end",
82
+ avoidCollisions: true,
83
+ children: [
84
+ /* @__PURE__ */ jsxs("div", { className: "px-2 pb-2 pt-1", children: [
85
+ /* @__PURE__ */ jsx("p", { className: "text-xs font-medium text-muted-foreground mb-2", children: "Burdenoff ecosystem" }),
86
+ /* @__PURE__ */ jsxs("div", { className: "relative", children: [
87
+ /* @__PURE__ */ jsx(
88
+ Search,
89
+ {
90
+ className: "absolute left-2.5 top-1/2 -translate-y-1/2 h-3.5 w-3.5 text-muted-foreground",
91
+ "aria-hidden": "true"
92
+ }
93
+ ),
94
+ /* @__PURE__ */ jsx(
95
+ Input,
96
+ {
97
+ type: "search",
98
+ value: query,
99
+ onChange: (e) => setQuery(e.target.value),
100
+ placeholder: searchPlaceholder,
101
+ className: "h-8 pl-8 text-sm",
102
+ "aria-label": searchPlaceholder,
103
+ onKeyDown: (e) => {
104
+ if (e.key === "Escape") {
105
+ setQuery("");
106
+ }
107
+ }
108
+ }
109
+ )
110
+ ] })
111
+ ] }),
112
+ /* @__PURE__ */ jsx(DropdownMenu.Separator, { className: "my-1 h-px bg-border/60" }),
113
+ /* @__PURE__ */ jsx("div", { className: "max-h-[min(60vh,24rem)] overflow-y-auto py-1", children: filtered.length === 0 ? /* @__PURE__ */ jsx("div", { className: "px-3 py-4 text-center text-sm text-muted-foreground", children: emptyText }) : filtered.map((product) => /* @__PURE__ */ jsx(DropdownMenu.Item, { asChild: true, children: /* @__PURE__ */ jsxs(
114
+ "a",
115
+ {
116
+ href: product.websiteUrl,
117
+ target: "_blank",
118
+ rel: "noopener noreferrer",
119
+ className: cn(
120
+ "flex items-center gap-3 rounded-md px-2 py-2 text-sm outline-none",
121
+ "text-foreground hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground"
122
+ ),
123
+ children: [
124
+ product.logoUrl ? /* @__PURE__ */ jsx(
125
+ "img",
126
+ {
127
+ src: product.logoUrl,
128
+ alt: "",
129
+ "aria-hidden": "true",
130
+ className: "h-5 w-5 shrink-0 rounded object-contain"
131
+ }
132
+ ) : /* @__PURE__ */ jsx("span", { className: "flex h-5 w-5 shrink-0 items-center justify-center rounded bg-primary/10 text-[10px] font-bold text-primary", children: product.name.charAt(0) }),
133
+ /* @__PURE__ */ jsx("span", { className: "truncate", children: product.name })
134
+ ]
135
+ }
136
+ ) }, product.slug)) }),
137
+ /* @__PURE__ */ jsx(DropdownMenu.Arrow, { className: "fill-popover" })
138
+ ]
139
+ }
140
+ ) })
141
+ ] });
142
+ }
143
+
144
+ export { WebsiteSwitcher };
145
+ //# sourceMappingURL=website-switcher.mjs.map
146
+ //# sourceMappingURL=website-switcher.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/utils/cn.ts","../../src/ui/input.tsx","../../src/components/website-switcher.tsx"],"names":["jsx"],"mappings":";;;;;;;;AAmBO,SAAS,MAAM,MAAA,EAA8B;AAClD,EAAA,OAAO,OAAA,CAAQ,IAAA,CAAK,MAAM,CAAC,CAAA;AAC7B;ACjBA,IAAM,KAAA,GAAc,KAAA,CAAA,UAAA;AAAA,EAClB,CAAC,EAAE,SAAA,EAAW,MAAM,GAAG,KAAA,IAAS,GAAA,KAAQ;AACtC,IAAA,uBACE,GAAA;AAAA,MAAC,OAAA;AAAA,MAAA;AAAA,QACC,IAAA;AAAA,QACA,SAAA,EAAW,EAAA;AAAA,UACT,yWAAA;AAAA,UACA;AAAA,SACF;AAAA,QACA,GAAA;AAAA,QACC,GAAG;AAAA;AAAA,KACN;AAAA,EAEJ;AACF,CAAA;AACA,KAAA,CAAM,WAAA,GAAc,OAAA;AC0CpB,SAAS,gBAAgB,KAAA,EAAuB;AAC9C,EAAA,OAAO,KAAA,CAAM,WAAA,EAAY,CAAE,IAAA,EAAK;AAClC;AAEA,SAAS,cAAA,CACP,UACA,KAAA,EAC0B;AAC1B,EAAA,MAAM,UAAA,GAAa,gBAAgB,KAAK,CAAA;AACxC,EAAA,IAAI,CAAC,YAAY,OAAO,QAAA;AACxB,EAAA,OAAO,QAAA,CAAS,MAAA,CAAO,CAAC,CAAA,KAAM,eAAA,CAAgB,EAAE,IAAI,CAAA,CAAE,QAAA,CAAS,UAAU,CAAC,CAAA;AAC5E;AAMO,SAAS,eAAA,CAAgB;AAAA,EAC9B,QAAA;AAAA,EACA,YAAA,GAAe,kBAAA;AAAA,EACf,iBAAA,GAAoB,sBAAA;AAAA,EACpB,SAAA,GAAY,gCAAA;AAAA,EACZ;AACF,CAAA,EAAyB;AACvB,EAAA,MAAM,CAAC,IAAA,EAAM,OAAO,CAAA,GAAI,SAAS,KAAK,CAAA;AACtC,E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A,cACC,MAAM,OAAA,CAAQ,UAAA;AAAA,cACd,MAAA,EAAO,QAAA;AAAA,cACP,GAAA,EAAI,qBAAA;AAAA,cACJ,SAAA,EAAW,EAAA;AAAA,gBACT,mEAAA;AAAA,gBACA;AAAA,eACF;AAAA,cAEC,QAAA,EAAA;AAAA,gBAAA,OAAA,CAAQ,0BACPA,GAAAA;AAAA,kBAAC,KAAA;AAAA,kBAAA;AAAA,oBACC,KAAK,OAAA,CAAQ,OAAA;AAAA,oBACb,GAAA,EAAI,EAAA;AAAA,oBACJ,aAAA,EAAY,MAAA;AAAA,oBACZ,SAAA,EAAU;AAAA;AAAA,iBACZ,mBAEAA,GAAAA,CAAC,MAAA,EAAA,EAAK,SAAA,EAAU,8GACb,QAAA,EAAA,OAAA,CAAQ,IAAA,CAAK,MAAA,CAAO,CAAC,CAAA,EACxB,CAAA;AAAA,gCAEFA,GAAAA,CAAC,MAAA,EAAA,EAAK,SAAA,EAAU,UAAA,EAAY,kBAAQ,IAAA,EAAK;AAAA;AAAA;AAAA,WAC3C,EAAA,EAvBsB,OAAA,CAAQ,IAwBhC,CACD,CAAA,EAEL,CAAA;AAAA,0BAEAA,GAAAA,CAAc,YAAA,CAAA,KAAA,EAAb,EAAmB,WAAU,cAAA,EAAe;AAAA;AAAA;AAAA,KAC/C,EACF;AAAA,GAAA,EACF,CAAA;AAEJ","file":"website-switcher.mjs","sourcesContent":["/**\n * Utility function to merge Tailwind CSS classes\n * Combines clsx and tailwind-merge for optimal class handling\n */\n\nimport { type ClassValue, clsx } from \"clsx\";\nimport { twMerge } from \"tailwind-merge\";\n\n/**\n * Merge multiple class names intelligently\n * - Handles conditional classes via clsx\n * - Deduplicates and resolves Tailwind conflicts via tailwind-merge\n *\n * @example\n * ```ts\n * cn('px-4 py-2', 'bg-blue-500', { 'text-white': isActive })\n * // => 'px-4 py-2 bg-blue-500 text-white' (if isActive is true)\n * ```\n */\nexport function cn(...inputs: ClassValue[]): string {\n return twMerge(clsx(inputs));\n}\n","import * as React from \"react\";\n\nimport { cn } from \"../utils/cn\";\n\nconst Input = React.forwardRef<HTMLInputElement, React.ComponentProps<\"input\">>(\n ({ className, type, ...props }, ref) => {\n return (\n <input\n type={type}\n className={cn(\n \"flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm\",\n className,\n )}\n ref={ref}\n {...props}\n />\n );\n },\n);\nInput.displayName = \"Input\";\n\nexport { Input };\n","\"use client\";\n\n/**\n * WebsiteSwitcher Component\n *\n * A dropdown menu for navigating between Burdenoff ecosystem product websites.\n * Includes a search filter and renders each product with its logo and name.\n *\n * @example\n * ```tsx\n * import { WebsiteSwitcher } from '@burdenoff/website-sdk'\n *\n * <WebsiteSwitcher\n * products={[\n * { slug: 'vibecontrols', name: 'VibeControls', logoUrl: '/vibe.svg', websiteUrl: 'https://vibecontrols.com' },\n * { slug: 'fluidgrids', name: 'FluidGrids', logoUrl: '/fg.svg', websiteUrl: 'https://fluidgrids.com' },\n * ]}\n * />\n * ```\n */\n\nimport { useMemo, useState } from \"react\";\n\nimport * as DropdownMenu from \"@radix-ui/react-dropdown-menu\";\nimport { ChevronDown, Globe, Search } from \"lucide-react\";\n\nimport { Input } from \"../ui/input\";\nimport { cn } from \"../utils/cn\";\n\n// ============================================================================\n// Types\n// ============================================================================\n\nexport interface WebsiteSwitcherProduct {\n /** Stable identifier for the product. */\n slug: string;\n /** Human-readable product name. */\n name: string;\n /** URL to the product logo (absolute or relative). */\n logoUrl?: string | null;\n /** Product marketing site URL. */\n websiteUrl: string;\n}\n\nexport interface WebsiteSwitcherProps {\n /** All Burdenoff ecosystem products to display. */\n products: WebsiteSwitcherProduct[];\n /** Accessible label for the trigger. */\n triggerLabel?: string;\n /** Placeholder text for the search input. */\n searchPlaceholder?: string;\n /** Empty-state text when filtering returns no results. */\n emptyText?: string;\n /** Optional additional CSS class for the trigger. */\n className?: string;\n}\n\n// ============================================================================\n// Helpers\n// ============================================================================\n\nfunction normalizeSearch(value: string): string {\n return value.toLowerCase().trim();\n}\n\nfunction filterProducts(\n products: WebsiteSwitcherProduct[],\n query: string,\n): WebsiteSwitcherProduct[] {\n const normalized = normalizeSearch(query);\n if (!normalized) return products;\n return products.filter((p) => normalizeSearch(p.name).includes(normalized));\n}\n\n// ============================================================================\n// Component\n// ============================================================================\n\nexport function WebsiteSwitcher({\n products,\n triggerLabel = \"Explore products\",\n searchPlaceholder = \"Find a product…\",\n emptyText = \"No products match your search.\",\n className,\n}: WebsiteSwitcherProps) {\n const [open, setOpen] = useState(false);\n const [query, setQuery] = useState(\"\");\n\n const filtered = useMemo(\n () => filterProducts(products, query),\n [products, query],\n );\n\n return (\n <DropdownMenu.Root open={open} onOpenChange={setOpen}>\n <DropdownMenu.Trigger\n className={cn(\n \"inline-flex items-center gap-1.5 text-sm font-medium transition-colors\",\n \"text-muted-foreground hover:text-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring rounded-md\",\n className,\n )}\n aria-label={triggerLabel}\n >\n <Globe className=\"h-4 w-4\" aria-hidden=\"true\" />\n <span className=\"hidden sm:inline\">{triggerLabel}</span>\n <ChevronDown\n className={cn(\n \"h-3.5 w-3.5 transition-transform duration-200\",\n open && \"rotate-180\",\n )}\n aria-hidden=\"true\"\n />\n </DropdownMenu.Trigger>\n\n <DropdownMenu.Portal>\n <DropdownMenu.Content\n className=\"z-50 min-w-[16rem] max-w-[20rem] rounded-lg border border-border/60 bg-popover p-2 shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2\"\n sideOffset={8}\n align=\"end\"\n avoidCollisions\n >\n <div className=\"px-2 pb-2 pt-1\">\n <p className=\"text-xs font-medium text-muted-foreground mb-2\">\n Burdenoff ecosystem\n </p>\n <div className=\"relative\">\n <Search\n className=\"absolute left-2.5 top-1/2 -translate-y-1/2 h-3.5 w-3.5 text-muted-foreground\"\n aria-hidden=\"true\"\n />\n <Input\n type=\"search\"\n value={query}\n onChange={(e) => setQuery(e.target.value)}\n placeholder={searchPlaceholder}\n className=\"h-8 pl-8 text-sm\"\n aria-label={searchPlaceholder}\n onKeyDown={(e) => {\n if (e.key === \"Escape\") {\n setQuery(\"\");\n }\n }}\n />\n </div>\n </div>\n\n <DropdownMenu.Separator className=\"my-1 h-px bg-border/60\" />\n\n <div className=\"max-h-[min(60vh,24rem)] overflow-y-auto py-1\">\n {filtered.length === 0 ? (\n <div className=\"px-3 py-4 text-center text-sm text-muted-foreground\">\n {emptyText}\n </div>\n ) : (\n filtered.map((product) => (\n <DropdownMenu.Item key={product.slug} asChild>\n <a\n href={product.websiteUrl}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n className={cn(\n \"flex items-center gap-3 rounded-md px-2 py-2 text-sm outline-none\",\n \"text-foreground hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground\",\n )}\n >\n {product.logoUrl ? (\n <img\n src={product.logoUrl}\n alt=\"\"\n aria-hidden=\"true\"\n className=\"h-5 w-5 shrink-0 rounded object-contain\"\n />\n ) : (\n <span className=\"flex h-5 w-5 shrink-0 items-center justify-center rounded bg-primary/10 text-[10px] font-bold text-primary\">\n {product.name.charAt(0)}\n </span>\n )}\n <span className=\"truncate\">{product.name}</span>\n </a>\n </DropdownMenu.Item>\n ))\n )}\n </div>\n\n <DropdownMenu.Arrow className=\"fill-popover\" />\n </DropdownMenu.Content>\n </DropdownMenu.Portal>\n </DropdownMenu.Root>\n );\n}\n"]}