svelte-split-pane
Advanced tools
Comparing version 0.1.1 to 0.1.2
@@ -365,3 +365,3 @@ (function (global, factory) { | ||
// (88:26) | ||
// (104:26) | ||
function fallback_block_1(ctx) { | ||
@@ -385,3 +385,3 @@ let div; | ||
// (111:27) | ||
// (113:27) | ||
function fallback_block(ctx) { | ||
@@ -415,7 +415,7 @@ let div; | ||
let dispose; | ||
const left_slot_template = /*#slots*/ ctx[12].left; | ||
const left_slot = create_slot(left_slot_template, ctx, /*$$scope*/ ctx[11], get_left_slot_context); | ||
const left_slot_template = /*#slots*/ ctx[10].left; | ||
const left_slot = create_slot(left_slot_template, ctx, /*$$scope*/ ctx[9], get_left_slot_context); | ||
const left_slot_or_fallback = left_slot || fallback_block_1(); | ||
const right_slot_template = /*#slots*/ ctx[12].right; | ||
const right_slot = create_slot(right_slot_template, ctx, /*$$scope*/ ctx[11], get_right_slot_context); | ||
const right_slot_template = /*#slots*/ ctx[10].right; | ||
const right_slot = create_slot(right_slot_template, ctx, /*$$scope*/ ctx[9], get_right_slot_context); | ||
const right_slot_or_fallback = right_slot || fallback_block(); | ||
@@ -450,6 +450,6 @@ | ||
/*div0_binding*/ ctx[13](div0); | ||
/*div0_binding*/ ctx[11](div0); | ||
append(div3, t0); | ||
append(div3, div1); | ||
/*div1_binding*/ ctx[14](div1); | ||
/*div1_binding*/ ctx[12](div1); | ||
append(div3, t1); | ||
@@ -462,7 +462,11 @@ append(div3, div2); | ||
/*div2_binding*/ ctx[16](div2); | ||
/*div2_binding*/ ctx[13](div2); | ||
current = true; | ||
if (!mounted) { | ||
dispose = listen(div1, "mousedown", /*mousedown_handler*/ ctx[15]); | ||
dispose = [ | ||
listen(div1, "mousedown", /*onMouseDown*/ ctx[7]), | ||
listen(div1, "touchstart", /*onMouseDown*/ ctx[7]) | ||
]; | ||
mounted = true; | ||
@@ -473,4 +477,4 @@ } | ||
if (left_slot) { | ||
if (left_slot.p && dirty & /*$$scope*/ 2048) { | ||
update_slot(left_slot, left_slot_template, ctx, /*$$scope*/ ctx[11], dirty, get_left_slot_changes, get_left_slot_context); | ||
if (left_slot.p && dirty & /*$$scope*/ 512) { | ||
update_slot(left_slot, left_slot_template, ctx, /*$$scope*/ ctx[9], dirty, get_left_slot_changes, get_left_slot_context); | ||
} | ||
@@ -480,4 +484,4 @@ } | ||
if (right_slot) { | ||
if (right_slot.p && dirty & /*$$scope*/ 2048) { | ||
update_slot(right_slot, right_slot_template, ctx, /*$$scope*/ ctx[11], dirty, get_right_slot_changes, get_right_slot_context); | ||
if (right_slot.p && dirty & /*$$scope*/ 512) { | ||
update_slot(right_slot, right_slot_template, ctx, /*$$scope*/ ctx[9], dirty, get_right_slot_changes, get_right_slot_context); | ||
} | ||
@@ -516,8 +520,8 @@ } | ||
if (left_slot_or_fallback) left_slot_or_fallback.d(detaching); | ||
/*div0_binding*/ ctx[13](null); | ||
/*div1_binding*/ ctx[14](null); | ||
/*div0_binding*/ ctx[11](null); | ||
/*div1_binding*/ ctx[12](null); | ||
if (right_slot_or_fallback) right_slot_or_fallback.d(detaching); | ||
/*div2_binding*/ ctx[16](null); | ||
/*div2_binding*/ ctx[13](null); | ||
mounted = false; | ||
dispose(); | ||
run_all(dispose); | ||
} | ||
@@ -538,2 +542,20 @@ }; | ||
const onMouseDown = e => { | ||
e.preventDefault(); | ||
if (e.button !== 0) return; | ||
md = { | ||
e, | ||
offsetLeft: separator.offsetLeft, | ||
offsetTop: separator.offsetTop, | ||
firstWidth: left.offsetWidth, | ||
secondWidth: right.offsetWidth | ||
}; | ||
window.addEventListener("mousemove", onMouseMove); | ||
window.addEventListener("mouseup", onMouseUp); | ||
window.addEventListener("touchmove", onMouseMove); | ||
window.addEventListener("touchend", onMouseUp); | ||
}; | ||
const onMouseMove = e => { | ||
@@ -552,4 +574,4 @@ e.preventDefault(); | ||
$$invalidate(4, separator.style.left = md.offsetLeft + delta.x + "px", separator); | ||
$$invalidate(6, left.style.width = md.firstWidth + delta.x + "px", left); | ||
$$invalidate(7, right.style.width = md.secondWidth - delta.x + "px", right); | ||
$$invalidate(5, left.style.width = md.firstWidth + delta.x + "px", left); | ||
$$invalidate(6, right.style.width = md.secondWidth - delta.x + "px", right); | ||
updateCallback(); | ||
@@ -567,2 +589,4 @@ }; | ||
window.removeEventListener("mouseup", onMouseUp); | ||
window.removeEventListener("touchmove", onMouseMove); | ||
window.removeEventListener("touchend", onMouseUp); | ||
}; | ||
@@ -598,3 +622,3 @@ | ||
left = $$value; | ||
$$invalidate(6, left); | ||
$$invalidate(5, left); | ||
}); | ||
@@ -610,22 +634,6 @@ } | ||
const mousedown_handler = e => { | ||
e.preventDefault(); | ||
if (e.button !== 0) return; | ||
$$invalidate(5, md = { | ||
e, | ||
offsetLeft: separator.offsetLeft, | ||
offsetTop: separator.offsetTop, | ||
firstWidth: left.offsetWidth, | ||
secondWidth: right.offsetWidth | ||
}); | ||
window.addEventListener("mousemove", onMouseMove); | ||
window.addEventListener("mouseup", onMouseUp); | ||
}; | ||
function div2_binding($$value) { | ||
binding_callbacks[$$value ? "unshift" : "push"](() => { | ||
right = $$value; | ||
$$invalidate(7, right); | ||
$$invalidate(6, right); | ||
}); | ||
@@ -635,3 +643,3 @@ } | ||
$$self.$$set = $$props => { | ||
if ("updateCallback" in $$props) $$invalidate(10, updateCallback = $$props.updateCallback); | ||
if ("updateCallback" in $$props) $$invalidate(8, updateCallback = $$props.updateCallback); | ||
if ("leftPaneSize" in $$props) $$invalidate(0, leftPaneSize = $$props.leftPaneSize); | ||
@@ -641,3 +649,3 @@ if ("rightPaneSize" in $$props) $$invalidate(1, rightPaneSize = $$props.rightPaneSize); | ||
if ("minRightPaneSize" in $$props) $$invalidate(3, minRightPaneSize = $$props.minRightPaneSize); | ||
if ("$$scope" in $$props) $$invalidate(11, $$scope = $$props.$$scope); | ||
if ("$$scope" in $$props) $$invalidate(9, $$scope = $$props.$$scope); | ||
}; | ||
@@ -661,7 +669,5 @@ | ||
separator, | ||
md, | ||
left, | ||
right, | ||
onMouseMove, | ||
onMouseUp, | ||
onMouseDown, | ||
updateCallback, | ||
@@ -672,3 +678,2 @@ $$scope, | ||
div1_binding, | ||
mousedown_handler, | ||
div2_binding | ||
@@ -683,3 +688,3 @@ ]; | ||
init(this, options, instance, create_fragment, safe_not_equal, { | ||
updateCallback: 10, | ||
updateCallback: 8, | ||
leftPaneSize: 0, | ||
@@ -702,3 +707,3 @@ rightPaneSize: 1, | ||
// (87:25) | ||
// (103:25) | ||
function fallback_block_1$1(ctx) { | ||
@@ -722,3 +727,3 @@ let div; | ||
// (109:26) | ||
// (112:26) | ||
function fallback_block$1(ctx) { | ||
@@ -752,7 +757,7 @@ let div; | ||
let dispose; | ||
const top_slot_template = /*#slots*/ ctx[12].top; | ||
const top_slot = create_slot(top_slot_template, ctx, /*$$scope*/ ctx[11], get_top_slot_context); | ||
const top_slot_template = /*#slots*/ ctx[10].top; | ||
const top_slot = create_slot(top_slot_template, ctx, /*$$scope*/ ctx[9], get_top_slot_context); | ||
const top_slot_or_fallback = top_slot || fallback_block_1$1(); | ||
const down_slot_template = /*#slots*/ ctx[12].down; | ||
const down_slot = create_slot(down_slot_template, ctx, /*$$scope*/ ctx[11], get_down_slot_context); | ||
const down_slot_template = /*#slots*/ ctx[10].down; | ||
const down_slot = create_slot(down_slot_template, ctx, /*$$scope*/ ctx[9], get_down_slot_context); | ||
const down_slot_or_fallback = down_slot || fallback_block$1(); | ||
@@ -787,6 +792,6 @@ | ||
/*div0_binding*/ ctx[13](div0); | ||
/*div0_binding*/ ctx[11](div0); | ||
append(div3, t0); | ||
append(div3, div1); | ||
/*div1_binding*/ ctx[14](div1); | ||
/*div1_binding*/ ctx[12](div1); | ||
append(div3, t1); | ||
@@ -799,7 +804,11 @@ append(div3, div2); | ||
/*div2_binding*/ ctx[16](div2); | ||
/*div2_binding*/ ctx[13](div2); | ||
current = true; | ||
if (!mounted) { | ||
dispose = listen(div1, "mousedown", /*mousedown_handler*/ ctx[15]); | ||
dispose = [ | ||
listen(div1, "mousedown", /*onMouseDown*/ ctx[7]), | ||
listen(div1, "touchstart", /*onMouseDown*/ ctx[7]) | ||
]; | ||
mounted = true; | ||
@@ -810,4 +819,4 @@ } | ||
if (top_slot) { | ||
if (top_slot.p && dirty & /*$$scope*/ 2048) { | ||
update_slot(top_slot, top_slot_template, ctx, /*$$scope*/ ctx[11], dirty, get_top_slot_changes, get_top_slot_context); | ||
if (top_slot.p && dirty & /*$$scope*/ 512) { | ||
update_slot(top_slot, top_slot_template, ctx, /*$$scope*/ ctx[9], dirty, get_top_slot_changes, get_top_slot_context); | ||
} | ||
@@ -817,4 +826,4 @@ } | ||
if (down_slot) { | ||
if (down_slot.p && dirty & /*$$scope*/ 2048) { | ||
update_slot(down_slot, down_slot_template, ctx, /*$$scope*/ ctx[11], dirty, get_down_slot_changes, get_down_slot_context); | ||
if (down_slot.p && dirty & /*$$scope*/ 512) { | ||
update_slot(down_slot, down_slot_template, ctx, /*$$scope*/ ctx[9], dirty, get_down_slot_changes, get_down_slot_context); | ||
} | ||
@@ -853,8 +862,8 @@ } | ||
if (top_slot_or_fallback) top_slot_or_fallback.d(detaching); | ||
/*div0_binding*/ ctx[13](null); | ||
/*div1_binding*/ ctx[14](null); | ||
/*div0_binding*/ ctx[11](null); | ||
/*div1_binding*/ ctx[12](null); | ||
if (down_slot_or_fallback) down_slot_or_fallback.d(detaching); | ||
/*div2_binding*/ ctx[16](null); | ||
/*div2_binding*/ ctx[13](null); | ||
mounted = false; | ||
dispose(); | ||
run_all(dispose); | ||
} | ||
@@ -875,2 +884,20 @@ }; | ||
const onMouseDown = e => { | ||
e.preventDefault(); | ||
if (e.button !== 0) return; | ||
md = { | ||
e, | ||
offsetLeft: separator.offsetLeft, | ||
offsetTop: separator.offsetTop, | ||
firstHeight: top.offsetHeight, | ||
secondHeight: down.offsetHeight | ||
}; | ||
window.addEventListener("mousemove", onMouseMove); | ||
window.addEventListener("mouseup", onMouseUp); | ||
window.addEventListener("touchmove", onMouseMove); | ||
window.addEventListener("touchend", onMouseUp); | ||
}; | ||
const onMouseMove = e => { | ||
@@ -889,4 +916,4 @@ e.preventDefault(); | ||
$$invalidate(4, separator.style.top = md.offsetTop + delta.y + "px", separator); | ||
$$invalidate(6, top.style.height = md.firstHeight + delta.y + "px", top); | ||
$$invalidate(7, down.style.height = md.secondHeight - delta.y + "px", down); | ||
$$invalidate(5, top.style.height = md.firstHeight + delta.y + "px", top); | ||
$$invalidate(6, down.style.height = md.secondHeight - delta.y + "px", down); | ||
updateCallback(); | ||
@@ -904,2 +931,4 @@ }; | ||
window.removeEventListener("mouseup", onMouseUp); | ||
window.removeEventListener("touchmove", onMouseMove); | ||
window.removeEventListener("touchend", onMouseUp); | ||
}; | ||
@@ -935,3 +964,3 @@ | ||
top = $$value; | ||
$$invalidate(6, top); | ||
$$invalidate(5, top); | ||
}); | ||
@@ -947,22 +976,6 @@ } | ||
const mousedown_handler = e => { | ||
e.preventDefault(); | ||
if (e.button !== 0) return; | ||
$$invalidate(5, md = { | ||
e, | ||
offsetLeft: separator.offsetLeft, | ||
offsetTop: separator.offsetTop, | ||
firstHeight: top.offsetHeight, | ||
secondHeight: down.offsetHeight | ||
}); | ||
window.addEventListener("mousemove", onMouseMove); | ||
window.addEventListener("mouseup", onMouseUp); | ||
}; | ||
function div2_binding($$value) { | ||
binding_callbacks[$$value ? "unshift" : "push"](() => { | ||
down = $$value; | ||
$$invalidate(7, down); | ||
$$invalidate(6, down); | ||
}); | ||
@@ -972,3 +985,3 @@ } | ||
$$self.$$set = $$props => { | ||
if ("updateCallback" in $$props) $$invalidate(10, updateCallback = $$props.updateCallback); | ||
if ("updateCallback" in $$props) $$invalidate(8, updateCallback = $$props.updateCallback); | ||
if ("topPanelSize" in $$props) $$invalidate(0, topPanelSize = $$props.topPanelSize); | ||
@@ -978,3 +991,3 @@ if ("downPanelSize" in $$props) $$invalidate(1, downPanelSize = $$props.downPanelSize); | ||
if ("minDownPaneSize" in $$props) $$invalidate(3, minDownPaneSize = $$props.minDownPaneSize); | ||
if ("$$scope" in $$props) $$invalidate(11, $$scope = $$props.$$scope); | ||
if ("$$scope" in $$props) $$invalidate(9, $$scope = $$props.$$scope); | ||
}; | ||
@@ -998,7 +1011,5 @@ | ||
separator, | ||
md, | ||
top, | ||
down, | ||
onMouseMove, | ||
onMouseUp, | ||
onMouseDown, | ||
updateCallback, | ||
@@ -1009,3 +1020,2 @@ $$scope, | ||
div1_binding, | ||
mousedown_handler, | ||
div2_binding | ||
@@ -1020,3 +1030,3 @@ ]; | ||
init(this, options, instance$1, create_fragment$1, safe_not_equal, { | ||
updateCallback: 10, | ||
updateCallback: 8, | ||
topPanelSize: 0, | ||
@@ -1023,0 +1033,0 @@ downPanelSize: 1, |
@@ -1,2 +0,2 @@ | ||
var app=function(){"use strict";function t(){}function e(t){return t()}function n(){return Object.create(null)}function o(t){t.forEach(e)}function i(t){return"function"==typeof t}function s(t,e){return t!=t?e==e:t!==e||t&&"object"==typeof t||"function"==typeof t}function r(t,e,n,o){if(t){const i=l(t,e,n,o);return t[0](i)}}function l(t,e,n,o){return t[1]&&o?function(t,e){for(const n in e)t[n]=e[n];return t}(n.ctx.slice(),t[1](o(e))):n.ctx}function c(t,e,n,o,i,s,r){const c=function(t,e,n,o){if(t[2]&&o){const i=t[2](o(n));if(void 0===e.dirty)return i;if("object"==typeof i){const t=[],n=Math.max(e.dirty.length,i.length);for(let o=0;o<n;o+=1)t[o]=e.dirty[o]|i[o];return t}return e.dirty|i}return e.dirty}(e,o,i,s);if(c){const i=l(e,n,o,r);t.p(i,c)}}function a(t,e){t.appendChild(e)}function u(t,e,n){t.insertBefore(e,n||null)}function f(t){t.parentNode.removeChild(t)}function d(t){return document.createElement(t)}function p(){return t=" ",document.createTextNode(t);var t}function m(t,e,n,o){return t.addEventListener(e,n,o),()=>t.removeEventListener(e,n,o)}function $(t,e,n){null==n?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n)}function h(t,e,n,o){t.style.setProperty(e,n,o?"important":"")}let v;function g(t){v=t}function w(){if(!v)throw new Error("Function called outside component initialization");return v}function z(t){w().$$.on_mount.push(t)}function x(t){w().$$.on_destroy.push(t)}const y=[],P=[],b=[],S=[],C=Promise.resolve();let L=!1;function k(t){b.push(t)}let E=!1;const _=new Set;function D(){if(!E){E=!0;do{for(let t=0;t<y.length;t+=1){const e=y[t];g(e),T(e.$$)}for(g(null),y.length=0;P.length;)P.pop()();for(let t=0;t<b.length;t+=1){const e=b[t];_.has(e)||(_.add(e),e())}b.length=0}while(y.length);for(;S.length;)S.pop()();L=!1,E=!1,_.clear()}}function T(t){if(null!==t.fragment){t.update(),o(t.before_update);const e=t.dirty;t.dirty=[-1],t.fragment&&t.fragment.p(t.ctx,e),t.after_update.forEach(k)}}const H=new Set;function A(t,e){t&&t.i&&(H.delete(t),t.i(e))}function R(t,e,n,o){if(t&&t.o){if(H.has(t))return;H.add(t),undefined.c.push((()=>{H.delete(t),o&&(n&&t.d(1),o())})),t.o(e)}}function W(t){t&&t.c()}function M(t,n,s){const{fragment:r,on_mount:l,on_destroy:c,after_update:a}=t.$$;r&&r.m(n,s),k((()=>{const n=l.map(e).filter(i);c?c.push(...n):o(n),t.$$.on_mount=[]})),a.forEach(k)}function j(t,e){const n=t.$$;null!==n.fragment&&(o(n.on_destroy),n.fragment&&n.fragment.d(e),n.on_destroy=n.fragment=null,n.ctx=[])}function X(t,e){-1===t.$$.dirty[0]&&(y.push(t),L||(L=!0,C.then(D)),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<<e%31}function Y(e,i,s,r,l,c,a=[-1]){const u=v;g(e);const d=e.$$={fragment:null,ctx:null,props:c,update:t,not_equal:l,bound:n(),on_mount:[],on_destroy:[],before_update:[],after_update:[],context:new Map(u?u.$$.context:[]),callbacks:n(),dirty:a,skip_bound:!1};let p=!1;if(d.ctx=s?s(e,i.props||{},((t,n,...o)=>{const i=o.length?o[0]:n;return d.ctx&&l(d.ctx[t],d.ctx[t]=i)&&(!d.skip_bound&&d.bound[t]&&d.bound[t](i),p&&X(e,t)),n})):[],d.update(),p=!0,o(d.before_update),d.fragment=!!r&&r(d.ctx),i.target){if(i.hydrate){const t=function(t){return Array.from(t.childNodes)}(i.target);d.fragment&&d.fragment.l(t),t.forEach(f)}else d.fragment&&d.fragment.c();i.intro&&A(e.$$.fragment),M(e,i.target,i.anchor),D()}g(u)}class N{$destroy(){j(this,1),this.$destroy=t}$on(t,e){const n=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return n.push(e),()=>{const t=n.indexOf(e);-1!==t&&n.splice(t,1)}}$set(t){var e;this.$$set&&(e=t,0!==Object.keys(e).length)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}const O=t=>({}),V=t=>({}),U=t=>({}),q=t=>({});function B(t){let e,n,o,i,s,l,v,g,w;const z=t[12].left,x=r(z,t,t[11],q),y=x||function(t){let e;return{c(){e=d("div"),e.textContent="Left Contents goes here...",h(e,"background-color","red")},m(t,n){u(t,e,n)},d(t){t&&f(e)}}}(),P=t[12].right,b=r(P,t,t[11],V),S=b||function(t){let e;return{c(){e=d("div"),e.textContent="Right Contents goes here...",h(e,"background-color","yellow")},m(t,n){u(t,e,n)},d(t){t&&f(e)}}}();return{c(){e=d("div"),n=d("div"),y&&y.c(),o=p(),i=d("div"),s=p(),l=d("div"),S&&S.c(),$(n,"class","left svelte-1lddsds"),$(i,"class","separator svelte-1lddsds"),$(l,"class","right svelte-1lddsds"),$(e,"class","wrapper svelte-1lddsds"),h(e,"--left-panel-size",t[0]),h(e,"--right-panel-size",t[1]),h(e,"--min-left-panel-size",t[2]),h(e,"--min-right-panel-size",t[3])},m(r,c){u(r,e,c),a(e,n),y&&y.m(n,null),t[13](n),a(e,o),a(e,i),t[14](i),a(e,s),a(e,l),S&&S.m(l,null),t[16](l),v=!0,g||(w=m(i,"mousedown",t[15]),g=!0)},p(t,[n]){x&&x.p&&2048&n&&c(x,z,t,t[11],n,U,q),b&&b.p&&2048&n&&c(b,P,t,t[11],n,O,V),(!v||1&n)&&h(e,"--left-panel-size",t[0]),(!v||2&n)&&h(e,"--right-panel-size",t[1]),(!v||4&n)&&h(e,"--min-left-panel-size",t[2]),(!v||8&n)&&h(e,"--min-right-panel-size",t[3])},i(t){v||(A(y,t),A(S,t),v=!0)},o(t){R(y,t),R(S,t),v=!1},d(n){n&&f(e),y&&y.d(n),t[13](null),t[14](null),S&&S.d(n),t[16](null),g=!1,w()}}}function F(t,e,n){let o,i,{$$slots:s={},$$scope:r}=e,{updateCallback:l=(()=>{})}=e;const c=t=>{if(t.preventDefault(),0===t.button){var e={x:t.clientX-i.e.clientX,y:t.clientY-i.e.clientY};e.x=Math.min(Math.max(e.x,-i.firstWidth),i.secondWidth),n(4,o.style.left=i.offsetLeft+e.x+"px",o),n(6,d.style.width=i.firstWidth+e.x+"px",d),n(7,p.style.width=i.secondWidth-e.x+"px",p),l()}},a=t=>{t&&(t.preventDefault(),0!==t.button)||(l(),window.removeEventListener("mousemove",c),window.removeEventListener("mouseup",a))};function u(){d&&d.removeAttribute("style"),p&&p.removeAttribute("style"),o&&o.removeAttribute("style")}function f(){a(),u()}let d,p;z((()=>{window.addEventListener("resize",f)})),x((()=>{window.removeEventListener("resize",f)}));let{leftPaneSize:m="50%"}=e,{rightPaneSize:$="50%"}=e,{minLeftPaneSize:h="0"}=e,{minRightPaneSize:v="0"}=e;return t.$$set=t=>{"updateCallback"in t&&n(10,l=t.updateCallback),"leftPaneSize"in t&&n(0,m=t.leftPaneSize),"rightPaneSize"in t&&n(1,$=t.rightPaneSize),"minLeftPaneSize"in t&&n(2,h=t.minLeftPaneSize),"minRightPaneSize"in t&&n(3,v=t.minRightPaneSize),"$$scope"in t&&n(11,r=t.$$scope)},t.$$.update=()=>{1&t.$$.dirty&&m&&u(),2&t.$$.dirty&&$&&u()},[m,$,h,v,o,i,d,p,c,a,l,r,s,function(t){P[t?"unshift":"push"]((()=>{d=t,n(6,d)}))},function(t){P[t?"unshift":"push"]((()=>{o=t,n(4,o)}))},t=>{t.preventDefault(),0===t.button&&(n(5,i={e:t,offsetLeft:o.offsetLeft,offsetTop:o.offsetTop,firstWidth:d.offsetWidth,secondWidth:p.offsetWidth}),window.addEventListener("mousemove",c),window.addEventListener("mouseup",a))},function(t){P[t?"unshift":"push"]((()=>{p=t,n(7,p)}))}]}class G extends N{constructor(t){super(),Y(this,t,F,B,s,{updateCallback:10,leftPaneSize:0,rightPaneSize:1,minLeftPaneSize:2,minRightPaneSize:3})}}const I=t=>({}),J=t=>({}),K=t=>({}),Q=t=>({});function Z(t){let e,n,o,i,s,l,v,g,w;const z=t[12].top,x=r(z,t,t[11],Q),y=x||function(t){let e;return{c(){e=d("div"),e.textContent="Top Contents goes here...",h(e,"background-color","red")},m(t,n){u(t,e,n)},d(t){t&&f(e)}}}(),P=t[12].down,b=r(P,t,t[11],J),S=b||function(t){let e;return{c(){e=d("div"),e.textContent="Down Contents goes here...",h(e,"background-color","yellow")},m(t,n){u(t,e,n)},d(t){t&&f(e)}}}();return{c(){e=d("div"),n=d("div"),y&&y.c(),o=p(),i=d("div"),s=p(),l=d("div"),S&&S.c(),$(n,"class","top svelte-1uzebfl"),$(i,"class","separator svelte-1uzebfl"),$(l,"class","down svelte-1uzebfl"),$(e,"class","wrapper svelte-1uzebfl"),h(e,"--top-panel-size",t[0]),h(e,"--down-panel-size",t[1]),h(e,"--min-top-panel-size",t[2]),h(e,"--min-down-panel-size",t[3])},m(r,c){u(r,e,c),a(e,n),y&&y.m(n,null),t[13](n),a(e,o),a(e,i),t[14](i),a(e,s),a(e,l),S&&S.m(l,null),t[16](l),v=!0,g||(w=m(i,"mousedown",t[15]),g=!0)},p(t,[n]){x&&x.p&&2048&n&&c(x,z,t,t[11],n,K,Q),b&&b.p&&2048&n&&c(b,P,t,t[11],n,I,J),(!v||1&n)&&h(e,"--top-panel-size",t[0]),(!v||2&n)&&h(e,"--down-panel-size",t[1]),(!v||4&n)&&h(e,"--min-top-panel-size",t[2]),(!v||8&n)&&h(e,"--min-down-panel-size",t[3])},i(t){v||(A(y,t),A(S,t),v=!0)},o(t){R(y,t),R(S,t),v=!1},d(n){n&&f(e),y&&y.d(n),t[13](null),t[14](null),S&&S.d(n),t[16](null),g=!1,w()}}}function tt(t,e,n){let o,i,{$$slots:s={},$$scope:r}=e,{updateCallback:l=(()=>{})}=e;const c=t=>{if(t.preventDefault(),0===t.button){var e={x:t.clientX-i.e.clientX,y:t.clientY-i.e.clientY};e.y=Math.min(Math.max(e.y,-i.firstHeight),i.secondHeight),n(4,o.style.top=i.offsetTop+e.y+"px",o),n(6,d.style.height=i.firstHeight+e.y+"px",d),n(7,p.style.height=i.secondHeight-e.y+"px",p),l()}},a=t=>{t&&(t.preventDefault(),0!==t.button)||(l(),window.removeEventListener("mousemove",c),window.removeEventListener("mouseup",a))};function u(){d&&d.removeAttribute("style"),p&&p.removeAttribute("style"),o&&o.removeAttribute("style")}function f(){a(),u()}let d,p;z((()=>{window.addEventListener("resize",f)})),x((()=>{window.removeEventListener("resize",f)}));let{topPanelSize:m="50%"}=e,{downPanelSize:$="50%"}=e,{minTopPaneSize:h="0"}=e,{minDownPaneSize:v="0"}=e;return t.$$set=t=>{"updateCallback"in t&&n(10,l=t.updateCallback),"topPanelSize"in t&&n(0,m=t.topPanelSize),"downPanelSize"in t&&n(1,$=t.downPanelSize),"minTopPaneSize"in t&&n(2,h=t.minTopPaneSize),"minDownPaneSize"in t&&n(3,v=t.minDownPaneSize),"$$scope"in t&&n(11,r=t.$$scope)},t.$$.update=()=>{1&t.$$.dirty&&m&&u(),2&t.$$.dirty&&$&&u()},[m,$,h,v,o,i,d,p,c,a,l,r,s,function(t){P[t?"unshift":"push"]((()=>{d=t,n(6,d)}))},function(t){P[t?"unshift":"push"]((()=>{o=t,n(4,o)}))},t=>{t.preventDefault(),0===t.button&&(n(5,i={e:t,offsetLeft:o.offsetLeft,offsetTop:o.offsetTop,firstHeight:d.offsetHeight,secondHeight:p.offsetHeight}),window.addEventListener("mousemove",c),window.addEventListener("mouseup",a))},function(t){P[t?"unshift":"push"]((()=>{p=t,n(7,p)}))}]}class et extends N{constructor(t){super(),Y(this,t,tt,Z,s,{updateCallback:10,topPanelSize:0,downPanelSize:1,minTopPaneSize:2,minDownPaneSize:3})}}function nt(t){let e;return{c(){e=d("left"),e.textContent="Left Pane",$(e,"slot","left"),$(e,"class","svelte-d2v2fn")},m(t,n){u(t,e,n)},d(t){t&&f(e)}}}function ot(t){let e;return{c(){e=d("right"),e.textContent="Right Pane",$(e,"slot","right"),$(e,"class","svelte-d2v2fn")},m(t,n){u(t,e,n)},d(t){t&&f(e)}}}function it(e){let n;return{c(){n=p()},m(t,e){u(t,n,e)},p:t,d(t){t&&f(n)}}}function st(t){let e;return{c(){e=d("top"),e.textContent="Top Pane",$(e,"slot","top"),$(e,"class","svelte-d2v2fn")},m(t,n){u(t,e,n)},d(t){t&&f(e)}}}function rt(t){let e;return{c(){e=d("down"),e.textContent="Down Pane",$(e,"slot","down"),$(e,"class","svelte-d2v2fn")},m(t,n){u(t,e,n)},d(t){t&&f(e)}}}function lt(e){let n;return{c(){n=p()},m(t,e){u(t,n,e)},p:t,d(t){t&&f(n)}}}function ct(t){let e;return{c(){e=d("left"),e.textContent="Left Pane",$(e,"slot","left"),$(e,"class","svelte-d2v2fn")},m(t,n){u(t,e,n)},d(t){t&&f(e)}}}function at(t){let e;return{c(){e=d("right"),e.textContent="Right Pane",$(e,"slot","right"),$(e,"class","svelte-d2v2fn")},m(t,n){u(t,e,n)},d(t){t&&f(e)}}}function ut(e){let n;return{c(){n=p()},m(t,e){u(t,n,e)},p:t,d(t){t&&f(n)}}}function ft(t){let e;return{c(){e=d("top"),e.textContent="Top Pane",$(e,"slot","top"),$(e,"class","svelte-d2v2fn")},m(t,n){u(t,e,n)},d(t){t&&f(e)}}}function dt(t){let e;return{c(){e=d("down"),e.textContent="Down Pane",$(e,"slot","down"),$(e,"class","svelte-d2v2fn")},m(t,n){u(t,e,n)},d(t){t&&f(e)}}}function pt(e){let n;return{c(){n=p()},m(t,e){u(t,n,e)},p:t,d(t){t&&f(n)}}}function mt(t){let e,n,o,i,s,r,l,c,m,h,v,g,w,z,x,y,P,b,S,C,L;return s=new G({props:{updateCallback:t[0],$$slots:{default:[it],right:[ot],left:[nt]},$$scope:{ctx:t}}}),h=new et({props:{updateCallback:t[1],$$slots:{default:[lt],down:[rt],top:[st]},$$scope:{ctx:t}}}),x=new G({props:{leftPaneSize:"75%",rightPaneSize:"25%",minLeftPaneSize:"50px",minRightPaneSize:"50px",$$slots:{default:[ut],right:[at],left:[ct]},$$scope:{ctx:t}}}),C=new et({props:{topPanelSize:"75%",downPanelSize:"25%",minTopPaneSize:"50px",minDownPaneSize:"50px",$$slots:{default:[pt],down:[dt],top:[ft]},$$scope:{ctx:t}}}),{c(){e=d("main"),n=d("h1"),n.textContent="H Splite Pane Default",o=p(),i=d("div"),W(s.$$.fragment),r=p(),l=d("h1"),l.textContent="V Splite Pane Default",c=p(),m=d("div"),W(h.$$.fragment),v=p(),g=d("h1"),g.textContent='H Splite Pane 75% : 25% with minSize "50px"',w=p(),z=d("div"),W(x.$$.fragment),y=p(),P=d("h1"),P.textContent='V Splite Pane 75% : 25% with minSize "50px"',b=p(),S=d("div"),W(C.$$.fragment),$(i,"class","wrapper svelte-d2v2fn"),$(m,"class","wrapper svelte-d2v2fn"),$(z,"class","wrapper svelte-d2v2fn"),$(S,"class","wrapper svelte-d2v2fn"),$(e,"class","svelte-d2v2fn")},m(t,f){u(t,e,f),a(e,n),a(e,o),a(e,i),M(s,i,null),a(e,r),a(e,l),a(e,c),a(e,m),M(h,m,null),a(e,v),a(e,g),a(e,w),a(e,z),M(x,z,null),a(e,y),a(e,P),a(e,b),a(e,S),M(C,S,null),L=!0},p(t,[e]){const n={};4&e&&(n.$$scope={dirty:e,ctx:t}),s.$set(n);const o={};4&e&&(o.$$scope={dirty:e,ctx:t}),h.$set(o);const i={};4&e&&(i.$$scope={dirty:e,ctx:t}),x.$set(i);const r={};4&e&&(r.$$scope={dirty:e,ctx:t}),C.$set(r)},i(t){L||(A(s.$$.fragment,t),A(h.$$.fragment,t),A(x.$$.fragment,t),A(C.$$.fragment,t),L=!0)},o(t){R(s.$$.fragment,t),R(h.$$.fragment,t),R(x.$$.fragment,t),R(C.$$.fragment,t),L=!1},d(t){t&&f(e),j(s),j(h),j(x),j(C)}}}function $t(t){return[()=>{console.log("HSplitPane Updated!")},()=>{console.log("VSplitPane Updated!")}]}return new class extends N{constructor(t){super(),Y(this,t,$t,mt,s,{})}}({target:document.body,props:{}})}(); | ||
var app=function(){"use strict";function e(){}function t(e){return e()}function n(){return Object.create(null)}function o(e){e.forEach(t)}function i(e){return"function"==typeof e}function s(e,t){return e!=e?t==t:e!==t||e&&"object"==typeof e||"function"==typeof e}function r(e,t,n,o){if(e){const i=l(e,t,n,o);return e[0](i)}}function l(e,t,n,o){return e[1]&&o?function(e,t){for(const n in t)e[n]=t[n];return e}(n.ctx.slice(),e[1](o(t))):n.ctx}function u(e,t,n,o,i,s,r){const u=function(e,t,n,o){if(e[2]&&o){const i=e[2](o(n));if(void 0===t.dirty)return i;if("object"==typeof i){const e=[],n=Math.max(t.dirty.length,i.length);for(let o=0;o<n;o+=1)e[o]=t.dirty[o]|i[o];return e}return t.dirty|i}return t.dirty}(t,o,i,s);if(u){const i=l(t,n,o,r);e.p(i,u)}}function c(e,t){e.appendChild(t)}function a(e,t,n){e.insertBefore(t,n||null)}function d(e){e.parentNode.removeChild(e)}function f(e){return document.createElement(e)}function p(){return e=" ",document.createTextNode(e);var e}function h(e,t,n,o){return e.addEventListener(t,n,o),()=>e.removeEventListener(t,n,o)}function m(e,t,n){null==n?e.removeAttribute(t):e.getAttribute(t)!==n&&e.setAttribute(t,n)}function $(e,t,n,o){e.style.setProperty(t,n,o?"important":"")}let v;function w(e){v=e}function g(){if(!v)throw new Error("Function called outside component initialization");return v}function b(e){g().$$.on_mount.push(e)}function y(e){g().$$.on_destroy.push(e)}const z=[],x=[],P=[],S=[],L=Promise.resolve();let C=!1;function E(e){P.push(e)}let k=!1;const _=new Set;function D(){if(!k){k=!0;do{for(let e=0;e<z.length;e+=1){const t=z[e];w(t),q(t.$$)}for(w(null),z.length=0;x.length;)x.pop()();for(let e=0;e<P.length;e+=1){const t=P[e];_.has(t)||(_.add(t),t())}P.length=0}while(z.length);for(;S.length;)S.pop()();C=!1,k=!1,_.clear()}}function q(e){if(null!==e.fragment){e.update(),o(e.before_update);const t=e.dirty;e.dirty=[-1],e.fragment&&e.fragment.p(e.ctx,t),e.after_update.forEach(E)}}const T=new Set;function H(e,t){e&&e.i&&(T.delete(e),e.i(t))}function A(e,t,n,o){if(e&&e.o){if(T.has(e))return;T.add(e),undefined.c.push((()=>{T.delete(e),o&&(n&&e.d(1),o())})),e.o(t)}}function R(e){e&&e.c()}function W(e,n,s){const{fragment:r,on_mount:l,on_destroy:u,after_update:c}=e.$$;r&&r.m(n,s),E((()=>{const n=l.map(t).filter(i);u?u.push(...n):o(n),e.$$.on_mount=[]})),c.forEach(E)}function M(e,t){const n=e.$$;null!==n.fragment&&(o(n.on_destroy),n.fragment&&n.fragment.d(t),n.on_destroy=n.fragment=null,n.ctx=[])}function j(e,t){-1===e.$$.dirty[0]&&(z.push(e),C||(C=!0,L.then(D)),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<<t%31}function X(t,i,s,r,l,u,c=[-1]){const a=v;w(t);const f=t.$$={fragment:null,ctx:null,props:u,update:e,not_equal:l,bound:n(),on_mount:[],on_destroy:[],before_update:[],after_update:[],context:new Map(a?a.$$.context:[]),callbacks:n(),dirty:c,skip_bound:!1};let p=!1;if(f.ctx=s?s(t,i.props||{},((e,n,...o)=>{const i=o.length?o[0]:n;return f.ctx&&l(f.ctx[e],f.ctx[e]=i)&&(!f.skip_bound&&f.bound[e]&&f.bound[e](i),p&&j(t,e)),n})):[],f.update(),p=!0,o(f.before_update),f.fragment=!!r&&r(f.ctx),i.target){if(i.hydrate){const e=function(e){return Array.from(e.childNodes)}(i.target);f.fragment&&f.fragment.l(e),e.forEach(d)}else f.fragment&&f.fragment.c();i.intro&&H(t.$$.fragment),W(t,i.target,i.anchor),D()}w(a)}class Y{$destroy(){M(this,1),this.$destroy=e}$on(e,t){const n=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return n.push(t),()=>{const e=n.indexOf(t);-1!==e&&n.splice(e,1)}}$set(e){var t;this.$$set&&(t=e,0!==Object.keys(t).length)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}}const N=e=>({}),O=e=>({}),V=e=>({}),U=e=>({});function B(e){let t,n,i,s,l,v,w,g,b;const y=e[10].left,z=r(y,e,e[9],U),x=z||function(e){let t;return{c(){t=f("div"),t.textContent="Left Contents goes here...",$(t,"background-color","red")},m(e,n){a(e,t,n)},d(e){e&&d(t)}}}(),P=e[10].right,S=r(P,e,e[9],O),L=S||function(e){let t;return{c(){t=f("div"),t.textContent="Right Contents goes here...",$(t,"background-color","yellow")},m(e,n){a(e,t,n)},d(e){e&&d(t)}}}();return{c(){t=f("div"),n=f("div"),x&&x.c(),i=p(),s=f("div"),l=p(),v=f("div"),L&&L.c(),m(n,"class","left svelte-1lddsds"),m(s,"class","separator svelte-1lddsds"),m(v,"class","right svelte-1lddsds"),m(t,"class","wrapper svelte-1lddsds"),$(t,"--left-panel-size",e[0]),$(t,"--right-panel-size",e[1]),$(t,"--min-left-panel-size",e[2]),$(t,"--min-right-panel-size",e[3])},m(o,r){a(o,t,r),c(t,n),x&&x.m(n,null),e[11](n),c(t,i),c(t,s),e[12](s),c(t,l),c(t,v),L&&L.m(v,null),e[13](v),w=!0,g||(b=[h(s,"mousedown",e[7]),h(s,"touchstart",e[7])],g=!0)},p(e,[n]){z&&z.p&&512&n&&u(z,y,e,e[9],n,V,U),S&&S.p&&512&n&&u(S,P,e,e[9],n,N,O),(!w||1&n)&&$(t,"--left-panel-size",e[0]),(!w||2&n)&&$(t,"--right-panel-size",e[1]),(!w||4&n)&&$(t,"--min-left-panel-size",e[2]),(!w||8&n)&&$(t,"--min-right-panel-size",e[3])},i(e){w||(H(x,e),H(L,e),w=!0)},o(e){A(x,e),A(L,e),w=!1},d(n){n&&d(t),x&&x.d(n),e[11](null),e[12](null),L&&L.d(n),e[13](null),g=!1,o(b)}}}function F(e,t,n){let o,i,{$$slots:s={},$$scope:r}=t,{updateCallback:l=(()=>{})}=t;const u=e=>{if(e.preventDefault(),0===e.button){var t={x:e.clientX-i.e.clientX,y:e.clientY-i.e.clientY};t.x=Math.min(Math.max(t.x,-i.firstWidth),i.secondWidth),n(4,o.style.left=i.offsetLeft+t.x+"px",o),n(5,f.style.width=i.firstWidth+t.x+"px",f),n(6,p.style.width=i.secondWidth-t.x+"px",p),l()}},c=e=>{e&&(e.preventDefault(),0!==e.button)||(l(),window.removeEventListener("mousemove",u),window.removeEventListener("mouseup",c),window.removeEventListener("touchmove",u),window.removeEventListener("touchend",c))};function a(){f&&f.removeAttribute("style"),p&&p.removeAttribute("style"),o&&o.removeAttribute("style")}function d(){c(),a()}let f,p;b((()=>{window.addEventListener("resize",d)})),y((()=>{window.removeEventListener("resize",d)}));let{leftPaneSize:h="50%"}=t,{rightPaneSize:m="50%"}=t,{minLeftPaneSize:$="0"}=t,{minRightPaneSize:v="0"}=t;return e.$$set=e=>{"updateCallback"in e&&n(8,l=e.updateCallback),"leftPaneSize"in e&&n(0,h=e.leftPaneSize),"rightPaneSize"in e&&n(1,m=e.rightPaneSize),"minLeftPaneSize"in e&&n(2,$=e.minLeftPaneSize),"minRightPaneSize"in e&&n(3,v=e.minRightPaneSize),"$$scope"in e&&n(9,r=e.$$scope)},e.$$.update=()=>{1&e.$$.dirty&&h&&a(),2&e.$$.dirty&&m&&a()},[h,m,$,v,o,f,p,e=>{e.preventDefault(),0===e.button&&(i={e:e,offsetLeft:o.offsetLeft,offsetTop:o.offsetTop,firstWidth:f.offsetWidth,secondWidth:p.offsetWidth},window.addEventListener("mousemove",u),window.addEventListener("mouseup",c),window.addEventListener("touchmove",u),window.addEventListener("touchend",c))},l,r,s,function(e){x[e?"unshift":"push"]((()=>{f=e,n(5,f)}))},function(e){x[e?"unshift":"push"]((()=>{o=e,n(4,o)}))},function(e){x[e?"unshift":"push"]((()=>{p=e,n(6,p)}))}]}class G extends Y{constructor(e){super(),X(this,e,F,B,s,{updateCallback:8,leftPaneSize:0,rightPaneSize:1,minLeftPaneSize:2,minRightPaneSize:3})}}const I=e=>({}),J=e=>({}),K=e=>({}),Q=e=>({});function Z(e){let t,n,i,s,l,v,w,g,b;const y=e[10].top,z=r(y,e,e[9],Q),x=z||function(e){let t;return{c(){t=f("div"),t.textContent="Top Contents goes here...",$(t,"background-color","red")},m(e,n){a(e,t,n)},d(e){e&&d(t)}}}(),P=e[10].down,S=r(P,e,e[9],J),L=S||function(e){let t;return{c(){t=f("div"),t.textContent="Down Contents goes here...",$(t,"background-color","yellow")},m(e,n){a(e,t,n)},d(e){e&&d(t)}}}();return{c(){t=f("div"),n=f("div"),x&&x.c(),i=p(),s=f("div"),l=p(),v=f("div"),L&&L.c(),m(n,"class","top svelte-1uzebfl"),m(s,"class","separator svelte-1uzebfl"),m(v,"class","down svelte-1uzebfl"),m(t,"class","wrapper svelte-1uzebfl"),$(t,"--top-panel-size",e[0]),$(t,"--down-panel-size",e[1]),$(t,"--min-top-panel-size",e[2]),$(t,"--min-down-panel-size",e[3])},m(o,r){a(o,t,r),c(t,n),x&&x.m(n,null),e[11](n),c(t,i),c(t,s),e[12](s),c(t,l),c(t,v),L&&L.m(v,null),e[13](v),w=!0,g||(b=[h(s,"mousedown",e[7]),h(s,"touchstart",e[7])],g=!0)},p(e,[n]){z&&z.p&&512&n&&u(z,y,e,e[9],n,K,Q),S&&S.p&&512&n&&u(S,P,e,e[9],n,I,J),(!w||1&n)&&$(t,"--top-panel-size",e[0]),(!w||2&n)&&$(t,"--down-panel-size",e[1]),(!w||4&n)&&$(t,"--min-top-panel-size",e[2]),(!w||8&n)&&$(t,"--min-down-panel-size",e[3])},i(e){w||(H(x,e),H(L,e),w=!0)},o(e){A(x,e),A(L,e),w=!1},d(n){n&&d(t),x&&x.d(n),e[11](null),e[12](null),L&&L.d(n),e[13](null),g=!1,o(b)}}}function ee(e,t,n){let o,i,{$$slots:s={},$$scope:r}=t,{updateCallback:l=(()=>{})}=t;const u=e=>{if(e.preventDefault(),0===e.button){var t={x:e.clientX-i.e.clientX,y:e.clientY-i.e.clientY};t.y=Math.min(Math.max(t.y,-i.firstHeight),i.secondHeight),n(4,o.style.top=i.offsetTop+t.y+"px",o),n(5,f.style.height=i.firstHeight+t.y+"px",f),n(6,p.style.height=i.secondHeight-t.y+"px",p),l()}},c=e=>{e&&(e.preventDefault(),0!==e.button)||(l(),window.removeEventListener("mousemove",u),window.removeEventListener("mouseup",c),window.removeEventListener("touchmove",u),window.removeEventListener("touchend",c))};function a(){f&&f.removeAttribute("style"),p&&p.removeAttribute("style"),o&&o.removeAttribute("style")}function d(){c(),a()}let f,p;b((()=>{window.addEventListener("resize",d)})),y((()=>{window.removeEventListener("resize",d)}));let{topPanelSize:h="50%"}=t,{downPanelSize:m="50%"}=t,{minTopPaneSize:$="0"}=t,{minDownPaneSize:v="0"}=t;return e.$$set=e=>{"updateCallback"in e&&n(8,l=e.updateCallback),"topPanelSize"in e&&n(0,h=e.topPanelSize),"downPanelSize"in e&&n(1,m=e.downPanelSize),"minTopPaneSize"in e&&n(2,$=e.minTopPaneSize),"minDownPaneSize"in e&&n(3,v=e.minDownPaneSize),"$$scope"in e&&n(9,r=e.$$scope)},e.$$.update=()=>{1&e.$$.dirty&&h&&a(),2&e.$$.dirty&&m&&a()},[h,m,$,v,o,f,p,e=>{e.preventDefault(),0===e.button&&(i={e:e,offsetLeft:o.offsetLeft,offsetTop:o.offsetTop,firstHeight:f.offsetHeight,secondHeight:p.offsetHeight},window.addEventListener("mousemove",u),window.addEventListener("mouseup",c),window.addEventListener("touchmove",u),window.addEventListener("touchend",c))},l,r,s,function(e){x[e?"unshift":"push"]((()=>{f=e,n(5,f)}))},function(e){x[e?"unshift":"push"]((()=>{o=e,n(4,o)}))},function(e){x[e?"unshift":"push"]((()=>{p=e,n(6,p)}))}]}class te extends Y{constructor(e){super(),X(this,e,ee,Z,s,{updateCallback:8,topPanelSize:0,downPanelSize:1,minTopPaneSize:2,minDownPaneSize:3})}}function ne(e){let t;return{c(){t=f("left"),t.textContent="Left Pane",m(t,"slot","left"),m(t,"class","svelte-1uhyqbb")},m(e,n){a(e,t,n)},d(e){e&&d(t)}}}function oe(e){let t;return{c(){t=f("right"),t.textContent="Right Pane",m(t,"slot","right"),m(t,"class","svelte-1uhyqbb")},m(e,n){a(e,t,n)},d(e){e&&d(t)}}}function ie(t){let n;return{c(){n=p()},m(e,t){a(e,n,t)},p:e,d(e){e&&d(n)}}}function se(e){let t;return{c(){t=f("top"),t.textContent="Top Pane",m(t,"slot","top"),m(t,"class","svelte-1uhyqbb")},m(e,n){a(e,t,n)},d(e){e&&d(t)}}}function re(e){let t;return{c(){t=f("down"),t.textContent="Down Pane",m(t,"slot","down"),m(t,"class","svelte-1uhyqbb")},m(e,n){a(e,t,n)},d(e){e&&d(t)}}}function le(t){let n;return{c(){n=p()},m(e,t){a(e,n,t)},p:e,d(e){e&&d(n)}}}function ue(e){let t;return{c(){t=f("left"),t.textContent="Left Pane",m(t,"slot","left"),m(t,"class","svelte-1uhyqbb")},m(e,n){a(e,t,n)},d(e){e&&d(t)}}}function ce(e){let t;return{c(){t=f("right"),t.textContent="Right Pane",m(t,"slot","right"),m(t,"class","svelte-1uhyqbb")},m(e,n){a(e,t,n)},d(e){e&&d(t)}}}function ae(t){let n;return{c(){n=p()},m(e,t){a(e,n,t)},p:e,d(e){e&&d(n)}}}function de(e){let t;return{c(){t=f("top"),t.textContent="Top Pane",m(t,"slot","top"),m(t,"class","svelte-1uhyqbb")},m(e,n){a(e,t,n)},d(e){e&&d(t)}}}function fe(e){let t;return{c(){t=f("down"),t.textContent="Down Pane",m(t,"slot","down"),m(t,"class","svelte-1uhyqbb")},m(e,n){a(e,t,n)},d(e){e&&d(t)}}}function pe(t){let n;return{c(){n=p()},m(e,t){a(e,n,t)},p:e,d(e){e&&d(n)}}}function he(e){let t,n,o,i,s,r,l,u,h,$,v,w,g,b,y,z,x,P,S,L,C;return s=new G({props:{updateCallback:e[0],$$slots:{default:[ie],right:[oe],left:[ne]},$$scope:{ctx:e}}}),$=new te({props:{updateCallback:e[1],$$slots:{default:[le],down:[re],top:[se]},$$scope:{ctx:e}}}),y=new G({props:{leftPaneSize:"75%",rightPaneSize:"25%",minLeftPaneSize:"50px",minRightPaneSize:"50px",$$slots:{default:[ae],right:[ce],left:[ue]},$$scope:{ctx:e}}}),L=new te({props:{topPanelSize:"75%",downPanelSize:"25%",minTopPaneSize:"50px",minDownPaneSize:"50px",$$slots:{default:[pe],down:[fe],top:[de]},$$scope:{ctx:e}}}),{c(){t=f("main"),n=f("h1"),n.textContent="H Splite Pane Default",o=p(),i=f("div"),R(s.$$.fragment),r=p(),l=f("h1"),l.textContent="V Splite Pane Default",u=p(),h=f("div"),R($.$$.fragment),v=p(),w=f("h1"),w.textContent='H Splite Pane 75% : 25% with minSize "50px"',g=p(),b=f("div"),R(y.$$.fragment),z=p(),x=f("h1"),x.textContent='V Splite Pane 75% : 25% with minSize "50px"',P=p(),S=f("div"),R(L.$$.fragment),m(i,"class","wrapper svelte-1uhyqbb"),m(h,"class","wrapper svelte-1uhyqbb"),m(b,"class","wrapper svelte-1uhyqbb"),m(S,"class","wrapper svelte-1uhyqbb"),m(t,"class","svelte-1uhyqbb")},m(e,d){a(e,t,d),c(t,n),c(t,o),c(t,i),W(s,i,null),c(t,r),c(t,l),c(t,u),c(t,h),W($,h,null),c(t,v),c(t,w),c(t,g),c(t,b),W(y,b,null),c(t,z),c(t,x),c(t,P),c(t,S),W(L,S,null),C=!0},p(e,[t]){const n={};4&t&&(n.$$scope={dirty:t,ctx:e}),s.$set(n);const o={};4&t&&(o.$$scope={dirty:t,ctx:e}),$.$set(o);const i={};4&t&&(i.$$scope={dirty:t,ctx:e}),y.$set(i);const r={};4&t&&(r.$$scope={dirty:t,ctx:e}),L.$set(r)},i(e){C||(H(s.$$.fragment,e),H($.$$.fragment,e),H(y.$$.fragment,e),H(L.$$.fragment,e),C=!0)},o(e){A(s.$$.fragment,e),A($.$$.fragment,e),A(y.$$.fragment,e),A(L.$$.fragment,e),C=!1},d(e){e&&d(t),M(s),M($),M(y),M(L)}}}function me(e){return[()=>{console.log("HSplitPane Updated!")},()=>{console.log("VSplitPane Updated!")}]}return new class extends Y{constructor(e){super(),X(this,e,me,he,s,{})}}({target:document.body,props:{}})}(); | ||
//# sourceMappingURL=bundle.js.map |
{ | ||
"name": "svelte-split-pane", | ||
"version": "0.1.1", | ||
"version": "0.1.2", | ||
"description": "Split Pane Splitter Both for Horizontal and Vertial written in Svelte", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
253600
2893