frontend-hamroun 1.2.82 → 1.2.84
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/bin/cli.js +58 -870
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.client.cjs +1 -1
- package/dist/index.client.cjs.map +1 -1
- package/dist/index.client.js +2 -2
- package/dist/index.client.js.map +1 -1
- package/dist/index.js +116 -133
- package/dist/index.js.map +1 -1
- package/dist/jsx-runtime.cjs.map +1 -1
- package/dist/jsx-runtime.js.map +1 -1
- package/dist/renderer-DaVfBeVi.cjs +2 -0
- package/dist/renderer-DaVfBeVi.cjs.map +1 -0
- package/dist/renderer-nfT7XSpo.js +61 -0
- package/dist/renderer-nfT7XSpo.js.map +1 -0
- package/dist/server-renderer-B5b0Q0ck.cjs +2 -0
- package/dist/server-renderer-B5b0Q0ck.cjs.map +1 -0
- package/dist/{server-renderer-QHt45Ip2.js → server-renderer-C4MB-jAp.js} +89 -96
- package/dist/server-renderer-C4MB-jAp.js.map +1 -0
- package/dist/server-renderer.cjs +1 -1
- package/dist/server-renderer.js +1 -1
- package/package.json +1 -1
- package/templates/basic-app/src/App.tsx +397 -19
- package/templates/ssr-template/dist/client/assets/main-D-VH3xOb.js +1 -0
- package/templates/ssr-template/dist/client/index.html +23 -0
- package/templates/ssr-template/dist/client.js +951 -0
- package/templates/ssr-template/dist/server.js +739 -0
- package/templates/ssr-template/package.json +22 -22
- package/templates/ssr-template/src/App.tsx +874 -11
- package/templates/ssr-template/tsconfig.json +14 -10
- package/templates/ssr-template/vite.config.ts +19 -17
- package/templates/wasm/dist/assets/index-BNqTDBdE.js +295 -0
- package/templates/wasm/dist/example.wasm +0 -0
- package/templates/wasm/dist/index.html +53 -0
- package/templates/wasm/dist/wasm_exec.js +572 -0
- package/templates/wasm/package-lock.json +4577 -5307
- package/templates/wasm/package.json +25 -42
- package/templates/wasm/public/wasm_exec.js +12 -1
- package/templates/wasm/src/App.tsx +41 -55
- package/templates/wasm/vite.config.ts +24 -42
- package/dist/renderer-Bo9zkUZ_.js +0 -52
- package/dist/renderer-Bo9zkUZ_.js.map +0 -1
- package/dist/renderer-Din1y3YM.cjs +0 -2
- package/dist/renderer-Din1y3YM.cjs.map +0 -1
- package/dist/server-renderer-CqIpQ-od.cjs +0 -2
- package/dist/server-renderer-CqIpQ-od.cjs.map +0 -1
- package/dist/server-renderer-QHt45Ip2.js.map +0 -1
@@ -1,19 +1,23 @@
|
|
1
1
|
{
|
2
2
|
"compilerOptions": {
|
3
|
-
"target": "
|
4
|
-
"
|
5
|
-
"
|
6
|
-
"jsx": "preserve",
|
7
|
-
"strict": true,
|
8
|
-
"esModuleInterop": true,
|
3
|
+
"target": "ES2022",
|
4
|
+
"lib": ["ES2022", "DOM", "DOM.Iterable"],
|
5
|
+
"allowJs": false,
|
9
6
|
"skipLibCheck": true,
|
10
|
-
"
|
7
|
+
"esModuleInterop": false,
|
11
8
|
"allowSyntheticDefaultImports": true,
|
9
|
+
"strict": true,
|
10
|
+
"forceConsistentCasingInFileNames": true,
|
11
|
+
"module": "ESNext",
|
12
|
+
"moduleResolution": "bundler",
|
12
13
|
"resolveJsonModule": true,
|
13
14
|
"isolatedModules": true,
|
14
15
|
"noEmit": true,
|
15
|
-
"
|
16
|
+
"jsx": "preserve",
|
17
|
+
"jsxImportSource": "frontend-hamroun"
|
16
18
|
},
|
17
|
-
"include": [
|
18
|
-
|
19
|
+
"include": [
|
20
|
+
"src",
|
21
|
+
"server.ts"
|
22
|
+
]
|
19
23
|
}
|
@@ -2,29 +2,31 @@ import { defineConfig } from 'vite';
|
|
2
2
|
import path from 'path';
|
3
3
|
|
4
4
|
export default defineConfig({
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
5
|
+
esbuild: {
|
6
|
+
jsx: 'transform',
|
7
|
+
jsxFactory: 'jsx',
|
8
|
+
jsxFragment: 'Fragment',
|
9
|
+
jsxImportSource: 'frontend-hamroun',
|
10
|
+
},
|
11
|
+
ssr: {
|
12
|
+
noExternal: ['frontend-hamroun']
|
13
|
+
},
|
14
|
+
optimizeDeps: {
|
15
|
+
include: ['frontend-hamroun'],
|
16
|
+
exclude: []
|
9
17
|
},
|
10
18
|
build: {
|
11
|
-
|
12
|
-
ssr: 'src/server.ts',
|
19
|
+
target: 'esnext',
|
13
20
|
rollupOptions: {
|
14
|
-
input: {
|
15
|
-
client: './src/client.tsx',
|
16
|
-
server: './src/server.ts'
|
17
|
-
},
|
18
21
|
output: {
|
19
|
-
|
20
|
-
chunkFileNames: 'assets/[name]-[hash].js',
|
21
|
-
assetFileNames: 'assets/[name]-[hash].[ext]'
|
22
|
+
format: 'es'
|
22
23
|
}
|
23
24
|
}
|
24
25
|
},
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
26
|
+
resolve: {
|
27
|
+
alias: {
|
28
|
+
'frontend-hamroun/jsx-dev-runtime': 'frontend-hamroun',
|
29
|
+
'frontend-hamroun/jsx-runtime': 'frontend-hamroun'
|
30
|
+
}
|
29
31
|
}
|
30
32
|
});
|
@@ -0,0 +1,295 @@
|
|
1
|
+
(function(){const i=document.createElement("link").relList;if(i&&i.supports&&i.supports("modulepreload"))return;for(const n of document.querySelectorAll('link[rel="modulepreload"]'))s(n);new MutationObserver(n=>{for(const l of n)if(l.type==="childList")for(const o of l.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&s(o)}).observe(document,{childList:!0,subtree:!0});function a(n){const l={};return n.integrity&&(l.integrity=n.integrity),n.referrerPolicy&&(l.referrerPolicy=n.referrerPolicy),n.crossOrigin==="use-credentials"?l.credentials="include":n.crossOrigin==="anonymous"?l.credentials="omit":l.credentials="same-origin",l}function s(n){if(n.ep)return;n.ep=!0;const l=a(n);fetch(n.href,l)}})();let y=!1;const w=[];function R(t){if(y){w.push(t);return}y=!0;try{for(t();w.length>0;){const i=w.shift();i?.()}}finally{y=!1}}let m=0;const z=new Map,T=typeof window>"u",H=new Map;function L(){return m++,z.set(m,0),m}function _(){T&&H.delete(m),m=0}function q(t,i){console.log("JSX Transform:",{type:t,props:i});const a={...i};return arguments.length>2&&(a.children=Array.prototype.slice.call(arguments,2)),{type:t,props:a}}async function h(t){var i;if(console.log("Creating element from:",t),t==null||typeof t=="boolean")return document.createTextNode("");if(typeof t=="number"||typeof t=="string")return document.createTextNode(String(t));if(Array.isArray(t)){const a=document.createDocumentFragment();for(const s of t){const n=await h(s);a.appendChild(n)}return a}if("type"in t&&t.props!==void 0){const{type:a,props:s}=t;if(typeof a=="function")try{const o=await a(s||{}),u=await h(o);return u instanceof Element&&u.setAttribute("data-component-id",a.name||a.toString()),u}catch(o){return console.error("Error rendering component:",o),document.createTextNode("")}const n=document.createElement(a);for(const[o,u]of Object.entries(s||{}))if(o!=="children")if(o.startsWith("on")&&typeof u=="function"){const c=o.toLowerCase().slice(2),f=(i=n.__events)==null?void 0:i[c];f&&n.removeEventListener(c,f),n.addEventListener(c,u),n.__events||(n.__events={}),n.__events[c]=u}else o==="style"&&typeof u=="object"?Object.assign(n.style,u):o==="className"?n.setAttribute("class",String(u)):o!=="key"&&o!=="ref"&&n.setAttribute(o,String(u));const l=s?.children;if(l!=null){const o=Array.isArray(l)?l.flat():[l];for(const u of o){const c=await h(u);n.appendChild(c)}}return n}return document.createTextNode(String(t))}let O=!1;async function N(t,i){console.log("Rendering to:",i.id),R(async()=>{const a=L();try{const s=await h(t);O||(i.innerHTML=""),i.appendChild(s)}finally{_()}})}function d(t){throw new Error("useState must be called within a render")}function G(t,i){throw new Error("useEffect must be called within a render")}function e(t,i){console.log("JSX Transform:",{type:t,props:i});const a={...i};return arguments.length>2&&(a.children=Array.prototype.slice.call(arguments,2)),{type:t,props:a}}function j(t,...i){if(typeof window>"u")throw new Error("callWasmFunction() is for browser use only.");const a=window[t];if(typeof a!="function")throw new Error(`Function ${t} not found. Make sure the WASM module is loaded.`);return a(...i)}console.log("Baraqex - Browser version loaded");function J(){const[t,i]=d(),[a,s]=d(),[n,l]=d(),[o,u]=d(),[c,f]=d(),[g,A]=d(),[x,S]=d(),[b,C]=d();G();const p=(r,...I)=>{try{return j(r,...I)}catch(v){const B=v instanceof Error?v.message:"Function call failed";return s(B),null}},F=()=>{const r=p("goHello",b);r!==null&&(l({type:"hello",value:r,input:b}),s(null))},M=()=>{const r=p("goAdd",o,c);r!==null&&(l({type:"addition",value:r,inputs:[o,c]}),s(null))},E=()=>{const r=p("goMultiply",o,c);r!==null&&(l({type:"multiplication",value:r,inputs:[o,c]}),s(null))},P=()=>{if(g>40){s("Fibonacci input too large (max 40)");return}const r=p("goFibonacci",g);r!==null&&(l({type:"fibonacci",value:r,input:g}),s(null))},W=()=>{const r=p("goIsPrime",x);r!==null&&(l({type:"prime",value:r,input:x}),s(null))};return!t&&!a?e("div",{className:"app loading"},e("div",{className:"spinner"}),e("h2",null,"Loading Go WASM Module..."),e("p",null,"Initializing WebAssembly runtime...")):a?e("div",{className:"app error"},e("h2",null,"WASM Error"),e("p",null,a),e("button",{onClick:()=>window.location.reload()},"Reload Page"),e("details",{style:{marginTop:"20px",textAlign:"left"}},e("summary",null,"Troubleshooting"),e("ul",null,e("li",null,"Make sure the WASM file is built: ",e("code",null,"npm run build:wasm")),e("li",null,"Check if ",e("code",null,"example.wasm")," exists in the public folder"),e("li",null,"Verify ",e("code",null,"wasm_exec.js")," is loaded in the HTML"),e("li",null,"Check browser console for additional errors")))):e("div",{className:"app"},e("header",null,e("h1",null,"Frontend Hamroun + Go WASM (Baraqex)"),e("p",null,"High-performance computing with WebAssembly via Baraqex API"),e("div",{className:"status"},e("span",{className:"status-indicator ready"}),"WASM Ready via Baraqex")),e("main",null,e("section",{className:"demo-grid"},e("div",{className:"demo-card"},e("h3",null,"🌍 Hello Function"),e("div",{className:"input-group"},e("input",{type:"text",value:b,onChange:r=>C(r.target.value),placeholder:"Enter your name"}),e("button",{onClick:F},"Say Hello")),e("small",null,"callWasmFunction('goHello', '",b,"')")),e("div",{className:"demo-card"},e("h3",null,"🧮 Math Operations"),e("div",{className:"input-group"},e("input",{type:"number",value:o,onChange:r=>u(Number(r.target.value)),placeholder:"First number"}),e("input",{type:"number",value:c,onChange:r=>f(Number(r.target.value)),placeholder:"Second number"})),e("div",{className:"button-group"},e("button",{onClick:M},"Add"),e("button",{onClick:E},"Multiply")),e("small",null,"callWasmFunction('goAdd', ",o,", ",c,")")),e("div",{className:"demo-card"},e("h3",null,"🔢 Fibonacci Sequence"),e("div",{className:"input-group"},e("input",{type:"number",value:g,onChange:r=>A(Number(r.target.value)),placeholder:"Fibonacci number",min:"0",max:"40"}),e("button",{onClick:P},"Calculate")),e("small",null,"Maximum value: 40")),e("div",{className:"demo-card"},e("h3",null,"🔍 Prime Number Check"),e("div",{className:"input-group"},e("input",{type:"number",value:x,onChange:r=>S(Number(r.target.value)),placeholder:"Number to check",min:"1"}),e("button",{onClick:W},"Check Prime")))),n&&e("section",{className:"results"},e("h2",null,"📊 Baraqex WASM Result"),e("div",{className:"result-card"},n.type==="hello"&&e("p",null,e("strong",null,"Greeting:")," ",e("span",{className:"result-value"},n.value)),n.type==="addition"&&e("p",null,e("strong",null,"Addition:")," ",n.inputs[0]," + ",n.inputs[1]," = ",e("span",{className:"result-value"},n.value)),n.type==="multiplication"&&e("p",null,e("strong",null,"Multiplication:")," ",n.inputs[0]," × ",n.inputs[1]," = ",e("span",{className:"result-value"},n.value)),n.type==="fibonacci"&&e("p",null,e("strong",null,"Fibonacci:")," F(",n.input,") = ",e("span",{className:"result-value"},n.value)),n.type==="prime"&&e("p",null,e("strong",null,"Prime Check:")," ",n.input," is ",e("span",{className:"result-value"},n.value?"prime":"not prime")))),e("section",{className:"info-section"},e("h2",null,"⚡ Baraqex WASM Benefits"),e("div",{className:"benefits-grid"},e("div",{className:"benefit"},e("h4",null,"🚀 Simple API"),e("p",null,"Easy-to-use loadGoWasm() and callWasmFunction() API")),e("div",{className:"benefit"},e("h4",null,"🔄 Cross-Platform"),e("p",null,"Works in browser and Node.js with same API")),e("div",{className:"benefit"},e("h4",null,"🛠️ Go Integration"),e("p",null,"Seamless Go + JavaScript interoperability")),e("div",{className:"benefit"},e("h4",null,"📊 Debug Support"),e("p",null,"Built-in debugging and function discovery"))))),e("style",null,`
|
2
|
+
.app {
|
3
|
+
max-width: 1200px;
|
4
|
+
margin: 0 auto;
|
5
|
+
padding: 20px;
|
6
|
+
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
|
7
|
+
line-height: 1.6;
|
8
|
+
}
|
9
|
+
|
10
|
+
.app.loading, .app.error {
|
11
|
+
text-align: center;
|
12
|
+
padding: 60px 20px;
|
13
|
+
}
|
14
|
+
|
15
|
+
.spinner {
|
16
|
+
width: 50px;
|
17
|
+
height: 50px;
|
18
|
+
border: 4px solid #f3f3f3;
|
19
|
+
border-top: 4px solid #007acc;
|
20
|
+
border-radius: 50%;
|
21
|
+
animation: spin 1s linear infinite;
|
22
|
+
margin: 0 auto 20px;
|
23
|
+
}
|
24
|
+
|
25
|
+
@keyframes spin {
|
26
|
+
0% { transform: rotate(0deg); }
|
27
|
+
100% { transform: rotate(360deg); }
|
28
|
+
}
|
29
|
+
|
30
|
+
header {
|
31
|
+
text-align: center;
|
32
|
+
margin-bottom: 40px;
|
33
|
+
padding: 30px;
|
34
|
+
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
|
35
|
+
color: white;
|
36
|
+
border-radius: 16px;
|
37
|
+
position: relative;
|
38
|
+
}
|
39
|
+
|
40
|
+
header h1 {
|
41
|
+
margin: 0 0 10px 0;
|
42
|
+
font-size: 2.5rem;
|
43
|
+
font-weight: 700;
|
44
|
+
}
|
45
|
+
|
46
|
+
header p {
|
47
|
+
margin: 0 0 20px 0;
|
48
|
+
opacity: 0.9;
|
49
|
+
font-size: 1.1rem;
|
50
|
+
}
|
51
|
+
|
52
|
+
.status {
|
53
|
+
display: inline-flex;
|
54
|
+
align-items: center;
|
55
|
+
gap: 8px;
|
56
|
+
background: rgba(255, 255, 255, 0.2);
|
57
|
+
padding: 8px 16px;
|
58
|
+
border-radius: 20px;
|
59
|
+
font-size: 0.9rem;
|
60
|
+
}
|
61
|
+
|
62
|
+
.status-indicator {
|
63
|
+
width: 8px;
|
64
|
+
height: 8px;
|
65
|
+
border-radius: 50%;
|
66
|
+
background: #4ade80;
|
67
|
+
animation: pulse 2s infinite;
|
68
|
+
}
|
69
|
+
|
70
|
+
@keyframes pulse {
|
71
|
+
0%, 100% { opacity: 1; }
|
72
|
+
50% { opacity: 0.5; }
|
73
|
+
}
|
74
|
+
|
75
|
+
.demo-grid {
|
76
|
+
display: grid;
|
77
|
+
grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
|
78
|
+
gap: 20px;
|
79
|
+
margin-bottom: 30px;
|
80
|
+
}
|
81
|
+
|
82
|
+
.demo-card {
|
83
|
+
background: white;
|
84
|
+
padding: 24px;
|
85
|
+
border-radius: 12px;
|
86
|
+
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
|
87
|
+
border: 1px solid #e5e7eb;
|
88
|
+
transition: transform 0.2s, box-shadow 0.2s;
|
89
|
+
}
|
90
|
+
|
91
|
+
.demo-card:hover {
|
92
|
+
transform: translateY(-2px);
|
93
|
+
box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
|
94
|
+
}
|
95
|
+
|
96
|
+
.demo-card h3 {
|
97
|
+
margin-top: 0;
|
98
|
+
margin-bottom: 16px;
|
99
|
+
color: #374151;
|
100
|
+
font-size: 1.2rem;
|
101
|
+
}
|
102
|
+
|
103
|
+
.input-group {
|
104
|
+
display: flex;
|
105
|
+
gap: 8px;
|
106
|
+
margin-bottom: 12px;
|
107
|
+
flex-wrap: wrap;
|
108
|
+
}
|
109
|
+
|
110
|
+
.button-group {
|
111
|
+
display: flex;
|
112
|
+
gap: 8px;
|
113
|
+
flex-wrap: wrap;
|
114
|
+
}
|
115
|
+
|
116
|
+
input {
|
117
|
+
flex: 1;
|
118
|
+
min-width: 120px;
|
119
|
+
padding: 10px 12px;
|
120
|
+
border: 2px solid #e5e7eb;
|
121
|
+
border-radius: 8px;
|
122
|
+
font-size: 14px;
|
123
|
+
transition: border-color 0.2s;
|
124
|
+
}
|
125
|
+
|
126
|
+
input:focus {
|
127
|
+
outline: none;
|
128
|
+
border-color: #007acc;
|
129
|
+
}
|
130
|
+
|
131
|
+
button {
|
132
|
+
background: #007acc;
|
133
|
+
color: white;
|
134
|
+
border: none;
|
135
|
+
padding: 10px 16px;
|
136
|
+
border-radius: 8px;
|
137
|
+
cursor: pointer;
|
138
|
+
font-size: 14px;
|
139
|
+
font-weight: 600;
|
140
|
+
transition: all 0.2s;
|
141
|
+
white-space: nowrap;
|
142
|
+
}
|
143
|
+
|
144
|
+
button:hover {
|
145
|
+
background: #0056a3;
|
146
|
+
transform: translateY(-1px);
|
147
|
+
}
|
148
|
+
|
149
|
+
button:active {
|
150
|
+
transform: translateY(0);
|
151
|
+
}
|
152
|
+
|
153
|
+
small {
|
154
|
+
color: #6b7280;
|
155
|
+
font-size: 0.8rem;
|
156
|
+
}
|
157
|
+
|
158
|
+
.results {
|
159
|
+
background: #f0f9ff;
|
160
|
+
padding: 24px;
|
161
|
+
border-radius: 12px;
|
162
|
+
border: 2px solid #bae6fd;
|
163
|
+
margin: 30px 0;
|
164
|
+
}
|
165
|
+
|
166
|
+
.results h2 {
|
167
|
+
margin-top: 0;
|
168
|
+
color: #0369a1;
|
169
|
+
}
|
170
|
+
|
171
|
+
.result-card {
|
172
|
+
background: white;
|
173
|
+
padding: 16px;
|
174
|
+
border-radius: 8px;
|
175
|
+
border: 1px solid #bae6fd;
|
176
|
+
}
|
177
|
+
|
178
|
+
.result-value {
|
179
|
+
font-weight: bold;
|
180
|
+
color: #007acc;
|
181
|
+
background: #e0f2fe;
|
182
|
+
padding: 2px 6px;
|
183
|
+
border-radius: 4px;
|
184
|
+
}
|
185
|
+
|
186
|
+
.info-section {
|
187
|
+
margin-top: 40px;
|
188
|
+
}
|
189
|
+
|
190
|
+
.info-section h2 {
|
191
|
+
text-align: center;
|
192
|
+
margin-bottom: 30px;
|
193
|
+
color: #374151;
|
194
|
+
}
|
195
|
+
|
196
|
+
.benefits-grid {
|
197
|
+
display: grid;
|
198
|
+
grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
|
199
|
+
gap: 20px;
|
200
|
+
}
|
201
|
+
|
202
|
+
.benefit {
|
203
|
+
background: #f9fafb;
|
204
|
+
padding: 20px;
|
205
|
+
border-radius: 12px;
|
206
|
+
border: 1px solid #e5e7eb;
|
207
|
+
text-align: center;
|
208
|
+
}
|
209
|
+
|
210
|
+
.benefit h4 {
|
211
|
+
margin: 0 0 8px 0;
|
212
|
+
color: #374151;
|
213
|
+
font-size: 1.1rem;
|
214
|
+
}
|
215
|
+
|
216
|
+
.benefit p {
|
217
|
+
margin: 0;
|
218
|
+
color: #6b7280;
|
219
|
+
font-size: 0.9rem;
|
220
|
+
}
|
221
|
+
|
222
|
+
.error {
|
223
|
+
color: #dc2626;
|
224
|
+
}
|
225
|
+
|
226
|
+
.error button {
|
227
|
+
background: #dc2626;
|
228
|
+
margin-top: 20px;
|
229
|
+
}
|
230
|
+
|
231
|
+
.error button:hover {
|
232
|
+
background: #b91c1c;
|
233
|
+
}
|
234
|
+
|
235
|
+
details {
|
236
|
+
background: #fef2f2;
|
237
|
+
padding: 16px;
|
238
|
+
border-radius: 8px;
|
239
|
+
border: 1px solid #fecaca;
|
240
|
+
}
|
241
|
+
|
242
|
+
summary {
|
243
|
+
cursor: pointer;
|
244
|
+
font-weight: 600;
|
245
|
+
margin-bottom: 8px;
|
246
|
+
}
|
247
|
+
|
248
|
+
code {
|
249
|
+
background: #f3f4f6;
|
250
|
+
padding: 2px 4px;
|
251
|
+
border-radius: 4px;
|
252
|
+
font-family: monospace;
|
253
|
+
font-size: 0.9em;
|
254
|
+
}
|
255
|
+
|
256
|
+
@media (max-width: 768px) {
|
257
|
+
.app {
|
258
|
+
padding: 10px;
|
259
|
+
}
|
260
|
+
|
261
|
+
header {
|
262
|
+
padding: 20px;
|
263
|
+
}
|
264
|
+
|
265
|
+
header h1 {
|
266
|
+
font-size: 2rem;
|
267
|
+
}
|
268
|
+
|
269
|
+
.demo-grid {
|
270
|
+
grid-template-columns: 1fr;
|
271
|
+
}
|
272
|
+
|
273
|
+
.input-group {
|
274
|
+
flex-direction: column;
|
275
|
+
}
|
276
|
+
|
277
|
+
input {
|
278
|
+
min-width: auto;
|
279
|
+
}
|
280
|
+
}
|
281
|
+
`))}function k(){return new Promise(t=>{window.Go?t():setTimeout(()=>k().then(t),50)})}async function Y(){try{await k();const t=q(J,{});N(t,document.getElementById("app"))}catch(t){console.error("Failed to start app:",t),document.getElementById("app").innerHTML=`
|
282
|
+
<div class="loading-fallback">
|
283
|
+
<h2 style="color: #dc2626;">Application Error</h2>
|
284
|
+
<p>Failed to initialize the application. Check the console for more details.</p>
|
285
|
+
<button onclick="window.location.reload()" style="
|
286
|
+
background: #007acc;
|
287
|
+
color: white;
|
288
|
+
border: none;
|
289
|
+
padding: 10px 20px;
|
290
|
+
border-radius: 5px;
|
291
|
+
cursor: pointer;
|
292
|
+
margin-top: 10px;
|
293
|
+
">Reload Page</button>
|
294
|
+
</div>
|
295
|
+
`}}Y();
|
Binary file
|
@@ -0,0 +1,53 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html lang="en">
|
3
|
+
<head>
|
4
|
+
<meta charset="UTF-8">
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
6
|
+
<title>Frontend Hamroun + Go WASM</title>
|
7
|
+
<style>
|
8
|
+
body {
|
9
|
+
margin: 0;
|
10
|
+
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
|
11
|
+
}
|
12
|
+
|
13
|
+
.loading-fallback {
|
14
|
+
display: flex;
|
15
|
+
justify-content: center;
|
16
|
+
align-items: center;
|
17
|
+
min-height: 100vh;
|
18
|
+
flex-direction: column;
|
19
|
+
background: #f7f7f7;
|
20
|
+
}
|
21
|
+
|
22
|
+
.loading-spinner {
|
23
|
+
width: 40px;
|
24
|
+
height: 40px;
|
25
|
+
border: 4px solid #f3f3f3;
|
26
|
+
border-top: 4px solid #007acc;
|
27
|
+
border-radius: 50%;
|
28
|
+
animation: spin 1s linear infinite;
|
29
|
+
margin-bottom: 20px;
|
30
|
+
}
|
31
|
+
|
32
|
+
@keyframes spin {
|
33
|
+
0% { transform: rotate(0deg); }
|
34
|
+
100% { transform: rotate(360deg); }
|
35
|
+
}
|
36
|
+
</style>
|
37
|
+
<script type="module" crossorigin src="/assets/index-BNqTDBdE.js"></script>
|
38
|
+
</head>
|
39
|
+
<body>
|
40
|
+
<div id="app">
|
41
|
+
<div class="loading-fallback">
|
42
|
+
<div class="loading-spinner"></div>
|
43
|
+
<h2>Loading Frontend Hamroun + WASM...</h2>
|
44
|
+
<p>Initializing application and WebAssembly runtime...</p>
|
45
|
+
</div>
|
46
|
+
</div>
|
47
|
+
|
48
|
+
<!-- Go WASM Runtime -->
|
49
|
+
<script src="/wasm_exec.js"></script>
|
50
|
+
|
51
|
+
<!-- Application -->
|
52
|
+
</body>
|
53
|
+
</html>
|