@tarojs/components-advanced 3.6.0-canary.10
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 +21 -0
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.js +1 -0
- package/dist/components/virtual-list/constants.d.ts +1 -0
- package/dist/components/virtual-list/constants.js +1 -0
- package/dist/components/virtual-list/dom-helpers.d.ts +1 -0
- package/dist/components/virtual-list/dom-helpers.js +38 -0
- package/dist/components/virtual-list/index.d.ts +189 -0
- package/dist/components/virtual-list/index.js +103 -0
- package/dist/components/virtual-list/list-set.d.ts +27 -0
- package/dist/components/virtual-list/list-set.js +228 -0
- package/dist/components/virtual-list/preset.d.ts +35 -0
- package/dist/components/virtual-list/preset.js +134 -0
- package/dist/components/virtual-list/react/index.d.ts +3 -0
- package/dist/components/virtual-list/react/index.js +63 -0
- package/dist/components/virtual-list/react/list.d.ts +49 -0
- package/dist/components/virtual-list/react/list.js +491 -0
- package/dist/components/virtual-list/react/validate.d.ts +3 -0
- package/dist/components/virtual-list/react/validate.js +70 -0
- package/dist/components/virtual-list/utils.d.ts +12 -0
- package/dist/components/virtual-list/utils.js +33 -0
- package/dist/components/virtual-list/vue/index.d.ts +4 -0
- package/dist/components/virtual-list/vue/index.js +6 -0
- package/dist/components/virtual-list/vue/list.d.ts +119 -0
- package/dist/components/virtual-list/vue/list.js +463 -0
- package/dist/components/virtual-list/vue/render.d.ts +3 -0
- package/dist/components/virtual-list/vue/render.js +25 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +2 -0
- package/dist/utils/constants.d.ts +4 -0
- package/dist/utils/constants.js +4 -0
- package/dist/utils/convert.d.ts +5 -0
- package/dist/utils/convert.js +16 -0
- package/dist/utils/index.d.ts +2 -0
- package/dist/utils/index.js +2 -0
- package/dist/utils/lodash.d.ts +1 -0
- package/dist/utils/lodash.js +10 -0
- package/dist/utils/timer.d.ts +6 -0
- package/dist/utils/timer.js +20 -0
- package/package.json +48 -0
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { cancelAnimationFrame, now, requestAnimationFrame } from '@tarojs/runtime';
|
|
2
|
+
export function cancelTimeout(timeoutID) {
|
|
3
|
+
cancelAnimationFrame(timeoutID.id);
|
|
4
|
+
}
|
|
5
|
+
export function requestTimeout(callback) {
|
|
6
|
+
var delay = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
|
|
7
|
+
var start = now();
|
|
8
|
+
var timeoutID = {
|
|
9
|
+
id: requestAnimationFrame(tick)
|
|
10
|
+
};
|
|
11
|
+
function tick() {
|
|
12
|
+
if (now() - start >= delay) {
|
|
13
|
+
// eslint-disable-next-line no-useless-call
|
|
14
|
+
callback.call(null);
|
|
15
|
+
} else {
|
|
16
|
+
timeoutID.id = requestAnimationFrame(tick);
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
return timeoutID;
|
|
20
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@tarojs/components-advanced",
|
|
3
|
+
"version": "3.6.0-canary.10",
|
|
4
|
+
"description": "",
|
|
5
|
+
"main": "dist/index.js",
|
|
6
|
+
"types": "dist/index.d.ts",
|
|
7
|
+
"files": [
|
|
8
|
+
"dist"
|
|
9
|
+
],
|
|
10
|
+
"keywords": [],
|
|
11
|
+
"author": "ZakaryCode",
|
|
12
|
+
"license": "MIT",
|
|
13
|
+
"dependencies": {
|
|
14
|
+
"memoize-one": "^6.0.0",
|
|
15
|
+
"postcss": "^8.4.18",
|
|
16
|
+
"@tarojs/components": "3.6.0-canary.10",
|
|
17
|
+
"@tarojs/shared": "3.6.0-canary.10"
|
|
18
|
+
},
|
|
19
|
+
"devDependencies": {
|
|
20
|
+
"@babel/cli": "^7.14.5",
|
|
21
|
+
"@babel/core": "^7.14.5",
|
|
22
|
+
"@babel/plugin-transform-typescript": "^7.20.2",
|
|
23
|
+
"@types/node": "^14.14.31",
|
|
24
|
+
"react": "^18.2.0",
|
|
25
|
+
"react-dom": "^18.2.0",
|
|
26
|
+
"typescript": "^4.7.4",
|
|
27
|
+
"vue": "^3.0.0",
|
|
28
|
+
"babel-preset-taro": "3.6.0-canary.10"
|
|
29
|
+
},
|
|
30
|
+
"peerDependencies": {
|
|
31
|
+
"react": ">=17"
|
|
32
|
+
},
|
|
33
|
+
"peerDependenciesMeta": {
|
|
34
|
+
"react": {
|
|
35
|
+
"optional": true
|
|
36
|
+
},
|
|
37
|
+
"vue": {
|
|
38
|
+
"optional": true
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
"scripts": {
|
|
42
|
+
"build": "run-s clean build:babel build:declaration",
|
|
43
|
+
"build:babel": "cross-env TARO_ENV=h5 babel src --extensions=.js,.jsx,.ts,.tsx --out-dir dist",
|
|
44
|
+
"build:declaration": "tsc",
|
|
45
|
+
"clean": "rimraf ./dist",
|
|
46
|
+
"dev": "pnpm run build:babel -w"
|
|
47
|
+
}
|
|
48
|
+
}
|