create-skybridge 0.0.0-cloudflare

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 (89) hide show
  1. package/dist/index.d.ts +1 -0
  2. package/dist/index.js +283 -0
  3. package/dist/index.test.d.ts +1 -0
  4. package/dist/index.test.js +33 -0
  5. package/index.js +8 -0
  6. package/package.json +36 -0
  7. package/template/AGENTS.md +1 -0
  8. package/template/README.md +97 -0
  9. package/template/_gitignore +5 -0
  10. package/template/_headers +2 -0
  11. package/template/alpic.json +3 -0
  12. package/template/dist/_headers +2 -0
  13. package/template/dist/assets/.vite/manifest.json +24 -0
  14. package/template/dist/assets/assets/magic-8-ball-DWG75vr4.js +10 -0
  15. package/template/dist/assets/assets/modal-provider-BQ1zWEcc.js +18 -0
  16. package/template/dist/assets/assets/style-CH_mzOKc.css +2 -0
  17. package/template/dist/server/src/index.js +56 -0
  18. package/template/dist/server/src/index.js.map +1 -0
  19. package/template/dist/server/src/vite-manifest.js +24 -0
  20. package/template/dist/tsconfig.tsbuildinfo +1 -0
  21. package/template/dist/web/src/helpers.js +3 -0
  22. package/template/dist/web/src/helpers.js.map +1 -0
  23. package/template/dist/web/src/widgets/magic-8-ball.js +11 -0
  24. package/template/dist/web/src/widgets/magic-8-ball.js.map +1 -0
  25. package/template/node_modules/.bin/alpic +21 -0
  26. package/template/node_modules/.bin/browserslist +21 -0
  27. package/template/node_modules/.bin/esbuild +21 -0
  28. package/template/node_modules/.bin/jiti +21 -0
  29. package/template/node_modules/.bin/nodemon +21 -0
  30. package/template/node_modules/.bin/sb +21 -0
  31. package/template/node_modules/.bin/skybridge +21 -0
  32. package/template/node_modules/.bin/terser +21 -0
  33. package/template/node_modules/.bin/tsc +21 -0
  34. package/template/node_modules/.bin/tsserver +21 -0
  35. package/template/node_modules/.bin/tsx +21 -0
  36. package/template/node_modules/.bin/vite +21 -0
  37. package/template/node_modules/.bin/workerd +21 -0
  38. package/template/node_modules/.bin/wrangler +21 -0
  39. package/template/node_modules/.bin/wrangler2 +21 -0
  40. package/template/node_modules/.bin/yaml +21 -0
  41. package/template/node_modules/.cache/wrangler/wrangler-account.json +6 -0
  42. package/template/node_modules/.mf/cf.json +1 -0
  43. package/template/node_modules/.vite/deps/_metadata.json +76 -0
  44. package/template/node_modules/.vite/deps/chunk-5WRI5ZAA.js +30 -0
  45. package/template/node_modules/.vite/deps/chunk-5WRI5ZAA.js.map +7 -0
  46. package/template/node_modules/.vite/deps/chunk-MEVQY4YB.js +991 -0
  47. package/template/node_modules/.vite/deps/chunk-MEVQY4YB.js.map +7 -0
  48. package/template/node_modules/.vite/deps/chunk-RKAOJUND.js +279 -0
  49. package/template/node_modules/.vite/deps/chunk-RKAOJUND.js.map +7 -0
  50. package/template/node_modules/.vite/deps/chunk-V2LKO732.js +267 -0
  51. package/template/node_modules/.vite/deps/chunk-V2LKO732.js.map +7 -0
  52. package/template/node_modules/.vite/deps/chunk-VNABIVRN.js +20196 -0
  53. package/template/node_modules/.vite/deps/chunk-VNABIVRN.js.map +7 -0
  54. package/template/node_modules/.vite/deps/chunk-YNOAPT43.js +634 -0
  55. package/template/node_modules/.vite/deps/chunk-YNOAPT43.js.map +7 -0
  56. package/template/node_modules/.vite/deps/lib-355XMAFY.js +56976 -0
  57. package/template/node_modules/.vite/deps/lib-355XMAFY.js.map +7 -0
  58. package/template/node_modules/.vite/deps/modal-provider-67CS7MKL.js +62 -0
  59. package/template/node_modules/.vite/deps/modal-provider-67CS7MKL.js.map +7 -0
  60. package/template/node_modules/.vite/deps/node_fs-3RO563AW.js +18 -0
  61. package/template/node_modules/.vite/deps/node_fs-3RO563AW.js.map +7 -0
  62. package/template/node_modules/.vite/deps/node_path-5FHEC5YD.js +18 -0
  63. package/template/node_modules/.vite/deps/node_path-5FHEC5YD.js.map +7 -0
  64. package/template/node_modules/.vite/deps/package.json +3 -0
  65. package/template/node_modules/.vite/deps/react-dom.js +6 -0
  66. package/template/node_modules/.vite/deps/react-dom.js.map +7 -0
  67. package/template/node_modules/.vite/deps/react-dom_client.js +7 -0
  68. package/template/node_modules/.vite/deps/react-dom_client.js.map +7 -0
  69. package/template/node_modules/.vite/deps/react.js +5 -0
  70. package/template/node_modules/.vite/deps/react.js.map +7 -0
  71. package/template/node_modules/.vite/deps/react_jsx-dev-runtime.js +265 -0
  72. package/template/node_modules/.vite/deps/react_jsx-dev-runtime.js.map +7 -0
  73. package/template/node_modules/.vite/deps/react_jsx-runtime.js +6 -0
  74. package/template/node_modules/.vite/deps/react_jsx-runtime.js.map +7 -0
  75. package/template/node_modules/.vite/deps/skybridge_web.js +1508 -0
  76. package/template/node_modules/.vite/deps/skybridge_web.js.map +7 -0
  77. package/template/package.json +36 -0
  78. package/template/server/src/index.ts +67 -0
  79. package/template/server/src/vite-manifest.d.ts +2 -0
  80. package/template/tsconfig.json +9 -0
  81. package/template/web/dist/.vite/manifest.json +24 -0
  82. package/template/web/dist/assets/magic-8-ball-DWG75vr4.js +10 -0
  83. package/template/web/dist/assets/modal-provider-BQ1zWEcc.js +18 -0
  84. package/template/web/dist/assets/style-CH_mzOKc.css +2 -0
  85. package/template/web/src/helpers.ts +4 -0
  86. package/template/web/src/index.css +154 -0
  87. package/template/web/src/widgets/magic-8-ball.tsx +27 -0
  88. package/template/web/vite.config.ts +15 -0
  89. package/template/wrangler.jsonc +12 -0
