create-skybridge 0.0.0-dev.1b451bd → 0.0.0-dev.1dc4da5

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 (52) hide show
  1. package/LICENSE +21 -0
  2. package/dist/index.d.ts +1 -1
  3. package/dist/index.js +134 -47
  4. package/dist/index.test.d.ts +1 -0
  5. package/dist/index.test.js +33 -0
  6. package/index.js +6 -1
  7. package/package.json +12 -10
  8. package/template/README.md +32 -71
  9. package/template/_gitignore +3 -192
  10. package/template/alpic.json +1 -2
  11. package/template/node_modules/.bin/mcp-inspector +21 -0
  12. package/template/node_modules/.bin/nodemon +21 -0
  13. package/template/node_modules/.bin/sb +21 -0
  14. package/template/node_modules/.bin/skybridge +21 -0
  15. package/template/node_modules/.bin/tsc +21 -0
  16. package/template/node_modules/.bin/tsserver +21 -0
  17. package/template/node_modules/.bin/tsx +21 -0
  18. package/template/node_modules/.bin/vite +21 -0
  19. package/template/nodemon.json +5 -0
  20. package/template/package.json +27 -12
  21. package/template/server/src/index.ts +16 -8
  22. package/template/server/src/server.ts +45 -60
  23. package/template/tsconfig.json +23 -0
  24. package/template/tsconfig.server.json +11 -0
  25. package/template/web/src/helpers.ts +1 -1
  26. package/template/web/src/index.css +140 -109
  27. package/template/web/src/widgets/magic-8-ball.tsx +24 -0
  28. package/template/web/vite.config.ts +3 -4
  29. package/template/.cursor/mcp.json +0 -7
  30. package/template/.nvmrc +0 -1
  31. package/template/.vscode/launch.json +0 -16
  32. package/template/.vscode/settings.json +0 -8
  33. package/template/.vscode/tasks.json +0 -14
  34. package/template/biome.json +0 -50
  35. package/template/docs/demo.gif +0 -0
  36. package/template/pnpm-lock.yaml +0 -408
  37. package/template/pnpm-workspace.yaml +0 -7
  38. package/template/server/nodemon.json +0 -5
  39. package/template/server/package.json +0 -37
  40. package/template/server/pnpm-lock.yaml +0 -3796
  41. package/template/server/src/env.ts +0 -12
  42. package/template/server/src/pokedex.ts +0 -148
  43. package/template/server/tsconfig.json +0 -17
  44. package/template/web/components.json +0 -22
  45. package/template/web/package.json +0 -33
  46. package/template/web/pnpm-lock.yaml +0 -2629
  47. package/template/web/src/components/ui/shadcn-io/spinner/index.tsx +0 -272
  48. package/template/web/src/utils.ts +0 -6
  49. package/template/web/src/widgets/pokemon.tsx +0 -203
  50. package/template/web/tsconfig.app.json +0 -34
  51. package/template/web/tsconfig.json +0 -13
  52. package/template/web/tsconfig.node.json +0 -26
@@ -1,120 +1,151 @@
1
- @import "tailwindcss";
2
- @import "tw-animate-css";
1
+ @import url("https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@1,600&display=swap");
3
2
 
4
- @custom-variant dark (&:is(.dark *));
3
+ .container {
4
+ display: flex;
5
+ justify-content: center;
6
+ align-items: center;
7
+ height: 100%;
8
+ padding: 1rem;
9
+ }
5
10
 
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);
11
+ .ball {
12
+ background: radial-gradient(
13
+ circle at 30% 30%,
14
+ #454565 0%,
15
+ #1c1c30 40%,
16
+ #0a0a10 100%
17
+ );
18
+ border-radius: 50%;
19
+ width: 12rem;
20
+ height: 12rem;
21
+ display: flex;
22
+ flex-direction: column;
23
+ align-items: center;
24
+ justify-content: center;
25
+ font-family: monospace;
26
+ text-align: center;
27
+ position: relative;
28
+ box-shadow:
29
+ 0 10px 30px rgba(0, 0, 0, 0.5),
30
+ 0 5px 15px rgba(0, 0, 0, 0.3),
31
+ inset 0 -20px 40px rgba(0, 0, 0, 0.6);
32
+ animation:
33
+ float 3s ease-in-out infinite,
34
+ colorShift 15s ease-in-out infinite;
35
+ transition: transform 0.3s ease;
36
+ cursor: pointer;
37
+ border: 1px solid rgba(30, 30, 50, 0.6);
42
38
  }
