@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,13 @@
|
|
|
1
|
+
import { ComponentType, ReactNode } from 'react';
|
|
2
|
+
interface AsyncSuspenseProps {
|
|
3
|
+
type: 'component' | 'page';
|
|
4
|
+
chunkName: string;
|
|
5
|
+
moduleId: string;
|
|
6
|
+
innerProps: any;
|
|
7
|
+
getLoading?: () => ComponentType<unknown>;
|
|
8
|
+
getFallback?: () => ComponentType<unknown>;
|
|
9
|
+
getChildren: () => Promise<ReactNode>;
|
|
10
|
+
}
|
|
11
|
+
declare const AsyncSuspense: React.FC<AsyncSuspenseProps>;
|
|
12
|
+
export default AsyncSuspense;
|
|
13
|
+
//# sourceMappingURL=mpx-async-suspense.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mpx-async-suspense.d.ts","sourceRoot":"","sources":["../mpx-async-suspense.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAY,aAAa,EAAkC,SAAS,EAAiB,MAAM,OAAO,CAAA;AAiGzG,UAAU,kBAAkB;IAC1B,IAAI,EAAE,WAAW,GAAG,MAAM,CAAA;IAC1B,SAAS,EAAE,MAAM,CAAA;IACjB,QAAQ,EAAE,MAAM,CAAA;IAChB,UAAU,EAAE,GAAG,CAAC;IAChB,UAAU,CAAC,EAAE,MAAM,aAAa,CAAC,OAAO,CAAC,CAAA;IACzC,WAAW,CAAC,EAAE,MAAM,aAAa,CAAC,OAAO,CAAC,CAAA;IAC1C,WAAW,EAAE,MAAM,OAAO,CAAC,SAAS,CAAC,CAAA;CACtC;AAID,QAAA,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,CA6E/C,CAAA;AAID,eAAe,aAAa,CAAA"}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ✔ size
|
|
3
|
+
* ✔ type
|
|
4
|
+
* ✔ plain
|
|
5
|
+
* ✔ disabled
|
|
6
|
+
* ✔ loading
|
|
7
|
+
* ✔ form-type
|
|
8
|
+
* - open-type: Partially. Only support `share`、`getUserInfo`
|
|
9
|
+
* ✔ hover-class: Convert hoverClass to hoverStyle.
|
|
10
|
+
* ✔ hover-style
|
|
11
|
+
* ✘ hover-stop-propagation
|
|
12
|
+
* ✔ hover-start-time
|
|
13
|
+
* ✔ hover-stay-time
|
|
14
|
+
* ✘ lang
|
|
15
|
+
* ✘ session-from
|
|
16
|
+
* ✘ send-message-title
|
|
17
|
+
* ✘ send-message-path
|
|
18
|
+
* ✘ send-message-img
|
|
19
|
+
* ✘ app-parameter
|
|
20
|
+
* ✘ show-message-card
|
|
21
|
+
* ✘ phone-number-no-quota-toast
|
|
22
|
+
* ✘ bindgetuserinfo
|
|
23
|
+
* ✘ bindcontact
|
|
24
|
+
* ✘ createliveactivity
|
|
25
|
+
* ✘ bindgetphonenumber
|
|
26
|
+
* ✘ bindgetphonenumber
|
|
27
|
+
* ✘ bindgetrealtimephonenumber
|
|
28
|
+
* ✘ binderror
|
|
29
|
+
* ✘ bindopensetting
|
|
30
|
+
* ✘ bindlaunchapp
|
|
31
|
+
* ✘ bindlaunchapp
|
|
32
|
+
* ✘ bindchooseavatar
|
|
33
|
+
* ✘ bindchooseavatar
|
|
34
|
+
* ✘ bindagreeprivacyauthorization
|
|
35
|
+
* ✔ bindtap
|
|
36
|
+
*/
|
|
37
|
+
import { ReactNode } from 'react';
|
|
38
|
+
import { View, ViewStyle, TextStyle, NativeSyntheticEvent } from 'react-native';
|
|
39
|
+
import { HandlerRef } from './useNodesRef';
|
|
40
|
+
import type { ExtendedViewStyle } from './types/common';
|
|
41
|
+
export type Type = 'default' | 'primary' | 'warn';
|
|
42
|
+
export type OpenType = 'share' | 'getUserInfo';
|
|
43
|
+
export type OpenTypeEvent = 'onShareAppMessage' | 'onUserInfo';
|
|
44
|
+
export interface ButtonProps {
|
|
45
|
+
size?: string;
|
|
46
|
+
type?: Type;
|
|
47
|
+
plain?: boolean;
|
|
48
|
+
disabled?: boolean;
|
|
49
|
+
loading?: boolean;
|
|
50
|
+
'hover-class'?: string;
|
|
51
|
+
'hover-style'?: ExtendedViewStyle;
|
|
52
|
+
'hover-start-time'?: number;
|
|
53
|
+
'hover-stay-time'?: number;
|
|
54
|
+
'open-type'?: OpenType;
|
|
55
|
+
'form-type'?: 'submit' | 'reset';
|
|
56
|
+
'enable-offset'?: boolean;
|
|
57
|
+
'enable-var'?: boolean;
|
|
58
|
+
'external-var-context'?: Record<string, any>;
|
|
59
|
+
'parent-font-size'?: number;
|
|
60
|
+
'parent-width'?: number;
|
|
61
|
+
'parent-height'?: number;
|
|
62
|
+
style?: ViewStyle & TextStyle & Record<string, any>;
|
|
63
|
+
children: ReactNode;
|
|
64
|
+
bindgetuserinfo?: (userInfo: any) => void;
|
|
65
|
+
bindtap?: (evt: NativeSyntheticEvent<TouchEvent> | unknown) => void;
|
|
66
|
+
}
|
|
67
|
+
declare const Button: import("react").ForwardRefExoticComponent<ButtonProps & import("react").RefAttributes<HandlerRef<View, ButtonProps>>>;
|
|
68
|
+
export default Button;
|
|
69
|
+
//# sourceMappingURL=mpx-button.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mpx-button.d.ts","sourceRoot":"","sources":["../mpx-button.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AACH,OAAO,EAAoC,SAAS,EAA+B,MAAM,OAAO,CAAA;AAChG,OAAO,EACL,IAAI,EAEJ,SAAS,EACT,SAAS,EAGT,oBAAoB,EAErB,MAAM,cAAc,CAAA;AAKrB,OAAoB,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA;AAEvD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAA;AAGvD,MAAM,MAAM,IAAI,GAAG,SAAS,GAAG,SAAS,GAAG,MAAM,CAAA;AAOjD,MAAM,MAAM,QAAQ,GAAG,OAAO,GAAG,aAAa,CAAA;AAE9C,MAAM,MAAM,aAAa,GAAG,mBAAmB,GAAG,YAAY,CAAA;AAE9D,MAAM,WAAW,WAAW;IAC1B,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,IAAI,CAAC,EAAE,IAAI,CAAA;IACX,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,aAAa,CAAC,EAAE,iBAAiB,CAAA;IACjC,kBAAkB,CAAC,EAAE,MAAM,CAAA;IAC3B,iBAAiB,CAAC,EAAE,MAAM,CAAA;IAC1B,WAAW,CAAC,EAAE,QAAQ,CAAA;IACtB,WAAW,CAAC,EAAE,QAAQ,GAAG,OAAO,CAAA;IAChC,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,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,KAAK,CAAC,EAAE,SAAS,GAAG,SAAS,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IACnD,QAAQ,EAAE,SAAS,CAAA;IACnB,eAAe,CAAC,EAAE,CAAC,QAAQ,EAAE,GAAG,KAAK,IAAI,CAAA;IACzC,OAAO,CAAC,EAAE,CAAC,GAAG,EAAE,oBAAoB,CAAC,UAAU,CAAC,GAAG,OAAO,KAAK,IAAI,CAAA;CACpE;AA4GD,QAAA,MAAM,MAAM,uHAqOV,CAAA;AAIF,eAAe,MAAM,CAAA"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
interface Message {
|
|
3
|
+
id?: string;
|
|
4
|
+
type: string;
|
|
5
|
+
payload?: any;
|
|
6
|
+
}
|
|
7
|
+
export default class Bus {
|
|
8
|
+
_paused: Boolean;
|
|
9
|
+
_messageListeners: {
|
|
10
|
+
[key: string]: (message: Message) => void;
|
|
11
|
+
};
|
|
12
|
+
_queue: Message[];
|
|
13
|
+
_send: (message: Message | Message[]) => void;
|
|
14
|
+
_timeoutId: NodeJS.Timeout | null;
|
|
15
|
+
constructor(send: (message: Message | Message[]) => void);
|
|
16
|
+
post(message: Message): Promise<any>;
|
|
17
|
+
handle(message: Message): void;
|
|
18
|
+
pause(): void;
|
|
19
|
+
resume(): void;
|
|
20
|
+
startBatching(): void;
|
|
21
|
+
clearBatchingTimeout(): void;
|
|
22
|
+
}
|
|
23
|
+
export {};
|
|
24
|
+
//# sourceMappingURL=Bus.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Bus.d.ts","sourceRoot":"","sources":["../../mpx-canvas/Bus.ts"],"names":[],"mappings":";AACA,UAAU,OAAO;IACf,EAAE,CAAC,EAAE,MAAM,CAAA;IACX,IAAI,EAAE,MAAM,CAAA;IACZ,OAAO,CAAC,EAAE,GAAG,CAAA;CACd;AACD,MAAM,CAAC,OAAO,OAAO,GAAG;IACtB,OAAO,EAAE,OAAO,CAAS;IACzB,iBAAiB,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAAA;KAAE,CAAK;IACrE,MAAM,EAAE,OAAO,EAAE,CAAK;IACtB,KAAK,EAAE,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,EAAE,KAAK,IAAI,CAAA;IAC7C,UAAU,EAAE,MAAM,CAAC,OAAO,GAAG,IAAI,CAAO;gBAC3B,IAAI,EAAE,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,EAAE,KAAK,IAAI;IAIzD,IAAI,CAAE,OAAO,EAAE,OAAO,GAAG,OAAO,CAAC,GAAG,CAAC;IAerC,MAAM,CAAE,OAAO,EAAE,OAAO,GAAG,IAAI;IAY/B,KAAK,IAAK,IAAI;IAId,MAAM,IAAK,IAAI;IAMf,aAAa,IAAK,IAAI;IAUtB,oBAAoB,IAAK,IAAI;CAM9B"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { WebviewMessage, CanvasInstance } from './utils';
|
|
2
|
+
export default class CanvasGradient {
|
|
3
|
+
private canvas;
|
|
4
|
+
[key: string]: any;
|
|
5
|
+
constructor(canvas: CanvasInstance, noOnConstruction?: boolean);
|
|
6
|
+
postMessage(message: WebviewMessage): Promise<any>;
|
|
7
|
+
}
|
|
8
|
+
//# sourceMappingURL=CanvasGradient.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CanvasGradient.d.ts","sourceRoot":"","sources":["../../mpx-canvas/CanvasGradient.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,cAAc,EAA0B,MAAM,SAAS,CAAA;AAGhF,MAAM,CAAC,OAAO,OAAO,cAAc;IACjC,OAAO,CAAC,MAAM,CAAiB;IAC/B,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;gBACN,MAAM,EAAE,cAAc,EAAE,gBAAgB,UAAQ;IAQ7D,WAAW,CAAE,OAAO,EAAE,cAAc;CAGrC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { CanvasInstance, WebviewMessage } from './utils';
|
|
2
|
+
export default class CanvasRenderingContext2D {
|
|
3
|
+
canvas: CanvasInstance;
|
|
4
|
+
constructor(canvas: CanvasInstance);
|
|
5
|
+
postMessage(message: WebviewMessage): Promise<any>;
|
|
6
|
+
}
|
|
7
|
+
//# sourceMappingURL=CanvasRenderingContext2D.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CanvasRenderingContext2D.d.ts","sourceRoot":"","sources":["../../mpx-canvas/CanvasRenderingContext2D.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,cAAc,EAA4E,MAAM,SAAS,CAAA;AA0ElI,MAAM,CAAC,OAAO,OAAO,wBAAwB;IAC3C,MAAM,EAAE,cAAc,CAAA;gBACT,MAAM,EAAE,cAAc;IAOnC,WAAW,CAAE,OAAO,EAAE,cAAc;CAGrC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { WebviewMessage, WEBVIEW_TARGET, CanvasInstance } from './utils';
|
|
2
|
+
export declare class Image {
|
|
3
|
+
[WEBVIEW_TARGET]: string;
|
|
4
|
+
canvas: any;
|
|
5
|
+
width: number;
|
|
6
|
+
height: number;
|
|
7
|
+
private _loadListener;
|
|
8
|
+
private _errorListener;
|
|
9
|
+
private _onload;
|
|
10
|
+
private _onerror;
|
|
11
|
+
[key: string]: any;
|
|
12
|
+
constructor(canvas: CanvasInstance, width?: number, height?: number, noOnConstruction?: boolean);
|
|
13
|
+
postMessage(message: WebviewMessage): any;
|
|
14
|
+
addEventListener(type: 'load' | 'error', callbackFn: Function): any;
|
|
15
|
+
set onload(callback: ((...args: any[]) => void));
|
|
16
|
+
get onload(): ((...args: any[]) => void);
|
|
17
|
+
set onerror(callback: ((...args: any[]) => void));
|
|
18
|
+
get onerror(): ((...args: any[]) => void);
|
|
19
|
+
}
|
|
20
|
+
export declare function createImage(canvas: CanvasInstance, width?: number, height?: number): Image;
|
|
21
|
+
//# sourceMappingURL=Image.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Image.d.ts","sourceRoot":"","sources":["../../mpx-canvas/Image.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,cAAc,EAA6B,cAAc,EAAE,MAAM,SAAS,CAAA;AAUnG,qBAAa,KAAK;IAChB,CAAC,cAAc,CAAC,EAAE,MAAM,CAAC;IACzB,MAAM,EAAE,GAAG,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,aAAa,CAAM;IAC3B,OAAO,CAAC,cAAc,CAAM;IAC5B,OAAO,CAAC,OAAO,CAA6B;IAC5C,OAAO,CAAC,QAAQ,CAA6B;IAC7C,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;gBAEN,MAAM,EAAE,cAAc,EAAE,KAAK,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,EAAE,gBAAgB,UAAQ;IAuB9F,WAAW,CAAE,OAAO,EAAE,cAAc;IAIpC,gBAAgB,CAAE,IAAI,EAAE,MAAM,GAAG,OAAO,EAAE,UAAU,EAAE,QAAQ;IAsB9D,IAAI,MAAM,CAAE,QAAQ,EAAE,CAAC,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,IAAI,CAAC,EAQ/C;IAED,IAAI,MAAM,IAAK,CAAC,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,IAAI,CAAC,CAExC;IAED,IAAI,OAAO,CAAE,QAAQ,EAAE,CAAC,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,IAAI,CAAC,EAQhD;IAED,IAAI,OAAO,IAAM,CAAC,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,IAAI,CAAC,CAE1C;CACF;AAED,wBAAgB,WAAW,CAAE,MAAM,EAAE,cAAc,EAAE,KAAK,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,SAEnF"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { WebviewMessage, CanvasInstance } from './utils';
|
|
2
|
+
export default class ImageData {
|
|
3
|
+
canvas: CanvasInstance;
|
|
4
|
+
[key: string]: any;
|
|
5
|
+
constructor(canvas: CanvasInstance, dataArray: number[], width: number, height: number, noOnConstruction?: boolean);
|
|
6
|
+
postMessage: (message: WebviewMessage) => Promise<any>;
|
|
7
|
+
}
|
|
8
|
+
export declare function createImageData(canvas: CanvasInstance, dataArray: number[], width: number, height: number): ImageData;
|
|
9
|
+
//# sourceMappingURL=ImageData.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ImageData.d.ts","sourceRoot":"","sources":["../../mpx-canvas/ImageData.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,cAAc,EACd,cAAc,EACf,MAAM,SAAS,CAAA;AAEhB,MAAM,CAAC,OAAO,OAAO,SAAS;IAC5B,MAAM,EAAE,cAAc,CAAC;IACvB,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;gBACN,MAAM,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,gBAAgB,CAAC,EAAE,OAAO;IAOnH,WAAW,YAAa,cAAc,kBAEpC;CACH;AAED,wBAAgB,eAAe,CAAE,MAAM,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,aAE1G"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { WebviewConstructor } from './utils';
|
|
2
|
+
export declare enum ConstructorType {
|
|
3
|
+
Image = "Image",
|
|
4
|
+
CanvasGradient = "CanvasGradient",
|
|
5
|
+
ImageData = "ImageData"
|
|
6
|
+
}
|
|
7
|
+
export declare function useConstructorsRegistry(): {
|
|
8
|
+
register: (registerWebviewConstructor: Function) => void;
|
|
9
|
+
getConstructor: (type: ConstructorType) => WebviewConstructor | undefined;
|
|
10
|
+
};
|
|
11
|
+
//# sourceMappingURL=constructorsRegistry.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constructorsRegistry.d.ts","sourceRoot":"","sources":["../../mpx-canvas/constructorsRegistry.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAA;AAE5C,oBAAY,eAAe;IACzB,KAAK,UAAU;IACf,cAAc,mBAAmB;IACjC,SAAS,cAAc;CACxB;AAaD,wBAAgB,uBAAuB;2CACS,QAAQ,KAAG,IAAI;2BAM/B,eAAe,KAAG,kBAAkB,GAAG,SAAS;EAQ/E"}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
declare const _default: "<html><head>\n <meta content=\"width=device-width, initial-scale=1, maximum-scale=1, user-scaleable=no\" name=\"viewport\">\n <style>\n html {\n -ms-content-zooming: none;\n -ms-touch-action: pan-x pan-y;\n }\n body {\n position: fixed;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n margin: 0;\n padding: 0;\n overflow: hidden;\n }\n * {\n user-select: none;\n -ms-user-select: none;\n -moz-user-select: none;\n -webkit-user-select: none;\n }\n </style>\n </head>\n <body>\n <script>\n var scale = function (ratio) {\n return function (item) {\n if (typeof item === \"number\") {\n return item * ratio;\n }\n return item;\n };\n};\nfunction autoScaleCanvas(canvas) {\n var ctx = canvas.getContext(\"2d\");\n var ratio = window.devicePixelRatio || 1;\n if (ratio !== 1) {\n canvas.width *= ratio;\n canvas.height *= ratio;\n ctx.scale(ratio, ratio);\n ctx.isPointInPath = function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n return CanvasRenderingContext2D.prototype.isPointInPath.apply(ctx, args.map(scale(ratio)));\n };\n }\n return canvas;\n}\nwindow.autoScaleCanvas = autoScaleCanvas;\n</script>\n<script>\n\nvar WEBVIEW_TARGET = '@@WEBVIEW_TARGET';\n\nvar ID = function () {\n return Math.random().toString(32).slice(2);\n};\n\nvar flattenObjectCopyValue = function (flatObj, srcObj, key) {\n var value = srcObj[key];\n if (typeof value === 'function') {\n return;\n }\n if (typeof value === 'object' && value instanceof Node) {\n return;\n }\n flatObj[key] = flattenObject(value);\n};\n\nvar flattenObject = function (object) {\n if (typeof object !== 'object' || object === null) {\n return object;\n }\n // Handle TypedArray\n if (object instanceof Uint8ClampedArray) {\n return Array.from(object);\n }\n var flatObject = {};\n for (var key in object) {\n flattenObjectCopyValue(flatObject, object, key);\n }\n for (var key in Object.getOwnPropertyNames(object)) {\n flattenObjectCopyValue(flatObject, object, key);\n }\n return flatObject;\n};\n\nvar AutoScaledCanvas = function (element) {\n this.element = element;\n};\n\nAutoScaledCanvas.prototype.toDataURL = function () {\n return this.element.toDataURL.apply(this.element, arguments);\n};\n\nAutoScaledCanvas.prototype.autoScale = function () {\n if (this.savedHeight !== undefined) {\n this.element.height = this.savedHeight;\n }\n if (this.savedWidth !== undefined) {\n this.element.width = this.savedWidth;\n }\n window.autoScaleCanvas(this.element);\n};\n\nObject.defineProperty(AutoScaledCanvas.prototype, 'width', {\n get: function () {\n return this.element.width;\n },\n set: function (value) {\n this.savedWidth = value;\n this.autoScale();\n return value;\n },\n});\n\nObject.defineProperty(AutoScaledCanvas.prototype, 'height', {\n get: function () {\n return this.element.height;\n },\n set: function (value) {\n this.savedHeight = value;\n this.autoScale();\n return value;\n },\n});\nvar toMessage = function (result) {\n if (result instanceof Blob) {\n return {\n type: 'blob',\n payload: btoa(result),\n meta: {},\n };\n }\n if (result instanceof Object) {\n if (!result[WEBVIEW_TARGET]) {\n var id = ID();\n result[WEBVIEW_TARGET] = id;\n targets[id] = result;\n }\n return {\n type: 'json',\n payload: flattenObject(result),\n args: toArgs(flattenObject(result)),\n meta: {\n target: result[WEBVIEW_TARGET],\n constructor: result.__constructorName__ || result.constructor.name,\n },\n };\n }\n return {\n type: 'json',\n payload: typeof result === 'string' ? result : JSON.stringify(result),\n meta: {},\n };\n};\nvar toArgs = function (result) {\n var args = [];\n for (var key in result) {\n if (result[key] !== undefined && key !== '@@WEBVIEW_TARGET') {\n args.push(result[key]);\n }\n }\n return args;\n};\n\nvar createObjectsFromArgs = function (args) {\n for (var index = 0; index < args.length; index += 1) {\n var currentArg = args[index];\n if (currentArg && currentArg.className !== undefined) {\n var className = currentArg.className, classArgs = currentArg.classArgs;\n // new ImageData,第一个参数需要是 Uint8ClampedArray\n var object = new (Function.prototype.bind.apply(constructors[className], [null].concat(classArgs)))();\n args[index] = object;\n }\n }\n return args;\n};\n\nvar canvas = document.createElement('canvas');\ncanvas.style.width = '100%';\ncanvas.style.height = '100%';\nvar autoScaledCanvas = new AutoScaledCanvas(canvas);\n\nvar targets = {\n canvas: autoScaledCanvas,\n context2D: canvas.getContext('2d'),\n};\n\nvar constructors = {\n CanvasGradient: CanvasGradient,\n Image: Image,\n ImageData: ImageData,\n Uint8ClampedArray: Uint8ClampedArray,\n};\n\nImage.bind =\n Image.bind ||\n function () {\n return Image;\n };\n\nImageData.bind =\n ImageData.bind ||\n function () {\n return ImageData;\n };\nUint8ClampedArray.bind =\n Uint8ClampedArray.bind ||\n function () {\n return Uint8ClampedArray;\n };\n\nvar populateRefs = function (arg) {\n if (arg && arg.__ref__) {\n return targets[arg.__ref__];\n }\n return arg;\n};\ndocument.body.appendChild(canvas);\n\nvar mergeObjects = function (target, source) {\n for (var key in source) {\n if (source.hasOwnProperty(key)) {\n target[key] = source[key];\n }\n }\n return target;\n};\n\nfunction handleMessage(message) {\n var id = message.id,\n type = message.type,\n payload = message.payload;\n\n switch (type) {\n case 'exec': {\n var target = payload.target,\n method = payload.method,\n args = payload.args;\n var result = targets[target][method].apply(targets[target], args.map(populateRefs));\n var msg = toMessage(result);\n\n if (typeof result === 'object' && !msg.meta.constructor) {\n for (var constructorName in constructors) {\n if (result instanceof constructors[constructorName]) {\n msg.meta.constructor = constructorName;\n }\n }\n }\n window.ReactNativeWebView.postMessage(JSON.stringify(mergeObjects({ id: id }, msg)));\n break;\n }\n case 'set': {\n var target = payload.target,\n key = payload.key,\n value = payload.value;\n targets[target][key] = populateRefs(value);\n break;\n }\n case 'construct': {\n var constructor = payload.constructor,\n target = payload.id,\n args = payload.args || [];\n var newArgs = createObjectsFromArgs(args);\n var object;\n try {\n object = new (Function.prototype.bind.apply(constructors[constructor], [null].concat(newArgs)))();\n }\n catch (error) {\n throw new Error('Error while constructing '.concat(constructor, ' ').concat(error.message));\n }\n object.__constructorName__ = constructor;\n var msg = toMessage({});\n targets[target] = object;\n window.ReactNativeWebView.postMessage(JSON.stringify(mergeObjects({ id: id }, msg)));\n break;\n }\n case 'listen': {\n var types = payload.types,\n target = payload.target;\n for (var i = 0; i < types.length; i++) {\n var eventType = types[i];\n targets[target].addEventListener(eventType, function (e) {\n const message = toMessage({\n type: 'event',\n payload: {\n type: e.type,\n target: mergeObjects(flattenObject(targets[target]), {\n [WEBVIEW_TARGET]: target,\n }),\n },\n });\n window.ReactNativeWebView.postMessage(\n JSON.stringify(mergeObjects({ id: id }, message))\n );\n });\n }\n break;\n}\n }\n}\nvar handleError = function (err, message) {\n window.ReactNativeWebView.postMessage(JSON.stringify({\n id: message.id,\n type: 'error',\n payload: {\n message: err.message,\n stack: err.stack,\n },\n }));\n document.removeEventListener('message', handleIncomingMessage);\n};\n\nfunction handleIncomingMessage(data) {\n if (Array.isArray(data)) {\n for (var i = 0; i < data.length; i++) {\n try {\n handleMessage(data[i]);\n } catch (err) {\n handleError(err, data[i]);\n }\n }\n } else {\n try {\n handleMessage(data);\n } catch (err) {\n handleError(err, data);\n }\n }\n}\n\nwindow.mpxWebviewMessageCallback = handleIncomingMessage\n</script>\n \n\n</body></html>";
|
|
2
|
+
export default _default;
|
|
3
|
+
//# sourceMappingURL=html.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"html.d.ts","sourceRoot":"","sources":["../../mpx-canvas/html.ts"],"names":[],"mappings":";AAAA,wBAoVe"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ✘ type
|
|
3
|
+
* ✘ canvas-id
|
|
4
|
+
* ✘ disable-scroll
|
|
5
|
+
* ✔ bindtouchstart
|
|
6
|
+
* ✔ bindtouchmove
|
|
7
|
+
* ✔ bindtouchend
|
|
8
|
+
* ✔ bindtouchcancel
|
|
9
|
+
* ✔ bindlongtap
|
|
10
|
+
* ✔ binderror
|
|
11
|
+
*/
|
|
12
|
+
import { TouchEvent } from 'react';
|
|
13
|
+
import { View, NativeSyntheticEvent } from 'react-native';
|
|
14
|
+
import { HandlerRef } from '../useNodesRef';
|
|
15
|
+
import './CanvasGradient';
|
|
16
|
+
interface CanvasProps {
|
|
17
|
+
style?: Record<string, any>;
|
|
18
|
+
originWhitelist?: Array<string>;
|
|
19
|
+
'enable-var'?: boolean;
|
|
20
|
+
'parent-font-size'?: number;
|
|
21
|
+
'parent-width'?: number;
|
|
22
|
+
'parent-height'?: number;
|
|
23
|
+
'external-var-context'?: Record<string, any>;
|
|
24
|
+
bindtouchstart?: (event: NativeSyntheticEvent<TouchEvent>) => void;
|
|
25
|
+
bindtouchmove?: (event: NativeSyntheticEvent<TouchEvent>) => void;
|
|
26
|
+
bindtouchend?: (event: NativeSyntheticEvent<TouchEvent>) => void;
|
|
27
|
+
bindtouchcancel?: (event: NativeSyntheticEvent<TouchEvent>) => void;
|
|
28
|
+
bindlongtap?: (event: NativeSyntheticEvent<TouchEvent>) => void;
|
|
29
|
+
binderror?: (event: NativeSyntheticEvent<ErrorEvent>) => void;
|
|
30
|
+
}
|
|
31
|
+
declare const _Canvas: import("react").ForwardRefExoticComponent<CanvasProps & import("react").RefAttributes<HandlerRef<CanvasProps & View, CanvasProps>>>;
|
|
32
|
+
export default _Canvas;
|
|
33
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../mpx-canvas/index.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,OAAO,EAA4E,UAAU,EAAoB,MAAM,OAAO,CAAA;AAC9H,OAAO,EAAE,IAAI,EAAwB,oBAAoB,EAAE,MAAM,cAAc,CAAA;AAE/E,OAAoB,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAA;AAexD,OAAO,kBAAkB,CAAA;AAqBzB,UAAU,WAAW;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IAC3B,eAAe,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAA;IAC/B,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,cAAc,CAAC,EAAE,CAAC,KAAK,EAAE,oBAAoB,CAAC,UAAU,CAAC,KAAK,IAAI,CAAA;IAClE,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,oBAAoB,CAAC,UAAU,CAAC,KAAK,IAAI,CAAA;IACjE,YAAY,CAAC,EAAE,CAAC,KAAK,EAAE,oBAAoB,CAAC,UAAU,CAAC,KAAK,IAAI,CAAA;IAChE,eAAe,CAAC,EAAE,CAAC,KAAK,EAAE,oBAAoB,CAAC,UAAU,CAAC,KAAK,IAAI,CAAA;IACnE,WAAW,CAAC,EAAE,CAAC,KAAK,EAAE,oBAAoB,CAAC,UAAU,CAAC,KAAK,IAAI,CAAA;IAC/D,SAAS,CAAC,EAAE,CAAC,KAAK,EAAE,oBAAoB,CAAC,UAAU,CAAC,KAAK,IAAI,CAAA;CAC9D;AAED,QAAA,MAAM,OAAO,qIAoPX,CAAA;AAIF,eAAe,OAAO,CAAA"}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { WebView } from 'react-native-webview';
|
|
3
|
+
import Bus from './Bus';
|
|
4
|
+
export declare const WEBVIEW_TARGET = "@@WEBVIEW_TARGET";
|
|
5
|
+
export declare const constructors: Record<string, any>;
|
|
6
|
+
export declare const ID: () => string;
|
|
7
|
+
export interface Instance {
|
|
8
|
+
postMessage: (...args: any[]) => void;
|
|
9
|
+
[WEBVIEW_TARGET]?: string;
|
|
10
|
+
[key: string]: any;
|
|
11
|
+
}
|
|
12
|
+
export interface WebviewConstructor {
|
|
13
|
+
new (...args: any[]): Instance;
|
|
14
|
+
constructLocally?: (...args: unknown[]) => Instance;
|
|
15
|
+
}
|
|
16
|
+
export interface WebviewMessage {
|
|
17
|
+
type: 'set' | 'exec' | 'listen' | 'event' | 'construct';
|
|
18
|
+
payload: {
|
|
19
|
+
target?: string | {
|
|
20
|
+
[key: string]: any;
|
|
21
|
+
};
|
|
22
|
+
key?: string;
|
|
23
|
+
value?: any;
|
|
24
|
+
method?: string;
|
|
25
|
+
args?: any[];
|
|
26
|
+
types?: string[];
|
|
27
|
+
type?: string;
|
|
28
|
+
constructor?: string | Function;
|
|
29
|
+
id?: string;
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
export interface CanvasInstance {
|
|
33
|
+
webview: WebView | null;
|
|
34
|
+
bus: Bus | null;
|
|
35
|
+
context2D: CanvasRenderingContext2D;
|
|
36
|
+
getContext: (contextType: string) => CanvasRenderingContext2D | null;
|
|
37
|
+
createImage: (width?: number, height?: number) => any;
|
|
38
|
+
postMessage: (message: WebviewMessage) => Promise<any>;
|
|
39
|
+
listeners: Array<(payload: any) => void>;
|
|
40
|
+
addMessageListener: (listener: (payload: any) => void) => () => void;
|
|
41
|
+
removeMessageListener: (listener: (payload: any) => void) => void;
|
|
42
|
+
createImageData: (dataArray: number[], width?: number, height?: number) => any;
|
|
43
|
+
}
|
|
44
|
+
export declare const registerWebviewTarget: (instance: Instance, targetName: string) => void;
|
|
45
|
+
export declare const registerWebviewProperties: (instance: Instance, properties: Record<string, any>) => void;
|
|
46
|
+
export declare const registerWebviewMethods: (instance: Instance, methods: string[]) => void;
|
|
47
|
+
export declare const registerWebviewConstructor: (constructor: WebviewConstructor, constructorName: string) => void;
|
|
48
|
+
export declare const useWebviewBinding: ({ targetName, properties, methods }: {
|
|
49
|
+
targetName: string;
|
|
50
|
+
properties?: Record<string, any> | undefined;
|
|
51
|
+
methods?: string[] | undefined;
|
|
52
|
+
}) => import("react").MutableRefObject<{}>;
|
|
53
|
+
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../mpx-canvas/utils.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAA;AAC9C,OAAO,GAAG,MAAM,OAAO,CAAA;AAEvB,eAAO,MAAM,cAAc,qBAAqB,CAAA;AAEhD,eAAO,MAAM,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAM,CAAA;AAEnD,eAAO,MAAM,EAAE,cAA4C,CAAA;AAS3D,MAAM,WAAW,QAAQ;IACvB,WAAW,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,IAAI,CAAC;IACtC,CAAC,cAAc,CAAC,CAAC,EAAE,MAAM,CAAC;IAC1B,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;CACpB;AAED,MAAM,WAAW,kBAAkB;IACjC,KAAK,GAAG,IAAI,EAAE,GAAG,EAAE,GAAG,QAAQ,CAAC;IAC/B,gBAAgB,CAAC,EAAE,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,KAAK,QAAQ,CAAC;CACrD;AAED,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,KAAK,GAAG,MAAM,GAAG,QAAQ,GAAG,OAAO,GAAG,WAAW,CAAA;IACvD,OAAO,EAAE;QACP,MAAM,CAAC,EAAE,MAAM,GAAG;YAAE,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;SAAE,CAAA;QACxC,GAAG,CAAC,EAAE,MAAM,CAAA;QACZ,KAAK,CAAC,EAAE,GAAG,CAAA;QACX,MAAM,CAAC,EAAE,MAAM,CAAA;QACf,IAAI,CAAC,EAAE,GAAG,EAAE,CAAA;QACZ,KAAK,CAAC,EAAE,MAAM,EAAE,CAAA;QAChB,IAAI,CAAC,EAAE,MAAM,CAAA;QACb,WAAW,CAAC,EAAE,MAAM,GAAG,QAAQ,CAAA;QAC/B,EAAE,CAAC,EAAE,MAAM,CAAA;KACZ,CAAA;CACF;AAED,MAAM,WAAW,cAAc;IAC7B,OAAO,EAAE,OAAO,GAAG,IAAI,CAAC;IACxB,GAAG,EAAE,GAAG,GAAG,IAAI,CAAC;IAChB,SAAS,EAAE,wBAAwB,CAAC;IACpC,UAAU,EAAE,CAAC,WAAW,EAAE,MAAM,KAAK,wBAAwB,GAAG,IAAI,CAAC;IACrE,WAAW,EAAE,CAAC,KAAK,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,KAAK,GAAG,CAAC;IACtD,WAAW,EAAE,CAAC,OAAO,EAAE,cAAc,KAAK,OAAO,CAAC,GAAG,CAAC,CAAC;IACvD,SAAS,EAAE,KAAK,CAAC,CAAC,OAAO,EAAE,GAAG,KAAK,IAAI,CAAC,CAAC;IACzC,kBAAkB,EAAE,CAAC,QAAQ,EAAE,CAAC,OAAO,EAAE,GAAG,KAAK,IAAI,KAAK,MAAM,IAAI,CAAC;IACrE,qBAAqB,EAAE,CAAC,QAAQ,EAAE,CAAC,OAAO,EAAE,GAAG,KAAK,IAAI,KAAK,IAAI,CAAC;IAClE,eAAe,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,EAAE,KAAK,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,KAAK,GAAG,CAAC;CAChF;AAED,eAAO,MAAM,qBAAqB,aAAc,QAAQ,cAAc,MAAM,KAAG,IAE9E,CAAA;AAED,eAAO,MAAM,yBAAyB,aAAc,QAAQ,cAAc,OAAO,MAAM,EAAE,GAAG,CAAC,KAAG,IA2B/F,CAAA;AAED,eAAO,MAAM,sBAAsB,aAAc,QAAQ,WAAW,MAAM,EAAE,KAAG,IAa9E,CAAA;AAED,eAAO,MAAM,0BAA0B,gBAAiB,kBAAkB,mBAAmB,MAAM,KAAG,IAwBrG,CAAA;AACD,eAAO,MAAM,iBAAiB;gBAKhB,MAAM;;;0CAenB,CAAA"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ✔ bindchange
|
|
3
|
+
*/
|
|
4
|
+
import { ReactNode } from 'react';
|
|
5
|
+
import { View, NativeSyntheticEvent, ViewStyle } from 'react-native';
|
|
6
|
+
import { HandlerRef } from './useNodesRef';
|
|
7
|
+
export interface CheckboxGroupProps {
|
|
8
|
+
name: string;
|
|
9
|
+
style?: ViewStyle & Record<string, any>;
|
|
10
|
+
'enable-offset'?: boolean;
|
|
11
|
+
'enable-var'?: boolean;
|
|
12
|
+
'external-var-context'?: Record<string, any>;
|
|
13
|
+
'parent-font-size'?: number;
|
|
14
|
+
'parent-width'?: number;
|
|
15
|
+
'parent-height'?: number;
|
|
16
|
+
children: ReactNode;
|
|
17
|
+
bindchange?: (evt: NativeSyntheticEvent<TouchEvent> | unknown) => void;
|
|
18
|
+
}
|
|
19
|
+
declare const CheckboxGroup: import("react").ForwardRefExoticComponent<CheckboxGroupProps & import("react").RefAttributes<HandlerRef<View, CheckboxGroupProps>>>;
|
|
20
|
+
export default CheckboxGroup;
|
|
21
|
+
//# sourceMappingURL=mpx-checkbox-group.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mpx-checkbox-group.d.ts","sourceRoot":"","sources":["../mpx-checkbox-group.tsx"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAIL,SAAS,EAKV,MAAM,OAAO,CAAA;AACd,OAAO,EACL,IAAI,EACJ,oBAAoB,EACpB,SAAS,EACV,MAAM,cAAc,CAAA;AAIrB,OAAoB,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA;AAIvD,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,MAAM,CAAA;IACZ,KAAK,CAAC,EAAE,SAAS,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IACvC,eAAe,CAAC,EAAE,OAAO,CAAA;IACzB,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,EAAE,SAAS,CAAA;IACnB,UAAU,CAAC,EAAE,CAAC,GAAG,EAAE,oBAAoB,CAAC,UAAU,CAAC,GAAG,OAAO,KAAK,IAAI,CAAA;CACvE;AAED,QAAA,MAAM,aAAa,qIAkJjB,CAAA;AAIF,eAAe,aAAa,CAAA"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ✔ value
|
|
3
|
+
* ✔ disabled
|
|
4
|
+
* ✔ checked
|
|
5
|
+
* ✔ color
|
|
6
|
+
*/
|
|
7
|
+
import { ReactNode } from 'react';
|
|
8
|
+
import { View, ViewStyle, NativeSyntheticEvent } from 'react-native';
|
|
9
|
+
import { HandlerRef } from './useNodesRef';
|
|
10
|
+
interface Selection {
|
|
11
|
+
value?: string;
|
|
12
|
+
checked?: boolean;
|
|
13
|
+
}
|
|
14
|
+
export interface CheckboxProps extends Selection {
|
|
15
|
+
disabled?: boolean;
|
|
16
|
+
color?: string;
|
|
17
|
+
style?: ViewStyle & Record<string, any>;
|
|
18
|
+
groupValue?: Array<string>;
|
|
19
|
+
'enable-offset'?: boolean;
|
|
20
|
+
'enable-var'?: boolean;
|
|
21
|
+
'external-var-context'?: Record<string, any>;
|
|
22
|
+
'parent-font-size'?: number;
|
|
23
|
+
'parent-width'?: number;
|
|
24
|
+
'parent-height'?: number;
|
|
25
|
+
children?: ReactNode;
|
|
26
|
+
bindtap?: (evt: NativeSyntheticEvent<TouchEvent> | unknown) => void;
|
|
27
|
+
_onChange?: (evt: NativeSyntheticEvent<TouchEvent> | unknown, { checked }: {
|
|
28
|
+
checked: boolean;
|
|
29
|
+
}) => void;
|
|
30
|
+
}
|
|
31
|
+
declare const Checkbox: import("react").ForwardRefExoticComponent<CheckboxProps & import("react").RefAttributes<HandlerRef<View, CheckboxProps>>>;
|
|
32
|
+
export default Checkbox;
|
|
33
|
+
//# sourceMappingURL=mpx-checkbox.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mpx-checkbox.d.ts","sourceRoot":"","sources":["../mpx-checkbox.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAML,SAAS,EAKV,MAAM,OAAO,CAAA;AACd,OAAO,EACL,IAAI,EAEJ,SAAS,EACT,oBAAoB,EACrB,MAAM,cAAc,CAAA;AAGrB,OAAoB,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA;AAMvD,UAAU,SAAS;IACjB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB;AAED,MAAM,WAAW,aAAc,SAAQ,SAAS;IAC9C,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,KAAK,CAAC,EAAE,SAAS,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IACvC,UAAU,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAA;IAC1B,eAAe,CAAC,EAAE,OAAO,CAAA;IACzB,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,SAAS,CAAA;IACpB,OAAO,CAAC,EAAE,CAAC,GAAG,EAAE,oBAAoB,CAAC,UAAU,CAAC,GAAG,OAAO,KAAK,IAAI,CAAA;IACnE,SAAS,CAAC,EAAE,CAAC,GAAG,EAAE,oBAAoB,CAAC,UAAU,CAAC,GAAG,OAAO,EAAE,EAAE,OAAO,EAAE,EAAE;QAAE,OAAO,EAAE,OAAO,CAAA;KAAE,KAAK,IAAI,CAAA;CACzG;AA6BD,QAAA,MAAM,QAAQ,2HA8Jb,CAAA;AAID,eAAe,QAAQ,CAAA"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ✘ report-submit
|
|
3
|
+
* ✘ report-submit-timeout
|
|
4
|
+
* ✔ bindsubmit
|
|
5
|
+
* ✔ bindreset
|
|
6
|
+
*/
|
|
7
|
+
import { View } from 'react-native';
|
|
8
|
+
import { ReactNode } from 'react';
|
|
9
|
+
import { HandlerRef } from './useNodesRef';
|
|
10
|
+
interface FormProps {
|
|
11
|
+
style?: Record<string, any>;
|
|
12
|
+
children?: ReactNode;
|
|
13
|
+
'enable-offset'?: 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
|
+
bindsubmit?: (evt: {
|
|
20
|
+
detail: {
|
|
21
|
+
value: any;
|
|
22
|
+
};
|
|
23
|
+
}) => void;
|
|
24
|
+
bindreset?: () => void;
|
|
25
|
+
}
|
|
26
|
+
declare const _Form: import("react").ForwardRefExoticComponent<FormProps & import("react").RefAttributes<HandlerRef<View, FormProps>>>;
|
|
27
|
+
export default _Form;
|
|
28
|
+
//# sourceMappingURL=mpx-form.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mpx-form.d.ts","sourceRoot":"","sources":["../mpx-form.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAA;AACnC,OAAO,EAA2B,SAAS,EAA0B,MAAM,OAAO,CAAA;AAClF,OAAoB,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA;AAIvD,UAAU,SAAS;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IAC3B,QAAQ,CAAC,EAAE,SAAS,CAAA;IACpB,eAAe,CAAC,EAAE,OAAO,CAAA;IACzB,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,UAAU,CAAC,EAAE,CAAC,GAAG,EAAE;QACjB,MAAM,EAAE;YACN,KAAK,EAAE,GAAG,CAAA;SACX,CAAA;KACF,KAAK,IAAI,CAAA;IACV,SAAS,CAAC,EAAE,MAAM,IAAI,CAAA;CACvB;AAED,QAAA,MAAM,KAAK,mHA+FT,CAAA;AAIF,eAAe,KAAK,CAAA"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { Text, TextStyle } from 'react-native';
|
|
3
|
+
import { HandlerRef } from '../useNodesRef';
|
|
4
|
+
export type IconType = 'success' | 'success_no_circle' | 'info' | 'warn' | 'waiting' | 'cancel' | 'download' | 'search' | 'clear';
|
|
5
|
+
export interface IconProps {
|
|
6
|
+
type: IconType;
|
|
7
|
+
size?: number;
|
|
8
|
+
color?: string;
|
|
9
|
+
style?: TextStyle & Record<string, any>;
|
|
10
|
+
'enable-offset'?: boolean;
|
|
11
|
+
'enable-var'?: boolean;
|
|
12
|
+
'external-var-context'?: Record<string, any>;
|
|
13
|
+
'parent-font-size'?: number;
|
|
14
|
+
'parent-width'?: number;
|
|
15
|
+
'parent-height'?: number;
|
|
16
|
+
}
|
|
17
|
+
declare const Icon: import("react").ForwardRefExoticComponent<IconProps & import("react").RefAttributes<HandlerRef<Text, IconProps>>>;
|
|
18
|
+
export default Icon;
|
|
19
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../mpx-icon/index.tsx"],"names":[],"mappings":";AAMA,OAAO,EAAE,IAAI,EAAE,SAAS,EAAS,MAAM,cAAc,CAAA;AAErD,OAAoB,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAA;AAaxD,MAAM,MAAM,QAAQ,GAChB,SAAS,GACT,mBAAmB,GACnB,MAAM,GACN,MAAM,GACN,SAAS,GACT,QAAQ,GACR,UAAU,GACV,QAAQ,GACR,OAAO,CAAA;AAEX,MAAM,WAAW,SAAS;IACxB,IAAI,EAAE,QAAQ,CAAA;IACd,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,KAAK,CAAC,EAAE,SAAS,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IACvC,eAAe,CAAC,EAAE,OAAO,CAAA;IACzB,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;CACzB;AAcD,QAAA,MAAM,IAAI,mHA0DT,CAAA;AAID,eAAe,IAAI,CAAA"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { Image as RNImage, ImageStyle, NativeSyntheticEvent, ImageErrorEventData, ImageLoadEventData } from 'react-native';
|
|
3
|
+
import { HandlerRef } from './useNodesRef';
|
|
4
|
+
export type Mode = 'scaleToFill' | 'aspectFit' | 'aspectFill' | 'widthFix' | 'heightFix' | 'top' | 'bottom' | 'center' | 'left' | 'right' | 'top left' | 'top right' | 'bottom left' | 'bottom right';
|
|
5
|
+
export interface ImageProps {
|
|
6
|
+
src?: string;
|
|
7
|
+
mode?: Mode;
|
|
8
|
+
svg?: boolean;
|
|
9
|
+
style?: ImageStyle & Record<string, any>;
|
|
10
|
+
'enable-offset'?: boolean;
|
|
11
|
+
'enable-var'?: boolean;
|
|
12
|
+
'external-var-context'?: Record<string, any>;
|
|
13
|
+
'parent-font-size'?: number;
|
|
14
|
+
'parent-width'?: number;
|
|
15
|
+
'parent-height'?: number;
|
|
16
|
+
'enable-fast-image'?: boolean;
|
|
17
|
+
bindload?: (evt: NativeSyntheticEvent<ImageLoadEventData> | unknown) => void;
|
|
18
|
+
binderror?: (evt: NativeSyntheticEvent<ImageErrorEventData> | unknown) => void;
|
|
19
|
+
}
|
|
20
|
+
declare const Image: import("react").ForwardRefExoticComponent<ImageProps & import("react").RefAttributes<HandlerRef<RNImage, ImageProps>>>;
|
|
21
|
+
export default Image;
|
|
22
|
+
//# sourceMappingURL=mpx-image.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mpx-image.d.ts","sourceRoot":"","sources":["../mpx-image.tsx"],"names":[],"mappings":";AAaA,OAAO,EACL,KAAK,IAAI,OAAO,EAEhB,UAAU,EAEV,oBAAoB,EACpB,mBAAmB,EAGnB,kBAAkB,EACnB,MAAM,cAAc,CAAA;AAIrB,OAAoB,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA;AAIvD,MAAM,MAAM,IAAI,GACZ,aAAa,GACb,WAAW,GACX,YAAY,GACZ,UAAU,GACV,WAAW,GACX,KAAK,GACL,QAAQ,GACR,QAAQ,GACR,MAAM,GACN,OAAO,GACP,UAAU,GACV,WAAW,GACX,aAAa,GACb,cAAc,CAAA;AAElB,MAAM,WAAW,UAAU;IACzB,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,IAAI,CAAC,EAAE,IAAI,CAAA;IACX,GAAG,CAAC,EAAE,OAAO,CAAA;IACb,KAAK,CAAC,EAAE,UAAU,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IACxC,eAAe,CAAC,EAAE,OAAO,CAAA;IACzB,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,mBAAmB,CAAC,EAAE,OAAO,CAAA;IAC7B,QAAQ,CAAC,EAAE,CAAC,GAAG,EAAE,oBAAoB,CAAC,kBAAkB,CAAC,GAAG,OAAO,KAAK,IAAI,CAAA;IAC5E,SAAS,CAAC,EAAE,CAAC,GAAG,EAAE,oBAAoB,CAAC,mBAAmB,CAAC,GAAG,OAAO,KAAK,IAAI,CAAA;CAC/E;AAmED,QAAA,MAAM,KAAK,wHAoYT,CAAA;AAIF,eAAe,KAAK,CAAA"}
|