@wordpress/primitives 3.56.0 → 4.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -2,6 +2,12 @@
2
2
 
3
3
  ## Unreleased
4
4
 
5
+ ## 4.0.0 (2024-05-31)
6
+
7
+ ### Breaking Changes
8
+
9
+ - Increase the minimum required Node.js version to v18.12.0 matching long-term support releases ([#31270](https://github.com/WordPress/gutenberg/pull/61930)). Learn more about [Node.js releases](https://nodejs.org/en/about/previous-releases).
10
+
5
11
  ## 3.56.0 (2024-05-16)
6
12
 
7
13
  ### Internal
@@ -5,11 +5,11 @@ Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
7
  exports.BlockQuotation = void 0;
8
- var _react = require("react");
9
8
  var _reactNative = require("react-native");
10
9
  var _element = require("@wordpress/element");
11
10
  var _compose = require("@wordpress/compose");
12
11
  var _style = _interopRequireDefault(require("./style.scss"));
12
+ var _jsxRuntime = require("react/jsx-runtime");
13
13
  /**
14
14
  * External dependencies
15
15
  */
@@ -58,9 +58,10 @@ const BlockQuotation = exports.BlockQuotation = (0, _element.forwardRef)(({
58
58
  }
59
59
  return child;
60
60
  });
61
- return (0, _react.createElement)(_reactNative.View, {
61
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
62
62
  ref: ref,
63
- style: blockQuoteStyle
64
- }, newChildren);
63
+ style: blockQuoteStyle,
64
+ children: newChildren
65
+ });
65
66
  });
66
67
  //# sourceMappingURL=index.native.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["_reactNative","require","_element","_compose","_style","_interopRequireDefault","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","_react","createElement","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,IAA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,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,OACC,IAAAO,MAAA,CAAAC,aAAA,EAACpC,YAAA,CAAAqC,IAAI;IAAC3B,GAAG,EAAGA,GAAK;IAACC,KAAK,EAAGC;EAAiB,GACxCY,WACG,CAAC;AAET,CAAE,CAAC","ignoreList":[]}
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":[]}
@@ -5,10 +5,10 @@ Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
7
  exports.HorizontalRule = void 0;
8
- var _react = require("react");
9
8
  var _reactNative = require("react-native");
10
9
  var _compose = require("@wordpress/compose");
11
10
  var _styles = _interopRequireDefault(require("./styles.scss"));
11
+ var _jsxRuntime = require("react/jsx-runtime");
12
12
  /**
13
13
  * External dependencies
14
14
  */
@@ -31,29 +31,30 @@ const HR = ({
31
31
  text,
32
32
  ...props
33
33
  }) => {
34
- const renderLine = key => (0, _react.createElement)(_reactNative.View, {
35
- key: key,
34
+ const renderLine = key => /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
36
35
  style: [getStylesFromColorScheme(_styles.default.line, _styles.default.lineDark), lineStyle]
37
- });
38
- const renderText = key => (0, _react.createElement)(_reactNative.View, {
39
- key: key,
40
- style: _styles.default.textContainer
41
- }, (0, _react.createElement)(_reactNative.Text, {
42
- style: [_styles.default.text, textStyle]
43
- }, text));
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
44
  const renderInner = () => {
45
45
  if (!text) {
46
46
  return renderLine();
47
47
  }
48
48
  return [renderLine(1), renderText(2), renderLine(3)];
49
49
  };
50
- return (0, _react.createElement)(_reactNative.View, {
50
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
51
51
  style: [_styles.default.container, {
52
52
  marginLeft,
53
53
  marginRight
54
54
  }, style],
55
- ...props
56
- }, renderInner());
55
+ ...props,
56
+ children: renderInner()
57
+ });
57
58
  };
58
59
  const HorizontalRule = exports.HorizontalRule = (0, _compose.withPreferredColorScheme)(HR);
