@rsmax/one 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -0
- package/README.md +3 -0
- package/cjs/api/index.ali.d.ts +1 -0
- package/cjs/api/index.ali.js +9 -0
- package/cjs/api/index.d.ts +1 -0
- package/cjs/api/index.js +9 -0
- package/cjs/api/index.toutiao.d.ts +1 -0
- package/cjs/api/index.toutiao.js +9 -0
- package/cjs/api/index.wechat.d.ts +5 -0
- package/cjs/api/index.wechat.js +9 -0
- package/cjs/components/Modal.d.ts +2 -0
- package/cjs/components/Modal.js +8 -0
- package/cjs/components/Modal.web.d.ts +2 -0
- package/cjs/components/Modal.web.js +41 -0
- package/cjs/constants.d.ts +1 -0
- package/cjs/constants.js +4 -0
- package/cjs/createHostComponent.d.ts +18 -0
- package/cjs/createHostComponent.js +205 -0
- package/cjs/hostComponents/Button/index.d.ts +24 -0
- package/cjs/hostComponents/Button/index.js +10 -0
- package/cjs/hostComponents/Button/index.web.d.ts +5 -0
- package/cjs/hostComponents/Button/index.web.js +57 -0
- package/cjs/hostComponents/Button/props/alias/index.d.ts +4 -0
- package/cjs/hostComponents/Button/props/alias/index.js +5 -0
- package/cjs/hostComponents/Button/props/default/index.d.ts +2 -0
- package/cjs/hostComponents/Button/props/default/index.js +3 -0
- package/cjs/hostComponents/Button/props/default/index.wechat.d.ts +6 -0
- package/cjs/hostComponents/Button/props/default/index.wechat.js +7 -0
- package/cjs/hostComponents/Button/props/index.d.ts +27 -0
- package/cjs/hostComponents/Button/props/index.js +10 -0
- package/cjs/hostComponents/Form/index.d.ts +5 -0
- package/cjs/hostComponents/Form/index.js +9 -0
- package/cjs/hostComponents/Form/index.web.d.ts +5 -0
- package/cjs/hostComponents/Form/index.web.js +29 -0
- package/cjs/hostComponents/Form/props/default/index.d.ts +2 -0
- package/cjs/hostComponents/Form/props/default/index.js +3 -0
- package/cjs/hostComponents/Form/props/default/index.wechat.d.ts +5 -0
- package/cjs/hostComponents/Form/props/default/index.wechat.js +6 -0
- package/cjs/hostComponents/Form/props/index.d.ts +15 -0
- package/cjs/hostComponents/Form/props/index.js +8 -0
- package/cjs/hostComponents/Image/index.d.ts +5 -0
- package/cjs/hostComponents/Image/index.js +9 -0
- package/cjs/hostComponents/Image/index.web.d.ts +5 -0
- package/cjs/hostComponents/Image/index.web.js +54 -0
- package/cjs/hostComponents/Image/modeStyle.d.ts +46 -0
- package/cjs/hostComponents/Image/modeStyle.js +47 -0
- package/cjs/hostComponents/Image/props/default/index.d.ts +2 -0
- package/cjs/hostComponents/Image/props/default/index.js +3 -0
- package/cjs/hostComponents/Image/props/default/index.wechat.d.ts +7 -0
- package/cjs/hostComponents/Image/props/default/index.wechat.js +8 -0
- package/cjs/hostComponents/Image/props/index.d.ts +27 -0
- package/cjs/hostComponents/Image/props/index.js +8 -0
- package/cjs/hostComponents/Input/index.d.ts +27 -0
- package/cjs/hostComponents/Input/index.js +86 -0
- package/cjs/hostComponents/Input/index.web.d.ts +5 -0
- package/cjs/hostComponents/Input/index.web.js +58 -0
- package/cjs/hostComponents/Input/props/alias/index.d.ts +4 -0
- package/cjs/hostComponents/Input/props/alias/index.js +5 -0
- package/cjs/hostComponents/Input/props/index.d.ts +35 -0
- package/cjs/hostComponents/Input/props/index.js +2 -0
- package/cjs/hostComponents/Label/index.d.ts +5 -0
- package/cjs/hostComponents/Label/index.js +8 -0
- package/cjs/hostComponents/Label/index.web.d.ts +5 -0
- package/cjs/hostComponents/Label/index.web.js +29 -0
- package/cjs/hostComponents/Label/props.d.ts +9 -0
- package/cjs/hostComponents/Label/props.js +2 -0
- package/cjs/hostComponents/Navigator/index.d.ts +5 -0
- package/cjs/hostComponents/Navigator/index.js +9 -0
- package/cjs/hostComponents/Navigator/index.web.d.ts +5 -0
- package/cjs/hostComponents/Navigator/index.web.js +64 -0
- package/cjs/hostComponents/Navigator/props/default/index.d.ts +2 -0
- package/cjs/hostComponents/Navigator/props/default/index.js +3 -0
- package/cjs/hostComponents/Navigator/props/default/index.wechat.d.ts +10 -0
- package/cjs/hostComponents/Navigator/props/default/index.wechat.js +11 -0
- package/cjs/hostComponents/Navigator/props/index.d.ts +22 -0
- package/cjs/hostComponents/Navigator/props/index.js +8 -0
- package/cjs/hostComponents/Text/index.d.ts +5 -0
- package/cjs/hostComponents/Text/index.js +9 -0
- package/cjs/hostComponents/Text/index.web.d.ts +5 -0
- package/cjs/hostComponents/Text/index.web.js +74 -0
- package/cjs/hostComponents/Text/props/default/index.d.ts +2 -0
- package/cjs/hostComponents/Text/props/default/index.js +3 -0
- package/cjs/hostComponents/Text/props/default/index.wechat.d.ts +5 -0
- package/cjs/hostComponents/Text/props/default/index.wechat.js +6 -0
- package/cjs/hostComponents/Text/props/index.d.ts +18 -0
- package/cjs/hostComponents/Text/props/index.js +8 -0
- package/cjs/hostComponents/Textarea/index.d.ts +29 -0
- package/cjs/hostComponents/Textarea/index.js +80 -0
- package/cjs/hostComponents/Textarea/index.web.d.ts +4 -0
- package/cjs/hostComponents/Textarea/index.web.js +64 -0
- package/cjs/hostComponents/Textarea/props/alias.d.ts +4 -0
- package/cjs/hostComponents/Textarea/props/alias.js +5 -0
- package/cjs/hostComponents/Textarea/props/index.d.ts +30 -0
- package/cjs/hostComponents/Textarea/props/index.js +8 -0
- package/cjs/hostComponents/View/index.d.ts +5 -0
- package/cjs/hostComponents/View/index.js +9 -0
- package/cjs/hostComponents/View/index.web.d.ts +5 -0
- package/cjs/hostComponents/View/index.web.js +57 -0
- package/cjs/hostComponents/View/props/default/index.d.ts +2 -0
- package/cjs/hostComponents/View/props/default/index.js +3 -0
- package/cjs/hostComponents/View/props/default/index.wechat.d.ts +7 -0
- package/cjs/hostComponents/View/props/default/index.wechat.js +8 -0
- package/cjs/hostComponents/View/props/index.d.ts +27 -0
- package/cjs/hostComponents/View/props/index.js +8 -0
- package/cjs/hostComponents/WebView/index.d.ts +9 -0
- package/cjs/hostComponents/WebView/index.js +8 -0
- package/cjs/hostComponents/WebView/index.web.d.ts +10 -0
- package/cjs/hostComponents/WebView/index.web.js +56 -0
- package/cjs/hostComponents/index.d.ts +20 -0
- package/cjs/hostComponents/index.js +50 -0
- package/cjs/hostComponents/useWebTouch.d.ts +18 -0
- package/cjs/hostComponents/useWebTouch.js +95 -0
- package/cjs/index.d.ts +4 -0
- package/cjs/index.js +25 -0
- package/cjs/types/event.d.ts +64 -0
- package/cjs/types/event.js +2 -0
- package/cjs/types/index.d.ts +1 -0
- package/cjs/types/index.js +17 -0
- package/cjs/useWebPlaceholderStyle/index.d.ts +2 -0
- package/cjs/useWebPlaceholderStyle/index.js +50 -0
- package/cjs/useWebPlaceholderStyle/plainStyle/CSSProperty.d.ts +6 -0
- package/cjs/useWebPlaceholderStyle/plainStyle/CSSProperty.js +71 -0
- package/cjs/useWebPlaceholderStyle/plainStyle/index.d.ts +3 -0
- package/cjs/useWebPlaceholderStyle/plainStyle/index.js +48 -0
- package/cjs/utils/isPlatformSpecifyProp.d.ts +3 -0
- package/cjs/utils/isPlatformSpecifyProp.js +22 -0
- package/cjs/utils/literalText.d.ts +2 -0
- package/cjs/utils/literalText.js +20 -0
- package/esm/api/index.ali.d.ts +1 -0
- package/esm/api/index.ali.js +1 -0
- package/esm/api/index.d.ts +1 -0
- package/esm/api/index.js +1 -0
- package/esm/api/index.toutiao.d.ts +1 -0
- package/esm/api/index.toutiao.js +1 -0
- package/esm/api/index.wechat.d.ts +5 -0
- package/esm/api/index.wechat.js +6 -0
- package/esm/components/Modal.d.ts +2 -0
- package/esm/components/Modal.js +5 -0
- package/esm/components/Modal.web.d.ts +2 -0
- package/esm/components/Modal.web.js +12 -0
- package/esm/constants.d.ts +1 -0
- package/esm/constants.js +1 -0
- package/esm/createHostComponent.d.ts +18 -0
- package/esm/createHostComponent.js +166 -0
- package/esm/hostComponents/Button/index.d.ts +24 -0
- package/esm/hostComponents/Button/index.js +5 -0
- package/esm/hostComponents/Button/index.web.d.ts +5 -0
- package/esm/hostComponents/Button/index.web.js +29 -0
- package/esm/hostComponents/Button/props/alias/index.d.ts +4 -0
- package/esm/hostComponents/Button/props/alias/index.js +3 -0
- package/esm/hostComponents/Button/props/default/index.d.ts +2 -0
- package/esm/hostComponents/Button/props/default/index.js +1 -0
- package/esm/hostComponents/Button/props/default/index.wechat.d.ts +6 -0
- package/esm/hostComponents/Button/props/default/index.wechat.js +5 -0
- package/esm/hostComponents/Button/props/index.d.ts +27 -0
- package/esm/hostComponents/Button/props/index.js +2 -0
- package/esm/hostComponents/Form/index.d.ts +5 -0
- package/esm/hostComponents/Form/index.js +4 -0
- package/esm/hostComponents/Form/index.web.d.ts +5 -0
- package/esm/hostComponents/Form/index.web.js +4 -0
- package/esm/hostComponents/Form/props/default/index.d.ts +2 -0
- package/esm/hostComponents/Form/props/default/index.js +1 -0
- package/esm/hostComponents/Form/props/default/index.wechat.d.ts +5 -0
- package/esm/hostComponents/Form/props/default/index.wechat.js +4 -0
- package/esm/hostComponents/Form/props/index.d.ts +15 -0
- package/esm/hostComponents/Form/props/index.js +1 -0
- package/esm/hostComponents/Image/index.d.ts +5 -0
- package/esm/hostComponents/Image/index.js +4 -0
- package/esm/hostComponents/Image/index.web.d.ts +5 -0
- package/esm/hostComponents/Image/index.web.js +26 -0
- package/esm/hostComponents/Image/modeStyle.d.ts +46 -0
- package/esm/hostComponents/Image/modeStyle.js +45 -0
- package/esm/hostComponents/Image/props/default/index.d.ts +2 -0
- package/esm/hostComponents/Image/props/default/index.js +1 -0
- package/esm/hostComponents/Image/props/default/index.wechat.d.ts +7 -0
- package/esm/hostComponents/Image/props/default/index.wechat.js +6 -0
- package/esm/hostComponents/Image/props/index.d.ts +27 -0
- package/esm/hostComponents/Image/props/index.js +1 -0
- package/esm/hostComponents/Input/index.d.ts +27 -0
- package/esm/hostComponents/Input/index.js +80 -0
- package/esm/hostComponents/Input/index.web.d.ts +5 -0
- package/esm/hostComponents/Input/index.web.js +30 -0
- package/esm/hostComponents/Input/props/alias/index.d.ts +4 -0
- package/esm/hostComponents/Input/props/alias/index.js +3 -0
- package/esm/hostComponents/Input/props/index.d.ts +35 -0
- package/esm/hostComponents/Input/props/index.js +1 -0
- package/esm/hostComponents/Label/index.d.ts +5 -0
- package/esm/hostComponents/Label/index.js +3 -0
- package/esm/hostComponents/Label/index.web.d.ts +5 -0
- package/esm/hostComponents/Label/index.web.js +4 -0
- package/esm/hostComponents/Label/props.d.ts +9 -0
- package/esm/hostComponents/Label/props.js +1 -0
- package/esm/hostComponents/Navigator/index.d.ts +5 -0
- package/esm/hostComponents/Navigator/index.js +4 -0
- package/esm/hostComponents/Navigator/index.web.d.ts +5 -0
- package/esm/hostComponents/Navigator/index.web.js +36 -0
- package/esm/hostComponents/Navigator/props/default/index.d.ts +2 -0
- package/esm/hostComponents/Navigator/props/default/index.js +1 -0
- package/esm/hostComponents/Navigator/props/default/index.wechat.d.ts +10 -0
- package/esm/hostComponents/Navigator/props/default/index.wechat.js +9 -0
- package/esm/hostComponents/Navigator/props/index.d.ts +22 -0
- package/esm/hostComponents/Navigator/props/index.js +1 -0
- package/esm/hostComponents/Text/index.d.ts +5 -0
- package/esm/hostComponents/Text/index.js +4 -0
- package/esm/hostComponents/Text/index.web.d.ts +5 -0
- package/esm/hostComponents/Text/index.web.js +46 -0
- package/esm/hostComponents/Text/props/default/index.d.ts +2 -0
- package/esm/hostComponents/Text/props/default/index.js +1 -0
- package/esm/hostComponents/Text/props/default/index.wechat.d.ts +5 -0
- package/esm/hostComponents/Text/props/default/index.wechat.js +4 -0
- package/esm/hostComponents/Text/props/index.d.ts +18 -0
- package/esm/hostComponents/Text/props/index.js +1 -0
- package/esm/hostComponents/Textarea/index.d.ts +29 -0
- package/esm/hostComponents/Textarea/index.js +74 -0
- package/esm/hostComponents/Textarea/index.web.d.ts +4 -0
- package/esm/hostComponents/Textarea/index.web.js +36 -0
- package/esm/hostComponents/Textarea/props/alias.d.ts +4 -0
- package/esm/hostComponents/Textarea/props/alias.js +3 -0
- package/esm/hostComponents/Textarea/props/index.d.ts +30 -0
- package/esm/hostComponents/Textarea/props/index.js +1 -0
- package/esm/hostComponents/View/index.d.ts +5 -0
- package/esm/hostComponents/View/index.js +4 -0
- package/esm/hostComponents/View/index.web.d.ts +5 -0
- package/esm/hostComponents/View/index.web.js +29 -0
- package/esm/hostComponents/View/props/default/index.d.ts +2 -0
- package/esm/hostComponents/View/props/default/index.js +1 -0
- package/esm/hostComponents/View/props/default/index.wechat.d.ts +7 -0
- package/esm/hostComponents/View/props/default/index.wechat.js +6 -0
- package/esm/hostComponents/View/props/index.d.ts +27 -0
- package/esm/hostComponents/View/props/index.js +1 -0
- package/esm/hostComponents/WebView/index.d.ts +9 -0
- package/esm/hostComponents/WebView/index.js +3 -0
- package/esm/hostComponents/WebView/index.web.d.ts +10 -0
- package/esm/hostComponents/WebView/index.web.js +28 -0
- package/esm/hostComponents/index.d.ts +20 -0
- package/esm/hostComponents/index.js +20 -0
- package/esm/hostComponents/useWebTouch.d.ts +18 -0
- package/esm/hostComponents/useWebTouch.js +70 -0
- package/esm/index.d.ts +4 -0
- package/esm/index.js +4 -0
- package/esm/types/event.d.ts +64 -0
- package/esm/types/event.js +1 -0
- package/esm/types/index.d.ts +1 -0
- package/esm/types/index.js +1 -0
- package/esm/useWebPlaceholderStyle/index.d.ts +2 -0
- package/esm/useWebPlaceholderStyle/index.js +21 -0
- package/esm/useWebPlaceholderStyle/plainStyle/CSSProperty.d.ts +6 -0
- package/esm/useWebPlaceholderStyle/plainStyle/CSSProperty.js +68 -0
- package/esm/useWebPlaceholderStyle/plainStyle/index.d.ts +3 -0
- package/esm/useWebPlaceholderStyle/plainStyle/index.js +46 -0
- package/esm/utils/isPlatformSpecifyProp.d.ts +3 -0
- package/esm/utils/isPlatformSpecifyProp.js +18 -0
- package/esm/utils/literalText.d.ts +2 -0
- package/esm/utils/literalText.js +15 -0
- package/node.js +1 -0
- package/package.json +45 -0
- package/scripts/postbuild.js +17 -0
- package/typings/index.d.ts +0 -0
- package/vitest.config.js +7 -0
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
2
|
+
var t = {};
|
|
3
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
4
|
+
t[p] = s[p];
|
|
5
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
6
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
7
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
8
|
+
t[p[i]] = s[p[i]];
|
|
9
|
+
}
|
|
10
|
+
return t;
|
|
11
|
+
};
|
|
12
|
+
import * as React from 'react';
|
|
13
|
+
import clsx from 'clsx';
|
|
14
|
+
import { filterProps } from '../../utils/isPlatformSpecifyProp';
|
|
15
|
+
import useWebTouch from '../useWebTouch';
|
|
16
|
+
const View = (props, ref) => {
|
|
17
|
+
const _a = filterProps(props), { hoverClassName, hoverStartTime = 50, hoverStayTime = 400, className, onTouchStart, onTouchMove, onTouchEnd, onTouchCancel, onTap, onLongTap } = _a, restProps = __rest(_a, ["hoverClassName", "hoverStartTime", "hoverStayTime", "className", "onTouchStart", "onTouchMove", "onTouchEnd", "onTouchCancel", "onTap", "onLongTap"]);
|
|
18
|
+
const [touching, handleTouchStart, handleTouchMove, handleTouchEnd, handleTouchCancel] = useWebTouch({
|
|
19
|
+
hoverDelay: hoverStartTime,
|
|
20
|
+
hoverDuration: hoverStayTime,
|
|
21
|
+
onLongTap,
|
|
22
|
+
onTouchStart,
|
|
23
|
+
onTouchMove,
|
|
24
|
+
onTouchEnd,
|
|
25
|
+
onTouchCancel,
|
|
26
|
+
});
|
|
27
|
+
return (React.createElement("div", Object.assign({}, restProps, { ref: ref, onTouchStart: handleTouchStart, onTouchMove: handleTouchMove, onTouchEnd: handleTouchEnd, onTouchCancel: handleTouchCancel, className: clsx(className, { [hoverClassName || '']: touching }), onClick: onTap })));
|
|
28
|
+
};
|
|
29
|
+
export default React.forwardRef(View);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default {};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { TapEvent, TouchStartEvent, TouchEndEvent, TouchMoveEvent, TouchCancelEvent } from '../../../types';
|
|
3
|
+
export { default as defaults } from './default';
|
|
4
|
+
interface CommonProps {
|
|
5
|
+
readonly dataset?: DOMStringMap;
|
|
6
|
+
id?: string;
|
|
7
|
+
slot?: string;
|
|
8
|
+
className?: string;
|
|
9
|
+
style?: React.CSSProperties;
|
|
10
|
+
hoverClassName?: string;
|
|
11
|
+
hoverStartTime?: number;
|
|
12
|
+
hoverStayTime?: number;
|
|
13
|
+
role?: string;
|
|
14
|
+
}
|
|
15
|
+
export default interface ViewProps extends CommonProps, React.AriaAttributes {
|
|
16
|
+
onTap?: (event: TapEvent) => void;
|
|
17
|
+
onTouchStart?: (event: TouchStartEvent) => void;
|
|
18
|
+
onTouchMove?: (e: TouchMoveEvent) => void;
|
|
19
|
+
onTouchEnd?: (e: TouchEndEvent) => void;
|
|
20
|
+
onTouchCancel?: (e: TouchCancelEvent) => void;
|
|
21
|
+
onLongTap?: (e: TapEvent) => void;
|
|
22
|
+
children?: React.ReactNode;
|
|
23
|
+
}
|
|
24
|
+
export interface ViewWebProps extends CommonProps, React.HTMLAttributes<HTMLDivElement> {
|
|
25
|
+
onTap?: (event: React.MouseEvent<HTMLDivElement>) => void;
|
|
26
|
+
onLongTap?: (event: React.TouchEvent<HTMLDivElement>) => void;
|
|
27
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as defaults } from './default';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Event } from '../../types';
|
|
3
|
+
export interface WebViewProps extends React.AriaAttributes {
|
|
4
|
+
id?: string;
|
|
5
|
+
src: string;
|
|
6
|
+
onMessage?: (event: Event) => void;
|
|
7
|
+
}
|
|
8
|
+
declare const WebView: React.ComponentType<WebViewProps>;
|
|
9
|
+
export default WebView;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export interface WebViewProps extends React.AriaAttributes {
|
|
3
|
+
id?: string;
|
|
4
|
+
src: string;
|
|
5
|
+
onMessage?: (event: Event) => void;
|
|
6
|
+
className?: string;
|
|
7
|
+
style?: React.CSSProperties;
|
|
8
|
+
}
|
|
9
|
+
declare const _default: React.ForwardRefExoticComponent<WebViewProps & React.RefAttributes<any>>;
|
|
10
|
+
export default _default;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
2
|
+
var t = {};
|
|
3
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
4
|
+
t[p] = s[p];
|
|
5
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
6
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
7
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
8
|
+
t[p[i]] = s[p[i]];
|
|
9
|
+
}
|
|
10
|
+
return t;
|
|
11
|
+
};
|
|
12
|
+
import * as React from 'react';
|
|
13
|
+
import { filterProps } from '../../utils/isPlatformSpecifyProp';
|
|
14
|
+
import clsx from 'clsx';
|
|
15
|
+
const WebView = (props, ref) => {
|
|
16
|
+
const _a = filterProps(props), { onMessage } = _a, restProps = __rest(_a, ["onMessage"]);
|
|
17
|
+
React.useEffect(() => {
|
|
18
|
+
const listener = (event) => {
|
|
19
|
+
if (typeof onMessage === 'function') {
|
|
20
|
+
onMessage(event);
|
|
21
|
+
}
|
|
22
|
+
};
|
|
23
|
+
window.addEventListener('message', listener, false);
|
|
24
|
+
return () => window.removeEventListener('message', listener);
|
|
25
|
+
}, []);
|
|
26
|
+
return React.createElement("iframe", Object.assign({}, restProps, { className: clsx('remax-web-view', props.className), ref: ref }));
|
|
27
|
+
};
|
|
28
|
+
export default React.forwardRef(WebView);
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export { default as Button } from './Button';
|
|
2
|
+
export * from './Button';
|
|
3
|
+
export { default as Form } from './Form';
|
|
4
|
+
export * from './Form';
|
|
5
|
+
export { default as Image } from './Image';
|
|
6
|
+
export * from './Image';
|
|
7
|
+
export { default as Input } from './Input';
|
|
8
|
+
export * from './Input';
|
|
9
|
+
export { default as Label } from './Label';
|
|
10
|
+
export * from './Label';
|
|
11
|
+
export { default as Navigator } from './Navigator';
|
|
12
|
+
export * from './Navigator';
|
|
13
|
+
export { default as Text } from './Text';
|
|
14
|
+
export * from './Text';
|
|
15
|
+
export { default as Textarea } from './Textarea';
|
|
16
|
+
export * from './Textarea';
|
|
17
|
+
export { default as View } from './View';
|
|
18
|
+
export * from './View';
|
|
19
|
+
export { default as WebView } from './WebView';
|
|
20
|
+
export * from './WebView';
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export { default as Button } from './Button';
|
|
2
|
+
export * from './Button';
|
|
3
|
+
export { default as Form } from './Form';
|
|
4
|
+
export * from './Form';
|
|
5
|
+
export { default as Image } from './Image';
|
|
6
|
+
export * from './Image';
|
|
7
|
+
export { default as Input } from './Input';
|
|
8
|
+
export * from './Input';
|
|
9
|
+
export { default as Label } from './Label';
|
|
10
|
+
export * from './Label';
|
|
11
|
+
export { default as Navigator } from './Navigator';
|
|
12
|
+
export * from './Navigator';
|
|
13
|
+
export { default as Text } from './Text';
|
|
14
|
+
export * from './Text';
|
|
15
|
+
export { default as Textarea } from './Textarea';
|
|
16
|
+
export * from './Textarea';
|
|
17
|
+
export { default as View } from './View';
|
|
18
|
+
export * from './View';
|
|
19
|
+
export { default as WebView } from './WebView';
|
|
20
|
+
export * from './WebView';
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
interface UseWebTouchParams {
|
|
3
|
+
hoverDelay?: number;
|
|
4
|
+
onLongTap?: (event: any) => void;
|
|
5
|
+
onTouchCancel?: (event: any) => void;
|
|
6
|
+
onTouchEnd?: (event: any) => void;
|
|
7
|
+
onTouchMove?: (event: any) => void;
|
|
8
|
+
onTouchStart?: (event: any) => void;
|
|
9
|
+
hoverDuration?: number;
|
|
10
|
+
}
|
|
11
|
+
declare function useWebTouch<T>({ hoverDuration, hoverDelay, onLongTap, onTouchCancel, onTouchEnd, onTouchMove, onTouchStart, }: UseWebTouchParams): [
|
|
12
|
+
boolean,
|
|
13
|
+
(event: React.TouchEvent<T>) => void,
|
|
14
|
+
(event: React.TouchEvent<T>) => void,
|
|
15
|
+
(event: React.TouchEvent<T>) => void,
|
|
16
|
+
(event: React.TouchEvent<T>) => void
|
|
17
|
+
];
|
|
18
|
+
export default useWebTouch;
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { LONG_TAP_DURATION } from '../constants';
|
|
3
|
+
function useWebTouch({ hoverDuration, hoverDelay, onLongTap, onTouchCancel, onTouchEnd, onTouchMove, onTouchStart, }) {
|
|
4
|
+
const [touching, setTouching] = React.useState(false);
|
|
5
|
+
const hoveringRef = React.useRef(false);
|
|
6
|
+
const timers = React.useRef([]);
|
|
7
|
+
function executeTimeout(callback, time) {
|
|
8
|
+
const timer = setTimeout(() => {
|
|
9
|
+
callback();
|
|
10
|
+
// @ts-ignore
|
|
11
|
+
timers.current.filter(t => t !== timer);
|
|
12
|
+
}, time);
|
|
13
|
+
// @ts-ignore
|
|
14
|
+
timers.current.push(timer);
|
|
15
|
+
}
|
|
16
|
+
React.useEffect(() => () => {
|
|
17
|
+
timers.current.forEach(t => clearTimeout(t));
|
|
18
|
+
}, []);
|
|
19
|
+
function handleTouchStart(e) {
|
|
20
|
+
hoveringRef.current = true;
|
|
21
|
+
executeTimeout(() => {
|
|
22
|
+
if (hoveringRef.current) {
|
|
23
|
+
setTouching(true);
|
|
24
|
+
}
|
|
25
|
+
}, hoverDelay);
|
|
26
|
+
executeTimeout(() => {
|
|
27
|
+
if (hoveringRef.current && typeof onLongTap === 'function') {
|
|
28
|
+
onLongTap(e);
|
|
29
|
+
}
|
|
30
|
+
}, LONG_TAP_DURATION);
|
|
31
|
+
if (typeof onTouchStart === 'function') {
|
|
32
|
+
return onTouchStart(e);
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
function handleTouchMove(e) {
|
|
36
|
+
hoveringRef.current = false;
|
|
37
|
+
executeTimeout(() => {
|
|
38
|
+
if (touching) {
|
|
39
|
+
setTouching(false);
|
|
40
|
+
}
|
|
41
|
+
}, hoverDuration);
|
|
42
|
+
if (typeof onTouchMove === 'function') {
|
|
43
|
+
return onTouchMove(e);
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
function handleTouchEnd(e) {
|
|
47
|
+
hoveringRef.current = false;
|
|
48
|
+
executeTimeout(() => {
|
|
49
|
+
if (touching) {
|
|
50
|
+
setTouching(false);
|
|
51
|
+
}
|
|
52
|
+
}, hoverDuration);
|
|
53
|
+
if (typeof onTouchEnd === 'function') {
|
|
54
|
+
return onTouchEnd(e);
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
function handleTouchCancel(e) {
|
|
58
|
+
hoveringRef.current = false;
|
|
59
|
+
executeTimeout(() => {
|
|
60
|
+
if (touching) {
|
|
61
|
+
setTouching(false);
|
|
62
|
+
}
|
|
63
|
+
}, hoverDuration);
|
|
64
|
+
if (typeof onTouchCancel === 'function') {
|
|
65
|
+
return onTouchCancel(e);
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
return [touching, handleTouchStart, handleTouchMove, handleTouchEnd, handleTouchCancel];
|
|
69
|
+
}
|
|
70
|
+
export default useWebTouch;
|
package/esm/index.d.ts
ADDED
package/esm/index.js
ADDED
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
export interface EventTarget {
|
|
2
|
+
/** 元素 ID */
|
|
3
|
+
id: string;
|
|
4
|
+
/** 左偏移量 */
|
|
5
|
+
offsetLeft: number;
|
|
6
|
+
/** 顶部偏移量 */
|
|
7
|
+
offsetTop: number;
|
|
8
|
+
/** data 对象 */
|
|
9
|
+
dataset: {
|
|
10
|
+
[key: string]: any;
|
|
11
|
+
};
|
|
12
|
+
value: any;
|
|
13
|
+
}
|
|
14
|
+
export interface EventCurrentTarget {
|
|
15
|
+
/** 元素 ID */
|
|
16
|
+
id?: string;
|
|
17
|
+
/** 左偏移量 */
|
|
18
|
+
offsetLeft: number;
|
|
19
|
+
/** 顶部偏移量 */
|
|
20
|
+
offsetTop: number;
|
|
21
|
+
/** data 对象 */
|
|
22
|
+
dataset: {
|
|
23
|
+
[key: string]: any;
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
export interface Touch {
|
|
27
|
+
/** 触点相对于可见视区左边沿的的X坐标. 不包括任何滚动偏移 */
|
|
28
|
+
clientX: number;
|
|
29
|
+
/** 触点相对于可见视区上边沿的的Y坐标. 不包括任何滚动偏移 */
|
|
30
|
+
clientY: number;
|
|
31
|
+
/** 触点相对于页面左边沿的的X坐标. 当存在水平滚动的偏移时, 这个值包含了水平滚动的偏移 */
|
|
32
|
+
pageX: number;
|
|
33
|
+
/** 触点相对于页面上边沿的的Y坐标. 当存在垂直滚动的偏移时, 这个值包含了垂直滚动的偏移 */
|
|
34
|
+
pageY: number;
|
|
35
|
+
/** 一次触摸动作(我们指的是手指的触摸)在平面上移动的整个过程中, 该标识符不变. 可以根据它来判断跟踪的是否是同一次触摸过程 */
|
|
36
|
+
identifier: number;
|
|
37
|
+
}
|
|
38
|
+
export interface Event {
|
|
39
|
+
target: EventTarget;
|
|
40
|
+
currentTarget: EventCurrentTarget;
|
|
41
|
+
type: string;
|
|
42
|
+
originalEvent: any;
|
|
43
|
+
nativeEvent: any;
|
|
44
|
+
}
|
|
45
|
+
export interface TouchEvent extends Event {
|
|
46
|
+
/** 阻止事件冒泡 */
|
|
47
|
+
stopPropagation: () => void;
|
|
48
|
+
/** 包含了所有当前接触触摸平面的触点的 Touch 对象,无论它们的起始于哪个 element 上,也无论它们状态是否发生了变化 */
|
|
49
|
+
touches: Touch[];
|
|
50
|
+
/** 包含了代表所有从上一次触摸事件到此次事件过程中,状态发生了改变的触点的 Touch 对象。 */
|
|
51
|
+
changedTouches: Touch[];
|
|
52
|
+
}
|
|
53
|
+
export type TouchStartEvent = TouchEvent;
|
|
54
|
+
export type TouchMoveEvent = TouchEvent;
|
|
55
|
+
export type TouchEndEvent = TouchEvent;
|
|
56
|
+
export type TouchCancelEvent = TouchEvent;
|
|
57
|
+
export type ImageLoadEvent = Event;
|
|
58
|
+
export type ImageErrorEvent = Event;
|
|
59
|
+
export interface TapEvent extends Event {
|
|
60
|
+
/** 阻止事件冒泡 */
|
|
61
|
+
stopPropagation: () => void;
|
|
62
|
+
}
|
|
63
|
+
export type InputEvent = Event;
|
|
64
|
+
export type FormEvent = Event;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './event';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './event';
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import plainStyle from './plainStyle';
|
|
3
|
+
let clsxId = 0;
|
|
4
|
+
const generateClassName = () => `remax-placeholder-style-${clsxId++}`;
|
|
5
|
+
export default function useWebPlaceholderStyle(css) {
|
|
6
|
+
const className = React.useRef(generateClassName());
|
|
7
|
+
React.useEffect(() => {
|
|
8
|
+
const styleContent = `.${className.current}::placeholder {
|
|
9
|
+
${plainStyle(css)}
|
|
10
|
+
}`;
|
|
11
|
+
const style = window.document.createElement('style');
|
|
12
|
+
style.type = 'text/css';
|
|
13
|
+
style.appendChild(document.createTextNode(styleContent));
|
|
14
|
+
const head = window.document.head || window.document.getElementsByTagName('head')[0];
|
|
15
|
+
head.appendChild(style);
|
|
16
|
+
return () => {
|
|
17
|
+
head.removeChild(style);
|
|
18
|
+
};
|
|
19
|
+
}, [css]);
|
|
20
|
+
return [className.current];
|
|
21
|
+
}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
// https://github.com/facebook/react/blob/master/packages/react-dom/src/shared/CSSProperty.js
|
|
2
|
+
/**
|
|
3
|
+
* CSS properties which accept numbers but are not in units of "px".
|
|
4
|
+
*/
|
|
5
|
+
export const isUnitlessNumber = {
|
|
6
|
+
animationIterationCount: true,
|
|
7
|
+
borderImageOutset: true,
|
|
8
|
+
borderImageSlice: true,
|
|
9
|
+
borderImageWidth: true,
|
|
10
|
+
boxFlex: true,
|
|
11
|
+
boxFlexGroup: true,
|
|
12
|
+
boxOrdinalGroup: true,
|
|
13
|
+
columnCount: true,
|
|
14
|
+
columns: true,
|
|
15
|
+
flex: true,
|
|
16
|
+
flexGrow: true,
|
|
17
|
+
flexPositive: true,
|
|
18
|
+
flexShrink: true,
|
|
19
|
+
flexNegative: true,
|
|
20
|
+
flexOrder: true,
|
|
21
|
+
gridArea: true,
|
|
22
|
+
gridRow: true,
|
|
23
|
+
gridRowEnd: true,
|
|
24
|
+
gridRowSpan: true,
|
|
25
|
+
gridRowStart: true,
|
|
26
|
+
gridColumn: true,
|
|
27
|
+
gridColumnEnd: true,
|
|
28
|
+
gridColumnSpan: true,
|
|
29
|
+
gridColumnStart: true,
|
|
30
|
+
fontWeight: true,
|
|
31
|
+
lineClamp: true,
|
|
32
|
+
lineHeight: true,
|
|
33
|
+
opacity: true,
|
|
34
|
+
order: true,
|
|
35
|
+
orphans: true,
|
|
36
|
+
tabSize: true,
|
|
37
|
+
widows: true,
|
|
38
|
+
zIndex: true,
|
|
39
|
+
zoom: true,
|
|
40
|
+
// SVG-related properties
|
|
41
|
+
fillOpacity: true,
|
|
42
|
+
floodOpacity: true,
|
|
43
|
+
stopOpacity: true,
|
|
44
|
+
strokeDasharray: true,
|
|
45
|
+
strokeDashoffset: true,
|
|
46
|
+
strokeMiterlimit: true,
|
|
47
|
+
strokeOpacity: true,
|
|
48
|
+
strokeWidth: true,
|
|
49
|
+
};
|
|
50
|
+
/**
|
|
51
|
+
* @param {string} prefix vendor-specific prefix, eg: Webkit
|
|
52
|
+
* @param {string} key style name, eg: transitionDuration
|
|
53
|
+
* @return {string} style name prefixed with `prefix`, properly camelCased, eg:
|
|
54
|
+
* WebkitTransitionDuration
|
|
55
|
+
*/
|
|
56
|
+
function prefixKey(prefix, key) {
|
|
57
|
+
return prefix + key.charAt(0).toUpperCase() + key.substring(1);
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Support style names that may come passed in prefixed by adding permutations
|
|
61
|
+
* of vendor prefixes.
|
|
62
|
+
*/
|
|
63
|
+
const prefixes = ['Webkit', 'ms', 'Moz', 'O'];
|
|
64
|
+
for (const prop in isUnitlessNumber) {
|
|
65
|
+
prefixes.forEach(function (prefix) {
|
|
66
|
+
isUnitlessNumber[prefixKey(prefix, prop)] = isUnitlessNumber[prop];
|
|
67
|
+
});
|
|
68
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { isUnitlessNumber } from './CSSProperty';
|
|
2
|
+
import { RuntimeOptions } from '@rsmax/framework-shared';
|
|
3
|
+
const vendorPrefixes = ['webkit', 'moz', 'ms', 'o'];
|
|
4
|
+
const transformReactStyleKey = (key) => {
|
|
5
|
+
// css3 var
|
|
6
|
+
if (key === null || key === void 0 ? void 0 : key.startsWith('--')) {
|
|
7
|
+
return key;
|
|
8
|
+
}
|
|
9
|
+
let styleValue = key.replace(/\.?([A-Z]+)/g, function (_x, y) {
|
|
10
|
+
return '-' + y.toLowerCase();
|
|
11
|
+
});
|
|
12
|
+
// vendor prefix
|
|
13
|
+
if (styleValue === null || styleValue === void 0 ? void 0 : styleValue.startsWith('-')) {
|
|
14
|
+
const firstWord = styleValue.split('-').filter(s => s)[0];
|
|
15
|
+
styleValue = styleValue.replace(/^-/, '');
|
|
16
|
+
if (vendorPrefixes.find(prefix => prefix === firstWord)) {
|
|
17
|
+
styleValue = '-' + styleValue;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
return styleValue;
|
|
21
|
+
};
|
|
22
|
+
const transformPx = (value) => {
|
|
23
|
+
if (typeof value !== 'string') {
|
|
24
|
+
return value;
|
|
25
|
+
}
|
|
26
|
+
return value.replace(/\b(\d+(\.\d+)?)px\b/g, function (match, x) {
|
|
27
|
+
const targetUnit = 'rem';
|
|
28
|
+
const size = Number(x / 100);
|
|
29
|
+
return size % 1 === 0 ? size + targetUnit : size.toFixed(2) + targetUnit;
|
|
30
|
+
});
|
|
31
|
+
};
|
|
32
|
+
const plainStyle = (style) => {
|
|
33
|
+
if (!style) {
|
|
34
|
+
return '';
|
|
35
|
+
}
|
|
36
|
+
return Object.keys(style)
|
|
37
|
+
.reduce((acc, key) => {
|
|
38
|
+
let value = style[key];
|
|
39
|
+
if (!Number.isNaN(Number(value)) && !isUnitlessNumber[key]) {
|
|
40
|
+
value = value + 'rpx';
|
|
41
|
+
}
|
|
42
|
+
return [...acc, `${transformReactStyleKey(key)}:${RuntimeOptions.get('pxToRpx') ? transformPx(value) : value};`];
|
|
43
|
+
}, [])
|
|
44
|
+
.join('\n');
|
|
45
|
+
};
|
|
46
|
+
export default plainStyle;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
const isPlatformSpecifyProp = (prop) => prop.match(/^(ali|wechat|toutiao)-/);
|
|
2
|
+
const normalizeWebSpecifyProp = (prop) => prop.replace(/^web-/, '');
|
|
3
|
+
export function filterProps(props) {
|
|
4
|
+
// @ts-ignore
|
|
5
|
+
return Object.keys(props).reduce((acc, cur) => {
|
|
6
|
+
let prop = cur;
|
|
7
|
+
// web 平台没有 cli 帮助处理属性名称,直接去掉平台前缀
|
|
8
|
+
if (process.env.RSMAX_PLATFORM === 'web') {
|
|
9
|
+
prop = normalizeWebSpecifyProp(cur);
|
|
10
|
+
}
|
|
11
|
+
if (isPlatformSpecifyProp(prop)) {
|
|
12
|
+
return acc;
|
|
13
|
+
}
|
|
14
|
+
acc[prop] = props[cur];
|
|
15
|
+
return acc;
|
|
16
|
+
}, {});
|
|
17
|
+
}
|
|
18
|
+
export default isPlatformSpecifyProp;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
const cache = {};
|
|
2
|
+
export function getLiteralText(text) {
|
|
3
|
+
if (cache[text]) {
|
|
4
|
+
return cache[text];
|
|
5
|
+
}
|
|
6
|
+
const el = document.createElement('div');
|
|
7
|
+
el.innerHTML = text;
|
|
8
|
+
cache[text] = el.textContent;
|
|
9
|
+
return cache[text];
|
|
10
|
+
}
|
|
11
|
+
const keys = [' ', '<', '>', '&', ''', ' ', ' '];
|
|
12
|
+
const replaceEncodeReg = new RegExp(keys.join('|'), 'g');
|
|
13
|
+
export function decode(str) {
|
|
14
|
+
return str.replace(replaceEncodeReg, m => getLiteralText(m));
|
|
15
|
+
}
|
package/node.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
module.exports = require('./cjs/node').default;
|
package/package.json
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@rsmax/one",
|
|
3
|
+
"version": "1.0.1",
|
|
4
|
+
"description": "Rsmax 小程序多端方案",
|
|
5
|
+
"main": "./cjs/index.js",
|
|
6
|
+
"esnext": "./esm/index.js",
|
|
7
|
+
"module": "./esm/index.js",
|
|
8
|
+
"typings": "./esm/index.d.ts",
|
|
9
|
+
"scripts": {
|
|
10
|
+
"clean": "rimraf cjs esm tsconfig.tsbuildinfo",
|
|
11
|
+
"prebuild": "npm run clean",
|
|
12
|
+
"build": "tsc",
|
|
13
|
+
"build:cjs": "tsc --module CommonJS --outDir cjs",
|
|
14
|
+
"postbuild": "node ./scripts/postbuild.js",
|
|
15
|
+
"test": "vitest run"
|
|
16
|
+
},
|
|
17
|
+
"repository": "git+https://github.com/remaxjs/remax.git",
|
|
18
|
+
"license": "MIT",
|
|
19
|
+
"devDependencies": {
|
|
20
|
+
"@rsmax/types": "workspace:*",
|
|
21
|
+
"@types/react": "^18.3.0",
|
|
22
|
+
"@types/react-dom": "^18.3.0",
|
|
23
|
+
"@types/react-test-renderer": "^18.3.0",
|
|
24
|
+
"react": "^18.3.0",
|
|
25
|
+
"react-dom": "^18.3.0",
|
|
26
|
+
"react-test-renderer": "^18.3.0"
|
|
27
|
+
},
|
|
28
|
+
"dependencies": {
|
|
29
|
+
"@remax/redbox-react": "^1.0.0",
|
|
30
|
+
"@rsmax/ali": "workspace:*",
|
|
31
|
+
"@rsmax/framework-shared": "workspace:*",
|
|
32
|
+
"@rsmax/runtime": "workspace:*",
|
|
33
|
+
"@rsmax/toutiao": "workspace:*",
|
|
34
|
+
"@rsmax/web": "workspace:*",
|
|
35
|
+
"@rsmax/wechat": "workspace:*",
|
|
36
|
+
"@rsmax/xhs": "workspace:*",
|
|
37
|
+
"clsx": "^2.1.1",
|
|
38
|
+
"memoize-one": "^5.1.1",
|
|
39
|
+
"react-autosize-textarea": "^7.0.0"
|
|
40
|
+
},
|
|
41
|
+
"publishConfig": {
|
|
42
|
+
"access": "public"
|
|
43
|
+
},
|
|
44
|
+
"gitHead": "d2ff644810449152d124a9da76218bcd9fdfff46"
|
|
45
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
const path = require('path');
|
|
2
|
+
const fs = require('fs');
|
|
3
|
+
|
|
4
|
+
function copyAssetsInDir(outputRoot, fsPath) {
|
|
5
|
+
fs.readdirSync(fsPath).forEach(fileName => {
|
|
6
|
+
const filePath = path.join(fsPath, fileName);
|
|
7
|
+
|
|
8
|
+
if (fs.statSync(filePath).isDirectory()) {
|
|
9
|
+
copyAssetsInDir(path.join(outputRoot, fileName), filePath);
|
|
10
|
+
} else if (fileName.endsWith('.css')) {
|
|
11
|
+
fs.createReadStream(filePath).pipe(fs.createWriteStream(path.join(outputRoot, fileName)));
|
|
12
|
+
}
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
copyAssetsInDir(path.resolve(__dirname, '../esm/'), path.resolve(__dirname, '../src'));
|
|
17
|
+
copyAssetsInDir(path.resolve(__dirname, '../cjs/'), path.resolve(__dirname, '../src'));
|
|
File without changes
|