incajs 0.0.24 → 0.0.25
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-Bvb3I_NM.js +1 -0
- package/dist/chunks/rendererCore-CInlm7fZ.js +1 -0
- package/dist/chunks/{rendererCore-qq38UzW-.d.ts → rendererCore-rHZjgsbG.d.ts} +1 -1
- package/dist/chunks/{window-BtaK1Znc.d.ts → window-BIVAcjmA.d.ts} +21 -7
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/rendererCore.d.ts +2 -2
- package/dist/rendererCore.js +1 -1
- package/dist/vue.d.ts +2 -2
- package/dist/vue.js +1 -1
- package/package.json +1 -1
- package/dist/chunks/hooks-DK2feJxZ.js +0 -1
- package/dist/chunks/rendererCore-Ezb4FOC9.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function e(){return globalThis.__inca_native__}const t=/* @__PURE__ */ new Map;function n(n,r,i,a,o){if(typeof r!=`function`)throw TypeError(`${n} takes a function. pass a function as the handler`);let s=i|0,c=e().startTimer(s>0?s:0,o);if(c===void 0)throw RangeError(`timer ids are exhausted. restart the app`);return t.set(c,{handler:r,args:a,repeat:o}),c}function r(n){let r=n|0;t.delete(r)&&e().stopTimer(r)}Object.defineProperty(globalThis,"__inca_timer__",{value:n=>{let r=t.get(n);r===void 0?e().stopTimer(n):(r.repeat||t.delete(n),Reflect.apply(r.handler,globalThis,r.args))},configurable:!0}),typeof globalThis.__inca_native__?.startTimer==`function`&&Object.assign(globalThis,{setTimeout(e,t=0,...r){return n(`setTimeout`,e,t,r,!1)},setInterval(e,t=0,...r){return n(`setInterval`,e,t,r,!0)},clearTimeout(e=0){r(e)},clearInterval(e=0){r(e)}});const i=/* @__PURE__ */ `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`.split(`.`);function a(e,t){for(let n of i){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}const o=/* @__PURE__ */ new WeakSet;function s(e,t){return o.add(e),Object.defineProperty(e,"__node_id",{value:t})}function c(e){return typeof e==`object`&&!!e&&o.has(e)}const l=/* @__PURE__ */ new Map,u=new FinalizationRegistry(e=>{l.get(e)?.deref()||l.delete(e)});function ee(e){l.set(e.__node_id,new WeakRef(e)),u.register(e,e.__node_id)}function te(e){l.delete(e)}function d(e){return l.get(e)?.deref()}const f=/* @__PURE__ */ new WeakSet;function p(e){return f.has(e)}function m(e){if(f.add(e),e.kind!==`text`){te(e.__node_id);for(let t of e.children)m(t)}}function ne(e){for(let t of e){let e=d(t);e&&m(e)}}const re=new FinalizationRegistry(t=>e().releaseNode(t));function ie(e){re.register(e,e.__node_id)}const h=/* @__PURE__ */ new Map,g=/* @__PURE__ */ new Map,_=()=>globalThis.__inca_callbacks__??={};function v(e,t,n,r){_()[n]=r;let i=h.get(e);i||h.set(e,i=/* @__PURE__ */ new Map),i.set(t,n),g.set(n,{group:e,listener:t})}function y(e,t){return h.get(e)?.get(t)}function b(e){delete _()[e];let t=g.get(e);if(t===void 0)return;g.delete(e);let n=h.get(t.group);n?.delete(t.listener),n?.size===0&&h.delete(t.group)}function x(e){for(let t of e)b(t)}const S=(e,t,n)=>`${e}:${t}:${n===!0}`;Object.defineProperty(globalThis,"__inca_released__",{value:(e,t)=>{let n,r=!1;for(let e of t)try{x([e])}catch(e){r||(n=e),r=!0}if(ne(e),r)throw n},configurable:!0});let C=0;function ae(){return C}function w(e){return(...t)=>{let n=t[0]?.eventId;return typeof n==`number`&&n>C&&(C=n),e(...t)}}function T(t,n,r,i={}){if(r==null)return;let a=S(t,n,i.capture);if(y(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)=>(E(t,n,r,i),o(...e)):o;v(a,r,e().addEventListener(t,n,i.capture===!0,i.passive===!0),w(s))}function E(t,n,r,i={}){if(r==null)return;let a=y(S(t,n,i.capture),r);a!==void 0&&(e().removeEventListener(t,n,a),b(a))}function D(t,n){return e().dispatchEvent(t,n)}function O(t){e().click(t)}function k(t,n){e().focusNode(t,n)}function A(t){e().blurNode(t)}function j(t,n){e().setPointerCapture(t,n)}function oe(t,n){e().releasePointerCapture(t,n)}function se(t,n){return e().hasPointerCapture(t,n)}function M(e,t=[]){let n=typeof e==`function`?e:()=>e;return{addEventListener(e,r,i){let a=typeof i==`boolean`?{capture:i}:i??{};T(n(),e,r,{...a,passive:a.passive??t.includes(e)})},removeEventListener(e,t,r){let i=typeof r==`boolean`?r:r?.capture;E(n(),e,t,{capture:i})},dispatchEvent:e=>D(n(),e)}}function N(){throw TypeError(`document cannot be constructed. use the document export of incajs`)}function ce(){throw TypeError(`a shadow root cannot be constructed. the host has no shadow roots`)}Object.defineProperty(globalThis,"Document",{value:N,writable:!0,configurable:!0,enumerable:!1}),Object.defineProperty(globalThis,"ShadowRoot",{value:ce,writable:!0,configurable:!0,enumerable:!1});function P(){return e().rootNodeId()}function le(t){return e().createNode(t)}function ue(t,n){e().appendChild(t,n)}function de(t,n,r){e().insertBefore(t,n,r)}function fe(t,n){e().removeChild(t,n)}function F(t){x(e().destroyNode(t))}function I(t){e().holdNode(t)}function L(t){e().releaseNode(t)}function R(t,n,r){e().setAttribute(t,n,r)}function z(t,n){return e().getAttribute(t,n)}function B(t){return e().layoutOf(t)}function V(t){return e().scrollOf(t)}function H(t,n,r){e().scrollNode(t,n,r)}function U(t,n,r){e().scrollIntoViewNode(t,n,r)}function pe(t,n){e().removeAttribute(t,n)}function me(t,n,r){e().setStyle(t,n,r)}function he(t,n){e().removeStyle(t,n)}function ge(t){return e().inputValue(t)}function _e(t,n){e().setInputValue(t,n)}function W(){return e().focusedNode()}function ve(){let e=W();return e===null?null:d(e)??null}const G=/* @__PURE__ */ Object.defineProperties(Object.setPrototypeOf(a(M(`$document`,[`wheel`]),()=>!1),N.prototype),{[Symbol.toStringTag]:{value:`Document`},activeElement:{get:ve}}),K=/* @__PURE__ */ Object.defineProperty(a(M(`$window`,[`wheel`]),()=>!1),Symbol.toStringTag,{value:`Window`});function q(e){return p(e)?null:B(e.__node_id)}function J(e){let t=e.parent;return!q(e)||!t||!q(t)?null:t}function Y(e){let t=q(e);if(!t)return{left:0,top:0};let n=J(e),r=n?q(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 X(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 ye(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 Z(e,t,n){if(p(e))return;let[r,i]=t,[a,o]=typeof r==`object`?[r?.left,r?.top]:[r,i],[s,c]=n?V(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)};H(e.__node_id,l(a,s),l(o,c))}function be(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 Q(e,t,n,r=[]){let i=M(()=>e,r),o=()=>p(u)?null:V(e),l={get id(){return p(u)?``:String(z(e,`id`)??``)},set id(t){p(u)||R(e,`id`,String(t))},kind:t,parent:null,children:[],focus:t=>{p(u)||k(e,!!t?.preventScroll)},blur:()=>A(e),click:()=>{p(u)||O(e)},setPointerCapture:t=>j(e,t),releasePointerCapture:t=>oe(e,t),hasPointerCapture:t=>se(e,t),contains:e=>{if(e==null)return!1;if(!c(e))throw TypeError(`the value is not a node. pass an element, a text node or null`);for(let t=e;t!==null;t=t.parent)if(t===u)return!0;return!1},addEventListener:(...e)=>{p(u)||i.addEventListener(...e)},removeEventListener:(...e)=>{p(u)||i.removeEventListener(...e)},dispatchEvent:e=>p(u)||i.dispatchEvent(e),get tabIndex(){return ye(p(u)?null:z(e,`tabindex`),n??``)},set tabIndex(t){p(u)||R(e,`tabindex`,t|0)},getBoundingClientRect:()=>X(q(u)),get offsetWidth(){return Math.round(q(u)?.[2]??0)},get offsetHeight(){return Math.round(q(u)?.[3]??0)},get offsetLeft(){return Y(u).left},get offsetTop(){return Y(u).top},get offsetParent(){return J(u)},get clientWidth(){let e=q(u);return e?Math.max(0,Math.round(e[2]-2*e[4])):0},get clientHeight(){let e=q(u);return e?Math.max(0,Math.round(e[3]-2*e[4])):0},get clientLeft(){return Math.round(q(u)?.[4]??0)},get clientTop(){return Math.round(q(u)?.[4]??0)},get scrollLeft(){return o()?.[0]??0},set scrollLeft(e){Z(u,[e],!1)},get scrollTop(){return o()?.[1]??0},set scrollTop(e){Z(u,[void 0,e],!1)},get scrollWidth(){return u.clientWidth+Math.round(o()?.[2]??0)},get scrollHeight(){return u.clientHeight+Math.round(o()?.[3]??0)},scrollTo:(...e)=>Z(u,e,!1),scrollBy:(...e)=>Z(u,e,!0),scrollIntoView:t=>{if(p(u))return;let{block:n,inline:r}=be(t);U(e,n,r)},getRootNode:()=>{let e=u;for(;e.parent!==null;)e=e.parent;return e.__node_id===P()?G:e}};n===`input`&&Object.defineProperty(l,"value",{get:()=>p(u)?``:ge(e),set:t=>{p(u)||_e(e,t===null?``:String(t))},enumerable:!0,configurable:!0});let u=a(s(l,e),()=>p(u));return t===`element`&&ee(u),u}function $(){let e=P();return d(e)??Q(e,`element`,void 0,[`wheel`])}Object.defineProperty(globalThis,"__inca_targets__",{value:e=>e.map(e=>e===`$document`?G:e===`$window`?K:d(e)??(e===P()?$():null)),configurable:!0});export{E as A,M as C,D,O as E,m as M,ie as N,k as O,s as P,me as S,A as T,P as _,ue as a,V as b,W as c,de as d,B as f,he as g,fe as h,G as i,p as j,ae as k,z as l,pe as m,$ as n,le as o,L as p,K as r,F as s,Q as t,I as u,U as v,T as w,R as x,H as y};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{t as e}from"./rolldown-runtime-DK3Fl9T5.js";import{A as t,C as n,D as r,E as i,M as a,N as o,O as s,P as c,S as l,T as u,_ as d,a as f,b as p,c as m,d as h,f as g,g as _,h as v,j as y,k as b,l as x,m as S,n as C,o as w,p as T,r as E,s as D,t as O,u as k,v as A,w as j,x as M,y as N}from"./hooks-Bvb3I_NM.js";function P(e){let t=w(e);return O(t,`element`,e)}function F(e){let t=w(`text`);return M(t,`value`,e),c({kind:`text`,parent:null,text:e},t)}function I(){let e=w(`div`);return l(e,`display`,`none`),O(e,`comment`)}function L(e,t){M(e.__node_id,`value`,t),e.text=t}function R(e,t){for(let t of e.children.splice(0))D(t.__node_id),a(t),t.parent=null;if(!t)return;let n=F(t);f(e.__node_id,n.__node_id),n.parent=e,e.children.push(n)}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){e.parent&&v(e.parent.__node_id,e.__node_id),z(e)}function V(e,t,n){if(n===e&&e.parent===t)return;B(e);let r=n?t.children.indexOf(n):-1;h(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 H(e){z(e),D(e.__node_id),a(e)}function U(e){return e.parent}function W(e){let t=e.parent;if(!t)return null;let n=t.children.indexOf(e);return t.children[n+1]??null}var G=/* @__PURE__ */ e({addEventListener:()=>j,appendChild:()=>f,blur:()=>u,click:()=>i,createCommentNode:()=>I,createElementNode:()=>P,createEventTarget:()=>n,createIncaElement:()=>O,createNode:()=>w,createTextNode:()=>F,destroyNode:()=>D,dispatchEvent:()=>r,focus:()=>s,focusedNode:()=>m,getAttribute:()=>x,holdNode:()=>k,insert:()=>V,insertBefore:()=>h,isDestroyed:()=>y,latestEventId:()=>b,layoutOf:()=>g,nextSibling:()=>W,parentNode:()=>U,releaseNode:()=>T,releaseWhenCollected:()=>o,remove:()=>H,removeAttribute:()=>S,removeChild:()=>v,removeEventListener:()=>t,removeStyle:()=>_,rootElement:()=>C,rootNodeId:()=>d,scrollIntoViewNode:()=>A,scrollNode:()=>N,scrollOf:()=>p,setAttribute:()=>M,setElementText:()=>R,setStyle:()=>l,setText:()=>L,window:()=>E});export{V as a,H as c,F as i,R as l,I as n,W as o,P as r,U as s,G as t,L as u};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as IncaElement, C as Overflow, D as TagName, E as StyleProps, M as IncaNode, N as IncaText, O as EventHandler, S as NodeId, T as ScrollAlignment, _ 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 IncaInputElement, k as EventHandlers, 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 } from "./window-
|
|
1
|
+
import { A as IncaElement, C as Overflow, D as TagName, E as StyleProps, M as IncaNode, N as IncaText, O as EventHandler, S as NodeId, T as ScrollAlignment, _ 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 IncaInputElement, k as EventHandlers, 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 } from "./window-BIVAcjmA.js";
|
|
2
2
|
/** What a listener or a dispatch names: a node id, or the tag of `document` or `window`. */
|
|
3
3
|
type EventTargetId = NodeId | "$document" | "$window";
|
|
4
4
|
/**
|
|
@@ -5,7 +5,7 @@ declare global {
|
|
|
5
5
|
function clearInterval(id?: number): void;
|
|
6
6
|
}
|
|
7
7
|
/** The events whose handler property every element has. */
|
|
8
|
-
declare const HANDLER_EVENTS: readonly ["auxclick", "beforeinput", "blur", "change", "click", "contextmenu", "dblclick", "focus", "gotpointercapture", "input", "keydown", "keyup", "lostpointercapture", "mousedown", "mouseenter", "mouseleave", "mousemove", "mouseout", "mouseover", "mouseup", "pointerdown", "pointerenter", "pointerleave", "pointermove", "pointerout", "pointerover", "pointerup", "scroll", "wheel"];
|
|
8
|
+
declare const HANDLER_EVENTS: readonly ["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"];
|
|
9
9
|
/** The plain values of a {@link RectLike}, as `toJSON` returns them. */
|
|
10
10
|
interface RectValues {
|
|
11
11
|
readonly x: number;
|
|
@@ -256,11 +256,18 @@ interface StyleProps {
|
|
|
256
256
|
height?: Px | "auto";
|
|
257
257
|
/** Uniform border width in px (`>= 0`), applied to all four sides. */
|
|
258
258
|
borderWidth?: Px;
|
|
259
|
-
/**
|
|
259
|
+
/**
|
|
260
|
+
* Fill color, as a hex number (`0xRRGGBB`) or a color string: `"#rgb"`, `"#rgba"`, `"#rrggbb"`,
|
|
261
|
+
* `"#rrggbbaa"`, `"transparent"`, `"rgb()"` or `"rgba()"`.
|
|
262
|
+
*/
|
|
260
263
|
backgroundColor?: number | string;
|
|
261
264
|
/** Border color. Accepts the same formats as {@link StyleProps.backgroundColor}. */
|
|
262
265
|
borderColor?: number | string;
|
|
263
|
-
/**
|
|
266
|
+
/**
|
|
267
|
+
* Color for this container's own text. Accepts the same formats as
|
|
268
|
+
* {@link StyleProps.backgroundColor}. Cascades to descendant text leaves, same as
|
|
269
|
+
* {@link StyleProps.fontSize}; there's no separate per-leaf text styling.
|
|
270
|
+
*/
|
|
264
271
|
color?: number | string;
|
|
265
272
|
/** Uniform corner radius in px (`>= 0`), applied to all four corners. */
|
|
266
273
|
borderRadius?: Px;
|
|
@@ -378,7 +385,10 @@ interface IncaEventTarget {
|
|
|
378
385
|
* The event target between the elements and `window`.
|
|
379
386
|
*/
|
|
380
387
|
interface IncaDocument extends IncaEventTarget, EventHandlers<IncaDocument> {
|
|
381
|
-
/**
|
|
388
|
+
/**
|
|
389
|
+
* The element that has focus, or `null` when no element has focus. A `focus()` or `blur()` call
|
|
390
|
+
* takes effect for this property at once.
|
|
391
|
+
*/
|
|
382
392
|
readonly activeElement: IncaElement | null;
|
|
383
393
|
}
|
|
384
394
|
/**
|
|
@@ -576,7 +586,7 @@ interface IncaWheelEvent extends IncaMouseEvent {
|
|
|
576
586
|
readonly DOM_DELTA_LINE: 1;
|
|
577
587
|
readonly DOM_DELTA_PAGE: 2;
|
|
578
588
|
}
|
|
579
|
-
/** The event object of `keydown` and `keyup`. */
|
|
589
|
+
/** The event object of `keydown`, `keypress` and `keyup`. */
|
|
580
590
|
interface IncaKeyboardEvent extends IncaUIEvent {
|
|
581
591
|
/** The key's name, such as `"Enter"`, `"F5"` or the typed character. */
|
|
582
592
|
readonly key: string;
|
|
@@ -588,9 +598,12 @@ interface IncaKeyboardEvent extends IncaUIEvent {
|
|
|
588
598
|
readonly repeat: boolean;
|
|
589
599
|
/** Whether an input method composes in the focused `<input>`. */
|
|
590
600
|
readonly isComposing: boolean;
|
|
591
|
-
/**
|
|
601
|
+
/**
|
|
602
|
+
* The key's code on a US keyboard layout, and `0` for a key outside it. On `keypress` it is the
|
|
603
|
+
* `charCode`.
|
|
604
|
+
*/
|
|
592
605
|
readonly keyCode: number;
|
|
593
|
-
/** `0` on
|
|
606
|
+
/** The code of the typed character on `keypress`, and `0` on `keydown` and `keyup`. */
|
|
594
607
|
readonly charCode: number;
|
|
595
608
|
readonly ctrlKey: boolean;
|
|
596
609
|
readonly shiftKey: boolean;
|
|
@@ -650,6 +663,7 @@ interface IncaEventMap {
|
|
|
650
663
|
gotpointercapture: IncaPointerEvent;
|
|
651
664
|
input: IncaInputEvent;
|
|
652
665
|
keydown: IncaKeyboardEvent;
|
|
666
|
+
keypress: IncaKeyboardEvent;
|
|
653
667
|
keyup: IncaKeyboardEvent;
|
|
654
668
|
lostpointercapture: IncaPointerEvent;
|
|
655
669
|
mousedown: IncaMouseEvent;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as IncaElement, D as TagName, E as StyleProps, F as ScrollOptions, I as RectLike, L as RectValues, M as IncaNode, P as ScrollIntoViewOptions, S as NodeId, _ 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 IncaInputElement, 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 } from "./chunks/window-
|
|
1
|
+
import { A as IncaElement, D as TagName, E as StyleProps, F as ScrollOptions, I as RectLike, L as RectValues, M as IncaNode, P as ScrollIntoViewOptions, S as NodeId, _ 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 IncaInputElement, 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 } from "./chunks/window-BIVAcjmA.js";
|
|
2
2
|
/**
|
|
3
3
|
* The event target between the elements and `window`. An event at an element
|
|
4
4
|
* passes through it, and it is the next target after the mount container.
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{i as document,r as window}from"./chunks/hooks-
|
|
1
|
+
export{i as document,r as window}from"./chunks/hooks-Bvb3I_NM.js";
|
package/dist/rendererCore.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { A as IncaElement, C as Overflow, D as TagName, E as StyleProps, M as IncaNode, N as IncaText, O as EventHandler, S as NodeId, T as ScrollAlignment, _ 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 IncaInputElement, k as EventHandlers, 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 } from "./chunks/window-
|
|
2
|
-
import { A as setAttribute, C as removeAttribute, D as scrollIntoViewNode, E as rootNodeId, F as dispatchEvent, I as focus, L as latestEventId, M as addEventListener, N as blur, O as scrollNode, P as click, R as removeEventListener, S as releaseNode, T as removeStyle, _ as focusedNode, a as insert, b as insertBefore, c as remove, d as isDestroyed, f as createIncaElement, g as destroyNode, h as createNode, i as createTextNode, j as setStyle, k as scrollOf, l as setElementText, m as appendChild, n as createCommentNode, o as nextSibling, p as rootElement, r as createElementNode, s as parentNode, t as IncaCore, u as setText, v as getAttribute, w as removeChild, x as layoutOf, y as holdNode, z as createEventTarget } from "./chunks/rendererCore-
|
|
1
|
+
import { A as IncaElement, C as Overflow, D as TagName, E as StyleProps, M as IncaNode, N as IncaText, O as EventHandler, S as NodeId, T as ScrollAlignment, _ 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 IncaInputElement, k as EventHandlers, 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 } from "./chunks/window-BIVAcjmA.js";
|
|
2
|
+
import { A as setAttribute, C as removeAttribute, D as scrollIntoViewNode, E as rootNodeId, F as dispatchEvent, I as focus, L as latestEventId, M as addEventListener, N as blur, O as scrollNode, P as click, R as removeEventListener, S as releaseNode, T as removeStyle, _ as focusedNode, a as insert, b as insertBefore, c as remove, d as isDestroyed, f as createIncaElement, g as destroyNode, h as createNode, i as createTextNode, j as setStyle, k as scrollOf, l as setElementText, m as appendChild, n as createCommentNode, o as nextSibling, p as rootElement, r as createElementNode, s as parentNode, t as IncaCore, u as setText, v as getAttribute, w as removeChild, x as layoutOf, y as holdNode, z as createEventTarget } from "./chunks/rendererCore-rHZjgsbG.js";
|
|
3
3
|
export { type AttributeValue, type CallbackId, type EventHandler, type EventHandlers, type EventLike, type EventListener, type EventListenerObject, type EventListenerOrObject, type IncaCompositionEvent, IncaCore, type IncaDocument, type IncaElement, type IncaEvent, type IncaEventMap, type IncaEventTarget, type IncaFocusEvent, type IncaInputElement, type IncaInputEvent, type IncaKeyboardEvent, type IncaMouseEvent, type IncaNode, type IncaPointerEvent, type IncaText, type IncaUIEvent, type IncaWheelEvent, type IncaWindow, type ListenerOptions, type NodeId, type Overflow, type Px, type ScrollAlignment, type StyleProps, type TagName, addEventListener, appendChild, blur, click, createCommentNode, createElementNode, createEventTarget, createIncaElement, createNode, createTextNode, destroyNode, dispatchEvent, focus, focusedNode, getAttribute, holdNode, insert, insertBefore, isDestroyed, 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
|
-
import{A as e,C as t,D as n,E as r,
|
|
1
|
+
import{A as e,C as t,D as n,E as r,N as i,O as a,S as o,T as s,_ as c,a as l,b as u,c as d,d as f,f as p,g as m,h,j as g,k as _,l as v,m as y,n as b,o as x,p as S,r as C,s as w,t as T,u as E,v as D,w as O,x as k,y as A}from"./chunks/hooks-Bvb3I_NM.js";import{a as j,c as M,i as N,l as P,n as F,o as I,r as L,s as R,u as z}from"./chunks/rendererCore-CInlm7fZ.js";export{O as addEventListener,l as appendChild,s as blur,r as click,F as createCommentNode,L as createElementNode,t as createEventTarget,T as createIncaElement,x as createNode,N as createTextNode,w as destroyNode,n as dispatchEvent,a as focus,d as focusedNode,v as getAttribute,E as holdNode,j as insert,f as insertBefore,g as isDestroyed,_ as latestEventId,p as layoutOf,I as nextSibling,R as parentNode,S as releaseNode,i as releaseWhenCollected,M as remove,y as removeAttribute,h as removeChild,e as removeEventListener,m as removeStyle,b as rootElement,c as rootNodeId,D as scrollIntoViewNode,A as scrollNode,u as scrollOf,k as setAttribute,P as setElementText,o as setStyle,z as setText,C as window};
|
package/dist/vue.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { A as IncaElement } from "./chunks/window-
|
|
2
|
-
import "./chunks/rendererCore-
|
|
1
|
+
import { A as IncaElement } from "./chunks/window-BIVAcjmA.js";
|
|
2
|
+
import "./chunks/rendererCore-rHZjgsbG.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{n as e}from"./chunks/hooks-
|
|
1
|
+
import{n as e}from"./chunks/hooks-Bvb3I_NM.js";import{t}from"./chunks/rendererCore-CInlm7fZ.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()),setText:(t,n)=>e.setText(t,n),setElementText:(t,n)=>e.setElementText(t,n),insert:(t,n,r)=>e.insert(t,n,r),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;function _(e,t,n){let r=typeof n==`object`&&n?n:{},i=g.get(t);i||g.set(t,i=/* @__PURE__ */ new Map);let a=!1;for(let n of i.keys())h(r[n])||(e.removeStyle(t.__node_id,n),i.delete(n),a=!0);for(let[n,o]of Object.entries(r))h(o)&&(a||i.get(n)!==o)&&(e.setStyle(t.__node_id,n,o),i.set(n,o))}function v(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
2
|
Expected function or array of functions, received type ${typeof e}.`),[]):null}function y(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 b=/* @__PURE__ */ new WeakMap,x=({event:e,capture:t,passive:n})=>`${e}:${t===!0}:${n===!0}`;function S(e,t,n,r){let i=Array.from(r.slots.values()).some(e=>!e.fired);i&&!r.registered&&!e.isDestroyed(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&&b.get(t)?.delete(n)}function C(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;y(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,S(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 w(e,t,n,r){let i=x(n),a=b.get(t)?.get(i);a?.slots.delete(r)&&S(e,t,i,a)}function T(e,t,n,r,i){let a=m(n),o=v(r,n);if(!o){w(e,t,a,n);return}let s=x(a),c=b.get(t);c||b.set(t,c=/* @__PURE__ */ new Map);let l=c.get(s);l||c.set(s,l=C(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{S(e,t,s,l)}catch(e){throw l.slots.delete(n),l.slots.size===0&&c.delete(s),e}}}const E=/* @__PURE__ */ new Set([`disabled`,`hidden`,`inert`,`allowfullscreen`,`formnovalidate`,`ismap`,`itemscope`,`nomodule`,`novalidate`,`readonly`]);function D(e){return(t,n,r,i,a,o)=>{n.startsWith(`onUpdate:`)||(n===`style`?_(e,t,i):l(n)?T(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??``):E.has(n)&&!i&&i!==``?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 O=/* @__PURE__ */ new Set;function k(n,r){let a={...s(t),patchProp:D(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 O.add(u),n},unmount:()=>{f(),O.delete(u)}})}export{k as createIncaApp};
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
function e(){return globalThis.__inca_native__}const t=/* @__PURE__ */ new Map;function n(n,r,i,a,o){if(typeof r!=`function`)throw TypeError(`${n} takes a function. pass a function as the handler`);let s=i|0,c=e().startTimer(s>0?s:0,o);if(c===void 0)throw RangeError(`timer ids are exhausted. restart the app`);return t.set(c,{handler:r,args:a,repeat:o}),c}function r(n){let r=n|0;t.delete(r)&&e().stopTimer(r)}Object.defineProperty(globalThis,"__inca_timer__",{value:n=>{let r=t.get(n);r===void 0?e().stopTimer(n):(r.repeat||t.delete(n),Reflect.apply(r.handler,globalThis,r.args))},configurable:!0}),typeof globalThis.__inca_native__?.startTimer==`function`&&Object.assign(globalThis,{setTimeout(e,t=0,...r){return n(`setTimeout`,e,t,r,!1)},setInterval(e,t=0,...r){return n(`setInterval`,e,t,r,!0)},clearTimeout(e=0){r(e)},clearInterval(e=0){r(e)}});const i=/* @__PURE__ */ `auxclick.beforeinput.blur.change.click.contextmenu.dblclick.focus.gotpointercapture.input.keydown.keyup.lostpointercapture.mousedown.mouseenter.mouseleave.mousemove.mouseout.mouseover.mouseup.pointerdown.pointerenter.pointerleave.pointermove.pointerout.pointerover.pointerup.scroll.wheel`.split(`.`);function a(e,t){for(let n of i){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}const o=/* @__PURE__ */ new Map,s=/* @__PURE__ */ new Map,c=()=>globalThis.__inca_callbacks__??={};function l(e,t,n,r){c()[n]=r;let i=o.get(e);i||o.set(e,i=/* @__PURE__ */ new Map),i.set(t,n),s.set(n,{group:e,listener:t})}function u(e,t){return o.get(e)?.get(t)}function d(e){delete c()[e];let t=s.get(e);if(t===void 0)return;s.delete(e);let n=o.get(t.group);n?.delete(t.listener),n?.size===0&&o.delete(t.group)}function f(e){for(let t of e)d(t)}const p=(e,t,n)=>`${e}:${t}:${n===!0}`;Object.defineProperty(globalThis,"__inca_released__",{value:(e,t)=>{let n,r=!1;for(let e of t)try{f([e])}catch(e){r||(n=e),r=!0}if(pe(e),r)throw n},configurable:!0});function m(){return e().rootNodeId()}function ee(t){return e().createNode(t)}function te(t,n){e().appendChild(t,n)}function ne(t,n,r){e().insertBefore(t,n,r)}function re(t,n){e().removeChild(t,n)}function ie(t){f(e().destroyNode(t))}function ae(t){e().holdNode(t)}function oe(t){e().releaseNode(t)}function h(t,n,r){e().setAttribute(t,n,r)}function g(t,n){return e().getAttribute(t,n)}function _(t){return e().layoutOf(t)}function v(t){return e().scrollOf(t)}function y(t,n,r){e().scrollNode(t,n,r)}function b(t,n,r){e().scrollIntoViewNode(t,n,r)}function se(t,n){e().removeAttribute(t,n)}function x(t,n,r){e().setStyle(t,n,r)}function S(t,n){e().removeStyle(t,n)}function C(t){return e().inputValue(t)}function ce(t,n){e().setInputValue(t,n)}function w(){return e().focusedNode()}const T=/* @__PURE__ */ new WeakSet;function E(e,t){return T.add(e),Object.defineProperty(e,"__node_id",{value:t})}function le(e){return typeof e==`object`&&!!e&&T.has(e)}const D=/* @__PURE__ */ new Map,ue=new FinalizationRegistry(e=>{D.get(e)?.deref()||D.delete(e)});function de(e){D.set(e.__node_id,new WeakRef(e)),ue.register(e,e.__node_id)}function fe(e){D.delete(e)}function O(e){return D.get(e)?.deref()}const k=/* @__PURE__ */ new WeakSet;function A(e){return k.has(e)}function j(e){if(k.add(e),e.kind!==`text`){fe(e.__node_id);for(let t of e.children)j(t)}}function pe(e){for(let t of e){let e=O(t);e&&j(e)}}const me=new FinalizationRegistry(t=>e().releaseNode(t));function M(e){me.register(e,e.__node_id)}function N(){let e=w();return e===null?null:O(e)??null}let P=0;function F(){return P}function I(e){return(...t)=>{let n=t[0]?.eventId;return typeof n==`number`&&n>P&&(P=n),e(...t)}}function L(t,n,r,i={}){if(r==null)return;let a=p(t,n,i.capture);if(u(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)=>(R(t,n,r,i),o(...e)):o;l(a,r,e().addEventListener(t,n,i.capture===!0,i.passive===!0),I(s))}function R(t,n,r,i={}){if(r==null)return;let a=u(p(t,n,i.capture),r);a!==void 0&&(e().removeEventListener(t,n,a),d(a))}function z(t,n){return e().dispatchEvent(t,n)}function B(t){e().click(t)}function V(t,n){e().focusNode(t,n)}function H(t){e().blurNode(t)}function he(t,n){e().setPointerCapture(t,n)}function ge(t,n){e().releasePointerCapture(t,n)}function _e(t,n){return e().hasPointerCapture(t,n)}function U(e,t=[]){let n=typeof e==`function`?e:()=>e;return{addEventListener(e,r,i){let a=typeof i==`boolean`?{capture:i}:i??{};L(n(),e,r,{...a,passive:a.passive??t.includes(e)})},removeEventListener(e,t,r){let i=typeof r==`boolean`?r:r?.capture;R(n(),e,t,{capture:i})},dispatchEvent:e=>z(n(),e)}}function W(){throw TypeError(`document cannot be constructed. use the document export of incajs`)}function ve(){throw TypeError(`a shadow root cannot be constructed. the host has no shadow roots`)}Object.defineProperty(globalThis,"Document",{value:W,writable:!0,configurable:!0,enumerable:!1}),Object.defineProperty(globalThis,"ShadowRoot",{value:ve,writable:!0,configurable:!0,enumerable:!1});const G=/* @__PURE__ */ Object.defineProperties(Object.setPrototypeOf(a(U(`$document`,[`wheel`]),()=>!1),W.prototype),{[Symbol.toStringTag]:{value:`Document`},activeElement:{get:N}}),K=/* @__PURE__ */ Object.defineProperty(a(U(`$window`,[`wheel`]),()=>!1),Symbol.toStringTag,{value:`Window`});function q(e){return A(e)?null:_(e.__node_id)}function J(e){let t=e.parent;return!q(e)||!t||!q(t)?null:t}function Y(e){let t=q(e);if(!t)return{left:0,top:0};let n=J(e),r=n?q(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 ye(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 X(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 Z(e,t,n){if(A(e))return;let[r,i]=t,[a,o]=typeof r==`object`?[r?.left,r?.top]:[r,i],[s,c]=n?v(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)};y(e.__node_id,l(a,s),l(o,c))}function be(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 Q(e,t,n,r=[]){let i=U(()=>e,r),o=()=>A(c)?null:v(e),s={get id(){return A(c)?``:String(g(e,`id`)??``)},set id(t){A(c)||h(e,`id`,String(t))},kind:t,parent:null,children:[],focus:t=>{A(c)||V(e,!!t?.preventScroll)},blur:()=>H(e),click:()=>{A(c)||B(e)},setPointerCapture:t=>he(e,t),releasePointerCapture:t=>ge(e,t),hasPointerCapture:t=>_e(e,t),contains:e=>{if(e==null)return!1;if(!le(e))throw TypeError(`the value is not a node. pass an element, a text node or null`);for(let t=e;t!==null;t=t.parent)if(t===c)return!0;return!1},addEventListener:(...e)=>{A(c)||i.addEventListener(...e)},removeEventListener:(...e)=>{A(c)||i.removeEventListener(...e)},dispatchEvent:e=>A(c)||i.dispatchEvent(e),get tabIndex(){return X(A(c)?null:g(e,`tabindex`),n??``)},set tabIndex(t){A(c)||h(e,`tabindex`,t|0)},getBoundingClientRect:()=>ye(q(c)),get offsetWidth(){return Math.round(q(c)?.[2]??0)},get offsetHeight(){return Math.round(q(c)?.[3]??0)},get offsetLeft(){return Y(c).left},get offsetTop(){return Y(c).top},get offsetParent(){return J(c)},get clientWidth(){let e=q(c);return e?Math.max(0,Math.round(e[2]-2*e[4])):0},get clientHeight(){let e=q(c);return e?Math.max(0,Math.round(e[3]-2*e[4])):0},get clientLeft(){return Math.round(q(c)?.[4]??0)},get clientTop(){return Math.round(q(c)?.[4]??0)},get scrollLeft(){return o()?.[0]??0},set scrollLeft(e){Z(c,[e],!1)},get scrollTop(){return o()?.[1]??0},set scrollTop(e){Z(c,[void 0,e],!1)},get scrollWidth(){return c.clientWidth+Math.round(o()?.[2]??0)},get scrollHeight(){return c.clientHeight+Math.round(o()?.[3]??0)},scrollTo:(...e)=>Z(c,e,!1),scrollBy:(...e)=>Z(c,e,!0),scrollIntoView:t=>{if(A(c))return;let{block:n,inline:r}=be(t);b(e,n,r)},getRootNode:()=>{let e=c;for(;e.parent!==null;)e=e.parent;return e.__node_id===m()?G:e}};n===`input`&&Object.defineProperty(s,"value",{get:()=>A(c)?``:C(e),set:t=>{A(c)||ce(e,t===null?``:String(t))},enumerable:!0,configurable:!0});let c=a(E(s,e),()=>A(c));return t===`element`&&de(c),c}function $(){let e=m();return O(e)??Q(e,`element`,void 0,[`wheel`])}Object.defineProperty(globalThis,"__inca_targets__",{value:e=>e.map(e=>e===`$document`?G:e===`$window`?K:O(e)??(e===m()?$():null)),configurable:!0});export{b as A,ne as C,re as D,se as E,v as M,h as N,S as O,x as P,ae as S,oe as T,te as _,U as a,w as b,B as c,F as d,R as f,E as g,M as h,G as i,y as j,m as k,z as l,j as m,$ as n,L as o,A as p,K as r,H as s,Q as t,V as u,ee as v,_ as w,g as x,ie as y};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{t as e}from"./rolldown-runtime-DK3Fl9T5.js";import{A as t,C as n,D as r,E as i,M as a,N as o,O as s,P as c,S as l,T as u,_ as d,a as f,b as p,c as m,d as h,f as g,g as _,h as v,j as y,k as b,l as x,m as S,n as C,o as w,p as T,r as E,s as D,t as O,u as k,v as A,w as j,x as M,y as N}from"./hooks-DK2feJxZ.js";function P(e){let t=A(e);return O(t,`element`,e)}function F(e){let t=A(`text`);return o(t,`value`,e),_({kind:`text`,parent:null,text:e},t)}function I(){let e=A(`div`);return c(e,`display`,`none`),O(e,`comment`)}function L(e,t){o(e.__node_id,`value`,t),e.text=t}function R(e,t){for(let t of e.children.splice(0))N(t.__node_id),S(t),t.parent=null;if(!t)return;let n=F(t);d(e.__node_id,n.__node_id),n.parent=e,e.children.push(n)}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){e.parent&&r(e.parent.__node_id,e.__node_id),z(e)}function V(e,t,r){if(r===e&&e.parent===t)return;B(e);let i=r?t.children.indexOf(r):-1;n(t.__node_id,e.__node_id,r&&i!==-1?r.__node_id:null),i===-1?t.children.push(e):t.children.splice(i,0,e),e.parent=t}function H(e){z(e),N(e.__node_id),S(e)}function U(e){return e.parent}function W(e){let t=e.parent;if(!t)return null;let n=t.children.indexOf(e);return t.children[n+1]??null}var G=/* @__PURE__ */ e({addEventListener:()=>w,appendChild:()=>d,blur:()=>D,click:()=>m,createCommentNode:()=>I,createElementNode:()=>P,createEventTarget:()=>f,createIncaElement:()=>O,createNode:()=>A,createTextNode:()=>F,destroyNode:()=>N,dispatchEvent:()=>x,focus:()=>k,focusedNode:()=>p,getAttribute:()=>M,holdNode:()=>l,insert:()=>V,insertBefore:()=>n,isDestroyed:()=>T,latestEventId:()=>h,layoutOf:()=>j,nextSibling:()=>W,parentNode:()=>U,releaseNode:()=>u,releaseWhenCollected:()=>v,remove:()=>H,removeAttribute:()=>i,removeChild:()=>r,removeEventListener:()=>g,removeStyle:()=>s,rootElement:()=>C,rootNodeId:()=>b,scrollIntoViewNode:()=>t,scrollNode:()=>y,scrollOf:()=>a,setAttribute:()=>o,setElementText:()=>R,setStyle:()=>c,setText:()=>L,window:()=>E});export{V as a,H as c,F as i,R as l,I as n,W as o,P as r,U as s,G as t,L as u};
|