@tarojs/components 4.1.4-beta.4 → 4.1.4-beta.5

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 (25) hide show
  1. package/lib/react/component-lib/index.js.map +1 -1
  2. package/lib/react/component-lib/input.js.map +1 -1
  3. package/lib/react/component-lib/reactify-wc.js.map +1 -1
  4. package/lib/react/components.js.map +1 -1
  5. package/lib/react/helper.js.map +1 -1
  6. package/lib/react/node_modules/.pnpm/{@rollup_plugin-typescript@11.1.6_rollup@4.44.0_tslib@2.8.1_typescript@5.4.5 → @rollup_plugin-typescript@11.1.6_rollup@4.39.0_tslib@2.8.1_typescript@5.4.5}/node_modules/tslib/tslib.es6.js.map +1 -1
  7. package/lib/react/react-component-lib/createComponent.js +1 -1
  8. package/lib/react/react-component-lib/createComponent.js.map +1 -1
  9. package/lib/react/react-component-lib/createOverlayComponent.js +1 -1
  10. package/lib/react/react-component-lib/createOverlayComponent.js.map +1 -1
  11. package/lib/react/react-component-lib/utils/attachProps.js.map +1 -1
  12. package/lib/react/react-component-lib/utils/index.js.map +1 -1
  13. package/lib/solid/component-lib/index.js.map +1 -1
  14. package/lib/solid/helper.js.map +1 -1
  15. package/lib/solid/solid-component-lib/createComponent.js.map +1 -1
  16. package/lib/solid/solid-component-lib/utils/element.js.map +1 -1
  17. package/lib/vue3/component-lib/createComponent.js.map +1 -1
  18. package/lib/vue3/component-lib/createFormsComponent.js.map +1 -1
  19. package/lib/vue3/component-lib/icon.js.map +1 -1
  20. package/lib/vue3/component-lib/index.js.map +1 -1
  21. package/lib/vue3/components-loader.js.map +1 -1
  22. package/lib/vue3/components.js.map +1 -1
  23. package/lib/vue3/vue-component-lib/utils.js.map +1 -1
  24. package/package.json +6 -6
  25. /package/lib/react/node_modules/.pnpm/{@rollup_plugin-typescript@11.1.6_rollup@4.44.0_tslib@2.8.1_typescript@5.4.5 → @rollup_plugin-typescript@11.1.6_rollup@4.39.0_tslib@2.8.1_typescript@5.4.5}/node_modules/tslib/tslib.es6.js +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"createComponent.js","sources":["../../../../taro-components-library-react/src/react-component-lib/createComponent.tsx"],"sourcesContent":["/**\n * Modify from https://github.com/ionic-team/stencil-ds-output-targets/blob/main/packages/react-output-target/react-component-lib/createComponent.ts\n * MIT License https://github.com/ionic-team/stencil-ds-output-targets/blob/main/LICENSE\n */\nimport React, { createElement } from 'react'\n\nimport {\n applyUnControlledDefaultValue,\n attachProps,\n camelToDashCase,\n createForwardRef,\n dashToPascalCase,\n isCoveredByReact,\n mergeRefs,\n} from './utils'\n\nexport interface HTMLStencilElement extends HTMLElement {\n componentOnReady(): Promise<this>\n}\n\ninterface StencilReactInternalProps<ElementType> extends React.HTMLAttributes<ElementType> {\n forwardedRef: React.RefObject<ElementType>\n ref?: React.Ref<any>\n}\n\nexport const createReactComponent = <\n PropType,\n ElementType extends HTMLStencilElement,\n ContextStateType = any,\n ExpandedPropsTypes = any\n>(\n tagName: string,\n ReactComponentContext?: React.Context<ContextStateType>,\n manipulatePropsFunction?: (\n originalProps: StencilReactInternalProps<ElementType>,\n propsToPass: any\n ) => ExpandedPropsTypes,\n defineCustomElement?: () => void\n) => {\n if (!DEPRECATED_ADAPTER_COMPONENT && defineCustomElement !== undefined) {\n defineCustomElement()\n }\n\n const displayName = dashToPascalCase(tagName)\n const ReactComponent = class extends React.Component<StencilReactInternalProps<ElementType>> {\n componentEl!: ElementType\n\n setComponentElRef = (element: ElementType) => {\n this.componentEl = element\n }\n\n // eslint-disable-next-line no-useless-constructor\n constructor (props: StencilReactInternalProps<ElementType>) {\n super(props)\n }\n\n componentDidMount () {\n applyUnControlledDefaultValue(this.componentEl, this.props)\n this.componentDidUpdate(this.props)\n }\n\n componentDidUpdate (prevProps: StencilReactInternalProps<ElementType>) {\n attachProps(this.componentEl, this.props, prevProps)\n }\n\n render () {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const { children, forwardedRef, className, ref, style, ...cProps } = this.props\n\n let propsToPass = Object.keys(cProps).reduce((acc: any, name) => {\n const value = (cProps as any)[name]\n\n if (name.indexOf('on') === 0 && name[2] === name[2].toUpperCase()) {\n const eventName = name.substring(2).toLowerCase()\n if (typeof document !== 'undefined' && isCoveredByReact(eventName)) {\n acc[name] = value\n }\n } else {\n // we should only render strings, booleans, and numbers as attrs in html.\n // objects, functions, arrays etc get synced via properties on mount.\n const type = typeof value\n\n if (['string', 'boolean', 'number'].includes(type)) {\n acc[camelToDashCase(name)] = value\n }\n }\n return acc\n }, {} as ExpandedPropsTypes)\n\n if (manipulatePropsFunction) {\n propsToPass = manipulatePropsFunction(this.props, propsToPass)\n }\n\n const newProps: Omit<StencilReactInternalProps<ElementType>, 'forwardedRef'> = {\n ...propsToPass,\n ref: mergeRefs(forwardedRef, this.setComponentElRef),\n // Note(taro): 需处理 string 类型的 style,调整到 manipulatePropsFunction 方法中判断是否需注入 (string 类型在 attachProps 中处理)\n // style\n }\n\n /**\n * We use createElement here instead of\n * React.createElement to work around a\n * bug in Vite (https://github.com/vitejs/vite/issues/6104).\n * React.createElement causes all elements to be rendered\n * as <tagname> instead of the actual Web Component.\n */\n return createElement(tagName, newProps, children)\n }\n\n static get displayName () {\n return displayName\n }\n }\n\n // If context was passed to createReactComponent then conditionally add it to the Component Class\n if (ReactComponentContext) {\n ReactComponent.contextType = ReactComponentContext\n }\n\n return createForwardRef<PropType, ElementType>(ReactComponent, displayName)\n}\n"],"names":[],"mappings":";;;;;;AAyBO,MAAM,oBAAoB,GAAG,CAMlC,OAAe,EACf,qBAAuD,EACvD,uBAGuB,EACvB,mBAAgC,KAC9B;AACF,IAAA,IAAI,CAAC,4BAA4B,IAAI,mBAAmB,KAAK,SAAS,EAAE;AACtE,QAAA,mBAAmB,EAAE;;AAGvB,IAAA,MAAM,WAAW,GAAG,gBAAgB,CAAC,OAAO,CAAC;AAC7C,IAAA,MAAM,cAAc,GAAG,cAAc,KAAK,CAAC,SAAiD,CAAA;;AA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,CAAC,GAAG,KAAK;;;qBAEd;;;AAGL,oBAAA,MAAM,IAAI,GAAG,OAAO,KAAK;AAEzB,oBAAA,IAAI,CAAC,QAAQ,EAAE,SAAS,EAAE,QAAQ,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE;wBAClD,GAAG,CAAC,eAAe,CAAC,IAAI,CAAC,CAAC,GAAG,KAAK;;;AAGtC,gBAAA,OAAO,GAAG;aACX,EAAE,EAAwB,CAAC;YAE5B,IAAI,uBAAuB,EAAE;gBAC3B,WAAW,GAAG,uBAAuB,CAAC,IAAI,CAAC,KAAK,EAAE,WAAW,CAAC;;AAGhE,YAAA,MAAM,QAAQ,GAAA,MAAA,CAAA,MAAA,CAAA,MAAA,CAAA,MAAA,CAAA,EAAA,EACT,WAAW,CAAA,EAAA,EACd,GAAG,EAAE,SAAS,CAAC,YAAY,EAAE,IAAI,CAAC,iBAAiB,CAAC,GAGrD;AAED;;;;;;AAMG;YACH,OAAO,aAAa,CAAC,OAAO,EAAE,QAAQ,EAAE,QAAQ,CAAC;;AAGnD,QAAA,WAAW,WAAW,GAAA;AACpB,YAAA,OAAO,WAAW;;KAErB;;IAGD,IAAI,qBAAqB,EAAE;AACzB,QAAA,cAAc,CAAC,WAAW,GAAG,qBAAqB;;AAGpD,IAAA,OAAO,gBAAgB,CAAwB,cAAc,EAAE,WAAW,CAAC;AAC7E;;;;"}
1
+ {"version":3,"file":"createComponent.js","sources":["../../../../taro-components-library-react/src/react-component-lib/createComponent.tsx"],"sourcesContent":["/**\n * Modify from https://github.com/ionic-team/stencil-ds-output-targets/blob/main/packages/react-output-target/react-component-lib/createComponent.ts\n * MIT License https://github.com/ionic-team/stencil-ds-output-targets/blob/main/LICENSE\n */\nimport React, { createElement } from 'react'\n\nimport {\n applyUnControlledDefaultValue,\n attachProps,\n camelToDashCase,\n createForwardRef,\n dashToPascalCase,\n isCoveredByReact,\n mergeRefs,\n} from './utils'\n\nexport interface HTMLStencilElement extends HTMLElement {\n componentOnReady(): Promise<this>\n}\n\ninterface StencilReactInternalProps<ElementType> extends React.HTMLAttributes<ElementType> {\n forwardedRef: React.RefObject<ElementType>\n ref?: React.Ref<any>\n}\n\nexport const createReactComponent = <\n PropType,\n ElementType extends HTMLStencilElement,\n ContextStateType = any,\n ExpandedPropsTypes = any\n>(\n tagName: string,\n ReactComponentContext?: React.Context<ContextStateType>,\n manipulatePropsFunction?: (\n originalProps: StencilReactInternalProps<ElementType>,\n propsToPass: any\n ) => ExpandedPropsTypes,\n defineCustomElement?: () => void\n) => {\n if (!DEPRECATED_ADAPTER_COMPONENT && defineCustomElement !== undefined) {\n defineCustomElement()\n }\n\n const displayName = dashToPascalCase(tagName)\n const ReactComponent = class extends React.Component<StencilReactInternalProps<ElementType>> {\n componentEl!: ElementType\n\n setComponentElRef = (element: ElementType) => {\n this.componentEl = element\n }\n\n // eslint-disable-next-line no-useless-constructor\n constructor (props: StencilReactInternalProps<ElementType>) {\n super(props)\n }\n\n componentDidMount () {\n applyUnControlledDefaultValue(this.componentEl, this.props)\n this.componentDidUpdate(this.props)\n }\n\n componentDidUpdate (prevProps: StencilReactInternalProps<ElementType>) {\n attachProps(this.componentEl, this.props, prevProps)\n }\n\n render () {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const { children, forwardedRef, className, ref, style, ...cProps } = this.props\n\n let propsToPass = Object.keys(cProps).reduce((acc: any, name) => {\n const value = (cProps as any)[name]\n\n if (name.indexOf('on') === 0 && name[2] === name[2].toUpperCase()) {\n const eventName = name.substring(2).toLowerCase()\n if (typeof document !== 'undefined' && isCoveredByReact(eventName)) {\n acc[name] = value\n }\n } else {\n // we should only render strings, booleans, and numbers as attrs in html.\n // objects, functions, arrays etc get synced via properties on mount.\n const type = typeof value\n\n if (['string', 'boolean', 'number'].includes(type)) {\n acc[camelToDashCase(name)] = value\n }\n }\n return acc\n }, {} as ExpandedPropsTypes)\n\n if (manipulatePropsFunction) {\n propsToPass = manipulatePropsFunction(this.props, propsToPass)\n }\n\n const newProps: Omit<StencilReactInternalProps<ElementType>, 'forwardedRef'> = {\n ...propsToPass,\n ref: mergeRefs(forwardedRef, this.setComponentElRef),\n // Note(taro): 需处理 string 类型的 style,调整到 manipulatePropsFunction 方法中判断是否需注入 (string 类型在 attachProps 中处理)\n // style\n }\n\n /**\n * We use createElement here instead of\n * React.createElement to work around a\n * bug in Vite (https://github.com/vitejs/vite/issues/6104).\n * React.createElement causes all elements to be rendered\n * as <tagname> instead of the actual Web Component.\n */\n return createElement(tagName, newProps, children)\n }\n\n static get displayName () {\n return displayName\n }\n }\n\n // If context was passed to createReactComponent then conditionally add it to the Component Class\n if (ReactComponentContext) {\n ReactComponent.contextType = ReactComponentContext\n }\n\n return createForwardRef<PropType, ElementType>(ReactComponent, displayName)\n}\n"],"names":[],"mappings":";;;;;;AAyBO,MAAM,oBAAoB,GAAG,CAMlC,OAAe,EACf,qBAAuD,EACvD,uBAGuB,EACvB,mBAAgC,KAC9B;AACF,IAAA,IAAI,CAAC,4BAA4B,IAAI,mBAAmB,KAAK,SAAS,EAAE;AACtE,QAAA,mBAAmB,EAAE;;AAGvB,IAAA,MAAM,WAAW,GAAG,gBAAgB,CAAC,OAAO,CAAC;AAC7C,IAAA,MAAM,cAAc,GAAG,cAAc,KAAK,CAAC,SAAiD,CAAA;;AAQ1F,QAAA,WAAA,CAAa,KAA6C,EAAA;YACxD,KAAK,CAAC,KAAK,CAAC;AANd,YAAA,IAAA,CAAA,iBAAiB,GAAG,CAAC,OAAoB,KAAI;AAC3C,gBAAA,IAAI,CAAC,WAAW,GAAG,OAAO;AAC5B,aAAC;;QAOD,iBAAiB,GAAA;YACf,6BAA6B,CAAC,IAAI,CAAC,WAAW,EAAE,IAAI,CAAC,KAAK,CAAC;AAC3D,YAAA,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,KAAK,CAAC;;AAGrC,QAAA,kBAAkB,CAAE,SAAiD,EAAA;YACnE,WAAW,CAAC,IAAI,CAAC,WAAW,EAAE,IA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A,MAAA,CAAA,MAAA,CAAA,MAAA,CAAA,MAAA,CAAA,EAAA,EACT,WAAW,CAAA,EAAA,EACd,GAAG,EAAE,SAAS,CAAC,YAAY,EAAE,IAAI,CAAC,iBAAiB,CAAC,GAGrD;AAED;;;;;;AAMG;YACH,OAAO,aAAa,CAAC,OAAO,EAAE,QAAQ,EAAE,QAAQ,CAAC;;AAGnD,QAAA,WAAW,WAAW,GAAA;AACpB,YAAA,OAAO,WAAW;;KAErB;;IAGD,IAAI,qBAAqB,EAAE;AACzB,QAAA,cAAc,CAAC,WAAW,GAAG,qBAAqB;;AAGpD,IAAA,OAAO,gBAAgB,CAAwB,cAAc,EAAE,WAAW,CAAC;AAC7E;;;;"}
@@ -1,4 +1,4 @@
1
- import { __rest } from '../node_modules/.pnpm/@rollup_plugin-typescript@11.1.6_rollup@4.44.0_tslib@2.8.1_typescript@5.4.5/node_modules/tslib/tslib.es6.js';
1
+ import { __rest } from '../node_modules/.pnpm/@rollup_plugin-typescript@11.1.6_rollup@4.39.0_tslib@2.8.1_typescript@5.4.5/node_modules/tslib/tslib.es6.js';
2
2
  import React from 'react';
