@fluixi/dom 1.0.0-alpha.83 → 1.0.0-alpha.85

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 (182) hide show
  1. package/dist/cdn/dom-client.cjs +1427 -1
  2. package/dist/cdn/dom-client.d.ts +2 -2
  3. package/dist/cdn/dom-client.global.js +2 -1
  4. package/dist/cdn/dom-client.js +3 -3
  5. package/dist/cdn/dom-client.mjs +1430 -1
  6. package/dist/cdn/dom.cjs +3127 -1
  7. package/dist/cdn/dom.d.ts +2 -2
  8. package/dist/cdn/dom.global.js +2 -1
  9. package/dist/cdn/dom.js +4 -4
  10. package/dist/cdn/dom.mjs +3133 -1
  11. package/dist/index.cjs +3155 -1
  12. package/dist/index.js +2 -2
  13. package/dist/index.mjs +3149 -1
  14. package/dist/lib/component/index.cjs +128 -1
  15. package/dist/lib/component/index.mjs +105 -1
  16. package/dist/lib/component/modifiers.cjs +126 -1
  17. package/dist/lib/component/modifiers.d.ts +12 -0
  18. package/dist/lib/component/modifiers.d.ts.map +1 -1
  19. package/dist/lib/component/modifiers.js +12 -84
  20. package/dist/lib/component/modifiers.mjs +105 -1
  21. package/dist/lib/dom/delegate.cjs +60 -1
  22. package/dist/lib/dom/delegate.js +1 -1
  23. package/dist/lib/dom/delegate.mjs +39 -1
  24. package/dist/lib/dom/dynamic-element.cjs +949 -1
  25. package/dist/lib/dom/dynamic-element.d.ts +3 -3
  26. package/dist/lib/dom/dynamic-element.js +2 -2
  27. package/dist/lib/dom/dynamic-element.mjs +928 -1
  28. package/dist/lib/dom/hydration-state.cjs +93 -1
  29. package/dist/lib/dom/hydration-state.d.ts +1 -1
  30. package/dist/lib/dom/hydration-state.js +1 -1
  31. package/dist/lib/dom/hydration-state.mjs +72 -1
  32. package/dist/lib/dom/hydration.cjs +685 -1
  33. package/dist/lib/dom/hydration.js +8 -8
  34. package/dist/lib/dom/hydration.mjs +664 -1
  35. package/dist/lib/dom/index.cjs +2040 -1
  36. package/dist/lib/dom/index.js +1 -1
  37. package/dist/lib/dom/index.mjs +2020 -1
  38. package/dist/lib/dom/integration.cjs +71 -1
  39. package/dist/lib/dom/integration.js +3 -3
  40. package/dist/lib/dom/integration.mjs +51 -1
  41. package/dist/lib/dom/island.cjs +790 -1
  42. package/dist/lib/dom/island.d.ts +1 -1
  43. package/dist/lib/dom/island.js +11 -11
  44. package/dist/lib/dom/island.mjs +769 -1
  45. package/dist/lib/dom/runtime.cjs +1432 -1
  46. package/dist/lib/dom/runtime.d.ts +60 -17
  47. package/dist/lib/dom/runtime.d.ts.map +1 -1
  48. package/dist/lib/dom/runtime.js +122 -79
  49. package/dist/lib/dom/runtime.mjs +1414 -1
  50. package/dist/lib/dom/server/fx-data.cjs +53 -1
  51. package/dist/lib/dom/server/fx-data.d.ts +5 -5
  52. package/dist/lib/dom/server/fx-data.js +6 -6
  53. package/dist/lib/dom/server/fx-data.mjs +32 -1
  54. package/dist/lib/dom/server/host.cjs +66 -1
  55. package/dist/lib/dom/server/host.d.ts +6 -0
  56. package/dist/lib/dom/server/host.d.ts.map +1 -1
  57. package/dist/lib/dom/server/host.js +7 -1
  58. package/dist/lib/dom/server/host.mjs +45 -1
  59. package/dist/lib/dom/server/index.cjs +759 -1
  60. package/dist/lib/dom/server/index.d.ts +1 -1
  61. package/dist/lib/dom/server/index.js +1 -1
  62. package/dist/lib/dom/server/index.mjs +743 -1
  63. package/dist/lib/dom/server/nodes.cjs +302 -1
  64. package/dist/lib/dom/server/nodes.d.ts +2 -2
  65. package/dist/lib/dom/server/nodes.d.ts.map +1 -1
  66. package/dist/lib/dom/server/nodes.js +4 -4
  67. package/dist/lib/dom/server/nodes.mjs +279 -1
  68. package/dist/lib/dom/server/parse-template.cjs +395 -1
  69. package/dist/lib/dom/server/parse-template.d.ts +1 -1
  70. package/dist/lib/dom/server/parse-template.js +4 -4
  71. package/dist/lib/dom/server/parse-template.mjs +372 -1
  72. package/dist/lib/dom/server/render.cjs +691 -1
  73. package/dist/lib/dom/server/render.d.ts +9 -1
  74. package/dist/lib/dom/server/render.d.ts.map +1 -1
  75. package/dist/lib/dom/server/render.js +23 -15
  76. package/dist/lib/dom/server/render.mjs +677 -1
  77. package/dist/lib/dom/server/request-context.cjs +110 -1
  78. package/dist/lib/dom/server/request-context.d.ts +29 -9
  79. package/dist/lib/dom/server/request-context.d.ts.map +1 -1
  80. package/dist/lib/dom/server/request-context.js +28 -8
  81. package/dist/lib/dom/server/request-context.mjs +89 -1
  82. package/dist/lib/dom/server/serialize.cjs +187 -1
  83. package/dist/lib/dom/server/serialize.js +3 -3
  84. package/dist/lib/dom/server/serialize.mjs +164 -1
  85. package/dist/lib/dom/server-renderer.cjs +760 -1
  86. package/dist/lib/dom/server-renderer.js +1 -1
  87. package/dist/lib/dom/server-renderer.mjs +745 -1
  88. package/dist/lib/dom/types.cjs +18 -1
  89. package/dist/lib/dom/utils.cjs +381 -1
  90. package/dist/lib/dom/utils.d.ts +1 -88
  91. package/dist/lib/dom/utils.d.ts.map +1 -1
  92. package/dist/lib/dom/utils.js +2 -99
  93. package/dist/lib/dom/utils.mjs +361 -1
  94. package/dist/lib/dom/versions.cjs +60 -1
  95. package/dist/lib/dom/versions.d.ts +3 -3
  96. package/dist/lib/dom/versions.d.ts.map +1 -1
  97. package/dist/lib/dom/versions.js +17 -5
  98. package/dist/lib/dom/versions.mjs +37 -1
  99. package/dist/lib/element/attributes.cjs +19 -1
  100. package/dist/lib/element/attributes.d.ts +7 -7
  101. package/dist/lib/element/attributes.js +1 -1
  102. package/dist/lib/element/attributes.mjs +1 -0
  103. package/dist/lib/element/index.cjs +19 -1
  104. package/dist/lib/element/index.mjs +1 -0
  105. package/dist/lib/element/types.cjs +18 -1
  106. package/dist/lib/element/types.d.ts +4 -5
  107. package/dist/lib/element/types.d.ts.map +1 -1
  108. package/dist/lib/element/types.js +0 -1
  109. package/dist/lib/flow/class-map.cjs +38 -1
  110. package/dist/lib/flow/class-map.d.ts +3 -3
  111. package/dist/lib/flow/class-map.js +2 -2
  112. package/dist/lib/flow/class-map.mjs +17 -1
  113. package/dist/lib/flow/client-only.cjs +57 -1
  114. package/dist/lib/flow/client-only.d.ts +4 -4
  115. package/dist/lib/flow/client-only.js +3 -3
  116. package/dist/lib/flow/client-only.mjs +36 -1
  117. package/dist/lib/flow/dynamic.cjs +53 -1
  118. package/dist/lib/flow/dynamic.d.ts +2 -2
  119. package/dist/lib/flow/dynamic.js +3 -3
  120. package/dist/lib/flow/dynamic.mjs +32 -1
  121. package/dist/lib/flow/error-boundary.cjs +43 -1
  122. package/dist/lib/flow/error-boundary.d.ts +2 -2
  123. package/dist/lib/flow/error-boundary.js +3 -3
  124. package/dist/lib/flow/error-boundary.mjs +22 -1
  125. package/dist/lib/flow/for.cjs +66 -1
  126. package/dist/lib/flow/for.d.ts +9 -9
  127. package/dist/lib/flow/for.d.ts.map +1 -1
  128. package/dist/lib/flow/for.js +2 -2
  129. package/dist/lib/flow/for.mjs +45 -1
  130. package/dist/lib/flow/index-flow.cjs +67 -1
  131. package/dist/lib/flow/index-flow.d.ts +5 -5
  132. package/dist/lib/flow/index-flow.js +4 -4
  133. package/dist/lib/flow/index-flow.mjs +46 -1
  134. package/dist/lib/flow/index.cjs +805 -1
  135. package/dist/lib/flow/index.mjs +792 -1
  136. package/dist/lib/flow/portal.cjs +538 -1
  137. package/dist/lib/flow/portal.mjs +519 -1
  138. package/dist/lib/flow/show.cjs +81 -1
  139. package/dist/lib/flow/show.d.ts +1 -1
  140. package/dist/lib/flow/show.d.ts.map +1 -1
  141. package/dist/lib/flow/show.js +4 -115
  142. package/dist/lib/flow/show.mjs +67 -1
  143. package/dist/lib/flow/style-map.cjs +43 -1
  144. package/dist/lib/flow/style-map.d.ts +3 -3
  145. package/dist/lib/flow/style-map.js +3 -3
  146. package/dist/lib/flow/style-map.mjs +22 -1
  147. package/dist/lib/flow/switch.cjs +91 -1
  148. package/dist/lib/flow/switch.d.ts +3 -3
  149. package/dist/lib/flow/switch.d.ts.map +1 -1
  150. package/dist/lib/flow/switch.js +6 -6
  151. package/dist/lib/flow/switch.mjs +70 -1
  152. package/dist/lib/flow/utils.cjs +44 -1
  153. package/dist/lib/flow/utils.d.ts +1 -1
  154. package/dist/lib/flow/utils.js +1 -1
  155. package/dist/lib/flow/utils.mjs +23 -1
  156. package/dist/lib/html.cjs +32 -1
  157. package/dist/lib/html.d.ts +6 -6
  158. package/dist/lib/html.js +5 -5
  159. package/dist/lib/html.mjs +11 -1
  160. package/dist/lib/index.cjs +3104 -1
  161. package/dist/lib/index.d.ts +0 -1
  162. package/dist/lib/index.d.ts.map +1 -1
  163. package/dist/lib/index.js +2 -3
  164. package/dist/lib/index.mjs +3097 -1
  165. package/dist/lib/shared/types.cjs +18 -1
  166. package/dist/lib/shared/types.d.ts +8 -8
  167. package/dist/tsconfig.lib.tsbuildinfo +1 -1
  168. package/dist/version.generated.cjs +26 -1
  169. package/dist/version.generated.d.ts +1 -1
  170. package/dist/version.generated.js +2 -2
  171. package/dist/version.generated.mjs +5 -1
  172. package/package.json +7 -6
  173. package/dist/lib/jsx/control-flow/flow.cjs +0 -1
  174. package/dist/lib/jsx/control-flow/flow.d.ts +0 -2
  175. package/dist/lib/jsx/control-flow/flow.d.ts.map +0 -1
  176. package/dist/lib/jsx/control-flow/flow.js +0 -627
  177. package/dist/lib/jsx/control-flow/flow.mjs +0 -0
  178. package/dist/lib/jsx/control-flow/for-flow.cjs +0 -1
  179. package/dist/lib/jsx/control-flow/for-flow.d.ts +0 -2
  180. package/dist/lib/jsx/control-flow/for-flow.d.ts.map +0 -1
  181. package/dist/lib/jsx/control-flow/for-flow.js +0 -1
  182. package/dist/lib/jsx/control-flow/for-flow.mjs +0 -0