43
39
 
44
- :root {
45
- --radius: 0.625rem;
46
- --background: oklch(1 0 0);
47
- --foreground: oklch(0.145 0 0);
48
- --card: oklch(1 0 0);
49
- --card-foreground: oklch(0.145 0 0);
50
- --popover: oklch(1 0 0);
51
- --popover-foreground: oklch(0.145 0 0);
52
- --primary: oklch(0.205 0 0);
53
- --primary-foreground: oklch(0.985 0 0);
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);
40
+ .ball:hover {
41
+ transform: scale(1.05) translateY(-8px);
42
+ animation: colorShift 15s ease-in-out infinite;
43
+ box-shadow:
44
+ 0 20px 50px rgba(0, 0, 0, 0.6),
45
+ 0 10px 25px rgba(0, 0, 0, 0.4),
46
+ inset 0 -20px 40px rgba(0, 0, 0, 0.6);
77
47
  }
78
48
 
79
- .dark {
80
- --background: oklch(0.145 0 0);
81
- --foreground: oklch(0.985 0 0);
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);
49
+ @keyframes float {
50
+ 0%,
51
+ 100% {
52
+ transform: translateY(0);
53
+ }
54
+ 50% {
55
+ transform: translateY(-8px);
56
+ }
111
57
  }
112
58
 
