frontend-hamroun 1.2.79 → 1.2.80
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/LICENSE +21 -0
- package/README.md +129 -1513
- package/bin/cli.js +505 -144
- package/dist/index.cjs +2 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.client.cjs +2 -0
- package/dist/index.client.cjs.map +1 -0
- package/dist/index.client.js +26 -0
- package/dist/index.client.js.map +1 -0
- package/dist/index.js +298 -1
- package/dist/index.js.map +1 -0
- package/dist/jsx-runtime.cjs +2 -0
- package/dist/jsx-runtime.cjs.map +1 -0
- package/dist/jsx-runtime.js +93 -1
- package/dist/jsx-runtime.js.map +1 -0
- package/dist/renderer-Bo9zkUZ_.js +52 -0
- package/dist/renderer-Bo9zkUZ_.js.map +1 -0
- package/dist/renderer-Din1y3YM.cjs +2 -0
- package/dist/renderer-Din1y3YM.cjs.map +1 -0
- package/dist/server-renderer-CqIpQ-od.cjs +2 -0
- package/dist/server-renderer-CqIpQ-od.cjs.map +1 -0
- package/dist/server-renderer-QHt45Ip2.js +255 -0
- package/dist/server-renderer-QHt45Ip2.js.map +1 -0
- package/dist/server-renderer.cjs +2 -0
- package/dist/server-renderer.cjs.map +1 -0
- package/dist/server-renderer.js +5 -1
- package/dist/server-renderer.js.map +1 -0
- package/package.json +77 -120
- package/templates/basic-app/build.js +22 -0
- package/templates/basic-app/bun.lock +196 -0
- package/templates/basic-app/dev.js +27 -0
- package/templates/basic-app/docs/rapport_pfe.aux +27 -27
- package/templates/basic-app/docs/rapport_pfe.out +10 -10
- package/templates/basic-app/docs/rapport_pfe.toc +14 -14
- package/templates/basic-app/esbuild.config.js +28 -0
- package/templates/basic-app/index.html +1 -1
- package/templates/{fullstack-app → basic-app}/package-lock.json +4185 -5094
- package/templates/basic-app/package.json +29 -28
- package/templates/basic-app/server.js +24 -0
- package/templates/basic-app/src/App.tsx +26 -0
- package/templates/basic-app/src/client.tsx +11 -0
- package/templates/basic-app/src/components/Counter.tsx +18 -0
- package/templates/basic-app/src/jsx-shim.ts +4 -0
- package/templates/basic-app/src/main.tsx +0 -1
- package/templates/basic-app/src/server.ts +52 -0
- package/templates/basic-app/tsconfig.server.json +11 -0
- package/templates/fullstack-app/build/main.css +874 -874
- package/templates/fullstack-app/build/main.css.map +7 -7
- package/templates/fullstack-app/build/main.js +967 -967
- package/templates/fullstack-app/build/main.js.map +7 -7
- package/templates/fullstack-app/public/styles.css +768 -768
- package/templates/go/example.go +99 -154
- package/templates/go-wasm-app/babel.config.js +2 -8
- package/templates/go-wasm-app/package.json +12 -21
- package/templates/go-wasm-app/public/wasm/wasm_exec.js +561 -561
- package/templates/go-wasm-app/public/wasm/wasm_exec_node.js +39 -39
- package/templates/go-wasm-app/server.js +510 -59
- package/templates/go-wasm-app/src/app.js +2 -22
- package/templates/go-wasm-app/src/wasm/example.go +75 -75
- package/templates/go-wasm-app/vite.config.js +5 -16
- package/templates/ssr-template/server.js +2 -2
- package/templates/ssr-template/vite.config.js +5 -16
- package/dist/Counter.d.ts +0 -0
- package/dist/batch/package.json +0 -16
- package/dist/client-router/package.json +0 -16
- package/dist/component/package.json +0 -16
- package/dist/context/package.json +0 -16
- package/dist/event-bus/package.json +0 -16
- package/dist/forms/package.json +0 -16
- package/dist/hooks/package.json +0 -16
- package/dist/hooks-0728361a.cjs +0 -1
- package/dist/hooks-b58f947c.js +0 -133
- package/dist/hooks.js +0 -1
- package/dist/hooks.mjs +0 -13
- package/dist/index.mjs +0 -137
- package/dist/jsx-runtime/package.json +0 -16
- package/dist/jsx-runtime.mjs +0 -64
- package/dist/lifecycle-events/package.json +0 -16
- package/dist/package.json +0 -71
- package/dist/render-component/package.json +0 -16
- package/dist/renderer/package.json +0 -16
- package/dist/renderer.js +0 -1
- package/dist/renderer.mjs +0 -27
- package/dist/router/package.json +0 -16
- package/dist/server/package.json +0 -17
- package/dist/server/src/batch.d.ts +0 -3
- package/dist/server/src/batch.js +0 -23
- package/dist/server/src/batch.js.map +0 -1
- package/dist/server/src/client-router.d.ts +0 -60
- package/dist/server/src/client-router.js +0 -210
- package/dist/server/src/client-router.js.map +0 -1
- package/dist/server/src/component.d.ts +0 -14
- package/dist/server/src/component.js +0 -106
- package/dist/server/src/component.js.map +0 -1
- package/dist/server/src/context.d.ts +0 -13
- package/dist/server/src/context.js +0 -21
- package/dist/server/src/context.js.map +0 -1
- package/dist/server/src/event-bus.d.ts +0 -23
- package/dist/server/src/event-bus.js +0 -75
- package/dist/server/src/event-bus.js.map +0 -1
- package/dist/server/src/forms.d.ts +0 -40
- package/dist/server/src/forms.js +0 -148
- package/dist/server/src/forms.js.map +0 -1
- package/dist/server/src/hooks.d.ts +0 -12
- package/dist/server/src/hooks.js +0 -170
- package/dist/server/src/hooks.js.map +0 -1
- package/dist/server/src/index.client.d.ts +0 -12
- package/dist/server/src/index.client.js +0 -14
- package/dist/server/src/index.client.js.map +0 -1
- package/dist/server/src/index.d.ts +0 -88
- package/dist/server/src/index.js +0 -79
- package/dist/server/src/index.js.map +0 -1
- package/dist/server/src/jsx-runtime/jsx-dev-runtime.d.ts +0 -1
- package/dist/server/src/jsx-runtime/jsx-dev-runtime.js +0 -2
- package/dist/server/src/jsx-runtime/jsx-dev-runtime.js.map +0 -1
- package/dist/server/src/jsx-runtime/jsx-runtime.d.ts +0 -4
- package/dist/server/src/jsx-runtime/jsx-runtime.js +0 -41
- package/dist/server/src/jsx-runtime/jsx-runtime.js.map +0 -1
- package/dist/server/src/jsx-runtime.d.ts +0 -20
- package/dist/server/src/jsx-runtime.js +0 -105
- package/dist/server/src/jsx-runtime.js.map +0 -1
- package/dist/server/src/lifecycle-events.d.ts +0 -108
- package/dist/server/src/lifecycle-events.js +0 -177
- package/dist/server/src/lifecycle-events.js.map +0 -1
- package/dist/server/src/renderComponent.d.ts +0 -13
- package/dist/server/src/renderComponent.js +0 -30
- package/dist/server/src/renderComponent.js.map +0 -1
- package/dist/server/src/renderer.d.ts +0 -2
- package/dist/server/src/renderer.js +0 -31
- package/dist/server/src/renderer.js.map +0 -1
- package/dist/server/src/router.d.ts +0 -55
- package/dist/server/src/router.js +0 -166
- package/dist/server/src/router.js.map +0 -1
- package/dist/server/src/server/api-router.d.ts +0 -15
- package/dist/server/src/server/api-router.js +0 -111
- package/dist/server/src/server/api-router.js.map +0 -1
- package/dist/server/src/server/auth.d.ts +0 -32
- package/dist/server/src/server/auth.js +0 -80
- package/dist/server/src/server/auth.js.map +0 -1
- package/dist/server/src/server/database.d.ts +0 -24
- package/dist/server/src/server/database.js +0 -135
- package/dist/server/src/server/database.js.map +0 -1
- package/dist/server/src/server/index.d.ts +0 -116
- package/dist/server/src/server/index.js +0 -508
- package/dist/server/src/server/index.js.map +0 -1
- package/dist/server/src/server/middleware.d.ts +0 -11
- package/dist/server/src/server/middleware.js +0 -46
- package/dist/server/src/server/middleware.js.map +0 -1
- package/dist/server/src/server/server.d.ts +0 -9
- package/dist/server/src/server/server.js +0 -87
- package/dist/server/src/server/server.js.map +0 -1
- package/dist/server/src/server/templates.d.ts +0 -30
- package/dist/server/src/server/templates.js +0 -208
- package/dist/server/src/server/templates.js.map +0 -1
- package/dist/server/src/server/types.d.ts +0 -38
- package/dist/server/src/server/types.js +0 -4
- package/dist/server/src/server/types.js.map +0 -1
- package/dist/server/src/server/utils.d.ts +0 -70
- package/dist/server/src/server/utils.js +0 -156
- package/dist/server/src/server/utils.js.map +0 -1
- package/dist/server/src/server/wasm.d.ts +0 -9
- package/dist/server/src/server/wasm.js +0 -117
- package/dist/server/src/server/wasm.js.map +0 -1
- package/dist/server/src/server-renderer.d.ts +0 -5
- package/dist/server/src/server-renderer.js +0 -106
- package/dist/server/src/server-renderer.js.map +0 -1
- package/dist/server/src/server-types.d.ts +0 -42
- package/dist/server/src/server-types.js +0 -6
- package/dist/server/src/server-types.js.map +0 -1
- package/dist/server/src/store.d.ts +0 -41
- package/dist/server/src/store.js +0 -99
- package/dist/server/src/store.js.map +0 -1
- package/dist/server/src/types.d.ts +0 -19
- package/dist/server/src/types.js +0 -2
- package/dist/server/src/types.js.map +0 -1
- package/dist/server/src/utils.d.ts +0 -46
- package/dist/server/src/utils.js +0 -144
- package/dist/server/src/utils.js.map +0 -1
- package/dist/server/src/vdom.d.ts +0 -8
- package/dist/server/src/vdom.js +0 -22
- package/dist/server/src/vdom.js.map +0 -1
- package/dist/server/src/wasm.d.ts +0 -36
- package/dist/server/src/wasm.js +0 -159
- package/dist/server/src/wasm.js.map +0 -1
- package/dist/server/tsconfig.server.tsbuildinfo +0 -1
- package/dist/server-renderer/package.json +0 -16
- package/dist/server-renderer.mjs +0 -64
- package/dist/store/package.json +0 -16
- package/dist/types/package.json +0 -16
- package/dist/utils/package.json +0 -16
- package/dist/vdom/package.json +0 -16
- package/dist/wasm/package.json +0 -16
- package/dist/wasm.js +0 -1
- package/dist/wasm.mjs +0 -103
- package/templates/basic-app/docs/rapport_pfe.log +0 -399
- package/templates/complete-app/client.js +0 -58
- package/templates/complete-app/package-lock.json +0 -2536
- package/templates/complete-app/package.json +0 -17
- package/templates/complete-app/pages/about.js +0 -119
- package/templates/complete-app/pages/index.js +0 -157
- package/templates/complete-app/pages/wasm-demo.js +0 -290
- package/templates/complete-app/public/client.js +0 -80
- package/templates/complete-app/public/index.html +0 -47
- package/templates/complete-app/public/styles.css +0 -579
- package/templates/complete-app/readme.md +0 -188
- package/templates/complete-app/server.js +0 -417
- package/templates/complete-app/server.ts +0 -275
- package/templates/complete-app/src/App.tsx +0 -59
- package/templates/complete-app/src/client.ts +0 -61
- package/templates/complete-app/src/client.tsx +0 -18
- package/templates/complete-app/src/pages/index.tsx +0 -51
- package/templates/complete-app/src/server.ts +0 -218
- package/templates/complete-app/tsconfig.json +0 -22
- package/templates/complete-app/tsconfig.server.json +0 -19
- package/templates/complete-app/vite.config.js +0 -57
- package/templates/complete-app/vite.config.ts +0 -30
- package/templates/go-wasm-app/build.config.js +0 -62
- package/templates/go-wasm-app/build.js +0 -218
- package/templates/go-wasm-app/package-lock.json +0 -3732
@@ -1,75 +1,75 @@
|
|
1
|
-
//go:build js && wasm
|
2
|
-
// +build js,wasm
|
3
|
-
|
4
|
-
package main
|
5
|
-
|
6
|
-
import (
|
7
|
-
"encoding/json"
|
8
|
-
"fmt"
|
9
|
-
"syscall/js"
|
10
|
-
)
|
11
|
-
|
12
|
-
// Example Go function to be called from JavaScript
|
13
|
-
func add(this js.Value, args []js.Value) interface{} {
|
14
|
-
if len(args) != 2 {
|
15
|
-
return js.ValueOf("Error: Expected two arguments")
|
16
|
-
}
|
17
|
-
|
18
|
-
a := args[0].Int()
|
19
|
-
b := args[1].Int()
|
20
|
-
return js.ValueOf(a + b)
|
21
|
-
}
|
22
|
-
|
23
|
-
// Process complex data in Go
|
24
|
-
func processData(this js.Value, args []js.Value) interface{} {
|
25
|
-
if len(args) == 0 {
|
26
|
-
return js.ValueOf("Error: Expected at least one argument")
|
27
|
-
}
|
28
|
-
|
29
|
-
// Get input data
|
30
|
-
data := args[0]
|
31
|
-
if data.Type() != js.TypeObject {
|
32
|
-
return js.ValueOf("Error: Expected JSON object")
|
33
|
-
}
|
34
|
-
|
35
|
-
// Convert JS object to Go map
|
36
|
-
jsonStr := js.Global().Get("JSON").Call("stringify", data).String()
|
37
|
-
var inputMap map[string]interface{}
|
38
|
-
if err := json.Unmarshal([]byte(jsonStr), &inputMap); err != nil {
|
39
|
-
return js.ValueOf(fmt.Sprintf("Error parsing JSON: %s", err.Error()))
|
40
|
-
}
|
41
|
-
|
42
|
-
// Add new fields
|
43
|
-
inputMap["processed"] = true
|
44
|
-
inputMap["processor"] = "Go WASM"
|
45
|
-
|
46
|
-
// Add some computed fields
|
47
|
-
if values, ok := inputMap["values"].([]interface{}); ok {
|
48
|
-
sum := 0.0
|
49
|
-
for _, v := range values {
|
50
|
-
if num, ok := v.(float64); ok {
|
51
|
-
sum += num
|
52
|
-
}
|
53
|
-
}
|
54
|
-
inputMap["sum"] = sum
|
55
|
-
}
|
56
|
-
|
57
|
-
// Convert back to JS
|
58
|
-
resultJSON, err := json.Marshal(inputMap)
|
59
|
-
if err != nil {
|
60
|
-
return js.ValueOf(fmt.Sprintf("Error generating JSON: %s", err.Error()))
|
61
|
-
}
|
62
|
-
|
63
|
-
return js.ValueOf(string(resultJSON))
|
64
|
-
}
|
65
|
-
|
66
|
-
func main() {
|
67
|
-
fmt.Println("Go WASM Module initialized")
|
68
|
-
|
69
|
-
// Register functions to be callable from JavaScript
|
70
|
-
js.Global().Set("goAdd", js.FuncOf(add))
|
71
|
-
js.Global().Set("goProcessData", js.FuncOf(processData))
|
72
|
-
|
73
|
-
// Keep the program running
|
74
|
-
<-make(chan bool)
|
75
|
-
}
|
1
|
+
//go:build js && wasm
|
2
|
+
// +build js,wasm
|
3
|
+
|
4
|
+
package main
|
5
|
+
|
6
|
+
import (
|
7
|
+
"encoding/json"
|
8
|
+
"fmt"
|
9
|
+
"syscall/js"
|
10
|
+
)
|
11
|
+
|
12
|
+
// Example Go function to be called from JavaScript
|
13
|
+
func add(this js.Value, args []js.Value) interface{} {
|
14
|
+
if len(args) != 2 {
|
15
|
+
return js.ValueOf("Error: Expected two arguments")
|
16
|
+
}
|
17
|
+
|
18
|
+
a := args[0].Int()
|
19
|
+
b := args[1].Int()
|
20
|
+
return js.ValueOf(a + b)
|
21
|
+
}
|
22
|
+
|
23
|
+
// Process complex data in Go
|
24
|
+
func processData(this js.Value, args []js.Value) interface{} {
|
25
|
+
if len(args) == 0 {
|
26
|
+
return js.ValueOf("Error: Expected at least one argument")
|
27
|
+
}
|
28
|
+
|
29
|
+
// Get input data
|
30
|
+
data := args[0]
|
31
|
+
if data.Type() != js.TypeObject {
|
32
|
+
return js.ValueOf("Error: Expected JSON object")
|
33
|
+
}
|
34
|
+
|
35
|
+
// Convert JS object to Go map
|
36
|
+
jsonStr := js.Global().Get("JSON").Call("stringify", data).String()
|
37
|
+
var inputMap map[string]interface{}
|
38
|
+
if err := json.Unmarshal([]byte(jsonStr), &inputMap); err != nil {
|
39
|
+
return js.ValueOf(fmt.Sprintf("Error parsing JSON: %s", err.Error()))
|
40
|
+
}
|
41
|
+
|
42
|
+
// Add new fields
|
43
|
+
inputMap["processed"] = true
|
44
|
+
inputMap["processor"] = "Go WASM"
|
45
|
+
|
46
|
+
// Add some computed fields
|
47
|
+
if values, ok := inputMap["values"].([]interface{}); ok {
|
48
|
+
sum := 0.0
|
49
|
+
for _, v := range values {
|
50
|
+
if num, ok := v.(float64); ok {
|
51
|
+
sum += num
|
52
|
+
}
|
53
|
+
}
|
54
|
+
inputMap["sum"] = sum
|
55
|
+
}
|
56
|
+
|
57
|
+
// Convert back to JS
|
58
|
+
resultJSON, err := json.Marshal(inputMap)
|
59
|
+
if err != nil {
|
60
|
+
return js.ValueOf(fmt.Sprintf("Error generating JSON: %s", err.Error()))
|
61
|
+
}
|
62
|
+
|
63
|
+
return js.ValueOf(string(resultJSON))
|
64
|
+
}
|
65
|
+
|
66
|
+
func main() {
|
67
|
+
fmt.Println("Go WASM Module initialized")
|
68
|
+
|
69
|
+
// Register functions to be callable from JavaScript
|
70
|
+
js.Global().Set("goAdd", js.FuncOf(add))
|
71
|
+
js.Global().Set("goProcessData", js.FuncOf(processData))
|
72
|
+
|
73
|
+
// Keep the program running
|
74
|
+
<-make(chan bool)
|
75
|
+
}
|
@@ -17,22 +17,11 @@ export default defineConfig({
|
|
17
17
|
input: {
|
18
18
|
client: resolve(__dirname, 'src/client.js')
|
19
19
|
},
|
20
|
-
output:
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
assetFileNames: 'assets/[name]-[hash].[ext]',
|
26
|
-
format: 'es',
|
27
|
-
},
|
28
|
-
{
|
29
|
-
// CommonJS output
|
30
|
-
entryFileNames: 'assets/[name].js',
|
31
|
-
chunkFileNames: 'assets/[name]-[hash].js',
|
32
|
-
assetFileNames: 'assets/[name]-[hash].[ext]',
|
33
|
-
format: 'cjs',
|
34
|
-
}
|
35
|
-
]
|
20
|
+
output: {
|
21
|
+
entryFileNames: 'assets/[name].js',
|
22
|
+
chunkFileNames: 'assets/[name]-[hash].js',
|
23
|
+
assetFileNames: 'assets/[name]-[hash].[ext]'
|
24
|
+
}
|
36
25
|
}
|
37
26
|
},
|
38
27
|
|
@@ -4,7 +4,7 @@ import { fileURLToPath } from 'url';
|
|
4
4
|
import fetch from 'node-fetch';
|
5
5
|
import dotenv from 'dotenv';
|
6
6
|
import fs from 'fs';
|
7
|
-
import { renderToString } from 'frontend-hamroun
|
7
|
+
import { renderToString } from 'frontend-hamroun';
|
8
8
|
|
9
9
|
// Load environment variables
|
10
10
|
dotenv.config();
|
@@ -251,7 +251,7 @@ app.get('/', async (req, res) => {
|
|
251
251
|
const metaTags = await generateMetaTags(contentForMetaTags);
|
252
252
|
|
253
253
|
// Generate HTML from our virtual node directly using imported renderToString
|
254
|
-
const content = renderToString(vnode);
|
254
|
+
const content =await renderToString(vnode);
|
255
255
|
|
256
256
|
// Send complete HTML document with explicit content type
|
257
257
|
res.setHeader('Content-Type', 'text/html');
|
@@ -17,22 +17,11 @@ export default defineConfig({
|
|
17
17
|
input: {
|
18
18
|
client: resolve(__dirname, 'src/client.ts')
|
19
19
|
},
|
20
|
-
output:
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
assetFileNames: 'assets/[name]-[hash].[ext]',
|
26
|
-
format: 'es',
|
27
|
-
},
|
28
|
-
{
|
29
|
-
// CommonJS output
|
30
|
-
entryFileNames: 'assets/[name].js',
|
31
|
-
chunkFileNames: 'assets/[name]-[hash].js',
|
32
|
-
assetFileNames: 'assets/[name]-[hash].[ext]',
|
33
|
-
format: 'cjs',
|
34
|
-
}
|
35
|
-
]
|
20
|
+
output: {
|
21
|
+
entryFileNames: 'assets/[name].js',
|
22
|
+
chunkFileNames: 'assets/[name]-[hash].js',
|
23
|
+
assetFileNames: 'assets/[name]-[hash].[ext]'
|
24
|
+
}
|
36
25
|
}
|
37
26
|
},
|
38
27
|
|
package/dist/Counter.d.ts
DELETED
File without changes
|
package/dist/batch/package.json
DELETED
@@ -1,16 +0,0 @@
|
|
1
|
-
{
|
2
|
-
"name": "frontend-hamroun/batch",
|
3
|
-
"version": "1.2.79",
|
4
|
-
"type": "module",
|
5
|
-
"main": "./index.js",
|
6
|
-
"module": "./index.mjs",
|
7
|
-
"types": "./index.d.ts",
|
8
|
-
"exports": {
|
9
|
-
".": {
|
10
|
-
"import": "./index.mjs",
|
11
|
-
"require": "./index.js",
|
12
|
-
"types": "./index.d.ts"
|
13
|
-
}
|
14
|
-
},
|
15
|
-
"sideEffects": false
|
16
|
-
}
|
@@ -1,16 +0,0 @@
|
|
1
|
-
{
|
2
|
-
"name": "frontend-hamroun/client-router",
|
3
|
-
"version": "1.2.79",
|
4
|
-
"type": "module",
|
5
|
-
"main": "./index.js",
|
6
|
-
"module": "./index.mjs",
|
7
|
-
"types": "./index.d.ts",
|
8
|
-
"exports": {
|
9
|
-
".": {
|
10
|
-
"import": "./index.mjs",
|
11
|
-
"require": "./index.js",
|
12
|
-
"types": "./index.d.ts"
|
13
|
-
}
|
14
|
-
},
|
15
|
-
"sideEffects": false
|
16
|
-
}
|
@@ -1,16 +0,0 @@
|
|
1
|
-
{
|
2
|
-
"name": "frontend-hamroun/component",
|
3
|
-
"version": "1.2.79",
|
4
|
-
"type": "module",
|
5
|
-
"main": "./index.js",
|
6
|
-
"module": "./index.mjs",
|
7
|
-
"types": "./index.d.ts",
|
8
|
-
"exports": {
|
9
|
-
".": {
|
10
|
-
"import": "./index.mjs",
|
11
|
-
"require": "./index.js",
|
12
|
-
"types": "./index.d.ts"
|
13
|
-
}
|
14
|
-
},
|
15
|
-
"sideEffects": false
|
16
|
-
}
|
@@ -1,16 +0,0 @@
|
|
1
|
-
{
|
2
|
-
"name": "frontend-hamroun/context",
|
3
|
-
"version": "1.2.79",
|
4
|
-
"type": "module",
|
5
|
-
"main": "./index.js",
|
6
|
-
"module": "./index.mjs",
|
7
|
-
"types": "./index.d.ts",
|
8
|
-
"exports": {
|
9
|
-
".": {
|
10
|
-
"import": "./index.mjs",
|
11
|
-
"require": "./index.js",
|
12
|
-
"types": "./index.d.ts"
|
13
|
-
}
|
14
|
-
},
|
15
|
-
"sideEffects": false
|
16
|
-
}
|
@@ -1,16 +0,0 @@
|
|
1
|
-
{
|
2
|
-
"name": "frontend-hamroun/event-bus",
|
3
|
-
"version": "1.2.79",
|
4
|
-
"type": "module",
|
5
|
-
"main": "./index.js",
|
6
|
-
"module": "./index.mjs",
|
7
|
-
"types": "./index.d.ts",
|
8
|
-
"exports": {
|
9
|
-
".": {
|
10
|
-
"import": "./index.mjs",
|
11
|
-
"require": "./index.js",
|
12
|
-
"types": "./index.d.ts"
|
13
|
-
}
|
14
|
-
},
|
15
|
-
"sideEffects": false
|
16
|
-
}
|
package/dist/forms/package.json
DELETED
@@ -1,16 +0,0 @@
|
|
1
|
-
{
|
2
|
-
"name": "frontend-hamroun/forms",
|
3
|
-
"version": "1.2.79",
|
4
|
-
"type": "module",
|
5
|
-
"main": "./index.js",
|
6
|
-
"module": "./index.mjs",
|
7
|
-
"types": "./index.d.ts",
|
8
|
-
"exports": {
|
9
|
-
".": {
|
10
|
-
"import": "./index.mjs",
|
11
|
-
"require": "./index.js",
|
12
|
-
"types": "./index.d.ts"
|
13
|
-
}
|
14
|
-
},
|
15
|
-
"sideEffects": false
|
16
|
-
}
|
package/dist/hooks/package.json
DELETED
@@ -1,16 +0,0 @@
|
|
1
|
-
{
|
2
|
-
"name": "frontend-hamroun/hooks",
|
3
|
-
"version": "1.2.79",
|
4
|
-
"type": "module",
|
5
|
-
"main": "./index.js",
|
6
|
-
"module": "./index.mjs",
|
7
|
-
"types": "./index.d.ts",
|
8
|
-
"exports": {
|
9
|
-
".": {
|
10
|
-
"import": "./index.mjs",
|
11
|
-
"require": "./index.js",
|
12
|
-
"types": "./index.d.ts"
|
13
|
-
}
|
14
|
-
},
|
15
|
-
"sideEffects": false
|
16
|
-
}
|
package/dist/hooks-0728361a.cjs
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
"use strict";exports.isBatching=!1;const l=[];function M(s){if(exports.isBatching){l.push(s);return}exports.isBatching=!0;try{for(s();l.length>0;){const t=l.shift();t==null||t()}}finally{exports.isBatching=!1}}function B(){return exports.isBatching}function y(s){return{Provider:({value:n,children:u})=>u,Consumer:({children:n})=>n(s),_id:Symbol(),useSelector:n=>n(s)}}function C(s){return s}let e=0;const h=new Map,c=new Map,a=new Map,d=new Map,p=new Map,E=typeof window>"u",f=new Map;let g=null,m=null,w=null;function v(s,t,n){g=s,m=n,w=t}function I(){return e++,c.set(e,0),e}function k(){E&&f.delete(e),e=0}function x(s){if(!e)throw new Error("useState must be called within a render");if(E){f.has(e)||f.set(e,new Map);const r=f.get(e),i=c.get(e)||0;r.has(i)||r.set(i,s);const R=r.get(i),S=O=>{};return c.set(e,i+1),[R,S]}h.has(e)||h.set(e,[]);const t=h.get(e),n=c.get(e)||0;n>=t.length&&t.push(s);const u=t[n],o=r=>{const i=typeof r=="function"?r(t[n]):r;t[n]!==i&&(t[n]=i,exports.isBatching?M(()=>b(e)):b(e))};return c.set(e,n+1),[u,o]}function q(s,t){if(!e)throw new Error("useEffect must be called within a render");if(E){const r=c.get(e)||0;c.set(e,r+1);return}const n=c.get(e)||0;a.has(e)||a.set(e,[]);const u=a.get(e),o=u[n];(!o||!t||!o.deps||t.some((r,i)=>r!==o.deps[i]))&&(o!=null&&o.cleanup&&o.cleanup(),queueMicrotask(()=>{const r=s()||void 0;u[n]={cleanup:r,deps:t||[]}})),c.set(e,n+1)}function U(s,t){if(!e)throw new Error("useMemo must be called within a render");const n=c.get(e)||0;d.has(e)||d.set(e,[]);const u=d.get(e),o=u[n];if(!o||t&&t.some((r,i)=>!Object.is(r,o.deps[i]))){const r=s();return u[n]={value:r,deps:t||[]},c.set(e,n+1),r}return c.set(e,n+1),o.value}function _(s){if(!e)throw new Error("useRef must be called within a render");const t=c.get(e)||0;p.has(e)||p.set(e,[]);const n=p.get(e);if(t>=n.length){const o={current:s};return n.push(o),c.set(e,t+1),o}const u=n[t];return c.set(e,t+1),u}async function b(s){try{const t=a.get(s);t&&(t.forEach(n=>{n.cleanup&&n.cleanup()}),a.set(s,[])),g&&m&&w&&await g(w,m)}catch(t){console.error("Error during rerender:",t)}}function j(){const[s,t]=x(null);return[s,()=>t(null)]}exports.batchUpdates=M;exports.createContext=y;exports.finishRender=k;exports.getIsBatching=B;exports.prepareRender=I;exports.setRenderCallback=v;exports.useContext=C;exports.useEffect=q;exports.useErrorBoundary=j;exports.useMemo=U;exports.useRef=_;exports.useState=x;
|
package/dist/hooks-b58f947c.js
DELETED
@@ -1,133 +0,0 @@
|
|
1
|
-
let i = !1;
|
2
|
-
const d = [];
|
3
|
-
function y(s) {
|
4
|
-
if (i) {
|
5
|
-
d.push(s);
|
6
|
-
return;
|
7
|
-
}
|
8
|
-
i = !0;
|
9
|
-
try {
|
10
|
-
for (s(); d.length > 0; ) {
|
11
|
-
const t = d.shift();
|
12
|
-
t == null || t();
|
13
|
-
}
|
14
|
-
} finally {
|
15
|
-
i = !1;
|
16
|
-
}
|
17
|
-
}
|
18
|
-
function C() {
|
19
|
-
return i;
|
20
|
-
}
|
21
|
-
function I(s) {
|
22
|
-
return {
|
23
|
-
Provider: ({ value: n, children: a }) => a,
|
24
|
-
Consumer: ({ children: n }) => n(s),
|
25
|
-
_id: Symbol(),
|
26
|
-
useSelector: (n) => n(s)
|
27
|
-
};
|
28
|
-
}
|
29
|
-
function k(s) {
|
30
|
-
return s;
|
31
|
-
}
|
32
|
-
let e = 0;
|
33
|
-
const h = /* @__PURE__ */ new Map(), c = /* @__PURE__ */ new Map(), f = /* @__PURE__ */ new Map(), p = /* @__PURE__ */ new Map(), g = /* @__PURE__ */ new Map(), E = typeof window > "u", l = /* @__PURE__ */ new Map();
|
34
|
-
let m = null, w = null, b = null;
|
35
|
-
function B(s, t, n) {
|
36
|
-
m = s, w = n, b = t;
|
37
|
-
}
|
38
|
-
function j() {
|
39
|
-
return e++, c.set(e, 0), e;
|
40
|
-
}
|
41
|
-
function q() {
|
42
|
-
E && l.delete(e), e = 0;
|
43
|
-
}
|
44
|
-
function R(s) {
|
45
|
-
if (!e)
|
46
|
-
throw new Error("useState must be called within a render");
|
47
|
-
if (E) {
|
48
|
-
l.has(e) || l.set(e, /* @__PURE__ */ new Map());
|
49
|
-
const r = l.get(e), u = c.get(e) || 0;
|
50
|
-
r.has(u) || r.set(u, s);
|
51
|
-
const x = r.get(u), S = (v) => {
|
52
|
-
};
|
53
|
-
return c.set(e, u + 1), [x, S];
|
54
|
-
}
|
55
|
-
h.has(e) || h.set(e, []);
|
56
|
-
const t = h.get(e), n = c.get(e) || 0;
|
57
|
-
n >= t.length && t.push(s);
|
58
|
-
const a = t[n], o = (r) => {
|
59
|
-
const u = typeof r == "function" ? r(t[n]) : r;
|
60
|
-
t[n] !== u && (t[n] = u, i ? y(() => M(e)) : M(e));
|
61
|
-
};
|
62
|
-
return c.set(e, n + 1), [a, o];
|
63
|
-
}
|
64
|
-
function _(s, t) {
|
65
|
-
if (!e)
|
66
|
-
throw new Error("useEffect must be called within a render");
|
67
|
-
if (E) {
|
68
|
-
const r = c.get(e) || 0;
|
69
|
-
c.set(e, r + 1);
|
70
|
-
return;
|
71
|
-
}
|
72
|
-
const n = c.get(e) || 0;
|
73
|
-
f.has(e) || f.set(e, []);
|
74
|
-
const a = f.get(e), o = a[n];
|
75
|
-
(!o || !t || !o.deps || t.some((r, u) => r !== o.deps[u])) && (o != null && o.cleanup && o.cleanup(), queueMicrotask(() => {
|
76
|
-
const r = s() || void 0;
|
77
|
-
a[n] = { cleanup: r, deps: t || [] };
|
78
|
-
})), c.set(e, n + 1);
|
79
|
-
}
|
80
|
-
function O(s, t) {
|
81
|
-
if (!e)
|
82
|
-
throw new Error("useMemo must be called within a render");
|
83
|
-
const n = c.get(e) || 0;
|
84
|
-
p.has(e) || p.set(e, []);
|
85
|
-
const a = p.get(e), o = a[n];
|
86
|
-
if (!o || t && t.some((r, u) => !Object.is(r, o.deps[u]))) {
|
87
|
-
const r = s();
|
88
|
-
return a[n] = { value: r, deps: t || [] }, c.set(e, n + 1), r;
|
89
|
-
}
|
90
|
-
return c.set(e, n + 1), o.value;
|
91
|
-
}
|
92
|
-
function P(s) {
|
93
|
-
if (!e)
|
94
|
-
throw new Error("useRef must be called within a render");
|
95
|
-
const t = c.get(e) || 0;
|
96
|
-
g.has(e) || g.set(e, []);
|
97
|
-
const n = g.get(e);
|
98
|
-
if (t >= n.length) {
|
99
|
-
const o = { current: s };
|
100
|
-
return n.push(o), c.set(e, t + 1), o;
|
101
|
-
}
|
102
|
-
const a = n[t];
|
103
|
-
return c.set(e, t + 1), a;
|
104
|
-
}
|
105
|
-
async function M(s) {
|
106
|
-
try {
|
107
|
-
const t = f.get(s);
|
108
|
-
t && (t.forEach((n) => {
|
109
|
-
n.cleanup && n.cleanup();
|
110
|
-
}), f.set(s, [])), m && w && b && await m(b, w);
|
111
|
-
} catch (t) {
|
112
|
-
console.error("Error during rerender:", t);
|
113
|
-
}
|
114
|
-
}
|
115
|
-
function U() {
|
116
|
-
const [s, t] = R(null);
|
117
|
-
return [s, () => t(null)];
|
118
|
-
}
|
119
|
-
export {
|
120
|
-
_ as a,
|
121
|
-
O as b,
|
122
|
-
P as c,
|
123
|
-
k as d,
|
124
|
-
U as e,
|
125
|
-
I as f,
|
126
|
-
y as g,
|
127
|
-
q as h,
|
128
|
-
i,
|
129
|
-
C as j,
|
130
|
-
j as p,
|
131
|
-
B as s,
|
132
|
-
R as u
|
133
|
-
};
|
package/dist/hooks.js
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./hooks-0728361a.cjs");exports.createContext=e.createContext;exports.finishRender=e.finishRender;exports.prepareRender=e.prepareRender;exports.setRenderCallback=e.setRenderCallback;exports.useContext=e.useContext;exports.useEffect=e.useEffect;exports.useErrorBoundary=e.useErrorBoundary;exports.useMemo=e.useMemo;exports.useRef=e.useRef;exports.useState=e.useState;
|
package/dist/hooks.mjs
DELETED
@@ -1,13 +0,0 @@
|
|
1
|
-
import { f as a, h as r, p as t, s as u, d as n, a as o, e as f, b as d, c, u as p } from "./hooks-b58f947c.js";
|
2
|
-
export {
|
3
|
-
a as createContext,
|
4
|
-
r as finishRender,
|
5
|
-
t as prepareRender,
|
6
|
-
u as setRenderCallback,
|
7
|
-
n as useContext,
|
8
|
-
o as useEffect,
|
9
|
-
f as useErrorBoundary,
|
10
|
-
d as useMemo,
|
11
|
-
c as useRef,
|
12
|
-
p as useState
|
13
|
-
};
|
package/dist/index.mjs
DELETED
@@ -1,137 +0,0 @@
|
|
1
|
-
var d = Object.defineProperty;
|
2
|
-
var h = (s, e, t) => e in s ? d(s, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : s[e] = t;
|
3
|
-
var a = (s, e, t) => (h(s, typeof e != "symbol" ? e + "" : e, t), t);
|
4
|
-
import { createElement as c, Fragment as f, jsx as i } from "./jsx-runtime.mjs";
|
5
|
-
import { loadGoWasm as u, createTypedWasmFunction as l, goValues as m } from "./wasm.mjs";
|
6
|
-
import { render as y, hydrate as E } from "./renderer.mjs";
|
7
|
-
import { u as v, a as _, b as g, c as C, d as x, e as W, f as j, g as b } from "./hooks-b58f947c.js";
|
8
|
-
import { h as I, j as z, i as J, p as P, s as Q } from "./hooks-b58f947c.js";
|
9
|
-
import { renderToString as T } from "./server-renderer.mjs";
|
10
|
-
function p(s, e) {
|
11
|
-
const t = Object.keys(s).filter((n) => n !== "children"), r = Object.keys(e).filter((n) => n !== "children");
|
12
|
-
return t.length !== r.length ? !1 : t.every((n) => s[n] === e[n]);
|
13
|
-
}
|
14
|
-
function M(s, e) {
|
15
|
-
return s == null || e == null ? s !== e : typeof s != typeof e ? !0 : typeof e == "string" || typeof e == "number" ? s !== e : e.type !== s.type ? !0 : !p(s.props, e.props);
|
16
|
-
}
|
17
|
-
function S(s, e) {
|
18
|
-
return !p(s, e);
|
19
|
-
}
|
20
|
-
class F {
|
21
|
-
constructor(e = {}) {
|
22
|
-
a(this, "state", {});
|
23
|
-
a(this, "props");
|
24
|
-
a(this, "element", null);
|
25
|
-
a(this, "_mounted", !1);
|
26
|
-
this.props = e;
|
27
|
-
}
|
28
|
-
componentDidMount() {
|
29
|
-
}
|
30
|
-
async setState(e) {
|
31
|
-
const t = { ...this.state };
|
32
|
-
this.state = { ...t, ...e }, console.log(`${this.constructor.name} state updated:`, {
|
33
|
-
prev: t,
|
34
|
-
next: this.state
|
35
|
-
}), await Promise.resolve(), this._mounted ? await this.update() : await this.update();
|
36
|
-
}
|
37
|
-
_replayEvents(e, t) {
|
38
|
-
const r = e.__events || {};
|
39
|
-
Object.entries(r).forEach(([n, o]) => {
|
40
|
-
t.addEventListener(n, o);
|
41
|
-
}), t.__events = r;
|
42
|
-
}
|
43
|
-
_deepCloneWithEvents(e) {
|
44
|
-
const t = e.cloneNode(!1), r = e.__events || {};
|
45
|
-
return t.__events = r, Object.entries(r).forEach(([n, o]) => {
|
46
|
-
t.addEventListener(n, o);
|
47
|
-
}), Array.from(e.childNodes).forEach((n) => {
|
48
|
-
n instanceof HTMLElement ? t.appendChild(this._deepCloneWithEvents(n)) : t.appendChild(n.cloneNode(!0));
|
49
|
-
}), t;
|
50
|
-
}
|
51
|
-
async update() {
|
52
|
-
const e = this.render();
|
53
|
-
if (!e)
|
54
|
-
return document.createTextNode("");
|
55
|
-
const t = await c(e);
|
56
|
-
if (t instanceof HTMLElement)
|
57
|
-
return this._updateElement(t);
|
58
|
-
const r = document.createElement("div");
|
59
|
-
return r.appendChild(t), this._updateElement(r);
|
60
|
-
}
|
61
|
-
async _updateElement(e) {
|
62
|
-
const t = this._deepCloneWithEvents(e);
|
63
|
-
return t.__instance = this, this.element ? this.element.parentNode && (this.element.parentNode.replaceChild(t, this.element), this.element = t) : (this.element = t, this._mounted || (this._mounted = !0, queueMicrotask(() => this.componentDidMount()))), this.element;
|
64
|
-
}
|
65
|
-
render() {
|
66
|
-
throw new Error("Component must implement render() method");
|
67
|
-
}
|
68
|
-
}
|
69
|
-
const V = {
|
70
|
-
async getServer() {
|
71
|
-
throw new Error("Server module can only be used in Node.js environment");
|
72
|
-
}
|
73
|
-
}, G = u, L = l, O = m, R = {
|
74
|
-
loadGoWasm: u,
|
75
|
-
createTypedWasmFunction: l,
|
76
|
-
goValues: m
|
77
|
-
};
|
78
|
-
let q = !1;
|
79
|
-
const K = {
|
80
|
-
Fragment: f,
|
81
|
-
jsx: i,
|
82
|
-
jsxs: i,
|
83
|
-
createElement: c,
|
84
|
-
render: y,
|
85
|
-
hydrate: E,
|
86
|
-
useState: v,
|
87
|
-
useEffect: _,
|
88
|
-
useMemo: g,
|
89
|
-
useRef: C,
|
90
|
-
useContext: x,
|
91
|
-
useErrorBoundary: W,
|
92
|
-
createContext: j,
|
93
|
-
renderToString: T,
|
94
|
-
batchUpdates: b,
|
95
|
-
server: V,
|
96
|
-
loadGoWasm: G,
|
97
|
-
createTypedWasmFunction: L,
|
98
|
-
goValues: O,
|
99
|
-
wasm: R,
|
100
|
-
Component: F,
|
101
|
-
diff: M,
|
102
|
-
shouldComponentUpdate: S
|
103
|
-
// Server functionality is exposed through the server export
|
104
|
-
};
|
105
|
-
export {
|
106
|
-
F as Component,
|
107
|
-
f as Fragment,
|
108
|
-
b as batchUpdates,
|
109
|
-
j as createContext,
|
110
|
-
c as createElement,
|
111
|
-
L as createTypedWasmFunction,
|
112
|
-
K as default,
|
113
|
-
M as diff,
|
114
|
-
I as finishRender,
|
115
|
-
z as getIsBatching,
|
116
|
-
O as goValues,
|
117
|
-
E as hydrate,
|
118
|
-
J as isBatching,
|
119
|
-
q as isHydrating,
|
120
|
-
i as jsx,
|
121
|
-
i as jsxDEV,
|
122
|
-
i as jsxs,
|
123
|
-
G as loadGoWasm,
|
124
|
-
P as prepareRender,
|
125
|
-
y as render,
|
126
|
-
T as renderToString,
|
127
|
-
V as server,
|
128
|
-
Q as setRenderCallback,
|
129
|
-
S as shouldComponentUpdate,
|
130
|
-
x as useContext,
|
131
|
-
_ as useEffect,
|
132
|
-
W as useErrorBoundary,
|
133
|
-
g as useMemo,
|
134
|
-
C as useRef,
|
135
|
-
v as useState,
|
136
|
-
R as wasm
|
137
|
-
};
|
@@ -1,16 +0,0 @@
|
|
1
|
-
{
|
2
|
-
"name": "frontend-hamroun/jsx-runtime",
|
3
|
-
"version": "1.2.79",
|
4
|
-
"type": "module",
|
5
|
-
"main": "./index.js",
|
6
|
-
"module": "./index.mjs",
|
7
|
-
"types": "./index.d.ts",
|
8
|
-
"exports": {
|
9
|
-
".": {
|
10
|
-
"import": "./index.mjs",
|
11
|
-
"require": "./index.js",
|
12
|
-
"types": "./index.d.ts"
|
13
|
-
}
|
14
|
-
},
|
15
|
-
"sideEffects": false
|
16
|
-
}
|