create-skybridge 0.0.0-dev.dbd3f0e → 0.0.0-dev.dbd5455

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 (56) hide show
  1. package/dist/index.js +101 -28
  2. package/dist/index.test.js +13 -1
  3. package/package.json +7 -6
  4. package/template/.dockerignore +4 -0
  5. package/template/AGENTS.md +1 -0
  6. package/template/Dockerfile +53 -0
  7. package/template/README.md +39 -22
  8. package/template/_gitignore +2 -1
  9. package/template/node_modules/.bin/alpic +21 -0
  10. package/template/node_modules/.bin/sb +2 -2
  11. package/template/node_modules/.bin/skybridge +2 -2
  12. package/template/node_modules/.bin/tsc +2 -2
  13. package/template/node_modules/.bin/tsserver +2 -2
  14. package/template/node_modules/.bin/tsx +2 -2
  15. package/template/node_modules/.bin/vite +2 -2
  16. package/template/package.json +22 -24
  17. package/template/src/helpers.ts +4 -0
  18. package/template/src/index.css +59 -0
  19. package/template/src/server.ts +77 -0
  20. package/template/src/views/components/doc-link.tsx +22 -0
  21. package/template/src/views/components/doc.tsx +21 -0
  22. package/template/src/views/components/nav.tsx +31 -0
  23. package/template/src/views/components/progress.tsx +35 -0
  24. package/template/src/views/components/steps/outro.tsx +68 -0
  25. package/template/src/views/components/steps/state.tsx +47 -0
  26. package/template/src/views/components/steps/tool-call.tsx +53 -0
  27. package/template/src/views/components/steps/tool-output.tsx +40 -0
  28. package/template/src/views/images/mascot/beret.png +0 -0
  29. package/template/src/views/images/mascot/chapka.png +0 -0
  30. package/template/src/views/images/mascot/cowboy-hat.png +0 -0
  31. package/template/src/views/images/mascot/fez.png +0 -0
  32. package/template/src/views/images/mascot/jester-hat.png +0 -0
  33. package/template/src/views/images/mascot/mitre.png +0 -0
  34. package/template/src/views/images/mascot/non-la.png +0 -0
  35. package/template/src/views/images/mascot/original.png +0 -0
  36. package/template/src/views/images/mascot/propeller-beanie.png +0 -0
  37. package/template/src/views/images/mascot/ski-mask.png +0 -0
  38. package/template/src/views/images/mascot/sombrero.png +0 -0
  39. package/template/src/views/images/mascot/top-hat.png +0 -0
  40. package/template/src/views/images/mascot/viking-helmet.png +0 -0
  41. package/template/src/views/onboarding.tsx +63 -0
  42. package/template/src/views/use-mascot.ts +60 -0
  43. package/template/src/vite-manifest.d.ts +4 -0
  44. package/template/tsconfig.json +7 -19
  45. package/template/{web/vite.config.ts → vite.config.ts} +3 -4
  46. package/template/node_modules/.bin/mcp-inspector +0 -21
  47. package/template/node_modules/.bin/nodemon +0 -21
  48. package/template/node_modules/.bin/shx +0 -21
  49. package/template/nodemon.json +0 -5
  50. package/template/server/src/index.ts +0 -51
  51. package/template/server/src/middleware.ts +0 -54
  52. package/template/server/src/server.ts +0 -61
  53. package/template/tsconfig.server.json +0 -11
  54. package/template/web/src/helpers.ts +0 -4
  55. package/template/web/src/index.css +0 -31
  56. package/template/web/src/widgets/magic-8-ball.tsx +0 -24
