@tarojs/components 4.1.7 → 4.1.8-alpha.0

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.
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../../../taro-components-library-react/src/react-component-lib/utils/index.tsx"],"sourcesContent":["/**\n * Modify from https://github.com/ionic-team/stencil-ds-output-targets/blob/main/packages/react-output-target/react-component-lib/utils/index.ts\n * MIT License https://github.com/ionic-team/stencil-ds-output-targets/blob/main/LICENSE\n */\nimport React from 'react'\n\nimport type { StyleReactProps } from '../interfaces'\n\nexport type StencilReactExternalProps<PropType, ElementType> = PropType &\nOmit<React.HTMLAttributes<ElementType>, 'style'> &\nStyleReactProps;\n\n// This will be replaced with React.ForwardedRef when react-output-target is upgraded to React v17\nexport type StencilReactForwardedRef<T> = ((instance: T | null) => void) | React.MutableRefObject<T | null> | null;\n\nexport const setRef = (ref: StencilReactForwardedRef<any> | React.Ref<any> | undefined, value: any) => {\n if (typeof ref === 'function') {\n ref(value)\n } else if (ref != null) {\n // Cast as a MutableRef so we can assign current\n (ref as React.MutableRefObject<any>).current = value\n }\n}\n\nexport const mergeRefs = (\n ...refs: (StencilReactForwardedRef<any> | React.Ref<any> | undefined)[]\n): React.RefCallback<any> => {\n return (value: any) => {\n refs.forEach((ref) => {\n setRef(ref, value)\n })\n }\n}\n\nexport const createForwardRef = <PropType, ElementType>(ReactComponent: any, displayName: string) => {\n const forwardRef = (\n props: StencilReactExternalProps<PropType, ElementType>,\n ref: StencilReactForwardedRef<ElementType>\n ) => {\n return <ReactComponent {...props} forwardedRef={ref} />\n }\n forwardRef.displayName = displayName\n\n return React.forwardRef(forwardRef)\n}\n\nexport const defineCustomElement = (tagName: string, customElement: any) => {\n if (customElement !== undefined && typeof customElements !== 'undefined' && !customElements.get(tagName)) {\n customElements.define(tagName, customElement)\n }\n}\n\nexport * from './attachProps'\nexport * from './case'\n"],"names":[],"mappings":";;;;AAAA;;;AAGG;MAYU,MAAM,GAAG,CAAC,GAA+D,EAAE,KAAU,KAAI;AACpG,IAAA,IAAI,OAAO,GAAG,KAAK,UAAU,EAAE;QAC7B,GAAG,CAAC,KAAK,CAAC;;AACL,SAAA,IAAI,GAAG,IAAI,IAAI,EAAE;;AAErB,QAAA,GAAmC,CAAC,OAAO,GAAG,KAAK;;AAExD;MAEa,SAAS,GAAG,CACvB,GAAG,IAAoE,KAC7C;IAC1B,OAAO,CAAC,KAAU,KAAI;AACpB,QAAA,IAAI,CAAC,OAAO,CAAC,CAAC,GAAG,KAAI;AACnB,YAAA,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC;AACpB,SAAC,CAAC;AACJ,KAAC;AACH;MAEa,gBAAgB,GAAG,CAAwB,cAAmB,EAAE,WAAmB,KAAI;AAClG,IAAA,MAAM,UAAU,GAAG,CACjB,KAAuD,EACvD,GAA0C,KACxC;QACF,OAAO,KAAA,CAAA,aAAA,CAAC,cAAc,EAAK,MAAA,CAAA,MAAA,CAAA,EAAA,EAAA,KAAK,IAAE,YAAY,EAAE,GAAG,EAAA,CAAA,CAAI;AACzD,KAAC;AACD,IAAA,UAAU,CAAC,WAAW,GAAG,WAAW;AAEpC,IAAA,OAAO,KAAK,CAAC,UAAU,CAAC,UAAU,CAAC;AACrC;MAEa,mBAAmB,GAAG,CAAC,OAAe,EAAE,aAAkB,KAAI;AACzE,IAAA,IAAI,aAAa,KAAK,SAAS,IAAI,OAAO,cAAc,KAAK,WAAW,IAAI,CAAC,cAAc,CAAC,GAAG,CAAC,OAAO,CAAC,EAAE;AACxG,QAAA,cAAc,CAAC,MAAM,CAAC,OAAO,EAAE,aAAa,CAAC;;AAEjD;;;;"}
1
+ {"version":3,"file":"index.js","sources":["../../../../../taro-components-library-react/src/react-component-lib/utils/index.tsx"],"sourcesContent":["/**\n * Modify from https://github.com/ionic-team/stencil-ds-output-targets/blob/main/packages/react-output-target/react-component-lib/utils/index.ts\n * MIT License https://github.com/ionic-team/stencil-ds-output-targets/blob/main/LICENSE\n */\nimport React, { PropsWithoutRef } from 'react'\n\nimport type { StyleReactProps } from '../interfaces'\n\nexport type StencilReactExternalProps<PropType, ElementType> = PropType &\nOmit<React.HTMLAttributes<ElementType>, 'style'> &\nStyleReactProps;\n\n// This will be replaced with React.ForwardedRef when react-output-target is upgraded to React v17\nexport type StencilReactForwardedRef<T> = ((instance: T | null) => void) | React.MutableRefObject<T | null> | null;\n\nexport const setRef = (ref: StencilReactForwardedRef<any> | React.Ref<any> | undefined, value: any) => {\n if (typeof ref === 'function') {\n ref(value)\n } else if (ref != null) {\n // Cast as a MutableRef so we can assign current\n (ref as React.MutableRefObject<any>).current = value\n }\n}\n\nexport const mergeRefs = (\n ...refs: (StencilReactForwardedRef<any> | React.Ref<any> | undefined)[]\n): React.RefCallback<any> => {\n return (value: any) => {\n refs.forEach((ref) => {\n setRef(ref, value)\n })\n }\n}\n\nexport const createForwardRef = <PropType, ElementType>(ReactComponent: any, displayName: string) => {\n const forwardRef = (\n props: PropsWithoutRef<StencilReactExternalProps<PropType, ElementType>>,\n ref: StencilReactForwardedRef<ElementType>\n ) => {\n return <ReactComponent {...props} forwardedRef={ref} />\n }\n forwardRef.displayName = displayName\n\n return React.forwardRef(forwardRef)\n}\n\nexport const defineCustomElement = (tagName: string, customElement: any) => {\n if (customElement !== undefined && typeof customElements !== 'undefined' && !customElements.get(tagName)) {\n customElements.define(tagName, customElement)\n }\n}\n\nexport * from './attachProps'\nexport * from './case'\n"],"names":[],"mappings":";;;;AAAA;;;AAGG;MAYU,MAAM,GAAG,CAAC,GAA+D,EAAE,KAAU,KAAI;AACpG,IAAA,IAAI,OAAO,GAAG,KAAK,UAAU,EAAE;QAC7B,GAAG,CAAC,KAAK,CAAC;;AACL,SAAA,IAAI,GAAG,IAAI,IAAI,EAAE;;AAErB,QAAA,GAAmC,CAAC,OAAO,GAAG,KAAK;;AAExD;MAEa,SAAS,GAAG,CACvB,GAAG,IAAoE,KAC7C;IAC1B,OAAO,CAAC,KAAU,KAAI;AACpB,QAAA,IAAI,CAAC,OAAO,CAAC,CAAC,GAAG,KAAI;AACnB,YAAA,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC;AACpB,SAAC,CAAC;AACJ,KAAC;AACH;MAEa,gBAAgB,GAAG,CAAwB,cAAmB,EAAE,WAAmB,KAAI;AAClG,IAAA,MAAM,UAAU,GAAG,CACjB,KAAwE,EACxE,GAA0C,KACxC;QACF,OAAO,KAAA,CAAA,aAAA,CAAC,cAAc,EAAK,MAAA,CAAA,MAAA,CAAA,EAAA,EAAA,KAAK,IAAE,YAAY,EAAE,GAAG,EAAA,CAAA,CAAI;AACzD,KAAC;AACD,IAAA,UAAU,CAAC,WAAW,GAAG,WAAW;AAEpC,IAAA,OAAO,KAAK,CAAC,UAAU,CAAC,UAAU,CAAC;AACrC;MAEa,mBAAmB,GAAG,CAAC,OAAe,EAAE,aAAkB,KAAI;AACzE,IAAA,IAAI,aAAa,KAAK,SAAS,IAAI,OAAO,cAAc,KAAK,WAAW,IAAI,CAAC,cAAc,CAAC,GAAG,CAAC,OAAO,CAAC,EAAE;AACxG,QAAA,cAAc,CAAC,MAAM,CAAC,OAAO,EAAE,aAAa,CAAC;;AAEjD;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tarojs/components",
3
- "version": "4.1.7",
3
+ "version": "4.1.8-alpha.0",
4
4
  "description": "Taro 组件库",
5
5
  "browser": "dist/index.js",
6
6
  "main:h5": "dist/index.js",
@@ -40,9 +40,9 @@
40
40
  "resolve-pathname": "^3.0.0",
41
41
  "swiper": "11.1.15",
42
42
  "tslib": "^2.6.2",
43
- "@tarojs/runtime": "4.1.7",
44
- "@tarojs/shared": "4.1.7",
45
- "@tarojs/taro": "4.1.7"
43
+ "@tarojs/runtime": "4.1.8-alpha.0",
44
+ "@tarojs/taro": "4.1.8-alpha.0",
45
+ "@tarojs/shared": "4.1.8-alpha.0"
46
46
  },
47
47
  "devDependencies": {
48
48
  "@babel/generator": "^7.21.4",
@@ -68,7 +68,7 @@
68
68
  "jest-cli": "27.5.1",
69
69
  "jest-runner": "27.5.1",
70
70
  "jest-environment-node": "27.5.1",
71
- "@tarojs/helper": "4.1.7"
71
+ "@tarojs/helper": "4.1.8-alpha.0"
72
72
  },
73
73
  "peerDependenciesMeta": {
74
74
  "@types/react": {