@wordpress/primitives 4.32.0 → 4.32.1-next.b8c8708f3.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.
Files changed (37) hide show
  1. package/build/block-quotation/index.js +27 -6
  2. package/build/block-quotation/index.js.map +7 -1
  3. package/build/horizontal-rule/index.js +27 -6
  4. package/build/horizontal-rule/index.js.map +7 -1
  5. package/build/index.js +27 -48
  6. package/build/index.js.map +7 -1
  7. package/build/svg/index.js +87 -127
  8. package/build/svg/index.js.map +7 -1
  9. package/build/view/index.js +27 -6
  10. package/build/view/index.js.map +7 -1
  11. package/build-module/block-quotation/index.js +5 -2
  12. package/build-module/block-quotation/index.js.map +7 -1
  13. package/build-module/horizontal-rule/index.js +5 -2
  14. package/build-module/horizontal-rule/index.js.map +7 -1
  15. package/build-module/index.js +5 -5
  16. package/build-module/index.js.map +7 -1
  17. package/build-module/svg/index.js +46 -113
  18. package/build-module/svg/index.js.map +7 -1
  19. package/build-module/view/index.js +5 -2
  20. package/build-module/view/index.js.map +7 -1
  21. package/package.json +10 -4
  22. package/build/block-quotation/index.native.js +0 -67
  23. package/build/block-quotation/index.native.js.map +0 -1
  24. package/build/horizontal-rule/index.native.js +0 -60
  25. package/build/horizontal-rule/index.native.js.map +0 -1
  26. package/build/svg/index.native.js +0 -126
  27. package/build/svg/index.native.js.map +0 -1
  28. package/build/view/index.native.js +0 -13
  29. package/build/view/index.native.js.map +0 -1
  30. package/build-module/block-quotation/index.native.js +0 -57
  31. package/build-module/block-quotation/index.native.js.map +0 -1
  32. package/build-module/horizontal-rule/index.native.js +0 -52
  33. package/build-module/horizontal-rule/index.native.js.map +0 -1
  34. package/build-module/svg/index.native.js +0 -52
  35. package/build-module/svg/index.native.js.map +0 -1
  36. package/build-module/view/index.native.js +0 -5
  37. package/build-module/view/index.native.js.map +0 -1
