aptechka 0.83.0 → 0.83.1

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 (45) hide show
  1. package/lib/Composed-C-TV9te3.cjs +1 -0
  2. package/lib/Composed-DyAWjEXE.js +121 -0
  3. package/lib/{LocalLinks-DRAQ-fxE.js → LocalLinks-DFZFpbjs.js} +1 -1
  4. package/lib/jsx/h.d.ts +15 -0
  5. package/lib/jsx/hydrate.d.ts +1 -0
  6. package/lib/jsx/index.cjs +1 -1
  7. package/lib/jsx/index.d.ts +4 -1
  8. package/lib/jsx/index.js +312 -87
  9. package/lib/jsx/integrations/astro/client.cjs +1 -0
  10. package/lib/jsx/integrations/astro/client.d.ts +2 -0
  11. package/lib/jsx/integrations/astro/client.js +50 -0
  12. package/lib/jsx/integrations/astro/index.cjs +1 -0
  13. package/lib/jsx/integrations/astro/index.d.ts +2 -0
  14. package/lib/jsx/integrations/astro/index.js +54 -0
  15. package/lib/jsx/integrations/astro/server.cjs +1 -0
  16. package/lib/jsx/integrations/astro/server.d.ts +3 -0
  17. package/lib/jsx/integrations/astro/server.js +35 -0
  18. package/lib/jsx/plugins/vite.d.ts +21 -0
  19. package/lib/jsx/render.d.ts +1 -1
  20. package/lib/jsx/type.d.ts +190 -221
  21. package/lib/jsx/utils/children/createElement.d.ts +1 -0
  22. package/lib/jsx/utils/children/hydrateTextNode.d.ts +1 -0
  23. package/lib/local-links/index.js +1 -1
  24. package/lib/morph/index.cjs +1 -1
  25. package/lib/morph/index.js +71 -71
  26. package/lib/{morph-D_ybmXWR.js → morph-BQErz7qP.js} +8 -8
  27. package/lib/render-DQs7rIoN.cjs +1 -0
  28. package/lib/render-D_0FCWEu.js +18 -0
  29. package/lib/router/index.cjs +1 -1
  30. package/lib/router/index.js +2 -2
  31. package/lib/spa/index.js +2 -2
  32. package/lib/store/index.cjs +1 -1
  33. package/lib/store/index.js +6 -7
  34. package/lib/utils/index.js +1 -1
  35. package/lib/utils/polyfills.d.ts +1 -1
  36. package/lib/vite-C-i3hVDL.js +75 -0
  37. package/lib/vite-DzanPumM.cjs +44 -0
  38. package/package.json +29 -4
  39. package/lib/Composed-C-mnUGX6.js +0 -70
  40. package/lib/Composed-RFcm2x5c.cjs +0 -1
  41. package/lib/DerivedArray-DdCR-Oy7.cjs +0 -1
  42. package/lib/DerivedArray-opbeygTL.js +0 -59
  43. package/lib/jsx/plugins/hmr.d.ts +0 -13
  44. package/lib/render-1u700s93.js +0 -212
  45. package/lib/render-BIOfUddT.cjs +0 -1
