@mpxjs/webpack-plugin 2.10.16 → 2.10.17
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/lib/dependencies/AppEntryDependency.js +2 -2
- package/lib/dependencies/RecordModuleIdMapDependency.js +49 -0
- package/lib/dependencies/ResolveDependency.js +1 -1
- package/lib/helpers.js +2 -0
- package/lib/index.js +40 -15
- package/lib/json-compiler/helper.js +72 -2
- package/lib/json-compiler/index.js +14 -54
- package/lib/json-compiler/plugin.js +2 -2
- package/lib/loader.js +10 -4
- package/lib/native-loader.js +6 -3
- package/lib/platform/json/wx/index.js +24 -29
- package/lib/platform/style/wx/index.js +8 -1
- package/lib/platform/template/wx/component-config/button.js +12 -3
- package/lib/platform/template/wx/component-config/component.js +31 -33
- package/lib/platform/template/wx/component-config/fix-component-name.js +2 -2
- package/lib/react/index.js +2 -0
- package/lib/react/processJSON.js +39 -71
- package/lib/react/processStyles.js +3 -2
- package/lib/react/processTemplate.js +8 -6
- package/lib/react/script-helper.js +6 -16
- package/lib/react/style-helper.js +10 -2
- package/lib/runtime/components/react/context.ts +12 -6
- package/lib/runtime/components/react/dist/context.d.ts +75 -0
- package/lib/runtime/components/react/dist/context.d.ts.map +1 -0
- package/lib/runtime/components/react/dist/context.js +1 -0
- package/lib/runtime/components/react/dist/event.config.d.ts +8 -0
- package/lib/runtime/components/react/dist/event.config.d.ts.map +1 -0
- package/lib/runtime/components/react/dist/getInnerListeners.d.ts +8 -0
- package/lib/runtime/components/react/dist/getInnerListeners.d.ts.map +1 -0
- package/lib/runtime/components/react/dist/mpx-async-suspense.d.ts +13 -0
- package/lib/runtime/components/react/dist/mpx-async-suspense.d.ts.map +1 -0
- package/lib/runtime/components/react/dist/mpx-button.d.ts +69 -0
- package/lib/runtime/components/react/dist/mpx-button.d.ts.map +1 -0
- package/lib/runtime/components/react/dist/mpx-canvas/Bus.d.ts +24 -0
- package/lib/runtime/components/react/dist/mpx-canvas/Bus.d.ts.map +1 -0
- package/lib/runtime/components/react/dist/mpx-canvas/CanvasGradient.d.ts +8 -0
- package/lib/runtime/components/react/dist/mpx-canvas/CanvasGradient.d.ts.map +1 -0
- package/lib/runtime/components/react/dist/mpx-canvas/CanvasRenderingContext2D.d.ts +7 -0
- package/lib/runtime/components/react/dist/mpx-canvas/CanvasRenderingContext2D.d.ts.map +1 -0
- package/lib/runtime/components/react/dist/mpx-canvas/Image.d.ts +21 -0
- package/lib/runtime/components/react/dist/mpx-canvas/Image.d.ts.map +1 -0
- package/lib/runtime/components/react/dist/mpx-canvas/ImageData.d.ts +9 -0
- package/lib/runtime/components/react/dist/mpx-canvas/ImageData.d.ts.map +1 -0
- package/lib/runtime/components/react/dist/mpx-canvas/constructorsRegistry.d.ts +11 -0
- package/lib/runtime/components/react/dist/mpx-canvas/constructorsRegistry.d.ts.map +1 -0
- package/lib/runtime/components/react/dist/mpx-canvas/html.d.ts +3 -0
- package/lib/runtime/components/react/dist/mpx-canvas/html.d.ts.map +1 -0
- package/lib/runtime/components/react/dist/mpx-canvas/index.d.ts +33 -0
- package/lib/runtime/components/react/dist/mpx-canvas/index.d.ts.map +1 -0
- package/lib/runtime/components/react/dist/mpx-canvas/index.jsx +1 -1
- package/lib/runtime/components/react/dist/mpx-canvas/utils.d.ts +53 -0
- package/lib/runtime/components/react/dist/mpx-canvas/utils.d.ts.map +1 -0
- package/lib/runtime/components/react/dist/mpx-checkbox-group.d.ts +21 -0
- package/lib/runtime/components/react/dist/mpx-checkbox-group.d.ts.map +1 -0
- package/lib/runtime/components/react/dist/mpx-checkbox.d.ts +33 -0
- package/lib/runtime/components/react/dist/mpx-checkbox.d.ts.map +1 -0
- package/lib/runtime/components/react/dist/mpx-form.d.ts +28 -0
- package/lib/runtime/components/react/dist/mpx-form.d.ts.map +1 -0
- package/lib/runtime/components/react/dist/mpx-icon/index.d.ts +19 -0
- package/lib/runtime/components/react/dist/mpx-icon/index.d.ts.map +1 -0
- package/lib/runtime/components/react/dist/mpx-image.d.ts +22 -0
- package/lib/runtime/components/react/dist/mpx-image.d.ts.map +1 -0
- package/lib/runtime/components/react/dist/mpx-image.jsx +107 -57
- package/lib/runtime/components/react/dist/mpx-inline-text.d.ts +8 -0
- package/lib/runtime/components/react/dist/mpx-inline-text.d.ts.map +1 -0
- package/lib/runtime/components/react/dist/mpx-input.d.ts +50 -0
- package/lib/runtime/components/react/dist/mpx-input.d.ts.map +1 -0
- package/lib/runtime/components/react/dist/mpx-input.jsx +32 -8
- package/lib/runtime/components/react/dist/mpx-keyboard-avoiding-view.d.ts +13 -0
- package/lib/runtime/components/react/dist/mpx-keyboard-avoiding-view.d.ts.map +1 -0
- package/lib/runtime/components/react/dist/mpx-keyboard-avoiding-view.jsx +58 -50
- package/lib/runtime/components/react/dist/mpx-label.d.ts +21 -0
- package/lib/runtime/components/react/dist/mpx-label.d.ts.map +1 -0
- package/lib/runtime/components/react/dist/mpx-movable-area.d.ts +21 -0
- package/lib/runtime/components/react/dist/mpx-movable-area.d.ts.map +1 -0
- package/lib/runtime/components/react/dist/mpx-movable-view.d.ts +66 -0
- package/lib/runtime/components/react/dist/mpx-movable-view.d.ts.map +1 -0
- package/lib/runtime/components/react/dist/mpx-nav.d.ts +9 -0
- package/lib/runtime/components/react/dist/mpx-nav.d.ts.map +1 -0
- package/lib/runtime/components/react/dist/mpx-nav.jsx +132 -0
- package/lib/runtime/components/react/dist/mpx-navigator.d.ts +10 -0
- package/lib/runtime/components/react/dist/mpx-navigator.d.ts.map +1 -0
- package/lib/runtime/components/react/dist/mpx-picker/date.d.ts +7 -0
- package/lib/runtime/components/react/dist/mpx-picker/date.d.ts.map +1 -0
- package/lib/runtime/components/react/dist/mpx-picker/dateData.d.ts +8 -0
- package/lib/runtime/components/react/dist/mpx-picker/dateData.d.ts.map +1 -0
- package/lib/runtime/components/react/dist/mpx-picker/index.d.ts +7 -0
- package/lib/runtime/components/react/dist/mpx-picker/index.d.ts.map +1 -0
- package/lib/runtime/components/react/dist/mpx-picker/multiSelector.d.ts +7 -0
- package/lib/runtime/components/react/dist/mpx-picker/multiSelector.d.ts.map +1 -0
- package/lib/runtime/components/react/dist/mpx-picker/region.d.ts +7 -0
- package/lib/runtime/components/react/dist/mpx-picker/region.d.ts.map +1 -0
- package/lib/runtime/components/react/dist/mpx-picker/regionData.d.ts +3 -0
- package/lib/runtime/components/react/dist/mpx-picker/regionData.d.ts.map +1 -0
- package/lib/runtime/components/react/dist/mpx-picker/selector.d.ts +7 -0
- package/lib/runtime/components/react/dist/mpx-picker/selector.d.ts.map +1 -0
- package/lib/runtime/components/react/dist/mpx-picker/time.d.ts +7 -0
- package/lib/runtime/components/react/dist/mpx-picker/time.d.ts.map +1 -0
- package/lib/runtime/components/react/dist/mpx-picker/type.d.ts +107 -0
- package/lib/runtime/components/react/dist/mpx-picker/type.d.ts.map +1 -0
- package/lib/runtime/components/react/dist/mpx-picker-view/index.d.ts +33 -0
- package/lib/runtime/components/react/dist/mpx-picker-view/index.d.ts.map +1 -0
- package/lib/runtime/components/react/dist/mpx-picker-view/index.jsx +4 -3
- package/lib/runtime/components/react/dist/mpx-picker-view/pickerVIewContext.d.ts +9 -0
- package/lib/runtime/components/react/dist/mpx-picker-view/pickerVIewContext.d.ts.map +1 -0
- package/lib/runtime/components/react/dist/mpx-picker-view-column/index.d.ts +24 -0
- package/lib/runtime/components/react/dist/mpx-picker-view-column/index.d.ts.map +1 -0
- package/lib/runtime/components/react/dist/mpx-picker-view-column/index.jsx +12 -18
- package/lib/runtime/components/react/dist/mpx-picker-view-column/pickerViewColumnItem.d.ts +15 -0
- package/lib/runtime/components/react/dist/mpx-picker-view-column/pickerViewColumnItem.d.ts.map +1 -0
- package/lib/runtime/components/react/dist/mpx-picker-view-column/pickerViewColumnItem.jsx +8 -11
- package/lib/runtime/components/react/dist/mpx-picker-view-column/pickerViewColumnItemLite.d.ts +14 -0
- package/lib/runtime/components/react/dist/mpx-picker-view-column/pickerViewColumnItemLite.d.ts.map +1 -0
- package/lib/runtime/components/react/dist/mpx-picker-view-column/pickerViewColumnItemLite.jsx +20 -0
- package/lib/runtime/components/react/dist/mpx-picker-view-column/pickerViewFaces.d.ts +17 -0
- package/lib/runtime/components/react/dist/mpx-picker-view-column/pickerViewFaces.d.ts.map +1 -0
- package/lib/runtime/components/react/dist/mpx-picker-view-column/pickerViewIndicator.d.ts +13 -0
- package/lib/runtime/components/react/dist/mpx-picker-view-column/pickerViewIndicator.d.ts.map +1 -0
- package/lib/runtime/components/react/dist/mpx-picker-view-column/pickerViewMask.d.ts +12 -0
- package/lib/runtime/components/react/dist/mpx-picker-view-column/pickerViewMask.d.ts.map +1 -0
- package/lib/runtime/components/react/dist/mpx-popup/index.d.ts +23 -0
- package/lib/runtime/components/react/dist/mpx-popup/index.d.ts.map +1 -0
- package/lib/runtime/components/react/dist/mpx-popup/popupBase.d.ts +17 -0
- package/lib/runtime/components/react/dist/mpx-popup/popupBase.d.ts.map +1 -0
- package/lib/runtime/components/react/dist/mpx-portal/index.d.ts +16 -0
- package/lib/runtime/components/react/dist/mpx-portal/index.d.ts.map +1 -0
- package/lib/runtime/components/react/dist/mpx-portal/index.jsx +5 -1
- package/lib/runtime/components/react/dist/mpx-portal/portal-host.d.ts +30 -0
- package/lib/runtime/components/react/dist/mpx-portal/portal-host.d.ts.map +1 -0
- package/lib/runtime/components/react/dist/mpx-portal/portal-manager.d.ts +10 -0
- package/lib/runtime/components/react/dist/mpx-portal/portal-manager.d.ts.map +1 -0
- package/lib/runtime/components/react/dist/mpx-progress.d.ts +24 -0
- package/lib/runtime/components/react/dist/mpx-progress.d.ts.map +1 -0
- package/lib/runtime/components/react/dist/mpx-radio-group.d.ts +21 -0
- package/lib/runtime/components/react/dist/mpx-radio-group.d.ts.map +1 -0
- package/lib/runtime/components/react/dist/mpx-radio.d.ts +27 -0
- package/lib/runtime/components/react/dist/mpx-radio.d.ts.map +1 -0
- package/lib/runtime/components/react/dist/mpx-rich-text/html.d.ts +2 -0
- package/lib/runtime/components/react/dist/mpx-rich-text/html.d.ts.map +1 -0
- package/lib/runtime/components/react/dist/mpx-rich-text/index.d.ts +25 -0
- package/lib/runtime/components/react/dist/mpx-rich-text/index.d.ts.map +1 -0
- package/lib/runtime/components/react/dist/mpx-rich-text/index.jsx +1 -1
- package/lib/runtime/components/react/dist/mpx-root-portal.d.ts +15 -0
- package/lib/runtime/components/react/dist/mpx-root-portal.d.ts.map +1 -0
- package/lib/runtime/components/react/dist/mpx-scroll-view.d.ts +55 -0
- package/lib/runtime/components/react/dist/mpx-scroll-view.d.ts.map +1 -0
- package/lib/runtime/components/react/dist/mpx-scroll-view.jsx +6 -14
- package/lib/runtime/components/react/dist/mpx-simple-text.d.ts +8 -0
- package/lib/runtime/components/react/dist/mpx-simple-text.d.ts.map +1 -0
- package/lib/runtime/components/react/dist/mpx-simple-view.d.ts +8 -0
- package/lib/runtime/components/react/dist/mpx-simple-view.d.ts.map +1 -0
- package/lib/runtime/components/react/dist/mpx-slider.d.ts +31 -0
- package/lib/runtime/components/react/dist/mpx-slider.d.ts.map +1 -0
- package/lib/runtime/components/react/dist/mpx-sticky-header.d.ts +18 -0
- package/lib/runtime/components/react/dist/mpx-sticky-header.d.ts.map +1 -0
- package/lib/runtime/components/react/dist/mpx-sticky-section.d.ts +16 -0
- package/lib/runtime/components/react/dist/mpx-sticky-section.d.ts.map +1 -0
- package/lib/runtime/components/react/dist/mpx-swiper-item.d.ts +19 -0
- package/lib/runtime/components/react/dist/mpx-swiper-item.d.ts.map +1 -0
- package/lib/runtime/components/react/dist/mpx-swiper.d.ts +53 -0
- package/lib/runtime/components/react/dist/mpx-swiper.d.ts.map +1 -0
- package/lib/runtime/components/react/dist/mpx-switch.d.ts +27 -0
- package/lib/runtime/components/react/dist/mpx-switch.d.ts.map +1 -0
- package/lib/runtime/components/react/dist/mpx-text.d.ts +23 -0
- package/lib/runtime/components/react/dist/mpx-text.d.ts.map +1 -0
- package/lib/runtime/components/react/dist/mpx-text.jsx +33 -5
- package/lib/runtime/components/react/dist/mpx-textarea.d.ts +8 -0
- package/lib/runtime/components/react/dist/mpx-textarea.d.ts.map +1 -0
- package/lib/runtime/components/react/dist/mpx-video.d.ts +102 -0
- package/lib/runtime/components/react/dist/mpx-video.d.ts.map +1 -0
- package/lib/runtime/components/react/dist/mpx-view.d.ts +35 -0
- package/lib/runtime/components/react/dist/mpx-view.d.ts.map +1 -0
- package/lib/runtime/components/react/dist/mpx-view.jsx +1 -1
- package/lib/runtime/components/react/dist/mpx-web-view.d.ts +23 -0
- package/lib/runtime/components/react/dist/mpx-web-view.d.ts.map +1 -0
- package/lib/runtime/components/react/dist/mpx-web-view.jsx +10 -2
- package/lib/runtime/components/react/dist/parser.d.ts +40 -0
- package/lib/runtime/components/react/dist/parser.d.ts.map +1 -0
- package/lib/runtime/components/react/dist/useAnimationHooks.d.ts +33 -0
- package/lib/runtime/components/react/dist/useAnimationHooks.d.ts.map +1 -0
- package/lib/runtime/components/react/dist/useNodesRef.d.ts +12 -0
- package/lib/runtime/components/react/dist/useNodesRef.d.ts.map +1 -0
- package/lib/runtime/components/react/dist/utils.d.ts +123 -0
- package/lib/runtime/components/react/dist/utils.d.ts.map +1 -0
- package/lib/runtime/components/react/dist/utils.jsx +16 -6
- package/lib/runtime/components/react/mpx-canvas/index.tsx +1 -1
- package/lib/runtime/components/react/mpx-image.tsx +130 -77
- package/lib/runtime/components/react/mpx-input.tsx +38 -15
- package/lib/runtime/components/react/mpx-keyboard-avoiding-view.tsx +66 -49
- package/lib/runtime/components/react/mpx-nav.tsx +155 -0
- package/lib/runtime/components/react/mpx-picker-view/index.tsx +5 -2
- package/lib/runtime/components/react/mpx-picker-view-column/index.tsx +26 -21
- package/lib/runtime/components/react/mpx-picker-view-column/pickerViewColumnItem.tsx +8 -12
- package/lib/runtime/components/react/mpx-picker-view-column/pickerViewColumnItemLite.tsx +55 -0
- package/lib/runtime/components/react/mpx-portal/index.tsx +8 -2
- package/lib/runtime/components/react/mpx-rich-text/index.tsx +1 -1
- package/lib/runtime/components/react/mpx-scroll-view.tsx +6 -17
- package/lib/runtime/components/react/mpx-text.tsx +38 -5
- package/lib/runtime/components/react/mpx-view.tsx +1 -1
- package/lib/runtime/components/react/mpx-web-view.tsx +13 -4
- package/lib/runtime/components/react/types/common.d.ts +19 -0
- package/lib/runtime/components/react/utils.tsx +15 -6
- package/lib/script-setup-compiler/index.js +2 -2
- package/lib/style-compiler/index.js +3 -2
- package/lib/style-compiler/load-postcss-config.js +1 -1
- package/lib/style-compiler/plugins/trans-special.js +10 -2
- package/lib/style-compiler/strip-conditional-loader.js +177 -15
- package/lib/template-compiler/compiler.js +268 -70
- package/lib/template-compiler/gen-node-react.js +18 -6
- package/lib/template-compiler/index.js +6 -4
- package/lib/template-compiler/parse-exps.js +1 -1
- package/lib/utils/const.js +2 -1
- package/lib/utils/dom-tag-config.js +5 -5
- package/lib/utils/env.js +6 -1
- package/lib/utils/get-build-tag-component.js +35 -0
- package/lib/utils/merge-visitors.js +55 -0
- package/lib/utils/pre-process-json.js +5 -0
- package/lib/web/index.js +2 -0
- package/lib/web/processJSON.js +44 -16
- package/lib/web/processScript.js +1 -1
- package/lib/web/processTemplate.js +6 -4
- package/lib/web/script-helper.js +19 -9
- package/lib/wxs/pre-loader.js +9 -6
- package/lib/wxss/loader.js +1 -9
- package/package.json +15 -5
- package/lib/utils/chain-assign.js +0 -47
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { View, NativeSyntheticEvent, ViewStyle } from 'react-native';
|
|
3
|
+
import { HandlerRef } from './useNodesRef';
|
|
4
|
+
interface StickyHeaderProps {
|
|
5
|
+
children?: ReactNode;
|
|
6
|
+
style?: ViewStyle;
|
|
7
|
+
padding?: [number, number, number, number];
|
|
8
|
+
'offset-top'?: number;
|
|
9
|
+
'enable-var'?: boolean;
|
|
10
|
+
'external-var-context'?: Record<string, any>;
|
|
11
|
+
'parent-font-size'?: number;
|
|
12
|
+
'parent-width'?: number;
|
|
13
|
+
'parent-height'?: number;
|
|
14
|
+
bindstickontopchange?: (e: NativeSyntheticEvent<unknown>) => void;
|
|
15
|
+
}
|
|
16
|
+
declare const _StickyHeader: import("react").ForwardRefExoticComponent<StickyHeaderProps & import("react").RefAttributes<HandlerRef<View, StickyHeaderProps>>>;
|
|
17
|
+
export default _StickyHeader;
|
|
18
|
+
//# sourceMappingURL=mpx-sticky-header.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mpx-sticky-header.d.ts","sourceRoot":"","sources":["../mpx-sticky-header.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAqE,SAAS,EAAS,MAAM,OAAO,CAAA;AAC3G,OAAO,EAAwB,IAAI,EAAE,oBAAoB,EAAE,SAAS,EAAuC,MAAM,cAAc,CAAA;AAE/H,OAAoB,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA;AAKvD,UAAU,iBAAiB;IACzB,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,OAAO,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;IAC3C,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,sBAAsB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAC7C,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,oBAAoB,CAAC,EAAE,CAAC,CAAC,EAAE,oBAAoB,CAAC,OAAO,CAAC,KAAK,IAAI,CAAC;CACnE;AAED,QAAA,MAAM,aAAa,mIAmJjB,CAAA;AAYF,eAAe,aAAa,CAAA"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { View, ViewStyle } from 'react-native';
|
|
3
|
+
import { HandlerRef } from './useNodesRef';
|
|
4
|
+
interface StickySectionProps {
|
|
5
|
+
children?: ReactNode;
|
|
6
|
+
style?: ViewStyle;
|
|
7
|
+
'offset-top'?: number;
|
|
8
|
+
'enable-var'?: boolean;
|
|
9
|
+
'external-var-context'?: Record<string, any>;
|
|
10
|
+
'parent-font-size'?: number;
|
|
11
|
+
'parent-width'?: number;
|
|
12
|
+
'parent-height'?: number;
|
|
13
|
+
}
|
|
14
|
+
declare const _StickySection: import("react").ForwardRefExoticComponent<StickySectionProps & import("react").RefAttributes<HandlerRef<View, StickySectionProps>>>;
|
|
15
|
+
export default _StickySection;
|
|
16
|
+
//# sourceMappingURL=mpx-sticky-section.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mpx-sticky-section.d.ts","sourceRoot":"","sources":["../mpx-sticky-section.tsx"],"names":[],"mappings":"AACA,OAAO,EAAqC,SAAS,EAAwB,MAAM,OAAO,CAAA;AAC1F,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;AAC9C,OAAoB,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA;AAKvD,UAAU,kBAAkB;IAC1B,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,sBAAsB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAC7C,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED,QAAA,MAAM,cAAc,qIAyElB,CAAA;AAGF,eAAe,cAAc,CAAA"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { View } from 'react-native';
|
|
2
|
+
import { ReactNode } from 'react';
|
|
3
|
+
import { HandlerRef } from './useNodesRef';
|
|
4
|
+
interface SwiperItemProps {
|
|
5
|
+
'item-id'?: string;
|
|
6
|
+
'enable-offset'?: boolean;
|
|
7
|
+
'enable-var': boolean;
|
|
8
|
+
'external-var-context'?: Record<string, any>;
|
|
9
|
+
'parent-font-size'?: number;
|
|
10
|
+
'parent-width'?: number;
|
|
11
|
+
'parent-height'?: number;
|
|
12
|
+
children?: ReactNode;
|
|
13
|
+
style?: Object;
|
|
14
|
+
customStyle: Object;
|
|
15
|
+
itemIndex: number;
|
|
16
|
+
}
|
|
17
|
+
declare const _SwiperItem: import("react").ForwardRefExoticComponent<SwiperItemProps & import("react").RefAttributes<HandlerRef<View, SwiperItemProps>>>;
|
|
18
|
+
export default _SwiperItem;
|
|
19
|
+
//# sourceMappingURL=mpx-swiper-item.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mpx-swiper-item.d.ts","sourceRoot":"","sources":["../mpx-swiper-item.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAA;AAEnC,OAAO,EAAE,SAAS,EAAiD,MAAM,OAAO,CAAA;AAEhF,OAAoB,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA;AAIvD,UAAU,eAAe;IACvB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,eAAe,CAAC,EAAE,OAAO,CAAA;IACzB,YAAY,EAAE,OAAO,CAAA;IACrB,sBAAsB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IAC5C,kBAAkB,CAAC,EAAE,MAAM,CAAA;IAC3B,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB,QAAQ,CAAC,EAAE,SAAS,CAAA;IACpB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,WAAW,EAAE,MAAM,CAAA;IACnB,SAAS,EAAE,MAAM,CAAA;CAClB;AASD,QAAA,MAAM,WAAW,+HA8Ef,CAAA;AAIF,eAAe,WAAW,CAAA"}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { View, NativeSyntheticEvent } from 'react-native';
|
|
2
|
+
import React, { ReactNode } from 'react';
|
|
3
|
+
import { HandlerRef } from './useNodesRef';
|
|
4
|
+
import { GestureHandler } from './utils';
|
|
5
|
+
/**
|
|
6
|
+
* ✔ indicator-dots
|
|
7
|
+
* ✔ indicator-color
|
|
8
|
+
* ✔ indicator-active-color
|
|
9
|
+
* ✔ autoplay
|
|
10
|
+
* ✔ current
|
|
11
|
+
* ✔ interval
|
|
12
|
+
* ✔ duration
|
|
13
|
+
* ✔ circular
|
|
14
|
+
* ✔ vertical
|
|
15
|
+
* ✔ previous-margin
|
|
16
|
+
* ✔ next-margin
|
|
17
|
+
* ✔ easing-function ="easeOutCubic"
|
|
18
|
+
* ✘ display-multiple-items
|
|
19
|
+
* ✘ snap-to-edge
|
|
20
|
+
*/
|
|
21
|
+
type EaseType = 'default' | 'linear' | 'easeInCubic' | 'easeOutCubic' | 'easeInOutCubic';
|
|
22
|
+
interface SwiperProps {
|
|
23
|
+
children?: ReactNode;
|
|
24
|
+
circular?: boolean;
|
|
25
|
+
current?: number;
|
|
26
|
+
interval?: number;
|
|
27
|
+
autoplay?: boolean;
|
|
28
|
+
duration?: number;
|
|
29
|
+
scale?: boolean;
|
|
30
|
+
'indicator-dots'?: boolean;
|
|
31
|
+
'indicator-color'?: string;
|
|
32
|
+
'indicator-active-color'?: string;
|
|
33
|
+
vertical?: boolean;
|
|
34
|
+
style: {
|
|
35
|
+
[key: string]: any;
|
|
36
|
+
};
|
|
37
|
+
'easing-function'?: EaseType;
|
|
38
|
+
'previous-margin'?: string;
|
|
39
|
+
'next-margin'?: string;
|
|
40
|
+
'enable-offset'?: boolean;
|
|
41
|
+
'enable-var': boolean;
|
|
42
|
+
'parent-font-size'?: number;
|
|
43
|
+
'parent-width'?: number;
|
|
44
|
+
'parent-height'?: number;
|
|
45
|
+
'external-var-context'?: Record<string, any>;
|
|
46
|
+
'wait-for'?: Array<GestureHandler>;
|
|
47
|
+
'simultaneous-handlers'?: Array<GestureHandler>;
|
|
48
|
+
disableGesture?: boolean;
|
|
49
|
+
bindchange?: (event: NativeSyntheticEvent<TouchEvent> | unknown) => void;
|
|
50
|
+
}
|
|
51
|
+
declare const SwiperWrapper: React.ForwardRefExoticComponent<SwiperProps & React.RefAttributes<HandlerRef<View, SwiperProps>>>;
|
|
52
|
+
export default SwiperWrapper;
|
|
53
|
+
//# sourceMappingURL=mpx-swiper.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mpx-swiper.d.ts","sourceRoot":"","sources":["../mpx-swiper.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,oBAAoB,EAAqB,MAAM,cAAc,CAAA;AAI5E,OAAO,KAAK,EAAE,EAAsC,SAAS,EAAwC,MAAM,OAAO,CAAA;AAElH,OAAoB,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA;AACvD,OAAO,EAAoF,cAAc,EAAmC,MAAM,SAAS,CAAA;AAG3J;;;;;;;;;;;;;;;GAeG;AACH,KAAK,QAAQ,GAAG,SAAS,GAAG,QAAQ,GAAG,aAAa,GAAG,cAAc,GAAG,gBAAgB,CAAA;AAUxF,UAAU,WAAW;IACnB,QAAQ,CAAC,EAAE,SAAS,CAAA;IACpB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAElB,QAAQ,CAAC,EAAE,MAAM,CAAA;IAEjB,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,gBAAgB,CAAC,EAAE,OAAO,CAAA;IAC1B,iBAAiB,CAAC,EAAE,MAAM,CAAA;IAC1B,wBAAwB,CAAC,EAAE,MAAM,CAAA;IACjC,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,KAAK,EAAE;QACL,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;KACnB,CAAA;IACD,iBAAiB,CAAC,EAAE,QAAQ,CAAA;IAC5B,iBAAiB,CAAC,EAAE,MAAM,CAAA;IAC1B,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,eAAe,CAAC,EAAE,OAAO,CAAA;IACzB,YAAY,EAAE,OAAO,CAAA;IACrB,kBAAkB,CAAC,EAAE,MAAM,CAAA;IAC3B,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB,sBAAsB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IAC5C,UAAU,CAAC,EAAE,KAAK,CAAC,cAAc,CAAC,CAAA;IAClC,uBAAuB,CAAC,EAAE,KAAK,CAAC,cAAc,CAAC,CAAA;IAC/C,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB,UAAU,CAAC,EAAE,CAAC,KAAK,EAAE,oBAAoB,CAAC,UAAU,CAAC,GAAG,OAAO,KAAK,IAAI,CAAA;CACzE;AAoED,QAAA,MAAM,aAAa,mGA6uBjB,CAAA;AAGF,eAAe,aAAa,CAAA"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
/**
|
|
3
|
+
* ✔ checked
|
|
4
|
+
* ✔ type
|
|
5
|
+
* ✔ disabled
|
|
6
|
+
* ✔ color
|
|
7
|
+
*/
|
|
8
|
+
import { Switch, SwitchProps, ViewStyle, NativeSyntheticEvent } from 'react-native';
|
|
9
|
+
import { HandlerRef } from './useNodesRef';
|
|
10
|
+
interface _SwitchProps extends SwitchProps {
|
|
11
|
+
style?: ViewStyle;
|
|
12
|
+
name?: string;
|
|
13
|
+
checked?: boolean;
|
|
14
|
+
type: 'switch' | 'checkbox';
|
|
15
|
+
disabled: boolean;
|
|
16
|
+
color: string;
|
|
17
|
+
'enable-var'?: boolean;
|
|
18
|
+
'parent-font-size'?: number;
|
|
19
|
+
'parent-width'?: number;
|
|
20
|
+
'parent-height'?: number;
|
|
21
|
+
'external-var-context'?: Record<string, any>;
|
|
22
|
+
bindchange?: (event: NativeSyntheticEvent<TouchEvent> | unknown) => void;
|
|
23
|
+
catchchange?: (event: NativeSyntheticEvent<TouchEvent> | unknown) => void;
|
|
24
|
+
}
|
|
25
|
+
declare const _Switch: import("react").ForwardRefExoticComponent<_SwitchProps & import("react").RefAttributes<HandlerRef<Switch, _SwitchProps>>>;
|
|
26
|
+
export default _Switch;
|
|
27
|
+
//# sourceMappingURL=mpx-switch.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mpx-switch.d.ts","sourceRoot":"","sources":["../mpx-switch.tsx"],"names":[],"mappings":";AAAA;;;;;GAKG;AACH,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,SAAS,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAA;AAGnF,OAAoB,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA;AAQvD,UAAU,YAAa,SAAQ,WAAW;IACxC,KAAK,CAAC,EAAE,SAAS,CAAA;IACjB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,IAAI,EAAE,QAAQ,GAAG,UAAU,CAAA;IAC3B,QAAQ,EAAE,OAAO,CAAA;IACjB,KAAK,EAAE,MAAM,CAAA;IACb,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB,kBAAkB,CAAC,EAAE,MAAM,CAAA;IAC3B,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB,sBAAsB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IAC5C,UAAU,CAAC,EAAE,CAAC,KAAK,EAAE,oBAAoB,CAAC,UAAU,CAAC,GAAG,OAAO,KAAK,IAAI,CAAA;IACxE,WAAW,CAAC,EAAE,CAAC,KAAK,EAAE,oBAAoB,CAAC,UAAU,CAAC,GAAG,OAAO,KAAK,IAAI,CAAA;CAC1E;AAED,QAAA,MAAM,OAAO,2HA0IX,CAAA;AAIF,eAAe,OAAO,CAAA"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ✔ selectable
|
|
3
|
+
* ✘ space
|
|
4
|
+
* ✔ decode
|
|
5
|
+
*/
|
|
6
|
+
import { Text, TextStyle, TextProps } from 'react-native';
|
|
7
|
+
import { ReactNode } from 'react';
|
|
8
|
+
import { HandlerRef } from './useNodesRef';
|
|
9
|
+
interface _TextProps extends TextProps {
|
|
10
|
+
style?: TextStyle;
|
|
11
|
+
children?: ReactNode;
|
|
12
|
+
selectable?: boolean;
|
|
13
|
+
'user-select'?: boolean;
|
|
14
|
+
'enable-var'?: boolean;
|
|
15
|
+
'external-var-context'?: Record<string, any>;
|
|
16
|
+
'parent-font-size'?: number;
|
|
17
|
+
'parent-width'?: number;
|
|
18
|
+
'parent-height'?: number;
|
|
19
|
+
decode?: boolean;
|
|
20
|
+
}
|
|
21
|
+
declare const _Text: import("react").ForwardRefExoticComponent<_TextProps & import("react").RefAttributes<HandlerRef<Text, _TextProps>>>;
|
|
22
|
+
export default _Text;
|
|
23
|
+
//# sourceMappingURL=mpx-text.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mpx-text.d.ts","sourceRoot":"","sources":["../mpx-text.tsx"],"names":[],"mappings":"AACA;;;;GAIG;AACH,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;AACzD,OAAO,EAAsB,SAAS,EAAgC,MAAM,OAAO,CAAA;AAGnF,OAAoB,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA;AA6BvD,UAAU,UAAW,SAAQ,SAAS;IACpC,KAAK,CAAC,EAAE,SAAS,CAAA;IACjB,QAAQ,CAAC,EAAE,SAAS,CAAA;IACpB,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,aAAa,CAAC,EAAE,OAAO,CAAA;IACvB,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB,sBAAsB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IAC5C,kBAAkB,CAAC,EAAE,MAAM,CAAA;IAC3B,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB,MAAM,CAAC,EAAE,OAAO,CAAA;CACjB;AAED,QAAA,MAAM,KAAK,qHAkET,CAAA;AAIF,eAAe,KAAK,CAAA"}
|
|
@@ -1,16 +1,40 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* ✔ selectable
|
|
3
3
|
* ✘ space
|
|
4
|
-
*
|
|
4
|
+
* ✔ decode
|
|
5
5
|
*/
|
|
6
6
|
import { Text } from 'react-native';
|
|
7
|
-
import { useRef, forwardRef, createElement } from 'react';
|
|
7
|
+
import { useRef, forwardRef, createElement, Children } from 'react';
|
|
8
8
|
import Portal from './mpx-portal';
|
|
9
9
|
import useInnerProps from './getInnerListeners';
|
|
10
10
|
import useNodesRef from './useNodesRef'; // 引入辅助函数
|
|
11
11
|
import { useTransformStyle, wrapChildren, extendObject } from './utils';
|
|
12
|
+
const decodeMap = {
|
|
13
|
+
'<': '<',
|
|
14
|
+
'>': '>',
|
|
15
|
+
'"': '"',
|
|
16
|
+
'&': '&',
|
|
17
|
+
''': '\'',
|
|
18
|
+
' ': ' '
|
|
19
|
+
};
|
|
20
|
+
const encodedRe = /&(?:lt|gt|quot|amp|#39|nbsp);/g;
|
|
21
|
+
function decode(value) {
|
|
22
|
+
if (value != null) {
|
|
23
|
+
return value.replace(encodedRe, function (match) {
|
|
24
|
+
return decodeMap[match];
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
function getDecodedChildren(children) {
|
|
29
|
+
return Children.map(children, (child) => {
|
|
30
|
+
if (typeof child === 'string') {
|
|
31
|
+
return decode(child);
|
|
32
|
+
}
|
|
33
|
+
return child;
|
|
34
|
+
});
|
|
35
|
+
}
|
|
12
36
|
const _Text = forwardRef((props, ref) => {
|
|
13
|
-
const { style = {}, allowFontScaling = false, selectable, 'enable-var': enableVar, 'external-var-context': externalVarContext, 'user-select': userSelect, 'parent-font-size': parentFontSize, 'parent-width': parentWidth, 'parent-height': parentHeight } = props;
|
|
37
|
+
const { style = {}, allowFontScaling = false, selectable, 'enable-var': enableVar, 'external-var-context': externalVarContext, 'user-select': userSelect, 'parent-font-size': parentFontSize, 'parent-width': parentWidth, 'parent-height': parentHeight, decode } = props;
|
|
14
38
|
const { normalStyle, hasVarDec, varContextRef, hasPositionFixed } = useTransformStyle(style, {
|
|
15
39
|
enableVar,
|
|
16
40
|
externalVarContext,
|
|
@@ -28,9 +52,13 @@ const _Text = forwardRef((props, ref) => {
|
|
|
28
52
|
selectable: !!selectable || !!userSelect,
|
|
29
53
|
allowFontScaling
|
|
30
54
|
}), [
|
|
31
|
-
'user-select'
|
|
55
|
+
'user-select',
|
|
56
|
+
'decode'
|
|
32
57
|
]);
|
|
33
|
-
|
|
58
|
+
const children = decode ? getDecodedChildren(props.children) : props.children;
|
|
59
|
+
let finalComponent = createElement(Text, innerProps, wrapChildren(extendObject({}, props, {
|
|
60
|
+
children
|
|
61
|
+
}), {
|
|
34
62
|
hasVarDec,
|
|
35
63
|
varContext: varContextRef.current
|
|
36
64
|
}));
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { TextInput } from 'react-native';
|
|
3
|
+
import { InputProps, PrivateInputProps } from './mpx-input';
|
|
4
|
+
import { HandlerRef } from './useNodesRef';
|
|
5
|
+
export type TextareProps = Omit<InputProps & PrivateInputProps, 'type' | 'password' | 'multiline' | 'confirm-hold'>;
|
|
6
|
+
declare const Textarea: import("react").ForwardRefExoticComponent<TextareProps & import("react").RefAttributes<HandlerRef<TextInput, TextareProps>>>;
|
|
7
|
+
export default Textarea;
|
|
8
|
+
//# sourceMappingURL=mpx-textarea.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mpx-textarea.d.ts","sourceRoot":"","sources":["../mpx-textarea.tsx"],"names":[],"mappings":";AAYA,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;AACxC,OAAc,EAAE,UAAU,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAA;AAElE,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA;AAE1C,MAAM,MAAM,YAAY,GAAG,IAAI,CAC7B,UAAU,GAAG,iBAAiB,EAC9B,MAAM,GAAG,UAAU,GAAG,WAAW,GAAG,cAAc,CACnD,CAAA;AAKD,QAAA,MAAM,QAAQ,8HA+Bb,CAAA;AAID,eAAe,QAAQ,CAAA"}
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ✔ src
|
|
3
|
+
* ✘ duration
|
|
4
|
+
* ✔ controls
|
|
5
|
+
* ✘ danmu-list
|
|
6
|
+
* ✘ danmu-btn
|
|
7
|
+
* ✘ enable-danmu
|
|
8
|
+
* ✔ autoplay
|
|
9
|
+
* ✔ loop
|
|
10
|
+
* ✔ muted
|
|
11
|
+
* ✔ initial-time
|
|
12
|
+
* ✘ page-gesture
|
|
13
|
+
* ✘ direction
|
|
14
|
+
* ✘ show-progress
|
|
15
|
+
* ✘ show-fullscreen-btn
|
|
16
|
+
* ✘ show-play-btn
|
|
17
|
+
* ✘ show-center-play-btn
|
|
18
|
+
* ✘ enable-progress-gesture
|
|
19
|
+
* ✔ object-fit
|
|
20
|
+
* ✔ poster
|
|
21
|
+
* ✘ show-mute-btn
|
|
22
|
+
* ✘ title
|
|
23
|
+
* ✘ play-btn-position
|
|
24
|
+
* ✘ enable-play-gesture
|
|
25
|
+
* ✘ auto-pause-if-navigate
|
|
26
|
+
* ✘ auto-pause-if-open-native
|
|
27
|
+
* ✘ vslide-gesture
|
|
28
|
+
* ✘ vslide-gesture-in-fullscreen
|
|
29
|
+
* ✘ show-bottom-progress(use show-progress)
|
|
30
|
+
* ✘ ad-unit-id
|
|
31
|
+
* ✘ poster-for-crawler
|
|
32
|
+
* ✘ show-casting-button
|
|
33
|
+
* ✘ picture-in-picture-mode
|
|
34
|
+
* ✘ picture-in-picture-show-progress
|
|
35
|
+
* ✘ picture-in-picture-init-position
|
|
36
|
+
* ✔ enable-auto-rotation (only ios)
|
|
37
|
+
* ✘ show-screen-lock-button
|
|
38
|
+
* ✘ show-snapshot-button
|
|
39
|
+
* ✘ show-background-playback-button
|
|
40
|
+
* ✘ background-poster
|
|
41
|
+
* ✘ referrer-policy
|
|
42
|
+
* ✔ is-drm
|
|
43
|
+
* ✘ is-live
|
|
44
|
+
* ✔ provision-url(android)
|
|
45
|
+
* ✔ certificate-url(ios)
|
|
46
|
+
* ✔ license-url
|
|
47
|
+
* ✔ preferred-peak-bit-rate
|
|
48
|
+
* ✔ bindplay
|
|
49
|
+
* ✔ bindpause
|
|
50
|
+
* ✔ bindended
|
|
51
|
+
* ✘ bindtimeupdate
|
|
52
|
+
* ✔ bindfullscreenchange
|
|
53
|
+
* ✔ bindwaiting
|
|
54
|
+
* ✔ binderror
|
|
55
|
+
* ✘ bindprogress
|
|
56
|
+
* ✔ bindloadedmetadata
|
|
57
|
+
* ✔ bindcontrolstoggle(only android)
|
|
58
|
+
* ✘ bindenterpictureinpicture
|
|
59
|
+
* ✘ bindleavepictureinpicture
|
|
60
|
+
* ✔ bindseekcomplete
|
|
61
|
+
* ✘ bindcastinguserselect
|
|
62
|
+
* ✘ bindcastingstatechange
|
|
63
|
+
* ✘ bindcastinginterrupt
|
|
64
|
+
*/
|
|
65
|
+
/// <reference types="react" />
|
|
66
|
+
import { View, ViewStyle } from 'react-native';
|
|
67
|
+
import { HandlerRef } from './useNodesRef';
|
|
68
|
+
interface VideoProps {
|
|
69
|
+
src: string;
|
|
70
|
+
autoplay?: boolean;
|
|
71
|
+
loop?: boolean;
|
|
72
|
+
muted?: boolean;
|
|
73
|
+
controls?: boolean;
|
|
74
|
+
poster?: string;
|
|
75
|
+
style?: ViewStyle;
|
|
76
|
+
'initial-time'?: number;
|
|
77
|
+
'object-fit'?: null | 'contain' | 'fill' | 'cover';
|
|
78
|
+
'is-drm'?: boolean;
|
|
79
|
+
'provision-url'?: string;
|
|
80
|
+
'certificate-url'?: string;
|
|
81
|
+
'license-url'?: string;
|
|
82
|
+
'preferred-peak-bit-rate'?: number;
|
|
83
|
+
'enable-auto-rotation'?: number;
|
|
84
|
+
'enable-var'?: boolean;
|
|
85
|
+
'external-var-context'?: Record<string, any>;
|
|
86
|
+
'parent-font-size'?: number;
|
|
87
|
+
'parent-width'?: number;
|
|
88
|
+
'parent-height'?: number;
|
|
89
|
+
bindplay?: (event: Record<string, any>) => void;
|
|
90
|
+
bindpause?: (event: Record<string, any>) => void;
|
|
91
|
+
bindended?: (event: Record<string, any>) => void;
|
|
92
|
+
bindtimeupdate?: (event: Record<string, any>) => void;
|
|
93
|
+
bindfullscreenchange?: (event: Record<string, any>) => void;
|
|
94
|
+
bindwaiting?: (event: Record<string, any>) => void;
|
|
95
|
+
binderror?: (event: Record<string, any>) => void;
|
|
96
|
+
bindloadedmetadata?: (event: Record<string, any>) => void;
|
|
97
|
+
bindcontrolstoggle?: (event: Record<string, any>) => void;
|
|
98
|
+
bindseekcomplete?: (event: Record<string, any>) => void;
|
|
99
|
+
}
|
|
100
|
+
declare const MpxVideo: import("react").ForwardRefExoticComponent<VideoProps & import("react").RefAttributes<HandlerRef<View, VideoProps>>>;
|
|
101
|
+
export default MpxVideo;
|
|
102
|
+
//# sourceMappingURL=mpx-video.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mpx-video.d.ts","sourceRoot":"","sources":["../mpx-video.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+DG;;AAIH,OAAO,EAAc,IAAI,EAAY,SAAS,EAAE,MAAM,cAAc,CAAA;AAQpE,OAAoB,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA;AAGvD,UAAU,UAAU;IAClB,GAAG,EAAE,MAAM,CAAA;IACX,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,IAAI,CAAC,EAAE,OAAO,CAAA;IACd,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,KAAK,CAAC,EAAE,SAAS,CAAA;IACjB,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,YAAY,CAAC,EAAE,IAAI,GAAG,SAAS,GAAG,MAAM,GAAG,OAAO,CAAA;IAClD,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB,iBAAiB,CAAC,EAAE,MAAM,CAAA;IAC1B,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,yBAAyB,CAAC,EAAE,MAAM,CAAA;IAClC,sBAAsB,CAAC,EAAE,MAAM,CAAA;IAC/B,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB,sBAAsB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IAC5C,kBAAkB,CAAC,EAAE,MAAM,CAAA;IAC3B,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,KAAK,IAAI,CAAA;IAC/C,SAAS,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,KAAK,IAAI,CAAA;IAChD,SAAS,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,KAAK,IAAI,CAAA;IAChD,cAAc,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,KAAK,IAAI,CAAA;IACrD,oBAAoB,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,KAAK,IAAI,CAAA;IAC3D,WAAW,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,KAAK,IAAI,CAAA;IAClD,SAAS,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,KAAK,IAAI,CAAA;IAChD,kBAAkB,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,KAAK,IAAI,CAAA;IACzD,kBAAkB,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,KAAK,IAAI,CAAA;IACzD,gBAAgB,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,KAAK,IAAI,CAAA;CACxD;AAmBD,QAAA,MAAM,QAAQ,qHAuQZ,CAAA;AAEF,eAAe,QAAQ,CAAA"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ✔ hover-class
|
|
3
|
+
* ✘ hover-stop-propagation
|
|
4
|
+
* ✔ hover-start-time
|
|
5
|
+
* ✔ hover-stay-time
|
|
6
|
+
*/
|
|
7
|
+
import { View, NativeSyntheticEvent, ViewProps } from 'react-native';
|
|
8
|
+
import { ReactNode } from 'react';
|
|
9
|
+
import type { AnimationProp } from './useAnimationHooks';
|
|
10
|
+
import { ExtendedViewStyle } from './types/common';
|
|
11
|
+
import { HandlerRef } from './useNodesRef';
|
|
12
|
+
export interface _ViewProps extends ViewProps {
|
|
13
|
+
style?: ExtendedViewStyle;
|
|
14
|
+
animation?: AnimationProp;
|
|
15
|
+
children?: ReactNode | ReactNode[];
|
|
16
|
+
'hover-style'?: ExtendedViewStyle;
|
|
17
|
+
'hover-start-time'?: number;
|
|
18
|
+
'hover-stay-time'?: number;
|
|
19
|
+
'enable-background'?: boolean;
|
|
20
|
+
'enable-var'?: boolean;
|
|
21
|
+
'enable-fast-image'?: boolean;
|
|
22
|
+
'external-var-context'?: Record<string, any>;
|
|
23
|
+
'parent-font-size'?: number;
|
|
24
|
+
'parent-width'?: number;
|
|
25
|
+
'parent-height'?: number;
|
|
26
|
+
'enable-animation'?: boolean;
|
|
27
|
+
bindtouchstart?: (event: NativeSyntheticEvent<TouchEvent> | unknown) => void;
|
|
28
|
+
bindtouchmove?: (event: NativeSyntheticEvent<TouchEvent> | unknown) => void;
|
|
29
|
+
bindtouchend?: (event: NativeSyntheticEvent<TouchEvent> | unknown) => void;
|
|
30
|
+
bindtransitionend?: (event: NativeSyntheticEvent<TouchEvent> | unknown) => void;
|
|
31
|
+
catchtransitionend?: (event: NativeSyntheticEvent<TouchEvent> | unknown) => void;
|
|
32
|
+
}
|
|
33
|
+
declare const _View: import("react").ForwardRefExoticComponent<_ViewProps & import("react").RefAttributes<HandlerRef<View, _ViewProps>>>;
|
|
34
|
+
export default _View;
|
|
35
|
+
//# sourceMappingURL=mpx-view.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mpx-view.d.ts","sourceRoot":"","sources":["../mpx-view.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAE,IAAI,EAAa,oBAAoB,EAAE,SAAS,EAAoD,MAAM,cAAc,CAAA;AACjI,OAAO,EAA2C,SAAS,EAAsB,MAAM,OAAO,CAAA;AAI9F,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAA;AACxD,OAAO,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAA;AAClD,OAAoB,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA;AAOvD,MAAM,WAAW,UAAW,SAAQ,SAAS;IAC3C,KAAK,CAAC,EAAE,iBAAiB,CAAA;IACzB,SAAS,CAAC,EAAE,aAAa,CAAA;IACzB,QAAQ,CAAC,EAAE,SAAS,GAAG,SAAS,EAAE,CAAA;IAClC,aAAa,CAAC,EAAE,iBAAiB,CAAA;IACjC,kBAAkB,CAAC,EAAE,MAAM,CAAA;IAC3B,iBAAiB,CAAC,EAAE,MAAM,CAAA;IAC1B,mBAAmB,CAAC,EAAE,OAAO,CAAA;IAC7B,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB,mBAAmB,CAAC,EAAE,OAAO,CAAA;IAC7B,sBAAsB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IAC5C,kBAAkB,CAAC,EAAE,MAAM,CAAA;IAC3B,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB,kBAAkB,CAAC,EAAE,OAAO,CAAA;IAC5B,cAAc,CAAC,EAAE,CAAC,KAAK,EAAE,oBAAoB,CAAC,UAAU,CAAC,GAAG,OAAO,KAAK,IAAI,CAAA;IAC5E,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,oBAAoB,CAAC,UAAU,CAAC,GAAG,OAAO,KAAK,IAAI,CAAA;IAC3E,YAAY,CAAC,EAAE,CAAC,KAAK,EAAE,oBAAoB,CAAC,UAAU,CAAC,GAAG,OAAO,KAAK,IAAI,CAAA;IAC1E,iBAAiB,CAAC,EAAE,CAAC,KAAK,EAAE,oBAAoB,CAAC,UAAU,CAAC,GAAG,OAAO,KAAK,IAAI,CAAA;IAC/E,kBAAkB,CAAC,EAAE,CAAC,KAAK,EAAE,oBAAoB,CAAC,UAAU,CAAC,GAAG,OAAO,KAAK,IAAI,CAAA;CACjF;AAsoBD,QAAA,MAAM,KAAK,qHAiIT,CAAA;AAIF,eAAe,KAAK,CAAA"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { WebView } from 'react-native-webview';
|
|
3
|
+
import { HandlerRef } from './useNodesRef';
|
|
4
|
+
type OnMessageCallbackEvent = {
|
|
5
|
+
detail: {
|
|
6
|
+
data: any[];
|
|
7
|
+
};
|
|
8
|
+
};
|
|
9
|
+
type CommonCallbackEvent = {
|
|
10
|
+
detail: {
|
|
11
|
+
src?: string;
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
interface WebViewProps {
|
|
15
|
+
src?: string;
|
|
16
|
+
bindmessage?: (event: OnMessageCallbackEvent) => void;
|
|
17
|
+
bindload?: (event: CommonCallbackEvent) => void;
|
|
18
|
+
binderror?: (event: CommonCallbackEvent) => void;
|
|
19
|
+
[x: string]: any;
|
|
20
|
+
}
|
|
21
|
+
declare const _WebView: import("react").ForwardRefExoticComponent<Omit<WebViewProps, "ref"> & import("react").RefAttributes<HandlerRef<WebView<{}>, WebViewProps>>>;
|
|
22
|
+
export default _WebView;
|
|
23
|
+
//# sourceMappingURL=mpx-web-view.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mpx-web-view.d.ts","sourceRoot":"","sources":["../mpx-web-view.tsx"],"names":[],"mappings":";AAMA,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAA;AAC9C,OAAoB,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA;AAMvD,KAAK,sBAAsB,GAAG;IAC5B,MAAM,EAAE;QACN,IAAI,EAAE,GAAG,EAAE,CAAA;KACZ,CAAA;CACF,CAAA;AAED,KAAK,mBAAmB,GAAG;IACzB,MAAM,EAAE;QACN,GAAG,CAAC,EAAE,MAAM,CAAA;KACb,CAAA;CACF,CAAA;AAED,UAAU,YAAY;IACpB,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,WAAW,CAAC,EAAE,CAAC,KAAK,EAAE,sBAAsB,KAAK,IAAI,CAAA;IACrD,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,mBAAmB,KAAK,IAAI,CAAA;IAC/C,SAAS,CAAC,EAAE,CAAC,KAAK,EAAE,mBAAmB,KAAK,IAAI,CAAA;IAChD,CAAC,CAAC,EAAE,MAAM,GAAG,GAAG,CAAA;CACjB;AAgDD,QAAA,MAAM,QAAQ,6IAmSZ,CAAA;AAIF,eAAe,QAAQ,CAAA"}
|
|
@@ -80,8 +80,16 @@ const _WebView = forwardRef((props, ref) => {
|
|
|
80
80
|
useNodesRef(props, ref, webViewRef, {
|
|
81
81
|
style: defaultWebViewStyle
|
|
82
82
|
});
|
|
83
|
+
const getHostFromUrl = function (url) {
|
|
84
|
+
if (!url)
|
|
85
|
+
return '';
|
|
86
|
+
// 匹配协议://主机名(:端口) 的模式
|
|
87
|
+
const regex = /^(?:https?|ftp):\/\/([^/?:#]+)(?::(\d+))?/i;
|
|
88
|
+
const match = url.match(regex);
|
|
89
|
+
return match ? match[1] : '';
|
|
90
|
+
};
|
|
83
91
|
const hostValidate = (url) => {
|
|
84
|
-
const host = url &&
|
|
92
|
+
const host = url && getHostFromUrl(url);
|
|
85
93
|
const hostWhitelists = mpx.config.rnConfig?.webviewConfig?.hostWhitelists || [];
|
|
86
94
|
if (hostWhitelists.length) {
|
|
87
95
|
return hostWhitelists.some((item) => {
|
|
@@ -291,7 +299,7 @@ const _WebView = forwardRef((props, ref) => {
|
|
|
291
299
|
<View style={styles.loadErrorText}><Text style={{ fontSize: 14, color: '#999999' }}>{currentErrorText.text}</Text></View>
|
|
292
300
|
<View style={styles.loadErrorButton} onTouchEnd={_reload}><Text style={{ fontSize: 12, color: '#666666' }}>{currentErrorText.button}</Text></View>
|
|
293
301
|
</View>)
|
|
294
|
-
: (<WebView
|
|
302
|
+
: (<WebView containerStyle={defaultWebViewStyle} source={{ uri: src }} ref={webViewRef} javaScriptEnabled={true} onNavigationStateChange={_changeUrl} onMessage={_message} injectedJavaScript={injectedJavaScript} onLoadProgress={_onLoadProgress} onLoadEnd={onLoadEnd} onHttpError={onHttpError} onError={onError} allowsBackForwardNavigationGestures={true}></WebView>)}
|
|
295
303
|
</Portal>);
|
|
296
304
|
});
|
|
297
305
|
_WebView.displayName = 'MpxWebview';
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
interface Token {
|
|
2
|
+
type: string;
|
|
3
|
+
value: string | number;
|
|
4
|
+
}
|
|
5
|
+
interface ExpressionNode {
|
|
6
|
+
type: 'NUMBER';
|
|
7
|
+
value: number;
|
|
8
|
+
}
|
|
9
|
+
export declare class ExpressionParser {
|
|
10
|
+
private tokens;
|
|
11
|
+
private formatter;
|
|
12
|
+
private functions;
|
|
13
|
+
private current;
|
|
14
|
+
constructor(input: string, formatter?: (val: string) => number, functions?: {
|
|
15
|
+
[key: string]: (...args: number[]) => number;
|
|
16
|
+
});
|
|
17
|
+
tokenize(input: string): Token[];
|
|
18
|
+
parse(): ExpressionNode;
|
|
19
|
+
private expression;
|
|
20
|
+
private term;
|
|
21
|
+
private factor;
|
|
22
|
+
private parseArguments;
|
|
23
|
+
private applyOperator;
|
|
24
|
+
private applyFunction;
|
|
25
|
+
}
|
|
26
|
+
interface FuncInfo {
|
|
27
|
+
start: number;
|
|
28
|
+
end: number;
|
|
29
|
+
args: string[];
|
|
30
|
+
}
|
|
31
|
+
export declare function parseFunc(str: string, funcName: string): FuncInfo[];
|
|
32
|
+
export declare class ReplaceSource {
|
|
33
|
+
private _source;
|
|
34
|
+
private _replacements;
|
|
35
|
+
constructor(source: string);
|
|
36
|
+
replace(start: number, end: number, content: string): void;
|
|
37
|
+
source(): string;
|
|
38
|
+
}
|
|
39
|
+
export {};
|
|
40
|
+
//# sourceMappingURL=parser.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"parser.d.ts","sourceRoot":"","sources":["../parser.ts"],"names":[],"mappings":"AAAA,UAAU,KAAK;IACb,IAAI,EAAE,MAAM,CAAA;IACZ,KAAK,EAAE,MAAM,GAAG,MAAM,CAAA;CACvB;AAED,UAAU,cAAc;IACtB,IAAI,EAAE,QAAQ,CAAA;IACd,KAAK,EAAE,MAAM,CAAA;CACd;AAED,qBAAa,gBAAgB;IAC3B,OAAO,CAAC,MAAM,CAAS;IACvB,OAAO,CAAC,SAAS,CAAyB;IAC1C,OAAO,CAAC,SAAS,CAAkD;IACnE,OAAO,CAAC,OAAO,CAAQ;gBAEV,KAAK,EAAE,MAAM,EAAE,SAAS,GAAE,CAAC,GAAG,EAAE,MAAM,KAAK,MAA+B,EAAE,SAAS,GAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,CAAC,GAAG,IAAI,EAAE,MAAM,EAAE,KAAK,MAAM,CAAA;KAAO;IAOzJ,QAAQ,CAAE,KAAK,EAAE,MAAM,GAAG,KAAK,EAAE;IA8BjC,KAAK,IAAK,cAAc;IAIxB,OAAO,CAAC,UAAU;IAYlB,OAAO,CAAC,IAAI;IAYZ,OAAO,CAAC,MAAM;IA8Bd,OAAO,CAAC,cAAc;IAWtB,OAAO,CAAC,aAAa;IAcrB,OAAO,CAAC,aAAa;CAWtB;AAED,UAAU,QAAQ;IAChB,KAAK,EAAE,MAAM,CAAA;IACb,GAAG,EAAE,MAAM,CAAA;IACX,IAAI,EAAE,MAAM,EAAE,CAAA;CACf;AAED,wBAAgB,SAAS,CAAE,GAAG,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,QAAQ,EAAE,CAyCpE;AAQD,qBAAa,aAAa;IACxB,OAAO,CAAC,OAAO,CAAQ;IACvB,OAAO,CAAC,aAAa,CAAe;gBAEvB,MAAM,EAAE,MAAM;IAK3B,OAAO,CAAE,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,IAAI;IAI3D,MAAM,IAAK,MAAM;CA2BlB"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import type { MutableRefObject } from 'react';
|
|
2
|
+
import type { NativeSyntheticEvent } from 'react-native';
|
|
3
|
+
import { ExtendedViewStyle } from './types/common';
|
|
4
|
+
import type { _ViewProps } from './mpx-view';
|
|
5
|
+
type AnimatedOption = {
|
|
6
|
+
duration: number;
|
|
7
|
+
delay: number;
|
|
8
|
+
useNativeDriver: boolean;
|
|
9
|
+
timingFunction: 'linear' | 'ease' | 'ease-in' | 'ease-in-out' | 'ease-out';
|
|
10
|
+
transformOrigin: string;
|
|
11
|
+
};
|
|
12
|
+
export type AnimationStepItem = {
|
|
13
|
+
animatedOption: AnimatedOption;
|
|
14
|
+
rules: Map<string, number | string>;
|
|
15
|
+
transform: Map<string, number>;
|
|
16
|
+
};
|
|
17
|
+
export type AnimationProp = {
|
|
18
|
+
id: number;
|
|
19
|
+
actions: AnimationStepItem[];
|
|
20
|
+
};
|
|
21
|
+
export default function useAnimationHooks<T, P>(props: _ViewProps & {
|
|
22
|
+
enableAnimation?: boolean;
|
|
23
|
+
layoutRef: MutableRefObject<any>;
|
|
24
|
+
transitionend?: (event: NativeSyntheticEvent<TouchEvent> | unknown) => void;
|
|
25
|
+
}): {
|
|
26
|
+
enableStyleAnimation: boolean;
|
|
27
|
+
animationStyle?: undefined;
|
|
28
|
+
} | {
|
|
29
|
+
enableStyleAnimation: true;
|
|
30
|
+
animationStyle: ExtendedViewStyle;
|
|
31
|
+
};
|
|
32
|
+
export {};
|
|
33
|
+
//# sourceMappingURL=useAnimationHooks.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useAnimationHooks.d.ts","sourceRoot":"","sources":["../useAnimationHooks.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,OAAO,CAAA;AAC7C,OAAO,KAAK,EAAE,oBAAoB,EAAmB,MAAM,cAAc,CAAA;AAezE,OAAO,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAA;AAClD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAA;AAE5C,KAAK,cAAc,GAAG;IACpB,QAAQ,EAAE,MAAM,CAAA;IAChB,KAAK,EAAE,MAAM,CAAA;IACb,eAAe,EAAE,OAAO,CAAA;IACxB,cAAc,EAAE,QAAQ,GAAG,MAAM,GAAG,SAAS,GAAG,aAAa,GAAE,UAAU,CAAA;IACzE,eAAe,EAAE,MAAM,CAAA;CACxB,CAAA;AAID,MAAM,MAAM,iBAAiB,GAAG;IAC9B,cAAc,EAAE,cAAc,CAAA;IAC9B,KAAK,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC,CAAA;IACnC,SAAS,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;CAC/B,CAAA;AACD,MAAM,MAAM,aAAa,GAAG;IAC1B,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,iBAAiB,EAAE,CAAA;CAC7B,CAAA;AA0DD,MAAM,CAAC,OAAO,UAAU,iBAAiB,CAAC,CAAC,EAAE,CAAC,EAAG,KAAK,EAAE,UAAU,GAAG;IAAE,eAAe,CAAC,EAAE,OAAO,CAAC;IAAC,SAAS,EAAE,gBAAgB,CAAC,GAAG,CAAC,CAAC;IAAC,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,oBAAoB,CAAC,UAAU,CAAC,GAAG,OAAO,KAAK,IAAI,CAAA;CAAE;;;;;;EA+NhN"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { RefObject, ForwardedRef } from 'react';
|
|
2
|
+
type Obj = Record<string, any>;
|
|
3
|
+
export type HandlerRef<T, P> = {
|
|
4
|
+
getNodeInstance(): {
|
|
5
|
+
props: RefObject<P>;
|
|
6
|
+
nodeRef: RefObject<T>;
|
|
7
|
+
instance: Obj;
|
|
8
|
+
};
|
|
9
|
+
};
|
|
10
|
+
export default function useNodesRef<T, P>(props: P, ref: ForwardedRef<HandlerRef<T, P>>, nodeRef: RefObject<T>, instance?: Obj): void;
|
|
11
|
+
export {};
|
|
12
|
+
//# sourceMappingURL=useNodesRef.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useNodesRef.d.ts","sourceRoot":"","sources":["../useNodesRef.ts"],"names":[],"mappings":"AAAA,OAAO,EAA+B,SAAS,EAAE,YAAY,EAAE,MAAM,OAAO,CAAA;AAE5E,KAAK,GAAG,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;AAE9B,MAAM,MAAM,UAAU,CAAC,CAAC,EAAE,CAAC,IAAI;IAC7B,eAAe,IAAI;QACjB,KAAK,EAAE,SAAS,CAAC,CAAC,CAAC,CAAC;QACpB,OAAO,EAAE,SAAS,CAAC,CAAC,CAAC,CAAC;QACtB,QAAQ,EAAE,GAAG,CAAA;KACd,CAAA;CACF,CAAA;AAED,MAAM,CAAC,OAAO,UAAU,WAAW,CAAC,CAAC,EAAE,CAAC,EAAG,KAAK,EAAE,CAAC,EAAE,GAAG,EAAE,YAAY,CAAC,UAAU,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,SAAS,CAAC,CAAC,CAAC,EAAE,QAAQ,GAAC,GAAQ,QAejI"}
|