@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,71 @@
1
- "use strict";var f=Object.defineProperty;var y=Object.getOwnPropertyDescriptor;var c=Object.getOwnPropertyNames;var s=Object.prototype.hasOwnProperty;var a=(e,t)=>{for(var n in t)f(e,n,{get:t[n],enumerable:!0})},m=(e,t,n,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let u of c(t))!s.call(e,u)&&u!==n&&f(e,u,{get:()=>t[u],enumerable:!(i=y(t,u))||i.enumerable});return e};var x=e=>m(f({},"__esModule",{value:!0}),e);var O={};a(O,{createComponent:()=>C,initializeIntegration:()=>d,intergartionInitialized:()=>S,isIntegrationInitialized:()=>R,registerCreateComponent:()=>b,resetIntegration:()=>g});module.exports=x(O);var o=require("@fluixi/reactive");function p(e){return typeof e!="function"||Object.defineProperty(e,Symbol.for("fluixi-component"),{value:!0,enumerable:!0}),e}var l="__fx_dom_create_component__",r=globalThis[l]??={fn:null};function b(e){r.fn=e}function d(e={}){let t=e.signalSystem?.createComponent;t&&(r.fn=t)}function C(e,t){if(r.fn)return r.fn(e,t);t&&(0,o.reportReactiveProps)(t);let n=typeof e=="function"?(0,o.untrack)(()=>e(t)):e,i=n!=null&&(typeof n=="function"||typeof n=="object");if(i)try{n.$name=e?.name}catch{}return i&&!(0,o.isSignal)(n)?p(n):n}var S=()=>r.fn!==null,R=()=>r.fn!==null;function g(){r.fn=null}
1
+ /*! @fluixi/dom v1.0.0-alpha.85 | (c) 2026 Ibrahima Touré and Fluixi contributors | MIT */
2
+ "use strict";
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __export = (target, all) => {
8
+ for (var name in all)
9
+ __defProp(target, name, { get: all[name], enumerable: true });
10
+ };
11
+ var __copyProps = (to, from, except, desc) => {
12
+ if (from && typeof from === "object" || typeof from === "function") {
13
+ for (let key of __getOwnPropNames(from))
14
+ if (!__hasOwnProp.call(to, key) && key !== except)
15
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
+ }
17
+ return to;
18
+ };
19
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
20
+
21
+ // src/lib/dom/integration.ts
22
+ var integration_exports = {};
23
+ __export(integration_exports, {
24
+ createComponent: () => createComponent,
25
+ initializeIntegration: () => initializeIntegration,
26
+ intergartionInitialized: () => intergartionInitialized,
27
+ isIntegrationInitialized: () => isIntegrationInitialized,
28
+ registerCreateComponent: () => registerCreateComponent,
29
+ resetIntegration: () => resetIntegration
30
+ });
31
+ module.exports = __toCommonJS(integration_exports);
32
+ var import_reactive = require("@fluixi/reactive");
33
+
34
+ // src/lib/component/modifiers.ts
35
+ function asComponent(value) {
36
+ if (typeof value !== "function") return value;
37
+ Object.defineProperty(value, /* @__PURE__ */ Symbol.for("fluixi-component"), { value: true, enumerable: true });
38
+ return value;
39
+ }
40
+
41
+ // src/lib/dom/integration.ts
42
+ var _slotKey = "__fx_dom_create_component__";
43
+ var _slot = globalThis[_slotKey] ??= { fn: null };
44
+ function registerCreateComponent(createComponent2) {
45
+ _slot.fn = createComponent2;
46
+ }
47
+ function initializeIntegration(options = {}) {
48
+ const cc = options.signalSystem?.createComponent;
49
+ if (cc) _slot.fn = cc;
50
+ }
51
+ function createComponent(Comp, props) {
52
+ if (_slot.fn) return _slot.fn(Comp, props);
53
+ if (props) (0, import_reactive.reportReactiveProps)(props);
54
+ const component = typeof Comp === "function" ? (0, import_reactive.untrack)(() => Comp(props)) : Comp;
55
+ const nameable = component != null && (typeof component === "function" || typeof component === "object");
56
+ if (nameable) {
57
+ try {
58
+ component["$name"] = Comp?.name;
59
+ } catch {
60
+ }
61
+ }
62
+ if (nameable && !(0, import_reactive.isSignal)(component)) {
63
+ return asComponent(component);
64
+ }
65
+ return component;
66
+ }
67
+ var intergartionInitialized = () => _slot.fn !== null;
68
+ var isIntegrationInitialized = () => _slot.fn !== null;
69
+ function resetIntegration() {
70
+ _slot.fn = null;
71
+ }
@@ -1,6 +1,6 @@
1
1
  // createComponent lives here. It used to live in core and be registered through the
