incajs 0.0.31 → 0.0.32
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.
- package/dist/chunks/hooks-DGPTjDZ2.js +1 -0
- package/dist/chunks/{rendererCore-BHeDyiqS.d.ts → rendererCore-Cf8-27u1.d.ts} +37 -13
- package/dist/chunks/{rendererCore-C0G-5EWy.js → rendererCore-p80C6A9w.js} +1 -1
- package/dist/chunks/{window-Bc0a_a9g.d.ts → window-gMkkjr_q.d.ts} +198 -4
- package/dist/globals.d.mts +9 -0
- package/dist/index.d.ts +2 -2
- package/dist/index.js +1 -1
- package/dist/rendererCore.d.ts +3 -3
- package/dist/rendererCore.js +1 -1
- package/dist/style.js +1 -1
- package/dist/vue.d.ts +2 -2
- package/dist/vue.js +2 -2
- package/package.json +8 -3
- package/dist/chunks/hooks-BFw_ohVI.js +0 -2
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=`http://www.w3.org/1999/xhtml`;function t(){return globalThis.__inca_native__}const n=/* @__PURE__ */ new WeakSet;function r(e,t){return n.add(e),Object.defineProperty(e,"__node_id",{value:t})}function i(e){return typeof e==`object`&&!!e&&n.has(e)}const a=/* @__PURE__ */ new Map,o=new FinalizationRegistry(e=>{a.get(e)?.deref()||a.delete(e)});function s(e){a.set(e.__node_id,new WeakRef(e)),o.register(e,e.__node_id)}function c(e){a.delete(e)}function l(e){return a.get(e)?.deref()}function u(e){let t=l(e);return t?.kind===`element`?t:void 0}const d=/* @__PURE__ */ new WeakMap,f=/* @__PURE__ */ new WeakMap;function p(e){return e.kind===`element`?d.get(e):void 0}function m(e,t){d.set(e,t),f.set(t,e)}const h=/* @__PURE__ */ new WeakSet;function g(e){return h.has(e)||v.has(e)}function _(e){if(h.add(e),e.kind===`text`)return;for(let t of e.__children)_(t);let t=p(e);t&&_(t)}const v=/* @__PURE__ */ new WeakSet;function y(e){return v.has(e)}function b(e){if(v.has(e)||(v.add(e),c(e.__node_id),e.kind===`text`))return;for(let t of e.__children)b(t);let t=p(e);t&&b(t);let n=e.kind===`fragment`?f.get(e):void 0;n&&b(n)}function ee(e){for(let t of e){let e=l(t);e&&b(e)}}const te=new FinalizationRegistry(e=>t().releaseNode(e)),ne=/* @__PURE__ */ new WeakSet;function re(e){return ne.has(e)}function x(e){ne.add(e),te.register(e,e.__node_id)}const S=/* @__PURE__ */ new Map,ie=/* @__PURE__ */ new Map;function ae(e,t,n){let r=S.get(e);r||S.set(e,r=/* @__PURE__ */ new Map),r.set(t,n),ie.set(n,{group:e,listener:t})}function oe(e,t){return S.get(e)?.get(t)}function se(e){let t=ie.get(e);if(t===void 0)return;ie.delete(e);let n=S.get(t.group);n?.delete(t.listener),n?.size===0&&S.delete(t.group)}function ce(e){for(let t of e)se(t)}const le=(e,t,n)=>`${e}:${t}:${n===!0}`;Object.defineProperty(globalThis,"__inca_released__",{value:(e,t)=>{ce(t),ee(e)},configurable:!0});let ue=0;function de(){return ue}function fe(e){return(...t)=>{let n=t[0]?.eventId;return typeof n==`number`&&n>ue&&(ue=n),e(...t)}}function pe(e,n,r,i={}){if(r==null)return;let a=le(e,n,i.capture);if(oe(a,r)!==void 0)return;let o=(...e)=>typeof r==`function`?r.apply(e[0]?.currentTarget,e):r.handleEvent.apply(r,e),s=i.once?(...t)=>(me(e,n,r,i),o(...t)):o;ae(a,r,t().addEventListener(e,n,fe(s),i.capture===!0,i.passive===!0))}function me(e,n,r,i={}){if(r==null)return;let a=oe(le(e,n,i.capture),r);a!==void 0&&(t().removeEventListener(e,n,a),se(a))}function he(e,n){return t().dispatchEvent(e,n)}function ge(e){t().click(e)}function _e(e,n){t().focusNode(e,n)}function ve(e){t().blurNode(e)}function ye(e,n){t().setPointerCapture(e,n)}function be(e,n){t().releasePointerCapture(e,n)}function xe(e,n){return t().hasPointerCapture(e,n)}function C(e,t=[]){let n=typeof e==`function`?e:()=>e;return{addEventListener(e,r,i){let a=typeof i==`boolean`?{capture:i}:i??{};pe(n(),e,r,{...a,passive:a.passive??t.includes(e)})},removeEventListener(e,t,r){let i=typeof r==`boolean`?r:r?.capture;me(n(),e,t,{capture:i})},dispatchEvent:e=>he(n(),e)}}function Se(){return t().rootNodeId()}function Ce(){return t().documentNodeId()}function we(e){return t().createElement(e)}function Te(e,n){return t().createElementNS(e,n)}function w(e){return e.length===2?e[1]:[e[1],e[2],e[3],e[4]]}function Ee(e){return e[2]===`http://www.w3.org/1999/xhtml`?e[1]:[e[1],e[2],null,e[1]]}function T(e){return t().createNode(e)}function E(e,n){return t().appendChild(e,n)}function D(e,n,r){return t().insertBefore(e,n,r)}function O(e,n){t().removeChild(e,n)}function De(e,n,r){return t().replaceChild(e,n,r)}function Oe(e,n){return t().cloneNode(e,n)}function ke(e){return t().innerHtml(e)}function Ae(e){return t().outerHtml(e)}function je(e,n){return t().setInnerHtml(e,n)}function Me(e,n){return t().setOuterHtml(e,n)}function Ne(e,n,r){return t().insertAdjacentHtml(e,n,r)}function Pe(e){return t().rootOf(e)}function Fe(e,n){return t().compareNodePosition(e,n)}function Ie(e,n){return t().isEqualNode(e,n)}function Le(e){ce(t().releaseListeners(e))}function k(e){t().holdNode(e)}function Re(e){t().releaseNode(e)}function A(e,n,r){t().setAttribute(e,n,r)}function ze(e,n){return t().attributeKey(e,n)}function j(e,n){return t().getAttribute(e,n)}function Be(e){return t().classList(e)}function Ve(e){return t().attributeNames(e)}function He(e,n){return t().datasetGet(e,n)}function Ue(e,n,r){t().datasetSet(e,n,r)}function We(e,n){return t().datasetDelete(e,n)}function Ge(e){return t().datasetKeys(e)}function Ke(){return t().datasetTarget()}function qe(e,n){return t().linkedNode(e,n)}function Je(e){return t().childNodeIds(e)}function Ye(e){return t().isConnected(e)}function Xe(e){return t().textContent(e)}function Ze(e){return t().wholeText(e)}function Qe(e,n,r){return t().substringData(e,n,r)}function $e(e,n,r,i){t().replaceData(e,n,r,i)}function et(e,n){return t().splitText(e,n)}function tt(e,n){return t().matches(e,n)}function nt(e,n){return t().closest(e,n)}function rt(e,n){return t().querySelector(e,n)}function it(e,n){return t().querySelectorAll(e,n)}function M(e){t().checkSelector(e)}function at(e){return t().layoutOf(e)}function ot(e){return t().scrollOf(e)}function st(e,n,r){t().scrollNode(e,n,r)}function ct(e,n,r){t().scrollIntoViewNode(e,n,r)}function lt(e,n){t().removeAttribute(e,n)}function ut(e,n,r){t().setStyle(e,n,r)}function dt(e,n){t().removeStyle(e,n)}function ft(e){return t().styleOf(e)}function pt(e){return t().inputValue(e)}function mt(e,n){t().setInputValue(e,n)}function ht(){return t().focusedNode()}const gt=/^(?:0|[1-9]\d*)$/,_t=2**32-1;function N(e){return gt.test(e)&&Number(e)<_t}function vt(e,t){return t===``?null:e.find(e=>e.id===t)??e.find(e=>e.getAttribute(`name`)===t)??null}function yt(e){let t=/* @__PURE__ */ new Set;for(let n of e)t.add(n.id),t.add(n.getAttribute(`name`)??``);return t.delete(``),[...t]}function bt(e){let{source:t,named:n}=e,r=e=>{if(e!==l)throw TypeError(`the receiver is not a collection. call it on one`)},i={writable:!0,enumerable:!0,configurable:!0},a=Object.create(Object.prototype,{length:{get(){return r(this),t().length},enumerable:!0,configurable:!0},item:{...i,value:Object.defineProperty(function(...e){if(r(this),e.length<1)throw TypeError(`item() needs 1 argument`);return t()[e[0]>>>0]??null},"length",{value:1})},...e.method&&{[e.method]:{...i,value(...t){if(r(this),t.length<1)throw TypeError(`${e.method}() needs 1 argument`);return e.find(`${t[0]}`)}}},...e.arrayMembers&&{forEach:{...i,value:Array.prototype.forEach},entries:{...i,value:Array.prototype.entries},keys:{...i,value:Array.prototype.keys},values:{...i,value:Array.prototype.values}},[Symbol.iterator]:{...i,enumerable:!1,value:Array.prototype.values},[Symbol.toStringTag]:{value:e.tag,configurable:!0}}),o=Object.create(a),s=e=>Object.hasOwn(o,e),c=e=>N(e)||!s(e)&&!(e in a)&&n(e)!==null,l=new Proxy(o,{get(e,r,i){return typeof r==`symbol`?Reflect.get(o,r,i):N(r)?t()[Number(r)]:r in o?Reflect.get(o,r,i):n(r)??void 0},has(e,r){return typeof r==`symbol`||r in o?r in o:N(r)?Number(r)<t().length:n(r)!==null},set(e,t,n,r){return r===l&&typeof t==`string`&&c(t)?!1:Reflect.set(o,t,n,r)},deleteProperty(e,n){if(typeof n==`string`){if(N(n))return Number(n)>=t().length;if(c(n))return!1}return Reflect.deleteProperty(o,n)},preventExtensions:()=>!1,defineProperty(e,t,n){return typeof t==`string`&&c(t)?!1:Reflect.defineProperty(o,t,n)},ownKeys(){let n=t(),r=Array.from(n,(e,t)=>String(t)),i=e.names(n).filter(e=>!N(e)&&!(e in a)&&!s(e)),c=Reflect.ownKeys(o);return[...r,...c,...i]},getOwnPropertyDescriptor(e,r){if(typeof r==`symbol`||s(r))return Reflect.getOwnPropertyDescriptor(o,r);if(N(r)){let e=t()[Number(r)];return e?{value:e,writable:!1,enumerable:!0,configurable:!0}:void 0}let i=r in a?void 0:n(r);return i?{value:i,writable:!1,enumerable:!1,configurable:!0}:void 0}});return l}function xt(e){let t=t=>vt(e(),t);return bt({tag:`HTMLCollection`,method:`namedItem`,source:e,find:t,named:t,names:yt})}function St(e,t){return bt({tag:`NamedNodeMap`,method:`getNamedItem`,source:e,find:t,named:t,names:e=>e.map(e=>e.name)})}function Ct(e){return bt({tag:`NodeList`,arrayMembers:!0,source:e,find:()=>null,named:()=>null,names:()=>[]})}function P(e){if(typeof e==`symbol`)throw TypeError(`a symbol cannot become text`);return String(e)}function F(e,t,n){if(e.length<t)throw TypeError(`${n}() needs ${t} argument${t===1?``:`s`}`)}var wt=class e{#e;#t;#n;#r;#i;constructor(e,t,n,r,i){this.#e=e,this.#i=t,this.#t=n,this.#r=r,this.#n=i}static detach(e){e.#r=null,e.#n(e)}#a(){if(this.#r===null)return!1;let t=y(this.#r)?null:j(this.#t,this.#e);return t===null?(e.detach(this),!1):(this.#i=P(t),!0)}get name(){return this.#e}get localName(){return this.#e}get value(){return this.#a(),this.#i}set value(e){let t=P(e);this.#a()&&A(this.#t,this.#e,t),this.#i=t}get namespaceURI(){return null}get prefix(){return null}get specified(){return!0}get ownerElement(){return this.#a(),this.#r}get[Symbol.toStringTag](){return`Attr`}};function Tt(e,t){let n=t=>{let n=j(e,t);return n===null?null:P(n)},r=()=>y(t)?[]:Ve(e),i=/* @__PURE__ */ new Map,a=e=>{i.get(e.name)===e&&i.delete(e.name)},o=(n,r)=>{let o=i.get(n);return o||(o=new wt(n,r,e,t,a),i.set(n,o)),o},s=r=>{if(y(t))return null;let a=ze(e,r),s=n(a);if(s!==null)return o(a,s);let c=i.get(a);return c&&wt.detach(c),null},c=()=>{let e=r(),t=new Set(e);for(let[e,n]of i)t.has(e)||wt.detach(n);return e.map(e=>i.get(e)??o(e,n(e)))},l;return{getAttribute:(...e)=>(F(e,1,`getAttribute`),y(t)?null:n(P(e[0]))),setAttribute:(...n)=>{F(n,2,`setAttribute`);let r=P(n[0]),i=P(n[1]);y(t)||A(e,r,i)},hasAttribute:(...e)=>(F(e,1,`hasAttribute`),!y(t)&&n(P(e[0]))!==null),removeAttribute:(...n)=>{F(n,1,`removeAttribute`);let r=P(n[0]);y(t)||lt(e,r)},getAttributeNames:()=>r(),get attributes(){return l??=St(c,s),l}}}function Et(e,t){let n;return{get className(){return y(t)?``:String(j(e,`class`)??``)},set className(n){let r=P(n);y(t)||A(e,`class`,r)},get classList(){return n??=Be(e)},set classList(t){(n??=Be(e)).value=t}}}function Dt(e){let t;return{get dataset(){return t??=new Proxy(Ke(),{get(t,n,r){let i=typeof n==`string`?He(e,n):void 0;return typeof i==`string`?i:Reflect.get(t,n,r)},set(t,n,r,i){return typeof n==`string`?(Ue(e,n,P(r)),!0):Reflect.set(t,n,r,i)},deleteProperty(t,n){return typeof n==`string`?We(e,n):Reflect.deleteProperty(t,n)},defineProperty(t,n,r){return typeof n==`string`?!(`value`in r)||r.configurable===!1?!1:(Ue(e,n,P(r.value)),!0):Reflect.defineProperty(t,n,r)},preventExtensions:()=>!1,has:(t,n)=>typeof n==`string`&&Ge(e).includes(n)||Reflect.has(t,n),ownKeys:t=>[...Ge(e),...Reflect.ownKeys(t)],getOwnPropertyDescriptor(t,n){let r=typeof n==`string`?He(e,n):void 0;return typeof r==`string`?{value:r,writable:!0,enumerable:!0,configurable:!0}:Reflect.getOwnPropertyDescriptor(t,n)}}),t}}}function Ot(e){return e.kind===`element`}function I(e){return e.__children.filter(Ot)}function kt(e,t){let n=e.parent?.__children??[];for(let r=n.indexOf(e)+t;r>=0&&r<n.length;r+=t){let e=n[r];if(Ot(e))return e}return null}function At(e){let t;return{get children(){return t??=xt(()=>I(e))},get parentElement(){return e.parent?.kind===`element`?e.parent:null},get firstElementChild(){return I(e)[0]??null},get lastElementChild(){return I(e).at(-1)??null},get childElementCount(){return I(e).length},get previousElementSibling(){return kt(e,-1)},get nextElementSibling(){return kt(e,1)}}}const jt=((...e)=>e)(`auxclick`,`beforeinput`,`blur`,`change`,`click`,`contextmenu`,`dblclick`,`focus`,`gotpointercapture`,`input`,`keydown`,`keypress`,`keyup`,`lostpointercapture`,`mousedown`,`mouseenter`,`mouseleave`,`mousemove`,`mouseout`,`mouseover`,`mouseup`,`pointerdown`,`pointerenter`,`pointerleave`,`pointermove`,`pointerout`,`pointerover`,`pointerup`,`scroll`,`wheel`);function Mt(e,t){for(let n of jt){let r=null,i=function(e){typeof r==`function`&&Reflect.apply(r,this,[e])===!1&&e.preventDefault()};Object.defineProperty(e,`on${n}`,{get:()=>r,set(a){t()||(r=typeof a==`function`||typeof a==`object`&&a?a:null,r===null?e.removeEventListener(n,i):e.addEventListener(n,i))}})}return e}function L(e){return g(e)?null:at(e.__node_id)}function Nt(e){let t=e.parent;return!L(e)||t?.kind!==`element`||!L(t)?null:t}function Pt(e){let t=L(e);if(!t)return{left:0,top:0};let n=Nt(e),r=n?L(n):null;return{left:Math.round(t[0]-(r?r[0]+r[4]:0)+t[5])||0,top:Math.round(t[1]-(r?r[1]+r[4]:0)+t[6])||0}}function Ft(e){let[t,n,r,i]=e??[0,0,0,0,0],a={x:t,y:n,width:r,height:i,top:n,left:t,right:t+r,bottom:n+i};return{...a,toJSON:()=>({...a})}}function It(e,t){let n=t===`button`||t===`input`?0:-1;if(typeof e!=`string`&&typeof e!=`number`)return n;let r=/^[\t\n\f\r ]*([+-]?\d+)/.exec(String(e));if(!r)return n;let i=Number(r[1])||0;return i>=-2147483648&&i<=2147483647?i:n}function R(e){y(e)||re(e)||(k(e.__node_id),x(e))}function z(e){let t=e.parent;if(!t)return;let n=t.__children.indexOf(e);n!==-1&&t.__children.splice(n,1),e.parent=null}function B(e,t,n){e.__children.splice(n,0,...t);for(let n of t)n.parent=e}function Lt(e){e.parent&&O(e.parent.__node_id,e.__node_id),z(e)}function Rt(e,t,n){if(n===e&&e.parent===t)return;Lt(e);let r=n?t.__children.indexOf(n):-1;D(t.__node_id,e.__node_id,n&&r!==-1?n.__node_id:null),r===-1?t.__children.push(e):t.__children.splice(r,0,e),e.parent=t}function zt(e){e.parent&&y(e.parent)?z(e):Lt(e),Le(e.__node_id),_(e),R(e)}function Bt(e){return e.parent?.kind===`element`?e.parent:null}function Vt(e){let t=e.parent;if(!t)return null;let n=t.__children.indexOf(e);return t.__children[n+1]??null}function Ht(e){return e===null?``:P(e)}function Ut(e,t){let n=/* @__PURE__ */ new Map,r=[];for(let i of e[1]){let[e,a,,o,s]=i,c=n.get(o);if(a===`#fragment`){n.set(e,p(c));continue}let l=a===`#text`?t.text(e,s??``):a===`#comment`?t.element(e,`comment`):t.element(e,`element`,Ee(i));n.set(e,l),c?B(c,[l],c.__children.length):r.push(l)}return r}function Wt(e,t){let n=e.__node_id,r=(e,n)=>B(n,Ut(e,t),e[0]);return{get innerHTML(){return y(e)?``:ke(n)},set innerHTML(t){let i=Ht(t);if(y(e))return;let a=p(e)??e,o=je(n,i);for(let e of a.__children.slice())z(e),R(e);r(o,a)},get outerHTML(){return y(e)?``:Ae(n)},set outerHTML(t){let i=Ht(t);if(y(e))return;let a=Me(n,i),o=e.parent;a!==null&&(z(e),R(e),r(a,o))},insertAdjacentHTML:(...t)=>{F(t,2,`insertAdjacentHTML`);let i=P(t[0]),a=P(t[1]);if(y(e))return;let o=Ne(n,i,a),s=/^(beforebegin|afterend)$/i.test(i);r(o,s?e.parent:e)}}}function Gt(e){let t,n=()=>t??=ft(e);return{get style(){return n()},set style(e){n().cssText=e===null?``:P(e)}}}function Kt(){return new DOMException(`the node was freed. pass a child of the node you call it on`,`NotFoundError`)}function V(e,t){if(!i(e))throw TypeError(`parameter ${t} is not a node. pass an element, a text node, a comment or a fragment`);return e}function qt(e){return e.kind===`fragment`?e.__children.slice():[e]}function Jt(e,t,n){let r=Oe(e.__node_id,t),i=0,a=e=>{let o=r[i++],s=o[0];if(e.kind===`text`)return n.text(s,e.text);let c=e.kind===`fragment`?n.fragment(s):n.element(s,e.kind,e.kind===`element`?w(o):void 0);if(e.kind===`element`&&p(e)!==void 0){i++;let n=p(c);if(t)for(let t of p(e).__children)B(n,[a(t)],n.__children.length)}if(!t)return c;for(let t of e.__children)B(c,[a(t)],c.__children.length);return c},o=a(e);return R(o),o}function H(e,t){let n=e.__node_id,r=e,i=(e,t)=>{let n=qt(e),i=t();for(let e of n)z(e);B(r,n,i)};return{appendChild:(...e)=>{F(e,1,`appendChild`);let t=V(e[0],1);return i(t,()=>E(n,t.__node_id)),t},insertBefore:(...e)=>{F(e,2,`insertBefore`);let t=V(e[0],1),r=e[1]===null||e[1]===void 0?null:V(e[1],2);if(r&&y(r))throw Kt();return i(t,()=>D(n,t.__node_id,r?.__node_id??null)),t},removeChild:(...e)=>{F(e,1,`removeChild`);let t=V(e[0],1);if(y(t))throw Kt();return O(n,t.__node_id),z(t),R(t),t},replaceChild:(...e)=>{F(e,2,`replaceChild`);let t=V(e[0],1),i=V(e[1],2);if(y(i))throw Kt();let a=qt(t),o=De(n,t.__node_id,i.__node_id);for(let e of a)z(e);return z(i),i!==t&&R(i),B(r,a,o),i},cloneNode:n=>Jt(e,!!n,t)}}function U(e,t){let n=e.__node_id,r=e=>e==null?null:V(e,1);return{contains:t=>{let i=r(t);return i===null?!1:i===e?!0:y(e)||y(i)?!1:!!(Fe(n,i.__node_id)&16)},getRootNode:()=>y(e)?e:t.node(Pe(n)),compareDocumentPosition:(...t)=>{F(t,1,`compareDocumentPosition`);let r=V(t[0],1);return r===e?0:y(e)||y(r)?33|(r.__node_id<n?2:4):Fe(n,r.__node_id)},isSameNode:t=>r(t)===e,isEqualNode:t=>{let i=r(t);return i===null?!1:y(e)||y(i)?i===e:Ie(n,i.__node_id)}}}const Yt={element:1,text:3,comment:8,document:9,fragment:11};function W(e){return y(e)?e.kind===`text`?e.text:``:String(j(e.__node_id,`value`)??``)}function Xt(e,t){e.kind!==`element`&&e.kind!==`fragment`&&e.kind!==`document`&&(y(e)||(A(e.__node_id,`value`,t),e.kind===`text`&&(e.text=t)))}function G(e,t){let n=e.__node_id,r=r=>{if(y(e))return null;let i=qe(n,r);return i===null?null:t.node(i)??null},i,a=()=>y(e)?[]:Je(n).flatMap(e=>t.node(e)??[]);return{get nodeType(){return Yt[e.kind]},get nodeName(){return e.kind===`element`?e.tagName:e.kind===`fragment`?`#document-fragment`:`#${e.kind}`},get nodeValue(){return e.kind===`element`||e.kind===`fragment`||e.kind===`document`?null:W(e)},set nodeValue(t){Xt(e,String(t??``))},get isConnected(){return!y(e)&&Ye(n)},get ownerDocument(){return e.kind===`document`?null:t.document()},get parentNode(){return r(`parent`)},get firstChild(){return r(`first`)},get lastChild(){return r(`last`)},get previousSibling(){return r(`previous`)},get nextSibling(){return r(`next`)},get childNodes(){return i??=Ct(a)},hasChildNodes:()=>a().length>0}}function K(e,t,n){if(g(e))return;let[r,i]=t,[a,o]=typeof r==`object`?[r?.left,r?.top]:[r,i],[s,c]=n?ot(e.__node_id)??[0,0]:[0,0],l=(e,t)=>{if(e===void 0)return null;let r=Number(e);return(n?t:0)+(Number.isFinite(r)?r:0)};st(e.__node_id,l(a,s),l(o,c))}function Zt(e){let t=[`start`,`center`,`end`,`nearest`];return typeof e==`object`&&e?{block:t.includes(e.block??``)?e.block:`start`,inline:t.includes(e.inline??``)?e.inline:`nearest`}:{block:e===!1?`end`:`start`,inline:`nearest`}}function Qt(e,n){m(e,n(t().templateContent(e.__node_id))),t().holdNode(e.__node_id),x(e)}function q(e){return e==null?``:P(e)}function $t(e){let t=e.__node_id,n=(n,r,i)=>{y(e)||($e(t,n,r,i),e.kind===`text`&&(e.text=W(e)))};return{get data(){return W(e)},set data(t){Xt(e,t===null?``:P(t))},get length(){return W(e).length},get textContent(){return W(e)},set textContent(t){Xt(e,q(t))},substringData:(...n)=>{if(F(n,2,`substringData`),!y(e))return Qe(t,n[0],n[1]);let r=n[0]>>>0;return W(e).slice(r,r+(n[1]>>>0))},appendData:(...t)=>{F(t,1,`appendData`),n(W(e).length,0,P(t[0]))},insertData:(...e)=>{F(e,2,`insertData`),n(e[0],0,P(e[1]))},deleteData:(...e)=>{F(e,2,`deleteData`),n(e[0],e[1],``)},replaceData:(...e)=>{F(e,3,`replaceData`),n(e[0],e[1],P(e[2]))}}}function en(e,t){let n=e.__node_id;return{get wholeText(){return y(e)?e.text:Ze(n)},splitText:(...r)=>{if(F(r,1,`splitText`),y(e))throw TypeError(`the text node was freed. create a new one`);let i=et(n,r[0]),a=J(i,String(j(i,`value`)??``),t);e.text=W(e);let o=e.parent;return o===null?(k(a.__node_id),x(a)):(o.__children.splice(o.__children.indexOf(e)+1,0,a),a.parent=o),a}}}function tn(e,t){A(e.__node_id,`value`,t),e.text=t}function J(e,t,n){let i=r({kind:`text`,parent:null,text:t},e);for(let e of[G(i,n),H(i,n),U(i,n),$t(i),en(i,n)])Object.defineProperties(i,Object.getOwnPropertyDescriptors(e));return s(i),i}function Y(e,t){return F(e,1,t),P(e[0])}function nn(e){return Q(e)}function rn(e){let t=e.__node_id;return{querySelector:(...n)=>{let r=Y(n,`querySelector`);if(y(e))return M(r),null;let i=rt(t,r);return i===null?null:nn(i)},querySelectorAll:(...n)=>{let r=Y(n,`querySelectorAll`);if(y(e))return M(r),Ct(()=>[]);let i=it(t,r).map(nn);return Ct(()=>i)}}}const X={element:Z,text:(e,t)=>J(e,t,X),fragment:fn,document:mn,node:Q};function Z(t,n,i=`div`,a=[]){let[o,c,l,u]=typeof i==`string`?[i,e,null,i.replace(/[a-z]/g,e=>e.toUpperCase())]:i,d=c===e,f=C(()=>t,a),m=()=>g(v)?null:ot(t),h={get id(){return y(v)?``:String(j(t,`id`)??``)},set id(e){y(v)||A(t,`id`,String(e))},kind:n,parent:null,__children:[],focus:e=>{g(v)||_e(t,!!e?.preventScroll)},blur:()=>ve(t),click:()=>{g(v)||ge(t)},setPointerCapture:e=>ye(t,e),releasePointerCapture:e=>be(t,e),hasPointerCapture:e=>xe(t,e),addEventListener:(...e)=>{g(v)||f.addEventListener(...e)},removeEventListener:(...e)=>{g(v)||f.removeEventListener(...e)},dispatchEvent:e=>y(v)||f.dispatchEvent(e),get tabIndex(){return It(y(v)?null:j(t,`tabindex`),d?o:``)},set tabIndex(e){y(v)||A(t,`tabindex`,e|0)},getBoundingClientRect:()=>Ft(L(v)),get offsetWidth(){return Math.round(L(v)?.[2]??0)},get offsetHeight(){return Math.round(L(v)?.[3]??0)},get offsetLeft(){return Pt(v).left},get offsetTop(){return Pt(v).top},get offsetParent(){return Nt(v)},get clientWidth(){let e=L(v);return e?Math.max(0,Math.round(e[2]-2*e[4])):0},get clientHeight(){let e=L(v);return e?Math.max(0,Math.round(e[3]-2*e[4])):0},get clientLeft(){return Math.round(L(v)?.[4]??0)},get clientTop(){return Math.round(L(v)?.[4]??0)},get scrollLeft(){return m()?.[0]??0},set scrollLeft(e){K(v,[e],!1)},get scrollTop(){return m()?.[1]??0},set scrollTop(e){K(v,[void 0,e],!1)},get scrollWidth(){return v.clientWidth+Math.round(m()?.[2]??0)},get scrollHeight(){return v.clientHeight+Math.round(m()?.[3]??0)},scrollTo:(...e)=>K(v,e,!1),scrollBy:(...e)=>K(v,e,!0),scrollIntoView:e=>{if(g(v))return;let{block:n,inline:r}=Zt(e);ct(t,n,r)},matches:(...e)=>{let n=Y(e,`matches`);return y(v)?(M(n),!1):tt(t,n)},closest:(...e)=>{let n=Y(e,`closest`);if(y(v))return M(n),null;let r=nt(t,n);return r===null?null:nn(r)}};for(let[e,t]of Object.entries({tagName:u,localName:o,namespaceURI:c,prefix:l}))Object.defineProperty(h,e,{value:t,enumerable:!0});let _=d&&o===`template`;_&&Object.defineProperty(h,"content",{get:()=>p(v),enumerable:!0,configurable:!0}),d&&o===`input`&&Object.defineProperty(h,"value",{get:()=>y(v)?``:pt(t),set:e=>{y(v)||mt(t,e===null?``:String(e))},enumerable:!0,configurable:!0});let v=Mt(r(h,t),()=>g(v));return Object.defineProperties(v,Object.getOwnPropertyDescriptors(Tt(t,v))),Object.defineProperties(v,Object.getOwnPropertyDescriptors(At(v))),Object.defineProperties(v,Object.getOwnPropertyDescriptors(G(v,X))),Object.defineProperties(v,Object.getOwnPropertyDescriptors(H(v,X))),Object.defineProperties(v,Object.getOwnPropertyDescriptors(U(v,X))),Object.defineProperties(v,Object.getOwnPropertyDescriptors(rn(v))),Object.defineProperties(v,Object.getOwnPropertyDescriptors(n===`comment`?$t(v):an(v))),n!==`comment`&&(Object.defineProperties(v,Object.getOwnPropertyDescriptors(Et(t,v))),Object.defineProperties(v,Object.getOwnPropertyDescriptors(Wt(v,X))),Object.defineProperties(v,Object.getOwnPropertyDescriptors(Gt(t))),Object.defineProperties(v,Object.getOwnPropertyDescriptors(Dt(t)))),s(v),_&&Qt(v,fn),v}function an(e){return{get textContent(){return y(e)?``:Xe(e.__node_id)},set textContent(t){y(e)||un(e,q(t))}}}function on(e){return Z(T(e),`element`,e)}function sn(e=``){let t=T(`#comment`);return ut(t,`display`,`none`),A(t,`value`,e),Z(t,`comment`)}function cn(e){let t=T(`#text`);return A(t,`value`,e),J(t,e,X)}function ln(e,t){return J(e,t,X)}function un(e,t){for(let t of e.__children.slice())O(e.__node_id,t.__node_id),z(t),R(t);if(!t)return;let n=cn(t);E(e.__node_id,n.__node_id),n.parent=e,e.__children.push(n)}function dn(){let e=Se();return u(e)??Z(e,`element`,`div`,[`wheel`])}function fn(e){let t=r({kind:`fragment`,parent:null,__children:[]},e),n={get textContent(){return y(t)?``:Xe(e)},set textContent(e){y(t)||un(t,q(e))}};for(let e of[G(t,X),H(t,X),U(t,X),n])Object.defineProperties(t,Object.getOwnPropertyDescriptors(e));return s(t),t}let pn;function mn(){return pn??=hn(Ce())}function Q(e){return l(e)||(e===Se()?dn():e===Ce()?mn():void 0)}function $(e){return R(e),e}function hn(e){let t=Mt(r({...C(e,[`wheel`]),kind:`document`,parent:null,__children:[],get textContent(){return null},set textContent(e){},get activeElement(){let e=ht();return e===null?null:u(e)??null},createDocumentFragment:()=>$(fn(T(`#fragment`))),createElement:(...e)=>{F(e,1,`createElement`);let t=we(P(e[0]));return $(Z(t[0],`element`,w(t)))},createElementNS:(...e)=>{F(e,2,`createElementNS`);let t=Te((e[0]===null||e[0]===void 0?null:P(e[0]))||null,P(e[1]));return $(Z(t[0],`element`,w(t)))},createTextNode:(...e)=>(F(e,1,`createTextNode`),$(cn(P(e[0])))),createComment:(...e)=>(F(e,1,`createComment`),$(sn(P(e[0]))))},e),()=>!1),{cloneNode:n,...i}=H(t,X);for(let e of[G(t,X),i,U(t,X),rn(t)])Object.defineProperties(t,Object.getOwnPropertyDescriptors(e));return Object.setPrototypeOf(t,Document.prototype),s(t),t}const gn=/* @__PURE__ */ Object.defineProperty(Mt(C(`$window`,[`wheel`]),()=>!1),Symbol.toStringTag,{value:`Window`});Object.defineProperty(globalThis,"__inca_targets__",{value:e=>e.map(e=>{if(e===`$window`)return gn;let t=Q(e);return t?.kind===`element`||t?.kind===`document`?t:null}),configurable:!0});export{dt as A,ge as B,D as C,Re as D,it as E,A as F,g as G,_e as H,ut as I,x as K,C as L,ct as M,st as N,lt as O,ot as P,pe as R,k as S,qe as T,de as U,he as V,me as W,E as _,Z as a,ht as b,dn as c,Rt as d,B as f,z as g,zt as h,on as i,Se as j,O as k,un as l,Bt as m,ln as n,cn as o,Vt as p,sn as r,mn as s,gn as t,tn as u,Je as v,at as w,j as x,T as y,ve as z};
|
|
@@ -1,8 +1,21 @@
|
|
|
1
|
-
import { A as
|
|
1
|
+
import { A as CharacterDataMembers, B as IncaNode, C as Overflow, D as TagName, E as StyleProps, F as HTMLCollectionOf, G as NodeListOf, H as IncaTemplateElement, I as HtmlMembers, J as TextMembers, K as NodeMembers, L as IncaElement, M as DOMTokenList, N as EventHandler, O as Attr, P as EventHandlers, R as IncaFragment, S as NodeId, T as ScrollAlignment, U as IncaText, V as IncaParent, W as NamedNodeMap, _ as IncaPointerEvent, a as EventListener, b as IncaWindow, c as IncaCompositionEvent, d as IncaEventMap, f as IncaEventTarget, g as IncaMouseEvent, h as IncaKeyboardEvent, i as EventLike, j as DOMStringMap, k as CSSStyleDeclaration, l as IncaDocument, m as IncaInputEvent, n as AttributeValue, o as EventListenerObject, p as IncaFocusEvent, q as TextContentMember, r as CallbackId, s as EventListenerOrObject, t as window, u as IncaEvent, v as IncaUIEvent, w as Px, x as ListenerOptions, y as IncaWheelEvent, z as IncaInputElement } from "./window-gMkkjr_q.js";
|
|
2
2
|
/** How {@link IncaNative.linkedNode} names the node to reach from a node. */
|
|
3
3
|
type NodeLink = "parent" | "first" | "last" | "previous" | "next";
|
|
4
|
-
/**
|
|
5
|
-
|
|
4
|
+
/**
|
|
5
|
+
* The name of an element. A string is the tag of an HTML element: it is the local name, and its
|
|
6
|
+
* ASCII upper case is the `tagName`. A tuple holds the four name parts of
|
|
7
|
+
* `createElementNS`.
|
|
8
|
+
*/
|
|
9
|
+
type ElementName = string | [localName: string, namespaceURI: string | null, prefix: string | null, tagName: string];
|
|
10
|
+
/** What a native returns for a node without a name: id and the marker or tag. */
|
|
11
|
+
type NodeEntry = [id: NodeId, tag: string];
|
|
12
|
+
/** What a native returns for an element it makes: id and the four name parts. */
|
|
13
|
+
type ElementEntry = [id: NodeId, localName: string, namespaceURI: string | null, prefix: string | null, tagName: string];
|
|
14
|
+
/**
|
|
15
|
+
* One node of a parsed fragment: id, tag, namespace (`null` for a text node, a comment and a
|
|
16
|
+
* fragment), parent id and the text of a text node or a comment.
|
|
17
|
+
*/
|
|
18
|
+
type ParsedEntry = [id: NodeId, tag: string, namespaceURI: string | null, parentId: NodeId, data: string | null];
|
|
6
19
|
/**
|
|
7
20
|
* What a parse writes into the tree: the position of the first inserted node among the children of
|
|
8
21
|
* its container, and the nodes in pre-order. An entry whose parent is no entry is a root.
|
|
@@ -19,11 +32,13 @@ interface IncaNative {
|
|
|
19
32
|
documentNodeId(): NodeId;
|
|
20
33
|
createNode(tag: string): NodeId;
|
|
21
34
|
createElement(localName: string): [NodeId, TagName];
|
|
35
|
+
createElementNS(namespace: string | null, qualifiedName: string): ElementEntry;
|
|
36
|
+
attributeKey(nodeId: NodeId, name: string): string;
|
|
22
37
|
appendChild(parentId: NodeId, nodeId: NodeId): number;
|
|
23
38
|
insertBefore(parentId: NodeId, nodeId: NodeId, refId: NodeId | null): number;
|
|
24
39
|
removeChild(parentId: NodeId, childId: NodeId): void;
|
|
25
40
|
replaceChild(parentId: NodeId, nodeId: NodeId, childId: NodeId): number;
|
|
26
|
-
cloneNode(nodeId: NodeId, deep: boolean):
|
|
41
|
+
cloneNode(nodeId: NodeId, deep: boolean): (NodeEntry | ElementEntry)[];
|
|
27
42
|
templateContent(nodeId: NodeId): NodeId | null;
|
|
28
43
|
innerHtml(nodeId: NodeId): string;
|
|
29
44
|
outerHtml(nodeId: NodeId): string;
|
|
@@ -37,6 +52,12 @@ interface IncaNative {
|
|
|
37
52
|
getAttribute(nodeId: NodeId, key: string): AttributeValue | null;
|
|
38
53
|
removeAttribute(nodeId: NodeId, key: string): void;
|
|
39
54
|
attributeNames(nodeId: NodeId): string[];
|
|
55
|
+
classList(nodeId: NodeId): DOMTokenList;
|
|
56
|
+
datasetGet(nodeId: NodeId, key: string): string | undefined;
|
|
57
|
+
datasetSet(nodeId: NodeId, key: string, value: string): void;
|
|
58
|
+
datasetDelete(nodeId: NodeId, key: string): boolean;
|
|
59
|
+
datasetKeys(nodeId: NodeId): string[];
|
|
60
|
+
datasetTarget(): object;
|
|
40
61
|
linkedNode(nodeId: NodeId, link: NodeLink): NodeId | null;
|
|
41
62
|
childNodeIds(nodeId: NodeId): NodeId[];
|
|
42
63
|
isConnected(nodeId: NodeId): boolean;
|
|
@@ -52,6 +73,7 @@ interface IncaNative {
|
|
|
52
73
|
querySelectorAll(nodeId: NodeId, selector: string): NodeId[];
|
|
53
74
|
setStyle(nodeId: NodeId, key: string, value: AttributeValue): void;
|
|
54
75
|
removeStyle(nodeId: NodeId, key: string): void;
|
|
76
|
+
styleOf(nodeId: NodeId): CSSStyleDeclaration;
|
|
55
77
|
inputValue(nodeId: NodeId): string;
|
|
56
78
|
setInputValue(nodeId: NodeId, value: string): void;
|
|
57
79
|
addEventListener(target: EventTargetId, event: string, callback: HostCallback, capture?: boolean, passive?: boolean): CallbackId;
|
|
@@ -227,11 +249,12 @@ declare function holdNode(nodeId: NodeId): void;
|
|
|
227
249
|
*/
|
|
228
250
|
declare function releaseNode(nodeId: NodeId): void;
|
|
229
251
|
/**
|
|
230
|
-
* Sets
|
|
231
|
-
*
|
|
252
|
+
* Sets an attribute/prop on `nodeId`. The key `style` applies the text as the inline style
|
|
253
|
+
* declarations. See {@link setStyle} for layout/paint properties.
|
|
232
254
|
* @param nodeId - the node to update
|
|
233
255
|
* @param key - the attribute name
|
|
234
256
|
* @param value - the attribute value
|
|
257
|
+
* @throws {DOMException} named `InvalidCharacterError` when `key` is not a valid attribute name
|
|
235
258
|
*/
|
|
236
259
|
declare function setAttribute(nodeId: NodeId, key: string, value: AttributeValue): void;
|
|
237
260
|
/**
|
|
@@ -283,7 +306,7 @@ declare function scrollNode(nodeId: NodeId, left: number | null, top: number | n
|
|
|
283
306
|
*/
|
|
284
307
|
declare function scrollIntoViewNode(nodeId: NodeId, block: ScrollAlignment, inline: ScrollAlignment): void;
|
|
285
308
|
/**
|
|
286
|
-
* Removes
|
|
309
|
+
* Removes an attribute/prop from `nodeId`. Removing an attribute
|
|
287
310
|
* that isn't set does nothing.
|
|
288
311
|
* @param nodeId - the node to update
|
|
289
312
|
* @param key - the attribute name
|
|
@@ -322,17 +345,18 @@ declare function focusedNode(): NodeId | null;
|
|
|
322
345
|
* Builds the {@link IncaElement} handle for a native node: parentless,
|
|
323
346
|
* childless, with `id`, `focus()`, `blur()`, `click()`, the pointer capture
|
|
324
347
|
* methods, the listener methods of an event target, `tabIndex`,
|
|
325
|
-
* the `value` of an `input`, the
|
|
326
|
-
* handler properties, all driven through the host.
|
|
348
|
+
* the `value` of an `input`, the `style`, the `dataset`, the `classList`, the layout members,
|
|
349
|
+
* the node members and the event handler properties, all driven through the host.
|
|
327
350
|
* @param id - the native node's id
|
|
328
351
|
* @param kind - whether the node is an element or a comment stand-in
|
|
329
|
-
* @param
|
|
330
|
-
* index `0`,
|
|
352
|
+
* @param name - the element name, an HTML `div` when omitted. An HTML `button` or `input`
|
|
353
|
+
* defaults to tab index `0`, an HTML `input` has `value` and an HTML `template` has `content`.
|
|
354
|
+
* The handle keeps the name, so the name members read after the host frees the node.
|
|
331
355
|
* @param passiveByDefault - event names whose listeners are passive unless their options say
|
|
332
356
|
* `passive: false`
|
|
333
357
|
* @returns the new handle
|
|
334
358
|
*/
|
|
335
|
-
declare function createIncaElement(id: NodeId, kind: IncaElement["kind"],
|
|
359
|
+
declare function createIncaElement(id: NodeId, kind: IncaElement["kind"], name?: ElementName, passiveByDefault?: readonly string[]): IncaElement;
|
|
336
360
|
/**
|
|
337
361
|
* Allocates a new element node for `tag`.
|
|
338
362
|
* @param tag - the node's element kind
|
|
@@ -411,7 +435,7 @@ declare function nextSibling(node: IncaNode): IncaNode | null;
|
|
|
411
435
|
*/
|
|
412
436
|
declare function setText(node: IncaText, text: string): void;
|
|
413
437
|
declare namespace rendererCore_d_exports {
|
|
414
|
-
export { Attr, AttributeValue, CallbackId, CharacterDataMembers, EventHandler, EventHandlers, EventLike, EventListener, EventListenerObject, EventListenerOrObject, HTMLCollectionOf, HtmlMembers, IncaCompositionEvent, IncaCore, IncaDocument, IncaElement, IncaEvent, IncaEventMap, IncaEventTarget, IncaFocusEvent, IncaFragment, IncaInputElement, IncaInputEvent, IncaKeyboardEvent, IncaMouseEvent, IncaNode, IncaParent, IncaPointerEvent, IncaTemplateElement, IncaText, IncaUIEvent, IncaWheelEvent, IncaWindow, ListenerOptions, NamedNodeMap, NodeId, NodeListOf, NodeMembers, Overflow, Px, ScrollAlignment, StyleProps, TagName, TextContentMember, TextMembers, addEventListener, appendChild, blur, click, createCommentNode, createElementNode, createEventTarget, createIncaElement, createNode, createTextNode, dispatchEvent, focus, focusedNode, getAttribute, holdNode, insert, insertBefore, isRemoved, latestEventId, layoutOf, nextSibling, parentNode, releaseNode, remove, removeAttribute, removeChild, removeEventListener, removeStyle, rootElement, rootNodeId, scrollIntoViewNode, scrollNode, scrollOf, setAttribute, setElementText, setStyle, setText, window };
|
|
438
|
+
export { Attr, AttributeValue, CSSStyleDeclaration, CallbackId, CharacterDataMembers, DOMStringMap, DOMTokenList, EventHandler, EventHandlers, EventLike, EventListener, EventListenerObject, EventListenerOrObject, HTMLCollectionOf, HtmlMembers, IncaCompositionEvent, IncaCore, IncaDocument, IncaElement, IncaEvent, IncaEventMap, IncaEventTarget, IncaFocusEvent, IncaFragment, IncaInputElement, IncaInputEvent, IncaKeyboardEvent, IncaMouseEvent, IncaNode, IncaParent, IncaPointerEvent, IncaTemplateElement, IncaText, IncaUIEvent, IncaWheelEvent, IncaWindow, ListenerOptions, NamedNodeMap, NodeId, NodeListOf, NodeMembers, Overflow, Px, ScrollAlignment, StyleProps, TagName, TextContentMember, TextMembers, addEventListener, appendChild, blur, click, createCommentNode, createElementNode, createEventTarget, createIncaElement, createNode, createTextNode, dispatchEvent, focus, focusedNode, getAttribute, holdNode, insert, insertBefore, isRemoved, latestEventId, layoutOf, nextSibling, parentNode, releaseNode, remove, removeAttribute, removeChild, removeEventListener, removeStyle, rootElement, rootNodeId, scrollIntoViewNode, scrollNode, scrollOf, setAttribute, setElementText, setStyle, setText, window };
|
|
415
439
|
}
|
|
416
440
|
/**
|
|
417
441
|
* What a custom renderer (`incajs/vue`) drives the host through: the tree and
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./rolldown-runtime-DK3Fl9T5.js";import{A as t,B as n,C as r,D as i,F as a,G as o,H as s,I as c,K as l,L as u,M as d,N as f,O as p,P as m,R as h,S as g,U as _,V as v,W as y,_ as b,a as x,b as S,c as C,d as w,h as T,i as E,j as D,k as O,l as k,m as A,o as j,p as M,r as N,t as P,u as F,w as I,x as L,y as R,z}from"./hooks-
|
|
1
|
+
import{t as e}from"./rolldown-runtime-DK3Fl9T5.js";import{A as t,B as n,C as r,D as i,F as a,G as o,H as s,I as c,K as l,L as u,M as d,N as f,O as p,P as m,R as h,S as g,U as _,V as v,W as y,_ as b,a as x,b as S,c as C,d as w,h as T,i as E,j as D,k as O,l as k,m as A,o as j,p as M,r as N,t as P,u as F,w as I,x as L,y as R,z}from"./hooks-DGPTjDZ2.js";var B=/* @__PURE__ */ e({addEventListener:()=>h,appendChild:()=>b,blur:()=>z,click:()=>n,createCommentNode:()=>N,createElementNode:()=>E,createEventTarget:()=>u,createIncaElement:()=>x,createNode:()=>R,createTextNode:()=>j,dispatchEvent:()=>v,focus:()=>s,focusedNode:()=>S,getAttribute:()=>L,holdNode:()=>g,insert:()=>w,insertBefore:()=>r,isRemoved:()=>o,latestEventId:()=>_,layoutOf:()=>I,nextSibling:()=>M,parentNode:()=>A,releaseNode:()=>i,releaseWhenCollected:()=>l,remove:()=>T,removeAttribute:()=>p,removeChild:()=>O,removeEventListener:()=>y,removeStyle:()=>t,rootElement:()=>C,rootNodeId:()=>D,scrollIntoViewNode:()=>d,scrollNode:()=>f,scrollOf:()=>m,setAttribute:()=>a,setElementText:()=>k,setStyle:()=>c,setText:()=>F,window:()=>P});export{B as t};
|
|
@@ -96,7 +96,7 @@ interface NodeListOf<T extends IncaNode> {
|
|
|
96
96
|
}
|
|
97
97
|
/** An attribute of an element. It has no `Node` members. */
|
|
98
98
|
interface Attr {
|
|
99
|
-
/** The attribute name
|
|
99
|
+
/** The attribute name as the element keys it: lower case on an HTML element. */
|
|
100
100
|
readonly name: string;
|
|
101
101
|
/** The same as `name`. */
|
|
102
102
|
readonly localName: string;
|
|
@@ -115,6 +115,35 @@ interface Attr {
|
|
|
115
115
|
/** The element that holds the attribute, or `null` once the attribute is removed. */
|
|
116
116
|
readonly ownerElement: IncaElement | null;
|
|
117
117
|
}
|
|
118
|
+
/**
|
|
119
|
+
* The `data-*` attributes of an element as properties. The key `fooBar` names the attribute
|
|
120
|
+
* `data-foo-bar`. Reads give text and writes convert the value to text.
|
|
121
|
+
*/
|
|
122
|
+
interface DOMStringMap {
|
|
123
|
+
[name: string]: string | undefined;
|
|
124
|
+
}
|
|
125
|
+
/** The live set of the tokens of the `class` attribute. It is read from `classList`. */
|
|
126
|
+
interface DOMTokenList {
|
|
127
|
+
/** The number of tokens. */
|
|
128
|
+
readonly length: number;
|
|
129
|
+
/** The attribute text. Assigning sets the attribute. */
|
|
130
|
+
value: string;
|
|
131
|
+
toString(): string;
|
|
132
|
+
/** Returns the token at `index`, or `null`. */
|
|
133
|
+
item(index: number): string | null;
|
|
134
|
+
contains(token: string): boolean;
|
|
135
|
+
add(...tokens: string[]): void;
|
|
136
|
+
remove(...tokens: string[]): void;
|
|
137
|
+
toggle(token: string, force?: boolean): boolean;
|
|
138
|
+
replace(token: string, newToken: string): boolean;
|
|
139
|
+
/** Throws a `TypeError`, because `class` defines no supported tokens. */
|
|
140
|
+
supports(token: string): boolean;
|
|
141
|
+
forEach(callback: (token: string, index: number, list: DOMTokenList) => void, thisArg?: unknown): void;
|
|
142
|
+
keys(): IteratorObject<number, undefined, unknown>;
|
|
143
|
+
values(): IteratorObject<string, undefined, unknown>;
|
|
144
|
+
entries(): IteratorObject<[number, string], undefined, unknown>;
|
|
145
|
+
[Symbol.iterator](): IteratorObject<string, undefined, unknown>;
|
|
146
|
+
}
|
|
118
147
|
/** A live, read-only list of the attributes of an element in the order they were set. */
|
|
119
148
|
interface NamedNodeMap {
|
|
120
149
|
readonly [index: number]: Attr;
|
|
@@ -309,6 +338,127 @@ interface TextMembers {
|
|
|
309
338
|
*/
|
|
310
339
|
splitText(offset: number): IncaText;
|
|
311
340
|
}
|
|
341
|
+
/**
|
|
342
|
+
* The inline style of an element. Every style key and every CSS alias is a property in camelCase
|
|
343
|
+
* and in kebab-case, and the host-only style keys are properties too. Reading a property gives the
|
|
344
|
+
* declaration in its serialized form, or an empty string when the block has none.
|
|
345
|
+
* Assigning a property sets the declaration, and an empty string removes it. A value the host
|
|
346
|
+
* cannot read prints a warning and leaves the block as it was. The block of a freed element reads
|
|
347
|
+
* empty and ignores writes. It is not constructible, has no indexed access and is not iterable.
|
|
348
|
+
*/
|
|
349
|
+
interface CSSStyleDeclaration {
|
|
350
|
+
/** The number of declarations. */
|
|
351
|
+
readonly length: number;
|
|
352
|
+
/**
|
|
353
|
+
* The declarations as `name: value;` text in the order they were set. Assigning replaces all
|
|
354
|
+
* declarations with the ones the text holds, and `null` assigns `""`.
|
|
355
|
+
*/
|
|
356
|
+
cssText: string;
|
|
357
|
+
/**
|
|
358
|
+
* The serialized value of the declaration `property`, or an empty string when it is unset.
|
|
359
|
+
* @param property - The CSS name, such as `background-color`.
|
|
360
|
+
* @returns The value.
|
|
361
|
+
*/
|
|
362
|
+
getPropertyValue(property: string): string;
|
|
363
|
+
/**
|
|
364
|
+
* Sets the declaration `property` to `value`, and removes it when `value` is `null` or `""`.
|
|
365
|
+
* A `priority` other than `""` and `"important"` leaves the block as it was.
|
|
366
|
+
* @param property - The CSS name.
|
|
367
|
+
* @param value - The value, converted to text.
|
|
368
|
+
* @param priority - The priority, which the host does not keep.
|
|
369
|
+
*/
|
|
370
|
+
setProperty(property: string, value: string | null, priority?: string | null): void;
|
|
371
|
+
/**
|
|
372
|
+
* Removes the declaration `property`.
|
|
373
|
+
* @param property - The CSS name.
|
|
374
|
+
* @returns The value the declaration had, or an empty string when it was unset.
|
|
375
|
+
*/
|
|
376
|
+
removeProperty(property: string): string;
|
|
377
|
+
/**
|
|
378
|
+
* The priority of the declaration `property`.
|
|
379
|
+
* @param property - The CSS name.
|
|
380
|
+
* @returns Always an empty string.
|
|
381
|
+
*/
|
|
382
|
+
getPropertyPriority(property: string): string;
|
|
383
|
+
/**
|
|
384
|
+
* The CSS name of the declaration at `index`, in the order they were set.
|
|
385
|
+
* @param index - The position, converted to an unsigned 32-bit integer.
|
|
386
|
+
* @returns The name, or an empty string beyond the list.
|
|
387
|
+
*/
|
|
388
|
+
item(index: number): string;
|
|
389
|
+
display: string;
|
|
390
|
+
"flex-direction": string;
|
|
391
|
+
flexDirection: string;
|
|
392
|
+
"justify-content": string;
|
|
393
|
+
justifyContent: string;
|
|
394
|
+
"align-items": string;
|
|
395
|
+
alignItems: string;
|
|
396
|
+
gap: string;
|
|
397
|
+
width: string;
|
|
398
|
+
height: string;
|
|
399
|
+
"border-width": string;
|
|
400
|
+
borderWidth: string;
|
|
401
|
+
background: string;
|
|
402
|
+
"background-color": string;
|
|
403
|
+
backgroundColor: string;
|
|
404
|
+
"border-color": string;
|
|
405
|
+
borderColor: string;
|
|
406
|
+
"corner-radius": string;
|
|
407
|
+
cornerRadius: string;
|
|
408
|
+
"border-radius": string;
|
|
409
|
+
borderRadius: string;
|
|
410
|
+
"text-color": string;
|
|
411
|
+
textColor: string;
|
|
412
|
+
color: string;
|
|
413
|
+
"text-size": string;
|
|
414
|
+
textSize: string;
|
|
415
|
+
"font-size": string;
|
|
416
|
+
fontSize: string;
|
|
417
|
+
overflow: string;
|
|
418
|
+
"overflow-x": string;
|
|
419
|
+
overflowX: string;
|
|
420
|
+
"overflow-y": string;
|
|
421
|
+
overflowY: string;
|
|
422
|
+
"flex-grow": string;
|
|
423
|
+
flexGrow: string;
|
|
424
|
+
"flex-shrink": string;
|
|
425
|
+
flexShrink: string;
|
|
426
|
+
opacity: string;
|
|
427
|
+
"min-width": string;
|
|
428
|
+
minWidth: string;
|
|
429
|
+
"min-height": string;
|
|
430
|
+
minHeight: string;
|
|
431
|
+
"max-width": string;
|
|
432
|
+
maxWidth: string;
|
|
433
|
+
"max-height": string;
|
|
434
|
+
maxHeight: string;
|
|
435
|
+
padding: string;
|
|
436
|
+
"padding-x": string;
|
|
437
|
+
paddingX: string;
|
|
438
|
+
"padding-y": string;
|
|
439
|
+
paddingY: string;
|
|
440
|
+
"padding-top": string;
|
|
441
|
+
paddingTop: string;
|
|
442
|
+
"padding-right": string;
|
|
443
|
+
paddingRight: string;
|
|
444
|
+
"padding-bottom": string;
|
|
445
|
+
paddingBottom: string;
|
|
446
|
+
"padding-left": string;
|
|
447
|
+
paddingLeft: string;
|
|
448
|
+
margin: string;
|
|
449
|
+
"margin-x": string;
|
|
450
|
+
marginX: string;
|
|
451
|
+
"margin-y": string;
|
|
452
|
+
marginY: string;
|
|
453
|
+
"margin-top": string;
|
|
454
|
+
marginTop: string;
|
|
455
|
+
"margin-right": string;
|
|
456
|
+
marginRight: string;
|
|
457
|
+
"margin-bottom": string;
|
|
458
|
+
marginBottom: string;
|
|
459
|
+
"margin-left": string;
|
|
460
|
+
marginLeft: string;
|
|
461
|
+
}
|
|
312
462
|
/** The members that read and write the markup of an element. */
|
|
313
463
|
interface HtmlMembers {
|
|
314
464
|
/**
|
|
@@ -348,16 +498,33 @@ interface IncaElement extends IncaEventTarget, EventHandlers, NodeMembers, TextC
|
|
|
348
498
|
* the attribute to the value as a string.
|
|
349
499
|
*/
|
|
350
500
|
id: string;
|
|
501
|
+
/**
|
|
502
|
+
* The `class` attribute, or an empty string when it is unset. Assigning sets the attribute to the
|
|
503
|
+
* value as a string.
|
|
504
|
+
*/
|
|
505
|
+
className: string;
|
|
506
|
+
/**
|
|
507
|
+
* The live token list of the `class` attribute. Every read returns the same list. Assigning a
|
|
508
|
+
* string sets the `value` of the list.
|
|
509
|
+
*/
|
|
510
|
+
get classList(): DOMTokenList;
|
|
511
|
+
set classList(value: string);
|
|
351
512
|
/**
|
|
352
513
|
* `"comment"` for the hidden stand-in `createCommentNode` makes;
|
|
353
514
|
* `"element"` for every other container.
|
|
354
515
|
*/
|
|
355
516
|
readonly kind: "element" | "comment";
|
|
356
517
|
/**
|
|
357
|
-
* The
|
|
358
|
-
* `"DIV"`.
|
|
518
|
+
* The qualified name of the element. An element of the HTML namespace reads in ASCII upper case,
|
|
519
|
+
* such as `"BUTTON"`, and the mount container reads `"DIV"`.
|
|
359
520
|
*/
|
|
360
521
|
readonly tagName: string;
|
|
522
|
+
/** The name of the element without its prefix. */
|
|
523
|
+
readonly localName: string;
|
|
524
|
+
/** The namespace of the element, or `null` for none. */
|
|
525
|
+
readonly namespaceURI: string | null;
|
|
526
|
+
/** The prefix of the element name, or `null` for none. */
|
|
527
|
+
readonly prefix: string | null;
|
|
361
528
|
/** The current parent element or fragment, or `null` if this node isn't attached to the tree. */
|
|
362
529
|
parent: IncaParent | null;
|
|
363
530
|
/**
|
|
@@ -453,6 +620,20 @@ interface IncaElement extends IncaEventTarget, EventHandlers, NodeMembers, TextC
|
|
|
453
620
|
* changes. A key that equals the name of a set attribute reads its `Attr`.
|
|
454
621
|
*/
|
|
455
622
|
readonly attributes: NamedNodeMap;
|
|
623
|
+
/**
|
|
624
|
+
* The inline style as a live block. Every read returns the same object. Assigning a string
|
|
625
|
+
* writes its `cssText`, and `null` assigns `""`.
|
|
626
|
+
*/
|
|
627
|
+
get style(): CSSStyleDeclaration;
|
|
628
|
+
set style(cssText: string | null);
|
|
629
|
+
/**
|
|
630
|
+
* The `data-*` attributes as a live object. Every read returns the same object. A write converts
|
|
631
|
+
* the value to text.
|
|
632
|
+
* @throws DOMException named `SyntaxError` for a write to a key with a dash before a lower case
|
|
633
|
+
* letter, and named `InvalidCharacterError` for a key that makes an invalid attribute name
|
|
634
|
+
* @throws TypeError for a write of a `Symbol` value
|
|
635
|
+
*/
|
|
636
|
+
readonly dataset: DOMStringMap;
|
|
456
637
|
/**
|
|
457
638
|
* Whether this element matches the selector list. `:focus-visible` and the other interactive and
|
|
458
639
|
* form-state pseudo-classes never match.
|
|
@@ -783,6 +964,19 @@ interface IncaDocument extends IncaEventTarget, EventHandlers<IncaDocument>, Omi
|
|
|
783
964
|
* @throws DOMException named `InvalidCharacterError` when `localName` is not a valid element name
|
|
784
965
|
*/
|
|
785
966
|
createElement(localName: string): IncaElement;
|
|
967
|
+
/**
|
|
968
|
+
* Creates an element with a namespace. The namespace converts to a string, and `null`,
|
|
969
|
+
* `undefined` and `""` mean no namespace. The name converts to a string and splits at its first
|
|
970
|
+
* colon into a prefix and a local name. The element keeps the case of the name.
|
|
971
|
+
* @param namespace - The namespace, such as `"http://www.w3.org/2000/svg"`.
|
|
972
|
+
* @param qualifiedName - The element name, such as `"svg"` or `"x:item"`.
|
|
973
|
+
* @returns The new element, which has no parent.
|
|
974
|
+
* @throws TypeError when called with fewer than two arguments
|
|
975
|
+
* @throws DOMException named `InvalidCharacterError` when the prefix or the local name is not a
|
|
976
|
+
* valid element name
|
|
977
|
+
* @throws DOMException named `NamespaceError` when the prefix and the namespace do not fit
|
|
978
|
+
*/
|
|
979
|
+
createElementNS(namespace: string | null, qualifiedName: string): IncaElement;
|
|
786
980
|
/**
|
|
787
981
|
* Creates a text node.
|
|
788
982
|
* @param data - The text. It converts to a string.
|
|
@@ -1137,4 +1331,4 @@ type EventListenerOrObject<E = IncaEvent, T = IncaEventTarget> = EventListener<E
|
|
|
1137
1331
|
* `dispatchEvent`, and the event handler properties such as `onkeydown`.
|
|
1138
1332
|
*/
|
|
1139
1333
|
declare const window: IncaWindow;
|
|
1140
|
-
export {
|
|
1334
|
+
export { CharacterDataMembers as A, IncaNode as B, Overflow as C, TagName as D, StyleProps as E, HTMLCollectionOf as F, NodeListOf as G, IncaTemplateElement as H, HtmlMembers as I, TextMembers as J, NodeMembers as K, IncaElement as L, DOMTokenList as M, EventHandler as N, Attr as O, EventHandlers as P, RectValues as Q, IncaFragment as R, NodeId as S, ScrollAlignment as T, IncaText as U, IncaParent as V, NamedNodeMap as W, ScrollOptions as X, ScrollIntoViewOptions as Y, RectLike as Z, IncaPointerEvent as _, EventListener as a, IncaWindow as b, IncaCompositionEvent as c, IncaEventMap as d, IncaEventTarget as f, IncaMouseEvent as g, IncaKeyboardEvent as h, EventLike as i, DOMStringMap as j, CSSStyleDeclaration as k, IncaDocument as l, IncaInputEvent as m, AttributeValue as n, EventListenerObject as o, IncaFocusEvent as p, TextContentMember as q, CallbackId as r, EventListenerOrObject as s, window as t, IncaEvent as u, IncaUIEvent as v, Px as w, ListenerOptions as x, IncaWheelEvent as y, IncaInputElement as z };
|
package/dist/globals.d.mts
CHANGED
|
@@ -9,9 +9,18 @@ declare global {
|
|
|
9
9
|
/** The interface object of `document`. */
|
|
10
10
|
var Document: { readonly prototype: object };
|
|
11
11
|
|
|
12
|
+
/** The interface object of `element.dataset`, which scripts cannot construct. */
|
|
13
|
+
var DOMStringMap: { readonly prototype: import("incajs").DOMStringMap };
|
|
14
|
+
|
|
12
15
|
/** The interface object of shadow roots, which the host never creates. */
|
|
13
16
|
var ShadowRoot: { readonly prototype: object };
|
|
14
17
|
|
|
18
|
+
/** The interface object of token lists. It cannot be called or constructed. */
|
|
19
|
+
var DOMTokenList: { readonly prototype: import("incajs").DOMTokenList };
|
|
20
|
+
|
|
21
|
+
/** The interface object of the `style` of an element, which a script cannot construct. */
|
|
22
|
+
var CSSStyleDeclaration: { readonly prototype: import("incajs").CSSStyleDeclaration };
|
|
23
|
+
|
|
15
24
|
function setTimeout<A extends unknown[]>(
|
|
16
25
|
handler: (...args: A) => void,
|
|
17
26
|
delay?: number,
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { D as TagName, E as StyleProps, F as
|
|
1
|
+
import { B as IncaNode, D as TagName, E as StyleProps, F as HTMLCollectionOf, G as NodeListOf, H as IncaTemplateElement, L as IncaElement, M as DOMTokenList, O as Attr, Q as RectValues, R as IncaFragment, S as NodeId, V as IncaParent, W as NamedNodeMap, X as ScrollOptions, Y as ScrollIntoViewOptions, Z as RectLike, _ as IncaPointerEvent, a as EventListener, b as IncaWindow, c as IncaCompositionEvent, d as IncaEventMap, f as IncaEventTarget, g as IncaMouseEvent, h as IncaKeyboardEvent, i as EventLike, j as DOMStringMap, k as CSSStyleDeclaration, l as IncaDocument, m as IncaInputEvent, n as AttributeValue, o as EventListenerObject, p as IncaFocusEvent, r as CallbackId, s as EventListenerOrObject, t as window, u as IncaEvent, v as IncaUIEvent, w as Px, x as ListenerOptions, y as IncaWheelEvent, z as IncaInputElement } from "./chunks/window-gMkkjr_q.js";
|
|
2
2
|
/**
|
|
3
3
|
* The top node of the tree and the parent of the mount container. An event at an element passes
|
|
4
4
|
* through it, and it is the next target after the mount container.
|
|
@@ -10,4 +10,4 @@ import { D as TagName, E as StyleProps, F as IncaFragment, H as NodeListOf, I as
|
|
|
10
10
|
* its options say `passive: false`. It is an instance of the global `Document`.
|
|
11
11
|
*/
|
|
12
12
|
export declare const document: IncaDocument;
|
|
13
|
-
export { type Attr, type AttributeValue, type CallbackId, type EventLike, type EventListener, type EventListenerObject, type EventListenerOrObject, type HTMLCollectionOf, type IncaCompositionEvent, type IncaDocument, type IncaElement, type IncaEvent, type IncaEventMap, type IncaEventTarget, type IncaFocusEvent, type IncaFragment, type IncaInputElement, type IncaInputEvent, type IncaKeyboardEvent, type IncaMouseEvent, type IncaNode, type IncaParent, type IncaPointerEvent, type IncaTemplateElement, type IncaUIEvent, type IncaWheelEvent, type IncaWindow, type ListenerOptions, type NamedNodeMap, type NodeId, type NodeListOf, type Px, type RectLike, type RectValues, type ScrollIntoViewOptions, type ScrollOptions, type StyleProps, type TagName, window };
|
|
13
|
+
export { type Attr, type AttributeValue, type CSSStyleDeclaration, type CallbackId, type DOMStringMap, type DOMTokenList, type EventLike, type EventListener, type EventListenerObject, type EventListenerOrObject, type HTMLCollectionOf, type IncaCompositionEvent, type IncaDocument, type IncaElement, type IncaEvent, type IncaEventMap, type IncaEventTarget, type IncaFocusEvent, type IncaFragment, type IncaInputElement, type IncaInputEvent, type IncaKeyboardEvent, type IncaMouseEvent, type IncaNode, type IncaParent, type IncaPointerEvent, type IncaTemplateElement, type IncaUIEvent, type IncaWheelEvent, type IncaWindow, type ListenerOptions, type NamedNodeMap, type NodeId, type NodeListOf, type Px, type RectLike, type RectValues, type ScrollIntoViewOptions, type ScrollOptions, type StyleProps, type TagName, window };
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{s as e,t}from"./chunks/hooks-
|
|
1
|
+
import{s as e,t}from"./chunks/hooks-DGPTjDZ2.js";const n=/* @__PURE__ */ e();export{n as document,t as window};
|
package/dist/rendererCore.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { A as
|
|
2
|
-
import { A as setStyle, C as removeChild, D as scrollNode, E as scrollIntoViewNode, F as focus, I as latestEventId, L as removeEventListener, M as blur, N as click, O as scrollOf, P as dispatchEvent, R as createEventTarget, S as removeAttribute, T as rootNodeId, _ as getAttribute, a as parentNode, b as layoutOf, c as createCommentNode, d as createTextNode, f as rootElement, g as focusedNode, h as createNode, i as nextSibling, j as addEventListener, k as setAttribute, l as createElementNode, m as appendChild, n as setText, o as remove, p as setElementText, r as insert, s as isRemoved, t as IncaCore, u as createIncaElement, v as holdNode, w as removeStyle, x as releaseNode, y as insertBefore } from "./chunks/rendererCore-
|
|
3
|
-
export { type Attr, type AttributeValue, type CallbackId, type CharacterDataMembers, type EventHandler, type EventHandlers, type EventLike, type EventListener, type EventListenerObject, type EventListenerOrObject, type HTMLCollectionOf, type HtmlMembers, type IncaCompositionEvent, IncaCore, type IncaDocument, type IncaElement, type IncaEvent, type IncaEventMap, type IncaEventTarget, type IncaFocusEvent, type IncaFragment, type IncaInputElement, type IncaInputEvent, type IncaKeyboardEvent, type IncaMouseEvent, type IncaNode, type IncaParent, type IncaPointerEvent, type IncaTemplateElement, type IncaText, type IncaUIEvent, type IncaWheelEvent, type IncaWindow, type ListenerOptions, type NamedNodeMap, type NodeId, type NodeListOf, type NodeMembers, type Overflow, type Px, type ScrollAlignment, type StyleProps, type TagName, type TextContentMember, type TextMembers, addEventListener, appendChild, blur, click, createCommentNode, createElementNode, createEventTarget, createIncaElement, createNode, createTextNode, dispatchEvent, focus, focusedNode, getAttribute, holdNode, insert, insertBefore, isRemoved, latestEventId, layoutOf, nextSibling, parentNode, releaseNode, remove, removeAttribute, removeChild, removeEventListener, removeStyle, rootElement, rootNodeId, scrollIntoViewNode, scrollNode, scrollOf, setAttribute, setElementText, setStyle, setText, window };
|
|
1
|
+
import { A as CharacterDataMembers, B as IncaNode, C as Overflow, D as TagName, E as StyleProps, F as HTMLCollectionOf, G as NodeListOf, H as IncaTemplateElement, I as HtmlMembers, J as TextMembers, K as NodeMembers, L as IncaElement, M as DOMTokenList, N as EventHandler, O as Attr, P as EventHandlers, R as IncaFragment, S as NodeId, T as ScrollAlignment, U as IncaText, V as IncaParent, W as NamedNodeMap, _ as IncaPointerEvent, a as EventListener, b as IncaWindow, c as IncaCompositionEvent, d as IncaEventMap, f as IncaEventTarget, g as IncaMouseEvent, h as IncaKeyboardEvent, i as EventLike, j as DOMStringMap, k as CSSStyleDeclaration, l as IncaDocument, m as IncaInputEvent, n as AttributeValue, o as EventListenerObject, p as IncaFocusEvent, q as TextContentMember, r as CallbackId, s as EventListenerOrObject, t as window, u as IncaEvent, v as IncaUIEvent, w as Px, x as ListenerOptions, y as IncaWheelEvent, z as IncaInputElement } from "./chunks/window-gMkkjr_q.js";
|
|
2
|
+
import { A as setStyle, C as removeChild, D as scrollNode, E as scrollIntoViewNode, F as focus, I as latestEventId, L as removeEventListener, M as blur, N as click, O as scrollOf, P as dispatchEvent, R as createEventTarget, S as removeAttribute, T as rootNodeId, _ as getAttribute, a as parentNode, b as layoutOf, c as createCommentNode, d as createTextNode, f as rootElement, g as focusedNode, h as createNode, i as nextSibling, j as addEventListener, k as setAttribute, l as createElementNode, m as appendChild, n as setText, o as remove, p as setElementText, r as insert, s as isRemoved, t as IncaCore, u as createIncaElement, v as holdNode, w as removeStyle, x as releaseNode, y as insertBefore } from "./chunks/rendererCore-Cf8-27u1.js";
|
|
3
|
+
export { type Attr, type AttributeValue, type CSSStyleDeclaration, type CallbackId, type CharacterDataMembers, type DOMStringMap, type DOMTokenList, type EventHandler, type EventHandlers, type EventLike, type EventListener, type EventListenerObject, type EventListenerOrObject, type HTMLCollectionOf, type HtmlMembers, type IncaCompositionEvent, IncaCore, type IncaDocument, type IncaElement, type IncaEvent, type IncaEventMap, type IncaEventTarget, type IncaFocusEvent, type IncaFragment, type IncaInputElement, type IncaInputEvent, type IncaKeyboardEvent, type IncaMouseEvent, type IncaNode, type IncaParent, type IncaPointerEvent, type IncaTemplateElement, type IncaText, type IncaUIEvent, type IncaWheelEvent, type IncaWindow, type ListenerOptions, type NamedNodeMap, type NodeId, type NodeListOf, type NodeMembers, type Overflow, type Px, type ScrollAlignment, type StyleProps, type TagName, type TextContentMember, type TextMembers, addEventListener, appendChild, blur, click, createCommentNode, createElementNode, createEventTarget, createIncaElement, createNode, createTextNode, dispatchEvent, focus, focusedNode, getAttribute, holdNode, insert, insertBefore, isRemoved, latestEventId, layoutOf, nextSibling, parentNode, releaseNode, remove, removeAttribute, removeChild, removeEventListener, removeStyle, rootElement, rootNodeId, scrollIntoViewNode, scrollNode, scrollOf, setAttribute, setElementText, setStyle, setText, window };
|
package/dist/rendererCore.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{R as addEventListener,_ as appendChild,z as blur,B as click,r as createCommentNode,i as createElementNode,L as createEventTarget,a as createIncaElement,y as createNode,o as createTextNode,V as dispatchEvent,H as focus,b as focusedNode,x as getAttribute,S as holdNode,d as insert,C as insertBefore,G as isRemoved,U as latestEventId,w as layoutOf,p as nextSibling,m as parentNode,D as releaseNode,K as releaseWhenCollected,h as remove,O as removeAttribute,k as removeChild,W as removeEventListener,A as removeStyle,c as rootElement,j as rootNodeId,M as scrollIntoViewNode,N as scrollNode,P as scrollOf,F as setAttribute,l as setElementText,I as setStyle,u as setText,t as window}from"./chunks/hooks-
|
|
1
|
+
export{R as addEventListener,_ as appendChild,z as blur,B as click,r as createCommentNode,i as createElementNode,L as createEventTarget,a as createIncaElement,y as createNode,o as createTextNode,V as dispatchEvent,H as focus,b as focusedNode,x as getAttribute,S as holdNode,d as insert,C as insertBefore,G as isRemoved,U as latestEventId,w as layoutOf,p as nextSibling,m as parentNode,D as releaseNode,K as releaseWhenCollected,h as remove,O as removeAttribute,k as removeChild,W as removeEventListener,A as removeStyle,c as rootElement,j as rootNodeId,M as scrollIntoViewNode,N as scrollNode,P as scrollOf,F as setAttribute,l as setElementText,I as setStyle,u as setText,t as window}from"./chunks/hooks-DGPTjDZ2.js";import"./chunks/rendererCore-p80C6A9w.js";
|
package/dist/style.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{E as e,F as t,T as n,a as r,c as i,d as a,f as o,g as s,h as c,i as l,j as u,k as d,n as f,o as p,v as m,x as h}from"./chunks/hooks-
|
|
1
|
+
import{E as e,F as t,T as n,a as r,c as i,d as a,f as o,g as s,h as c,i as l,j as u,k as d,n as f,o as p,v as m,x as h}from"./chunks/hooks-DGPTjDZ2.js";const g=`data-inca-style`,_=/* @__PURE__ */ new Map;let v=!1;function y(e){let t=r(e,`element`,`style`);for(let n of m(e)){let e=f(n,String(h(n,`value`)??``));o(t,[e],t.__children.length)}let a=i();if(n(e,`parent`)===a.__node_id){let n=m(a.__node_id),r=a.__children.filter(t=>n.indexOf(t.__node_id)<n.indexOf(e));o(a,[t],r.length)}return t}function b(){if(!v){for(let t of e(u(),`style[${g}]`))_.set(String(h(t,g)),y(t));v=!0}}function x(e,t){let n=e.__children.slice();t&&a(p(t),e);for(let e of n)c(e)}function S(e,n){b();let r=_.get(e);if(r!==void 0){x(r,n);return}let o=l(`style`);t(o.__node_id,g,e),x(o,n),a(o,i()),_.set(e,o)}function C(e){b();let t=_.get(e);if(t===void 0)return;let r=n(t.__node_id,`parent`);r!==null&&d(r,t.__node_id),s(t),_.delete(e)}export{C as removeStyle,S as updateStyle};
|
package/dist/vue.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import "./chunks/rendererCore-
|
|
1
|
+
import { L as IncaElement } from "./chunks/window-gMkkjr_q.js";
|
|
2
|
+
import "./chunks/rendererCore-Cf8-27u1.js";
|
|
3
3
|
import { App, Component, ComponentPublicInstance } from "@vue/runtime-core";
|
|
4
4
|
/**
|
|
5
5
|
* `@vue/runtime-core`'s `App`, with `mount` also callable with no argument
|
package/dist/vue.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{c as e}from"./chunks/hooks-
|
|
2
|
-
Expected function or array of functions, received type ${typeof e}.`),[]):null}function
|
|
1
|
+
import{c as e}from"./chunks/hooks-DGPTjDZ2.js";import{t}from"./chunks/rendererCore-p80C6A9w.js";import{ErrorCodes as n,callWithAsyncErrorHandling as r,createRenderer as i,warn as a}from"@vue/runtime-core";function o(e){return Object.defineProperty(e,"__v_skip",{value:!0}),e}function s(e){return{createElement:t=>o(e.createElementNode(t)),createText:t=>o(e.createTextNode(t)),createComment:t=>o(e.createCommentNode(t)),setText:(t,n)=>e.setText(t,n),setElementText:(t,n)=>e.setElementText(t,n),insert:(t,n,r)=>e.insert(t,n,r),setScopeId:(t,n)=>e.setAttribute(t.__node_id,n,``),remove:t=>e.remove(t),parentNode:e.parentNode,nextSibling:e.nextSibling}}function c(e,t){let n=t=>(e.holdNode(t.__node_id),e.releaseWhenCollected(t),t),{createElement:r,createText:i}=t;return{createElement:e=>n(r(e)),createText:e=>n(i(e))}}const l=e=>/^on[^a-z]/.test(e),u=e=>/^on[a-z]/.test(e),d=/(?:Once|Passive|Capture)$/,f=/^on:?(?:Once|Passive|Capture)$/,p=e=>e.replace(/\B([A-Z])/g,`-$1`).toLowerCase();function m(e){let t=e,n={event:``,once:!1,capture:!1,passive:!1},r;for(;(r=t.match(d))&&!f.test(t);)t=t.slice(0,-r[0].length),r[0]===`Once`?n.once=!0:r[0]===`Capture`?n.capture=!0:n.passive=!0;return n.event=t[2]===`:`?t.slice(3):p(t.slice(2)),n}const h=e=>typeof e==`string`||typeof e==`number`,g=/* @__PURE__ */ new WeakMap,_=/* @__PURE__ */ new WeakSet;function v(e,t,n){let r=g.get(t);if(r||g.set(t,r=/* @__PURE__ */ new Map),typeof n==`string`){e.setAttribute(t.__node_id,`style`,n),r.clear(),_.add(t);return}_.delete(t)&&e.setAttribute(t.__node_id,`style`,``);let i=typeof n==`object`&&n?n:{},a=!1;for(let n of r.keys())h(i[n])||(e.removeStyle(t.__node_id,n),r.delete(n),a=!0);for(let[n,o]of Object.entries(i))h(o)&&(a||r.get(n)!==o)&&(e.setStyle(t.__node_id,n,o),r.set(n,o))}function y(e,t){return e?typeof e==`function`?[e]:Array.isArray(e)?e.slice():(a(`Wrong type passed as event handler to ${t} - did you forget @ or : in front of your prop?
|
|
2
|
+
Expected function or array of functions, received type ${typeof e}.`),[]):null}function b(e,t){let n=e[0];if(typeof n!=`object`||!n)return t(()=>!1);let r=n.stopImmediatePropagation;if(typeof r!=`function`)return t(()=>!1);let i=Object.hasOwn(n,`stopImmediatePropagation`),a=!1;try{n.stopImmediatePropagation=(...e)=>(a=!0,r.apply(n,e))}catch{return t(()=>!1)}try{t(()=>a)}finally{i?n.stopImmediatePropagation=r:delete n.stopImmediatePropagation}}const x=/* @__PURE__ */ new WeakMap,S=({event:e,capture:t,passive:n})=>`${e}:${t===!0}:${n===!0}`;function C(e,t,n,r){let i=Array.from(r.slots.values()).some(e=>!e.fired);i&&!r.registered&&!e.isRemoved(t)?(e.addEventListener(t.__node_id,r.event,r.dispatcher,r.options),r.registered=!0):!i&&r.registered&&(r.registered=!1,e.removeEventListener(t.__node_id,r.event,r.dispatcher,r.options)),r.slots.size===0&&x.get(t)?.delete(n)}function w(e,t,i,{event:a,capture:o,passive:s}){let c={event:a,options:{capture:o,passive:s},slots:/* @__PURE__ */ new Map,registered:!1,dispatcher:(...a)=>{let o=[],s=a[0]?.eventId;b(a,l=>{for(let u of Array.from(c.slots.keys())){if(l())break;let d=c.slots.get(u);if(d&&!d.fired&&!(typeof s==`number`&&d.attachedAt>=s)){d.once&&(d.fired=!0,C(e,t,i,c));for(let e of d.handlers){if(l())break;if(e)try{r(e,d.instance,n.NATIVE_EVENT_HANDLER,a)}catch(e){o.push(e)}}}}});for(let e of o.slice(1))Promise.reject(e);if(o.length>0)throw o[0]}};return c}function T(e,t,n,r){let i=S(n),a=x.get(t)?.get(i);a?.slots.delete(r)&&C(e,t,i,a)}function E(e,t,n,r,i){let a=m(n),o=y(r,n);if(!o){T(e,t,a,n);return}let s=S(a),c=x.get(t);c||x.set(t,c=/* @__PURE__ */ new Map);let l=c.get(s);l||c.set(s,l=w(e,t,s,a));let u=l.slots.get(n);if(u)u.handlers=o,u.instance=i;else{l.slots.set(n,{attachedAt:e.latestEventId(),handlers:o,instance:i,once:a.once,fired:!1});try{C(e,t,s,l)}catch(e){throw l.slots.delete(n),l.slots.size===0&&c.delete(s),e}}}const D=/* @__PURE__ */ new Set([`disabled`,`hidden`,`inert`,`allowfullscreen`,`formnovalidate`,`ismap`,`itemscope`,`nomodule`,`novalidate`,`readonly`]);function O(e){return(t,n,r,i,a,o)=>{n.startsWith(`onUpdate:`)||(n===`style`?v(e,t,i):l(n)?E(e,t,n,i,o??null):u(n)&&n in t?typeof i==`string`?(Reflect.set(t,n,null),e.setAttribute(t.__node_id,n,i)):Reflect.set(t,n,i):n===`value`&&`value`in t?Reflect.set(t,n,i??``):D.has(n)?n===`hidden`&&typeof i==`string`&&/^until-found$/i.test(i)?e.setAttribute(t.__node_id,n,i):i||i===``?e.setAttribute(t.__node_id,n,``):e.removeAttribute(t.__node_id,n):typeof i==`string`||typeof i==`number`||typeof i==`boolean`?e.setAttribute(t.__node_id,n,i):i==null?e.removeAttribute(t.__node_id,n):e.setAttribute(t.__node_id,n,String(i)))}}const k=/* @__PURE__ */ new Set;function A(n,r){let a={...s(t),patchProp:O(t)},l=i(a);Object.assign(a,c(t,a));let u=l.createApp(n,r),d=u.mount.bind(u),f=u.unmount.bind(u);return Object.assign(u,{mount:t=>{let n=d(t??o(e()));return k.add(u),n},unmount:()=>{f(),k.delete(u)}})}export{A as createIncaApp};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "incajs",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.32",
|
|
4
4
|
"description": "A GPU-native, Webview-free desktop app framework built on GPUI and QuickJS.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"cross-platform",
|
|
@@ -65,7 +65,8 @@
|
|
|
65
65
|
},
|
|
66
66
|
"peerDependencies": {
|
|
67
67
|
"@vue/runtime-core": "^3.5.43",
|
|
68
|
-
"@vue/runtime-dom": "^3.5.43"
|
|
68
|
+
"@vue/runtime-dom": "^3.5.43",
|
|
69
|
+
"vue": "^3.5.43"
|
|
69
70
|
},
|
|
70
71
|
"peerDependenciesMeta": {
|
|
71
72
|
"@vue/runtime-core": {
|
|
@@ -73,6 +74,9 @@
|
|
|
73
74
|
},
|
|
74
75
|
"@vue/runtime-dom": {
|
|
75
76
|
"optional": true
|
|
77
|
+
},
|
|
78
|
+
"vue": {
|
|
79
|
+
"optional": true
|
|
76
80
|
}
|
|
77
81
|
},
|
|
78
82
|
"engines": {
|
|
@@ -83,7 +87,8 @@
|
|
|
83
87
|
"vue": {
|
|
84
88
|
"peers": [
|
|
85
89
|
"@vue/runtime-core",
|
|
86
|
-
"@vue/runtime-dom"
|
|
90
|
+
"@vue/runtime-dom",
|
|
91
|
+
"vue"
|
|
87
92
|
]
|
|
88
93
|
}
|
|
89
94
|
}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
function e(){return globalThis.__inca_native__}const t=/* @__PURE__ */ new WeakSet;function n(e,n){return t.add(e),Object.defineProperty(e,"__node_id",{value:n})}function r(e){return typeof e==`object`&&!!e&&t.has(e)}const i=/* @__PURE__ */ new Map,a=new FinalizationRegistry(e=>{i.get(e)?.deref()||i.delete(e)});function o(e){i.set(e.__node_id,new WeakRef(e)),a.register(e,e.__node_id)}function s(e){i.delete(e)}function c(e){return i.get(e)?.deref()}function l(e){let t=c(e);return t?.kind===`element`?t:void 0}const ee=/* @__PURE__ */ new WeakMap,te=/* @__PURE__ */ new WeakMap;function u(e){return e.kind===`element`?ee.get(e):void 0}function ne(e,t){ee.set(e,t),te.set(t,e)}const re=/* @__PURE__ */ new WeakSet;function d(e){return re.has(e)||p.has(e)}function f(e){if(re.add(e),e.kind===`text`)return;for(let t of e.__children)f(t);let t=u(e);t&&f(t)}const p=/* @__PURE__ */ new WeakSet;function m(e){return p.has(e)}function h(e){if(p.has(e)||(p.add(e),s(e.__node_id),e.kind===`text`))return;for(let t of e.__children)h(t);let t=u(e);t&&h(t);let n=e.kind===`fragment`?te.get(e):void 0;n&&h(n)}function ie(e){for(let t of e){let e=c(t);e&&h(e)}}const ae=new FinalizationRegistry(t=>e().releaseNode(t)),oe=/* @__PURE__ */ new WeakSet;function se(e){return oe.has(e)}function g(e){oe.add(e),ae.register(e,e.__node_id)}const _=/* @__PURE__ */ new Map,ce=/* @__PURE__ */ new Map;function le(e,t,n){let r=_.get(e);r||_.set(e,r=/* @__PURE__ */ new Map),r.set(t,n),ce.set(n,{group:e,listener:t})}function ue(e,t){return _.get(e)?.get(t)}function de(e){let t=ce.get(e);if(t===void 0)return;ce.delete(e);let n=_.get(t.group);n?.delete(t.listener),n?.size===0&&_.delete(t.group)}function fe(e){for(let t of e)de(t)}const pe=(e,t,n)=>`${e}:${t}:${n===!0}`;Object.defineProperty(globalThis,"__inca_released__",{value:(e,t)=>{fe(t),ie(e)},configurable:!0});let v=0;function me(){return v}function he(e){return(...t)=>{let n=t[0]?.eventId;return typeof n==`number`&&n>v&&(v=n),e(...t)}}function ge(t,n,r,i={}){if(r==null)return;let a=pe(t,n,i.capture);if(ue(a,r)!==void 0)return;let o=(...e)=>typeof r==`function`?r.apply(e[0]?.currentTarget,e):r.handleEvent.apply(r,e),s=i.once?(...e)=>(y(t,n,r,i),o(...e)):o;le(a,r,e().addEventListener(t,n,he(s),i.capture===!0,i.passive===!0))}function y(t,n,r,i={}){if(r==null)return;let a=ue(pe(t,n,i.capture),r);a!==void 0&&(e().removeEventListener(t,n,a),de(a))}function _e(t,n){return e().dispatchEvent(t,n)}function ve(t){e().click(t)}function ye(t,n){e().focusNode(t,n)}function be(t){e().blurNode(t)}function xe(t,n){e().setPointerCapture(t,n)}function Se(t,n){e().releasePointerCapture(t,n)}function Ce(t,n){return e().hasPointerCapture(t,n)}function b(e,t=[]){let n=typeof e==`function`?e:()=>e;return{addEventListener(e,r,i){let a=typeof i==`boolean`?{capture:i}:i??{};ge(n(),e,r,{...a,passive:a.passive??t.includes(e)})},removeEventListener(e,t,r){let i=typeof r==`boolean`?r:r?.capture;y(n(),e,t,{capture:i})},dispatchEvent:e=>_e(n(),e)}}function x(){return e().rootNodeId()}function we(){return e().documentNodeId()}function Te(t){return e().createElement(t)}function S(t){return e().createNode(t)}function Ee(t,n){return e().appendChild(t,n)}function C(t,n,r){return e().insertBefore(t,n,r)}function w(t,n){e().removeChild(t,n)}function De(t,n,r){return e().replaceChild(t,n,r)}function Oe(t,n){return e().cloneNode(t,n)}function ke(t){return e().innerHtml(t)}function Ae(t){return e().outerHtml(t)}function je(t,n){return e().setInnerHtml(t,n)}function Me(t,n){return e().setOuterHtml(t,n)}function Ne(t,n,r){return e().insertAdjacentHtml(t,n,r)}function Pe(t){return e().rootOf(t)}function Fe(t,n){return e().compareNodePosition(t,n)}function Ie(t,n){return e().isEqualNode(t,n)}function Le(t){fe(e().releaseListeners(t))}function T(t){e().holdNode(t)}function Re(t){e().releaseNode(t)}function E(t,n,r){e().setAttribute(t,n,r)}function D(t,n){return e().getAttribute(t,n)}function ze(t){return e().attributeNames(t)}function Be(t,n){return e().linkedNode(t,n)}function Ve(t){return e().childNodeIds(t)}function He(t){return e().isConnected(t)}function Ue(t){return e().textContent(t)}function We(t){return e().wholeText(t)}function Ge(t,n,r){return e().substringData(t,n,r)}function Ke(t,n,r,i){e().replaceData(t,n,r,i)}function qe(t,n){return e().splitText(t,n)}function Je(t,n){return e().matches(t,n)}function Ye(t,n){return e().closest(t,n)}function Xe(t,n){return e().querySelector(t,n)}function Ze(t,n){return e().querySelectorAll(t,n)}function O(t){e().checkSelector(t)}function Qe(t){return e().layoutOf(t)}function $e(t){return e().scrollOf(t)}function et(t,n,r){e().scrollNode(t,n,r)}function tt(t,n,r){e().scrollIntoViewNode(t,n,r)}function nt(t,n){e().removeAttribute(t,n)}function rt(t,n,r){e().setStyle(t,n,r)}function it(t,n){e().removeStyle(t,n)}function at(t){return e().inputValue(t)}function ot(t,n){e().setInputValue(t,n)}function st(){return e().focusedNode()}const ct=/^(?:0|[1-9]\d*)$/,lt=2**32-1;function k(e){return ct.test(e)&&Number(e)<lt}function ut(e,t){return t===``?null:e.find(e=>e.id===t)??e.find(e=>e.getAttribute(`name`)===t)??null}function dt(e){let t=/* @__PURE__ */ new Set;for(let n of e)t.add(n.id),t.add(n.getAttribute(`name`)??``);return t.delete(``),[...t]}function ft(e){let{source:t,named:n}=e,r=e=>{if(e!==l)throw TypeError(`the receiver is not a collection. call it on one`)},i={writable:!0,enumerable:!0,configurable:!0},a=Object.create(Object.prototype,{length:{get(){return r(this),t().length},enumerable:!0,configurable:!0},item:{...i,value:Object.defineProperty(function(...e){if(r(this),e.length<1)throw TypeError(`item() needs 1 argument`);return t()[e[0]>>>0]??null},"length",{value:1})},...e.method&&{[e.method]:{...i,value(...t){if(r(this),t.length<1)throw TypeError(`${e.method}() needs 1 argument`);return e.find(`${t[0]}`)}}},...e.arrayMembers&&{forEach:{...i,value:Array.prototype.forEach},entries:{...i,value:Array.prototype.entries},keys:{...i,value:Array.prototype.keys},values:{...i,value:Array.prototype.values}},[Symbol.iterator]:{...i,enumerable:!1,value:Array.prototype.values},[Symbol.toStringTag]:{value:e.tag,configurable:!0}}),o=Object.create(a),s=e=>Object.hasOwn(o,e),c=e=>k(e)||!s(e)&&!(e in a)&&n(e)!==null,l=new Proxy(o,{get(e,r,i){return typeof r==`symbol`?Reflect.get(o,r,i):k(r)?t()[Number(r)]:r in o?Reflect.get(o,r,i):n(r)??void 0},has(e,r){return typeof r==`symbol`||r in o?r in o:k(r)?Number(r)<t().length:n(r)!==null},set(e,t,n,r){return r===l&&typeof t==`string`&&c(t)?!1:Reflect.set(o,t,n,r)},deleteProperty(e,n){if(typeof n==`string`){if(k(n))return Number(n)>=t().length;if(c(n))return!1}return Reflect.deleteProperty(o,n)},preventExtensions:()=>!1,defineProperty(e,t,n){return typeof t==`string`&&c(t)?!1:Reflect.defineProperty(o,t,n)},ownKeys(){let n=t(),r=Array.from(n,(e,t)=>String(t)),i=e.names(n).filter(e=>!k(e)&&!(e in a)&&!s(e)),c=Reflect.ownKeys(o);return[...r,...c,...i]},getOwnPropertyDescriptor(e,r){if(typeof r==`symbol`||s(r))return Reflect.getOwnPropertyDescriptor(o,r);if(k(r)){let e=t()[Number(r)];return e?{value:e,writable:!1,enumerable:!0,configurable:!0}:void 0}let i=r in a?void 0:n(r);return i?{value:i,writable:!1,enumerable:!1,configurable:!0}:void 0}});return l}function pt(e){let t=t=>ut(e(),t);return ft({tag:`HTMLCollection`,method:`namedItem`,source:e,find:t,named:t,names:dt})}function mt(e,t,n){return ft({tag:`NamedNodeMap`,method:`getNamedItem`,source:e,find:t,named:n,names:e=>e.map(e=>e.name)})}function A(e){return ft({tag:`NodeList`,arrayMembers:!0,source:e,find:()=>null,named:()=>null,names:()=>[]})}const ht=/* @__PURE__ */ new Set([`\0`,` `,`
|
|
2
|
-
`,`\f`,`\r`,` `,`/`,`=`,`>`]);function gt(e){if(e.length===0)return!1;for(let t of e)if(ht.has(t))return!1;return!0}function j(e){if(typeof e==`symbol`)throw TypeError(`a symbol cannot become text`);return String(e)}function M(e,t,n){if(e.length<t)throw TypeError(`${n}() needs ${t} argument${t===1?``:`s`}`)}function _t(e){return e.replace(/[A-Z]/g,e=>e.toLowerCase())}var N=class e{#e;#t;#n;#r;#i;constructor(e,t,n,r,i){this.#e=e,this.#i=t,this.#t=n,this.#r=r,this.#n=i}static detach(e){e.#r=null,e.#n(e)}#a(){if(this.#r===null)return!1;let t=m(this.#r)?null:D(this.#t,this.#e);return t===null?(e.detach(this),!1):(this.#i=j(t),!0)}get name(){return this.#e}get localName(){return this.#e}get value(){return this.#a(),this.#i}set value(e){let t=j(e);this.#a()&&E(this.#t,this.#e,t),this.#i=t}get namespaceURI(){return null}get prefix(){return null}get specified(){return!0}get ownerElement(){return this.#a(),this.#r}get[Symbol.toStringTag](){return`Attr`}};function vt(e,t){let n=t=>{let n=D(e,t);return n===null?null:j(n)},r=()=>m(t)?[]:ze(e),i=/* @__PURE__ */ new Map,a=e=>{i.get(e.name)===e&&i.delete(e.name)},o=(n,r)=>{let o=i.get(n);return o||(o=new N(n,r,e,t,a),i.set(n,o)),o},s=e=>{let r=m(t)?null:n(e);if(r!==null)return o(e,r);let a=i.get(e);return a&&N.detach(a),null},c=()=>{let e=r(),t=new Set(e);for(let[e,n]of i)t.has(e)||N.detach(n);return e.map(e=>i.get(e)??o(e,n(e)))},l;return{getAttribute:(...e)=>(M(e,1,`getAttribute`),m(t)?null:n(j(e[0]))),setAttribute:(...n)=>{M(n,2,`setAttribute`);let r=j(n[0]),i=j(n[1]);if(!gt(r))throw new DOMException(`the attribute name is not valid. it is empty or holds whitespace, '/', '=' or '>'`,`InvalidCharacterError`);m(t)||E(e,r,i)},hasAttribute:(...e)=>(M(e,1,`hasAttribute`),!m(t)&&n(j(e[0]))!==null),removeAttribute:(...n)=>{M(n,1,`removeAttribute`);let r=j(n[0]);m(t)||nt(e,r)},getAttributeNames:()=>r(),get attributes(){return l??=mt(c,e=>s(_t(e)),e=>e===_t(e)?s(e):null),l}}}function yt(e){return e.kind===`element`}function P(e){return e.__children.filter(yt)}function bt(e,t){let n=e.parent?.__children??[];for(let r=n.indexOf(e)+t;r>=0&&r<n.length;r+=t){let e=n[r];if(yt(e))return e}return null}function xt(e){let t;return{get children(){return t??=pt(()=>P(e))},get parentElement(){return e.parent?.kind===`element`?e.parent:null},get firstElementChild(){return P(e)[0]??null},get lastElementChild(){return P(e).at(-1)??null},get childElementCount(){return P(e).length},get previousElementSibling(){return bt(e,-1)},get nextElementSibling(){return bt(e,1)}}}const St=((...e)=>e)(`auxclick`,`beforeinput`,`blur`,`change`,`click`,`contextmenu`,`dblclick`,`focus`,`gotpointercapture`,`input`,`keydown`,`keypress`,`keyup`,`lostpointercapture`,`mousedown`,`mouseenter`,`mouseleave`,`mousemove`,`mouseout`,`mouseover`,`mouseup`,`pointerdown`,`pointerenter`,`pointerleave`,`pointermove`,`pointerout`,`pointerover`,`pointerup`,`scroll`,`wheel`);function F(e,t){for(let n of St){let r=null,i=function(e){typeof r==`function`&&Reflect.apply(r,this,[e])===!1&&e.preventDefault()};Object.defineProperty(e,`on${n}`,{get:()=>r,set(a){t()||(r=typeof a==`function`||typeof a==`object`&&a?a:null,r===null?e.removeEventListener(n,i):e.addEventListener(n,i))}})}return e}function I(e){return d(e)?null:Qe(e.__node_id)}function Ct(e){let t=e.parent;return!I(e)||t?.kind!==`element`||!I(t)?null:t}function wt(e){let t=I(e);if(!t)return{left:0,top:0};let n=Ct(e),r=n?I(n):null;return{left:Math.round(t[0]-(r?r[0]+r[4]:0)+t[5])||0,top:Math.round(t[1]-(r?r[1]+r[4]:0)+t[6])||0}}function Tt(e){let[t,n,r,i]=e??[0,0,0,0,0],a={x:t,y:n,width:r,height:i,top:n,left:t,right:t+r,bottom:n+i};return{...a,toJSON:()=>({...a})}}function Et(e,t){let n=t===`button`||t===`input`?0:-1;if(typeof e!=`string`&&typeof e!=`number`)return n;let r=/^[\t\n\f\r ]*([+-]?\d+)/.exec(String(e));if(!r)return n;let i=Number(r[1])||0;return i>=-2147483648&&i<=2147483647?i:n}function L(e){m(e)||se(e)||(T(e.__node_id),g(e))}function R(e){let t=e.parent;if(!t)return;let n=t.__children.indexOf(e);n!==-1&&t.__children.splice(n,1),e.parent=null}function z(e,t,n){e.__children.splice(n,0,...t);for(let n of t)n.parent=e}function Dt(e){e.parent&&w(e.parent.__node_id,e.__node_id),R(e)}function Ot(e,t,n){if(n===e&&e.parent===t)return;Dt(e);let r=n?t.__children.indexOf(n):-1;C(t.__node_id,e.__node_id,n&&r!==-1?n.__node_id:null),r===-1?t.__children.push(e):t.__children.splice(r,0,e),e.parent=t}function kt(e){e.parent&&m(e.parent)?R(e):Dt(e),Le(e.__node_id),f(e),L(e)}function At(e){return e.parent?.kind===`element`?e.parent:null}function jt(e){let t=e.parent;if(!t)return null;let n=t.__children.indexOf(e);return t.__children[n+1]??null}function Mt(e){return e===null?``:j(e)}function Nt(e,t){let n=/* @__PURE__ */ new Map,r=[];for(let[i,a,o,s]of e[1]){let e=n.get(o);if(a===`#fragment`){n.set(i,u(e));continue}let c=a===`#text`?t.text(i,s??``):a===`#comment`?t.element(i,`comment`):t.element(i,`element`,a);n.set(i,c),e?z(e,[c],e.__children.length):r.push(c)}return r}function Pt(e,t){let n=e.__node_id,r=(e,n)=>z(n,Nt(e,t),e[0]);return{get innerHTML(){return m(e)?``:ke(n)},set innerHTML(t){let i=Mt(t);if(m(e))return;let a=u(e)??e,o=je(n,i);for(let e of a.__children.slice())R(e),L(e);r(o,a)},get outerHTML(){return m(e)?``:Ae(n)},set outerHTML(t){let i=Mt(t);if(m(e))return;let a=Me(n,i),o=e.parent;a!==null&&(R(e),L(e),r(a,o))},insertAdjacentHTML:(...t)=>{M(t,2,`insertAdjacentHTML`);let i=j(t[0]),a=j(t[1]);if(m(e))return;let o=Ne(n,i,a),s=/^(beforebegin|afterend)$/i.test(i);r(o,s?e.parent:e)}}}function B(e){return e.toLowerCase()===`template`}function Ft(t,n){ne(t,n(e().templateContent(t.__node_id))),e().holdNode(t.__node_id),g(t)}function V(){return new DOMException(`the node was freed. pass a child of the node you call it on`,`NotFoundError`)}function H(e,t){if(!r(e))throw TypeError(`parameter ${t} is not a node. pass an element, a text node, a comment or a fragment`);return e}function It(e){return e.kind===`fragment`?e.__children.slice():[e]}function Lt(e,t,n){let r=Oe(e.__node_id,t),i=0,a=e=>{let[o,s]=r[i++];if(e.kind===`text`)return n.text(o,e.text);let c=e.kind===`fragment`?n.fragment(o):n.element(o,e.kind,e.kind===`element`?s:void 0);if(e.kind===`element`&&B(e.tagName)){i++;let n=u(c);if(t)for(let t of u(e).__children)z(n,[a(t)],n.__children.length)}if(!t)return c;for(let t of e.__children)z(c,[a(t)],c.__children.length);return c},o=a(e);return L(o),o}function U(e,t){let n=e.__node_id,r=e,i=(e,t)=>{let n=It(e),i=t();for(let e of n)R(e);z(r,n,i)};return{appendChild:(...e)=>{M(e,1,`appendChild`);let t=H(e[0],1);return i(t,()=>Ee(n,t.__node_id)),t},insertBefore:(...e)=>{M(e,2,`insertBefore`);let t=H(e[0],1),r=e[1]===null||e[1]===void 0?null:H(e[1],2);if(r&&m(r))throw V();return i(t,()=>C(n,t.__node_id,r?.__node_id??null)),t},removeChild:(...e)=>{M(e,1,`removeChild`);let t=H(e[0],1);if(m(t))throw V();return w(n,t.__node_id),R(t),L(t),t},replaceChild:(...e)=>{M(e,2,`replaceChild`);let t=H(e[0],1),i=H(e[1],2);if(m(i))throw V();let a=It(t),o=De(n,t.__node_id,i.__node_id);for(let e of a)R(e);return R(i),i!==t&&L(i),z(r,a,o),i},cloneNode:n=>Lt(e,!!n,t)}}function W(e,t){let n=e.__node_id,r=e=>e==null?null:H(e,1);return{contains:t=>{let i=r(t);return i===null?!1:i===e?!0:m(e)||m(i)?!1:!!(Fe(n,i.__node_id)&16)},getRootNode:()=>m(e)?e:t.node(Pe(n)),compareDocumentPosition:(...t)=>{M(t,1,`compareDocumentPosition`);let r=H(t[0],1);return r===e?0:m(e)||m(r)?33|(r.__node_id<n?2:4):Fe(n,r.__node_id)},isSameNode:t=>r(t)===e,isEqualNode:t=>{let i=r(t);return i===null?!1:m(e)||m(i)?i===e:Ie(n,i.__node_id)}}}const Rt={element:1,text:3,comment:8,document:9,fragment:11};function G(e){return m(e)?e.kind===`text`?e.text:``:String(D(e.__node_id,`value`)??``)}function K(e,t){e.kind!==`element`&&e.kind!==`fragment`&&e.kind!==`document`&&(m(e)||(E(e.__node_id,`value`,t),e.kind===`text`&&(e.text=t)))}function q(e,t){let n=e.__node_id,r=r=>{if(m(e))return null;let i=Be(n,r);return i===null?null:t.node(i)??null},i,a=()=>m(e)?[]:Ve(n).flatMap(e=>t.node(e)??[]);return{get nodeType(){return Rt[e.kind]},get nodeName(){return e.kind===`element`?e.tagName:e.kind===`fragment`?`#document-fragment`:`#${e.kind}`},get nodeValue(){return e.kind===`element`||e.kind===`fragment`||e.kind===`document`?null:G(e)},set nodeValue(t){K(e,String(t??``))},get isConnected(){return!m(e)&&He(n)},get ownerDocument(){return e.kind===`document`?null:t.document()},get parentNode(){return r(`parent`)},get firstChild(){return r(`first`)},get lastChild(){return r(`last`)},get previousSibling(){return r(`previous`)},get nextSibling(){return r(`next`)},get childNodes(){return i??=A(a)},hasChildNodes:()=>a().length>0}}function J(e,t,n){if(d(e))return;let[r,i]=t,[a,o]=typeof r==`object`?[r?.left,r?.top]:[r,i],[s,c]=n?$e(e.__node_id)??[0,0]:[0,0],l=(e,t)=>{if(e===void 0)return null;let r=Number(e);return(n?t:0)+(Number.isFinite(r)?r:0)};et(e.__node_id,l(a,s),l(o,c))}function zt(e){let t=[`start`,`center`,`end`,`nearest`];return typeof e==`object`&&e?{block:t.includes(e.block??``)?e.block:`start`,inline:t.includes(e.inline??``)?e.inline:`nearest`}:{block:e===!1?`end`:`start`,inline:`nearest`}}function Bt(e){return e==null?``:j(e)}function Vt(e){let t=e.__node_id,n=(n,r,i)=>{m(e)||(Ke(t,n,r,i),e.kind===`text`&&(e.text=G(e)))};return{get data(){return G(e)},set data(t){K(e,t===null?``:j(t))},get length(){return G(e).length},get textContent(){return G(e)},set textContent(t){K(e,Bt(t))},substringData:(...n)=>{if(M(n,2,`substringData`),!m(e))return Ge(t,n[0],n[1]);let r=n[0]>>>0;return G(e).slice(r,r+(n[1]>>>0))},appendData:(...t)=>{M(t,1,`appendData`),n(G(e).length,0,j(t[0]))},insertData:(...e)=>{M(e,2,`insertData`),n(e[0],0,j(e[1]))},deleteData:(...e)=>{M(e,2,`deleteData`),n(e[0],e[1],``)},replaceData:(...e)=>{M(e,3,`replaceData`),n(e[0],e[1],j(e[2]))}}}function Ht(e,t){let n=e.__node_id;return{get wholeText(){return m(e)?e.text:We(n)},splitText:(...r)=>{if(M(r,1,`splitText`),m(e))throw TypeError(`the text node was freed. create a new one`);let i=qe(n,r[0]),a=Y(i,String(D(i,`value`)??``),t);e.text=G(e);let o=e.parent;return o===null?(T(a.__node_id),g(a)):(o.__children.splice(o.__children.indexOf(e)+1,0,a),a.parent=o),a}}}function Ut(e,t){E(e.__node_id,`value`,t),e.text=t}function Y(e,t,r){let i=n({kind:`text`,parent:null,text:t},e);for(let e of[q(i,r),U(i,r),W(i,r),Vt(i),Ht(i,r)])Object.defineProperties(i,Object.getOwnPropertyDescriptors(e));return o(i),i}function X(e,t){return M(e,1,t),j(e[0])}function Wt(e){return nn(e)}function Gt(e){let t=e.__node_id;return{querySelector:(...n)=>{let r=X(n,`querySelector`);if(m(e))return O(r),null;let i=Xe(t,r);return i===null?null:Wt(i)},querySelectorAll:(...n)=>{let r=X(n,`querySelectorAll`);if(m(e))return O(r),A(()=>[]);let i=Ze(t,r).map(Wt);return A(()=>i)}}}const Z={element:Q,text:(e,t)=>Y(e,t,Z),fragment:$t,document:tn,node:nn};function Q(e,t,r=`div`,i=[]){let a=b(()=>e,i),s=()=>d(l)?null:$e(e),c={get id(){return m(l)?``:String(D(e,`id`)??``)},set id(t){m(l)||E(e,`id`,String(t))},kind:t,tagName:r.replace(/[a-z]/g,e=>e.toUpperCase()),parent:null,__children:[],focus:t=>{d(l)||ye(e,!!t?.preventScroll)},blur:()=>be(e),click:()=>{d(l)||ve(e)},setPointerCapture:t=>xe(e,t),releasePointerCapture:t=>Se(e,t),hasPointerCapture:t=>Ce(e,t),addEventListener:(...e)=>{d(l)||a.addEventListener(...e)},removeEventListener:(...e)=>{d(l)||a.removeEventListener(...e)},dispatchEvent:e=>m(l)||a.dispatchEvent(e),get tabIndex(){return Et(m(l)?null:D(e,`tabindex`),r)},set tabIndex(t){m(l)||E(e,`tabindex`,t|0)},getBoundingClientRect:()=>Tt(I(l)),get offsetWidth(){return Math.round(I(l)?.[2]??0)},get offsetHeight(){return Math.round(I(l)?.[3]??0)},get offsetLeft(){return wt(l).left},get offsetTop(){return wt(l).top},get offsetParent(){return Ct(l)},get clientWidth(){let e=I(l);return e?Math.max(0,Math.round(e[2]-2*e[4])):0},get clientHeight(){let e=I(l);return e?Math.max(0,Math.round(e[3]-2*e[4])):0},get clientLeft(){return Math.round(I(l)?.[4]??0)},get clientTop(){return Math.round(I(l)?.[4]??0)},get scrollLeft(){return s()?.[0]??0},set scrollLeft(e){J(l,[e],!1)},get scrollTop(){return s()?.[1]??0},set scrollTop(e){J(l,[void 0,e],!1)},get scrollWidth(){return l.clientWidth+Math.round(s()?.[2]??0)},get scrollHeight(){return l.clientHeight+Math.round(s()?.[3]??0)},scrollTo:(...e)=>J(l,e,!1),scrollBy:(...e)=>J(l,e,!0),scrollIntoView:t=>{if(d(l))return;let{block:n,inline:r}=zt(t);tt(e,n,r)},matches:(...t)=>{let n=X(t,`matches`);return m(l)?(O(n),!1):Je(e,n)},closest:(...t)=>{let n=X(t,`closest`);if(m(l))return O(n),null;let r=Ye(e,n);return r===null?null:Wt(r)}};B(r)&&Object.defineProperty(c,"content",{get:()=>u(l),enumerable:!0,configurable:!0}),r===`input`&&Object.defineProperty(c,"value",{get:()=>m(l)?``:at(e),set:t=>{m(l)||ot(e,t===null?``:String(t))},enumerable:!0,configurable:!0});let l=F(n(c,e),()=>d(l));return Object.defineProperties(l,Object.getOwnPropertyDescriptors(vt(e,l))),Object.defineProperties(l,Object.getOwnPropertyDescriptors(xt(l))),Object.defineProperties(l,Object.getOwnPropertyDescriptors(q(l,Z))),Object.defineProperties(l,Object.getOwnPropertyDescriptors(U(l,Z))),Object.defineProperties(l,Object.getOwnPropertyDescriptors(W(l,Z))),Object.defineProperties(l,Object.getOwnPropertyDescriptors(Gt(l))),Object.defineProperties(l,Object.getOwnPropertyDescriptors(t===`comment`?Vt(l):Kt(l))),t!==`comment`&&Object.defineProperties(l,Object.getOwnPropertyDescriptors(Pt(l,Z))),o(l),B(r)&&Ft(l,$t),l}function Kt(e){return{get textContent(){return m(e)?``:Ue(e.__node_id)},set textContent(t){m(e)||Zt(e,Bt(t))}}}function qt(e){return Q(S(e),`element`,e)}function Jt(e=``){let t=S(`#comment`);return rt(t,`display`,`none`),E(t,`value`,e),Q(t,`comment`)}function Yt(e){let t=S(`#text`);return E(t,`value`,e),Y(t,e,Z)}function Xt(e,t){return Y(e,t,Z)}function Zt(e,t){for(let t of e.__children.slice())w(e.__node_id,t.__node_id),R(t),L(t);if(!t)return;let n=Yt(t);Ee(e.__node_id,n.__node_id),n.parent=e,e.__children.push(n)}function Qt(){let e=x();return l(e)??Q(e,`element`,void 0,[`wheel`])}function $t(e){let t=n({kind:`fragment`,parent:null,__children:[]},e),r={get textContent(){return m(t)?``:Ue(e)},set textContent(e){m(t)||Zt(t,Bt(e))}};for(let e of[q(t,Z),U(t,Z),W(t,Z),r])Object.defineProperties(t,Object.getOwnPropertyDescriptors(e));return o(t),t}let en;function tn(){return en??=rn(we())}function nn(e){return c(e)||(e===x()?Qt():e===we()?tn():void 0)}function $(e){return L(e),e}function rn(e){let t=F(n({...b(e,[`wheel`]),kind:`document`,parent:null,__children:[],get textContent(){return null},set textContent(e){},get activeElement(){let e=st();return e===null?null:l(e)??null},createDocumentFragment:()=>$($t(S(`#fragment`))),createElement:(...e)=>{M(e,1,`createElement`);let[t,n]=Te(j(e[0]));return $(Q(t,`element`,n))},createTextNode:(...e)=>(M(e,1,`createTextNode`),$(Yt(j(e[0])))),createComment:(...e)=>(M(e,1,`createComment`),$(Jt(j(e[0]))))},e),()=>!1),{cloneNode:r,...i}=U(t,Z);for(let e of[q(t,Z),i,W(t,Z),Gt(t)])Object.defineProperties(t,Object.getOwnPropertyDescriptors(e));return Object.setPrototypeOf(t,Document.prototype),o(t),t}const an=/* @__PURE__ */ Object.defineProperty(F(b(`$window`,[`wheel`]),()=>!1),Symbol.toStringTag,{value:`Window`});Object.defineProperty(globalThis,"__inca_targets__",{value:e=>e.map(e=>{if(e===`$window`)return an;let t=nn(e);return t?.kind===`element`||t?.kind===`document`?t:null}),configurable:!0});export{it as A,ve as B,C,Re as D,Ze as E,E as F,d as G,ye as H,rt as I,g as K,b as L,tt as M,et as N,nt as O,$e as P,ge as R,T as S,Be as T,me as U,_e as V,y as W,Ee as _,Q as a,st as b,Qt as c,Ot as d,z as f,R as g,kt as h,qt as i,x as j,w as k,Zt as l,At as m,Xt as n,Yt as o,jt as p,Jt as r,tn as s,an as t,Ut as u,Ve as v,Qe as w,D as x,S as y,be as z};
|