@reactful/create 1.2.23 → 1.2.24
Sign up to get free protection for your applications and to get access to all the features.
- package/commons/package.json +4 -5
- package/package.json +2 -2
- package/templates/minimal/builds/about.html +30 -0
- package/templates/minimal/builds/bundle.js +34981 -0
- package/templates/minimal/builds/bundle.ts +20 -0
- package/templates/minimal/builds/clock.html +30 -0
- package/templates/minimal/builds/counter.html +37 -0
- package/templates/minimal/builds/forms/form.html +48 -0
- package/templates/minimal/builds/forms/index.html +48 -0
- package/templates/minimal/builds/hello.html +62 -0
- package/templates/minimal/builds/htmlx.html +27 -0
- package/templates/minimal/builds/htmlx.tsx +13 -0
- package/templates/minimal/builds/index.html +98 -11
- package/templates/minimal/builds/login.html +48 -0
- package/templates/minimal/builds/profile/index.html +55 -0
- package/templates/minimal/builds/quotes.html +27 -0
- package/templates/minimal/builds/shared.js +76 -0
- package/templates/minimal/builds/system.html +28 -0
- package/templates/minimal/components/index.ts +1 -2
- package/templates/minimal/components/label.tsx +7 -0
- package/templates/minimal/index.html +12 -11
- package/templates/minimal/index.ts +2 -2
- package/templates/minimal/routes/hello.tsx +6 -0
- package/templates/minimal/routes/index.tsx +4 -7
- package/templates/sampling/apis/auth/db.ts +14 -14
- package/templates/sampling/apis/auth/index.ts +27 -27
- package/templates/sampling/apis/hello.ts +2 -2
- package/templates/sampling/apis/quotes.ts +15 -15
- package/templates/sampling/apis/sub/index.ts +2 -2
- package/templates/sampling/apis/sub/sub.ts +2 -2
- package/templates/sampling/assets/bootstrap-icons.css +4 -4
- package/templates/sampling/assets/default.css +93 -93
- package/templates/sampling/assets/icon.svg +6 -6
- package/templates/sampling/assets/manifest.json +56 -56
- package/templates/sampling/assets/markdown.css +273 -273
- package/templates/sampling/assets/robots.txt +1 -1
- package/templates/sampling/assets/system.css +6 -6
- package/templates/sampling/builds/about.html +30 -0
- package/templates/sampling/builds/bundle.js +34981 -0
- package/templates/sampling/builds/bundle.ts +20 -0
- package/templates/sampling/builds/clock.html +30 -0
- package/templates/sampling/builds/counter.html +37 -0
- package/templates/sampling/builds/forms/form.html +48 -0
- package/templates/sampling/builds/forms/index.html +48 -0
- package/templates/sampling/builds/hello.html +62 -0
- package/templates/sampling/builds/htmlx.html +27 -0
- package/templates/sampling/builds/htmlx.tsx +13 -0
- package/templates/sampling/builds/index.html +98 -98
- package/templates/sampling/builds/login.html +48 -0
- package/templates/sampling/builds/profile/index.html +55 -0
- package/templates/sampling/builds/quotes.html +27 -0
- package/templates/sampling/builds/shared.js +76 -0
- package/templates/sampling/builds/system.html +28 -0
- package/templates/sampling/components/header.tsx +6 -6
- package/templates/sampling/components/hello.tsx +8 -8
- package/templates/sampling/components/icon.tsx +10 -10
- package/templates/sampling/components/index.ts +2 -2
- package/templates/sampling/index.html +20 -20
- package/templates/sampling/index.ts +18 -18
- package/templates/sampling/routes/about.html +12 -12
- package/templates/sampling/routes/clock.tsx +32 -36
- package/templates/sampling/routes/counter.tsx +16 -7
- package/templates/sampling/routes/forms/form.tsx +49 -50
- package/templates/sampling/routes/hello.tsx +57 -58
- package/templates/sampling/routes/htmlx.html +14 -14
- package/templates/sampling/routes/index.md +14 -14
- package/templates/sampling/routes/login.tsx +34 -35
- package/templates/sampling/routes/profile/detail.css +12 -12
- package/templates/sampling/routes/profile/detail.tsx +46 -47
- package/templates/sampling/routes/profile/index.tsx +13 -13
- package/templates/sampling/routes/profile/profile.css +8 -8
- package/templates/sampling/routes/profile/tester.tsx +10 -10
- package/templates/sampling/routes/quotes.tsx +1 -1
- package/templates/sampling/routes/system.tsx +1 -2
- package/templates/sampling/tests/access.spec.ts +29 -29
- package/templates/sampling/tests/counter.spec.ts +18 -18
- package/templates/sampling/tests/form.spec.ts +50 -50
- package/templates/sampling/tests/hello.spec.ts +24 -24
- package/templates/sampling/tests/path.test.ts +19 -19
- package/templates/minimal/components/hello.tsx +0 -9
- package/templates/minimal/components/icon.tsx +0 -11
@@ -0,0 +1,76 @@
|
|
1
|
+
|
2
|
+
const GLOBAL_KEY = Symbol.for('settings')
|
3
|
+
const process = { env: {
|
4
|
+
"SHELL": "/usr/bin/zsh",
|
5
|
+
"LSCOLORS": "Gxfxcxdxbxegedabagacad",
|
6
|
+
"USER_ZDOTDIR": "/root",
|
7
|
+
"COLORTERM": "truecolor",
|
8
|
+
"LESS": "-R",
|
9
|
+
"NVM_INC": "/root/.nvm/versions/node/v21.5.0/include/node",
|
10
|
+
"WSL2_GUI_APPS_ENABLED": "1",
|
11
|
+
"TERM_PROGRAM_VERSION": "1.88.1",
|
12
|
+
"WSL_DISTRO_NAME": "Debian",
|
13
|
+
"NODE": "/root/.nvm/versions/node/v21.5.0/bin/node",
|
14
|
+
"npm_config_local_prefix": "/mnt/b/Repositorios/reactful/",
|
15
|
+
"NAME": "JSR-DESKTOP",
|
16
|
+
"PWD": "/mnt/b/Repositorios/reactful",
|
17
|
+
"LOGNAME": "root",
|
18
|
+
"_": "/root/.bun/bin/bun",
|
19
|
+
"VSCODE_GIT_ASKPASS_NODE": "/root/.vscode-server/bin/e170252f762678dec6ca2cc69aba1570769a5d39/node",
|
20
|
+
"VSCODE_INJECTION": "1",
|
21
|
+
"HOME": "/root",
|
22
|
+
"LANG": "en_US.UTF-8",
|
23
|
+
"WSL_INTEROP": "/run/WSL/492_interop",
|
24
|
+
"LS_COLORS": "rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:mi=00:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arc=01;31:*.arj=01;31:*.taz=01;31:*.lha=01;31:*.lz4=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.tzo=01;31:*.t7z=01;31:*.zip=01;31:*.z=01;31:*.dz=01;31:*.gz=01;31:*.lrz=01;31:*.lz=01;31:*.lzo=01;31:*.xz=01;31:*.zst=01;31:*.tzst=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.alz=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.cab=01;31:*.wim=01;31:*.swm=01;31:*.dwm=01;31:*.esd=01;31:*.jpg=01;35:*.jpeg=01;35:*.mjpg=01;35:*.mjpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35:*.webp=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.m4a=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.oga=00;36:*.opus=00;36:*.spx=00;36:*.xspf=00;36:",
|
25
|
+
"WAYLAND_DISPLAY": "wayland-0",
|
26
|
+
"GIT_ASKPASS": "/root/.vscode-server/bin/e170252f762678dec6ca2cc69aba1570769a5d39/extensions/git/dist/askpass.sh",
|
27
|
+
"NVM_DIR": "/root/.nvm",
|
28
|
+
"VSCODE_GIT_ASKPASS_EXTRA_ARGS": "",
|
29
|
+
"TERM": "xterm-256color",
|
30
|
+
"npm_package_name": "reactful",
|
31
|
+
"ZSH": "/root/.oh-my-zsh",
|
32
|
+
"ZDOTDIR": "/root",
|
33
|
+
"USER": "root",
|
34
|
+
"VSCODE_GIT_IPC_HANDLE": "/run/user/0/vscode-git-7034020a55.sock",
|
35
|
+
"DISPLAY": ":0",
|
36
|
+
"npm_lifecycle_event": "start",
|
37
|
+
"SHLVL": "1",
|
38
|
+
"NVM_CD_FLAGS": "-q",
|
39
|
+
"PAGER": "less",
|
40
|
+
"npm_config_user_agent": "bun/1.1.4 npm/? node/v21.6.0 linux x64",
|
41
|
+
"npm_execpath": "/root/.bun/bin/bun",
|
42
|
+
"XDG_RUNTIME_DIR": "/run/user/0/",
|
43
|
+
"npm_package_json": "/mnt/b/Repositorios/reactful/package.json",
|
44
|
+
"WSLENV": "VSCODE_WSL_EXT_LOCATION/up",
|
45
|
+
"BUN_INSTALL": "/root/.bun",
|
46
|
+
"VSCODE_GIT_ASKPASS_MAIN": "/root/.vscode-server/bin/e170252f762678dec6ca2cc69aba1570769a5d39/extensions/git/dist/askpass-main.js",
|
47
|
+
"PATH": "/mnt/b/Repositorios/reactful/node_modules/.bin:/mnt/b/Repositorios/reactful/node_modules/.bin:/mnt/b/Repositorios/node_modules/.bin:/mnt/b/node_modules/.bin:/mnt/node_modules/.bin:/node_modules/.bin:/root/.deno/bin:/root/.bun/bin:/root/.vscode-server/bin/e170252f762678dec6ca2cc69aba1570769a5d39/bin/remote-cli:/root/.nvm/versions/node/v21.5.0/bin:/root/.deno/bin:/root/.bun/bin:/root/.cargo/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/usr/lib/wsl/lib:/mnt/c/Program Files/Common Files/Oracle/Java/javapath:/mnt/c/Users/Jonathan/AppData/Local/Programs/Python/Python38/Scripts/:/mnt/c/Users/Jonathan/AppData/Local/Programs/Python/Python38/:/mnt/c/Program Files (x86)/VMware/VMware Player/bin/:/mnt/c/Python310/Scripts/:/mnt/c/Python310/:/mnt/c/Users/Jonathan/AppData/Roaming/ActiveState/bin:/mnt/c/Python38/Scripts/:/mnt/c/Python38/:/mnt/c/Windows:/mnt/c/Windows/system32:/mnt/c/Windows/System32/Wbem:/mnt/c/Windows/System32/WindowsPowerShell/v1.0/:/mnt/c/Windows/System32/OpenSSH/:/mnt/c/Program Files/NVIDIA Corporation/NVIDIA NvDLISR:/mnt/c/ProgramData/chocolatey/bin:/mnt/c/Users/Jonathan/AppData/Roaming/npm:/mnt/c/Program Files (x86)/Microsoft SQL Server/100/Tools/Binn/VSShell/Common7/IDE/:/mnt/c/Program Files (x86)/Microsoft SQL Server/100/Tools/Binn/:/mnt/c/Program Files/Microsoft SQL Server/100/Tools/Binn/:/mnt/c/Program Files (x86)/Microsoft SQL Server/100/DTS/Binn/:/mnt/c/Program Files/Microsoft SQL Server/100/DTS/Binn/:/mnt/c/Program Files/Git/cmd:/mnt/c/Program Files/Azure Data Studio/bin:/mnt/c/ProgramData/nvm:/mnt/c/Program Files/dotnet/:/mnt/c/WINDOWS/system32:/mnt/c/WINDOWS:/mnt/c/WINDOWS/System32/Wbem:/mnt/c/WINDOWS/System32/WindowsPowerShell/v1.0/:/mnt/c/WINDOWS/System32/OpenSSH/:/mnt/c/Program Files/Microsoft SQL Server/150/Tools/Binn/:/mnt/c/Program Files/Microsoft SQL Server/Client SDK/ODBC/170/Tools/Binn/:/mnt/c/ProgramData/nvm:/mnt/c/Program Files/nodejs:/mnt/c/Program Files/Docker/Docker/resources/bin:/mnt/c/Program Files (x86)/NVIDIA Corporation/PhysX/Common:/mnt/c/Program Files/PowerShell/7/:/mnt/c/Users/Jonathan/.cargo/bin:/mnt/c/Users/Jonathan/AppData/Local/ActiveState/StateTool/release/bin:/mnt/c/Users/Jonathan/AppData/Local/activestate/cache/bin:/mnt/c/Users/Jonathan/AppData/Local/Android/Sdk/platform-tools:/mnt/c/Users/Jonathan/AppData/Local/Android/Sdk/tools:/mnt/c/Program Files/Azure Data Studio/bin:/mnt/c/Users/Jonathan/AppData/Local/Programs/Microsoft VS Code/bin:/mnt/c/ProgramData/nvm:/mnt/c/Program Files/nodejs:/mnt/c/Users/Jonathan/.dotnet/tools:/mnt/a/Profile/OneDrive/Recursos/scripts/git:/mnt/c/Users/Jonathan/AppData/Local/Google/Cloud SDK/google-cloud-sdk/bin:/mnt/c/tools/mysql/current/bin:/mnt/b/Portaveis/sonar/bin:/mnt/b/Portaveis/Tools:/mnt/c/Program Files/dotnet:/mnt/c/WINDOWS/system32:/mnt/c/Users/Jonathan/AppData/Local/Microsoft/WindowsApps:/mnt/b/Portaveis/Scripts:/mnt/c/Program Files/heroku/bin:/mnt/c/ProgramData/chocolatey/lib/deno:/mnt/c/Users/Jonathan/.deno/bin:/mnt/c/Users/Jonathan/.bun/bin",
|
48
|
+
"DBUS_SESSION_BUS_ADDRESS": "unix:path=/run/user/0/bus",
|
49
|
+
"NVM_BIN": "/root/.nvm/versions/node/v21.5.0/bin",
|
50
|
+
"HOSTTYPE": "x86_64",
|
51
|
+
"PULSE_SERVER": "unix:/mnt/wslg/PulseServer",
|
52
|
+
"npm_node_execpath": "/root/.nvm/versions/node/v21.5.0/bin/node",
|
53
|
+
"OLDPWD": "/mnt/b/Repositorios/reactful",
|
54
|
+
"TERM_PROGRAM": "vscode",
|
55
|
+
"VSCODE_IPC_HOOK_CLI": "/run/user/0/vscode-ipc-2348e612-8b6e-495b-8cc8-e6e8bd968eea.sock",
|
56
|
+
"PORT": "3333",
|
57
|
+
"MINIFY": "false"
|
58
|
+
} }
|
59
|
+
|
60
|
+
globalThis[GLOBAL_KEY] ||= { queryId:'#root' }
|
61
|
+
globalThis[GLOBAL_KEY].renders=[{ 'path': '/mnt/b/Repositorios/reactful/prototype/routes/clock.tsx', 'name': 'default$', 'time': '', 'mode': 'dynamic', 'href': '/mnt/b/Repositorios/reactful/prototype/routes/clock.tsx'},{ 'path': '/mnt/b/Repositorios/reactful/prototype/routes/quotes.tsx', 'name': 'Quotes', 'time': 1800000, 'mode': 'periodic', 'href': '/mnt/b/Repositorios/reactful/prototype/routes/quotes.tsx'}];
|
62
|
+
globalThis[GLOBAL_KEY].caching=[{ 'call': '', 'data': { 'description': 'Time zone clock...', 'title': 'Time Zone' }, 'path': '/mnt/b/Repositorios/reactful/prototype/routes/clock.tsx', 'name': 'default$', 'type': 'meta'},{ 'call': '', 'data': { 'description': '...', 'title': 'Counter' }, 'path': '/mnt/b/Repositorios/reactful/prototype/routes/counter.tsx', 'name': 'default', 'type': 'meta'},{ 'call': '', 'data': { 'description': 'Hello forms...', 'title': 'Hello' }, 'path': '/mnt/b/Repositorios/reactful/prototype/routes/hello.tsx', 'name': 'default', 'type': 'meta'},{ 'call': () => React.createElement(React.Fragment, null, React.createElement('h1', null, 'Profile'), React.createElement(Detail, null), React.createElement('hr', null), React.createElement('p', null, 'modular CSS chainging to red')), 'data': '/profile/:id', 'path': '/mnt/b/Repositorios/reactful/prototype/routes/profile/index.tsx', 'name': '', 'type': 'href'},{ 'call': '', 'data': { 'description': 'Profile description', 'title': 'Profile' }, 'path': '/mnt/b/Repositorios/reactful/prototype/routes/profile/index.tsx', 'name': 'default', 'type': 'meta'},{ 'call': '', 'data': { 'description': 'Philosophy quotes...', 'title': 'Quotes' }, 'path': '/mnt/b/Repositorios/reactful/prototype/routes/quotes.tsx', 'name': 'Quotes', 'type': 'meta'},{ 'call': '', 'data': { 'charset': 'UTF-16', 'rating': 'general', 'keywords': 'hello, hi', 'title': 'System' }, 'path': '/mnt/b/Repositorios/reactful/prototype/routes/system.tsx', 'name': 'System', 'type': 'meta'},{ 'call': '', 'data': { 'title': 'About', 'description': 'About page' }, 'path': '/about', 'name': 'default', 'type': 'meta'},{ 'call': '', 'data': '%0A%20%20%20%3Ch1%3EAbout%3C/h1%3E%0A%20%20%20%3Cp%3E%0A%20%20%20Lorem%20ipsum%20dolor%20sit%20amet%20consectetur%20adipisicing%20elit.%20%0A%20%20%20Adipisci%20id%20eaque%20saepe%20ab%20numquam,%20nisi%20minus%20atque%20obcaecati,%20%0A%20%20%20dignissimos%20facere%20accusamus%20nihil%20ipsam%20repudiandae%20praesentium,%20%0A%20%20%20quia%20animi%20perspiciatis%20architecto%20fuga?%20%0A%20%20%20%3C/p%3E%20%20%20%20%0A', 'path': '/about', 'name': '', 'type': 'html'},{ 'call': '', 'data': '<h3>Loading content...</h3>', 'path': '/clock', 'name': 'default', 'type': 'lazy'},{ 'call': '', 'data': '%3Ch1%20tag=%22h1%22%20uid=%223%22%20class=%22TimeZone%22%3EWorld%20Clock%3C/h1%3E%3Ch2%20tag=%22h2%22%20uid=%223%22%20class=%22TimeZone%22%3EEurope/Amistedan%20timezone%3C/h2%3E%3Ch3%20style=%22color:yellow%22%20tag=%22h3%22%20uid=%223%22%20class=%22TimeZone%22%3E%20%3C!--%20--%3E2024-5-6%3C!--%20--%3E%20%3C!--%20--%3E15:50:18%3C!--%20--%3E%20%3C/h3%3E%3Ch4%20await=%22%7B"name":"InnerAsyncComponent","path":"/mnt/b/Repositorios/reactful/prototype/routes/clock.tsx"%7D%22%20tag=%22h4%22%20uid=%223%22%20class=%22TimeZone%22%3Eloading...%3C/h4%3E', 'path': '/clock', 'name': '', 'type': 'html'},{ 'call': '', 'data': '%3Ch1%20style=%22color:wheat%22%20tag=%22Header%22%20uid=%222%22%20class=%22Header%22%20own=%22Header%22%3E%3Ch1%20style=%22color:wheat%22%3ECounter%3C/h1%3E%3C/h1%3E%3Cjsx%20complex=%22%7B"person":%7B"name":"john"%7D%7D%22%20tag=%22CountButton%22%20uid=%222%22%20own=%22default%22%20src=%22/mnt/b/Repositorios/reactful/prototype/routes/counter%22%20hidden=%22%22%20class=%22default%22%20events=%22%7B"onEvent":"()%20=>%20console.log(%5C"function%20props%20works!%5C")"%7D%22%3E%3Cbutton%20style=%22padding:20px%22%3ECOUNTED:%20%3Cb%3E0%3C/b%3E%3C/button%3E%3Chr/%3Etuple:%20%3Ccode%3E%3C/code%3E%3Cbr/%3Eevent:%20%3Ccode%3Efails...%3C/code%3E%3C/jsx%3E%3Ch6%20tag=%22h6%22%20uid=%222%22%20class=%22default%22%20hidden=%22%22%3EDONT%20SHOW%20ME!%3C/h6%3E', 'path': '/counter', 'name': '', 'type': 'html'},{ 'call': '', 'data': '%3Cjsx%20tag=%22%22%20uid=%221%22%20own=%22default%22%20src=%22/mnt/b/Repositorios/reactful/prototype/routes/forms/form%22%20hidden=%22%22%20class=%22default%22%3E%3Ch1%3EUncontrolled%20Components%3C/h1%3E%3Cprogress%20hidden=%22%22%3Etest...%3C/progress%3E%3Cform%20cols=%222%22%20method=%22post%22%20action=%22https://jsonplaceholder.typicode.com/posts1%22%3E%3Clabel%3EName%3Cinput%20id=%22name%22%20bind=%22name%22/%3E%3C/label%3E%3Clabel%3EDate%3Cinput%20type=%22date%22%20bind=%22date%22/%3E%3C/label%3E%3Clabel%3EWork%3Cinput%20pattern=%22dev%7Ctest%22%20bind=%22work%22/%3E%3C/label%3E%3Clabel%3EMode%3Cinput%20bind=%22mode%22/%3E%3C/label%3E%3Chr/%3E%3Chr/%3E%3Clabel%3EAccept?%3Cinput%20bind=%22term%22%20type=%22checkbox%22%20required=%22%22/%3E%3C/label%3E%3Cbutton%3ESubmit%3C/button%3E%3C/form%3E%3Cfieldset%3E%3Clegend%3EERROR%3C/legend%3E%3Cul%3E%3C/ul%3E%3C/fieldset%3E%3C/jsx%3E', 'path': '/forms/form', 'name': '', 'type': 'html'},{ 'call': '', 'data': '%3Cjsx%20tag=%22%22%20uid=%221%22%20own=%22default%22%20src=%22/mnt/b/Repositorios/reactful/prototype/routes/forms/form%22%20hidden=%22%22%20class=%22default%22%3E%3Ch1%3EUncontrolled%20Components%3C/h1%3E%3Cprogress%20hidden=%22%22%3Etest...%3C/progress%3E%3Cform%20cols=%222%22%20method=%22post%22%20action=%22https://jsonplaceholder.typicode.com/posts1%22%3E%3Clabel%3EName%3Cinput%20id=%22name%22%20bind=%22name%22/%3E%3C/label%3E%3Clabel%3EDate%3Cinput%20type=%22date%22%20bind=%22date%22/%3E%3C/label%3E%3Clabel%3EWork%3Cinput%20pattern=%22dev%7Ctest%22%20bind=%22work%22/%3E%3C/label%3E%3Clabel%3EMode%3Cinput%20bind=%22mode%22/%3E%3C/label%3E%3Chr/%3E%3Chr/%3E%3Clabel%3EAccept?%3Cinput%20bind=%22term%22%20type=%22checkbox%22%20required=%22%22/%3E%3C/label%3E%3Cbutton%3ESubmit%3C/button%3E%3C/form%3E%3Cfieldset%3E%3Clegend%3EERROR%3C/legend%3E%3Cul%3E%3C/ul%3E%3C/fieldset%3E%3C/jsx%3E', 'path': '/forms/index', 'name': '', 'type': 'html'},{ 'call': '', 'data': '%3Cjsx%20tag=%22Hello%22%20uid=%221%22%20own=%22default%22%20src=%22/mnt/b/Repositorios/reactful/prototype/routes/hello%22%20hidden=%22%22%20class=%22default%22%3E%3Ch1%20style=%22color:wheat%22%3EHello%20Forms%3C/h1%3E%3Cmain%20gaps=%220%2010px%22%20cols=%221%22%20class=%22hello%22%3E%3Clabel%3E%3Cb%3ELOCAL%20state%20%3C/b%3E%20%3Ccode%3Efunction(props)%3C/code%3E%3Cbr/%3E%3Cinput%20id=%221%22%20data=%22%5Bobject%20Object%5D%22%20bind=%22value%22%20placeholder=%22%7Bprops%7D%22/%3E%3Cinput%20id=%221.1%22%20bind=%22value%22%20placeholder=%22default%22/%3E%3Cinput%20id=%221.1.1%22%20placeholder=%22inner%22%20style=%22text-align:right%22%20data=%22%5Bobject%20Object%5D%22%20bind=%22value%22/%3E%3Clabel%3E%20=%20%3C/label%3E%3C/label%3E%3Clabel%3E%3Cb%3EGLOBAL%20state%3C/b%3E%20%3Ccode%3Efunction(props,%20%3C!--%20--%3E%7B%20store%20%7D%3C!--%20--%3E)%3C/code%3E%3Cbr/%3E%3Cinput%20id=%222%22%20data=%22%5Bobject%20Object%5D%22%20bind=%22value%22%20placeholder=%22outer%22/%3E%3Cinput%20id=%222.1%22%20placeholder=%22inner%22%20bind=%22value%22/%3E%3C/label%3E%3Clabel%3E%3Cb%3EORBITAL%20state%3C/b%3E%20%3Ccode%3EuseStore(...)%20+%20@client(true,%20...)%20%3C/code%3E%3Cbr/%3E%3Cinput%20id=%223%22%20data=%22%5Bobject%20Object%5D%22%20bind=%22value%22%20placeholder=%22outer%22/%3E%3Cinput%20id=%223.1%22%20placeholder=%22inner%22%20data=%22%5Bobject%20Object%5D%22%20bind=%22value%22/%3E%3Cinput%20id=%223.2%22%20style=%22text-align:right%22%20data=%22%5Bobject%20Object%5D%22%20bind=%22value%22%20placeholder=%22other%22/%3E%20=%20%3C!--%20--%3E99%3C/label%3E%3C/main%3E%3Cbr/%3E%3Chr/%3E%3Ccode%3E%3Cstrong%3Elocal%3C/strong%3E:%20%3Clabel%20id=%22l1%22%3E%3C/label%3E%3Cbr/%3E%3Cstrong%3Eglobal%3C/strong%3E:%20%3Clabel%20id=%22l2%22%3E%3C/label%3E%3Cbr/%3E%3Cstrong%3Eorbital%3C/strong%3E:%20%3Clabel%20id=%22l3%22%3E11%3C/label%3E%3C/code%3E%3C/jsx%3E', 'path': '/hello', 'name': '', 'type': 'html'},{ 'call': '', 'data': { 'title': 'Sample', 'description': 'Sample page' }, 'path': '/htmlx', 'name': 'default', 'type': 'meta'},{ 'call': '', 'data': '%3Ch1%20style=%22color:wheat%22%3EHTML-X%3C/h1%3E%3Cp%3ELorem%20ipsum%20dolor%20sit%20amet%20consectetur%20adipisicing%20elit.%20Similique%20eum%20quaerat%20nesciunt%20est%20molestias%20accusantium%20aut%20sit%20odit,%20vero%20voluptate%20iure%20vel%20aperiam%20modi%20libero%20in%20praesentium%20nam%20obcaecati%20error!%3C/p%3E', 'path': '/htmlx', 'name': '', 'type': 'html'},{ 'call': '', 'data': '%3Ch1%3EWelcome%3C/h1%3E%0A%3Cblockquote%3E%0A%3Cp%3Ewith%20markdown%20(powered%20by%20marked)%3C/p%3E%0A%3C/blockquote%3E%0A%3Ctable%3E%0A%3Cthead%3E%0A%3Ctr%3E%0A%3Cth%20align=%22right%22%3E%3C/th%3E%0A%3Cth%3E%3C/th%3E%0A%3C/tr%3E%0A%3C/thead%3E%0A%3Ctbody%3E%3Ctr%3E%0A%3Ctd%20align=%22right%22%3E%3Ca%20href=%22/about%22%3EAbout%3C/a%3E%3C/td%3E%0A%3Ctd%3EStatic%20generation%20(default)%3C/td%3E%0A%3C/tr%3E%0A%3Ctr%3E%0A%3Ctd%20align=%22right%22%3E%3Ca%20href=%22/clock%22%3EClock%3C/a%3E%3C/td%3E%0A%3Ctd%3EDynamic%20generation%20(with%20lazy)%3C/td%3E%0A%3C/tr%3E%0A%3Ctr%3E%0A%3Ctd%20align=%22right%22%3E%3Ca%20href=%22/htmlx%22%3EHTML-X%3C/a%3E%3C/td%3E%0A%3Ctd%3EHTML%20with%20JSX%20using%20link%5Btype=%22component%22%5D%3C/td%3E%0A%3C/tr%3E%0A%3Ctr%3E%0A%3Ctd%20align=%22right%22%3E%3Ca%20href=%22/system%22%3ESystem%3C/a%3E%3C/td%3E%0A%3Ctd%3EServer%20component%3C/td%3E%0A%3C/tr%3E%0A%3Ctr%3E%0A%3Ctd%20align=%22right%22%3E%3Ca%20href=%22/quotes%22%3EQuotes%3C/a%3E%3C/td%3E%0A%3Ctd%3EPeriodic%20genreation%3C/td%3E%0A%3C/tr%3E%0A%3Ctr%3E%0A%3Ctd%20align=%22right%22%3E%3Ca%20href=%22/counter%22%3ECounter%3C/a%3E%3C/td%3E%0A%3Ctd%3EClient%20component%3C/td%3E%0A%3C/tr%3E%0A%3Ctr%3E%0A%3Ctd%20align=%22right%22%3E%3Ca%20href=%22/hello%22%3EHello%3C/a%3E%3C/td%3E%0A%3Ctd%3EStateful%20object%20+%20data%20bind%20props%3C/td%3E%0A%3C/tr%3E%0A%3Ctr%3E%0A%3Ctd%20align=%22right%22%3E%3Ca%20href=%22/forms%22%3EForms%3C/a%3E%3C/td%3E%0A%3Ctd%3Ereactful%20forms%20+%20validation%20API%20+%20RESTful%20action%3C/td%3E%0A%3C/tr%3E%0A%3Ctr%3E%0A%3Ctd%20align=%22right%22%3E%3Ca%20href=%22/login%22%3ELogin%3C/a%3E%3C/td%3E%0A%3Ctd%3Ereactful%20forms%20RESTful%20action%20authentication%3C/td%3E%0A%3C/tr%3E%0A%3Ctr%3E%0A%3Ctd%20align=%22right%22%3E%3Ca%20href=%22/profile/123%22%3EProfile%3C/a%3E%3C/td%3E%0A%3Ctd%3EParametric%20(dynamic)%20routes%20with%20modular%20CSS%3C/td%3E%0A%3C/tr%3E%0A%3C/tbody%3E%3C/table%3E%0A', 'path': '/index', 'name': '', 'type': 'html'},{ 'call': '', 'data': '%3Cjsx%20tag=%22%22%20uid=%221%22%20own=%22default%22%20src=%22/mnt/b/Repositorios/reactful/prototype/routes/login%22%20hidden=%22%22%20class=%22default%22%3E%3Ch1%3E%3Ci%20class=%22bi%20bi-undefined%20bi-user%22%20title=%22%22%3E%3C/i%3ELogin%3C/h1%3E%3Cprogress%20hidden=%22%22%3Eloading...%3C/progress%3E%3Cform%20method=%22POST%22%20action=%22http://localhost:3000/api/auth%22%20bearer=%22access_token%22%3E%3Csection%20cols=%221%22%3E%3Clabel%3EUserName%3Cinput%20bind=%22username%22/%3E%3C/label%3E%3Clabel%3EPassWord%3Cinput%20type=%22password%22%20bind=%22password%22/%3E%3C/label%3E%3C/section%3E%3Cbutton%3ESubmit%3C/button%3E%3C/form%3E%3Cfieldset%3E%3Clegend%3EERROR%3C/legend%3E%3Cul%3E%3C/ul%3E%3C/fieldset%3E%3Cbr/%3E%3Cfieldset%20style=%22word-break:break-all%22%3E%3Clegend%3Etoken%3C/legend%3E%3C/fieldset%3E%3C/jsx%3E', 'path': '/login', 'name': '', 'type': 'html'},{ 'call': '', 'data': '%3Ch1%20tag=%22h1%22%20uid=%222%22%20class=%22default%22%3EProfile%3C/h1%3E%3Cjsx%20tag=%22Detail%22%20uid=%222%22%20own=%22default%22%20src=%22/mnt/b/Repositorios/reactful/prototype/routes/profile/detail%22%20hidden=%22%22%20class=%22default%22%3E%3Ch3%3EDetail%3C/h3%3EParametric%20value%20=%20%3Cb%3E%3C/b%3E%3Chr/%3E%3Cp%3Emodular%20CSS%20keep%20original%20color%3C/p%3E%3Cfieldset%3E%3Clegend%3EMode%3C/legend%3E%3Csection%3E%3Cbutton%20link=%22./developer%22%3Edeveloper%3C/button%3E%3Cbutton%20link=%22./manager%22%3Emanager%3C/button%3E%3Cbutton%20link=%22./tester%22%3Etester(component)%3C/button%3E%3C/section%3E%3Chr/%3E%3Csection%20route=%22./developer%22%3E%3Cb%3EDEVELOPER%3C/b%3E%20is%20Lorem%20ipsum%20dolor%20sit%20amet%20consectetur%20adipisicing%20elit.%20Aspernatur%20similique%20ipsa,%20molestiae%20numquam%20laudantium%20quod,%20aliquid%20soluta%20cumque%20placeat%20saepe%20mollitia%20sint%20consectetur%20labore%20consequatur%20pariatur%20praesentium%20animi.%20Obcaecati,%20nihil?%3C/section%3E%3Csection%20route=%22./manager%22%3E%3Cb%3EMANAGER%3C/b%3E%20is%20Lorem%20ipsum%20dolor%20sit%20amet%20consectetur%20adipisicing%20elit.%20Aspernatur%20similique%20ipsa,%20molestiae%20numquam%20laudantium%20quod,%20aliquid%20soluta%20cumque%20placeat%20saepe%20mollitia%20sint%20consectetur%20labore%20consequatur%20pariatur%20praesentium%20animi.%20Obcaecati,%20nihil?%3C/section%3E%3Cdiv%3E%3C/div%3E%3C/fieldset%3E%3C/jsx%3E%3Chr%20tag=%22hr%22%20uid=%222%22%20class=%22default%22/%3E%3Cp%20tag=%22p%22%20uid=%222%22%20class=%22default%22%3Emodular%20CSS%20chainging%20to%20red%3C/p%3E', 'path': '/profile/index', 'name': '', 'type': 'html'},{ 'call': '', 'data': '%3Ch1%20tag=%22h1%22%20uid=%222%22%20class=%22System%22%3EServer%20OS%3C/h1%3E%3Ch2%20tag=%22h2%22%20uid=%222%22%20class=%22System%22%3Eserver%20side%20information%3C/h2%3E%3Cpre%20tag=%22pre%22%20uid=%222%22%20class=%22System%22%3ELinux%3C!--%20--%3E%20%7C%20%3C!--%20--%3Ex64%3C!--%20--%3E%20%7C%20%3C!--%20--%3E5.15.133.1-microsoft-standard-WSL2%3C!--%20--%3E%20%3C/pre%3E%3Csection%20tag=%22section%22%20uid=%222%22%20class=%22System%22%20hidden=%22%22%3EDONT%20SHOW%20ME!%3C/section%3E', 'path': '/system', 'name': '', 'type': 'html'}];
|
63
|
+
globalThis[GLOBAL_KEY].context={
|
64
|
+
"ref": "",
|
65
|
+
"fails": [],
|
66
|
+
"store": {
|
67
|
+
"name": "ok"
|
68
|
+
},
|
69
|
+
"param": {},
|
70
|
+
"await": "",
|
71
|
+
"logon": ""
|
72
|
+
};
|
73
|
+
globalThis[GLOBAL_KEY].propers=[(props) => props?.shown === !1 ? { ...props, hidden: !0 } : props];
|
74
|
+
globalThis[GLOBAL_KEY].stylers={"/mnt/b/Repositorios/reactful/prototype/routes/forms/form.tsx":["/* form {\r\n gap: 20px;\r\n display: grid;\r\n grid-template-columns: repeat(2, 1fr);\r\n} */\r\n\r\ncode {\r\n padding: 10px;\r\n display: block;\r\n background: silver;\r\n}\r\n\r\nprogress { \r\n width: 100%;\r\n height: 30px; \r\n}\r\n\r\nprogress[value]::-webkit-progress-bar { border-radius: 0; }\r\nprogress[value]::-webkit-progress-value { border-radius: 0; }"],"/mnt/b/Repositorios/reactful/prototype/routes/profile/detail.tsx":["h1 {\n color: dimgrey;\n font-size: 1.7rem;\n}\n\nbutton {\n padding: 10px 20px;\n}\n\nbutton.routed {\n background: wheat;\n font-weight: bolder;\n}"],"/mnt/b/Repositorios/reactful/prototype/routes/profile/index.tsx":["h1 {\n color: #ffb300;\n}\n\np {\n color:red;\n}\n\n"]};
|
75
|
+
globalThis[GLOBAL_KEY].folders={"apis":"/apis","assets":"/assets","builds":"/builds","routes":"/routes","shares":"/shares","directives":"/directives","components":"/components"};
|
76
|
+
globalThis[GLOBAL_KEY].binding={"index":0,"count":0,"state":{},"react":{},"visit":[],"store":{},"ready":false};
|
@@ -0,0 +1,28 @@
|
|
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
|
+
<meta name="description" content="Home page">
|
7
|
+
<meta name="theme-color" content="#333">
|
8
|
+
<link rel="stylesheet" href="/assets/default.css">
|
9
|
+
<link rel="stylesheet" href="/assets/markdown.css">
|
10
|
+
<link rel="stylesheet" href="/assets/bootstrap-icons.css">
|
11
|
+
<link rel="manifest" href="/assets/manifest.json">
|
12
|
+
<title>Welcome</title>
|
13
|
+
<meta name='viewport' content='width=device-width, initial-scale=1.0' />
|
14
|
+
<meta name='description' content='Home page' />
|
15
|
+
<meta name='theme-color' content='#333' />
|
16
|
+
<meta name='title' content='Welcome' />
|
17
|
+
<script src='/mnt/b/Repositorios/reactful/prototype/builds/shared.js'></script>
|
18
|
+
<script type='module' src='/mnt/b/Repositorios/reactful/prototype/builds/bundle.js'></script></head>
|
19
|
+
<body>
|
20
|
+
<div id='root'>
|
21
|
+
<h1 tag="h1" uid="2" class="System">Server OS</h1>
|
22
|
+
<h2 tag="h2" uid="2" class="System">server side information</h2>
|
23
|
+
<pre tag="pre" uid="2"
|
24
|
+
class="System">Linux<!-- --> | <!-- -->x64<!-- --> | <!-- -->5.15.133.1-microsoft-standard-WSL2<!-- --> </pre>
|
25
|
+
<section tag="section" uid="2" class="System" hidden>DONT SHOW ME!</section>
|
26
|
+
</div>
|
27
|
+
</body>
|
28
|
+
</html>
|
@@ -1,7 +1,7 @@
|
|
1
|
-
import React from 'react'
|
2
|
-
|
3
|
-
export const Header = props => <>
|
4
|
-
<h1 style={{color:'wheat'}}>{ props.children || props.title }</h1>
|
5
|
-
</>
|
6
|
-
|
1
|
+
import React from 'react'
|
2
|
+
|
3
|
+
export const Header = props => <>
|
4
|
+
<h1 style={{color:'wheat'}}>{ props.children || props.title }</h1>
|
5
|
+
</>
|
6
|
+
|
7
7
|
export default { ok:true }
|
@@ -1,9 +1,9 @@
|
|
1
|
-
import React from "react"
|
2
|
-
|
3
|
-
interface Props {
|
4
|
-
name?: string
|
5
|
-
}
|
6
|
-
|
7
|
-
export const Hello = (props: Props) => <>
|
8
|
-
<h1>Hello { props.name || "World"} !</h1>
|
1
|
+
import React from "react"
|
2
|
+
|
3
|
+
interface Props {
|
4
|
+
name?: string
|
5
|
+
}
|
6
|
+
|
7
|
+
export const Hello = (props: Props) => <>
|
8
|
+
<h1>Hello { props.name || "World"} !</h1>
|
9
9
|
</>
|
@@ -1,11 +1,11 @@
|
|
1
|
-
import React from 'react'
|
2
|
-
|
3
|
-
interface Props {
|
4
|
-
id: string
|
5
|
-
size?: string
|
6
|
-
children?: string
|
7
|
-
}
|
8
|
-
|
9
|
-
export const Icon = ({ id, size, children }: Props) => <>
|
10
|
-
<i className={`bi bi-${size} bi-${id}`} title={children || ""}></i>
|
1
|
+
import React from 'react'
|
2
|
+
|
3
|
+
interface Props {
|
4
|
+
id: string
|
5
|
+
size?: string
|
6
|
+
children?: string
|
7
|
+
}
|
8
|
+
|
9
|
+
export const Icon = ({ id, size, children }: Props) => <>
|
10
|
+
<i className={`bi bi-${size} bi-${id}`} title={children || ""}></i>
|
11
11
|
</>
|
@@ -1,3 +1,3 @@
|
|
1
|
-
export * from './header'
|
2
|
-
export * from './hello'
|
1
|
+
export * from './header'
|
2
|
+
export * from './hello'
|
3
3
|
export * from './icon'
|
@@ -1,21 +1,21 @@
|
|
1
|
-
<!DOCTYPE html>
|
2
|
-
<html lang="en">
|
3
|
-
|
4
|
-
<head>
|
5
|
-
<meta charset="UTF-8">
|
6
|
-
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
7
|
-
|
8
|
-
<meta name="description" content="Home page" >
|
9
|
-
<meta name="theme-color" content="#333"/>
|
10
|
-
|
11
|
-
<link rel="stylesheet" href="/assets/
|
12
|
-
<link rel="stylesheet" href="/assets/markdown.css">
|
13
|
-
<link rel="stylesheet" href="/assets/
|
14
|
-
<link rel="manifest" href="/assets/manifest.json" />
|
15
|
-
|
16
|
-
<title>Welcome</title>
|
17
|
-
</head>
|
18
|
-
<body>
|
19
|
-
<div id="root"></div>
|
20
|
-
</body>
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html lang="en">
|
3
|
+
|
4
|
+
<head>
|
5
|
+
<meta charset="UTF-8">
|
6
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
7
|
+
|
8
|
+
<meta name="description" content="Home page" >
|
9
|
+
<meta name="theme-color" content="#333"/>
|
10
|
+
|
11
|
+
<link rel="stylesheet" href="/assets/default.css" />
|
12
|
+
<link rel="stylesheet" href="/assets/markdown.css">
|
13
|
+
<link rel="stylesheet" href="/assets/bootstrap-icons.css">
|
14
|
+
<link rel="manifest" href="/assets/manifest.json" />
|
15
|
+
|
16
|
+
<title>Welcome</title>
|
17
|
+
</head>
|
18
|
+
<body>
|
19
|
+
<div id="root"></div>
|
20
|
+
</body>
|
21
21
|
</html>
|
@@ -1,19 +1,19 @@
|
|
1
|
-
import React from "react"
|
2
|
-
import { shown } from './directives'
|
3
|
-
import
|
4
|
-
|
5
|
-
const storage = { name: "ok" }
|
6
|
-
|
7
|
-
await server("/routes", { failure, storage })
|
8
|
-
.inject(shown)
|
9
|
-
.render("#root")
|
10
|
-
|
11
|
-
function failure(status, errors) {
|
12
|
-
const children: any[] = errors.map((x, i) =>
|
13
|
-
React.createElement('li', { key: i.toString() }, x))
|
14
|
-
|
15
|
-
return React.createElement('div', {}, [
|
16
|
-
React.createElement('h1', {}, status),
|
17
|
-
React.createElement('ul', {}, children),
|
18
|
-
])
|
1
|
+
import React from "react"
|
2
|
+
import { shown } from './directives'
|
3
|
+
import server from "@reactful/server"
|
4
|
+
|
5
|
+
const storage = { name: "ok" }
|
6
|
+
|
7
|
+
await server("/routes", { failure, storage })
|
8
|
+
.inject(shown)
|
9
|
+
.render("#root")
|
10
|
+
|
11
|
+
function failure(status, errors) {
|
12
|
+
const children: any[] = errors.map((x, i) =>
|
13
|
+
React.createElement('li', { key: i.toString() }, x))
|
14
|
+
|
15
|
+
return React.createElement('div', {}, [
|
16
|
+
React.createElement('h1', {}, status),
|
17
|
+
React.createElement('ul', {}, children),
|
18
|
+
])
|
19
19
|
}
|
@@ -1,13 +1,13 @@
|
|
1
|
-
<head>
|
2
|
-
<title>About</title>
|
3
|
-
<meta name="description" content="About page">
|
4
|
-
</head>
|
5
|
-
<body>
|
6
|
-
<h1>About</h1>
|
7
|
-
<p>
|
8
|
-
Lorem ipsum dolor sit amet consectetur adipisicing elit.
|
9
|
-
Adipisci id eaque saepe ab numquam, nisi minus atque obcaecati,
|
10
|
-
dignissimos facere accusamus nihil ipsam repudiandae praesentium,
|
11
|
-
quia animi perspiciatis architecto fuga?
|
12
|
-
</p>
|
1
|
+
<head>
|
2
|
+
<title>About</title>
|
3
|
+
<meta name="description" content="About page">
|
4
|
+
</head>
|
5
|
+
<body>
|
6
|
+
<h1>About</h1>
|
7
|
+
<p>
|
8
|
+
Lorem ipsum dolor sit amet consectetur adipisicing elit.
|
9
|
+
Adipisci id eaque saepe ab numquam, nisi minus atque obcaecati,
|
10
|
+
dignissimos facere accusamus nihil ipsam repudiandae praesentium,
|
11
|
+
quia animi perspiciatis architecto fuga?
|
12
|
+
</p>
|
13
13
|
</body>
|
@@ -1,36 +1,32 @@
|
|
1
|
-
import React, { Suspense } from 'react'
|
2
|
-
import { server, seo
|
3
|
-
|
4
|
-
|
5
|
-
const
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
const
|
19
|
-
const {
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
<
|
25
|
-
<
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
return <>
|
34
|
-
<code><mark>async inner subcomponent !!!</mark></code>
|
35
|
-
</>
|
36
|
-
}
|
1
|
+
import React, { Suspense } from 'react'
|
2
|
+
import { server, seo } from '@reactful/client'
|
3
|
+
|
4
|
+
const loading = <h3>Loading content...</h3>
|
5
|
+
const address = "https://timeapi.io/api/Time/current/zone?timeZone=Europe/Amsterdam"
|
6
|
+
|
7
|
+
@server("dynamic")
|
8
|
+
@seo('Time Zone', 'Time zone clock...')
|
9
|
+
export default function(props: any) {
|
10
|
+
return <Suspense fallback={loading}>
|
11
|
+
<TimeZone />
|
12
|
+
</Suspense>
|
13
|
+
}
|
14
|
+
|
15
|
+
async function TimeZone() {
|
16
|
+
const response = await fetch(address)
|
17
|
+
const { year, month, day, hour, minute, seconds } = await response.json()
|
18
|
+
const time = `${hour}:${minute}:${seconds}`
|
19
|
+
const date = `${year}-${month}-${day}`
|
20
|
+
|
21
|
+
return <React.Fragment>
|
22
|
+
<h1>World Clock</h1>
|
23
|
+
<h2>Europe/Amistedan timezone</h2>
|
24
|
+
<h3 style={{color:'yellow'}}> {date} {time} </h3>
|
25
|
+
<h4 await={InnerAsyncComponent}>loading...</h4>
|
26
|
+
</React.Fragment>
|
27
|
+
}
|
28
|
+
|
29
|
+
export async function InnerAsyncComponent(props, feeds) {
|
30
|
+
await new Promise(promise => setTimeout(promise, 1000))
|
31
|
+
return <code><mark>async inner subcomponent !!!</mark></code>
|
32
|
+
}
|
@@ -1,12 +1,15 @@
|
|
1
1
|
import React from 'react'
|
2
|
-
import {
|
2
|
+
import { Header } from '../components';
|
3
|
+
import { seo, client } from '@reactful/client'
|
4
|
+
|
5
|
+
const complexDataForTest = { person: { name: 'john' } }
|
6
|
+
const functionProps = () => console.log('function props works!')
|
3
7
|
|
4
8
|
//@ts-ignore
|
5
9
|
@seo('Counter', '...')
|
6
10
|
export default (props: any) => <>
|
7
|
-
<
|
8
|
-
<CountButton />
|
9
|
-
|
11
|
+
<Header>Counter</Header>
|
12
|
+
<CountButton complex={complexDataForTest} onEvent={functionProps} />
|
10
13
|
<h6 shown={false}>DONT SHOW ME!</h6>
|
11
14
|
</>
|
12
15
|
|
@@ -15,7 +18,13 @@ export default (props: any) => <>
|
|
15
18
|
export function CountButton(props: any, feeds: any) {
|
16
19
|
function onClick() { props.count ||= 0; props.count++ }
|
17
20
|
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
+
if (props.onEvent) props.onEvent()
|
22
|
+
|
23
|
+
return <>
|
24
|
+
<button style={{ padding:'20px' }} onClick={onClick}>
|
25
|
+
COUNTED: <b>{ props.count || 0 }</b>
|
26
|
+
</button><hr />
|
27
|
+
tuple: <code>{ JSON.stringify(props.complex) }</code><br/>
|
28
|
+
event: <code>{ props.onEvent?.toString() || 'fails...' }</code>
|
29
|
+
</>
|
21
30
|
}
|
@@ -1,51 +1,50 @@
|
|
1
|
-
import React from "react"
|
2
|
-
import { client } from "@reactful/
|
3
|
-
import
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
<
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
<label>
|
17
|
-
<label>
|
18
|
-
<label>
|
19
|
-
|
20
|
-
|
21
|
-
<
|
22
|
-
<
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
<
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
if (
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
//
|
48
|
-
|
49
|
-
|
50
|
-
console.warn(errors)
|
1
|
+
import React from "react"
|
2
|
+
import { client } from "@reactful/client"
|
3
|
+
import "./form.css"
|
4
|
+
|
5
|
+
//@ts-ignore
|
6
|
+
@client(true)
|
7
|
+
export default (props, { fails: errors, await: awaits }: Feeds ) => <>
|
8
|
+
<h1>Uncontrolled Components</h1>
|
9
|
+
<progress hidden={!awaits} >test...</progress>
|
10
|
+
|
11
|
+
<form grid cols={2} method="post" data={props.user}
|
12
|
+
action="https://jsonplaceholder.typicode.com/posts1"
|
13
|
+
onValidate={onValidate} onSubmit={e => onSubmit(e)}>
|
14
|
+
|
15
|
+
<label>Name<input id="name" bind="name" /></label>
|
16
|
+
<label>Date<input type="date" bind="date" /></label>
|
17
|
+
<label>Work<input pattern="dev|test" bind="work" /></label>
|
18
|
+
<label>Mode<input validate={modeValidate} bind="mode" /></label>
|
19
|
+
|
20
|
+
<hr/><hr/>
|
21
|
+
<label>Accept?<input bind="term" type="checkbox" required /></label>
|
22
|
+
<button>Submit</button>
|
23
|
+
</form>
|
24
|
+
|
25
|
+
|
26
|
+
<fieldset shown={!!errors?.length}>
|
27
|
+
<legend>ERROR</legend>
|
28
|
+
<ul>{ errors?.map(x => <li>{ x.error }</li>) }</ul>
|
29
|
+
</fieldset>
|
30
|
+
</>
|
31
|
+
|
32
|
+
function modeValidate(value: string) {
|
33
|
+
console.log('modeValidate', value)
|
34
|
+
if (!value) return 'Mode is required!'
|
35
|
+
if (value.match(/\d+/)) return 'Mode is non-numerical!'
|
36
|
+
return ''
|
37
|
+
}
|
38
|
+
|
39
|
+
function onSubmit(e) {
|
40
|
+
// after submited validation (feeds)
|
41
|
+
console.log('after form submit', e)
|
42
|
+
|
43
|
+
}
|
44
|
+
|
45
|
+
async function onValidate(errors: Invalid[]) {
|
46
|
+
// add some async custom invalidations
|
47
|
+
// ex.: errors.push({field:'*', error:'some error', value:''})
|
48
|
+
|
49
|
+
console.warn(errors)
|
51
50
|
}
|