@mpxjs/webpack-plugin 2.10.16-beta.5 → 2.10.16-beta.7

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.
Files changed (160) hide show
  1. package/lib/loader.js +2 -2
  2. package/lib/runtime/components/react/context.ts +10 -6
  3. package/lib/runtime/components/react/dist/context.d.ts +75 -0
  4. package/lib/runtime/components/react/dist/context.d.ts.map +1 -0
  5. package/lib/runtime/components/react/dist/event.config.d.ts +8 -0
  6. package/lib/runtime/components/react/dist/event.config.d.ts.map +1 -0
  7. package/lib/runtime/components/react/dist/getInnerListeners.d.ts +8 -0
  8. package/lib/runtime/components/react/dist/getInnerListeners.d.ts.map +1 -0
  9. package/lib/runtime/components/react/dist/mpx-async-suspense.d.ts +13 -0
  10. package/lib/runtime/components/react/dist/mpx-async-suspense.d.ts.map +1 -0
  11. package/lib/runtime/components/react/dist/mpx-button.d.ts +69 -0
  12. package/lib/runtime/components/react/dist/mpx-button.d.ts.map +1 -0
  13. package/lib/runtime/components/react/dist/mpx-camera.d.ts +28 -0
  14. package/lib/runtime/components/react/dist/mpx-camera.d.ts.map +1 -0
  15. package/lib/runtime/components/react/dist/mpx-canvas/Bus.d.ts +24 -0
  16. package/lib/runtime/components/react/dist/mpx-canvas/Bus.d.ts.map +1 -0
  17. package/lib/runtime/components/react/dist/mpx-canvas/CanvasGradient.d.ts +8 -0
  18. package/lib/runtime/components/react/dist/mpx-canvas/CanvasGradient.d.ts.map +1 -0
  19. package/lib/runtime/components/react/dist/mpx-canvas/CanvasRenderingContext2D.d.ts +7 -0
  20. package/lib/runtime/components/react/dist/mpx-canvas/CanvasRenderingContext2D.d.ts.map +1 -0
  21. package/lib/runtime/components/react/dist/mpx-canvas/Image.d.ts +21 -0
  22. package/lib/runtime/components/react/dist/mpx-canvas/Image.d.ts.map +1 -0
  23. package/lib/runtime/components/react/dist/mpx-canvas/ImageData.d.ts +9 -0
  24. package/lib/runtime/components/react/dist/mpx-canvas/ImageData.d.ts.map +1 -0
  25. package/lib/runtime/components/react/dist/mpx-canvas/constructorsRegistry.d.ts +11 -0
  26. package/lib/runtime/components/react/dist/mpx-canvas/constructorsRegistry.d.ts.map +1 -0
  27. package/lib/runtime/components/react/dist/mpx-canvas/html.d.ts +3 -0
  28. package/lib/runtime/components/react/dist/mpx-canvas/html.d.ts.map +1 -0
  29. package/lib/runtime/components/react/dist/mpx-canvas/index.d.ts +33 -0
  30. package/lib/runtime/components/react/dist/mpx-canvas/index.d.ts.map +1 -0
  31. package/lib/runtime/components/react/dist/mpx-canvas/utils.d.ts +53 -0
  32. package/lib/runtime/components/react/dist/mpx-canvas/utils.d.ts.map +1 -0
  33. package/lib/runtime/components/react/dist/mpx-checkbox-group.d.ts +21 -0
  34. package/lib/runtime/components/react/dist/mpx-checkbox-group.d.ts.map +1 -0
  35. package/lib/runtime/components/react/dist/mpx-checkbox.d.ts +33 -0
  36. package/lib/runtime/components/react/dist/mpx-checkbox.d.ts.map +1 -0
  37. package/lib/runtime/components/react/dist/mpx-form.d.ts +28 -0
  38. package/lib/runtime/components/react/dist/mpx-form.d.ts.map +1 -0
  39. package/lib/runtime/components/react/dist/mpx-icon/index.d.ts +19 -0
  40. package/lib/runtime/components/react/dist/mpx-icon/index.d.ts.map +1 -0
  41. package/lib/runtime/components/react/dist/mpx-image.d.ts +22 -0
  42. package/lib/runtime/components/react/dist/mpx-image.d.ts.map +1 -0
  43. package/lib/runtime/components/react/dist/mpx-inline-text.d.ts +8 -0
  44. package/lib/runtime/components/react/dist/mpx-inline-text.d.ts.map +1 -0
  45. package/lib/runtime/components/react/dist/mpx-input.d.ts +50 -0
  46. package/lib/runtime/components/react/dist/mpx-input.d.ts.map +1 -0
  47. package/lib/runtime/components/react/dist/mpx-input.jsx +35 -9
  48. package/lib/runtime/components/react/dist/mpx-keyboard-avoiding-view.d.ts +13 -0
  49. package/lib/runtime/components/react/dist/mpx-keyboard-avoiding-view.d.ts.map +1 -0
  50. package/lib/runtime/components/react/dist/mpx-keyboard-avoiding-view.jsx +46 -53
  51. package/lib/runtime/components/react/dist/mpx-label.d.ts +21 -0
  52. package/lib/runtime/components/react/dist/mpx-label.d.ts.map +1 -0
  53. package/lib/runtime/components/react/dist/mpx-movable-area.d.ts +21 -0
  54. package/lib/runtime/components/react/dist/mpx-movable-area.d.ts.map +1 -0
  55. package/lib/runtime/components/react/dist/mpx-movable-view.d.ts +66 -0
  56. package/lib/runtime/components/react/dist/mpx-movable-view.d.ts.map +1 -0
  57. package/lib/runtime/components/react/dist/mpx-nav.d.ts +9 -0
  58. package/lib/runtime/components/react/dist/mpx-nav.d.ts.map +1 -0
  59. package/lib/runtime/components/react/dist/mpx-nav.jsx +132 -0
  60. package/lib/runtime/components/react/dist/mpx-navigator.d.ts +10 -0
  61. package/lib/runtime/components/react/dist/mpx-navigator.d.ts.map +1 -0
  62. package/lib/runtime/components/react/dist/mpx-picker/date.d.ts +7 -0
  63. package/lib/runtime/components/react/dist/mpx-picker/date.d.ts.map +1 -0
  64. package/lib/runtime/components/react/dist/mpx-picker/dateData.d.ts +8 -0
  65. package/lib/runtime/components/react/dist/mpx-picker/dateData.d.ts.map +1 -0
  66. package/lib/runtime/components/react/dist/mpx-picker/index.d.ts +7 -0
  67. package/lib/runtime/components/react/dist/mpx-picker/index.d.ts.map +1 -0
  68. package/lib/runtime/components/react/dist/mpx-picker/multiSelector.d.ts +7 -0
  69. package/lib/runtime/components/react/dist/mpx-picker/multiSelector.d.ts.map +1 -0
  70. package/lib/runtime/components/react/dist/mpx-picker/region.d.ts +7 -0
  71. package/lib/runtime/components/react/dist/mpx-picker/region.d.ts.map +1 -0
  72. package/lib/runtime/components/react/dist/mpx-picker/regionData.d.ts +3 -0
  73. package/lib/runtime/components/react/dist/mpx-picker/regionData.d.ts.map +1 -0
  74. package/lib/runtime/components/react/dist/mpx-picker/selector.d.ts +7 -0
  75. package/lib/runtime/components/react/dist/mpx-picker/selector.d.ts.map +1 -0
  76. package/lib/runtime/components/react/dist/mpx-picker/time.d.ts +7 -0
  77. package/lib/runtime/components/react/dist/mpx-picker/time.d.ts.map +1 -0
  78. package/lib/runtime/components/react/dist/mpx-picker/type.d.ts +107 -0
  79. package/lib/runtime/components/react/dist/mpx-picker/type.d.ts.map +1 -0
  80. package/lib/runtime/components/react/dist/mpx-picker-view/index.d.ts +33 -0
  81. package/lib/runtime/components/react/dist/mpx-picker-view/index.d.ts.map +1 -0
  82. package/lib/runtime/components/react/dist/mpx-picker-view/pickerVIewContext.d.ts +9 -0
  83. package/lib/runtime/components/react/dist/mpx-picker-view/pickerVIewContext.d.ts.map +1 -0
  84. package/lib/runtime/components/react/dist/mpx-picker-view-column/index.d.ts +24 -0
  85. package/lib/runtime/components/react/dist/mpx-picker-view-column/index.d.ts.map +1 -0
  86. package/lib/runtime/components/react/dist/mpx-picker-view-column/pickerViewColumnItem.d.ts +15 -0
  87. package/lib/runtime/components/react/dist/mpx-picker-view-column/pickerViewColumnItem.d.ts.map +1 -0
  88. package/lib/runtime/components/react/dist/mpx-picker-view-column/pickerViewColumnItemLite.d.ts +14 -0
  89. package/lib/runtime/components/react/dist/mpx-picker-view-column/pickerViewColumnItemLite.d.ts.map +1 -0
  90. package/lib/runtime/components/react/dist/mpx-picker-view-column/pickerViewFaces.d.ts +17 -0
  91. package/lib/runtime/components/react/dist/mpx-picker-view-column/pickerViewFaces.d.ts.map +1 -0
  92. package/lib/runtime/components/react/dist/mpx-picker-view-column/pickerViewIndicator.d.ts +13 -0
  93. package/lib/runtime/components/react/dist/mpx-picker-view-column/pickerViewIndicator.d.ts.map +1 -0
  94. package/lib/runtime/components/react/dist/mpx-picker-view-column/pickerViewMask.d.ts +12 -0
  95. package/lib/runtime/components/react/dist/mpx-picker-view-column/pickerViewMask.d.ts.map +1 -0
  96. package/lib/runtime/components/react/dist/mpx-popup/index.d.ts +23 -0
  97. package/lib/runtime/components/react/dist/mpx-popup/index.d.ts.map +1 -0
  98. package/lib/runtime/components/react/dist/mpx-popup/popupBase.d.ts +17 -0
  99. package/lib/runtime/components/react/dist/mpx-popup/popupBase.d.ts.map +1 -0
  100. package/lib/runtime/components/react/dist/mpx-portal/index.d.ts +16 -0
  101. package/lib/runtime/components/react/dist/mpx-portal/index.d.ts.map +1 -0
  102. package/lib/runtime/components/react/dist/mpx-portal/portal-host.d.ts +30 -0
  103. package/lib/runtime/components/react/dist/mpx-portal/portal-host.d.ts.map +1 -0
  104. package/lib/runtime/components/react/dist/mpx-portal/portal-manager.d.ts +10 -0
  105. package/lib/runtime/components/react/dist/mpx-portal/portal-manager.d.ts.map +1 -0
  106. package/lib/runtime/components/react/dist/mpx-progress.d.ts +24 -0
  107. package/lib/runtime/components/react/dist/mpx-progress.d.ts.map +1 -0
  108. package/lib/runtime/components/react/dist/mpx-radio-group.d.ts +21 -0
  109. package/lib/runtime/components/react/dist/mpx-radio-group.d.ts.map +1 -0
  110. package/lib/runtime/components/react/dist/mpx-radio.d.ts +27 -0
  111. package/lib/runtime/components/react/dist/mpx-radio.d.ts.map +1 -0
  112. package/lib/runtime/components/react/dist/mpx-rich-text/html.d.ts +2 -0
  113. package/lib/runtime/components/react/dist/mpx-rich-text/html.d.ts.map +1 -0
  114. package/lib/runtime/components/react/dist/mpx-rich-text/index.d.ts +25 -0
  115. package/lib/runtime/components/react/dist/mpx-rich-text/index.d.ts.map +1 -0
  116. package/lib/runtime/components/react/dist/mpx-root-portal.d.ts +15 -0
  117. package/lib/runtime/components/react/dist/mpx-root-portal.d.ts.map +1 -0
  118. package/lib/runtime/components/react/dist/mpx-scroll-view.d.ts +55 -0
  119. package/lib/runtime/components/react/dist/mpx-scroll-view.d.ts.map +1 -0
  120. package/lib/runtime/components/react/dist/mpx-simple-text.d.ts +8 -0
  121. package/lib/runtime/components/react/dist/mpx-simple-text.d.ts.map +1 -0
  122. package/lib/runtime/components/react/dist/mpx-simple-view.d.ts +8 -0
  123. package/lib/runtime/components/react/dist/mpx-simple-view.d.ts.map +1 -0
  124. package/lib/runtime/components/react/dist/mpx-slider.d.ts +31 -0
  125. package/lib/runtime/components/react/dist/mpx-slider.d.ts.map +1 -0
  126. package/lib/runtime/components/react/dist/mpx-sticky-header.d.ts +18 -0
  127. package/lib/runtime/components/react/dist/mpx-sticky-header.d.ts.map +1 -0
  128. package/lib/runtime/components/react/dist/mpx-sticky-section.d.ts +16 -0
  129. package/lib/runtime/components/react/dist/mpx-sticky-section.d.ts.map +1 -0
  130. package/lib/runtime/components/react/dist/mpx-swiper-item.d.ts +19 -0
  131. package/lib/runtime/components/react/dist/mpx-swiper-item.d.ts.map +1 -0
  132. package/lib/runtime/components/react/dist/mpx-swiper.d.ts +53 -0
  133. package/lib/runtime/components/react/dist/mpx-swiper.d.ts.map +1 -0
  134. package/lib/runtime/components/react/dist/mpx-switch.d.ts +27 -0
  135. package/lib/runtime/components/react/dist/mpx-switch.d.ts.map +1 -0
  136. package/lib/runtime/components/react/dist/mpx-text.d.ts +23 -0
  137. package/lib/runtime/components/react/dist/mpx-text.d.ts.map +1 -0
  138. package/lib/runtime/components/react/dist/mpx-textarea.d.ts +8 -0
  139. package/lib/runtime/components/react/dist/mpx-textarea.d.ts.map +1 -0
  140. package/lib/runtime/components/react/dist/mpx-video.d.ts +102 -0
  141. package/lib/runtime/components/react/dist/mpx-video.d.ts.map +1 -0
  142. package/lib/runtime/components/react/dist/mpx-view.d.ts +35 -0
  143. package/lib/runtime/components/react/dist/mpx-view.d.ts.map +1 -0
  144. package/lib/runtime/components/react/dist/mpx-web-view.d.ts +23 -0
  145. package/lib/runtime/components/react/dist/mpx-web-view.d.ts.map +1 -0
  146. package/lib/runtime/components/react/dist/parser.d.ts +40 -0
  147. package/lib/runtime/components/react/dist/parser.d.ts.map +1 -0
  148. package/lib/runtime/components/react/dist/useAnimationHooks.d.ts +33 -0
  149. package/lib/runtime/components/react/dist/useAnimationHooks.d.ts.map +1 -0
  150. package/lib/runtime/components/react/dist/useNodesRef.d.ts +12 -0
  151. package/lib/runtime/components/react/dist/useNodesRef.d.ts.map +1 -0
  152. package/lib/runtime/components/react/dist/utils.d.ts +123 -0
  153. package/lib/runtime/components/react/dist/utils.d.ts.map +1 -0
  154. package/lib/runtime/components/react/mpx-camera.tsx +1 -1
  155. package/lib/runtime/components/react/mpx-input.tsx +41 -16
  156. package/lib/runtime/components/react/mpx-keyboard-avoiding-view.tsx +48 -58
  157. package/lib/runtime/components/react/mpx-nav.tsx +155 -0
  158. package/lib/runtime/components/react/types/common.d.ts +19 -0
  159. package/lib/style-compiler/strip-conditional-loader.js +27 -4
  160. package/package.json +6 -3