@@ -0,0 +1,154 @@
1
+ @import url("https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@1,600&display=swap");
2
+
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
+ }
13
+
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);
41
+ }
42
+
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);
50
+ }
51
+
52
+ @keyframes float {
53
+ 0%,
54
+ 100% {
55
+ transform: translateY(0);
56
+ }
57
+ 50% {
58
+ transform: translateY(-8px);
59
+ }
60
+ }
61
+
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
+ );
79
+ }
80
+ 50% {
81
+ background: radial-gradient(
82
+ circle at 30% 30%,
83
+ #3a5065 0%,
84
+ #152230 40%,
85
+ #080a10 100%
86
+ );
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;
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 />);
@@ -0,0 +1,15 @@
1
+ import path from "node:path";
2
+ import react from "@vitejs/plugin-react";
3
+ import { skybridge } from "skybridge/web";
4
+ import { defineConfig, type PluginOption } from "vite";
5
+
6
+ // https://vite.dev/config/
7
+ export default defineConfig({
8
+ plugins: [skybridge() as PluginOption, react()],
9
+ root: __dirname,
10
+ resolve: {
11
+ alias: {
12
+ "@": path.resolve(__dirname, "./src"),
13
+ },
14
+ },
15
+ });
@@ -0,0 +1,12 @@
1
+ {
2
+ "name": "create-skybridge-template",
3
+ "compatibility_date": "2026-03-16",
4
+ "main": "dist/server/src/index.js",
5
+ "assets": {
6
+ "directory": "dist"
7
+ },
8
+ "compatibility_flags": ["nodejs_compat"],
9
+ "define": {
10
+ "process.env.NODE_ENV": "\"production\""
11
+ }
12
+ }