create-skybridge 0.0.0-dev.ac28c6f → 0.0.0-dev.bc56028
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.
- package/dist/index.d.ts +1 -1
- package/dist/index.js +16 -20
- package/index.js +1 -6
- package/package.json +2 -5
- package/template/README.md +19 -69
- package/template/_gitignore +2 -192
- package/template/server/package.json +0 -2
- package/template/server/src/server.ts +59 -60
- package/template/web/package.json +1 -9
- package/template/web/src/helpers.ts +1 -1
- package/template/web/src/index.css +23 -113
- package/template/web/src/widgets/magic-8-ball.tsx +22 -0
- package/template/web/vite.config.ts +1 -2
- package/dist/index.test.d.ts +0 -1
- package/dist/index.test.js +0 -19
- package/template/.cursor/mcp.json +0 -7
- package/template/.nvmrc +0 -1
- package/template/.vscode/launch.json +0 -16
- package/template/.vscode/settings.json +0 -3
- package/template/.vscode/tasks.json +0 -14
- package/template/docs/demo.gif +0 -0
- package/template/server/pnpm-lock.yaml +0 -3796
- package/template/server/src/pokedex.ts +0 -148
- package/template/web/components.json +0 -22
- package/template/web/pnpm-lock.yaml +0 -2629
- package/template/web/src/components/ui/shadcn-io/spinner/index.tsx +0 -272
- package/template/web/src/utils.ts +0 -6
- package/template/web/src/widgets/pokemon.tsx +0 -203
|
@@ -1,120 +1,30 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
@theme inline {
|
|
7
|
-
--radius-sm: calc(var(--radius) - 4px);
|
|
8
|
-
--radius-md: calc(var(--radius) - 2px);
|
|
9
|
-
--radius-lg: var(--radius);
|
|
10
|
-
--radius-xl: calc(var(--radius) + 4px);
|
|
11
|
-
--color-background: var(--background);
|
|
12
|
-
--color-foreground: var(--foreground);
|
|
13
|
-
--color-card: var(--card);
|
|
14
|
-
--color-card-foreground: var(--card-foreground);
|
|
15
|
-
--color-popover: var(--popover);
|
|
16
|
-
--color-popover-foreground: var(--popover-foreground);
|
|
17
|
-
--color-primary: var(--primary);
|
|
18
|
-
--color-primary-foreground: var(--primary-foreground);
|
|
19
|
-
--color-secondary: var(--secondary);
|
|
20
|
-
--color-secondary-foreground: var(--secondary-foreground);
|
|
21
|
-
--color-muted: var(--muted);
|
|
22
|
-
--color-muted-foreground: var(--muted-foreground);
|
|
23
|
-
--color-accent: var(--accent);
|
|
24
|
-
--color-accent-foreground: var(--accent-foreground);
|
|
25
|
-
--color-destructive: var(--destructive);
|
|
26
|
-
--color-border: var(--border);
|
|
27
|
-
--color-input: var(--input);
|
|
28
|
-
--color-ring: var(--ring);
|
|
29
|
-
--color-chart-1: var(--chart-1);
|
|
30
|
-
--color-chart-2: var(--chart-2);
|
|
31
|
-
--color-chart-3: var(--chart-3);
|
|
32
|
-
--color-chart-4: var(--chart-4);
|
|
33
|
-
--color-chart-5: var(--chart-5);
|
|
34
|
-
--color-sidebar: var(--sidebar);
|
|
35
|
-
--color-sidebar-foreground: var(--sidebar-foreground);
|
|
36
|
-
--color-sidebar-primary: var(--sidebar-primary);
|
|
37
|
-
--color-sidebar-primary-foreground: var(--sidebar-primary-foreground);
|
|
38
|
-
--color-sidebar-accent: var(--sidebar-accent);
|
|
39
|
-
--color-sidebar-accent-foreground: var(--sidebar-accent-foreground);
|
|
40
|
-
--color-sidebar-border: var(--sidebar-border);
|
|
41
|
-
--color-sidebar-ring: var(--sidebar-ring);
|
|
1
|
+
.container {
|
|
2
|
+
display: flex;
|
|
3
|
+
justify-content: center;
|
|
4
|
+
align-items: center;
|
|
5
|
+
height: 100%;
|
|
42
6
|
}
|
|
43
7
|
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
--secondary: oklch(0.97 0 0);
|
|
55
|
-
--secondary-foreground: oklch(0.205 0 0);
|
|
56
|
-
--muted: oklch(0.97 0 0);
|
|
57
|
-
--muted-foreground: oklch(0.556 0 0);
|
|
58
|
-
--accent: oklch(0.97 0 0);
|
|
59
|
-
--accent-foreground: oklch(0.205 0 0);
|
|
60
|
-
--destructive: oklch(0.577 0.245 27.325);
|
|
61
|
-
--border: oklch(0.922 0 0);
|
|
62
|
-
--input: oklch(0.922 0 0);
|
|
63
|
-
--ring: oklch(0.708 0 0);
|
|
64
|
-
--chart-1: oklch(0.646 0.222 41.116);
|
|
65
|
-
--chart-2: oklch(0.6 0.118 184.704);
|
|
66
|
-
--chart-3: oklch(0.398 0.07 227.392);
|
|
67
|
-
--chart-4: oklch(0.828 0.189 84.429);
|
|
68
|
-
--chart-5: oklch(0.769 0.188 70.08);
|
|
69
|
-
--sidebar: oklch(0.985 0 0);
|
|
70
|
-
--sidebar-foreground: oklch(0.145 0 0);
|
|
71
|
-
--sidebar-primary: oklch(0.205 0 0);
|
|
72
|
-
--sidebar-primary-foreground: oklch(0.985 0 0);
|
|
73
|
-
--sidebar-accent: oklch(0.97 0 0);
|
|
74
|
-
--sidebar-accent-foreground: oklch(0.205 0 0);
|
|
75
|
-
--sidebar-border: oklch(0.922 0 0);
|
|
76
|
-
--sidebar-ring: oklch(0.708 0 0);
|
|
8
|
+
.ball {
|
|
9
|
+
background-color: black;
|
|
10
|
+
border-radius: 50%;
|
|
11
|
+
width: 12rem;
|
|
12
|
+
height: 12rem;
|
|
13
|
+
display: flex;
|
|
14
|
+
flex-direction: column;
|
|
15
|
+
align-items: center;
|
|
16
|
+
justify-content: center;
|
|
17
|
+
font-family: monospace;
|
|
77
18
|
}
|
|
78
19
|
|
|
79
|
-
.
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
--card: oklch(0.205 0 0);
|
|
83
|
-
--card-foreground: oklch(0.985 0 0);
|
|
84
|
-
--popover: oklch(0.205 0 0);
|
|
85
|
-
--popover-foreground: oklch(0.985 0 0);
|
|
86
|
-
--primary: oklch(0.922 0 0);
|
|
87
|
-
--primary-foreground: oklch(0.205 0 0);
|
|
88
|
-
--secondary: oklch(0.269 0 0);
|
|
89
|
-
--secondary-foreground: oklch(0.985 0 0);
|
|
90
|
-
--muted: oklch(0.269 0 0);
|
|
91
|
-
--muted-foreground: oklch(0.708 0 0);
|
|
92
|
-
--accent: oklch(0.269 0 0);
|
|
93
|
-
--accent-foreground: oklch(0.985 0 0);
|
|
94
|
-
--destructive: oklch(0.704 0.191 22.216);
|
|
95
|
-
--border: oklch(1 0 0 / 10%);
|
|
96
|
-
--input: oklch(1 0 0 / 15%);
|
|
97
|
-
--ring: oklch(0.556 0 0);
|
|
98
|
-
--chart-1: oklch(0.488 0.243 264.376);
|
|
99
|
-
--chart-2: oklch(0.696 0.17 162.48);
|
|
100
|
-
--chart-3: oklch(0.769 0.188 70.08);
|
|
101
|
-
--chart-4: oklch(0.627 0.265 303.9);
|
|
102
|
-
--chart-5: oklch(0.645 0.246 16.439);
|
|
103
|
-
--sidebar: oklch(0.205 0 0);
|
|
104
|
-
--sidebar-foreground: oklch(0.985 0 0);
|
|
105
|
-
--sidebar-primary: oklch(0.488 0.243 264.376);
|
|
106
|
-
--sidebar-primary-foreground: oklch(0.985 0 0);
|
|
107
|
-
--sidebar-accent: oklch(0.269 0 0);
|
|
108
|
-
--sidebar-accent-foreground: oklch(0.985 0 0);
|
|
109
|
-
--sidebar-border: oklch(1 0 0 / 10%);
|
|
110
|
-
--sidebar-ring: oklch(0.556 0 0);
|
|
20
|
+
.question {
|
|
21
|
+
font-size: 0.75rem;
|
|
22
|
+
color: lightgrey;
|
|
111
23
|
}
|
|
112
24
|
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
@apply bg-background text-foreground;
|
|
119
|
-
}
|
|
25
|
+
.answer {
|
|
26
|
+
font-size: 1.125rem;
|
|
27
|
+
font-weight: bold;
|
|
28
|
+
margin-top: 0.5rem;
|
|
29
|
+
color: aqua;
|
|
120
30
|
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import "@/index.css";
|
|
2
|
+
|
|
3
|
+
import { mountWidget } from "skybridge/web";
|
|
4
|
+
import { useToolInfo } from "../helpers";
|
|
5
|
+
|
|
6
|
+
function Magic8Ball() {
|
|
7
|
+
const { output } = useToolInfo<"magic-8-ball">();
|
|
8
|
+
if (!output) return <div>Shaking...</div>;
|
|
9
|
+
|
|
10
|
+
return (
|
|
11
|
+
<div className="container">
|
|
12
|
+
<div className="ball">
|
|
13
|
+
<div className="question">{output.question}</div>
|
|
14
|
+
<div className="answer">{output.answer}</div>
|
|
15
|
+
</div>
|
|
16
|
+
</div>
|
|
17
|
+
);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export default Magic8Ball;
|
|
21
|
+
|
|
22
|
+
mountWidget(<Magic8Ball />);
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import path from "node:path";
|
|
2
|
-
import tailwindcss from "@tailwindcss/vite";
|
|
3
2
|
import react from "@vitejs/plugin-react";
|
|
4
3
|
import { skybridge } from "skybridge/web";
|
|
5
4
|
import { defineConfig } from "vite";
|
|
6
5
|
|
|
7
6
|
// https://vite.dev/config/
|
|
8
7
|
export default defineConfig({
|
|
9
|
-
plugins: [skybridge(), react()
|
|
8
|
+
plugins: [skybridge(), react()],
|
|
10
9
|
|
|
11
10
|
resolve: {
|
|
12
11
|
alias: {
|
package/dist/index.test.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
package/dist/index.test.js
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { randomBytes } from "node:crypto";
|
|
2
|
-
import fs from "node:fs/promises";
|
|
3
|
-
import path from "node:path";
|
|
4
|
-
import { afterEach, beforeEach, describe, it } from "vitest";
|
|
5
|
-
import { init } from "./index.js";
|
|
6
|
-
describe("create-skybridge", () => {
|
|
7
|
-
let tempDirName;
|
|
8
|
-
beforeEach(() => {
|
|
9
|
-
tempDirName = `test-${randomBytes(2).toString("hex")}`;
|
|
10
|
-
});
|
|
11
|
-
afterEach(async () => {
|
|
12
|
-
await fs.rm(path.join(process.cwd(), tempDirName), { recursive: true });
|
|
13
|
-
});
|
|
14
|
-
it("should scaffold a new project", async () => {
|
|
15
|
-
const name = `../../${tempDirName}//project$`;
|
|
16
|
-
await init([name]);
|
|
17
|
-
await fs.access(path.join(process.cwd(), tempDirName, "project", ".gitignore"));
|
|
18
|
-
});
|
|
19
|
-
});
|
package/template/.nvmrc
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
lts/jod
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": "0.0.1",
|
|
3
|
-
"configurations": [
|
|
4
|
-
{
|
|
5
|
-
"name": "Debug MCP Server",
|
|
6
|
-
"type": "node",
|
|
7
|
-
"request": "launch",
|
|
8
|
-
"program": "${workspaceFolder}/dist/index.js",
|
|
9
|
-
"console": "integratedTerminal",
|
|
10
|
-
"sourceMaps": true,
|
|
11
|
-
"outFiles": ["${workspaceFolder}/dist/**/*.js"],
|
|
12
|
-
"preLaunchTask": "npm: build",
|
|
13
|
-
"stopOnEntry": false
|
|
14
|
-
}
|
|
15
|
-
]
|
|
16
|
-
}
|
package/template/docs/demo.gif
DELETED
|
Binary file
|