hyperscript-rxjs 1.2.1 → 1.2.4

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.
@@ -1 +1 @@
1
- !function(r,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("rxjs"),require("rxjs/operators")):"function"==typeof define&&define.amd?define(["rxjs","rxjs/operators"],t):"object"==typeof exports?exports.hyperscriptRxjs=t(require("rxjs"),require("rxjs/operators")):r.hyperscriptRxjs=t(r.rxjs,r.rxjs.operators)}(this,(function(r,t){return(()=>{"use strict";var e={705:r=>{r.exports=t},130:t=>{t.exports=r}},n={};function o(r){var t=n[r];if(void 0!==t)return t.exports;var u=n[r]={exports:{}};return e[r](u,u.exports,o),u.exports}o.d=(r,t)=>{for(var e in t)o.o(t,e)&&!o.o(r,e)&&Object.defineProperty(r,e,{enumerable:!0,get:t[e]})},o.o=(r,t)=>Object.prototype.hasOwnProperty.call(r,t),o.r=r=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(r,"__esModule",{value:!0})};var u={};return(()=>{o.r(u),o.d(u,{a:()=>c,abbr:()=>m,address:()=>s,area:()=>l,article:()=>p,aside:()=>d,audio:()=>y,b:()=>A,bdi:()=>b,bdo:()=>h,bindTabIndex:()=>it,blockquote:()=>g,br:()=>E,button:()=>v,caption:()=>T,checkbox:()=>Xr,choice:()=>et,cite:()=>N,code:()=>O,col:()=>x,colgroup:()=>I,collapse:()=>tt,data:()=>S,datalist:()=>D,dd:()=>R,del:()=>L,details:()=>C,dfn:()=>j,dialog:()=>P,div:()=>B,dl:()=>k,dt:()=>M,em:()=>U,fieldset:()=>w,figcaption:()=>H,figure:()=>G,flip:()=>nt,footer:()=>F,form:()=>q,fragment:()=>f,getDisplay:()=>st,h1:()=>V,h2:()=>_,h3:()=>K,h4:()=>Y,h5:()=>Q,h6:()=>W,header:()=>X,hgroup:()=>J,hr:()=>z,hyperscript:()=>i,i:()=>Z,img:()=>$,input:()=>rr,ins:()=>tr,kbd:()=>er,label:()=>nr,legend:()=>or,li:()=>ur,main:()=>ar,mark:()=>ir,menu:()=>fr,menuitem:()=>cr,meter:()=>mr,nav:()=>sr,numberbox:()=>Jr,ol:()=>lr,optgroup:()=>pr,option:()=>dr,output:()=>yr,p:()=>Ar,pre:()=>br,progress:()=>hr,q:()=>gr,radio:()=>zr,rb:()=>Er,rp:()=>vr,rt:()=>Tr,rtc:()=>Nr,ruby:()=>Or,s:()=>xr,samp:()=>Ir,section:()=>Sr,select:()=>Zr,small:()=>Dr,span:()=>Rr,strong:()=>Lr,sub:()=>Cr,summary:()=>jr,sup:()=>Pr,tabControl:()=>ft,tabNavItem:()=>ot,tabPanel:()=>ut,tabRoot:()=>at,table:()=>Br,tbody:()=>kr,td:()=>Mr,textNode:()=>Wr,textarea:()=>rt,textbox:()=>$r,tfoot:()=>Ur,th:()=>wr,thead:()=>Hr,time:()=>Gr,tr:()=>Fr,track:()=>qr,tt:()=>Vr,u:()=>_r,ul:()=>Kr,video:()=>Yr,wbr:()=>Qr});var r=o(130);const t=(r,t)=>{r.subscription?r.subscription.add(t):r.subscription=t};var e=o(705);function n(r,t,e){if("."===t.charAt(0)){let n=t.substring(1);e?r.classList.add(n):r.classList.remove(n)}else{let[n,o]=function(r,t){if(r.includes(".")){let e=r.split("."),n=e.pop();return[e.reduce(((r,t)=>r[t]),t),n]}return[t,r]}(t,r);n[o]=e}return r}function a(r,o,u){var a;let i=(a=u,(0,e.startWith)(0)(a).subscribe({next:t=>{n(r,o,t)},error(t){n(r,o,t.message)}}));return t(r,i),r}function i(e,...o){let u=document.createElement(e),{props:i,childNodes:f}=function(r){let t={},e=[];if(r.length>0){let[n,...o]=r;null==n||Object.getPrototypeOf(n)===Object.prototype?(n&&(t=n),o.length>0&&(e=o)):e=r}return{props:t,childNodes:e}}(o);return function(t,e){let[o,u]=function(t){let e={},n={};for(const o in t){let u=t[o];(0,r.isObservable)(u)?e[o]=u:n[o]=u}return[e,n]}(e);Object.entries(u).forEach((([r,e])=>{n(t,r,e)})),Object.entries(o).forEach((([r,e])=>{a(t,r,e)}))}(u,i),f=1===f.length&&Array.isArray(f[0])?f[0]:f,f.map((r=>{return(t=r)&&t.nodeType&&(t.nodeType===document.ELEMENT_NODE||t.nodeType===document.TEXT_NODE)?r:document.createTextNode(r);var t})).forEach((r=>{u.appendChild(r)})),u.pipeEvent=function(e){return(n,o)=>{let u=o((0,r.fromEvent)(e,n));return t(e,u),e}}(u),u.subscribeEvent=function(e){return(n,o)=>{let u=(0,r.fromEvent)(e,n).subscribe(o);return t(e,u),e}}(u),u}function f(...r){r=1===r.length&&Array.isArray(r[0])?r[0]:r;let t=new DocumentFragment;return r.forEach((r=>{t.appendChild(r)})),t}function c(r,...t){return i("a",...Array.from(arguments))}function m(r,...t){return i("abbr",...Array.from(arguments))}function s(r,...t){return i("address",...Array.from(arguments))}function l(r,...t){return i("area",...Array.from(arguments))}function p(r,...t){return i("article",...Array.from(arguments))}function d(r,...t){return i("aside",...Array.from(arguments))}function y(r,...t){return i("audio",...Array.from(arguments))}function A(r,...t){return i("b",...Array.from(arguments))}function b(r,...t){return i("bdi",...Array.from(arguments))}function h(r,...t){return i("bdo",...Array.from(arguments))}function g(r,...t){return i("blockquote",...Array.from(arguments))}function E(r,...t){return i("br",...Array.from(arguments))}function v(r,...t){return i("button",...Array.from(arguments))}function T(r,...t){return i("caption",...Array.from(arguments))}function N(r,...t){return i("cite",...Array.from(arguments))}function O(r,...t){return i("code",...Array.from(arguments))}function x(r,...t){return i("col",...Array.from(arguments))}function I(r,...t){return i("colgroup",...Array.from(arguments))}function S(r,...t){return i("data",...Array.from(arguments))}function D(r,...t){return i("datalist",...Array.from(arguments))}function R(r,...t){return i("dd",...Array.from(arguments))}function L(r,...t){return i("del",...Array.from(arguments))}function C(r,...t){return i("details",...Array.from(arguments))}function j(r,...t){return i("dfn",...Array.from(arguments))}function P(r,...t){return i("dialog",...Array.from(arguments))}function B(r,...t){return i("div",...Array.from(arguments))}function k(r,...t){return i("dl",...Array.from(arguments))}function M(r,...t){return i("dt",...Array.from(arguments))}function U(r,...t){return i("em",...Array.from(arguments))}function w(r,...t){return i("fieldset",...Array.from(arguments))}function H(r,...t){return i("figcaption",...Array.from(arguments))}function G(r,...t){return i("figure",...Array.from(arguments))}function F(r,...t){return i("footer",...Array.from(arguments))}function q(r,...t){return i("form",...Array.from(arguments))}function V(r,...t){return i("h1",...Array.from(arguments))}function _(r,...t){return i("h2",...Array.from(arguments))}function K(r,...t){return i("h3",...Array.from(arguments))}function Y(r,...t){return i("h4",...Array.from(arguments))}function Q(r,...t){return i("h5",...Array.from(arguments))}function W(r,...t){return i("h6",...Array.from(arguments))}function X(r,...t){return i("header",...Array.from(arguments))}function J(r,...t){return i("hgroup",...Array.from(arguments))}function z(r,...t){return i("hr",...Array.from(arguments))}function Z(r,...t){return i("i",...Array.from(arguments))}function $(r,...t){return i("img",...Array.from(arguments))}function rr(r,...t){return i("input",...Array.from(arguments))}function tr(r,...t){return i("ins",...Array.from(arguments))}function er(r,...t){return i("kbd",...Array.from(arguments))}function nr(r,...t){return i("label",...Array.from(arguments))}function or(r,...t){return i("legend",...Array.from(arguments))}function ur(r,...t){return i("li",...Array.from(arguments))}function ar(r,...t){return i("main",...Array.from(arguments))}function ir(r,...t){return i("mark",...Array.from(arguments))}function fr(r,...t){return i("menu",...Array.from(arguments))}function cr(r,...t){return i("menuitem",...Array.from(arguments))}function mr(r,...t){return i("meter",...Array.from(arguments))}function sr(r,...t){return i("nav",...Array.from(arguments))}function lr(r,...t){return i("ol",...Array.from(arguments))}function pr(r,...t){return i("optgroup",...Array.from(arguments))}function dr(r,...t){return i("option",...Array.from(arguments))}function yr(r,...t){return i("output",...Array.from(arguments))}function Ar(r,...t){return i("p",...Array.from(arguments))}function br(r,...t){return i("pre",...Array.from(arguments))}function hr(r,...t){return i("progress",...Array.from(arguments))}function gr(r,...t){return i("q",...Array.from(arguments))}function Er(r,...t){return i("rb",...Array.from(arguments))}function vr(r,...t){return i("rp",...Array.from(arguments))}function Tr(r,...t){return i("rt",...Array.from(arguments))}function Nr(r,...t){return i("rtc",...Array.from(arguments))}function Or(r,...t){return i("ruby",...Array.from(arguments))}function xr(r,...t){return i("s",...Array.from(arguments))}function Ir(r,...t){return i("samp",...Array.from(arguments))}function Sr(r,...t){return i("section",...Array.from(arguments))}function Dr(r,...t){return i("small",...Array.from(arguments))}function Rr(r,...t){return i("span",...Array.from(arguments))}function Lr(r,...t){return i("strong",...Array.from(arguments))}function Cr(r,...t){return i("sub",...Array.from(arguments))}function jr(r,...t){return i("summary",...Array.from(arguments))}function Pr(r,...t){return i("sup",...Array.from(arguments))}function Br(r,...t){return i("table",...Array.from(arguments))}function kr(r,...t){return i("tbody",...Array.from(arguments))}function Mr(r,...t){return i("td",...Array.from(arguments))}function Ur(r,...t){return i("tfoot",...Array.from(arguments))}function wr(r,...t){return i("th",...Array.from(arguments))}function Hr(r,...t){return i("thead",...Array.from(arguments))}function Gr(r,...t){return i("time",...Array.from(arguments))}function Fr(r,...t){return i("tr",...Array.from(arguments))}function qr(r,...t){return i("track",...Array.from(arguments))}function Vr(r,...t){return i("tt",...Array.from(arguments))}function _r(r,...t){return i("u",...Array.from(arguments))}function Kr(r,...t){return i("ul",...Array.from(arguments))}function Yr(r,...t){return i("video",...Array.from(arguments))}function Qr(r,...t){return i("wbr",...Array.from(arguments))}function Wr(t){if((0,r.isObservable)(t)){let r=document.createTextNode("");return t.subscribe({next:t=>{r.nodeValue=t},error:t=>{r.nodeValue=t.message}}),r}return document.createTextNode(t)}function Xr(r){let t=rr({...r,type:"checkbox"});return r.checked&&t.pipeEvent("input",(t=>t.pipe((0,e.map)((r=>r.target.checked))).subscribe(r.checked))),t}function Jr(t={}){let{number:n,...o}=t,u=rr({...o,type:"text"});if(!(n&&n instanceof r.BehaviorSubject))throw new Error("numberbox must have `number` prop.");try{let r=n.pipe((0,e.map)((r=>String(r))));a(u,"value",r),u.pipeEvent("blur",(r=>r.pipe((0,e.map)((r=>Number(r.target.value)))).subscribe((r=>{Number.isNaN(r)?u.select():n.value!==r&&n.next(r)}))))}catch(r){console.log(r.message)}return u.style.textAlign="right",u}function zr(r){let t=rr({...r,type:"radio"});return r.checked&&t.pipeEvent("input",(t=>t.pipe((0,e.map)((r=>r.target.checked))).subscribe(r.checked))),t}function Zr(t,...n){let o=i("select",t,...n),{selectedIndex:u,value:a,...f}=t;return(0,r.isObservable)(u)&&(u.subscribe((r=>{o[r].selected=!0})),o.pipeEvent("input",(r=>r.pipe((0,e.map)((r=>r.target.selectedIndex))).subscribe(u)))),(0,r.isObservable)(a)&&(a.subscribe((r=>{Array.from(o.getElementsByTagName("option")).filter((t=>t.value===r)).forEach((r=>{r.selected=!0}))})),o.pipeEvent("input",(r=>r.pipe((0,e.map)((r=>r.target.value))).subscribe(a)))),o}function $r(r){let t=rr({...r,type:"text"});return t.pipeEvent("input",(t=>{var n;return n=t,(0,e.map)((r=>r.target.value))(n).subscribe(r.value)})),t}function rt(r){let t=i("textarea",r);return t.pipeEvent("input",(t=>{var n;return n=t,(0,e.map)((r=>r.target.value))(n).subscribe(r.value)})),t}function tt(r,...t){return(t=1===t.length&&Array.isArray(t[0])?t[0]:t).forEach((t=>{a(t,"hidden",r)})),t}function et(r,t){return Object.entries(t).map((([t,n])=>{var o;return tt((o=r,(0,e.map)((r=>r!==t))(o)),n)})).reduce(((r,t)=>[...r,...t]),[])}function nt(r,t,n){var o;return[...tt((o=r,(0,e.map)((r=>!r))(o)),t),...tt(r,n)]}function ot(...r){return ur({className:"nav-item"},v({type:"button",className:"btn btn-link nav-link"},...r))}function ut(...r){return B({className:"tab-pane"},...r)}function at(r={}){return B(r,Kr({className:"nav nav-tabs"}),B({className:"tab-content"}))}function it(r,t=new BehaviorSubject(0)){let n=r.firstChild,o=r.lastChild;t.subscribe((r=>{Array.from(n.childNodes).forEach(((t,e)=>{let n=t.firstChild;r===e?n.classList.add("active"):n.classList.remove("active")})),Array.from(o.childNodes).forEach(((t,e)=>{r===e?t.classList.add("active"):t.classList.remove("active")}))})),n.pipeEvent("click",(r=>{var o,u;return u=r,o=(0,e.map)((r=>[...n.childNodes].map((r=>r.firstChild)).indexOf(r.target)))(u),(0,e.filter)((r=>r>-1))(o).subscribe(t)}))}function ft(r,t,e){let{tabIndex:n,...o}=r,u=at(o),a=u.firstChild,i=u.lastChild;return t.map((r=>ot(r))).forEach((r=>a.appendChild(r))),e.map((r=>ut(r))).forEach((r=>i.appendChild(r))),it(u,n),u}const ct=new Set(["ADDRESS","ARTICLE","ASIDE","BLOCKQUOTE","DD","DETAILS","DIALOG","DIV","DL","DT","FIELDSET","FIGCAPTION","FIGURE","FOOTER","FORM","H1","H2","H3","H4","H5","H6","HEADER","HGROUP","HR","LI","MAIN","NAV","OL","P","PRE","SECTION","TABLE","UL"]),mt=new Set(["A","ABBR","ACRONYM","AUDIO","B","BDI","BDO","BIG","BR","BUTTON","CANVAS","CITE","CODE","DATA","DATALIST","DEL","DFN","EM","EMBED","I","IFRAME","IMG","INPUT","INS","KBD","LABEL","MAP","MARK","METER","NOSCRIPT","OBJECT","OUTPUT","PICTURE","PROGRESS","Q","RUBY","S","SAMP","SCRIPT","SELECT","SLOT","SMALL","SPAN","STRONG","SUB","SUP","SVG","TEMPLATE","TEXTAREA","TIME","TT","U","VAR","VIDEO","WBR"]);function st(r){return"TBODY"===r.tagName?"table-row-group":"THEAD"===r.tagName?"table-header-group":"TFOOT"===r.tagName?"table-footer-group":"TR"===r.tagName?"table-row":"TD"===r.tagName||"TH"===r.tagName?"table-cell":"COLGROUP"===r.tagName?"table-column-group":"COL"===r.tagName?"table-column":"CAPTION"===r.tagName?"table-caption":ct.has(r.tagName)?"block":mt.has(r.tagName)?"inline":"unset"}})(),u})()}));
1
+ !function(r,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("rxjs"),require("rxjs/operators")):"function"==typeof define&&define.amd?define(["rxjs","rxjs/operators"],t):"object"==typeof exports?exports.hyperscriptRxjs=t(require("rxjs"),require("rxjs/operators")):r.hyperscriptRxjs=t(r.rxjs,r.rxjs.operators)}(this,(function(r,t){return(()=>{"use strict";var e={705:r=>{r.exports=t},130:t=>{t.exports=r}},n={};function o(r){var t=n[r];if(void 0!==t)return t.exports;var u=n[r]={exports:{}};return e[r](u,u.exports,o),u.exports}o.d=(r,t)=>{for(var e in t)o.o(t,e)&&!o.o(r,e)&&Object.defineProperty(r,e,{enumerable:!0,get:t[e]})},o.o=(r,t)=>Object.prototype.hasOwnProperty.call(r,t),o.r=r=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(r,"__esModule",{value:!0})};var u={};return(()=>{o.r(u),o.d(u,{a:()=>c,abbr:()=>m,address:()=>s,area:()=>l,article:()=>p,aside:()=>d,audio:()=>y,b:()=>A,bdi:()=>b,bdo:()=>h,bindTabIndex:()=>it,blockquote:()=>g,br:()=>E,button:()=>v,caption:()=>T,checkbox:()=>Xr,choice:()=>et,cite:()=>N,code:()=>O,col:()=>x,colgroup:()=>S,collapse:()=>tt,data:()=>I,datalist:()=>D,dd:()=>R,del:()=>L,details:()=>C,dfn:()=>j,dialog:()=>P,div:()=>B,dl:()=>k,dt:()=>M,em:()=>U,fieldset:()=>w,figcaption:()=>H,figure:()=>G,flip:()=>nt,footer:()=>F,form:()=>q,fragment:()=>f,getDisplay:()=>st,h1:()=>V,h2:()=>_,h3:()=>K,h4:()=>Y,h5:()=>Q,h6:()=>W,header:()=>X,hgroup:()=>J,hr:()=>z,hyperscript:()=>i,i:()=>Z,img:()=>$,input:()=>rr,ins:()=>tr,kbd:()=>er,label:()=>nr,legend:()=>or,li:()=>ur,main:()=>ar,mark:()=>ir,menu:()=>fr,menuitem:()=>cr,meter:()=>mr,nav:()=>sr,numberbox:()=>Jr,ol:()=>lr,optgroup:()=>pr,option:()=>dr,output:()=>yr,p:()=>Ar,pre:()=>br,progress:()=>hr,q:()=>gr,radio:()=>zr,rb:()=>Er,rp:()=>vr,rt:()=>Tr,rtc:()=>Nr,ruby:()=>Or,s:()=>xr,samp:()=>Sr,section:()=>Ir,select:()=>Zr,small:()=>Dr,span:()=>Rr,strong:()=>Lr,sub:()=>Cr,summary:()=>jr,sup:()=>Pr,tabControl:()=>ft,tabNavItem:()=>ot,tabPanel:()=>ut,tabRoot:()=>at,table:()=>Br,tbody:()=>kr,td:()=>Mr,textNode:()=>Wr,textarea:()=>rt,textbox:()=>$r,tfoot:()=>Ur,th:()=>wr,thead:()=>Hr,time:()=>Gr,tr:()=>Fr,track:()=>qr,tt:()=>Vr,u:()=>_r,ul:()=>Kr,video:()=>Yr,wbr:()=>Qr});var r=o(130);const t=(r,t)=>{r.subscription?r.subscription.add(t):r.subscription=t};var e=o(705);function n(r,t,e){if("."===t.charAt(0)){let n=t.substring(1);e?r.classList.add(n):r.classList.remove(n)}else{let[n,o]=function(r,t){if(r.includes(".")){let e=r.split("."),n=e.pop();return[e.reduce(((r,t)=>r[t]),t),n]}return[t,r]}(t,r);n[o]=e}return r}function a(r,o,u){var a;let i=(a=u,(0,e.startWith)(0)(a).subscribe({next:t=>{n(r,o,t)},error(t){n(r,o,t.message)}}));return t(r,i),r}function i(e,...o){let u=document.createElement(e),{props:i,childNodes:f}=function(r){let t={},e=[];if(r.length>0){let[n,...o]=r;null==n||Object.getPrototypeOf(n)===Object.prototype?(n&&(t=n),o.length>0&&(e=o)):e=r}return{props:t,childNodes:e}}(o);return function(t,e){let[o,u]=function(t){let e={},n={};for(const o in t){let u=t[o];(0,r.isObservable)(u)?e[o]=u:n[o]=u}return[e,n]}(e);Object.entries(u).forEach((([r,e])=>{n(t,r,e)})),Object.entries(o).forEach((([r,e])=>{a(t,r,e)}))}(u,i),f=1===f.length&&Array.isArray(f[0])?f[0]:f,f.map((r=>{return(t=r)&&t.nodeType&&(t.nodeType===document.ELEMENT_NODE||t.nodeType===document.TEXT_NODE)?r:document.createTextNode(r);var t})).forEach((r=>{u.appendChild(r)})),u.pipeEvent=function(e){return(n,o)=>{let u=o((0,r.fromEvent)(e,n));return t(e,u),e}}(u),u.subscribeEvent=function(e){return(n,o)=>{let u=(0,r.fromEvent)(e,n).subscribe(o);return t(e,u),e}}(u),u}function f(...r){r=1===r.length&&Array.isArray(r[0])?r[0]:r;let t=new DocumentFragment;return r.forEach((r=>{t.appendChild(r)})),t}function c(r,...t){return i("a",...Array.from(arguments))}function m(r,...t){return i("abbr",...Array.from(arguments))}function s(r,...t){return i("address",...Array.from(arguments))}function l(r,...t){return i("area",...Array.from(arguments))}function p(r,...t){return i("article",...Array.from(arguments))}function d(r,...t){return i("aside",...Array.from(arguments))}function y(r,...t){return i("audio",...Array.from(arguments))}function A(r,...t){return i("b",...Array.from(arguments))}function b(r,...t){return i("bdi",...Array.from(arguments))}function h(r,...t){return i("bdo",...Array.from(arguments))}function g(r,...t){return i("blockquote",...Array.from(arguments))}function E(r,...t){return i("br",...Array.from(arguments))}function v(r,...t){return i("button",...Array.from(arguments))}function T(r,...t){return i("caption",...Array.from(arguments))}function N(r,...t){return i("cite",...Array.from(arguments))}function O(r,...t){return i("code",...Array.from(arguments))}function x(r,...t){return i("col",...Array.from(arguments))}function S(r,...t){return i("colgroup",...Array.from(arguments))}function I(r,...t){return i("data",...Array.from(arguments))}function D(r,...t){return i("datalist",...Array.from(arguments))}function R(r,...t){return i("dd",...Array.from(arguments))}function L(r,...t){return i("del",...Array.from(arguments))}function C(r,...t){return i("details",...Array.from(arguments))}function j(r,...t){return i("dfn",...Array.from(arguments))}function P(r,...t){return i("dialog",...Array.from(arguments))}function B(r,...t){return i("div",...Array.from(arguments))}function k(r,...t){return i("dl",...Array.from(arguments))}function M(r,...t){return i("dt",...Array.from(arguments))}function U(r,...t){return i("em",...Array.from(arguments))}function w(r,...t){return i("fieldset",...Array.from(arguments))}function H(r,...t){return i("figcaption",...Array.from(arguments))}function G(r,...t){return i("figure",...Array.from(arguments))}function F(r,...t){return i("footer",...Array.from(arguments))}function q(r,...t){return i("form",...Array.from(arguments))}function V(r,...t){return i("h1",...Array.from(arguments))}function _(r,...t){return i("h2",...Array.from(arguments))}function K(r,...t){return i("h3",...Array.from(arguments))}function Y(r,...t){return i("h4",...Array.from(arguments))}function Q(r,...t){return i("h5",...Array.from(arguments))}function W(r,...t){return i("h6",...Array.from(arguments))}function X(r,...t){return i("header",...Array.from(arguments))}function J(r,...t){return i("hgroup",...Array.from(arguments))}function z(r,...t){return i("hr",...Array.from(arguments))}function Z(r,...t){return i("i",...Array.from(arguments))}function $(r,...t){return i("img",...Array.from(arguments))}function rr(r,...t){return i("input",...Array.from(arguments))}function tr(r,...t){return i("ins",...Array.from(arguments))}function er(r,...t){return i("kbd",...Array.from(arguments))}function nr(r,...t){return i("label",...Array.from(arguments))}function or(r,...t){return i("legend",...Array.from(arguments))}function ur(r,...t){return i("li",...Array.from(arguments))}function ar(r,...t){return i("main",...Array.from(arguments))}function ir(r,...t){return i("mark",...Array.from(arguments))}function fr(r,...t){return i("menu",...Array.from(arguments))}function cr(r,...t){return i("menuitem",...Array.from(arguments))}function mr(r,...t){return i("meter",...Array.from(arguments))}function sr(r,...t){return i("nav",...Array.from(arguments))}function lr(r,...t){return i("ol",...Array.from(arguments))}function pr(r,...t){return i("optgroup",...Array.from(arguments))}function dr(r,...t){return i("option",...Array.from(arguments))}function yr(r,...t){return i("output",...Array.from(arguments))}function Ar(r,...t){return i("p",...Array.from(arguments))}function br(r,...t){return i("pre",...Array.from(arguments))}function hr(r,...t){return i("progress",...Array.from(arguments))}function gr(r,...t){return i("q",...Array.from(arguments))}function Er(r,...t){return i("rb",...Array.from(arguments))}function vr(r,...t){return i("rp",...Array.from(arguments))}function Tr(r,...t){return i("rt",...Array.from(arguments))}function Nr(r,...t){return i("rtc",...Array.from(arguments))}function Or(r,...t){return i("ruby",...Array.from(arguments))}function xr(r,...t){return i("s",...Array.from(arguments))}function Sr(r,...t){return i("samp",...Array.from(arguments))}function Ir(r,...t){return i("section",...Array.from(arguments))}function Dr(r,...t){return i("small",...Array.from(arguments))}function Rr(r,...t){return i("span",...Array.from(arguments))}function Lr(r,...t){return i("strong",...Array.from(arguments))}function Cr(r,...t){return i("sub",...Array.from(arguments))}function jr(r,...t){return i("summary",...Array.from(arguments))}function Pr(r,...t){return i("sup",...Array.from(arguments))}function Br(r,...t){return i("table",...Array.from(arguments))}function kr(r,...t){return i("tbody",...Array.from(arguments))}function Mr(r,...t){return i("td",...Array.from(arguments))}function Ur(r,...t){return i("tfoot",...Array.from(arguments))}function wr(r,...t){return i("th",...Array.from(arguments))}function Hr(r,...t){return i("thead",...Array.from(arguments))}function Gr(r,...t){return i("time",...Array.from(arguments))}function Fr(r,...t){return i("tr",...Array.from(arguments))}function qr(r,...t){return i("track",...Array.from(arguments))}function Vr(r,...t){return i("tt",...Array.from(arguments))}function _r(r,...t){return i("u",...Array.from(arguments))}function Kr(r,...t){return i("ul",...Array.from(arguments))}function Yr(r,...t){return i("video",...Array.from(arguments))}function Qr(r,...t){return i("wbr",...Array.from(arguments))}function Wr(t){if((0,r.isObservable)(t)){let r=document.createTextNode("");return t.subscribe({next:t=>{r.nodeValue=t},error:t=>{r.nodeValue=t.message}}),r}return document.createTextNode(t)}function Xr(r){let t=rr({...r,type:"checkbox"});return r.checked&&t.pipeEvent("input",(t=>t.pipe((0,e.map)((r=>r.target.checked))).subscribe(r.checked))),t}function Jr(t={}){let{number:n,...o}=t,u=rr({...o,type:"text"});if(!(n&&n instanceof r.BehaviorSubject))throw console.log(n),console.log(n instanceof r.BehaviorSubject),new Error("numberbox must have `number` prop.");{let r=n.pipe((0,e.map)((r=>String(r))));a(u,"value",r),u.pipeEvent("blur",(r=>r.pipe((0,e.map)((r=>Number(r.target.value)))).subscribe((r=>{Number.isNaN(r)?u.select():n.value!==r&&n.next(r)}))))}return u.style.textAlign="right",u}function zr(r){let t=rr({...r,type:"radio"});return r.checked&&t.pipeEvent("input",(t=>t.pipe((0,e.map)((r=>r.target.checked))).subscribe(r.checked))),t}function Zr(t,...n){let o=i("select",t,...n),{selectedIndex:u,value:a,...f}=t;return(0,r.isObservable)(u)&&(u.subscribe((r=>{o[r].selected=!0})),o.pipeEvent("input",(r=>r.pipe((0,e.map)((r=>r.target.selectedIndex))).subscribe(u)))),(0,r.isObservable)(a)&&(a.subscribe((r=>{Array.from(o.getElementsByTagName("option")).filter((t=>t.value===r)).forEach((r=>{r.selected=!0}))})),o.pipeEvent("input",(r=>r.pipe((0,e.map)((r=>r.target.value))).subscribe(a)))),o}function $r(r){let t=rr({...r,type:"text"});return t.pipeEvent("input",(t=>{var n;return n=t,(0,e.map)((r=>r.target.value))(n).subscribe(r.value)})),t}function rt(r){let t=i("textarea",r);return t.pipeEvent("input",(t=>{var n;return n=t,(0,e.map)((r=>r.target.value))(n).subscribe(r.value)})),t}function tt(r,...t){return(t=1===t.length&&Array.isArray(t[0])?t[0]:t).forEach((t=>{a(t,"hidden",r)})),t}function et(r,t){return Object.entries(t).map((([t,n])=>{var o;return tt((o=r,(0,e.map)((r=>r!==t))(o)),n)})).reduce(((r,t)=>[...r,...t]),[])}function nt(r,t,n){var o;return[...tt((o=r,(0,e.map)((r=>!r))(o)),t),...tt(r,n)]}function ot(...r){return ur({className:"nav-item"},v({type:"button",className:"btn btn-link nav-link"},...r))}function ut(...r){return B({className:"tab-pane"},...r)}function at(r={}){return B(r,Kr({className:"nav nav-tabs"}),B({className:"tab-content"}))}function it(r,t=new BehaviorSubject(0)){let n=r.firstChild,o=r.lastChild;t.subscribe((r=>{Array.from(n.childNodes).forEach(((t,e)=>{let n=t.firstChild;r===e?n.classList.add("active"):n.classList.remove("active")})),Array.from(o.childNodes).forEach(((t,e)=>{r===e?t.classList.add("active"):t.classList.remove("active")}))})),n.pipeEvent("click",(r=>{var o,u;return u=r,o=(0,e.map)((r=>[...n.childNodes].map((r=>r.firstChild)).indexOf(r.target)))(u),(0,e.filter)((r=>r>-1))(o).subscribe(t)}))}function ft(r,t,e){let{tabIndex:n,...o}=r,u=at(o),a=u.firstChild,i=u.lastChild;return t.map((r=>ot(r))).forEach((r=>a.appendChild(r))),e.map((r=>ut(r))).forEach((r=>i.appendChild(r))),it(u,n),u}const ct=new Set(["ADDRESS","ARTICLE","ASIDE","BLOCKQUOTE","DD","DETAILS","DIALOG","DIV","DL","DT","FIELDSET","FIGCAPTION","FIGURE","FOOTER","FORM","H1","H2","H3","H4","H5","H6","HEADER","HGROUP","HR","LI","MAIN","NAV","OL","P","PRE","SECTION","TABLE","UL"]),mt=new Set(["A","ABBR","ACRONYM","AUDIO","B","BDI","BDO","BIG","BR","BUTTON","CANVAS","CITE","CODE","DATA","DATALIST","DEL","DFN","EM","EMBED","I","IFRAME","IMG","INPUT","INS","KBD","LABEL","MAP","MARK","METER","NOSCRIPT","OBJECT","OUTPUT","PICTURE","PROGRESS","Q","RUBY","S","SAMP","SCRIPT","SELECT","SLOT","SMALL","SPAN","STRONG","SUB","SUP","SVG","TEMPLATE","TEXTAREA","TIME","TT","U","VAR","VIDEO","WBR"]);function st(r){return"TBODY"===r.tagName?"table-row-group":"THEAD"===r.tagName?"table-header-group":"TFOOT"===r.tagName?"table-footer-group":"TR"===r.tagName?"table-row":"TD"===r.tagName||"TH"===r.tagName?"table-cell":"COLGROUP"===r.tagName?"table-column-group":"COL"===r.tagName?"table-column":"CAPTION"===r.tagName?"table-caption":ct.has(r.tagName)?"block":mt.has(r.tagName)?"inline":"unset"}})(),u})()}));
package/package.json CHANGED
@@ -29,7 +29,7 @@
29
29
  "name": "hyperscript-rxjs",
30
30
  "description": "A js UI library that uses rxjs to react dom directly.",
31
31
  "main": "dist/hyperscript-rxjs.js",
32
- "version": "1.2.1",
32
+ "version": "1.2.4",
33
33
  "author": "cuishengli<34696643@qq.com>",
34
34
  "keywords": [
35
35
  "ui",