@mpxjs/webpack-plugin 2.10.14-beta.7 → 2.10.14-beta.9
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/style/wx/index.js +7 -1
- package/lib/platform/template/wx/component-config/button.js +1 -1
- package/lib/runtime/components/react/dist/context.d.ts +5 -3
- package/lib/runtime/components/react/dist/context.js +1 -1
- package/lib/runtime/components/react/dist/event.config.d.ts +0 -1
- package/lib/runtime/components/react/dist/getInnerListeners.d.ts +0 -1
- package/lib/runtime/components/react/dist/getInnerListeners.js +21 -35
- package/lib/runtime/components/react/dist/mpx-async-suspense.d.ts +0 -1
- package/lib/runtime/components/react/dist/mpx-async-suspense.jsx +2 -2
- package/lib/runtime/components/react/dist/mpx-button.d.ts +0 -1
- package/lib/runtime/components/react/dist/mpx-canvas/Bus.d.ts +0 -1
- package/lib/runtime/components/react/dist/mpx-canvas/CanvasGradient.d.ts +0 -1
- package/lib/runtime/components/react/dist/mpx-canvas/CanvasRenderingContext2D.d.ts +0 -1
- package/lib/runtime/components/react/dist/mpx-canvas/Image.d.ts +0 -1
- package/lib/runtime/components/react/dist/mpx-canvas/ImageData.d.ts +0 -1
- package/lib/runtime/components/react/dist/mpx-canvas/constructorsRegistry.d.ts +0 -1
- package/lib/runtime/components/react/dist/mpx-canvas/html.d.ts +0 -1
- package/lib/runtime/components/react/dist/mpx-canvas/index.d.ts +0 -1
- package/lib/runtime/components/react/dist/mpx-canvas/utils.d.ts +0 -1
- package/lib/runtime/components/react/dist/mpx-checkbox-group.d.ts +0 -1
- package/lib/runtime/components/react/dist/mpx-checkbox.d.ts +0 -1
- package/lib/runtime/components/react/dist/mpx-form.d.ts +0 -1
- package/lib/runtime/components/react/dist/mpx-icon/index.d.ts +0 -1
- package/lib/runtime/components/react/dist/mpx-image.d.ts +0 -1
- package/lib/runtime/components/react/dist/mpx-image.jsx +37 -81
- package/lib/runtime/components/react/dist/mpx-inline-text.d.ts +0 -1
- package/lib/runtime/components/react/dist/mpx-input.d.ts +0 -2
- package/lib/runtime/components/react/dist/mpx-input.jsx +12 -19
- package/lib/runtime/components/react/dist/mpx-keyboard-avoiding-view.d.ts +0 -1
- package/lib/runtime/components/react/dist/mpx-keyboard-avoiding-view.jsx +17 -9
- package/lib/runtime/components/react/dist/mpx-label.d.ts +0 -1
- package/lib/runtime/components/react/dist/mpx-movable-area.d.ts +0 -1
- package/lib/runtime/components/react/dist/mpx-movable-view.d.ts +2 -5
- package/lib/runtime/components/react/dist/mpx-movable-view.jsx +34 -102
- package/lib/runtime/components/react/dist/mpx-nav-container.d.ts +9 -0
- package/lib/runtime/components/react/dist/mpx-nav-container.jsx +23 -0
- package/lib/runtime/components/react/dist/mpx-navigator.d.ts +0 -1
- package/lib/runtime/components/react/dist/mpx-picker/date.d.ts +0 -1
- package/lib/runtime/components/react/dist/mpx-picker/dateData.d.ts +0 -1
- package/lib/runtime/components/react/dist/mpx-picker/index.d.ts +0 -1
- package/lib/runtime/components/react/dist/mpx-picker/multiSelector.d.ts +0 -1
- package/lib/runtime/components/react/dist/mpx-picker/region.d.ts +0 -1
- package/lib/runtime/components/react/dist/mpx-picker/regionData.d.ts +0 -1
- package/lib/runtime/components/react/dist/mpx-picker/selector.d.ts +0 -1
- package/lib/runtime/components/react/dist/mpx-picker/time.d.ts +0 -1
- package/lib/runtime/components/react/dist/mpx-picker/type.d.ts +0 -1
- package/lib/runtime/components/react/dist/mpx-picker-view/index.d.ts +0 -2
- package/lib/runtime/components/react/dist/mpx-picker-view/index.jsx +3 -4
- package/lib/runtime/components/react/dist/mpx-picker-view/pickerVIewContext.d.ts +0 -1
- package/lib/runtime/components/react/dist/mpx-picker-view-column/index.d.ts +0 -2
- package/lib/runtime/components/react/dist/mpx-picker-view-column/index.jsx +21 -15
- package/lib/runtime/components/react/dist/mpx-picker-view-column/pickerViewColumnItem.d.ts +0 -1
- package/lib/runtime/components/react/dist/mpx-picker-view-column/pickerViewColumnItem.jsx +11 -8
- package/lib/runtime/components/react/dist/mpx-picker-view-column/pickerViewFaces.d.ts +0 -1
- package/lib/runtime/components/react/dist/mpx-picker-view-column/pickerViewIndicator.d.ts +0 -1
- package/lib/runtime/components/react/dist/mpx-picker-view-column/pickerViewMask.d.ts +0 -1
- package/lib/runtime/components/react/dist/mpx-popup/index.d.ts +0 -1
- package/lib/runtime/components/react/dist/mpx-popup/popupBase.d.ts +0 -1
- package/lib/runtime/components/react/dist/mpx-portal/index.d.ts +0 -1
- package/lib/runtime/components/react/dist/mpx-portal/index.jsx +1 -5
- package/lib/runtime/components/react/dist/mpx-portal/portal-host.d.ts +0 -1
- package/lib/runtime/components/react/dist/mpx-portal/portal-manager.d.ts +0 -1
- package/lib/runtime/components/react/dist/mpx-portal/portal-manager.jsx +5 -3
- package/lib/runtime/components/react/dist/mpx-radio-group.d.ts +0 -1
- package/lib/runtime/components/react/dist/mpx-radio.d.ts +0 -1
- package/lib/runtime/components/react/dist/mpx-rich-text/html.d.ts +0 -1
- package/lib/runtime/components/react/dist/mpx-rich-text/index.d.ts +0 -1
- package/lib/runtime/components/react/dist/mpx-root-portal.d.ts +0 -1
- package/lib/runtime/components/react/dist/mpx-scroll-view.d.ts +0 -1
- package/lib/runtime/components/react/dist/mpx-scroll-view.jsx +51 -69
- package/lib/runtime/components/react/dist/mpx-simple-text.d.ts +0 -1
- package/lib/runtime/components/react/dist/mpx-simple-view.d.ts +0 -1
- package/lib/runtime/components/react/dist/mpx-sticky-header.d.ts +0 -1
- package/lib/runtime/components/react/dist/mpx-sticky-section.d.ts +0 -1
- package/lib/runtime/components/react/dist/mpx-swiper-item.d.ts +0 -1
- package/lib/runtime/components/react/dist/mpx-swiper.d.ts +0 -1
- package/lib/runtime/components/react/dist/mpx-swiper.jsx +16 -9
- package/lib/runtime/components/react/dist/mpx-switch.d.ts +0 -1
- package/lib/runtime/components/react/dist/mpx-text.d.ts +1 -3
- package/lib/runtime/components/react/dist/mpx-text.jsx +5 -33
- package/lib/runtime/components/react/dist/mpx-textarea.d.ts +0 -1
- package/lib/runtime/components/react/dist/mpx-video.d.ts +0 -1
- package/lib/runtime/components/react/dist/mpx-view.d.ts +0 -1
- package/lib/runtime/components/react/dist/mpx-web-view.d.ts +0 -1
- package/lib/runtime/components/react/dist/mpx-web-view.jsx +2 -21
- package/lib/runtime/components/react/dist/{mpx-nav.d.ts → nav.d.ts} +0 -1
- package/lib/runtime/components/react/dist/{mpx-nav.jsx → nav.jsx} +6 -1
- package/lib/runtime/components/react/dist/parser.d.ts +0 -1
- package/lib/runtime/components/react/dist/useAnimationHooks.d.ts +0 -1
- package/lib/runtime/components/react/dist/useNavShared.d.ts +2 -0
- package/lib/runtime/components/react/dist/useNavShared.js +6 -0
- package/lib/runtime/components/react/dist/useNodesRef.d.ts +0 -1
- package/lib/runtime/components/react/dist/utils.d.ts +0 -1
- package/lib/runtime/components/react/dist/utils.jsx +6 -16
- package/lib/runtime/components/react/mpx-keyboard-avoiding-view.tsx +15 -16
- package/lib/runtime/components/react/mpx-view.tsx +1 -1
- package/package.json +1 -1
- package/lib/runtime/components/react/dist/context.d.ts.map +0 -1
- package/lib/runtime/components/react/dist/event.config.d.ts.map +0 -1
- package/lib/runtime/components/react/dist/getInnerListeners.d.ts.map +0 -1
- package/lib/runtime/components/react/dist/mpx-async-suspense.d.ts.map +0 -1
- package/lib/runtime/components/react/dist/mpx-button.d.ts.map +0 -1
- package/lib/runtime/components/react/dist/mpx-camera.d.ts +0 -27
- package/lib/runtime/components/react/dist/mpx-camera.d.ts.map +0 -1
- package/lib/runtime/components/react/dist/mpx-camera.jsx +0 -197
- package/lib/runtime/components/react/dist/mpx-canvas/Bus.d.ts.map +0 -1
- package/lib/runtime/components/react/dist/mpx-canvas/CanvasGradient.d.ts.map +0 -1
- package/lib/runtime/components/react/dist/mpx-canvas/CanvasRenderingContext2D.d.ts.map +0 -1
- package/lib/runtime/components/react/dist/mpx-canvas/Image.d.ts.map +0 -1
- package/lib/runtime/components/react/dist/mpx-canvas/ImageData.d.ts.map +0 -1
- package/lib/runtime/components/react/dist/mpx-canvas/constructorsRegistry.d.ts.map +0 -1
- package/lib/runtime/components/react/dist/mpx-canvas/html.d.ts.map +0 -1
- package/lib/runtime/components/react/dist/mpx-canvas/index.d.ts.map +0 -1
- package/lib/runtime/components/react/dist/mpx-canvas/utils.d.ts.map +0 -1
- package/lib/runtime/components/react/dist/mpx-checkbox-group.d.ts.map +0 -1
- package/lib/runtime/components/react/dist/mpx-checkbox.d.ts.map +0 -1
- package/lib/runtime/components/react/dist/mpx-form.d.ts.map +0 -1
- package/lib/runtime/components/react/dist/mpx-icon/index.d.ts.map +0 -1
- package/lib/runtime/components/react/dist/mpx-image.d.ts.map +0 -1
- package/lib/runtime/components/react/dist/mpx-inline-text.d.ts.map +0 -1
- package/lib/runtime/components/react/dist/mpx-input.d.ts.map +0 -1
- package/lib/runtime/components/react/dist/mpx-keyboard-avoiding-view.d.ts.map +0 -1
- package/lib/runtime/components/react/dist/mpx-label.d.ts.map +0 -1
- package/lib/runtime/components/react/dist/mpx-movable-area.d.ts.map +0 -1
- package/lib/runtime/components/react/dist/mpx-movable-view.d.ts.map +0 -1
- package/lib/runtime/components/react/dist/mpx-nav.d.ts.map +0 -1
- package/lib/runtime/components/react/dist/mpx-navigator.d.ts.map +0 -1
- package/lib/runtime/components/react/dist/mpx-picker/date.d.ts.map +0 -1
- package/lib/runtime/components/react/dist/mpx-picker/dateData.d.ts.map +0 -1
- package/lib/runtime/components/react/dist/mpx-picker/index.d.ts.map +0 -1
- package/lib/runtime/components/react/dist/mpx-picker/multiSelector.d.ts.map +0 -1
- package/lib/runtime/components/react/dist/mpx-picker/region.d.ts.map +0 -1
- package/lib/runtime/components/react/dist/mpx-picker/regionData.d.ts.map +0 -1
- package/lib/runtime/components/react/dist/mpx-picker/selector.d.ts.map +0 -1
- package/lib/runtime/components/react/dist/mpx-picker/time.d.ts.map +0 -1
- package/lib/runtime/components/react/dist/mpx-picker/type.d.ts.map +0 -1
- package/lib/runtime/components/react/dist/mpx-picker-view/index.d.ts.map +0 -1
- package/lib/runtime/components/react/dist/mpx-picker-view/pickerVIewContext.d.ts.map +0 -1
- package/lib/runtime/components/react/dist/mpx-picker-view-column/index.d.ts.map +0 -1
- package/lib/runtime/components/react/dist/mpx-picker-view-column/pickerViewColumnItem.d.ts.map +0 -1
- package/lib/runtime/components/react/dist/mpx-picker-view-column/pickerViewColumnItemLite.d.ts +0 -14
- package/lib/runtime/components/react/dist/mpx-picker-view-column/pickerViewColumnItemLite.d.ts.map +0 -1
- package/lib/runtime/components/react/dist/mpx-picker-view-column/pickerViewColumnItemLite.jsx +0 -20
- package/lib/runtime/components/react/dist/mpx-picker-view-column/pickerViewFaces.d.ts.map +0 -1
- package/lib/runtime/components/react/dist/mpx-picker-view-column/pickerViewIndicator.d.ts.map +0 -1
- package/lib/runtime/components/react/dist/mpx-picker-view-column/pickerViewMask.d.ts.map +0 -1
- package/lib/runtime/components/react/dist/mpx-popup/index.d.ts.map +0 -1
- package/lib/runtime/components/react/dist/mpx-popup/popupBase.d.ts.map +0 -1
- package/lib/runtime/components/react/dist/mpx-portal/index.d.ts.map +0 -1
- package/lib/runtime/components/react/dist/mpx-portal/portal-host.d.ts.map +0 -1
- package/lib/runtime/components/react/dist/mpx-portal/portal-manager.d.ts.map +0 -1
- package/lib/runtime/components/react/dist/mpx-progress.d.ts +0 -24
- package/lib/runtime/components/react/dist/mpx-progress.d.ts.map +0 -1
- package/lib/runtime/components/react/dist/mpx-progress.jsx +0 -163
- package/lib/runtime/components/react/dist/mpx-radio-group.d.ts.map +0 -1
- package/lib/runtime/components/react/dist/mpx-radio.d.ts.map +0 -1
- package/lib/runtime/components/react/dist/mpx-rich-text/html.d.ts.map +0 -1
- package/lib/runtime/components/react/dist/mpx-rich-text/index.d.ts.map +0 -1
- package/lib/runtime/components/react/dist/mpx-root-portal.d.ts.map +0 -1
- package/lib/runtime/components/react/dist/mpx-scroll-view.d.ts.map +0 -1
- package/lib/runtime/components/react/dist/mpx-simple-text.d.ts.map +0 -1
- package/lib/runtime/components/react/dist/mpx-simple-view.d.ts.map +0 -1
- package/lib/runtime/components/react/dist/mpx-slider.d.ts +0 -31
- package/lib/runtime/components/react/dist/mpx-slider.d.ts.map +0 -1
- package/lib/runtime/components/react/dist/mpx-slider.jsx +0 -321
- package/lib/runtime/components/react/dist/mpx-sticky-header.d.ts.map +0 -1
- package/lib/runtime/components/react/dist/mpx-sticky-section.d.ts.map +0 -1
- package/lib/runtime/components/react/dist/mpx-swiper-item.d.ts.map +0 -1
- package/lib/runtime/components/react/dist/mpx-swiper.d.ts.map +0 -1
- package/lib/runtime/components/react/dist/mpx-switch.d.ts.map +0 -1
- package/lib/runtime/components/react/dist/mpx-text.d.ts.map +0 -1
- package/lib/runtime/components/react/dist/mpx-textarea.d.ts.map +0 -1
- package/lib/runtime/components/react/dist/mpx-video.d.ts.map +0 -1
- package/lib/runtime/components/react/dist/mpx-view.d.ts.map +0 -1
- package/lib/runtime/components/react/dist/mpx-web-view.d.ts.map +0 -1
- package/lib/runtime/components/react/dist/parser.d.ts.map +0 -1
- package/lib/runtime/components/react/dist/useAnimationHooks.d.ts.map +0 -1
- package/lib/runtime/components/react/dist/useNodesRef.d.ts.map +0 -1
- package/lib/runtime/components/react/dist/utils.d.ts.map +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"pickerViewFaces.d.ts","sourceRoot":"","sources":["../../mpx-picker-view-column/pickerViewFaces.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,MAAM,MAAM,KAAK,GAAG;IAClB,KAAK,EAAE,MAAM,CAAA;IACb,GAAG,EAAE,MAAM,CAAA;IACX,OAAO,EAAE,MAAM,CAAA;IACf,OAAO,EAAE,MAAM,CAAA;IACf,KAAK,EAAE,MAAM,CAAA;IACb,YAAY,EAAE,MAAM,CAAA;CACrB,CAAA;AAED,eAAO,MAAM,QAAQ,QAAS,MAAM,WAA0B,CAAA;AAM9D,eAAO,MAAM,gBAAgB,UAAW,KAAK,EAAE,cAAc,MAAM,WAKlE,CAAA;AAED,eAAO,MAAM,iBAAiB,eAAgB,MAAM,aAKnD,CAAA;AAED,eAAO,MAAM,WAAW,eACV,MAAM,gBACJ,MAAM,KACnB,KAAK,EA4EP,CAAA"}
|
package/lib/runtime/components/react/dist/mpx-picker-view-column/pickerViewIndicator.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"pickerViewIndicator.d.ts","sourceRoot":"","sources":["../../mpx-picker-view-column/pickerViewIndicator.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,SAAS,EAAoB,SAAS,EAAE,MAAM,cAAc,CAAA;AAErE,KAAK,cAAc,GAAG;IACpB,UAAU,EAAE,MAAM,CAAA;IAClB,kBAAkB,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAA;IACzC,uBAAuB,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAA;CAC/C,CAAA;AAED,QAAA,MAAM,oBAAoB;kEAAiE,cAAc;;CAMxG,CAAA;AAkBD,eAAe,oBAAoB,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"pickerViewMask.d.ts","sourceRoot":"","sources":["../../mpx-picker-view-column/pickerViewMask.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,SAAS,EAAoB,SAAS,EAAE,MAAM,cAAc,CAAA;AAGrE,KAAK,SAAS,GAAG;IACf,UAAU,EAAE,MAAM,CAAA;IAClB,kBAAkB,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAA;CAC1C,CAAA;AAED,QAAA,MAAM,eAAe;yCAGlB,SAAS;;CAQX,CAAA;AASD,eAAe,eAAe,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../mpx-popup/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAgB,YAAY,EAAE,MAAM,OAAO,CAAA;AAElD,OAAkB,EAAE,cAAc,EAAE,MAAM,aAAa,CAAA;AAEvD,0BAAkB,SAAS;IACzB,MAAM,WAAW;CAClB;AAED,MAAM,WAAW,gBAAgB;IAC/B,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC,cAAc,CAAC,CAAA;IAC3C,IAAI,CAAC,EAAE,SAAS,CAAA;CACjB;AAaD;;GAEG;AACH,QAAA,MAAM,kBAAkB,aAAa,gBAAgB;2BAiBjC,MAAM,SAAS,UACvB,MAAM,GAAG,SAAS,YAChB;QAAE,aAAa,CAAC,EAAE,MAAM,CAAA;KAAE;;;2BAaR,YAAY,GAAG,IAAI;;CAwBlD,CAAA;AAED,OAAO,EAAE,kBAAkB,EAAE,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"popupBase.d.ts","sourceRoot":"","sources":["../../mpx-popup/popupBase.tsx"],"names":[],"mappings":";AAUA,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAC1B,IAAI,CAAC,EAAE,MAAM,IAAI,CAAA;IACjB,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB;AAmCD;;;GAGG;AACH,QAAA,MAAM,SAAS;aAAW,cAAc;;CAwEvC,CAAA;AAGD,eAAe,SAAS,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../mpx-portal/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAiC,MAAM,OAAO,CAAA;AAIhE,MAAM,MAAM,WAAW,GAAG;IACxB,QAAQ,CAAC,EAAE,SAAS,CAAA;CACrB,CAAA;AAED,QAAA,MAAM,MAAM;mBAAkB,WAAW,GAAG,IAAI;;;;;;;;CA6B/C,CAAA;AAOD,eAAe,MAAM,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"portal-host.d.ts","sourceRoot":"","sources":["../../mpx-portal/portal-host.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAqB,SAAS,EAAuB,MAAM,OAAO,CAAA;AAUzE,KAAK,eAAe,GAAG;IACrB,QAAQ,EAAE,SAAS,CAAC;IACpB,MAAM,EAAE,MAAM,CAAA;CACf,CAAA;AAQD,MAAM,MAAM,SAAS,GACjB;IAAE,IAAI,EAAE,OAAO,CAAC;IAAC,GAAG,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,SAAS,CAAA;CAAE,GACnD;IAAE,IAAI,EAAE,QAAQ,CAAC;IAAC,GAAG,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,SAAS,CAAA;CAAE,GACpD;IAAE,IAAI,EAAE,SAAS,CAAC;IAAC,GAAG,EAAE,MAAM,CAAA;CAAE,CAAA;AAepC,cAAM,WAAW;IACf,OAAO,CAAC,OAAO,CAAQ;IACvB,GAAG,MAAO,SAAS,MAAM,MAAM,GAAC,IAAI,YAInC;IAED,MAAM,QAAS,MAAM,UAEpB;IAED,MAAM,QAAS,MAAM,KAAK,SAAS,UAElC;CACF;AACD;;GAEG;AACH,eAAO,MAAM,MAAM,aAAoB,CAAA;AAEvC,QAAA,MAAM,UAAU,iBAAkB,eAAe,KAAG,WA8EnD,CAAA;AAED,eAAe,UAAU,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"portal-manager.d.ts","sourceRoot":"","sources":["../../mpx-portal/portal-manager.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAwE,SAAS,EAA0B,MAAM,OAAO,CAAA;AAE/H,MAAM,MAAM,KAAK,GAAG;IAClB,OAAO,EAAE,KAAK,CAAC;QACb,GAAG,EAAE,MAAM,CAAA;QACX,QAAQ,EAAE,SAAS,CAAA;KACpB,CAAC,CAAA;CACH,CAAA;AAKD,QAAA,MAAM,cAAc,mFA4ClB,CAAA;AAEF,eAAe,cAAc,CAAA"}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { View, ViewStyle } from 'react-native';
|
|
3
|
-
import { HandlerRef } from './useNodesRef';
|
|
4
|
-
export interface ProgressProps {
|
|
5
|
-
percent?: number;
|
|
6
|
-
'stroke-width'?: number | string;
|
|
7
|
-
color?: string;
|
|
8
|
-
activeColor?: string;
|
|
9
|
-
backgroundColor?: string;
|
|
10
|
-
active?: boolean;
|
|
11
|
-
'active-mode'?: 'backwards' | 'forwards';
|
|
12
|
-
duration?: number;
|
|
13
|
-
bindactiveend?: (event: any) => void;
|
|
14
|
-
style?: ViewStyle & Record<string, any>;
|
|
15
|
-
'enable-offset'?: boolean;
|
|
16
|
-
'enable-var'?: boolean;
|
|
17
|
-
'external-var-context'?: Record<string, any>;
|
|
18
|
-
'parent-font-size'?: number;
|
|
19
|
-
'parent-width'?: number;
|
|
20
|
-
'parent-height'?: number;
|
|
21
|
-
}
|
|
22
|
-
declare const Progress: import("react").ForwardRefExoticComponent<ProgressProps & import("react").RefAttributes<HandlerRef<View, ProgressProps>>>;
|
|
23
|
-
export default Progress;
|
|
24
|
-
//# sourceMappingURL=mpx-progress.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"mpx-progress.d.ts","sourceRoot":"","sources":["../mpx-progress.tsx"],"names":[],"mappings":";AAuBA,OAAO,EACL,IAAI,EACJ,SAAS,EACV,MAAM,cAAc,CAAA;AAUrB,OAAoB,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA;AAIvD,MAAM,WAAW,aAAa;IAC5B,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,cAAc,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;IAChC,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,aAAa,CAAC,EAAE,WAAW,GAAG,UAAU,CAAA;IACxC,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,GAAG,KAAK,IAAI,CAAA;IACpC,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;AAED,QAAA,MAAM,QAAQ,2HAoMZ,CAAA;AAGF,eAAe,QAAQ,CAAA"}
|
|
@@ -1,163 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* ✔ percent 进度百分比 0-100
|
|
3
|
-
* ✘ show-info 在进度条右侧显示百分比
|
|
4
|
-
* ✘ border-radius 圆角大小
|
|
5
|
-
* ✘ font-size 右侧百分比字体大小
|
|
6
|
-
* ✔ stroke-width 进度条线的宽度
|
|
7
|
-
* ✔ color 进度条颜色(请使用activeColor)
|
|
8
|
-
* ✔ activeColor 已选择的进度条的颜色
|
|
9
|
-
* ✔ backgroundColor 未选择的进度条的颜色
|
|
10
|
-
* ✔ active 进度条从左往右的动画
|
|
11
|
-
* ✔ active-mode backwards: 动画从头播;forwards:动画从上次结束点接着播
|
|
12
|
-
* ✔ duration 进度增加1%所需毫秒数
|
|
13
|
-
* ✔ bindactiveend 动画完成事件
|
|
14
|
-
*/
|
|
15
|
-
import { useRef, forwardRef, useEffect, useState, createElement } from 'react';
|
|
16
|
-
import { View } from 'react-native';
|
|
17
|
-
import Animated, { useSharedValue, useAnimatedStyle, withTiming, Easing, runOnJS } from 'react-native-reanimated';
|
|
18
|
-
import useInnerProps from './getInnerListeners';
|
|
19
|
-
import useNodesRef from './useNodesRef';
|
|
20
|
-
import { useLayout, useTransformStyle, extendObject, useRunOnJSCallback } from './utils';
|
|
21
|
-
import Portal from './mpx-portal';
|
|
22
|
-
const Progress = forwardRef((props, ref) => {
|
|
23
|
-
const { percent = 0, 'stroke-width': strokeWidth = 6, color, activeColor = color || '#09BB07', backgroundColor = '#EBEBEB', active = false, 'active-mode': activeMode = 'backwards', duration = 30, style = {}, 'enable-var': enableVar, 'external-var-context': externalVarContext, 'parent-font-size': parentFontSize, 'parent-width': parentWidth, 'parent-height': parentHeight } = props;
|
|
24
|
-
const nodeRef = useRef(null);
|
|
25
|
-
const propsRef = useRef(props);
|
|
26
|
-
propsRef.current = props;
|
|
27
|
-
// 进度值状态
|
|
28
|
-
const [lastPercent, setLastPercent] = useState(0);
|
|
29
|
-
const progressWidth = useSharedValue(0);
|
|
30
|
-
const { normalStyle, hasSelfPercent, setWidth, setHeight, hasPositionFixed } = useTransformStyle(style, {
|
|
31
|
-
enableVar,
|
|
32
|
-
externalVarContext,
|
|
33
|
-
parentFontSize,
|
|
34
|
-
parentWidth,
|
|
35
|
-
parentHeight
|
|
36
|
-
});
|
|
37
|
-
const { layoutRef, layoutStyle, layoutProps } = useLayout({
|
|
38
|
-
props,
|
|
39
|
-
hasSelfPercent,
|
|
40
|
-
setWidth,
|
|
41
|
-
setHeight,
|
|
42
|
-
nodeRef
|
|
43
|
-
});
|
|
44
|
-
useNodesRef(props, ref, nodeRef, {
|
|
45
|
-
style: normalStyle
|
|
46
|
-
});
|
|
47
|
-
// 使用 useRunOnJSCallback 处理动画回调
|
|
48
|
-
const runOnJSCallbackRef = useRef({
|
|
49
|
-
triggerActiveEnd: (percent) => {
|
|
50
|
-
const currentProps = propsRef.current;
|
|
51
|
-
if (currentProps.bindactiveend) {
|
|
52
|
-
currentProps.bindactiveend({
|
|
53
|
-
type: 'activeend',
|
|
54
|
-
detail: {
|
|
55
|
-
percent: percent
|
|
56
|
-
}
|
|
57
|
-
});
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
});
|
|
61
|
-
const runOnJSCallback = useRunOnJSCallback(runOnJSCallbackRef);
|
|
62
|
-
// 进度条动画函数
|
|
63
|
-
const startProgressAnimation = (targetPercent, startPercent, animationDuration, onFinished) => {
|
|
64
|
-
// 根据 active-mode 设置起始位置
|
|
65
|
-
progressWidth.value = startPercent;
|
|
66
|
-
progressWidth.value = withTiming(targetPercent, {
|
|
67
|
-
duration: animationDuration,
|
|
68
|
-
easing: Easing.linear
|
|
69
|
-
}, (finished) => {
|
|
70
|
-
if (finished && onFinished) {
|
|
71
|
-
// 在动画回调中,执行传入的worklet函数
|
|
72
|
-
onFinished();
|
|
73
|
-
}
|
|
74
|
-
});
|
|
75
|
-
};
|
|
76
|
-
// 进度变化时的动画效果
|
|
77
|
-
useEffect(() => {
|
|
78
|
-
const targetPercent = Math.max(0, Math.min(100, percent));
|
|
79
|
-
if (active) {
|
|
80
|
-
// 根据 active-mode 确定起始位置
|
|
81
|
-
let startPercent;
|
|
82
|
-
if (activeMode === 'backwards') {
|
|
83
|
-
startPercent = 0;
|
|
84
|
-
}
|
|
85
|
-
else {
|
|
86
|
-
// forwards 模式:使用上次记录的百分比作为起始位置
|
|
87
|
-
startPercent = lastPercent;
|
|
88
|
-
}
|
|
89
|
-
// 计算动画持续时间
|
|
90
|
-
const percentDiff = Math.abs(targetPercent - startPercent);
|
|
91
|
-
const animationDuration = percentDiff * duration;
|
|
92
|
-
// 执行动画
|
|
93
|
-
startProgressAnimation(targetPercent, startPercent, animationDuration, () => {
|
|
94
|
-
'worklet';
|
|
95
|
-
// 在worklet函数内部执行runOnJS调用runOnJSCallback
|
|
96
|
-
runOnJS(runOnJSCallback)('triggerActiveEnd', targetPercent);
|
|
97
|
-
});
|
|
98
|
-
}
|
|
99
|
-
else {
|
|
100
|
-
progressWidth.value = targetPercent;
|
|
101
|
-
}
|
|
102
|
-
setLastPercent(targetPercent);
|
|
103
|
-
}, [percent, active, activeMode, duration]);
|
|
104
|
-
// 初始化时设置进度值
|
|
105
|
-
useEffect(() => {
|
|
106
|
-
if (!active) {
|
|
107
|
-
progressWidth.value = Math.max(0, Math.min(100, percent));
|
|
108
|
-
}
|
|
109
|
-
}, []);
|
|
110
|
-
// 进度条动画样式
|
|
111
|
-
const animatedProgressStyle = useAnimatedStyle(() => {
|
|
112
|
-
return {
|
|
113
|
-
width: `${progressWidth.value}%`
|
|
114
|
-
};
|
|
115
|
-
});
|
|
116
|
-
// 确保数值类型正确
|
|
117
|
-
const strokeWidthNum = typeof strokeWidth === 'number' ? strokeWidth : parseInt(strokeWidth, 10) || 6;
|
|
118
|
-
// 容器样式
|
|
119
|
-
const containerStyle = extendObject({}, {
|
|
120
|
-
flexDirection: 'row',
|
|
121
|
-
alignItems: 'center',
|
|
122
|
-
width: '100%',
|
|
123
|
-
minHeight: Math.max(strokeWidthNum, 20)
|
|
124
|
-
}, normalStyle, layoutStyle);
|
|
125
|
-
// 进度条背景样式
|
|
126
|
-
const progressBgStyle = {
|
|
127
|
-
width: '100%',
|
|
128
|
-
height: strokeWidthNum,
|
|
129
|
-
backgroundColor,
|
|
130
|
-
overflow: 'hidden'
|
|
131
|
-
};
|
|
132
|
-
// 进度条填充样式
|
|
133
|
-
const progressFillStyle = {
|
|
134
|
-
height: '100%',
|
|
135
|
-
backgroundColor: activeColor
|
|
136
|
-
};
|
|
137
|
-
const innerProps = useInnerProps(extendObject({}, props, layoutProps, {
|
|
138
|
-
ref: nodeRef
|
|
139
|
-
}), [
|
|
140
|
-
'percent',
|
|
141
|
-
'stroke-width',
|
|
142
|
-
'color',
|
|
143
|
-
'activeColor',
|
|
144
|
-
'backgroundColor',
|
|
145
|
-
'active',
|
|
146
|
-
'active-mode',
|
|
147
|
-
'duration',
|
|
148
|
-
'bindactiveend'
|
|
149
|
-
], { layoutRef });
|
|
150
|
-
const progressComponent = createElement(View, extendObject({}, innerProps, { style: containerStyle }),
|
|
151
|
-
// 进度条背景
|
|
152
|
-
createElement(View, { style: progressBgStyle },
|
|
153
|
-
// 进度条填充
|
|
154
|
-
createElement(Animated.View, {
|
|
155
|
-
style: [progressFillStyle, animatedProgressStyle]
|
|
156
|
-
})));
|
|
157
|
-
if (hasPositionFixed) {
|
|
158
|
-
return createElement(Portal, null, progressComponent);
|
|
159
|
-
}
|
|
160
|
-
return progressComponent;
|
|
161
|
-
});
|
|
162
|
-
Progress.displayName = 'MpxProgress';
|
|
163
|
-
export default Progress;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"mpx-radio-group.d.ts","sourceRoot":"","sources":["../mpx-radio-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;AAKrB,OAAoB,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA;AAIvD,MAAM,WAAW,eAAe;IAC9B,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,UAAU,+HA8Id,CAAA;AAIF,eAAe,UAAU,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"mpx-radio.d.ts","sourceRoot":"","sources":["../mpx-radio.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAgD,SAAS,EAAuD,MAAM,OAAO,CAAA;AACpI,OAAO,EAAE,IAAI,EAAc,SAAS,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAA;AAIhF,OAAoB,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA;AAKvD,MAAM,WAAW,UAAU;IACzB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,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,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,OAAO,CAAC,EAAE,CAAC,GAAG,EAAE,oBAAoB,CAAC,UAAU,CAAC,GAAG,OAAO,KAAK,IAAI,CAAA;CACpE;AAoCD,QAAA,MAAM,KAAK,qHA8JV,CAAA;AAID,eAAe,KAAK,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"html.d.ts","sourceRoot":"","sources":["../../mpx-rich-text/html.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,YAAY,SAAU,MAAM,WAsCxC,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../mpx-rich-text/index.tsx"],"names":[],"mappings":";AACA;;GAEG;AACH,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;AAGzD,OAAoB,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAA;AAMxD,KAAK,IAAI,GAAG;IACV,IAAI,EAAE,MAAM,GAAG,MAAM,CAAA;IACrB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,KAAK,CAAC,EAAE,GAAG,CAAA;IACX,QAAQ,CAAC,EAAE,KAAK,CAAC,IAAI,CAAC,CAAA;IACtB,IAAI,EAAE,MAAM,CAAA;CACb,CAAA;AAED,UAAU,cAAe,SAAQ,SAAS;IACxC,KAAK,CAAC,EAAE,SAAS,CAAA;IACjB,KAAK,EAAE,MAAM,GAAG,KAAK,CAAC,IAAI,CAAC,CAAA;IAC3B,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;AAyBD,QAAA,MAAM,SAAS,6HA4Eb,CAAA;AAIF,eAAe,SAAS,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"mpx-root-portal.d.ts","sourceRoot":"","sources":["../mpx-root-portal.tsx"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAAE,SAAS,EAA2B,MAAM,OAAO,CAAA;AAG1D,UAAU,eAAe;IACvB,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,QAAQ,EAAE,SAAS,CAAA;IACnB,CAAC,CAAC,EAAE,MAAM,GAAG,GAAG,CAAA;CACjB;AAED,QAAA,MAAM,WAAW;YAAW,eAAe;;CAQ1C,CAAA;AAID,eAAe,WAAW,CAAA"}
|
|
@@ -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I,CAAC;IAClE,YAAY,CAAC,EAAE,CAAC,KAAK,EAAE,oBAAoB,CAAC,UAAU,CAAC,KAAK,IAAI,CAAC;IACjE,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,oBAAoB,CAAC,UAAU,CAAC,KAAK,IAAI,CAAC;IAClE,WAAW,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,WAAW,EAAE,GAAG,CAAC,EAAE,OAAO,KAAK,UAAU,CAAC,GAAG,EAAE,GAAG,CAAC,CAAA;CACxG;AAyBD,QAAA,MAAM,WAAW;;4MAutBf,CAAA;AAIF,eAAe,WAAW,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"mpx-simple-text.d.ts","sourceRoot":"","sources":["../mpx-simple-text.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAQ,SAAS,EAAE,MAAM,cAAc,CAAA;AAC9C,OAAO,EAAE,GAAG,EAAiB,MAAM,OAAO,CAAA;AAI1C,QAAA,MAAM,UAAU;YAAW,SAAS,GAAG,WAAW;;CAiBjD,CAAA;AAID,eAAe,UAAU,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"mpx-simple-view.d.ts","sourceRoot":"","sources":["../mpx-simple-view.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAQ,SAAS,EAAa,MAAM,cAAc,CAAA;AAKzD,QAAA,MAAM,UAAU;sBAAqB,SAAS,GAAG,WAAW;;CAuB3D,CAAA;AAID,eAAe,UAAU,CAAA"}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { View, ViewStyle } from 'react-native';
|
|
3
|
-
import { HandlerRef } from './useNodesRef';
|
|
4
|
-
export interface SliderProps {
|
|
5
|
-
min?: number;
|
|
6
|
-
max?: number;
|
|
7
|
-
step?: number;
|
|
8
|
-
disabled?: boolean;
|
|
9
|
-
value?: number;
|
|
10
|
-
color?: string;
|
|
11
|
-
'selected-color'?: string;
|
|
12
|
-
activeColor?: string;
|
|
13
|
-
backgroundColor?: string;
|
|
14
|
-
'block-size'?: number;
|
|
15
|
-
'block-color'?: string;
|
|
16
|
-
name?: string;
|
|
17
|
-
bindchange?: (event: any) => void;
|
|
18
|
-
catchchange?: (event: any) => void;
|
|
19
|
-
bindchanging?: (event: any) => void;
|
|
20
|
-
catchchanging?: (event: any) => void;
|
|
21
|
-
style?: ViewStyle & Record<string, any>;
|
|
22
|
-
'enable-offset'?: boolean;
|
|
23
|
-
'enable-var'?: boolean;
|
|
24
|
-
'external-var-context'?: Record<string, any>;
|
|
25
|
-
'parent-font-size'?: number;
|
|
26
|
-
'parent-width'?: number;
|
|
27
|
-
'parent-height'?: number;
|
|
28
|
-
}
|
|
29
|
-
declare const Slider: import("react").ForwardRefExoticComponent<SliderProps & import("react").RefAttributes<HandlerRef<View, SliderProps>>>;
|
|
30
|
-
export default Slider;
|
|
31
|
-
//# sourceMappingURL=mpx-slider.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"mpx-slider.d.ts","sourceRoot":"","sources":["../mpx-slider.tsx"],"names":[],"mappings":";AA2BA,OAAO,EACL,IAAI,EACJ,SAAS,EACV,MAAM,cAAc,CAAA;AAMrB,OAAoB,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA;AAKvD,MAAM,WAAW,WAAW;IAC1B,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,gBAAgB,CAAC,EAAE,MAAM,CAAA;IACzB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,UAAU,CAAC,EAAE,CAAC,KAAK,EAAE,GAAG,KAAK,IAAI,CAAA;IACjC,WAAW,CAAC,EAAE,CAAC,KAAK,EAAE,GAAG,KAAK,IAAI,CAAA;IAClC,YAAY,CAAC,EAAE,CAAC,KAAK,EAAE,GAAG,KAAK,IAAI,CAAA;IACnC,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,GAAG,KAAK,IAAI,CAAA;IACpC,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;AAED,QAAA,MAAM,MAAM,uHAqXV,CAAA;AAGF,eAAe,MAAM,CAAA"}
|
|
@@ -1,321 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* ✔ min 最小值
|
|
3
|
-
* ✔ max 最大值
|
|
4
|
-
* ✔ step 步长
|
|
5
|
-
* ✔ disabled 是否禁用
|
|
6
|
-
* ✔ value 当前取值
|
|
7
|
-
* ✔ color 背景条的颜色(已废弃,使用 backgroundColor)
|
|
8
|
-
* ✔ selected-color 已选择的颜色(已废弃,使用 activeColor)
|
|
9
|
-
* ✔ activeColor 已选择的颜色
|
|
10
|
-
* ✔ backgroundColor 背景条的颜色
|
|
11
|
-
* ✔ block-size 滑块的大小
|
|
12
|
-
* ✔ block-color 滑块的颜色
|
|
13
|
-
* ✘ show-value 是否显示当前 value
|
|
14
|
-
* ✔ bindchange 完成一次拖动后触发的事件
|
|
15
|
-
* ✔ bindchanging 拖动过程中触发的事件
|
|
16
|
-
*/
|
|
17
|
-
import { useRef, forwardRef, useEffect, useState, createElement, useContext, useMemo } from 'react';
|
|
18
|
-
import { View } from 'react-native';
|
|
19
|
-
import { GestureDetector, Gesture } from 'react-native-gesture-handler';
|
|
20
|
-
import Animated, { useSharedValue, useAnimatedStyle, runOnJS } from 'react-native-reanimated';
|
|
21
|
-
import { warn } from '@mpxjs/utils';
|
|
22
|
-
import useInnerProps, { getCustomEvent } from './getInnerListeners';
|
|
23
|
-
import useNodesRef from './useNodesRef';
|
|
24
|
-
import { useLayout, useTransformStyle, extendObject, useRunOnJSCallback } from './utils';
|
|
25
|
-
import Portal from './mpx-portal';
|
|
26
|
-
import { FormContext } from './context';
|
|
27
|
-
const Slider = forwardRef((props, ref) => {
|
|
28
|
-
const { min: rawMin = 0, max: rawMax = 100, step: rawStep = 1, disabled = false, value: rawValue, color, 'selected-color': selectedColor, activeColor = selectedColor || color || '#1aad19', backgroundColor = color || '#e9e9e9', 'block-size': rawBlockSize = 28, 'block-color': blockColor = '#ffffff', name, style = {}, 'enable-var': enableVar, 'external-var-context': externalVarContext, 'parent-font-size': parentFontSize, 'parent-width': parentWidth, 'parent-height': parentHeight } = props;
|
|
29
|
-
// 确保数值类型正确
|
|
30
|
-
const min = typeof rawMin === 'string' ? parseFloat(rawMin) : rawMin;
|
|
31
|
-
const max = typeof rawMax === 'string' ? parseFloat(rawMax) : rawMax;
|
|
32
|
-
const step = typeof rawStep === 'string' ? parseFloat(rawStep) : rawStep;
|
|
33
|
-
const value = rawValue !== undefined ? (typeof rawValue === 'string' ? parseFloat(rawValue) : rawValue) : undefined;
|
|
34
|
-
const blockSize = typeof rawBlockSize === 'string' ? parseFloat(rawBlockSize) : rawBlockSize;
|
|
35
|
-
// 如果没有提供 value,则使用 min 作为默认值
|
|
36
|
-
const defaultValue = value !== undefined ? value : min;
|
|
37
|
-
const nodeRef = useRef(null);
|
|
38
|
-
const trackRef = useRef(null);
|
|
39
|
-
const [currentValue, setCurrentValue] = useState(defaultValue);
|
|
40
|
-
const [trackWidth, setTrackWidth] = useState(0);
|
|
41
|
-
const thumbPosition = useSharedValue(0);
|
|
42
|
-
const isDragging = useSharedValue(false);
|
|
43
|
-
const startDragPosition = useSharedValue(0); // 记录拖拽开始时的位置
|
|
44
|
-
const startDragValue = useSharedValue(0); // 记录拖拽开始时的值
|
|
45
|
-
let formValuesMap;
|
|
46
|
-
const propsRef = useRef(props);
|
|
47
|
-
propsRef.current = props;
|
|
48
|
-
const formContext = useContext(FormContext);
|
|
49
|
-
if (formContext) {
|
|
50
|
-
formValuesMap = formContext.formValuesMap;
|
|
51
|
-
}
|
|
52
|
-
const { normalStyle, hasSelfPercent, setWidth, setHeight, hasPositionFixed } = useTransformStyle(style, {
|
|
53
|
-
enableVar,
|
|
54
|
-
externalVarContext,
|
|
55
|
-
parentFontSize,
|
|
56
|
-
parentWidth,
|
|
57
|
-
parentHeight
|
|
58
|
-
});
|
|
59
|
-
const { layoutRef, layoutStyle, layoutProps } = useLayout({
|
|
60
|
-
props,
|
|
61
|
-
hasSelfPercent,
|
|
62
|
-
setWidth,
|
|
63
|
-
setHeight,
|
|
64
|
-
nodeRef
|
|
65
|
-
});
|
|
66
|
-
useNodesRef(props, ref, nodeRef, {
|
|
67
|
-
style: normalStyle
|
|
68
|
-
});
|
|
69
|
-
// 使用 useRunOnJSCallback 处理手势回调
|
|
70
|
-
const runOnJSCallbackRef = useRef({
|
|
71
|
-
triggerChangeEvent: (newValue) => {
|
|
72
|
-
setCurrentValue(newValue);
|
|
73
|
-
const currentProps = propsRef.current;
|
|
74
|
-
const changeHandler = currentProps.bindchange || currentProps.catchchange;
|
|
75
|
-
if (changeHandler) {
|
|
76
|
-
changeHandler(getCustomEvent('change', {}, { layoutRef, detail: { value: newValue } }, currentProps));
|
|
77
|
-
}
|
|
78
|
-
},
|
|
79
|
-
triggerChangingEvent: (newValue) => {
|
|
80
|
-
const currentProps = propsRef.current;
|
|
81
|
-
const changingHandler = currentProps.bindchanging || currentProps.catchchanging;
|
|
82
|
-
if (changingHandler) {
|
|
83
|
-
changingHandler(getCustomEvent('changing', {}, { layoutRef, detail: { value: newValue } }, currentProps));
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
});
|
|
87
|
-
const runOnJSCallback = useRunOnJSCallback(runOnJSCallbackRef);
|
|
88
|
-
// 限制步长,确保 step 大于 0,并且可被 (max - min) 整除
|
|
89
|
-
const validateStep = (step, min, max) => {
|
|
90
|
-
if (step <= 0)
|
|
91
|
-
return 1;
|
|
92
|
-
if ((max - min) % step !== 0) {
|
|
93
|
-
warn(`Step ${step} is not a divisor of range ${max - min}`);
|
|
94
|
-
}
|
|
95
|
-
return step;
|
|
96
|
-
};
|
|
97
|
-
const validStep = validateStep(step, min, max);
|
|
98
|
-
// 将值约束在 min-max 范围内,并按步长对齐
|
|
99
|
-
const constrainValue = (val, minVal = min, maxVal = max, stepVal = validStep) => {
|
|
100
|
-
const constrained = Math.max(minVal, Math.min(maxVal, val));
|
|
101
|
-
const steps = Math.round((constrained - minVal) / stepVal);
|
|
102
|
-
return minVal + steps * stepVal;
|
|
103
|
-
};
|
|
104
|
-
// 计算滑块位置
|
|
105
|
-
const getThumbPosition = (val, trackW = trackWidth, minVal = min, maxVal = max) => {
|
|
106
|
-
if (trackW === 0)
|
|
107
|
-
return 0;
|
|
108
|
-
const percentage = (val - minVal) / (maxVal - minVal);
|
|
109
|
-
const position = percentage * trackW;
|
|
110
|
-
return position;
|
|
111
|
-
};
|
|
112
|
-
// 手势处理
|
|
113
|
-
const panGesture = useMemo(() => {
|
|
114
|
-
const getThumbPositionWorklet = (val, trackW, minVal, maxVal) => {
|
|
115
|
-
'worklet';
|
|
116
|
-
if (trackW === 0)
|
|
117
|
-
return 0;
|
|
118
|
-
const percentage = (val - minVal) / (maxVal - minVal);
|
|
119
|
-
return percentage * trackW;
|
|
120
|
-
};
|
|
121
|
-
const constrainValueWorklet = (val, minVal, maxVal, stepVal) => {
|
|
122
|
-
'worklet';
|
|
123
|
-
const constrained = Math.max(minVal, Math.min(maxVal, val));
|
|
124
|
-
const steps = Math.round((constrained - minVal) / stepVal);
|
|
125
|
-
return minVal + steps * stepVal;
|
|
126
|
-
};
|
|
127
|
-
return Gesture.Pan()
|
|
128
|
-
.enabled(!disabled) // 通过手势启用状态控制是否可拖拽
|
|
129
|
-
.onBegin(() => {
|
|
130
|
-
'worklet';
|
|
131
|
-
if (trackWidth === 0)
|
|
132
|
-
return;
|
|
133
|
-
isDragging.value = true;
|
|
134
|
-
// 记录拖拽开始时的位置 - 使用当前的动画位置
|
|
135
|
-
startDragPosition.value = thumbPosition.value;
|
|
136
|
-
// 根据当前位置反推值
|
|
137
|
-
const percentage = thumbPosition.value / trackWidth;
|
|
138
|
-
const currentVal = min + percentage * (max - min);
|
|
139
|
-
startDragValue.value = constrainValueWorklet(currentVal, min, max, validStep);
|
|
140
|
-
})
|
|
141
|
-
.onUpdate((event) => {
|
|
142
|
-
'worklet';
|
|
143
|
-
if (trackWidth === 0)
|
|
144
|
-
return;
|
|
145
|
-
// 基于拖拽开始位置计算新位置
|
|
146
|
-
const newX = startDragPosition.value + event.translationX;
|
|
147
|
-
const clampedX = Math.max(0, Math.min(trackWidth, newX));
|
|
148
|
-
// 计算新值
|
|
149
|
-
const percentage = clampedX / trackWidth;
|
|
150
|
-
const rawValue = min + percentage * (max - min);
|
|
151
|
-
const newValue = constrainValueWorklet(rawValue, min, max, validStep);
|
|
152
|
-
// 更新滑块位置 - 使用约束后的值对应的位置
|
|
153
|
-
const constrainedPosition = getThumbPositionWorklet(newValue, trackWidth, min, max);
|
|
154
|
-
thumbPosition.value = constrainedPosition;
|
|
155
|
-
// 只触发 changing 事件,不更新 currentValue(避免干扰拖拽)
|
|
156
|
-
runOnJS(runOnJSCallback)('triggerChangingEvent', newValue);
|
|
157
|
-
})
|
|
158
|
-
.onEnd((event) => {
|
|
159
|
-
'worklet';
|
|
160
|
-
isDragging.value = false;
|
|
161
|
-
// 基于拖拽开始位置计算最终位置
|
|
162
|
-
const newX = startDragPosition.value + event.translationX;
|
|
163
|
-
const clampedX = Math.max(0, Math.min(trackWidth, newX));
|
|
164
|
-
const percentage = clampedX / trackWidth;
|
|
165
|
-
const rawValue = min + percentage * (max - min);
|
|
166
|
-
const finalValue = constrainValueWorklet(rawValue, min, max, validStep);
|
|
167
|
-
// 确保滑块位置与最终值匹配
|
|
168
|
-
const finalPosition = getThumbPositionWorklet(finalValue, trackWidth, min, max);
|
|
169
|
-
thumbPosition.value = finalPosition;
|
|
170
|
-
// 更新 currentValue 并触发 change 事件
|
|
171
|
-
runOnJS(runOnJSCallback)('triggerChangeEvent', finalValue);
|
|
172
|
-
});
|
|
173
|
-
}, [disabled, trackWidth, min, max, validStep, runOnJSCallback]);
|
|
174
|
-
// 当 value 属性变化时更新位置
|
|
175
|
-
useEffect(() => {
|
|
176
|
-
const newValue = constrainValue(defaultValue);
|
|
177
|
-
setCurrentValue(newValue);
|
|
178
|
-
// 同时更新动画位置
|
|
179
|
-
thumbPosition.value = getThumbPosition(newValue);
|
|
180
|
-
}, [defaultValue, min, max, validStep]);
|
|
181
|
-
// 当 trackWidth 变化时更新滑块位置
|
|
182
|
-
useEffect(() => {
|
|
183
|
-
// 只在非拖拽状态下更新位置
|
|
184
|
-
if (!isDragging.value) {
|
|
185
|
-
thumbPosition.value = getThumbPosition(currentValue);
|
|
186
|
-
}
|
|
187
|
-
}, [trackWidth, currentValue]);
|
|
188
|
-
// 动画样式
|
|
189
|
-
const animatedThumbStyle = useAnimatedStyle(() => {
|
|
190
|
-
const blockSizeNum = Math.max(12, Math.min(28, blockSize));
|
|
191
|
-
const trackHeight = 4;
|
|
192
|
-
return {
|
|
193
|
-
position: 'absolute',
|
|
194
|
-
top: -((blockSizeNum - trackHeight) / 2),
|
|
195
|
-
left: Math.max(0, Math.min(trackWidth - blockSizeNum, thumbPosition.value - (blockSizeNum / 2))),
|
|
196
|
-
width: blockSizeNum,
|
|
197
|
-
height: blockSizeNum,
|
|
198
|
-
justifyContent: 'center',
|
|
199
|
-
alignItems: 'center'
|
|
200
|
-
};
|
|
201
|
-
});
|
|
202
|
-
// 轨道布局回调
|
|
203
|
-
const onTrackLayout = (event) => {
|
|
204
|
-
const { width } = event.nativeEvent.layout;
|
|
205
|
-
setTrackWidth(width);
|
|
206
|
-
};
|
|
207
|
-
// 表单相关处理
|
|
208
|
-
const resetValue = () => {
|
|
209
|
-
const currentProps = propsRef.current;
|
|
210
|
-
const currentValue = currentProps.value !== undefined ? currentProps.value : currentProps.min || 0;
|
|
211
|
-
const parsedValue = typeof currentValue === 'string' ? parseFloat(currentValue) : currentValue;
|
|
212
|
-
const currentMin = typeof currentProps.min === 'string' ? parseFloat(currentProps.min) : (currentProps.min || 0);
|
|
213
|
-
const currentMax = typeof currentProps.max === 'string' ? parseFloat(currentProps.max) : (currentProps.max || 100);
|
|
214
|
-
const currentStep = typeof currentProps.step === 'string' ? parseFloat(currentProps.step) : (currentProps.step || 1);
|
|
215
|
-
const resetVal = parsedValue !== undefined ? parsedValue : currentMin;
|
|
216
|
-
const validatedStep = validateStep(currentStep, currentMin, currentMax);
|
|
217
|
-
const constrainedVal = constrainValue(resetVal, currentMin, currentMax, validatedStep);
|
|
218
|
-
setCurrentValue(constrainedVal);
|
|
219
|
-
thumbPosition.value = getThumbPosition(constrainedVal, trackWidth, currentMin, currentMax);
|
|
220
|
-
};
|
|
221
|
-
const getValue = () => {
|
|
222
|
-
return currentValue;
|
|
223
|
-
};
|
|
224
|
-
if (formValuesMap) {
|
|
225
|
-
if (!name) {
|
|
226
|
-
warn('If a form component is used, the name attribute is required.');
|
|
227
|
-
}
|
|
228
|
-
else {
|
|
229
|
-
formValuesMap.set(name, { getValue, resetValue });
|
|
230
|
-
}
|
|
231
|
-
}
|
|
232
|
-
useEffect(() => {
|
|
233
|
-
return () => {
|
|
234
|
-
if (formValuesMap && name) {
|
|
235
|
-
formValuesMap.delete(name);
|
|
236
|
-
}
|
|
237
|
-
};
|
|
238
|
-
}, []);
|
|
239
|
-
// 样式定义
|
|
240
|
-
const blockSizeNum = Math.max(12, Math.min(28, blockSize));
|
|
241
|
-
const trackHeight = 4;
|
|
242
|
-
const containerStyle = extendObject({}, {
|
|
243
|
-
flexDirection: 'row',
|
|
244
|
-
alignItems: 'center',
|
|
245
|
-
minHeight: Math.max(blockSizeNum + 8, 40),
|
|
246
|
-
paddingHorizontal: 14 // 固定内边距,不受 block-size 影响
|
|
247
|
-
}, normalStyle, layoutStyle);
|
|
248
|
-
const trackStyle = {
|
|
249
|
-
flex: 1,
|
|
250
|
-
height: trackHeight,
|
|
251
|
-
backgroundColor,
|
|
252
|
-
borderRadius: trackHeight / 2,
|
|
253
|
-
position: 'relative'
|
|
254
|
-
};
|
|
255
|
-
// 动画进度条样式
|
|
256
|
-
const animatedProgressStyle = useAnimatedStyle(() => {
|
|
257
|
-
return {
|
|
258
|
-
height: '100%',
|
|
259
|
-
backgroundColor: activeColor,
|
|
260
|
-
borderRadius: trackHeight / 2,
|
|
261
|
-
width: Math.max(0, thumbPosition.value)
|
|
262
|
-
};
|
|
263
|
-
});
|
|
264
|
-
const thumbStyle = {
|
|
265
|
-
width: blockSizeNum,
|
|
266
|
-
height: blockSizeNum,
|
|
267
|
-
backgroundColor: blockColor,
|
|
268
|
-
borderRadius: blockSizeNum / 2,
|
|
269
|
-
shadowColor: '#000',
|
|
270
|
-
shadowOffset: { width: 0, height: 2 },
|
|
271
|
-
shadowOpacity: 0.2,
|
|
272
|
-
shadowRadius: 4,
|
|
273
|
-
elevation: 4
|
|
274
|
-
};
|
|
275
|
-
const innerProps = useInnerProps(extendObject({}, props, layoutProps, {
|
|
276
|
-
ref: nodeRef
|
|
277
|
-
}), [
|
|
278
|
-
'min',
|
|
279
|
-
'max',
|
|
280
|
-
'step',
|
|
281
|
-
'disabled',
|
|
282
|
-
'value',
|
|
283
|
-
'color',
|
|
284
|
-
'selected-color',
|
|
285
|
-
'activeColor',
|
|
286
|
-
'backgroundColor',
|
|
287
|
-
'block-size',
|
|
288
|
-
'block-color',
|
|
289
|
-
'bindchange',
|
|
290
|
-
'catchchange',
|
|
291
|
-
'bindchanging',
|
|
292
|
-
'catchchanging'
|
|
293
|
-
], { layoutRef });
|
|
294
|
-
const sliderContent = createElement(View, extendObject({}, innerProps, { style: containerStyle }),
|
|
295
|
-
// 轨道容器
|
|
296
|
-
createElement(View, {
|
|
297
|
-
style: trackStyle,
|
|
298
|
-
onLayout: onTrackLayout,
|
|
299
|
-
ref: trackRef
|
|
300
|
-
},
|
|
301
|
-
// 进度条 - 使用动画样式
|
|
302
|
-
createElement(Animated.View, {
|
|
303
|
-
style: animatedProgressStyle
|
|
304
|
-
}),
|
|
305
|
-
// 滑块容器
|
|
306
|
-
createElement(GestureDetector, {
|
|
307
|
-
gesture: panGesture
|
|
308
|
-
}, createElement(Animated.View, {
|
|
309
|
-
style: [animatedThumbStyle]
|
|
310
|
-
},
|
|
311
|
-
// 滑块
|
|
312
|
-
createElement(View, {
|
|
313
|
-
style: thumbStyle
|
|
314
|
-
})))));
|
|
315
|
-
if (hasPositionFixed) {
|
|
316
|
-
return createElement(Portal, null, sliderContent);
|
|
317
|
-
}
|
|
318
|
-
return sliderContent;
|
|
319
|
-
});
|
|
320
|
-
Slider.displayName = 'MpxSlider';
|
|
321
|
-
export default Slider;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"mpx-sticky-header.d.ts","sourceRoot":"","sources":["../mpx-sticky-header.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAqE,SAAS,EAAS,MAAM,OAAO,CAAA;AAC3G,OAAO,EAAwB,IAAI,EAAE,oBAAoB,EAAE,SAAS,EAAuC,MAAM,cAAc,CAAA;AAE/H,OAAoB,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA;AAKvD,UAAU,iBAAiB;IACzB,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,KAAK,CAAC,EAAE,SAAS,C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|
-
{"version":3,"file":"mpx-swiper-item.d.ts","sourceRoot":"","sources":["../mpx-swiper-item.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAA;AAEnC,OAAO,EAAE,SAAS,EAAiD,MAAM,OAAO,CAAA;AAEhF,OAAoB,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA;AAIvD,UAAU,eAAe;IACvB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,eAAe,CAAC,EAAE,OAAO,CAAA;IACzB,YAAY,EAAE,OAAO,CAAA;IACrB,sBAAsB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IAC5C,kBAAkB,CAAC,EAAE,MAAM,CAAA;IAC3B,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB,QAAQ,CAAC,EAAE,SAAS,CAAA;IACpB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,WAAW,EAAE,MAAM,CAAA;IACnB,SAAS,EAAE,MAAM,CAAA;CAClB;AASD,QAAA,MAAM,WAAW,+HA8Ef,CAAA;AAIF,eAAe,WAAW,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"mpx-swiper.d.ts","sourceRoot":"","sources":["../mpx-swiper.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,oBAAoB,EAAqB,MAAM,cAAc,CAAA;AAI5E,OAAO,KAAK,EAAE,EAAsC,SAAS,EAAwC,MAAM,OAAO,CAAA;AAElH,OAAoB,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA;AACvD,OAAO,EAAoF,cAAc,EAAmC,MAAM,SAAS,CAAA;AAG3J;;;;;;;;;;;;;;;GAeG;AACH,KAAK,QAAQ,GAAG,SAAS,GAAG,QAAQ,GAAG,aAAa,GAAG,cAAc,GAAG,gBAAgB,CAAA;AAUxF,UAAU,WAAW;IACnB,QAAQ,CAAC,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