Open-source manufacturing ERP, MES and QMS. Quoting, MRP, inventory, shop floor, quality and lot/serial traceability on one Postgres schema, with a REST API and MCP server. Self-host or use Carbon Cloud.
TypeScript ai-agentsbill-of-materialserpinventory-managementleanmanufacturingmanufacturing-execution-systemmcp-servermesmrpopen-source-erppostgresqlproduction-planningqmsquality-management-systemreact-routerself-hostedsupabasetraceabilitytypescript
feat: www initial commit
Brad Barbinc38757d6a600
diff --git a/apps/mes/app/routes/assets+/manifest[.]webmanifest.ts b/apps/mes/app/routes/assets+/manifest[.]webmanifest.tsdeleted file mode 100644index af10f1945a..0000000000--- a/apps/mes/app/routes/assets+/manifest[.]webmanifest.ts+++ /dev/null@@ -1,152 +0,0 @@-import type { LoaderFunction } from "@remix-run/node";--export const loader: LoaderFunction = () => {- const manifest = {- short_name: "CarbonOS",- name: "CarbonOS MES",- orientation: "landscape",- icons: [- {- src: "/icons/16.png",- sizes: "16x16",- type: "image/png",- },- {- src: "/icons/20.png",- sizes: "20x20",- type: "image/png",- },- {- src: "/icons/29.png",- sizes: "29x29",- type: "image/png",- },- {- src: "/icons/32.png",- sizes: "32x32",- type: "image/png",- },- {- src: "/icons/40.png",- sizes: "40x40",- type: "image/png",- },- {- src: "/icons/50.png",- sizes: "50x50",- type: "image/png",- },- {- src: "/icons/57.png",- sizes: "57x57",- type: "image/png",- },- {- src: "/icons/58.png",- sizes: "58x58",- type: "image/png",- },- {- src: "/icons/60.png",- sizes: "60x60",- type: "image/png",- },- {- src: "/icons/64.png",- sizes: "64x64",- type: "image/png",- },- {- src: "/icons/72.png",- sizes: "72x72",- type: "image/png",- },- {- src: "/icons/76.png",- sizes: "76x76",- type: "image/png",- },- {- src: "/icons/80.png",- sizes: "80x80",- type: "image/png",- },- {- src: "/icons/87.png",- sizes: "87x87",- type: "image/png",- },- {- src: "/icons/100.png",- sizes: "100x100",- type: "image/png",- },- {- src: "/icons/114.png",- sizes: "114x114",- type: "image/png",- },- {- src: "/icons/120.png",- sizes: "120x120",- type: "image/png",- },- {- src: "/icons/128.png",- sizes: "128x128",- type: "image/png",- },- {- src: "/icons/144.png",- sizes: "144x144",- type: "image/png",- },- {- src: "/icons/152.png",- sizes: "152x152",- type: "image/png",- },- {- src: "/icons/167.png",- sizes: "167x167",- type: "image/png",- },- {- src: "/icons/180.png",- sizes: "180x180",- type: "image/png",- },- {- src: "/icons/192.png",- sizes: "192x192",- type: "image/png",- },- {- src: "/icons/256.png",- sizes: "256x256",- type: "image/png",- },- {- src: "/icons/512.png",- sizes: "512x512",- type: "image/png",- },- {- src: "/icons/1024.png",- sizes: "1024x1024",- type: "image/png",- },- ],- start_url: "/",- display: "standalone",- theme_color: "#101113",- background_color: "#101113",- };-- return new Response(JSON.stringify(manifest), {- headers: {- "Content-Type": "application/manifest+json",- "Cache-Control": "public, max-age=600",- },- });-};diff --git a/apps/mes/public/site.webmanifest b/apps/mes/public/site.webmanifestindex 4e209ea8a1..f0630936eb 100644--- a/apps/mes/public/site.webmanifest+++ b/apps/mes/public/site.webmanifest@@ -1,19 +1,141 @@{- "name": "Carbon",- "short_name": "Carbon",+ "short_name": "CarbonOS",+ "name": "CarbonOS MES",+ "orientation": "landscape","icons": [{- "src": "/android-chrome-192x192.png",+ "src": "/icons/16.png",+ "sizes": "16x16",+ "type": "image/png"+ },+ {+ "src": "/icons/20.png",+ "sizes": "20x20",+ "type": "image/png"+ },+ {+ "src": "/icons/29.png",+ "sizes": "29x29",+ "type": "image/png"+ },+ {+ "src": "/icons/32.png",+ "sizes": "32x32",+ "type": "image/png"+ },+ {+ "src": "/icons/40.png",+ "sizes": "40x40",+ "type": "image/png"+ },+ {+ "src": "/icons/50.png",+ "sizes": "50x50",+ "type": "image/png"+ },+ {+ "src": "/icons/57.png",+ "sizes": "57x57",+ "type": "image/png"+ },+ {+ "src": "/icons/58.png",+ "sizes": "58x58",+ "type": "image/png"+ },+ {+ "src": "/icons/60.png",+ "sizes": "60x60",+ "type": "image/png"+ },+ {+ "src": "/icons/64.png",+ "sizes": "64x64",+ "type": "image/png"+ },+ {+ "src": "/icons/72.png",+ "sizes": "72x72",+ "type": "image/png"+ },+ {+ "src": "/icons/76.png",+ "sizes": "76x76",+ "type": "image/png"+ },+ {+ "src": "/icons/80.png",+ "sizes": "80x80",+ "type": "image/png"+ },+ {+ "src": "/icons/87.png",+ "sizes": "87x87",+ "type": "image/png"+ },+ {+ "src": "/icons/100.png",+ "sizes": "100x100",+ "type": "image/png"+ },+ {+ "src": "/icons/114.png",+ "sizes": "114x114",+ "type": "image/png"+ },+ {+ "src": "/icons/120.png",+ "sizes": "120x120",+ "type": "image/png"+ },+ {+ "src": "/icons/128.png",+ "sizes": "128x128",+ "type": "image/png"+ },+ {+ "src": "/icons/144.png",+ "sizes": "144x144",+ "type": "image/png"+ },+ {+ "src": "/icons/152.png",+ "sizes": "152x152",+ "type": "image/png"+ },+ {+ "src": "/icons/167.png",+ "sizes": "167x167",+ "type": "image/png"+ },+ {+ "src": "/icons/180.png",+ "sizes": "180x180",+ "type": "image/png"+ },+ {+ "src": "/icons/192.png","sizes": "192x192","type": "image/png"},{- "src": "/android-chrome-512x512.png",+ "src": "/icons/256.png",+ "sizes": "256x256",+ "type": "image/png"+ },+ {+ "src": "/icons/512.png","sizes": "512x512","type": "image/png"+ },+ {+ "src": "/icons/1024.png",+ "sizes": "1024x1024",+ "type": "image/png"}],- "theme_color": "#ffffff",- "background_color": "#ffffff",- "display": "standalone"+ "start_url": "/",+ "display": "standalone",+ "theme_color": "#101113",+ "background_color": "#101113"}diff --git a/apps/www/.eslintrc.mjs b/apps/www/.eslintrc.mjsnew file mode 100644index 0000000000..d6be4cb1c8--- /dev/null+++ b/apps/www/.eslintrc.mjs@@ -0,0 +1,3 @@+module.exports = {+ extends: ["carbon"],+};diff --git a/apps/www/.gitignore b/apps/www/.gitignorenew file mode 100644index 0000000000..4a02fe5c58--- /dev/null+++ b/apps/www/.gitignore@@ -0,0 +1,10 @@+node_modules++.cache+.vercel+.output++build+public/build+api/index.js*+api/_assets*diff --git a/apps/www/app/entry.client.tsx b/apps/www/app/entry.client.tsxnew file mode 100644index 0000000000..6ebc2c895e--- /dev/null+++ b/apps/www/app/entry.client.tsx@@ -0,0 +1,34 @@+import { POSTHOG_API_HOST, POSTHOG_PROJECT_PUBLIC_KEY } from "@carbon/auth";+import { OperatingSystemContextProvider } from "@carbon/react";+import { I18nProvider } from "@react-aria/i18n";+import { RemixBrowser } from "@remix-run/react";+import posthog from "posthog-js";+import { startTransition, useEffect } from "react";+import { hydrateRoot } from "react-dom/client";++function PosthogInit() {+ useEffect(() => {+ posthog.init(POSTHOG_PROJECT_PUBLIC_KEY, {+ api_host: POSTHOG_API_HOST,+ autocapture: false,+ capture_pageview: false,+ });+ }, []);+ return null;+}++startTransition(() => {+ hydrateRoot(+ document,+ <OperatingSystemContextProvider+ platform={window.navigator.userAgent.includes("Mac") ? "mac" : "windows"}+ >+ <I18nProvider+ locale={navigator.language ?? navigator.languages?.[0] ?? "en-US"}+ >+ <RemixBrowser />+ </I18nProvider>+ <PosthogInit />+ </OperatingSystemContextProvider>+ );+});diff --git a/apps/www/app/entry.server.tsx b/apps/www/app/entry.server.tsxnew file mode 100644index 0000000000..0cb74d5a84--- /dev/null+++ b/apps/www/app/entry.server.tsx@@ -0,0 +1,40 @@+import type { OperatingSystemPlatform } from "@carbon/react";+import { OperatingSystemContextProvider } from "@carbon/react";+import { I18nProvider } from "@react-aria/i18n";+import { RemixServer } from "@remix-run/react";+import type { EntryContext } from "@vercel/remix";+import { handleRequest } from "@vercel/remix";++import { parseAcceptLanguage } from "intl-parse-accept-language";++export default async function (+ request: Request,+ responseStatusCode: number,+ responseHeaders: Headers,+ remixContext: EntryContext+) {+ const acceptLanguage = request.headers.get("accept-language");+ const locales = parseAcceptLanguage(acceptLanguage, {+ validate: Intl.DateTimeFormat.supportedLocalesOf,+ });++ // get whether it's a mac or pc from the headers+ const platform: OperatingSystemPlatform = request.headers+ .get("user-agent")+ ?.includes("Mac")+ ? "mac"+ : "windows";+ let remixServer = (+ <OperatingSystemContextProvider platform={platform}>+ <I18nProvider locale={locales?.[0] ?? "en-US"}>+ <RemixServer context={remixContext} url={request.url} />+ </I18nProvider>+ </OperatingSystemContextProvider>+ );+ return handleRequest(+ request,+ responseStatusCode,+ responseHeaders,+ remixServer+ );+}diff --git a/apps/www/app/hooks/index.ts b/apps/www/app/hooks/index.tsnew file mode 100644index 0000000000..a3062fc453--- /dev/null+++ b/apps/www/app/hooks/index.ts@@ -0,0 +1,6 @@+import { useMode } from "./useMode";+import { useOptimisticLocation } from "./useOptimisticLocation";+import { useRouteData } from "./useRouteData";+import { useUser } from "./useUser";++export { useMode, useOptimisticLocation, useRouteData, useUser };diff --git a/apps/www/app/hooks/useMode.tsx b/apps/www/app/hooks/useMode.tsxnew file mode 100644index 0000000000..619332f725--- /dev/null+++ b/apps/www/app/hooks/useMode.tsx@@ -0,0 +1,32 @@+import { useFetchers } from "@remix-run/react";+import type { Mode } from "~/types/validators";+import { modeValidator } from "~/types/validators";+import { path } from "~/utils/path";+import { useRouteData } from "./useRouteData";++export function useOptimisticMode() {+ const fetchers = useFetchers();+ const modeFetcher = fetchers.find((f) => f.formAction === "/");++ if (modeFetcher && modeFetcher.formData) {+ const mode = { mode: modeFetcher.formData.get("mode") };+ const submission = modeValidator.safeParse(mode);++ if (submission.success) {+ return submission.data.mode;+ }+ }+}++export function useMode() {+ const optimisticMode = useOptimisticMode();+ const routeData = useRouteData<{ mode: Mode }>(path.to.root);++ let mode = routeData?.mode ?? "dark";++ if (optimisticMode && optimisticMode !== "system") {+ mode = optimisticMode;+ }++ return mode;+}diff --git a/apps/www/app/hooks/useOptimisticLocation.ts b/apps/www/app/hooks/useOptimisticLocation.tsnew file mode 100644index 0000000000..84eb784fa9--- /dev/null+++ b/apps/www/app/hooks/useOptimisticLocation.ts@@ -0,0 +1,13 @@+// credit: Matt Aitken at trigger.dev+import { useLocation, useNavigation } from "@remix-run/react";++export function useOptimisticLocation() {+ const navigation = useNavigation();+ const location = useLocation();++ if (navigation.state === "idle" || !navigation.location) {+ return location;+ }++ return navigation.location;+}diff --git a/apps/www/app/hooks/useRouteData.tsx b/apps/www/app/hooks/useRouteData.tsxnew file mode 100644index 0000000000..9c6f2bf54a--- /dev/null+++ b/apps/www/app/hooks/useRouteData.tsx@@ -0,0 +1,11 @@+import { useMatches } from "@remix-run/react";+import { useMemo } from "react";++export function useRouteData<T>(path: string): T | undefined {+ const matchingRoutes = useMatches();+ const route = useMemo(+ () => matchingRoutes.find((route) => route.pathname === path),+ [matchingRoutes, path]+ );+ return (route?.data as T) || undefined;+}diff --git a/apps/www/app/hooks/useUrlParams.tsx b/apps/www/app/hooks/useUrlParams.tsxnew file mode 100644index 0000000000..df815dfcaf--- /dev/null+++ b/apps/www/app/hooks/useUrlParams.tsx@@ -0,0 +1,43 @@+import { useSearchParams, useSubmit } from "@remix-run/react";+import { useCallback } from "react";++export function useUrlParams(): [+ URLSearchParams,+ (+ params: Record<string, string | string[] | number | undefined | null>+ ) => void+] {+ const submit = useSubmit();+ const [searchParams] = useSearchParams();++ const setSearchParams = useCallback(+ (params: Record<string, string | string[] | number | undefined | null>) => {+ Object.entries(params).forEach(([name, value]) => {+ if (value) {+ if (Array.isArray(value)) {+ if (value.length === 0) {+ searchParams.delete(name);+ } else {+ value.forEach((v, i) => {+ if (i === 0) {+ searchParams.set(name, v.toString());+ } else {+ searchParams.append(name, v.toString());+ }+ });+ }+ } else {+ searchParams.set(name, value.toString());+ }+ } else {+ searchParams.delete(name);+ }+ });++ submit(searchParams);+ },+ [submit, searchParams]+ );++ return [searchParams, setSearchParams];+}diff --git a/apps/www/app/hooks/useUser.tsx b/apps/www/app/hooks/useUser.tsxnew file mode 100644index 0000000000..1de0128234--- /dev/null+++ b/apps/www/app/hooks/useUser.tsx@@ -0,0 +1,62 @@+import { path } from "~/utils/path";+import { useRouteData } from "./useRouteData";++type PersonalData = {+ id: string;+ email: string;+ firstName: string;+ lastName: string;+ avatarUrl: string | null;+};++type Company = {+ id: string;+ name: string;+ logo: string | null;+};++type User = PersonalData & {+ company: Company;+};++export function useUser(): User {+ const data = useRouteData<{+ company: unknown;+ user: unknown;+ }>(path.to.authenticatedRoot);++ if (+ data?.company &&+ isCompany(data.company) &&+ data?.user &&+ isUser(data.user)+ ) {+ return {+ ...data.user,+ company: data.company,+ };+ }++ // TODO: force logout -- the likely cause is development changes+ throw new Error(+ "useUser must be used within an authenticated route. If you are seeing this error, you are likely in development and have changed the session variables. Try deleting the cookies."+ );+}++function isCompany(value: any): value is Company {+ return (+ typeof value.id === "string" &&+ typeof value.name === "string" &&+ (typeof value.logo === "string" || value.logo === null)+ );+}++function isUser(value: any): value is User {+ return (+ typeof value.id === "string" &&+ typeof value.email === "string" &&+ typeof value.firstName === "string" &&+ typeof value.lastName === "string" &&+ "avatarUrl" in value+ );+}diff --git a/apps/www/app/root.tsx b/apps/www/app/root.tsxnew file mode 100644index 0000000000..baffaf182d--- /dev/null+++ b/apps/www/app/root.tsx@@ -0,0 +1,177 @@+import { error, getBrowserEnv } from "@carbon/auth";+import { getSessionFlash } from "@carbon/auth/session.server";+import { validator } from "@carbon/form";+import { Button, Heading, toast } from "@carbon/react";+import {+ Links,+ Meta,+ Outlet,+ Scripts,+ ScrollRestoration,+ isRouteErrorResponse,+ useLoaderData,+ useRouteError,+} from "@remix-run/react";+import { Analytics } from "@vercel/analytics/react";+import type {+ ActionFunctionArgs,+ LoaderFunctionArgs,+ MetaFunction,+} from "@vercel/remix";+import { json } from "@vercel/remix";+import React, { useEffect } from "react";+import { getMode, setMode } from "~/services/mode.server";++import Tailwind from "~/styles/tailwind.css?url";++import { modeValidator } from "~/types/validators";+import { useMode } from "./hooks/useMode";++// export const config = { runtime: "edge" };++export function links() {+ return [{ rel: "stylesheet", href: Tailwind }];+}++export const meta: MetaFunction = () => {+ return [+ {+ title: "CarbonOS | The operating system for manufacturing",+ },+ ];+};++export async function loader({ request }: LoaderFunctionArgs) {+ const {+ POSTHOG_API_HOST,+ POSTHOG_PROJECT_PUBLIC_KEY,+ SUPABASE_API_URL,+ SUPABASE_ANON_PUBLIC,+ } = getBrowserEnv();++ const sessionFlash = await getSessionFlash(request);++ return json(+ {+ env: {+ POSTHOG_API_HOST,+ POSTHOG_PROJECT_PUBLIC_KEY,+ SUPABASE_API_URL,+ SUPABASE_ANON_PUBLIC,+ },+ mode: getMode(request),+ result: sessionFlash?.result,+ },+ {+ headers: sessionFlash?.headers,+ }+ );+}++export async function action({ request }: ActionFunctionArgs) {+ const validation = await validator(modeValidator).validate(+ await request.formData()+ );++ if (validation.error) {+ return json(error(validation.error, "Invalid mode"), {+ status: 400,+ });+ }++ return json(+ {+ mode: validation.data.mode,+ },+ {+ headers: { "Set-Cookie": setMode(validation.data.mode) },+ }+ );+}++function Document({+ children,+ title = "CarbonOS",+ mode = "dark",+}: {+ children: React.ReactNode;+ title?: string;+ mode?: "light" | "dark";+}) {+ return (+ <html lang="en" className={`${mode} h-full overflow-x-hidden`}>+ <head>+ <meta charSet="utf-8" />+ <meta name="viewport" content="width=device-width, initial-scale=1" />+ <Meta />+ <title>{title}</title>+ <Links />+ </head>+ <body className="h-full w-full flex flex-col bg-background text-foreground antialiased selection:bg-[#00cc9937] selection:text-[#007763fd] dark:selection:bg-[#00fff61d] dark:selection:text-[#67ffded2]">+ {children}++ <ScrollRestoration />+ <Scripts />+ <Analytics />+ </body>+ </html>+ );+}++export default function App() {+ const loaderData = useLoaderData<typeof loader>();+ const env = loaderData?.env ?? {};+ const result = loaderData?.result;++ /* Toast Messages */+ useEffect(() => {+ if (result?.success === true) {+ toast.success(result.message);+ } else if (result?.message) {+ toast.error(result.message);+ }+ }, [result]);++ /* Dark/Light Mode */+ const mode = useMode();++ return (+ <Document mode={mode}>+ <Outlet />+ <script+ dangerouslySetInnerHTML={{+ __html: `window.env = ${JSON.stringify(env)}`,+ }}+ />+ </Document>+ );+}++export function ErrorBoundary() {+ const error = useRouteError();++ const message = isRouteErrorResponse(error)+ ? error.data.message ?? error.data+ : error instanceof Error+ ? error.message+ : String(error);++ return (+ <Document title="Error!">+ <div className="dark">+ <div className="flex flex-col w-full h-screen bg-zinc-900 items-center justify-center space-y-4 ">+ <img+ src="/carbon-logo-light.png"+ alt="Carbon Logo"+ className="block max-w-[60px]"+ />+ <Heading size="h1">Something went wrong</Heading>+ <p className="text-muted-foreground max-w-2xl">{message}</p>+ <Button onClick={() => (window.location.href = "/")}>+ Back Home+ </Button>+ </div>+ </div>+ </Document>+ );+}diff --git a/apps/www/app/routes/_index.tsx b/apps/www/app/routes/_index.tsxnew file mode 100644index 0000000000..51ff496685--- /dev/null+++ b/apps/www/app/routes/_index.tsx@@ -0,0 +1,42 @@+import { BsHexagonFill } from "react-icons/bs";+import { FaPlay } from "react-icons/fa6";++export default function Route() {+ return (+ <>+ <header className="flex select-none items-center bg-background pl-5 pr-4 border-b h-[52px] border-transparent">+ <div className="flex items-center gap-2 z-logo text-foreground cursor-pointer">+ <a+ href="/"+ className="text-xl font-bold tracking-tighter text-foreground flex items-center gap-2"+ >+ <BsHexagonFill />+ </a>+ </div>+ </header>++ <div className="relative flex h-full w-full overflow-hidden bg-background">+ <a+ id="announcement"+ href="https://google.com"+ className="fixed top-10 left-1/2 -translate-x-1/2 group items-center gap-2 border border-input rounded-full px-4 py-1.5 flex mb-4.5 text-xs hover:bg-alpha-gray-2 dark:hover:bg-gray-900 transition-theme"+ target="_blank"+ rel="noreferrer"+ >+ <FaPlay />+ Introducing CarbonOS: The operating system for manufacturing+ <span className="absolute -top-px left-[2.5rem] h-px w-[calc(100%-5rem)] bg-gradient-to-r from-emerald-600/0 via-emerald-600/80 to-emerald-600/0 opacity-0 group-hover:opacity-100 transition-opacity transition-theme"></span>+ <span className="absolute -top-px left-1/2 -translate-x-1/2 h-px w-[60px] bg-gradient-to-r from-emerald-300/0 via-emerald-300/50 to-emerald-300/0 mix-blend-overlay opacity-0 group-hover:opacity-100 transition-opacity transition-theme"></span>+ </a>++ <div className="ray" data-theme="dark">+ <div className="light-ray ray-one"></div>+ <div className="light-ray ray-two"></div>+ <div className="light-ray ray-three"></div>+ <div className="light-ray ray-four"></div>+ <div className="light-ray ray-five"></div>+ </div>+ </div>+ </>+ );+}diff --git a/apps/www/app/services/mode.server.ts b/apps/www/app/services/mode.server.tsnew file mode 100644index 0000000000..c5f8184432--- /dev/null+++ b/apps/www/app/services/mode.server.ts@@ -0,0 +1,26 @@+import { DOMAIN } from "@carbon/auth";+import * as cookie from "cookie";+import type { Mode } from "~/types/validators";++const cookieName = "mode";++export function getMode(request: Request): Mode | null {+ const cookieHeader = request.headers.get("cookie");+ const parsed = cookieHeader+ ? cookie.parse(cookieHeader)[cookieName]+ : "light";+ if (parsed === "light" || parsed === "dark") return parsed;+ return null;+}++export function setMode(mode: Mode | "system") {+ if (mode === "system") {+ return cookie.serialize(cookieName, "", { path: "/", maxAge: -1 });+ } else {+ return cookie.serialize(cookieName, mode, {+ path: "/",+ maxAge: 31536000,+ domain: DOMAIN,+ });+ }+}diff --git a/apps/www/app/styles/docs.css b/apps/www/app/styles/docs.cssnew file mode 100644index 0000000000..13cecf88e8--- /dev/null+++ b/apps/www/app/styles/docs.css@@ -0,0 +1,1592 @@+.Code {+ width: 100%;+}++.Code .prism-code {+ margin: 0;+ padding: 0.25rem;+ background-color: none;+ white-space: normal;+ word-break: break-word;+}++.Code .token-line {+ font-size: 0.875rem;+ line-height: 1.25rem;+}++.Code .token.function,+.Code .token.imports,+.Code .token.keyword.module,+.Code .token.property-access {+ --tw-text-opacity: 1 !important;+}++.Code .token.function,+.Code .token.keyword.module {+ font-style: normal !important;+}++.Code .token.console.class-name,+.Code .token.doc-comment.optional-parameter,+.Code .token.doc-comment.optional-parameter.punctuation,+.Code .token.doc-comment.parameter,+.Code .token.doc-comment.parameter.punctuation,+.Code .token.operator,+.Code .token.parameter,+.Code .token.plain,+.Code .token.punctuation {+ font-style: normal !important;+ --tw-text-opacity: 1 !important;+}++.Code .token.doc-comment.keyword,+.Code .token.keyword {+ font-style: normal !important;+}++.Code .token.string {+ font-style: normal !important;+ --tw-text-opacity: 1 !important;+}++.Code .token.constant {+ font-style: normal !important;+}++.Code .token.comment {+ font-style: normal !important;+ --tw-text-opacity: 1 !important;+}++.Code .token.number {+ --tw-text-opacity: 1 !important;+}++.Code .token.boolean,+.Code .token.doc-comment.class-name {+ --tw-text-opacity: 1;+}++.Code .codeBlock {+ margin-bottom: 0;+ overflow: hidden;+ overflow-wrap: break-word;+ white-space: pre-wrap;+}++.Code.codeBlockWrapper {+ position: relative;+}++.Code.codeBlockWrapper:hover .buttonContainer {+ visibility: visible;+ opacity: 1;+}++.Code .buttonContainer {+ right: 5px;+ top: 5px;+ opacity: 0;+ position: absolute;+ visibility: hidden;+ transition: opacity 0.2s ease-in-out, visibility 0.2s ease-in-out,+ bottom 0.2s ease-in-out;+}++.Code .buttonContainer button {+ border-radius: 0.25rem;+ font-size: 0.75rem;+ line-height: 1rem;+ background: #011627;+ border: 1px solid #d6deeb;+ color: #d6deeb;+ cursor: pointer;+ line-height: 12px;+ outline: none;+ padding: 4px 8px;+}++.Code.codeBlockWrapper .sbui-btn-container {+ position: absolute;+ top: 2px;+ right: 3px;+ visibility: hidden;+ opacity: 0;+}++.Code.codeBlockWrapper:hover .sbui-btn-container {+ visibility: visible;+ opacity: 1;+}++.CustomCodeBlock {+ width: 100%;+}++.CustomCodeBlock .code-with-header pre {+ border-radius: 0 0 4px 4px;+}++.CustomCodeBlock .code-with-response pre {+ border-radius: 0;+}++.CustomCodeBlock .code-header {+ color: #ccc;+ padding: 5px 15px;+ border-radius: 4px 4px 0 0;+ font-size: 0.8rem;+ font-weight: 700;+ border-bottom: 1px solid #444;+}++.FunctionBlock h4 {+ margin-top: 36px;+ margin-bottom: 12px;+}++.FunctionBlock p {+ margin-top: 0;+ margin-bottom: 24px;+}++.Docs--inner-wrapper {+ background: linear-gradient(+ 90deg,+ hsl(var(--background)) 50%,+ hsl(var(--muted)) 50%+ );+ width: 100%;+}++.dark .Docs--inner-wrapper {+ background: linear-gradient(+ 90deg,+ hsl(var(--background)) 50%,+ hsl(var(--card)) 50%+ );+}++.Docs .doc-heading {+ font-weight: bold;+ margin-top: 1rem;+ width: 50%;+ padding-left: 1.5rem;+ padding-right: 1.5rem;+ text-transform: capitalize;+ --tw-text-opacity: 1;++ -webkit-hyphens: auto;+ hyphens: auto;+ max-width: 50%;+}++.Docs .doc-section {+ display: flex;+ border-bottom-width: 1px;+ --tw-border-opacity: 1;+ border-color: hsl(var(--border) / var(--tw-border-opacity));+}++.Docs.Docs--table-editor .doc-section--introduction .text {+ width: 85%;+}++.Docs.Docs--table-editor .doc-section--client-libraries {+ flex-direction: column;+ margin-bottom: 40px;+}++.Docs.Docs--table-editor .doc-section--client-libraries .code,+.Docs.Docs--table-editor .doc-section--client-libraries .text {+ width: 100%;+ max-width: none;+}++.Docs.Docs--table-editor .doc-section--client-libraries .code {+ margin-bottom: 20px;+}++.Docs .doc-section article:first-child {+ color: var(--tw-prose-body);+ max-width: 65ch;+}++.Docs+ .doc-section+ article:first-child+ :where(p):not(:where([class~="not-prose"], [class~="not-prose"] *)) {+ margin-top: 1.25em;+ margin-bottom: 1.25em;+ font-weight: 400;+}++.Docs+ .doc-section+ article:first-child+ :where([class~="lead"]):not(+ :where([class~="not-prose"], [class~="not-prose"] *)+ ) {+ color: var(--tw-prose-lead);+ font-size: 1.25em;+ line-height: 1.6;+ margin-top: 1.2em;+ margin-bottom: 1.2em;+}++.Docs+ .doc-section+ article:first-child+ :where(a):not(:where([class~="not-prose"], [class~="not-prose"] *)) {+ text-decoration: underline;+ font-weight: 400;+ position: relative;+ transition: all 0.18s ease;+ padding-bottom: 2px;+ opacity: 1;+ text-decoration-line: underline;+ text-decoration-color: hsl(var(--muted-foreground));+ text-decoration-thickness: 1px;+ text-underline-offset: 2px;+}++.Docs+ .doc-section+ article:first-child+ :where(strong):not(:where([class~="not-prose"], [class~="not-prose"] *)) {+ color: var(--tw-prose-bold);+ font-weight: 600;+}++.Docs+ .doc-section+ article:first-child+ :where(a strong):not(:where([class~="not-prose"], [class~="not-prose"] *)) {+ color: inherit;+}++.Docs+ .doc-section+ article:first-child+ :where(blockquote strong):not(+ :where([class~="not-prose"], [class~="not-prose"] *)+ ) {+ color: inherit;+}++.Docs+ .doc-section+ article:first-child+ :where(thead th strong):not(+ :where([class~="not-prose"], [class~="not-prose"] *)+ ) {+ color: inherit;+}++.Docs+ .doc-section+ article:first-child+ :where(ol):not(:where([class~="not-prose"], [class~="not-prose"] *)) {+ list-style-type: none;+ margin-top: 1.25em;+ margin-bottom: 3rem;+ padding-left: 1rem;+ counter-reset: item;+}++.Docs+ .doc-section+ article:first-child+ :where(ol[type="A"]):not(+ :where([class~="not-prose"], [class~="not-prose"] *)+ ) {+ list-style-type: upper-alpha;+}++.Docs+ .doc-section+ article:first-child+ :where(ol[type="a"]):not(+ :where([class~="not-prose"], [class~="not-prose"] *)+ ) {+ list-style-type: lower-alpha;+}++.Docs+ .doc-section+ article:first-child+ :where(ol[type="A s"]):not(+ :where([class~="not-prose"], [class~="not-prose"] *)+ ) {+ list-style-type: upper-alpha;+}++.Docs+ .doc-section+ article:first-child+ :where(ol[type="a s"]):not(+ :where([class~="not-prose"], [class~="not-prose"] *)+ ) {+ list-style-type: lower-alpha;+}++.Docs+ .doc-section+ article:first-child+ :where(ol[type="I"]):not(+ :where([class~="not-prose"], [class~="not-prose"] *)+ ) {+ list-style-type: upper-roman;+}++.Docs+ .doc-section+ article:first-child+ :where(ol[type="i"]):not(+ :where([class~="not-prose"], [class~="not-prose"] *)+ ) {+ list-style-type: lower-roman;+}++.Docs+ .doc-section+ article:first-child+ :where(ol[type="I s"]):not(+ :where([class~="not-prose"], [class~="not-prose"] *)+ ) {+ list-style-type: upper-roman;+}++.Docs+ .doc-section+ article:first-child+ :where(ol[type="i s"]):not(+ :where([class~="not-prose"], [class~="not-prose"] *)+ ) {+ list-style-type: lower-roman;+}++.Docs+ .doc-section+ article:first-child+ :where(ol[type="1"]):not(+ :where([class~="not-prose"], [class~="not-prose"] *)+ ) {+ list-style-type: decimal;+}++.Docs+ .doc-section+ article:first-child+ :where(ul):not(:where([class~="not-prose"], [class~="not-prose"] *)) {+ list-style-type: none;+ margin-top: 1.25em;+ margin-bottom: 1.25em;+ padding-left: 1rem;+}++.Docs+ .doc-section+ article:first-child+ :where(ol > li):not(+ :where([class~="not-prose"], [class~="not-prose"] *)+ )::marker {+ font-weight: 400;+ color: var(--tw-prose-counters);+}++.Docs+ .doc-section+ article:first-child+ :where(ul > li):not(+ :where([class~="not-prose"], [class~="not-prose"] *)+ )::marker {+ color: var(--tw-prose-bullets);+}++.Docs+ .doc-section+ article:first-child+ :where(dt):not(:where([class~="not-prose"], [class~="not-prose"] *)) {+ color: var(--tw-prose-headings);+ font-weight: 600;+ margin-top: 1.25em;+}++.Docs+ .doc-section+ article:first-child+ :where(hr):not(:where([class~="not-prose"], [class~="not-prose"] *)) {+ border-color: var(--tw-prose-hr);+ border-top-width: 1px;+ margin-top: 3em;+ margin-bottom: 3em;+}++.Docs+ .doc-section+ article:first-child+ :where(blockquote):not(:where([class~="not-prose"], [class~="not-prose"] *)) {+ font-weight: 500;+ font-style: italic;+ color: var(--tw-prose-quotes);+ border-left-width: 0.25rem;+ border-left-color: var(--tw-prose-quote-borders);+ quotes: "\201C""\201D""\2018""\2019";+ margin-top: 1.6em;+ margin-bottom: 1.6em;+ padding-left: 1em;+}++.Docs+ .doc-section+ article:first-child+ :where(blockquote p:first-of-type):not(+ :where([class~="not-prose"], [class~="not-prose"] *)+ ):before {+ content: open-quote;+}++.Docs+ .doc-section+ article:first-child+ :where(blockquote p:last-of-type):not(+ :where([class~="not-prose"], [class~="not-prose"] *)+ ):after {+ content: close-quote;+}++.Docs+ .doc-section+ article:first-child+ :where(h1):not(:where([class~="not-prose"], [class~="not-prose"] *)) {+ color: var(--tw-prose-headings);+ font-weight: 800;+ font-size: 2.25em;+ margin-bottom: 0.8888889em;+ line-height: 1.1111111;+}++.Docs+ .doc-section+ article:first-child+ :where(h1 strong):not(:where([class~="not-prose"], [class~="not-prose"] *)) {+ font-weight: 900;+ color: inherit;+}++.Docs+ .doc-section+ article:first-child+ :where(h2):not(:where([class~="not-prose"], [class~="not-prose"] *)) {+ color: var(--tw-prose-headings);+ font-weight: 700;+ font-size: 1.5em;+ margin-top: 2em;+ margin-bottom: 1em;+ line-height: 1.3333333;+}++.Docs+ .doc-section+ article:first-child+ :where(h2 strong):not(:where([class~="not-prose"], [class~="not-prose"] *)) {+ font-weight: 800;+ color: inherit;+}++.Docs+ .doc-section+ article:first-child+ :where(h3):not(:where([class~="not-prose"], [class~="not-prose"] *)) {+ color: var(--tw-prose-headings);+ font-weight: 600;+ font-size: 1.25em;+ margin-top: 1.6em;+ margin-bottom: 0.6em;+ line-height: 1.6;+}++.Docs+ .doc-section+ article:first-child+ :where(h3 strong):not(:where([class~="not-prose"], [class~="not-prose"] *)) {+ font-weight: 700;+ color: inherit;+}++.Docs+ .doc-section+ article:first-child+ :where(h4):not(:where([class~="not-prose"], [class~="not-prose"] *)) {+ color: var(--tw-prose-headings);+ font-weight: 600;+ margin-top: 1.5em;+ margin-bottom: 0.5em;+ line-height: 1.5;+ font-size: 1.15em;+}++.Docs+ .doc-section+ article:first-child+ :where(h4 strong):not(:where([class~="not-prose"], [class~="not-prose"] *)) {+ font-weight: 700;+ color: inherit;+}++.Docs+ .doc-section+ article:first-child+ :where(img):not(:where([class~="not-prose"], [class~="not-prose"] *)) {+ margin-top: 2em;+ margin-bottom: 2em;+}++.Docs+ .doc-section+ article:first-child+ :where(picture):not(:where([class~="not-prose"], [class~="not-prose"] *)) {+ display: block;+ margin-top: 2em;+ margin-bottom: 2em;+}++.Docs+ .doc-section+ article:first-child+ :where(kbd):not(:where([class~="not-prose"], [class~="not-prose"] *)) {+ font-weight: 500;+ font-family: inherit;+ color: var(--tw-prose-kbd);+ box-shadow: 0 0 0 1px rgb(var(--tw-prose-kbd-shadows) / 10%),+ 0 3px 0 rgb(var(--tw-prose-kbd-shadows) / 10%);+ font-size: 0.875em;+ padding: 0.1875em 0.375em;+}++.Docs+ .doc-section+ article:first-child+ :where(code):not(:where([class~="not-prose"], [class~="not-prose"] *)) {+ color: var(--tw-prose-code);+ font-weight: 400;+ font-size: 0.875em;+ padding: 0.2rem 0.4rem;+ background-color: hsl(var(--muted));+ border: 1px solid hsl(var(--muted));+ border-radius: 0.5rem;+}++.Docs+ .doc-section+ article:first-child+ :where(code):not(+ :where([class~="not-prose"], [class~="not-prose"] *)+ ):before {+ content: "";+}++.Docs+ .doc-section+ article:first-child+ :where(code):not(:where([class~="not-prose"], [class~="not-prose"] *)):after {+ content: "";+}++.Docs+ .doc-section+ article:first-child+ :where(a code):not(:where([class~="not-prose"], [class~="not-prose"] *)) {+ color: inherit;+}++.Docs+ .doc-section+ article:first-child+ :where(h1 code):not(:where([class~="not-prose"], [class~="not-prose"] *)) {+ color: inherit;+}++.Docs+ .doc-section+ article:first-child+ :where(h2 code):not(:where([class~="not-prose"], [class~="not-prose"] *)) {+ color: inherit;+ font-size: 0.875em;+}++.Docs+ .doc-section+ article:first-child+ :where(h3 code):not(:where([class~="not-prose"], [class~="not-prose"] *)) {+ color: inherit;+ font-size: 0.9em;+}++.Docs+ .doc-section+ article:first-child+ :where(h4 code):not(:where([class~="not-prose"], [class~="not-prose"] *)) {+ color: inherit;+}++.Docs+ .doc-section+ article:first-child+ :where(blockquote code):not(+ :where([class~="not-prose"], [class~="not-prose"] *)+ ) {+ color: inherit;+}++.Docs+ .doc-section+ article:first-child+ :where(thead th code):not(+ :where([class~="not-prose"], [class~="not-prose"] *)+ ) {+ color: inherit;+}++.Docs+ .doc-section+ article:first-child+ :where(pre):not(:where([class~="not-prose"], [class~="not-prose"] *)) {+ color: var(--tw-prose-pre-code);+ background-color: var(--tw-prose-pre-bg);+ overflow-x: auto;+ font-weight: 400;+ font-size: 0.875em;+ line-height: 1.7142857;+ margin-top: 1.7142857em;+ margin-bottom: 32px;+ border-radius: 0.375rem;+ background: none;+ padding: 0;+}++.Docs+ .doc-section+ article:first-child+ :where(pre code):not(:where([class~="not-prose"], [class~="not-prose"] *)) {+ background-color: transparent;+ border-width: 0;+ border-radius: 0;+ padding: 0;+ font-weight: inherit;+ color: inherit;+ font-size: inherit;+ font-family: inherit;+ line-height: inherit;+}++.Docs+ .doc-section+ article:first-child+ :where(pre code):not(+ :where([class~="not-prose"], [class~="not-prose"] *)+ ):before {+ content: none;+}++.Docs+ .doc-section+ article:first-child+ :where(pre code):not(+ :where([class~="not-prose"], [class~="not-prose"] *)+ ):after {+ content: none;+}++.Docs+ .doc-section+ article:first-child+ :where(table):not(:where([class~="not-prose"], [class~="not-prose"] *)) {+ width: 100%;+ table-layout: auto;+ text-align: left;+ margin-top: 2em;+ margin-bottom: 2em;+ font-size: 0.875em;+ line-height: 1.7142857;+}++.Docs+ .doc-section+ article:first-child+ :where(thead):not(:where([class~="not-prose"], [class~="not-prose"] *)) {+ border-bottom-width: 1px;+ border-bottom-color: var(--tw-prose-th-borders);+}++.Docs+ .doc-section+ article:first-child+ :where(thead th):not(:where([class~="not-prose"], [class~="not-prose"] *)) {+ color: var(--tw-prose-headings);+ font-weight: 600;+ vertical-align: bottom;+ padding-right: 0.5714286em;+ padding-bottom: 0.5714286em;+ padding-left: 0.5714286em;+}++.Docs+ .doc-section+ article:first-child+ :where(tbody tr):not(:where([class~="not-prose"], [class~="not-prose"] *)) {+ border-bottom-width: 1px;+ border-bottom-color: var(--tw-prose-td-borders);+}++.Docs+ .doc-section+ article:first-child+ :where(tbody tr:last-child):not(+ :where([class~="not-prose"], [class~="not-prose"] *)+ ) {+ border-bottom-width: 0;+}++.Docs+ .doc-section+ article:first-child+ :where(tbody td):not(:where([class~="not-prose"], [class~="not-prose"] *)) {+ vertical-align: baseline;+}++.Docs+ .doc-section+ article:first-child+ :where(tfoot):not(:where([class~="not-prose"], [class~="not-prose"] *)) {+ border-top-width: 1px;+ border-top-color: var(--tw-prose-th-borders);+}++.Docs+ .doc-section+ article:first-child+ :where(tfoot td):not(:where([class~="not-prose"], [class~="not-prose"] *)) {+ vertical-align: top;+}++.Docs+ .doc-section+ article:first-child+ :where(figcaption):not(:where([class~="not-prose"], [class~="not-prose"] *)) {+ color: hsl(var(--muted-foreground));+ font-size: 0.875em;+ line-height: 1.4285714;+ margin-top: 0.8571429em;+ font-family: Office Code Pro, monospace;+}++.Docs .doc-section article:first-child {+ --tw-prose-links: hsl(var(--foreground));+ --tw-prose-kbd: #111827;+ --tw-prose-kbd-shadows: 17 24 39;+ --tw-prose-invert-kbd: #fff;+ --tw-prose-invert-kbd-shadows: 255 255 255;+ --tw-prose-invert-code: #fff;+ --tw-prose-invert-pre-code: #d1d5db;+ --tw-prose-invert-pre-bg: rgba(0, 0, 0, 0.5);+ --tw-prose-invert-th-borders: #4b5563;+ --tw-prose-invert-td-borders: #374151;+ font-size: 1rem;+ line-height: 1.75;+}++.Docs+ .doc-section+ article:first-child+ :where(video):not(:where([class~="not-prose"], [class~="not-prose"] *)) {+ margin-top: 2em;+ margin-bottom: 2em;+}++.Docs+ .doc-section+ article:first-child+ :where(li):not(:where([class~="not-prose"], [class~="not-prose"] *)) {+ margin-top: 0.5em;+ margin-bottom: 0.5em;+}++.Docs+ .doc-section+ article:first-child+ :where(ol > li):not(:where([class~="not-prose"], [class~="not-prose"] *)) {+ padding-left: 0.375em;+}++.Docs+ .doc-section+ article:first-child+ :where(ul > li):not(:where([class~="not-prose"], [class~="not-prose"] *)) {+ padding-left: 0.375em;+}++.Docs+ .doc-section+ article:first-child+ :where(.prose > ul > li p):not(+ :where([class~="not-prose"], [class~="not-prose"] *)+ ) {+ margin-top: 0.75em;+ margin-bottom: 0.75em;+}++.Docs+ .doc-section+ article:first-child+ :where(.prose > ul > li > :first-child):not(+ :where([class~="not-prose"], [class~="not-prose"] *)+ ) {+ margin-top: 1.25em;+}++.Docs+ .doc-section+ article:first-child+ :where(.prose > ul > li > :last-child):not(+ :where([class~="not-prose"], [class~="not-prose"] *)+ ) {+ margin-bottom: 1.25em;+}++.Docs+ .doc-section+ article:first-child+ :where(.prose > ol > li > :first-child):not(+ :where([class~="not-prose"], [class~="not-prose"] *)+ ) {+ margin-top: 1.25em;+}++.Docs+ .doc-section+ article:first-child+ :where(.prose > ol > li > :last-child):not(+ :where([class~="not-prose"], [class~="not-prose"] *)+ ) {+ margin-bottom: 1.25em;+}++.Docs+ .doc-section+ article:first-child+ :where(ul ul, ul ol, ol ul, ol ol):not(+ :where([class~="not-prose"], [class~="not-prose"] *)+ ) {+ margin-top: 0.75em;+ margin-bottom: 0.75em;+}++.Docs+ .doc-section+ article:first-child+ :where(dl):not(:where([class~="not-prose"], [class~="not-prose"] *)) {+ margin-top: 1.25em;+ margin-bottom: 1.25em;+}++.Docs+ .doc-section+ article:first-child+ :where(dd):not(:where([class~="not-prose"], [class~="not-prose"] *)) {+ margin-top: 0.5em;+ padding-left: 1.625em;+}++.Docs+ .doc-section+ article:first-child+ :where(tbody td, tfoot td):not(+ :where([class~="not-prose"], [class~="not-prose"] *)+ ) {+ padding: 0.5714286em;+}++.Docs+ .doc-section+ article:first-child+ :where(figure):not(:where([class~="not-prose"], [class~="not-prose"] *)) {+ margin: 3rem 0;+}++.Docs+ .doc-section+ article:first-child+ :where(.prose > :first-child):not(+ :where([class~="not-prose"], [class~="not-prose"] *)+ ) {+ margin-top: 0;+}++.Docs+ .doc-section+ article:first-child+ :where(.prose > :last-child):not(+ :where([class~="not-prose"], [class~="not-prose"] *)+ ) {+ margin-bottom: 0;+}++.Docs+ .doc-section+ article:first-child+ :where(h5):not(:where([class~="not-prose"], [class~="not-prose"] *)) {+ color: var(--colors-scale12);+}++.Docs+ .doc-section+ article:first-child+ :where(h1, h2, h3, h4, h5, h6):not(+ :where([class~="not-prose"], [class~="not-prose"] *)+ ) {+ font-weight: 400;+}++.Docs+ .doc-section+ article:first-child+ :where(article h2, article h3, article h4, article h5, article h6):not(+ :where([class~="not-prose"], [class~="not-prose"] *)+ ) {+ margin-top: 2em;+ margin-bottom: 1em;+}++.Docs+ .doc-section+ article:first-child+ :where(ul li):not(:where([class~="not-prose"], [class~="not-prose"] *)) {+ position: relative;+}++.Docs+ .doc-section+ article:first-child+ :where(ul li):not(+ :where([class~="not-prose"], [class~="not-prose"] *)+ ):before {+ position: absolute;+ top: 0.75rem;+ left: -1rem;+ height: 0.125rem;+ width: 0.5rem;+ border-radius: 0.25rem;+ background-color: hsl(var(--border));+ content: "";+}++.Docs+ .doc-section+ article:first-child+ :where(ol > li):not(:where([class~="not-prose"], [class~="not-prose"] *)) {+ display: block;+ position: relative;+ padding-left: 1rem;+}++.Docs+ .doc-section+ article:first-child+ :where(ol > li):not(+ :where([class~="not-prose"], [class~="not-prose"] *)+ ):before {+ position: absolute;+ top: 0.25rem;+ left: -1rem;+ height: 1.2rem;+ width: 1.2rem;+ border-radius: 0.25rem;+ background-color: hsl(var(--background));+ border: 1px solid hsl(var(--border));+ content: counter(item) " ";+ counter-increment: item;+ font-size: 12px;+ color: hsl(var(--muted-foreground));+ display: flex;+ align-items: center;+ justify-content: center;+}++.Docs+ .doc-section+ article:first-child+ :where(p img):not(:where([class~="not-prose"], [class~="not-prose"] *)) {+ border: 1px solid hsl(var(--border));+ border-radius: 4px;+ overflow: hidden;+}++.Docs+ .doc-section+ article:first-child+ :where(iframe):not(:where([class~="not-prose"], [class~="not-prose"] *)) {+ border: 1px solid hsl(var(--border) / 0.9);+ border-radius: 0.5rem;+}++.Docs+ .doc-section+ article:first-child+ :where(td):not(:where([class~="not-prose"], [class~="not-prose"] *)) {+ border-bottom: 1px solid hsl(var(--muted));+}++.Docs+ .doc-section+ article:first-child+ :where(a:hover):not(:where([class~="not-prose"], [class~="not-prose"] *)) {+}++.Docs+ .doc-section+ article:first-child+ :where(figure.quote-figure p:first-child):not(+ :where([class~="not-prose"], [class~="not-prose"] *)+ ) {+ margin-top: 0;+}++.Docs+ .doc-section+ article:first-child+ :where(figure.quote-figure p:last-child):not(+ :where([class~="not-prose"], [class~="not-prose"] *)+ ) {+ margin-bottom: 0;+}++.Docs+ .doc-section+ article:first-child+ :where(figure img):not(:where([class~="not-prose"], [class~="not-prose"] *)) {+ margin: 0;+}++.Docs .doc-section article:first-child {+ font-size: 0.875rem;+ line-height: 1.7142857;+}++.Docs+ .doc-section+ article:first-child+ :where(p):not(:where([class~="not-prose"], [class~="not-prose"] *)) {+ margin-top: 1.1428571em;+ margin-bottom: 1.1428571em;+}++.Docs+ .doc-section+ article:first-child+ :where([class~="lead"]):not(+ :where([class~="not-prose"], [class~="not-prose"] *)+ ) {+ font-size: 1.2857143em;+ line-height: 1.5555556;+ margin-top: 0.8888889em;+ margin-bottom: 0.8888889em;+}++.Docs+ .doc-section+ article:first-child+ :where(blockquote):not(:where([class~="not-prose"], [class~="not-prose"] *)) {+ margin-top: 1.3333333em;+ margin-bottom: 1.3333333em;+ padding-left: 1.1111111em;+}++.Docs+ .doc-section+ article:first-child+ :where(h1):not(:where([class~="not-prose"], [class~="not-prose"] *)) {+ font-size: 2.1428571em;+ margin-top: 0;+ margin-bottom: 0.8em;+ line-height: 1.2;+}++.Docs+ .doc-section+ article:first-child+ :where(h2):not(:where([class~="not-prose"], [class~="not-prose"] *)) {+ font-size: 1.4285714em;+ margin-top: 1.6em;+ margin-bottom: 0.8em;+ line-height: 1.4;+}++.Docs+ .doc-section+ article:first-child+ :where(h3):not(:where([class~="not-prose"], [class~="not-prose"] *)) {+ font-size: 1.2857143em;+ margin-top: 1.5555556em;+ margin-bottom: 0.4444444em;+ line-height: 1.5555556;+}++.Docs+ .doc-section+ article:first-child+ :where(h4):not(:where([class~="not-prose"], [class~="not-prose"] *)) {+ margin-top: 1.4285714em;+ margin-bottom: 0.5714286em;+ line-height: 1.4285714;+}++.Docs+ .doc-section+ article:first-child+ :where(img):not(:where([class~="not-prose"], [class~="not-prose"] *)) {+ margin-top: 1.7142857em;+ margin-bottom: 1.7142857em;+}++.Docs+ .doc-section+ article:first-child+ :where(picture):not(:where([class~="not-prose"], [class~="not-prose"] *)) {+ margin-top: 1.7142857em;+ margin-bottom: 1.7142857em;+}++.Docs+ .doc-section+ article:first-child+ :where(picture > img):not(+ :where([class~="not-prose"], [class~="not-prose"] *)+ ) {+ margin-top: 0;+ margin-bottom: 0;+}++.Docs+ .doc-section+ article:first-child+ :where(video):not(:where([class~="not-prose"], [class~="not-prose"] *)) {+ margin-top: 1.7142857em;+ margin-bottom: 1.7142857em;+}++.Docs+ .doc-section+ article:first-child+ :where(kbd):not(:where([class~="not-prose"], [class~="not-prose"] *)) {+ font-size: 0.8571429em;+ border-radius: 0.3125rem;+ padding: 0.1428571em 0.3571429em;+}++.Docs+ .doc-section+ article:first-child+ :where(code):not(:where([class~="not-prose"], [class~="not-prose"] *)) {+ font-size: 0.8571429em;+}++.Docs+ .doc-section+ article:first-child+ :where(h2 code):not(:where([class~="not-prose"], [class~="not-prose"] *)) {+ font-size: 0.9em;+}++.Docs+ .doc-section+ article:first-child+ :where(h3 code):not(:where([class~="not-prose"], [class~="not-prose"] *)) {+ font-size: 0.8888889em;+}++.Docs+ .doc-section+ article:first-child+ :where(pre):not(:where([class~="not-prose"], [class~="not-prose"] *)) {+ font-size: 0.8571429em;+ line-height: 1.6666667;+ margin-top: 1.6666667em;+ margin-bottom: 1.6666667em;+ border-radius: 0.25rem;+ padding: 0.6666667em 1em;+}++.Docs+ .doc-section+ article:first-child+ :where(ol):not(:where([class~="not-prose"], [class~="not-prose"] *)) {+ margin-top: 1.1428571em;+ margin-bottom: 1.1428571em;+ padding-left: 1.5714286em;+}++.Docs+ .doc-section+ article:first-child+ :where(ul):not(:where([class~="not-prose"], [class~="not-prose"] *)) {+ margin-top: 1.1428571em;+ margin-bottom: 1.1428571em;+ padding-left: 1.5714286em;+}++.Docs+ .doc-section+ article:first-child+ :where(li):not(:where([class~="not-prose"], [class~="not-prose"] *)) {+ margin-top: 0.2857143em;+ margin-bottom: 0.2857143em;+}++.Docs+ .doc-section+ article:first-child+ :where(ol > li):not(:where([class~="not-prose"], [class~="not-prose"] *)) {+ padding-left: 0.4285714em;+}++.Docs+ .doc-section+ article:first-child+ :where(ul > li):not(:where([class~="not-prose"], [class~="not-prose"] *)) {+ padding-left: 0.4285714em;+}++.Docs+ .doc-section+ article:first-child+ :where(.prose-sm > ul > li p):not(+ :where([class~="not-prose"], [class~="not-prose"] *)+ ) {+ margin-top: 0.5714286em;+ margin-bottom: 0.5714286em;+}++.Docs+ .doc-section+ article:first-child+ :where(.prose-sm > ul > li > :first-child):not(+ :where([class~="not-prose"], [class~="not-prose"] *)+ ) {+ margin-top: 1.1428571em;+}++.Docs+ .doc-section+ article:first-child+ :where(.prose-sm > ul > li > :last-child):not(+ :where([class~="not-prose"], [class~="not-prose"] *)+ ) {+ margin-bottom: 1.1428571em;+}++.Docs+ .doc-section+ article:first-child+ :where(.prose-sm > ol > li > :first-child):not(+ :where([class~="not-prose"], [class~="not-prose"] *)+ ) {+ margin-top: 1.1428571em;+}++.Docs+ .doc-section+ article:first-child+ :where(.prose-sm > ol > li > :last-child):not(+ :where([class~="not-prose"], [class~="not-prose"] *)+ ) {+ margin-bottom: 1.1428571em;+}++.Docs+ .doc-section+ article:first-child+ :where(ul ul, ul ol, ol ul, ol ol):not(+ :where([class~="not-prose"], [class~="not-prose"] *)+ ) {+ margin-top: 0.5714286em;+ margin-bottom: 0.5714286em;+}++.Docs+ .doc-section+ article:first-child+ :where(dl):not(:where([class~="not-prose"], [class~="not-prose"] *)) {+ margin-top: 1.1428571em;+ margin-bottom: 1.1428571em;+}++.Docs+ .doc-section+ article:first-child+ :where(dt):not(:where([class~="not-prose"], [class~="not-prose"] *)) {+ margin-top: 1.1428571em;+}++.Docs+ .doc-section+ article:first-child+ :where(dd):not(:where([class~="not-prose"], [class~="not-prose"] *)) {+ margin-top: 0.2857143em;+ padding-left: 1.5714286em;+}++.Docs+ .doc-section+ article:first-child+ :where(hr):not(:where([class~="not-prose"], [class~="not-prose"] *)) {+ margin-top: 2.8571429em;+ margin-bottom: 2.8571429em;+}++.Docs+ .doc-section+ article:first-child+ :where(hr + *):not(:where([class~="not-prose"], [class~="not-prose"] *)) {+ margin-top: 0;+}++.Docs+ .doc-section+ article:first-child+ :where(h2 + *):not(:where([class~="not-prose"], [class~="not-prose"] *)) {+ margin-top: 0;+}++.Docs+ .doc-section+ article:first-child+ :where(h3 + *):not(:where([class~="not-prose"], [class~="not-prose"] *)) {+ margin-top: 0;+}++.Docs+ .doc-section+ article:first-child+ :where(h4 + *):not(:where([class~="not-prose"], [class~="not-prose"] *)) {+ margin-top: 0;+}++.Docs+ .doc-section+ article:first-child+ :where(table):not(:where([class~="not-prose"], [class~="not-prose"] *)) {+ font-size: 0.8571429em;+ line-height: 1.5;+}++.Docs+ .doc-section+ article:first-child+ :where(thead th):not(:where([class~="not-prose"], [class~="not-prose"] *)) {+ padding-right: 1em;+ padding-bottom: 0.6666667em;+ padding-left: 1em;+}++.Docs+ .doc-section+ article:first-child+ :where(thead th:first-child):not(+ :where([class~="not-prose"], [class~="not-prose"] *)+ ) {+ padding-left: 0;+}++.Docs+ .doc-section+ article:first-child+ :where(thead th:last-child):not(+ :where([class~="not-prose"], [class~="not-prose"] *)+ ) {+ padding-right: 0;+}++.Docs+ .doc-section+ article:first-child+ :where(tbody td, tfoot td):not(+ :where([class~="not-prose"], [class~="not-prose"] *)+ ) {+ padding: 0.6666667em 1em;+}++.Docs+ .doc-section+ article:first-child+ :where(tbody td:first-child, tfoot td:first-child):not(+ :where([class~="not-prose"], [class~="not-prose"] *)+ ) {+ padding-left: 0;+}++.Docs+ .doc-section+ article:first-child+ :where(tbody td:last-child, tfoot td:last-child):not(+ :where([class~="not-prose"], [class~="not-prose"] *)+ ) {+ padding-right: 0;+}++.Docs+ .doc-section+ article:first-child+ :where(figure):not(:where([class~="not-prose"], [class~="not-prose"] *)) {+ margin-top: 1.7142857em;+ margin-bottom: 1.7142857em;+}++.Docs+ .doc-section+ article:first-child+ :where(figure > *):not(:where([class~="not-prose"], [class~="not-prose"] *)) {+ margin-top: 0;+ margin-bottom: 0;+}++.Docs+ .doc-section+ article:first-child+ :where(figcaption):not(:where([class~="not-prose"], [class~="not-prose"] *)) {+ font-size: 0.8571429em;+ line-height: 1.3333333;+ margin-top: 0.6666667em;+}++.Docs+ .doc-section+ article:first-child+ :where(.prose-sm > :first-child):not(+ :where([class~="not-prose"], [class~="not-prose"] *)+ ) {+ margin-top: 0;+}++.Docs+ .doc-section+ article:first-child+ :where(.prose-sm > :last-child):not(+ :where([class~="not-prose"], [class~="not-prose"] *)+ ) {+ margin-bottom: 0;+}++.Docs .doc-section article:first-child {+ --tw-prose-body: hsl(var(--foreground));+ --tw-prose-headings: hsl(var(--foreground));+ --tw-prose-lead: hsl(var(--foreground));+ --tw-prose-links: hsl(var(--primary));+ --tw-prose-bold: hsl(var(--foreground));+ --tw-prose-counters: hsl(var(--foreground));+ --tw-prose-bullets: hsl(var(--muted-foreground));+ --tw-prose-hr: hsl(var(--muted));+ --tw-prose-quotes: hsl(var(--foreground));+ --tw-prose-quote-borders: hsl(var(--muted));+ --tw-prose-captions: hsl(var(--border));+ --tw-prose-code: hsl(var(--foreground));+ --tw-prose-pre-code: hsl(var(--muted-foreground));+ --tw-prose-pre-bg: hsl(var(--muted));+ --tw-prose-th-borders: hsl(var(--muted));+ --tw-prose-td-borders: hsl(var(--background-default));+ --tw-prose-invert-body: hsl(var(--background-default));+ --tw-prose-invert-headings: #fff;+ --tw-prose-invert-lead: hsl(var(--muted));+ --tw-prose-invert-links: #fff;+ --tw-prose-invert-bold: #fff;+ --tw-prose-invert-counters: hsl(var(--muted));+ --tw-prose-invert-bullets: hsl(var(--primary));+ --tw-prose-invert-hr: hsl(var(--border));+ --tw-prose-invert-quotes: hsl(var(--background-alternative-default));+ --tw-prose-invert-quote-borders: hsl(var(--border));+ --tw-prose-invert-captions: hsl(var(--muted));+}++.Docs+ .doc-section+ article:first-child+ :where(h1, h2, h3, h4, h5):not(+ :where([class~="not-prose"], [class~="not-prose"] *)+ ) {+ font-weight: 400;+}++.Docs .doc-section article:first-child {+ max-width: none;+}++.Docs.Docs--table-editor .doc-section__table-name {+ margin-top: 1rem;+}++.Docs .code-column {+ width: 50%;+ padding: 1rem 1.5rem;+ max-width: 50%;+}++.Docs .code-column a {+ transition-property: color, background-color, border-color,+ text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter,+ -webkit-backdrop-filter;+ transition-property: color, background-color, border-color,+ text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter,+ backdrop-filter;+ transition-property: color, background-color, border-color,+ text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter,+ backdrop-filter, -webkit-backdrop-filter;+ transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);+ transition-duration: 0.15s;+}++.Docs .code-column a:hover {+ --tw-text-opacity: 1;+ color: hsl(var(--brand-600) / var(--tw-text-opacity));+}++.Docs .code-column p:last-child {+ padding-bottom: 0;+}++.Docs .code {+ width: 50%;+ flex: 1 1 0%;+ padding: 0.5rem 1.5rem 1rem;+ max-width: 50%;+}++.Docs .code h4 {+ margin: 0.25rem;+ padding: 0;+ font-size: 0.875rem;+ line-height: 1.25rem;+ font-weight: 400;+ text-transform: uppercase;+ --tw-text-opacity: 1;+}++.Docs .code h4:not(:first-child) {+ margin-top: 1.5rem;+}++.Docs .code code {+ margin: 0.25rem;+ padding: 0;+ background-color: none;+}++.Docs .code .is-highlighted {+ --tw-text-opacity: 1;+ color: hsl(var(--primary) / var(--tw-text-opacity));+}++.Docs .codeblock-container + .codeblock-container {+ margin-top: 3rem;+}diff --git a/apps/www/app/styles/nprogress.css b/apps/www/app/styles/nprogress.cssnew file mode 100644index 0000000000..7f31ea3f18--- /dev/null+++ b/apps/www/app/styles/nprogress.css@@ -0,0 +1,16 @@+/* Make clicks pass-through */+#nprogress {+ pointer-events: none;+}++#nprogress .bar {+ background: #002aff99;++ position: fixed;+ z-index: 1031;+ top: 0;+ left: 0;++ width: 100%;+ height: 2px;+}diff --git a/apps/www/app/styles/tailwind.css b/apps/www/app/styles/tailwind.cssnew file mode 100644index 0000000000..6a2e451f74--- /dev/null+++ b/apps/www/app/styles/tailwind.css@@ -0,0 +1,168 @@+@import url("non.geist");+@import url("non.geist/mono");++@tailwind base;+@tailwind components;+@tailwind utilities;++@layer base {+ :root {+ --background: 0 0% 100%;+ --foreground: 240 10% 3.9%;+ --card: 0 0% 100%;+ --card-foreground: 240 10% 3.9%;+ --popover: 0 0% 100%;+ --popover-foreground: 240 10% 3.9%;+ --active: 240 5.9% 10%;+ --active-foreground: 0 0% 98%;+ --primary: 240 5.9% 10%;+ --primary-foreground: 0 0% 98%;+ --secondary: 240 4.8% 95.9%;+ --secondary-foreground: 240 5.9% 10%;+ --muted: 240 4.8% 95.9%;+ --muted-foreground: 240 3.8% 46.1%;+ --accent: 240 4.8% 89.9%;+ --accent-foreground: 240 5.9% 10%;+ --destructive: 0 72.22% 50.59%;+ --destructive-foreground: 0 0% 98%;+ --border: 240 5.9% 90%;+ --input: 240 5.9% 90%;+ --ring: 240 5% 64.9%;+ --radius: 0.5rem;+ }++ .dark {+ --background: 240 10% 3.9%;+ --foreground: 0 0% 98%;+ --card: 240 10% 3.9%;+ --card-foreground: 0 0% 98%;+ --popover: 240 10% 3.9%;+ --popover-foreground: 0 0% 98%;+ --primary: 0 0% 98%;+ --primary-foreground: 240 5.9% 10%;+ --active: 0 0% 98%;+ --active-foreground: 240 5.9% 10%;+ --secondary: 240 3.7% 15.9%;+ --secondary-foreground: 0 0% 98%;+ --muted: 240 3.7% 15.9%;+ --muted-foreground: 240 5% 64.9%;+ --accent: 240 3.7% 15.9%;+ --accent-foreground: 0 0% 98%;+ --destructive: 0 62.8% 30.6%;+ --destructive-foreground: 0 85.7% 97.3%;+ --border: 240 3.7% 15.9%;+ --input: 240 3.7% 15.9%;+ --ring: 240 4.9% 83.9%;+ }+}++@layer base {+ * {+ @apply border-border;+ }+ body {+ @apply bg-background text-foreground;+ font-feature-settings: "rlig" 1, "calt" 1;+ font-synthesis-weight: none;+ text-rendering: optimizeLegibility;+ }+}++.ray {+ --gradient-opacity: 0.85;+ --ray-gradient: radial-gradient(+ rgba(83, 255, 231, var(--gradient-opacity)) 0%,+ rgba(43, 166, 255, 0) 100%+ );+ transition: opacity 0.25s linear;+ position: fixed;+ inset: 0;+ pointer-events: none;+ user-select: none;+ animation: 0.25s linear 0s 1 fade-in;+}++.ray[data-theme="light"] {+ --gradient-opacity: 0.5;+}++.ray .light-ray {+ position: absolute;+ border-radius: 100%;+ background: var(--ray-gradient);+}++.ray .ray-one {+ width: 480px;+ height: 680px;+ transform: rotate(80deg);+ top: -540px;+ left: 250px;+ filter: blur(110px);+}++.ray .ray-two {+ width: 110px;+ height: 400px;+ transform: rotate(-20deg);+ top: -280px;+ left: 350px;+ mix-blend-mode: overlay;+ opacity: 0.6;+ filter: blur(60px);+}++.ray .ray-three {+ width: 400px;+ height: 370px;+ top: -350px;+ left: 200px;+ mix-blend-mode: overlay;+ opacity: 0.6;+ filter: blur(21px);+}++.ray .ray-four {+ position: absolute;+ width: 330px;+ height: 370px;+ top: -330px;+ left: 50px;+ mix-blend-mode: overlay;+ opacity: 0.5;+ filter: blur(21px);+}++.ray .ray-five {+ position: absolute;+ width: 110px;+ height: 400px;+ transform: rotate(-40deg);+ top: -280px;+ left: -10px;+ mix-blend-mode: overlay;+ opacity: 0.8;+ filter: blur(60px);+}++@keyframes fade-in {+ 0% {+ opacity: 0;+ }++ to {+ opacity: 1;+ }+}++@keyframes fade-and-move-in {+ 0% {+ opacity: 0;+ transform: translateY(var(--translate-y, 10px));+ }++ to {+ opacity: 1;+ transform: translateY(0);+ }+}diff --git a/apps/www/app/types/validators.ts b/apps/www/app/types/validators.tsnew file mode 100644index 0000000000..3c09f14aaf--- /dev/null+++ b/apps/www/app/types/validators.ts@@ -0,0 +1,14 @@+import type { Validator } from "@carbon/form";+import { z } from "zod";++export type TypeOfValidator<U extends Validator<any>> = U extends Validator<+ infer T+>+ ? T+ : unknown;++export type Mode = "light" | "dark";++export const modeValidator = z.object({+ mode: z.enum(["light", "dark", "system"]),+});diff --git a/apps/www/app/utils/dom.ts b/apps/www/app/utils/dom.tsnew file mode 100644index 0000000000..d5aa965c86--- /dev/null+++ b/apps/www/app/utils/dom.ts@@ -0,0 +1,6 @@+export function scrollIntoView(element: HTMLElement | undefined | null) {+ element?.scrollIntoView({+ inline: "nearest",+ block: "nearest",+ });+}diff --git a/apps/www/app/utils/handle.ts b/apps/www/app/utils/handle.tsnew file mode 100644index 0000000000..cdf10e457b--- /dev/null+++ b/apps/www/app/utils/handle.ts@@ -0,0 +1,5 @@+export type Handle = {+ breadcrumb?: any;+ to?: string;+ module?: string;+};diff --git a/apps/www/app/utils/path.ts b/apps/www/app/utils/path.tsnew file mode 100644index 0000000000..a6b9b17938--- /dev/null+++ b/apps/www/app/utils/path.ts@@ -0,0 +1,21 @@+import { SUPABASE_API_URL } from "@carbon/auth";++export const path = {+ to: {+ root: "/",+ },+} as const;++export const getStoragePath = (bucket: string, path: string) => {+ return `${SUPABASE_API_URL}/storage/v1/object/public/${bucket}/${path}`;+};++export const requestReferrer = (request: Request) => {+ return request.headers.get("referer");+};++export const getParams = (request: Request) => {+ const url = new URL(requestReferrer(request) ?? "");+ const searchParams = new URLSearchParams(url.search);+ return searchParams.toString();+};diff --git a/apps/www/app/utils/supabase.ts b/apps/www/app/utils/supabase.tsnew file mode 100644index 0000000000..4631ac61cb--- /dev/null+++ b/apps/www/app/utils/supabase.ts@@ -0,0 +1,7 @@+export const sanitize = (input: Record<string, any>) => {+ const output = { ...input };+ Object.keys(output).forEach((key) => {+ if (output[key] === undefined && key !== "id") output[key] = null;+ });+ return output;+};diff --git a/apps/www/env.d.ts b/apps/www/env.d.tsnew file mode 100644index 0000000000..4a1bdb51fe--- /dev/null+++ b/apps/www/env.d.ts@@ -0,0 +1,3 @@+/// <reference types="vite/client" />+/// <reference types="@vercel/remix/globals" />+/// <reference types="@vercel/remix" />diff --git a/apps/www/package.json b/apps/www/package.jsonnew file mode 100644index 0000000000..45867b79d8--- /dev/null+++ b/apps/www/package.json@@ -0,0 +1,71 @@+{+ "name": "www",+ "type": "module",+ "dependencies": {+ "@carbon/auth": "*",+ "@carbon/database": "*",+ "@carbon/documents": "*",+ "@carbon/logger": "*",+ "@carbon/react": "*",+ "@carbon/kv": "*",+ "@carbon/form": "*",+ "@carbon/utils": "*",+ "@react-aria/i18n": "^3.11.0",+ "@remix-run/dev": "~2.10.2",+ "@remix-run/eslint-config": "~2.10.2",+ "@remix-run/react": "~2.10.2",+ "@remix-run/serve": "~2.10.2",+ "@supabase/functions-js": "2.1.5",+ "@supabase/supabase-js": "^2.40.0",+ "@tailwindcss/container-queries": "^0.1.1",+ "@tailwindcss/forms": "^0.5.7",+ "@tailwindcss/line-clamp": "^0.4.4",+ "@tailwindcss/typography": "^0.5.10",+ "@vercel/analytics": "^1.2.2",+ "@vercel/remix": "2.10.2",+ "framer-motion": "^11.1.7",+ "isbot": "3.6.13",+ "non.geist": "~1.0.3",+ "react": "^18.3.1",+ "react-dom": "^18.3.1",+ "react-dropzone": "^14.2.3",+ "react-hotkeys-hook": "~4.5.0",+ "react-icons": "^5.3.0",+ "tailwind-merge": "^2.2.1",+ "tailwind-scrollbar": "^3.0.5",+ "tailwind-scrollbar-hide": "^1.1.7",+ "tailwindcss-animate": "^1.0.7",+ "zod": "^3.23.8",+ "zod-form-data": "*"+ },+ "devDependencies": {+ "@carbon/tailwind": "*",+ "@carbon/tsconfig": "*",+ "@types/react": "^18.2.74",+ "@types/react-dom": "^18.2.24",+ "autoprefixer": "10.4.14",+ "cross-env": "7.0.3",+ "nodemon": "^3.0.1",+ "npm-run-all": "^4.1.5",+ "postcss": "^8.4.33",+ "tailwind-scrollbar": "^3.0.5",+ "tailwindcss": "3.3.2",+ "typescript": "^5.2.2",+ "vite": "^5.3.3",+ "vite-tsconfig-paths": "^4.3.2",+ "wait-on": "7.2.0"+ },+ "engines": {+ "node": ">=20"+ },+ "private": true,+ "scripts": {+ "build": "remix vite:build",+ "clean": "rimraf .cache .turbo node_modules dist build",+ "dev": "remix vite:dev",+ "lint": "TIMING=1 eslint \"app/**/*.ts*\"",+ "start": "remix-serve ./build/server/index.js",+ "types": "tsc"+ },+ "sideEffects": false+}diff --git a/apps/www/postcss.config.cjs b/apps/www/postcss.config.cjsnew file mode 100644index 0000000000..4182e2b578--- /dev/null+++ b/apps/www/postcss.config.cjs@@ -0,0 +1 @@+module.exports = require("@carbon/tailwind/postcss.config");diff --git a/apps/www/public/android-chrome-192x192.png b/apps/www/public/android-chrome-192x192.pngnew file mode 100644index 0000000000..777cc381efBinary files /dev/null and b/apps/www/public/android-chrome-192x192.png differdiff --git a/apps/www/public/android-chrome-512x512.png b/apps/www/public/android-chrome-512x512.pngnew file mode 100644index 0000000000..bd3fb48e59Binary files /dev/null and b/apps/www/public/android-chrome-512x512.png differdiff --git a/apps/www/public/apple-touch-icon.png b/apps/www/public/apple-touch-icon.pngnew file mode 100644index 0000000000..4f8712f2c1Binary files /dev/null and b/apps/www/public/apple-touch-icon.png differdiff --git a/apps/www/public/carbon-logo-dark.png b/apps/www/public/carbon-logo-dark.pngnew file mode 100644index 0000000000..75399c8d11Binary files /dev/null and b/apps/www/public/carbon-logo-dark.png differdiff --git a/apps/www/public/carbon-logo-light.png b/apps/www/public/carbon-logo-light.pngnew file mode 100644index 0000000000..c0f93e6fe2Binary files /dev/null and b/apps/www/public/carbon-logo-light.png differdiff --git a/apps/www/public/favicon-16x16.png b/apps/www/public/favicon-16x16.pngnew file mode 100644index 0000000000..eb216e453fBinary files /dev/null and b/apps/www/public/favicon-16x16.png differdiff --git a/apps/www/public/favicon-32x32.png b/apps/www/public/favicon-32x32.pngnew file mode 100644index 0000000000..a7064d2122Binary files /dev/null and b/apps/www/public/favicon-32x32.png differdiff --git a/apps/www/public/favicon.ico b/apps/www/public/favicon.iconew file mode 100644index 0000000000..ce92de6710Binary files /dev/null and b/apps/www/public/favicon.ico differdiff --git a/apps/www/public/grid.svg b/apps/www/public/grid.svgnew file mode 100644index 0000000000..76e3b29f0d--- /dev/null+++ b/apps/www/public/grid.svg@@ -0,0 +1,5 @@++<svg id="download" xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100">+ <path id="Path_3" data-name="Path 3" d="M96,95h4v1H96v4H95V96H86v4H85V96H76v4H75V96H66v4H65V96H56v4H55V96H46v4H45V96H36v4H35V96H26v4H25V96H16v4H15V96H0V95H15V86H0V85H15V76H0V75H15V66H0V65H15V56H0V55H15V46H0V45H15V36H0V35H15V26H0V25H15V16H0V15H15V0h1V15h9V0h1V15h9V0h1V15h9V0h1V15h9V0h1V15h9V0h1V15h9V0h1V15h9V0h1V15h9V0h1V15h4v1H96v9h4v1H96v9h4v1H96v9h4v1H96v9h4v1H96v9h4v1H96v9h4v1H96v9h4v1H96Zm-1,0V86H86v9ZM85,95V86H76v9ZM75,95V86H66v9ZM65,95V86H56v9ZM55,95V86H46v9ZM45,95V86H36v9ZM35,95V86H26v9ZM25,95V86H16v9ZM16,85h9V76H16Zm10,0h9V76H26Zm10,0h9V76H36Zm10,0h9V76H46Zm10,0h9V76H56Zm10,0h9V76H66Zm10,0h9V76H76Zm10,0h9V76H86Zm9-10V66H86v9ZM85,75V66H76v9ZM75,75V66H66v9ZM65,75V66H56v9ZM55,75V66H46v9ZM45,75V66H36v9ZM35,75V66H26v9ZM25,75V66H16v9ZM16,65h9V56H16Zm10,0h9V56H26Zm10,0h9V56H36Zm10,0h9V56H46Zm10,0h9V56H56Zm10,0h9V56H66Zm10,0h9V56H76Zm10,0h9V56H86Zm9-10V46H86v9ZM85,55V46H76v9ZM75,55V46H66v9ZM65,55V46H56v9ZM55,55V46H46v9ZM45,55V46H36v9ZM35,55V46H26v9ZM25,55V46H16v9ZM16,45h9V36H16Zm10,0h9V36H26Zm10,0h9V36H36Zm10,0h9V36H46Zm10,0h9V36H56Zm10,0h9V36H66Zm10,0h9V36H76Zm10,0h9V36H86Zm9-10V26H86v9ZM85,35V26H76v9ZM75,35V26H66v9ZM65,35V26H56v9ZM55,35V26H46v9ZM45,35V26H36v9ZM35,35V26H26v9ZM25,35V26H16v9ZM16,25h9V16H16Zm10,0h9V16H26Zm10,0h9V16H36Zm10,0h9V16H46Zm10,0h9V16H56Zm10,0h9V16H66Zm10,0h9V16H76Zm10,0h9V16H86Z" fill="rgba(255,255,255,0.1)" fill-rule="evenodd" opacity="0.5"/>+ <path id="Path_4" data-name="Path 4" d="M6,5V0H5V5H0V6H5v94H6V6h94V5Z" fill="rgba(255,255,255,0.1)" fill-rule="evenodd"/>+</svg>diff --git a/apps/www/public/serviceWorker.js b/apps/www/public/serviceWorker.jsnew file mode 100644index 0000000000..790bcf811a--- /dev/null+++ b/apps/www/public/serviceWorker.js@@ -0,0 +1,31 @@+self.addEventListener("fetch", (event) => {+ let url = new URL(event.request.url);+ let method = event.request.method;++ // any non GET request is ignored+ if (method.toLowerCase() !== "get") return;++ // If the request is for the favicons, fonts, or the built files (which are hashed in the name)+ if (+ url.pathname.includes("logo") ||+ url.pathname.includes("storage/v1/object/public/avatars")+ ) {+ event.respondWith(+ // we will open the assets cache+ caches.open("assets").then(async (cache) => {+ // if the request is cached we will use the cache+ let cacheResponse = await cache.match(event.request);+ if (cacheResponse) return cacheResponse;++ // if it's not cached we will run the fetch, cache it and return it+ // this way the next time this asset it's needed it will load from the cache+ let fetchResponse = await fetch(event.request);+ cache.put(event.request, fetchResponse.clone());++ return fetchResponse;+ })+ );+ }++ return;+});diff --git a/apps/www/public/site.webmanifest b/apps/www/public/site.webmanifestnew file mode 100644index 0000000000..4e209ea8a1--- /dev/null+++ b/apps/www/public/site.webmanifest@@ -0,0 +1,19 @@+{+ "name": "Carbon",+ "short_name": "Carbon",+ "icons": [+ {+ "src": "/android-chrome-192x192.png",+ "sizes": "192x192",+ "type": "image/png"+ },+ {+ "src": "/android-chrome-512x512.png",+ "sizes": "512x512",+ "type": "image/png"+ }+ ],+ "theme_color": "#ffffff",+ "background_color": "#ffffff",+ "display": "standalone"+}diff --git a/apps/www/tailwind.config.js b/apps/www/tailwind.config.jsnew file mode 100644index 0000000000..5856bc01d7--- /dev/null+++ b/apps/www/tailwind.config.js@@ -0,0 +1,4 @@+module.exports = {+ "tailwindcss/nesting": {},+ ...require("@carbon/tailwind/tailwind.config"),+};diff --git a/apps/www/tsconfig.json b/apps/www/tsconfig.jsonnew file mode 100644index 0000000000..ac163dacdb--- /dev/null+++ b/apps/www/tsconfig.json@@ -0,0 +1,30 @@+{+ "include": [+ "env.d.ts",+ "**/*.ts",+ "**/*.tsx",+ "app/modules/documents/documents.service.ts",+ "../carbon/app/components/Breadcrumb.tsx"+ ],+ "compilerOptions": {+ "lib": ["dom", "dom.iterable", "ESNext"],+ "esModuleInterop": true,+ "jsx": "react-jsx",+ "module": "ESNext",+ "moduleResolution": "Bundler",+ "resolveJsonModule": true,+ "target": "ES2019",+ "strict": true,+ "forceConsistentCasingInFileNames": true,+ "allowJs": true,+ "baseUrl": ".",+ "paths": {+ "~/*": ["./app/*"]+ },+ "types": ["@remix-run/react/future/single-fetch.d.ts"],+ "noEmit": true,+ "isolatedModules": true,+ "skipLibCheck": true,+ "noErrorTruncation": true+ }+}diff --git a/apps/www/vite.config.ts b/apps/www/vite.config.tsnew file mode 100644index 0000000000..62a62abe89--- /dev/null+++ b/apps/www/vite.config.ts@@ -0,0 +1,70 @@+import { vitePlugin as remix } from "@remix-run/dev";+import { vercelPreset } from "@vercel/remix/vite";+import path from "node:path";+import { flatRoutes } from "remix-flat-routes";+import { defineConfig } from "vite";+import tsconfigPaths from "vite-tsconfig-paths";++export default defineConfig({+ build: {+ sourcemap: false,+ rollupOptions: {+ onwarn(warning, defaultHandler) {+ if (warning.code === "SOURCEMAP_ERROR") {+ return;+ }++ defaultHandler(warning);+ },+ },+ },+ ssr: {+ noExternal: [+ "react-tweet",+ "react-dropzone",+ "react-icons",+ "react-phone-number-input",+ "tailwind-merge",+ ],+ },+ server: {+ port: 4001,+ },+ plugins: [+ remix({+ presets: [vercelPreset()],+ future: {+ unstable_singleFetch: false,+ },+ ignoredRouteFiles: ["**/.*"],+ serverModuleFormat: "esm",+ routes: async (defineRoutes) => {+ return flatRoutes("routes", defineRoutes, {+ // eslint-disable-next-line no-undef+ appDir: path.resolve(__dirname, "app"),+ });+ },+ }),+ tsconfigPaths(),+ ],+ resolve: {+ alias: {+ "@carbon/documents": path.resolve(+ __dirname,+ "../../packages/documents/src/index.tsx"+ ),+ "@carbon/utils": path.resolve(+ __dirname,+ "../../packages/utils/src/index.ts"+ ),+ "@carbon/form": path.resolve(+ __dirname,+ "../../packages/form/src/index.tsx"+ ),+ "@carbon/logger": path.resolve(+ __dirname,+ "../../packages/logger/src/index.ts"+ ),+ },+ },+});diff --git a/package.json b/package.jsonindex 90685b0760..0a54bf3f6e 100755--- a/package.json+++ b/package.json@@ -53,6 +53,7 @@"dev:docs": "turbo run dev --filter=./apps/docs","dev:mes": "turbo run dev --filter=./apps/mes","dev:packages": "turbo run dev --filter=./packages/*",+ "dev:www": "turbo run dev --filter=./apps/www","generate:types": "tsx scripts/generate-db-types.ts","generate:swagger": "tsx scripts/generate-swagger-docs.ts && npx prettier --write ./packages/database/src/swagger-docs-schema.ts ","format": "prettier --write \"**/*.{ts,tsx,md}\"",