@mpxjs/webpack-plugin 2.10.14-beta.6 → 2.10.14-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.
- package/lib/platform/template/wx/component-config/button.js +12 -3
- package/lib/runtime/components/react/dist/context.d.ts +3 -5
- package/lib/runtime/components/react/dist/context.d.ts.map +1 -0
- package/lib/runtime/components/react/dist/context.js +1 -1
- package/lib/runtime/components/react/dist/event.config.d.ts +1 -0
- package/lib/runtime/components/react/dist/event.config.d.ts.map +1 -0
- package/lib/runtime/components/react/dist/getInnerListeners.d.ts +1 -0
- package/lib/runtime/components/react/dist/getInnerListeners.d.ts.map +1 -0
- package/lib/runtime/components/react/dist/getInnerListeners.js +35 -21
- package/lib/runtime/components/react/dist/mpx-async-suspense.d.ts +1 -0
- package/lib/runtime/components/react/dist/mpx-async-suspense.d.ts.map +1 -0
- package/lib/runtime/components/react/dist/mpx-async-suspense.jsx +2 -2
- package/lib/runtime/components/react/dist/mpx-button.d.ts +1 -0
- package/lib/runtime/components/react/dist/mpx-button.d.ts.map +1 -0
- package/lib/runtime/components/react/dist/mpx-camera.d.ts +27 -0
- package/lib/runtime/components/react/dist/mpx-camera.d.ts.map +1 -0
- package/lib/runtime/components/react/dist/mpx-camera.jsx +197 -0
- package/lib/runtime/components/react/dist/mpx-canvas/Bus.d.ts +1 -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 +1 -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 +1 -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 +1 -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 +1 -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 +1 -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 +1 -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 +1 -0
- package/lib/runtime/components/react/dist/mpx-canvas/index.d.ts.map +1 -0
- package/lib/runtime/components/react/dist/mpx-canvas/utils.d.ts +1 -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 +1 -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 +1 -0
- package/lib/runtime/components/react/dist/mpx-checkbox.d.ts.map +1 -0
- package/lib/runtime/components/react/dist/mpx-form.d.ts +1 -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 +1 -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 +1 -0
- package/lib/runtime/components/react/dist/mpx-image.d.ts.map +1 -0
- package/lib/runtime/components/react/dist/mpx-image.jsx +81 -37
- package/lib/runtime/components/react/dist/mpx-inline-text.d.ts +1 -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 +2 -0
- package/lib/runtime/components/react/dist/mpx-input.d.ts.map +1 -0
- package/lib/runtime/components/react/dist/mpx-input.jsx +19 -12
- package/lib/runtime/components/react/dist/mpx-keyboard-avoiding-view.d.ts +1 -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 +12 -21
- package/lib/runtime/components/react/dist/mpx-label.d.ts +1 -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 +1 -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 +5 -2
- package/lib/runtime/components/react/dist/mpx-movable-view.d.ts.map +1 -0
- package/lib/runtime/components/react/dist/mpx-movable-view.jsx +102 -34
- package/lib/runtime/components/react/dist/{nav.d.ts → mpx-nav.d.ts} +1 -0
- package/lib/runtime/components/react/dist/mpx-nav.d.ts.map +1 -0
- package/lib/runtime/components/react/dist/{nav.jsx → mpx-nav.jsx} +1 -6
- package/lib/runtime/components/react/dist/mpx-navigator.d.ts +1 -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 +1 -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 +1 -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 +1 -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 +1 -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 +1 -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 +1 -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 +1 -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 +1 -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 +1 -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 +2 -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 +1 -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 +2 -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 +15 -21
- package/lib/runtime/components/react/dist/mpx-picker-view-column/pickerViewColumnItem.d.ts +1 -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 +1 -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 +1 -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 +1 -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 +1 -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 +1 -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 +1 -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 +1 -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 +1 -0
- package/lib/runtime/components/react/dist/mpx-portal/portal-manager.d.ts.map +1 -0
- package/lib/runtime/components/react/dist/mpx-portal/portal-manager.jsx +3 -5
- 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-progress.jsx +163 -0
- package/lib/runtime/components/react/dist/mpx-radio-group.d.ts +1 -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 +1 -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 +1 -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 +1 -0
- package/lib/runtime/components/react/dist/mpx-rich-text/index.d.ts.map +1 -0
- package/lib/runtime/components/react/dist/mpx-root-portal.d.ts +1 -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 +1 -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 +69 -51
- package/lib/runtime/components/react/dist/mpx-simple-text.d.ts +1 -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 +1 -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-slider.jsx +321 -0
- package/lib/runtime/components/react/dist/mpx-sticky-header.d.ts +1 -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 +1 -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 +1 -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 +1 -0
- package/lib/runtime/components/react/dist/mpx-swiper.d.ts.map +1 -0
- package/lib/runtime/components/react/dist/mpx-swiper.jsx +9 -16
- package/lib/runtime/components/react/dist/mpx-switch.d.ts +1 -0
- package/lib/runtime/components/react/dist/mpx-switch.d.ts.map +1 -0
- package/lib/runtime/components/react/dist/mpx-text.d.ts +3 -1
- 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 +1 -0
- package/lib/runtime/components/react/dist/mpx-textarea.d.ts.map +1 -0
- package/lib/runtime/components/react/dist/mpx-video.d.ts +1 -0
- package/lib/runtime/components/react/dist/mpx-video.d.ts.map +1 -0
- package/lib/runtime/components/react/dist/mpx-view.d.ts +1 -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 +1 -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 +21 -2
- package/lib/runtime/components/react/dist/parser.d.ts +1 -0
- package/lib/runtime/components/react/dist/parser.d.ts.map +1 -0
- package/lib/runtime/components/react/dist/useAnimationHooks.d.ts +1 -0
- package/lib/runtime/components/react/dist/useAnimationHooks.d.ts.map +1 -0
- package/lib/runtime/components/react/dist/useNodesRef.d.ts +1 -0
- package/lib/runtime/components/react/dist/useNodesRef.d.ts.map +1 -0
- package/lib/runtime/components/react/dist/utils.d.ts +1 -0
- package/lib/runtime/components/react/dist/utils.d.ts.map +1 -0
- package/lib/runtime/components/react/dist/utils.jsx +16 -6
- package/package.json +1 -1
- package/lib/runtime/components/react/dist/mpx-nav-container.d.ts +0 -9
- package/lib/runtime/components/react/dist/mpx-nav-container.jsx +0 -23
- package/lib/runtime/components/react/dist/useNavShared.d.ts +0 -2
- package/lib/runtime/components/react/dist/useNavShared.js +0 -6
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"parser.d.ts","sourceRoot":"","sources":["../parser.ts"],"names":[],"mappings":"AAAA,UAAU,KAAK;IACb,IAAI,EAAE,MAAM,CAAA;IACZ,KAAK,EAAE,MAAM,GAAG,MAAM,CAAA;CACvB;AAED,UAAU,cAAc;IACtB,IAAI,EAAE,QAAQ,CAAA;IACd,KAAK,EAAE,MAAM,CAAA;CACd;AAED,qBAAa,gBAAgB;IAC3B,OAAO,CAAC,MAAM,CAAS;IACvB,OAAO,CAAC,SAAS,CAAyB;IAC1C,OAAO,CAAC,SAAS,CAAkD;IACnE,OAAO,CAAC,OAAO,CAAQ;gBAEV,KAAK,EAAE,MAAM,EAAE,SAAS,GAAE,CAAC,GAAG,EAAE,MAAM,KAAK,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AAA;AAED,MAAM,CAAC,OAAO,UAAU,WAAW,CAAC,CAAC,EAAE,CAAC,EAAG,KAAK,EAAE,CAAC,EAAE,GAAG,EAAE,YAAY,CAAC,UAAU,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,SAAS,CAAC,CAAC,CAAC,EAAE,QAAQ,GAAC,GAAQ,QAejI"}
|
|
@@ -120,3 +120,4 @@ export declare function useHover({ enableHover, hoverStartTime, hoverStayTime, d
|
|
|
120
120
|
};
|
|
121
121
|
export declare function useRunOnJSCallback(callbackMapRef: MutableRefObject<Record<string, AnyFunc>>): (key: string, ...args: any) => any;
|
|
122
122
|
export {};
|
|
123
|
+
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../utils.tsx"],"names":[],"mappings":"AAAA,OAAO,EAA2C,SAAS,EAAE,YAAY,EAAwC,QAAQ,EAAE,cAAc,EAAyC,gBAAgB,EAAE,MAAM,OAAO,CAAA;AACjN,OAAO,EAAE,iBAAiB,EAAE,SAAS,EAAE,UAAU,EAAS,MAAM,cAAc,CAAA;AAK9E,OAAkB,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAA;AACxE,OAAO,KAAK,EAAE,OAAO,EAA6B,MAAM,gBAAgB,CAAA;AAIxE,eAAO,MAAM,gBAAgB,QAAqF,CAAA;AAClH,eAAO,MAAM,aAAa,QAA2B,CAAA;AACrD,eAAO,MAAM,SAAS,QAAmC,CAAA;AACzD,eAAO,MAAM,UAAU,QAA4B,CAAA;AACnD,eAAO,MAAM,gBAAgB,QAA6C,CAAA;AAC1E,eAAO,MAAM,gBAAgB,QAAiD,CAAA;AAC9E,eAAO,MAAM,iBAAiB,KAAK,CAAA;AACnC,eAAO,MAAM,YAAY;;CAExB,CAAA;AAID,eAAO,MAAM,KAAK,SAAyB,CAAA;AAC3C,eAAO,MAAM,SAAS,SAA6B,CAAA;AACnD,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C,CAAA;IACjE,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB;AAED,wBAAgB,WAAW,CAAE,QAAQ,GAAE,KAAK,CAAC,cAAc,CAAM,SAQhE;AAED,eAAO,MAAM,YAAY;;;;;CAAgB,CAAA;AAEzC,wBAAgB,cAAc,CAAE,MAAM,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,OAIhE;AAED,wBAAgB,WAAW,CACzB,UAAU,EAAE,UAAU,GAAG,cAAc,EACvC,eAAe,UAAQ,kGAIxB;AAED,wBAAgB,SAAS,CAAE,QAAQ,iCAA0B,EAAE,UAAU,EAAE,KAAK,CAAC,MAAM,CAAC,EAAE,QAAQ,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,MAAM,KAAK,MAAM,GAAG,MAAM,uBAO1J;AAED,wBAAgB,QAAQ,CAAE,EAAE,WAAW,EAAE,cAAc,EAAE,aAAa,EAAE,QAAQ,EAAE,EAAE;IAAE,WAAW,EAAE,OAAO,CAAC;IAAC,cAAc,EAAE,MAAM,CAAC;IAAC,aAAa,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,EAAE,OAAO,CAAA;CAAE;;;;;;EA4D9K;AAED,wBAAgB,kBAAkB,CAAE,cAAc,EAAE,gBAAgB,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,SAClD,MAAM,WAAW,GAAG,SAa9D"}
|
|
@@ -169,24 +169,34 @@ function transformPercent(styleObj, percentKeyPaths, percentConfig) {
|
|
|
169
169
|
function resolveVar(input, varContext) {
|
|
170
170
|
const parsed = parseFunc(input, 'var');
|
|
171
171
|
const replaced = new ReplaceSource(input);
|
|
172
|
-
|
|
172
|
+
for (const { start, end, args } of parsed) {
|
|
173
173
|
const varName = args[0];
|
|
174
|
-
const fallback = args[1]
|
|
174
|
+
const fallback = args[1];
|
|
175
175
|
let varValue = hasOwn(varContext, varName) ? varContext[varName] : fallback;
|
|
176
|
+
if (varValue === undefined)
|
|
177
|
+
return;
|
|
176
178
|
if (varUseRegExp.test(varValue)) {
|
|
177
|
-
varValue =
|
|
179
|
+
varValue = resolveVar(varValue, varContext);
|
|
180
|
+
if (varValue === undefined)
|
|
181
|
+
return;
|
|
178
182
|
}
|
|
179
183
|
else {
|
|
180
|
-
varValue =
|
|
184
|
+
varValue = global.__formatValue(varValue);
|
|
181
185
|
}
|
|
182
186
|
replaced.replace(start, end - 1, varValue);
|
|
183
|
-
}
|
|
187
|
+
}
|
|
184
188
|
return global.__formatValue(replaced.source());
|
|
185
189
|
}
|
|
186
190
|
function transformVar(styleObj, varKeyPaths, varContext, visitOther) {
|
|
187
191
|
varKeyPaths.forEach((varKeyPath) => {
|
|
188
192
|
setStyle(styleObj, varKeyPath, ({ target, key, value }) => {
|
|
189
|
-
|
|
193
|
+
const resolved = resolveVar(value, varContext);
|
|
194
|
+
if (resolved === undefined) {
|
|
195
|
+
delete target[key];
|
|
196
|
+
error(`Can not resolve css var at ${varKeyPath.join('.')}:${value}.`);
|
|
197
|
+
return;
|
|
198
|
+
}
|
|
199
|
+
target[key] = resolved;
|
|
190
200
|
visitOther({ target, key, value: target[key], keyPath: varKeyPath });
|
|
191
201
|
});
|
|
192
202
|
});
|
package/package.json
CHANGED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
interface MpxNavContainerProps {
|
|
3
|
-
children?: React.ReactNode;
|
|
4
|
-
}
|
|
5
|
-
export default function MpxNavContainer(props: MpxNavContainerProps): import("react").ReactNode;
|
|
6
|
-
export declare function NavSharedProvider({ children }: {
|
|
7
|
-
children?: React.ReactNode;
|
|
8
|
-
}): import("react").JSX.Element;
|
|
9
|
-
export {};
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { useNavShared } from './useNavShared';
|
|
2
|
-
import { NavSharedContext } from './context';
|
|
3
|
-
import { useLayoutEffect, useMemo, useState } from 'react';
|
|
4
|
-
import { isAndroid } from './utils';
|
|
5
|
-
export default function MpxNavContainer(props) {
|
|
6
|
-
const [, setCustomNav] = useNavShared();
|
|
7
|
-
useLayoutEffect(() => {
|
|
8
|
-
if (!isAndroid)
|
|
9
|
-
return;
|
|
10
|
-
if (props.children) {
|
|
11
|
-
setCustomNav(props.children);
|
|
12
|
-
}
|
|
13
|
-
return () => {
|
|
14
|
-
setCustomNav(undefined);
|
|
15
|
-
};
|
|
16
|
-
}, [props.children]);
|
|
17
|
-
return isAndroid ? null : props.children;
|
|
18
|
-
}
|
|
19
|
-
export function NavSharedProvider({ children }) {
|
|
20
|
-
const [customNav, setCustomNav] = useState();
|
|
21
|
-
const value = useMemo(() => ({ customNav, setCustomNav }), [customNav]);
|
|
22
|
-
return <NavSharedContext.Provider value={value}>{children}</NavSharedContext.Provider>;
|
|
23
|
-
}
|