113
- @layer base {
114
- * {
115
- @apply border-border outline-ring/50;
59
+ @keyframes colorShift {
60
+ 0%,
61
+ 100% {
62
+ background: radial-gradient(
63
+ circle at 30% 30%,
64
+ #454565 0%,
65
+ #1c1c30 40%,
66
+ #0a0a10 100%
67
+ );
68
+ }
69
+ 25% {
70
+ background: radial-gradient(
71
+ circle at 30% 30%,
72
+ #3f4a65 0%,
73
+ #181e30 40%,
74
+ #090a10 100%
75
+ );
116
76
  }
117
- body {
118
- @apply bg-background text-foreground;
77
+ 50% {
78
+ background: radial-gradient(
79
+ circle at 30% 30%,
80
+ #3a5065 0%,
81
+ #152230 40%,
82
+ #080a10 100%
83
+ );
119
84
  }
85
+ 75% {
86
+ background: radial-gradient(
87
+ circle at 30% 30%,
88
+ #3f4a65 0%,
89
+ #181e30 40%,
90
+ #090a10 100%
91
+ );
92
+ }
93
+ }
94
+
95
+ .ball::before {
96
+ content: "";
97
+ position: absolute;
98
+ top: 8%;
99
+ left: 20%;
100
+ width: 30%;
101
+ height: 20%;
102
+ background: radial-gradient(
103
+ ellipse,
104
+ rgba(255, 255, 255, 0.3) 0%,
105
+ transparent 70%
106
+ );
107
+ border-radius: 50%;
108
+ pointer-events: none;
109
+ }
110
+
111
+ .ball::after {
112
+ content: "";
113
+ position: absolute;
114
+ bottom: 8%;
115
+ right: 25%;
116
+ width: 25%;
117
+ height: 10%;
118
+ background: radial-gradient(
119
+ ellipse,
120
+ rgba(255, 255, 255, 0.1) 0%,
121
+ transparent 70%
122
+ );
123
+ border-radius: 50%;
124
+ pointer-events: none;
125
+ }
126
+
127
+ .question {
128
+ font-size: clamp(0.5rem, 2vw, 0.75rem);
129
+ color: lightgrey;
130
+ max-width: 90%;
131
+ word-wrap: break-word;
132
+ overflow-wrap: break-word;
133
+ text-align: center;
134
+ line-height: 1.3;
135
+ font-style: italic;
136
+ }
137
+
138
+ .answer {
139
+ font-family: "Playfair Display", serif;
140
+ font-style: italic;
141
+ font-size: 1.25rem;
142
+ font-weight: 600;
143
+ margin-top: 0.5rem;
144
+ color: #7dd3fc;
145
+ text-shadow: 0 0 10px rgba(125, 211, 252, 0.5);
146
+ max-width: 90%;
147
+ word-wrap: break-word;
148
+ overflow-wrap: break-word;
149
+ text-align: center;
150
+ line-height: 1.3;
120
151
  }
@@ -0,0 +1,24 @@
1
+ import "@/index.css";
2
+
3
+ import { mountWidget } from "skybridge/web";
4
+ import { useToolInfo } from "../helpers";
5
+
6
+ function Magic8Ball() {
7
+ const { input, output } = useToolInfo<"magic-8-ball">();
8
+ if (!output) {
9
+ return <div>Shaking...</div>;
10
+ }
11
+
12
+ return (
13
+ <div className="container">
14
+ <div className="ball">
15
+ <div className="question">{input.question}</div>
16
+ <div className="answer">{output.answer}</div>
17
+ </div>
18
+ </div>
19
+ );
20
+ }
21
+
22
+ export default Magic8Ball;
23
+
24
+ mountWidget(<Magic8Ball />);
@@ -1,13 +1,12 @@
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
- import { defineConfig } from "vite";
4
+ import { defineConfig, type PluginOption } from "vite";
6
5
 
7
6
  // https://vite.dev/config/
8
7
  export default defineConfig({
9
- plugins: [skybridge(), react(), tailwindcss()],
10
-
8
+ plugins: [skybridge() as PluginOption, react()],
9
+ root: __dirname,
11
10
  resolve: {
12
11
  alias: {
13
12
  "@": path.resolve(__dirname, "./src"),
@@ -1,7 +0,0 @@
1
- {
2
- "mcpServers": {
3
- "local": {
4
- "url": "http://localhost:3000/mcp"
5
- }
6
- }
7
- }
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
- }
@@ -1,8 +0,0 @@
1
- {
2
- "editor.formatOnSave": true,
3
- "editor.codeActionsOnSave": {
4
- "source.organizeImports.biome": "explicit",
5
- "quickfix.biome": "explicit"
6
- },
7
- "editor.defaultFormatter": "biomejs.biome"
8
- }
@@ -1,14 +0,0 @@
1
- {
2
- "version": "2.0.0",
3
- "tasks": [
4
- {
5
- "type": "shell",
6
- "command": "npm",
7
- "args": ["build"],
8
- "group": "build",
9
- "label": "npm: build",
10
- "detail": "npm build",
11
- "problemMatcher": ["$tsc"]
12
- }
13
- ]
14
- }
@@ -1,50 +0,0 @@
1
- {
2
- "$schema": "https://biomejs.dev/schemas/2.3.8/schema.json",
3
- "vcs": {
4
- "enabled": true,
5
- "clientKind": "git",
6
- "useIgnoreFile": true
7
- },
8
- "files": {
9
- "includes": ["**", "!!**/dist"]
10
- },
11
- "formatter": {
12
- "enabled": true,
13
- "indentStyle": "space",
14
- "indentWidth": 2
15
- },
16
- "linter": {
17
- "enabled": true,
18
- "rules": {
19
- "recommended": true,
20
- "correctness": {
21
- "noUnusedVariables": "error",
22
- "noUnusedImports": "error"
23
- },
24
- "complexity": {
25
- "noBannedTypes": "error"
26
- },
27
- "style": {
28
- "noNonNullAssertion": "error"
29
- }
30
- }
31
- },
32
- "javascript": {
33
- "formatter": {
34
- "quoteStyle": "double"
35
- }
36
- },
37
- "assist": {
38
- "enabled": true,
39
- "actions": {
40
- "source": {
41
- "organizeImports": "on"
42
- }
43
- }
44
- },
45
- "css": {
46
- "parser": {
47
- "tailwindDirectives": true
48
- }
49
- }
50
- }
Binary file