59
60
  //# sourceMappingURL=index.native.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["_reactNative","require","_compose","_styles","_interopRequireDefault","HR","getStylesFromColorScheme","lineStyle","marginLeft","marginRight","style","textStyle","text","props","renderLine","key","_react","createElement","View","styles","line","lineDark","renderText","textContainer","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;AAbA;AACA;AACA;;AAGA;AACA;AACA;;AAGA;AACA;AACA;;AAGA,MAAMI,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,IACvB,IAAAC,MAAA,CAAAC,aAAA,EAACjB,YAAA,CAAAkB,IAAI;IACJH,GAAG,EAAGA,GAAK;IACXL,KAAK,EAAG,CACPJ,wBAAwB,CAAEa,eAAM,CAACC,IAAI,EAAED,eAAM,CAACE,QAAS,CAAC,EACxDd,SAAS;EACP,CACH,CACD;EAED,MAAMe,UAAU,GAAKP,GAAG,IACvB,IAAAC,MAAA,CAAAC,aAAA,EAACjB,YAAA,CAAAkB,IAAI;IAACH,GAAG,EAAGA,GAAK;IAACL,KAAK,EAAGS,eAAM,CAACI;EAAe,GAC/C,IAAAP,MAAA,CAAAC,aAAA,EAACjB,YAAA,CAAAwB,IAAI;IAACd,KAAK,EAAG,CAAES,eAAM,CAACP,IAAI,EAAED,SAAS;EAAI,GAAGC,IAAY,CACpD,CACN;EAED,MAAMa,WAAW,GAAGA,CAAA,KAAM;IACzB,IAAK,CAAEb,IAAI,EAAG;MACb,OAAOE,UAAU,CAAC,CAAC;IACpB;IACA,OAAO,CAAEA,UAAU,CAAE,CAAE,CAAC,EAAEQ,UAAU,CAAE,CAAE,CAAC,EAAER,UAAU,CAAE,CAAE,CAAC,CAAE;EAC7D,CAAC;EAED,OACC,IAAAE,MAAA,CAAAC,aAAA,EAACjB,YAAA,CAAAkB,IAAI;IACJR,KAAK,EAAG,CAAES,eAAM,CAACO,SAAS,EAAE;MAAElB,UAAU;MAAEC;IAAY,CAAC,EAAEC,KAAK,CAAI;IAAA,GAC7DG;EAAK,GAERY,WAAW,CAAC,CACT,CAAC;AAET,CAAC;AAEM,MAAME,cAAc,GAAAC,OAAA,CAAAD,cAAA,GAAG,IAAAE,iCAAwB,EAAExB,EAAG,CAAC","ignoreList":[]}
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":[]}
@@ -7,6 +7,7 @@ Object.defineProperty(exports, "__esModule", {
7
7
  exports.Stop = exports.SVG = exports.Rect = exports.RadialGradient = exports.Polygon = exports.Path = exports.LinearGradient = exports.Line = exports.G = exports.Defs = exports.Circle = void 0;
8
8
  var _clsx = _interopRequireDefault(require("clsx"));
9
9
  var _element = require("@wordpress/element");
10
+ var _jsxRuntime = require("react/jsx-runtime");
10
11
  /**
11
12
  * External dependencies
12
13
  */
@@ -120,7 +121,7 @@ const SVG = exports.SVG = (0, _element.forwardRef)(
120
121
 
121
122
  // Disable reason: We need to have a way to render HTML tag for web.
122
123
  // eslint-disable-next-line react/forbid-elements
123
- return (0, _element.createElement)("svg", {
124
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)("svg", {
124
125
  ...appliedProps,
125
126
  ref: ref
126
127
  });
@@ -1 +1 @@
1
- {"version":3,"names":["_clsx","_interopRequireDefault","require","_element","Circle","props","createElement","exports","G","Line","Path","Polygon","Rect","Defs","RadialGradient","LinearGradient","Stop","SVG","forwardRef","className","isPressed","ref","appliedProps","clsx","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":";;;;;;;AAGA,IAAAA,KAAA,GAAAC,sBAAA,CAAAC,OAAA;AAKA,IAAAC,QAAA,GAAAD,OAAA;AARA;AACA;AACA;;AAGA;AACA;AACA;;AAGA;;AAEA;AACA;AACA;AACA;AACA;AACO,MAAME,MAAM,GAAKC,K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EAAE,gBAAgB,EAAED,KAAM,CAAC;;AAEzC;AACA;AACA;AACA;AACA;AAJAE,OAAA,CAAAQ,cAAA,GAAAA,cAAA;AAKO,MAAMC,IAAI,GAAKX,KAAK,IAAM,IAAAC,sBAAa,EAAE,MAAM,EAAED,KAAM,CAAC;AAACE,OAAA,CAAAS,IAAA,GAAAA,IAAA;AAEzD,MAAMC,GAAG,GAAAV,OAAA,CAAAU,GAAA,GAAG,IAAAC,mBAAU;AAC5B;AACD;AACA;AACA;AACA;AACA;AACA;AACC,CAAE;EAAEC,SAAS;EAAEC,SAAS;EAAE,GAAGf;AAAM,CAAC,EAAEgB,GAAG,KAAM;EAC9C,MAAMC,YAAY,GAAG;IACpB,GAAGjB,KAAK;IACRc,SAAS,EACR,IAAAI,aAAI,EAAEJ,SAAS,EAAE;MAAE,YAAY,EAAEC;IAAU,CAAE,CAAC,IAAII,SAAS;IAC5D,aAAa,EAAE,IAAI;IACnBC,SAAS,EAAE;EACZ,CAAC;;EAED;EACA;EACA,OAAO,IAAAtB,QAAA,CAAAG,aAAA;IAAA,GAAUgB,YAAY;IAAGD,GAAG,EAAGA;EAAK,CAAE,CAAC;AAC/C,CACD,CAAC;AACDJ,GAAG,CAACS,WAAW,GAAG,KAAK","ignoreList":[]}
1
+ {"version":3,"names":["_clsx","_interopRequireDefault","require","_element","_jsxRuntime","Circle","props","createElement","exports","G","Line","Path","Polygon","Rect","Defs","RadialGradient","LinearGradient","Stop","SVG","forwardRef","className","isPressed","ref","appliedProps","clsx","undefined","focusable","jsx","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":";;;;;;;AAGA,IAAAA,KAAA,GAAAC,sBAAA,CAAAC,OAAA;AAKA,IAAAC,QAAA,GAAAD,OAAA;AAA+D,IAAAE,WAAA,GAAAF,OAAA;AAR/D;AACA;AACA;;AAGA;AACA;AACA;;AAGA;;AAEA;AACA;AACA;AACA;AACA;AACO,MAAMG,MAAM,GAAKC,KAAK,IAAM,IAAAC,sBAAa,EAAE,QAAQ,EAAED,KAAM,CAAC;;AAEnE;AACA;AACA;AACA;AACA;AAJAE,OAAA,CAAAH,MAAA,GAAAA,MAAA;AAKO,MAAMI,CAAC,GAAKH,KAAK,IAAM,IAAAC,sBAAa,EAAE,GAAG,EAAED,KAAM,CAAC;;AAEzD;AACA;AACA;AACA;AACA;AAJAE,OAAA,CAAAC,CAAA,GAAAA,CAAA;AAKO,MAAMC,IAAI,GAAKJ,KAAK,IAAM,IAAAC,sBAAa,EAAE,MAAM,EAAED,KAAM,CAAC;;AAE/D;AACA;AACA;AACA;AACA;AAJAE,OAAA,CAAAE,IAAA,GAAAA,IAAA;AAKO,MAAMC,IAAI,GAAKL,KAAK,IAAM,IAAAC,sBAAa,EAAE,MAAM,EAAED,KAAM,CAAC;;AAE/D;AACA;AACA;AACA;AACA;AAJAE,OAAA,CAAAG,IAAA,GAAAA,IAAA;AAKO,MAAMC,OAAO,GAAKN,KAAK,IAAM,IAAAC,sBAAa,EAAE,SAAS,EAAED,KAAM,CAAC;;AAErE;AACA;AACA;AACA;AACA;AAJAE,OAAA,CAAAI,OAAA,GAAAA,OAAA;AAKO,MAAMC,IAAI,GAAKP,KAAK,IAAM,IAAAC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G,KAAK","ignoreList":[]}
@@ -71,12 +71,12 @@ Object.defineProperty(exports, "SvgXml", {
71
71
  return _reactNativeSvg.SvgXml;
72
72
  }
73
73
  });
74
- var _react = require("react");
75
74
  var _reactNativeSvg = require("react-native-svg");
76
75
  var _reactNative = require("react-native");
77
76
  var _element = require("@wordpress/element");
78
77
  var _compose = require("@wordpress/compose");
79
78
  var _style = _interopRequireDefault(require("./style.scss"));
79
+ var _jsxRuntime = require("react/jsx-runtime");
80
80
  /**
81
81
  * External dependencies
82
82
  */
@@ -89,7 +89,7 @@ var _style = _interopRequireDefault(require("./style.scss"));
89
89
  * Internal dependencies
90
90
  */
91
91
 
92
- const AnimatedSvg = _reactNative.Animated.createAnimatedComponent((0, _element.forwardRef)((props, ref) => (0, _react.createElement)(_reactNativeSvg.Svg, {
92
+ const AnimatedSvg = _reactNative.Animated.createAnimatedComponent((0, _element.forwardRef)((props, ref) => /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeSvg.Svg, {
93
93
  ref: ref,
94
94
  ...props
95
95
  })));
@@ -114,14 +114,13 @@ const SVG = ({
114
114
  style: styleValues
115
115
  };
116
116
  const SvgWrapper = animated ? AnimatedSvg : _reactNativeSvg.Svg;
117
- return (0, _react.createElement)(SvgWrapper
117
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(SvgWrapper
118
118
  // We want to re-render when style color is changed.
119
119
  , {
120
- key: appliedProps.style.color,
121
120
  height: "100%",
122
121
  width: "100%",
123
122
  ...appliedProps
124
- });
123
+ }, appliedProps.style.color);
125
124
  };
126
125
  exports.SVG = SVG;
127
126
  //# sourceMappingURL=index.native.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["_reactNativeSvg","require","_reactNative","_element","_compose","_style","_interopRequireDefault","AnimatedSvg","Animated","createAnimatedComponent","forwardRef","props","ref","_react","createElement","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","key","color","height","width","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":";;;;;;;;;;;;;;;;;;;;;;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C,GACPzB,KAAK,CAACsB,KAAK;EACd,MAAMI,WAAW,GAAGC,MAAM,CAACC,MAAM,CAChC,CAAC,CAAC,EACFV,YAAY,EACZC,SAAS,EACT,GAAGR,iBACJ,CAAC;EAED,MAAMkB,YAAY,GAAG;IAAE,GAAG7B,KAAK;IAAEsB,KAAK,EAAEI;EAAY,CAAC;EAErD,MAAMI,UAAU,GAAGtB,QAAQ,GAAGZ,WAAW,GAAGQ,mBAAG;EAE/C,OACC,IAAAF,MAAA,CAAAC,aAAA,EAAC2B;EACA;EAAA;IACAC,GAAG,EAAGF,YAAY,CAACP,KAAK,CAACU,KAAO;IAChCC,MAAM,EAAC,MAAM;IACbC,KAAK,EAAC,MAAM;IAAA,GACPL;EAAY,CACjB,CAAC;AAEJ,CAAC;AAACM,OAAA,CAAA9B,GAAA,GAAAA,GAAA","ignoreList":[]}
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,CAACC,uBAAuB,CACnD,IAAAC,mBAAU,EAAE,CAAEC,KAAK,EAAEC,GAAG,kBAAM,IAAAN,WAAA,CAAAO,GAAA,EAACd,eAAA,CAAAe,GAAG;EA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AC;AAEJ,CAAC;AAACC,OAAA,CAAA7B,GAAA,GAAAA,GAAA","ignoreList":[]}
@@ -1,4 +1,3 @@
1
- import { createElement } from "react";
2
1
  /**
3
2
  * External dependencies
4
3
  */
@@ -12,6 +11,7 @@ import { usePreferredColorSchemeStyle } from '@wordpress/compose';
12
11
  * Internal dependencies
13
12
  */
14
13
  import styles from './style.scss';
14
+ import { jsx as _jsx } from "react/jsx-runtime";
15
15
  export const BlockQuotation = forwardRef(({
16
16
  ...props
17
17
  }, ref) => {
@@ -48,9 +48,10 @@ export const BlockQuotation = forwardRef(({
48
48
  }
49
49
  return child;
50
50
  });
51
- return createElement(View, {
51
+ return /*#__PURE__*/_jsx(View, {
52
52
  ref: ref,
53
- style: blockQuoteStyle
54
- }, newChildren);
53
+ style: blockQuoteStyle,
54
+ children: newChildren
55
+ });
55
56
  });
56
57
  //# sourceMappingURL=index.native.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["View","Children","cloneElement","forwardRef","usePreferredColorSchemeStyle","styles","BlockQuotation","props","ref","style","blockQuoteStyle","wpBlockQuoteLight","wpBlockQuoteDark","baseColors","color","text","borderLeftColor","backgroundColor","paddingWithBackground","colorStyle","newChildren","map","children","child","identifier","attributeKey","identifierKey","wpBlockQuoteCitation","tagsToEliminate","createElement"],"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;AAEjC,OAAO,MAAMC,cAAc,GAAGH,UAAU,CAAE,CAAE;EAAE,GAAGI;AAAM,CAAC,EAAEC,GAAG,KAAM;EAClE,MAAM;IAAEC;EAAM,CAAC,GAAGF,KAAK;EAEvB,MAAMG,eAAe,GAAG,CACvBN,4BAA4B,CAC3BC,MAAM,CAACM,iBAAiB,EACxBN,MAAM,CAACO,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,IAAIZ,MAAM,CAACa,qBAAqB,CACtD;EACD,MAAMC,UAAU,GAAGV,KAAK,EAAEK,KAAK,GAAG;IAAEA,KAAK,EAAEL,KAAK,CAACK;EAAM,CAAC,GAAG,CAAC,CAAC;EAE7D,MAAMM,WAAW,GAAGnB,QAAQ,CAACoB,GAAG,CAAEd,KAAK,CAACe,QAAQ,EAAIC,KAAK,IAAM;IAC9D,MAAM;MAAEC,UAAU;MAAEC;IAAa,CAAC,GAAGF,KAAK,EAAEhB,KAAK,IAAI,CAAC,CAAC;IACvD,MAAMmB,aAAa,GAAGF,UAAU,aAAVA,UAAU,cAAVA,UAAU,GAAIC,YAAY;IAEhD,IAAKC,aAAa,KAAK,UAAU,EAAG;MACnC,OAAOxB,YAAY,CAAEqB,KAAK,EAAE;QAC3Bd,KAAK,EAAE;UACN,GAAGJ,MAAM,CAACsB,oBAAoB;UAC9B,GAAGR;QACJ;MACD,CAAE,CAAC;IACJ;IACA,IAAKI,KAAK,IAAIA,KAAK,CAAChB,KAAK,CAACiB,UAAU,KAAK,OAAO,EAAG;MAClD,OAAOtB,YAAY,CAAEqB,KAAK,EAAE;QAC3BK,eAAe,EAAE,CAAE,KAAK,CAAE;QAC1BnB,KAAK,EAAEU;MACR,CAAE,CAAC;IACJ;IACA,OAAOI,KAAK;EACb,CAAE,CAAC;EACH,OACCM,aAAA,CAAC7B,IAAI;IAACQ,GAAG,EAAGA,GAAK;IAACC,KAAK,EAAGC;EAAiB,GACxCU,WACG,CAAC;AAET,CAAE,CAAC","ignoreList":[]}
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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ACJ;IACA,IAAKI,KAAK,IAAIA,KAAK,CAAChB,KAAK,CAACiB,UAAU,KAAK,OAAO,EAAG;MAClD,OAAOxB,YAAY,CAAEuB,KAAK,EAAE;QAC3BK,eAAe,EAAE,CAAE,KAAK,CAAE;QAC1BnB,KAAK,EAAEU;MACR,CAAE,CAAC;IACJ;IACA,OAAOI,KAAK;EACb,CAAE,CAAC;EACH,oBACClB,IAAA,CAACP,IAAI;IAACU,GAAG,EAAGA,GAAK;IAACC,KAAK,EAAGC,eAAiB;IAAAY,QAAA,EACxCF;EAAW,CACR,CAAC;AAET,CAAE,CAAC","ignoreList":[]}
@@ -1,4 +1,3 @@
1
- import { createElement } from "react";
2
1
  /**
3
2
  * External dependencies
4
3
  */
@@ -13,6 +12,7 @@ import { withPreferredColorScheme } from '@wordpress/compose';
13
12
  * Internal dependencies
14
13
  */
15
14
  import styles from './styles.scss';
15
+ import { jsx as _jsx } from "react/jsx-runtime";
16
16
  const HR = ({
17
17
  getStylesFromColorScheme,
18
18
  lineStyle,
@@ -23,29 +23,30 @@ const HR = ({
23
23
  text,
24
24
  ...props
25
25
  }) => {
26
- const renderLine = key => createElement(View, {
27
- key: key,
26
+ const renderLine = key => /*#__PURE__*/_jsx(View, {
28
27
  style: [getStylesFromColorScheme(styles.line, styles.lineDark), lineStyle]
29
- });
30
- const renderText = key => createElement(View, {
31
- key: key,
32
- style: styles.textContainer
33
- }, createElement(Text, {
34
- style: [styles.text, textStyle]
35
- }, text));
28
+ }, key);
29
+ const renderText = key => /*#__PURE__*/_jsx(View, {
30
+ style: styles.textContainer,
31
+ children: /*#__PURE__*/_jsx(Text, {
32
+ style: [styles.text, textStyle],
33
+ children: text
34
+ })
35
+ }, key);
36
36
  const renderInner = () => {
37
37
  if (!text) {
38
38
  return renderLine();
39
39
  }
40
40
  return [renderLine(1), renderText(2), renderLine(3)];
41
41
  };
42
- return createElement(View, {
42
+ return /*#__PURE__*/_jsx(View, {
43
43
  style: [styles.container, {
44
44
  marginLeft,
45
45
  marginRight
46
46
  }, style],
47
- ...props
48
- }, renderInner());
47
+ ...props,
48
+ children: renderInner()
49
+ });
49
50
  };
50
51
  export const HorizontalRule = withPreferredColorScheme(HR);
51
52
  //# sourceMappingURL=index.native.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["Text","View","withPreferredColorScheme","styles","HR","getStylesFromColorScheme","lineStyle","marginLeft","marginRight","style","textStyle","text","props","renderLine","key","createElement","line","lineDark","renderText","textContainer","renderInner","container","HorizontalRule"],"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":";AAAA;AACA;AACA;AACA,SAASA,IAAI,EAAEC,IAAI,QAAQ,cA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x","HR","getStylesFromColorScheme","lineStyle","marginLeft","marginRight","style","textStyle","text","props","renderLine","key","line","lineDark","renderText","textContainer","children","renderInner","container","HorizontalRule"],"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":"AAAA;AACA;AACA;AACA,SAASA,IAAI,EAAEC,IAAI,QAAQ,cAAc;;AAEzC;AACA;AACA;AACA,SAASC,wBAAwB,QAAQ,oBAAoB;;AAE7D;AACA;AACA;AACA,OAAOC,MAAM,MAAM,eAAe;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAEnC,MAAMC,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,iBACvBX,IAAA,CAACJ,IAAI;IAEJU,KAAK,EAAG,CACPJ,wBAAwB,CAAEJ,MAAM,CAACc,IAAI,EAAEd,MAAM,CAACe,QAAS,CAAC,EACxDV,SAAS;EACP,GAJGQ,GAKN,CACD;EAED,MAAMG,UAAU,GAAKH,GAAG,iBACvBX,IAAA,CAACJ,IAAI;IAAaU,KAAK,EAAGR,MAAM,CAACiB,aAAe;IAAAC,QAAA,eAC/ChB,IAAA,CAACL,IAAI;MAACW,KAAK,EAAG,CAAER,MAAM,CAACU,IAAI,EAAED,SAAS,CAAI;MAAAS,QAAA,EAAGR;IAAI,CAAQ;EAAC,GAD/CG,GAEN,CACN;EAED,MAAMM,WAAW,GAAGA,CAAA,KAAM;IACzB,IAAK,CAAET,IAAI,EAAG;MACb,OAAOE,UAAU,CAAC,CAAC;IACpB;IACA,OAAO,CAAEA,UAAU,CAAE,CAAE,CAAC,EAAEI,UAAU,CAAE,CAAE,CAAC,EAAEJ,UAAU,CAAE,CAAE,CAAC,CAAE;EAC7D,CAAC;EAED,oBACCV,IAAA,CAACJ,IAAI;IACJU,KAAK,EAAG,CAAER,MAAM,CAACoB,SAAS,EAAE;MAAEd,UAAU;MAAEC;IAAY,CAAC,EAAEC,KAAK,CAAI;IAAA,GAC7DG,KAAK;IAAAO,QAAA,EAERC,WAAW,CAAC;EAAC,CACV,CAAC;AAET,CAAC;AAED,OAAO,MAAME,cAAc,GAAGtB,wBAAwB,CAAEI,EAAG,CAAC","ignoreList":[]}
@@ -15,6 +15,7 @@ import { createElement, forwardRef } from '@wordpress/element';
15
15
  *
16
16
  * @return {JSX.Element} Circle component
17
17
  */
18
+ import { jsx as _jsx } from "react/jsx-runtime";
18
19
  export const Circle = props => createElement('circle', props);
19
20
 
20
21
  /**
@@ -103,7 +104,7 @@ export const SVG = forwardRef(
103
104
 
104
105
  // Disable reason: We need to have a way to render HTML tag for web.
105
106
  // eslint-disable-next-line react/forbid-elements
106
- return createElement("svg", {
107
+ return /*#__PURE__*/_jsx("svg", {
107
108
  ...appliedProps,
108
109
  ref: ref
109
110
  });
@@ -1 +1 @@
1
- {"version":3,"names":["clsx","createElement","forwardRef","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;AACA,OAAO,MAAMC,MAAM,GAAKC,KAAK,IAAMH,aAAa,CAAE,QAAQ,EAAEG,KAAM,CAAC;;AAEnE;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,CAAC,GAAKD,KAAK,IAAMH,aAAa,CAAE,GAAG,EAAEG,KAAM,CAAC;;AAEzD;AACA;AACA;AACA;AACA;AACA,OAAO,MAAME,IAAI,GAAKF,KAAK,I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AG,EAAGA;EAAK,CAAE,CAAC;AAC/C,CACD,CAAC;AACDH,GAAG,CAACO,WAAW,GAAG,KAAK","ignoreList":[]}
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,OAAO,MAAMC,CAAC,GAAKD,KAAK,IAAML,aAAa,CAAE,GAAG,EAAEK,KAAM,CAAC;;AAEzD;AACA;AACA;AACA;AACA;AACA,OAAO,MAAME,IAAI,GAAKF,KAAK,IAAML,aAAa,CAAE,MAAM,EAAEK,KAAM,CAAC;;A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DH,GAAG,CAACO,WAAW,GAAG,KAAK","ignoreList":[]}
@@ -1,4 +1,3 @@
1
- import { createElement } from "react";
2
1
  /**
3
2
  * External dependencies
4
3
  */
@@ -15,8 +14,9 @@ import { usePreferredColorScheme } from '@wordpress/compose';
15
14
  * Internal dependencies
16
15
  */
17
16
  import styles from './style.scss';
17
+ import { jsx as _jsx } from "react/jsx-runtime";
18
18
  export { Circle, G, Path, Polygon, Rect, Defs, RadialGradient, LinearGradient, Stop, Line, SvgXml } from 'react-native-svg';
19
- const AnimatedSvg = Animated.createAnimatedComponent(forwardRef((props, ref) => createElement(Svg, {
19
+ const AnimatedSvg = Animated.createAnimatedComponent(forwardRef((props, ref) => /*#__PURE__*/_jsx(Svg, {
20
20
  ref: ref,
21
21
  ...props
22
22
  })));
@@ -41,13 +41,12 @@ export const SVG = ({
41
41
  style: styleValues
42
42
  };
43
43
  const SvgWrapper = animated ? AnimatedSvg : Svg;
44
- return createElement(SvgWrapper
44
+ return /*#__PURE__*/_jsx(SvgWrapper
45
45
  // We want to re-render when style color is changed.
46
46
  , {
47
- key: appliedProps.style.color,
48
47
  height: "100%",
49
48
  width: "100%",
50
49
  ...appliedProps
51
- });
50
+ }, appliedProps.style.color);
52
51
  };
53
52
  //# sourceMappingURL=index.native.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["Svg","Animated","forwardRef","usePreferredColorScheme","styles","Circle","G","Path","Polygon","Rect","Defs","RadialGradient","LinearGradient","Stop","Line","SvgXml","AnimatedSvg","createAnimatedComponent","props","ref","createElement","SVG","className","isPressed","animated","colorScheme","stylesFromClasses","split","map","element","filter","Boolean","defaultStyle","propStyle","Array","isArray","style","reduce","acc","el","styleValues","Object","assign","appliedProps","SvgWrapper","key","color","height","width"],"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":";AAAA;AACA;AACA;AACA,SAASA,GAAG,QAAQ,kBAAkB;AACtC,SAASC,QAAQ,QAAQ,cAAc;;AAEvC;AACA;AACA;AACA,SAASC,UAAU,QAAQ,oBAAoB;AAC/C,SAASC,uBAAuB,QAAQ,oBAAoB;;AAE5D;AACA;AACA;AACA,OAAOC,MAAM,MAAM,cAAc;AAEjC,SACCC,MAAM,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,KAAK;IAAEkB,KAAK,EAAEI;EAAY,CAAC;EAErD,MAAMI,UAAU,GAAGpB,QAAQ,GAAGR,WAAW,GAAGhB,GAAG;EAE/C,OACCoB,aAAA,CAACwB;EACA;EAAA;IACAC,GAAG,EAAGF,YAAY,CAACP,KAAK,CAACU,KAAO;IAChCC,MAAM,EAAC,MAAM;IACbC,KAAK,EAAC,MAAM;IAAA,GACPL;EAAY,CACjB,CAAC;AAEJ,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["Svg","Animated","forwardRef","usePreferredColorScheme","styles","jsx","_jsx","Circle","G","Path","Polygon","Rect","Defs","RadialGradient","LinearGradient","Stop","Line","SvgXml","AnimatedSvg","createAnimatedComponent","props","ref","SVG","className","isPressed","animated","colorScheme","stylesFromClasses","split","map","element","filter","Boolean","defaultStyle","propStyle","Array","isArray","style","reduce","acc","el","styleValues","Object","assign","appliedProps","SvgWrapper","height","width","color"],"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":"AAAA;AACA;AACA;AACA,SAASA,GAAG,QAAQ,kBAAkB;AACtC,SAASC,QAAQ,QAAQ,cAAc;;AAEvC;AACA;AACA;AACA,SAASC,UAAU,QAAQ,oBAAoB;AAC/C,SAASC,uBAAuB,QAAQ,oBAAoB;;AAE5D;AACA;AACA;AACA,OAAOC,MAAM,MAAM,cAAc;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAElC,SACCC,MAAM,EACNC,CAAC,EACDC,IAAI,EACJC,OAAO,EACPC,IAAI,EACJC,IAAI,EACJC,cAAc,EACdC,cAAc,EACdC,IAAI,EACJC,IAAI,EACJC,MAAM,QACA,kBAAkB;AAEzB,MAAMC,WAAW,GAAGjB,QAAQ,CAACkB,uBAAuB,CACnDjB,UAAU,CAAE,CAAEkB,KAAK,EAAEC,GAAG,kBAAMf,IAAA,CAACN,GAAG;EAACqB,GAAG,EAAGA,GAAK;EAAA,GAAMD;AAAK,CAAI,CAAE,CAChE,CAAC;AAED,OAAO,MAAME,GAAG,GAAGA,CAAE;EACpBC,SAAS,GAAG,EAAE;EACdC,SAAS;EACTC,QAAQ,GAAG,KAAK;EAChB,GAAGL;AACJ,CAAC,KAAM;EACN,MAAMM,WAAW,GAAGvB,uBAAuB,CAAC,CAAC;EAC7C,MAAMwB,iBAAiB,GAAGJ,SAAS,CACjCK,KAAK,CAAE,GAAI,CAAC,CACZC,GAAG,CAAIC,OAAO,IAAM1B,MAAM,CAAE0B,OAAO,CAAG,CAAC,CACvCC,MAAM,CAAEC,OAAQ,CAAC;EACnB,MAAMC,YAAY,GAAGT,SAAS,GAC3BpB,MAAM,CAAG,eAAesB,WAAa,EAAC,CAAE,GACxCtB,MAAM,CAAE,8BAA8B,GAAGsB,WAAW,CAAE;EACzD,MAAMQ,SAAS,GAAGC,KAAK,CAACC,OAAO,CAAEhB,KAAK,CAACiB,KAAM,CAAC,GAC3CjB,KAAK,CAACiB,KAAK,CAACC,MAAM,CAAE,CAAEC,GAAG,EAAEC,EAAE,KAAM;IACnC,OAAO;MAAE,GAAGD,GAAG;MAAE,GAAGC;IAAG,CAAC;EACxB,CAAC,EAAE,CAAC,CAAE,CAAC,GACPpB,KAAK,CAACiB,KAAK;EACd,MAAMI,WAAW,GAAGC,MAAM,CAACC,MAAM,CAChC,CAAC,CAAC,EACFV,YAAY,EACZC,SAAS,EACT,GAAGP,iBACJ,CAAC;EAED,MAAMiB,YAAY,GAAG;IAAE,GAAGxB,KAAK;IAAEiB,KAAK,EAAEI;EAAY,CAAC;EAErD,MAAMI,UAAU,GAAGpB,QAAQ,GAAGP,WAAW,GAAGlB,GAAG;EAE/C,oBACCM,IAAA,CAACuC;EACA;EAAA;IAEAC,MAAM,EAAC,MAAM;IACbC,KAAK,EAAC,MAAM;IAAA,GACPH;EAAY,GAHXA,YAAY,CAACP,KAAK,CAACW,KAIzB,CAAC;AAEJ,CAAC","ignoreList":[]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wordpress/primitives",
3
- "version": "3.56.0",
3
+ "version": "4.0.1",
4
4
  "description": "WordPress cross-platform primitives.",
5
5
  "author": "The WordPress Contributors",
6
6
  "license": "GPL-2.0-or-later",
@@ -20,7 +20,8 @@
20
20
  "url": "https://github.com/WordPress/gutenberg/issues"
21
21
  },
22
22
  "engines": {
23
- "node": ">=12"
23
+ "node": ">=18.12.0",
24
+ "npm": ">=8.19.2"
24
25
  },
25
26
  "main": "build/index.js",
26
27
  "module": "build-module/index.js",
@@ -31,11 +32,11 @@
31
32
  "types": "build-types",
32
33
  "dependencies": {
33
34
  "@babel/runtime": "^7.16.0",
34
- "@wordpress/element": "^5.35.0",
35
+ "@wordpress/element": "^6.0.1",
35
36
  "clsx": "^2.1.1"
36
37
  },
37
38
  "publishConfig": {
38
39
  "access": "public"
39
40
  },
40
- "gitHead": "42f38f287506a6b3ed8ccba839b18ad066821044"
41
+ "gitHead": "0e973525f7787401b5a544e0727774d52a78639f"
41
42
  }