@@ -0,0 +1 @@
1
+ "use strict";var I=r=>{throw TypeError(r)};var C=(r,t,e)=>t.has(r)||I("Cannot "+e);var c=(r,t,e)=>(C(r,t,"read from private field"),e?e.call(r):t.get(r)),n=(r,t,e)=>t.has(r)?I("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(r):t.set(r,e),h=(r,t,e,u)=>(C(r,t,"write to private field"),u?u.call(r,e):t.set(r,e),e);const o=require("./Store-Blf4msDz.cjs"),R=require("./function-MthRj-GJ.cjs");require("construct-style-sheets-polyfill");require("./index-OE2INULi.cjs");var S;class j extends o.Store{constructor(e,u,s){super(null,s);n(this,S);h(this,S,e.subscribe(i=>{this.current=u(i.current)}))}close(){super.close(),c(this,S).call(this)}}S=new WeakMap;var k,A;class E extends o.Store{constructor(e,u,s){super(null,s);n(this,k);n(this,A);h(this,A,!!(s!=null&&s.revalidateAll)),h(this,k,e.subscribe(i=>{this.current=i.current.map((l,b,m)=>{var a,y;return!c(this,A)&&((a=this.current)!=null&&a.length)&&((y=i.previous)!=null&&y.length)&&i.previous[b]===l?this.current[b]:u(l,b,m)})}))}close(){super.close(),c(this,k).call(this)}}k=new WeakMap,A=new WeakMap;var g,x;class J extends o.Store{constructor(e,u,s){super(null,s);n(this,g);n(this,x);h(this,x,!!(s!=null&&s.revalidateAll)),h(this,g,e.subscribe(i=>{this.current=i.current.map((l,b,m)=>{var y;if(!c(this,x)){const q=(y=i.previous)==null?void 0:y.find(v=>v.key===l.key&&JSON.stringify(v)===JSON.stringify(l));if(q){const v=this.current.find(D=>typeof D=="object"&&D&&"__key"in D&&D.__key===q.key);if(v)return v}}const a=u(l,b,m);return a&&typeof a=="object"&&(a.__key=l.key),a})}))}close(){super.close(),c(this,g).call(this)}}g=new WeakMap,x=new WeakMap;var _,d,f;class K extends o.Store{constructor(e,u,s){super(e,s);n(this,_);n(this,d);n(this,f,0);h(this,d,new o.Store(!1)),h(this,_,u),s!=null&&s.manualControl||this.refetch()}get isPending(){return c(this,d)}refetch(){c(this,d).current=!0,h(this,f,c(this,f)+1);const e=c(this,f);c(this,_).call(this).then(u=>{e===c(this,f)&&(c(this,d).current=!1,this.current=u)})}}_=new WeakMap,d=new WeakMap,f=new WeakMap;var p;class N extends o.Store{constructor(e,u,s){super(null,s);n(this,p,[]);const i=R.debounce(()=>{this.current=u()},0);e.forEach(l=>{c(this,p).push(l.subscribe(()=>{i()}))})}close(){super.close(),c(this,p).forEach(e=>e())}}p=new WeakMap;exports.Composed=N;exports.Derived=j;exports.DerivedArray=E;exports.DerivedKeyedArray=J;exports.Resource=K;
@@ -0,0 +1,121 @@
1
+ var C = (s) => {
2
+ throw TypeError(s);
3
+ };
4
+ var R = (s, t, e) => t.has(s) || C("Cannot " + e);
5
+ var c = (s, t, e) => (R(s, t, "read from private field"), e ? e.call(s) : t.get(s)), n = (s, t, e) => t.has(s) ? C("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(s) : t.set(s, e), h = (s, t, e, u) => (R(s, t, "write to private field"), u ? u.call(s, e) : t.set(s, e), e);
6
+ import { S as b } from "./Store-ZThXYBQd.js";
7
+ import { d as j } from "./function-C10DGppn.js";
8
+ import "construct-style-sheets-polyfill";
9
+ import "./index-e9eDuagL.js";
10
+ var p;
11
+ class w extends b {
12
+ constructor(e, u, r) {
13
+ super(null, r);
14
+ n(this, p);
15
+ h(this, p, e.subscribe((i) => {
16
+ this.current = u(i.current);
17
+ }));
18
+ }
19
+ close() {
20
+ super.close(), c(this, p).call(this);
21
+ }
22
+ }
23
+ p = new WeakMap();
24
+ var m, k;
25
+ class K extends b {
26
+ constructor(e, u, r) {
27
+ super(null, r);
28
+ n(this, m);
29
+ n(this, k);
30
+ h(this, k, !!(r != null && r.revalidateAll)), h(this, m, e.subscribe((i) => {
31
+ this.current = i.current.map((l, o, I) => {
32
+ var a, y;
33
+ return !c(this, k) && ((a = this.current) != null && a.length) && ((y = i.previous) != null && y.length) && i.previous[o] === l ? this.current[o] : u(l, o, I);
34
+ });
35
+ }));
36
+ }
37
+ close() {
38
+ super.close(), c(this, m).call(this);
39
+ }
40
+ }
41
+ m = new WeakMap(), k = new WeakMap();
42
+ var x, g;
43
+ class q extends b {
44
+ constructor(e, u, r) {
45
+ super(null, r);
46
+ n(this, x);
47
+ n(this, g);
48
+ h(this, g, !!(r != null && r.revalidateAll)), h(this, x, e.subscribe((i) => {
49
+ this.current = i.current.map((l, o, I) => {
50
+ var y;
51
+ if (!c(this, g)) {
52
+ const S = (y = i.previous) == null ? void 0 : y.find(
53
+ (v) => v.key === l.key && JSON.stringify(v) === JSON.stringify(l)
54
+ );
55
+ if (S) {
56
+ const v = this.current.find(
57
+ (D) => typeof D == "object" && D && "__key" in D && D.__key === S.key
58
+ );
59
+ if (v)
60
+ return v;
61
+ }
62
+ }
63
+ const a = u(l, o, I);
64
+ return a && typeof a == "object" && (a.__key = l.key), a;
65
+ });
66
+ }));
67
+ }
68
+ close() {
69
+ super.close(), c(this, x).call(this);
70
+ }
71
+ }
72
+ x = new WeakMap(), g = new WeakMap();
73
+ var A, f, d;
74
+ class z extends b {
75
+ constructor(e, u, r) {
76
+ super(e, r);
77
+ n(this, A);
78
+ n(this, f);
79
+ n(this, d, 0);
80
+ h(this, f, new b(!1)), h(this, A, u), r != null && r.manualControl || this.refetch();
81
+ }
82
+ get isPending() {
83
+ return c(this, f);
84
+ }
85
+ refetch() {
86
+ c(this, f).current = !0, h(this, d, c(this, d) + 1);
87
+ const e = c(this, d);
88
+ c(this, A).call(this).then((u) => {
89
+ e === c(this, d) && (c(this, f).current = !1, this.current = u);
90
+ });
91
+ }
92
+ }
93
+ A = new WeakMap(), f = new WeakMap(), d = new WeakMap();
94
+ var _;
95
+ class B extends b {
96
+ constructor(e, u, r) {
97
+ super(null, r);
98
+ n(this, _, []);
99
+ const i = j(() => {
100
+ this.current = u();
101
+ }, 0);
102
+ e.forEach((l) => {
103
+ c(this, _).push(
104
+ l.subscribe(() => {
105
+ i();
106
+ })
107
+ );
108
+ });
109
+ }
110
+ close() {
111
+ super.close(), c(this, _).forEach((e) => e());
112
+ }
113
+ }
114
+ _ = new WeakMap();
115
+ export {
116
+ B as C,
117
+ w as D,
118
+ z as R,
119
+ K as a,
120
+ q as b
121
+ };
@@ -3,7 +3,7 @@ var f = (i) => {
3
3
  };
4
4
  var u = (i, t, e) => t.has(i) || f("Cannot " + e);
5
5
  var n = (i, t, e) => (u(i, t, "read from private field"), e ? e.call(i) : t.get(i)), h = (i, t, e) => t.has(i) ? f("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(i) : t.set(i, e), m = (i, t, e, s) => (u(i, t, "write to private field"), s ? s.call(i, e) : t.set(i, e), e), d = (i, t, e) => (u(i, t, "access private method"), e);
6
- import { N as v } from "./morph-D_ybmXWR.js";
6
+ import { N as v } from "./morph-BQErz7qP.js";
7
7
  import "construct-style-sheets-polyfill";
8
8
  import "./index-e9eDuagL.js";
9
9
  import { n as L, i as S } from "./url-CYgo5vrG.js";
package/lib/jsx/h.d.ts CHANGED
@@ -1,3 +1,18 @@
1
+ export declare class Props {
2
+ tag: string;
3
+ attributes: JSX.Attributes | undefined;
4
+ children: JSX.Children;
5
+ constructor(tag: string, attributes: JSX.Attributes | undefined, children: JSX.Children);
6
+ }
7
+ export declare class ComponentProps extends Props {
8
+ }
9
+ export declare class ElementProps extends Props {
10
+ }
11
+ export declare class HeadProps extends Props {
12
+ }
13
+ export declare function enableHydration(): void;
14
+ export declare function disableHydration(): void;
1
15
  export declare function appendChildren(element: Element, attributes: JSX.Attributes | undefined, children: JSX.Children, isSVG?: boolean): void;
16
+ export declare const indexMap: Map<string, number>;
2
17
  export declare function h(jsxTag: string | Function, attributes?: JSX.Attributes, ...children: JSX.Children): any;
3
18
  export declare function Fragment(children: any): DocumentFragment;
@@ -0,0 +1 @@
1
+ export declare function hydrate(Component: JSX.Component, params?: object, children?: any): any;
package/lib/jsx/index.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";var y=Object.defineProperty;var d=Object.getOwnPropertySymbols;var p=Object.prototype.hasOwnProperty,v=Object.prototype.propertyIsEnumerable;var l=(t,e,o)=>e in t?y(t,e,{enumerable:!0,configurable:!0,writable:!0,value:o}):t[e]=o,f=(t,e)=>{for(var o in e||(e={}))p.call(e,o)&&l(t,o,e[o]);if(d)for(var o of d(e))v.call(e,o)&&l(t,o,e[o]);return t};Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("../render-BIOfUddT.cjs"),h=require("../string-DUXXtU8v.cjs");require("construct-style-sheets-polyfill");require("../index-OE2INULi.cjs");const D=require("../Store-Blf4msDz.cjs"),a=require("../Composed-RFcm2x5c.cjs"),S=require("../DerivedArray-DdCR-Oy7.cjs");function w(){return{value:null}}function m(t){n.activeComponent.current.addConnectCallback(t)}function R(t){n.activeComponent.current.addDisconnectCallback(t)}function A(t){const e=n.activeComponent.current.attachInternals();return t==null||t(e),e}function x(t,e){const o=n.activeComponent.current.attachShadow(f({mode:"open"},t));return e==null||e(o),o}function C(t){const e=new CSSStyleSheet;return e.replaceSync(t),e}function g(t){let e="";const o=(s,r)=>{r&&(e+=`${r} {`);for(const[u,c]of Object.entries(s))typeof c=="object"&&c!==null?o(c,u):e+=`${h.camelToKebab(u)}: ${c};`;r&&(e+="}")};return o(t),e}function T(t,e){const o=C(e),s=[];for(const r of t.adoptedStyleSheets)Array.from(o.cssRules).filter(c=>!Array.from(r.cssRules).some(i=>i.cssText===c.cssText)).forEach(c=>{const i=r.insertRule(c.cssText);s.push(()=>r.deleteRule(i))});return()=>s.forEach(r=>r())}function b(t){const e=document.createElement("style");return e.textContent=t,document.head.appendChild(e),()=>e.remove()}function q(t){const e=g(t);if(n.activeComponent.current.shadowRoot){n.activeComponent.current.shadowRoot.adoptedStyleSheets=[...n.activeComponent.current.shadowRoot.adoptedStyleSheets,C(e)];return}m(o=>{const s=o.getRootNode();if(s===document){if(!Array.from(document.head.querySelectorAll("style")).find(u=>u.textContent===e))return b(e)}else if(s instanceof ShadowRoot)return T(s,e)})}function j(...t){const e=new D.Store(...t);return n.activeComponent.current&&n.activeComponent.current.addDisconnectCallback(()=>{e.close()}),e}function E(...t){const e=new a.Derived(...t);return n.activeComponent.current&&n.activeComponent.current.addDisconnectCallback(()=>{e.close()}),e}function K(...t){const e=new S.DerivedArray(...t);return n.activeComponent.current&&n.activeComponent.current.addDisconnectCallback(()=>{e.close()}),e}function I(...t){const e=new S.DerivedKeyedArray(...t);return n.activeComponent.current&&n.activeComponent.current.addDisconnectCallback(()=>{e.close()}),e}function O(...t){const e=new a.Resource(...t);return n.activeComponent.current&&n.activeComponent.current.addDisconnectCallback(()=>{e.close()}),e}function $(...t){const e=new a.Composed(...t);return n.activeComponent.current&&n.activeComponent.current.addDisconnectCallback(()=>{e.close()}),e}exports.Fragment=n.Fragment;exports.h=n.h;exports.render=n.render;exports.useComposedStore=$;exports.useConnect=m;exports.useDerivedArrayStore=K;exports.useDerivedKeyedArrayStore=I;exports.useDerivedStore=E;exports.useDisconnect=R;exports.useInternals=A;exports.useRef=w;exports.useResourceStore=O;exports.useShadow=x;exports.useStore=j;exports.useStylesheet=q;
1
+ "use strict";var z=Object.defineProperty,J=Object.defineProperties;var Q=Object.getOwnPropertyDescriptors;var $=Object.getOwnPropertySymbols;var U=Object.prototype.hasOwnProperty,Y=Object.prototype.propertyIsEnumerable;var O=e=>{throw TypeError(e)};var H=(e,t,r)=>t in e?z(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,m=(e,t)=>{for(var r in t||(t={}))U.call(t,r)&&H(e,r,t[r]);if($)for(var r of $(t))Y.call(t,r)&&H(e,r,t[r]);return e},T=(e,t)=>J(e,Q(t));var I=(e,t,r)=>t.has(e)||O("Cannot "+r);var y=(e,t,r)=>(I(e,t,"read from private field"),r?r.call(e):t.get(e)),R=(e,t,r)=>t.has(e)?O("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),x=(e,t,r,n)=>(I(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const b=require("../Store-Blf4msDz.cjs"),v=require("../string-DUXXtU8v.cjs"),K=require("../morph-B6sGhLCi.cjs");require("construct-style-sheets-polyfill");require("../index-OE2INULi.cjs");const Z=require("../connector/index.cjs"),C=require("../Composed-C-TV9te3.cjs"),k=require("../render-DQs7rIoN.cjs"),j=require("../vite-DzanPumM.cjs"),f={current:null};var S,p;class V extends HTMLElement{constructor(){super();R(this,S,[]);R(this,p,[]);f.current=this}addConnectCallback(r){y(this,S).push(r)}addDisconnectCallback(r){y(this,p).push(r)}connectedCallback(){y(this,S).forEach(r=>{const n=r(this);n&&y(this,p).push(n)})}disconnectedCallback(){y(this,p).forEach(r=>{r(this)}),x(this,S,[]),x(this,p,[])}}S=new WeakMap,p=new WeakMap;function g(e,t,r){const n=t.subscribe(c=>{r(c)});Z.connector.subscribe(e,{disconnectCallback:()=>{n()},maxWaitSec:20,unsubscribeAfterDisconnect:!0})}function P(e,t){t&&(t instanceof b.Store?g(e,t,r=>{r.previous&&e.classList.remove(r.previous.toString()),r.current&&e.classList.add(r.current.toString())}):typeof t=="object"&&!Array.isArray(t)?Object.entries(t).forEach(([r,n])=>{n instanceof b.Store?g(e,n,c=>{e.classList.toggle(r,!!c.current)}):n&&e.classList.add(r)}):Array.isArray(t)?t.forEach(r=>{typeof r=="string"?e.classList.add(r):P(e,r)}):t.toString().split(" ").map(r=>e.classList.add(r.trim())))}function G(e,t){t&&(typeof t=="object"?Object.entries(t).forEach(([r,n])=>{n instanceof b.Store?g(e,n,c=>{var o;e.style[r]=(o=c.current)==null?void 0:o.toString()}):(typeof n=="number"||typeof n=="string"||typeof n=="boolean")&&(e.style[r]=n.toString())}):typeof t=="string"&&(e.style=t))}function D(e,t,r){t==="ref"&&r?Array.isArray(r)?r.forEach(n=>{typeof n=="object"&&"value"in n&&(n.value=e)}):typeof r=="object"&&"value"in r&&(r.value=e):t==="className"||t==="class"?P(e,r):t==="style"?G(e,r):t==="setHtml"?e.innerHTML=r:typeof r=="number"?t==="tabIndex"?e.setAttribute("tabindex",r.toString()):D(e,t,r.toString()):typeof r=="string"?t==="htmlFor"?e.setAttribute("for",r):e.setAttribute(t,r):typeof r=="boolean"?r?e.setAttribute(t,""):e.removeAttribute(t):r instanceof b.Store&&g(e,r,n=>{t in e?e[t]=n.current:D(e,t,n.current)})}function ee(e,t){for(const[r,n]of Object.entries(t!=null?t:{}))typeof n=="function"&&r.startsWith("on")?e.addEventListener(r.replace("on","").toLowerCase(),n):D(e,r,n)}function M(e,t){return e==="svg"?document.createElementNS("http://www.w3.org/2000/svg","svg"):t?document.createElementNS("http://www.w3.org/2000/svg",e):document.createElement(e)}function F(e){const t=[];return(Array.isArray(e)?e:[e]).forEach(n=>{n!=null&&(typeof n=="number"?t.push(n.toString()):Array.isArray(n)?n.forEach(c=>{t.push(...F(c))}):t.push(n))}),t}function te(e,t,r){const n=e.childNodes[r];n&&n.nodeType===Node.TEXT_NODE?n.textContent!==String(t)&&(console.warn(`Hydration text mismatch: expected "${t}", got "${n.textContent}"`),n.textContent=String(t)):t!=null&&t!==""&&e.insertBefore(document.createTextNode(String(t)),e.childNodes[r]||null)}function re(e,t){const r=[...e.childNodes].filter(i=>i.__storeId===t.id),n=t.current,c=Array.isArray(n)?n:[n],o=[];if(c.forEach(i=>{let s=null;typeof i=="boolean"||typeof i=="number"||typeof i=="string"?s=document.createTextNode(i.toString()):i instanceof Node&&(s=i),s&&(s.__storeId=t.id,o.push(s))}),t instanceof C.DerivedKeyedArray){const i=[];o.forEach((s,u)=>{const d=r.find(a=>a.__key===s.__key);d?d.isEqualNode(s)?i.push(d):(d.replaceWith(s),i.push(s)):(i.push(s),e.appendChild(s))}),r.forEach(s=>{i.includes(s)||s.remove()})}else o.forEach((i,s)=>{var d;const u=r[s];if(u)u.isEqualNode(i)||(u.replaceWith(i),r[s]=i);else{const a=r[r.length-1];a?(d=a.parentNode)==null||d.insertBefore(i,a.nextSibling):e.appendChild(i)}}),r.slice(o.length).forEach(i=>{i.remove()})}class L{constructor(t,r,n){this.tag=t,this.attributes=r,this.children=n}}class w extends L{}class N extends L{}class W extends L{}let A=!1;function ne(){A=!0}function oe(){A=!1}function l(e,t,r,n=!1){const c=F(r);ee(e,t),c.forEach((o,i)=>{if(o instanceof b.Store)g(e,o,()=>{re(e,o)});else if(o instanceof w)o.tag==="shadow"&&e.shadowRoot?l(e.shadowRoot,o.attributes,o.children):l(e,o.attributes,o.children);else if(o instanceof N){let s=null;if(A){const u=e.children[i];u&&u.nodeName.toLowerCase()===o.tag?(s=u,l(s,o.attributes,o.children,n)):(s=M(o.tag,n),l(s,o.attributes,o.children,n),e.append(s))}else s=M(o.tag,n),l(s,o.attributes,o.children,n),e.append(s)}else if(o instanceof W){const s=document.createElement(o.tag);l(s,o.attributes,o.children);const u=K.diff(document.head,s);K.patch(document.head,u)}else A?te(e,o,i):e.append(o)})}const _=new Map;function se(e,t,...r){var n;if(typeof e=="string")return e==="component"?new w(e,t,r):e==="shadow"?new w(e,t,r):e==="head"?new W(e,t,r):new N(e,t,r);{if(e===q)return q(r);if(e.template)return e(m({},t));const c=`e-${v.camelToKebab(e.name)}`;let o=customElements.get(c);o||(o=(n=class extends V{constructor(){super()}},n.formAssociated=e.formAssociated,n),customElements.define(c,o));const i=(_.get(c)||0)+1;_.set(c,i);const s=`${c}-${i}`;let u;if(A){const E=document.querySelector(`${c}[data-hydrate-id="${s}"]`);E&&E instanceof o?u=E:(u=new o,u.setAttribute("data-hydrate-id",s))}else u=new o,u.setAttribute("data-hydrate-id",s);const d=T(m({},t),{children:r}),a=e(d);return u.__props__=d,(a instanceof w||a instanceof N)&&(a!=null&&a.children||a.attributes)&&l(u,a.attributes,a.children),u}}function q(e){const t=document.createDocumentFragment();return l(t,void 0,e),t}function ie(){return{value:null}}function B(e){f.current.addConnectCallback(e)}function ce(e){f.current.addDisconnectCallback(e)}function fe(e){const t=f.current.attachInternals();return e==null||e(t),t}function ue(e,t){const r=f.current.attachShadow(m({mode:"open"},e));return t==null||t(r),r}function X(e){const t=new CSSStyleSheet;return t.replaceSync(e),t}function ae(e){let t="";const r=(n,c)=>{c&&(t+=`${c} {`);for(const[o,i]of Object.entries(n))typeof i=="object"&&i!==null?r(i,o):t+=`${v.camelToKebab(o)}: ${i};`;c&&(t+="}")};return r(e),t}function de(e,t){const r=X(t),n=[];for(const c of e.adoptedStyleSheets)Array.from(r.cssRules).filter(i=>!Array.from(c.cssRules).some(s=>s.cssText===i.cssText)).forEach(i=>{const s=c.insertRule(i.cssText);n.push(()=>c.deleteRule(s))});return()=>n.forEach(c=>c())}function le(e){const t=document.createElement("style");return t.textContent=e,document.head.appendChild(t),()=>t.remove()}function pe(e){const t=ae(e);if(f.current.shadowRoot){f.current.shadowRoot.adoptedStyleSheets=[...f.current.shadowRoot.adoptedStyleSheets,X(t)];return}B(r=>{const n=r.getRootNode();if(n===document){if(!Array.from(document.head.querySelectorAll("style")).find(o=>o.textContent===t))return le(t)}else if(n instanceof ShadowRoot)return de(n,t)})}function ye(...e){const t=new b.Store(...e);return f.current&&f.current.addDisconnectCallback(()=>{t.close()}),t}function he(...e){const t=new C.Derived(...e);return f.current&&f.current.addDisconnectCallback(()=>{t.close()}),t}function Se(...e){const t=new C.DerivedArray(...e);return f.current&&f.current.addDisconnectCallback(()=>{t.close()}),t}function be(...e){const t=new C.DerivedKeyedArray(...e);return f.current&&f.current.addDisconnectCallback(()=>{t.close()}),t}function Ce(...e){const t=new C.Resource(...e);return f.current&&f.current.addDisconnectCallback(()=>{t.close()}),t}function me(...e){const t=new C.Composed(...e);return f.current&&f.current.addDisconnectCallback(()=>{t.close()}),t}function ge(e,t,r){ne();const n=h(e,m({},t),r);return oe(),n}exports.render=k.render;exports.aptechkaVite=j.aptechkaVite;exports.Fragment=q;exports.h=se;exports.hydrate=ge;exports.indexMap=_;exports.useComposedStore=me;exports.useConnect=B;exports.useDerivedArrayStore=Se;exports.useDerivedKeyedArrayStore=be;exports.useDerivedStore=he;exports.useDisconnect=ce;exports.useInternals=fe;exports.useRef=ie;exports.useResourceStore=Ce;exports.useShadow=ue;exports.useStore=ye;exports.useStylesheet=pe;
@@ -1,9 +1,12 @@
1
+ export * from './type';
1
2
  export { type ComponentConnectCallback, type ComponentDisconnectCallback, } from './ComponentElement';
2
- export { Fragment, h } from './h';
3
+ export { Fragment, h, indexMap } from './h';
3
4
  export { useRef } from './hooks/common';
4
5
  export { useConnect, useDisconnect } from './hooks/component/lifecycle';
5
6
  export { useInternals, type UseInternalsCallback, } from './hooks/component/useInternals';
6
7
  export { useShadow, type UseShadowCallback } from './hooks/component/useShadow';
7
8
  export { useStylesheet, type UseStylesheetNestedObject, type UseStylesheetSource, } from './hooks/component/useStylesheet';
8
9
  export { useComposedStore, useDerivedArrayStore, useDerivedKeyedArrayStore, useDerivedStore, useResourceStore, useStore, } from './hooks/store';
10
+ export { hydrate } from './hydrate';
9
11
  export { render } from './render';
12
+ export { aptechkaVite } from './plugins/vite';