@tarojs/components 3.6.0-canary.3 → 3.6.0-canary.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (89) hide show
  1. package/dist/cjs/loader.cjs.js +1 -1
  2. package/dist/cjs/taro-components.cjs.js +1 -1
  3. package/dist/cjs/taro-native-slot-core.cjs.entry.js +23 -0
  4. package/dist/cjs/taro-native-slot-core.cjs.entry.js.map +1 -0
  5. package/dist/cjs/taro-slot-core.cjs.entry.js +5 -0
  6. package/dist/cjs/taro-slot-core.cjs.entry.js.map +1 -1
  7. package/dist/cjs/taro-view-core.cjs.entry.js +6 -2
  8. package/dist/cjs/taro-view-core.cjs.entry.js.map +1 -1
  9. package/dist/collection/collection-manifest.json +1 -0
  10. package/dist/collection/components/slot/native-slot.js +12 -0
  11. package/dist/collection/components/slot/native-slot.js.map +1 -0
  12. package/dist/collection/components/slot/slot.js +4 -0
  13. package/dist/collection/components/slot/slot.js.map +1 -1
  14. package/dist/collection/components/view/view.js +6 -2
  15. package/dist/collection/components/view/view.js.map +1 -1
  16. package/dist/esm/loader.js +1 -1
  17. package/dist/esm/taro-components.js +1 -1
  18. package/dist/esm/taro-native-slot-core.entry.js +19 -0
  19. package/dist/esm/taro-native-slot-core.entry.js.map +1 -0
  20. package/dist/esm/taro-slot-core.entry.js +5 -0
  21. package/dist/esm/taro-slot-core.entry.js.map +1 -1
  22. package/dist/esm/taro-view-core.entry.js +6 -2
  23. package/dist/esm/taro-view-core.entry.js.map +1 -1
  24. package/dist/esm-es5/loader.js +1 -1
  25. package/dist/esm-es5/loader.js.map +1 -1
  26. package/dist/esm-es5/taro-components.js +1 -1
  27. package/dist/esm-es5/taro-components.js.map +1 -1
  28. package/dist/esm-es5/taro-native-slot-core.entry.js +2 -0
  29. package/dist/esm-es5/taro-native-slot-core.entry.js.map +1 -0
  30. package/dist/esm-es5/taro-slot-core.entry.js +1 -1
  31. package/dist/esm-es5/taro-slot-core.entry.js.map +1 -1
  32. package/dist/esm-es5/taro-view-core.entry.js +1 -1
  33. package/dist/esm-es5/taro-view-core.entry.js.map +1 -1
  34. package/dist/react/component-lib/input.js +2 -7
  35. package/dist/react/component-lib/reactify-wc.js +18 -20
  36. package/dist/react/components.js +2 -1
  37. package/dist/react/helper.js +1 -6
  38. package/dist/react/react-component-lib/createComponent.js +12 -19
  39. package/dist/react/react-component-lib/createOverlayComponent.js +24 -27
  40. package/dist/react/react-component-lib/interfaces.js +0 -1
  41. package/dist/react/react-component-lib/utils/attachProps.js +1 -1
  42. package/dist/react/react-component-lib/utils/index.js +6 -2
  43. package/dist/taro-components/p-186ad7ff.entry.js +2 -0
  44. package/dist/taro-components/p-186ad7ff.entry.js.map +1 -0
  45. package/dist/taro-components/{p-e9abe3e2.entry.js → p-19afe402.entry.js} +2 -2
  46. package/dist/taro-components/p-19afe402.entry.js.map +1 -0
  47. package/dist/taro-components/p-1b1420c9.system.entry.js +2 -0
  48. package/dist/taro-components/p-1b1420c9.system.entry.js.map +1 -0
  49. package/dist/taro-components/p-51040638.entry.js +2 -0
  50. package/dist/taro-components/p-51040638.entry.js.map +1 -0
  51. package/dist/taro-components/{p-c3acf0ea.system.entry.js → p-c43fe342.system.entry.js} +2 -2
  52. package/dist/taro-components/p-c43fe342.system.entry.js.map +1 -0
  53. package/dist/taro-components/p-cb17d8bd.system.js +1 -1
  54. package/dist/taro-components/p-cb17d8bd.system.js.map +1 -1
  55. package/dist/taro-components/p-fae28cc1.system.entry.js +2 -0
  56. package/dist/taro-components/p-fae28cc1.system.entry.js.map +1 -0
  57. package/dist/taro-components/taro-components.esm.js +1 -1
  58. package/dist/taro-components/taro-components.esm.js.map +1 -1
  59. package/dist/types/components/slot/native-slot.d.ts +5 -0
  60. package/dist/types/components/slot/slot.d.ts +1 -0
  61. package/dist/types/components.d.ts +13 -0
  62. package/dist/vue2/component-lib/createComponent.js +1 -1
  63. package/dist/vue2/component-lib/createFormsComponent.js +2 -7
  64. package/dist/vue2/component-lib/index.js +1 -1
  65. package/dist/vue2/component-lib/mixins/listeners.js +1 -6
  66. package/dist/vue2/component-lib/mixins/refs.js +1 -1
  67. package/dist/vue2/component-lib/picker.js +1 -6
  68. package/dist/vue2/component-lib/scroll-view.js +1 -6
  69. package/dist/vue2/components.js +5 -2
  70. package/dist/vue2/index.js +2 -2
  71. package/dist/vue2/vue-component-lib/utils.js +2 -6
  72. package/dist/vue3/component-lib/createComponent.js +1 -1
  73. package/dist/vue3/component-lib/createFormsComponent.js +3 -7
  74. package/dist/vue3/components.js +1 -0
  75. package/dist/vue3/index.js +1 -1
  76. package/dist/vue3/vue-component-lib/utils.js +3 -7
  77. package/package.json +5 -5
  78. package/types/CommentDetail.d.ts +2 -1
  79. package/types/CommentList.d.ts +7 -4
  80. package/types/Like.d.ts +4 -1
  81. package/types/NativeSlot.d.ts +32 -0
  82. package/types/Slot.d.ts +1 -1
  83. package/types/Video.d.ts +1 -3
  84. package/dist/taro-components/p-1e436d5b.entry.js +0 -2
  85. package/dist/taro-components/p-1e436d5b.entry.js.map +0 -1
  86. package/dist/taro-components/p-c3acf0ea.system.entry.js.map +0 -1
  87. package/dist/taro-components/p-d5579efa.system.entry.js +0 -2
  88. package/dist/taro-components/p-d5579efa.system.entry.js.map +0 -1
  89. package/dist/taro-components/p-e9abe3e2.entry.js.map +0 -1
