@tarojs/components-react 4.1.0-alpha.0 → 4.1.0-alpha.2

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.
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../src/components/view/index.tsx"],"sourcesContent":["import classNames from 'classnames'\n\nimport { useEffect, useState } from '../../utils/hooks'\nimport { createForwardRefComponent } from '../../utils/index'\n\nimport type { TFunc } from '@tarojs/runtime/dist/runtime.esm'\nimport type React from 'react'\n\ninterface IProps extends React.HTMLAttributes<HTMLDivElement> {\n hoverClass?: string\n hoverStartTime?: number\n hoverStayTime?: number\n onTouchStart?(e: React.TouchEvent<HTMLDivElement>): void\n onTouchEnd?(e: React.TouchEvent<HTMLDivElement>): void\n onTouchMove?(e: React.TouchEvent<HTMLDivElement>): void\n onLongPress?(): void\n forwardedRef?: React.MutableRefObject<HTMLDivElement>\n}\n\nfunction View ({\n className,\n hoverClass,\n forwardedRef,\n onTouchStart,\n onTouchEnd,\n onTouchMove,\n hoverStartTime = 50,\n hoverStayTime = 400,\n ...other\n}: IProps) {\n let timeoutEvent: ReturnType<typeof setTimeout>\n let startTime = 0\n const [hover, setHover] = useState<boolean>(false)\n const [touch, setTouch] = useState<boolean>(false)\n\n const [cls, setCls] = useState<string>(classNames(\n '',\n {\n [`${hoverClass}`]: process.env.FRAMEWORK === 'solid' ? (hover as unknown as TFunc)() : hover\n },\n className\n ))\n\n const _onTouchStart = e => {\n if (hoverClass) {\n setTouch(true)\n setTimeout(() => {\n if (process.env.FRAMEWORK === 'solid' ? (touch as unknown as TFunc)() : touch) {\n setHover(true)\n }\n }, hoverStartTime)\n }\n onTouchStart && onTouchStart(e)\n if (other.onLongPress) {\n timeoutEvent = setTimeout(() => {\n other.onLongPress!()\n }, 350)\n startTime = new Date().getTime()\n }\n }\n\n const _onTouchMove = e => {\n clearTimeout(timeoutEvent)\n onTouchMove && onTouchMove(e)\n }\n\n const _onTouchEnd = e => {\n const spanTime = new Date().getTime() - startTime\n if (spanTime < 350) {\n clearTimeout(timeoutEvent)\n }\n if (hoverClass) {\n setTouch(false)\n setTimeout(() => {\n if (process.env.FRAMEWORK === 'solid' ? (touch as unknown as TFunc)() : touch) {\n setHover(false)\n }\n }, hoverStayTime)\n }\n onTouchEnd && onTouchEnd(e)\n }\n\n useEffect(() => {\n setCls(classNames(\n '',\n {\n [`${hoverClass}`]: process.env.FRAMEWORK === 'solid' ? (hover as unknown as TFunc)() : hover\n },\n className\n ))\n }, [hover, className])\n\n return (\n <div\n ref={forwardedRef}\n className={process.env.FRAMEWORK === 'solid' ? (cls as unknown as TFunc)() : cls as string}\n onTouchStart={_onTouchStart}\n onTouchEnd={_onTouchEnd}\n onTouchMove={_onTouchMove}\n {...other}\n >\n {other.children}\n </div>\n )\n}\n\n\nexport default createForwardRefComponent(View)\n"],"names":["View","_a","className","hoverClass","forwardedRef","onTouchStart","onTouchEnd","onTouchMove","hoverStartTime","hoverStayTime","other","__rest","timeoutEvent","startTime","hover","setHover","useState","touch","setTouch","cls","setCls","classNames","process","_onTouchStart","e","setTimeout","onLongPress","Date","getTime","_onTouchMove","clearTimeout","_onTouchEnd","spanTime","useEffect","_jsx","ref","children","createForwardRefComponent"],"mappings":";;;;;;AAmBA,SAASA,IAAIA,CAAEC,EAUN,EAAA;MAVM;MACbC,SAAS;MACTC,UAAU;MACVC,YAAY;MACZC,YAAY;MACZC,UAAU;MACVC,WAAW;AACXC,MAAAA,cAAc,GAAG,EAAE;AACnBC,MAAAA,aAAa,GAAG,GAAA;UAET;IADJC,KAAK,GATKC,MAAA,CAAAV,EAAA,EAAA,CAAA,WAAA,EAAA,YAAA,EAAA,cAAA,EAAA,cAAA,EAAA,YAAA,EAAA,aAAA,EAAA,gBAAA,EAAA,eAAA,CAUd,CADS,CAAA;AAER,EAAA,IAAIW,YAA2C,CAAA;EAC/C,IAAIC,SAAS,GAAG,CAAC,CAAA;EACjB,MAAM,CAACC,KAAK,EAAEC,QA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AS,CAAA;IACjD,IAAImB,QAAQ,GAAG,GAAG,EAAE;MAClBF,YAAY,CAAClB,YAAY,CAAC,CAAA;AAC5B,KAAA;AACA,IAAA,IAAIT,UAAU,EAAE;MACde,QAAQ,CAAC,KAAK,CAAC,CAAA;AACfO,MAAAA,UAAU,CAAC,MAAK;AACd,QAAA,IAAIH,OAAqB,KAAK,OAAO,GAAIL,KAA0B,EAAE,GAAGA,KAAK,EAAE;UAC7EF,QAAQ,CAAC,KAAK,CAAC,CAAA;AACjB,SAAA;OACD,EAAEN,aAAa,CAAC,CAAA;AACnB,KAAA;AACAH,IAAAA,UAAU,IAAIA,UAAU,CAACkB,CAAC,CAAC,CAAA;GAC5B,CAAA;AAEDS,EAAAA,SAAS,CAAC,MAAK;AACbb,IAAAA,MAAM,CAACC,UAAU,CACf,EAAE,EACF;AACE,MAAA,CAAC,CAAGlB,EAAAA,UAAU,CAAE,CAAA,GAAGmB,OAAqB,KAAK,OAAO,GAAIR,KAA0B,EAAE,GAAGA,KAAAA;KACxF,EACDZ,SAAS,CACV,CAAC,CAAA;AACJ,GAAC,EAAE,CAACY,KAAK,EAAEZ,SAAS,CAAC,CAAC,CAAA;AAEtB,EAAA,oBACEgC,GAAA,CAAA,KAAA,EAAA;AACEC,IAAAA,GAAG,EAAE/B,YAAa;AAClBF,IAAAA,SAAS,EAAEoB,OAAqB,KAAK,OAAO,GAAIH,GAAwB,EAAE,GAAGA,GAAc;AAC3Fd,IAAAA,YAAY,EAAEkB,aAAc;AAC5BjB,IAAAA,UAAU,EAAEyB,WAAY;AACxBxB,IAAAA,WAAW,EAAEsB,YAAa;AAAA,IAAA,GACtBnB,KAAK;IAAA0B,QAAA,EAER1B,KAAK,CAAC0B,QAAAA;AAAQ,GACZ,CAAC,CAAA;AAEV,CAAA;AAGA,YAAeC,yBAAyB,CAACrC,IAAI,CAAC;;;;"}
1
+ {"version":3,"file":"index.js","sources":["../../../src/components/view/index.tsx"],"sourcesContent":["import classNames from 'classnames'\n\nimport { useEffect, useState } from '../../utils/hooks'\nimport { createForwardRefComponent } from '../../utils/index'\n\nimport type { TFunc } from '@tarojs/runtime/dist/runtime.esm'\nimport type React from 'react'\n\ninterface IProps extends React.HTMLAttributes<HTMLDivElement> {\n hoverClass?: string\n hoverStartTime?: number\n hoverStayTime?: number\n onTouchStart?(e: React.TouchEvent<HTMLDivElement>): void\n onTouchEnd?(e: React.TouchEvent<HTMLDivElement>): void\n onTouchMove?(e: React.TouchEvent<HTMLDivElement>): void\n onLongPress?(): void\n forwardedRef?: React.MutableRefObject<HTMLDivElement>\n}\n\nfunction View ({\n className,\n hoverClass,\n forwardedRef,\n onTouchStart,\n onTouchEnd,\n onTouchMove,\n hoverStartTime = 50,\n hoverStayTime = 400,\n ...other\n}: IProps) {\n let timeoutEvent: ReturnType<typeof setTimeout>\n let startTime = 0\n const [hover, setHover] = useState<boolean>(false)\n const [touch, setTouch] = useState<boolean>(false)\n\n const [cls, setCls] = useState<string>(classNames(\n '',\n {\n [`${hoverClass}`]: process.env.FRAMEWORK === 'solid' ? (hover as unknown as TFunc)() : hover\n },\n className\n ))\n\n const _onTouchStart = e => {\n if (hoverClass) {\n setTouch(true)\n setTimeout(() => {\n if (process.env.FRAMEWORK === 'solid' ? (touch as unknown as TFunc)() : touch) {\n setHover(true)\n }\n }, hoverStartTime)\n }\n onTouchStart && onTouchStart(e)\n if (other.onLongPress) {\n timeoutEvent = setTimeout(() => {\n other.onLongPress!()\n }, 350)\n startTime = new Date().getTime()\n }\n }\n\n const _onTouchMove = e => {\n clearTimeout(timeoutEvent)\n onTouchMove && onTouchMove(e)\n }\n\n const _onTouchEnd = e => {\n const spanTime = new Date().getTime() - startTime\n if (spanTime < 350) {\n clearTimeout(timeoutEvent)\n }\n if (hoverClass) {\n setTouch(false)\n setTimeout(() => {\n if (process.env.FRAMEWORK === 'solid' ? (touch as unknown as TFunc)() : touch) {\n setHover(false)\n }\n }, hoverStayTime)\n }\n onTouchEnd && onTouchEnd(e)\n }\n\n useEffect(() => {\n setCls(classNames(\n '',\n {\n [`${hoverClass}`]: process.env.FRAMEWORK === 'solid' ? (hover as unknown as TFunc)() : hover\n },\n className\n ))\n }, [hover, className])\n\n return (\n <div\n ref={forwardedRef}\n className={process.env.FRAMEWORK === 'solid' ? (cls as unknown as TFunc)() : cls as string}\n onTouchStart={_onTouchStart}\n onTouchEnd={_onTouchEnd}\n onTouchMove={_onTouchMove}\n {...other}\n >\n {other.children}\n </div>\n )\n}\n\n\nexport default createForwardRefComponent(View)\n"],"names":["View","_a","className","hoverClass","forwardedRef","onTouchStart","onTouchEnd","onTouchMove","hoverStartTime","hoverStayTime","other","__rest","timeoutEvent","startTime","hover","setHover","useState","touch","setTouch","cls","setCls","classNames","process","_onTouchStart","e","setTimeout","onLongPress","Date","getTime","_onTouchMove","clearTimeout","_onTouchEnd","spanTime","useEffect","_jsx","ref","children","createForwardRefComponent"],"mappings":";;;;;;AAmBA,SAASA,IAAIA,CAAEC,EAUN,EAAA;MAVM;MACbC,SAAS;MACTC,UAAU;MACVC,YAAY;MACZC,YAAY;MACZC,UAAU;MACVC,WAAW;AACXC,MAAAA,cAAc,GAAG,EAAE;AACnBC,MAAAA,aAAa,GAAG;UAET;IADJC,KAAK,GATKC,MAAA,CAAAV,EAAA,EAAA,CAAA,WAAA,EAAA,YAAA,EAAA,cAAA,EAAA,cAAA,EAAA,YAAA,EAAA,aAAA,EAAA,gBAAA,EAAA,eAAA,CAUd,CADS;AAER,EAAA,IAAIW,YAA2C;EAC/C,IAAIC,SAAS,GAAG,CAAC;EACjB,MAAM,CAACC,KAAK,EAAEC,QAAQ,CAAC,GAAGC,QAAQ,CAAU,KAAK,CAAC;EAClD,MAAM,CAACC,KAAK,EAAEC,QAAQ,CAAC,GAAGF,QAAQ,CAAU,KAAK,CAAC;EAElD,MAAM,CAACG,GAAG,EAAEC,MAAM,CAAC,GAAGJ,QAAQ,CAASK,UAAU,CAC/C,EAAE,EACF;AACE,IAAA,CAAC,CAAGlB,EAA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AAU,CAACkB,CAAC,CAAC;GAC5B;AAEDS,EAAAA,SAAS,CAAC,MAAK;AACbb,IAAAA,MAAM,CAACC,UAAU,CACf,EAAE,EACF;AACE,MAAA,CAAC,CAAGlB,EAAAA,UAAU,CAAE,CAAA,GAAGmB,OAAqB,KAAK,OAAO,GAAIR,KAA0B,EAAE,GAAGA;KACxF,EACDZ,SAAS,CACV,CAAC;AACJ,GAAC,EAAE,CAACY,KAAK,EAAEZ,SAAS,CAAC,CAAC;AAEtB,EAAA,oBACEgC,GAAA,CAAA,KAAA,EAAA;AACEC,IAAAA,GAAG,EAAE/B,YAAa;AAClBF,IAAAA,SAAS,EAAEoB,OAAqB,KAAK,OAAO,GAAIH,GAAwB,EAAE,GAAGA,GAAc;AAC3Fd,IAAAA,YAAY,EAAEkB,aAAc;AAC5BjB,IAAAA,UAAU,EAAEyB,WAAY;AACxBxB,IAAAA,WAAW,EAAEsB,YAAa;AAAA,IAAA,GACtBnB,KAAK;IAAA0B,QAAA,EAER1B,KAAK,CAAC0B;AAAQ,GACZ,CAAC;AAEV;AAGA,YAAeC,yBAAyB,CAACrC,IAAI,CAAC;;;;"}
package/dist/index.css CHANGED
@@ -1 +1 @@
1
- @-webkit-keyframes weuiLoading{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}@keyframes weuiLoading{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}.taro-button-core[loading]>.weui-loading{animation:weuiLoading 1s steps(12) infinite;background:transparent url("data:image/svg+xml;charset=utf8, %3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120' viewBox='0 0 100 100'%3E%3Cpath fill='none' d='M0 0h100v100H0z'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='%23E9E9E9' rx='5' ry='5' transform='translate(0 -30)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='%23989697' rx='5' ry='5' transform='rotate(30 105.98 65)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='%239B999A' rx='5' ry='5' transform='rotate(60 75.98 65)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='%23A3A1A2' rx='5' ry='5' transform='rotate(90 65 65)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='%23ABA9AA' rx='5' ry='5' transform='rotate(120 58.66 65)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='%23B2B2B2' rx='5' ry='5' transform='rotate(150 54.02 65)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='%23BAB8B9' rx='5' ry='5' transform='rotate(180 50 65)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='%23C2C0C1' rx='5' ry='5' transform='rotate(-150 45.98 65)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='%23CBCBCB' rx='5' ry='5' transform='rotate(-120 41.34 65)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='%23D2D2D2' rx='5' ry='5' transform='rotate(-90 35 65)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='%23DADADA' rx='5' ry='5' transform='rotate(-60 24.02 65)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='%23E2E2E2' rx='5' ry='5' transform='rotate(-30 -5.98 65)'/%3E%3C/svg%3E") no-repeat;background-size:100%;display:inline-block;height:20px;vertical-align:middle;width:20px}.taro-button-core[loading]>.weui-loading.weui-btn_primary,.taro-button-core[loading]>.weui-loading.weui-btn_warn{color:hsla(0,0%,100%,.6)}.taro-button-core[loading]>.weui-loading.weui-btn_primary{background-color:#179b16}.taro-button-core[loading]>.weui-loading.weui-btn_warn{background-color:#ce3c39}.taro-button-core{-webkit-tap-highlight-color:rgba(0,0,0,0);appearance:none;background-color:#f8f8f8;border-radius:5px;border-width:0;box-sizing:border-box;color:#000;display:block;font-size:18px;line-height:2.55555556;margin-left:auto;margin-right:auto;outline:0;overflow:hidden;padding-left:14px;padding-right:14px;position:relative;text-align:center;text-decoration:none;width:100%}.taro-button-core:focus{outline:0}.taro-button-core:not([disabled]):active{background-color:#dedede;color:rgba(0,0,0,.6)}.taro-button-core:after{border:1px solid rgba(0,0,0,.2);border-radius:10px;box-sizing:border-box;content:" ";height:200%;left:0;position:absolute;top:0;transform:scale(.5);transform-origin:0 0;width:200%}.taro-button-core+.taro-button-core{margin-top:15px}.taro-button-core[type=default]{background-color:#f8f8f8;color:#000}.taro-button-core[type=default]:not([disabled]):visited{color:#000}.taro-button-core[type=default]:not([disabled]):active{background-color:#dedede;color:rgba(0,0,0,.6)}.taro-button-core[size=mini]{display:inline-block;font-size:13px;line-height:2.3;padding:0 1.32em;width:auto}.taro-button-core[plain=true],.taro-button-core[plain=true][type=default],.taro-button-core[plain=true][type=primary]{background-color:transparent;border-width:1px}.taro-button-core[disabled]{color:hsla(0,0%,100%,.6)}.taro-button-core[disabled][type=default]{background-color:#f7f7f7;color:rgba(0,0,0,.3)}.taro-button-core[disabled][type=primary]{background-color:#9ed99d}.taro-button-core[disabled][type=warn]{background-color:#ec8b89}.taro-button-core[loading] .weui-loading{margin:-.2em .34em 0 0}.taro-button-core[loading][type=primary],.taro-button-core[loading][type=warn]{color:hsla(0,0%,100%,.6)}.taro-button-core[loading][type=primary]{background-color:#179b16}.taro-button-core[loading][type=warn]{background-color:#ce3c39}.taro-button-core[plain=true][type=primary]{border:1px solid #1aad19;color:#1aad19}.taro-button-core[plain=true][type=primary]:not([disabled]):active{background-color:transparent;border-color:rgba(26,173,25,.6);color:rgba(26,173,25,.6)}.taro-button-core[plain=true][type=primary]:after{border-width:0}.taro-button-core[plain=true][type=warn]{border:1px solid #e64340;color:#e64340}.taro-button-core[plain=true][type=warn]:not([disabled]):active{background-color:transparent;border-color:rgba(230,67,64,.6);color:rgba(230,67,64,.6)}.taro-button-core[plain=true][type=warn]:after{border-width:0}.taro-button-core[plain=true],.taro-button-core[plain=true][type=default]{border:1px solid #353535;color:#353535}.taro-button-core[plain=true]:not([disabled]):active,.taro-button-core[plain=true][type=default]:not([disabled]):active{background-color:transparent;border-color:rgba(53,53,53,.6);color:rgba(53,53,53,.6)}.taro-button-core[plain=true]:after,.taro-button-core[plain=true][type=default]:after{border-width:0}.taro-button-core[type=primary]{background-color:#1aad19;color:#fff}.taro-button-core[type=primary]:not([disabled]):visited{color:#fff}.taro-button-core[type=primary]:not([disabled]):active{background-color:#179b16;color:hsla(0,0%,100%,.6)}.taro-button-core[type=warn]{background-color:#e64340;color:#fff}.taro-button-core[type=warn]:not([disabled]):visited{color:#fff}.taro-button-core[type=warn]:not([disabled]):active{background-color:#ce3c39;color:hsla(0,0%,100%,.6)}.taro-button-core[plain=true][disabled]{background-color:#f7f7f7;border:1px solid rgba(0,0,0,.2);color:rgba(0,0,0,.3)}.taro-button-core[plain=true][disabled][type=primary]{background-color:#f7f7f7;border:1px solid rgba(0,0,0,.2);color:rgba(0,0,0,.3)}.weui-icon-circle:before{content:"\ea01"}.weui-icon-download:before{content:"\ea02"}.weui-icon-info:before{content:"\ea03"}.weui-icon-safe-success:before{content:"\ea04"}.weui-icon-safe-warn:before{content:"\ea05"}.weui-icon-success:before{content:"\ea06"}.weui-icon-success-circle:before{content:"\ea07"}.weui-icon-success-no-circle:before{content:"\ea08"}.weui-icon-waiting:before{content:"\ea09"}.weui-icon-waiting-circle:before{content:"\ea0a"}.weui-icon-warn:before{content:"\ea0b"}.weui-icon-info-circle:before{content:"\ea0c"}.weui-icon-cancel:before{content:"\ea0d"}.weui-icon-search:before{content:"\ea0e"}.weui-icon-clear:before{content:"\ea0f"}.weui-icon-back:before{content:"\ea10"}.weui-icon-delete:before{content:"\ea11"}.weui-icon-success{color:#09bb07;font-size:23px}.weui-icon-waiting{color:#10aeff;font-size:23px}.weui-icon-warn{color:#f43530;font-size:23px}.weui-icon-info{color:#10aeff;font-size:23px}.weui-icon-success-circle,.weui-icon-success-no-circle{color:#09bb07;font-size:23px}.weui-icon-waiting-circle{color:#10aeff;font-size:23px}.weui-icon-circle{color:#c9c9c9;font-size:23px}.weui-icon-download,.weui-icon-info-circle{color:#09bb07;font-size:23px}.weui-icon-safe-success{color:#09bb07}.weui-icon-safe-warn{color:#ffbe00}.weui-icon-cancel{color:#f43530;font-size:22px}.weui-icon-clear,.weui-icon-search{color:#b2b2b2;font-size:14px}.weui-icon-delete.weui-icon_gallery-delete{color:#fff;font-size:22px}.weui-icon_msg{font-size:93px}.weui-icon_msg.weui-icon-warn{color:#f76260}.weui-icon_msg-primary{font-size:93px}.weui-icon_msg-primary.weui-icon-warn{color:#ffbe00}img[src=""]{opacity:0}.taro-img{display:inline-block;font-size:0;height:240px;overflow:hidden;position:relative;width:320px}.taro-img.taro-img__widthfix{height:100%}.taro-img__mode-scaletofill{height:100%;width:100%}.taro-img__mode-aspectfit{height:100%;object-fit:contain;width:100%}.taro-img__mode-aspectfill{height:100%;object-fit:cover;width:100%}.taro-img__mode-top,.taro-img__mode-widthfix{width:100%}.taro-img__mode-bottom{bottom:0;position:absolute;width:100%}.taro-img__mode-left{height:100%}.taro-img__mode-right{height:100%}.taro-img__mode-right,.taro-img__mode-topright{position:absolute;right:0}.taro-img__mode-bottomleft{bottom:0;position:absolute}.taro-img__mode-bottomright{bottom:0;position:absolute;right:0}.taro-input-core{display:block}.weui-input{-webkit-appearance:none;background-color:transparent;border:0;color:inherit;font-size:inherit;height:1.4705882353em;line-height:1.4705882353;outline:0;width:100%}.weui-input::-webkit-inner-spin-button,.weui-input::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}.rmc-pull-to-refresh-content{transform-origin:left top 0}.rmc-pull-to-refresh-content-wrapper{min-height:100%}.rmc-pull-to-refresh-transition{transition:transform .3s}@keyframes rmc-pull-to-refresh-indicator{50%{opacity:.2}to{opacity:1}}.rmc-pull-to-refresh-indicator{height:30px;line-height:10px;text-align:center}.rmc-pull-to-refresh-indicator>div{animation-fill-mode:both;animation:rmc-pull-to-refresh-indicator .5s linear 0s infinite;background-color:grey;border-radius:100%;display:inline-block;height:6px;margin:3px;width:6px}.rmc-pull-to-refresh-indicator>div:nth-child(0){animation-delay:-.1s!important}.rmc-pull-to-refresh-indicator>div:first-child{animation-delay:-.2s!important}.rmc-pull-to-refresh-indicator>div:nth-child(2){animation-delay:-.3s!important}.rmc-pull-to-refresh-down .rmc-pull-to-refresh-indicator{margin-top:-25px}.taro-scroll{-webkit-overflow-scrolling:auto}.taro-scroll::-webkit-scrollbar{display:none}.taro-scroll-view{overflow:hidden}.taro-scroll-view__scroll-x{overflow-x:scroll;overflow-y:hidden}.taro-scroll-view__scroll-y{overflow-x:hidden;overflow-y:scroll}.swiper-container-wrapper{height:150px}.swiper-container{height:100%;overflow:visible;position:relative}.taro-text{-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none}.taro-text__selectable{-moz-user-select:text;-webkit-user-select:text;-ms-user-select:text;user-select:text}
1
+ @-webkit-keyframes weuiLoading{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}@keyframes weuiLoading{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}.taro-button-core[loading]>.weui-loading{animation:weuiLoading 1s steps(12) infinite;background:transparent url("data:image/svg+xml;charset=utf8, %3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120' viewBox='0 0 100 100'%3E%3Cpath fill='none' d='M0 0h100v100H0z'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='%23E9E9E9' rx='5' ry='5' transform='translate(0 -30)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='%23989697' rx='5' ry='5' transform='rotate(30 105.98 65)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='%239B999A' rx='5' ry='5' transform='rotate(60 75.98 65)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='%23A3A1A2' rx='5' ry='5' transform='rotate(90 65 65)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='%23ABA9AA' rx='5' ry='5' transform='rotate(120 58.66 65)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='%23B2B2B2' rx='5' ry='5' transform='rotate(150 54.02 65)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='%23BAB8B9' rx='5' ry='5' transform='rotate(180 50 65)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='%23C2C0C1' rx='5' ry='5' transform='rotate(-150 45.98 65)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='%23CBCBCB' rx='5' ry='5' transform='rotate(-120 41.34 65)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='%23D2D2D2' rx='5' ry='5' transform='rotate(-90 35 65)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='%23DADADA' rx='5' ry='5' transform='rotate(-60 24.02 65)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='%23E2E2E2' rx='5' ry='5' transform='rotate(-30 -5.98 65)'/%3E%3C/svg%3E") no-repeat;background-size:100%;display:inline-block;height:20px;vertical-align:middle;width:20px}.taro-button-core[loading]>.weui-loading.weui-btn_primary,.taro-button-core[loading]>.weui-loading.weui-btn_warn{color:hsla(0,0%,100%,.6)}.taro-button-core[loading]>.weui-loading.weui-btn_primary{background-color:#179b16}.taro-button-core[loading]>.weui-loading.weui-btn_warn{background-color:#ce3c39}.taro-button-core{-webkit-tap-highlight-color:rgba(0,0,0,0);appearance:none;background-color:#f8f8f8;border-radius:5px;border-width:0;box-sizing:border-box;color:#000;display:block;font-size:18px;line-height:2.55555556;margin-left:auto;margin-right:auto;outline:0;overflow:hidden;padding-left:14px;padding-right:14px;position:relative;text-align:center;text-decoration:none;width:100%}.taro-button-core:focus{outline:0}.taro-button-core:not([disabled]):active{background-color:#dedede;color:rgba(0,0,0,.6)}.taro-button-core:after{border:1px solid rgba(0,0,0,.2);border-radius:10px;box-sizing:border-box;content:" ";height:200%;left:0;position:absolute;top:0;transform:scale(.5);transform-origin:0 0;width:200%}.taro-button-core+.taro-button-core{margin-top:15px}.taro-button-core[type=default]{background-color:#f8f8f8;color:#000}.taro-button-core[type=default]:not([disabled]):visited{color:#000}.taro-button-core[type=default]:not([disabled]):active{background-color:#dedede;color:rgba(0,0,0,.6)}.taro-button-core[size=mini]{display:inline-block;font-size:13px;line-height:2.3;padding:0 1.32em;width:auto}.taro-button-core[plain=true],.taro-button-core[plain=true][type=default],.taro-button-core[plain=true][type=primary]{background-color:transparent;border-width:1px}.taro-button-core[disabled]{color:hsla(0,0%,100%,.6)}.taro-button-core[disabled][type=default]{background-color:#f7f7f7;color:rgba(0,0,0,.3)}.taro-button-core[disabled][type=primary]{background-color:#9ed99d}.taro-button-core[disabled][type=warn]{background-color:#ec8b89}.taro-button-core[loading] .weui-loading{margin:-.2em .34em 0 0}.taro-button-core[loading][type=primary],.taro-button-core[loading][type=warn]{color:hsla(0,0%,100%,.6)}.taro-button-core[loading][type=primary]{background-color:#179b16}.taro-button-core[loading][type=warn]{background-color:#ce3c39}.taro-button-core[plain=true][type=primary]{border:1px solid #1aad19;color:#1aad19}.taro-button-core[plain=true][type=primary]:not([disabled]):active{background-color:transparent;border-color:rgba(26,173,25,.6);color:rgba(26,173,25,.6)}.taro-button-core[plain=true][type=primary]:after{border-width:0}.taro-button-core[plain=true][type=warn]{border:1px solid #e64340;color:#e64340}.taro-button-core[plain=true][type=warn]:not([disabled]):active{background-color:transparent;border-color:rgba(230,67,64,.6);color:rgba(230,67,64,.6)}.taro-button-core[plain=true][type=warn]:after{border-width:0}.taro-button-core[plain=true],.taro-button-core[plain=true][type=default]{border:1px solid #353535;color:#353535}.taro-button-core[plain=true]:not([disabled]):active,.taro-button-core[plain=true][type=default]:not([disabled]):active{background-color:transparent;border-color:rgba(53,53,53,.6);color:rgba(53,53,53,.6)}.taro-button-core[plain=true]:after,.taro-button-core[plain=true][type=default]:after{border-width:0}.taro-button-core[type=primary]{background-color:#1aad19;color:#fff}.taro-button-core[type=primary]:not([disabled]):visited{color:#fff}.taro-button-core[type=primary]:not([disabled]):active{background-color:#179b16;color:hsla(0,0%,100%,.6)}.taro-button-core[type=warn]{background-color:#e64340;color:#fff}.taro-button-core[type=warn]:not([disabled]):visited{color:#fff}.taro-button-core[type=warn]:not([disabled]):active{background-color:#ce3c39;color:hsla(0,0%,100%,.6)}.taro-button-core[plain=true][disabled],.taro-button-core[plain=true][disabled][type=primary]{background-color:#f7f7f7;border:1px solid rgba(0,0,0,.2);color:rgba(0,0,0,.3)}.weui-icon-circle:before{content:"\ea01"}.weui-icon-download:before{content:"\ea02"}.weui-icon-info:before{content:"\ea03"}.weui-icon-safe-success:before{content:"\ea04"}.weui-icon-safe-warn:before{content:"\ea05"}.weui-icon-success:before{content:"\ea06"}.weui-icon-success-circle:before{content:"\ea07"}.weui-icon-success-no-circle:before{content:"\ea08"}.weui-icon-waiting:before{content:"\ea09"}.weui-icon-waiting-circle:before{content:"\ea0a"}.weui-icon-warn:before{content:"\ea0b"}.weui-icon-info-circle:before{content:"\ea0c"}.weui-icon-cancel:before{content:"\ea0d"}.weui-icon-search:before{content:"\ea0e"}.weui-icon-clear:before{content:"\ea0f"}.weui-icon-back:before{content:"\ea10"}.weui-icon-delete:before{content:"\ea11"}.weui-icon-success{color:#09bb07;font-size:23px}.weui-icon-waiting{color:#10aeff;font-size:23px}.weui-icon-warn{color:#f43530;font-size:23px}.weui-icon-info{color:#10aeff;font-size:23px}.weui-icon-success-circle,.weui-icon-success-no-circle{color:#09bb07;font-size:23px}.weui-icon-waiting-circle{color:#10aeff;font-size:23px}.weui-icon-circle{color:#c9c9c9;font-size:23px}.weui-icon-download,.weui-icon-info-circle{color:#09bb07;font-size:23px}.weui-icon-safe-success{color:#09bb07}.weui-icon-safe-warn{color:#ffbe00}.weui-icon-cancel{color:#f43530;font-size:22px}.weui-icon-clear,.weui-icon-search{color:#b2b2b2;font-size:14px}.weui-icon-delete.weui-icon_gallery-delete{color:#fff;font-size:22px}.weui-icon_msg{font-size:93px}.weui-icon_msg.weui-icon-warn{color:#f76260}.weui-icon_msg-primary{font-size:93px}.weui-icon_msg-primary.weui-icon-warn{color:#ffbe00}img[src=""]{opacity:0}.taro-img{display:inline-block;font-size:0;height:240px;overflow:hidden;position:relative;width:320px}.taro-img.taro-img__widthfix,.taro-img__mode-heightfix{height:100%}.taro-img__mode-scaletofill{height:100%;width:100%}.taro-img__mode-aspectfit{height:100%;object-fit:contain;width:100%}.taro-img__mode-aspectfill{height:100%;object-fit:cover;width:100%}.taro-img__mode-widthfix{width:100%}.taro-img__mode-bottom,.taro-img__mode-top{left:50%;position:absolute;transform:translate(-50%)}.taro-img__mode-bottom{bottom:0}.taro-img__mode-center{left:50%;position:absolute;top:50%;transform:translate(-50%,-50%)}.taro-img__mode-left,.taro-img__mode-right{position:absolute;top:50%;transform:translateY(-50%)}.taro-img__mode-right{right:0}.taro-img__mode-topright{position:absolute;right:0}.taro-img__mode-bottomleft{bottom:0;position:absolute}.taro-img__mode-bottomright{bottom:0;position:absolute;right:0}.taro-input-core{display:block}.weui-input{-webkit-appearance:none;background-color:transparent;border:0;color:inherit;font-size:inherit;height:1.4705882353em;line-height:1.4705882353;outline:0;width:100%}.weui-input::-webkit-inner-spin-button,.weui-input::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}.rmc-pull-to-refresh-content{transform-origin:left top 0}.rmc-pull-to-refresh-content-wrapper{min-height:100%}.rmc-pull-to-refresh-transition{transition:transform .3s}@keyframes rmc-pull-to-refresh-indicator{50%{opacity:.2}to{opacity:1}}.rmc-pull-to-refresh-indicator{height:30px;line-height:10px;text-align:center}.rmc-pull-to-refresh-indicator>div{animation-fill-mode:both;animation:rmc-pull-to-refresh-indicator .5s linear 0s infinite;background-color:grey;border-radius:100%;display:inline-block;height:6px;margin:3px;width:6px}.rmc-pull-to-refresh-indicator>div:nth-child(0){animation-delay:-.1s!important}.rmc-pull-to-refresh-indicator>div:first-child{animation-delay:-.2s!important}.rmc-pull-to-refresh-indicator>div:nth-child(2){animation-delay:-.3s!important}.rmc-pull-to-refresh-down .rmc-pull-to-refresh-indicator{margin-top:-25px}.taro-scroll{-webkit-overflow-scrolling:auto}.taro-scroll::-webkit-scrollbar{display:none}.taro-scroll-view{overflow:hidden}.taro-scroll-view__scroll-x{overflow-x:scroll;overflow-y:hidden}.taro-scroll-view__scroll-y{overflow-x:hidden;overflow-y:scroll}.swiper-container-wrapper{height:150px}.swiper-container{height:100%;overflow:visible;position:relative}.taro-text{-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none}.taro-text__selectable{-moz-user-select:text;-webkit-user-select:text;-ms-user-select:text;user-select:text}
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- export { Ad, AdCustom, AnimationVideo, AnimationView, ArCamera, Audio, AwemeData, Block, Camera, Canvas, ChannelLive, ChannelVideo, Checkbox, CheckboxGroup, CommentDetail, CommentList, ContactButton, CoverImage, CoverView, CustomWrapper, Editor, FollowSwan, Form, FunctionalPageNavigator, InlinePaymentPanel, KeyboardAccessory, Label, Lifestyle, Like, LivePlayer, LivePusher, Login, Lottie, Map, MatchMedia, MovableArea, MovableView, NativeSlot, NavigationBar, Navigator, OfficialAccount, OpenData, PageContainer, PageMeta, Picker, PickerView, PickerViewColumn, Progress, Radio, RadioGroup, RichText, RootPortal, RtcRoom, RtcRoomItem, ShareElement, Slider, Slot, Switch, Tabs, Textarea, Video, VoipRoom, WebView } from '@tarojs/components/lib/react';
1
+ export { Ad, AdCustom, AnimationVideo, AnimationView, ArCamera, Audio, AwemeData, Block, Camera, Canvas, ChannelLive, ChannelVideo, Checkbox, CheckboxGroup, CommentDetail, CommentList, ContactButton, CoverImage, CoverView, CustomWrapper, DraggableSheet, Editor, FollowSwan, Form, FunctionalPageNavigator, GridBuilder, GridView, InlinePaymentPanel, KeyboardAccessory, Label, Lifestyle, Like, ListBuilder, ListView, LivePlayer, LivePusher, Login, Lottie, Map, MatchMedia, MovableArea, MovableView, NativeSlot, NavigationBar, Navigator, NestedScrollBody, NestedScrollHeader, OfficialAccount, OpenContainer, OpenData, PageContainer, PageMeta, Picker, PickerView, PickerViewColumn, Progress, Radio, RadioGroup, RichText, RootPortal, RtcRoom, RtcRoomItem, Script, ShareElement, Slider, Slot, Snapshot, Span, StickyHeader, StickySection, Switch, Tabs, Textarea, Video, VoipRoom, WebView } from '@tarojs/components/lib/react';
2
2
  export { default as Button } from './components/button/index.js';
3
3
  export { default as Icon } from './components/icon/index.js';
4
4
  export { default as Image } from './components/image/index.js';
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../src/index.react.ts"],"sourcesContent":["/* eslint-disable simple-import-sort/exports */\nexport { Ad } from '@tarojs/components/lib/react'\nexport { AdCustom } from '@tarojs/components/lib/react'\nexport { AnimationVideo } from '@tarojs/components/lib/react'\nexport { AnimationView } from '@tarojs/components/lib/react'\nexport { ArCamera } from '@tarojs/components/lib/react'\nexport { Audio } from '@tarojs/components/lib/react'\nexport { AwemeData } from '@tarojs/components/lib/react'\nexport { Block } from '@tarojs/components/lib/react'\nexport { default as Button } from './components/button'\nexport { Camera } from '@tarojs/components/lib/react'\nexport { Canvas } from '@tarojs/components/lib/react'\nexport { ChannelLive } from '@tarojs/components/lib/react'\nexport { ChannelVideo } from '@tarojs/components/lib/react'\nexport { Checkbox, CheckboxGroup } from '@tarojs/components/lib/react'\nexport { CommentDetail, CommentList } from '@tarojs/components/lib/react'\nexport { ContactButton } from '@tarojs/components/lib/react'\nexport { CoverImage } from '@tarojs/components/lib/react'\nexport { CoverView } from '@tarojs/components/lib/react'\nexport { CustomWrapper } from '@tarojs/components/lib/react'\nexport { Editor } from '@tarojs/components/lib/react'\nexport { FollowSwan } from '@tarojs/components/lib/react'\nexport { Form } from '@tarojs/components/lib/react'\nexport { FunctionalPageNavigator } from '@tarojs/components/lib/react'\nexport { default as Icon } from './components/icon'\nexport { default as Image } from './components/image'\nexport { InlinePaymentPanel } from '@tarojs/components/lib/react'\nexport { default as Input } from './components/input'\nexport { KeyboardAccessory } from '@tarojs/components/lib/react'\nexport { Label } from '@tarojs/components/lib/react'\nexport { Lifestyle } from '@tarojs/components/lib/react'\nexport { Like } from '@tarojs/components/lib/react'\nexport { LivePlayer } from '@tarojs/components/lib/react'\nexport { LivePusher } from '@tarojs/components/lib/react'\nexport { Login } from '@tarojs/components/lib/react'\nexport { Lottie } from '@tarojs/components/lib/react'\nexport { Map } from '@tarojs/components/lib/react'\nexport { MatchMedia } from '@tarojs/components/lib/react'\nexport { MovableArea, MovableView } from '@tarojs/components/lib/react'\nexport { NavigationBar } from '@tarojs/components/lib/react'\nexport { Navigator } from '@tarojs/components/lib/react'\nexport { OfficialAccount } from '@tarojs/components/lib/react'\nexport { OpenData } from '@tarojs/components/lib/react'\nexport { PageContainer } from '@tarojs/components/lib/react'\nexport { PageMeta } from '@tarojs/components/lib/react'\nexport { Picker } from '@tarojs/components/lib/react'\nexport { PickerView, PickerViewColumn } from '@tarojs/components/lib/react'\nexport { Progress } from '@tarojs/components/lib/react'\nexport { default as PullDownRefresh } from './components/pull-down-refresh'\n// export { PullToRefresh } from '@tarojs/components/lib/react'\nexport { Radio, RadioGroup } from '@tarojs/components/lib/react'\nexport { RichText } from '@tarojs/components/lib/react'\nexport { RootPortal } from '@tarojs/components/lib/react'\nexport { RtcRoom, RtcRoomItem } from '@tarojs/components/lib/react'\nexport { default as ScrollView } from './components/scroll-view'\nexport { ShareElement } from '@tarojs/components/lib/react'\nexport { Slider } from '@tarojs/components/lib/react'\nexport { NativeSlot, Slot } from '@tarojs/components/lib/react'\nexport { Swiper, SwiperItem } from './components/swiper'\nexport { Switch } from '@tarojs/components/lib/react'\nexport { Tabs } from '@tarojs/components/lib/react'\nexport { default as Text } from './components/text'\nexport { Textarea } from '@tarojs/components/lib/react'\nexport { Video } from '@tarojs/components/lib/react'\nexport { default as View } from './components/view'\nexport { VoipRoom } from '@tarojs/components/lib/react'\nexport { WebView } from '@tarojs/components/lib/react'\n"],"names":[],"mappings":";;;;;;;;;;;AAAA"}
1
+ {"version":3,"file":"index.js","sources":["../src/index.react.ts"],"sourcesContent":["/* eslint-disable simple-import-sort/exports */\nexport { Ad } from '@tarojs/components/lib/react'\nexport { AdCustom } from '@tarojs/components/lib/react'\nexport { AnimationVideo } from '@tarojs/components/lib/react'\nexport { AnimationView } from '@tarojs/components/lib/react'\nexport { ArCamera } from '@tarojs/components/lib/react'\nexport { Audio } from '@tarojs/components/lib/react'\nexport { AwemeData } from '@tarojs/components/lib/react'\nexport { Block } from '@tarojs/components/lib/react'\nexport { default as Button } from './components/button'\nexport { Camera } from '@tarojs/components/lib/react'\nexport { Canvas } from '@tarojs/components/lib/react'\nexport { ChannelLive } from '@tarojs/components/lib/react'\nexport { ChannelVideo } from '@tarojs/components/lib/react'\nexport { Checkbox, CheckboxGroup } from '@tarojs/components/lib/react'\nexport { CommentDetail, CommentList } from '@tarojs/components/lib/react'\nexport { ContactButton } from '@tarojs/components/lib/react'\nexport { CoverImage } from '@tarojs/components/lib/react'\nexport { CoverView } from '@tarojs/components/lib/react'\nexport { CustomWrapper } from '@tarojs/components/lib/react'\nexport { DraggableSheet } from '@tarojs/components/lib/react'\nexport { Editor } from '@tarojs/components/lib/react'\nexport { FollowSwan } from '@tarojs/components/lib/react'\nexport { Form } from '@tarojs/components/lib/react'\nexport { FunctionalPageNavigator } from '@tarojs/components/lib/react'\nexport { GridView } from '@tarojs/components/lib/react'\nexport { GridBuilder } from '@tarojs/components/lib/react'\nexport { default as Icon } from './components/icon'\nexport { default as Image } from './components/image'\nexport { InlinePaymentPanel } from '@tarojs/components/lib/react'\nexport { default as Input } from './components/input'\nexport { KeyboardAccessory } from '@tarojs/components/lib/react'\nexport { Label } from '@tarojs/components/lib/react'\nexport { Lifestyle } from '@tarojs/components/lib/react'\nexport { Like } from '@tarojs/components/lib/react'\nexport { LivePlayer } from '@tarojs/components/lib/react'\nexport { LivePusher } from '@tarojs/components/lib/react'\nexport { ListBuilder } from '@tarojs/components/lib/react'\nexport { ListView } from '@tarojs/components/lib/react'\nexport { Login } from '@tarojs/components/lib/react'\nexport { Lottie } from '@tarojs/components/lib/react'\nexport { Map } from '@tarojs/components/lib/react'\nexport { MatchMedia } from '@tarojs/components/lib/react'\nexport { MovableArea, MovableView } from '@tarojs/components/lib/react'\nexport { NavigationBar } from '@tarojs/components/lib/react'\nexport { Navigator } from '@tarojs/components/lib/react'\nexport { NestedScrollBody } from '@tarojs/components/lib/react'\nexport { NestedScrollHeader } from '@tarojs/components/lib/react'\nexport { OfficialAccount } from '@tarojs/components/lib/react'\nexport { OpenData } from '@tarojs/components/lib/react'\nexport { OpenContainer } from '@tarojs/components/lib/react'\nexport { PageContainer } from '@tarojs/components/lib/react'\nexport { PageMeta } from '@tarojs/components/lib/react'\nexport { Picker } from '@tarojs/components/lib/react'\nexport { PickerView, PickerViewColumn } from '@tarojs/components/lib/react'\nexport { Progress } from '@tarojs/components/lib/react'\nexport { default as PullDownRefresh } from './components/pull-down-refresh'\n// export { PullToRefresh } from '@tarojs/components/lib/react'\nexport { Radio, RadioGroup } from '@tarojs/components/lib/react'\nexport { RichText } from '@tarojs/components/lib/react'\nexport { RootPortal } from '@tarojs/components/lib/react'\nexport { RtcRoom, RtcRoomItem } from '@tarojs/components/lib/react'\nexport { Script } from '@tarojs/components/lib/react'\nexport { default as ScrollView } from './components/scroll-view'\nexport { ShareElement } from '@tarojs/components/lib/react'\nexport { Slider } from '@tarojs/components/lib/react'\nexport { Snapshot } from '@tarojs/components/lib/react'\nexport { Span } from '@tarojs/components/lib/react'\nexport { StickyHeader } from '@tarojs/components/lib/react'\nexport { StickySection } from '@tarojs/components/lib/react'\nexport { NativeSlot, Slot } from '@tarojs/components/lib/react'\nexport { Swiper, SwiperItem } from './components/swiper'\nexport { Switch } from '@tarojs/components/lib/react'\nexport { Tabs } from '@tarojs/components/lib/react'\nexport { default as Text } from './components/text'\nexport { Textarea } from '@tarojs/components/lib/react'\nexport { Video } from '@tarojs/components/lib/react'\nexport { default as View } from './components/view'\nexport { VoipRoom } from '@tarojs/components/lib/react'\nexport { WebView } from '@tarojs/components/lib/react'\n"],"names":[],"mappings":";;;;;;;;;;;AAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../../src/components/button/index.tsx"],"sourcesContent":["import './style/index.scss'\n\nimport classNames from 'classnames'\n\nimport { createForwardRefComponent, omit } from '../../utils'\nimport { useEffect, useRef, useState } from '../../utils/hooks'\n\nimport type React from 'react'\n\ninterface IProps extends Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, 'type'> {\n size?: string\n plain?: boolean\n hoverClass?: string\n hoverStartTime?: number\n hoverStayTime?: number\n disabled?: boolean\n loading?: boolean\n type?: string\n className?: string\n forwardedRef?: React.MutableRefObject<HTMLButtonElement>\n}\n\ninterface IState {\n hover:boolean\n touch: boolean\n}\n\nfunction Button (props: IProps) {\n const startTimer = useRef<ReturnType<typeof setTimeout>>()\n const endTimer = useRef<ReturnType<typeof setTimeout>>()\n const [state, setState] = useState<IState>({\n hover: false,\n touch: false\n })\n\n useEffect(() => {\n return () => {\n startTimer.current && clearTimeout(startTimer.current)\n endTimer.current && clearTimeout(endTimer.current)\n }\n }, [])\n\n const _onTouchStart = (e: React.TouchEvent<HTMLButtonElement>) => {\n setState((e) => ({\n ...e,\n touch: true\n }))\n if (props.hoverClass && props.hoverClass !== 'none' && !props.disabled) {\n startTimer.current = setTimeout(() => {\n if ((state as IState).touch) {\n setState((e) => ({\n ...e,\n hover: true\n }))\n }\n }, props.hoverStartTime || 20)\n }\n props.onTouchStart && props.onTouchStart(e)\n }\n\n const _onTouchEnd = (e: React.TouchEvent<HTMLButtonElement>) => {\n setState((e) => ({\n ...e,\n touch: false\n }))\n if (props.hoverClass && props.hoverClass !== 'none' && !props.disabled) {\n endTimer.current = setTimeout(() => {\n if (!(state as IState).touch) {\n setState((e) => ({\n ...e,\n hover: false\n }))\n }\n }, props.hoverStayTime || 70)\n }\n props.onTouchEnd && props.onTouchEnd(e)\n }\n\n const { forwardedRef, plain = false, children, disabled = false, className, style, onClick, hoverClass = 'button-hover', loading = false, type, ...restProps } = props\n\n const cls = classNames(\n className,\n 'taro-button-core',\n {\n [`${hoverClass}`]: (state as IState).hover && !disabled\n }\n )\n\n return (\n <button\n {...omit(restProps, ['hoverClass', 'onTouchStart', 'onTouchEnd', 'type', 'loading', 'forwardedRef'])}\n type={type}\n ref={forwardedRef}\n className={cls}\n style={style}\n onClick={onClick}\n disabled={disabled}\n onTouchStart={_onTouchStart}\n onTouchEnd={_onTouchEnd}\n loading={loading.toString()}\n plain={plain.toString()}\n >\n {!!loading && <i className='weui-loading' />}\n {children}\n </button>\n )\n}\n\nexport default createForwardRefComponent(Button)\n"],"names":["Button","props","startTimer","useRef","endTimer","state","setState","useState","hover","touch","useEffect","current","clearTimeout","_onTouchStart","e","Object","assign","hoverClass","disabled","setTimeout","hoverStartTime","onTouchStart","_onTouchEnd","hoverStayTime","onTouchEnd","forwardedRef","plain","children","className","style","onClick","loading","type","restProps","__rest","cls","classNames","_el$","_tmpl$","_$use","_$spread","_$mergeProps","omit","toString","_$insert","_tmpl$2","createForwardRefComponent"],"mappings":";;;;;;;;;AA2BA,SAASA,MAAMA,CAAEC,KAAa,EAAA;AAC5B,EAAA,MAAMC,UAAU,GAAGC,MAAM,EAAiC,CAAA;AAC1D,EAAA,MAAMC,QAAQ,GAAGD,MAAM,EAAiC,CAAA;AACxD,EAAA,MAAM,CAACE,KAAK,EAAEC,QAAQ,CAAC,GAAGC,QAAQ,CAAS;AACzCC,IAAAA,KAAK,EAAE,KAAK;AACZC,IAAAA,KAAK,EAAE,KAAA;AACR,GAAA,CAAC,CAAA;AAEFC,EAAAA,SAAS,CAAC,MAAK;AACb,IAAA,OAAO,MAAK;MACVR,UAAU,CAACS,OAAO,IAAIC,YAAY,CAACV,UAAU,CAACS,OAAO,CAAC,CAAA;MACtDP,QAAQ,CAACO,OAAO,IAAIC,YAAY,CAACR,QAAQ,CAACO,OAAO,CAAC,CAAA;KACnD,CAAA;GACF,EAAE,EAAE,CAAC,CAAA;EAEN,MAAME,aAAa,GAAIC,CAAsC,IAAI;AAC/DR,IAAAA,QAAQ,CAAEQ,CAAC,IAAKC,MAAA,CAAAC,MAAA,CAAAD,MAAA,CAAAC,MAAA,CAAA,EAAA,EACXF,CAAC,CAAA,EAAA;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KAAK;AAAA,MAAA,SAAA,EACHC,OAAO;AAAA,MAAA,UAAA,EACNZ,QAAQ;AAAA,MAAA,cAAA,EACJL,aAAa;AAAA,MAAA,YAAA,EACfS,WAAW;AAAA,MAAA,IACvBS,OAAOA,GAAA;AAAA,QAAA,OAAEA,OAAO,CAACY,QAAQ,EAAE,CAAA;AAAA,OAAA;AAAA,MAAA,IAC3BjB,KAAKA,GAAA;AAAA,QAAA,OAAEA,KAAK,CAACiB,QAAQ,EAAE,CAAA;AAAA,OAAA;AAAA,KAAA,CAAA,EAAA,KAAA,EAAA,IAAA,CAAA,CAAA;IAAAC,MAAA,CAAAP,IAAA,EAEtB,CAAC,CAACN,OAAO,IAAAc,OAAA,EAAkC,EAAA,IAAA,CAAA,CAAA;IAAAD,MAAA,CAAAP,IAAA,EAC3CV,QAAQ,EAAA,IAAA,CAAA,CAAA;AAAA,IAAA,OAAAU,IAAA,CAAA;AAAA,GAAA,GAAA,CAAA;AAGf,CAAA;AAEA,YAAeS,yBAAyB,CAAC9C,MAAM,CAAC;;;;"}
1
+ {"version":3,"file":"index.js","sources":["../../../../src/components/button/index.tsx"],"sourcesContent":["import './style/index.scss'\n\nimport classNames from 'classnames'\n\nimport { createForwardRefComponent, omit } from '../../utils'\nimport { useEffect, useRef, useState } from '../../utils/hooks'\n\nimport type React from 'react'\n\ninterface IProps extends Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, 'type'> {\n size?: string\n plain?: boolean\n hoverClass?: string\n hoverStartTime?: number\n hoverStayTime?: number\n disabled?: boolean\n loading?: boolean\n type?: string\n className?: string\n forwardedRef?: React.MutableRefObject<HTMLButtonElement>\n}\n\ninterface IState {\n hover:boolean\n touch: boolean\n}\n\nfunction Button (props: IProps) {\n const startTimer = useRef<ReturnType<typeof setTimeout>>()\n const endTimer = useRef<ReturnType<typeof setTimeout>>()\n const [state, setState] = useState<IState>({\n hover: false,\n touch: false\n })\n\n useEffect(() => {\n return () => {\n startTimer.current && clearTimeout(startTimer.current)\n endTimer.current && clearTimeout(endTimer.current)\n }\n }, [])\n\n const _onTouchStart = (e: React.TouchEvent<HTMLButtonElement>) => {\n setState((e) => ({\n ...e,\n touch: true\n }))\n if (props.hoverClass && props.hoverClass !== 'none' && !props.disabled) {\n startTimer.current = setTimeout(() => {\n if ((state as IState).touch) {\n setState((e) => ({\n ...e,\n hover: true\n }))\n }\n }, props.hoverStartTime || 20)\n }\n props.onTouchStart && props.onTouchStart(e)\n }\n\n const _onTouchEnd = (e: React.TouchEvent<HTMLButtonElement>) => {\n setState((e) => ({\n ...e,\n touch: false\n }))\n if (props.hoverClass && props.hoverClass !== 'none' && !props.disabled) {\n endTimer.current = setTimeout(() => {\n if (!(state as IState).touch) {\n setState((e) => ({\n ...e,\n hover: false\n }))\n }\n }, props.hoverStayTime || 70)\n }\n props.onTouchEnd && props.onTouchEnd(e)\n }\n\n const { forwardedRef, plain = false, children, disabled = false, className, style, onClick, hoverClass = 'button-hover', loading = false, type, ...restProps } = props\n\n const cls = classNames(\n className,\n 'taro-button-core',\n {\n [`${hoverClass}`]: (state as IState).hover && !disabled\n }\n )\n\n return (\n <button\n {...omit(restProps, ['hoverClass', 'onTouchStart', 'onTouchEnd', 'type', 'loading', 'forwardedRef'])}\n type={type}\n ref={forwardedRef}\n className={cls}\n style={style}\n onClick={onClick}\n disabled={disabled}\n onTouchStart={_onTouchStart}\n onTouchEnd={_onTouchEnd}\n loading={loading.toString()}\n plain={plain.toString()}\n >\n {!!loading && <i className='weui-loading' />}\n {children}\n </button>\n )\n}\n\nexport default createForwardRefComponent(Button)\n"],"names":["Button","props","startTimer","useRef","endTimer","state","setState","useState","hover","touch","useEffect","current","clearTimeout","_onTouchStart","e","Object","assign","hoverClass","disabled","setTimeout","hoverStartTime","onTouchStart","_onTouchEnd","hoverStayTime","onTouchEnd","forwardedRef","plain","children","className","style","onClick","loading","type","restProps","__rest","cls","classNames","_el$","_tmpl$","_$use","_$spread","_$mergeProps","omit","toString","_$insert","_tmpl$2","createFor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'\n\nimport classNames from 'classnames'\n\nimport { createForwardRefComponent, omit } from '../../utils'\n\ninterface IProps {\n type: string\n color: string\n size?: number | string\n className?: string\n forwardedRef?: React.MutableRefObject<HTMLLIElement>\n}\n\nconst Icon = (props: IProps) => {\n let { type, className = '', size = '23', color, forwardedRef } = props\n if (type) type = type.replace(/_/g, '-')\n const cls = classNames(\n {\n [`weui-icon-${type}`]: true\n },\n className\n )\n const style = { 'font-size': size + 'px', color: color }\n\n return (\n // eslint-disable-next-line react/react-in-jsx-scope\n <i ref={forwardedRef} {...omit(props, ['type', 'className', 'forwardedRef'])} className={cls} style={style} />\n )\n}\nexport default createForwardRefComponent(Icon)\n"],"names":["Icon","props","type","className","size","color","forwardedRef","replace","cls","classNames","style","_el$","_tmpl$","_ref$","_$use","_$spread","_$mergeProps","omit","createForwardRefComponent"],"mappings":";;;;;;AAcA,MAAMA,IAAI,GAAIC,KAAa,IAAI;EAC7B,IAAI;IAAEC,IAAI;AAAEC,IAAAA,SAAS,GAAG,EAAE;AAAEC,IAAAA,IAAI,GAAG,IAAI;IAAEC,KAAK;AAAEC,IAAAA,YAAAA;AAAc,GAAA,GAAGL,KAAK,CAAA;EACtE,IAAIC,IAAI,EAAEA,IAAI,GAAGA,IAAI,CAACK,OAAO,CAAC,IAAI,EAAE,GAAG,CAAC,CAAA;EACxC,MAAMC,GAAG,GAAGC,UAAU,CACpB;IACE,CAAC,CAAA,UAAA,EAAaP,IAAI,CAAA,CAAE,GAAG,IAAA;GACxB,EACDC,SAAS,CACV,CAAA;AACD,EAAA,MAAMO,KAAK,GAAG;IAAE,WAAW,EAAEN,IAAI,GAAG,IAAI;AAAEC,IAAAA,KAAK,EAAEA,KAAAA;GAAO,CAAA;EAExD;AACE,IAAA,CAAA,MAAA;MAAA,IAAAM,IAAA,GAAAC,MAAA,EAAA,CAAA;MAAA,IAAAC,KAAA,GACQP,YAAY,CAAA;MAAA,OAAAO,KAAA,KAAAC,UAAAA,GAAAA,GAAA,CAAAD,KAAA,EAAAF,IAAA,CAAA,GAAZL,YAAY,GAAAK,IAAA,CAAA;AAAAI,MAAAA,MAAA,CAAAJ,IAAA,EAAAK,UAAA,CAAA,MAAMC,IAAI,CAAChB,KAAK,EAAE,CAAC,MAAM,EAAE,WAAW,EAAE,cAAc,CAAC,CAAC,EAAA;AAAA,QAAA,WAAA,EAAaO,GAAG;QAAA,OAASE,EAAAA,KAAAA;AAAK,OAAA,CAAA,EAAA,KAAA,EAAA,KAAA,CAAA,CAAA;AAAA,MAAA,OAAAC,IAAA,CAAA;AAAA,KAAA,GAAA;AAAA,IAAA;AAE9G,CAAC,CAAA;AACD,YAAeO,yBAAyB,CAAClB,IAAI,CAAC;;;;"}
1
+ {"version":3,"file":"index.js","sources":["../../../../src/components/icon/index.tsx"],"sourcesContent":["import './style/index.scss'\n\nimport classNames from 'classnames'\n\nimport { createForwardRefComponent, omit } from '../../utils'\n\ninterface IProps {\n type: string\n color: string\n size?: number | string\n className?: string\n forwardedRef?: React.MutableRefObject<HTMLLIElement>\n}\n\nconst Icon = (props: IProps) => {\n let { type, className = '', size = '23', color, forwardedRef } = props\n if (type) type = type.replace(/_/g, '-')\n const cls = classNames(\n {\n [`weui-icon-${type}`]: true\n },\n className\n )\n const style = { 'font-size': size + 'px', color: color }\n\n return (\n // eslint-disable-next-line react/react-in-jsx-scope\n <i ref={forwardedRef} {...omit(props, ['type', 'className', 'forwardedRef'])} className={cls} style={style} />\n )\n}\nexport default createForwardRefComponent(Icon)\n"],"names":["Icon","props","type","className","size","color","forwardedRef","replace","cls","classNames","style","_el$","_tmpl$","_ref$","_$use","_$spread","_$mergeProps","omit","createForwardRefComponent"],"mappings":";;;;;;AAcA,MAAMA,IAAI,GAAIC,KAAa,IAAI;EAC7B,IAAI;IAAEC,IAAI;AAAEC,IAAAA,SAAS,GAAG,EAAE;AAAEC,IAAAA,IAAI,GAAG,IAAI;IAAEC,KAAK;AAAEC,IAAAA;AAAc,GAAA,GAAGL,KAAK;EACtE,IAAIC,IAAI,EAAEA,IAAI,GAAGA,IAAI,CAACK,OAAO,CAAC,IAAI,EAAE,GAAG,CAAC;EACxC,MAAMC,GAAG,GAAGC,UAAU,CACpB;IACE,CAAC,CAAA,UAAA,EAAaP,IAAI,CAAA,CAAE,GAAG;GACxB,EACDC,SAAS,CACV;AACD,EAAA,MAAMO,KAAK,GAAG;IAAE,WAAW,EAAEN,IAAI,GAAG,IAAI;AAAEC,IAAAA,KAAK,EAAEA;GAAO;EAExD;AACE,IAAA,CAAA,MAAA;MAAA,IAAAM,IAAA,GAAAC,MAAA,EAAA;MAAA,IAAAC,KAAA,GACQP,YAAY;MAAA,OAAAO,KAAA,KAAAC,UAAAA,GAAAA,GAAA,CAAAD,KAAA,EAAAF,IAAA,CAAA,GAAZL,YAAY,GAAAK,IAAA;AAAAI,MAAAA,MAAA,CAAAJ,IAAA,EAAAK,UAAA,CAAA,MAAMC,IAAI,CAAChB,KAAK,EAAE,CAAC,MAAM,EAAE,WAAW,EAAE,cAAc,CAAC,CAAC,EAAA;AAAA,QAAA,WAAA,EAAaO,GAAG;QAAA,OAASE,EAAAA;AAAK,OAAA,CAAA,EAAA,KAAA,EAAA,KAAA,CAAA;AAAA,MAAA,OAAAC,IAAA;AAAA,KAAA;AAAA;AAE9G,CAAC;AACD,YAAeO,yBAAyB,CAAClB,IAAI,CAAC;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../../src/components/image/index.tsx"],"sourcesContent":["import './style/index.css'\n\nimport classNames from 'classnames'\n\nimport { createForwardRefComponent } from '../../utils'\nimport { useCallback, useEffect, useRef, useState } from '../../utils/hooks'\n\nimport type 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 forwardedRef?: React.MutableRefObject<HTMLDivElement>\n}\n\nfunction Image (props: IProps) {\n const imgRef = useRef<HTMLImageElement | null>(null)\n const observer = useRef<Partial<IntersectionObserver>>({})\n const [, setIsLoaded] = useState(false)\n const {\n className,\n style = {},\n src,\n mode,\n onError,\n lazyLoad,\n imgProps,\n forwardedRef,\n ...reset\n } = 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 const imageOnLoad = useCallback((e) => {\n const { onLoad } = 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 }, [props])\n\n useEffect(() => {\n if (lazyLoad) {\n observer.current = new IntersectionObserver(\n entries => {\n // 异步 api 关系\n if (entries[entries.length - 1].isIntersecting) {\n setIsLoaded(true)\n // findDOMNode(this).children[0].src = src\n imgRef.current!.src = src\n }\n },\n {\n rootMargin: '300px 0px'\n }\n )\n observer.current.observe?.(imgRef.current!)\n }\n\n return () => {\n observer.current?.disconnect?.()\n }\n }, [lazyLoad, src])\n\n return (\n <div className={cls} style={style} ref={forwardedRef} {...reset}>\n {lazyLoad ? (\n <img\n ref={img => (imgRef.current = img)}\n className={imgCls}\n data-src={src}\n onLoad={imageOnLoad}\n onError={onError}\n {...imgProps}\n />\n ) : (\n <img\n ref={img => (imgRef.current = img)}\n className={imgCls}\n src={src}\n onLoad={imageOnLoad}\n onError={onError}\n {...imgProps}\n />\n )}\n </div>\n )\n}\n\nexport default createForwardRefComponent(Image)\n"],"names":["Image","props","imgRef","useRef","observer","setIsLoaded","useState","className","style","src","mode","onError","lazyLoad","imgProps","forwardedRef","reset","__rest","cls","classNames","imgCls","toLowerCase","replace","imageOnLoad","useCallback","e","onLoad","Object","defineProperty","enumerable","writable","value","width","target","height","useEffect","current","IntersectionObserver","entries","length","isIntersecting","rootMargin","_b","_a","observe","call","disconnect","_el$","_tmpl$","_$use","_$spread","_$insert","_el$2","_tmpl$2","_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AAA,OAAA2C,KAAA,CAAA;KAEf,GAAA,CAAA,CAAA;IAAAC,MAAA,CAAAC,GAAA,IAAAC,KAAA,CAAAb,IAAA,EAnByBtC,OAAK,EAAAkD,GAAA,CAAA,CAAA,CAAA;AAAA,IAAA,OAAAZ,IAAA,CAAA;AAAA,GAAA,GAAA,CAAA;AAsBrC,CAAA;AAEA,YAAec,yBAAyB,CAAC5D,KAAK,CAAC;;;;"}
1
+ {"version":3,"file":"index.js","sources":["../../../../src/components/image/index.tsx"],"sourcesContent":["import './style/index.css'\n\nimport classNames from 'classnames'\n\nimport { createForwardRefComponent } from '../../utils'\nimport { useCallback, useEffect, useRef, useState } from '../../utils/hooks'\n\nimport type 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 forwardedRef?: React.MutableRefObject<HTMLDivElement>\n}\n\nfunction Image (props: IProps) {\n const imgRef = useRef<HTMLImageElement | null>(null)\n const observer = useRef<Partial<IntersectionObserver>>({})\n const [, setIsLoaded] = useState(false)\n const {\n className,\n style = {},\n src,\n mode,\n onError,\n lazyLoad,\n imgProps,\n forwardedRef,\n ...reset\n } = 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 const imageOnLoad = useCallback((e) => {\n const { onLoad } = 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 }, [props])\n\n useEffect(() => {\n if (lazyLoad) {\n observer.current = new IntersectionObserver(\n entries => {\n // 异步 api 关系\n if (entries[entries.length - 1].isIntersecting) {\n setIsLoaded(true)\n // findDOMNode(this).children[0].src = src\n imgRef.current!.src = src\n }\n },\n {\n rootMargin: '300px 0px'\n }\n )\n observer.current.observe?.(imgRef.current!)\n }\n\n return () => {\n observer.current?.disconnect?.()\n }\n }, [lazyLoad, src])\n\n return (\n <div className={cls} style={style} ref={forwardedRef} {...reset}>\n {lazyLoad ? (\n <img\n ref={img => (imgRef.current = img)}\n className={imgCls}\n data-src={src}\n onLoad={imageOnLoad}\n onError={onError}\n {...imgProps}\n />\n ) : (\n <img\n ref={img => (imgRef.current = img)}\n className={imgCls}\n src={src}\n onLoad={imageOnLoad}\n onError={onError}\n {...imgProps}\n />\n )}\n </div>\n )\n}\n\nexport default createForwardRefComponent(Image)\n"],"names":["Image","props","imgRef","useRef","observer","setIsLoaded","useState","className","style","src","mode","onError","lazyLoad","imgProps","forwardedRef","reset","__rest","cls","classNames","imgCls","toLowerCase","replace","imageOnLoad","useCallback","e","onLoad","Object","defineProperty","enumerable","writable","value","width","target","height","useEffect","current","IntersectionObserver","entries","length","isIntersecting","rootMargin","_b","_a","observe","call","disconnect","_el$","_tmpl$","_$use","_$spread","_$insert","_el$2","_tmpl$2","_$addEventListener","img","_$setAttribute","_el$3","_$effect","_$p","_$style","createForwardRefComponent"],"mappings":";;;;;;;;;AAmBA,SAASA,KAAKA,CAAEC,KAAa,EAAA;AAC3B,EAAA,MAAMC,MAAM,GAAGC,MAAM,CAA0B,IAAI,CAAC;AACpD,EAAA,MAAMC,QAAQ,GAAGD,MAAM,CAAgC,EAAE,CAAC;AAC1D,EAAA,MAAM,GAAGE,WAAW,CAAC,GAAGC,QAAQ,CAAC,KAAK,CAAC;EACvC,MAAM;MACJC,SAAS;aACTC,OAAK,GAAG,EAAE;MACVC,GAAG;MACHC,IAAI;MACJC,OAAO;MACPC,QAAQ;MACRC,QAAQ;AACRC,MAAAA;AAAY,KAAA,GAEVb,KAAK;IADJc,KAAK,GAAAC,MAAA,CACNf,KAAK,EAVH,CAUL,WAAA,EAAA,OAAA,EAAA,KAAA,EAAA,MAAA,EAAA,SAAA,EAAA,UAAA,EAAA,UAAA,EAAA,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A,CAAAG,KAAA,EAAA,OAAA,EAQH7C,OAAO,CAAA;MAAA0C,gBAAA,CAAAG,KAAA,EAAA,MAAA,EADRlC,WAAW,CAAA;MAAA0B,GAAA,CAHdM,GAAG,IAAKpD,MAAM,CAACiC,OAAO,GAAGmB,GAAI,EAAAE,KAAA,CAAA;MAAAA,KAAA,CAAAjD,SAAA,GACvBY,MAAM;MAAAoC,YAAA,CAAAC,KAAA,EAAA,KAAA,EACZ/C,GAAG,CAAA;MAAAwC,MAAA,CAAAO,KAAA,EAGJ3C,QAAQ,EAAA,KAAA,EAAA,KAAA,CAAA;AAAA,MAAA,OAAA2C,KAAA;KAEf,GAAA,CAAA;IAAAC,MAAA,CAAAC,GAAA,IAAAC,KAAA,CAAAb,IAAA,EAnByBtC,OAAK,EAAAkD,GAAA,CAAA,CAAA;AAAA,IAAA,OAAAZ,IAAA;AAAA,GAAA,GAAA;AAsBrC;AAEA,YAAec,yBAAyB,CAAC5D,KAAK,CAAC;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../../src/components/scroll-view/index.tsx"],"sourcesContent":["import './style/index.css'\n\nimport { isFunction } from '@tarojs/shared'\nimport classNames from 'classnames'\n\nimport { createForwardRefComponent, throttle } from '../../utils'\nimport { useEffect, useRef } from '../../utils/hooks'\n\nimport type React from 'react'\n\nfunction easeOutScroll (from = 0, to = 0, callback) {\n if (from === to || typeof from !== 'number') {\n return\n }\n const change = to - from\n const dur = 500\n const sTime = +new Date()\n function linear (t, b, c, d) {\n return (c * t) / d + b\n }\n const isLarger = to >= from\n\n function step () {\n from = linear(+new Date() - sTime, from, change, dur)\n if ((isLarger && from >= to) || (!isLarger && to >= from)) {\n callback(to)\n return\n }\n callback(from)\n requestAnimationFrame(step)\n }\n step()\n}\n\nfunction scrollIntoView (id = '', isHorizontal = false, animated = true, scrollIntoViewAlignment?: ScrollLogicalPosition) {\n document.querySelector(`#${id}`)?.scrollIntoView({\n behavior: animated ? 'smooth' : 'auto',\n block: !isHorizontal ? (scrollIntoViewAlignment || 'center') : 'center',\n inline: isHorizontal ? (scrollIntoViewAlignment || 'start') : 'start'\n })\n}\n\nfunction scrollVertical (container, scrollTop, top, isAnimation) {\n if (isAnimation) {\n easeOutScroll(scrollTop.current, top, pos => {\n if (container.current) container.current.scrollTop = pos\n })\n } else {\n if (container.current) container.current.scrollTop = top\n }\n scrollTop.current = top\n}\n\nfunction scrollHorizontal (container, scrollLeft, left, isAnimation) {\n if (isAnimation) {\n easeOutScroll(scrollLeft.current, left, pos => {\n if (container.current) container.current.scrollLeft = pos\n })\n } else {\n if (container.current) container.current.scrollLeft = left\n }\n scrollLeft.current = left\n}\n\ninterface IProps extends React.HTMLAttributes<HTMLDivElement> {\n scrollX: boolean\n scrollY: boolean\n upperThreshold: number\n lowerThreshold: number\n scrollTop: number\n scrollLeft: number\n scrollIntoView?: string\n scrollIntoViewAlignment?: ScrollLogicalPosition\n scrollWithAnimation: boolean\n enableBackToTop?: boolean\n forwardedRef?: React.MutableRefObject<HTMLDivElement>\n onScrollToUpper: (e: React.SyntheticEvent<HTMLDivElement, Event>) => void\n onScrollToLower: (e: React.SyntheticEvent<HTMLDivElement, Event>) => void\n onScroll: (e: React.SyntheticEvent<HTMLDivElement, Event>) => void\n onTouchMove: (e: React.SyntheticEvent<HTMLDivElement, Event>) => void\n}\n\nfunction ScrollView (props: IProps) {\n const _scrollTop = useRef<any>(null)\n const _scrollLeft = useRef<any>(null)\n const container = useRef<any>(null)\n const onTouchMove = (e) => {\n e.stopPropagation()\n }\n\n const handleScroll = (props: IProps, isInit = false) => {\n // scrollIntoView\n if (\n props.scrollIntoView &&\n typeof props.scrollIntoView === 'string' &&\n document &&\n document.querySelector &&\n document.querySelector(`#${props.scrollIntoView}`)\n ) {\n const isHorizontal = props.scrollX && !props.scrollY\n if (isInit) {\n setTimeout(() => scrollIntoView(props.scrollIntoView, props.scrollWithAnimation, isHorizontal, props.scrollIntoViewAlignment), 500)\n } else {\n scrollIntoView(props.scrollIntoView, props.scrollWithAnimation, isHorizontal, props.scrollIntoViewAlignment)\n }\n } else {\n const isAnimation = !!props.scrollWithAnimation\n // Y 轴滚动\n if (props.scrollY && typeof props.scrollTop === 'number' && props.scrollTop !== _scrollTop.current) {\n if (isInit) {\n setTimeout(() => scrollVertical(container, _scrollTop, props.scrollTop, isAnimation), 10)\n } else {\n scrollVertical(container, _scrollTop, props.scrollTop, isAnimation)\n }\n }\n // X 轴滚动\n if (props.scrollX && typeof props.scrollLeft === 'number' && props.scrollLeft !== _scrollLeft.current) {\n if (isInit) {\n setTimeout(() => scrollHorizontal(container, _scrollLeft, props.scrollLeft, isAnimation), 10)\n } else {\n scrollHorizontal(container, _scrollLeft, props.scrollLeft, isAnimation)\n }\n }\n }\n }\n\n useEffect(() => {\n handleScroll(props, true)\n }, [])\n\n const {\n className,\n style = {},\n onScroll,\n onScrollToUpper,\n onScrollToLower,\n scrollX,\n scrollY\n } = props\n let { upperThreshold = 50, lowerThreshold = 50 } = props\n const cls = classNames(\n 'taro-scroll',\n {\n 'taro-scroll-view__scroll-x': scrollX,\n 'taro-scroll-view__scroll-y': scrollY\n },\n className\n )\n upperThreshold = Number(upperThreshold)\n lowerThreshold = Number(lowerThreshold)\n const upperAndLower = e => {\n if (!container.current) return\n const { offsetWidth, offsetHeight, scrollLeft, scrollTop, scrollHeight, scrollWidth } = container.current\n if (\n onScrollToLower &&\n ((props.scrollY && offsetHeight + scrollTop + lowerThreshold >= scrollHeight) ||\n (props.scrollX && offsetWidth + scrollLeft + lowerThreshold >= scrollWidth))\n ) {\n onScrollToLower(e)\n }\n if (\n onScrollToUpper &&\n ((props.scrollY && scrollTop <= upperThreshold) || (props.scrollX && scrollLeft <= upperThreshold))\n ) {\n onScrollToUpper(e)\n }\n }\n const upperAndLowerThrottle = throttle(upperAndLower, 200)\n const _onScroll = e => {\n const { scrollLeft, scrollTop, scrollHeight, scrollWidth } = container.current\n _scrollLeft.current = scrollLeft\n _scrollTop.current = scrollTop\n Object.defineProperty(e, 'detail', {\n enumerable: true,\n writable: true,\n value: {\n scrollLeft,\n scrollTop,\n scrollHeight,\n scrollWidth\n }\n })\n upperAndLowerThrottle(e)\n onScroll && onScroll(e)\n }\n const _onTouchMove = e => {\n isFunction(props.onTouchMove) ? props.onTouchMove(e) : onTouchMove(e)\n }\n return (\n <div\n ref={e => {\n if (e) {\n container.current = e\n if (props.forwardedRef) props.forwardedRef.current = e\n }\n }}\n style={style}\n className={cls}\n onScroll={_onScroll}\n onTouchMove={_onTouchMove}\n >\n {props.children}\n </div>\n )\n}\n\nexport default createForwardRefComponent(ScrollView)\n"],"names":["easeOutScroll","from","arguments","length","undefined","to","callback","change","dur","sTime","Date","linear","t","b","c","d","isLarger","step","requestAnimationFrame","scrollIntoView","id","isHorizontal","animated","scrollIntoViewAlignment","_a","document","querySelector","behavior","block","inline","scrollVertical","container","scrollTop","top","isAnimation","current","pos","scrollHorizontal","scrollLeft","left","ScrollView","props","_scrollTop","useRef","_scrollLeft","onTouchMove","e","stopPropagation","handleScroll","isInit","scrollX","scrollY","setTimeout","scrollWithAnimation","useEffect","className","style","onScroll","onScrollToUpper","onScrollToLower","upperThreshold","lowerThreshold","cls","classNames","Number","upperAndLower","offsetWidth","offsetHeight","scrollHeight","scrollWidth","upperAndLowerThrottle","throttle","_onScroll","Object","defineProperty","enumerable","writable","value","_onTouchMove","isFunction","_el$","_tmpl$","$$touchmove","addEventListener","_$use","forwardedRef","_$insert","children","_$effect","_$p","_$style","createForwardRefComponent","_$delegateEvents"],"mappings":";;;;;;;;AAUA,SAASA,aAAaA,GAA4B;AAAA,EAAA,IAA1BC,IAAI,GAAAC,SAAA,CAAAC,MAAA,GAAA,CAAA,IAAAD,SAAA,CAAA,CAAA,CAAA,KAAAE,SAAA,GAAAF,SAAA,CAAA,CAAA,CAAA,GAAG,CAAC,CAAA;AAAA,EAAA,IAAEG,EAAE,GAAAH,SAAA,CAAAC,MAAA,GAAA,CAAA,IAAAD,SAAA,CAAA,CAAA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I,WAAW,CAACC,CAAC,CAAC,GAAGD,WAAW,CAACC,CAAC,CAAC,CAAA;GACtE,CAAA;AACD,EAAA,OAAA,CAAA,MAAA;IAAA,IAAAkC,IAAA,GAAAC,MAAA,EAAA,CAAA;IAAAD,IAAA,CAAAE,WAAA,GAWiBJ,YAAY,CAAA;IAAAE,IAAA,CAAAG,gBAAA,CAAA,QAAA,EADfX,SAAS,CAAA,CAAA;IAAAY,GAAA,CARdtC,CAAC,IAAG;AACP,MAAA,IAAIA,CAAC,EAAE;QACLf,SAAS,CAACI,OAAO,GAAGW,CAAC,CAAA;QACrB,IAAIL,KAAK,CAAC4C,YAAY,EAAE5C,KAAK,CAAC4C,YAAY,CAAClD,OAAO,GAAGW,CAAC,CAAA;AACxD,OAAA;AACF,KAAC,EAAAkC,IAAA,CAAA,CAAA;IAAAA,IAAA,CAAAzB,SAAA,GAEUO,GAAG,CAAA;AAAAwB,IAAAA,MAAA,CAAAN,IAAA,EAIbvC,MAAAA,KAAK,CAAC8C,QAAQ,CAAA,CAAA;IAAAC,MAAA,CAAAC,GAAA,IAAAC,KAAA,CAAAV,IAAA,EALRxB,OAAK,EAAAiC,GAAA,CAAA,CAAA,CAAA;AAAA,IAAA,OAAAT,IAAA,CAAA;AAAA,GAAA,GAAA,CAAA;AAQlB,CAAA;AAEA,YAAeW,yBAAyB,CAACnD,UAAU,CAAC,CAAA;AAAAoD,cAAA,CAAA,CAAA,WAAA,CAAA,CAAA;;;;"}
1
+ {"version":3,"file":"index.js","sources":["../../../../src/components/scroll-view/index.tsx"],"sourcesContent":["import './style/index.css'\n\nimport { isFunction } from '@tarojs/shared'\nimport classNames from 'classnames'\n\nimport { createForwardRefComponent, throttle } from '../../utils'\nimport { useEffect, useRef } from '../../utils/hooks'\n\nimport type React from 'react'\n\nfunction easeOutScroll (from = 0, to = 0, callback) {\n if (from === to || typeof from !== 'number') {\n return\n }\n const change = to - from\n const dur = 500\n const sTime = +new Date()\n function linear (t, b, c, d) {\n return (c * t) / d + b\n }\n const isLarger = to >= from\n\n function step () {\n from = linear(+new Date() - sTime, from, change, dur)\n if ((isLarger && from >= to) || (!isLarger && to >= from)) {\n callback(to)\n return\n }\n callback(from)\n requestAnimationFrame(step)\n }\n step()\n}\n\nfunction scrollIntoView (id = '', isHorizontal = false, animated = true, scrollIntoViewAlignment?: ScrollLogicalPosition) {\n document.querySelector(`#${id}`)?.scrollIntoView({\n behavior: animated ? 'smooth' : 'auto',\n block: !isHorizontal ? (scrollIntoViewAlignment || 'center') : 'center',\n inline: isHorizontal ? (scrollIntoViewAlignment || 'start') : 'start'\n })\n}\n\nfunction scrollVertical (container, scrollTop, top, isAnimation) {\n if (isAnimation) {\n easeOutScroll(scrollTop.current, top, pos => {\n if (container.current) container.current.scrollTop = pos\n })\n } else {\n if (container.current) container.current.scrollTop = top\n }\n scrollTop.current = top\n}\n\nfunction scrollHorizontal (container, scrollLeft, left, isAnimation) {\n if (isAnimation) {\n easeOutScroll(scrollLeft.current, left, pos => {\n if (container.current) container.current.scrollLeft = pos\n })\n } else {\n if (container.current) container.current.scrollLeft = left\n }\n scrollLeft.current = left\n}\n\ninterface IProps extends React.HTMLAttributes<HTMLDivElement> {\n scrollX: boolean\n scrollY: boolean\n upperThreshold: number\n lowerThreshold: number\n scrollTop: number\n scrollLeft: number\n scrollIntoView?: string\n scrollIntoViewAlignment?: ScrollLogicalPosition\n scrollWithAnimation: boolean\n enableBackToTop?: boolean\n forwardedRef?: React.MutableRefObject<HTMLDivElement>\n onScrollToUpper: (e: React.SyntheticEvent<HTMLDivElement, Event>) => void\n onScrollToLower: (e: React.SyntheticEvent<HTMLDivElement, Event>) => void\n onScroll: (e: React.SyntheticEvent<HTMLDivElement, Event>) => void\n onTouchMove: (e: React.SyntheticEvent<HTMLDivElement, Event>) => void\n}\n\nfunction ScrollView (props: IProps) {\n const _scrollTop = useRef<any>(null)\n const _scrollLeft = useRef<any>(null)\n const container = useRef<any>(null)\n const onTouchMove = (e) => {\n e.stopPropagation()\n }\n\n const handleScroll = (props: IProps, isInit = false) => {\n // scrollIntoView\n if (\n props.scrollIntoView &&\n typeof props.scrollIntoView === 'string' &&\n document &&\n document.querySelector &&\n document.querySelector(`#${props.scrollIntoView}`)\n ) {\n const isHorizontal = props.scrollX && !props.scrollY\n if (isInit) {\n setTimeout(() => scrollIntoView(props.scrollIntoView, props.scrollWithAnimation, isHorizontal, props.scrollIntoViewAlignment), 500)\n } else {\n scrollIntoView(props.scrollIntoView, props.scrollWithAnimation, isHorizontal, props.scrollIntoViewAlignment)\n }\n } else {\n const isAnimation = !!props.scrollWithAnimation\n // Y 轴滚动\n if (props.scrollY && typeof props.scrollTop === 'number' && props.scrollTop !== _scrollTop.current) {\n if (isInit) {\n setTimeout(() => scrollVertical(container, _scrollTop, props.scrollTop, isAnimation), 10)\n } else {\n scrollVertical(container, _scrollTop, props.scrollTop, isAnimation)\n }\n }\n // X 轴滚动\n if (props.scrollX && typeof props.scrollLeft === 'number' && props.scrollLeft !== _scrollLeft.current) {\n if (isInit) {\n setTimeout(() => scrollHorizontal(container, _scrollLeft, props.scrollLeft, isAnimation), 10)\n } else {\n scrollHorizontal(container, _scrollLeft, props.scrollLeft, isAnimation)\n }\n }\n }\n }\n\n useEffect(() => {\n handleScroll(props, true)\n }, [])\n\n const {\n className,\n style = {},\n onScroll,\n onScrollToUpper,\n onScrollToLower,\n scrollX,\n scrollY\n } = props\n let { upperThreshold = 50, lowerThreshold = 50 } = props\n const cls = classNames(\n 'taro-scroll',\n {\n 'taro-scroll-view__scroll-x': scrollX,\n 'taro-scroll-view__scroll-y': scrollY\n },\n className\n )\n upperThreshold = Number(upperThreshold)\n lowerThreshold = Number(lowerThreshold)\n const upperAndLower = e => {\n if (!container.current) return\n const { offsetWidth, offsetHeight, scrollLeft, scrollTop, scrollHeight, scrollWidth } = container.current\n if (\n onScrollToLower &&\n ((props.scrollY && offsetHeight + scrollTop + lowerThreshold >= scrollHeight) ||\n (props.scrollX && offsetWidth + scrollLeft + lowerThreshold >= scrollWidth))\n ) {\n onScrollToLower(e)\n }\n if (\n onScrollToUpper &&\n ((props.scrollY && scrollTop <= upperThreshold) || (props.scrollX && scrollLeft <= upperThreshold))\n ) {\n onScrollToUpper(e)\n }\n }\n const upperAndLowerThrottle = throttle(upperAndLower, 200)\n const _onScroll = e => {\n const { scrollLeft, scrollTop, scrollHeight, scrollWidth } = container.current\n _scrollLeft.current = scrollLeft\n _scrollTop.current = scrollTop\n Object.defineProperty(e, 'detail', {\n enumerable: true,\n writable: true,\n value: {\n scrollLeft,\n scrollTop,\n scrollHeight,\n scrollWidth\n }\n })\n upperAndLowerThrottle(e)\n onScroll && onScroll(e)\n }\n const _onTouchMove = e => {\n isFunction(props.onTouchMove) ? props.onTouchMove(e) : onTouchMove(e)\n }\n return (\n <div\n ref={e => {\n if (e) {\n container.current = e\n if (props.forwardedRef) props.forwardedRef.current = e\n }\n }}\n style={style}\n className={cls}\n onScroll={_onScroll}\n onTouchMove={_onTouchMove}\n >\n {props.children}\n </div>\n )\n}\n\nexport default createForwardRefComponent(ScrollView)\n"],"names":["easeOutScroll","from","arguments","length","undefined","to","callback","change","dur","sTime","Date","linear","t","b","c","d","isLarger","step","requestAnimationFrame","scrollIntoView","id","isHorizontal","animated","scrollIntoViewAlignment","_a","document","querySelector","behavior","block","inline","scrollVertical","container","scrollTop","top","isAnimation","current","pos","scrollHorizontal","scrollLeft","left","ScrollView","props","_scrollTop","useRef","_scrollLeft","onTouchMove","e","stopPropagation","handleScroll","isInit","scrollX","scrollY","setTimeout","scrollWithAnimation","useEffect","className","style","onScroll","onScrollToUpper","onScrollToLower","upperThreshold","lowerThreshold","cls","classNames","Number","upperAndLower","offsetWidth","offsetHeight","scrollHeight","scrollWidth","upperAndLowerThrottle","throttle","_onScroll","Object","defineProperty","enumerable","writable","value","_onTouchMove","isFunction","_el$","_tmpl$","$$touchmove","addEventListener","_$use","forwardedRef","_$insert","children","_$effect","_$p","_$style","createForwardRefComponent","_$delegateEvents"],"mappings":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IAAG;AACP,MAAA,IAAIA,CAAC,EAAE;QACLf,SAAS,CAACI,OAAO,GAAGW,CAAC;QACrB,IAAIL,KAAK,CAAC4C,YAAY,EAAE5C,KAAK,CAAC4C,YAAY,CAAClD,OAAO,GAAGW,CAAC;AACxD;AACF,KAAC,EAAAkC,IAAA,CAAA;IAAAA,IAAA,CAAAzB,SAAA,GAEUO,GAAG;AAAAwB,IAAAA,MAAA,CAAAN,IAAA,EAIbvC,MAAAA,KAAK,CAAC8C,QAAQ,CAAA;IAAAC,MAAA,CAAAC,GAAA,IAAAC,KAAA,CAAAV,IAAA,EALRxB,OAAK,EAAAiC,GAAA,CAAA,CAAA;AAAA,IAAA,OAAAT,IAAA;AAAA,GAAA,GAAA;AAQlB;AAEA,YAAeW,yBAAyB,CAACnD,UAAU,CAAC;AAAAoD,cAAA,CAAA,CAAA,WAAA,CAAA,CAAA;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../../src/components/text/index.tsx"],"sourcesContent":["import './style/index.css'\n\nimport classNames from 'classnames'\nimport React from 'react'\n\nimport { createForwardRefComponent } from '../../utils'\n\ninterface IProps extends React.HTMLAttributes<HTMLSpanElement> {\n selectable?: boolean\n forwardedRef?: React.MutableRefObject<HTMLSpanElement>\n}\n\nfunction Text (props: IProps) {\n const { className, selectable = false, forwardedRef, ...restProps } = props\n const cls = classNames(\n 'taro-text',\n {\n 'taro-text__selectable': selectable\n },\n className\n )\n return (\n <span {...restProps} className={cls} ref={forwardedRef}>\n {props.children}\n </span>\n )\n}\n\nexport default createForwardRefComponent(Text)\n"],"names":["Text","props","className","selectable","forwardedRef","restProps","__rest","cls","classNames","_el$","_tmpl$","_$use","_$spread","_$mergeProps","_$insert","children","createForwardRefComponent"],"mappings":";;;;;;;;AAYA,SAASA,IAAIA,CAAEC,KAAa,EAAA;EAC1B,MAAM;MAAEC,SAAS;AAAEC,MAAAA,UAAU,GAAG,KAAK;AAAEC,MAAAA,YAAAA;AAA+B,KAAA,GAAAH,KAAK;AAAnBI,IAAAA,SAAS,GAAAC,MAAA,CAAKL,KAAK,EAArE,CAAA,WAAA,EAAA,YAAA,EAAA,cAAA,CAA6D,CAAQ,CAAA;AAC3E,EAAA,MAAMM,GAAG,GAAGC,UAAU,CACpB,WAAW,EACX;AACE,IAAA,uBAAuB,EAAEL,UAAAA;GAC1B,EACDD,SAAS,CACV,CAAA;AACD,EAAA,OAAA,CAAA,MAAA;IAAA,IAAAO,IAAA,GAAAC,MAAA,EAAA,CAAA;IAAAC,GAAA,CAC4CP,YAAY,EAAAK,IAAA,CAAA,CAAA;AAAAG,IAAAA,MAAA,CAAAH,IAAA,EAAAI,UAAA,CAA5CR,SAAS,EAAA;MAAA,WAAaE,EAAAA,GAAAA;AAAG,KAAA,CAAA,EAAA,KAAA,EAAA,IAAA,CAAA,CAAA;AAAAO,IAAAA,MAAA,CAAAL,IAAA,EAChCR,MAAAA,KAAK,CAACc,QAAQ,CAAA,CAAA;AAAA,IAAA,OAAAN,IAAA,CAAA;AAAA,GAAA,GAAA,CAAA;AAGrB,CAAA;AAEA,YAAeO,yBAAyB,CAAChB,IAAI,CAAC;;;;"}
1
+ {"version":3,"file":"index.js","sources":["../../../../src/components/text/index.tsx"],"sourcesContent":["import './style/index.css'\n\nimport classNames from 'classnames'\nimport React from 'react'\n\nimport { createForwardRefComponent } from '../../utils'\n\ninterface IProps extends React.HTMLAttributes<HTMLSpanElement> {\n selectable?: boolean\n forwardedRef?: React.MutableRefObject<HTMLSpanElement>\n}\n\nfunction Text (props: IProps) {\n const { className, selectable = false, forwardedRef, ...restProps } = props\n const cls = classNames(\n 'taro-text',\n {\n 'taro-text__selectable': selectable\n },\n className\n )\n return (\n <span {...restProps} className={cls} ref={forwardedRef}>\n {props.children}\n </span>\n )\n}\n\nexport default createForwardRefComponent(Text)\n"],"names":["Text","props","className","selectable","forwardedRef","restProps","__rest","cls","classNames","_el$","_tmpl$","_$use","_$spread","_$mergeProps","_$insert","children","createForwardRefComponent"],"mappings":";;;;;;;;AAYA,SAASA,IAAIA,CAAEC,KAAa,EAAA;EAC1B,MAAM;MAAEC,SAAS;AAAEC,MAAAA,UAAU,GAAG,KAAK;AAAEC,MAAAA;AAA+B,KAAA,GAAAH,KAAK;AAAnBI,IAAAA,SAAS,GAAAC,MAAA,CAAKL,KAAK,EAArE,CAAA,WAAA,EAAA,YAAA,EAAA,cAAA,CAA6D,CAAQ;AAC3E,EAAA,MAAMM,GAAG,GAAGC,UAAU,CACpB,WAAW,EACX;AACE,IAAA,uBAAuB,EAAEL;GAC1B,EACDD,SAAS,CACV;AACD,EAAA,OAAA,CAAA,MAAA;IAAA,IAAAO,IAAA,GAAAC,MAAA,EAAA;IAAAC,GAAA,CAC4CP,YAAY,EAAAK,IAAA,CAAA;AAAAG,IAAAA,MAAA,CAAAH,IAAA,EAAAI,UAAA,CAA5CR,SAAS,EAAA;MAAA,WAAaE,EAAAA;AAAG,KAAA,CAAA,EAAA,KAAA,EAAA,IAAA,CAAA;AAAAO,IAAAA,MAAA,CAAAL,IAAA,EAChCR,MAAAA,KAAK,CAACc,QAAQ,CAAA;AAAA,IAAA,OAAAN,IAAA;AAAA,GAAA,GAAA;AAGrB;AAEA,YAAeO,yBAAyB,CAAChB,IAAI,CAAC;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../../src/components/view/index.tsx"],"sourcesContent":["import classNames from 'classnames'\n\nimport { useEffect, useState } from '../../utils/hooks'\nimport { createForwardRefComponent } from '../../utils/index'\n\nimport type { TFunc } from '@tarojs/runtime/dist/runtime.esm'\nimport type React from 'react'\n\ninterface IProps extends React.HTMLAttributes<HTMLDivElement> {\n hoverClass?: string\n hoverStartTime?: number\n hoverStayTime?: number\n onTouchStart?(e: React.TouchEvent<HTMLDivElement>): void\n onTouchEnd?(e: React.TouchEvent<HTMLDivElement>): void\n onTouchMove?(e: React.TouchEvent<HTMLDivElement>): void\n onLongPress?(): void\n forwardedRef?: React.MutableRefObject<HTMLDivElement>\n}\n\nfunction View ({\n className,\n hoverClass,\n forwardedRef,\n onTouchStart,\n onTouchEnd,\n onTouchMove,\n hoverStartTime = 50,\n hoverStayTime = 400,\n ...other\n}: IProps) {\n let timeoutEvent: ReturnType<typeof setTimeout>\n let startTime = 0\n const [hover, setHover] = useState<boolean>(false)\n const [touch, setTouch] = useState<boolean>(false)\n\n const [cls, setCls] = useState<string>(classNames(\n '',\n {\n [`${hoverClass}`]: process.env.FRAMEWORK === 'solid' ? (hover as unknown as TFunc)() : hover\n },\n className\n ))\n\n const _onTouchStart = e => {\n if (hoverClass) {\n setTouch(true)\n setTimeout(() => {\n if (process.env.FRAMEWORK === 'solid' ? (touch as unknown as TFunc)() : touch) {\n setHover(true)\n }\n }, hoverStartTime)\n }\n onTouchStart && onTouchStart(e)\n if (other.onLongPress) {\n timeoutEvent = setTimeout(() => {\n other.onLongPress!()\n }, 350)\n startTime = new Date().getTime()\n }\n }\n\n const _onTouchMove = e => {\n clearTimeout(timeoutEvent)\n onTouchMove && onTouchMove(e)\n }\n\n const _onTouchEnd = e => {\n const spanTime = new Date().getTime() - startTime\n if (spanTime < 350) {\n clearTimeout(timeoutEvent)\n }\n if (hoverClass) {\n setTouch(false)\n setTimeout(() => {\n if (process.env.FRAMEWORK === 'solid' ? (touch as unknown as TFunc)() : touch) {\n setHover(false)\n }\n }, hoverStayTime)\n }\n onTouchEnd && onTouchEnd(e)\n }\n\n useEffect(() => {\n setCls(classNames(\n '',\n {\n [`${hoverClass}`]: process.env.FRAMEWORK === 'solid' ? (hover as unknown as TFunc)() : hover\n },\n className\n ))\n }, [hover, className])\n\n return (\n <div\n ref={forwardedRef}\n className={process.env.FRAMEWORK === 'solid' ? (cls as unknown as TFunc)() : cls as string}\n onTouchStart={_onTouchStart}\n onTouchEnd={_onTouchEnd}\n onTouchMove={_onTouchMove}\n {...other}\n >\n {other.children}\n </div>\n )\n}\n\n\nexport default createForwardRefComponent(View)\n"],"names":["View","_a","className","hoverClass","forwardedRef","onTouchStart","onTouchEnd","onTouchMove","hoverStartTime","hoverStayTime","other","__rest","timeoutEvent","startTime","hover","setHover","useState","touch","setTouch","cls","setCls","classNames","process","_onTouchStart","e","setTimeout","onLongPress","Date","getTime","_onTouchMove","clearTimeout","_onTouchEnd","spanTime","useEffect","_el$","_tmpl$","$$touchmove","$$touchend","$$touchstart","_ref$","_$use","_$spread","_$mergeProps","_$memo","_$insert","children","createForwardRefComponent","_$delegateEvents"],"mappings":";;;;;;;AAmBA,SAASA,IAAIA,CAAEC,EAUN,EAAA;MAVM;MACbC,SAAS;MACTC,UAAU;MACVC,YAAY;MACZC,YAAY;MACZC,UAAU;MACVC,WAAW;AACXC,MAAAA,cAAc,GAAG,EAAE;AACnBC,MAAAA,aAAa,GAAG,GAAA;UAET;IADJC,KAAK,GATKC,MAAA,CAAAV,EAAA,EAAA,CAAA,WAAA,EAAA,YAAA,EAAA,cAAA,EAAA,cAAA,EAAA,YAAA,EAAA,aAAA,EAAA,gBAAA,EAAA,eAAA,CAUd,CADS,CAAA;AAER,EAAA,IAAIW,YAA2C,CAAA;EAC/C,IAAIC,SAAS,GAAG,CAAC,CAAA;EACjB,MAAM,CAACC,KAAK,EAAEC,QAAQ,CAAC,GAAGC,QAAQ,CAAU,KAAK,CAAC,CAAA;EAClD,MAAM,CAACC,KAAK,EAAEC,QAAQ,CAAC,GAAGF,QAAQ,CAAU,KAAK,CAAC,CAAA;EAElD,MAAM,CAACG,GAAG,EAAEC,MAAM,CAAC,GAAGJ,QAAQ,CAASK,UAAU,CAC/C,EAAE,EACF;AACE,IAAA,CAAC,CAAGlB,EAAAA,UAAU,CAAE,CAAA,GAAGmB,OAAqB,KAAK,OAAO,GAAIR,KAA0B,EAAE,GAAGA,KAAAA;GACxF,EACDZ,SAAS,CACV,CAAC,CAAA;EAEF,MAAMqB,aAAa,GAAGC,CAAC,IAAG;AACxB,IAAA,IAAIrB,UAAU,EAAE;MACde,QAAQ,CAAC,IAAI,CAAC,CAAA;AACdO,MAAAA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nimport { useEffect, useState } from '../../utils/hooks'\nimport { createForwardRefComponent } from '../../utils/index'\n\nimport type { TFunc } from '@tarojs/runtime/dist/runtime.esm'\nimport type React from 'react'\n\ninterface IProps extends React.HTMLAttributes<HTMLDivElement> {\n hoverClass?: string\n hoverStartTime?: number\n hoverStayTime?: number\n onTouchStart?(e: React.TouchEvent<HTMLDivElement>): void\n onTouchEnd?(e: React.TouchEvent<HTMLDivElement>): void\n onTouchMove?(e: React.TouchEvent<HTMLDivElement>): void\n onLongPress?(): void\n forwardedRef?: React.MutableRefObject<HTMLDivElement>\n}\n\nfunction View ({\n className,\n hoverClass,\n forwardedRef,\n onTouchStart,\n onTouchEnd,\n onTouchMove,\n hoverStartTime = 50,\n hoverStayTime = 400,\n ...other\n}: IProps) {\n let timeoutEvent: ReturnType<typeof setTimeout>\n let startTime = 0\n const [hover, setHover] = useState<boolean>(false)\n const [touch, setTouch] = useState<boolean>(false)\n\n const [cls, setCls] = useState<string>(classNames(\n '',\n {\n [`${hoverClass}`]: process.env.FRAMEWORK === 'solid' ? (hover as unknown as TFunc)() : hover\n },\n className\n ))\n\n const _onTouchStart = e => {\n if (hoverClass) {\n setTouch(true)\n setTimeout(() => {\n if (process.env.FRAMEWORK === 'solid' ? (touch as unknown as TFunc)() : touch) {\n setHover(true)\n }\n }, hoverStartTime)\n }\n onTouchStart && onTouchStart(e)\n if (other.onLongPress) {\n timeoutEvent = setTimeout(() => {\n other.onLongPress!()\n }, 350)\n startTime = new Date().getTime()\n }\n }\n\n const _onTouchMove = e => {\n clearTimeout(timeoutEvent)\n onTouchMove && onTouchMove(e)\n }\n\n const _onTouchEnd = e => {\n const spanTime = new Date().getTime() - startTime\n if (spanTime < 350) {\n clearTimeout(timeoutEvent)\n }\n if (hoverClass) {\n setTouch(false)\n setTimeout(() => {\n if (process.env.FRAMEWORK === 'solid' ? (touch as unknown as TFunc)() : touch) {\n setHover(false)\n }\n }, hoverStayTime)\n }\n onTouchEnd && onTouchEnd(e)\n }\n\n useEffect(() => {\n setCls(classNames(\n '',\n {\n [`${hoverClass}`]: process.env.FRAMEWORK === 'solid' ? (hover as unknown as TFunc)() : hover\n },\n className\n ))\n }, [hover, className])\n\n return (\n <div\n ref={forwardedRef}\n className={process.env.FRAMEWORK === 'solid' ? (cls as unknown as TFunc)() : cls as string}\n onTouchStart={_onTouchStart}\n onTouchEnd={_onTouchEnd}\n onTouchMove={_onTouchMove}\n {...other}\n >\n {other.children}\n </div>\n )\n}\n\n\nexport default createForwardRefComponent(View)\n"],"names":["View","_a","className","hoverClass","forwardedRef","onTouchStart","onTouchEnd","onTouchMove","hoverStartTime","hoverStayTime","other","__rest","timeoutEvent","startTime","hover","setHover","useState","touch","setTouch","cls","setCls","classNames","process","_onTouchStart","e","setTimeout","onLongPress","Date","getTime","_onTouchMove","clearTimeout","_onTouchEnd","spanTime","useEffect","_el$","_tmpl$","$$touchmove","$$touchend","$$touchstart","_ref$","_$use","_$spread","_$mergeProps","_$memo","_$insert","children","createForwardRefComponent","_$delegateEvents"],"mappings":";;;;;;;AAmBA,SAASA,IAAIA,CAAEC,EAUN,EAAA;MAVM;MACbC,SAAS;MACTC,UAAU;MACVC,YAAY;MACZC,YAAY;MACZC,UAAU;MACVC,WAAW;AACXC,MAAAA,cAAc,GAAG,EAAE;AACnBC,MAAAA,aAAa,GAAG;UAET;IADJC,KAAK,GATKC,MAAA,CAAAV,EAAA,EAAA,CAAA,WAAA,EAAA,YAAA,EAAA,cAAA,EAAA,cAAA,EAAA,YAAA,EAAA,aAAA,EAAA,gBAAA,EAAA,eAAA,CAUd,CADS;AAER,EAAA,IAAIW,YAA2C;EAC/C,IAAIC,SAAS,GAAG,CAAC;EACjB,MAAM,CAACC,KAAK,EAAEC,QAAQ,CAAC,GAAGC,QAAQ,CAAU,KAAK,CAAC;EAClD,MAAM,CAACC,KAAK,EAAEC,QAAQ,CAAC,GAAGF,QAAQ,CAAU,KAAK,CAAC;EAElD,MAAM,CAACG,GAAG,EAAEC,MAAM,C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
- @-webkit-keyframes weuiLoading{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}@keyframes weuiLoading{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}.taro-button-core[loading]>.weui-loading{animation:weuiLoading 1s steps(12) infinite;background:transparent url("data:image/svg+xml;charset=utf8, %3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120' viewBox='0 0 100 100'%3E%3Cpath fill='none' d='M0 0h100v100H0z'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='%23E9E9E9' rx='5' ry='5' transform='translate(0 -30)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='%23989697' rx='5' ry='5' transform='rotate(30 105.98 65)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='%239B999A' rx='5' ry='5' transform='rotate(60 75.98 65)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='%23A3A1A2' rx='5' ry='5' transform='rotate(90 65 65)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='%23ABA9AA' rx='5' ry='5' transform='rotate(120 58.66 65)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='%23B2B2B2' rx='5' ry='5' transform='rotate(150 54.02 65)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='%23BAB8B9' rx='5' ry='5' transform='rotate(180 50 65)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='%23C2C0C1' rx='5' ry='5' transform='rotate(-150 45.98 65)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='%23CBCBCB' rx='5' ry='5' transform='rotate(-120 41.34 65)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='%23D2D2D2' rx='5' ry='5' transform='rotate(-90 35 65)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='%23DADADA' rx='5' ry='5' transform='rotate(-60 24.02 65)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='%23E2E2E2' rx='5' ry='5' transform='rotate(-30 -5.98 65)'/%3E%3C/svg%3E") no-repeat;background-size:100%;display:inline-block;height:20px;vertical-align:middle;width:20px}.taro-button-core[loading]>.weui-loading.weui-btn_primary,.taro-button-core[loading]>.weui-loading.weui-btn_warn{color:hsla(0,0%,100%,.6)}.taro-button-core[loading]>.weui-loading.weui-btn_primary{background-color:#179b16}.taro-button-core[loading]>.weui-loading.weui-btn_warn{background-color:#ce3c39}.taro-button-core{-webkit-tap-highlight-color:rgba(0,0,0,0);appearance:none;background-color:#f8f8f8;border-radius:5px;border-width:0;box-sizing:border-box;color:#000;display:block;font-size:18px;line-height:2.55555556;margin-left:auto;margin-right:auto;outline:0;overflow:hidden;padding-left:14px;padding-right:14px;position:relative;text-align:center;text-decoration:none;width:100%}.taro-button-core:focus{outline:0}.taro-button-core:not([disabled]):active{background-color:#dedede;color:rgba(0,0,0,.6)}.taro-button-core:after{border:1px solid rgba(0,0,0,.2);border-radius:10px;box-sizing:border-box;content:" ";height:200%;left:0;position:absolute;top:0;transform:scale(.5);transform-origin:0 0;width:200%}.taro-button-core+.taro-button-core{margin-top:15px}.taro-button-core[type=default]{background-color:#f8f8f8;color:#000}.taro-button-core[type=default]:not([disabled]):visited{color:#000}.taro-button-core[type=default]:not([disabled]):active{background-color:#dedede;color:rgba(0,0,0,.6)}.taro-button-core[size=mini]{display:inline-block;font-size:13px;line-height:2.3;padding:0 1.32em;width:auto}.taro-button-core[plain=true],.taro-button-core[plain=true][type=default],.taro-button-core[plain=true][type=primary]{background-color:transparent;border-width:1px}.taro-button-core[disabled]{color:hsla(0,0%,100%,.6)}.taro-button-core[disabled][type=default]{background-color:#f7f7f7;color:rgba(0,0,0,.3)}.taro-button-core[disabled][type=primary]{background-color:#9ed99d}.taro-button-core[disabled][type=warn]{background-color:#ec8b89}.taro-button-core[loading] .weui-loading{margin:-.2em .34em 0 0}.taro-button-core[loading][type=primary],.taro-button-core[loading][type=warn]{color:hsla(0,0%,100%,.6)}.taro-button-core[loading][type=primary]{background-color:#179b16}.taro-button-core[loading][type=warn]{background-color:#ce3c39}.taro-button-core[plain=true][type=primary]{border:1px solid #1aad19;color:#1aad19}.taro-button-core[plain=true][type=primary]:not([disabled]):active{background-color:transparent;border-color:rgba(26,173,25,.6);color:rgba(26,173,25,.6)}.taro-button-core[plain=true][type=primary]:after{border-width:0}.taro-button-core[plain=true][type=warn]{border:1px solid #e64340;color:#e64340}.taro-button-core[plain=true][type=warn]:not([disabled]):active{background-color:transparent;border-color:rgba(230,67,64,.6);color:rgba(230,67,64,.6)}.taro-button-core[plain=true][type=warn]:after{border-width:0}.taro-button-core[plain=true],.taro-button-core[plain=true][type=default]{border:1px solid #353535;color:#353535}.taro-button-core[plain=true]:not([disabled]):active,.taro-button-core[plain=true][type=default]:not([disabled]):active{background-color:transparent;border-color:rgba(53,53,53,.6);color:rgba(53,53,53,.6)}.taro-button-core[plain=true]:after,.taro-button-core[plain=true][type=default]:after{border-width:0}.taro-button-core[type=primary]{background-color:#1aad19;color:#fff}.taro-button-core[type=primary]:not([disabled]):visited{color:#fff}.taro-button-core[type=primary]:not([disabled]):active{background-color:#179b16;color:hsla(0,0%,100%,.6)}.taro-button-core[type=warn]{background-color:#e64340;color:#fff}.taro-button-core[type=warn]:not([disabled]):visited{color:#fff}.taro-button-core[type=warn]:not([disabled]):active{background-color:#ce3c39;color:hsla(0,0%,100%,.6)}.taro-button-core[plain=true][disabled]{background-color:#f7f7f7;border:1px solid rgba(0,0,0,.2);color:rgba(0,0,0,.3)}.taro-button-core[plain=true][disabled][type=primary]{background-color:#f7f7f7;border:1px solid rgba(0,0,0,.2);color:rgba(0,0,0,.3)}.weui-icon-circle:before{content:"\ea01"}.weui-icon-download:before{content:"\ea02"}.weui-icon-info:before{content:"\ea03"}.weui-icon-safe-success:before{content:"\ea04"}.weui-icon-safe-warn:before{content:"\ea05"}.weui-icon-success:before{content:"\ea06"}.weui-icon-success-circle:before{content:"\ea07"}.weui-icon-success-no-circle:before{content:"\ea08"}.weui-icon-waiting:before{content:"\ea09"}.weui-icon-waiting-circle:before{content:"\ea0a"}.weui-icon-warn:before{content:"\ea0b"}.weui-icon-info-circle:before{content:"\ea0c"}.weui-icon-cancel:before{content:"\ea0d"}.weui-icon-search:before{content:"\ea0e"}.weui-icon-clear:before{content:"\ea0f"}.weui-icon-back:before{content:"\ea10"}.weui-icon-delete:before{content:"\ea11"}.weui-icon-success{color:#09bb07;font-size:23px}.weui-icon-waiting{color:#10aeff;font-size:23px}.weui-icon-warn{color:#f43530;font-size:23px}.weui-icon-info{color:#10aeff;font-size:23px}.weui-icon-success-circle,.weui-icon-success-no-circle{color:#09bb07;font-size:23px}.weui-icon-waiting-circle{color:#10aeff;font-size:23px}.weui-icon-circle{color:#c9c9c9;font-size:23px}.weui-icon-download,.weui-icon-info-circle{color:#09bb07;font-size:23px}.weui-icon-safe-success{color:#09bb07}.weui-icon-safe-warn{color:#ffbe00}.weui-icon-cancel{color:#f43530;font-size:22px}.weui-icon-clear,.weui-icon-search{color:#b2b2b2;font-size:14px}.weui-icon-delete.weui-icon_gallery-delete{color:#fff;font-size:22px}.weui-icon_msg{font-size:93px}.weui-icon_msg.weui-icon-warn{color:#f76260}.weui-icon_msg-primary{font-size:93px}.weui-icon_msg-primary.weui-icon-warn{color:#ffbe00}img[src=""]{opacity:0}.taro-img{display:inline-block;font-size:0;height:240px;overflow:hidden;position:relative;width:320px}.taro-img.taro-img__widthfix{height:100%}.taro-img__mode-scaletofill{height:100%;width:100%}.taro-img__mode-aspectfit{height:100%;object-fit:contain;width:100%}.taro-img__mode-aspectfill{height:100%;object-fit:cover;width:100%}.taro-img__mode-top,.taro-img__mode-widthfix{width:100%}.taro-img__mode-bottom{bottom:0;position:absolute;width:100%}.taro-img__mode-left{height:100%}.taro-img__mode-right{height:100%}.taro-img__mode-right,.taro-img__mode-topright{position:absolute;right:0}.taro-img__mode-bottomleft{bottom:0;position:absolute}.taro-img__mode-bottomright{bottom:0;position:absolute;right:0}.taro-scroll{-webkit-overflow-scrolling:auto}.taro-scroll::-webkit-scrollbar{display:none}.taro-scroll-view{overflow:hidden}.taro-scroll-view__scroll-x{overflow-x:scroll;overflow-y:hidden}.taro-scroll-view__scroll-y{overflow-x:hidden;overflow-y:scroll}.taro-text{-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none}.taro-text__selectable{-moz-user-select:text;-webkit-user-select:text;-ms-user-select:text;user-select:text}
1
+ @-webkit-keyframes weuiLoading{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}@keyframes weuiLoading{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}.taro-button-core[loading]>.weui-loading{animation:weuiLoading 1s steps(12) infinite;background:transparent url("data:image/svg+xml;charset=utf8, %3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120' viewBox='0 0 100 100'%3E%3Cpath fill='none' d='M0 0h100v100H0z'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='%23E9E9E9' rx='5' ry='5' transform='translate(0 -30)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='%23989697' rx='5' ry='5' transform='rotate(30 105.98 65)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='%239B999A' rx='5' ry='5' transform='rotate(60 75.98 65)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='%23A3A1A2' rx='5' ry='5' transform='rotate(90 65 65)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='%23ABA9AA' rx='5' ry='5' transform='rotate(120 58.66 65)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='%23B2B2B2' rx='5' ry='5' transform='rotate(150 54.02 65)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='%23BAB8B9' rx='5' ry='5' transform='rotate(180 50 65)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='%23C2C0C1' rx='5' ry='5' transform='rotate(-150 45.98 65)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='%23CBCBCB' rx='5' ry='5' transform='rotate(-120 41.34 65)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='%23D2D2D2' rx='5' ry='5' transform='rotate(-90 35 65)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='%23DADADA' rx='5' ry='5' transform='rotate(-60 24.02 65)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='%23E2E2E2' rx='5' ry='5' transform='rotate(-30 -5.98 65)'/%3E%3C/svg%3E") no-repeat;background-size:100%;display:inline-block;height:20px;vertical-align:middle;width:20px}.taro-button-core[loading]>.weui-loading.weui-btn_primary,.taro-button-core[loading]>.weui-loading.weui-btn_warn{color:hsla(0,0%,100%,.6)}.taro-button-core[loading]>.weui-loading.weui-btn_primary{background-color:#179b16}.taro-button-core[loading]>.weui-loading.weui-btn_warn{background-color:#ce3c39}.taro-button-core{-webkit-tap-highlight-color:rgba(0,0,0,0);appearance:none;background-color:#f8f8f8;border-radius:5px;border-width:0;box-sizing:border-box;color:#000;display:block;font-size:18px;line-height:2.55555556;margin-left:auto;margin-right:auto;outline:0;overflow:hidden;padding-left:14px;padding-right:14px;position:relative;text-align:center;text-decoration:none;width:100%}.taro-button-core:focus{outline:0}.taro-button-core:not([disabled]):active{background-color:#dedede;color:rgba(0,0,0,.6)}.taro-button-core:after{border:1px solid rgba(0,0,0,.2);border-radius:10px;box-sizing:border-box;content:" ";height:200%;left:0;position:absolute;top:0;transform:scale(.5);transform-origin:0 0;width:200%}.taro-button-core+.taro-button-core{margin-top:15px}.taro-button-core[type=default]{background-color:#f8f8f8;color:#000}.taro-button-core[type=default]:not([disabled]):visited{color:#000}.taro-button-core[type=default]:not([disabled]):active{background-color:#dedede;color:rgba(0,0,0,.6)}.taro-button-core[size=mini]{display:inline-block;font-size:13px;line-height:2.3;padding:0 1.32em;width:auto}.taro-button-core[plain=true],.taro-button-core[plain=true][type=default],.taro-button-core[plain=true][type=primary]{background-color:transparent;border-width:1px}.taro-button-core[disabled]{color:hsla(0,0%,100%,.6)}.taro-button-core[disabled][type=default]{background-color:#f7f7f7;color:rgba(0,0,0,.3)}.taro-button-core[disabled][type=primary]{background-color:#9ed99d}.taro-button-core[disabled][type=warn]{background-color:#ec8b89}.taro-button-core[loading] .weui-loading{margin:-.2em .34em 0 0}.taro-button-core[loading][type=primary],.taro-button-core[loading][type=warn]{color:hsla(0,0%,100%,.6)}.taro-button-core[loading][type=primary]{background-color:#179b16}.taro-button-core[loading][type=warn]{background-color:#ce3c39}.taro-button-core[plain=true][type=primary]{border:1px solid #1aad19;color:#1aad19}.taro-button-core[plain=true][type=primary]:not([disabled]):active{background-color:transparent;border-color:rgba(26,173,25,.6);color:rgba(26,173,25,.6)}.taro-button-core[plain=true][type=primary]:after{border-width:0}.taro-button-core[plain=true][type=warn]{border:1px solid #e64340;color:#e64340}.taro-button-core[plain=true][type=warn]:not([disabled]):active{background-color:transparent;border-color:rgba(230,67,64,.6);color:rgba(230,67,64,.6)}.taro-button-core[plain=true][type=warn]:after{border-width:0}.taro-button-core[plain=true],.taro-button-core[plain=true][type=default]{border:1px solid #353535;color:#353535}.taro-button-core[plain=true]:not([disabled]):active,.taro-button-core[plain=true][type=default]:not([disabled]):active{background-color:transparent;border-color:rgba(53,53,53,.6);color:rgba(53,53,53,.6)}.taro-button-core[plain=true]:after,.taro-button-core[plain=true][type=default]:after{border-width:0}.taro-button-core[type=primary]{background-color:#1aad19;color:#fff}.taro-button-core[type=primary]:not([disabled]):visited{color:#fff}.taro-button-core[type=primary]:not([disabled]):active{background-color:#179b16;color:hsla(0,0%,100%,.6)}.taro-button-core[type=warn]{background-color:#e64340;color:#fff}.taro-button-core[type=warn]:not([disabled]):visited{color:#fff}.taro-button-core[type=warn]:not([disabled]):active{background-color:#ce3c39;color:hsla(0,0%,100%,.6)}.taro-button-core[plain=true][disabled],.taro-button-core[plain=true][disabled][type=primary]{background-color:#f7f7f7;border:1px solid rgba(0,0,0,.2);color:rgba(0,0,0,.3)}.weui-icon-circle:before{content:"\ea01"}.weui-icon-download:before{content:"\ea02"}.weui-icon-info:before{content:"\ea03"}.weui-icon-safe-success:before{content:"\ea04"}.weui-icon-safe-warn:before{content:"\ea05"}.weui-icon-success:before{content:"\ea06"}.weui-icon-success-circle:before{content:"\ea07"}.weui-icon-success-no-circle:before{content:"\ea08"}.weui-icon-waiting:before{content:"\ea09"}.weui-icon-waiting-circle:before{content:"\ea0a"}.weui-icon-warn:before{content:"\ea0b"}.weui-icon-info-circle:before{content:"\ea0c"}.weui-icon-cancel:before{content:"\ea0d"}.weui-icon-search:before{content:"\ea0e"}.weui-icon-clear:before{content:"\ea0f"}.weui-icon-back:before{content:"\ea10"}.weui-icon-delete:before{content:"\ea11"}.weui-icon-success{color:#09bb07;font-size:23px}.weui-icon-waiting{color:#10aeff;font-size:23px}.weui-icon-warn{color:#f43530;font-size:23px}.weui-icon-info{color:#10aeff;font-size:23px}.weui-icon-success-circle,.weui-icon-success-no-circle{color:#09bb07;font-size:23px}.weui-icon-waiting-circle{color:#10aeff;font-size:23px}.weui-icon-circle{color:#c9c9c9;font-size:23px}.weui-icon-download,.weui-icon-info-circle{color:#09bb07;font-size:23px}.weui-icon-safe-success{color:#09bb07}.weui-icon-safe-warn{color:#ffbe00}.weui-icon-cancel{color:#f43530;font-size:22px}.weui-icon-clear,.weui-icon-search{color:#b2b2b2;font-size:14px}.weui-icon-delete.weui-icon_gallery-delete{color:#fff;font-size:22px}.weui-icon_msg{font-size:93px}.weui-icon_msg.weui-icon-warn{color:#f76260}.weui-icon_msg-primary{font-size:93px}.weui-icon_msg-primary.weui-icon-warn{color:#ffbe00}img[src=""]{opacity:0}.taro-img{display:inline-block;font-size:0;height:240px;overflow:hidden;position:relative;width:320px}.taro-img.taro-img__widthfix,.taro-img__mode-heightfix{height:100%}.taro-img__mode-scaletofill{height:100%;width:100%}.taro-img__mode-aspectfit{height:100%;object-fit:contain;width:100%}.taro-img__mode-aspectfill{height:100%;object-fit:cover;width:100%}.taro-img__mode-widthfix{width:100%}.taro-img__mode-bottom,.taro-img__mode-top{left:50%;position:absolute;transform:translate(-50%)}.taro-img__mode-bottom{bottom:0}.taro-img__mode-center{left:50%;position:absolute;top:50%;transform:translate(-50%,-50%)}.taro-img__mode-left,.taro-img__mode-right{position:absolute;top:50%;transform:translateY(-50%)}.taro-img__mode-right{right:0}.taro-img__mode-topright{position:absolute;right:0}.taro-img__mode-bottomleft{bottom:0;position:absolute}.taro-img__mode-bottomright{bottom:0;position:absolute;right:0}.taro-scroll{-webkit-overflow-scrolling:auto}.taro-scroll::-webkit-scrollbar{display:none}.taro-scroll-view{overflow:hidden}.taro-scroll-view__scroll-x{overflow-x:scroll;overflow-y:hidden}.taro-scroll-view__scroll-y{overflow-x:hidden;overflow-y:scroll}.taro-text{-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none}.taro-text__selectable{-moz-user-select:text;-webkit-user-select:text;-ms-user-select:text;user-select:text}
@@ -1,4 +1,4 @@
1
- export { Ad, AdCustom, AnimationVideo, AnimationView, ArCamera, Audio, AwemeData, Block, Camera, Canvas, ChannelLive, ChannelVideo, Checkbox, CheckboxGroup, CommentDetail, CommentList, ContactButton, CoverImage, CoverView, CustomWrapper, Editor, FollowSwan, Form, FunctionalPageNavigator, InlinePaymentPanel, Input, KeyboardAccessory, Label, Lifestyle, Like, LivePlayer, LivePusher, Login, Lottie, Map, MatchMedia, MovableArea, MovableView, NativeSlot, NavigationBar, Navigator, OfficialAccount, OpenData, PageContainer, PageMeta, Picker, PickerView, PickerViewColumn, Progress, PullToRefresh, Radio, RadioGroup, RichText, RootPortal, RtcRoom, RtcRoomItem, ShareElement, Slider, Slot, Swiper, SwiperItem, Switch, Tabs, Textarea, Video, VoipRoom, WebView } from '@tarojs/components/lib/solid';
1
+ export { Ad, AdCustom, AnimationVideo, AnimationView, ArCamera, Audio, AwemeData, Block, Camera, Canvas, ChannelLive, ChannelVideo, Checkbox, CheckboxGroup, CommentDetail, CommentList, ContactButton, CoverImage, CoverView, CustomWrapper, DraggableSheet, Editor, FollowSwan, Form, FunctionalPageNavigator, GridBuilder, GridView, InlinePaymentPanel, Input, KeyboardAccessory, Label, Lifestyle, Like, ListBuilder, ListView, LivePlayer, LivePusher, Login, Lottie, Map, MatchMedia, MovableArea, MovableView, NativeSlot, NavigationBar, Navigator, NestedScrollBody, NestedScrollHeader, OfficialAccount, OpenContainer, OpenData, PageContainer, PageMeta, Picker, PickerView, PickerViewColumn, Progress, PullToRefresh, Radio, RadioGroup, RichText, RootPortal, RtcRoom, RtcRoomItem, Script, ShareElement, Slider, Slot, Snapshot, Span, StickyHeader, StickySection, Swiper, SwiperItem, Switch, Tabs, Textarea, Video, VoipRoom, WebView } from '@tarojs/components/lib/solid';
2
2
  export { default as Button } from './components/button/index.js';
3
3
  export { default as Icon } from './components/icon/index.js';
4
4
  export { default as Image } from './components/image/index.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../src/index.solid.ts"],"sourcesContent":["/* eslint-disable simple-import-sort/exports */\nexport { Ad } from '@tarojs/components/lib/solid'\nexport { AdCustom } from '@tarojs/components/lib/solid'\nexport { AnimationVideo } from '@tarojs/components/lib/solid'\nexport { AnimationView } from '@tarojs/components/lib/solid'\nexport { ArCamera } from '@tarojs/components/lib/solid'\nexport { Audio } from '@tarojs/components/lib/solid'\nexport { AwemeData } from '@tarojs/components/lib/solid'\nexport { Block } from '@tarojs/components/lib/solid'\nexport { default as Button } from './components/button'\nexport { Camera } from '@tarojs/components/lib/solid'\nexport { Canvas } from '@tarojs/components/lib/solid'\nexport { ChannelLive } from '@tarojs/components/lib/solid'\nexport { ChannelVideo } from '@tarojs/components/lib/solid'\nexport { Checkbox, CheckboxGroup } from '@tarojs/components/lib/solid'\nexport { CommentDetail, CommentList } from '@tarojs/components/lib/solid'\nexport { ContactButton } from '@tarojs/components/lib/solid'\nexport { CoverImage } from '@tarojs/components/lib/solid'\nexport { CoverView } from '@tarojs/components/lib/solid'\nexport { CustomWrapper } from '@tarojs/components/lib/solid'\nexport { Editor } from '@tarojs/components/lib/solid'\nexport { FollowSwan } from '@tarojs/components/lib/solid'\nexport { Form } from '@tarojs/components/lib/solid'\nexport { FunctionalPageNavigator } from '@tarojs/components/lib/solid'\nexport { default as Icon } from './components/icon'\nexport { default as Image } from './components/image'\nexport { InlinePaymentPanel } from '@tarojs/components/lib/solid'\nexport { Input } from '@tarojs/components/lib/solid'\nexport { KeyboardAccessory } from '@tarojs/components/lib/solid'\nexport { Label } from '@tarojs/components/lib/solid'\nexport { Lifestyle } from '@tarojs/components/lib/solid'\nexport { Like } from '@tarojs/components/lib/solid'\nexport { LivePlayer } from '@tarojs/components/lib/solid'\nexport { LivePusher } from '@tarojs/components/lib/solid'\nexport { Login } from '@tarojs/components/lib/solid'\nexport { Lottie } from '@tarojs/components/lib/solid'\nexport { Map } from '@tarojs/components/lib/solid'\nexport { MatchMedia } from '@tarojs/components/lib/solid'\nexport { MovableArea, MovableView } from '@tarojs/components/lib/solid'\nexport { NavigationBar } from '@tarojs/components/lib/solid'\nexport { Navigator } from '@tarojs/components/lib/solid'\nexport { OfficialAccount } from '@tarojs/components/lib/solid'\nexport { OpenData } from '@tarojs/components/lib/solid'\nexport { PageContainer } from '@tarojs/components/lib/solid'\nexport { PageMeta } from '@tarojs/components/lib/solid'\nexport { Picker } from '@tarojs/components/lib/solid'\nexport { PickerView, PickerViewColumn } from '@tarojs/components/lib/solid'\nexport { Progress } from '@tarojs/components/lib/solid'\n// export { default as PullDownRefresh } from './components/pull-down-refresh'\nexport { PullToRefresh } from '@tarojs/components/lib/solid'\nexport { Radio, RadioGroup } from '@tarojs/components/lib/solid'\nexport { RichText } from '@tarojs/components/lib/solid'\nexport { RootPortal } from '@tarojs/components/lib/solid'\nexport { RtcRoom, RtcRoomItem } from '@tarojs/components/lib/solid'\nexport { default as ScrollView } from './components/scroll-view'\nexport { ShareElement } from '@tarojs/components/lib/solid'\nexport { Slider } from '@tarojs/components/lib/solid'\nexport { NativeSlot, Slot } from '@tarojs/components/lib/solid'\nexport { Swiper, SwiperItem } from '@tarojs/components/lib/solid'\nexport { Switch } from '@tarojs/components/lib/solid'\nexport { Tabs } from '@tarojs/components/lib/solid'\nexport { default as Text } from './components/text'\nexport { Textarea } from '@tarojs/components/lib/solid'\nexport { Video } from '@tarojs/components/lib/solid'\nexport { default as View } from './components/view'\nexport { VoipRoom } from '@tarojs/components/lib/solid'\nexport { WebView } from '@tarojs/components/lib/solid'\n"],"names":[],"mappings":";;;;;;;;AAAA"}
1
+ {"version":3,"file":"index.js","sources":["../../src/index.solid.ts"],"sourcesContent":["/* eslint-disable simple-import-sort/exports */\nexport { Ad } from '@tarojs/components/lib/solid'\nexport { AdCustom } from '@tarojs/components/lib/solid'\nexport { AnimationVideo } from '@tarojs/components/lib/solid'\nexport { AnimationView } from '@tarojs/components/lib/solid'\nexport { ArCamera } from '@tarojs/components/lib/solid'\nexport { Audio } from '@tarojs/components/lib/solid'\nexport { AwemeData } from '@tarojs/components/lib/solid'\nexport { Block } from '@tarojs/components/lib/solid'\nexport { default as Button } from './components/button'\nexport { Camera } from '@tarojs/components/lib/solid'\nexport { Canvas } from '@tarojs/components/lib/solid'\nexport { ChannelLive } from '@tarojs/components/lib/solid'\nexport { ChannelVideo } from '@tarojs/components/lib/solid'\nexport { Checkbox, CheckboxGroup } from '@tarojs/components/lib/solid'\nexport { CommentDetail, CommentList } from '@tarojs/components/lib/solid'\nexport { ContactButton } from '@tarojs/components/lib/solid'\nexport { CoverImage } from '@tarojs/components/lib/solid'\nexport { CoverView } from '@tarojs/components/lib/solid'\nexport { CustomWrapper } from '@tarojs/components/lib/solid'\nexport { DraggableSheet } from '@tarojs/components/lib/solid'\nexport { Editor } from '@tarojs/components/lib/solid'\nexport { FollowSwan } from '@tarojs/components/lib/solid'\nexport { Form } from '@tarojs/components/lib/solid'\nexport { FunctionalPageNavigator } from '@tarojs/components/lib/solid'\nexport { GridView } from '@tarojs/components/lib/solid'\nexport { GridBuilder } from '@tarojs/components/lib/solid'\nexport { default as Icon } from './components/icon'\nexport { default as Image } from './components/image'\nexport { InlinePaymentPanel } from '@tarojs/components/lib/solid'\nexport { Input } from '@tarojs/components/lib/solid'\nexport { KeyboardAccessory } from '@tarojs/components/lib/solid'\nexport { Label } from '@tarojs/components/lib/solid'\nexport { Lifestyle } from '@tarojs/components/lib/solid'\nexport { Like } from '@tarojs/components/lib/solid'\nexport { LivePlayer } from '@tarojs/components/lib/solid'\nexport { LivePusher } from '@tarojs/components/lib/solid'\nexport { ListBuilder } from '@tarojs/components/lib/solid'\nexport { ListView } from '@tarojs/components/lib/solid'\nexport { Login } from '@tarojs/components/lib/solid'\nexport { Lottie } from '@tarojs/components/lib/solid'\nexport { Map } from '@tarojs/components/lib/solid'\nexport { MatchMedia } from '@tarojs/components/lib/solid'\nexport { MovableArea, MovableView } from '@tarojs/components/lib/solid'\nexport { NavigationBar } from '@tarojs/components/lib/solid'\nexport { Navigator } from '@tarojs/components/lib/solid'\nexport { NestedScrollBody } from '@tarojs/components/lib/solid'\nexport { NestedScrollHeader } from '@tarojs/components/lib/solid'\nexport { OfficialAccount } from '@tarojs/components/lib/solid'\nexport { OpenData } from '@tarojs/components/lib/solid'\nexport { OpenContainer } from '@tarojs/components/lib/solid'\nexport { PageContainer } from '@tarojs/components/lib/solid'\nexport { PageMeta } from '@tarojs/components/lib/solid'\nexport { Picker } from '@tarojs/components/lib/solid'\nexport { PickerView, PickerViewColumn } from '@tarojs/components/lib/solid'\nexport { Progress } from '@tarojs/components/lib/solid'\n// export { default as PullDownRefresh } from './components/pull-down-refresh'\nexport { PullToRefresh } from '@tarojs/components/lib/solid'\nexport { Radio, RadioGroup } from '@tarojs/components/lib/solid'\nexport { RichText } from '@tarojs/components/lib/solid'\nexport { RootPortal } from '@tarojs/components/lib/solid'\nexport { RtcRoom, RtcRoomItem } from '@tarojs/components/lib/solid'\nexport { Script } from '@tarojs/components/lib/solid'\nexport { default as ScrollView } from './components/scroll-view'\nexport { ShareElement } from '@tarojs/components/lib/solid'\nexport { Slider } from '@tarojs/components/lib/solid'\nexport { Snapshot } from '@tarojs/components/lib/solid'\nexport { Span } from '@tarojs/components/lib/solid'\nexport { StickyHeader } from '@tarojs/components/lib/solid'\nexport { StickySection } from '@tarojs/components/lib/solid'\nexport { NativeSlot, Slot } from '@tarojs/components/lib/solid'\nexport { Swiper, SwiperItem } from '@tarojs/components/lib/solid'\nexport { Switch } from '@tarojs/components/lib/solid'\nexport { Tabs } from '@tarojs/components/lib/solid'\nexport { default as Text } from './components/text'\nexport { Textarea } from '@tarojs/components/lib/solid'\nexport { Video } from '@tarojs/components/lib/solid'\nexport { default as View } from './components/view'\nexport { VoipRoom } from '@tarojs/components/lib/solid'\nexport { WebView } from '@tarojs/components/lib/solid'\n"],"names":[],"mappings":";;;;;;;;AAAA"}
@@ -1 +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;AACvB,GAAC,CAAC,CAAA;EAEF,OAAO,YAAA;AAAA,IAAA,KAAA,IAAAC,IAAA,GAAAC,SAAA,CAAAC,MAAA,EAAUC,IAAI,GAAAC,IAAAA,KAAA,CAAAJ,IAAA,GAAAK,IAAA,GAAA,CAAA,EAAAA,IAAA,GAAAL,IAAA,EAAAK,IAAA,EAAA,EAAA;AAAJF,MAAAA,IAAI,CAAAE,IAAA,CAAAJ,GAAAA,SAAA,CAAAI,IAAA,CAAA,CAAA;AAAA,KAAA;IAAA,OAAIC,SAAA,CAAA,KA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K,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;;;;"}
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","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CAAC;AACJ,KAAC,CAAA;AAAA,GAAA;AACH;MAEaE,SAAS,GAAGA,CAACC,MAAM,EAAEjB,IAAI,KAAI;EACxCJ,KAAK,CAACO,YAAY,CAAC,MAAK;AACtB,IAAA,MAAMe,OAAO,GAAGD,MAAM,EAAE;AACxBjB,IAAAA,IAAI,CAACI,OAAO,CAACC,GAAG,IAAIA,GAAG,CAAC;AAExB,IAAA,OAAO,MAAK;AACV,MAAA,IAAI,OAAOa,OAAO,KAAK,UAAU,EAAEA,OAAO,EAAE;KAC7C;AACH,GAAC,CAAC;AACJ;AAEaC,MAAAA,OAAO,GAAGvB,KAAK,CAACwB;AAEhBC,MAAAA,MAAM,GAAaC,IAAQ,IAAI;EAC1C,MAAM,CAAC5B,KAAK,CAAC,GAAGE,KAAK,CAACC,YAAY,CAACyB,IAAI,CAAC;EACxC,OAAO;IACLC,OAAO,EAAE7B,KAAK;GACf;AACH;AAEa8B,MAAAA,aAAa,GAAG5B,KAAK,CAAC4B;AACtBC,MAAAA,UAAU,GAAG7B,KAAK,CAAC6B;AACzB,MAAMC,IAAI,GAAGA,CAACC,SAAS,EAAEC,cAAc,KAAKD,UAAS;AAC/CE,MAAAA,UAAU,GAAIF,SAAS,IAAKA;AAClC,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;AACxB0B,IAAAA,GAAG,CAACR,OAAO,GAAGS,YAAY,EAAE;AAC9B,GAAC,CAAC;AACJ;;;;"}
@@ -1 +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,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,EAAAA,KAAA,GAAAD,KAAA,EAAAC,KAAA,EAAA,EAAA;AAAJb,MAAAA,IAAI,CAAAa,KAAA,CAAApB,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;;;;"}
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;EAAA,IAAEG,KAAM,GAAAH,SAAA,CAAAC,MAAA,GAAAD,CAAAA,GAAAA,SAAA,MAAAE,SAAA;EACnD,IAAIE,QAAQ,GAAG,CAAC;AAChB,EAAA,IAAIC,UAAyC;AAC7C,EAAA,OAAO,YAAiB;AAAA,IAAA,KAAA,IAAAC,IAAA,GAAAN,SAAA,C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Jb,MAAAA,IAAI,CAAAa,KAAA,CAAApB,GAAAA,SAAA,CAAAoB,KAAA,CAAA;AAAA;AACtB,IAAA,MAAMV,OAAO,GAAGP,KAAK,IAAI,IAAI;IAC7BW,YAAY,CAACI,KAAK,CAAC;IACnBA,KAAK,GAAGH,UAAU,CAAC,YAAA;AACjBjB,MAAAA,EAAE,CAACe,KAAK,CAACH,OAAO,EAAEH,IAAI,CAAC;KACxB,EAAEU,EAAE,CAAC;GACP;AACH;AAEgB,SAAAI,IAAIA,CAAEC,GAAG,EAAEC,MAAM,EAAA;EAC/B,MAAMC,WAAW,GAAGC,MAAM,CAACC,MAAM,CAAC,EAAE,EAAEJ,GAAG,CAAC;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;IACrB,OAAOH,WAAW,CAACI,GAAG,CAAC;AACzB;AACA,EAAA,OAAOJ,WAAW;AACpB;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;GAAO,CAAA,CAAA;EAErD,OAAOI,UAAU,CAACN,mBAAmB,CAAC;AACxC;;;;"}
@@ -1 +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;;;;"}
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;AAEjBE,MAAAA,WAAW,GAAGD,KAAK,CAACC;AAEpBC,MAAAA,SAAS,GAAGF,KAAK,CAACE;AAElBC,MAAAA,OAAO,GAAGH,KAAK,CAACG;AAEhBC,MAAAA,MAAM,GAAGJ,KAAK,CAACI;AAEfC,MAAAA,aAAa,GAAGL,KAAK,CAACK;AACtBC,MAAAA,UAAU,GAAGN,KAAK,CAACM;AACnBC,MAAAA,IAAI,GAAGP,KAAK,CAACO;AACbC,MAAAA,UAAU,GAAGR,KAAK,CAACQ;AACnBC,MAAAA,mBAAmB,GAAGT,KAAK,CAACS;;;;"}
@@ -1 +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","_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,G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,EAAA;AAAA,IAAA,GAAKE,KAAK;AAAEG,IAAAA,YAAY,EAAEF,GAAAA;AAAI,GAAA,CAAG,CAAA;EAErD,OAAOG,UAAU,CAACL,mBAAmB,CAAC,CAAA;AACxC;;;;"}
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,KA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1,6 @@
1
1
  {
2
2
  "name": "@tarojs/components-react",
3
- "version": "4.1.0-alpha.0",
3
+ "version": "4.1.0-alpha.2",
4
4
  "description": "",
5
5
  "main:h5": "dist/index.js",
6
6
  "main": "dist/index.js",
@@ -28,17 +28,17 @@
28
28
  "classnames": "^2.2.5",
29
29
  "swiper": "11.1.15",
30
30
  "tslib": "^2.6.2",
31
- "@tarojs/taro": "4.1.0-alpha.0",
32
- "@tarojs/components": "4.1.0-alpha.0",
33
- "@tarojs/shared": "4.1.0-alpha.0"
31
+ "@tarojs/taro": "4.1.0-alpha.2",
32
+ "@tarojs/components": "4.1.0-alpha.2",
33
+ "@tarojs/shared": "4.1.0-alpha.2"
34
34
  },
35
35
  "devDependencies": {
36
36
  "@babel/preset-react": "^7.24.1",
37
37
  "babel-preset-solid": "^1.8.15",
38
38
  "react": "^18.2.0",
39
39
  "solid-js": "^1.8.16",
40
- "@tarojs/helper": "4.1.0-alpha.0",
41
- "@tarojs/runtime": "4.1.0-alpha.0"
40
+ "@tarojs/helper": "4.1.0-alpha.2",
41
+ "@tarojs/runtime": "4.1.0-alpha.2"
42
42
  },
43
43
  "peerDependencies": {
44
44
  "react": "*",