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

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 (51) hide show
  1. package/LICENSE +21 -0
  2. package/dist/index.d.ts +1 -1
  3. package/dist/index.js +183 -55
  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 +13 -11
  8. package/template/AGENTS.md +1 -0
  9. package/template/README.md +52 -71
  10. package/template/_gitignore +3 -192
  11. package/template/alpic.json +1 -2
  12. package/template/node_modules/.bin/alpic +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/package.json +22 -12
  20. package/template/server/src/index.ts +62 -34
  21. package/template/tsconfig.json +9 -0
  22. package/template/web/src/helpers.ts +2 -2
  23. package/template/web/src/index.css +143 -109
  24. package/template/web/src/widgets/magic-8-ball.tsx +27 -0
  25. package/template/web/vite.config.ts +3 -4
  26. package/template/.cursor/mcp.json +0 -7
  27. package/template/.nvmrc +0 -1
  28. package/template/.vscode/launch.json +0 -16
  29. package/template/.vscode/settings.json +0 -8
  30. package/template/.vscode/tasks.json +0 -14
  31. package/template/biome.json +0 -50
  32. package/template/docs/demo.gif +0 -0
  33. package/template/pnpm-lock.yaml +0 -408
  34. package/template/pnpm-workspace.yaml +0 -7
  35. package/template/server/nodemon.json +0 -5
  36. package/template/server/package.json +0 -37
  37. package/template/server/pnpm-lock.yaml +0 -3796
  38. package/template/server/src/env.ts +0 -12
  39. package/template/server/src/middleware.ts +0 -54
  40. package/template/server/src/pokedex.ts +0 -148
  41. package/template/server/src/server.ts +0 -76
  42. package/template/server/tsconfig.json +0 -17
  43. package/template/web/components.json +0 -22
  44. package/template/web/package.json +0 -33
  45. package/template/web/pnpm-lock.yaml +0 -2629
  46. package/template/web/src/components/ui/shadcn-io/spinner/index.tsx +0 -272
  47. package/template/web/src/utils.ts +0 -6
  48. package/template/web/src/widgets/pokemon.tsx +0 -203
  49. package/template/web/tsconfig.app.json +0 -34
  50. package/template/web/tsconfig.json +0 -13
  51. package/template/web/tsconfig.node.json +0 -26
@@ -1,120 +1,154 @@
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
+ min-height: 100%;
8
+ max-height: 100%;
9
+ overflow: hidden;
10
+ padding: 1rem;
11
+ box-sizing: border-box;
12
+ }
5
13
 
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);
14
+ .ball {
15
+ background: radial-gradient(
16
+ circle at 30% 30%,
17
+ #454565 0%,
18
+ #1c1c30 40%,
19
+ #0a0a10 100%
20
+ );
21
+ border-radius: 50%;
22
+ width: 12rem;
23
+ height: 12rem;
24
+ display: flex;
25
+ flex-direction: column;
26
+ align-items: center;
27
+ justify-content: center;
28
+ font-family: monospace;
29
+ text-align: center;
30
+ position: relative;
31
+ box-shadow:
32
+ 0 10px 30px rgba(0, 0, 0, 0.5),
33
+ 0 5px 15px rgba(0, 0, 0, 0.3),
34
+ inset 0 -20px 40px rgba(0, 0, 0, 0.6);
35
+ animation:
36
+ float 3s ease-in-out infinite,
37
+ colorShift 15s ease-in-out infinite;
38
+ transition: transform 0.3s ease;
39
+ cursor: pointer;
40
+ border: 1px solid rgba(30, 30, 50, 0.6);
42
41
  }
43
42
 
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);
43
+ .ball:hover {
44
+ transform: scale(1.05) translateY(-8px);
45
+ animation: colorShift 15s ease-in-out infinite;
46
+ box-shadow:
47
+ 0 20px 50px rgba(0, 0, 0, 0.6),
48
+ 0 10px 25px rgba(0, 0, 0, 0.4),
49
+ inset 0 -20px 40px rgba(0, 0, 0, 0.6);
77
50
  }
