@mpxjs/webpack-plugin 2.10.15-prelease.1 → 2.10.16-beta.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/config.js +60 -0
- package/lib/dependencies/AppEntryDependency.js +2 -2
- package/lib/dependencies/RecordModuleIdMapDependency.js +49 -0
- package/lib/dependencies/ResolveDependency.js +1 -1
- package/lib/file-loader.js +13 -3
- 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 +16 -56
- 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 +30 -29
- package/lib/platform/style/wx/index.js +8 -1
- package/lib/platform/template/wx/component-config/ad.js +5 -0
- package/lib/platform/template/wx/component-config/button.js +21 -5
- package/lib/platform/template/wx/component-config/camera.js +25 -3
- package/lib/platform/template/wx/component-config/canvas.js +8 -1
- package/lib/platform/template/wx/component-config/component.js +31 -33
- package/lib/platform/template/wx/component-config/cover-image.js +7 -2
- package/lib/platform/template/wx/component-config/cover-view.js +3 -1
- package/lib/platform/template/wx/component-config/fix-component-name.js +2 -2
- package/lib/platform/template/wx/component-config/form.js +27 -2
- package/lib/platform/template/wx/component-config/image.js +5 -0
- package/lib/platform/template/wx/component-config/input.js +10 -0
- package/lib/platform/template/wx/component-config/label.js +10 -2
- package/lib/platform/template/wx/component-config/map.js +11 -0
- package/lib/platform/template/wx/component-config/movable-area.js +4 -1
- package/lib/platform/template/wx/component-config/movable-view.js +17 -2
- package/lib/platform/template/wx/component-config/navigator.js +26 -0
- package/lib/platform/template/wx/component-config/picker-view.js +12 -0
- package/lib/platform/template/wx/component-config/picker.js +3 -1
- package/lib/platform/template/wx/component-config/progress.js +11 -1
- package/lib/platform/template/wx/component-config/rich-text.js +5 -0
- package/lib/platform/template/wx/component-config/scroll-view.js +12 -1
- package/lib/platform/template/wx/component-config/slider.js +8 -0
- package/lib/platform/template/wx/component-config/swiper-item.js +5 -2
- package/lib/platform/template/wx/component-config/swiper.js +10 -0
- package/lib/platform/template/wx/component-config/text.js +5 -0
- package/lib/platform/template/wx/component-config/textarea.js +19 -2
- package/lib/platform/template/wx/component-config/unsupported.js +10 -1
- package/lib/platform/template/wx/component-config/video.js +10 -0
- package/lib/platform/template/wx/index.js +21 -1
- 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 +13 -6
- package/lib/runtime/components/react/dist/context.d.ts +76 -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-camera.d.ts +27 -0
- package/lib/runtime/components/react/dist/mpx-camera.d.ts.map +1 -0
- package/lib/runtime/components/react/dist/mpx-camera.jsx +197 -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/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 +81 -37
- 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 +51 -0
- package/lib/runtime/components/react/dist/mpx-input.d.ts.map +1 -0
- package/lib/runtime/components/react/dist/mpx-input.jsx +37 -11
- 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 +61 -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-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-swiper.jsx +9 -5
- 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 +1 -1
- 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-camera.tsx +275 -0
- package/lib/runtime/components/react/mpx-image.tsx +89 -42
- package/lib/runtime/components/react/mpx-input.tsx +44 -17
- package/lib/runtime/components/react/mpx-keyboard-avoiding-view.tsx +69 -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-scroll-view.tsx +6 -17
- package/lib/runtime/components/react/mpx-swiper.tsx +9 -5
- 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 +1 -1
- package/lib/runtime/components/react/types/common.d.ts +19 -0
- package/lib/runtime/components/react/utils.tsx +15 -6
- package/lib/runtime/components/web/mpx-input.vue +0 -14
- package/lib/runtime/stringify.wxs +2 -2
- 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 +178 -15
- package/lib/template-compiler/bind-this.js +2 -2
- package/lib/template-compiler/compiler.js +267 -71
- package/lib/template-compiler/gen-node-react.js +18 -6
- package/lib/template-compiler/index.js +12 -10
- package/lib/template-compiler/parse-exps.js +1 -1
- package/lib/utils/const.js +2 -1
- package/lib/utils/dom-tag-config.js +6 -6
- package/lib/utils/env.js +6 -1
- package/lib/utils/get-build-tag-component.js +35 -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 +1 -1
- package/lib/wxss/loader.js +1 -9
- package/package.json +15 -4
|
@@ -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,mGAivBjB,CAAA;AAGF,eAAe,aAAa,CAAA"}
|
|
@@ -71,7 +71,7 @@ const easeMap = {
|
|
|
71
71
|
easeInOutCubic: Easing.inOut(Easing.cubic)
|
|
72
72
|
};
|
|
73
73
|
const SwiperWrapper = forwardRef((props, ref) => {
|
|
74
|
-
const { 'indicator-dots': showPagination, 'indicator-color': dotColor = 'rgba(0, 0, 0, .3)', 'indicator-active-color': activeDotColor = '#000000', 'enable-var': enableVar = false, 'parent-font-size': parentFontSize, 'parent-width': parentWidth, 'parent-height': parentHeight, 'external-var-context': externalVarContext, 'simultaneous-handlers': originSimultaneousHandlers = [], 'wait-for': waitFor = [], style = {}, autoplay = false, circular = false, disableGesture = false, current: propCurrent
|
|
74
|
+
const { 'indicator-dots': showPagination, 'indicator-color': dotColor = 'rgba(0, 0, 0, .3)', 'indicator-active-color': activeDotColor = '#000000', 'enable-var': enableVar = false, 'parent-font-size': parentFontSize, 'parent-width': parentWidth, 'parent-height': parentHeight, 'external-var-context': externalVarContext, 'simultaneous-handlers': originSimultaneousHandlers = [], 'wait-for': waitFor = [], style = {}, autoplay = false, circular = false, disableGesture = false, current: propCurrent, bindchange } = props;
|
|
75
75
|
const easeingFunc = props['easing-function'] || 'default';
|
|
76
76
|
const easeDuration = props.duration || 500;
|
|
77
77
|
const horizontal = props.vertical !== undefined ? !props.vertical : true;
|
|
@@ -112,10 +112,10 @@ const SwiperWrapper = forwardRef((props, ref) => {
|
|
|
112
112
|
// 每个元素的宽度 or 高度,有固定值直接初始化无则0
|
|
113
113
|
const step = useSharedValue(initStep);
|
|
114
114
|
// 记录选中元素的索引值
|
|
115
|
-
const currentIndex = useSharedValue(propCurrent);
|
|
115
|
+
const currentIndex = useSharedValue(propCurrent || 0);
|
|
116
116
|
// const initOffset = getOffset(props.current || 0, initStep)
|
|
117
117
|
// 记录元素的偏移量
|
|
118
|
-
const offset = useSharedValue(getOffset(propCurrent, initStep));
|
|
118
|
+
const offset = useSharedValue(getOffset(propCurrent || 0, initStep));
|
|
119
119
|
const strAbso = 'absolute' + dir.toUpperCase();
|
|
120
120
|
const strVelocity = 'velocity' + dir.toUpperCase();
|
|
121
121
|
// 标识手指触摸和抬起, 起点在onBegin
|
|
@@ -170,7 +170,7 @@ const SwiperWrapper = forwardRef((props, ref) => {
|
|
|
170
170
|
const iStep = dir === 'x' ? realWidth : realHeight;
|
|
171
171
|
if (iStep !== step.value) {
|
|
172
172
|
step.value = iStep;
|
|
173
|
-
updateCurrent(propCurrent, iStep);
|
|
173
|
+
updateCurrent(propCurrent || 0, iStep);
|
|
174
174
|
updateAutoplay();
|
|
175
175
|
}
|
|
176
176
|
}
|
|
@@ -414,7 +414,7 @@ const SwiperWrapper = forwardRef((props, ref) => {
|
|
|
414
414
|
// 1. 如果用户在touch的过程中, 外部更新了current以外部为准(小程序表现)
|
|
415
415
|
// 2. 手指滑动过程中更新索引,外部会把current再传入进来,导致offset直接更新,增加判断不同才更新
|
|
416
416
|
if (propCurrent !== currentIndex.value) {
|
|
417
|
-
updateCurrent(propCurrent, step.value);
|
|
417
|
+
updateCurrent(propCurrent || 0, step.value);
|
|
418
418
|
}
|
|
419
419
|
}, [propCurrent]);
|
|
420
420
|
useEffect(() => {
|
|
@@ -696,6 +696,10 @@ const SwiperWrapper = forwardRef((props, ref) => {
|
|
|
696
696
|
offset.value = moveDistance + offset.value;
|
|
697
697
|
}
|
|
698
698
|
preAbsolutePos.value = e[strAbso];
|
|
699
|
+
})
|
|
700
|
+
.onEnd((e) => {
|
|
701
|
+
// 修复部分安卓机型下onFinalize拿到的absolute值 和 onUpdate不一致的情况,通过onEnd进行修正为最终的位置
|
|
702
|
+
preAbsolutePos.value = e[strAbso];
|
|
699
703
|
})
|
|
700
704
|
.onFinalize((e) => {
|
|
701
705
|
'worklet';
|
|
@@ -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,6IA0RZ,CAAA;AAIF,eAAe,QAAQ,CAAA"}
|
|
@@ -176,7 +176,7 @@ const _WebView = forwardRef((props, ref) => {
|
|
|
176
176
|
}
|
|
177
177
|
break;
|
|
178
178
|
case 'postMessage':
|
|
179
|
-
bindmessage && bindmessage(getCustomEvent('
|
|
179
|
+
bindmessage && bindmessage(getCustomEvent('message', {}, {
|
|
180
180
|
detail: {
|
|
181
181
|
data: params[0]?.data
|
|
182
182
|
}
|
|
@@ -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"}
|