@@ -1 +1,93 @@
1
- "use strict";var l=Object.defineProperty;var s=Object.getOwnPropertyDescriptor;var c=Object.getOwnPropertyNames;var p=Object.prototype.hasOwnProperty;var d=(t,e)=>{for(var n in e)l(t,n,{get:e[n],enumerable:!0})},y=(t,e,n,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of c(e))!p.call(t,a)&&a!==n&&l(t,a,{get:()=>e[a],enumerable:!(o=s(e,a))||o.enumerable});return t};var v=t=>y(l({},"__esModule",{value:!0}),t);var T={};d(T,{ascendPast:()=>u,captureHydrationCursor:()=>N,getHydrationWalker:()=>x,hydrateAdvancePast:()=>H,hydration:()=>r,isAdopted:()=>g,registerHydrationWalker:()=>f,runHydrationAt:()=>h,runWithoutHydration:()=>k});module.exports=v(T);var r={active:!1,cursor:null,parents:[]},i=null;function f(t){i=t}function x(){return i}function g(t,e){return r.active&&e.parentNode===t}function u(t){let e=r.parents.lastIndexOf(t);e!==-1&&(r.parents.length=e),r.cursor=t.nextSibling}function N(){return r.active?r.cursor:null}function h(t,e){if(!t||t.parentNode==null)return e();let n=r.active,o=r.cursor,a=r.parents;r.active=!0,r.cursor=t,r.parents=[];try{return e()}finally{r.active=n,r.cursor=o,r.parents=a}}function k(t){if(!r.active)return t();let e=r.cursor,n=r.parents;r.active=!1,r.parents=[];try{return t()}finally{r.active=!0,r.cursor=e,r.parents=n}}function H(t){if(!r.active||t==null)return;let e=Array.isArray(t)?t[t.length-1]:t;e&&typeof e.nodeType=="number"&&u(e)}
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+
20
+ // src/lib/dom/hydration-state.ts
21
+ var hydration_state_exports = {};
22
+ __export(hydration_state_exports, {
23
+ ascendPast: () => ascendPast,
24
+ captureHydrationCursor: () => captureHydrationCursor,
25
+ getHydrationWalker: () => getHydrationWalker,
26
+ hydrateAdvancePast: () => hydrateAdvancePast,
27
+ hydration: () => hydration,
28
+ isAdopted: () => isAdopted,
29
+ registerHydrationWalker: () => registerHydrationWalker,
30
+ runHydrationAt: () => runHydrationAt,
31
+ runWithoutHydration: () => runWithoutHydration
32
+ });
33
+ module.exports = __toCommonJS(hydration_state_exports);
34
+ var hydration = {
35
+ active: false,
36
+ cursor: null,
37
+ parents: []
38
+ };
39
+ var _walker = null;
40
+ function registerHydrationWalker(walker) {
41
+ _walker = walker;
42
+ }
43
+ function getHydrationWalker() {
44
+ return _walker;
45
+ }
46
+ function isAdopted(parent, node) {
47
+ return hydration.active && node.parentNode === parent;
48
+ }
49
+ function ascendPast(node) {
50
+ const idx = hydration.parents.lastIndexOf(node);
51
+ if (idx !== -1) hydration.parents.length = idx;
52
+ hydration.cursor = node.nextSibling;
53
+ }
54
+ function captureHydrationCursor() {
55
+ return hydration.active ? hydration.cursor : null;
56
+ }
57
+ function runHydrationAt(cursor, fn) {
58
+ if (!cursor || cursor.parentNode == null) return fn();
59
+ const prevActive = hydration.active;
60
+ const prevCursor = hydration.cursor;
61
+ const prevParents = hydration.parents;
62
+ hydration.active = true;
63
+ hydration.cursor = cursor;
64
+ hydration.parents = [];
65
+ try {
66
+ return fn();
67
+ } finally {
68
+ hydration.active = prevActive;
69
+ hydration.cursor = prevCursor;
70
+ hydration.parents = prevParents;
71
+ }
72
+ }
73
+ function runWithoutHydration(fn) {
74
+ if (!hydration.active) return fn();
75
+ const prevCursor = hydration.cursor;
76
+ const prevParents = hydration.parents;
77
+ hydration.active = false;
78
+ hydration.parents = [];
79
+ try {
80
+ return fn();
81
+ } finally {
82
+ hydration.active = true;
83
+ hydration.cursor = prevCursor;
84
+ hydration.parents = prevParents;
85
+ }
86
+ }
87
+ function hydrateAdvancePast(rendered) {
88
+ if (!hydration.active || rendered == null) return;
89
+ const last = Array.isArray(rendered) ? rendered[rendered.length - 1] : rendered;
90
+ if (last && typeof last.nodeType === "number") {
91
+ ascendPast(last);
92
+ }
93
+ }
@@ -35,7 +35,7 @@ export declare function captureHydrationCursor(): Node | null;
35
35
  export declare function runHydrationAt<T>(cursor: Node | null, fn: () => T): T;