@@ -1,113 +1,46 @@
1
- /**
2
- * External dependencies
3
- */
4
- import clsx from 'clsx';
5
-
6
- /**
7
- * WordPress dependencies
8
- */
9
- import { createElement, forwardRef } from '@wordpress/element';
10
-
11
- /** @typedef {{isPressed?: boolean} & import('react').ComponentPropsWithoutRef<'svg'>} SVGProps */
12
-
13
- /**
14
- * @param {import('react').ComponentPropsWithoutRef<'circle'>} props
15
- *
16
- * @return {JSX.Element} Circle component
17
- */
18
- import { jsx as _jsx } from "react/jsx-runtime";
19
- export const Circle = props => createElement('circle', props);
20
-
21
- /**
22
- * @param {import('react').ComponentPropsWithoutRef<'g'>} props
23
- *
24
- * @return {JSX.Element} G component
25
- */
26
- export const G = props => createElement('g', props);
27
-
28
- /**
29
- * @param {import('react').ComponentPropsWithoutRef<'line'>} props
30
- *
31
- * @return {JSX.Element} Path component
32
- */
33
- export const Line = props => createElement('line', props);
34
-
35
- /**
36
- * @param {import('react').ComponentPropsWithoutRef<'path'>} props
37
- *
38
- * @return {JSX.Element} Path component
39
- */
40
- export const Path = props => createElement('path', props);
41
-
42
- /**
43
- * @param {import('react').ComponentPropsWithoutRef<'polygon'>} props
44
- *
45
- * @return {JSX.Element} Polygon component
46
- */
47
- export const Polygon = props => createElement('polygon', props);
48
-
49
- /**
50
- * @param {import('react').ComponentPropsWithoutRef<'rect'>} props
51
- *
52
- * @return {JSX.Element} Rect component
53
- */
54
- export const Rect = props => createElement('rect', props);
55
-
56
- /**
57
- * @param {import('react').ComponentPropsWithoutRef<'defs'>} props
58
- *
59
- * @return {JSX.Element} Defs component
60
- */
61
- export const Defs = props => createElement('defs', props);
62
-
63
- /**
64
- * @param {import('react').ComponentPropsWithoutRef<'radialGradient'>} props
65
- *
66
- * @return {JSX.Element} RadialGradient component
67
- */
68
- export const RadialGradient = props => createElement('radialGradient', props);
69
-
70
- /**
71
- * @param {import('react').ComponentPropsWithoutRef<'linearGradient'>} props
72
- *
73
- * @return {JSX.Element} LinearGradient component
74
- */
75
- export const LinearGradient = props => createElement('linearGradient', props);
76
-
77
- /**
78
- * @param {import('react').ComponentPropsWithoutRef<'stop'>} props
79
- *
80
- * @return {JSX.Element} Stop component
81
- */
82
- export const Stop = props => createElement('stop', props);
83
- export const SVG = forwardRef(
84
- /**
85
- * @param {SVGProps} props isPressed indicates whether the SVG should appear as pressed.
86
- * Other props will be passed through to svg component.
87
- * @param {import('react').ForwardedRef<SVGSVGElement>} ref The forwarded ref to the SVG element.
88
- *
89
- * @return {JSX.Element} Stop component
90
- */
91
- ({
92
- className,
93
- isPressed,
94
- ...props
95
- }, ref) => {
96
- const appliedProps = {
97
- ...props,
98
- className: clsx(className, {
99
- 'is-pressed': isPressed
100
- }) || undefined,
101
- 'aria-hidden': true,
102
- focusable: false
103
- };
104
-
105
- // Disable reason: We need to have a way to render HTML tag for web.
106
- // eslint-disable-next-line react/forbid-elements
107
- return /*#__PURE__*/_jsx("svg", {
108
- ...appliedProps,
109
- ref: ref
110
- });
111
- });
112
- SVG.displayName = 'SVG';
113
- //# sourceMappingURL=index.js.map
1
+ import { jsx } from "react/jsx-runtime";
2
+ import clsx from "clsx";
3
+ import { createElement, forwardRef } from "@wordpress/element";
4
+ const Circle = (props) => createElement("circle", props);
5
+ const G = (props) => createElement("g", props);
6
+ const Line = (props) => createElement("line", props);
7
+ const Path = (props) => createElement("path", props);
8
+ const Polygon = (props) => createElement("polygon", props);
9
+ const Rect = (props) => createElement("rect", props);
10
+ const Defs = (props) => createElement("defs", props);
11
+ const RadialGradient = (props) => createElement("radialGradient", props);
12
+ const LinearGradient = (props) => createElement("linearGradient", props);
13
+ const Stop = (props) => createElement("stop", props);
14
+ const SVG = forwardRef(
15
+ /**
16
+ * @param {SVGProps} props isPressed indicates whether the SVG should appear as pressed.
17
+ * Other props will be passed through to svg component.
18
+ * @param {import('react').ForwardedRef<SVGSVGElement>} ref The forwarded ref to the SVG element.
19
+ *
20
+ * @return {JSX.Element} Stop component
21
+ */
22
+ ({ className, isPressed, ...props }, ref) => {
23
+ const appliedProps = {
24
+ ...props,
25
+ className: clsx(className, { "is-pressed": isPressed }) || void 0,
26
+ "aria-hidden": true,
27
+ focusable: false
28
+ };
29
+ return /* @__PURE__ */ jsx("svg", { ...appliedProps, ref });
30
+ }
31
+ );
32
+ SVG.displayName = "SVG";
33
+ export {
34
+ Circle,
35
+ Defs,
36
+ G,
37
+ Line,
38
+ LinearGradient,
39
+ Path,
40
+ Polygon,
41
+ RadialGradient,
42
+ Rect,
43
+ SVG,
44
+ Stop
45
+ };
46
+ //# sourceMappingURL=index.js.map
@@ -1 +1,7 @@
1
- {"version":3,"names":["clsx","createElement","forwardRef","jsx","_jsx","Circle","props","G","Line","Path","Polygon","Rect","Defs","RadialGradient","LinearGradient","Stop","SVG","className","isPressed","ref","appliedProps","undefined","focusable","displayName"],"sources":["@wordpress/primitives/src/svg/index.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { createElement, forwardRef } from '@wordpress/element';\n\n/** @typedef {{isPressed?: boolean} & import('react').ComponentPropsWithoutRef<'svg'>} SVGProps */\n\n/**\n * @param {import('react').ComponentPropsWithoutRef<'circle'>} props\n *\n * @return {JSX.Element} Circle component\n */\nexport const Circle = ( props ) => createElement( 'circle', props );\n\n/**\n * @param {import('react').ComponentPropsWithoutRef<'g'>} props\n *\n * @return {JSX.Element} G component\n */\nexport const G = ( props ) => createElement( 'g', props );\n\n/**\n * @param {import('react').ComponentPropsWithoutRef<'line'>} props\n *\n * @return {JSX.Element} Path component\n */\nexport const Line = ( props ) => createElement( 'line', props );\n\n/**\n * @param {import('react').ComponentPropsWithoutRef<'path'>} props\n *\n * @return {JSX.Element} Path component\n */\nexport const Path = ( props ) => createElement( 'path', props );\n\n/**\n * @param {import('react').ComponentPropsWithoutRef<'polygon'>} props\n *\n * @return {JSX.Element} Polygon component\n */\nexport const Polygon = ( props ) => createElement( 'polygon', props );\n\n/**\n * @param {import('react').ComponentPropsWithoutRef<'rect'>} props\n *\n * @return {JSX.Element} Rect component\n */\nexport const Rect = ( props ) => createElement( 'rect', props );\n\n/**\n * @param {import('react').ComponentPropsWithoutRef<'defs'>} props\n *\n * @return {JSX.Element} Defs component\n */\nexport const Defs = ( props ) => createElement( 'defs', props );\n\n/**\n * @param {import('react').ComponentPropsWithoutRef<'radialGradient'>} props\n *\n * @return {JSX.Element} RadialGradient component\n */\nexport const RadialGradient = ( props ) =>\n\tcreateElement( 'radialGradient', props );\n\n/**\n * @param {import('react').ComponentPropsWithoutRef<'linearGradient'>} props\n *\n * @return {JSX.Element} LinearGradient component\n */\nexport const LinearGradient = ( props ) =>\n\tcreateElement( 'linearGradient', props );\n\n/**\n * @param {import('react').ComponentPropsWithoutRef<'stop'>} props\n *\n * @return {JSX.Element} Stop component\n */\nexport const Stop = ( props ) => createElement( 'stop', props );\n\nexport const SVG = forwardRef(\n\t/**\n\t * @param {SVGProps} props isPressed indicates whether the SVG should appear as pressed.\n\t * Other props will be passed through to svg component.\n\t * @param {import('react').ForwardedRef<SVGSVGElement>} ref The forwarded ref to the SVG element.\n\t *\n\t * @return {JSX.Element} Stop component\n\t */\n\t( { className, isPressed, ...props }, ref ) => {\n\t\tconst appliedProps = {\n\t\t\t...props,\n\t\t\tclassName:\n\t\t\t\tclsx( className, { 'is-pressed': isPressed } ) || undefined,\n\t\t\t'aria-hidden': true,\n\t\t\tfocusable: false,\n\t\t};\n\n\t\t// Disable reason: We need to have a way to render HTML tag for web.\n\t\t// eslint-disable-next-line react/forbid-elements\n\t\treturn <svg { ...appliedProps } ref={ ref } />;\n\t}\n);\nSVG.displayName = 'SVG';\n"],"mappings":"AAAA;AACA;AACA;AACA,OAAOA,IAAI,MAAM,MAAM;;AAEvB;AACA;AACA;AACA,SAASC,aAAa,EAAEC,UAAU,QAAQ,oBAAoB;;AAE9D;;AAEA;AACA;AACA;AACA;AACA;AAJA,SAAAC,GAAA,IAAAC,IAAA;AAKA,OAAO,MAAMC,MAAM,GAAKC,KAAK,IAAML,aAAa,CAAE,QAAQ,EAAEK,KAAM,CAAC;;AAEnE;AACA;AACA;AACA;AACA;AACA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CAAC,IAAIG,SAAS;IAC5D,aAAa,EAAE,IAAI;IACnBC,SAAS,EAAE;EACZ,CAAC;;EAED;EACA;EACA,oBAAOlB,IAAA;IAAA,GAAUgB,YAAY;IAAGD,GAAG,EAAGA;EAAK,CAAE,CAAC;AAC/C,CACD,CAAC;AACDH,GAAG,CAACO,WAAW,GAAG,KAAK","ignoreList":[]}
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/svg/index.js"],
4
+ "sourcesContent": ["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { createElement, forwardRef } from '@wordpress/element';\n\n/** @typedef {{isPressed?: boolean} & import('react').ComponentPropsWithoutRef<'svg'>} SVGProps */\n\n/**\n * @param {import('react').ComponentPropsWithoutRef<'circle'>} props\n *\n * @return {JSX.Element} Circle component\n */\nexport const Circle = ( props ) => createElement( 'circle', props );\n\n/**\n * @param {import('react').ComponentPropsWithoutRef<'g'>} props\n *\n * @return {JSX.Element} G component\n */\nexport const G = ( props ) => createElement( 'g', props );\n\n/**\n * @param {import('react').ComponentPropsWithoutRef<'line'>} props\n *\n * @return {JSX.Element} Path component\n */\nexport const Line = ( props ) => createElement( 'line', props );\n\n/**\n * @param {import('react').ComponentPropsWithoutRef<'path'>} props\n *\n * @return {JSX.Element} Path component\n */\nexport const Path = ( props ) => createElement( 'path', props );\n\n/**\n * @param {import('react').ComponentPropsWithoutRef<'polygon'>} props\n *\n * @return {JSX.Element} Polygon component\n */\nexport const Polygon = ( props ) => createElement( 'polygon', props );\n\n/**\n * @param {import('react').ComponentPropsWithoutRef<'rect'>} props\n *\n * @return {JSX.Element} Rect component\n */\nexport const Rect = ( props ) => createElement( 'rect', props );\n\n/**\n * @param {import('react').ComponentPropsWithoutRef<'defs'>} props\n *\n * @return {JSX.Element} Defs component\n */\nexport const Defs = ( props ) => createElement( 'defs', props );\n\n/**\n * @param {import('react').ComponentPropsWithoutRef<'radialGradient'>} props\n *\n * @return {JSX.Element} RadialGradient component\n */\nexport const RadialGradient = ( props ) =>\n\tcreateElement( 'radialGradient', props );\n\n/**\n * @param {import('react').ComponentPropsWithoutRef<'linearGradient'>} props\n *\n * @return {JSX.Element} LinearGradient component\n */\nexport const LinearGradient = ( props ) =>\n\tcreateElement( 'linearGradient', props );\n\n/**\n * @param {import('react').ComponentPropsWithoutRef<'stop'>} props\n *\n * @return {JSX.Element} Stop component\n */\nexport const Stop = ( props ) => createElement( 'stop', props );\n\nexport const SVG = forwardRef(\n\t/**\n\t * @param {SVGProps} props isPressed indicates whether the SVG should appear as pressed.\n\t * Other props will be passed through to svg component.\n\t * @param {import('react').ForwardedRef<SVGSVGElement>} ref The forwarded ref to the SVG element.\n\t *\n\t * @return {JSX.Element} Stop component\n\t */\n\t( { className, isPressed, ...props }, ref ) => {\n\t\tconst appliedProps = {\n\t\t\t...props,\n\t\t\tclassName:\n\t\t\t\tclsx( className, { 'is-pressed': isPressed } ) || undefined,\n\t\t\t'aria-hidden': true,\n\t\t\tfocusable: false,\n\t\t};\n\n\t\t// Disable reason: We need to have a way to render HTML tag for web.\n\t\t// eslint-disable-next-line react/forbid-elements\n\t\treturn <svg { ...appliedProps } ref={ ref } />;\n\t}\n);\nSVG.displayName = 'SVG';\n"],
5
+ "mappings": "AAuGS;AApGT,OAAO,UAAU;AAKjB,SAAS,eAAe,kBAAkB;AASnC,MAAM,SAAS,CAAE,UAAW,cAAe,UAAU,KAAM;AAO3D,MAAM,IAAI,CAAE,UAAW,cAAe,KAAK,KAAM;AAOjD,MAAM,OAAO,CAAE,UAAW,cAAe,QAAQ,KAAM;AAOvD,MAAM,OAAO,CAAE,UAAW,cAAe,QAAQ,KAAM;AAOvD,MAAM,UAAU,CAAE,UAAW,cAAe,WAAW,KAAM;AAO7D,MAAM,OAAO,CAAE,UAAW,cAAe,QAAQ,KAAM;AAOvD,MAAM,OAAO,CAAE,UAAW,cAAe,QAAQ,KAAM;AAOvD,MAAM,iBAAiB,CAAE,UAC/B,cAAe,kBAAkB,KAAM;AAOjC,MAAM,iBAAiB,CAAE,UAC/B,cAAe,kBAAkB,KAAM;AAOjC,MAAM,OAAO,CAAE,UAAW,cAAe,QAAQ,KAAM;AAEvD,MAAM,MAAM;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQlB,CAAE,EAAE,WAAW,WAAW,GAAG,MAAM,GAAG,QAAS;AAC9C,UAAM,eAAe;AAAA,MACpB,GAAG;AAAA,MACH,WACC,KAAM,WAAW,EAAE,cAAc,UAAU,CAAE,KAAK;AAAA,MACnD,eAAe;AAAA,MACf,WAAW;AAAA,IACZ;AAIA,WAAO,oBAAC,SAAM,GAAG,cAAe,KAAY;AAAA,EAC7C;AACD;AACA,IAAI,cAAc;",
6
+ "names": []
7
+ }
@@ -1,2 +1,5 @@
1
- export const View = 'div';
2
- //# sourceMappingURL=index.js.map
1
+ const View = "div";
2
+ export {
3
+ View
4
+ };
5
+ //# sourceMappingURL=index.js.map
@@ -1 +1,7 @@
1
- {"version":3,"names":["View"],"sources":["@wordpress/primitives/src/view/index.js"],"sourcesContent":["export const View = 'div';\n"],"mappings":"AAAA,OAAO,MAAMA,IAAI,GAAG,KAAK","ignoreList":[]}
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/view/index.js"],
4
+ "sourcesContent": ["export const View = 'div';\n"],
5
+ "mappings": "AAAO,MAAM,OAAO;",
6
+ "names": []
7
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wordpress/primitives",
3
- "version": "4.32.0",
3
+ "version": "4.32.1-next.b8c8708f3.0",
4
4
  "description": "WordPress cross-platform primitives.",
