Skip to content

Commit

Permalink
Embeddable controls
Browse files Browse the repository at this point in the history
  • Loading branch information
seanmorris committed Oct 22, 2024
1 parent 6fff4d8 commit e011e25
Show file tree
Hide file tree
Showing 13 changed files with 31 additions and 15 deletions.
10 changes: 10 additions & 0 deletions demo-web/src/InstallDemo.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,16 @@ import BackIcon from './icons/back-icon-32.png'
import WwwIcon from './icons/www-icon-32.png'
import editorIcon from './icons/editor-icon-32.png';

navigator.serviceWorker.register(process.env.PUBLIC_URL + `/cgi-worker.js`);
setTimeout(() => {
if(!(navigator.serviceWorker && navigator.serviceWorker.controller))
{
window.location.reload()
}
}, 350);

(navigator.serviceWorker && navigator.serviceWorker.controller) || window.location.reload();

const sendMessage = sendMessageFor((`${window.location.origin}${process.env.PUBLIC_URL}/cgi-worker.mjs`))

const packages = {
Expand Down
8 changes: 7 additions & 1 deletion demo-web/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,14 @@ const params = new URLSearchParams(window.location.search);
if(!params.has('no-service-worker'))
{
navigator.serviceWorker.register(process.env.PUBLIC_URL + `/cgi-worker.js`);
setTimeout(() => {
if(!(navigator.serviceWorker && navigator.serviceWorker.controller))
{
window.location.reload()
}
}, 350);

navigator.serviceWorker.addEventListener('message', onMessage);
setTimeout(() => navigator.serviceWorker.controller || window.location.reload(), 350);
}

const root = ReactDOM.createRoot(document.getElementById('root'));
Expand Down
2 changes: 1 addition & 1 deletion docs/404.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!doctype html><html lang="en"><head><meta charset="utf-8"/><link rel="icon" href="/php-wasm/favicon.ico"/><meta name="viewport" content="width=650,user-scalable=no"/><meta name="theme-color" content="#000000"/><meta name="description" content="Web site created using create-react-app"/><link rel="apple-touch-icon" href="/php-wasm/logo192.png"/><link rel="manifest" href="/php-wasm/manifest.json"/><title>php-wasm</title><script type="text/javascript" src="https://unpkg.com/curvature@0.0.68-h/dist/curvature.js"></script><script defer="defer" src="/php-wasm/static/js/main.470b598f.js"></script><link href="/php-wasm/static/css/main.4226f89c.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div></body></html><!--
<!doctype html><html lang="en"><head><meta charset="utf-8"/><link rel="icon" href="/php-wasm/favicon.ico"/><meta name="viewport" content="width=650,user-scalable=no"/><meta name="theme-color" content="#000000"/><meta name="description" content="Web site created using create-react-app"/><link rel="apple-touch-icon" href="/php-wasm/logo192.png"/><link rel="manifest" href="/php-wasm/manifest.json"/><title>php-wasm</title><script type="text/javascript" src="https://unpkg.com/curvature@0.0.68-h/dist/curvature.js"></script><script defer="defer" src="/php-wasm/static/js/main.e97dccb8.js"></script><link href="/php-wasm/static/css/main.4226f89c.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div></body></html><!--
sssooo+++++++///////++++//:----:::::///////:::::::///+ossssssyyyhdddddmmmmNNmo`````````````````````-
soooo+//////::::::::////:-....-----::::::----------:/+ossyyyyhdhddmmmmNNMNNNN: .
soo++//:::---------:://::-----..------.-.........--:/+ossyyhddmmddmmNNNNMMNNm. .
Expand Down
6 changes: 3 additions & 3 deletions docs/asset-manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"files": {
"main.css": "/php-wasm/static/css/main.4226f89c.css",
"main.js": "/php-wasm/static/js/main.470b598f.js",
"main.js": "/php-wasm/static/js/main.e97dccb8.js",
"static/js/835.ba3f1ffc.chunk.js": "/php-wasm/static/js/835.ba3f1ffc.chunk.js",
"static/js/97.c6261c0f.chunk.js": "/php-wasm/static/js/97.c6261c0f.chunk.js",
"static/js/330.c76e5618.chunk.js": "/php-wasm/static/js/330.c76e5618.chunk.js",
Expand Down Expand Up @@ -503,13 +503,13 @@
"d.js": "/php-wasm/c98e74fc97b04fe8bf43dcdff549afcf.js",
"mode-text.js": "/php-wasm/0ffb18fb70c87335edee31a479f58a43.js",
"main.4226f89c.css.map": "/php-wasm/static/css/main.4226f89c.css.map",
"main.470b598f.js.map": "/php-wasm/static/js/main.470b598f.js.map",
"main.e97dccb8.js.map": "/php-wasm/static/js/main.e97dccb8.js.map",
"331.875cb278.chunk.js.map": "/php-wasm/static/js/331.875cb278.chunk.js.map",
"45.cc3e5604.chunk.js.map": "/php-wasm/static/js/45.cc3e5604.chunk.js.map",
"450.5d59c362.chunk.js.map": "/php-wasm/static/js/450.5d59c362.chunk.js.map"
},
"entrypoints": [
"static/css/main.4226f89c.css",
"static/js/main.470b598f.js"
"static/js/main.e97dccb8.js"
]
}
2 changes: 1 addition & 1 deletion docs/code-editor.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!doctype html><html lang="en"><head><meta charset="utf-8"/><link rel="icon" href="/php-wasm/favicon.ico"/><meta name="viewport" content="width=650,user-scalable=no"/><meta name="theme-color" content="#000000"/><meta name="description" content="Web site created using create-react-app"/><link rel="apple-touch-icon" href="/php-wasm/logo192.png"/><link rel="manifest" href="/php-wasm/manifest.json"/><title>php-wasm</title><script type="text/javascript" src="https://unpkg.com/curvature@0.0.68-h/dist/curvature.js"></script><script defer="defer" src="/php-wasm/static/js/main.470b598f.js"></script><link href="/php-wasm/static/css/main.4226f89c.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div></body></html><!--
<!doctype html><html lang="en"><head><meta charset="utf-8"/><link rel="icon" href="/php-wasm/favicon.ico"/><meta name="viewport" content="width=650,user-scalable=no"/><meta name="theme-color" content="#000000"/><meta name="description" content="Web site created using create-react-app"/><link rel="apple-touch-icon" href="/php-wasm/logo192.png"/><link rel="manifest" href="/php-wasm/manifest.json"/><title>php-wasm</title><script type="text/javascript" src="https://unpkg.com/curvature@0.0.68-h/dist/curvature.js"></script><script defer="defer" src="/php-wasm/static/js/main.e97dccb8.js"></script><link href="/php-wasm/static/css/main.4226f89c.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div></body></html><!--
sssooo+++++++///////++++//:----:::::///////:::::::///+ossssssyyyhdddddmmmmNNmo`````````````````````-
soooo+//////::::::::////:-....-----::::::----------:/+ossyyyyhdhddmmmmNNMNNNN: .
soo++//:::---------:://::-----..------.-.........--:/+ossyyhddmmddmmNNNNMMNNm. .
Expand Down
2 changes: 1 addition & 1 deletion docs/embedded-php.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!doctype html><html lang="en"><head><meta charset="utf-8"/><link rel="icon" href="/php-wasm/favicon.ico"/><meta name="viewport" content="width=650,user-scalable=no"/><meta name="theme-color" content="#000000"/><meta name="description" content="Web site created using create-react-app"/><link rel="apple-touch-icon" href="/php-wasm/logo192.png"/><link rel="manifest" href="/php-wasm/manifest.json"/><title>php-wasm</title><script type="text/javascript" src="https://unpkg.com/curvature@0.0.68-h/dist/curvature.js"></script><script defer="defer" src="/php-wasm/static/js/main.470b598f.js"></script><link href="/php-wasm/static/css/main.4226f89c.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div></body></html><!--
<!doctype html><html lang="en"><head><meta charset="utf-8"/><link rel="icon" href="/php-wasm/favicon.ico"/><meta name="viewport" content="width=650,user-scalable=no"/><meta name="theme-color" content="#000000"/><meta name="description" content="Web site created using create-react-app"/><link rel="apple-touch-icon" href="/php-wasm/logo192.png"/><link rel="manifest" href="/php-wasm/manifest.json"/><title>php-wasm</title><script type="text/javascript" src="https://unpkg.com/curvature@0.0.68-h/dist/curvature.js"></script><script defer="defer" src="/php-wasm/static/js/main.e97dccb8.js"></script><link href="/php-wasm/static/css/main.4226f89c.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div></body></html><!--
sssooo+++++++///////++++//:----:::::///////:::::::///+ossssssyyyhdddddmmmmNNmo`````````````````````-
soooo+//////::::::::////:-....-----::::::----------:/+ossyyyyhdhddmmmmNNMNNNN: .
soo++//:::---------:://::-----..------.-.........--:/+ossyyhddmmddmmNNNNMMNNm. .
Expand Down
2 changes: 1 addition & 1 deletion docs/home.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!doctype html><html lang="en"><head><meta charset="utf-8"/><link rel="icon" href="/php-wasm/favicon.ico"/><meta name="viewport" content="width=650,user-scalable=no"/><meta name="theme-color" content="#000000"/><meta name="description" content="Web site created using create-react-app"/><link rel="apple-touch-icon" href="/php-wasm/logo192.png"/><link rel="manifest" href="/php-wasm/manifest.json"/><title>php-wasm</title><script type="text/javascript" src="https://unpkg.com/curvature@0.0.68-h/dist/curvature.js"></script><script defer="defer" src="/php-wasm/static/js/main.470b598f.js"></script><link href="/php-wasm/static/css/main.4226f89c.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div></body></html><!--
<!doctype html><html lang="en"><head><meta charset="utf-8"/><link rel="icon" href="/php-wasm/favicon.ico"/><meta name="viewport" content="width=650,user-scalable=no"/><meta name="theme-color" content="#000000"/><meta name="description" content="Web site created using create-react-app"/><link rel="apple-touch-icon" href="/php-wasm/logo192.png"/><link rel="manifest" href="/php-wasm/manifest.json"/><title>php-wasm</title><script type="text/javascript" src="https://unpkg.com/curvature@0.0.68-h/dist/curvature.js"></script><script defer="defer" src="/php-wasm/static/js/main.e97dccb8.js"></script><link href="/php-wasm/static/css/main.4226f89c.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div></body></html><!--
sssooo+++++++///////++++//:----:::::///////:::::::///+ossssssyyyhdddddmmmmNNmo`````````````````````-
soooo+//////::::::::////:-....-----::::::----------:/+ossyyyyhdhddmmmmNNMNNNN: .
soo++//:::---------:://::-----..------.-.........--:/+ossyyhddmmddmmNNNNMMNNm. .
Expand Down
2 changes: 1 addition & 1 deletion docs/index.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!doctype html><html lang="en"><head><meta charset="utf-8"/><link rel="icon" href="/php-wasm/favicon.ico"/><meta name="viewport" content="width=650,user-scalable=no"/><meta name="theme-color" content="#000000"/><meta name="description" content="Web site created using create-react-app"/><link rel="apple-touch-icon" href="/php-wasm/logo192.png"/><link rel="manifest" href="/php-wasm/manifest.json"/><title>php-wasm</title><script type="text/javascript" src="https://unpkg.com/curvature@0.0.68-h/dist/curvature.js"></script><script defer="defer" src="/php-wasm/static/js/main.470b598f.js"></script><link href="/php-wasm/static/css/main.4226f89c.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div></body></html><!--
<!doctype html><html lang="en"><head><meta charset="utf-8"/><link rel="icon" href="/php-wasm/favicon.ico"/><meta name="viewport" content="width=650,user-scalable=no"/><meta name="theme-color" content="#000000"/><meta name="description" content="Web site created using create-react-app"/><link rel="apple-touch-icon" href="/php-wasm/logo192.png"/><link rel="manifest" href="/php-wasm/manifest.json"/><title>php-wasm</title><script type="text/javascript" src="https://unpkg.com/curvature@0.0.68-h/dist/curvature.js"></script><script defer="defer" src="/php-wasm/static/js/main.e97dccb8.js"></script><link href="/php-wasm/static/css/main.4226f89c.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div></body></html><!--
sssooo+++++++///////++++//:----:::::///////:::::::///+ossssssyyyhdddddmmmmNNmo`````````````````````-
soooo+//////::::::::////:-....-----::::::----------:/+ossyyyyhdhddmmmmNNMNNNN: .
soo++//:::---------:://::-----..------.-.........--:/+ossyyhddmmddmmNNNNMMNNm. .
Expand Down
2 changes: 1 addition & 1 deletion docs/install-demo.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!doctype html><html lang="en"><head><meta charset="utf-8"/><link rel="icon" href="/php-wasm/favicon.ico"/><meta name="viewport" content="width=650,user-scalable=no"/><meta name="theme-color" content="#000000"/><meta name="description" content="Web site created using create-react-app"/><link rel="apple-touch-icon" href="/php-wasm/logo192.png"/><link rel="manifest" href="/php-wasm/manifest.json"/><title>php-wasm</title><script type="text/javascript" src="https://unpkg.com/curvature@0.0.68-h/dist/curvature.js"></script><script defer="defer" src="/php-wasm/static/js/main.470b598f.js"></script><link href="/php-wasm/static/css/main.4226f89c.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div></body></html><!--
<!doctype html><html lang="en"><head><meta charset="utf-8"/><link rel="icon" href="/php-wasm/favicon.ico"/><meta name="viewport" content="width=650,user-scalable=no"/><meta name="theme-color" content="#000000"/><meta name="description" content="Web site created using create-react-app"/><link rel="apple-touch-icon" href="/php-wasm/logo192.png"/><link rel="manifest" href="/php-wasm/manifest.json"/><title>php-wasm</title><script type="text/javascript" src="https://unpkg.com/curvature@0.0.68-h/dist/curvature.js"></script><script defer="defer" src="/php-wasm/static/js/main.e97dccb8.js"></script><link href="/php-wasm/static/css/main.4226f89c.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div></body></html><!--
sssooo+++++++///////++++//:----:::::///////:::::::///+ossssssyyyhdddddmmmmNNmo`````````````````````-
soooo+//////::::::::////:-....-----::::::----------:/+ossyyyyhdhddmmmmNNMNNNN: .
soo++//:::---------:://::-----..------.-.........--:/+ossyyhddmmddmmNNNNMMNNm. .
Expand Down
2 changes: 1 addition & 1 deletion docs/select-framework.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!doctype html><html lang="en"><head><meta charset="utf-8"/><link rel="icon" href="/php-wasm/favicon.ico"/><meta name="viewport" content="width=650,user-scalable=no"/><meta name="theme-color" content="#000000"/><meta name="description" content="Web site created using create-react-app"/><link rel="apple-touch-icon" href="/php-wasm/logo192.png"/><link rel="manifest" href="/php-wasm/manifest.json"/><title>php-wasm</title><script type="text/javascript" src="https://unpkg.com/curvature@0.0.68-h/dist/curvature.js"></script><script defer="defer" src="/php-wasm/static/js/main.470b598f.js"></script><link href="/php-wasm/static/css/main.4226f89c.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div></body></html><!--
<!doctype html><html lang="en"><head><meta charset="utf-8"/><link rel="icon" href="/php-wasm/favicon.ico"/><meta name="viewport" content="width=650,user-scalable=no"/><meta name="theme-color" content="#000000"/><meta name="description" content="Web site created using create-react-app"/><link rel="apple-touch-icon" href="/php-wasm/logo192.png"/><link rel="manifest" href="/php-wasm/manifest.json"/><title>php-wasm</title><script type="text/javascript" src="https://unpkg.com/curvature@0.0.68-h/dist/curvature.js"></script><script defer="defer" src="/php-wasm/static/js/main.e97dccb8.js"></script><link href="/php-wasm/static/css/main.4226f89c.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div></body></html><!--
sssooo+++++++///////++++//:----:::::///////:::::::///+ossssssyyyhdddddmmmmNNmo`````````````````````-
soooo+//////::::::::////:-....-----::::::----------:/+ossyyyyhdhddmmmmNNMNNNN: .
soo++//:::---------:://::-----..------.-.........--:/+ossyyhddmmddmmNNNNMMNNm. .
Expand Down

Large diffs are not rendered by default.

File renamed without changes.

Large diffs are not rendered by default.

0 comments on commit e011e25

Please sign in to comment.