incajs 0.0.30 → 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-yHZ0cch6.d.ts → rendererCore-Cf8-27u1.d.ts} +62 -35
- package/dist/chunks/rendererCore-p80C6A9w.js +1 -0
- package/dist/chunks/{window-BhilMnbc.d.ts → window-gMkkjr_q.d.ts} +269 -27
- package/dist/globals.d.mts +265 -0
- package/dist/index.d.ts +9 -8
- 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 +9 -7
- package/dist/chunks/hooks-DBW76Ks_.js +0 -2
- package/dist/chunks/rendererCore-CHTgc735.js +0 -1
- package/src/globals.d.mts +0 -136
|
@@ -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,27 +1,44 @@
|
|
|
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.
|
|
9
22
|
*/
|
|
10
23
|
type Parsed = [position: number, entries: ParsedEntry[]];
|
|
11
|
-
/** What a listener or a dispatch names: a node id, or the tag of `
|
|
12
|
-
type EventTargetId = NodeId | "$
|
|
24
|
+
/** What a listener or a dispatch names: a node id, or the tag of `window`. */
|
|
25
|
+
type EventTargetId = NodeId | "$window";
|
|
13
26
|
/**
|
|
14
27
|
* The host-injected object every wrapper in this package forwards to. Not part of the public
|
|
15
28
|
* surface.
|
|
16
29
|
*/
|
|
17
30
|
interface IncaNative {
|
|
18
31
|
rootNodeId(): NodeId;
|
|
32
|
+
documentNodeId(): NodeId;
|
|
19
33
|
createNode(tag: string): NodeId;
|
|
34
|
+
createElement(localName: string): [NodeId, TagName];
|
|
35
|
+
createElementNS(namespace: string | null, qualifiedName: string): ElementEntry;
|
|
36
|
+
attributeKey(nodeId: NodeId, name: string): string;
|
|
20
37
|
appendChild(parentId: NodeId, nodeId: NodeId): number;
|
|
21
38
|
insertBefore(parentId: NodeId, nodeId: NodeId, refId: NodeId | null): number;
|
|
22
39
|
removeChild(parentId: NodeId, childId: NodeId): void;
|
|
23
40
|
replaceChild(parentId: NodeId, nodeId: NodeId, childId: NodeId): number;
|
|
24
|
-
cloneNode(nodeId: NodeId, deep: boolean):
|
|
41
|
+
cloneNode(nodeId: NodeId, deep: boolean): (NodeEntry | ElementEntry)[];
|
|
25
42
|
templateContent(nodeId: NodeId): NodeId | null;
|
|
26
43
|
innerHtml(nodeId: NodeId): string;
|
|
27
44
|
outerHtml(nodeId: NodeId): string;
|
|
@@ -35,6 +52,12 @@ interface IncaNative {
|
|
|
35
52
|
getAttribute(nodeId: NodeId, key: string): AttributeValue | null;
|
|
36
53
|
removeAttribute(nodeId: NodeId, key: string): void;
|
|
37
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;
|
|
38
61
|
linkedNode(nodeId: NodeId, link: NodeLink): NodeId | null;
|
|
39
62
|
childNodeIds(nodeId: NodeId): NodeId[];
|
|
40
63
|
isConnected(nodeId: NodeId): boolean;
|
|
@@ -50,6 +73,7 @@ interface IncaNative {
|
|
|
50
73
|
querySelectorAll(nodeId: NodeId, selector: string): NodeId[];
|
|
51
74
|
setStyle(nodeId: NodeId, key: string, value: AttributeValue): void;
|
|
52
75
|
removeStyle(nodeId: NodeId, key: string): void;
|
|
76
|
+
styleOf(nodeId: NodeId): CSSStyleDeclaration;
|
|
53
77
|
inputValue(nodeId: NodeId): string;
|
|
54
78
|
setInputValue(nodeId: NodeId, value: string): void;
|
|
55
79
|
addEventListener(target: EventTargetId, event: string, callback: HostCallback, capture?: boolean, passive?: boolean): CallbackId;
|
|
@@ -78,7 +102,7 @@ declare global {
|
|
|
78
102
|
var __inca_targets__: (targets: EventTargetId[]) => unknown[];
|
|
79
103
|
}
|
|
80
104
|
/**
|
|
81
|
-
* Builds the listener methods of an event target: a node
|
|
105
|
+
* Builds the listener methods of an event target: a node or window.
|
|
82
106
|
* @param target - the target id, or a function that resolves it each time a method runs
|
|
83
107
|
* @param passiveByDefault - event names whose listeners are passive unless
|
|
84
108
|
* their options say `passive: false`
|
|
@@ -93,14 +117,14 @@ declare function createEventTarget(target: EventTargetId | (() => EventTargetId)
|
|
|
93
117
|
*/
|
|
94
118
|
declare function latestEventId(): number;
|
|
95
119
|
/**
|
|
96
|
-
* Registers `listener` for `event` on the target (node
|
|
120
|
+
* Registers `listener` for `event` on the target (node or window).
|
|
97
121
|
* Registering the same listener for the same target, event and `capture`
|
|
98
122
|
* again changes nothing, and the first registration keeps its other options.
|
|
99
123
|
* A `null` listener is ignored.
|
|
100
124
|
*
|
|
101
125
|
* Any event name is accepted, and it fires when the host dispatches that name.
|
|
102
126
|
* `IncaEventMap` gives the event type of each name the host dispatches.
|
|
103
|
-
* @param target - the event target (node id
|
|
127
|
+
* @param target - the event target (node id or "$window")
|
|
104
128
|
* @param event - the event name (e.g. `"click"`)
|
|
105
129
|
* @param listener - a function, called with the event's `currentTarget` as
|
|
106
130
|
* `this`, or an object whose `handleEvent` method is called with the object
|
|
@@ -116,7 +140,7 @@ declare function addEventListener(target: EventTargetId, event: string, listener
|
|
|
116
140
|
/**
|
|
117
141
|
* Drops the registration {@link addEventListener} made for `listener` on
|
|
118
142
|
* the target with the same `event` and `capture`. A no-op if there is none.
|
|
119
|
-
* @param target - the event target (node
|
|
143
|
+
* @param target - the event target (node or window)
|
|
120
144
|
* @param event - the event name
|
|
121
145
|
* @param listener - the listener that was registered
|
|
122
146
|
* @param options - `capture` of the registration to drop
|
|
@@ -126,7 +150,7 @@ declare function removeEventListener(target: EventTargetId, event: string, liste
|
|
|
126
150
|
* Dispatches `event` at a target along its path. Dispatching at an element
|
|
127
151
|
* reaches its ancestors, `document` and `window`. Dispatching at `document`
|
|
128
152
|
* reaches `window`, and dispatching at `window` reaches only `window`.
|
|
129
|
-
* @param target - the target to dispatch at (node id
|
|
153
|
+
* @param target - the target to dispatch at (node id or "$window")
|
|
130
154
|
* @param event - the event to dispatch
|
|
131
155
|
* @returns `false` when a listener canceled a cancelable event, else `true`
|
|
132
156
|
* @throws TypeError when `target` is malformed or is an unknown target tag
|
|
@@ -194,7 +218,8 @@ declare function appendChild(parentId: NodeId, nodeId: NodeId): number;
|
|
|
194
218
|
* @param refId - the sibling to insert before, or `null` to append at the end
|
|
195
219
|
* @returns the position of the first attached node among the children of `parentId`
|
|
196
220
|
* @throws {DOMException} `HierarchyRequestError` when `parentId` is a text node or a comment,
|
|
197
|
-
* `nodeId` is `parentId` or an ancestor of it,
|
|
221
|
+
* `nodeId` is `parentId` or an ancestor of it, `nodeId` is the document, or `parentId` is the
|
|
222
|
+
* document and the insertion gives it text or a second element;
|
|
198
223
|
* `NotFoundError` when `refId` is not a child of `parentId`
|
|
199
224
|
* @throws {TypeError} when an id names no node
|
|
200
225
|
*/
|
|
@@ -224,11 +249,12 @@ declare function holdNode(nodeId: NodeId): void;
|
|
|
224
249
|
*/
|
|
225
250
|
declare function releaseNode(nodeId: NodeId): void;
|
|
226
251
|
/**
|
|
227
|
-
* Sets
|
|
228
|
-
*
|
|
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.
|
|
229
254
|
* @param nodeId - the node to update
|
|
230
255
|
* @param key - the attribute name
|
|
231
256
|
* @param value - the attribute value
|
|
257
|
+
* @throws {DOMException} named `InvalidCharacterError` when `key` is not a valid attribute name
|
|
232
258
|
*/
|
|
233
259
|
declare function setAttribute(nodeId: NodeId, key: string, value: AttributeValue): void;
|
|
234
260
|
/**
|
|
@@ -280,7 +306,7 @@ declare function scrollNode(nodeId: NodeId, left: number | null, top: number | n
|
|
|
280
306
|
*/
|
|
281
307
|
declare function scrollIntoViewNode(nodeId: NodeId, block: ScrollAlignment, inline: ScrollAlignment): void;
|
|
282
308
|
/**
|
|
283
|
-
* Removes
|
|
309
|
+
* Removes an attribute/prop from `nodeId`. Removing an attribute
|
|
284
310
|
* that isn't set does nothing.
|
|
285
311
|
* @param nodeId - the node to update
|
|
286
312
|
* @param key - the attribute name
|
|
@@ -319,17 +345,18 @@ declare function focusedNode(): NodeId | null;
|
|
|
319
345
|
* Builds the {@link IncaElement} handle for a native node: parentless,
|
|
320
346
|
* childless, with `id`, `focus()`, `blur()`, `click()`, the pointer capture
|
|
321
347
|
* methods, the listener methods of an event target, `tabIndex`,
|
|
322
|
-
* the `value` of an `input`, the
|
|
323
|
-
* 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.
|
|
324
350
|
* @param id - the native node's id
|
|
325
351
|
* @param kind - whether the node is an element or a comment stand-in
|
|
326
|
-
* @param
|
|
327
|
-
* 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.
|
|
328
355
|
* @param passiveByDefault - event names whose listeners are passive unless their options say
|
|
329
356
|
* `passive: false`
|
|
330
357
|
* @returns the new handle
|
|
331
358
|
*/
|
|
332
|
-
declare function createIncaElement(id: NodeId, kind: IncaElement["kind"],
|
|
359
|
+
declare function createIncaElement(id: NodeId, kind: IncaElement["kind"], name?: ElementName, passiveByDefault?: readonly string[]): IncaElement;
|
|
333
360
|
/**
|
|
334
361
|
* Allocates a new element node for `tag`.
|
|
335
362
|
* @param tag - the node's element kind
|
|
@@ -343,6 +370,19 @@ declare function createElementNode(tag: TagName): IncaElement;
|
|
|
343
370
|
* @returns the new hidden element
|
|
344
371
|
*/
|
|
345
372
|
declare function createCommentNode(text?: string): IncaElement;
|
|
373
|
+
/**
|
|
374
|
+
* Creates a text leaf.
|
|
375
|
+
* @param text - the initial text content
|
|
376
|
+
* @returns the new text leaf
|
|
377
|
+
*/
|
|
378
|
+
declare function createTextNode(text: string): IncaText;
|
|
379
|
+
/**
|
|
380
|
+
* Replaces all of `el`'s children with at most a single text child holding
|
|
381
|
+
* `text`. The old children keep their listeners. An empty string leaves `el` childless.
|
|
382
|
+
* @param el - the element or fragment whose children are replaced
|
|
383
|
+
* @param text - the new text content
|
|
384
|
+
*/
|
|
385
|
+
declare function setElementText(el: IncaParent, text: string): void;
|
|
346
386
|
/**
|
|
347
387
|
* Returns the handle of the host's mount container, which stands between the app's elements and
|
|
348
388
|
* `document` in an event path. A live handle is reused, so a mount and an event see one object.
|
|
@@ -388,31 +428,18 @@ declare function parentNode(node: IncaNode): IncaElement | null;
|
|
|
388
428
|
* @returns the sibling immediately after `node` in its parent's children, or `null` if there is none (or `node` isn't attached)
|
|
389
429
|
*/
|
|
390
430
|
declare function nextSibling(node: IncaNode): IncaNode | null;
|
|
391
|
-
/**
|
|
392
|
-
* Creates a text leaf.
|
|
393
|
-
* @param text - the initial text content
|
|
394
|
-
* @returns the new text leaf
|
|
395
|
-
*/
|
|
396
|
-
declare function createTextNode(text: string): IncaText;
|
|
397
431
|
/**
|
|
398
432
|
* Updates a text leaf's content in place.
|
|
399
433
|
* @param node - the text leaf to update
|
|
400
434
|
* @param text - the new text content
|
|
401
435
|
*/
|
|
402
436
|
declare function setText(node: IncaText, text: string): void;
|
|
403
|
-
/**
|
|
404
|
-
* Replaces all of `el`'s children with at most a single text child holding
|
|
405
|
-
* `text`. The old children keep their listeners. An empty string leaves `el` childless.
|
|
406
|
-
* @param el - the element or fragment whose children are replaced
|
|
407
|
-
* @param text - the new text content
|
|
408
|
-
*/
|
|
409
|
-
declare function setElementText(el: IncaParent, text: string): void;
|
|
410
437
|
declare namespace rendererCore_d_exports {
|
|
411
|
-
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 };
|
|
412
439
|
}
|
|
413
440
|
/**
|
|
414
441
|
* What a custom renderer (`incajs/vue`) drives the host through: the tree and
|
|
415
442
|
* event calls, the element handles and the shadow tree.
|
|
416
443
|
*/
|
|
417
444
|
type IncaCore = typeof rendererCore_d_exports;
|
|
418
|
-
export { setStyle as A, removeChild as C, scrollNode as D, scrollIntoViewNode as E, focus as F, latestEventId as I, removeEventListener as L, blur as M, click as N, scrollOf as O, dispatchEvent as P, createEventTarget as R, removeAttribute as S, rootNodeId as T, getAttribute as _,
|
|
445
|
+
export { setStyle as A, removeChild as C, scrollNode as D, scrollIntoViewNode as E, focus as F, latestEventId as I, removeEventListener as L, blur as M, click as N, scrollOf as O, dispatchEvent as P, createEventTarget as R, removeAttribute as S, rootNodeId as T, getAttribute as _, parentNode as a, layoutOf as b, createCommentNode as c, createTextNode as d, rootElement as f, focusedNode as g, createNode as h, nextSibling as i, addEventListener as j, setAttribute as k, createElementNode as l, appendChild as m, setText as n, remove as o, setElementText as p, insert as r, isRemoved as s, IncaCore as t, createIncaElement as u, holdNode as v, removeStyle as w, releaseNode as x, insertBefore as y };
|
|
@@ -0,0 +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-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};
|