@tarojs/components 3.6.0-canary.3 → 3.6.0-canary.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/taro-components.cjs.js +1 -1
- package/dist/cjs/taro-native-slot-core.cjs.entry.js +23 -0
- package/dist/cjs/taro-native-slot-core.cjs.entry.js.map +1 -0
- package/dist/cjs/taro-slot-core.cjs.entry.js +5 -0
- package/dist/cjs/taro-slot-core.cjs.entry.js.map +1 -1
- package/dist/cjs/taro-swiper-core_2.cjs.entry.js +2 -0
- package/dist/cjs/taro-swiper-core_2.cjs.entry.js.map +1 -1
- package/dist/cjs/taro-view-core.cjs.entry.js +6 -2
- package/dist/cjs/taro-view-core.cjs.entry.js.map +1 -1
- package/dist/collection/collection-manifest.json +1 -0
- package/dist/collection/components/slot/native-slot.js +12 -0
- package/dist/collection/components/slot/native-slot.js.map +1 -0
- package/dist/collection/components/slot/slot.js +4 -0
- package/dist/collection/components/slot/slot.js.map +1 -1
- package/dist/collection/components/swiper/swiper.js +20 -0
- package/dist/collection/components/swiper/swiper.js.map +1 -1
- package/dist/collection/components/view/view.js +6 -2
- package/dist/collection/components/view/view.js.map +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/taro-components.js +1 -1
- package/dist/esm/taro-native-slot-core.entry.js +19 -0
- package/dist/esm/taro-native-slot-core.entry.js.map +1 -0
- package/dist/esm/taro-slot-core.entry.js +5 -0
- package/dist/esm/taro-slot-core.entry.js.map +1 -1
- package/dist/esm/taro-swiper-core_2.entry.js +2 -0
- package/dist/esm/taro-swiper-core_2.entry.js.map +1 -1
- package/dist/esm/taro-view-core.entry.js +6 -2
- package/dist/esm/taro-view-core.entry.js.map +1 -1
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/loader.js.map +1 -1
- package/dist/esm-es5/taro-components.js +1 -1
- package/dist/esm-es5/taro-components.js.map +1 -1
- package/dist/esm-es5/taro-native-slot-core.entry.js +2 -0
- package/dist/esm-es5/taro-native-slot-core.entry.js.map +1 -0
- package/dist/esm-es5/taro-slot-core.entry.js +1 -1
- package/dist/esm-es5/taro-slot-core.entry.js.map +1 -1
- package/dist/esm-es5/taro-swiper-core_2.entry.js +1 -1
- package/dist/esm-es5/taro-swiper-core_2.entry.js.map +1 -1
- package/dist/esm-es5/taro-view-core.entry.js +1 -1
- package/dist/esm-es5/taro-view-core.entry.js.map +1 -1
- package/dist/react/component-lib/input.js +2 -7
- package/dist/react/component-lib/reactify-wc.js +18 -20
- package/dist/react/components.js +2 -1
- package/dist/react/helper.js +1 -6
- package/dist/react/react-component-lib/createComponent.js +12 -19
- package/dist/react/react-component-lib/createOverlayComponent.js +24 -27
- package/dist/react/react-component-lib/interfaces.js +0 -1
- package/dist/react/react-component-lib/utils/attachProps.js +1 -1
- package/dist/react/react-component-lib/utils/index.js +6 -2
- package/dist/taro-components/p-186ad7ff.entry.js +2 -0
- package/dist/taro-components/p-186ad7ff.entry.js.map +1 -0
- package/dist/taro-components/{p-e9abe3e2.entry.js → p-19afe402.entry.js} +2 -2
- package/dist/taro-components/p-19afe402.entry.js.map +1 -0
- package/dist/taro-components/p-1b1420c9.system.entry.js +2 -0
- package/dist/taro-components/p-1b1420c9.system.entry.js.map +1 -0
- package/dist/taro-components/p-51040638.entry.js +2 -0
- package/dist/taro-components/p-51040638.entry.js.map +1 -0
- package/dist/taro-components/{p-1cd1c507.system.entry.js → p-6831f7b1.system.entry.js} +2 -2
- package/dist/taro-components/p-6831f7b1.system.entry.js.map +1 -0
- package/dist/taro-components/{p-c3acf0ea.system.entry.js → p-c43fe342.system.entry.js} +2 -2
- package/dist/taro-components/p-c43fe342.system.entry.js.map +1 -0
- package/dist/taro-components/p-cb17d8bd.system.js +1 -1
- package/dist/taro-components/p-cb17d8bd.system.js.map +1 -1
- package/dist/taro-components/{p-a2aab820.entry.js → p-d388c097.entry.js} +2 -2
- package/dist/taro-components/p-d388c097.entry.js.map +1 -0
- package/dist/taro-components/p-fae28cc1.system.entry.js +2 -0
- package/dist/taro-components/p-fae28cc1.system.entry.js.map +1 -0
- package/dist/taro-components/taro-components.esm.js +1 -1
- package/dist/taro-components/taro-components.esm.js.map +1 -1
- package/dist/types/components/slot/native-slot.d.ts +5 -0
- package/dist/types/components/slot/slot.d.ts +1 -0
- package/dist/types/components/swiper/swiper.d.ts +4 -0
- package/dist/types/components.d.ts +21 -0
- package/dist/vue2/component-lib/createComponent.js +1 -1
- package/dist/vue2/component-lib/createFormsComponent.js +2 -7
- package/dist/vue2/component-lib/index.js +1 -1
- package/dist/vue2/component-lib/mixins/listeners.js +1 -6
- package/dist/vue2/component-lib/mixins/refs.js +1 -1
- package/dist/vue2/component-lib/picker.js +1 -6
- package/dist/vue2/component-lib/scroll-view.js +1 -6
- package/dist/vue2/components.js +7 -3
- package/dist/vue2/index.js +2 -2
- package/dist/vue2/vue-component-lib/utils.js +2 -6
- package/dist/vue3/component-lib/createComponent.js +1 -1
- package/dist/vue3/component-lib/createFormsComponent.js +3 -7
- package/dist/vue3/components.js +2 -1
- package/dist/vue3/index.js +1 -1
- package/dist/vue3/vue-component-lib/utils.js +3 -7
- package/package.json +5 -5
- package/types/CommentDetail.d.ts +2 -1
- package/types/CommentList.d.ts +7 -4
- package/types/Like.d.ts +4 -1
- package/types/Lottie.d.ts +0 -6
- package/types/NativeSlot.d.ts +32 -0
- package/types/Slot.d.ts +1 -1
- package/types/Swiper.d.ts +12 -0
- package/types/Video.d.ts +1 -3
- package/types/index.vue3.d.ts +267 -259
- package/dist/taro-components/p-1cd1c507.system.entry.js.map +0 -1
- package/dist/taro-components/p-1e436d5b.entry.js +0 -2
- package/dist/taro-components/p-1e436d5b.entry.js.map +0 -1
- package/dist/taro-components/p-a2aab820.entry.js.map +0 -1
- package/dist/taro-components/p-c3acf0ea.system.entry.js.map +0 -1
- package/dist/taro-components/p-d5579efa.system.entry.js +0 -2
- package/dist/taro-components/p-d5579efa.system.entry.js.map +0 -1
- package/dist/taro-components/p-e9abe3e2.entry.js.map +0 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{r as registerInstance,c as createEvent,h,H as Host,g as getElement}from"./index-5d881caf.js";import{c as classnames}from"./index-1d8e8acd.js";var indexCss="body,html{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-tap-highlight-color:rgba(0, 0, 0, 0)}taro-view-core{display:block}";var View=function(){function t(t){registerInstance(this,t);this.onLongPress=createEvent(this,"longpress",7);this.startTime=0;this.animation=undefined;this.hoverClass=undefined;this.hoverStartTime=50;this.hoverStayTime=400;this.hover=false;this.touch=false}t.prototype.onTouchStart=function(){var t=this;if(this.hoverClass){this.touch=true;setTimeout((function(){if(t.touch){t.hover=true}}),this.hoverStartTime)}this.timeoutEvent=setTimeout((function(){t.onLongPress.emit()}),350);this.startTime=Date.now()};t.prototype.onTouchMove=function(){clearTimeout(this.timeoutEvent)};t.prototype.onTouchEnd=function(){var t=this;var e=Date.now()-this.startTime;if(e<350){clearTimeout(this.timeoutEvent)}if(this.hoverClass){this.touch=false;setTimeout((function(){if(!t.touch){t.hover=false}}),this.hoverStayTime)}};t.prototype.componentDidRender=function(){var t=this.el;t.childNodes.forEach((function(t){if(t.nodeType===document.COMMENT_NODE&&t["s-cn"])t["s-cn"]=false}))};t.prototype.render=function(){var t;var e=classnames((t={},t["".concat(this.hoverClass)]=this.hover,t));var
|
|
1
|
+
import{r as registerInstance,c as createEvent,h,H as Host,g as getElement}from"./index-5d881caf.js";import{c as classnames}from"./index-1d8e8acd.js";var indexCss="body,html{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-tap-highlight-color:rgba(0, 0, 0, 0)}taro-view-core{display:block}";var View=function(){function t(t){registerInstance(this,t);this.onLongPress=createEvent(this,"longpress",7);this.startTime=0;this.animation=undefined;this.hoverClass=undefined;this.hoverStartTime=50;this.hoverStayTime=400;this.hover=false;this.touch=false}t.prototype.onTouchStart=function(){var t=this;if(this.hoverClass){this.touch=true;setTimeout((function(){if(t.touch){t.hover=true}}),this.hoverStartTime)}this.timeoutEvent=setTimeout((function(){t.onLongPress.emit()}),350);this.startTime=Date.now()};t.prototype.onTouchMove=function(){clearTimeout(this.timeoutEvent)};t.prototype.onTouchEnd=function(){var t=this;var e=Date.now()-this.startTime;if(e<350){clearTimeout(this.timeoutEvent)}if(this.hoverClass){this.touch=false;setTimeout((function(){if(!t.touch){t.hover=false}}),this.hoverStayTime)}};t.prototype.componentDidRender=function(){var t=this.el;t.childNodes.forEach((function(t){if(t.nodeType===document.COMMENT_NODE&&t["s-cn"])t["s-cn"]=false;if(t.nodeType!==document.COMMENT_NODE&&t["s-sr"])t["s-sr"]=false}))};t.prototype.render=function(){var t;var e=classnames((t={},t["".concat(this.hoverClass)]=this.hover,t));var s={};if(!!this.animation){s["animation"]=this.animation;s["data-animation"]=this.animation}return h(Host,Object.assign({class:e},s),h("slot",null))};Object.defineProperty(t.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});return t}();View.style=indexCss;export{View as taro_view_core};
|
|
2
2
|
//# sourceMappingURL=taro-view-core.entry.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["src/components/view/style/index.scss?tag=taro-view-core","src/components/view/view.tsx"],"names":["indexCss","View","this","startTime","prototype","onTouchStart","_this","hoverClass","touch","setTimeout","hover","hoverStartTime","timeoutEvent","onLongPress","emit","Date","now","onTouchMove","clearTimeout","onTouchEnd","spanTime","hoverStayTime","componentDidRender","el","childNodes","forEach","item","nodeType","document","COMMENT_NODE","render","cls","classNames","_a","concat","attr","animation","h","Host","Object","assign","class"],"mappings":"qJAAA,IAAMA,SAAW,gLCOJC,KAAI,mGAePC,KAAAC,UAAY,yEAVK,sBACD,eACP,iBACA,MAUjBF,EAAAG,UAAAC,aAAA,WAAA,IAAAC,EAAAJ,KACE,GAAIA,KAAKK,WAAY,CACnBL,KAAKM,MAAQ,KACbC,YAAW,WACT,GAAIH,EAAKE,MAAO,CACdF,EAAKI,MAAQ,QAEdR,KAAKS,gBAGVT,KAAKU,aAAeH,YAAW,WAC7BH,EAAKO,YAAYC,SAChB,KACHZ,KAAKC,UAAYY,KAAKC,OAIxBf,EAAAG,UAAAa,YAAA,WACEC,aAAahB,KAAKU,eAIpBX,EAAAG,UAAAe,WAAA,WAAA,IAAAb,EAAAJ,KACE,IAAMkB,EAAWL,KAAKC,MAAQd,KAAKC,UACnC,GAAIiB,EAAW,IAAK,CAClBF,aAAahB,KAAKU,cAEpB,GAAIV,KAAKK,WAAY,CACnBL,KAAKM,MAAQ,MACbC,YAAW,WACT,IAAKH,EAAKE,MAAO,CACfF,EAAKI,MAAQ,SAEdR,KAAKmB,iBAIZpB,EAAAG,UAAAkB,mBAAA,WACE,IAAMC,EAAKrB,KAAKqB,GAChBA,EAAGC,WAAWC,SAAQ,SAAAC,
|
|
1
|
+
{"version":3,"sources":["src/components/view/style/index.scss?tag=taro-view-core","src/components/view/view.tsx"],"names":["indexCss","View","this","startTime","prototype","onTouchStart","_this","hoverClass","touch","setTimeout","hover","hoverStartTime","timeoutEvent","onLongPress","emit","Date","now","onTouchMove","clearTimeout","onTouchEnd","spanTime","hoverStayTime","componentDidRender","el","childNodes","forEach","item","nodeType","document","COMMENT_NODE","render","cls","classNames","_a","concat","attr","animation","h","Host","Object","assign","class"],"mappings":"qJAAA,IAAMA,SAAW,gLCOJC,KAAI,mGAePC,KAAAC,UAAY,yEAVK,sBACD,eACP,iBACA,MAUjBF,EAAAG,UAAAC,aAAA,WAAA,IAAAC,EAAAJ,KACE,GAAIA,KAAKK,WAAY,CACnBL,KAAKM,MAAQ,KACbC,YAAW,WACT,GAAIH,EAAKE,MAAO,CACdF,EAAKI,MAAQ,QAEdR,KAAKS,gBAGVT,KAAKU,aAAeH,YAAW,WAC7BH,EAAKO,YAAYC,SAChB,KACHZ,KAAKC,UAAYY,KAAKC,OAIxBf,EAAAG,UAAAa,YAAA,WACEC,aAAahB,KAAKU,eAIpBX,EAAAG,UAAAe,WAAA,WAAA,IAAAb,EAAAJ,KACE,IAAMkB,EAAWL,KAAKC,MAAQd,KAAKC,UACnC,GAAIiB,EAAW,IAAK,CAClBF,aAAahB,KAAKU,cAEpB,GAAIV,KAAKK,WAAY,CACnBL,KAAKM,MAAQ,MACbC,YAAW,WACT,IAAKH,EAAKE,MAAO,CACfF,EAAKI,MAAQ,SAEdR,KAAKmB,iBAIZpB,EAAAG,UAAAkB,mBAAA,WACE,IAAMC,EAAKrB,KAAKqB,GAChBA,EAAGC,WAAWC,SAAQ,SAAAC,GAEpB,GAAIA,EAAKC,WAAaC,SAASC,cAAgBH,EAAK,QAASA,EAAK,QAAU,MAE5E,GAAIA,EAAKC,WAAaC,SAASC,cAAgBH,EAAK,QAASA,EAAK,QAAU,UAIhFzB,EAAAG,UAAA0B,OAAA,iBACE,IAAMC,EAAMC,YAAUC,EAAA,GACpBA,EAAC,GAAAC,OAAGhC,KAAKK,aAAeL,KAAKQ,UAE/B,IAAIyB,EAAO,GACX,KAAMjC,KAAKkC,UAAW,CACpBD,EAAK,aAAejC,KAAKkC,UACzBD,EAAK,kBAAoBjC,KAAKkC,UAEhC,OACEC,EAACC,KAAIC,OAAAC,OAAA,CAACC,MAAOV,GAASI,GACpBE,EAAA,OAAA,sIA5ES","sourcesContent":["body,\nhtml {\n user-select: none;\n -webkit-tap-highlight-color: rgb(0 0 0 / 0%);\n}\n\ntaro-view-core {\n display: block;\n}\n","import { Component, Prop, h, ComponentInterface, Host, Listen, State, Event, EventEmitter, Element } from '@stencil/core'\nimport classNames from 'classnames'\n\n@Component({\n tag: 'taro-view-core',\n styleUrl: './style/index.scss'\n})\nexport class View implements ComponentInterface {\n @Element() el: HTMLElement\n\n @Prop() animation: string\n @Prop() hoverClass: string\n @Prop() hoverStartTime = 50\n @Prop() hoverStayTime = 400\n @State() hover = false\n @State() touch = false\n\n @Event({\n eventName: 'longpress'\n }) onLongPress: EventEmitter\n\n private timeoutEvent: ReturnType<typeof setTimeout>\n private startTime = 0\n\n @Listen('touchstart')\n onTouchStart () {\n if (this.hoverClass) {\n this.touch = true\n setTimeout(() => {\n if (this.touch) {\n this.hover = true\n }\n }, this.hoverStartTime)\n }\n\n this.timeoutEvent = setTimeout(() => {\n this.onLongPress.emit()\n }, 350)\n this.startTime = Date.now()\n }\n\n @Listen('touchmove')\n onTouchMove () {\n clearTimeout(this.timeoutEvent)\n }\n\n @Listen('touchend')\n onTouchEnd () {\n const spanTime = Date.now() - this.startTime\n if (spanTime < 350) {\n clearTimeout(this.timeoutEvent)\n }\n if (this.hoverClass) {\n this.touch = false\n setTimeout(() => {\n if (!this.touch) {\n this.hover = false\n }\n }, this.hoverStayTime)\n }\n }\n\n componentDidRender () {\n const el = this.el\n el.childNodes.forEach(item => {\n // Note: ['s-cn'] Content Reference Node\n if (item.nodeType === document.COMMENT_NODE && item['s-cn']) item['s-cn'] = false\n // Note: ['s-sr'] Is a slot reference node (渲染完成后禁用 slotRelocation 特性, 避免 Stencil 组件相互调用时内置排序与第三方 UI 框架冲突导致组件顺序混乱)\n if (item.nodeType !== document.COMMENT_NODE && item['s-sr']) item['s-sr'] = false\n })\n }\n\n render() {\n const cls = classNames({\n [`${this.hoverClass}`]: this.hover\n })\n let attr = {}\n if (!!this.animation) {\n attr['animation'] = this.animation\n attr['data-animation'] = this.animation\n }\n return (\n <Host class={cls} {...attr}>\n <slot></slot>\n </Host>\n )\n }\n}\n"]}
|
|
@@ -1,15 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
4
|
-
|
|
5
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
6
|
-
|
|
1
|
+
import _objectSpread from "/home/runner/work/taro/taro/node_modules/.pnpm/registry.npmjs.org+@babel+runtime@7.18.3/node_modules/@babel/runtime/helpers/esm/objectSpread2.js";
|
|
7
2
|
import React from 'react';
|
|
8
3
|
import reactifyWc from './reactify-wc';
|
|
9
4
|
var Input = reactifyWc('taro-input-core');
|
|
10
5
|
var h = React.createElement; // eslint-disable-next-line react/display-name
|
|
11
6
|
|
|
12
|
-
export default React.forwardRef(function (props, ref) {
|
|
7
|
+
export default /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
13
8
|
var args = _objectSpread({}, props);
|
|
14
9
|
|
|
15
10
|
if (args.hasOwnProperty('focus')) {
|
|
@@ -1,20 +1,13 @@
|
|
|
1
|
-
import
|
|
2
|
-
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
3
|
-
import _typeof from "@babel/runtime/helpers/typeof";
|
|
4
|
-
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
5
|
-
import _createClass from "@babel/runtime/helpers/createClass";
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
|
|
11
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
12
|
-
|
|
13
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
14
|
-
|
|
15
|
-
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
16
|
-
|
|
17
|
-
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
1
|
+
import _objectSpread from "/home/runner/work/taro/taro/node_modules/.pnpm/registry.npmjs.org+@babel+runtime@7.18.3/node_modules/@babel/runtime/helpers/esm/objectSpread2.js";
|
|
2
|
+
import _slicedToArray from "/home/runner/work/taro/taro/node_modules/.pnpm/registry.npmjs.org+@babel+runtime@7.18.3/node_modules/@babel/runtime/helpers/esm/slicedToArray.js";
|
|
3
|
+
import _typeof from "/home/runner/work/taro/taro/node_modules/.pnpm/registry.npmjs.org+@babel+runtime@7.18.3/node_modules/@babel/runtime/helpers/esm/typeof.js";
|
|
4
|
+
import _classCallCheck from "/home/runner/work/taro/taro/node_modules/.pnpm/registry.npmjs.org+@babel+runtime@7.18.3/node_modules/@babel/runtime/helpers/esm/classCallCheck.js";
|
|
5
|
+
import _createClass from "/home/runner/work/taro/taro/node_modules/.pnpm/registry.npmjs.org+@babel+runtime@7.18.3/node_modules/@babel/runtime/helpers/esm/createClass.js";
|
|
6
|
+
import _assertThisInitialized from "/home/runner/work/taro/taro/node_modules/.pnpm/registry.npmjs.org+@babel+runtime@7.18.3/node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js";
|
|
7
|
+
import _inherits from "/home/runner/work/taro/taro/node_modules/.pnpm/registry.npmjs.org+@babel+runtime@7.18.3/node_modules/@babel/runtime/helpers/esm/inherits.js";
|
|
8
|
+
import _createSuper from "/home/runner/work/taro/taro/node_modules/.pnpm/registry.npmjs.org+@babel+runtime@7.18.3/node_modules/@babel/runtime/helpers/esm/createSuper.js";
|
|
9
|
+
import _defineProperty from "/home/runner/work/taro/taro/node_modules/.pnpm/registry.npmjs.org+@babel+runtime@7.18.3/node_modules/@babel/runtime/helpers/esm/defineProperty.js";
|
|
10
|
+
import _toConsumableArray from "/home/runner/work/taro/taro/node_modules/.pnpm/registry.npmjs.org+@babel+runtime@7.18.3/node_modules/@babel/runtime/helpers/esm/toConsumableArray.js";
|
|
18
11
|
|
|
19
12
|
/**
|
|
20
13
|
* https://github.com/BBKolton/reactify-wc/
|
|
@@ -155,8 +148,13 @@ var reactifyWebComponent = function reactifyWebComponent(WC) {
|
|
|
155
148
|
_classCallCheck(this, Index);
|
|
156
149
|
|
|
157
150
|
_this = _super.call(this, props);
|
|
151
|
+
|
|
152
|
+
_defineProperty(_assertThisInitialized(_this), "eventHandlers", void 0);
|
|
153
|
+
|
|
154
|
+
_defineProperty(_assertThisInitialized(_this), "ref", void 0);
|
|
155
|
+
|
|
158
156
|
_this.eventHandlers = [];
|
|
159
|
-
_this.ref = createRef();
|
|
157
|
+
_this.ref = /*#__PURE__*/createRef();
|
|
160
158
|
return _this;
|
|
161
159
|
}
|
|
162
160
|
|
|
@@ -227,7 +225,7 @@ var reactifyWebComponent = function reactifyWebComponent(WC) {
|
|
|
227
225
|
ref: this.ref
|
|
228
226
|
};
|
|
229
227
|
if (dangerouslySetInnerHTML) props.dangerouslySetInnerHTML = dangerouslySetInnerHTML;
|
|
230
|
-
return createElement(WC, props, children);
|
|
228
|
+
return /*#__PURE__*/createElement(WC, props, children);
|
|
231
229
|
}
|
|
232
230
|
}]);
|
|
233
231
|
|
|
@@ -235,7 +233,7 @@ var reactifyWebComponent = function reactifyWebComponent(WC) {
|
|
|
235
233
|
}(React.Component); // eslint-disable-next-line react/display-name
|
|
236
234
|
|
|
237
235
|
|
|
238
|
-
return React.forwardRef(function (props, ref) {
|
|
236
|
+
return /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
239
237
|
return h(Index, _objectSpread(_objectSpread({}, props), {}, {
|
|
240
238
|
forwardRef: ref
|
|
241
239
|
}));
|
package/dist/react/components.js
CHANGED
|
@@ -45,6 +45,7 @@ export var Map = /*@__PURE__*/createReactComponent('taro-map-core', undefined, m
|
|
|
45
45
|
export var MatchMedia = /*@__PURE__*/createReactComponent('taro-match-media-core', undefined, manipulatePropsFunction);
|
|
46
46
|
export var MovableArea = /*@__PURE__*/createReactComponent('taro-movable-area-core', undefined, manipulatePropsFunction);
|
|
47
47
|
export var MovableView = /*@__PURE__*/createReactComponent('taro-movable-view-core', undefined, manipulatePropsFunction);
|
|
48
|
+
export var NativeSlot = /*@__PURE__*/createReactComponent('taro-native-slot-core', undefined, manipulatePropsFunction);
|
|
48
49
|
export var NavigationBar = /*@__PURE__*/createReactComponent('taro-navigation-bar-core', undefined, manipulatePropsFunction);
|
|
49
50
|
export var Navigator = /*@__PURE__*/createReactComponent('taro-navigator-core', undefined, manipulatePropsFunction);
|
|
50
51
|
export var OfficialAccount = /*@__PURE__*/createReactComponent('taro-official-account-core', undefined, manipulatePropsFunction);
|
|
@@ -66,7 +67,7 @@ export var RtcRoomItem = /*@__PURE__*/createReactComponent('taro-rtc-room-item-c
|
|
|
66
67
|
export var ScrollView = /*@__PURE__*/createReactComponent('taro-scroll-view-core', undefined, manipulatePropsFunction);
|
|
67
68
|
export var ShareElement = /*@__PURE__*/createReactComponent('taro-share-element-core', undefined, manipulatePropsFunction);
|
|
68
69
|
export var Slider = /*@__PURE__*/createReactComponent('taro-slider-core', undefined, manipulatePropsFunction);
|
|
69
|
-
export var Slot =
|
|
70
|
+
export var Slot = /*@__PURE__*/createReactComponent('taro-slot-core', undefined, manipulatePropsFunction);
|
|
70
71
|
export var Swiper = /*@__PURE__*/createReactComponent('taro-swiper-core', undefined, manipulatePropsFunction);
|
|
71
72
|
export var SwiperItem = /*@__PURE__*/createReactComponent('taro-swiper-item-core', undefined, manipulatePropsFunction);
|
|
72
73
|
export var Switch = /*@__PURE__*/createReactComponent('taro-switch-core', undefined, manipulatePropsFunction);
|
package/dist/react/helper.js
CHANGED
|
@@ -1,9 +1,4 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
4
|
-
|
|
5
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
6
|
-
|
|
1
|
+
import _objectSpread from "/home/runner/work/taro/taro/node_modules/.pnpm/registry.npmjs.org+@babel+runtime@7.18.3/node_modules/@babel/runtime/helpers/esm/objectSpread2.js";
|
|
7
2
|
export var manipulatePropsFunction = function manipulatePropsFunction(originalProps) {
|
|
8
3
|
var propsToPass = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
9
4
|
var dangerouslySetInnerHTML = originalProps.dangerouslySetInnerHTML;
|
|
@@ -1,22 +1,13 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
1
|
+
import _objectSpread from "/home/runner/work/taro/taro/node_modules/.pnpm/registry.npmjs.org+@babel+runtime@7.18.3/node_modules/@babel/runtime/helpers/esm/objectSpread2.js";
|
|
2
|
+
import _typeof from "/home/runner/work/taro/taro/node_modules/.pnpm/registry.npmjs.org+@babel+runtime@7.18.3/node_modules/@babel/runtime/helpers/esm/typeof.js";
|
|
3
|
+
import _objectWithoutProperties from "/home/runner/work/taro/taro/node_modules/.pnpm/registry.npmjs.org+@babel+runtime@7.18.3/node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js";
|
|
4
|
+
import _classCallCheck from "/home/runner/work/taro/taro/node_modules/.pnpm/registry.npmjs.org+@babel+runtime@7.18.3/node_modules/@babel/runtime/helpers/esm/classCallCheck.js";
|
|
5
|
+
import _createClass from "/home/runner/work/taro/taro/node_modules/.pnpm/registry.npmjs.org+@babel+runtime@7.18.3/node_modules/@babel/runtime/helpers/esm/createClass.js";
|
|
6
|
+
import _assertThisInitialized from "/home/runner/work/taro/taro/node_modules/.pnpm/registry.npmjs.org+@babel+runtime@7.18.3/node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js";
|
|
7
|
+
import _inherits from "/home/runner/work/taro/taro/node_modules/.pnpm/registry.npmjs.org+@babel+runtime@7.18.3/node_modules/@babel/runtime/helpers/esm/inherits.js";
|
|
8
|
+
import _createSuper from "/home/runner/work/taro/taro/node_modules/.pnpm/registry.npmjs.org+@babel+runtime@7.18.3/node_modules/@babel/runtime/helpers/esm/createSuper.js";
|
|
9
|
+
import _defineProperty from "/home/runner/work/taro/taro/node_modules/.pnpm/registry.npmjs.org+@babel+runtime@7.18.3/node_modules/@babel/runtime/helpers/esm/defineProperty.js";
|
|
10
10
|
var _excluded = ["children", "forwardedRef", "style", "className", "ref"];
|
|
11
|
-
|
|
12
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
13
|
-
|
|
14
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
15
|
-
|
|
16
|
-
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
17
|
-
|
|
18
|
-
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
19
|
-
|
|
20
11
|
import React, { createElement } from 'react';
|
|
21
12
|
import { attachProps, camelToDashCase, createForwardRef, dashToPascalCase, isCoveredByReact, mergeRefs } from './utils';
|
|
22
13
|
export var createReactComponent = function createReactComponent(tagName, ReactComponentContext, manipulatePropsFunction, defineCustomElement) {
|
|
@@ -38,6 +29,8 @@ export var createReactComponent = function createReactComponent(tagName, ReactCo
|
|
|
38
29
|
|
|
39
30
|
_this = _super.call(this, props);
|
|
40
31
|
|
|
32
|
+
_defineProperty(_assertThisInitialized(_this), "componentEl", void 0);
|
|
33
|
+
|
|
41
34
|
_defineProperty(_assertThisInitialized(_this), "setComponentElRef", function (element) {
|
|
42
35
|
_this.componentEl = element;
|
|
43
36
|
});
|
|
@@ -105,7 +98,7 @@ export var createReactComponent = function createReactComponent(tagName, ReactCo
|
|
|
105
98
|
*/
|
|
106
99
|
|
|
107
100
|
|
|
108
|
-
return createElement(tagName, newProps, children);
|
|
101
|
+
return /*#__PURE__*/createElement(tagName, newProps, children);
|
|
109
102
|
}
|
|
110
103
|
}], [{
|
|
111
104
|
key: "displayName",
|
|
@@ -1,27 +1,18 @@
|
|
|
1
|
-
import
|
|
2
|
-
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
1
|
+
import _objectSpread from "/home/runner/work/taro/taro/node_modules/.pnpm/registry.npmjs.org+@babel+runtime@7.18.3/node_modules/@babel/runtime/helpers/esm/objectSpread2.js";
|
|
2
|
+
import _objectWithoutProperties from "/home/runner/work/taro/taro/node_modules/.pnpm/registry.npmjs.org+@babel+runtime@7.18.3/node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js";
|
|
3
|
+
import _regeneratorRuntime from "/home/runner/work/taro/taro/node_modules/.pnpm/registry.npmjs.org+@babel+runtime@7.18.3/node_modules/@babel/runtime/helpers/esm/regeneratorRuntime.js";
|
|
4
|
+
import _asyncToGenerator from "/home/runner/work/taro/taro/node_modules/.pnpm/registry.npmjs.org+@babel+runtime@7.18.3/node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js";
|
|
5
|
+
import _classCallCheck from "/home/runner/work/taro/taro/node_modules/.pnpm/registry.npmjs.org+@babel+runtime@7.18.3/node_modules/@babel/runtime/helpers/esm/classCallCheck.js";
|
|
6
|
+
import _createClass from "/home/runner/work/taro/taro/node_modules/.pnpm/registry.npmjs.org+@babel+runtime@7.18.3/node_modules/@babel/runtime/helpers/esm/createClass.js";
|
|
7
|
+
import _assertThisInitialized from "/home/runner/work/taro/taro/node_modules/.pnpm/registry.npmjs.org+@babel+runtime@7.18.3/node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js";
|
|
8
|
+
import _inherits from "/home/runner/work/taro/taro/node_modules/.pnpm/registry.npmjs.org+@babel+runtime@7.18.3/node_modules/@babel/runtime/helpers/esm/inherits.js";
|
|
9
|
+
import _createSuper from "/home/runner/work/taro/taro/node_modules/.pnpm/registry.npmjs.org+@babel+runtime@7.18.3/node_modules/@babel/runtime/helpers/esm/createSuper.js";
|
|
10
|
+
import _defineProperty from "/home/runner/work/taro/taro/node_modules/.pnpm/registry.npmjs.org+@babel+runtime@7.18.3/node_modules/@babel/runtime/helpers/esm/defineProperty.js";
|
|
10
11
|
var _excluded = ["children", "isOpen", "onDidDismiss", "onDidPresent", "onWillDismiss", "onWillPresent"];
|
|
11
|
-
|
|
12
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
13
|
-
|
|
14
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
15
|
-
|
|
16
|
-
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
17
|
-
|
|
18
|
-
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
19
|
-
|
|
20
|
-
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
21
|
-
|
|
22
12
|
import React from 'react';
|
|
23
13
|
import ReactDOM from 'react-dom';
|
|
24
14
|
import { attachProps, dashToPascalCase, defineCustomElement, setRef } from './utils';
|
|
15
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
25
16
|
export var createOverlayComponent = function createOverlayComponent(tagName, controller, customElement) {
|
|
26
17
|
defineCustomElement(tagName, customElement);
|
|
27
18
|
var displayName = dashToPascalCase(tagName);
|
|
@@ -43,6 +34,10 @@ export var createOverlayComponent = function createOverlayComponent(tagName, con
|
|
|
43
34
|
|
|
44
35
|
_this = _super.call(this, props);
|
|
45
36
|
|
|
37
|
+
_defineProperty(_assertThisInitialized(_this), "overlay", void 0);
|
|
38
|
+
|
|
39
|
+
_defineProperty(_assertThisInitialized(_this), "el", void 0);
|
|
40
|
+
|
|
46
41
|
if (typeof document !== 'undefined') {
|
|
47
42
|
_this.el = document.createElement('div');
|
|
48
43
|
}
|
|
@@ -87,8 +82,8 @@ export var createOverlayComponent = function createOverlayComponent(tagName, con
|
|
|
87
82
|
}, {
|
|
88
83
|
key: "componentDidUpdate",
|
|
89
84
|
value: function () {
|
|
90
|
-
var _componentDidUpdate = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(prevProps) {
|
|
91
|
-
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
85
|
+
var _componentDidUpdate = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(prevProps) {
|
|
86
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
92
87
|
while (1) {
|
|
93
88
|
switch (_context.prev = _context.next) {
|
|
94
89
|
case 0:
|
|
@@ -135,13 +130,13 @@ export var createOverlayComponent = function createOverlayComponent(tagName, con
|
|
|
135
130
|
}, {
|
|
136
131
|
key: "present",
|
|
137
132
|
value: function () {
|
|
138
|
-
var _present = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2(prevProps) {
|
|
133
|
+
var _present = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(prevProps) {
|
|
139
134
|
var _this2 = this,
|
|
140
135
|
_objectSpread2;
|
|
141
136
|
|
|
142
137
|
var _this$props, children, isOpen, onDidDismiss, onDidPresent, onWillDismiss, onWillPresent, cProps, elementProps;
|
|
143
138
|
|
|
144
|
-
return _regeneratorRuntime.wrap(function _callee2$(_context2) {
|
|
139
|
+
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
145
140
|
while (1) {
|
|
146
141
|
switch (_context2.prev = _context2.next) {
|
|
147
142
|
case 0:
|
|
@@ -190,7 +185,7 @@ export var createOverlayComponent = function createOverlayComponent(tagName, con
|
|
|
190
185
|
* overlay is dismissing otherwise component
|
|
191
186
|
* will be hidden before animation is done.
|
|
192
187
|
*/
|
|
193
|
-
return ReactDOM.createPortal(this.props.isOpen || isDismissing ? this.props.children : null, this.el);
|
|
188
|
+
return /*#__PURE__*/ReactDOM.createPortal(this.props.isOpen || isDismissing ? this.props.children : null, this.el);
|
|
194
189
|
}
|
|
195
190
|
}], [{
|
|
196
191
|
key: "displayName",
|
|
@@ -202,7 +197,9 @@ export var createOverlayComponent = function createOverlayComponent(tagName, con
|
|
|
202
197
|
return Overlay;
|
|
203
198
|
}(React.Component);
|
|
204
199
|
|
|
205
|
-
return React.forwardRef(function (props, ref) {
|
|
206
|
-
return
|
|
200
|
+
return /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
201
|
+
return /*#__PURE__*/_jsx(Overlay, _objectSpread(_objectSpread({}, props), {}, {
|
|
202
|
+
forwardedRef: ref
|
|
203
|
+
}));
|
|
207
204
|
});
|
|
208
205
|
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import _typeof from "@babel/runtime/helpers/typeof";
|
|
1
|
+
import _typeof from "/home/runner/work/taro/taro/node_modules/.pnpm/registry.npmjs.org+@babel+runtime@7.18.3/node_modules/@babel/runtime/helpers/esm/typeof.js";
|
|
2
2
|
import { camelToDashCase } from './case';
|
|
3
3
|
export var attachProps = function attachProps(node, newProps) {
|
|
4
4
|
var oldProps = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
+
import _objectSpread from "/home/runner/work/taro/taro/node_modules/.pnpm/registry.npmjs.org+@babel+runtime@7.18.3/node_modules/@babel/runtime/helpers/esm/objectSpread2.js";
|
|
1
2
|
import React from 'react';
|
|
3
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
4
|
export var setRef = function setRef(ref, value) {
|
|
3
5
|
if (typeof ref === 'function') {
|
|
4
6
|
ref(value);
|
|
@@ -20,11 +22,13 @@ export var mergeRefs = function mergeRefs() {
|
|
|
20
22
|
};
|
|
21
23
|
export var createForwardRef = function createForwardRef(ReactComponent, displayName) {
|
|
22
24
|
var forwardRef = function forwardRef(props, ref) {
|
|
23
|
-
return
|
|
25
|
+
return /*#__PURE__*/_jsx(ReactComponent, _objectSpread(_objectSpread({}, props), {}, {
|
|
26
|
+
forwardedRef: ref
|
|
27
|
+
}));
|
|
24
28
|
};
|
|
25
29
|
|
|
26
30
|
forwardRef.displayName = displayName;
|
|
27
|
-
return React.forwardRef(forwardRef);
|
|
31
|
+
return /*#__PURE__*/React.forwardRef(forwardRef);
|
|
28
32
|
};
|
|
29
33
|
export var defineCustomElement = function defineCustomElement(tagName, customElement) {
|
|
30
34
|
if (customElement !== undefined && typeof customElements !== 'undefined' && !customElements.get(tagName)) {
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{r as o,h as r,H as t}from"./p-5bfefd19.js";import{n as s}from"./p-6a96da58.js";import"@tarojs/taro";const a=class{constructor(r){o(this,r)}componentDidLoad(){s("Slot",this)}render(){return r(t,null)}};export{a as taro_slot_core};
|
|
2
|
+
//# sourceMappingURL=p-186ad7ff.entry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["src/components/slot/slot.tsx"],"names":["Slot","[object Object]","notSupport","this","h","Host"],"mappings":"iHAOaA,EAAI,+BACfC,mBACEC,EAAW,OAAQC,MAGrBF,SACE,OACEG,EAACC,EAAI","sourcesContent":["import { Component, ComponentInterface, h, Host } from '@stencil/core'\n\nimport { notSupport } from '../../utils'\n\n@Component({\n tag: 'taro-slot-core'\n})\nexport class Slot implements ComponentInterface {\n componentDidLoad () {\n notSupport('Slot', this)\n }\n\n render () {\n return (\n <Host />\n )\n }\n}\n"]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{r as t,c as s,h as e,H as i,g as o}from"./p-5bfefd19.js";import{c as h}from"./p-76724e58.js";const n="body,html{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-tap-highlight-color:rgba(0, 0, 0, 0)}taro-view-core{display:block}";const r=class{constructor(e){t(this,e);this.onLongPress=s(this,"longpress",7);this.startTime=0;this.animation=undefined;this.hoverClass=undefined;this.hoverStartTime=50;this.hoverStayTime=400;this.hover=false;this.touch=false}onTouchStart(){if(this.hoverClass){this.touch=true;setTimeout((()=>{if(this.touch){this.hover=true}}),this.hoverStartTime)}this.timeoutEvent=setTimeout((()=>{this.onLongPress.emit()}),350);this.startTime=Date.now()}onTouchMove(){clearTimeout(this.timeoutEvent)}onTouchEnd(){const t=Date.now()-this.startTime;if(t<350){clearTimeout(this.timeoutEvent)}if(this.hoverClass){this.touch=false;setTimeout((()=>{if(!this.touch){this.hover=false}}),this.hoverStayTime)}}componentDidRender(){const t=this.el;t.childNodes.forEach((t=>{if(t.nodeType===document.COMMENT_NODE&&t["s-cn"])t["s-cn"]=false}))}render(){const t=h({[`${this.hoverClass}`]:this.hover});let s={};if(!!this.animation){s["animation"]=this.animation;s["data-animation"]=this.animation}return e(i,Object.assign({class:t},s),e("slot",null))}get el(){return o(this)}};r.style=n;export{r as taro_view_core};
|
|
2
|
-
//# sourceMappingURL=p-
|
|
1
|
+
import{r as t,c as s,h as e,H as i,g as o}from"./p-5bfefd19.js";import{c as h}from"./p-76724e58.js";const n="body,html{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-tap-highlight-color:rgba(0, 0, 0, 0)}taro-view-core{display:block}";const r=class{constructor(e){t(this,e);this.onLongPress=s(this,"longpress",7);this.startTime=0;this.animation=undefined;this.hoverClass=undefined;this.hoverStartTime=50;this.hoverStayTime=400;this.hover=false;this.touch=false}onTouchStart(){if(this.hoverClass){this.touch=true;setTimeout((()=>{if(this.touch){this.hover=true}}),this.hoverStartTime)}this.timeoutEvent=setTimeout((()=>{this.onLongPress.emit()}),350);this.startTime=Date.now()}onTouchMove(){clearTimeout(this.timeoutEvent)}onTouchEnd(){const t=Date.now()-this.startTime;if(t<350){clearTimeout(this.timeoutEvent)}if(this.hoverClass){this.touch=false;setTimeout((()=>{if(!this.touch){this.hover=false}}),this.hoverStayTime)}}componentDidRender(){const t=this.el;t.childNodes.forEach((t=>{if(t.nodeType===document.COMMENT_NODE&&t["s-cn"])t["s-cn"]=false;if(t.nodeType!==document.COMMENT_NODE&&t["s-sr"])t["s-sr"]=false}))}render(){const t=h({[`${this.hoverClass}`]:this.hover});let s={};if(!!this.animation){s["animation"]=this.animation;s["data-animation"]=this.animation}return e(i,Object.assign({class:t},s),e("slot",null))}get el(){return o(this)}};r.style=n;export{r as taro_view_core};
|
|
2
|
+
//# sourceMappingURL=p-19afe402.entry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["src/components/view/style/index.scss?tag=taro-view-core","src/components/view/view.tsx"],"names":["indexCss","View","this","startTime","[object Object]","hoverClass","touch","setTimeout","hover","hoverStartTime","timeoutEvent","onLongPress","emit","Date","now","clearTimeout","spanTime","hoverStayTime","el","childNodes","forEach","item","nodeType","document","COMMENT_NODE","cls","classNames","attr","animation","h","Host","Object","assign","class"],"mappings":"oGAAA,MAAMA,EAAW,kLCOJC,EAAI,sEAePC,KAAAC,UAAY,yEAVK,sBACD,eACP,iBACA,MAUjBC,eACE,GAAIF,KAAKG,WAAY,CACnBH,KAAKI,MAAQ,KACbC,YAAW,KACT,GAAIL,KAAKI,MAAO,CACdJ,KAAKM,MAAQ,QAEdN,KAAKO,gBAGVP,KAAKQ,aAAeH,YAAW,KAC7BL,KAAKS,YAAYC,SAChB,KACHV,KAAKC,UAAYU,KAAKC,MAIxBV,cACEW,aAAab,KAAKQ,cAIpBN,aACE,MAAMY,EAAWH,KAAKC,MAAQZ,KAAKC,UACnC,GAAIa,EAAW,IAAK,CAClBD,aAAab,KAAKQ,cAEpB,GAAIR,KAAKG,WAAY,CACnBH,KAAKI,MAAQ,MACbC,YAAW,KACT,IAAKL,KAAKI,MAAO,CACfJ,KAAKM,MAAQ,SAEdN,KAAKe,gBAIZb,qBACE,MAAMc,EAAKhB,KAAKgB,GAChBA,EAAGC,WAAWC,SAAQC,IAEpB,GAAIA,EAAKC,WAAaC,SAASC,cAAgBH,EAAK,QAASA,EAAK,QAAU,MAE5E,GAAIA,EAAKC,WAAaC,SAASC,cAAgBH,EAAK,QAASA,EAAK,QAAU,SAIhFjB,SACE,MAAMqB,EAAMC,EAAW,CACrBtB,CAAC,GAAGF,KAAKG,cAAeH,KAAKM,QAE/B,IAAImB,EAAO,GACX,KAAMzB,KAAK0B,UAAW,CACpBD,EAAK,aAAezB,KAAK0B,UACzBD,EAAK,kBAAoBzB,KAAK0B,UAEhC,OACEC,EAACC,EAAIC,OAAAC,OAAA,CAACC,MAAOR,GAASE,GACpBE,EAAA,OAAA","sourcesContent":["body,\nhtml {\n user-select: none;\n -webkit-tap-highlight-color: rgb(0 0 0 / 0%);\n}\n\ntaro-view-core {\n display: block;\n}\n","import { Component, Prop, h, ComponentInterface, Host, Listen, State, Event, EventEmitter, Element } from '@stencil/core'\nimport classNames from 'classnames'\n\n@Component({\n tag: 'taro-view-core',\n styleUrl: './style/index.scss'\n})\nexport class View implements ComponentInterface {\n @Element() el: HTMLElement\n\n @Prop() animation: string\n @Prop() hoverClass: string\n @Prop() hoverStartTime = 50\n @Prop() hoverStayTime = 400\n @State() hover = false\n @State() touch = false\n\n @Event({\n eventName: 'longpress'\n }) onLongPress: EventEmitter\n\n private timeoutEvent: ReturnType<typeof setTimeout>\n private startTime = 0\n\n @Listen('touchstart')\n onTouchStart () {\n if (this.hoverClass) {\n this.touch = true\n setTimeout(() => {\n if (this.touch) {\n this.hover = true\n }\n }, this.hoverStartTime)\n }\n\n this.timeoutEvent = setTimeout(() => {\n this.onLongPress.emit()\n }, 350)\n this.startTime = Date.now()\n }\n\n @Listen('touchmove')\n onTouchMove () {\n clearTimeout(this.timeoutEvent)\n }\n\n @Listen('touchend')\n onTouchEnd () {\n const spanTime = Date.now() - this.startTime\n if (spanTime < 350) {\n clearTimeout(this.timeoutEvent)\n }\n if (this.hoverClass) {\n this.touch = false\n setTimeout(() => {\n if (!this.touch) {\n this.hover = false\n }\n }, this.hoverStayTime)\n }\n }\n\n componentDidRender () {\n const el = this.el\n el.childNodes.forEach(item => {\n // Note: ['s-cn'] Content Reference Node\n if (item.nodeType === document.COMMENT_NODE && item['s-cn']) item['s-cn'] = false\n // Note: ['s-sr'] Is a slot reference node (渲染完成后禁用 slotRelocation 特性, 避免 Stencil 组件相互调用时内置排序与第三方 UI 框架冲突导致组件顺序混乱)\n if (item.nodeType !== document.COMMENT_NODE && item['s-sr']) item['s-sr'] = false\n })\n }\n\n render() {\n const cls = classNames({\n [`${this.hoverClass}`]: this.hover\n })\n let attr = {}\n if (!!this.animation) {\n attr['animation'] = this.animation\n attr['data-animation'] = this.animation\n }\n return (\n <Host class={cls} {...attr}>\n <slot></slot>\n </Host>\n )\n }\n}\n"]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
System.register(["./p-8a8f286f.system.js","./p-15e45ed6.system.js","@tarojs/taro"],(function(t){"use strict";var n,e,o,r;return{setters:[function(t){n=t.r;e=t.h;o=t.H},function(t){r=t.n},function(){}],execute:function(){var s=t("taro_slot_core",function(){function t(t){n(this,t)}t.prototype.componentDidLoad=function(){r("Slot",this)};t.prototype.render=function(){return e(o,null)};return t}())}}}));
|
|
2
|
+
//# sourceMappingURL=p-1b1420c9.system.entry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["src/components/slot/slot.tsx"],"names":["Slot","exports","class_1","prototype","componentDidLoad","notSupport","this","render","h","Host"],"mappings":"gOAOaA,EAAIC,EAAA,iBAAA,mCACfC,EAAAC,UAAAC,iBAAA,WACEC,EAAW,OAAQC,OAGrBJ,EAAAC,UAAAI,OAAA,WACE,OACEC,EAACC,EAAI,gBAPM","sourcesContent":["import { Component, ComponentInterface, h, Host } from '@stencil/core'\n\nimport { notSupport } from '../../utils'\n\n@Component({\n tag: 'taro-slot-core'\n})\nexport class Slot implements ComponentInterface {\n componentDidLoad () {\n notSupport('Slot', this)\n }\n\n render () {\n return (\n <Host />\n )\n }\n}\n"]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{r as o,h as t,H as r}from"./p-5bfefd19.js";import{n as s}from"./p-6a96da58.js";import"@tarojs/taro";const a=class{constructor(t){o(this,t)}componentDidLoad(){s("NativeSlot",this)}render(){return t(r,null)}};export{a as taro_native_slot_core};
|
|
2
|
+
//# sourceMappingURL=p-51040638.entry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["src/components/slot/native-slot.tsx"],"names":["NativeSlot","[object Object]","notSupport","this","h","Host"],"mappings":"iHAOaA,EAAU,+BACrBC,mBACEC,EAAW,aAAcC,MAG3BF,SACE,OACEG,EAACC,EAAI","sourcesContent":["import { Component, ComponentInterface, h, Host } from '@stencil/core'\n\nimport { notSupport } from '../../utils'\n\n@Component({\n tag: 'taro-native-slot-core'\n})\nexport class NativeSlot implements ComponentInterface {\n componentDidLoad () {\n notSupport('NativeSlot', this)\n }\n\n render () {\n return (\n <Host />\n )\n }\n}\n"]}
|