36
36
  /**
37
37
  * Run `fn` with DOM-reuse hydration temporarily OFF, restoring the cursor afterwards.
38
- * For a detached subtree mid-hydration that must NOT consume the cursor (e.g. an eagerly
38
+ * For a detached subtree mid-hydration that must not consume the cursor (e.g. an eagerly
39
39
  * instantiated Suspense fallback that isn't showing).
40
40
  */
41
41
  export declare function runWithoutHydration<T>(fn: () => T): T;
@@ -61,7 +61,7 @@ export function runHydrationAt(cursor, fn) {
61
61
  }
62
62
  /**
63
63
  * Run `fn` with DOM-reuse hydration temporarily OFF, restoring the cursor afterwards.
64
- * For a detached subtree mid-hydration that must NOT consume the cursor (e.g. an eagerly
64
+ * For a detached subtree mid-hydration that must not consume the cursor (e.g. an eagerly
65
65
  * instantiated Suspense fallback that isn't showing).
66
66
  */
67
67
  export function runWithoutHydration(fn) {
@@ -1 +1,72 @@
1
- var t={active:!1,cursor:null,parents:[]},a=null;function u(r){a=r}function s(){return a}function c(r,e){return t.active&&e.parentNode===r}function i(r){let e=t.parents.lastIndexOf(r);e!==-1&&(t.parents.length=e),t.cursor=r.nextSibling}function p(){return t.active?t.cursor:null}function d(r,e){if(!r||r.parentNode==null)return e();let n=t.active,o=t.cursor,l=t.parents;t.active=!0,t.cursor=r,t.parents=[];try{return e()}finally{t.active=n,t.cursor=o,t.parents=l}}function y(r){if(!t.active)return r();let e=t.cursor,n=t.parents;t.active=!1,t.parents=[];try{return r()}finally{t.active=!0,t.cursor=e,t.parents=n}}function v(r){if(!t.active||r==null)return;let e=Array.isArray(r)?r[r.length-1]:r;e&&typeof e.nodeType=="number"&&i(e)}export{i as ascendPast,p as captureHydrationCursor,s as getHydrationWalker,v as hydrateAdvancePast,t as hydration,c as isAdopted,u as registerHydrationWalker,d as runHydrationAt,y as runWithoutHydration};
1
+ // src/lib/dom/hydration-state.ts
2
+ var hydration = {
3
+ active: false,
4
+ cursor: null,
5
+ parents: []
6
+ };
7
+ var _walker = null;
8
+ function registerHydrationWalker(walker) {
9
+ _walker = walker;
10
+ }
11
+ function getHydrationWalker() {
12
+ return _walker;
13
+ }
14
+ function isAdopted(parent, node) {
15
+ return hydration.active && node.parentNode === parent;
16
+ }
17
+ function ascendPast(node) {
18
+ const idx = hydration.parents.lastIndexOf(node);
19
+ if (idx !== -1) hydration.parents.length = idx;
20
+ hydration.cursor = node.nextSibling;
21
+ }
22
+ function captureHydrationCursor() {
23
+ return hydration.active ? hydration.cursor : null;
24
+ }
25
+ function runHydrationAt(cursor, fn) {
26
+ if (!cursor || cursor.parentNode == null) return fn();
27
+ const prevActive = hydration.active;
28
+ const prevCursor = hydration.cursor;
29
+ const prevParents = hydration.parents;
30
+ hydration.active = true;
31
+ hydration.cursor = cursor;
32
+ hydration.parents = [];
33
+ try {
34
+ return fn();
35
+ } finally {
36
+ hydration.active = prevActive;
37
+ hydration.cursor = prevCursor;
38
+ hydration.parents = prevParents;
39
+ }
40
+ }
41
+ function runWithoutHydration(fn) {
42
+ if (!hydration.active) return fn();
43
+ const prevCursor = hydration.cursor;
44
+ const prevParents = hydration.parents;
45
+ hydration.active = false;
46
+ hydration.parents = [];
47
+ try {
48
+ return fn();
49
+ } finally {
50
+ hydration.active = true;
51
+ hydration.cursor = prevCursor;
52
+ hydration.parents = prevParents;
53
+ }
54
+ }
55
+ function hydrateAdvancePast(rendered) {
56
+ if (!hydration.active || rendered == null) return;
57
+ const last = Array.isArray(rendered) ? rendered[rendered.length - 1] : rendered;
58
+ if (last && typeof last.nodeType === "number") {
59
+ ascendPast(last);
60
+ }
61
+ }
62
+ export {
63
+ ascendPast,
64
+ captureHydrationCursor,
65
+ getHydrationWalker,
66
+ hydrateAdvancePast,
67
+ hydration,
68
+ isAdopted,
69
+ registerHydrationWalker,
70
+ runHydrationAt,
71
+ runWithoutHydration
72
+ };