5
5
  "author": "The WordPress Contributors",
6
6
  "license": "GPL-2.0-or-later",
@@ -25,6 +25,13 @@
25
25
  },
26
26
  "main": "build/index.js",
27
27
  "module": "build-module/index.js",
28
+ "exports": {
29
+ ".": {
30
+ "import": "./build-module/index.js",
31
+ "require": "./build/index.js"
32
+ },
33
+ "./package.json": "./package.json"
34
+ },
28
35
  "react-native": "src/index",
29
36
  "wpScript": true,
30
37
  "types": "build-types",
@@ -32,8 +39,7 @@
32
39
  "src/**/*.scss"
33
40
  ],
34
41
  "dependencies": {
35
- "@babel/runtime": "7.25.7",
36
- "@wordpress/element": "^6.32.0",
42
+ "@wordpress/element": "^6.32.1-next.b8c8708f3.0",
37
43
  "clsx": "^2.1.1"
38
44
  },
39
45
  "peerDependencies": {
@@ -42,5 +48,5 @@
42
48
  "publishConfig": {
43
49
  "access": "public"
44
50
  },
45
- "gitHead": "a030b4c0e0695239b942c7dc18511782b64f10ed"
51
+ "gitHead": "67cfd7e661931aeb0d06bec894599d287a4f8d0f"
46
52
  }