78
51
 
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);
52
+ @keyframes float {
53
+ 0%,
54
+ 100% {
55
+ transform: translateY(0);
56
+ }
57
+ 50% {
58
+ transform: translateY(-8px);
59
+ }
111
60
  }
112
61
 
113
- @layer base {
114
- * {
115
- @apply border-border outline-ring/50;
62
+ @keyframes colorShift {
63
+ 0%,
64
+ 100% {
65
+ background: radial-gradient(
66
+ circle at 30% 30%,
67
+ #454565 0%,
68
+ #1c1c30 40%,
69
+ #0a0a10 100%
70
+ );
71
+ }
72
+ 25% {
73
+ background: radial-gradient(
74
+ circle at 30% 30%,
75
+ #3f4a65 0%,
76
+ #181e30 40%,
77
+ #090a10 100%
78
+ );
116
79
  }
117
- body {
118
- @apply bg-background text-foreground;
80
+ 50% {
81
+ background: radial-gradient(
82
+ circle at 30% 30%,
83
+ #3a5065 0%,
84
+ #152230 40%,
85
+ #080a10 100%
86
+ );
119
87
  }
88
+ 75% {
89
+ background: radial-gradient(
90
+ circle at 30% 30%,
91
+ #3f4a65 0%,
92
+ #181e30 40%,
93
+ #090a10 100%
94
+ );
95
+ }
96
+ }
97
+
98
+ .ball::before {
99
+ content: "";
100
+ position: absolute;
101
+ top: 8%;
102
+ left: 20%;
103
+ width: 30%;
104
+ height: 20%;
105
+ background: radial-gradient(
106
+ ellipse,
107
+ rgba(255, 255, 255, 0.3) 0%,
108
+ transparent 70%
109
+ );
110
+ border-radius: 50%;
111
+ pointer-events: none;
112
+ }
113
+
114
+ .ball::after {
115
+ content: "";
116
+ position: absolute;
117
+ bottom: 8%;
118
+ right: 25%;
119
+ width: 25%;
120
+ height: 10%;
121
+ background: radial-gradient(
122
+ ellipse,
123
+ rgba(255, 255, 255, 0.1) 0%,
124
+ transparent 70%
125
+ );
126
+ border-radius: 50%;
127
+ pointer-events: none;
128
+ }
129
+
130
+ .question {
131
+ font-size: clamp(0.5rem, 2vw, 0.75rem);
132
+ color: lightgrey;
133
+ max-width: 90%;
134
+ word-wrap: break-word;
135
+ overflow-wrap: break-word;
136
+ text-align: center;
137
+ line-height: 1.3;
138
+ font-style: italic;
139
+ }
140
+
141
+ .answer {
142
+ font-family: "Playfair Display", serif;
143
+ font-style: italic;
144
+ font-size: 1.25rem;
145
+ font-weight: 600;
146
+ margin-top: 0.5rem;
147
+ color: #7dd3fc;
148
+ text-shadow: 0 0 10px rgba(125, 211, 252, 0.5);
149
+ max-width: 90%;
150
+ word-wrap: break-word;
151
+ overflow-wrap: break-word;
152
+ text-align: center;
153
+ line-height: 1.3;
120
154
  }
@@ -0,0 +1,27 @@
1
+ import "@/index.css";
2
+
3
+ import { mountWidget } from "skybridge/web";
4
+ import { useToolInfo } from "../helpers.js";
5
+
6
+ function Magic8Ball() {
7
+ const { input, output } = useToolInfo<"magic-8-ball">();
8
+
9
+ return (
10
+ <div className="container">
11
+ <div className="ball">
12
+ {output ? (
13
+ <>
14
+ <div className="question">{input.question}</div>
15
+ <div className="answer">{output.answer}</div>
16
+ </>
17
+ ) : (
18
+ <div className="question">Shaking...</div>
19
+ )}
20
+ </div>
21
+ </div>
22
+ );
23
+ }
24
+
25
+ export default Magic8Ball;
26
+
27
+ 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