3
3
  import ReactDOM from 'react-dom';
4
4
  import { defineCustomElement, setRef } from './utils/index.js';
@@ -1 +1 @@
1
- {"version":3,"file":"createOverlayComponent.js","sources":["../../../../taro-components-library-react/src/react-component-lib/createOverlayComponent.tsx"],"sourcesContent":["/**\n * Modify from https://github.com/ionic-team/stencil-ds-output-targets/blob/main/packages/react-output-target/react-component-lib/createOverlayComponent.ts\n * MIT License https://github.com/ionic-team/stencil-ds-output-targets/blob/main/LICENSE\n */\nimport React from 'react'\nimport ReactDOM from 'react-dom'\n\nimport { OverlayEventDetail } from './interfaces'\nimport { attachProps, dashToPascalCase, defineCustomElement, setRef, StencilReactForwardedRef } from './utils'\n\ninterface OverlayElement extends HTMLElement {\n present: () => Promise<void>\n dismiss: (data?: any, role?: string | undefined) => Promise<boolean>\n}\n\nexport interface ReactOverlayProps {\n children?: React.ReactNode\n isOpen: boolean\n onDidDismiss?: (event: CustomEvent<OverlayEventDetail>) => void\n onDidPresent?: (event: CustomEvent<OverlayEventDetail>) => void\n onWillDismiss?: (event: CustomEvent<OverlayEventDetail>) => void\n onWillPresent?: (event: CustomEvent<OverlayEventDetail>) => void\n}\n\nexport const createOverlayComponent = <OverlayComponent extends object, OverlayType extends OverlayElement>(\n tagName: string,\n controller: { create: (options: any) => Promise<OverlayType> },\n customElement?: any\n) => {\n defineCustomElement(tagName, customElement)\n\n const displayName = dashToPascalCase(tagName)\n const didDismissEventName = `on${displayName}DidDismiss`\n const didPresentEventName = `on${displayName}DidPresent`\n const willDismissEventName = `on${displayName}WillDismiss`\n const willPresentEventName = `on${displayName}WillPresent`\n\n type Props = OverlayComponent &\n ReactOverlayProps & {\n forwardedRef?: StencilReactForwardedRef<OverlayType>\n };\n\n let isDismissing = false\n\n class Overlay extends React.Component<Props> {\n overlay?: OverlayType\n el!: HTMLDivElement\n\n constructor (props: Props) {\n super(props)\n if (typeof document !== 'undefined') {\n this.el = document.createElement('div')\n }\n this.handleDismiss = this.handleDismiss.bind(this)\n }\n\n static get displayName () {\n return displayName\n }\n\n componentDidMount () {\n if (this.props.isOpen) {\n this.present()\n }\n }\n\n componentWillUnmount () {\n if (this.overlay) {\n this.overlay.dismiss()\n }\n }\n\n handleDismiss (event: CustomEvent<OverlayEventDetail<any>>) {\n if (this.props.onDidDismiss) {\n this.props.onDidDismiss(event)\n }\n setRef(this.props.forwardedRef, null)\n }\n\n shouldComponentUpdate (nextProps: Props) {\n // Check if the overlay component is about to dismiss\n if (this.overlay && nextProps.isOpen !== this.props.isOpen && nextProps.isOpen === false) {\n isDismissing = true\n }\n\n return true\n }\n\n async componentDidUpdate (prevProps: Props) {\n if (this.overlay) {\n attachProps(this.overlay, this.props, prevProps)\n }\n\n if (prevProps.isOpen !== this.props.isOpen && this.props.isOpen === true) {\n this.present(prevProps)\n }\n if (this.overlay && prevProps.isOpen !== this.props.isOpen && this.props.isOpen === false) {\n await this.overlay.dismiss()\n isDismissing = false\n\n /**\n * Now that the overlay is dismissed\n * we need to render again so that any\n * inner components will be unmounted\n */\n this.forceUpdate()\n }\n }\n\n async present (prevProps?: Props) {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const { children, isOpen, onDidDismiss, onDidPresent, onWillDismiss, onWillPresent, ...cProps } = this.props\n const elementProps = {\n ...cProps,\n ref: this.props.forwardedRef,\n [didDismissEventName]: this.handleDismiss,\n [didPresentEventName]: (e: CustomEvent) => this.props.onDidPresent && this.props.onDidPresent(e),\n [willDismissEventName]: (e: CustomEvent) => this.props.onWillDismiss && this.props.onWillDismiss(e),\n [willPresentEventName]: (e: CustomEvent) => this.props.onWillPresent && this.props.onWillPresent(e),\n }\n\n this.overlay = await controller.create({\n ...elementProps,\n component: this.el,\n componentProps: {},\n })\n\n setRef(this.props.forwardedRef, this.overlay)\n attachProps(this.overlay, elementProps, prevProps)\n\n await this.overlay.present()\n }\n\n render () {\n /**\n * Continue to render the component even when\n * overlay is dismissing otherwise component\n * will be hidden before animation is done.\n */\n return ReactDOM.createPortal(this.props.isOpen || isDismissing ? this.props.children : null, this.el)\n }\n }\n\n return React.forwardRef<OverlayType, Props>((props, ref) => {\n // Note: 组件库错误引入 vue 的 ts 类型,导致 ts 报错,这里先忽略\n // @ts-ignore\n return <Overlay {...props} forwardedRef={ref} />\n })\n}\n"],"names":[],"mappings":";;;;;;;AAwBO,MAAM,sBAAsB,GAAG,CACpC,OAAe,EACf,UAA8D,EAC9D,aAAmB,KACjB;AACF,IAAA,mBAAmB,CAAC,OAAO,EAAE,aAAa,CAAC;AAE3C,IAAA,MAAM,WAAW,GAAG,gBAAgB,CAAC,OAAO,CAAC;AAC7C,IAAA,MAAM,mBAAmB,GAAG,CAAA,EAAA,EAAK,WAAW,YAAY;AACxD,IAAA,MAAM,mBAAmB,GAAG,CAAA,EAAA,EAAK,WAAW,YAAY;AACxD,IAAA,MAAM,oBAAoB,GAAG,CAAA,EAAA,EAA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,aAAa,CAAC,CAAC,CAAC,EACnG,CAAC,oBAAoB,GAAG,CAAC,CAAc,KAAK,IAAI,CAAC,KAAK,CAAC,aAAa,IAAI,IAAI,CAAC,KAAK,CAAC,aAAa,CAAC,CAAC,CAAC,GACpG;YAED,IAAI,CAAC,OAAO,GAAG,MAAM,UAAU,CAAC,MAAM,iCACjC,YAAY,CAAA,EAAA,EACf,SAAS,EAAE,IAAI,CAAC,EAAE,EAClB,cAAc,EAAE,EAAE,IAClB;YAEF,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,YAAY,EAAE,IAAI,CAAC,OAAO,CAAC;YAC7C,WAAW,CAAC,IAAI,CAAC,OAAO,EAAE,YAAY,EAAE,SAAS,CAAC;AAElD,YAAA,MAAM,IAAI,CAAC,OAAO,CAAC,OAAO,EAAE;;QAG9B,MAAM,GAAA;AACJ;;;;AAIG;AACH,YAAA,OAAO,QAAQ,CAAC,YAAY,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,IAAI,YAAY,GAAG,IAAI,CAAC,KAAK,CAAC,QAAQ,GAAG,IAAI,EAAE,IAAI,CAAC,EAAE,CAAC;;AAExG;IAED,OAAO,KAAK,CAAC,UAAU,CAAqB,CAAC,KAAK,EAAE,GAAG,KAAI;;;QAGzD,OAAO,KAAA,CAAA,aAAA,CAAC,OAAO,EAAA,MAAA,CAAA,MAAA,CAAA,EAAA,EAAK,KAAK,IAAE,YAAY,EAAE,GAAG,EAAA,CAAA,CAAI;AAClD,KAAC,CAAC;AACJ;;;;"}
1
+ {"version":3,"file":"createOverlayComponent.js","sources":["../../../../taro-components-library-react/src/react-component-lib/createOverlayComponent.tsx"],"sourcesContent":["/**\n * Modify from https://github.com/ionic-team/stencil-ds-output-targets/blob/main/packages/react-output-target/react-component-lib/createOverlayComponent.ts\n * MIT License https://github.com/ionic-team/stencil-ds-output-targets/blob/main/LICENSE\n */\nimport React from 'react'\nimport ReactDOM from 'react-dom'\n\nimport { OverlayEventDetail } from './interfaces'\nimport { attachProps, dashToPascalCase, defineCustomElement, setRef, StencilReactForwardedRef } from './utils'\n\ninterface OverlayElement extends HTMLElement {\n present: () => Promise<void>\n dismiss: (data?: any, role?: string | undefined) => Promise<boolean>\n}\n\nexport interface ReactOverlayProps {\n children?: React.ReactNode\n isOpen: boolean\n onDidDismiss?: (event: CustomEvent<OverlayEventDetail>) => void\n onDidPresent?: (event: CustomEvent<OverlayEventDetail>) => void\n onWillDismiss?: (event: CustomEvent<OverlayEventDetail>) => void\n onWillPresent?: (event: CustomEvent<OverlayEventDetail>) => void\n}\n\nexport const createOverlayComponent = <OverlayComponent extends object, OverlayType extends OverlayElement>(\n tagName: string,\n controller: { create: (options: any) => Promise<OverlayType> },\n customElement?: any\n) => {\n defineCustomElement(tagName, customElement)\n\n const displayName = dashToPascalCase(tagName)\n const didDismissEventName = `on${displayName}DidDismiss`\n const didPresentEventName = `on${displayName}DidPresent`\n const willDismissEventName = `on${displayName}WillDismiss`\n const willPresentEventName = `on${displayName}WillPresent`\n\n type Props = OverlayComponent &\n ReactOverlayProps & {\n forwardedRef?: StencilReactForwardedRef<OverlayType>\n };\n\n let isDismissing = false\n\n class Overlay extends React.Component<Props> {\n overlay?: OverlayType\n el!: HTMLDivElement\n\n constructor (props: Props) {\n super(props)\n if (typeof document !== 'undefined') {\n this.el = document.createElement('div')\n }\n this.handleDismiss = this.handleDismiss.bind(this)\n }\n\n static get displayName () {\n return displayName\n }\n\n componentDidMount () {\n if (this.props.isOpen) {\n this.present()\n }\n }\n\n componentWillUnmount () {\n if (this.overlay) {\n this.overlay.dismiss()\n }\n }\n\n handleDismiss (event: CustomEvent<OverlayEventDetail<any>>) {\n if (this.props.onDidDismiss) {\n this.props.onDidDismiss(event)\n }\n setRef(this.props.forwardedRef, null)\n }\n\n shouldComponentUpdate (nextProps: Props) {\n // Check if the overlay component is about to dismiss\n if (this.overlay && nextProps.isOpen !== this.props.isOpen && nextProps.isOpen === false) {\n isDismissing = true\n }\n\n return true\n }\n\n async componentDidUpdate (prevProps: Props) {\n if (this.overlay) {\n attachProps(this.overlay, this.props, prevProps)\n }\n\n if (prevProps.isOpen !== this.props.isOpen && this.props.isOpen === true) {\n this.present(prevProps)\n }\n if (this.overlay && prevProps.isOpen !== this.props.isOpen && this.props.isOpen === false) {\n await this.overlay.dismiss()\n isDismissing = false\n\n /**\n * Now that the overlay is dismissed\n * we need to render again so that any\n * inner components will be unmounted\n */\n this.forceUpdate()\n }\n }\n\n async present (prevProps?: Props) {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const { children, isOpen, onDidDismiss, onDidPresent, onWillDismiss, onWillPresent, ...cProps } = this.props\n const elementProps = {\n ...cProps,\n ref: this.props.forwardedRef,\n [didDismissEventName]: this.handleDismiss,\n [didPresentEventName]: (e: CustomEvent) => this.props.onDidPresent && this.props.onDidPresent(e),\n [willDismissEventName]: (e: CustomEvent) => this.props.onWillDismiss && this.props.onWillDismiss(e),\n [willPresentEventName]: (e: CustomEvent) => this.props.onWillPresent && this.props.onWillPresent(e),\n }\n\n this.overlay = await controller.create({\n ...elementProps,\n component: this.el,\n componentProps: {},\n })\n\n setRef(this.props.forwardedRef, this.overlay)\n attachProps(this.overlay, elementProps, prevProps)\n\n await this.overlay.present()\n }\n\n render () {\n /**\n * Continue to render the component even when\n * overlay is dismissing otherwise component\n * will be hidden before animation is done.\n */\n return ReactDOM.createPortal(this.props.isOpen || isDismissing ? this.props.children : null, this.el)\n }\n }\n\n return React.forwardRef<OverlayType, Props>((props, ref) => {\n // Note: 组件库错误引入 vue 的 ts 类型,导致 ts 报错,这里先忽略\n // @ts-ignore\n return <Overlay {...props} forwardedRef={ref} />\n })\n}\n"],"names":[],"mappings":";;;;;;;AAwBa,MAAA,sBAAsB,GAAG,CACpC,OAAe,EACf,UAA8D,EAC9D,aAAmB,KACjB;AACF,IAAA,mBAAmB,CAAC,OAAO,EAAE,aAAa,CAAC;AAE3C,IAAA,MAAM,WAAW,GAAG,gBAAgB,CAAC,OAAO,CAAC;AA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K,CAAC,YAAY,IAAI,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC,CAAC,EAChG,CAAC,oBAAoB,GAAG,CAAC,CAAc,KAAK,IAAI,CAAC,KAAK,CAAC,aAAa,IAAI,IAAI,CAAC,KAAK,CAAC,aAAa,CAAC,CAAC,CAAC,EACnG,CAAC,oBAAoB,GAAG,CAAC,CAAc,KAAK,IAAI,CAAC,KAAK,CAAC,aAAa,IAAI,IAAI,CAAC,KAAK,CAAC,aAAa,CAAC,CAAC,CAAC,GACpG;YAED,IAAI,CAAC,OAAO,GAAG,MAAM,UAAU,CAAC,MAAM,iCACjC,YAAY,CAAA,EAAA,EACf,SAAS,EAAE,IAAI,CAAC,EAAE,EAClB,cAAc,EAAE,EAAE,IAClB;YAEF,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,YAAY,EAAE,IAAI,CAAC,OAAO,CAAC;YAC7C,WAAW,CAAC,IAAI,CAAC,OAAO,EAAE,YAAY,EAAE,SAAS,CAAC;AAElD,YAAA,MAAM,IAAI,CAAC,OAAO,CAAC,OAAO,EAAE;;QAG9B,MAAM,GAAA;AACJ;;;;AAIG;AACH,YAAA,OAAO,QAAQ,CAAC,YAAY,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,IAAI,YAAY,GAAG,IAAI,CAAC,KAAK,CAAC,QAAQ,GAAG,IAAI,EAAE,IAAI,CAAC,EAAE,CAAC;;AAExG;IAED,OAAO,KAAK,CAAC,UAAU,CAAqB,CAAC,KAAK,EAAE,GAAG,KAAI;;;QAGzD,OAAO,KAAA,CAAA,aAAA,CAAC,OAAO,EAAK,MAAA,CAAA,MAAA,CAAA,EAAA,EAAA,KAAK,IAAE,YAAY,EAAE,GAAG,EAAA,CAAA,CAAI;AAClD,KAAC,CAAC;AACJ;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"attachProps.js","sources":["../../../../../taro-components-library-react/src/react-component-lib/utils/attachProps.ts"],"sourcesContent":["/**\n * Modify from https://github.com/ionic-team/stencil-ds-output-targets/blob/main/packages/react-output-target/react-component-lib/utils/attachProps.ts\n * MIT License https://github.com/ionic-team/stencil-ds-output-targets/blob/main/LICENSE\n */\nimport { flushSync, unstable_batchedUpdates } from 'react-dom'\n\nimport { camelToDashCase } from './case'\n\nconst arrayToMap = (arr: string[] | DOMTokenList) => {\n const map = new Map<string, string>();\n (arr as string[]).forEach((s: string) => map.set(s, s))\n return map\n}\n\nexport const getClassName = (classList: DOMTokenList, newProps: any, oldProps: any) => {\n const newClassProp: string = newProps.className || newProps.class\n const oldClassProp: string = oldProps.className || oldProps.class\n // map the classes to Maps for performance\n const currentClasses = arrayToMap(classList)\n const incomingPropClasses = arrayToMap(newClassProp ? newClassProp.split(' ') : [])\n const oldPropClasses = arrayToMap(oldClassProp ? oldClassProp.split(' ') : [])\n const finalClassNames: string[] = []\n // loop through each of the current classes on the component\n // to see if it should be a part of the classNames added\n currentClasses.forEach((currentClass) => {\n if (incomingPropClasses.has(currentClass)) {\n // add it as its already included in classnames coming in from newProps\n finalClassNames.push(currentClass)\n incomingPropClasses.delete(currentClass)\n } else if (!oldPropClasses.has(currentClass)) {\n // add it as it has NOT been removed by user\n finalClassNames.push(currentClass)\n }\n })\n incomingPropClasses.forEach((s) => finalClassNames.push(s))\n return finalClassNames.join(' ')\n}\n\n// Note(taro): 禁用 react 合成事件抛出 (避免自定义事件属性调用问题, 例如: event.detail.value 等)\nexport const isCoveredByReact = (__eventNameSuffix: string) => false\n\ninterface EventCenter {\n [key: string]: EventCenter.EventCallback | undefined\n}\n\nnamespace EventCenter {\n export interface EventCallback {\n (e: Event): any\n fn?: (e: Event) => any\n }\n}\n\ntype HTMLElementWithEvents = HTMLElement & { __events?: EventCenter }\n\nfunction getComponentName (node: HTMLElement): string {\n return node.tagName.replace(/^TARO-/, '').replace(/-CORE$/, '')\n}\n\nfunction getControlledValue (node: HTMLElement): string | null {\n const componentName = getComponentName(node)\n if (['INPUT', 'TEXTAREA', 'SLIDER', 'PICKER'].includes(componentName)) {\n return 'value'\n } else if (componentName === 'SWITCH') {\n // Radio、Checkbox 受 RadioGroup、CheckboxGroup 控制,不支持受控\n return 'checked'\n } else {\n return null\n }\n}\n\nfunction getPropsAfterReactUpdate (node: HTMLElement): Record<string, any> | null {\n const key = Object.keys(node).find(key => key.includes('__reactProps'))\n if (key) {\n return node[key] as Record<string, any>\n } else {\n return null\n }\n}\n\nfunction finishedEventHandler (node: HTMLElement) {\n const controlledValue = getControlledValue(node)\n\n // 不是可以受控的表单组件,直接返回\n if (!controlledValue) return\n\n // 立即执行事件回调中用户可能触发了的 React 更新\n flushSync(() => {})\n\n // 组件在 React 更新后的 React props\n const newProps = getPropsAfterReactUpdate(node)\n if (newProps?.hasOwnProperty(controlledValue) && newProps[controlledValue] !== node[controlledValue]) {\n // 如果 React Props 的 value 和 DOM 上的 value 不一致,以 React Props 为准(受控)\n node[controlledValue] = newProps[controlledValue]\n node.setAttribute(controlledValue, newProps[controlledValue])\n }\n}\n\nexport const syncEvent = (\n node: HTMLElementWithEvents,\n eventName: string,\n newEventHandler?: (e: Event) => any\n) => {\n const eventStore = node.__events ||= {}\n const oldEventHandler = eventStore[eventName]\n\n if (!newEventHandler) {\n oldEventHandler && node.removeEventListener(eventName, oldEventHandler)\n } else {\n if (oldEventHandler) {\n if (oldEventHandler.fn === newEventHandler) {\n return\n } else {\n // 删除旧的,绑定新的\n node.removeEventListener(eventName, oldEventHandler)\n }\n }\n\n const listener: EventCenter.EventCallback = eventStore[eventName] = function (e: Event) {\n // React batch event updates\n unstable_batchedUpdates(() => newEventHandler.call(this, e))\n // 控制是否更新受控组件的 value 值\n finishedEventHandler(node)\n }\n listener.fn = newEventHandler\n node.addEventListener(\n eventName,\n listener\n )\n }\n}\n\n// TODO(performace): ReactComponent 已更新了一次,这里手动更新可能存在重复设置属性的问题\nexport const attachProps = (node: HTMLElementWithEvents, newProps: any, oldProps: any = {}) => {\n // some test frameworks don't render DOM elements, so we test here to make sure we are dealing with DOM first\n if (node instanceof Element) {\n Object.keys(oldProps).forEach((name) => {\n if (['style', 'children', 'ref', 'class', 'className', 'forwardedRef'].includes(name)) {\n return\n }\n // Note: 移除节点上冗余事件、属性\n if (!newProps.hasOwnProperty(name)) {\n if (/^on([A-Z].*)/.test(name)) {\n const eventName = name.substring(2)\n const eventNameLc = eventName.toLowerCase()\n\n if (!isCoveredByReact(eventNameLc)) {\n syncEvent(node, eventNameLc)\n }\n } else {\n (node as any)[name] = null\n node.removeAttribute(camelToDashCase(name))\n }\n }\n })\n // add any classes in className to the class list\n node.className = getClassName(node.classList, newProps, oldProps)\n\n Object.keys(newProps).forEach((name) => {\n /** Note(taro): 优化 style 属性的处理\n * 1. 考虑到兼容旧版本项目,支持使用字符串配置 style 属性,但这并非推荐写法,且不考虑优化在 style 移除时同步删除属性\n * 2. style 属性应当交与前端 UI 框架自行处理,不考虑实现类似于 reactify-wc 的更新策略\n */\n if ((name === 'style' && typeof newProps[name] !== 'string') || ['children', 'ref', 'class', 'className', 'forwardedRef'].includes(name)) {\n return\n }\n if (/^on([A-Z].*)/.test(name)) {\n const eventName = name.substring(2)\n const eventNameLc = eventName.toLowerCase()\n\n if (!isCoveredByReact(eventNameLc)) {\n syncEvent(node, eventNameLc, newProps[name])\n }\n } else {\n (node as any)[name] = newProps[name]\n const propType = typeof newProps[name]\n if (propType === 'string') {\n node.setAttribute(camelToDashCase(name), newProps[name])\n }\n }\n })\n\n // 保证受控组件会被默认绑定一个空事件,用于触发 finishedEventHandler 中的受控逻辑\n const controlledValue = getControlledValue(node)\n if (\n controlledValue &&\n newProps.hasOwnProperty(controlledValue)\n ) {\n const handleChangeEvent = ['INPUT', 'TEXTAREA'].includes(getComponentName(node)) ? 'input' : 'change'\n node.__events ||= {}\n if (!node.__events.hasOwnProperty(handleChangeEvent)) {\n syncEvent(node, handleChangeEvent, function () {})\n }\n }\n }\n}\n\nexport function applyUnControlledDefaultValue (node: HTMLElementWithEvents, props: any) {\n const controlledValue = getControlledValue(node)\n\n // 不是可以受控的表单组件,直接返回\n if (!controlledValue) return\n\n const defaultValueName = 'default' + controlledValue.charAt(0).toUpperCase() + controlledValue.slice(1)\n if (!props.hasOwnProperty(controlledValue) && props.hasOwnProperty(defaultValueName)) {\n // 如果是可以受控的表单组件,当没有传入 value/checked 而是传入 defaultValue/defaultChecked 时,把表单值初始化为 defaultValue/defaultChecked\n node[controlledValue] = props[defaultValueName]\n node.setAttribute(controlledValue, props[defaultValueName])\n }\n}\n"],"names":[],"mappings":";;;AAAA;;;AAGG;AAKH,MAAM,UAAU,GAAG,CAAC,GAA4B,KAAI;AAClD,IAAA,MAAM,GAAG,GAAG,IAAI,GAAG,EAAkB;AACpC,IAAA,GAAgB,CAAC,OAAO,CAAC,CAAC,CAAS,KAAK,GAAG,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;AACvD,IAAA,OAAO,GAAG;AACZ,CAAC;AAEM,MAAM,YAAY,GAAG,CAAC,SAAuB,EAAE,QAAa,EAAE,QAAa,KAAI;IACpF,MAAM,YAAY,GAAW,QAAQ,CAAC,SAAS,IAAI,QAAQ,CAAC,KAAK;IACjE,MAAM,YAAY,GAAW,QAAQ,CAAC,SAAS,IAAI,QAAQ,CAAC,KAAK;;AAEjE,IAAA,MAAM,cAAc,GAAG,UAAU,CAAC,SAAS,CAAC;AAC5C,IAAA,MAAM,mBAAmB,GAAG,UAAU,CAAC,YAAY,GAAG,YAAY,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,EAAE,CAAC;AACnF,IAAA,MAAM,cAAc,GAAG,UAAU,CAAC,YAAY,GAAG,YAAY,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,EAAE,CAAC;IAC9E,MAAM,eAAe,GAAa,EAAE;;;AAGpC,IAAA,cAAc,CAAC,OAAO,CAAC,CAAC,YAAY,KAAI;AACtC,QAAA,IAAI,mBAAmB,CAAC,GAAG,CAAC,YAAY,CAAC,EAAE;;AAEzC,YAAA,eAAe,CAAC,IAAI,CAAC,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E,IAA2B,EAAE,KAAU,EAAA;AACpF,IAAA,MAAM,eAAe,GAAG,kBAAkB,CAAC,IAAI,CAAC;;AAGhD,IAAA,IAAI,CAAC,eAAe;QAAE;IAEtB,MAAM,gBAAgB,GAAG,SAAS,GAAG,eAAe,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,GAAG,eAAe,CAAC,KAAK,CAAC,CAAC,CAAC;AACvG,IAAA,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,eAAe,CAAC,IAAI,KAAK,CAAC,cAAc,CAAC,gBAAgB,CAAC,EAAE;;QAEpF,IAAI,CAAC,eAAe,CAAC,GAAG,KAAK,CAAC,gBAAgB,CAAC;QAC/C,IAAI,CAAC,YAAY,CAAC,eAAe,EAAE,KAAK,CAAC,gBAAgB,CAAC,CAAC;;AAE/D;;;;"}
1
+ {"version":3,"file":"attachProps.js","sources":["../../../../../taro-components-library-react/src/react-component-lib/utils/attachProps.ts"],"sourcesContent":["/**\n * Modify from https://github.com/ionic-team/stencil-ds-output-targets/blob/main/packages/react-output-target/react-component-lib/utils/attachProps.ts\n * MIT License https://github.com/ionic-team/stencil-ds-output-targets/blob/main/LICENSE\n */\nimport { flushSync, unstable_batchedUpdates } from 'react-dom'\n\nimport { camelToDashCase } from './case'\n\nconst arrayToMap = (arr: string[] | DOMTokenList) => {\n const map = new Map<string, string>();\n (arr as string[]).forEach((s: string) => map.set(s, s))\n return map\n}\n\nexport const getClassName = (classList: DOMTokenList, newProps: any, oldProps: any) => {\n const newClassProp: string = newProps.className || newProps.class\n const oldClassProp: string = oldProps.className || oldProps.class\n // map the classes to Maps for performance\n const currentClasses = arrayToMap(classList)\n const incomingPropClasses = arrayToMap(newClassProp ? newClassProp.split(' ') : [])\n const oldPropClasses = arrayToMap(oldClassProp ? oldClassProp.split(' ') : [])\n const finalClassNames: string[] = []\n // loop through each of the current classes on the component\n // to see if it should be a part of the classNames added\n currentClasses.forEach((currentClass) => {\n if (incomingPropClasses.has(currentClass)) {\n // add it as its already included in classnames coming in from newProps\n finalClassNames.push(currentClass)\n incomingPropClasses.delete(currentClass)\n } else if (!oldPropClasses.has(currentClass)) {\n // add it as it has NOT been removed by user\n finalClassNames.push(currentClass)\n }\n })\n incomingPropClasses.forEach((s) => finalClassNames.push(s))\n return finalClassNames.join(' ')\n}\n\n// Note(taro): 禁用 react 合成事件抛出 (避免自定义事件属性调用问题, 例如: event.detail.value 等)\nexport const isCoveredByReact = (__eventNameSuffix: string) => false\n\ninterface EventCenter {\n [key: string]: EventCenter.EventCallback | undefined\n}\n\nnamespace EventCenter {\n export interface EventCallback {\n (e: Event): any\n fn?: (e: Event) => any\n }\n}\n\ntype HTMLElementWithEvents = HTMLElement & { __events?: EventCenter }\n\nfunction getComponentName (node: HTMLElement): string {\n return node.tagName.replace(/^TARO-/, '').replace(/-CORE$/, '')\n}\n\nfunction getControlledValue (node: HTMLElement): string | null {\n const componentName = getComponentName(node)\n if (['INPUT', 'TEXTAREA', 'SLIDER', 'PICKER'].includes(componentName)) {\n return 'value'\n } else if (componentName === 'SWITCH') {\n // Radio、Checkbox 受 RadioGroup、CheckboxGroup 控制,不支持受控\n return 'checked'\n } else {\n return null\n }\n}\n\nfunction getPropsAfterReactUpdate (node: HTMLElement): Record<string, any> | null {\n const key = Object.keys(node).find(key => key.includes('__reactProps'))\n if (key) {\n return node[key] as Record<string, any>\n } else {\n return null\n }\n}\n\nfunction finishedEventHandler (node: HTMLElement) {\n const controlledValue = getControlledValue(node)\n\n // 不是可以受控的表单组件,直接返回\n if (!controlledValue) return\n\n // 立即执行事件回调中用户可能触发了的 React 更新\n flushSync(() => {})\n\n // 组件在 React 更新后的 React props\n const newProps = getPropsAfterReactUpdate(node)\n if (newProps?.hasOwnProperty(controlledValue) && newProps[controlledValue] !== node[controlledValue]) {\n // 如果 React Props 的 value 和 DOM 上的 value 不一致,以 React Props 为准(受控)\n node[controlledValue] = newProps[controlledValue]\n node.setAttribute(controlledValue, newProps[controlledValue])\n }\n}\n\nexport const syncEvent = (\n node: HTMLElementWithEvents,\n eventName: string,\n newEventHandler?: (e: Event) => any\n) => {\n const eventStore = node.__events ||= {}\n const oldEventHandler = eventStore[eventName]\n\n if (!newEventHandler) {\n oldEventHandler && node.removeEventListener(eventName, oldEventHandler)\n } else {\n if (oldEventHandler) {\n if (oldEventHandler.fn === newEventHandler) {\n return\n } else {\n // 删除旧的,绑定新的\n node.removeEventListener(eventName, oldEventHandler)\n }\n }\n\n const listener: EventCenter.EventCallback = eventStore[eventName] = function (e: Event) {\n // React batch event updates\n unstable_batchedUpdates(() => newEventHandler.call(this, e))\n // 控制是否更新受控组件的 value 值\n finishedEventHandler(node)\n }\n listener.fn = newEventHandler\n node.addEventListener(\n eventName,\n listener\n )\n }\n}\n\n// TODO(performace): ReactComponent 已更新了一次,这里手动更新可能存在重复设置属性的问题\nexport const attachProps = (node: HTMLElementWithEvents, newProps: any, oldProps: any = {}) => {\n // some test frameworks don't render DOM elements, so we test here to make sure we are dealing with DOM first\n if (node instanceof Element) {\n Object.keys(oldProps).forEach((name) => {\n if (['style', 'children', 'ref', 'class', 'className', 'forwardedRef'].includes(name)) {\n return\n }\n // Note: 移除节点上冗余事件、属性\n if (!newProps.hasOwnProperty(name)) {\n if (/^on([A-Z].*)/.test(name)) {\n const eventName = name.substring(2)\n const eventNameLc = eventName.toLowerCase()\n\n if (!isCoveredByReact(eventNameLc)) {\n syncEvent(node, eventNameLc)\n }\n } else {\n (node as any)[name] = null\n node.removeAttribute(camelToDashCase(name))\n }\n }\n })\n // add any classes in className to the class list\n node.className = getClassName(node.classList, newProps, oldProps)\n\n Object.keys(newProps).forEach((name) => {\n /** Note(taro): 优化 style 属性的处理\n * 1. 考虑到兼容旧版本项目,支持使用字符串配置 style 属性,但这并非推荐写法,且不考虑优化在 style 移除时同步删除属性\n * 2. style 属性应当交与前端 UI 框架自行处理,不考虑实现类似于 reactify-wc 的更新策略\n */\n if ((name === 'style' && typeof newProps[name] !== 'string') || ['children', 'ref', 'class', 'className', 'forwardedRef'].includes(name)) {\n return\n }\n if (/^on([A-Z].*)/.test(name)) {\n const eventName = name.substring(2)\n const eventNameLc = eventName.toLowerCase()\n\n if (!isCoveredByReact(eventNameLc)) {\n syncEvent(node, eventNameLc, newProps[name])\n }\n } else {\n (node as any)[name] = newProps[name]\n const propType = typeof newProps[name]\n if (propType === 'string') {\n node.setAttribute(camelToDashCase(name), newProps[name])\n }\n }\n })\n\n // 保证受控组件会被默认绑定一个空事件,用于触发 finishedEventHandler 中的受控逻辑\n const controlledValue = getControlledValue(node)\n if (\n controlledValue &&\n newProps.hasOwnProperty(controlledValue)\n ) {\n const handleChangeEvent = ['INPUT', 'TEXTAREA'].includes(getComponentName(node)) ? 'input' : 'change'\n node.__events ||= {}\n if (!node.__events.hasOwnProperty(handleChangeEvent)) {\n syncEvent(node, handleChangeEvent, function () {})\n }\n }\n }\n}\n\nexport function applyUnControlledDefaultValue (node: HTMLElementWithEvents, props: any) {\n const controlledValue = getControlledValue(node)\n\n // 不是可以受控的表单组件,直接返回\n if (!controlledValue) return\n\n const defaultValueName = 'default' + controlledValue.charAt(0).toUpperCase() + controlledValue.slice(1)\n if (!props.hasOwnProperty(controlledValue) && props.hasOwnProperty(defaultValueName)) {\n // 如果是可以受控的表单组件,当没有传入 value/checked 而是传入 defaultValue/defaultChecked 时,把表单值初始化为 defaultValue/defaultChecked\n node[controlledValue] = props[defaultValueName]\n node.setAttribute(controlledValue, props[defaultValueName])\n }\n}\n"],"names":[],"mappings":";;;AAAA;;;AAGG;AAKH,MAAM,UAAU,GAAG,CAAC,GAA4B,KAAI;AAClD,IAAA,MAAM,GAAG,GAAG,IAAI,GAAG,EAAkB;AACpC,IAAA,GAAgB,CAAC,OAAO,CAAC,CAAC,CAAS,KAAK,GAAG,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;AACvD,IAAA,OAAO,GAAG;AACZ,CAAC;AAEY,MAAA,YAAY,GAAG,CAAC,SAAuB,EAAE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x"],"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,EAAA,MAAA,CAAA,MAAA,CAAA,EAAA,EAAK,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 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 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../../taro-components-library-solid/src/component-lib/index.ts"],"sourcesContent":["import { Fragment } from 'solid-js/h/jsx-runtime'\n\nimport { createSolidComponent } from '../solid-component-lib'\n\n// 视图容器\nexport const CoverImage = /* @__PURE__ */ createSolidComponent('taro-cover-image-core')\nexport const CoverView = /* @__PURE__ */ createSolidComponent('taro-cover-view-core')\nexport const MatchMedia = /* @__PURE__ */ createSolidComponent('taro-match-media-core')\nexport const MovableArea = /* @__PURE__ */ createSolidComponent('taro-movable-area-core')\nexport const MovableView = /* @__PURE__ */ createSolidComponent('taro-movable-view-core')\nexport const PageContainer = /* @__PURE__ */ createSolidComponent('taro-page-container-core')\nexport const RootPortal = /* @__PURE__ */ createSolidComponent('taro-root-portal-core')\nexport const ScrollView = /* @__PURE__ */ createSolidComponent('taro-scroll-view-core')\nexport const ShareElement = /* @__PURE__ */ createSolidComponent('taro-share-element-core')\nexport const Swiper = /* @__PURE__ */ createSolidComponent('taro-swiper-core')\nexport const SwiperItem = /* @__PURE__ */ createSolidComponent('taro-swiper-item-core')\nexport const View = /* @__PURE__ */ createSolidComponent('taro-view-core')\n\n// 基础内容\nexport const Icon = /* @__PURE__ */ createSolidComponent('taro-icon-core')\nexport const Progress = /* @__PURE__ */ createSolidComponent('taro-progress-core')\nexport const RichText = /* @__PURE__ */ createSolidComponent('taro-rich-text-core')\nexport const Text = /* @__PURE__ */ createSolidComponent('taro-text-core')\n\n// 表单组件\nexport const Button = /* @__PURE__ */ createSolidComponent('taro-button-core')\nexport const Checkbox = /* @__PURE__ */ createSolidComponent('taro-checkbox-core')\nexport const CheckboxGroup = /* @__PURE__ */ createSolidComponent('taro-checkbox-group-core')\nexport const Editor = /* @__PURE__ */ createSolidComponent('taro-editor-core')\nexport const Form = /* @__PURE__ */ createSolidComponent('taro-form-core')\nexport const Input = /* @__PURE__ */ createSolidComponent('taro-input-core')\nexport const KeyboardAccessory = /* @__PURE__ */ createSolidComponent('taro-keyboard-accessory-core')\nexport const Label = /* @__PURE__ */ createSolidComponent('taro-label-core')\nexport const Picker = /* @__PURE__ */ createSolidComponent('taro-picker-core')\nexport const PickerView = /* @__PURE__ */ createSolidComponent('taro-picker-view-core')\nexport const PickerViewColumn = /* @__PURE__ */ createSolidComponent('taro-picker-view-column-core')\nexport const Radio = /* @__PURE__ */ createSolidComponent('taro-radio-core')\nexport const RadioGroup = /* @__PURE__ */ createSolidComponent('taro-radio-group-core')\nexport const Slider = /* @__PURE__ */ createSolidComponent('taro-slider-core')\nexport const Switch = /* @__PURE__ */ createSolidComponent('taro-switch-core')\nexport const Textarea = /* @__PURE__ */ createSolidComponent('taro-textarea-core')\n\n// 导航\nexport const FunctionalPageNavigator = /* @__PURE__ */ createSolidComponent('taro-functional-page-navigator-core')\nexport const Navigator = /* @__PURE__ */ createSolidComponent('taro-navigator-core')\nexport const NavigationBar = /* @__PURE__ */ createSolidComponent('taro-navigation-bar-core')\n\n// 媒体组件\nexport const Audio = /* @__PURE__ */ createSolidComponent('taro-audio-core')\nexport const Camera = /* @__PURE__ */ createSolidComponent('taro-camera-core')\nexport const Image = /* @__PURE__ */ createSolidComponent('taro-image-core')\nexport const LivePlayer = /* @__PURE__ */ createSolidComponent('taro-live-player-core')\nexport const LivePusher = /* @__PURE__ */ createSolidComponent('taro-live-pusher-core')\nexport const Video = /* @__PURE__ */ createSolidComponent('taro-video-core')\nexport const VoipRoom = /* @__PURE__ */ createSolidComponent('taro-voip-room-core')\n\n// 地图\nexport const Map = /* @__PURE__ */ createSolidComponent('taro-map-core')\n\n// 画布\nexport const Canvas = /* @__PURE__ */ createSolidComponent('taro-canvas-core')\n\n// 开放能力\nexport const Ad = /* @__PURE__ */ createSolidComponent('taro-ad-core')\nexport const AdCustom = /* @__PURE__ */ createSolidComponent('taro-ad-custom-core')\nexport const OfficialAccount = /* @__PURE__ */ createSolidComponent('taro-official-account-core')\nexport const OpenData = /* @__PURE__ */ createSolidComponent('taro-open-data-core')\nexport const WebView = /* @__PURE__ */ createSolidComponent('taro-web-view-core')\n\n// 页面属性配置节点\nexport const PageMeta = /* @__PURE__ */ createSolidComponent('taro-page-meta-core')\n\n// 其他\nexport const Block = Fragment\nexport const CustomWrapper = /* @__PURE__ */ createSolidComponent('taro-custom-wrapper-core')\n"],"names":[],"mappings":";;;;AAIA;AACO,MAAM,UAAU,mBAAmB,oBAAoB,CAAC,uBAAuB;AAC/E,MAAM,SAAS,mBAAmB,oBAAoB,CAAC,sBAAsB;AAC7E,MAAM,UAAU,mBAAmB,oBAAoB,CAAC,uBAAuB;AAC/E,MAAM,WAAW,mBAAmB,oBAAoB,CAAC,wBAAwB;AACjF,MAAM,WAAW,mBAAmB,oBAAoB,CAAC,wBAAwB;AACjF,MAAM,aAAa,mBAAmB,oBAAoB,CAAC,0BAA0B;AACrF,MAAM,UAAU,mBAAmB,oBAAoB,CAAC,uBAAuB;AAC/E,MAAM,UAAU,mBAAmB,oBAAoB,CAAC,uBAAuB;AAC/E,MAAM,YAAY,mBAAmB,oBAAoB,CAAC,yBAAyB;AACnF,MAAM,MAAM,mBAAmB,oBAAoB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qBAAqB;AAC5E,MAAM,aAAa,mBAAmB,oBAAoB,CAAC,0BAA0B;AAE5F;AACO,MAAM,KAAK,mBAAmB,oBAAoB,CAAC,iBAAiB;AACpE,MAAM,MAAM,mBAAmB,oBAAoB,CAAC,kBAAkB;AACtE,MAAM,KAAK,mBAAmB,oBAAoB,CAAC,iBAAiB;AACpE,MAAM,UAAU,mBAAmB,oBAAoB,CAAC,uBAAuB;AAC/E,MAAM,UAAU,mBAAmB,oBAAoB,CAAC,uBAAuB;AAC/E,MAAM,KAAK,mBAAmB,oBAAoB,CAAC,iBAAiB;AACpE,MAAM,QAAQ,mBAAmB,oBAAoB,CAAC,qBAAqB;AAElF;AACO,MAAM,GAAG,mBAAmB,oBAAoB,CAAC,eAAe;AAEvE;AACO,MAAM,MAAM,mBAAmB,oBAAoB,CAAC,kBAAkB;AAE7E;AACO,MAAM,EAAE,mBAAmB,oBAAoB,CAAC,cAAc;AAC9D,MAAM,QAAQ,mBAAmB,oBAAoB,CAAC,qBAAqB;AAC3E,MAAM,eAAe,mBAAmB,oBAAoB,CAAC,4BAA4B;AACzF,MAAM,QAAQ,mBAAmB,oBAAoB,CAAC,qBAAqB;AAC3E,MAAM,OAAO,mBAAmB,oBAAoB,CAAC,oBAAoB;AAEhF;AACO,MAAM,QAAQ,mBAAmB,oBAAoB,CAAC,qBAAqB;AAElF;AACO,MAAM,KAAK,GAAG;AACd,MAAM,aAAa,mBAAmB,oBAAoB,CAAC,0BAA0B;;;;"}
1
+ {"version":3,"file":"index.js","sources":["../../../../taro-components-library-solid/src/component-lib/index.ts"],"sourcesContent":["import { Fragment } from 'solid-js/h/jsx-runtime'\n\nimport { createSolidComponent } from '../solid-component-lib'\n\n// 视图容器\nexport const CoverImage = /* @__PURE__ */ createSolidComponent('taro-cover-image-core')\nexport const CoverView = /* @__PURE__ */ createSolidComponent('taro-cover-view-core')\nexport const MatchMedia = /* @__PURE__ */ createSolidComponent('taro-match-media-core')\nexport const MovableArea = /* @__PURE__ */ createSolidComponent('taro-movable-area-core')\nexport const MovableView = /* @__PURE__ */ createSolidComponent('taro-movable-view-core')\nexport const PageContainer = /* @__PURE__ */ createSolidComponent('taro-page-container-core')\nexport const RootPortal = /* @__PURE__ */ createSolidComponent('taro-root-portal-core')\nexport const ScrollView = /* @__PURE__ */ createSolidComponent('taro-scroll-view-core')\nexport const ShareElement = /* @__PURE__ */ createSolidComponent('taro-share-element-core')\nexport const Swiper = /* @__PURE__ */ createSolidComponent('taro-swiper-core')\nexport const SwiperItem = /* @__PURE__ */ createSolidComponent('taro-swiper-item-core')\nexport const View = /* @__PURE__ */ createSolidComponent('taro-view-core')\n\n// 基础内容\nexport const Icon = /* @__PURE__ */ createSolidComponent('taro-icon-core')\nexport const Progress = /* @__PURE__ */ createSolidComponent('taro-progress-core')\nexport const RichText = /* @__PURE__ */ createSolidComponent('taro-rich-text-core')\nexport const Text = /* @__PURE__ */ createSolidComponent('taro-text-core')\n\n// 表单组件\nexport const Button = /* @__PURE__ */ createSolidComponent('taro-button-core')\nexport const Checkbox = /* @__PURE__ */ createSolidComponent('taro-checkbox-core')\nexport const CheckboxGroup = /* @__PURE__ */ createSolidComponent('taro-checkbox-group-core')\nexport const Editor = /* @__PURE__ */ createSolidComponent('taro-editor-core')\nexport const Form = /* @__PURE__ */ createSolidComponent('taro-form-core')\nexport const Input = /* @__PURE__ */ createSolidComponent('taro-input-core')\nexport const KeyboardAccessory = /* @__PURE__ */ createSolidComponent('taro-keyboard-accessory-core')\nexport const Label = /* @__PURE__ */ createSolidComponent('taro-label-core')\nexport const Picker = /* @__PURE__ */ createSolidComponent('taro-picker-core')\nexport const PickerView = /* @__PURE__ */ createSolidComponent('taro-picker-view-core')\nexport const PickerViewColumn = /* @__PURE__ */ createSolidComponent('taro-picker-view-column-core')\nexport const Radio = /* @__PURE__ */ createSolidComponent('taro-radio-core')\nexport const RadioGroup = /* @__PURE__ */ createSolidComponent('taro-radio-group-core')\nexport const Slider = /* @__PURE__ */ createSolidComponent('taro-slider-core')\nexport const Switch = /* @__PURE__ */ createSolidComponent('taro-switch-core')\nexport const Textarea = /* @__PURE__ */ createSolidComponent('taro-textarea-core')\n\n// 导航\nexport const FunctionalPageNavigator = /* @__PURE__ */ createSolidComponent('taro-functional-page-navigator-core')\nexport const Navigator = /* @__PURE__ */ createSolidComponent('taro-navigator-core')\nexport const NavigationBar = /* @__PURE__ */ createSolidComponent('taro-navigation-bar-core')\n\n// 媒体组件\nexport const Audio = /* @__PURE__ */ createSolidComponent('taro-audio-core')\nexport const Camera = /* @__PURE__ */ createSolidComponent('taro-camera-core')\nexport const Image = /* @__PURE__ */ createSolidComponent('taro-image-core')\nexport const LivePlayer = /* @__PURE__ */ createSolidComponent('taro-live-player-core')\nexport const LivePusher = /* @__PURE__ */ createSolidComponent('taro-live-pusher-core')\nexport const Video = /* @__PURE__ */ createSolidComponent('taro-video-core')\nexport const VoipRoom = /* @__PURE__ */ createSolidComponent('taro-voip-room-core')\n\n// 地图\nexport const Map = /* @__PURE__ */ createSolidComponent('taro-map-core')\n\n// 画布\nexport const Canvas = /* @__PURE__ */ createSolidComponent('taro-canvas-core')\n\n// 开放能力\nexport const Ad = /* @__PURE__ */ createSolidComponent('taro-ad-core')\nexport const AdCustom = /* @__PURE__ */ createSolidComponent('taro-ad-custom-core')\nexport const OfficialAccount = /* @__PURE__ */ createSolidComponent('taro-official-account-core')\nexport const OpenData = /* @__PURE__ */ createSolidComponent('taro-open-data-core')\nexport const WebView = /* @__PURE__ */ createSolidComponent('taro-web-view-core')\n\n// 页面属性配置节点\nexport const PageMeta = /* @__PURE__ */ createSolidComponent('taro-page-meta-core')\n\n// 其他\nexport const Block = Fragment\nexport const CustomWrapper = /* @__PURE__ */ createSolidComponent('taro-custom-wrapper-core')\n"],"names":[],"mappings":";;;;AAIA;AACa,MAAA,UAAU,mBAAmB,oBAAoB,CAAC,uBAAuB;AACzE,MAAA,SAAS,mBAAmB,oBAAoB,CAAC,sBAAsB;AACvE,MAAA,UAAU,mBA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a,mBAAmB,oBAAoB,CAAC,0BAA0B;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"helper.js","sources":["../../../taro-components-library-solid/src/helper.ts"],"sourcesContent":["export const manipulatePropsFunction = (\n _: any,\n propsToPass: Record<string, unknown> = {}\n) => {\n // solid暂时不需要配置转换props\n return {\n ...propsToPass,\n }\n}\n"],"names":[],"mappings":"AAAO,MAAM,uBAAuB,GAAG,CACrC,CAAM,EACN,WAAA,GAAuC,EAAE,KACvC;;AAEF,IAAA,OAAA,MAAA,CAAA,MAAA,CAAA,EAAA,EACK,WAAW,CAAA;AAElB;;;;"}
1
+ {"version":3,"file":"helper.js","sources":["../../../taro-components-library-solid/src/helper.ts"],"sourcesContent":["export const manipulatePropsFunction = (\n _: any,\n propsToPass: Record<string, unknown> = {}\n) => {\n // solid暂时不需要配置转换props\n return {\n ...propsToPass,\n }\n}\n"],"names":[],"mappings":"AAAa,MAAA,uBAAuB,GAAG,CACrC,CAAM,EACN,WAAA,GAAuC,EAAE,KACvC;;AAEF,IAAA,OAAA,MAAA,CAAA,MAAA,CAAA,EAAA,EACK,WAAW,CACf;AACH;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"createComponent.js","sources":["../../../../taro-components-library-solid/src/solid-component-lib/createComponent.tsx"],"sourcesContent":["import { isFunction } from '@tarojs/shared'\nimport { Component, JSX, mergeProps, splitProps } from 'solid-js'\nimport h from 'solid-js/h'\nimport { effect as _$effect, memo } from 'solid-js/web'\n\nimport { camelToDashCase, isPropNameAnEvent, isReactiveKey, syncAttribute, syncEvent } from './utils'\n\nexport interface HTMLStencilElement extends HTMLElement {\n componentOnReady(): Promise<this>\n}\n\nexport type StencilSolidInternalProps<ElementType> = JSX.DOMAttributes<ElementType>\n\nexport interface ComponentSupplementaryTypes {\n style?: JSX.CSSProperties\n slot?: string\n}\n\nfunction setReactiveProps(node: HTMLElement, getterObj: Record<string, any>) {\n _$effect(() => {\n for (const key in getterObj) {\n syncAttribute(node, key, getterObj[key])\n }\n })\n}\n\nfunction syncEvents(node: HTMLElement, eventsMap: Map<string, () => void>) {\n for (const [key, value] of eventsMap) {\n syncEvent(node, key, value)\n }\n}\n\nexport const createSolidComponent = <\n PropType,\n ElementType extends HTMLStencilElement,\n ExpandedPropsTypes = any\n>(\n tagName: string,\n manipulatePropsFunction?: (\n originalProps: StencilSolidInternalProps<ElementType>,\n newProps: any\n ) => ExpandedPropsTypes,\n defineCustomElement?: () => void,\n): Component<PropType & JSX.DOMAttributes<ElementType> & ComponentSupplementaryTypes> => {\n if (defineCustomElement !== undefined) {\n defineCustomElement()\n }\n\n function SolidComponentWrapper(props: { children: JSX.Element } & any) {\n const [local, other] = splitProps(props, ['children', 'ref'])\n const eventsMap = new Map()\n const reactiveKeys = []\n const getUnTrackProps = (_props: Record<string, any>) => {\n let propsToPass: typeof props = {}\n for (const key in _props) {\n if (!_props.hasOwnProperty(key)) {\n continue\n }\n if (isPropNameAnEvent(key)) {\n eventsMap.set(key, _props[key])\n continue\n }\n if (isReactiveKey(_props, key)) {\n reactiveKeys.push(key)\n continue\n }\n const propValue = _props[key]\n propsToPass[camelToDashCase(key)] = propValue\n }\n if (manipulatePropsFunction !== undefined) {\n propsToPass = manipulatePropsFunction(_props, propsToPass)\n }\n return propsToPass\n }\n\n const unTrackProps = getUnTrackProps(other)\n const [reactiveProps] = splitProps(other, reactiveKeys)\n\n const _mergeProps = mergeProps(unTrackProps, {\n ref: (element: HTMLElement) => {\n if (local.ref && isFunction(local.ref)) local.ref(element)\n syncEvents(element, eventsMap)\n setReactiveProps(element, reactiveProps)\n }\n })\n\n return memo(() => h(tagName, _mergeProps, local.children), true)\n }\n\n return SolidComponentWrapper as any\n}\n"],"names":["_$effect"],"mappings":";;;;;;;;AAkBA,SAAS,gBAAgB,CAAC,IAAiB,EAAE,SAA8B,EAAA;IACzEA,MAAQ,CAAC,MAAK;AACZ,QAAA,KAAK,MAAM,GAAG,IAAI,SAAS,EAAE;YAC3B,aAAa,CAAC,IAAI,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AI,uBAAuB,KAAK,SAAS,EAAE;AACzC,gBAAA,WAAW,GAAG,uBAAuB,CAAC,MAAM,EAAE,WAAW,CAAC;;AAE5D,YAAA,OAAO,WAAW;AACpB,SAAC;AAED,QAAA,MAAM,YAAY,GAAG,eAAe,CAAC,KAAK,CAAC;QAC3C,MAAM,CAAC,aAAa,CAAC,GAAG,UAAU,CAAC,KAAK,EAAE,YAAY,CAAC;AAEvD,QAAA,MAAM,WAAW,GAAG,UAAU,CAAC,YAAY,EAAE;AAC3C,YAAA,GAAG,EAAE,CAAC,OAAoB,KAAI;gBAC5B,IAAI,KAAK,CAAC,GAAG,IAAI,UAAU,CAAC,KAAK,CAAC,GAAG,CAAC;AAAE,oBAAA,KAAK,CAAC,GAAG,CAAC,OAAO,CAAC;AAC1D,gBAAA,UAAU,CAAC,OAAO,EAAE,SAAS,CAAC;AAC9B,gBAAA,gBAAgB,CAAC,OAAO,EAAE,aAAa,CAAC;;AAE3C,SAAA,CAAC;AAEF,QAAA,OAAO,IAAI,CAAC,MAAM,CAAC,CAAC,OAAO,EAAE,WAAW,EAAE,KAAK,CAAC,QAAQ,CAAC,EAAE,IAAI,CAAC;;AAGlE,IAAA,OAAO,qBAA4B;AACrC;;;;"}
1
+ {"version":3,"file":"createComponent.js","sources":["../../../../taro-components-library-solid/src/solid-component-lib/createComponent.tsx"],"sourcesContent":["import { isFunction } from '@tarojs/shared'\nimport { Component, JSX, mergeProps, splitProps } from 'solid-js'\nimport h from 'solid-js/h'\nimport { effect as _$effect, memo } from 'solid-js/web'\n\nimport { camelToDashCase, isPropNameAnEvent, isReactiveKey, syncAttribute, syncEvent } from './utils'\n\nexport interface HTMLStencilElement extends HTMLElement {\n componentOnReady(): Promise<this>\n}\n\nexport type StencilSolidInternalProps<ElementType> = JSX.DOMAttributes<ElementType>\n\nexport interface ComponentSupplementaryTypes {\n style?: JSX.CSSProperties\n slot?: string\n}\n\nfunction setReactiveProps(node: HTMLElement, getterObj: Record<string, any>) {\n _$effect(() => {\n for (const key in getterObj) {\n syncAttribute(node, key, getterObj[key])\n }\n })\n}\n\nfunction syncEvents(node: HTMLElement, eventsMap: Map<string, () => void>) {\n for (const [key, value] of eventsMap) {\n syncEvent(node, key, value)\n }\n}\n\nexport const createSolidComponent = <\n PropType,\n ElementType extends HTMLStencilElement,\n ExpandedPropsTypes = any\n>(\n tagName: string,\n manipulatePropsFunction?: (\n originalProps: StencilSolidInternalProps<ElementType>,\n newProps: any\n ) => ExpandedPropsTypes,\n defineCustomElement?: () => void,\n): Component<PropType & JSX.DOMAttributes<ElementType> & ComponentSupplementaryTypes> => {\n if (defineCustomElement !== undefined) {\n defineCustomElement()\n }\n\n function SolidComponentWrapper(props: { children: JSX.Element } & any) {\n const [local, other] = splitProps(props, ['children', 'ref'])\n const eventsMap = new Map()\n const reactiveKeys = []\n const getUnTrackProps = (_props: Record<string, any>) => {\n let propsToPass: typeof props = {}\n for (const key in _props) {\n if (!_props.hasOwnProperty(key)) {\n continue\n }\n if (isPropNameAnEvent(key)) {\n eventsMap.set(key, _props[key])\n continue\n }\n if (isReactiveKey(_props, key)) {\n reactiveKeys.push(key)\n continue\n }\n const propValue = _props[key]\n propsToPass[camelToDashCase(key)] = propValue\n }\n if (manipulatePropsFunction !== undefined) {\n propsToPass = manipulatePropsFunction(_props, propsToPass)\n }\n return propsToPass\n }\n\n const unTrackProps = getUnTrackProps(other)\n const [reactiveProps] = splitProps(other, reactiveKeys)\n\n const _mergeProps = mergeProps(unTrackProps, {\n ref: (element: HTMLElement) => {\n if (local.ref && isFunction(local.ref)) local.ref(element)\n syncEvents(element, eventsMap)\n setReactiveProps(element, reactiveProps)\n }\n })\n\n return memo(() => h(tagName, _mergeProps, local.children), true)\n }\n\n return SolidComponentWrapper as any\n}\n"],"names":["_$effect"],"mappings":";;;;;;;;AAkBA,SAAS,gBAAgB,CAAC,IAAiB,EAAE,SAA8B,EAAA;IACzEA,MAAQ,CAAC,MAAK;AACZ,QAAA,KAAK,MAAM,GAAG,I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,CAAC,CAAC,GAAG,SAAS;;AAE/C,YAAA,IAAI,uBAAuB,KAAK,SAAS,EAAE;AACzC,gBAAA,WAAW,GAAG,uBAAuB,CAAC,MAAM,EAAE,WAAW,CAAC;;AAE5D,YAAA,OAAO,WAAW;AACpB,SAAC;AAED,QAAA,MAAM,YAAY,GAAG,eAAe,CAAC,KAAK,CAAC;QAC3C,MAAM,CAAC,aAAa,CAAC,GAAG,UAAU,CAAC,KAAK,EAAE,YAAY,CAAC;AAEvD,QAAA,MAAM,WAAW,GAAG,UAAU,CAAC,YAAY,EAAE;AAC3C,YAAA,GAAG,EAAE,CAAC,OAAoB,KAAI;gBAC5B,IAAI,KAAK,CAAC,GAAG,IAAI,UAAU,CAAC,KAAK,CAAC,GAAG,CAAC;AAAE,oBAAA,KAAK,CAAC,GAAG,CAAC,OAAO,CAAC;AAC1D,gBAAA,UAAU,CAAC,OAAO,EAAE,SAAS,CAAC;AAC9B,gBAAA,gBAAgB,CAAC,OAAO,EAAE,aAAa,CAAC;;AAE3C,SAAA,CAAC;AAEF,QAAA,OAAO,IAAI,CAAC,MAAM,CAAC,CAAC,OAAO,EAAE,WAAW,EAAE,KAAK,CAAC,QAAQ,CAAC,EAAE,IAAI,CAAC;;AAGlE,IAAA,OAAO,qBAA4B;AACrC;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"element.js","sources":["../../../../../taro-components-library-solid/src/solid-component-lib/utils/element.ts"],"sourcesContent":["import { isObject } from '@tarojs/shared'\nimport { setAttribute as _$setAttribute } from 'solid-js/web'\n\nexport function syncEvent(el: HTMLElement & { __events?: { [key: string]: ((e: Event) => any) | undefined } }, propName: string, propValue: any) {\n const eventName = propName.substring(2)[0].toLowerCase() + propName.substring(3)\n\n const eventStore = el.__events || (el.__events = {})\n const oldEventHandler = eventStore[eventName]\n\n if (oldEventHandler) {\n el.removeEventListener(eventName, oldEventHandler)\n }\n\n el.addEventListener(\n eventName,\n (eventStore[eventName] = function handler(e: Event) {\n if (propValue) {\n propValue.call(this, e)\n }\n })\n )\n}\n\nexport function syncAttribute(el: HTMLElement, attribute: string, value: any) {\n if (attribute === 'style') {\n if (isObject(value)) {\n value = Object.keys(value).reduce((acc, key) => {\n acc.push(`${key}: ${value[key]}`)\n return acc\n }, []).join(';')\n }\n el.style.cssText = value\n } else if (attribute === 'classList') {\n const [addList, removeList] = [[], []]\n if (isObject<Record<string, any>>(value)) {\n for (const k in value) {\n if (value[k]) {\n addList.push(k)\n } else {\n removeList.push(k)\n }\n }\n el.classList.add(...addList)\n el.classList.remove(...removeList)\n }\n } else {\n _$setAttribute(el, attribute, value)\n }\n}\n"],"names":["_$setAttribute"],"mappings":";;;SAGgB,SAAS,CAAC,EAAmF,EAAE,QAAgB,EAAE,SAAc,EAAA;IAC7I,MAAM,SAAS,GAAG,QAAQ,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,GAAG,QAAQ,CAAC,SAAS,CAAC,CAAC,CAAC;AAEhF,IAAA,MAAM,UAAU,GAAG,EAAE,CAAC,QAAQ,KAAK,EAAE,CAAC,QAAQ,GAAG,EAAE,CAAC;AACpD,IAAA,MAAM,eAAe,GAAG,UAAU,CAAC,SAAS,CAAC;IAE7C,IAAI,eAAe,EAAE;AACnB,QAAA,EAAE,CAAC,mBAAmB,CAAC,SAAS,EAAE,eAAe,CAAC;;AAGpD,IAAA,EAAE,CAAC,gBAAgB,CACjB,SAAS,GACR,UAAU,CAAC,SAAS,CAAC,GAAG,SAAS,OAAO,CAAC,CAAQ,EAAA;QAChD,IAAI,SAAS,EAAE;AACb,YAAA,SAAS,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC;;KAE1B,EACF;AACH;SAEgB,aAAa,CAAC,EAAe,EAAE,SAAiB,EAAE,KAAU,EAAA;AAC1E,IAAA,IAAI,SAAS,KAAK,OAAO,EAAE;AACzB,QAAA,IAAI,QAAQ,CAAC,KAAK,CAAC,EAAE;AACnB,YAAA,KAAK,GAAG,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,GAAG,KAAI;AAC7C,gBAAA,GAAG,CAAC,IAAI,CAAC,CAAA,EAAG,GAAG,CAAA,EAAA,EAAK,KAAK,CAAC,GAAG,CAAC,CAAA,CAAE,CAAC;AACjC,gBAAA,OAAO,GAAG;aACX,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC;;AAElB,QAAA,EAAE,CAAC,KAAK,CAAC,OAAO,GAAG,KAAK;;AACnB,SAAA,IAAI,SAAS,KAAK,WAAW,EAAE;QACpC,MAAM,CAAC,OAAO,EAAE,UAAU,CAAC,GAAG,CAAC,EAAE,EAAE,EAAE,CAAC;AACtC,QAAA,IAAI,QAAQ,CAAsB,KAAK,CAAC,EAAE;AACxC,YAAA,KAAK,MAAM,CAAC,IAAI,KAAK,EAAE;AACrB,gBAAA,IAAI,KAAK,CAAC,CAAC,CAAC,EAAE;AACZ,oBAAA,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC;;qBACV;AACL,oBAAA,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC;;;YAGtB,EAAE,CAAC,SAAS,CAAC,GAAG,CAAC,GAAG,OAAO,CAAC;YAC5B,EAAE,CAAC,SAAS,CAAC,MAAM,CAAC,GAAG,UAAU,CAAC;;;SAE/B;AACL,QAAAA,YAAc,CAAC,EAAE,EAAE,SAAS,EAAE,KAAK,CAAC;;AAExC;;;;"}
1
+ {"version":3,"file":"element.js","sources":["../../../../../taro-components-library-solid/src/solid-component-lib/utils/element.ts"],"sourcesContent":["import { isObject } from '@tarojs/shared'\nimport { setAttribute as _$setAttribute } from 'solid-js/web'\n\nexport function syncEvent(el: HTMLElement & { __events?: { [key: string]: ((e: Event) => any) | undefined } }, propName: string, propValue: any) {\n const eventName = propName.substring(2)[0].toLowerCase() + propName.substring(3)\n\n const eventStore = el.__events || (el.__events = {})\n const oldEventHandler = eventStore[eventName]\n\n if (oldEventHandler) {\n el.removeEventListener(eventName, oldEventHandler)\n }\n\n el.addEventListener(\n eventName,\n (eventStore[eventName] = function handler(e: Event) {\n if (propValue) {\n propValue.call(this, e)\n }\n })\n )\n}\n\nexport function syncAttribute(el: HTMLElement, attribute: string, value: any) {\n if (attribute === 'style') {\n if (isObject(value)) {\n value = Object.keys(value).reduce((acc, key) => {\n acc.push(`${key}: ${value[key]}`)\n return acc\n }, []).join(';')\n }\n el.style.cssText = value\n } else if (attribute === 'classList') {\n const [addList, removeList] = [[], []]\n if (isObject<Record<string, any>>(value)) {\n for (const k in value) {\n if (value[k]) {\n addList.push(k)\n } else {\n removeList.push(k)\n }\n }\n el.classList.add(...addList)\n el.classList.remove(...removeList)\n }\n } else {\n _$setAttribute(el, attribute, value)\n }\n}\n"],"names":["_$setAttribute"],"mappings":";;;SAGgB,SAAS,CAAC,EAAmF,EAAE,QAAgB,EAAE,SAAc,EAAA;IAC7I,MAAM,SAAS,GAAG,QAAQ,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,GAAG,QAAQ,CAAC,SAAS,CAAC,CAAC,CAAC;AAEhF,IAAA,MAAM,UAAU,GAAG,EAAE,CAAC,QAAQ,KAAK,EAAE,CAAC,QAAQ,GAAG,EAAE,CAAC;AACpD,IAAA,MAAM,eAAe,GAAG,UAAU,CAAC,SAAS,CAAC;IAE7C,IAAI,eAAe,EAAE;AACnB,QAAA,EAAE,CAAC,mBAAmB,CAAC,SAAS,EAAE,eAAe,CAAC;;AAGpD,IAAA,EAAE,CAAC,gBAAgB,CACjB,SAAS,GACR,UAAU,CAAC,SAAS,CAAC,GAAG,SAAS,OAAO,CAAC,CAAQ,EAAA;QAChD,IAAI,SAAS,EAAE;AACb,YAAA,SAAS,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC;;KAE1B,EACF;AACH;SAEgB,aAAa,CAAC,EAAe,EAAE,SAAiB,EAAE,KAAU,EAAA;AAC1E,IAAA,IAAI,SAAS,KAAK,OAAO,EAAE;AACzB,QAAA,IAAI,QAAQ,CAAC,KAAK,CAAC,EAAE;AACnB,YAAA,KAAK,GAAG,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,GAAG,KAAI;AAC7C,gBAAA,GAAG,CAAC,IAAI,CAAC,CAAA,EAAG,GAAG,CAAA,EAAA,EAAK,KAAK,CAAC,GAAG,CAAC,CAAE,CAAA,CAAC;AACjC,gBAAA,OAAO,GAAG;aACX,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC;;AAElB,QAAA,EAAE,CAAC,KAAK,CAAC,OAAO,GAAG,KAAK;;AACnB,SAAA,IAAI,SAAS,KAAK,WAAW,EAAE;QACpC,MAAM,CAAC,OAAO,EAAE,UAAU,CAAC,GAAG,CAAC,EAAE,EAAE,EAAE,CAAC;AACtC,QAAA,IAAI,QAAQ,CAAsB,KAAK,CAAC,EAAE;AACxC,YAAA,KAAK,MAAM,CAAC,IAAI,KAAK,EAAE;AACrB,gBAAA,IAAI,KAAK,CAAC,CAAC,CAAC,EAAE;AACZ,oBAAA,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC;;qBACV;AACL,oBAAA,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC;;;YAGtB,EAAE,CAAC,SAAS,CAAC,GAAG,CAAC,GAAG,OAAO,CAAC;YAC5B,EAAE,CAAC,SAAS,CAAC,MAAM,CAAC,GAAG,UAAU,CAAC;;;SAE/B;AACL,QAAAA,YAAc,CAAC,EAAE,EAAE,SAAS,EAAE,KAAK,CAAC;;AAExC;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"createComponent.js","sources":["../../../../taro-components-library-vue3/src/component-lib/createComponent.ts"],"sourcesContent":["import { h } from 'vue'\n\nimport { useForwardRef } from './forwardRef'\n\nexport default function createComponent (name, classNames = []) {\n return {\n emits: ['tap'],\n setup (__props, { slots, emit }) {\n const forwardRef = useForwardRef()\n return () => (\n h(\n `${name}-core`,\n {\n ref: forwardRef,\n class: ['hydrated', ...classNames],\n onClick (e) {\n emit('tap', e)\n }\n },\n slots\n )\n )\n }\n }\n}\n"],"names":[],"mappings":";;;AAIc,SAAU,eAAe,CAAE,IAAI,EAAE,UAAU,GAAG,EAAE,EAAA;IAC5D,OAAO;QACL,KAAK,EAAE,CAAC,KAAK,CAAC;AACd,QAAA,KAAK,CAAE,OAAO,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,EAAA;AAC7B,YAAA,MAAM,UAAU,GAAG,aAAa,EAAE;YAClC,OAAO,OACL,CAAC,CACC,CAAA,EAAG,IAAI,CAAA,KAAA,CAAO,EACd;AACE,gBAAA,GAAG,EAAE,UAAU;AACf,gBAAA,KAAK,EAAE,CAAC,UAAU,EAAE,GAAG,UAAU,CAAC;AAClC,gBAAA,OAAO,CAAE,CAAC,EAAA;AACR,oBAAA,IAAI,CAAC,KAAK,EAAE,CAAC,CAAC;;aAEjB,EACD,KAAK,CACN,CACF;;KAEJ;AACH;;;;"}
1
+ {"version":3,"file":"createComponent.js","sources":["../../../../taro-components-library-vue3/src/component-lib/createComponent.ts"],"sourcesContent":["import { h } from 'vue'\n\nimport { useForwardRef } from './forwardRef'\n\nexport default function createComponent (name, classNames = []) {\n return {\n emits: ['tap'],\n setup (__props, { slots, emit }) {\n const forwardRef = useForwardRef()\n return () => (\n h(\n `${name}-core`,\n {\n ref: forwardRef,\n class: ['hydrated', ...classNames],\n onClick (e) {\n emit('tap', e)\n }\n },\n slots\n )\n )\n }\n }\n}\n"],"names":[],"mappings":";;;AAIwB,SAAA,eAAe,CAAE,IAAI,EAAE,UAAU,GAAG,EAAE,EAAA;IAC5D,OAAO;QACL,KAAK,EAAE,CAAC,KAAK,CAAC;AACd,QAAA,KAAK,CAAE,OAAO,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,EAAA;AAC7B,YAAA,MAAM,UAAU,GAAG,aAAa,EAAE;YAClC,OAAO,OACL,CAAC,CACC,CAAA,EAAG,IAAI,CAAA,KAAA,CAAO,EACd;AACE,gBAAA,GAAG,EAAE,UAAU;AACf,gBAAA,KAAK,EAAE,CAAC,UAAU,EAAE,GAAG,UAAU,CAAC;AAClC,gBAAA,OAAO,CAAE,CAAC,EAAA;AACR,oBAAA,IAAI,CAAC,KAAK,EAAE,CAAC,CAAC;;aAEjB,EACD,KAAK,CACN,CACF;;KAEJ;AACH;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"createFormsComponent.js","sources":["../../../../taro-components-library-vue3/src/component-lib/createFormsComponent.ts"],"sourcesContent":["import { computed, h, toRefs } from 'vue'\n\nimport { useForwardRef } from './forwardRef'\n\nexport default function createFormsComponent (name, eventName, modelValue = 'value', classNames = []) {\n const props: Record<string, any> = {\n modelValue: null\n }\n if (name === 'taro-input') {\n props.focus = Boolean\n }\n\n return {\n emits: ['tap', 'update:modelValue'],\n props,\n setup (props, { slots, emit }) {\n const { modelValue: model, focus } = toRefs(props)\n\n const attrs = computed(() => {\n return name === 'taro-input'\n ? {\n [modelValue]: model.value,\n 'auto-focus': focus.value\n }\n : {\n [modelValue]: model.value\n }\n })\n\n const forwardRef = useForwardRef()\n\n return () => (\n h(\n `${name}-core`,\n {\n ref: forwardRef,\n class: ['hydrated', ...classNames],\n ...attrs.value,\n onClick (e) {\n emit('tap', e)\n },\n [`on${eventName}`] (e) {\n emit('update:modelValue', e.detail.value)\n }\n },\n slots\n )\n )\n }\n }\n}\n"],"names":[],"mappings":";;;AAIc,SAAU,oBAAoB,CAAE,IAAI,EAAE,SAAS,EAAE,UAAU,GAAG,OAAO,EAAE,UAAU,GAAG,EAAE,EAAA;AAClG,IAAA,MAAM,KAAK,GAAwB;AACjC,QAAA,UAAU,EAAE;KACb;AACD,IAAA,IAAI,IAAI,KAAK,YAAY,EAAE;AACzB,QAAA,KAAK,CAAC,KAAK,GAAG,OAAO;;IAGvB,OAAO;AACL,QAAA,KAAK,EAAE,CAAC,KAAK,EAAE,mBAAmB,CAAC;QACnC,KAAK;AACL,QAAA,KAAK,CAAE,KAAK,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,EAAA;AAC3B,YAAA,MAAM,EAAE,UAAU,EAAE,KAAK,EAAE,KAAK,EAAE,GAAG,MAAM,CAAC,KAAK,CAAC;AAElD,YAAA,MAAM,KAAK,GAAG,QAAQ,CAAC,MAAK;gBAC1B,OAAO,IAAI,KAAK;AACd,sBAAE;AACA,wBAAA,CAAC,UAAU,GAAG,KAAK,CAAC,KAAK;wBACzB,YAAY,EAAE,KAAK,CAAC;AACrB;AACD,sBAAE;AACA,wBAAA,CAAC,UAAU,GAAG,KAAK,CAAC;qBACrB;AACL,aAAC,CAAC;AAEF,YAAA,MAAM,UAAU,GAAG,aAAa,EAAE;AAElC,YAAA,OAAO,OACL,CAAC,CACC,CAAA,EAAG,IAAI,CAAA,KAAA,CAAO,EAAA,MAAA,CAAA,MAAA,CAAA,MAAA,CAAA,MAAA,CAAA,EAEZ,GAAG,EAAE,UAAU,EACf,KAAK,EAAE,CAAC,UAAU,EAAE,GAAG,UAAU,CAAC,EAAA,EAC/B,KAAK,CAAC,KAAK,CAAA,EAAA,EACd,OAAO,CAAE,CAAC,EAAA;AACR,oBAAA,IAAI,CAAC,KAAK,EAAE,CAAC,CAAC;iBACf;AACD,gBAAA,CAAC,CAAA,EAAA,EAAK,SAAS,CAAA,CAAE,CAAC,CAAE,CAAC,EAAA;oBACnB,IAAI,CAAC,mBAAmB,EAAE,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC;AAC3C,iBAAC,EAAA,CAAA,EAEH,KAAK,CACN,CACF;;KAEJ;AACH;;;;"}
1
+ {"version":3,"file":"createFormsComponent.js","sources":["../../../../taro-components-library-vue3/src/component-lib/createFormsComponent.ts"],"sourcesContent":["import { computed, h, toRefs } from 'vue'\n\nimport { useForwardRef } from './forwardRef'\n\nexport default function createFormsComponent (name, eventName, modelValue = 'value', classNames = []) {\n const props: Record<string, any> = {\n modelValue: null\n }\n if (name === 'taro-input') {\n props.focus = Boolean\n }\n\n return {\n emits: ['tap', 'update:modelValue'],\n props,\n setup (props, { slots, emit }) {\n const { modelValue: model, focus } = toRefs(props)\n\n const attrs = computed(() => {\n return name === 'taro-input'\n ? {\n [modelValue]: model.value,\n 'auto-focus': focus.value\n }\n : {\n [modelValue]: model.value\n }\n })\n\n const forwardRef = useForwardRef()\n\n return () => (\n h(\n `${name}-core`,\n {\n ref: forwardRef,\n class: ['hydrated', ...classNames],\n ...attrs.value,\n onClick (e) {\n emit('tap', e)\n },\n [`on${eventName}`] (e) {\n emit('update:modelValue', e.detail.value)\n }\n },\n slots\n )\n )\n }\n }\n}\n"],"names":[],"mappings":";;;AAIwB,SAAA,oBAAoB,CAAE,IAAI,EAAE,SAAS,EAAE,UAAU,GAAG,OAAO,EAAE,UAAU,GAAG,EAAE,EAAA;AAClG,IAAA,MAAM,KAAK,GAAwB;AACjC,QAAA,UAAU,EAAE;KACb;AACD,IAAA,IAAI,IAAI,KAAK,YAAY,EAAE;AACzB,QAAA,KAAK,CAAC,KAAK,GAAG,OAAO;;IAGvB,OAAO;AACL,QAAA,KAAK,EAAE,CAAC,KAAK,EAAE,mBAAmB,CAAC;QACnC,KAAK;AACL,QAAA,KAAK,CAAE,KAAK,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,EAAA;AAC3B,YAAA,MAAM,EAAE,UAAU,EAAE,KAAK,EAAE,KAAK,EAAE,GAAG,MAAM,CAAC,KAAK,CAAC;AAElD,YAAA,MAAM,KAAK,GAAG,QAAQ,CAAC,MAAK;gBAC1B,OAAO,IAAI,KAAK;AACd,sBAAE;AACA,wBAAA,CAAC,UAAU,GAAG,KAAK,CAAC,KAAK;wBACzB,YAAY,EAAE,KAAK,CAAC;AACrB;AACD,sBAAE;AACA,wBAAA,CAAC,UAAU,GAAG,KAAK,CAAC;qBACrB;AACL,aAAC,CAAC;AAEF,YAAA,MAAM,UAAU,GAAG,aAAa,EAAE;AAElC,YAAA,OAAO,OACL,CAAC,CACC,CAAG,EAAA,IAAI,CAAO,KAAA,CAAA,EAAA,MAAA,CAAA,MAAA,CAAA,MAAA,CAAA,MAAA,CAAA,EAEZ,GAAG,EAAE,UAAU,EACf,KAAK,EAAE,CAAC,UAAU,EAAE,GAAG,UAAU,CAAC,EAC/B,EAAA,KAAK,CAAC,KAAK,CACd,EAAA,EAAA,OAAO,CAAE,CAAC,EAAA;AACR,oBAAA,IAAI,CAAC,KAAK,EAAE,CAAC,CAAC;iBACf;AACD,gBAAA,CAAC,CAAK,EAAA,EAAA,SAAS,CAAE,CAAA,CAAC,CAAE,CAAC,EAAA;oBACnB,IAAI,CAAC,mBAAmB,EAAE,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC;AAC3C,iBAAC,EAEH,CAAA,EAAA,KAAK,CACN,CACF;;KAEJ;AACH;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"icon.js","sources":["../../../../taro-components-library-vue3/src/component-lib/icon.ts"],"sourcesContent":["import { h } from 'vue'\n\nimport { useForwardRef } from './forwardRef'\n\nexport default {\n emits: ['tap'],\n setup (__props, { slots, emit, attrs }) {\n const iconType = attrs.type.replace(/_/g, '-')\n\n const forwardRef = useForwardRef()\n\n return () => (\n h(\n 'taro-icon-core',\n {\n ref: forwardRef,\n class: ['hydrated', `weui-icon-${iconType}`],\n onClick (e) {\n emit('tap', e)\n }\n },\n slots\n )\n )\n }\n}\n"],"names":[],"mappings":";;;AAIA,WAAe;IACb,KAAK,EAAE,CAAC,KAAK,CAAC;IACd,KAAK,CAAE,OAAO,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,EAAA;AACpC,QAAA,MAAM,QAAQ,GAAG,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE,GAAG,CAAC;AAE9C,QAAA,MAAM,UAAU,GAAG,aAAa,EAAE;AAElC,QAAA,OAAO,OACL,CAAC,CACC,gBAAgB,EAChB;AACE,YAAA,GAAG,EAAE,UAAU;AACf,YAAA,KAAK,EAAE,CAAC,UAAU,EAAE,CAAA,UAAA,EAAa,QAAQ,EAAE,CAAC;AAC5C,YAAA,OAAO,CAAE,CAAC,EAAA;AACR,gBAAA,IAAI,CAAC,KAAK,EAAE,CAAC,CAAC;;SAEjB,EACD,KAAK,CACN,CACF;;CAEJ;;;;"}
1
+ {"version":3,"file":"icon.js","sources":["../../../../taro-components-library-vue3/src/component-lib/icon.ts"],"sourcesContent":["import { h } from 'vue'\n\nimport { useForwardRef } from './forwardRef'\n\nexport default {\n emits: ['tap'],\n setup (__props, { slots, emit, attrs }) {\n const iconType = attrs.type.replace(/_/g, '-')\n\n const forwardRef = useForwardRef()\n\n return () => (\n h(\n 'taro-icon-core',\n {\n ref: forwardRef,\n class: ['hydrated', `weui-icon-${iconType}`],\n onClick (e) {\n emit('tap', e)\n }\n },\n slots\n )\n )\n }\n}\n"],"names":[],"mappings":";;;AAIA,WAAe;IACb,KAAK,EAAE,CAAC,KAAK,CAAC;IACd,KAAK,CAAE,OAAO,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,EAAA;AACpC,QAAA,MAAM,QAAQ,GAAG,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE,GAAG,CAAC;AAE9C,QAAA,MAAM,UAAU,GAAG,aAAa,EAAE;AAElC,QAAA,OAAO,OACL,CAAC,CACC,gBAAgB,EAChB;AACE,YAAA,GAAG,EAAE,UAAU;AACf,YAAA,KAAK,EAAE,CAAC,UAAU,EAAE,CAAa,UAAA,EAAA,QAAQ,EAAE,CAAC;AAC5C,YAAA,OAAO,CAAE,CAAC,EAAA;AACR,gBAAA,IAAI,CAAC,KAAK,EAAE,CAAC,CAAC;;SAEjB,EACD,KAAK,CACN,CACF;;CAEJ;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../../taro-components-library-vue3/src/component-lib/index.ts"],"sourcesContent":["import createComponent from './createComponent'\nimport createFormsComponent from './createFormsComponent'\n\n// 视图容器\nexport const CoverImage = /* @__PURE__ */ createComponent('taro-cover-image')\nexport const CoverView = /* @__PURE__ */ createComponent('taro-cover-view')\nexport const MatchMedia = /* @__PURE__ */ createComponent('taro-match-media')\nexport const MovableArea = /* @__PURE__ */ createComponent('taro-movable-area')\nexport const MovableView = /* @__PURE__ */ createComponent('taro-movable-view')\nexport const PageContainer = /* @__PURE__ */ createComponent('taro-page-container')\nexport const RootPortal = /* @__PURE__ */ createComponent('taro-root-portal')\nexport { default as ScrollView } from './scroll-view'\nexport const ShareElement = /* @__PURE__ */ createComponent('taro-share-element')\nexport const Swiper = /* @__PURE__ */ createComponent('taro-swiper')\nexport const SwiperItem = /* @__PURE__ */ createComponent('taro-swiper-item', ['swiper-slide'])\nexport const View = /* @__PURE__ */ createComponent('taro-view')\n\n// 基础内容\nexport { default as Icon } from './icon'\nexport const Progress = /* @__PURE__ */ createComponent('taro-progress', ['weui-progress'])\nexport const RichText = /* @__PURE__ */ createComponent('taro-rich-text')\nexport { default as Text } from './text'\n\n// 表单组件\nexport const Button = /* @__PURE__ */ createComponent('taro-button')\nexport const Checkbox = /* @__PURE__ */ createComponent('taro-checkbox', ['weui-cells_checkbox'])\nexport const CheckboxGroup = /* @__PURE__ */ createComponent('taro-checkbox-group')\nexport const Editor = /* @__PURE__ */ createComponent('taro-editor')\nexport const Form = /* @__PURE__ */ createComponent('taro-form')\nexport const Input = /* @__PURE__ */ createFormsComponent('taro-input', 'input')\nexport const KeyboardAccessory = /* @__PURE__ */ createComponent('taro-keyboard-accessory')\nexport const Label = /* @__PURE__ */ createComponent('taro-label')\nexport const Picker = /* @__PURE__ */ createFormsComponent('taro-picker', 'change')\nexport const PickerView = /* @__PURE__ */ createComponent('taro-picker-view')\nexport const PickerViewColumn = /* @__PURE__ */ createComponent('taro-picker-view-column')\nexport const Radio = /* @__PURE__ */ createComponent('taro-radio', ['weui-cells_checkbox'])\nexport const RadioGroup = /* @__PURE__ */ createComponent('taro-radio-group', ['weui-cells_radiogroup'])\nexport const Slider = /* @__PURE__ */ createFormsComponent('taro-slider', 'change', 'value', ['weui-slider-box'])\nexport const Switch = /* @__PURE__ */ createFormsComponent('taro-switch', 'change', 'checked')\nexport const Textarea = /* @__PURE__ */ createFormsComponent('taro-textarea', 'input')\n\n// 导航\nexport const FunctionalPageNavigator = /* @__PURE__ */ createComponent('taro-functional-page-navigator')\nexport const Navigator = /* @__PURE__ */ createComponent('taro-navigator')\n\n// 媒体组件\nexport const Audio = /* @__PURE__ */ createComponent('taro-audio')\nexport const Camera = /* @__PURE__ */ createComponent('taro-camera')\nexport { default as Image } from './image'\nexport const LivePlayer = /* @__PURE__ */ createComponent('taro-live-player')\nexport const Video = /* @__PURE__ */ createComponent('taro-video', ['taro-video-container'])\nexport const VoipRoom = /* @__PURE__ */ createComponent('taro-voip-room')\n\n// 地图\nexport const Map = /* @__PURE__ */ createComponent('taro-map')\n\n// 画布\nexport const Canvas = /* @__PURE__ */ createComponent('taro-canvas')\n\n// 开放能力\nexport const WebView = /* @__PURE__ */ createComponent('taro-web-view')\nexport const Ad = /* @__PURE__ */ createComponent('taro-ad')\nexport const AdCustom = /* @__PURE__ */ createComponent('taro-ad-custom')\nexport const OfficialAccount = /* @__PURE__ */ createComponent('taro-official-account')\nexport const OpenData = /* @__PURE__ */ createComponent('taro-open-data')\n\n// 导航栏\nexport const NavigationBar = /* @__PURE__ */ createComponent('taro-navigation-bar')\n\n// 页面属性配置节点\nexport const PageMeta = /* @__PURE__ */ createComponent('taro-page-meta')\n\n// 其他\nexport const Block = /* @__PURE__ */ createComponent('taro-block')\nexport const CustomWrapper = /* @__PURE__ */ createComponent('taro-custom-wrapper')\nexport const Slot = /* @__PURE__ */ createComponent('taro-slot')\n"],"names":[],"mappings":";;;;;;;AAGA;AACO,MAAM,UAAU,mBAAmB,eAAe,CAAC,kBAAkB;AACrE,MAAM,SAAS,mBAAmB,eAAe,CAAC,iBAAiB;AACnE,MAAM,UAAU,mBAAmB,eAAe,C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["../../../../taro-components-library-vue3/src/component-lib/index.ts"],"sourcesContent":["import createComponent from './createComponent'\nimport createFormsComponent from './createFormsComponent'\n\n// 视图容器\nexport const CoverImage = /* @__PURE__ */ createComponent('taro-cover-image')\nexport const CoverView = /* @__PURE__ */ createComponent('taro-cover-view')\nexport const MatchMedia = /* @__PURE__ */ createComponent('taro-match-media')\nexport const MovableArea = /* @__PURE__ */ createComponent('taro-movable-area')\nexport const MovableView = /* @__PURE__ */ createComponent('taro-movable-view')\nexport const PageContainer = /* @__PURE__ */ createComponent('taro-page-container')\nexport const RootPortal = /* @__PURE__ */ createComponent('taro-root-portal')\nexport { default as ScrollView } from './scroll-view'\nexport const ShareElement = /* @__PURE__ */ createComponent('taro-share-element')\nexport const Swiper = /* @__PURE__ */ createComponent('taro-swiper')\nexport const SwiperItem = /* @__PURE__ */ createComponent('taro-swiper-item', ['swiper-slide'])\nexport const View = /* @__PURE__ */ createComponent('taro-view')\n\n// 基础内容\nexport { default as Icon } from './icon'\nexport const Progress = /* @__PURE__ */ createComponent('taro-progress', ['weui-progress'])\nexport const RichText = /* @__PURE__ */ createComponent('taro-rich-text')\nexport { default as Text } from './text'\n\n// 表单组件\nexport const Button = /* @__PURE__ */ createComponent('taro-button')\nexport const Checkbox = /* @__PURE__ */ createComponent('taro-checkbox', ['weui-cells_checkbox'])\nexport const CheckboxGroup = /* @__PURE__ */ createComponent('taro-checkbox-group')\nexport const Editor = /* @__PURE__ */ createComponent('taro-editor')\nexport const Form = /* @__PURE__ */ createComponent('taro-form')\nexport const Input = /* @__PURE__ */ createFormsComponent('taro-input', 'input')\nexport const KeyboardAccessory = /* @__PURE__ */ createComponent('taro-keyboard-accessory')\nexport const Label = /* @__PURE__ */ createComponent('taro-label')\nexport const Picker = /* @__PURE__ */ createFormsComponent('taro-picker', 'change')\nexport const PickerView = /* @__PURE__ */ createComponent('taro-picker-view')\nexport const PickerViewColumn = /* @__PURE__ */ createComponent('taro-picker-view-column')\nexport const Radio = /* @__PURE__ */ createComponent('taro-radio', ['weui-cells_checkbox'])\nexport const RadioGroup = /* @__PURE__ */ createComponent('taro-radio-group', ['weui-cells_radiogroup'])\nexport const Slider = /* @__PURE__ */ createFormsComponent('taro-slider', 'change', 'value', ['weui-slider-box'])\nexport const Switch = /* @__PURE__ */ createFormsComponent('taro-switch', 'change', 'checked')\nexport const Textarea = /* @__PURE__ */ createFormsComponent('taro-textarea', 'input')\n\n// 导航\nexport const FunctionalPageNavigator = /* @__PURE__ */ createComponent('taro-functional-page-navigator')\nexport const Navigator = /* @__PURE__ */ createComponent('taro-navigator')\n\n// 媒体组件\nexport const Audio = /* @__PURE__ */ createComponent('taro-audio')\nexport const Camera = /* @__PURE__ */ createComponent('taro-camera')\nexport { default as Image } from './image'\nexport const LivePlayer = /* @__PURE__ */ createComponent('taro-live-player')\nexport const Video = /* @__PURE__ */ createComponent('taro-video', ['taro-video-container'])\nexport const VoipRoom = /* @__PURE__ */ createComponent('taro-voip-room')\n\n// 地图\nexport const Map = /* @__PURE__ */ createComponent('taro-map')\n\n// 画布\nexport const Canvas = /* @__PURE__ */ createComponent('taro-canvas')\n\n// 开放能力\nexport const WebView = /* @__PURE__ */ createComponent('taro-web-view')\nexport const Ad = /* @__PURE__ */ createComponent('taro-ad')\nexport const AdCustom = /* @__PURE__ */ createComponent('taro-ad-custom')\nexport const OfficialAccount = /* @__PURE__ */ createComponent('taro-official-account')\nexport const OpenData = /* @__PURE__ */ createComponent('taro-open-data')\n\n// 导航栏\nexport const NavigationBar = /* @__PURE__ */ createComponent('taro-navigation-bar')\n\n// 页面属性配置节点\nexport const PageMeta = /* @__PURE__ */ createComponent('taro-page-meta')\n\n// 其他\nexport const Block = /* @__PURE__ */ createComponent('taro-block')\nexport const CustomWrapper = /* @__PURE__ */ createComponent('taro-custom-wrapper')\nexport const Slot = /* @__PURE__ */ createComponent('taro-slot')\n"],"names":[],"mappings":";;;;;;;AAGA;AACa,MAAA,UAAU,mBAAmB,eAAe,CAAC,kBAAkB;A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AAqB;AACrE,MAAA,IAAI,mBAAmB,eAAe,CAAC,WAAW;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"components-loader.js","sources":["../../../taro-components-library-vue3/src/components-loader.ts"],"sourcesContent":["export function initVue3Components (app, components: Record<string, any> = {}) {\n app.config.isCustomElement = tag => /^taro-/.test(tag) || tag === 'root' || tag === 'block'\n\n Object.entries(components).forEach(([name, component]) => {\n const tagName = component?.displayName\n if (typeof tagName === 'string' && tagName) {\n component.name = name\n app.component(tagName.replace(/-core$/, ''), component)\n }\n })\n}\n"],"names":[],"mappings":"SAAgB,kBAAkB,CAAE,GAAG,EAAE,aAAkC,EAAE,EAAA;IAC3E,GAAG,CAAC,MAAM,CAAC,eAAe,GAAG,GAAG,IAAI,QAAQ,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,GAAG,KAAK,MAAM,IAAI,GAAG,KAAK,OAAO;AAE3F,IAAA,MAAM,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,EAAE,SAAS,CAAC,KAAI;QACvD,MAAM,OAAO,GAAG,SAAS,KAAA,IAAA,IAAT,SAAS,KAAA,KAAA,CAAA,GAAA,KAAA,CAAA,GAAT,SAAS,CAAE,WAAW;AACtC,QAAA,IAAI,OAAO,OAAO,KAAK,QAAQ,IAAI,OAAO,EAAE;AAC1C,YAAA,SAAS,CAAC,IAAI,GAAG,IAAI;AACrB,YAAA,GAAG,CAAC,SAAS,CAAC,OAAO,CAAC,OAAO,CAAC,QAAQ,EAAE,EAAE,CAAC,EAAE,SAAS,CAAC;;AAE3D,KAAC,CAAC;AACJ;;;;"}
1
+ {"version":3,"file":"components-loader.js","sources":["../../../taro-components-library-vue3/src/components-loader.ts"],"sourcesContent":["export function initVue3Components (app, components: Record<string, any> = {}) {\n app.config.isCustomElement = tag => /^taro-/.test(tag) || tag === 'root' || tag === 'block'\n\n Object.entries(components).forEach(([name, component]) => {\n const tagName = component?.displayName\n if (typeof tagName === 'string' && tagName) {\n component.name = name\n app.component(tagName.replace(/-core$/, ''), component)\n }\n })\n}\n"],"names":[],"mappings":"SAAgB,kBAAkB,CAAE,GAAG,EAAE,aAAkC,EAAE,EAAA;IAC3E,GAAG,CAAC,MAAM,CAAC,eAAe,GAAG,GAAG,IAAI,QAAQ,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,GAAG,KAAK,MAAM,IAAI,GAAG,KAAK,OAAO;AAE3F,IAAA,MAAM,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,EAAE,SAAS,CAAC,KAAI;QACvD,MAAM,OAAO,GAAG,SAAS,KAAA,IAAA,IAAT,SAAS,KAAT,KAAA,CAAA,GAAA,KAAA,CAAA,GAAA,SAAS,CAAE,WAAW;AACtC,QAAA,IAAI,OAAO,OAAO,KAAK,QAAQ,IAAI,OAAO,EAAE;AAC1C,YAAA,SAAS,CAAC,IAAI,GAAG,IAAI;AACrB,YAAA,GAAG,CAAC,SAAS,CAAC,OAAO,CAAC,OAAO,CAAC,QAAQ,EAAE,EAAE,CAAC,EAAE,SAAS,CAAC;;AAE3D,KAAC,CAAC;AACJ;;;;"}