@@ -1,67 +0,0 @@
1
- "use strict";
2
-
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
- Object.defineProperty(exports, "__esModule", {
5
- value: true
6
- });
7
- exports.BlockQuotation = void 0;
8
- var _reactNative = require("react-native");
9
- var _element = require("@wordpress/element");
10
- var _compose = require("@wordpress/compose");
11
- var _style = _interopRequireDefault(require("./style.scss"));
12
- var _jsxRuntime = require("react/jsx-runtime");
13
- /**
14
- * External dependencies
15
- */
16
-
17
- /**
18
- * WordPress dependencies
19
- */
20
-
21
- /**
22
- * Internal dependencies
23
- */
24
-
25
- const BlockQuotation = exports.BlockQuotation = (0, _element.forwardRef)(({
26
- ...props
27
- }, ref) => {
28
- const {
29
- style
30
- } = props;
31
- const blockQuoteStyle = [(0, _compose.usePreferredColorSchemeStyle)(_style.default.wpBlockQuoteLight, _style.default.wpBlockQuoteDark), style?.baseColors?.color?.text && {
32
- borderLeftColor: style.baseColors.color.text
33
- }, style?.color && {
34
- borderLeftColor: style.color
35
- }, style, style?.backgroundColor && _style.default.paddingWithBackground];
36
- const colorStyle = style?.color ? {
37
- color: style.color
38
- } : {};
39
- const newChildren = _element.Children.map(props.children, child => {
40
- const {
41
- identifier,
42
- attributeKey
43
- } = child?.props || {};
44
- const identifierKey = identifier !== null && identifier !== void 0 ? identifier : attributeKey;
45
- if (identifierKey === 'citation') {
46
- return (0, _element.cloneElement)(child, {
47
- style: {
48
- ..._style.default.wpBlockQuoteCitation,
49
- ...colorStyle
50
- }
51
- });
52
- }
53
- if (child && child.props.identifier === 'value') {
54
- return (0, _element.cloneElement)(child, {
55
- tagsToEliminate: ['div'],
56
- style: colorStyle
57
- });
58
- }
59
- return child;
60
- });
61
- return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
62
- ref: ref,
63
- style: blockQuoteStyle,
64
- children: newChildren
65
- });
66
- });
67
- //# sourceMappingURL=index.native.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["_reactNative","require","_element","_compose","_style","_interopRequireDefault","_jsxRuntime","BlockQuotation","exports","forwardRef","props","ref","style","blockQuoteStyle","usePreferredColorSchemeStyle","styles","wpBlockQuoteLight","wpBlockQuoteDark","baseColors","color","text","borderLeftColor","backgroundColor","paddingWithBackground","colorStyle","newChildren","Children","map","children","child","identifier","attributeKey","identifierKey","cloneElement","wpBlockQuoteCitation","tagsToEliminate","jsx","View"],"sources":["@wordpress/primitives/src/block-quotation/index.native.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport { View } from 'react-native';\n/**\n * WordPress dependencies\n */\nimport { Children, cloneElement, forwardRef } from '@wordpress/element';\nimport { usePreferredColorSchemeStyle } from '@wordpress/compose';\n/**\n * Internal dependencies\n */\nimport styles from './style.scss';\n\nexport const BlockQuotation = forwardRef( ( { ...props }, ref ) => {\n\tconst { style } = props;\n\n\tconst blockQuoteStyle = [\n\t\tusePreferredColorSchemeStyle(\n\t\t\tstyles.wpBlockQuoteLight,\n\t\t\tstyles.wpBlockQuoteDark\n\t\t),\n\t\tstyle?.baseColors?.color?.text && {\n\t\t\tborderLeftColor: style.baseColors.color.text,\n\t\t},\n\t\tstyle?.color && {\n\t\t\tborderLeftColor: style.color,\n\t\t},\n\t\tstyle,\n\t\tstyle?.backgroundColor && styles.paddingWithBackground,\n\t];\n\tconst colorStyle = style?.color ? { color: style.color } : {};\n\n\tconst newChildren = Children.map( props.children, ( child ) => {\n\t\tconst { identifier, attributeKey } = child?.props || {};\n\t\tconst identifierKey = identifier ?? attributeKey;\n\n\t\tif ( identifierKey === 'citation' ) {\n\t\t\treturn cloneElement( child, {\n\t\t\t\tstyle: {\n\t\t\t\t\t...styles.wpBlockQuoteCitation,\n\t\t\t\t\t...colorStyle,\n\t\t\t\t},\n\t\t\t} );\n\t\t}\n\t\tif ( child && child.props.identifier === 'value' ) {\n\t\t\treturn cloneElement( child, {\n\t\t\t\ttagsToEliminate: [ 'div' ],\n\t\t\t\tstyle: colorStyle,\n\t\t\t} );\n\t\t}\n\t\treturn child;\n\t} );\n\treturn (\n\t\t<View ref={ ref } style={ blockQuoteStyle }>\n\t\t\t{ newChildren }\n\t\t</View>\n\t);\n} );\n"],"mappings":";;;;;;;AAGA,IAAAA,YAAA,GAAAC,OAAA;AAIA,IAAAC,QAAA,GAAAD,OAAA;AACA,IAAAE,QAAA,GAAAF,OAAA;AAIA,IAAAG,MAAA,GAAAC,sBAAA,CAAAJ,OAAA;AAAkC,IAAAK,WAAA,GAAAL,OAAA;AAZlC;AACA;AACA;;AAEA;AACA;AACA;;AAGA;AACA;AACA;;AAGO,MAAMM,cAAc,GAAAC,OAAA,CAAAD,cAAA,GAAG,IAAAE,mBAAU,EAAE,CAAE;EAAE,GAAGC;AAAM,CAAC,EAAEC,GAAG,KAAM;EAClE,MAAM;IAAEC;EAAM,CAAC,GAAGF,KAAK;EAEvB,MAAMG,eAAe,GAAG,CACvB,IAAAC,qCAA4B,EAC3BC,cAAM,CAACC,iBAAiB,EACxBD,cAAM,CAACE,gBACR,CAAC,EACDL,KAAK,EAAEM,UAAU,EAAEC,KAAK,EAAEC,IAAI,IAAI;IACjCC,eAAe,EAAET,KAAK,CAACM,UAAU,CAACC,KAAK,CAACC;EACzC,CAAC,EACDR,KAAK,EAAEO,KAAK,IAAI;IACfE,eAAe,EAAET,KAAK,CAACO;EACxB,CAAC,EACDP,KAAK,EACLA,KAAK,EAAEU,eAAe,IAAIP,cAAM,CAACQ,qBAAqB,CACtD;EACD,MAAMC,UAAU,GAAGZ,KAAK,EAAEO,KAAK,GAAG;IAAEA,KAAK,EAAEP,KAAK,CAACO;EAAM,CAAC,GAAG,CAAC,CAAC;EAE7D,MAAMM,WAAW,GAAGC,iBAAQ,CAACC,GAAG,CAAEjB,KAAK,CAACkB,QAAQ,EAAIC,KAAK,IAAM;IAC9D,MAAM;MAAEC,UAAU;MAAEC;IAAa,CAAC,GAAGF,KAAK,EAAEnB,KAAK,IAAI,CAAC,CAAC;IACvD,MAAMsB,aAAa,GAAGF,UAAU,aAAVA,UAAU,cAAVA,UAAU,GAAIC,YAAY;IAEhD,IAAKC,aAAa,KAAK,UAAU,EAAG;MACnC,OAAO,IAAAC,qBAAY,EAAEJ,KAAK,EAAE;QAC3BjB,KAAK,EAAE;UACN,GAAGG,cAAM,CAACmB,oBAAoB;UAC9B,GAAGV;QACJ;MACD,CAAE,CAAC;IACJ;IACA,IAAKK,KAAK,IAAIA,KAAK,CAACnB,KAAK,CAACoB,UAAU,KAAK,OAAO,EAAG;MAClD,OAAO,IAAAG,qBAAY,EAAEJ,KAAK,EAAE;QAC3BM,eAAe,EAAE,CAAE,KAAK,CAAE;QAC1BvB,KAAK,EAAEY;MACR,CAAE,CAAC;IACJ;IACA,OAAOK,KAAK;EACb,CAAE,CAAC;EACH,oBACC,IAAAvB,WAAA,CAAA8B,GAAA,EAACpC,YAAA,CAAAqC,IAAI;IAAC1B,GAAG,EAAGA,GAAK;IAACC,KAAK,EAAGC,eAAiB;IAAAe,QAAA,EACxCH;EAAW,CACR,CAAC;AAET,CAAE,CAAC","ignoreList":[]}
@@ -1,60 +0,0 @@
1
- "use strict";
2
-
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
- Object.defineProperty(exports, "__esModule", {
5
- value: true
6
- });
7
- exports.HorizontalRule = void 0;
8
- var _reactNative = require("react-native");
9
- var _compose = require("@wordpress/compose");
10
- var _styles = _interopRequireDefault(require("./styles.scss"));
11
- var _jsxRuntime = require("react/jsx-runtime");
12
- /**
13
- * External dependencies
14
- */
15
-
16
- /**
17
- * WordPress dependencies
18
- */
19
-
20
- /**
21
- * Internal dependencies
22
- */
23
-
24
- const HR = ({
25
- getStylesFromColorScheme,
26
- lineStyle,
27
- marginLeft,
28
- marginRight,
29
- style,
30
- textStyle,
31
- text,
32
- ...props
33
- }) => {
34
- const renderLine = key => /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
35
- style: [getStylesFromColorScheme(_styles.default.line, _styles.default.lineDark), lineStyle]
36
- }, key);
37
- const renderText = key => /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
38
- style: _styles.default.textContainer,
39
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
40
- style: [_styles.default.text, textStyle],
41
- children: text
42
- })
43
- }, key);
44
- const renderInner = () => {
45
- if (!text) {
46
- return renderLine();
47
- }
48
- return [renderLine(1), renderText(2), renderLine(3)];
49
- };
50
- return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
51
- style: [_styles.default.container, {
52
- marginLeft,
53
- marginRight
54
- }, style],
55
- ...props,
56
- children: renderInner()
57
- });
58
- };
59
- const HorizontalRule = exports.HorizontalRule = (0, _compose.withPreferredColorScheme)(HR);
60
- //# sourceMappingURL=index.native.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["_reactNative","require","_compose","_styles","_interopRequireDefault","_jsxRuntime","HR","getStylesFromColorScheme","lineStyle","marginLeft","marginRight","style","textStyle","text","props","renderLine","key","jsx","View","styles","line","lineDark","renderText","textContainer","children","Text","renderInner","container","HorizontalRule","exports","withPreferredColorScheme"],"sources":["@wordpress/primitives/src/horizontal-rule/index.native.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport { Text, View } from 'react-native';\n\n/**\n * WordPress dependencies\n */\nimport { withPreferredColorScheme } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport styles from './styles.scss';\n\nconst HR = ( {\n\tgetStylesFromColorScheme,\n\tlineStyle,\n\tmarginLeft,\n\tmarginRight,\n\tstyle,\n\ttextStyle,\n\ttext,\n\t...props\n} ) => {\n\tconst renderLine = ( key ) => (\n\t\t<View\n\t\t\tkey={ key }\n\t\t\tstyle={ [\n\t\t\t\tgetStylesFromColorScheme( styles.line, styles.lineDark ),\n\t\t\t\tlineStyle,\n\t\t\t] }\n\t\t/>\n\t);\n\n\tconst renderText = ( key ) => (\n\t\t<View key={ key } style={ styles.textContainer }>\n\t\t\t<Text style={ [ styles.text, textStyle ] }>{ text }</Text>\n\t\t</View>\n\t);\n\n\tconst renderInner = () => {\n\t\tif ( ! text ) {\n\t\t\treturn renderLine();\n\t\t}\n\t\treturn [ renderLine( 1 ), renderText( 2 ), renderLine( 3 ) ];\n\t};\n\n\treturn (\n\t\t<View\n\t\t\tstyle={ [ styles.container, { marginLeft, marginRight }, style ] }\n\t\t\t{ ...props }\n\t\t>\n\t\t\t{ renderInner() }\n\t\t</View>\n\t);\n};\n\nexport const HorizontalRule = withPreferredColorScheme( HR );\n"],"mappings":";;;;;;;AAGA,IAAAA,YAAA,GAAAC,OAAA;AAKA,IAAAC,QAAA,GAAAD,OAAA;AAKA,IAAAE,OAAA,GAAAC,sBAAA,CAAAH,OAAA;AAAmC,IAAAI,WAAA,GAAAJ,OAAA;AAbnC;AACA;AACA;;AAGA;AACA;AACA;;AAGA;AACA;AACA;;AAGA,MAAMK,EAAE,GAAGA,CAAE;EACZC,wBAAwB;EACxBC,SAAS;EACTC,UAAU;EACVC,WAAW;EACXC,KAAK;EACLC,SAAS;EACTC,IAAI;EACJ,GAAGC;AACJ,CAAC,KAAM;EACN,MAAMC,UAAU,GAAKC,GAAG,iBACvB,IAAAX,WAAA,CAAAY,GAAA,EAACjB,YAAA,CAAAkB,IAAI;IAEJP,KAAK,EAAG,CACPJ,wBAAwB,CAAEY,eAAM,CAACC,IAAI,EAAED,eAAM,CAACE,QAAS,CAAC,EACxDb,SAAS;EACP,GAJGQ,GAKN,CACD;EAED,MAAMM,UAAU,GAAKN,GAAG,iBACvB,IAAAX,WAAA,CAAAY,GAAA,EAACjB,YAAA,CAAAkB,IAAI;IAAaP,KAAK,EAAGQ,eAAM,CAACI,aAAe;IAAAC,QAAA,eAC/C,IAAAnB,WAAA,CAAAY,GAAA,EAACjB,YAAA,CAAAyB,IAAI;MAACd,KAAK,EAAG,CAAEQ,eAAM,CAACN,IAAI,EAAED,SAAS,CAAI;MAAAY,QAAA,EAAGX;IAAI,CAAQ;EAAC,GAD/CG,GAEN,CACN;EAED,MAAMU,WAAW,GAAGA,CAAA,KAAM;IACzB,IAAK,CAAEb,IAAI,EAAG;MACb,OAAOE,UAAU,CAAC,CAAC;IACpB;IACA,OAAO,CAAEA,UAAU,CAAE,CAAE,CAAC,EAAEO,UAAU,CAAE,CAAE,CAAC,EAAEP,UAAU,CAAE,CAAE,CAAC,CAAE;EAC7D,CAAC;EAED,oBACC,IAAAV,WAAA,CAAAY,GAAA,EAACjB,YAAA,CAAAkB,IAAI;IACJP,KAAK,EAAG,CAAEQ,eAAM,CAACQ,SAAS,EAAE;MAAElB,UAAU;MAAEC;IAAY,CAAC,EAAEC,KAAK,CAAI;IAAA,GAC7DG,KAAK;IAAAU,QAAA,EAERE,WAAW,CAAC;EAAC,CACV,CAAC;AAET,CAAC;AAEM,MAAME,cAAc,GAAAC,OAAA,CAAAD,cAAA,GAAG,IAAAE,iCAAwB,EAAExB,EAAG,CAAC","ignoreList":[]}
@@ -1,126 +0,0 @@
1
- "use strict";
2
-
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
- Object.defineProperty(exports, "__esModule", {
5
- value: true
6
- });
7
- Object.defineProperty(exports, "Circle", {
8
- enumerable: true,
9
- get: function () {
10
- return _reactNativeSvg.Circle;
11
- }
12
- });
13
- Object.defineProperty(exports, "Defs", {
14
- enumerable: true,
15
- get: function () {
16
- return _reactNativeSvg.Defs;
17
- }
18
- });
19
- Object.defineProperty(exports, "G", {
20
- enumerable: true,
21
- get: function () {
22
- return _reactNativeSvg.G;
23
- }
24
- });
25
- Object.defineProperty(exports, "Line", {
26
- enumerable: true,
27
- get: function () {
28
- return _reactNativeSvg.Line;
29
- }
30
- });
31
- Object.defineProperty(exports, "LinearGradient", {
32
- enumerable: true,
33
- get: function () {
34
- return _reactNativeSvg.LinearGradient;
35
- }
36
- });
37
- Object.defineProperty(exports, "Path", {
38
- enumerable: true,
39
- get: function () {
40
- return _reactNativeSvg.Path;
41
- }
42
- });
43
- Object.defineProperty(exports, "Polygon", {
44
- enumerable: true,
45
- get: function () {
46
- return _reactNativeSvg.Polygon;
47
- }
48
- });
49
- Object.defineProperty(exports, "RadialGradient", {
50
- enumerable: true,
51
- get: function () {
52
- return _reactNativeSvg.RadialGradient;
53
- }
54
- });
55
- Object.defineProperty(exports, "Rect", {
56
- enumerable: true,
57
- get: function () {
58
- return _reactNativeSvg.Rect;
59
- }
60
- });
61
- exports.SVG = void 0;
62
- Object.defineProperty(exports, "Stop", {
63
- enumerable: true,
64
- get: function () {
65
- return _reactNativeSvg.Stop;
66
- }
67
- });
68
- Object.defineProperty(exports, "SvgXml", {
69
- enumerable: true,
70
- get: function () {
71
- return _reactNativeSvg.SvgXml;
72
- }
73
- });
74
- var _reactNativeSvg = require("react-native-svg");
75
- var _reactNative = require("react-native");
76
- var _element = require("@wordpress/element");
77
- var _compose = require("@wordpress/compose");
78
- var _style = _interopRequireDefault(require("./style.scss"));
79
- var _jsxRuntime = require("react/jsx-runtime");
80
- /**
81
- * External dependencies
82
- */
83
-
84
- /**
85
- * WordPress dependencies
86
- */
87
-
88
- /**
89
- * Internal dependencies
90
- */
91
-
92
- const AnimatedSvg = _reactNative.Animated.createAnimatedComponent((0, _element.forwardRef)((props, ref) => /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeSvg.Svg, {
93
- ref: ref,
94
- ...props
95
- })));
96
- const SVG = ({
97
- className = '',
98
- isPressed,
99
- animated = false,
100
- ...props
101
- }) => {
102
- const colorScheme = (0, _compose.usePreferredColorScheme)();
103
- const stylesFromClasses = className.split(' ').map(element => _style.default[element]).filter(Boolean);
104
- const defaultStyle = isPressed ? _style.default[`is-pressed--${colorScheme}`] : _style.default['components-toolbar__control-' + colorScheme];
105
- const propStyle = Array.isArray(props.style) ? props.style.reduce((acc, el) => {
106
- return {
107
- ...acc,
108
- ...el
109
- };
110
- }, {}) : props.style;
111
- const styleValues = Object.assign({}, defaultStyle, propStyle, ...stylesFromClasses);
112
- const appliedProps = {
113
- ...props,
114
- style: styleValues
115
- };
116
- const SvgWrapper = animated ? AnimatedSvg : _reactNativeSvg.Svg;
117
- return /*#__PURE__*/(0, _jsxRuntime.jsx)(SvgWrapper
118
- // We want to re-render when style color is changed.
119
- , {
120
- height: "100%",
121
- width: "100%",
122
- ...appliedProps
123
- }, appliedProps.style.color);
124
- };
125
- exports.SVG = SVG;
126
- //# sourceMappingURL=index.native.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["_reactNativeSvg","require","_reactNative","_element","_compose","_style","_interopRequireDefault","_jsxRuntime","AnimatedSvg","Animated","createAnimatedComponent","forwardRef","props","ref","jsx","Svg","SVG","className","isPressed","animated","colorScheme","usePreferredColorScheme","stylesFromClasses","split","map","element","styles","filter","Boolean","defaultStyle","propStyle","Array","isArray","style","reduce","acc","el","styleValues","Object","assign","appliedProps","SvgWrapper","height","width","color","exports"],"sources":["@wordpress/primitives/src/svg/index.native.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport { Svg } from 'react-native-svg';\nimport { Animated } from 'react-native';\n\n/**\n * WordPress dependencies\n */\nimport { forwardRef } from '@wordpress/element';\nimport { usePreferredColorScheme } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport styles from './style.scss';\n\nexport {\n\tCircle,\n\tG,\n\tPath,\n\tPolygon,\n\tRect,\n\tDefs,\n\tRadialGradient,\n\tLinearGradient,\n\tStop,\n\tLine,\n\tSvgXml,\n} from 'react-native-svg';\n\nconst AnimatedSvg = Animated.createAnimatedComponent(\n\tforwardRef( ( props, ref ) => <Svg ref={ ref } { ...props } /> )\n);\n\nexport const SVG = ( {\n\tclassName = '',\n\tisPressed,\n\tanimated = false,\n\t...props\n} ) => {\n\tconst colorScheme = usePreferredColorScheme();\n\tconst stylesFromClasses = className\n\t\t.split( ' ' )\n\t\t.map( ( element ) => styles[ element ] )\n\t\t.filter( Boolean );\n\tconst defaultStyle = isPressed\n\t\t? styles[ `is-pressed--${ colorScheme }` ]\n\t\t: styles[ 'components-toolbar__control-' + colorScheme ];\n\tconst propStyle = Array.isArray( props.style )\n\t\t? props.style.reduce( ( acc, el ) => {\n\t\t\t\treturn { ...acc, ...el };\n\t\t }, {} )\n\t\t: props.style;\n\tconst styleValues = Object.assign(\n\t\t{},\n\t\tdefaultStyle,\n\t\tpropStyle,\n\t\t...stylesFromClasses\n\t);\n\n\tconst appliedProps = { ...props, style: styleValues };\n\n\tconst SvgWrapper = animated ? AnimatedSvg : Svg;\n\n\treturn (\n\t\t<SvgWrapper\n\t\t\t// We want to re-render when style color is changed.\n\t\t\tkey={ appliedProps.style.color }\n\t\t\theight=\"100%\"\n\t\t\twidth=\"100%\"\n\t\t\t{ ...appliedProps }\n\t\t/>\n\t);\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGA,IAAAA,eAAA,GAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AAKA,IAAAE,QAAA,GAAAF,OAAA;AACA,IAAAG,QAAA,GAAAH,OAAA;AAKA,IAAAI,MAAA,GAAAC,sBAAA,CAAAL,OAAA;AAAkC,IAAAM,WAAA,GAAAN,OAAA;AAflC;AACA;AACA;;AAIA;AACA;AACA;;AAIA;AACA;AACA;;AAiBA,MAAMO,WAAW,GAAGC,qBAAQ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AA,EAAC2B;EACA;EAAA;IAEAC,MAAM,EAAC,MAAM;IACbC,KAAK,EAAC,MAAM;IAAA,GACPH;EAAY,GAHXA,YAAY,CAACP,KAAK,CAACW,KAIzB,CAAC;AAEJ,CAAC;AAACC,OAAA,CAAA7B,GAAA,GAAAA,GAAA","ignoreList":[]}
@@ -1,13 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- Object.defineProperty(exports, "View", {
7
- enumerable: true,
8
- get: function () {
9
- return _reactNative.View;
10
- }
11
- });
12
- var _reactNative = require("react-native");
13
- //# sourceMappingURL=index.native.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["_reactNative","require"],"sources":["@wordpress/primitives/src/view/index.native.js"],"sourcesContent":["/**\n * External dependencies\n */\nexport { View } from 'react-native';\n"],"mappings":";;;;;;;;;;;AAGA,IAAAA,YAAA,GAAAC,OAAA","ignoreList":[]}
@@ -1,57 +0,0 @@
1
- /**
2
- * External dependencies
3
- */
4
- import { View } from 'react-native';
5
- /**
6
- * WordPress dependencies
7
- */
8
- import { Children, cloneElement, forwardRef } from '@wordpress/element';
9
- import { usePreferredColorSchemeStyle } from '@wordpress/compose';
10
- /**
11
- * Internal dependencies
12
- */
13
- import styles from './style.scss';
14
- import { jsx as _jsx } from "react/jsx-runtime";
15
- export const BlockQuotation = forwardRef(({
16
- ...props
17
- }, ref) => {
18
- const {
19
- style
20
- } = props;
21
- const blockQuoteStyle = [usePreferredColorSchemeStyle(styles.wpBlockQuoteLight, styles.wpBlockQuoteDark), style?.baseColors?.color?.text && {
22
- borderLeftColor: style.baseColors.color.text
23
- }, style?.color && {
24
- borderLeftColor: style.color
25
- }, style, style?.backgroundColor && styles.paddingWithBackground];
26
- const colorStyle = style?.color ? {
27
- color: style.color
28
- } : {};
29
- const newChildren = Children.map(props.children, child => {
30
- const {
31
- identifier,
32
- attributeKey
33
- } = child?.props || {};
34
- const identifierKey = identifier !== null && identifier !== void 0 ? identifier : attributeKey;
35
- if (identifierKey === 'citation') {
36
- return cloneElement(child, {
37
- style: {
38
- ...styles.wpBlockQuoteCitation,
39
- ...colorStyle
40
- }
41
- });
42
- }
43
- if (child && child.props.identifier === 'value') {
44
- return cloneElement(child, {
45
- tagsToEliminate: ['div'],
46
- style: colorStyle
47
- });
48
- }
49
- return child;
50
- });
51
- return /*#__PURE__*/_jsx(View, {
52
- ref: ref,
53
- style: blockQuoteStyle,
54
- children: newChildren
55
- });
56
- });
57
- //# sourceMappingURL=index.native.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["View","Children","cloneElement","forwardRef","usePreferredColorSchemeStyle","styles","jsx","_jsx","BlockQuotation","props","ref","style","blockQuoteStyle","wpBlockQuoteLight","wpBlockQuoteDark","baseColors","color","text","borderLeftColor","backgroundColor","paddingWithBackground","colorStyle","newChildren","map","children","child","identifier","attributeKey","identifierKey","wpBlockQuoteCitation","tagsToEliminate"],"sources":["@wordpress/primitives/src/block-quotation/index.native.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport { View } from 'react-native';\n/**\n * WordPress dependencies\n */\nimport { Children, cloneElement, forwardRef } from '@wordpress/element';\nimport { usePreferredColorSchemeStyle } from '@wordpress/compose';\n/**\n * Internal dependencies\n */\nimport styles from './style.scss';\n\nexport const BlockQuotation = forwardRef( ( { ...props }, ref ) => {\n\tconst { style } = props;\n\n\tconst blockQuoteStyle = [\n\t\tusePreferredColorSchemeStyle(\n\t\t\tstyles.wpBlockQuoteLight,\n\t\t\tstyles.wpBlockQuoteDark\n\t\t),\n\t\tstyle?.baseColors?.color?.text && {\n\t\t\tborderLeftColor: style.baseColors.color.text,\n\t\t},\n\t\tstyle?.color && {\n\t\t\tborderLeftColor: style.color,\n\t\t},\n\t\tstyle,\n\t\tstyle?.backgroundColor && styles.paddingWithBackground,\n\t];\n\tconst colorStyle = style?.color ? { color: style.color } : {};\n\n\tconst newChildren = Children.map( props.children, ( child ) => {\n\t\tconst { identifier, attributeKey } = child?.props || {};\n\t\tconst identifierKey = identifier ?? attributeKey;\n\n\t\tif ( identifierKey === 'citation' ) {\n\t\t\treturn cloneElement( child, {\n\t\t\t\tstyle: {\n\t\t\t\t\t...styles.wpBlockQuoteCitation,\n\t\t\t\t\t...colorStyle,\n\t\t\t\t},\n\t\t\t} );\n\t\t}\n\t\tif ( child && child.props.identifier === 'value' ) {\n\t\t\treturn cloneElement( child, {\n\t\t\t\ttagsToEliminate: [ 'div' ],\n\t\t\t\tstyle: colorStyle,\n\t\t\t} );\n\t\t}\n\t\treturn child;\n\t} );\n\treturn (\n\t\t<View ref={ ref } style={ blockQuoteStyle }>\n\t\t\t{ newChildren }\n\t\t</View>\n\t);\n} );\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,IAAI,QAAQ,cAAc;AACnC;AACA;AACA;AACA,SAASC,QAAQ,EAAEC,YAAY,EAAEC,UAAU,QAAQ,oBAAoB;AACvE,SAASC,4BAA4B,QAAQ,oBAAoB;AACjE;AACA;AACA;AACA,OAAOC,MAAM,MAAM,cAAc;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAElC,OAAO,MAAMC,cAAc,GAAGL,UAAU,CAAE,CAAE;EAAE,GAAGM;AAAM,CAAC,EAAEC,GAAG,KAAM;EAClE,MAAM;IAAEC;EAAM,CAAC,GAAGF,KAAK;EAEvB,MAAMG,eAAe,GAAG,CACvBR,4BAA4B,CAC3BC,MAAM,CAACQ,iBAAiB,EACxBR,MAAM,CAACS,gBACR,CAAC,EACDH,KAAK,EAAEI,UAAU,EAAEC,KAAK,EAAEC,IAAI,IAAI;IACjCC,eAAe,EAAEP,KAAK,CAACI,UAAU,CAACC,KAAK,CAACC;EACzC,CAAC,EACDN,KAAK,EAAEK,KAAK,IAAI;IACfE,eAAe,EAAEP,KAAK,CAACK;EACxB,CAAC,EACDL,KAAK,EACLA,KAAK,EAAEQ,eAAe,IAAId,MAAM,CAACe,qBAAqB,CACtD;EACD,MAAMC,UAAU,GAAGV,KAAK,EAAEK,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