@tarojs/components-react 3.6.22-nightly.0 → 3.6.22-nightly.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.
- package/LICENSE +7 -0
- package/dist/components/image/index.js +1 -3
- package/dist/components/image/index.js.map +1 -1
- package/dist/components/image/style/{index.js → index.css.js} +1 -1
- package/dist/components/image/style/index.css.js.map +1 -0
- package/dist/components/pull-down-refresh/index.js +1 -1
- package/dist/components/pull-down-refresh/style/{index.js → index.css.js} +1 -1
- package/dist/components/pull-down-refresh/style/index.css.js.map +1 -0
- package/dist/components/scroll-view/index.js +1 -1
- package/dist/components/scroll-view/style/{index.js → index.css.js} +1 -1
- package/dist/components/scroll-view/style/index.css.js.map +1 -0
- package/dist/components/swiper/index.js +1 -1
- package/dist/components/swiper/style/{index.js → index.css.js} +1 -1
- package/dist/components/swiper/style/index.css.js.map +1 -0
- package/dist/components/text/index.js +1 -1
- package/dist/components/text/style/{index.js → index.css.js} +1 -1
- package/dist/components/text/style/index.css.js.map +1 -0
- package/dist/components/view/index.js +1 -1
- package/dist/components/view/style/{index.js → index.css.js} +1 -1
- package/dist/components/view/style/index.css.js.map +1 -0
- package/package.json +13 -12
- package/dist/components/image/style/index.js.map +0 -1
- package/dist/components/pull-down-refresh/style/index.js.map +0 -1
- package/dist/components/scroll-view/style/index.js.map +0 -1
- package/dist/components/swiper/style/index.js.map +0 -1
- package/dist/components/text/style/index.js.map +0 -1
- package/dist/components/view/style/index.js.map +0 -1
package/LICENSE
CHANGED
|
@@ -158,3 +158,10 @@ MIT (stencil-vue2-output-target):
|
|
|
158
158
|
The following files embed [stencil-vue2-output-target](https://github.com/diondree/stencil-vue2-output-target) MIT:
|
|
159
159
|
`/packages/taro-components-library-vue2/src/vue-component-lib/utils.ts`
|
|
160
160
|
See `/LICENSE` for details of the license.
|
|
161
|
+
|
|
162
|
+
==================
|
|
163
|
+
|
|
164
|
+
MIT (weui):
|
|
165
|
+
The following files embed [stencil-vue2-output-target](https://github.com/Tencent/weui) MIT:
|
|
166
|
+
`/packages/taro-components/src/components/*.scss`
|
|
167
|
+
See `/LICENSE.txt` for details of the license.
|
|
@@ -4,12 +4,10 @@ import _assertThisInitialized from '@babel/runtime/helpers/assertThisInitialized
|
|
|
4
4
|
import _inherits from '@babel/runtime/helpers/inherits';
|
|
5
5
|
import _createSuper from '@babel/runtime/helpers/createSuper';
|
|
6
6
|
import { __rest } from '../../node_modules/.pnpm/registry.npmjs.org_tslib@2.5.0/node_modules/tslib/tslib.es6.js';
|
|
7
|
-
import '
|
|
8
|
-
import './style/index.js';
|
|
7
|
+
import './style/index.css.js';
|
|
9
8
|
import classNames from 'classnames';
|
|
10
9
|
import React from 'react';
|
|
11
10
|
|
|
12
|
-
require('intersection-observer');
|
|
13
11
|
var Image = /*#__PURE__*/function (_React$Component) {
|
|
14
12
|
_inherits(Image, _React$Component);
|
|
15
13
|
var _super = _createSuper(Image);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../src/components/image/index.tsx"],"sourcesContent":["import '
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../src/components/image/index.tsx"],"sourcesContent":["import './style/index.css'\n\nimport classNames from 'classnames'\nimport React from 'react'\n\ninterface IProps extends React.HTMLAttributes<HTMLDivElement> {\n src: string\n mode: string\n onError: () => void\n onLoad: (e) => void\n lazyLoad?: boolean\n imgProps?: Record<string, any>\n}\n\nclass Image extends React.Component<IProps> {\n constructor (props) {\n super(props)\n this.state = {\n isLoaded: false\n }\n this.imageOnLoad = this.imageOnLoad.bind(this)\n // this.observer = {}\n }\n\n observer: any = {}\n imgRef: any = null\n\n componentDidMount () {\n if (this.props.lazyLoad) {\n this.observer = new IntersectionObserver(\n entries => {\n // 异步 api 关系\n if (entries[entries.length - 1].isIntersecting) {\n this.setState({ isLoaded: true }, () => {\n // findDOMNode(this).children[0].src = this.props.src\n this.imgRef.src = this.props.src\n })\n }\n },\n {\n rootMargin: '300px 0px'\n }\n )\n this.observer.observe(this.imgRef)\n }\n }\n\n componentWillUnmount () {\n this.observer.disconnect && this.observer.disconnect()\n }\n\n imageOnLoad (e) {\n const { onLoad } = this.props\n Object.defineProperty(e, 'detail', {\n enumerable: true,\n writable: true,\n value: {\n width: e.target.width,\n height: e.target.height\n }\n })\n\n onLoad && onLoad(e)\n }\n\n render () {\n const {\n className,\n style = {},\n src,\n mode,\n onError,\n lazyLoad,\n imgProps,\n ...reset\n } = this.props\n const cls = classNames(\n 'taro-img',\n {\n 'taro-img__widthfix': mode === 'widthFix'\n },\n className\n )\n const imgCls = classNames(\n 'taro-img__mode-' +\n (mode || 'scaleToFill').toLowerCase().replace(/\\s/g, '')\n )\n\n return (\n <div className={cls} style={style} {...reset}>\n {lazyLoad ? (\n <img\n ref={img => (this.imgRef = img)}\n className={imgCls}\n data-src={src}\n onLoad={this.imageOnLoad}\n onError={onError}\n {...imgProps}\n />\n ) : (\n <img\n ref={img => (this.imgRef = img)}\n className={imgCls}\n src={src}\n onLoad={this.imageOnLoad}\n onError={onError}\n {...imgProps}\n />\n )}\n </div>\n )\n }\n}\n\nexport default Image\n"],"names":["Image","_React$Component","_inherits","_super","_createSuper","props","_this","_classCallCheck","call","observer","imgRef","state","isLoaded","imageOnLoad","bind","_assertThisInitialized","_createClass","key","value","componentDidMount","_this2","lazyLoad","IntersectionObserver","entries","length","isIntersecting","setState","src","rootMargin","observe","componentWillUnmount","disconnect","e","onLoad","Object","defineProperty","enumerable","writable","width","target","height","render","_this3","_a","className","_a$style","style","mode","onError","imgProps","reset","__rest","cls","classNames","imgCls","toLowerCase","replace","React","createElement","assign","ref","img","Component"],"mappings":";;;;;;;;;;AAcMA,IAAAA,KAAM,0BAAAC,gBAAA,EAAA;EAAAC,SAAA,CAAAF,KAAA,EAAAC,gBAAA,CAAA,CAAA;AAAA,EAAA,IAAAE,MAAA,GAAAC,YAAA,CAAAJ,KAAA,CAAA,CAAA;EACV,SAAAA,KAAAA,CAAaK,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AEA,OAAAA;AAAO,OAAA,EACZC,QAAQ,CACZ,CACH,CACG,CAAA;AAEV,KAAA;AAAC,GAAA,CAAA,CAAA,CAAA;AAAA,EAAA,OAAAjD,KAAA,CAAA;AAAA,CAjGiByD,CAAAA,KAAK,CAACK,SAAiB;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.css.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;"}
|
|
@@ -5,7 +5,7 @@ import _assertThisInitialized from '@babel/runtime/helpers/assertThisInitialized
|
|
|
5
5
|
import _inherits from '@babel/runtime/helpers/inherits';
|
|
6
6
|
import _createSuper from '@babel/runtime/helpers/createSuper';
|
|
7
7
|
import { __rest } from '../../node_modules/.pnpm/registry.npmjs.org_tslib@2.5.0/node_modules/tslib/tslib.es6.js';
|
|
8
|
-
import './style/index.js';
|
|
8
|
+
import './style/index.css.js';
|
|
9
9
|
import Taro from '@tarojs/taro';
|
|
10
10
|
import classNames from 'classnames';
|
|
11
11
|
import React from 'react';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.css.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;"}
|
|
@@ -3,7 +3,7 @@ import _createClass from '@babel/runtime/helpers/createClass';
|
|
|
3
3
|
import _inherits from '@babel/runtime/helpers/inherits';
|
|
4
4
|
import _createSuper from '@babel/runtime/helpers/createSuper';
|
|
5
5
|
import 'weui';
|
|
6
|
-
import './style/index.js';
|
|
6
|
+
import './style/index.css.js';
|
|
7
7
|
import classNames from 'classnames';
|
|
8
8
|
import React from 'react';
|
|
9
9
|
import { throttle } from '../../utils/index.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.css.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;"}
|
|
@@ -6,7 +6,7 @@ import _createSuper from '@babel/runtime/helpers/createSuper';
|
|
|
6
6
|
import { __rest } from '../../node_modules/.pnpm/registry.npmjs.org_tslib@2.5.0/node_modules/tslib/tslib.es6.js';
|
|
7
7
|
import 'swiper/swiper-bundle.min.css';
|
|
8
8
|
import 'weui';
|
|
9
|
-
import './style/index.js';
|
|
9
|
+
import './style/index.css.js';
|
|
10
10
|
import classNames from 'classnames';
|
|
11
11
|
import React from 'react';
|
|
12
12
|
import Swipers from 'swiper/swiper-bundle.esm.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.css.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;"}
|
|
@@ -4,7 +4,7 @@ import _inherits from '@babel/runtime/helpers/inherits';
|
|
|
4
4
|
import _createSuper from '@babel/runtime/helpers/createSuper';
|
|
5
5
|
import { __rest } from '../../node_modules/.pnpm/registry.npmjs.org_tslib@2.5.0/node_modules/tslib/tslib.es6.js';
|
|
6
6
|
import 'weui';
|
|
7
|
-
import './style/index.js';
|
|
7
|
+
import './style/index.css.js';
|
|
8
8
|
import classNames from 'classnames';
|
|
9
9
|
import React from 'react';
|
|
10
10
|
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.css.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;"}
|
|
@@ -5,7 +5,7 @@ import _inherits from '@babel/runtime/helpers/inherits';
|
|
|
5
5
|
import _createSuper from '@babel/runtime/helpers/createSuper';
|
|
6
6
|
import { __rest } from '../../node_modules/.pnpm/registry.npmjs.org_tslib@2.5.0/node_modules/tslib/tslib.es6.js';
|
|
7
7
|
import 'weui';
|
|
8
|
-
import './style/index.js';
|
|
8
|
+
import './style/index.css.js';
|
|
9
9
|
import classNames from 'classnames';
|
|
10
10
|
import React from 'react';
|
|
11
11
|
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.css.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tarojs/components-react",
|
|
3
|
-
"version": "3.6.22-nightly.
|
|
3
|
+
"version": "3.6.22-nightly.4",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main:h5": "src/index.js",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -24,26 +24,27 @@
|
|
|
24
24
|
"dependencies": {
|
|
25
25
|
"@babel/runtime": "^7.14.5",
|
|
26
26
|
"classnames": "^2.2.5",
|
|
27
|
-
"intersection-observer": "^0.7.0",
|
|
28
|
-
"resolve-pathname": "^3.0.0",
|
|
29
27
|
"swiper": "6.8.0",
|
|
30
|
-
"
|
|
31
|
-
"@tarojs/
|
|
32
|
-
"@tarojs/components": "3.6.22-nightly.0"
|
|
28
|
+
"@tarojs/taro": "3.6.22-nightly.4",
|
|
29
|
+
"@tarojs/components": "3.6.22-nightly.4"
|
|
33
30
|
},
|
|
34
31
|
"devDependencies": {
|
|
35
32
|
"@babel/core": "^7.14.5",
|
|
36
|
-
"@rollup/plugin-babel": "^
|
|
37
|
-
"@rollup/plugin-commonjs": "^
|
|
38
|
-
"@rollup/plugin-node-resolve": "^
|
|
39
|
-
"rollup": "^
|
|
33
|
+
"@rollup/plugin-babel": "^6.0.4",
|
|
34
|
+
"@rollup/plugin-commonjs": "^24.0.0",
|
|
35
|
+
"@rollup/plugin-node-resolve": "^15.0.0",
|
|
36
|
+
"@rollup/plugin-typescript": "^11.1.0",
|
|
37
|
+
"rollup": "^3.8.1",
|
|
40
38
|
"rollup-plugin-node-externals": "^5.0.0",
|
|
41
39
|
"rollup-plugin-postcss": "^3.1.8",
|
|
42
40
|
"rollup-plugin-ts": "^3.0.2",
|
|
43
41
|
"typescript": "^4.7.4"
|
|
44
42
|
},
|
|
45
43
|
"scripts": {
|
|
46
|
-
"
|
|
47
|
-
"
|
|
44
|
+
"prebuild": "pnpm run clean",
|
|
45
|
+
"build": "pnpm run rollup --environment NODE_ENV:production",
|
|
46
|
+
"clean": "rimraf ./dist",
|
|
47
|
+
"dev": "pnpm run rollup --environment NODE_ENV:development -w",
|
|
48
|
+
"rollup": "rollup --config rollup.config.ts --configPlugin @rollup/plugin-typescript --bundleConfigAsCjs"
|
|
48
49
|
}
|
|
49
50
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;"}
|