@@ -1,10 +1,6 @@
1
- import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
2
- import _defineProperty from "@babel/runtime/helpers/defineProperty";
3
-
4
- 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; }
5
-
6
- 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; }
7
-
1
+ 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";
2
+ 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";
3
+ 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";
8
4
  import { computed, h, toRefs } from 'vue';
9
5
  import { useForwardRef } from './forwardRef';
10
6
  export default function createFormsComponent(name, eventName) {
@@ -43,6 +43,7 @@ export var Map = /*@__PURE__*/defineContainer('taro-map-core', undefined);
43
43
  export var MatchMedia = /*@__PURE__*/defineContainer('taro-match-media-core', undefined);
44
44
  export var MovableArea = /*@__PURE__*/defineContainer('taro-movable-area-core', undefined, ['scaleArea']);
45
45
  export var MovableView = /*@__PURE__*/defineContainer('taro-movable-view-core', undefined, ['x', 'y', 'direction', 'outOfBounds', 'inertia', 'friction', 'damping', 'disabled', 'scale', 'scaleMin', 'scaleMax', 'scaleValue', 'animation', 'change', 'scale', 'htouchmove', 'vtouchmove']);
46
+ export var NativeSlot = /*@__PURE__*/defineContainer('taro-native-slot-core', undefined);
46
47
  export var NavigationBar = /*@__PURE__*/defineContainer('taro-navigation-bar-core', undefined);
47
48
  export var Navigator = /*@__PURE__*/defineContainer('taro-navigator-core', undefined, ['hoverClass', 'url', 'openType', 'isHover', 'delta', 'cuccess', 'fail', 'Complete']);
48
49
  export var OfficialAccount = /*@__PURE__*/defineContainer('taro-official-account-core', undefined);
@@ -1,4 +1,4 @@
1
- import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
1
+ 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";
2
2
  import * as components from './components';
3
3
  export function initVue3Components(app) {
4
4
  app.config.isCustomElement = function (tag) {
@@ -1,10 +1,6 @@
1
- import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
- import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
3
-
4
- 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; }
5
-
6
- 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; }
7
-
1
+ 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";
2
+ 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";
3
+ 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";
8
4
  import { defineComponent, getCurrentInstance, h, inject, ref } from 'vue';
9
5
  var UPDATE_VALUE_EVENT = 'update:modelValue';
10
6
  var MODEL_VALUE = 'modelValue';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tarojs/components",
3
- "version": "3.6.0-canary.3",
3
+ "version": "3.6.0-canary.4",
4
4
  "description": "Taro 组件库",
5
5
  "browser": "dist/index.js",
6
6
  "main:h5": "dist/index.js",
@@ -29,14 +29,14 @@
29
29
  "author": "",
30
30
  "license": "MIT",
31
31
  "dependencies": {
32
- "@tarojs/router": "3.6.0-canary.3",
33
- "@tarojs/taro": "3.6.0-canary.3",
34
32
  "classnames": "^2.2.5",
35
33
  "hls.js": "^1.1.5",
36
34
  "intersection-observer": "^0.7.0",
37
35
  "resolve-pathname": "^3.0.0",
38
36
  "swiper": "6.8.0",
39
- "weui": "^1.1.2"
37
+ "weui": "^1.1.2",
38
+ "@tarojs/router": "3.6.0-canary.4",
39
+ "@tarojs/taro": "3.6.0-canary.4"
40
40
  },
41
41
  "devDependencies": {
42
42
  "@babel/generator": "^7.14.5",
@@ -53,7 +53,7 @@
53
53
  "csstype": "^3.1.1",
54
54
  "jquery": "^3.4.1",
55
55
  "lodash": "^4.17.21",
56
- "miniapp-types": "1.1.14",
56
+ "miniapp-types": "1.1.16",
57
57
  "puppeteer": "^19.2.0",
58
58
  "stencil-vue2-output-target": "0.0.4",
59
59
  "ts-node": "^10.9.1",
@@ -46,15 +46,16 @@ interface CommentDetailProps extends StandardProps {
46
46
  */
47
47
  onDelete?: CommonEventFunction
48
48
  }
49
-
50
49
  namespace CommentDetailProps {
51
50
  interface ICommentParam {
52
51
  /** 被点赞的文章的 id,与 path 参数一一对应
53
52
  * @example "20200101"
54
53
  */
55
54
  snid: string
55
+
56
56
  /** 文章标题 */
57
57
  title: string
58
+
58
59
  /** 智能小程序内页链接,最长不能超过 194 字符
59
60
  * @example "/pages/index/index"
60
61
  */
@@ -66,15 +66,16 @@ interface CommentListProps extends StandardProps {
66
66
  */
67
67
  onViewMore?: CommonEventFunction
68
68
  }
69
-
70
69
  namespace CommentListProps {
71
70
  interface ICommentParam {
72
71
  /** 被点赞的文章的 id,与 path 参数一一对应
73
72
  * @example "20200101"
74
73
  */
75
74
  snid: string
75
+
76
76
  /** 文章标题 */
77
77
  title: string
78
+
78
79
  /** 智能小程序内页链接,最长不能超过 194 字符
79
80
  * @example "/pages/index/index"
80
81
  */
@@ -84,29 +85,31 @@ namespace CommentListProps {
84
85
  */
85
86
  images?: string[]
86
87
  }
87
-
88
88
  interface IToolbarConfig {
89
89
  /** 输入框提示文字 */
90
90
  placeholder?: string
91
+
91
92
  /** 显示的互动模块,对应默认值分别是:评论数、点赞、收藏、分享
92
93
  * @default ['comment', 'like', 'favor', 'share']
93
94
  */
94
95
  moduleList?: string
96
+
95
97
  /** 若 moduleList 里配置了 share 模块,该参数为必填 */
96
98
  share?: IShare
97
99
  }
98
-
99
100
  interface IShare {
100
101
  /** 分享标题 */
101
102
  title: string
103
+
102
104
  /** 分享内容 */
103
105
  content?: string
106
+
104
107
  /** 分享图标 */
105
108
  imageUrl?: string
109
+
106
110
  /** 页面 path ,必须是以 / 开头的完整路径,如果 path 中参数包含中文字符,需对中文字符进行编码 */
107
111
  path?: string
108
112
  }
109
-
110
113
  interface IViewMoreStyle {
111
114
  /** 『全部 xx 条』的字体颜色,默认为视觉提供色号,开发者可传入自定义色号
112
115
  * @default "#3388ff"
package/types/Like.d.ts CHANGED
@@ -75,19 +75,22 @@ interface LikeProps extends StandardProps {
75
75
  */
76
76
  onFail?: CommonEventFunction
77
77
  }
78
-
79
78
  declare namespace LikeProps {
80
79
  interface ILikeParam {
81
80
  /** 用户身份唯一标识 */
82
81
  openid: string
82
+
83
83
  /** 被点赞的文章的 id,与 path 参数一一对应
84
84
  * @example "20200101"
85
85
  */
86
86
  snid: string
87
+
87
88
  /** 被点赞的评论 id */
88
89
  spid?: string
90
+
89
91
  /** 文章标题 */
90
92
  title: string
93
+
91
94
  /** 智能小程序内页链接,最长不能超过 194 字符
92
95
  * @example "/pages/index/index"
93
96
  */
@@ -0,0 +1,32 @@
1
+ import { ComponentType } from 'react'
2
+
3
+ interface NativeSlotProps {
4
+ /** 指定插入的 slot 位置
5
+ * @default none
6
+ * @supported weapp, swan, alipay, tt, jd, qq
7
+ */
8
+ name?: string
9
+ }
10
+
11
+ /** 编译的原生组件支持使用 slot 插槽
12
+ * @supported weapp, swan, alipay, tt, jd, qq
13
+ * @version 3.5.7+
14
+ * @example
15
+ * ```tsx
16
+ * import { NativeSlot, View } from '@tarojs/components'
17
+ *
18
+ * export default function () {
19
+ * render () {
20
+ * return (
21
+ * <View>
22
+ * <NativeSlot />
23
+ * </View>
24
+ * )
25
+ * }
26
+ * }
27
+ * ```
28
+ * @see https://github.com/NervJS/taro/pull/12627
29
+ */
30
+ declare const NativeSlot: ComponentType<NativeSlotProps>
31
+
32
+ export { NativeSlot, NativeSlotProps }
package/types/Slot.d.ts CHANGED
@@ -5,7 +5,7 @@ interface SlotProps {
5
5
  * @default none
6
6
  * @supported weapp, swan, alipay, tt, jd, qq
7
7
  */
8
- name?: string,
8
+ name?: string
9
9
  /** scoped slot 传入数据源
10
10
  * @default none
11
11
  * @supported swan
package/types/Video.d.ts CHANGED
@@ -636,10 +636,8 @@ declare namespace VideoProps {
636
636
  }
637
637
 
638
638
  /** 视频。相关api:Taro.createVideoContext
639
- *
640
- * 备注:h5上因为没有测试,所以暂时写了“待定”,需要`Video`来确认。
641
639
  * @classification media
642
- * @supported weapp, h5, swan, alipay, tt
640
+ * @supported weapp, swan, alipay, tt, h5, rn
643
641
  * @example_react
644
642
  * ```tsx
645
643
  * export default class PageView extends Component {
@@ -1,2 +0,0 @@
1
- import{r,h as s,H as o}from"./p-5bfefd19.js";const t=class{constructor(s){r(this,s)}render(){return s(o,null)}};export{t as taro_slot_core};
2
- //# sourceMappingURL=p-1e436d5b.entry.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["src/components/slot/slot.tsx"],"names":["Slot","[object Object]","h","Host"],"mappings":"mDAKaA,EAAI,+BACfC,SACE,OACEC,EAACC,EAAI","sourcesContent":["import { Component, ComponentInterface, h, Host } from '@stencil/core'\n\n@Component({\n tag: 'taro-slot-core'\n})\nexport class Slot implements ComponentInterface {\n render () {\n return (\n <Host />\n )\n }\n}\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["src/components/view/style/index.scss?tag=taro-view-core","src/components/view/view.tsx"],"names":["indexCss","View","exports","this","startTime","class_1","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":"gNAAA,IAAMA,EAAW,gLCOJC,EAAIC,EAAA,iBAAA,0EAePC,KAAAC,UAAY,yEAVK,sBACD,eACP,iBACA,MAUjBC,EAAAC,UAAAC,aAAA,WAAA,IAAAC,EAAAL,KACE,GAAIA,KAAKM,WAAY,CACnBN,KAAKO,MAAQ,KACbC,YAAW,WACT,GAAIH,EAAKE,MAAO,CACdF,EAAKI,MAAQ,QAEdT,KAAKU,gBAGVV,KAAKW,aAAeH,YAAW,WAC7BH,EAAKO,YAAYC,SAChB,KACHb,KAAKC,UAAYa,KAAKC,OAIxBb,EAAAC,UAAAa,YAAA,WACEC,aAAajB,KAAKW,eAIpBT,EAAAC,UAAAe,WAAA,WAAA,IAAAb,EAAAL,KACE,IAAMmB,EAAWL,KAAKC,MAAQf,KAAKC,UACnC,GAAIkB,EAAW,IAAK,CAClBF,aAAajB,KAAKW,cAEpB,GAAIX,KAAKM,WAAY,CACnBN,KAAKO,MAAQ,MACbC,YAAW,WACT,IAAKH,EAAKE,MAAO,CACfF,EAAKI,MAAQ,SAEdT,KAAKoB,iBAIZlB,EAAAC,UAAAkB,mBAAA,WACE,IAAMC,EAAKtB,KAAKsB,GAChBA,EAAGC,WAAWC,SAAQ,SAAAC,GACpB,GAAIA,EAAKC,WAAaC,SAASC,cAAgBH,EAAK,QAASA,EAAK,QAAU,UAIhFvB,EAAAC,UAAA0B,OAAA,iBACE,IAAMC,EAAMC,GAAUC,EAAA,GACpBA,EAAC,GAAAC,OAAGjC,KAAKM,aAAeN,KAAKS,UAE/B,IAAIyB,EAAO,GACX,KAAMlC,KAAKmC,UAAW,CACpBD,EAAK,aAAelC,KAAKmC,UACzBD,EAAK,kBAAoBlC,KAAKmC,UAEhC,OACEC,EAACC,EAAIC,OAAAC,OAAA,CAACC,MAAOV,GAASI,GACpBE,EAAA,OAAA,6HAzES","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 if (item.nodeType === document.COMMENT_NODE && item[\"s-cn\"]) item[\"s-cn\"] = 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,2 +0,0 @@
1
- System.register(["./p-8a8f286f.system.js"],(function(t){"use strict";var r,e,n;return{setters:[function(t){r=t.r;e=t.h;n=t.H}],execute:function(){var u=t("taro_slot_core",function(){function t(t){r(this,t)}t.prototype.render=function(){return e(n,null)};return t}())}}}));
2
- //# sourceMappingURL=p-d5579efa.system.entry.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["src/components/slot/slot.tsx"],"names":["Slot","exports","class_1","prototype","render","h","Host"],"mappings":"sJAKaA,EAAIC,EAAA,iBAAA,mCACfC,EAAAC,UAAAC,OAAA,WACE,OACEC,EAACC,EAAI,gBAHM","sourcesContent":["import { Component, ComponentInterface, h, Host } from '@stencil/core'\n\n@Component({\n tag: 'taro-slot-core'\n})\nexport class Slot implements ComponentInterface {\n render () {\n return (\n <Host />\n )\n }\n}\n"]}
@@ -1 +0,0 @@
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,IACpB,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 if (item.nodeType === document.COMMENT_NODE && item[\"s-cn\"]) item[\"s-cn\"] = 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"]}