2
2
  // slot below, which left the runtime with a fallback that re-invoked a component on
3
- // every read a list rebuilt every node whenever it changed, and only for consumers
3
+ // every read, a list rebuilt every node whenever it changed, and only for consumers
4
4
  // who had not loaded core. The slot stays so a host can still override it.
5
5
  import { untrack, isSignal, reportReactiveProps } from '@fluixi/reactive';
6
6
  import { asComponent } from '../component/modifiers.js';
@@ -10,7 +10,7 @@ const _slot = (globalThis[_slotKey] ??= { fn: null });
10
10
  export function registerCreateComponent(createComponent) {
11
11
  _slot.fn = createComponent;
12
12
  }
13
- // Old init entry now just picks createComponent off the passed system.
13
+ // Old init entry, now just picks createComponent off the passed system.
14
14
  export function initializeIntegration(options = {}) {
15
15
  const cc = options.signalSystem?.createComponent;
16
16
  if (cc)
@@ -31,7 +31,7 @@ export function createComponent(Comp, props) {
31
31
  const nameable = component != null && (typeof component === 'function' || typeof component === 'object');
32
32
  if (nameable) {
33
33
  // The name goes on whatever came back, reactive or not. Only `asComponent` has to skip a
34
- // signal the runtime would cache it as a static thunk. Nothing reads `$name` but a
34
+ // signal, the runtime would cache it as a static thunk. Nothing reads `$name` but a
35
35
  // watcher, and skipping it there hid every component that returns another one: an App
36
36
  // whose whole body is `<Router/>` was named nowhere.
37
37
  try {
@@ -1 +1,51 @@
1
- import{untrack as u,isSignal as f,reportReactiveProps as p}from"@fluixi/reactive";function i(e){return typeof e!="function"||Object.defineProperty(e,Symbol.for("fluixi-component"),{value:!0,enumerable:!0}),e}var y="__fx_dom_create_component__",r=globalThis[y]??={fn:null};function m(e){r.fn=e}function x(e={}){let t=e.signalSystem?.createComponent;t&&(r.fn=t)}function l(e,t){if(r.fn)return r.fn(e,t);t&&p(t);let n=typeof e=="function"?u(()=>e(t)):e,o=n!=null&&(typeof n=="function"||typeof n=="object");if(o)try{n.$name=e?.name}catch{}return o&&!f(n)?i(n):n}var b=()=>r.fn!==null,d=()=>r.fn!==null;function C(){r.fn=null}export{l as createComponent,x as initializeIntegration,b as intergartionInitialized,d as isIntegrationInitialized,m as registerCreateComponent,C as resetIntegration};
1
+ /*! @fluixi/dom v1.0.0-alpha.85 | (c) 2026 Ibrahima Touré and Fluixi contributors | MIT */
2
+
3
+ // src/lib/dom/integration.ts
4
+ import { untrack, isSignal, reportReactiveProps } from "@fluixi/reactive";
5
+
6
+ // src/lib/component/modifiers.ts
7
+ function asComponent(value) {
8
+ if (typeof value !== "function") return value;
9
+ Object.defineProperty(value, /* @__PURE__ */ Symbol.for("fluixi-component"), { value: true, enumerable: true });
10
+ return value;
11
+ }
12
+
13
+ // src/lib/dom/integration.ts
14
+ var _slotKey = "__fx_dom_create_component__";
15
+ var _slot = globalThis[_slotKey] ??= { fn: null };
16
+ function registerCreateComponent(createComponent2) {
17
+ _slot.fn = createComponent2;
18
+ }
19
+ function initializeIntegration(options = {}) {
20
+ const cc = options.signalSystem?.createComponent;
21
+ if (cc) _slot.fn = cc;
22
+ }
23
+ function createComponent(Comp, props) {
24
+ if (_slot.fn) return _slot.fn(Comp, props);
25
+ if (props) reportReactiveProps(props);
26
+ const component = typeof Comp === "function" ? untrack(() => Comp(props)) : Comp;
27
+ const nameable = component != null && (typeof component === "function" || typeof component === "object");
28
+ if (nameable) {
29
+ try {
30
+ component["$name"] = Comp?.name;
31
+ } catch {
32
+ }
33
+ }
34
+ if (nameable && !isSignal(component)) {
35
+ return asComponent(component);
36
+ }
37
+ return component;
38
+ }
39
+ var intergartionInitialized = () => _slot.fn !== null;
40
+ var isIntegrationInitialized = () => _slot.fn !== null;
41
+ function resetIntegration() {
42
+ _slot.fn = null;
43
+ }
44
+ export {
45
+ createComponent,
46
+ initializeIntegration,
47
+ intergartionInitialized,
48
+ isIntegrationInitialized,
49
+ registerCreateComponent,
50
+ resetIntegration
51
+ };