├── .gitignore
├── CHANGELOG.md
├── LICENSE
├── README.md
├── demo
├── README.md
├── package-lock.json
├── package.json
├── public
│ ├── bundle.css
│ ├── bundle.js
│ └── index.html
├── src
│ ├── SvelteThing.html
│ └── main.js
└── webpack.config.js
├── index.js
├── package-lock.json
└── package.json
/.gitignore:
--------------------------------------------------------------------------------
1 | .DS_Store
2 | node_modules
--------------------------------------------------------------------------------
/CHANGELOG.md:
--------------------------------------------------------------------------------
1 | # react-svelte changelog
2 |
3 | ## 1.0.2
4 |
5 | * Destroy in `componentWillUnmount`
6 |
7 | ## 1.0.1
8 |
9 | * Remove JSX
10 |
11 | ## 1.0.0
12 |
13 | * First release
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | Copyright (c) 2018 Rich Harris
2 |
3 | Permission is hereby granted by the authors of this software, to any person, to use the software for any purpose, free of charge, including the rights to run, read, copy, change, distribute and sell it, and including usage rights to any patents the authors may hold on it, subject to the following conditions:
4 |
5 | This license, or a link to its text, must be included with all copies of the software and any derivative works.
6 |
7 | Any modification to the software submitted to the authors may be incorporated into the software under the terms of this license.
8 |
9 | The software is provided "as is", without warranty of any kind, including but not limited to the warranties of title, fitness, merchantability and non-infringement. The authors have no obligation to provide support or updates for the software, and may not be held liable for any damages, claims or other liability arising from its use.
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # react-svelte
2 |
3 | Use Svelte components inside React apps.
4 |
5 | ```jsx
6 | import { render } from 'react-dom';
7 | import SvelteComponent from 'react-svelte';
8 | import Widget from './Widget.html';
9 |
10 | function MyReactApp(props) {
11 | return (
12 |
13 |
this is a Svelte component inside a React app:
14 |
15 |
16 | )
17 | }
18 |
19 | render( , document.querySelector('main'));
20 | ```
21 |
22 | Demo [here](https://react-svelte.surge.sh), source code for the demo [here](demo).
23 |
24 |
25 | ## Why not just compile Svelte components to custom elements?
26 |
27 | Because React's support for custom elements is [somewhat lacking](https://custom-elements-everywhere.com/).
28 |
29 |
30 | ## Limitations
31 |
32 | This is a fairly basic integration, some things don't currently work and possibly never will:
33 |
34 | * the value of `this` is fixed; changing it after the initial render will have no effect
35 | * you can't use ``
36 |
37 |
38 | ## License
39 |
40 | [LIL](LICENSE)
--------------------------------------------------------------------------------
/demo/README.md:
--------------------------------------------------------------------------------
1 | # svelte app
2 |
3 | This is a project template for [Svelte](https://svelte.technology) apps. It lives at https://github.com/sveltejs/template-webpack.
4 |
5 | To create a new project based on this template using [degit](https://github.com/Rich-Harris/degit):
6 |
7 | ```bash
8 | npm install -g degit # you only need to do this once
9 |
10 | degit sveltejs/template-webpack svelte-app
11 | cd svelte-app
12 | ```
13 |
14 | *Note that you will need to have [Node.js](https://nodejs.org) installed.*
15 |
16 |
17 | ## Get started
18 |
19 | Install the dependencies...
20 |
21 | ```bash
22 | cd svelte-app
23 | npm install
24 | ```
25 |
26 | ...then start webpack:
27 |
28 | ```bash
29 | npm run dev
30 | ```
31 |
32 | Navigate to [localhost:8080](http://localhost:8080). You should see your app running. Edit a component file in `src`, save it, and the page should reload with your changes.
33 |
34 |
35 | ## Deploying to the web
36 |
37 | ### With [now](https://zeit.co/now)
38 |
39 | Install `now` if you haven't already:
40 |
41 | ```bash
42 | npm install -g now
43 | ```
44 |
45 | Then, from within your project folder:
46 |
47 | ```bash
48 | now
49 | ```
50 |
51 | As an alternative, use the [Now desktop client](https://zeit.co/download) and simply drag the unzipped project folder to the taskbar icon.
52 |
53 | ### With [surge](https://surge.sh/)
54 |
55 | Install `surge` if you haven't already:
56 |
57 | ```bash
58 | npm install -g surge
59 | ```
60 |
61 | Then, from within your project folder:
62 |
63 | ```bash
64 | npm run build
65 | surge public
66 | ```
67 |
--------------------------------------------------------------------------------
/demo/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "svelte-app",
3 | "version": "1.0.0",
4 | "devDependencies": {
5 | "buble": "^0.19.3",
6 | "buble-loader": "^0.5.1",
7 | "cross-env": "^5.1.5",
8 | "css-loader": "^0.28.11",
9 | "mini-css-extract-plugin": "^0.4.0",
10 | "serve": "^6.5.5",
11 | "style-loader": "^0.21.0",
12 | "svelte": "^2.0.0",
13 | "svelte-loader": "2.9.0",
14 | "webpack": "^4.8.3",
15 | "webpack-cli": "^2.0.14",
16 | "webpack-serve": "^1.0.2"
17 | },
18 | "scripts": {
19 | "build": "cross-env NODE_ENV=production webpack",
20 | "dev": "webpack-serve --content public --hot"
21 | },
22 | "dependencies": {
23 | "react": "^16.4.2",
24 | "react-dom": "^16.4.2",
25 | "react-svelte": "^1.0.1"
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/demo/public/bundle.css:
--------------------------------------------------------------------------------
1 | h1.svelte-i7qo5m{color:purple}
2 |
--------------------------------------------------------------------------------
/demo/public/bundle.js:
--------------------------------------------------------------------------------
1 | !function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=6)}([function(e,t,n){"use strict";e.exports=n(7)},function(e,t,n){"use strict";
2 | /*
3 | object-assign
4 | (c) Sindre Sorhus
5 | @license MIT
6 | */var r=Object.getOwnPropertySymbols,o=Object.prototype.hasOwnProperty,a=Object.prototype.propertyIsEnumerable;e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map(function(e){return t[e]}).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach(function(e){r[e]=e}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(e,t){for(var n,i,l=function(e){if(null===e||void 0===e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(e),u=1;uO.length&&O.push(e)}function U(e,t,n,r){var o=typeof e;"undefined"!==o&&"boolean"!==o||(e=null);var a=!1;if(null===e)a=!0;else switch(o){case"string":case"number":a=!0;break;case"object":switch(e.$$typeof){case u:case c:a=!0}}if(a)return n(r,e,""===t?"."+F(e,0):t),1;if(a=0,t=""===t?".":t+":",Array.isArray(e))for(var i=0;ithis.eventPool.length&&this.eventPool.push(e)}function xe(e){e.eventPool=[],e.getPooled=we,e.release=_e}i(ke.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():"unknown"!=typeof e.returnValue&&(e.returnValue=!1),this.isDefaultPrevented=l.thatReturnsTrue)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!=typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=l.thatReturnsTrue)},persist:function(){this.isPersistent=l.thatReturnsTrue},isPersistent:l.thatReturnsFalse,destructor:function(){var e,t=this.constructor.Interface;for(e in t)this[e]=null;for(t=0;t=Pe),Re=String.fromCharCode(32),Me={beforeInput:{phasedRegistrationNames:{bubbled:"onBeforeInput",captured:"onBeforeInputCapture"},dependencies:["compositionend","keypress","textInput","paste"]},compositionEnd:{phasedRegistrationNames:{bubbled:"onCompositionEnd",captured:"onCompositionEndCapture"},dependencies:"blur compositionend keydown keypress keyup mousedown".split(" ")},compositionStart:{phasedRegistrationNames:{bubbled:"onCompositionStart",captured:"onCompositionStartCapture"},dependencies:"blur compositionstart keydown keypress keyup mousedown".split(" ")},compositionUpdate:{phasedRegistrationNames:{bubbled:"onCompositionUpdate",captured:"onCompositionUpdateCapture"},dependencies:"blur compositionupdate keydown keypress keyup mousedown".split(" ")}},Ue=!1;function Fe(e,t){switch(e){case"keyup":return-1!==Te.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"blur":return!0;default:return!1}}function Ie(e){return"object"==typeof(e=e.detail)&&"data"in e?e.data:null}var De=!1;var ze={eventTypes:Me,extractEvents:function(e,t,n,r){var o=void 0,a=void 0;if(Se)e:{switch(e){case"compositionstart":o=Me.compositionStart;break e;case"compositionend":o=Me.compositionEnd;break e;case"compositionupdate":o=Me.compositionUpdate;break e}o=void 0}else De?Fe(e,n)&&(o=Me.compositionEnd):"keydown"===e&&229===n.keyCode&&(o=Me.compositionStart);return o?(Oe&&(De||o!==Me.compositionStart?o===Me.compositionEnd&&De&&(a=ve()):(me._root=r,me._startText=ge(),De=!0)),o=Ce.getPooled(o,t,n,r),a?o.data=a:null!==(a=Ie(n))&&(o.data=a),ee(o),a=o):a=null,(e=Ne?function(e,t){switch(e){case"compositionend":return Ie(t);case"keypress":return 32!==t.which?null:(Ue=!0,Re);case"textInput":return(e=t.data)===Re&&Ue?null:e;default:return null}}(e,n):function(e,t){if(De)return"compositionend"===e||!Se&&Fe(e,t)?(e=ve(),me._root=null,me._startText=null,me._fallbackText=null,De=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1t}return!1}(t,n,o,r)&&(n=null),r||null===o?function(e){return!!_t.call(Ct,e)||!_t.call(xt,e)&&(wt.test(e)?Ct[e]=!0:(xt[e]=!0,!1))}(t)&&(null===n?e.removeAttribute(t):e.setAttribute(t,""+n)):o.mustUseProperty?e[o.propertyName]=null===n?3!==o.type&&"":n:(t=o.attributeName,r=o.attributeNamespace,null===n?e.removeAttribute(t):(n=3===(o=o.type)||4===o&&!0===n?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}function Ot(e,t){var n=t.checked;return i({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=n?n:e._wrapperState.initialChecked})}function Rt(e,t){var n=null==t.defaultValue?"":t.defaultValue,r=null!=t.checked?t.checked:t.defaultChecked;n=Dt(null!=t.value?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:"checkbox"===t.type||"radio"===t.type?null!=t.checked:null!=t.value}}function Mt(e,t){null!=(t=t.checked)&&Nt(e,"checked",t,!1)}function Ut(e,t){Mt(e,t);var n=Dt(t.value);null!=n&&("number"===t.type?(0===n&&""===e.value||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n)),t.hasOwnProperty("value")?It(e,t.type,n):t.hasOwnProperty("defaultValue")&&It(e,t.type,Dt(t.defaultValue)),null==t.checked&&null!=t.defaultChecked&&(e.defaultChecked=!!t.defaultChecked)}function Ft(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){t=""+e._wrapperState.initialValue;var r=e.value;n||t===r||(e.value=t),e.defaultValue=t}""!==(n=e.name)&&(e.name=""),e.defaultChecked=!e.defaultChecked,e.defaultChecked=!e.defaultChecked,""!==n&&(e.name=n)}function It(e,t,n){"number"===t&&e.ownerDocument.activeElement===e||(null==n?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}function Dt(e){switch(typeof e){case"boolean":case"number":case"object":case"string":case"undefined":return e;default:return""}}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(St,Pt);Tt[t]=new Et(t,1,!1,e,null)}),"xlink:actuate xlink:arcrole xlink:href xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(St,Pt);Tt[t]=new Et(t,1,!1,e,"http://www.w3.org/1999/xlink")}),["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(St,Pt);Tt[t]=new Et(t,1,!1,e,"http://www.w3.org/XML/1998/namespace")}),Tt.tabIndex=new Et("tabIndex",1,!1,"tabindex",null);var zt={change:{phasedRegistrationNames:{bubbled:"onChange",captured:"onChangeCapture"},dependencies:"blur change click focus input keydown keyup selectionchange".split(" ")}};function Lt(e,t,n){return(e=ke.getPooled(zt.change,e,t,n)).type="change",We(n),ee(e),e}var At=null,jt=null;function Vt(e){z(e,!1)}function Bt(e){if(ot(H(e)))return e}function Wt(e,t){if("change"===e)return t}var Ht=!1;function $t(){At&&(At.detachEvent("onpropertychange",Qt),jt=At=null)}function Qt(e){"value"===e.propertyName&&Bt(jt)&&Xe(Vt,e=Lt(jt,e,et(e)))}function Kt(e,t,n){"focus"===e?($t(),jt=n,(At=t).attachEvent("onpropertychange",Qt)):"blur"===e&&$t()}function qt(e){if("selectionchange"===e||"keyup"===e||"keydown"===e)return Bt(jt)}function Gt(e,t){if("click"===e)return Bt(t)}function Yt(e,t){if("input"===e||"change"===e)return Bt(t)}a.canUseDOM&&(Ht=tt("input")&&(!document.documentMode||9Pn.length&&Pn.push(e)}}}var Dn={get _enabled(){return On},setEnabled:Rn,isEnabled:function(){return On},trapBubbledEvent:Mn,trapCapturedEvent:Un,dispatchEvent:In},zn={},Ln=0,An="_reactListenersID"+(""+Math.random()).slice(2);function jn(e){return Object.prototype.hasOwnProperty.call(e,An)||(e[An]=Ln++,zn[e[An]]={}),zn[e[An]]}function Vn(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Bn(e,t){var n,r=Vn(e);for(e=0;r;){if(3===r.nodeType){if(n=e+r.textContent.length,e<=t&&n>=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=Vn(r)}}function Wn(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&("text"===e.type||"search"===e.type||"tel"===e.type||"url"===e.type||"password"===e.type)||"textarea"===t||"true"===e.contentEditable)}var Hn=a.canUseDOM&&"documentMode"in document&&11>=document.documentMode,$n={select:{phasedRegistrationNames:{bubbled:"onSelect",captured:"onSelectCapture"},dependencies:"blur contextmenu focus keydown keyup mousedown mouseup selectionchange".split(" ")}},Qn=null,Kn=null,qn=null,Gn=!1;function Yn(e,t){if(Gn||null==Qn||Qn!==u())return null;var n=Qn;return"selectionStart"in n&&Wn(n)?n={start:n.selectionStart,end:n.selectionEnd}:window.getSelection?n={anchorNode:(n=window.getSelection()).anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset}:n=void 0,qn&&c(qn,n)?null:(qn=n,(e=ke.getPooled($n.select,Kn,e,t)).type="select",e.target=Qn,ee(e),e)}var Xn={eventTypes:$n,extractEvents:function(e,t,n,r){var o,a=r.window===r?r.document:9===r.nodeType?r:r.ownerDocument;if(!(o=!a)){e:{a=jn(a),o=w.onSelect;for(var i=0;it)){e=-1;for(var n=[],r=lr;null!==r;){var o=r.timeoutTime;-1!==o&&o<=t?n.push(r):-1!==o&&(-1===e||ot&&(t=8),hr=t=t.length||d("93"),t=t[0]),n=""+t),null==n&&(n="")),e._wrapperState={initialValue:""+n}}function Er(e,t){var n=t.value;null!=n&&((n=""+n)!==e.value&&(e.value=n),null==t.defaultValue&&(e.defaultValue=n)),null!=t.defaultValue&&(e.defaultValue=t.defaultValue)}function Tr(e){var t=e.textContent;t===e._wrapperState.initialValue&&(e.value=t)}var Sr={html:"http://www.w3.org/1999/xhtml",mathml:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg"};function Pr(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function Nr(e,t){return null==e||"http://www.w3.org/1999/xhtml"===e?Pr(t):"http://www.w3.org/2000/svg"===e&&"foreignObject"===t?"http://www.w3.org/1999/xhtml":e}var Or=void 0,Rr=function(e){return"undefined"!=typeof MSApp&&MSApp.execUnsafeLocalFunction?function(t,n,r,o){MSApp.execUnsafeLocalFunction(function(){return e(t,n)})}:e}(function(e,t){if(e.namespaceURI!==Sr.svg||"innerHTML"in e)e.innerHTML=t;else{for((Or=Or||document.createElement("div")).innerHTML=""+t+" ",t=Or.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Mr(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&3===n.nodeType)return void(n.nodeValue=t)}e.textContent=t}var Ur={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Fr=["Webkit","ms","Moz","O"];function Ir(e,t){for(var n in e=e.style,t)if(t.hasOwnProperty(n)){var r=0===n.indexOf("--"),o=n,a=t[n];o=null==a||"boolean"==typeof a||""===a?"":r||"number"!=typeof a||0===a||Ur.hasOwnProperty(o)&&Ur[o]?(""+a).trim():a+"px","float"===n&&(n="cssFloat"),r?e.setProperty(n,o):e[n]=o}}Object.keys(Ur).forEach(function(e){Fr.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Ur[t]=Ur[e]})});var Dr=i({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function zr(e,t,n){t&&(Dr[e]&&(null!=t.children||null!=t.dangerouslySetInnerHTML)&&d("137",e,n()),null!=t.dangerouslySetInnerHTML&&(null!=t.children&&d("60"),"object"==typeof t.dangerouslySetInnerHTML&&"__html"in t.dangerouslySetInnerHTML||d("61")),null!=t.style&&"object"!=typeof t.style&&d("62",n()))}function Lr(e,t){if(-1===e.indexOf("-"))return"string"==typeof t.is;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Ar=l.thatReturns("");function jr(e,t){var n=jn(e=9===e.nodeType||11===e.nodeType?e:e.ownerDocument);t=w[t];for(var r=0;r<\/script>",e=e.removeChild(e.firstChild)):e="string"==typeof t.is?n.createElement(e,{is:t.is}):n.createElement(e):e=n.createElementNS(r,e),e}function Br(e,t){return(9===t.nodeType?t:t.ownerDocument).createTextNode(e)}function Wr(e,t,n,r){var o=Lr(t,n);switch(t){case"iframe":case"object":Mn("load",e);var a=n;break;case"video":case"audio":for(a=0;aao||(e.current=oo[ao],oo[ao]=null,ao--)}function uo(e,t){oo[++ao]=e.current,e.current=t}var co=io(f),so=io(!1),fo=f;function po(e){return mo(e)?fo:co.current}function ho(e,t){var n=e.type.contextTypes;if(!n)return f;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var o,a={};for(o in n)a[o]=t[o];return r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=a),a}function mo(e){return 2===e.tag&&null!=e.type.childContextTypes}function vo(e){mo(e)&&(lo(so),lo(co))}function go(e){lo(so),lo(co)}function yo(e,t,n){co.current!==f&&d("168"),uo(co,t),uo(so,n)}function bo(e,t){var n=e.stateNode,r=e.type.childContextTypes;if("function"!=typeof n.getChildContext)return t;for(var o in n=n.getChildContext())o in r||d("108",bt(e)||"Unknown",o);return i({},t,n)}function ko(e){if(!mo(e))return!1;var t=e.stateNode;return t=t&&t.__reactInternalMemoizedMergedChildContext||f,fo=co.current,uo(co,t),uo(so,so.current),!0}function wo(e,t){var n=e.stateNode;if(n||d("169"),t){var r=bo(e,fo);n.__reactInternalMemoizedMergedChildContext=r,lo(so),lo(co),uo(co,r)}else lo(so);uo(so,t)}function _o(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=null,this.index=0,this.ref=null,this.pendingProps=t,this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.effectTag=0,this.lastEffect=this.firstEffect=this.nextEffect=null,this.expirationTime=0,this.alternate=null}function xo(e,t,n){var r=e.alternate;return null===r?((r=new _o(e.tag,t,e.key,e.mode)).type=e.type,r.stateNode=e.stateNode,r.alternate=e,e.alternate=r):(r.pendingProps=t,r.effectTag=0,r.nextEffect=null,r.firstEffect=null,r.lastEffect=null),r.expirationTime=n,r.child=e.child,r.memoizedProps=e.memoizedProps,r.memoizedState=e.memoizedState,r.updateQueue=e.updateQueue,r.sibling=e.sibling,r.index=e.index,r.ref=e.ref,r}function Co(e,t,n){var r=e.type,o=e.key;if(e=e.props,"function"==typeof r)var a=r.prototype&&r.prototype.isReactComponent?2:0;else if("string"==typeof r)a=5;else switch(r){case ct:return Eo(e.children,t,n,o);case ht:a=11,t|=3;break;case st:a=11,t|=2;break;case ft:return(r=new _o(15,e,o,4|t)).type=ft,r.expirationTime=n,r;case vt:a=16,t|=2;break;default:e:{switch("object"==typeof r&&null!==r?r.$$typeof:null){case dt:a=13;break e;case pt:a=12;break e;case mt:a=14;break e;default:d("130",null==r?r:typeof r,"")}a=void 0}}return(t=new _o(a,e,o,t)).type=r,t.expirationTime=n,t}function Eo(e,t,n,r){return(e=new _o(10,e,r,t)).expirationTime=n,e}function To(e,t,n){return(e=new _o(6,e,null,t)).expirationTime=n,e}function So(e,t,n){return(t=new _o(4,null!==e.children?e.children:[],e.key,t)).expirationTime=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Po(e,t,n){return e={current:t=new _o(3,null,null,t?3:0),containerInfo:e,pendingChildren:null,earliestPendingTime:0,latestPendingTime:0,earliestSuspendedTime:0,latestSuspendedTime:0,latestPingedTime:0,pendingCommitExpirationTime:0,finishedWork:null,context:null,pendingContext:null,hydrate:n,remainingExpirationTime:0,firstBatch:null,nextScheduledRoot:null},t.stateNode=e}var No=null,Oo=null;function Ro(e){return function(t){try{return e(t)}catch(e){}}}function Mo(e){"function"==typeof No&&No(e)}function Uo(e){"function"==typeof Oo&&Oo(e)}var Fo=!1;function Io(e){return{expirationTime:0,baseState:e,firstUpdate:null,lastUpdate:null,firstCapturedUpdate:null,lastCapturedUpdate:null,firstEffect:null,lastEffect:null,firstCapturedEffect:null,lastCapturedEffect:null}}function Do(e){return{expirationTime:e.expirationTime,baseState:e.baseState,firstUpdate:e.firstUpdate,lastUpdate:e.lastUpdate,firstCapturedUpdate:null,lastCapturedUpdate:null,firstEffect:null,lastEffect:null,firstCapturedEffect:null,lastCapturedEffect:null}}function zo(e){return{expirationTime:e,tag:0,payload:null,callback:null,next:null,nextEffect:null}}function Lo(e,t,n){null===e.lastUpdate?e.firstUpdate=e.lastUpdate=t:(e.lastUpdate.next=t,e.lastUpdate=t),(0===e.expirationTime||e.expirationTime>n)&&(e.expirationTime=n)}function Ao(e,t,n){var r=e.alternate;if(null===r){var o=e.updateQueue,a=null;null===o&&(o=e.updateQueue=Io(e.memoizedState))}else o=e.updateQueue,a=r.updateQueue,null===o?null===a?(o=e.updateQueue=Io(e.memoizedState),a=r.updateQueue=Io(r.memoizedState)):o=e.updateQueue=Do(a):null===a&&(a=r.updateQueue=Do(o));null===a||o===a?Lo(o,t,n):null===o.lastUpdate||null===a.lastUpdate?(Lo(o,t,n),Lo(a,t,n)):(Lo(o,t,n),a.lastUpdate=t)}function jo(e,t,n){var r=e.updateQueue;null===(r=null===r?e.updateQueue=Io(e.memoizedState):Vo(e,r)).lastCapturedUpdate?r.firstCapturedUpdate=r.lastCapturedUpdate=t:(r.lastCapturedUpdate.next=t,r.lastCapturedUpdate=t),(0===r.expirationTime||r.expirationTime>n)&&(r.expirationTime=n)}function Vo(e,t){var n=e.alternate;return null!==n&&t===n.updateQueue&&(t=e.updateQueue=Do(t)),t}function Bo(e,t,n,r,o,a){switch(n.tag){case 1:return"function"==typeof(e=n.payload)?e.call(a,r,o):e;case 3:e.effectTag=-1025&e.effectTag|64;case 0:if(null===(o="function"==typeof(e=n.payload)?e.call(a,r,o):e)||void 0===o)break;return i({},r,o);case 2:Fo=!0}return r}function Wo(e,t,n,r,o){if(Fo=!1,!(0===t.expirationTime||t.expirationTime>o)){for(var a=(t=Vo(e,t)).baseState,i=null,l=0,u=t.firstUpdate,c=a;null!==u;){var s=u.expirationTime;s>o?(null===i&&(i=u,a=c),(0===l||l>s)&&(l=s)):(c=Bo(e,0,u,c,n,r),null!==u.callback&&(e.effectTag|=32,u.nextEffect=null,null===t.lastEffect?t.firstEffect=t.lastEffect=u:(t.lastEffect.nextEffect=u,t.lastEffect=u))),u=u.next}for(s=null,u=t.firstCapturedUpdate;null!==u;){var f=u.expirationTime;f>o?(null===s&&(s=u,null===i&&(a=c)),(0===l||l>f)&&(l=f)):(c=Bo(e,0,u,c,n,r),null!==u.callback&&(e.effectTag|=32,u.nextEffect=null,null===t.lastCapturedEffect?t.firstCapturedEffect=t.lastCapturedEffect=u:(t.lastCapturedEffect.nextEffect=u,t.lastCapturedEffect=u))),u=u.next}null===i&&(t.lastUpdate=null),null===s?t.lastCapturedUpdate=null:e.effectTag|=32,null===i&&null===s&&(a=c),t.baseState=a,t.firstUpdate=i,t.firstCapturedUpdate=s,t.expirationTime=l,e.memoizedState=c}}function Ho(e,t){"function"!=typeof e&&d("191",e),e.call(t)}function $o(e,t,n){for(null!==t.firstCapturedUpdate&&(null!==t.lastUpdate&&(t.lastUpdate.next=t.firstCapturedUpdate,t.lastUpdate=t.lastCapturedUpdate),t.firstCapturedUpdate=t.lastCapturedUpdate=null),e=t.firstEffect,t.firstEffect=t.lastEffect=null;null!==e;){var r=e.callback;null!==r&&(e.callback=null,Ho(r,n)),e=e.nextEffect}for(e=t.firstCapturedEffect,t.firstCapturedEffect=t.lastCapturedEffect=null;null!==e;)null!==(t=e.callback)&&(e.callback=null,Ho(t,n)),e=e.nextEffect}function Qo(e,t){return{value:e,source:t,stack:kt(t)}}var Ko=io(null),qo=io(null),Go=io(0);function Yo(e){var t=e.type._context;uo(Go,t._changedBits),uo(qo,t._currentValue),uo(Ko,e),t._currentValue=e.pendingProps.value,t._changedBits=e.stateNode}function Xo(e){var t=Go.current,n=qo.current;lo(Ko),lo(qo),lo(Go),(e=e.type._context)._currentValue=n,e._changedBits=t}var Zo={},Jo=io(Zo),ea=io(Zo),ta=io(Zo);function na(e){return e===Zo&&d("174"),e}function ra(e,t){uo(ta,t),uo(ea,e),uo(Jo,Zo);var n=t.nodeType;switch(n){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Nr(null,"");break;default:t=Nr(t=(n=8===n?t.parentNode:t).namespaceURI||null,n=n.tagName)}lo(Jo),uo(Jo,t)}function oa(e){lo(Jo),lo(ea),lo(ta)}function aa(e){ea.current===e&&(lo(Jo),lo(ea))}function ia(e,t,n){var r=e.memoizedState;r=null===(t=t(n,r))||void 0===t?r:i({},r,t),e.memoizedState=r,null!==(e=e.updateQueue)&&0===e.expirationTime&&(e.baseState=r)}var la={isMounted:function(e){return!!(e=e._reactInternalFiber)&&2===ln(e)},enqueueSetState:function(e,t,n){e=e._reactInternalFiber;var r=bi(),o=zo(r=gi(r,e));o.payload=t,void 0!==n&&null!==n&&(o.callback=n),Ao(e,o,r),yi(e,r)},enqueueReplaceState:function(e,t,n){e=e._reactInternalFiber;var r=bi(),o=zo(r=gi(r,e));o.tag=1,o.payload=t,void 0!==n&&null!==n&&(o.callback=n),Ao(e,o,r),yi(e,r)},enqueueForceUpdate:function(e,t){e=e._reactInternalFiber;var n=bi(),r=zo(n=gi(n,e));r.tag=2,void 0!==t&&null!==t&&(r.callback=t),Ao(e,r,n),yi(e,n)}};function ua(e,t,n,r,o,a){var i=e.stateNode;return e=e.type,"function"==typeof i.shouldComponentUpdate?i.shouldComponentUpdate(n,o,a):!e.prototype||!e.prototype.isPureReactComponent||(!c(t,n)||!c(r,o))}function ca(e,t,n,r){e=t.state,"function"==typeof t.componentWillReceiveProps&&t.componentWillReceiveProps(n,r),"function"==typeof t.UNSAFE_componentWillReceiveProps&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&la.enqueueReplaceState(t,t.state,null)}function sa(e,t){var n=e.type,r=e.stateNode,o=e.pendingProps,a=po(e);r.props=o,r.state=e.memoizedState,r.refs=f,r.context=ho(e,a),null!==(a=e.updateQueue)&&(Wo(e,a,o,r,t),r.state=e.memoizedState),"function"==typeof(a=e.type.getDerivedStateFromProps)&&(ia(e,a,o),r.state=e.memoizedState),"function"==typeof n.getDerivedStateFromProps||"function"==typeof r.getSnapshotBeforeUpdate||"function"!=typeof r.UNSAFE_componentWillMount&&"function"!=typeof r.componentWillMount||(n=r.state,"function"==typeof r.componentWillMount&&r.componentWillMount(),"function"==typeof r.UNSAFE_componentWillMount&&r.UNSAFE_componentWillMount(),n!==r.state&&la.enqueueReplaceState(r,r.state,null),null!==(a=e.updateQueue)&&(Wo(e,a,o,r,t),r.state=e.memoizedState)),"function"==typeof r.componentDidMount&&(e.effectTag|=4)}var fa=Array.isArray;function da(e,t,n){if(null!==(e=n.ref)&&"function"!=typeof e&&"object"!=typeof e){if(n._owner){var r=void 0;(n=n._owner)&&(2!==n.tag&&d("110"),r=n.stateNode),r||d("147",e);var o=""+e;return null!==t&&null!==t.ref&&"function"==typeof t.ref&&t.ref._stringRef===o?t.ref:((t=function(e){var t=r.refs===f?r.refs={}:r.refs;null===e?delete t[o]:t[o]=e})._stringRef=o,t)}"string"!=typeof e&&d("148"),n._owner||d("254",e)}return e}function pa(e,t){"textarea"!==e.type&&d("31","[object Object]"===Object.prototype.toString.call(t)?"object with keys {"+Object.keys(t).join(", ")+"}":t,"")}function ha(e){function t(t,n){if(e){var r=t.lastEffect;null!==r?(r.nextEffect=n,t.lastEffect=n):t.firstEffect=t.lastEffect=n,n.nextEffect=null,n.effectTag=8}}function n(n,r){if(!e)return null;for(;null!==r;)t(n,r),r=r.sibling;return null}function r(e,t){for(e=new Map;null!==t;)null!==t.key?e.set(t.key,t):e.set(t.index,t),t=t.sibling;return e}function o(e,t,n){return(e=xo(e,t,n)).index=0,e.sibling=null,e}function a(t,n,r){return t.index=r,e?null!==(r=t.alternate)?(r=r.index)m?(v=d,d=null):v=d.sibling;var g=p(o,d,l[m],u);if(null===g){null===d&&(d=v);break}e&&d&&null===g.alternate&&t(o,d),i=a(g,i,m),null===s?c=g:s.sibling=g,s=g,d=v}if(m===l.length)return n(o,d),c;if(null===d){for(;mv?(g=m,m=null):g=m.sibling;var b=p(o,m,y.value,u);if(null===b){m||(m=g);break}e&&m&&null===b.alternate&&t(o,m),i=a(b,i,v),null===s?c=b:s.sibling=b,s=b,m=g}if(y.done)return n(o,m),c;if(null===m){for(;!y.done;v++,y=l.next())null!==(y=f(o,y.value,u))&&(i=a(y,i,v),null===s?c=y:s.sibling=y,s=y);return c}for(m=r(o,m);!y.done;v++,y=l.next())null!==(y=h(m,o,v,y.value,u))&&(e&&null!==y.alternate&&m.delete(null===y.key?v:y.key),i=a(y,i,v),null===s?c=y:s.sibling=y,s=y);return e&&m.forEach(function(e){return t(o,e)}),c}return function(e,r,a,l){var u="object"==typeof a&&null!==a&&a.type===ct&&null===a.key;u&&(a=a.props.children);var c="object"==typeof a&&null!==a;if(c)switch(a.$$typeof){case lt:e:{for(c=a.key,u=r;null!==u;){if(u.key===c){if(10===u.tag?a.type===ct:u.type===a.type){n(e,u.sibling),(r=o(u,a.type===ct?a.props.children:a.props,l)).ref=da(e,u,a),r.return=e,e=r;break e}n(e,u);break}t(e,u),u=u.sibling}a.type===ct?((r=Eo(a.props.children,e.mode,l,a.key)).return=e,e=r):((l=Co(a,e.mode,l)).ref=da(e,r,a),l.return=e,e=l)}return i(e);case ut:e:{for(u=a.key;null!==r;){if(r.key===u){if(4===r.tag&&r.stateNode.containerInfo===a.containerInfo&&r.stateNode.implementation===a.implementation){n(e,r.sibling),(r=o(r,a.children||[],l)).return=e,e=r;break e}n(e,r);break}t(e,r),r=r.sibling}(r=So(a,e.mode,l)).return=e,e=r}return i(e)}if("string"==typeof a||"number"==typeof a)return a=""+a,null!==r&&6===r.tag?(n(e,r.sibling),(r=o(r,a,l)).return=e,e=r):(n(e,r),(r=To(a,e.mode,l)).return=e,e=r),i(e);if(fa(a))return m(e,r,a,l);if(yt(a))return v(e,r,a,l);if(c&&pa(e,a),void 0===a&&!u)switch(e.tag){case 2:case 1:d("152",(l=e.type).displayName||l.name||"Component")}return n(e,r)}}var ma=ha(!0),va=ha(!1),ga=null,ya=null,ba=!1;function ka(e,t){var n=new _o(5,null,null,0);n.type="DELETED",n.stateNode=t,n.return=e,n.effectTag=8,null!==e.lastEffect?(e.lastEffect.nextEffect=n,e.lastEffect=n):e.firstEffect=e.lastEffect=n}function wa(e,t){switch(e.tag){case 5:var n=e.type;return null!==(t=1!==t.nodeType||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t)&&(e.stateNode=t,!0);case 6:return null!==(t=""===e.pendingProps||3!==t.nodeType?null:t)&&(e.stateNode=t,!0);default:return!1}}function _a(e){if(ba){var t=ya;if(t){var n=t;if(!wa(e,t)){if(!(t=no(n))||!wa(e,t))return e.effectTag|=2,ba=!1,void(ga=e);ka(ga,n)}ga=e,ya=ro(t)}else e.effectTag|=2,ba=!1,ga=e}}function xa(e){for(e=e.return;null!==e&&5!==e.tag&&3!==e.tag;)e=e.return;ga=e}function Ca(e){if(e!==ga)return!1;if(!ba)return xa(e),ba=!0,!1;var t=e.type;if(5!==e.tag||"head"!==t&&"body"!==t&&!Zr(t,e.memoizedProps))for(t=ya;t;)ka(e,t),t=no(t);return xa(e),ya=ga?no(e.stateNode):null,!0}function Ea(){ya=ga=null,ba=!1}function Ta(e,t,n){Sa(e,t,n,t.expirationTime)}function Sa(e,t,n,r){t.child=null===e?va(t,null,n,r):ma(t,e.child,n,r)}function Pa(e,t){var n=t.ref;(null===e&&null!==n||null!==e&&e.ref!==n)&&(t.effectTag|=128)}function Na(e,t,n,r,o){Pa(e,t);var a=0!=(64&t.effectTag);if(!n&&!a)return r&&wo(t,!1),Ma(e,t);n=t.stateNode,at.current=t;var i=a?null:n.render();return t.effectTag|=1,a&&(Sa(e,t,null,o),t.child=null),Sa(e,t,i,o),t.memoizedState=n.state,t.memoizedProps=n.props,r&&wo(t,!0),t.child}function Oa(e){var t=e.stateNode;t.pendingContext?yo(0,t.pendingContext,t.pendingContext!==t.context):t.context&&yo(0,t.context,!1),ra(e,t.containerInfo)}function Ra(e,t,n,r){var o=e.child;for(null!==o&&(o.return=e);null!==o;){switch(o.tag){case 12:var a=0|o.stateNode;if(o.type===t&&0!=(a&n)){for(a=o;null!==a;){var i=a.alternate;if(0===a.expirationTime||a.expirationTime>r)a.expirationTime=r,null!==i&&(0===i.expirationTime||i.expirationTime>r)&&(i.expirationTime=r);else{if(null===i||!(0===i.expirationTime||i.expirationTime>r))break;i.expirationTime=r}a=a.return}a=null}else a=o.child;break;case 13:a=o.type===e.type?null:o.child;break;default:a=o.child}if(null!==a)a.return=o;else for(a=o;null!==a;){if(a===e){a=null;break}if(null!==(o=a.sibling)){o.return=a.return,a=o;break}a=a.return}o=a}}function Ma(e,t){if(null!==e&&t.child!==e.child&&d("153"),null!==t.child){var n=xo(e=t.child,e.pendingProps,e.expirationTime);for(t.child=n,n.return=t;null!==e.sibling;)e=e.sibling,(n=n.sibling=xo(e,e.pendingProps,e.expirationTime)).return=t;n.sibling=null}return t.child}function Ua(e,t,n){if(0===t.expirationTime||t.expirationTime>n){switch(t.tag){case 3:Oa(t);break;case 2:ko(t);break;case 4:ra(t,t.stateNode.containerInfo);break;case 13:Yo(t)}return null}switch(t.tag){case 0:null!==e&&d("155");var r=t.type,o=t.pendingProps,a=po(t);return r=r(o,a=ho(t,a)),t.effectTag|=1,"object"==typeof r&&null!==r&&"function"==typeof r.render&&void 0===r.$$typeof?(a=t.type,t.tag=2,t.memoizedState=null!==r.state&&void 0!==r.state?r.state:null,"function"==typeof(a=a.getDerivedStateFromProps)&&ia(t,a,o),o=ko(t),r.updater=la,t.stateNode=r,r._reactInternalFiber=t,sa(t,n),e=Na(e,t,!0,o,n)):(t.tag=1,Ta(e,t,r),t.memoizedProps=o,e=t.child),e;case 1:return o=t.type,n=t.pendingProps,so.current||t.memoizedProps!==n?(o=o(n,r=ho(t,r=po(t))),t.effectTag|=1,Ta(e,t,o),t.memoizedProps=n,e=t.child):e=Ma(e,t),e;case 2:if(o=ko(t),null===e)if(null===t.stateNode){var i=t.pendingProps,l=t.type;r=po(t);var u=2===t.tag&&null!=t.type.contextTypes;i=new l(i,a=u?ho(t,r):f),t.memoizedState=null!==i.state&&void 0!==i.state?i.state:null,i.updater=la,t.stateNode=i,i._reactInternalFiber=t,u&&((u=t.stateNode).__reactInternalMemoizedUnmaskedChildContext=r,u.__reactInternalMemoizedMaskedChildContext=a),sa(t,n),r=!0}else{l=t.type,r=t.stateNode,u=t.memoizedProps,a=t.pendingProps,r.props=u;var c=r.context;i=ho(t,i=po(t));var s=l.getDerivedStateFromProps;(l="function"==typeof s||"function"==typeof r.getSnapshotBeforeUpdate)||"function"!=typeof r.UNSAFE_componentWillReceiveProps&&"function"!=typeof r.componentWillReceiveProps||(u!==a||c!==i)&&ca(t,r,a,i),Fo=!1;var p=t.memoizedState;c=r.state=p;var h=t.updateQueue;null!==h&&(Wo(t,h,a,r,n),c=t.memoizedState),u!==a||p!==c||so.current||Fo?("function"==typeof s&&(ia(t,s,a),c=t.memoizedState),(u=Fo||ua(t,u,a,p,c,i))?(l||"function"!=typeof r.UNSAFE_componentWillMount&&"function"!=typeof r.componentWillMount||("function"==typeof r.componentWillMount&&r.componentWillMount(),"function"==typeof r.UNSAFE_componentWillMount&&r.UNSAFE_componentWillMount()),"function"==typeof r.componentDidMount&&(t.effectTag|=4)):("function"==typeof r.componentDidMount&&(t.effectTag|=4),t.memoizedProps=a,t.memoizedState=c),r.props=a,r.state=c,r.context=i,r=u):("function"==typeof r.componentDidMount&&(t.effectTag|=4),r=!1)}else l=t.type,r=t.stateNode,a=t.memoizedProps,u=t.pendingProps,r.props=a,c=r.context,i=ho(t,i=po(t)),(l="function"==typeof(s=l.getDerivedStateFromProps)||"function"==typeof r.getSnapshotBeforeUpdate)||"function"!=typeof r.UNSAFE_componentWillReceiveProps&&"function"!=typeof r.componentWillReceiveProps||(a!==u||c!==i)&&ca(t,r,u,i),Fo=!1,c=t.memoizedState,p=r.state=c,null!==(h=t.updateQueue)&&(Wo(t,h,u,r,n),p=t.memoizedState),a!==u||c!==p||so.current||Fo?("function"==typeof s&&(ia(t,s,u),p=t.memoizedState),(s=Fo||ua(t,a,u,c,p,i))?(l||"function"!=typeof r.UNSAFE_componentWillUpdate&&"function"!=typeof r.componentWillUpdate||("function"==typeof r.componentWillUpdate&&r.componentWillUpdate(u,p,i),"function"==typeof r.UNSAFE_componentWillUpdate&&r.UNSAFE_componentWillUpdate(u,p,i)),"function"==typeof r.componentDidUpdate&&(t.effectTag|=4),"function"==typeof r.getSnapshotBeforeUpdate&&(t.effectTag|=256)):("function"!=typeof r.componentDidUpdate||a===e.memoizedProps&&c===e.memoizedState||(t.effectTag|=4),"function"!=typeof r.getSnapshotBeforeUpdate||a===e.memoizedProps&&c===e.memoizedState||(t.effectTag|=256),t.memoizedProps=u,t.memoizedState=p),r.props=u,r.state=p,r.context=i,r=s):("function"!=typeof r.componentDidUpdate||a===e.memoizedProps&&c===e.memoizedState||(t.effectTag|=4),"function"!=typeof r.getSnapshotBeforeUpdate||a===e.memoizedProps&&c===e.memoizedState||(t.effectTag|=256),r=!1);return Na(e,t,r,o,n);case 3:return Oa(t),null!==(o=t.updateQueue)?(r=null!==(r=t.memoizedState)?r.element:null,Wo(t,o,t.pendingProps,null,n),(o=t.memoizedState.element)===r?(Ea(),e=Ma(e,t)):(r=t.stateNode,(r=(null===e||null===e.child)&&r.hydrate)&&(ya=ro(t.stateNode.containerInfo),ga=t,r=ba=!0),r?(t.effectTag|=2,t.child=va(t,null,o,n)):(Ea(),Ta(e,t,o)),e=t.child)):(Ea(),e=Ma(e,t)),e;case 5:return na(ta.current),(o=na(Jo.current))!==(r=Nr(o,t.type))&&(uo(ea,t),uo(Jo,r)),null===e&&_a(t),o=t.type,u=t.memoizedProps,r=t.pendingProps,a=null!==e?e.memoizedProps:null,so.current||u!==r||((u=1&t.mode&&!!r.hidden)&&(t.expirationTime=1073741823),u&&1073741823===n)?(u=r.children,Zr(o,r)?u=null:a&&Zr(o,a)&&(t.effectTag|=16),Pa(e,t),1073741823!==n&&1&t.mode&&r.hidden?(t.expirationTime=1073741823,t.memoizedProps=r,e=null):(Ta(e,t,u),t.memoizedProps=r,e=t.child)):e=Ma(e,t),e;case 6:return null===e&&_a(t),t.memoizedProps=t.pendingProps,null;case 16:return null;case 4:return ra(t,t.stateNode.containerInfo),o=t.pendingProps,so.current||t.memoizedProps!==o?(null===e?t.child=ma(t,null,o,n):Ta(e,t,o),t.memoizedProps=o,e=t.child):e=Ma(e,t),e;case 14:return o=t.type.render,n=t.pendingProps,r=t.ref,so.current||t.memoizedProps!==n||r!==(null!==e?e.ref:null)?(Ta(e,t,o=o(n,r)),t.memoizedProps=n,e=t.child):e=Ma(e,t),e;case 10:return n=t.pendingProps,so.current||t.memoizedProps!==n?(Ta(e,t,n),t.memoizedProps=n,e=t.child):e=Ma(e,t),e;case 11:return n=t.pendingProps.children,so.current||null!==n&&t.memoizedProps!==n?(Ta(e,t,n),t.memoizedProps=n,e=t.child):e=Ma(e,t),e;case 15:return n=t.pendingProps,t.memoizedProps===n?e=Ma(e,t):(Ta(e,t,n.children),t.memoizedProps=n,e=t.child),e;case 13:return function(e,t,n){var r=t.type._context,o=t.pendingProps,a=t.memoizedProps,i=!0;if(so.current)i=!1;else if(a===o)return t.stateNode=0,Yo(t),Ma(e,t);var l=o.value;if(t.memoizedProps=o,null===a)l=1073741823;else if(a.value===o.value){if(a.children===o.children&&i)return t.stateNode=0,Yo(t),Ma(e,t);l=0}else{var u=a.value;if(u===l&&(0!==u||1/u==1/l)||u!=u&&l!=l){if(a.children===o.children&&i)return t.stateNode=0,Yo(t),Ma(e,t);l=0}else if(l="function"==typeof r._calculateChangedBits?r._calculateChangedBits(u,l):1073741823,0==(l|=0)){if(a.children===o.children&&i)return t.stateNode=0,Yo(t),Ma(e,t)}else Ra(t,r,l,n)}return t.stateNode=l,Yo(t),Ta(e,t,o.children),t.child}(e,t,n);case 12:e:if(r=t.type,a=t.pendingProps,u=t.memoizedProps,o=r._currentValue,i=r._changedBits,so.current||0!==i||u!==a){if(t.memoizedProps=a,void 0!==(l=a.unstable_observedBits)&&null!==l||(l=1073741823),t.stateNode=l,0!=(i&l))Ra(t,r,i,n);else if(u===a){e=Ma(e,t);break e}n=(n=a.children)(o),t.effectTag|=1,Ta(e,t,n),e=t.child}else e=Ma(e,t);return e;default:d("156")}}function Fa(e){e.effectTag|=4}var Ia=void 0,Da=void 0,za=void 0;function La(e,t){var n=t.pendingProps;switch(t.tag){case 1:return null;case 2:return vo(t),null;case 3:oa(),go();var r=t.stateNode;return r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),null!==e&&null!==e.child||(Ca(t),t.effectTag&=-3),Ia(t),null;case 5:aa(t),r=na(ta.current);var o=t.type;if(null!==e&&null!=t.stateNode){var a=e.memoizedProps,i=t.stateNode,l=na(Jo.current);i=Hr(i,o,a,n,r),Da(e,t,i,o,a,n,r,l),e.ref!==t.ref&&(t.effectTag|=128)}else{if(!n)return null===t.stateNode&&d("166"),null;if(e=na(Jo.current),Ca(t))n=t.stateNode,o=t.type,a=t.memoizedProps,n[V]=t,n[B]=a,r=Qr(n,o,a,e,r),t.updateQueue=r,null!==r&&Fa(t);else{(e=Vr(o,n,r,e))[V]=t,e[B]=n;e:for(a=t.child;null!==a;){if(5===a.tag||6===a.tag)e.appendChild(a.stateNode);else if(4!==a.tag&&null!==a.child){a.child.return=a,a=a.child;continue}if(a===t)break;for(;null===a.sibling;){if(null===a.return||a.return===t)break e;a=a.return}a.sibling.return=a.return,a=a.sibling}Wr(e,o,n,r),Xr(o,n)&&Fa(t),t.stateNode=e}null!==t.ref&&(t.effectTag|=128)}return null;case 6:if(e&&null!=t.stateNode)za(e,t,e.memoizedProps,n);else{if("string"!=typeof n)return null===t.stateNode&&d("166"),null;r=na(ta.current),na(Jo.current),Ca(t)?(r=t.stateNode,n=t.memoizedProps,r[V]=t,Kr(r,n)&&Fa(t)):((r=Br(n,r))[V]=t,t.stateNode=r)}return null;case 14:case 16:case 10:case 11:case 15:return null;case 4:return oa(),Ia(t),null;case 13:return Xo(t),null;case 12:return null;case 0:d("167");default:d("156")}}function Aa(e,t){var n=t.source;null===t.stack&&null!==n&&kt(n),null!==n&&bt(n),t=t.value,null!==e&&2===e.tag&&bt(e);try{t&&t.suppressReactErrorLogging||console.error(t)}catch(e){e&&e.suppressReactErrorLogging||console.error(e)}}function ja(e){var t=e.ref;if(null!==t)if("function"==typeof t)try{t(null)}catch(t){mi(e,t)}else t.current=null}function Va(e){switch(Uo(e),e.tag){case 2:ja(e);var t=e.stateNode;if("function"==typeof t.componentWillUnmount)try{t.props=e.memoizedProps,t.state=e.memoizedState,t.componentWillUnmount()}catch(t){mi(e,t)}break;case 5:ja(e);break;case 4:Ha(e)}}function Ba(e){return 5===e.tag||3===e.tag||4===e.tag}function Wa(e){e:{for(var t=e.return;null!==t;){if(Ba(t)){var n=t;break e}t=t.return}d("160"),n=void 0}var r=t=void 0;switch(n.tag){case 5:t=n.stateNode,r=!1;break;case 3:case 4:t=n.stateNode.containerInfo,r=!0;break;default:d("161")}16&n.effectTag&&(Mr(t,""),n.effectTag&=-17);e:t:for(n=e;;){for(;null===n.sibling;){if(null===n.return||Ba(n.return)){n=null;break e}n=n.return}for(n.sibling.return=n.return,n=n.sibling;5!==n.tag&&6!==n.tag;){if(2&n.effectTag)continue t;if(null===n.child||4===n.tag)continue t;n.child.return=n,n=n.child}if(!(2&n.effectTag)){n=n.stateNode;break e}}for(var o=e;;){if(5===o.tag||6===o.tag)if(n)if(r){var a=t,i=o.stateNode,l=n;8===a.nodeType?a.parentNode.insertBefore(i,l):a.insertBefore(i,l)}else t.insertBefore(o.stateNode,n);else r?(a=t,i=o.stateNode,8===a.nodeType?a.parentNode.insertBefore(i,a):a.appendChild(i)):t.appendChild(o.stateNode);else if(4!==o.tag&&null!==o.child){o.child.return=o,o=o.child;continue}if(o===e)break;for(;null===o.sibling;){if(null===o.return||o.return===e)return;o=o.return}o.sibling.return=o.return,o=o.sibling}}function Ha(e){for(var t=e,n=!1,r=void 0,o=void 0;;){if(!n){n=t.return;e:for(;;){switch(null===n&&d("160"),n.tag){case 5:r=n.stateNode,o=!1;break e;case 3:case 4:r=n.stateNode.containerInfo,o=!0;break e}n=n.return}n=!0}if(5===t.tag||6===t.tag){e:for(var a=t,i=a;;)if(Va(i),null!==i.child&&4!==i.tag)i.child.return=i,i=i.child;else{if(i===a)break;for(;null===i.sibling;){if(null===i.return||i.return===a)break e;i=i.return}i.sibling.return=i.return,i=i.sibling}o?(a=r,i=t.stateNode,8===a.nodeType?a.parentNode.removeChild(i):a.removeChild(i)):r.removeChild(t.stateNode)}else if(4===t.tag?r=t.stateNode.containerInfo:Va(t),null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return;4===(t=t.return).tag&&(n=!1)}t.sibling.return=t.return,t=t.sibling}}function $a(e,t){switch(t.tag){case 2:break;case 5:var n=t.stateNode;if(null!=n){var r=t.memoizedProps;e=null!==e?e.memoizedProps:r;var o=t.type,a=t.updateQueue;t.updateQueue=null,null!==a&&(n[B]=r,$r(n,a,o,e,r))}break;case 6:null===t.stateNode&&d("162"),t.stateNode.nodeValue=t.memoizedProps;break;case 3:case 15:case 16:break;default:d("163")}}function Qa(e,t,n){(n=zo(n)).tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Zi(r),Aa(e,t)},n}function Ka(e,t,n){(n=zo(n)).tag=3;var r=e.stateNode;return null!==r&&"function"==typeof r.componentDidCatch&&(n.callback=function(){null===si?si=new Set([this]):si.add(this);var n=t.value,r=t.stack;Aa(e,t),this.componentDidCatch(n,{componentStack:null!==r?r:""})}),n}function qa(e,t,n,r,o,a){n.effectTag|=512,n.firstEffect=n.lastEffect=null,r=Qo(r,n),e=t;do{switch(e.tag){case 3:return e.effectTag|=1024,void jo(e,r=Qa(e,r,a),a);case 2:if(t=r,n=e.stateNode,0==(64&e.effectTag)&&null!==n&&"function"==typeof n.componentDidCatch&&(null===si||!si.has(n)))return e.effectTag|=1024,void jo(e,r=Ka(e,t,a),a)}e=e.return}while(null!==e)}function Ga(e){switch(e.tag){case 2:vo(e);var t=e.effectTag;return 1024&t?(e.effectTag=-1025&t|64,e):null;case 3:return oa(),go(),1024&(t=e.effectTag)?(e.effectTag=-1025&t|64,e):null;case 5:return aa(e),null;case 16:return 1024&(t=e.effectTag)?(e.effectTag=-1025&t|64,e):null;case 4:return oa(),null;case 13:return Xo(e),null;default:return null}}Ia=function(){},Da=function(e,t,n){(t.updateQueue=n)&&Fa(t)},za=function(e,t,n,r){n!==r&&Fa(t)};var Ya=Jr(),Xa=2,Za=Ya,Ja=0,ei=0,ti=!1,ni=null,ri=null,oi=0,ai=-1,ii=!1,li=null,ui=!1,ci=!1,si=null;function fi(){if(null!==ni)for(var e=ni.return;null!==e;){var t=e;switch(t.tag){case 2:vo(t);break;case 3:oa(),go();break;case 5:aa(t);break;case 4:oa();break;case 13:Xo(t)}e=e.return}ri=null,oi=0,ai=-1,ii=!1,ni=null,ci=!1}function di(e){for(;;){var t=e.alternate,n=e.return,r=e.sibling;if(0==(512&e.effectTag)){t=La(t,e);var o=e;if(1073741823===oi||1073741823!==o.expirationTime){var a=0;switch(o.tag){case 3:case 2:var i=o.updateQueue;null!==i&&(a=i.expirationTime)}for(i=o.child;null!==i;)0!==i.expirationTime&&(0===a||a>i.expirationTime)&&(a=i.expirationTime),i=i.sibling;o.expirationTime=a}if(null!==t)return t;if(null!==n&&0==(512&n.effectTag)&&(null===n.firstEffect&&(n.firstEffect=e.firstEffect),null!==e.lastEffect&&(null!==n.lastEffect&&(n.lastEffect.nextEffect=e.firstEffect),n.lastEffect=e.lastEffect),1Ni)&&(Ni=e),e}function yi(e,t){for(;null!==e;){if((0===e.expirationTime||e.expirationTime>t)&&(e.expirationTime=t),null!==e.alternate&&(0===e.alternate.expirationTime||e.alternate.expirationTime>t)&&(e.alternate.expirationTime=t),null===e.return){if(3!==e.tag)break;var n=e.stateNode;!ti&&0!==oi&&tLi&&d("185")}e=e.return}}function bi(){return Za=Jr()-Ya,Xa=2+(Za/10|0)}function ki(e){var t=ei;ei=2+25*(1+((bi()-2+500)/25|0));try{return e()}finally{ei=t}}function wi(e,t,n,r,o){var a=ei;ei=1;try{return e(t,n,r,o)}finally{ei=a}}var _i=null,xi=null,Ci=0,Ei=void 0,Ti=!1,Si=null,Pi=0,Ni=0,Oi=!1,Ri=!1,Mi=null,Ui=null,Fi=!1,Ii=!1,Di=!1,zi=null,Li=1e3,Ai=0,ji=1;function Vi(e){if(0!==Ci){if(e>Ci)return;null!==Ei&&to(Ei)}var t=Jr()-Ya;Ci=e,Ei=eo(Hi,{timeout:10*(e-2)-t})}function Bi(e,t){if(null===e.nextScheduledRoot)e.remainingExpirationTime=t,null===xi?(_i=xi=e,e.nextScheduledRoot=e):(xi=xi.nextScheduledRoot=e).nextScheduledRoot=_i;else{var n=e.remainingExpirationTime;(0===n||t=Pi)&&(!Oi||bi()>=Pi);)bi(),Gi(Si,Pi,!Oi),Wi();else for(;null!==Si&&0!==Pi&&(0===e||e>=Pi);)Gi(Si,Pi,!1),Wi();null!==Ui&&(Ci=0,Ei=null),0!==Pi&&Vi(Pi),Ui=null,Oi=!1,qi()}function Ki(e,t){Ti&&d("253"),Si=e,Pi=t,Gi(e,t,!1),$i(),qi()}function qi(){if(Ai=0,null!==zi){var e=zi;zi=null;for(var t=0;tw&&(_=w,w=P,P=_),_=Bn(T,P),x=Bn(T,w),_&&x&&(1!==S.rangeCount||S.anchorNode!==_.node||S.anchorOffset!==_.offset||S.focusNode!==x.node||S.focusOffset!==x.offset)&&((C=document.createRange()).setStart(_.node,_.offset),S.removeAllRanges(),P>w?(S.addRange(C),S.extend(x.node,x.offset)):(C.setEnd(x.node,x.offset),S.addRange(C))))),S=[];for(P=T;P=P.parentNode;)1===P.nodeType&&S.push({element:P,left:P.scrollLeft,top:P.scrollTop});for("function"==typeof T.focus&&T.focus(),T=0;Tji)&&(Oi=!0)}function Zi(e){null===Si&&d("246"),Si.remainingExpirationTime=0,Ri||(Ri=!0,Mi=e)}function Ji(e,t){var n=Fi;Fi=!0;try{return e(t)}finally{(Fi=n)||Ti||$i()}}function el(e,t){if(Fi&&!Ii){Ii=!0;try{return e(t)}finally{Ii=!1}}return e(t)}function tl(e,t){Ti&&d("187");var n=Fi;Fi=!0;try{return wi(e,t)}finally{Fi=n,$i()}}function nl(e,t,n){if(Di)return e(t,n);Fi||Ti||0===Ni||(Qi(Ni,!1,null),Ni=0);var r=Di,o=Fi;Fi=Di=!0;try{return e(t,n)}finally{Di=r,(Fi=o)||Ti||$i()}}function rl(e){var t=Fi;Fi=!0;try{wi(e)}finally{(Fi=t)||Ti||Qi(1,!1,null)}}function ol(e,t,n,r,o){var a=t.current;if(n){var i;n=n._reactInternalFiber;e:{for(2===ln(n)&&2===n.tag||d("170"),i=n;3!==i.tag;){if(mo(i)){i=i.stateNode.__reactInternalMemoizedMergedChildContext;break e}(i=i.return)||d("171")}i=i.stateNode.context}n=mo(n)?bo(n,i):i}else n=f;return null===t.context?t.context=n:t.pendingContext=n,t=o,(o=zo(r)).payload={element:e},null!==(t=void 0===t?null:t)&&(o.callback=t),Ao(a,o,r),yi(a,r),r}function al(e){var t=e._reactInternalFiber;return void 0===t&&("function"==typeof e.render?d("188"):d("268",Object.keys(e))),null===(e=sn(t))?null:e.stateNode}function il(e,t,n,r){var o=t.current;return ol(e,t,n,o=gi(bi(),o),r)}function ll(e){if(!(e=e.current).child)return null;switch(e.child.tag){case 5:default:return e.child.stateNode}}function ul(e){var t=e.findFiberByHostInstance;return function(e){if("undefined"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__)return!1;var t=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(t.isDisabled||!t.supportsFiber)return!0;try{var n=t.inject(e);No=Ro(function(e){return t.onCommitFiberRoot(n,e)}),Oo=Ro(function(e){return t.onCommitFiberUnmount(n,e)})}catch(e){}return!0}(i({},e,{findHostInstanceByFiber:function(e){return null===(e=sn(e))?null:e.stateNode},findFiberByHostInstance:function(e){return t?t(e):null}}))}var cl=Ji,sl=nl,fl=function(){Ti||0===Ni||(Qi(Ni,!1,null),Ni=0)};function dl(e){this._expirationTime=vi(),this._root=e,this._callbacks=this._next=null,this._hasChildren=this._didComplete=!1,this._children=null,this._defer=!0}function pl(){this._callbacks=null,this._didCommit=!1,this._onCommit=this._onCommit.bind(this)}function hl(e,t,n){this._internalRoot=Po(e,t,n)}function ml(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType&&(8!==e.nodeType||" react-mount-point-unstable "!==e.nodeValue))}function vl(e,t,n,r,o){ml(n)||d("200");var a=n._reactRootContainer;if(a){if("function"==typeof o){var i=o;o=function(){var e=ll(a._internalRoot);i.call(e)}}null!=e?a.legacy_renderSubtreeIntoContainer(e,t,o):a.render(t,o)}else{if(a=n._reactRootContainer=function(e,t){if(t||(t=!(!(t=e?9===e.nodeType?e.documentElement:e.firstChild:null)||1!==t.nodeType||!t.hasAttribute("data-reactroot"))),!t)for(var n;n=e.lastChild;)e.removeChild(n);return new hl(e,!1,t)}(n,r),"function"==typeof o){var l=o;o=function(){var e=ll(a._internalRoot);l.call(e)}}el(function(){null!=e?a.legacy_renderSubtreeIntoContainer(e,t,o):a.render(t,o)})}return ll(a._internalRoot)}function gl(e,t){var n=2
2 |
3 |
4 |
5 |
6 |
7 | react-svelte app
8 |
9 |
10 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
--------------------------------------------------------------------------------
/demo/src/SvelteThing.html:
--------------------------------------------------------------------------------
1 | Hello from Svelte!
2 | this is a prop from React: {count}
3 |
4 |
--------------------------------------------------------------------------------
/demo/src/main.js:
--------------------------------------------------------------------------------
1 | import * as React from 'react';
2 | import { render } from 'react-dom';
3 | import SvelteComponent from 'react-svelte';
4 | import SvelteThing from './SvelteThing.html';
5 |
6 | function App(props) {
7 | return (
8 |
9 |
this is a Svelte component inside a React app:
10 |
11 |
12 | )
13 | }
14 |
15 | const main = document.querySelector('main');
16 | let i = 0;
17 |
18 | function update() {
19 | render(, main);
20 | setTimeout(update, 1000);
21 | }
22 |
23 | update();
--------------------------------------------------------------------------------
/demo/webpack.config.js:
--------------------------------------------------------------------------------
1 | const webpack = require('webpack');
2 | const MiniCssExtractPlugin = require('mini-css-extract-plugin');
3 |
4 | const mode = process.env.NODE_ENV || 'development';
5 | const prod = mode === 'production';
6 |
7 | module.exports = {
8 | entry: {
9 | bundle: ['./src/main.js']
10 | },
11 | resolve: {
12 | extensions: ['.js', '.html']
13 | },
14 | output: {
15 | path: __dirname + '/public',
16 | filename: '[name].js',
17 | chunkFilename: '[name].[id].js'
18 | },
19 | module: {
20 | rules: [
21 | {
22 | test: /\.js$/,
23 | exclude: /node_modules/,
24 | use: {
25 | loader: 'buble-loader'
26 | }
27 | },
28 | {
29 | test: /\.html$/,
30 | exclude: /node_modules/,
31 | use: {
32 | loader: 'svelte-loader',
33 | options: {
34 | skipIntroByDefault: true,
35 | nestedTransitions: true,
36 | emitCss: true,
37 | hotReload: true
38 | }
39 | }
40 | },
41 | {
42 | test: /\.css$/,
43 | use: [
44 | /**
45 | * MiniCssExtractPlugin doesn't support HMR.
46 | * For developing, use 'style-loader' instead.
47 | * */
48 | prod ? MiniCssExtractPlugin.loader : 'style-loader',
49 | 'css-loader'
50 | ]
51 | }
52 | ]
53 | },
54 | mode,
55 | plugins: [
56 | new MiniCssExtractPlugin({
57 | filename: '[name].css'
58 | })
59 | ],
60 | devtool: prod ? false: 'source-map'
61 | };
62 |
--------------------------------------------------------------------------------
/index.js:
--------------------------------------------------------------------------------
1 | import * as React from 'react';
2 |
3 | export default class SvelteComponent extends React.Component {
4 | constructor() {
5 | super();
6 |
7 | this.container = React.createRef();
8 | this.instance = null;
9 | this.div = React.createElement('div', { ref: this.container });
10 | }
11 |
12 | componentDidMount() {
13 | const { this: Constructor, ...data } = this.props;
14 |
15 | this.instance = new Constructor({
16 | target: this.container.current,
17 | data
18 | });
19 | }
20 |
21 | componentDidUpdate() {
22 | this.instance.set(this.props);
23 | }
24 |
25 | componentWillUnmount() {
26 | this.instance.destroy();
27 | }
28 |
29 | render() {
30 | return this.div;
31 | }
32 | }
--------------------------------------------------------------------------------
/package-lock.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "react-svelte",
3 | "version": "1.0.0",
4 | "lockfileVersion": 1,
5 | "requires": true,
6 | "dependencies": {
7 | "asap": {
8 | "version": "2.0.6",
9 | "resolved": "https://registry.npmjs.org/asap/-/asap-2.0.6.tgz",
10 | "integrity": "sha1-5QNHYR1+aQlDIIu9r+vLwvuGbUY="
11 | },
12 | "core-js": {
13 | "version": "1.2.7",
14 | "resolved": "https://registry.npmjs.org/core-js/-/core-js-1.2.7.tgz",
15 | "integrity": "sha1-ZSKUwUZR2yj6k70tX/KYOk8IxjY="
16 | },
17 | "encoding": {
18 | "version": "0.1.12",
19 | "resolved": "https://registry.npmjs.org/encoding/-/encoding-0.1.12.tgz",
20 | "integrity": "sha1-U4tm8+5izRq1HsMjgp0flIDHS+s=",
21 | "requires": {
22 | "iconv-lite": "~0.4.13"
23 | }
24 | },
25 | "fbjs": {
26 | "version": "0.8.17",
27 | "resolved": "https://registry.npmjs.org/fbjs/-/fbjs-0.8.17.tgz",
28 | "integrity": "sha1-xNWY6taUkRJlPWWIsBpc3Nn5D90=",
29 | "requires": {
30 | "core-js": "^1.0.0",
31 | "isomorphic-fetch": "^2.1.1",
32 | "loose-envify": "^1.0.0",
33 | "object-assign": "^4.1.0",
34 | "promise": "^7.1.1",
35 | "setimmediate": "^1.0.5",
36 | "ua-parser-js": "^0.7.18"
37 | }
38 | },
39 | "iconv-lite": {
40 | "version": "0.4.23",
41 | "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.23.tgz",
42 | "integrity": "sha512-neyTUVFtahjf0mB3dZT77u+8O0QB89jFdnBkd5P1JgYPbPaia3gXXOVL2fq8VyU2gMMD7SaN7QukTB/pmXYvDA==",
43 | "requires": {
44 | "safer-buffer": ">= 2.1.2 < 3"
45 | }
46 | },
47 | "is-stream": {
48 | "version": "1.1.0",
49 | "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz",
50 | "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ="
51 | },
52 | "isomorphic-fetch": {
53 | "version": "2.2.1",
54 | "resolved": "https://registry.npmjs.org/isomorphic-fetch/-/isomorphic-fetch-2.2.1.tgz",
55 | "integrity": "sha1-YRrhrPFPXoH3KVB0coGf6XM1WKk=",
56 | "requires": {
57 | "node-fetch": "^1.0.1",
58 | "whatwg-fetch": ">=0.10.0"
59 | }
60 | },
61 | "js-tokens": {
62 | "version": "4.0.0",
63 | "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz",
64 | "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ=="
65 | },
66 | "loose-envify": {
67 | "version": "1.4.0",
68 | "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz",
69 | "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==",
70 | "requires": {
71 | "js-tokens": "^3.0.0 || ^4.0.0"
72 | }
73 | },
74 | "node-fetch": {
75 | "version": "1.7.3",
76 | "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-1.7.3.tgz",
77 | "integrity": "sha512-NhZ4CsKx7cYm2vSrBAr2PvFOe6sWDf0UYLRqA6svUYg7+/TSfVAu49jYC4BvQ4Sms9SZgdqGBgroqfDhJdTyKQ==",
78 | "requires": {
79 | "encoding": "^0.1.11",
80 | "is-stream": "^1.0.1"
81 | }
82 | },
83 | "object-assign": {
84 | "version": "4.1.1",
85 | "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz",
86 | "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM="
87 | },
88 | "promise": {
89 | "version": "7.3.1",
90 | "resolved": "https://registry.npmjs.org/promise/-/promise-7.3.1.tgz",
91 | "integrity": "sha512-nolQXZ/4L+bP/UGlkfaIujX9BKxGwmQ9OT4mOt5yvy8iK1h3wqTEJCijzGANTCCl9nWjY41juyAn2K3Q1hLLTg==",
92 | "requires": {
93 | "asap": "~2.0.3"
94 | }
95 | },
96 | "prop-types": {
97 | "version": "15.6.2",
98 | "resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.6.2.tgz",
99 | "integrity": "sha512-3pboPvLiWD7dkI3qf3KbUe6hKFKa52w+AE0VCqECtf+QHAKgOL37tTaNCnuX1nAAQ4ZhyP+kYVKf8rLmJ/feDQ==",
100 | "requires": {
101 | "loose-envify": "^1.3.1",
102 | "object-assign": "^4.1.1"
103 | }
104 | },
105 | "react": {
106 | "version": "16.4.2",
107 | "resolved": "https://registry.npmjs.org/react/-/react-16.4.2.tgz",
108 | "integrity": "sha512-dMv7YrbxO4y2aqnvA7f/ik9ibeLSHQJTI6TrYAenPSaQ6OXfb+Oti+oJiy8WBxgRzlKatYqtCjphTgDSCEiWFg==",
109 | "requires": {
110 | "fbjs": "^0.8.16",
111 | "loose-envify": "^1.1.0",
112 | "object-assign": "^4.1.1",
113 | "prop-types": "^15.6.0"
114 | }
115 | },
116 | "safer-buffer": {
117 | "version": "2.1.2",
118 | "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz",
119 | "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg=="
120 | },
121 | "setimmediate": {
122 | "version": "1.0.5",
123 | "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz",
124 | "integrity": "sha1-KQy7Iy4waULX1+qbg3Mqt4VvgoU="
125 | },
126 | "ua-parser-js": {
127 | "version": "0.7.18",
128 | "resolved": "https://registry.npmjs.org/ua-parser-js/-/ua-parser-js-0.7.18.tgz",
129 | "integrity": "sha512-LtzwHlVHwFGTptfNSgezHp7WUlwiqb0gA9AALRbKaERfxwJoiX0A73QbTToxteIAuIaFshhgIZfqK8s7clqgnA=="
130 | },
131 | "whatwg-fetch": {
132 | "version": "2.0.4",
133 | "resolved": "https://registry.npmjs.org/whatwg-fetch/-/whatwg-fetch-2.0.4.tgz",
134 | "integrity": "sha512-dcQ1GWpOD/eEQ97k66aiEVpNnapVj90/+R+SXTPYGHpYBBypfKJEQjLrvMZ7YXbKm21gXd4NcuxUTjiv1YtLng=="
135 | }
136 | }
137 | }
138 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "react-svelte",
3 | "version": "1.0.2",
4 | "description": "Use Svelte components inside a React app",
5 | "main": "index.js",
6 | "scripts": {
7 | "test": "echo \"Error: no test specified\" && exit 1"
8 | },
9 | "repository": {
10 | "type": "git",
11 | "url": "git+https://github.com/Rich-Harris/react-svelte.git"
12 | },
13 | "keywords": [
14 | "react",
15 | "svelte",
16 | "components"
17 | ],
18 | "author": "Rich Harris",
19 | "license": "LIL",
20 | "bugs": {
21 | "url": "https://github.com/Rich-Harris/react-svelte/issues"
22 | },
23 | "homepage": "https://github.com/Rich-Harris/react-svelte#readme",
24 | "peerDependencies": {
25 | "react": "^16.4.2"
26 | }
27 | }
28 |
--------------------------------------------------------------------------------