@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,23 @@
1
- function n(e){return typeof e=="function"?e:(()=>e)}function o(e){return()=>{let r=e();return typeof r=="function"?r():r}}function s(e){return e!=null&&e!==!1}function t(e){return!e||typeof e!="object"?!1:!!(typeof e._$litType$<"u"||typeof e._$litDirective$<"u"||Array.isArray(e.strings)&&Array.isArray(e.values))}export{t as isLitResult,s as isTruthy,n as normalizeAccessor,o as resolveReactiveProp};
1
+ // src/lib/flow/utils.ts
2
+ function normalizeAccessor(value) {
3
+ return typeof value === "function" ? value : (() => value);
4
+ }
5
+ function resolveReactiveProp(read) {
6
+ return () => {
7
+ const value = read();
8
+ return typeof value === "function" ? value() : value;
9
+ };
10
+ }
11
+ function isTruthy(value) {
12
+ return value !== null && value !== void 0 && value !== false;
13
+ }
14
+ function isLitResult(value) {
15
+ if (!value || typeof value !== "object") return false;
16
+ return !!(typeof value["_$litType$"] !== "undefined" || typeof value["_$litDirective$"] !== "undefined" || Array.isArray(value.strings) && Array.isArray(value.values));
17
+ }
18
+ export {
19
+ isLitResult,
20
+ isTruthy,
21
+ normalizeAccessor,
22
+ resolveReactiveProp
23
+ };
package/dist/lib/html.cjs CHANGED
@@ -1 +1,32 @@
1
- "use strict";var l=Object.defineProperty;var i=Object.getOwnPropertyDescriptor;var a=Object.getOwnPropertyNames;var p=Object.prototype.hasOwnProperty;var s=(e,t)=>{for(var r in t)l(e,r,{get:t[r],enumerable:!0})},m=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of a(t))!p.call(e,o)&&o!==r&&l(e,o,{get:()=>t[o],enumerable:!(n=i(t,o))||n.enumerable});return e};var u=e=>m(l({},"__esModule",{value:!0}),e);var w={};s(w,{html:()=>f,svg:()=>h});module.exports=u(w);function f(e,...t){throw new Error("html`` was not compiled — enable the lit format: fluixi({ format: 'lit' }).")}function h(e,...t){throw new Error("svg`` was not compiled — enable the lit format: fluixi({ format: 'lit' }).")}
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/html.ts
21
+ var html_exports = {};
22
+ __export(html_exports, {
23
+ html: () => html,
24
+ svg: () => svg
25
+ });
26
+ module.exports = __toCommonJS(html_exports);
27
+ function html(_strings, ..._values) {
28
+ throw new Error("html`` was not compiled, enable the lit format: fluixi({ format: 'lit' }).");
29
+ }
30
+ function svg(_strings, ..._values) {
31
+ throw new Error("svg`` was not compiled, enable the lit format: fluixi({ format: 'lit' }).");
32
+ }
@@ -1,10 +1,10 @@
1
1
  /**
2
- * `` html`...` `` / `` svg`...` `` — the compile-time template markers.
2
+ * `` html`...` `` / `` svg`...` ``, the compile-time template markers.
3
3
  *
4
4
  * These are the no-JSX authoring surface: the @fluixi/compiler (`format: 'lit'`)
5
- * replaces every `` html`...` `` call at build time with the SAME direct
5
+ * replaces every `` html`...` `` call at build time with the same direct
6
6
  * @fluixi/dom runtime calls that JSX produces, so these functions never actually
7
- * run. They exist for types and as a guard — if one executes, the lit format
7
+ * run. They exist for types and as a guard, if one executes, the lit format
8
8
  * wasn't enabled in the build.
9
9
  *
10
10
  * They live in @fluixi/dom (the runtime the compiler targets) so any tier can
@@ -12,13 +12,13 @@
12
12
  */
13
13
  import type { ComponentChild } from './shared/types.js';
14
14
  /**
15
- * What a compiled `` html`...` `` evaluates to at runtime: a DOM node, or — when
16
- * the template's root is a control-flow component — the reactive memo the runtime
15
+ * What a compiled `` html`...` `` evaluates to at runtime: a DOM node, or, when
16
+ * the template's root is a control-flow component, the reactive memo the runtime
17
17
  * inserts. `render()`/`insert()` accept both shapes.
18
18
  *
19
19
  * The memo returns a `ComponentChild`, not `unknown`: an html`` template has to be
20
20
  * usable everywhere a renderable value is expected, and `() => unknown` was not
21
- * assignable to one — so a component authored with html`` failed to typecheck as
21
+ * assignable to one, so a component authored with html`` failed to typecheck as
22
22
  * a `Component`.
23
23
  */
24
24
  export type TemplateResult = Node | (() => ComponentChild);
package/dist/lib/html.js CHANGED
@@ -1,10 +1,10 @@
1
1
  /**
2
- * `` html`...` `` / `` svg`...` `` — the compile-time template markers.
2
+ * `` html`...` `` / `` svg`...` ``, the compile-time template markers.
3
3
  *
4
4
  * These are the no-JSX authoring surface: the @fluixi/compiler (`format: 'lit'`)
5
- * replaces every `` html`...` `` call at build time with the SAME direct
5
+ * replaces every `` html`...` `` call at build time with the same direct
6
6
  * @fluixi/dom runtime calls that JSX produces, so these functions never actually
7
- * run. They exist for types and as a guard — if one executes, the lit format
7
+ * run. They exist for types and as a guard, if one executes, the lit format
8
8
  * wasn't enabled in the build.
9
9
  *
10
10
  * They live in @fluixi/dom (the runtime the compiler targets) so any tier can
@@ -12,9 +12,9 @@
12
12
  */
13
13
  /** The `html` template tag. Compiled away by `fluixi({ format: 'lit' })`. */
14
14
  export function html(_strings, ..._values) {
15
- throw new Error("html`` was not compiled — enable the lit format: fluixi({ format: 'lit' }).");
15
+ throw new Error("html`` was not compiled, enable the lit format: fluixi({ format: 'lit' }).");
16
16
  }
17
17
  /** Same as `html`, but the subtree is created in the SVG namespace. */
18
18
  export function svg(_strings, ..._values) {
19
- throw new Error("svg`` was not compiled — enable the lit format: fluixi({ format: 'lit' }).");
19
+ throw new Error("svg`` was not compiled, enable the lit format: fluixi({ format: 'lit' }).");
20
20
  }
package/dist/lib/html.mjs CHANGED
@@ -1 +1,11 @@
1
- function o(t,...e){throw new Error("html`` was not compiled — enable the lit format: fluixi({ format: 'lit' }).")}function r(t,...e){throw new Error("svg`` was not compiled — enable the lit format: fluixi({ format: 'lit' }).")}export{o as html,r as svg};
1
+ // src/lib/html.ts
2
+ function html(_strings, ..._values) {
3
+ throw new Error("html`` was not compiled, enable the lit format: fluixi({ format: 'lit' }).");
4
+ }
5
+ function svg(_strings, ..._values) {
6
+ throw new Error("svg`` was not compiled, enable the lit format: fluixi({ format: 'lit' }).");
7
+ }
8
+ export {
9
+ html,
10
+ svg
11
+ };