@webqit/webflo 0.20.34 → 0.20.36

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (122) hide show
  1. package/package.json +9 -3
  2. package/src/index.js +7 -7
  3. package/src/{build-pi → webflo-build}/index.js +4 -4
  4. package/src/{config-pi → webflo-config}/deployment/Env.js +0 -4
  5. package/src/{config-pi → webflo-config}/deployment/Layout.js +0 -4
  6. package/src/{config-pi → webflo-config}/deployment/Origins.js +0 -4
  7. package/src/{config-pi → webflo-config}/deployment/Proxy.js +0 -4
  8. package/src/{config-pi → webflo-config}/deployment/index.js +0 -7
  9. package/src/{config-pi → webflo-config}/index.js +0 -7
  10. package/src/{config-pi → webflo-config}/static/Init.js +0 -4
  11. package/src/{config-pi → webflo-config}/static/Manifest.js +0 -4
  12. package/src/{config-pi → webflo-config}/static/Ssg.js +0 -4
  13. package/src/{config-pi → webflo-config}/static/index.js +0 -7
  14. package/src/{deployment-pi → webflo-deployment}/index.js +0 -7
  15. package/src/{deployment-pi → webflo-deployment}/origins/index.js +0 -13
  16. package/src/webflo-exports/ui/index.js +1 -0
  17. package/src/{init-pi → webflo-init}/index.js +1 -1
  18. package/src/webflo-runtime/webflo-client/DeviceViewport.js +173 -0
  19. package/src/{runtime-pi → webflo-runtime}/webflo-client/WebfloClient.js +0 -65
  20. package/src/{runtime-pi → webflo-runtime}/webflo-client/WebfloRootClientA.js +14 -4
  21. package/src/{runtime-pi → webflo-runtime}/webflo-client/bootstrap.js +1 -1
  22. package/src/{runtime-pi → webflo-runtime}/webflo-client/webflo-elements.js +210 -130
  23. package/src/webflo-runtime/webflo-client/webflo-embedded.js +56 -0
  24. package/src/{runtime-pi → webflo-runtime}/webflo-server/WebfloServer.js +1 -1
  25. package/src/{runtime-pi → webflo-runtime}/webflo-server/bootstrap.js +1 -1
  26. package/src/{runtime-pi → webflo-runtime}/webflo-worker/bootstrap.js +1 -1
  27. package/src/{services-pi → webflo-services}/cert/http-auth-hook.js +1 -1
  28. package/test/browser/elements.src.build.js +1239 -0
  29. package/test/browser/elements.src.build.js.map +7 -0
  30. package/test/browser/elements.src.js +3 -0
  31. package/test/browser/index.html +419 -0
  32. package/src/runtime-pi/webflo-client/webflo-embedded.js +0 -54
  33. package/test/index.test.js +0 -26
  34. package/test/site/package.json +0 -9
  35. package/test/site/public/bundle.html +0 -6
  36. package/test/site/public/bundle.html.json +0 -4
  37. package/test/site/public/bundle.js +0 -2
  38. package/test/site/public/bundle.js.gz +0 -0
  39. package/test/site/public/bundle.webflo.js +0 -15
  40. package/test/site/public/bundle.webflo.js.gz +0 -0
  41. package/test/site/public/index.html +0 -30
  42. package/test/site/public/index1.html +0 -35
  43. package/test/site/public/page-2/bundle.html +0 -5
  44. package/test/site/public/page-2/bundle.html.json +0 -1
  45. package/test/site/public/page-2/bundle.js +0 -2
  46. package/test/site/public/page-2/bundle.js.gz +0 -0
  47. package/test/site/public/page-2/index.html +0 -46
  48. package/test/site/public/page-2/logo-130x130.png +0 -0
  49. package/test/site/public/page-2/main.html +0 -3
  50. package/test/site/public/page-3/logo-130x130.png +0 -0
  51. package/test/site/public/page-4/subpage/bundle.html.json +0 -1
  52. package/test/site/public/page-4/subpage/bundle.js +0 -2
  53. package/test/site/public/page-4/subpage/bundle.js.gz +0 -0
  54. package/test/site/public/page-4/subpage/index.html +0 -31
  55. package/test/site/public/sparoots.json +0 -5
  56. package/test/site/public/worker.js +0 -3
  57. package/test/site/public/worker.js.gz +0 -0
  58. package/test/site/server/index.js +0 -16
  59. /package/src/{build-pi → webflo-build}/esbuild-plugin-uselive-transform.js +0 -0
  60. /package/src/{config-pi → webflo-config}/runtime/Client.js +0 -0
  61. /package/src/{config-pi → webflo-config}/runtime/Server.js +0 -0
  62. /package/src/{config-pi → webflo-config}/runtime/client/Worker.js +0 -0
  63. /package/src/{config-pi → webflo-config}/runtime/client/index.js +0 -0
  64. /package/src/{config-pi → webflo-config}/runtime/index.js +0 -0
  65. /package/src/{config-pi → webflo-config}/runtime/server/Headers.js +0 -0
  66. /package/src/{config-pi → webflo-config}/runtime/server/Redirects.js +0 -0
  67. /package/src/{config-pi → webflo-config}/runtime/server/index.js +0 -0
  68. /package/src/{deployment-pi → webflo-deployment}/util.js +0 -0
  69. /package/{test/site/public/page-4/subpage/bundle.html → src/webflo-exports/index.js} +0 -0
  70. /package/src/{init-pi → webflo-init}/templates/pwa/.gitignore +0 -0
  71. /package/src/{init-pi → webflo-init}/templates/pwa/.webqit/webflo/client.json +0 -0
  72. /package/src/{init-pi → webflo-init}/templates/pwa/.webqit/webflo/layout.json +0 -0
  73. /package/src/{init-pi → webflo-init}/templates/pwa/app/handler.server.js +0 -0
  74. /package/src/{init-pi → webflo-init}/templates/pwa/app/page.html +0 -0
  75. /package/src/{init-pi → webflo-init}/templates/pwa/package.json +0 -0
  76. /package/src/{init-pi → webflo-init}/templates/pwa/public/assets/app.css +0 -0
  77. /package/src/{init-pi → webflo-init}/templates/pwa/public/index.html +0 -0
  78. /package/src/{init-pi → webflo-init}/templates/pwa/public/manifest.json +0 -0
  79. /package/src/{init-pi → webflo-init}/templates/web/.gitignore +0 -0
  80. /package/src/{init-pi → webflo-init}/templates/web/.webqit/webflo/client.json +0 -0
  81. /package/src/{init-pi → webflo-init}/templates/web/.webqit/webflo/layout.json +0 -0
  82. /package/src/{init-pi → webflo-init}/templates/web/app/handler.server.js +0 -0
  83. /package/src/{init-pi → webflo-init}/templates/web/app/page.html +0 -0
  84. /package/src/{init-pi → webflo-init}/templates/web/package.json +0 -0
  85. /package/src/{init-pi → webflo-init}/templates/web/public/assets/app.css +0 -0
  86. /package/src/{init-pi → webflo-init}/templates/web/public/index.html +0 -0
  87. /package/src/{runtime-pi → webflo-runtime}/AppBootstrap.js +0 -0
  88. /package/src/{runtime-pi → webflo-runtime}/AppRuntime.js +0 -0
  89. /package/src/{runtime-pi → webflo-runtime}/index.js +0 -0
  90. /package/src/{runtime-pi → webflo-runtime}/webflo-client/ClientSideWorkport.js +0 -0
  91. /package/src/{runtime-pi → webflo-runtime}/webflo-client/DeviceCapabilities.js +0 -0
  92. /package/src/{runtime-pi → webflo-runtime}/webflo-client/WebfloRootClientB.js +0 -0
  93. /package/src/{runtime-pi → webflo-runtime}/webflo-client/WebfloSubClient.js +0 -0
  94. /package/src/{runtime-pi → webflo-runtime}/webflo-client/index.js +0 -0
  95. /package/src/{runtime-pi → webflo-runtime}/webflo-client/webflo-devmode.js +0 -0
  96. /package/src/{runtime-pi → webflo-runtime}/webflo-messaging/ClientPortMixin.js +0 -0
  97. /package/src/{runtime-pi → webflo-runtime}/webflo-messaging/ClientRequestPort001.js +0 -0
  98. /package/src/{runtime-pi → webflo-runtime}/webflo-messaging/ClientRequestPort010.js +0 -0
  99. /package/src/{runtime-pi → webflo-runtime}/webflo-messaging/ClientRequestPort100.js +0 -0
  100. /package/src/{runtime-pi → webflo-runtime}/webflo-messaging/WebfloTenancy001.js +0 -0
  101. /package/src/{runtime-pi → webflo-runtime}/webflo-messaging/WebfloTenant001.js +0 -0
  102. /package/src/{runtime-pi → webflo-runtime}/webflo-routing/HttpCookies101.js +0 -0
  103. /package/src/{runtime-pi → webflo-runtime}/webflo-routing/HttpCookies110.js +0 -0
  104. /package/src/{runtime-pi → webflo-runtime}/webflo-routing/HttpEvent111.js +0 -0
  105. /package/src/{runtime-pi → webflo-runtime}/webflo-routing/HttpKeyvalInterface.js +0 -0
  106. /package/src/{runtime-pi → webflo-runtime}/webflo-routing/HttpSession001.js +0 -0
  107. /package/src/{runtime-pi → webflo-runtime}/webflo-routing/HttpSession110.js +0 -0
  108. /package/src/{runtime-pi → webflo-runtime}/webflo-routing/HttpThread111.js +0 -0
  109. /package/src/{runtime-pi → webflo-runtime}/webflo-routing/HttpUser111.js +0 -0
  110. /package/src/{runtime-pi → webflo-runtime}/webflo-routing/KeyvalsFactory001.js +0 -0
  111. /package/src/{runtime-pi → webflo-runtime}/webflo-routing/KeyvalsFactory110.js +0 -0
  112. /package/src/{runtime-pi → webflo-runtime}/webflo-routing/KeyvalsFactoryInterface.js +0 -0
  113. /package/src/{runtime-pi → webflo-runtime}/webflo-routing/WebfloRouter111.js +0 -0
  114. /package/src/{runtime-pi → webflo-runtime}/webflo-server/index.js +0 -0
  115. /package/src/{runtime-pi → webflo-runtime}/webflo-server/webflo-devmode.js +0 -0
  116. /package/src/{runtime-pi → webflo-runtime}/webflo-worker/WebfloWorker.js +0 -0
  117. /package/src/{runtime-pi → webflo-runtime}/webflo-worker/WorkerSideWorkport.js +0 -0
  118. /package/src/{runtime-pi → webflo-runtime}/webflo-worker/index.js +0 -0
  119. /package/src/{services-pi → webflo-services}/cert/http-cleanup-hook.js +0 -0
  120. /package/src/{services-pi → webflo-services}/cert/index.js +0 -0
  121. /package/src/{services-pi → webflo-services}/index.js +0 -0
  122. /package/src/{services-pi → webflo-services}/push/index.js +0 -0
