@tarojs/components-react 4.0.0-canary.8 → 4.0.0
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 +17 -3
- package/dist/components/button/index.js +87 -0
- package/dist/components/button/index.js.map +1 -0
- package/dist/components/button/style/index.scss.js +4 -0
- package/dist/components/button/style/index.scss.js.map +1 -0
- package/dist/components/icon/index.js +36 -0
- package/dist/components/icon/index.js.map +1 -0
- package/dist/components/icon/style/index.scss.js +4 -0
- package/dist/components/icon/style/index.scss.js.map +1 -0
- package/dist/components/image/index.js +78 -105
- package/dist/components/image/index.js.map +1 -1
- package/dist/components/image/style/index.css.js +4 -0
- package/dist/components/image/style/index.css.js.map +1 -0
- package/dist/components/input/index.js +233 -0
- package/dist/components/input/index.js.map +1 -0
- package/dist/components/input/style/index.scss.js +4 -0
- package/dist/components/input/style/index.scss.js.map +1 -0
- package/dist/components/pull-down-refresh/index.js +197 -212
- package/dist/components/pull-down-refresh/index.js.map +1 -1
- package/dist/components/pull-down-refresh/style/index.css.js +4 -0
- package/dist/components/pull-down-refresh/style/index.css.js.map +1 -0
- package/dist/components/scroll-view/index.js +138 -169
- package/dist/components/scroll-view/index.js.map +1 -1
- package/dist/components/scroll-view/style/index.css.js +4 -0
- package/dist/components/scroll-view/style/index.css.js.map +1 -0
- package/dist/components/swiper/index.js +250 -270
- package/dist/components/swiper/index.js.map +1 -1
- package/dist/components/swiper/style/index.css.js +4 -0
- package/dist/components/swiper/style/index.css.js.map +1 -0
- package/dist/components/text/index.js +24 -34
- package/dist/components/text/index.js.map +1 -1
- package/dist/components/text/style/index.css.js +4 -0
- package/dist/components/text/style/index.css.js.map +1 -0
- package/dist/components/view/index.js +73 -99
- package/dist/components/view/index.js.map +1 -1
- package/dist/index.css +1 -0
- package/dist/index.js +4 -1
- package/dist/index.js.map +1 -1
- package/dist/solid/components/button/index.js +95 -0
- package/dist/solid/components/button/index.js.map +1 -0
- package/dist/solid/components/button/style/index.scss.js +4 -0
- package/dist/solid/components/button/style/index.scss.js.map +1 -0
- package/dist/solid/components/icon/index.js +39 -0
- package/dist/solid/components/icon/index.js.map +1 -0
- package/dist/solid/components/icon/style/index.scss.js +4 -0
- package/dist/solid/components/icon/style/index.scss.js.map +1 -0
- package/dist/solid/components/image/index.js +94 -0
- package/dist/solid/components/image/index.js.map +1 -0
- package/dist/solid/components/image/style/index.css.js +4 -0
- package/dist/solid/components/image/style/index.css.js.map +1 -0
- package/dist/solid/components/input/index.js +256 -0
- package/dist/solid/components/input/index.js.map +1 -0
- package/dist/solid/components/input/style/index.scss.js +4 -0
- package/dist/solid/components/input/style/index.scss.js.map +1 -0
- package/dist/solid/components/pull-down-refresh/index.js +334 -0
- package/dist/solid/components/pull-down-refresh/index.js.map +1 -0
- package/dist/solid/components/pull-down-refresh/style/index.css.js +4 -0
- package/dist/solid/components/pull-down-refresh/style/index.css.js.map +1 -0
- package/dist/solid/components/scroll-view/index.js +188 -0
- package/dist/solid/components/scroll-view/index.js.map +1 -0
- package/dist/solid/components/scroll-view/style/index.css.js +4 -0
- package/dist/solid/components/scroll-view/style/index.css.js.map +1 -0
- package/dist/solid/components/swiper/index.js +307 -0
- package/dist/solid/components/swiper/index.js.map +1 -0
- package/dist/solid/components/swiper/style/index.css.js +4 -0
- package/dist/solid/components/swiper/style/index.css.js.map +1 -0
- package/dist/solid/components/text/index.js +32 -0
- package/dist/solid/components/text/index.js.map +1 -0
- package/dist/solid/components/text/style/index.css.js +4 -0
- package/dist/solid/components/text/style/index.css.js.map +1 -0
- package/dist/solid/components/view/index.js +88 -0
- package/dist/solid/components/view/index.js.map +1 -0
- package/dist/solid/index.css +1 -0
- package/dist/solid/index.js +13 -0
- package/dist/solid/index.js.map +1 -0
- package/dist/solid/utils/hooks.solid.js +54 -0
- package/dist/solid/utils/hooks.solid.js.map +1 -0
- package/dist/solid/utils/index.js +58 -0
- package/dist/solid/utils/index.js.map +1 -0
- package/dist/utils/hooks.react.js +15 -0
- package/dist/utils/hooks.react.js.map +1 -0
- package/dist/utils/index.js +31 -12
- package/dist/utils/index.js.map +1 -1
- package/package.json +25 -19
- package/types/index.d.ts +14 -0
- package/dist/components/image/style/index.js +0 -8
- package/dist/components/image/style/index.js.map +0 -1
- package/dist/components/pull-down-refresh/style/index.js +0 -8
- package/dist/components/pull-down-refresh/style/index.js.map +0 -1
- package/dist/components/scroll-view/style/index.js +0 -8
- package/dist/components/scroll-view/style/index.js.map +0 -1
- package/dist/components/swiper/style/index.js +0 -8
- package/dist/components/swiper/style/index.js.map +0 -1
- package/dist/components/text/style/index.js +0 -8
- package/dist/components/text/style/index.js.map +0 -1
- package/dist/components/view/style/index.js +0 -8
- package/dist/components/view/style/index.js.map +0 -1
- package/dist/node_modules/.pnpm/style-inject@0.3.0/node_modules/style-inject/dist/style-inject.es.js +0 -27
- package/dist/node_modules/.pnpm/style-inject@0.3.0/node_modules/style-inject/dist/style-inject.es.js.map +0 -1
- package/dist/node_modules/.pnpm/tslib@2.6.2/node_modules/tslib/tslib.es6.js +0 -526
- package/dist/node_modules/.pnpm/tslib@2.6.2/node_modules/tslib/tslib.es6.js.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hooks.solid.js","sources":["../../../src/utils/hooks.solid.ts"],"sourcesContent":["import Solid from 'solid-js'\n\nimport type { TFunc } from '@tarojs/runtime/dist/runtime.esm'\n\nexport const useState = <T = any>(value: T, options?): [() => T, TFunc] => {\n const [state, setState] = Solid.createSignal(value, options)\n return [state, setState]\n}\n\nexport const useCallback = (callback, deps) => {\n const [_, setSignal] = Solid.createSignal(0) // eslint-disable-line @typescript-eslint/no-unused-vars\n\n Solid.createEffect(() => {\n deps.forEach(dep => typeof dep === 'function' ? dep() : dep)\n setSignal(s => s + 1)\n })\n\n return async (...args) => {\n Solid.createEffect(() => {\n const clean = callback(...args)\n return typeof clean === 'function' && Solid.onCleanup(clean)\n })\n }\n}\n\nexport const useEffect = (effect, deps) => {\n Solid.createEffect(() => {\n const cleanup = effect()\n deps.forEach(dep => dep)\n\n return () => {\n if (typeof cleanup === 'function') cleanup()\n }\n })\n}\n\nexport const useMemo = Solid.createMemo\n\nexport const useRef = <T = any>(init?: T) => {\n const [state] = Solid.createSignal(init)\n return {\n current: state()\n }\n}\n\nexport const createContext = Solid.createContext\nexport const useContext = Solid.useContext\nexport const memo = (component, _propsAreEqual) => component // eslint-disable-line @typescript-eslint/no-unused-vars\nexport const forwardRef = (component) => component\nexport const useImperativeHandle = (ref, createHandle, deps) => {\n Solid.createEffect(() => {\n deps.forEach(dep => dep)\n ref.current = createHandle()\n })\n}\n"],"names":["useState","value","options","state","setState","Solid","createSignal","useCallback","callback","deps","_","setSignal","createEffect","forEach","dep","s","_len","arguments","length","args","Array","_key","__awaiter","clean","onCleanup","useEffect","effect","cleanup","useMemo","createMemo","useRef","init","current","createContext","useContext","memo","component","_propsAreEqual","forwardRef","useImperativeHandle","ref","createHandle"],"mappings":";;;MAIaA,QAAQ,GAAGA,CAAUC,KAAQ,EAAEC,OAAQ,KAAsB;AACxE,EAAA,MAAM,CAACC,KAAK,EAAEC,QAAQ,CAAC,GAAGC,KAAK,CAACC,YAAY,CAACL,KAAK,EAAEC,OAAO,CAAC,CAAA;AAC5D,EAAA,OAAO,CAACC,KAAK,EAAEC,QAAQ,CAAC,CAAA;AAC1B,EAAC;MAEYG,WAAW,GAAGA,CAACC,QAAQ,EAAEC,IAAI,KAAI;AAC5C,EAAA,MAAM,CAACC,CAAC,EAAEC,SAAS,CAAC,GAAGN,KAAK,CAACC,YAAY,CAAC,CAAC,CAAC,CAAA;EAE5CD,KAAK,CAACO,YAAY,CAAC,MAAK;AACtBH,IAAAA,IAAI,CAACI,OAAO,CAACC,GAAG,IAAI,OAAOA,GAAG,KAAK,UAAU,GAAGA,GAAG,EAAE,GAAGA,GAAG,CAAC,CAAA;AAC5DH,IAAAA,SAAS,CAACI,CAAC,IAAIA,CAAC,GAAG,CAAC,CAAC,CAAA;AACv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E7B,KAAK,EAAE;GACjB,CAAA;AACH,EAAC;AAEY8B,MAAAA,aAAa,GAAG5B,KAAK,CAAC4B,cAAa;AACnCC,MAAAA,UAAU,GAAG7B,KAAK,CAAC6B,WAAU;AACnC,MAAMC,IAAI,GAAGA,CAACC,SAAS,EAAEC,cAAc,KAAKD,UAAS;AAC/CE,MAAAA,UAAU,GAAIF,SAAS,IAAKA,UAAS;AAC3C,MAAMG,mBAAmB,GAAGA,CAACC,GAAG,EAAEC,YAAY,EAAEhC,IAAI,KAAI;EAC7DJ,KAAK,CAACO,YAAY,CAAC,MAAK;AACtBH,IAAAA,IAAI,CAACI,OAAO,CAACC,GAAG,IAAIA,GAAG,CAAC,CAAA;AACxB0B,IAAAA,GAAG,CAACR,OAAO,GAAGS,YAAY,EAAE,CAAA;AAC9B,GAAC,CAAC,CAAA;AACJ;;;;"}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { createComponent, mergeProps } from 'solid-js/web';
|
|
2
|
+
import { forwardRef } from './hooks.solid.js';
|
|
3
|
+
|
|
4
|
+
function throttle(fn) {
|
|
5
|
+
let threshold = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 250;
|
|
6
|
+
let scope = arguments.length > 2 ? arguments[2] : undefined;
|
|
7
|
+
let lastTime = 0;
|
|
8
|
+
let deferTimer;
|
|
9
|
+
return function () {
|
|
10
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
11
|
+
args[_key] = arguments[_key];
|
|
12
|
+
}
|
|
13
|
+
const context = scope || this;
|
|
14
|
+
const now = Date.now();
|
|
15
|
+
if (now - lastTime > threshold) {
|
|
16
|
+
fn.apply(this, args);
|
|
17
|
+
lastTime = now;
|
|
18
|
+
} else {
|
|
19
|
+
clearTimeout(deferTimer);
|
|
20
|
+
deferTimer = setTimeout(() => {
|
|
21
|
+
lastTime = now;
|
|
22
|
+
fn.apply(context, args);
|
|
23
|
+
}, threshold);
|
|
24
|
+
}
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
function debounce(fn) {
|
|
28
|
+
let ms = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 250;
|
|
29
|
+
let scope = arguments.length > 2 ? arguments[2] : undefined;
|
|
30
|
+
let timer;
|
|
31
|
+
return function () {
|
|
32
|
+
for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
|
|
33
|
+
args[_key2] = arguments[_key2];
|
|
34
|
+
}
|
|
35
|
+
const context = scope || this;
|
|
36
|
+
clearTimeout(timer);
|
|
37
|
+
timer = setTimeout(function () {
|
|
38
|
+
fn.apply(context, args);
|
|
39
|
+
}, ms);
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
function omit(obj, fields) {
|
|
43
|
+
const shallowCopy = Object.assign({}, obj);
|
|
44
|
+
for (let i = 0; i < fields.length; i += 1) {
|
|
45
|
+
const key = fields[i];
|
|
46
|
+
delete shallowCopy[key];
|
|
47
|
+
}
|
|
48
|
+
return shallowCopy;
|
|
49
|
+
}
|
|
50
|
+
const createForwardRefComponent = ReactComponent => {
|
|
51
|
+
const forwardRefComponent = (props, ref) => createComponent(ReactComponent, mergeProps(props, {
|
|
52
|
+
forwardedRef: ref
|
|
53
|
+
}));
|
|
54
|
+
return forwardRef(forwardRefComponent);
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
export { createForwardRefComponent, debounce, omit, throttle };
|
|
58
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../src/utils/index.tsx"],"sourcesContent":["/* eslint-disable react/react-in-jsx-scope */\nimport { forwardRef } from './hooks'\n\nexport function throttle (fn, threshold = 250, scope?) {\n let lastTime = 0\n let deferTimer: ReturnType<typeof setTimeout>\n return function (...args) {\n const context = scope || this\n const now = Date.now()\n if (now - lastTime > threshold) {\n fn.apply(this, args)\n lastTime = now\n } else {\n clearTimeout(deferTimer)\n deferTimer = setTimeout(() => {\n lastTime = now\n fn.apply(context, args)\n }, threshold)\n }\n }\n}\n\nexport function debounce (fn, ms = 250, scope?) {\n let timer: ReturnType<typeof setTimeout>\n\n return function (...args) {\n const context = scope || this\n clearTimeout(timer)\n timer = setTimeout(function () {\n fn.apply(context, args)\n }, ms)\n }\n}\n\nexport function omit (obj, fields) {\n const shallowCopy = Object.assign({}, obj)\n for (let i = 0; i < fields.length; i += 1) {\n const key = fields[i]\n delete shallowCopy[key]\n }\n return shallowCopy\n}\n\nexport const createForwardRefComponent = (ReactComponent: any) => {\n const forwardRefComponent = (\n props,\n ref\n ) => <ReactComponent {...props} forwardedRef={ref} />\n\n return forwardRef(forwardRefComponent)\n}\n\n"],"names":["throttle","fn","threshold","arguments","length","undefined","scope","lastTime","deferTimer","_len","args","Array","_key","context","now","Date","apply","clearTimeout","setTimeout","debounce","ms","timer","_len2","_key2","omit","obj","fields","shallowCopy","Object","assign","i","key","createForwardRefComponent","ReactComponent","forwardRefComponent","props","ref","_$createComponent","_$mergeProps","forwardedRef","forwardRef"],"mappings":";;;AAGM,SAAUA,QAAQA,CAAEC,EAAE,EAAyB;AAAA,EAAA,IAAvBC,SAAS,GAAAC,SAAA,CAAAC,MAAA,GAAA,CAAA,IAAAD,SAAA,CAAA,CAAA,CAAA,KAAAE,SAAA,GAAAF,SAAA,CAAA,CAAA,CAAA,GAAG,GAAG,CAAA;EAAA,IAAEG,KAAM,GAAAH,SAAA,CAAAC,MAAA,GAAAD,CAAAA,GAAAA,SAAA,MAAAE,SAAA,CAAA;EACnD,IAAIE,QAAQ,GAAG,CAAC,CAAA;AAChB,EAAA,IAAIC,UAAyC,CAAA;AAC7C,EAAA,OAAO,YAAiB;AAAA,IAAA,KAAA,IAAAC,IAAA,GAAAN,SAAA,CAAAC,MAAA,EAAJM,IAAI,GAAAC,IAAAA,KAAA,CAAAF,IAAA,GAAAG,IAAA,GAAA,CAAA,EAAAA,IAAA,GAAAH,IAAA,EAAAG,IAAA,EAAA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AApB,GAAAA,SAAA,CAAAoB,KAAA,CAAA,CAAA;AAAA,KAAA;AACtB,IAAA,MAAMV,OAAO,GAAGP,KAAK,IAAI,IAAI,CAAA;IAC7BW,YAAY,CAACI,KAAK,CAAC,CAAA;IACnBA,KAAK,GAAGH,UAAU,CAAC,YAAA;AACjBjB,MAAAA,EAAE,CAACe,KAAK,CAACH,OAAO,EAAEH,IAAI,CAAC,CAAA;KACxB,EAAEU,EAAE,CAAC,CAAA;GACP,CAAA;AACH,CAAA;AAEgB,SAAAI,IAAIA,CAAEC,GAAG,EAAEC,MAAM,EAAA;EAC/B,MAAMC,WAAW,GAAGC,MAAM,CAACC,MAAM,CAAC,EAAE,EAAEJ,GAAG,CAAC,CAAA;AAC1C,EAAA,KAAK,IAAIK,CAAC,GAAG,CAAC,EAAEA,CAAC,GAAGJ,MAAM,CAACtB,MAAM,EAAE0B,CAAC,IAAI,CAAC,EAAE;AACzC,IAAA,MAAMC,GAAG,GAAGL,MAAM,CAACI,CAAC,CAAC,CAAA;IACrB,OAAOH,WAAW,CAACI,GAAG,CAAC,CAAA;AACzB,GAAA;AACA,EAAA,OAAOJ,WAAW,CAAA;AACpB,CAAA;AAEaK,MAAAA,yBAAyB,GAAIC,cAAmB,IAAI;AAC/D,EAAA,MAAMC,mBAAmB,GAAGA,CAC1BC,KAAK,EACLC,GAAG,KAAAC,eAAA,CACCJ,cAAc,EAAAK,UAAA,CAAKH,KAAK,EAAA;AAAEI,IAAAA,YAAY,EAAEH,GAAAA;GAAO,CAAA,CAAA,CAAA;EAErD,OAAOI,UAAU,CAACN,mBAAmB,CAAC,CAAA;AACxC;;;;"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
|
|
3
|
+
const useState = React.useState;
|
|
4
|
+
const useCallback = React.useCallback;
|
|
5
|
+
const useEffect = React.useEffect;
|
|
6
|
+
const useMemo = React.useMemo;
|
|
7
|
+
const useRef = React.useRef;
|
|
8
|
+
const createContext = React.createContext;
|
|
9
|
+
const useContext = React.useContext;
|
|
10
|
+
const memo = React.memo;
|
|
11
|
+
const forwardRef = React.forwardRef;
|
|
12
|
+
const useImperativeHandle = React.useImperativeHandle;
|
|
13
|
+
|
|
14
|
+
export { createContext, forwardRef, memo, useCallback, useContext, useEffect, useImperativeHandle, useMemo, useRef, useState };
|
|
15
|
+
//# sourceMappingURL=hooks.react.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hooks.react.js","sources":["../../src/utils/hooks.react.ts"],"sourcesContent":["import * as React from 'react'\n\nexport const useState = React.useState\n\nexport const useCallback = React.useCallback\n\nexport const useEffect = React.useEffect\n\nexport const useMemo = React.useMemo\n\nexport const useRef = React.useRef\n\nexport const createContext = React.createContext\nexport const useContext = React.useContext\nexport const memo = React.memo\nexport const forwardRef = React.forwardRef\nexport const useImperativeHandle = React.useImperativeHandle\n"],"names":["useState","React","useCallback","useEffect","useMemo","useRef","createContext","useContext","memo","forwardRef","useImperativeHandle"],"mappings":";;AAEaA,MAAAA,QAAQ,GAAGC,KAAK,CAACD,SAAQ;AAEzBE,MAAAA,WAAW,GAAGD,KAAK,CAACC,YAAW;AAE/BC,MAAAA,SAAS,GAAGF,KAAK,CAACE,UAAS;AAE3BC,MAAAA,OAAO,GAAGH,KAAK,CAACG,QAAO;AAEvBC,MAAAA,MAAM,GAAGJ,KAAK,CAACI,OAAM;AAErBC,MAAAA,aAAa,GAAGL,KAAK,CAACK,cAAa;AACnCC,MAAAA,UAAU,GAAGN,KAAK,CAACM,WAAU;AAC7BC,MAAAA,IAAI,GAAGP,KAAK,CAACO,KAAI;AACjBC,MAAAA,UAAU,GAAGR,KAAK,CAACQ,WAAU;AAC7BC,MAAAA,mBAAmB,GAAGT,KAAK,CAACS;;;;"}
|
package/dist/utils/index.js
CHANGED
|
@@ -1,20 +1,24 @@
|
|
|
1
|
+
import { forwardRef } from './hooks.react.js';
|
|
2
|
+
import { jsx } from 'react/jsx-runtime';
|
|
3
|
+
|
|
4
|
+
/* eslint-disable react/react-in-jsx-scope */
|
|
1
5
|
function throttle(fn) {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
+
let threshold = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 250;
|
|
7
|
+
let scope = arguments.length > 2 ? arguments[2] : undefined;
|
|
8
|
+
let lastTime = 0;
|
|
9
|
+
let deferTimer;
|
|
6
10
|
return function () {
|
|
7
11
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
8
12
|
args[_key] = arguments[_key];
|
|
9
13
|
}
|
|
10
|
-
|
|
11
|
-
|
|
14
|
+
const context = scope || this;
|
|
15
|
+
const now = Date.now();
|
|
12
16
|
if (now - lastTime > threshold) {
|
|
13
17
|
fn.apply(this, args);
|
|
14
18
|
lastTime = now;
|
|
15
19
|
} else {
|
|
16
20
|
clearTimeout(deferTimer);
|
|
17
|
-
deferTimer = setTimeout(
|
|
21
|
+
deferTimer = setTimeout(() => {
|
|
18
22
|
lastTime = now;
|
|
19
23
|
fn.apply(context, args);
|
|
20
24
|
}, threshold);
|
|
@@ -22,20 +26,35 @@ function throttle(fn) {
|
|
|
22
26
|
};
|
|
23
27
|
}
|
|
24
28
|
function debounce(fn) {
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
29
|
+
let ms = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 250;
|
|
30
|
+
let scope = arguments.length > 2 ? arguments[2] : undefined;
|
|
31
|
+
let timer;
|
|
28
32
|
return function () {
|
|
29
33
|
for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
|
|
30
34
|
args[_key2] = arguments[_key2];
|
|
31
35
|
}
|
|
32
|
-
|
|
36
|
+
const context = scope || this;
|
|
33
37
|
clearTimeout(timer);
|
|
34
38
|
timer = setTimeout(function () {
|
|
35
39
|
fn.apply(context, args);
|
|
36
40
|
}, ms);
|
|
37
41
|
};
|
|
38
42
|
}
|
|
43
|
+
function omit(obj, fields) {
|
|
44
|
+
const shallowCopy = Object.assign({}, obj);
|
|
45
|
+
for (let i = 0; i < fields.length; i += 1) {
|
|
46
|
+
const key = fields[i];
|
|
47
|
+
delete shallowCopy[key];
|
|
48
|
+
}
|
|
49
|
+
return shallowCopy;
|
|
50
|
+
}
|
|
51
|
+
const createForwardRefComponent = ReactComponent => {
|
|
52
|
+
const forwardRefComponent = (props, ref) => /*#__PURE__*/jsx(ReactComponent, {
|
|
53
|
+
...props,
|
|
54
|
+
forwardedRef: ref
|
|
55
|
+
});
|
|
56
|
+
return forwardRef(forwardRefComponent);
|
|
57
|
+
};
|
|
39
58
|
|
|
40
|
-
export { debounce, throttle };
|
|
59
|
+
export { createForwardRefComponent, debounce, omit, throttle };
|
|
41
60
|
//# sourceMappingURL=index.js.map
|
package/dist/utils/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../src/utils/index.
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../src/utils/index.tsx"],"sourcesContent":["/* eslint-disable react/react-in-jsx-scope */\nimport { forwardRef } from './hooks'\n\nexport function throttle (fn, threshold = 250, scope?) {\n let lastTime = 0\n let deferTimer: ReturnType<typeof setTimeout>\n return function (...args) {\n const context = scope || this\n const now = Date.now()\n if (now - lastTime > threshold) {\n fn.apply(this, args)\n lastTime = now\n } else {\n clearTimeout(deferTimer)\n deferTimer = setTimeout(() => {\n lastTime = now\n fn.apply(context, args)\n }, threshold)\n }\n }\n}\n\nexport function debounce (fn, ms = 250, scope?) {\n let timer: ReturnType<typeof setTimeout>\n\n return function (...args) {\n const context = scope || this\n clearTimeout(timer)\n timer = setTimeout(function () {\n fn.apply(context, args)\n }, ms)\n }\n}\n\nexport function omit (obj, fields) {\n const shallowCopy = Object.assign({}, obj)\n for (let i = 0; i < fields.length; i += 1) {\n const key = fields[i]\n delete shallowCopy[key]\n }\n return shallowCopy\n}\n\nexport const createForwardRefComponent = (ReactComponent: any) => {\n const forwardRefComponent = (\n props,\n ref\n ) => <ReactComponent {...props} forwardedRef={ref} />\n\n return forwardRef(forwardRefComponent)\n}\n\n"],"names":["throttle","fn","threshold","arguments","length","undefined","scope","lastTime","deferTimer","_len","args","Array","_key","context","now","Date","apply","clearTimeout","setTimeout","debounce","ms","timer","_len2","_key2","omit","obj","fields","shallowCopy","Object","assign","i","key","createForwardRefComponent","ReactComponent","forwardRefComponent","props","ref","_jsx","forwardedRef","forwardRef"],"mappings":";;;AAAA;AAGM,SAAUA,QAAQA,CAAEC,EAAE,EAAyB;AAAA,EAAA,IAAvBC,SAAS,GAAAC,SAAA,CAAAC,MAAA,GAAA,CAAA,IAAAD,SAAA,CAAA,CAAA,CAAA,KAAAE,SAAA,GAAAF,SAAA,CAAA,CAAA,CAAA,GAAG,GAAG,CAAA;EAAA,IAAEG,KAAM,GAAAH,SAAA,CAAAC,MAAA,GAAAD,CAAAA,GAAAA,SAAA,MAAAE,SAAA,CAAA;EACnD,IAAIE,QAAQ,GAAG,CAAC,CAAA;AAChB,EAAA,IAAIC,UAAyC,CAAA;AAC7C,EAAA,OAAO,YAAiB;AAAA,IAAA,KAAA,IAAAC,IAAA,GAAAN,SAAA,CAAAC,MAAA,EAAJM,IAAI,GAAAC,IAAAA,KAAA,CAAAF,IAAA,GAAAG,IAAA,GAAA,CAAA,EAAAA,IAAA,GAAAH,IAAA,EAAAG,IAAA,EAAA,EAAA;AAAJF,MAAAA,IAAI,CAAAE,IAAA,CAAAT,GAAAA,SAAA,CAAAS,IAAA,CAAA,CAAA;AAAA,KAAA;AACtB,IAAA,MAAMC,OAAO,GAAGP,KAAK,IAAI,IAAI,CAAA;AAC7B,IAAA,MAAMQ,GAAG,GAAGC,IAAI,CAACD,GAAG,EAAE,CAAA;AACtB,IAAA,IAAIA,GAAG,GAAGP,QAAQ,GAAGL,SAAS,EAAE;AAC9BD,MAAAA,EAAE,CAACe,KAAK,CAAC,IAAI,EAA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IAAIA,CAAEC,GAAG,EAAEC,MAAM,EAAA;EAC/B,MAAMC,WAAW,GAAGC,MAAM,CAACC,MAAM,CAAC,EAAE,EAAEJ,GAAG,CAAC,CAAA;AAC1C,EAAA,KAAK,IAAIK,CAAC,GAAG,CAAC,EAAEA,CAAC,GAAGJ,MAAM,CAACtB,MAAM,EAAE0B,CAAC,IAAI,CAAC,EAAE;AACzC,IAAA,MAAMC,GAAG,GAAGL,MAAM,CAACI,CAAC,CAAC,CAAA;IACrB,OAAOH,WAAW,CAACI,GAAG,CAAC,CAAA;AACzB,GAAA;AACA,EAAA,OAAOJ,WAAW,CAAA;AACpB,CAAA;AAEaK,MAAAA,yBAAyB,GAAIC,cAAmB,IAAI;EAC/D,MAAMC,mBAAmB,GAAGA,CAC1BC,KAAK,EACLC,GAAG,kBACAC,GAAA,CAACJ,cAAc,EAAA;AAAA,IAAA,GAAKE,KAAK;AAAEG,IAAAA,YAAY,EAAEF,GAAAA;AAAI,GAAA,CAAG,CAAA;EAErD,OAAOG,UAAU,CAACL,mBAAmB,CAAC,CAAA;AACxC;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tarojs/components-react",
|
|
3
|
-
"version": "4.0.0
|
|
3
|
+
"version": "4.0.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main:h5": "dist/index.js",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -8,7 +8,9 @@
|
|
|
8
8
|
"types": "types/index.d.ts",
|
|
9
9
|
"sideEffects": [
|
|
10
10
|
"./dist/components/**/loader.js",
|
|
11
|
-
"**/style/*.js"
|
|
11
|
+
"**/style/*.js",
|
|
12
|
+
"*.scss",
|
|
13
|
+
"*.css"
|
|
12
14
|
],
|
|
13
15
|
"files": [
|
|
14
16
|
"dist",
|
|
@@ -22,28 +24,32 @@
|
|
|
22
24
|
"author": "",
|
|
23
25
|
"license": "MIT",
|
|
24
26
|
"dependencies": {
|
|
25
|
-
"@babel/runtime": "^7.
|
|
27
|
+
"@babel/runtime": "^7.24.4",
|
|
26
28
|
"classnames": "^2.2.5",
|
|
27
|
-
"intersection-observer": "^0.7.0",
|
|
28
|
-
"resolve-pathname": "^3.0.0",
|
|
29
29
|
"swiper": "6.8.0",
|
|
30
|
-
"
|
|
31
|
-
"@tarojs/taro": "4.0.0
|
|
32
|
-
"@tarojs/components": "4.0.0
|
|
30
|
+
"tslib": "^2.6.2",
|
|
31
|
+
"@tarojs/taro": "4.0.0",
|
|
32
|
+
"@tarojs/components": "4.0.0",
|
|
33
|
+
"@tarojs/shared": "4.0.0"
|
|
33
34
|
},
|
|
34
35
|
"devDependencies": {
|
|
35
|
-
"@babel/
|
|
36
|
-
"
|
|
37
|
-
"
|
|
38
|
-
"
|
|
39
|
-
"
|
|
40
|
-
"
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
"
|
|
36
|
+
"@babel/preset-react": "^7.24.1",
|
|
37
|
+
"babel-preset-solid": "^1.8.15",
|
|
38
|
+
"react": "^18.2.0",
|
|
39
|
+
"solid-js": "^1.8.16",
|
|
40
|
+
"@tarojs/helper": "4.0.0",
|
|
41
|
+
"@tarojs/runtime": "4.0.0"
|
|
42
|
+
},
|
|
43
|
+
"peerDependencies": {
|
|
44
|
+
"react": "*",
|
|
45
|
+
"solid-js": "*"
|
|
44
46
|
},
|
|
45
47
|
"scripts": {
|
|
46
|
-
"
|
|
47
|
-
"
|
|
48
|
+
"prod": "pnpm run build",
|
|
49
|
+
"prebuild": "pnpm run clean",
|
|
50
|
+
"build": "pnpm run rollup --environment NODE_ENV:production",
|
|
51
|
+
"clean": "rimraf ./dist",
|
|
52
|
+
"dev": "pnpm run rollup --environment NODE_ENV:development -w",
|
|
53
|
+
"rollup": "rollup -c"
|
|
48
54
|
}
|
|
49
55
|
}
|
package/types/index.d.ts
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
1
1
|
declare module '@tarojs/components-react' {
|
|
2
2
|
export * from '@tarojs/components'
|
|
3
3
|
}
|
|
4
|
+
|
|
5
|
+
declare module '*/hooks' {
|
|
6
|
+
import * as React from 'react'
|
|
7
|
+
export const useState: typeof React.useState
|
|
8
|
+
export const useCallback: typeof React.useCallback
|
|
9
|
+
export const useEffect: typeof React.useEffect
|
|
10
|
+
export const useMemo: typeof React.useMemo
|
|
11
|
+
export const useRef: typeof React.useRef
|
|
12
|
+
export const createContext: typeof React.createContext
|
|
13
|
+
export const useContext: typeof React.useContext
|
|
14
|
+
export const memo: typeof React.memo
|
|
15
|
+
export const forwardRef: typeof React.forwardRef
|
|
16
|
+
export const useImperativeHandle: typeof React.useImperativeHandle
|
|
17
|
+
}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import styleInject from '../../../node_modules/.pnpm/style-inject@0.3.0/node_modules/style-inject/dist/style-inject.es.js';
|
|
2
|
-
|
|
3
|
-
var css_248z = "img[src=\"\"] {\n opacity: 0;\n}\n\n.taro-img {\n display: inline-block;\n overflow: hidden;\n position: relative;\n font-size: 0;\n width: 320px;\n height: 240px;\n}\n\n.taro-img.taro-img__widthfix {\n height: 100%;\n}\n\n.taro-img__mode-scaletofill {\n object-fit: contain;\n width: 100%;\n height: 100%;\n}\n\n.taro-img__mode-aspectfit {\n object-fit: contain;\n width: 100%;\n height: 100%;\n}\n\n.taro-img__mode-aspectfill {\n object-fit: cover;\n width: 100%;\n height: 100%;\n}\n\n.taro-img__mode-widthfix {\n width: 100%;\n}\n\n.taro-img__mode-top {\n width: 100%;\n}\n\n.taro-img__mode-bottom {\n width: 100%;\n position: absolute;\n bottom: 0;\n}\n\n.taro-img__mode-left {\n height: 100%;\n}\n\n.taro-img__mode-right {\n position: absolute;\n height: 100%;\n right: 0;\n}\n\n.taro-img__mode-topright {\n position: absolute;\n right: 0;\n}\n\n.taro-img__mode-bottomleft {\n position: absolute;\n bottom: 0;\n}\n\n.taro-img__mode-bottomright {\n position: absolute;\n right: 0;\n bottom: 0;\n}\n";
|
|
4
|
-
var stylesheet="img[src=\"\"] {\n opacity: 0;\n}\n\n.taro-img {\n display: inline-block;\n overflow: hidden;\n position: relative;\n font-size: 0;\n width: 320px;\n height: 240px;\n}\n\n.taro-img.taro-img__widthfix {\n height: 100%;\n}\n\n.taro-img__mode-scaletofill {\n object-fit: contain;\n width: 100%;\n height: 100%;\n}\n\n.taro-img__mode-aspectfit {\n object-fit: contain;\n width: 100%;\n height: 100%;\n}\n\n.taro-img__mode-aspectfill {\n object-fit: cover;\n width: 100%;\n height: 100%;\n}\n\n.taro-img__mode-widthfix {\n width: 100%;\n}\n\n.taro-img__mode-top {\n width: 100%;\n}\n\n.taro-img__mode-bottom {\n width: 100%;\n position: absolute;\n bottom: 0;\n}\n\n.taro-img__mode-left {\n height: 100%;\n}\n\n.taro-img__mode-right {\n position: absolute;\n height: 100%;\n right: 0;\n}\n\n.taro-img__mode-topright {\n position: absolute;\n right: 0;\n}\n\n.taro-img__mode-bottomleft {\n position: absolute;\n bottom: 0;\n}\n\n.taro-img__mode-bottomright {\n position: absolute;\n right: 0;\n bottom: 0;\n}\n";
|
|
5
|
-
styleInject(css_248z,{"insertAt":"top"});
|
|
6
|
-
|
|
7
|
-
export { css_248z as default, stylesheet };
|
|
8
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import styleInject from '../../../node_modules/.pnpm/style-inject@0.3.0/node_modules/style-inject/dist/style-inject.es.js';
|
|
2
|
-
|
|
3
|
-
var css_248z = ".rmc-pull-to-refresh-content {\r\n transform-origin: left top 0px;\r\n}\r\n.rmc-pull-to-refresh-content-wrapper {\r\n min-height: 100%;\r\n}\r\n\r\n.rmc-pull-to-refresh-transition {\r\n transition: transform 0.3s;\r\n}\r\n\r\n@keyframes rmc-pull-to-refresh-indicator {\r\n 50% {\r\n opacity: 0.2;\r\n }\r\n 100% {\r\n opacity: 1;\r\n }\r\n}\r\n\r\n.rmc-pull-to-refresh-indicator {\r\n text-align: center;\r\n height: 30px;\r\n line-height: 10px;\r\n}\r\n\r\n.rmc-pull-to-refresh-indicator > div {\r\n background-color: grey;\r\n width: 6px;\r\n height: 6px;\r\n border-radius: 100%;\r\n margin: 3px;\r\n animation-fill-mode: both;\r\n display: inline-block;\r\n animation: rmc-pull-to-refresh-indicator 0.5s 0s infinite linear;\r\n}\r\n.rmc-pull-to-refresh-indicator > div:nth-child(0) {\r\n animation-delay: -0.1s !important;\r\n}\r\n.rmc-pull-to-refresh-indicator > div:nth-child(1) {\r\n animation-delay: -0.2s !important;\r\n}\r\n.rmc-pull-to-refresh-indicator > div:nth-child(2) {\r\n animation-delay: -0.3s !important;\r\n}\r\n.rmc-pull-to-refresh-down .rmc-pull-to-refresh-indicator {\r\n margin-top: -25px;\r\n}\r\n";
|
|
4
|
-
var stylesheet=".rmc-pull-to-refresh-content {\r\n transform-origin: left top 0px;\r\n}\r\n.rmc-pull-to-refresh-content-wrapper {\r\n min-height: 100%;\r\n}\r\n\r\n.rmc-pull-to-refresh-transition {\r\n transition: transform 0.3s;\r\n}\r\n\r\n@keyframes rmc-pull-to-refresh-indicator {\r\n 50% {\r\n opacity: 0.2;\r\n }\r\n 100% {\r\n opacity: 1;\r\n }\r\n}\r\n\r\n.rmc-pull-to-refresh-indicator {\r\n text-align: center;\r\n height: 30px;\r\n line-height: 10px;\r\n}\r\n\r\n.rmc-pull-to-refresh-indicator > div {\r\n background-color: grey;\r\n width: 6px;\r\n height: 6px;\r\n border-radius: 100%;\r\n margin: 3px;\r\n animation-fill-mode: both;\r\n display: inline-block;\r\n animation: rmc-pull-to-refresh-indicator 0.5s 0s infinite linear;\r\n}\r\n.rmc-pull-to-refresh-indicator > div:nth-child(0) {\r\n animation-delay: -0.1s !important;\r\n}\r\n.rmc-pull-to-refresh-indicator > div:nth-child(1) {\r\n animation-delay: -0.2s !important;\r\n}\r\n.rmc-pull-to-refresh-indicator > div:nth-child(2) {\r\n animation-delay: -0.3s !important;\r\n}\r\n.rmc-pull-to-refresh-down .rmc-pull-to-refresh-indicator {\r\n margin-top: -25px;\r\n}\r\n";
|
|
5
|
-
styleInject(css_248z,{"insertAt":"top"});
|
|
6
|
-
|
|
7
|
-
export { css_248z as default, stylesheet };
|
|
8
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import styleInject from '../../../node_modules/.pnpm/style-inject@0.3.0/node_modules/style-inject/dist/style-inject.es.js';
|
|
2
|
-
|
|
3
|
-
var css_248z = ".taro-scroll {\n -webkit-overflow-scrolling: auto;\n}\n\n.taro-scroll::-webkit-scrollbar {\n display: none;\n}\n\n.taro-scroll-view {\n overflow: hidden;\n}\n\n.taro-scroll-view__scroll-x {\n overflow-x: scroll;\n overflow-y: hidden;\n}\n\n.taro-scroll-view__scroll-y {\n overflow-x: hidden;\n overflow-y: scroll;\n}\n";
|
|
4
|
-
var stylesheet=".taro-scroll {\n -webkit-overflow-scrolling: auto;\n}\n\n.taro-scroll::-webkit-scrollbar {\n display: none;\n}\n\n.taro-scroll-view {\n overflow: hidden;\n}\n\n.taro-scroll-view__scroll-x {\n overflow-x: scroll;\n overflow-y: hidden;\n}\n\n.taro-scroll-view__scroll-y {\n overflow-x: hidden;\n overflow-y: scroll;\n}\n";
|
|
5
|
-
styleInject(css_248z,{"insertAt":"top"});
|
|
6
|
-
|
|
7
|
-
export { css_248z as default, stylesheet };
|
|
8
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import styleInject from '../../../node_modules/.pnpm/style-inject@0.3.0/node_modules/style-inject/dist/style-inject.es.js';
|
|
2
|
-
|
|
3
|
-
var css_248z = ".swiper-container-wrapper {\n height: 150px;\n}\n\n.swiper-container {\n height: 100%;\n}\n\n.swiper-pagination {\n font-size: 0;\n}\n\n.swiper-pagination-bullet {\n opacity: 1\n}\n";
|
|
4
|
-
var stylesheet=".swiper-container-wrapper {\n height: 150px;\n}\n\n.swiper-container {\n height: 100%;\n}\n\n.swiper-pagination {\n font-size: 0;\n}\n\n.swiper-pagination-bullet {\n opacity: 1\n}\n";
|
|
5
|
-
styleInject(css_248z,{"insertAt":"top"});
|
|
6
|
-
|
|
7
|
-
export { css_248z as default, stylesheet };
|
|
8
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import styleInject from '../../../node_modules/.pnpm/style-inject@0.3.0/node_modules/style-inject/dist/style-inject.es.js';
|
|
2
|
-
|
|
3
|
-
var css_248z = ".taro-text {\n -moz-user-select: none;\n -webkit-user-select: none;\n -ms-user-select: none;\n user-select: none;\n}\n\n.taro-text__selectable {\n -moz-user-select: text;\n -webkit-user-select: text;\n -ms-user-select: text;\n user-select: text;\n}\n";
|
|
4
|
-
var stylesheet=".taro-text {\n -moz-user-select: none;\n -webkit-user-select: none;\n -ms-user-select: none;\n user-select: none;\n}\n\n.taro-text__selectable {\n -moz-user-select: text;\n -webkit-user-select: text;\n -ms-user-select: text;\n user-select: text;\n}\n";
|
|
5
|
-
styleInject(css_248z,{"insertAt":"top"});
|
|
6
|
-
|
|
7
|
-
export { css_248z as default, stylesheet };
|
|
8
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import styleInject from '../../../node_modules/.pnpm/style-inject@0.3.0/node_modules/style-inject/dist/style-inject.es.js';
|
|
2
|
-
|
|
3
|
-
var css_248z = "body, html{\n -webkit-tap-highlight-color: rgba(0, 0, 0, 0);\n user-select: none;\n -moz-user-select: none;\n -webkit-user-select: none;\n -ms-user-select: none;\n}\n";
|
|
4
|
-
var stylesheet="body, html{\n -webkit-tap-highlight-color: rgba(0, 0, 0, 0);\n user-select: none;\n -moz-user-select: none;\n -webkit-user-select: none;\n -ms-user-select: none;\n}\n";
|
|
5
|
-
styleInject(css_248z,{"insertAt":"top"});
|
|
6
|
-
|
|
7
|
-
export { css_248z as default, stylesheet };
|
|
8
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;"}
|
package/dist/node_modules/.pnpm/style-inject@0.3.0/node_modules/style-inject/dist/style-inject.es.js
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
function styleInject(css, ref) {
|
|
2
|
-
if (ref === void 0) ref = {};
|
|
3
|
-
var insertAt = ref.insertAt;
|
|
4
|
-
if (!css || typeof document === 'undefined') {
|
|
5
|
-
return;
|
|
6
|
-
}
|
|
7
|
-
var head = document.head || document.getElementsByTagName('head')[0];
|
|
8
|
-
var style = document.createElement('style');
|
|
9
|
-
style.type = 'text/css';
|
|
10
|
-
if (insertAt === 'top') {
|
|
11
|
-
if (head.firstChild) {
|
|
12
|
-
head.insertBefore(style, head.firstChild);
|
|
13
|
-
} else {
|
|
14
|
-
head.appendChild(style);
|
|
15
|
-
}
|
|
16
|
-
} else {
|
|
17
|
-
head.appendChild(style);
|
|
18
|
-
}
|
|
19
|
-
if (style.styleSheet) {
|
|
20
|
-
style.styleSheet.cssText = css;
|
|
21
|
-
} else {
|
|
22
|
-
style.appendChild(document.createTextNode(css));
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
export { styleInject as default };
|
|
27
|
-
//# sourceMappingURL=style-inject.es.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"style-inject.es.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|