@@ -0,0 +1,59 @@
1
+ @import url("https://fonts.googleapis.com/css2?family=Mozilla+Text:wght@400..700&display=swap");
2
+ @import "tailwindcss";
3
+ @import "tw-animate-css";
4
+ @import "@alpic-ai/ui/theme";
5
+
6
+ @source "../node_modules/@alpic-ai/ui/src";
7
+
8
+ @theme {
9
+ --font-mozilla: "Mozilla Text", serif;
10
+ --animate-float: float 3s ease-in-out infinite;
11
+ --animate-twirl: twirl 20s ease-in-out infinite;
12
+ --animate-aurora: aurora 20s ease-in-out infinite;
13
+ --animate-gradient-flow: gradient-flow 6s linear infinite;
14
+ }
15
+
16
+ @keyframes gradient-flow {
17
+ 0% {
18
+ background-position: 200% 50%;
19
+ }
20
+ 100% {
21
+ background-position: 0% 50%;
22
+ }
23
+ }
24
+
25
+ @keyframes aurora {
26
+ 0%,
27
+ 100% {
28
+ background-position: 0% 50%;
29
+ }
30
+ 50% {
31
+ background-position: 100% 50%;
32
+ }
33
+ }
34
+
35
+ @keyframes float {
36
+ 0%,
37
+ 100% {
38
+ transform: translateY(0);
39
+ }
40
+ 50% {
41
+ transform: translateY(-6px);
42
+ }
43
+ }
44
+
45
+ @keyframes twirl {
46
+ 0%,
47
+ 80% {
48
+ transform: rotateY(0deg);
49
+ }
50
+ 85% {
51
+ transform: rotateY(180deg);
52
+ }
53
+ 95% {
54
+ transform: rotateY(180deg);
55
+ }
56
+ 100% {
57
+ transform: rotateY(360deg);
58
+ }
59
+ }
@@ -0,0 +1,77 @@
1
+ import { McpServer } from "skybridge/server";
2
+ import { z } from "zod";
3
+
4
+ const server = new McpServer(
5
+ {
6
+ name: "alpic-openai-app",
7
+ version: "0.0.1",
8
+ },
9
+ { capabilities: {} },
10
+ )
11
+ .registerTool(
12
+ {
13
+ name: "start",
14
+ description: "Onboard Skybridge",
15
+ inputSchema: {
16
+ name: z.string().optional().describe("The user name."),
17
+ },
18
+ view: {
19
+ component: "onboarding",
20
+ description: "Onboarding deck",
21
+ csp: {
22
+ resourceDomains: [
23
+ "https://fonts.googleapis.com",
24
+ "https://fonts.gstatic.com",
25
+ ],
26
+ redirectDomains: ["https://docs.skybridge.tech"],
27
+ },
28
+ },
29
+ },
30
+ async ({ name }) => {
31
+ return {
32
+ structuredContent: { name },
33
+ content: [{ type: "text", text: `User name: ${name}` }],
34
+ isError: false,
35
+ };
36
+ },
37
+ )
38
+ .registerTool(
39
+ {
40
+ name: "get-fortune-cookie",
41
+ description: "Get fortune cookie",
42
+ },
43
+ async () => {
44
+ const predictions = [
45
+ "A pleasant surprise is waiting for you.",
46
+ "Your hard work will soon pay off.",
47
+ "An unexpected friendship will brighten your week.",
48
+ "The best is yet to come.",
49
+ "A small step today leads to a giant leap tomorrow.",
50
+ "Trust your instincts: they are sharper than you think.",
51
+ "Adventure awaits just around the corner.",
52
+ "A long-forgotten idea will return with great success.",
53
+ "Kindness given today will be returned threefold.",
54
+ "Something you lost will soon be found.",
55
+ ];
56
+ const prediction =
57
+ predictions[Math.floor(Math.random() * predictions.length)];
58
+
59
+ // simulate backend work
60
+ await new Promise((resolve) => setTimeout(resolve, 1000));
61
+
62
+ return {
63
+ structuredContent: { prediction },
64
+ content: [{ type: "text", text: prediction }],
65
+ isError: false,
66
+ };
67
+ },
68
+ );
69
+
70
+ if (process.env.NODE_ENV === "production") {
71
+ const { default: manifest } = await import("./vite-manifest.js");
72
+ server.setViteManifest(manifest);
73
+ }
74
+
75
+ export default await server.run();
76
+
77
+ export type AppType = typeof server;
@@ -0,0 +1,22 @@
1
+ import type { ReactNode } from "react";
2
+ import { useOpenExternal } from "skybridge/web";
3
+
4
+ export default function DocLink({
5
+ href,
6
+ children,
7
+ }: {
8
+ href: string;
9
+ children: ReactNode;
10
+ }) {
11
+ // useOpenExternal: open a URL in a new browser tab from inside the iframe.
12
+ const openExternal = useOpenExternal();
13
+ return (
14
+ <button
15
+ type="button"
16
+ onClick={() => openExternal(href)}
17
+ className="underline underline-offset-4"
18
+ >
19
+ {children}
20
+ </button>
21
+ );
22
+ }
@@ -0,0 +1,21 @@
1
+ import type { ReactNode } from "react";
2
+
3
+ export default function Doc({ children }: { children: ReactNode }) {
4
+ return (
5
+ <p className="flex items-start gap-2 type-text-xs text-muted-foreground mt-auto">
6
+ <svg
7
+ viewBox="0 0 90 90"
8
+ xmlns="http://www.w3.org/2000/svg"
9
+ role="img"
10
+ aria-label="Skybridge"
11
+ className="size-4 shrink-0 mt-0.5"
12
+ >
13
+ <path
14
+ d="M17.2704 89.9987C37.5976 24.3967 65.182 12.9084 89.9996 35.3807V84.1606C89.9996 87.3849 87.3858 89.9987 84.1615 89.9987H17.2704ZM84.1615 0C87.3858 0 89.9996 2.6139 89.9996 5.83819V30.9146C52.0566 -5.26767 14.9006 31.2366 0.000976562 57.6768V5.83819C0.00104114 2.6139 2.61486 2.23904e-08 5.83917 0H84.1615Z"
15
+ fill="currentColor"
16
+ />
17
+ </svg>
18
+ <span>{children}</span>
19
+ </p>
20
+ );
21
+ }
@@ -0,0 +1,31 @@
1
+ import { Button } from "@alpic-ai/ui/components/button";
2
+ import { Check } from "lucide-react";
3
+
4
+ export default function Nav({
5
+ current,
6
+ total,
7
+ onChange,
8
+ }: {
9
+ current: number;
10
+ total: number;
11
+ onChange: (index: number) => void;
12
+ }) {
13
+ return (
14
+ <div className="flex justify-end gap-2 mt-auto">
15
+ <Button
16
+ variant="secondary"
17
+ disabled={current === 0}
18
+ onClick={() => onChange(Math.max(current - 1, 0))}
19
+ >
20
+ Previous
21
+ </Button>
22
+ <Button
23
+ disabled={current === total - 1}
24
+ onClick={() => onChange(Math.min(current + 1, total - 1))}
25
+ >
26
+ <Check />
27
+ Next
28
+ </Button>
29
+ </div>
30
+ );
31
+ }
@@ -0,0 +1,35 @@
1
+ import {
2
+ Tooltip,
3
+ TooltipContent,
4
+ TooltipTrigger,
5
+ } from "@alpic-ai/ui/components/tooltip";
6
+
7
+ export default function Progress({
8
+ steps,
9
+ current,
10
+ onSelect,
11
+ }: {
12
+ steps: readonly string[];
13
+ current: number;
14
+ onSelect: (index: number) => void;
15
+ }) {
16
+ return (
17
+ <div className="flex gap-1.5">
18
+ {steps.map((label, i) => (
19
+ <Tooltip key={label}>
20
+ <TooltipTrigger asChild>
21
+ <button
22
+ type="button"
23
+ onClick={() => onSelect(i)}
24
+ className={`relative h-1 flex-1 rounded-full transition-opacity before:absolute before:-inset-y-5 before:inset-x-0 before:content-[''] [@media(hover:hover)]:hover:opacity-70 ${
25
+ i <= current ? "bg-primary" : "bg-muted"
26
+ }`}
27
+ aria-label={label}
28
+ />
29
+ </TooltipTrigger>
30
+ <TooltipContent>{label}</TooltipContent>
31
+ </Tooltip>
32
+ ))}
33
+ </div>
34
+ );
35
+ }
@@ -0,0 +1,68 @@
1
+ import {
2
+ Card,
3
+ CardContent,
4
+ CardDescription,
5
+ CardTitle,
6
+ } from "@alpic-ai/ui/components/card";
7
+ import { BookOpen, CircleStar } from "lucide-react";
8
+ import { useOpenExternal } from "skybridge/web";
9
+
10
+ const LINKS = [
11
+ {
12
+ icon: CircleStar,
13
+ title: "See the examples",
14
+ description:
15
+ "Templates for OAuth, e-commerce, dashboards, games, and many more.",
16
+ href: "https://docs.skybridge.tech/showcase#examples",
17
+ },
18
+ {
19
+ icon: BookOpen,
20
+ title: "Read the docs",
21
+ description: "Learn more about Skybridge concepts, API, and tooling.",
22
+ href: "https://docs.skybridge.tech",
23
+ },
24
+ ];
25
+
26
+ export default function Outro() {
27
+ // useOpenExternal: open a URL in a new browser tab from inside the iframe.
28
+ const openExternal = useOpenExternal();
29
+
30
+ return (
31
+ <>
32
+ <div className="flex flex-1 flex-col justify-center gap-3">
33
+ <h1 className="type-display-xs font-mozilla font-semibold text-primary">
34
+ That's a wrap!
35
+ </h1>
36
+ <p>
37
+ You've just mastered how{" "}
38
+ <strong>
39
+ the data flows between the tools, the view, and the model
40
+ </strong>
41
+ . You can start{" "}
42
+ <span className="bg-gradient-to-r from-primary via-cyan-500 to-primary bg-[length:200%_100%] bg-clip-text text-transparent font-semibold animate-gradient-flow">
43
+ vibing
44
+ </span>{" "}
45
+ now from this very template or:
46
+ </p>
47
+ </div>
48
+ <div className="grid grid-cols-2 gap-3 mt-auto">
49
+ {LINKS.map(({ icon: Icon, title, description, href }) => (
50
+ <Card
51
+ key={title}
52
+ hoverable
53
+ className="cursor-pointer bg-white/50 dark:bg-zinc-900/50"
54
+ onClick={() => openExternal(href)}
55
+ >
56
+ <CardContent className="flex flex-col gap-2">
57
+ <div className="flex items-center gap-3">
58
+ <Icon className="size-5 shrink-0 text-primary" />
59
+ <CardTitle>{title}</CardTitle>
60
+ </div>
61
+ <CardDescription>{description}</CardDescription>
62
+ </CardContent>
63
+ </Card>
64
+ ))}
65
+ </div>
66
+ </>
67
+ );
68
+ }
@@ -0,0 +1,47 @@
1
+ import { Button } from "@alpic-ai/ui/components/button";
2
+ import { HatGlasses } from "lucide-react";
3
+ import Doc from "@/views/components/doc.js";
4
+ import DocLink from "@/views/components/doc-link.js";
5
+ import { useMascot } from "@/views/use-mascot.js";
6
+
7
+ export default function State() {
8
+ const { hat, changeHat } = useMascot();
9
+
10
+ return (
11
+ <>
12
+ <div className="flex flex-1 flex-col justify-center gap-3">
13
+ <p>
14
+ The <strong>view state</strong> can be shared with the model:
15
+ </p>
16
+ <div className="flex">
17
+ <Button variant="cta" onClick={changeHat}>
18
+ <HatGlasses />
19
+ Change my hat
20
+ </Button>
21
+ </div>
22
+ <p className={`mt-2 ${hat ? "" : "invisible"}`} aria-hidden={!hat}>
23
+ Now, the LLM also knows I'm wearing a glorious{" "}
24
+ <span
25
+ // data-llm: describe what the user views to the model so they can collaborate
26
+ data-llm={`Mascot is wearing ${hat}`}
27
+ className="text-primary font-mozilla"
28
+ >
29
+ {hat}
30
+ </span>
31
+ .
32
+ </p>
33
+ </div>
34
+ <Doc>
35
+ Use{" "}
36
+ <DocLink href="https://docs.skybridge.tech/api-reference/use-view-state">
37
+ useViewState
38
+ </DocLink>{" "}
39
+ to update the context and{" "}
40
+ <DocLink href="https://docs.skybridge.tech/api-reference/data-llm">
41
+ data-llm
42
+ </DocLink>{" "}
43
+ to describe the UI.
44
+ </Doc>
45
+ </>
46
+ );
47
+ }
@@ -0,0 +1,53 @@
1
+ import { Button } from "@alpic-ai/ui/components/button";
2
+ import { Cookie } from "lucide-react";
3
+ import { useEffect, useState } from "react";
4
+ import { useCallTool } from "@/helpers.js";
5
+ import Doc from "@/views/components/doc.js";
6
+ import DocLink from "@/views/components/doc-link.js";
7
+
8
+ export default function ToolCall() {
9
+ // useCallTool: invoke a server tool from within the view.
10
+ const { callTool, isPending, data } = useCallTool("get-fortune-cookie");
11
+ const [prediction, setPrediction] = useState<string | null>(null);
12
+
13
+ useEffect(() => {
14
+ if (data) {
15
+ setPrediction(data.structuredContent.prediction);
16
+ }
17
+ }, [data]);
18
+
19
+ return (
20
+ <>
21
+ <div className="flex flex-1 flex-col justify-center gap-3">
22
+ <p className="">
23
+ <strong>Tools</strong> can also be triggered from the view:
24
+ </p>
25
+ <div className="flex">
26
+ <Button
27
+ variant="cta"
28
+ loading={isPending}
29
+ icon={<Cookie />}
30
+ onClick={() => callTool()}
31
+ >
32
+ <code>get-fortune-cookie</code>
33
+ </Button>
34
+ </div>
35
+ <p
36
+ className={`font-mozilla italic text-primary mt-2 ${
37
+ prediction ? "" : "invisible"
38
+ }`}
39
+ aria-hidden={!prediction}
40
+ >
41
+ {prediction || "none"}
42
+ </p>
43
+ </div>
44
+ <Doc>
45
+ Use{" "}
46
+ <DocLink href="https://docs.skybridge.tech/api-reference/use-call-tool">
47
+ useCallTool
48
+ </DocLink>{" "}
49
+ to request tools from within the view.
50
+ </Doc>
51
+ </>
52
+ );
53
+ }
@@ -0,0 +1,40 @@
1
+ import { useToolInfo } from "@/helpers.js";
2
+ import Doc from "@/views/components/doc.js";
3
+ import DocLink from "@/views/components/doc-link.js";
4
+
5
+ export default function ToolOutput() {
6
+ // useToolInfo: read the input, output and metadata of the tool that opened this view.
7
+ const { output } = useToolInfo<"start">();
8
+ const name = output?.name;
9
+
10
+ return (
11
+ <>
12
+ <div className="flex flex-1 flex-col justify-center gap-3">
13
+ <h1 className="type-display-xs font-mozilla font-semibold">
14
+ Greetings,{" "}
15
+ <span className="text-primary">{name ?? "stranger"} !</span>
16
+ </h1>
17
+ {name ? (
18
+ <p>
19
+ You're wondering how do I know your name, don't you? Well, it's
20
+ because the view reads the <strong>tool output</strong>. The LLM
21
+ knows about it too.
22
+ </p>
23
+ ) : (
24
+ <p>
25
+ The view reads the <strong>tool output</strong>, but no{" "}
26
+ <code>name</code> was passed this time. Try again with you surname
27
+ to see with this view personalize.
28
+ </p>
29
+ )}
30
+ </div>
31
+ <Doc>
32
+ Use{" "}
33
+ <DocLink href="https://docs.skybridge.tech/api-reference/use-tool-info">
34
+ useToolInfo
35
+ </DocLink>{" "}
36
+ to hydrate the view with tool input, output and metadata.
37
+ </Doc>
38
+ </>
39
+ );
40
+ }
@@ -0,0 +1,63 @@
1
+ import "@/index.css";
2
+
3
+ import { useState } from "react";
4
+ import { useLayout } from "skybridge/web";
5
+ import Nav from "./components/nav.js";
6
+ import Progress from "./components/progress.js";
7
+ import Outro from "./components/steps/outro.js";
8
+ import State from "./components/steps/state.js";
9
+ import ToolCall from "./components/steps/tool-call.js";
10
+ import ToolOutput from "./components/steps/tool-output.js";
11
+ import { useMascot } from "./use-mascot.js";
12
+
13
+ const STEPS = [
14
+ { label: "Reading tool output", Component: ToolOutput },
15
+ { label: "Sharing view state", Component: State },
16
+ { label: "Calling tools", Component: ToolCall },
17
+ { label: "Examples & docs", Component: Outro },
18
+ ] as const;
19
+
20
+ export default function Onboarding() {
21
+ // useLayout: read host layout info (theme, display mode, locale, ...).
22
+ const { theme } = useLayout();
23
+
24
+ const [step, setStep] = useState(0);
25
+ const { img } = useMascot();
26
+
27
+ return (
28
+ <div
29
+ className={`${theme === "dark" ? "dark" : ""} mx-auto w-full max-w-4xl rounded-xl border border-border overflow-hidden bg-background text-foreground`}
30
+ >
31
+ <div className="min-h-136 md:min-h-95 flex flex-col items-center gap-6 p-6 bg-linear-to-br from-purple-50 via-white to-cyan-50 dark:from-purple-950/30 dark:via-zinc-950 dark:to-cyan-900/30 bg-size-[200%_200%] animate-aurora md:flex-row md:items-stretch">
32
+ <div className="shrink-0 self-center animate-float">
33
+ <img
34
+ src={img}
35
+ alt="Skybridge mascot"
36
+ className="h-32 w-32 md:h-50 md:w-50 object-contain animate-twirl"
37
+ />
38
+ </div>
39
+ <div className="flex w-full flex-1 flex-col gap-6">
40
+ <Progress
41
+ steps={STEPS.map(({ label }) => label)}
42
+ current={step}
43
+ onSelect={setStep}
44
+ />
45
+ <div className="grid flex-1">
46
+ {STEPS.map(({ label, Component }, i) => (
47
+ <div
48
+ key={label}
49
+ className={`col-start-1 row-start-1 flex flex-col gap-6 ${
50
+ step === i ? "" : "invisible pointer-events-none"
51
+ }`}
52
+ aria-hidden={step !== i}
53
+ >
54
+ <Component />
55
+ </div>
56
+ ))}
57
+ </div>
58
+ <Nav current={step} total={STEPS.length} onChange={setStep} />
59
+ </div>
60
+ </div>
61
+ </div>
62
+ );
63
+ }
@@ -0,0 +1,60 @@
1
+ import { useEffect } from "react";
2
+ import { useViewState } from "skybridge/web";
3
+ import beret from "./images/mascot/beret.png";
4
+ import chapka from "./images/mascot/chapka.png";
5
+ import cowboyHat from "./images/mascot/cowboy-hat.png";
6
+ import fez from "./images/mascot/fez.png";
7
+ import jesterHat from "./images/mascot/jester-hat.png";
8
+ import mitre from "./images/mascot/mitre.png";
9
+ import nonLa from "./images/mascot/non-la.png";
10
+ import original from "./images/mascot/original.png";
11
+ import propellerBeanie from "./images/mascot/propeller-beanie.png";
12
+ import skiMask from "./images/mascot/ski-mask.png";
13
+ import sombrero from "./images/mascot/sombrero.png";
14
+ import topHat from "./images/mascot/top-hat.png";
15
+ import vikingHelmet from "./images/mascot/viking-helmet.png";
16
+
17
+ const Hats = {
18
+ beret,
19
+ chapka,
20
+ "cowboy hat": cowboyHat,
21
+ fez,
22
+ "jester hat": jesterHat,
23
+ mitre,
24
+ "nón lá": nonLa,
25
+ "propeller beanie": propellerBeanie,
26
+ "ski mask": skiMask,
27
+ sombrero,
28
+ "top hat": topHat,
29
+ "viking helmet": vikingHelmet,
30
+ } as const;
31
+
32
+ type HatLabel = keyof typeof Hats;
33
+
34
+ const LABELS = Object.keys(Hats) as HatLabel[];
35
+
36
+ export function useMascot() {
37
+ // useViewState: persist UI state on the host and surface it to the model.
38
+ const [state, setState] = useViewState<{ hat?: HatLabel }>({});
39
+ const { hat } = state;
40
+ const img = hat ? Hats[hat] : original;
41
+
42
+ // Preload all hats once so swaps are instant.
43
+ useEffect(() => {
44
+ for (const src of Object.values(Hats)) {
45
+ new Image().src = src;
46
+ }
47
+ }, []);
48
+
49
+ return {
50
+ img,
51
+ hat,
52
+ changeHat: () => {
53
+ setState((prev) => {
54
+ const currentIndex = prev.hat ? LABELS.indexOf(prev.hat) : -1;
55
+ const next = LABELS[(currentIndex + 1) % LABELS.length];
56
+ return { ...prev, hat: next };
57
+ });
58
+ },
59
+ };
60
+ }
@@ -0,0 +1,4 @@
1
+ // Typed shim for the Vite manifest emitted by `skybridge build`. The actual
2
+ // `vite-manifest.js` is generated alongside this file and gitignored.
3
+ declare const manifest: Record<string, { file: string }>;
4
+ export default manifest;
@@ -1,23 +1,11 @@
1
1
  {
2
- "compilerOptions": {
3
- "target": "ES2022",
4
- "module": "ESNext",
5
- "moduleResolution": "bundler",
6
- "lib": ["ES2022", "DOM", "DOM.Iterable"],
7
- "jsx": "react-jsx",
8
-
9
- "strict": true,
10
- "skipLibCheck": true,
11
- "esModuleInterop": true,
12
- "forceConsistentCasingInFileNames": true,
13
- "verbatimModuleSyntax": true,
14
-
15
- "noUnusedLocals": true,
16
- "noUnusedParameters": true,
17
- "noFallthroughCasesInSwitch": true,
2
+ "extends": "skybridge/tsconfig",
18
3
 
19
- "noEmit": true
4
+ "compilerOptions": {
5
+ "paths": {
6
+ "@/*": ["./src/*"]
7
+ }
20
8
  },
21
- "include": ["server/src", "web/src", "web/vite.config.ts"],
22
- "exclude": ["dist", "node_modules"]
9
+
10
+ "include": ["src", ".skybridge/**/*.d.ts"]
23
11
  }
@@ -1,12 +1,11 @@
1
1
  import path from "node:path";
2
+ import tailwindcss from "@tailwindcss/vite";
2
3
  import react from "@vitejs/plugin-react";
3
- import { skybridge } from "skybridge/web";
4
+ import { skybridge } from "skybridge/vite";
4
5
  import { defineConfig } from "vite";
5
6
 
6
- // https://vite.dev/config/
7
7
  export default defineConfig({
8
- plugins: [skybridge(), react()],
9
- root: __dirname,
8
+ plugins: [skybridge(), react(), tailwindcss()],
10
9
  resolve: {
11
10
  alias: {
12
11
  "@": path.resolve(__dirname, "./src"),