package/lib/loader.js CHANGED
@@ -147,7 +147,7 @@ module.exports = function (content) {
147
147
  hasScoped,
148
148
  hasComment,
149
149
  isNative,
150
- usingComponentsInfo: JSON.stringify(usingComponentsInfo),
150
+ usingComponentsInfo,
151
151
  originalUsingComponents,
152
152
  componentGenerics,
153
153
  autoScope,
@@ -170,7 +170,7 @@ module.exports = function (content) {
170
170
  hasScoped,
171
171
  hasComment,
172
172
  isNative,
173
- usingComponentsInfo: JSON.stringify(usingComponentsInfo),
173
+ usingComponentsInfo,
174
174
  originalUsingComponents,
175
175
  componentGenerics,
176
176
  autoScope,
@@ -6,9 +6,13 @@ export type LabelContextValue = MutableRefObject<{
6
6
  triggerChange: (evt: NativeSyntheticEvent<TouchEvent>) => void
7
7
  }>
8
8
 
9
- export type KeyboardAvoidContextValue = MutableRefObject<
10
- { cursorSpacing: number, ref: MutableRefObject<any> } | null
11
- >
9
+ export type KeyboardAvoidContextValue = MutableRefObject<{
10
+ cursorSpacing: number
11
+ ref: MutableRefObject<any>
12
+ adjustPosition: boolean
13
+ keyboardHeight?: number
14
+ onKeyboardShow?: () => void
15
+ } | null>
12
16
 
13
17
  export interface GroupValue {
14
18
  [key: string]: { checked: boolean; setValue: Dispatch<SetStateAction<boolean>> }
@@ -37,13 +41,13 @@ export interface IntersectionObserver {
37
41
  }
38
42
 
39
43
  export interface PortalContextValue {
40
- mount: (children: React.ReactNode, key?: number | null, id?: number| null) => number| undefined
44
+ mount: (children: React.ReactNode, key?: number | null, id?: number | null) => number | undefined
41
45
  update: (key: number, children: React.ReactNode) => void
42
46
  unmount: (key: number) => void
43
47
  }
44
48
 
45
49
  export interface ScrollViewContextValue {
46
- gestureRef: React.RefObject<any> | null,
50
+ gestureRef: React.RefObject<any> | null
47
51
  scrollOffset: Animated.Value
48
52
  }
49
53
 
@@ -53,7 +57,7 @@ export interface RouteContextValue {
53
57
  }
54
58
 
55
59
  export interface StickyContextValue {
56
- registerStickyHeader: Function,
60
+ registerStickyHeader: Function
57
61
  unregisterStickyHeader: Function
58
62
  }
59
63
 
@@ -0,0 +1,75 @@
1
+ import { Dispatch, MutableRefObject, SetStateAction } from 'react';
2
+ import { NativeSyntheticEvent, Animated } from 'react-native';
3
+ export type LabelContextValue = MutableRefObject<{
4
+ triggerChange: (evt: NativeSyntheticEvent<TouchEvent>) => void;
5
+ }>;
6
+ export type KeyboardAvoidContextValue = MutableRefObject<{
7
+ cursorSpacing: number;
8
+ ref: MutableRefObject<any>;
9
+ adjustPosition: boolean;
10
+ keyboardHeight?: number;
11
+ onKeyboardShow?: () => void;
12
+ } | null>;
13
+ export interface GroupValue {
14
+ [key: string]: {
15
+ checked: boolean;
16
+ setValue: Dispatch<SetStateAction<boolean>>;
17
+ };
18
+ }
19
+ export interface GroupContextValue {
20
+ groupValue: GroupValue;
21
+ notifyChange: (evt: NativeSyntheticEvent<TouchEvent>) => void;
22
+ }
23
+ export interface FormFieldValue {
24
+ getValue: () => any;
25
+ resetValue: ({ newVal, type }: {
26
+ newVal?: any;
27
+ type?: string;
28
+ }) => void;
29
+ }
30
+ export interface FormContextValue {
31
+ formValuesMap: Map<string, FormFieldValue>;
32
+ submit: () => void;
33
+ reset: () => void;
34
+ }
35
+ export interface IntersectionObserver {
36
+ [key: number]: {
37
+ throttleMeasure: () => void;
38
+ };
39
+ }
40
+ export interface PortalContextValue {
41
+ mount: (children: React.ReactNode, key?: number | null, id?: number | null) => number | undefined;
42
+ update: (key: number, children: React.ReactNode) => void;
43
+ unmount: (key: number) => void;
44
+ }
45
+ export interface ScrollViewContextValue {
46
+ gestureRef: React.RefObject<any> | null;
47
+ scrollOffset: Animated.Value;
48
+ }
49
+ export interface RouteContextValue {
50
+ pageId: number;
51
+ navigation: Record<string, any>;
52
+ }
53
+ export interface StickyContextValue {
54
+ registerStickyHeader: Function;
55
+ unregisterStickyHeader: Function;
56
+ }
57
+ export declare const MovableAreaContext: import("react").Context<{
58
+ width: number;
59
+ height: number;
60
+ }>;
61
+ export declare const FormContext: import("react").Context<FormContextValue | null>;
62
+ export declare const CheckboxGroupContext: import("react").Context<GroupContextValue | null>;
63
+ export declare const RadioGroupContext: import("react").Context<GroupContextValue | null>;
64
+ export declare const LabelContext: import("react").Context<LabelContextValue | null>;
65
+ export declare const PickerContext: import("react").Context<null>;
66
+ export declare const VarContext: import("react").Context<{}>;
67
+ export declare const IntersectionObserverContext: import("react").Context<IntersectionObserver | null>;
68
+ export declare const RouteContext: import("react").Context<RouteContextValue | null>;
69
+ export declare const SwiperContext: import("react").Context<{}>;
70
+ export declare const KeyboardAvoidContext: import("react").Context<KeyboardAvoidContextValue | null>;
71
+ export declare const ScrollViewContext: import("react").Context<ScrollViewContextValue>;
72
+ export declare const PortalContext: import("react").Context<PortalContextValue>;
73
+ export declare const StickyContext: import("react").Context<StickyContextValue>;
74
+ export declare const ProviderContext: import("react").Context<null>;
75
+ //# sourceMappingURL=context.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../context.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,QAAQ,EAAE,gBAAgB,EAAE,cAAc,EAAE,MAAM,OAAO,CAAA;AACjF,OAAO,EAAE,oBAAoB,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAA;AAG7D,MAAM,MAAM,iBAAiB,GAAG,gBAAgB,CAAC;IAC/C,aAAa,EAAE,CAAC,GAAG,EAAE,oBAAoB,CAAC,UAAU,CAAC,K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
@@ -0,0 +1,8 @@
1
+ declare const eventConfigMap: {
2
+ [key: string]: {
3
+ bitFlag: string;
4
+ events: string[];
5
+ };
6
+ };
7
+ export default eventConfigMap;
8
+ //# sourceMappingURL=event.config.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"event.config.d.ts","sourceRoot":"","sources":["../event.config.ts"],"names":[],"mappings":"AAAA,QAAA,MAAM,cAAc,EAAE;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG;QAAE,OAAO,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,EAAE,CAAA;KAAE,CAAA;CAyB3E,CAAA;AAED,eAAe,cAAc,CAAA"}
@@ -0,0 +1,8 @@
1
+ import { Props, RawConfig, RemoveProps, LayoutRef, ExtendedNativeTouchEvent } from './types/getInnerListeners';
2
+ export declare const getCustomEvent: (type: string | undefined, oe: any, { detail, layoutRef }: {
3
+ detail?: Record<string, unknown> | undefined;
4
+ layoutRef?: LayoutRef | undefined;
5
+ }, props?: Props) => any;
6
+ declare const useInnerProps: (props?: Props, userRemoveProps?: RemoveProps, rawConfig?: RawConfig) => Record<string, (e: ExtendedNativeTouchEvent) => void> & Omit<Props, string>;
7
+ export default useInnerProps;
8
+ //# sourceMappingURL=getInnerListeners.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getInnerListeners.d.ts","sourceRoot":"","sources":["../getInnerListeners.ts"],"names":[],"mappings":"AAIA,OAAO,EACL,KAAK,EAEL,SAAS,EAET,WAAW,EAEX,SAAS,EACT,wBAAwB,EAEzB,MAAM,2BAA2B,CAAA;AAsElC,eAAO,MAAM,cAAc,iCAErB,GAAG;;;WAKA,KAAK,QAgBb,CAAA;AAyID,QAAA,MAAM,aAAa,WACV,KAAK,6CAEA,SAAS,wBA8Dc,wBAAwB,KAAK,IAAI,uBA2BrE,CAAA;AACD,eAAe,aAAa,CAAA"}
@@ -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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,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,28 @@
1
+ import React from 'react';
2
+ import { Camera } from 'react-native-vision-camera';
3
+ interface CameraProps {
4
+ mode?: 'normal' | 'scanCode';
5
+ resolution?: 'low' | 'medium' | 'high';
6
+ devicePosition?: 'front' | 'back';
7
+ flash?: 'auto' | 'on' | 'off';
8
+ frameSize?: 'small' | 'medium' | 'large';
9
+ style?: Record<string, any>;
10
+ bindstop?: () => void;
11
+ binderror?: (error: {
12
+ message: string;
13
+ }) => void;
14
+ bindinitdone?: (result: {
15
+ type: string;
16
+ data: string;
17
+ }) => void;
18
+ bindscancode?: (result: {
19
+ type: string;
20
+ data: string;
21
+ }) => void;
22
+ }
23
+ type HandlerRef<T, P> = {
24
+ current: T | null;
25
+ };
26
+ declare const _camera: React.ForwardRefExoticComponent<CameraProps & React.RefAttributes<HandlerRef<Camera, CameraProps>>>;
27
+ export default _camera;
28
+ //# sourceMappingURL=mpx-camera.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mpx-camera.d.ts","sourceRoot":"","sources":["../mpx-camera.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA2E,MAAM,OAAO,CAAA;AAC/F,OAAO,EAAE,MAAM,EAAuE,MAAM,4BAA4B,CAAA;AAIxH,UAAU,WAAW;IACnB,IAAI,CAAC,EAAE,QAAQ,GAAG,UAAU,CAAA;IAC5B,UAAU,CAAC,EAAE,KAAK,GAAG,QAAQ,GAAG,MAAM,CAAA;IACtC,cAAc,CAAC,EAAE,OAAO,GAAG,MAAM,CAAA;IACjC,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,KAAK,CAAA;IAC7B,SAAS,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAA;IACxC,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IAC3B,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAA;IACrB,SAAS,CAAC,EAAE,CAAC,KAAK,EAAE;QAAE,OAAO,EAAE,MAAM,CAAA;KAAE,KAAK,IAAI,CAAA;IAChD,YAAY,CAAC,EAAE,CAAC,MAAM,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,KAAK,IAAI,CAAA;IAC/D,YAAY,CAAC,EAAE,CAAC,MAAM,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,KAAK,IAAI,CAAA;CAChE;AASD,KAAK,UAAU,CAAC,CAAC,EAAE,CAAC,IAAI;IAEtB,OAAO,EAAE,CAAC,GAAG,IAAI,CAAA;CAClB,CAAA;AAED,QAAA,MAAM,OAAO,qGAoIX,CAAA;AAIF,eAAe,OAAO,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,C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AAE,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,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