@@ -1,54 +0,0 @@
1
- import { WebfloSubClient } from './WebfloSubClient.js';
2
-
3
- export function defineElement() {
4
- const embedTagName = 'webflo-embedded';
5
-
6
- window.customElements.define(embedTagName, class extends HTMLElement {
7
-
8
- #superRuntime;
9
- #lifecycleController;
10
- #location;
11
- #reflectAction;
12
-
13
- static get observedAttributes() { return ['location']; }
14
-
15
- get location() {
16
- if (!this.#location) {
17
- this.#location = new URL(this.getAttribute('location') || '', window.location.origin);
18
- }
19
- return this.#location;
20
- }
21
-
22
- set location(value) {
23
- if (!(value instanceof URL)) {
24
- value = new URL(value, window.location.origin);
25
- }
26
- if (value.href === this.location.href) return;
27
- this.#location = value;
28
- this.setAttribute('location', value.href.replace(value.origin, ''));
29
- if (!this.#reflectAction) {
30
- this.webfloRuntime.navigate(value);
31
- }
32
- }
33
-
34
- reflectLocation(location) {
35
- this.#reflectAction = true;
36
- this.location = location;
37
- this.#reflectAction = false;
38
- }
39
-
40
- attributeChangedCallback(name, oldValue, newValue) {
41
- if (oldValue === newValue) return;
42
- this.location = newValue;
43
- }
44
-
45
- async connectedCallback() {
46
- this.#superRuntime = (this.parentNode?.closest(embedTagName) || document).webfloRuntime;
47
- this.#lifecycleController = await WebfloSubClient.create(this.#superRuntime, this).initialize();
48
- }
49
-
50
- disconnectedCallback() {
51
- this.#lifecycleController.abort();
52
- }
53
- });
54
- }
@@ -1,26 +0,0 @@
1
-
2
- /**
3
- * @imports
4
- */
5
- import { config, runtime, Context } from '../src/index.js';
6
-
7
- let client = {
8
- handle: function( httpEvent ) {
9
- return new httpEvent.Response({ abcd: '1234' }, {
10
- status: 302,
11
- headers: {
12
- //location: '/dddd',
13
- cookies: {
14
- cookie1: { value: 'value1' },
15
- cookie2: { value: 'value2' },
16
- }
17
- }
18
- });
19
- },
20
- };
21
-
22
- const cx = Context.create( { config: config, } );
23
- const clientCallback = ( _cx, hostName, defaultClientCallback ) => client;
24
- const app = await runtime.server.start.call( cx, clientCallback );
25
-
26
- const response = await app.go( 'http://localhost/', { headers: { range: 'bytes=0-5, 6' } } );
@@ -1,9 +0,0 @@
1
- {
2
- "title": "Webflo Test",
3
- "type": "module",
4
- "scripts": {
5
- "generate": "webflo generate::client --recursive --compression --auto-embed",
6
- "bundle": "cd public && oohtml bundle --recursive --auto-embed=routes",
7
- "build": "npm run generate && npm run bundle"
8
- }
9
- }
@@ -1,6 +0,0 @@
1
-
2
- <template def="page-3">
3
- <img src="/logo-130x130.png" def="logo-130x130.png" />
4
- </template>
5
- <template def="page-4">
6
- </template>
@@ -1,4 +0,0 @@
1
- {
2
- "page-3": {},
3
- "page-4": {}
4
- }
@@ -1,2 +0,0 @@
1
- /** @webqit/webflo */
2
- var{start:e}=WebQit.Webflo,r={},o={bundle_filename:"bundle.js",public_base_url:"/",spa_routing:!0,oohtml_support:"full",service_worker_support:!0,worker_scope:"/",worker_filename:"worker.js",routing:{root:"/",subroots:["/page-2","/page-4/subpage"],targets:2}};e.call({layout:r,params:o});
Binary file