) => JSX.Element | null} Component The component to register into the Context system.
* @param {string} namespace The namespace to register the component under.
* @param {Object} options
* @param {boolean} [options.memo=false]
- * @return {import('./polymorphic-component').PolymorphicComponentFromProps} The connected PolymorphicComponent
+ * @return {import('./wordpress-component').WordPressComponentFromProps
} The connected WordPressComponent
*/
export function contextConnect( Component, namespace, options = {} ) {
/* eslint-enable jsdoc/valid-types */
@@ -65,7 +65,7 @@ export function contextConnect( Component, namespace, options = {} ) {
// @ts-ignore internal property
WrappedComponent[ CONNECT_STATIC_NAMESPACE ] = uniq( mergedNamespace );
- // @ts-ignore PolymorphicComponent property
+ // @ts-ignore WordPressComponent property
WrappedComponent.selector = `.${ getStyledClassNameFromKey( namespace ) }`;
// @ts-ignore
diff --git a/packages/components/src/ui/context/index.js b/packages/components/src/ui/context/index.js
index e19795d7b7a13..54694e47304ff 100644
--- a/packages/components/src/ui/context/index.js
+++ b/packages/components/src/ui/context/index.js
@@ -8,4 +8,4 @@ export {
getConnectNamespace,
} from './context-connect';
export { useContextSystem } from './use-context-system';
-export * from './polymorphic-component';
+export * from './wordpress-component';
diff --git a/packages/components/src/ui/context/polymorphic-component.ts b/packages/components/src/ui/context/wordpress-component.ts
similarity index 79%
rename from packages/components/src/ui/context/polymorphic-component.ts
rename to packages/components/src/ui/context/wordpress-component.ts
index fae6cc41418db..2bf4372ec6b6e 100644
--- a/packages/components/src/ui/context/polymorphic-component.ts
+++ b/packages/components/src/ui/context/wordpress-component.ts
@@ -11,7 +11,7 @@ import type * as React from 'react';
* by `ComponentPropsWithRef`. The context is that components should require the `children`
* prop explicitely when needed (see https://github.com/WordPress/gutenberg/pull/31817).
*/
-export type PolymorphicComponentProps<
+export type WordPressComponentProps<
P,
T extends React.ElementType,
IsPolymorphic extends boolean = true
@@ -23,17 +23,17 @@ export type PolymorphicComponentProps<
}
: { as?: never } );
-export type PolymorphicComponent<
+export type WordPressComponent<
T extends React.ElementType,
O,
IsPolymorphic extends boolean
> = {
< TT extends React.ElementType >(
- props: PolymorphicComponentProps< O, TT, IsPolymorphic > &
+ props: WordPressComponentProps< O, TT, IsPolymorphic > &
( IsPolymorphic extends true ? { as: TT } : { as: never } )
): JSX.Element | null;
(
- props: PolymorphicComponentProps< O, T, IsPolymorphic >
+ props: WordPressComponentProps< O, T, IsPolymorphic >
): JSX.Element | null;
displayName?: string;
/**
@@ -47,8 +47,8 @@ export type PolymorphicComponent<
selector: `.${ string }`;
};
-export type PolymorphicComponentFromProps<
+export type WordPressComponentFromProps<
Props
-> = Props extends PolymorphicComponentProps< infer P, infer T, infer I >
- ? PolymorphicComponent< T, P, I >
+> = Props extends WordPressComponentProps< infer P, infer T, infer I >
+ ? WordPressComponent< T, P, I >
: never;
diff --git a/packages/components/src/ui/control-group/component.js b/packages/components/src/ui/control-group/component.js
index b1b82c581cdfd..d291d436c11d4 100644
--- a/packages/components/src/ui/control-group/component.js
+++ b/packages/components/src/ui/control-group/component.js
@@ -11,8 +11,8 @@ import { useControlGroup } from './hook';
import { contextConnect } from '../context';
/**
- * @param {import('../context').PolymorphicComponentProps} props
- * @param {import('react').Ref} forwardedRef
+ * @param {import('../context').WordPressComponentProps} props
+ * @param {import('react').Ref} forwardedRef
*/
function ControlGroup( props, forwardedRef ) {
const {
diff --git a/packages/components/src/ui/control-group/hook.js b/packages/components/src/ui/control-group/hook.js
index a30b745f94b9a..bc1f5d34c08b3 100644
--- a/packages/components/src/ui/control-group/hook.js
+++ b/packages/components/src/ui/control-group/hook.js
@@ -8,7 +8,7 @@ import * as styles from './styles';
import { useCx } from '../../utils/hooks/use-cx';
/**
- * @param {import('../context').PolymorphicComponentProps} props
+ * @param {import('../context').WordPressComponentProps} props
*/
export function useControlGroup( props ) {
const {
diff --git a/packages/components/src/ui/control-label/hook.js b/packages/components/src/ui/control-label/hook.js
index e376cc18f726c..c7f10444fab79 100644
--- a/packages/components/src/ui/control-label/hook.js
+++ b/packages/components/src/ui/control-label/hook.js
@@ -8,7 +8,7 @@ import * as styles from './styles';
import { useCx } from '../../utils/hooks/use-cx';
/**
- * @param {import('../context').PolymorphicComponentProps} props
+ * @param {import('../context').WordPressComponentProps} props
*/
export function useControlLabel( props ) {
const {
diff --git a/packages/components/src/ui/form-group/form-group-content.js b/packages/components/src/ui/form-group/form-group-content.js
index a84f5fa32faab..21b95ff906823 100644
--- a/packages/components/src/ui/form-group/form-group-content.js
+++ b/packages/components/src/ui/form-group/form-group-content.js
@@ -12,7 +12,7 @@ import FormGroupHelp from './form-group-help';
import FormGroupLabel from './form-group-label';
/**
- * @param {import('../context').PolymorphicComponentProps} props
+ * @param {import('../context').WordPressComponentProps} props
*/
function FormGroupContent( {
alignLabel,
diff --git a/packages/components/src/ui/form-group/form-group-label.js b/packages/components/src/ui/form-group/form-group-label.js
index 8d6c282018cad..01e9f9be3c51e 100644
--- a/packages/components/src/ui/form-group/form-group-label.js
+++ b/packages/components/src/ui/form-group/form-group-label.js
@@ -10,7 +10,7 @@ import { ControlLabel } from '../control-label';
import { VisuallyHidden } from '../../visually-hidden';
/**
- * @param {import('../context').PolymorphicComponentProps} props
+ * @param {import('../context').WordPressComponentProps} props
* @return {JSX.Element | null} The form group's label.
*/
function FormGroupLabel( { children, id, labelHidden = false, ...props } ) {
diff --git a/packages/components/src/ui/form-group/form-group.js b/packages/components/src/ui/form-group/form-group.js
index 9885aa63d2447..fc9eae01325f4 100644
--- a/packages/components/src/ui/form-group/form-group.js
+++ b/packages/components/src/ui/form-group/form-group.js
@@ -8,8 +8,8 @@ import FormGroupContent from './form-group-content';
import { useFormGroup } from './use-form-group';
/**
- * @param {import('../context').PolymorphicComponentProps} props
- * @param {import('react').Ref} forwardedRef
+ * @param {import('../context').WordPressComponentProps} props
+ * @param {import('react').Ref} forwardedRef
*/
function FormGroup( props, forwardedRef ) {
const { contentProps, horizontal, ...otherProps } = useFormGroup( props );
diff --git a/packages/components/src/ui/form-group/use-form-group.js b/packages/components/src/ui/form-group/use-form-group.js
index 3b73fc69f5f4e..eebc5ae350639 100644
--- a/packages/components/src/ui/form-group/use-form-group.js
+++ b/packages/components/src/ui/form-group/use-form-group.js
@@ -11,7 +11,7 @@ import * as styles from './form-group-styles';
import { useCx } from '../../utils/hooks/use-cx';
/**
- * @param {import('../context').PolymorphicComponentProps} props
+ * @param {import('../context').WordPressComponentProps} props
*/
export function useFormGroup( props ) {
const {
diff --git a/packages/components/src/ui/shortcut/component.tsx b/packages/components/src/ui/shortcut/component.tsx
index 911aced391c14..f5bbb6a5d791e 100644
--- a/packages/components/src/ui/shortcut/component.tsx
+++ b/packages/components/src/ui/shortcut/component.tsx
@@ -7,8 +7,11 @@ import type { Ref } from 'react';
/**
* Internal dependencies
*/
-import { useContextSystem, contextConnect } from '../context';
-import type { PolymorphicComponentProps } from '../context';
+import {
+ useContextSystem,
+ contextConnect,
+ WordPressComponentProps,
+} from '../context';
import { View } from '../../view';
export interface ShortcutDescription {
@@ -22,7 +25,7 @@ export interface Props {
}
function Shortcut(
- props: PolymorphicComponentProps< Props, 'span' >,
+ props: WordPressComponentProps< Props, 'span' >,
forwardedRef: Ref< any >
): JSX.Element | null {
const {
diff --git a/packages/components/src/ui/spinner/component.js b/packages/components/src/ui/spinner/component.js
index 12cb30f0d712b..c5b45fccf0b8a 100644
--- a/packages/components/src/ui/spinner/component.js
+++ b/packages/components/src/ui/spinner/component.js
@@ -16,8 +16,8 @@ import { COLORS } from '../../utils/colors-values';
/**
*
- * @param {import('../context').PolymorphicComponentProps} props
- * @param {import('react').Ref} forwardedRef
+ * @param {import('../context').WordPressComponentProps} props
+ * @param {import('react').Ref} forwardedRef
*/
function Spinner( props, forwardedRef ) {
const {
diff --git a/packages/components/src/ui/tooltip/component.js b/packages/components/src/ui/tooltip/component.js
index f618f4633d48f..78ab9132407e5 100644
--- a/packages/components/src/ui/tooltip/component.js
+++ b/packages/components/src/ui/tooltip/component.js
@@ -18,8 +18,8 @@ import TooltipContent from './content';
import { TooltipShortcut } from './styles';
/**
- * @param {import('../context').PolymorphicComponentProps} props
- * @param {import('react').Ref} forwardedRef
+ * @param {import('../context').WordPressComponentProps} props
+ * @param {import('react').Ref} forwardedRef
*/
function Tooltip( props, forwardedRef ) {
const {
diff --git a/packages/components/src/ui/tooltip/content.js b/packages/components/src/ui/tooltip/content.js
index 08c51288dae23..b2d533f8288c0 100644
--- a/packages/components/src/ui/tooltip/content.js
+++ b/packages/components/src/ui/tooltip/content.js
@@ -17,8 +17,8 @@ const { TooltipPopoverView } = styles;
/**
*
- * @param {import('../context').PolymorphicComponentProps} props
- * @param {import('react').Ref} forwardedRef
+ * @param {import('../context').WordPressComponentProps} props
+ * @param {import('react').Ref} forwardedRef
*/
function TooltipContent( props, forwardedRef ) {
const { children, className, ...otherProps } = useContextSystem(
diff --git a/packages/components/src/ui/utils/create-component.tsx b/packages/components/src/ui/utils/create-component.tsx
index f9bd8e6d7d3ed..8e451cffef11c 100644
--- a/packages/components/src/ui/utils/create-component.tsx
+++ b/packages/components/src/ui/utils/create-component.tsx
@@ -10,14 +10,14 @@ import type { As } from 'reakit-utils/types';
*/
import { contextConnect } from '../context';
import type {
- PolymorphicComponentProps,
- PolymorphicComponentFromProps,
+ WordPressComponentProps,
+ WordPressComponentFromProps,
} from '../context';
import { View } from '../../view';
interface Options<
A extends As,
- P extends PolymorphicComponentProps< {}, A, any >
+ P extends WordPressComponentProps< {}, A, any >
> {
as: A;
name: string;
@@ -37,13 +37,13 @@ interface Options<
*/
export const createComponent = <
A extends As,
- P extends PolymorphicComponentProps< {}, A, any >
+ P extends WordPressComponentProps< {}, A, any >
>( {
as,
name,
useHook,
memo = false,
-}: Options< A, P > ): PolymorphicComponentFromProps< P > => {
+}: Options< A, P > ): WordPressComponentFromProps< P > => {
function Component( props: P, forwardedRef: Ref< any > ) {
const otherProps = useHook( props );
diff --git a/packages/components/src/ui/utils/test/create-component.js b/packages/components/src/ui/utils/test/create-component.js
index 01dbd7b991797..970a774badf29 100644
--- a/packages/components/src/ui/utils/test/create-component.js
+++ b/packages/components/src/ui/utils/test/create-component.js
@@ -15,7 +15,7 @@ import { createComponent } from '../create-component';
describe( 'createComponent', () => {
/**
- * @param {import('../context').PolymorphicComponentProps<{}, 'output'>} props
+ * @param {import('../context').WordPressComponentProps<{}, 'output'>} props
*/
const useHook = ( props ) => ( { ...props, 'data-hook-test-prop': true } );
const name = 'Output';
diff --git a/packages/components/src/v-stack/hook.js b/packages/components/src/v-stack/hook.js
index 0dcd4d33c739a..1852da47bad09 100644
--- a/packages/components/src/v-stack/hook.js
+++ b/packages/components/src/v-stack/hook.js
@@ -6,7 +6,7 @@ import { useHStack } from '../h-stack';
/**
*
- * @param {import('../ui/context').PolymorphicComponentProps} props
+ * @param {import('../ui/context').WordPressComponentProps} props
*/
export function useVStack( props ) {
const { expanded = false, ...otherProps } = useContextSystem(
diff --git a/packages/components/src/view/component.js b/packages/components/src/view/component.js
index 095576a79e886..4d7808807bd1f 100644
--- a/packages/components/src/view/component.js
+++ b/packages/components/src/view/component.js
@@ -20,7 +20,7 @@ import styled from '@emotion/styled';
* }
* ```
*
- * @type {import('../ui/context').PolymorphicComponent<'div', { children?: import('react').ReactNode }, true>}
+ * @type {import('../ui/context').WordPressComponent<'div', { children?: import('react').ReactNode }, true>}
*/
// @ts-ignore
const View = styled.div``;
diff --git a/packages/components/src/visually-hidden/component.js b/packages/components/src/visually-hidden/component.js
index 01b9e65ddc511..ba0096d3a8bd8 100644
--- a/packages/components/src/visually-hidden/component.js
+++ b/packages/components/src/visually-hidden/component.js
@@ -6,8 +6,8 @@ import { visuallyHidden } from './styles';
import { View } from '../view';
/**
- * @param {import('../ui/context').PolymorphicComponentProps<{ children: import('react').ReactNode }, 'div'>} props
- * @param {import('react').Ref} forwardedRef
+ * @param {import('../ui/context').WordPressComponentProps<{ children: import('react').ReactNode }, 'div'>} props
+ * @param {import('react').Ref} forwardedRef
*/
function VisuallyHidden( props, forwardedRef ) {
const { style: styleProp, ...contextProps } = useContextSystem(
diff --git a/packages/components/src/z-stack/component.tsx b/packages/components/src/z-stack/component.tsx
index 32767f2877843..b6ee9fad3f1dc 100644
--- a/packages/components/src/z-stack/component.tsx
+++ b/packages/components/src/z-stack/component.tsx
@@ -14,7 +14,7 @@ import { isValidElement } from '@wordpress/element';
*/
import { getValidChildren } from '../ui/utils/get-valid-children';
import { contextConnect, useContextSystem } from '../ui/context';
-import type { PolymorphicComponentProps } from '../ui/context';
+import type { WordPressComponentProps } from '../ui/context';
import { ZStackView, ZStackChildView } from './styles';
export interface ZStackProps {
@@ -43,7 +43,7 @@ export interface ZStackProps {
}
function ZStack(
- props: PolymorphicComponentProps< ZStackProps, 'div' >,
+ props: WordPressComponentProps< ZStackProps, 'div' >,
forwardedRef: Ref< any >
) {
const {
diff --git a/packages/core-data/src/actions.js b/packages/core-data/src/actions.js
index 2fc8e51a27924..104cf63348a08 100644
--- a/packages/core-data/src/actions.js
+++ b/packages/core-data/src/actions.js
@@ -7,7 +7,6 @@ import { v4 as uuid } from 'uuid';
/**
* WordPress dependencies
*/
-import { controls } from '@wordpress/data';
import { __unstableAwaitPromise } from '@wordpress/data-controls';
import triggerFetch from '@wordpress/api-fetch';
import { addQueryArgs } from '@wordpress/url';
diff --git a/packages/edit-navigation/README.md b/packages/edit-navigation/README.md
index 1ee150967f869..1a405fdd4f1e2 100644
--- a/packages/edit-navigation/README.md
+++ b/packages/edit-navigation/README.md
@@ -41,6 +41,8 @@ Moreover, when the navigation is rendered on the front of the site the system co
### Block-based Mode
+**Important**: block-based mode has been temporarily ***disabled*** until it becomes stable. So, if a theme declares support for the `block-nav-menus` feature it will not affect the frontend.
+
If desired, themes are able to opt into _rendering_ complete block-based menus using the Navigation Editor. This allows for arbitrarily complex navigation block structures to be used in an existing theme whilst still ensuring the navigation data is still _saved_ to the existing (post type powered) Menus system.
Themes can opt into this behaviour by declaring:
diff --git a/packages/edit-site/src/components/editor/utils.js b/packages/edit-site/src/components/editor/utils.js
index ba883f330ea26..81a809dbf4bee 100644
--- a/packages/edit-site/src/components/editor/utils.js
+++ b/packages/edit-site/src/components/editor/utils.js
@@ -6,6 +6,7 @@ import { get, find, forEach, camelCase, isString } from 'lodash';
* WordPress dependencies
*/
import { useSelect } from '@wordpress/data';
+import { __EXPERIMENTAL_PATHS_WITH_MERGE as PATHS_WITH_MERGE } from '@wordpress/blocks';
/**
* Internal dependencies
*/
@@ -91,13 +92,6 @@ function getPresetMetadataFromStyleProperty( styleProperty ) {
return getPresetMetadataFromStyleProperty.MAP[ styleProperty ];
}
-const PATHS_WITH_MERGE = {
- 'color.gradients': true,
- 'color.palette': true,
- 'typography.fontFamilies': true,
- 'typography.fontSizes': true,
-};
-
export function useSetting( path, blockName = '' ) {
const settings = useSelect( ( select ) => {
return select( editSiteStore ).getSettings();
diff --git a/packages/editor/src/components/provider/index.native.js b/packages/editor/src/components/provider/index.native.js
index 8c9d7f8089bcf..470a8fdf729ef 100644
--- a/packages/editor/src/components/provider/index.native.js
+++ b/packages/editor/src/components/provider/index.native.js
@@ -89,10 +89,15 @@ class NativeEditorProvider extends Component {
}
componentDidMount() {
- const { capabilities, updateSettings } = this.props;
+ const {
+ capabilities,
+ updateSettings,
+ galleryWithImageBlocks,
+ } = this.props;
updateSettings( {
...capabilities,
+ ...{ __unstableGalleryWithImageBlocks: galleryWithImageBlocks },
...this.getThemeColors( this.props ),
} );
@@ -142,8 +147,13 @@ class NativeEditorProvider extends Component {
this.subscriptionParentUpdateEditorSettings = subscribeUpdateEditorSettings(
( editorSettings ) => {
- const themeColors = this.getThemeColors( editorSettings );
- updateSettings( themeColors );
+ updateSettings( {
+ ...{
+ __unstableGalleryWithImageBlocks:
+ editorSettings.galleryWithImageBlocks,
+ },
+ ...this.getThemeColors( editorSettings ),
+ } );
}
);
diff --git a/packages/react-native-aztec/android/build.gradle b/packages/react-native-aztec/android/build.gradle
index 7eb7ed9b71f62..674620ad78035 100644
--- a/packages/react-native-aztec/android/build.gradle
+++ b/packages/react-native-aztec/android/build.gradle
@@ -1,7 +1,5 @@
buildscript {
ext {
- gradlePluginVersion = '4.0.2'
- kotlinVersion = '1.5.20'
supportLibVersion = '29.0.2'
tagSoupVersion = '1.2.1'
glideVersion = '3.7.0'
@@ -14,30 +12,14 @@ buildscript {
aztecVersion = 'v1.3.45'
willPublishReactNativeAztecBinary = properties["willPublishReactNativeAztecBinary"]?.toBoolean() ?: false
}
-
- repositories {
- maven {
- url 'https://a8c-libs.s3.amazonaws.com/android'
- content {
- includeGroup 'com.automattic.android'
- }
- }
- jcenter()
- google()
- }
-
- dependencies {
- classpath "com.android.tools.build:gradle:$gradlePluginVersion"
- classpath 'com.github.dcendents:android-maven-gradle-plugin:2.1'
- classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion"
- classpath 'com.automattic.android:publish-to-s3:0.6.1'
- }
}
-apply plugin: 'com.android.library'
-apply plugin: 'kotlin-android'
-apply plugin: 'com.github.dcendents.android-maven'
-apply plugin: 'com.automattic.android.publish-to-s3'
+plugins {
+ id "com.android.library"
+ id "org.jetbrains.kotlin.android"
+ id "maven-publish"
+ id "com.automattic.android.publish-to-s3"
+}
// import the `readReactNativeVersion()` function
apply from: 'https://gist.githubusercontent.com/hypest/742448b9588b3a0aa580a5e80ae95bdf/raw/8eb62d40ee7a5104d2fcaeff21ce6f29bd93b054/readReactNativeVersion.gradle'
@@ -105,8 +87,6 @@ dependencies {
api "com.github.wordpress-mobile.WordPress-Aztec-Android:glide-loader:$aztecVersion"
implementation "org.wordpress:utils:$wordpressUtilsVersion"
- implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlinVersion"
-
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'androidx.gridlayout:gridlayout:1.0.0'
implementation 'androidx.cardview:cardview:1.0.0'
diff --git a/packages/react-native-aztec/android/gradle/wrapper/gradle-wrapper.jar b/packages/react-native-aztec/android/gradle/wrapper/gradle-wrapper.jar
index 5c2d1cf016b38..f3d88b1c2faf2 100644
Binary files a/packages/react-native-aztec/android/gradle/wrapper/gradle-wrapper.jar and b/packages/react-native-aztec/android/gradle/wrapper/gradle-wrapper.jar differ
diff --git a/packages/react-native-aztec/android/gradle/wrapper/gradle-wrapper.properties b/packages/react-native-aztec/android/gradle/wrapper/gradle-wrapper.properties
index 4e1cc9db6b597..af7be50b1015c 100644
--- a/packages/react-native-aztec/android/gradle/wrapper/gradle-wrapper.properties
+++ b/packages/react-native-aztec/android/gradle/wrapper/gradle-wrapper.properties
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-6.1.1-all.zip
+distributionUrl=https\://services.gradle.org/distributions/gradle-7.1.1-all.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
diff --git a/packages/react-native-aztec/android/gradlew b/packages/react-native-aztec/android/gradlew
index 8e25e6c19d574..2fe81a7d95e4f 100755
--- a/packages/react-native-aztec/android/gradlew
+++ b/packages/react-native-aztec/android/gradlew
@@ -125,8 +125,8 @@ if $darwin; then
GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
fi
-# For Cygwin, switch paths to Windows format before running java
-if $cygwin ; then
+# For Cygwin or MSYS, switch paths to Windows format before running java
+if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
JAVACMD=`cygpath --unix "$JAVACMD"`
@@ -154,19 +154,19 @@ if $cygwin ; then
else
eval `echo args$i`="\"$arg\""
fi
- i=$((i+1))
+ i=`expr $i + 1`
done
case $i in
- (0) set -- ;;
- (1) set -- "$args0" ;;
- (2) set -- "$args0" "$args1" ;;
- (3) set -- "$args0" "$args1" "$args2" ;;
- (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
- (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
- (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
- (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
- (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
- (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
+ 0) set -- ;;
+ 1) set -- "$args0" ;;
+ 2) set -- "$args0" "$args1" ;;
+ 3) set -- "$args0" "$args1" "$args2" ;;
+ 4) set -- "$args0" "$args1" "$args2" "$args3" ;;
+ 5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
+ 6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
+ 7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
+ 8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
+ 9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
esac
fi
@@ -175,14 +175,9 @@ save () {
for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
echo " "
}
-APP_ARGS=$(save "$@")
+APP_ARGS=`save "$@"`
# Collect all arguments for the java command, following the shell quoting and substitution rules
eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
-# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
-if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
- cd "$(dirname "$0")"
-fi
-
exec "$JAVACMD" "$@"
diff --git a/packages/react-native-aztec/android/settings.gradle b/packages/react-native-aztec/android/settings.gradle
index b589da9e83838..afe8958a55e2a 100644
--- a/packages/react-native-aztec/android/settings.gradle
+++ b/packages/react-native-aztec/android/settings.gradle
@@ -1,2 +1,22 @@
-rootProject.name = '@wordpress_react-native-aztec'
+pluginManagement {
+ gradle.ext.kotlinVersion = '1.5.20'
+
+ plugins {
+ id "com.android.library" version "4.2.2"
+ id "org.jetbrains.kotlin.android" version gradle.ext.kotlinVersion
+ id "com.automattic.android.publish-to-s3" version "0.6.1"
+ }
+ repositories {
+ maven {
+ url 'https://a8c-libs.s3.amazonaws.com/android'
+ content {
+ includeGroup "com.automattic.android"
+ includeGroup "com.automattic.android.publish-to-s3"
+ }
+ }
+ gradlePluginPortal()
+ google()
+ }
+}
+rootProject.name = '@wordpress_react-native-aztec'
diff --git a/packages/react-native-bridge/android/build.gradle b/packages/react-native-bridge/android/build.gradle
index b9a6fc0612e9b..560c66362615f 100644
--- a/packages/react-native-bridge/android/build.gradle
+++ b/packages/react-native-bridge/android/build.gradle
@@ -2,14 +2,11 @@ buildscript {
ext {
willPublishReactNativeBridgeBinary = properties["willPublishReactNativeBridgeBinary"]?.toBoolean() ?: false
}
- repositories {
- jcenter()
- google()
- }
+}
- dependencies {
- classpath 'com.android.tools.build:gradle:4.0.2'
- }
+plugins {
+ id "com.android.library" apply false
+ id "org.jetbrains.kotlin.android" apply false
}
allprojects {
diff --git a/packages/react-native-bridge/android/gradle/wrapper/gradle-wrapper.jar b/packages/react-native-bridge/android/gradle/wrapper/gradle-wrapper.jar
index 5c2d1cf016b38..f3d88b1c2faf2 100644
Binary files a/packages/react-native-bridge/android/gradle/wrapper/gradle-wrapper.jar and b/packages/react-native-bridge/android/gradle/wrapper/gradle-wrapper.jar differ
diff --git a/packages/react-native-bridge/android/gradle/wrapper/gradle-wrapper.properties b/packages/react-native-bridge/android/gradle/wrapper/gradle-wrapper.properties
index 4e1cc9db6b597..af7be50b1015c 100644
--- a/packages/react-native-bridge/android/gradle/wrapper/gradle-wrapper.properties
+++ b/packages/react-native-bridge/android/gradle/wrapper/gradle-wrapper.properties
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-6.1.1-all.zip
+distributionUrl=https\://services.gradle.org/distributions/gradle-7.1.1-all.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
diff --git a/packages/react-native-bridge/android/gradlew b/packages/react-native-bridge/android/gradlew
index 8e25e6c19d574..2fe81a7d95e4f 100755
--- a/packages/react-native-bridge/android/gradlew
+++ b/packages/react-native-bridge/android/gradlew
@@ -125,8 +125,8 @@ if $darwin; then
GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
fi
-# For Cygwin, switch paths to Windows format before running java
-if $cygwin ; then
+# For Cygwin or MSYS, switch paths to Windows format before running java
+if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
JAVACMD=`cygpath --unix "$JAVACMD"`
@@ -154,19 +154,19 @@ if $cygwin ; then
else
eval `echo args$i`="\"$arg\""
fi
- i=$((i+1))
+ i=`expr $i + 1`
done
case $i in
- (0) set -- ;;
- (1) set -- "$args0" ;;
- (2) set -- "$args0" "$args1" ;;
- (3) set -- "$args0" "$args1" "$args2" ;;
- (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
- (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
- (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
- (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
- (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
- (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
+ 0) set -- ;;
+ 1) set -- "$args0" ;;
+ 2) set -- "$args0" "$args1" ;;
+ 3) set -- "$args0" "$args1" "$args2" ;;
+ 4) set -- "$args0" "$args1" "$args2" "$args3" ;;
+ 5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
+ 6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
+ 7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
+ 8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
+ 9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
esac
fi
@@ -175,14 +175,9 @@ save () {
for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
echo " "
}
-APP_ARGS=$(save "$@")
+APP_ARGS=`save "$@"`
# Collect all arguments for the java command, following the shell quoting and substitution rules
eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
-# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
-if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
- cd "$(dirname "$0")"
-fi
-
exec "$JAVACMD" "$@"
diff --git a/packages/react-native-bridge/android/react-native-bridge/build.gradle b/packages/react-native-bridge/android/react-native-bridge/build.gradle
index 70068e4484d0b..efd431242f302 100644
--- a/packages/react-native-bridge/android/react-native-bridge/build.gradle
+++ b/packages/react-native-bridge/android/react-native-bridge/build.gradle
@@ -1,28 +1,10 @@
-buildscript {
- ext.kotlinVersion = '1.5.20'
-
- repositories {
- maven {
- url 'https://a8c-libs.s3.amazonaws.com/android'
- content {
- includeGroup "com.automattic.android"
- }
- }
- jcenter()
- google()
- }
-
- dependencies {
- classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion"
- classpath 'com.android.tools.build:gradle:4.0.2'
- classpath 'com.automattic.android:publish-to-s3:0.6.1'
- }
+plugins {
+ id "com.android.library"
+ id "org.jetbrains.kotlin.android"
+ id "maven-publish"
+ id "com.automattic.android.publish-to-s3"
}
-apply plugin: 'com.android.library'
-apply plugin: 'kotlin-android'
-apply plugin: 'com.automattic.android.publish-to-s3'
-
// import the `readReactNativeVersion()` function
apply from: 'https://gist.githubusercontent.com/hypest/742448b9588b3a0aa580a5e80ae95bdf/raw/8eb62d40ee7a5104d2fcaeff21ce6f29bd93b054/readReactNativeVersion.gradle'
@@ -39,8 +21,6 @@ android {
defaultConfig {
minSdkVersion 21
targetSdkVersion 29
- versionCode 1
- versionName "1.0"
buildConfigField "boolean", "SHOULD_ATTACH_JS_BUNDLE", willPublishReactNativeBridgeBinary.toString()
}
@@ -66,15 +46,14 @@ android {
}
repositories {
- google()
- jcenter()
- maven { url "https://jitpack.io" }
maven { url "https://a8c-libs.s3.amazonaws.com/android" }
maven { url "https://a8c-libs.s3.amazonaws.com/android/hermes-mirror" }
+ maven { url "https://jitpack.io" }
+ google()
+ jcenter()
}
dependencies {
- implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlinVersion"
// For animated GIF support
implementation 'com.facebook.fresco:animated-gif:2.0.0'
implementation 'com.google.android.material:material:1.2.1'
@@ -98,7 +77,6 @@ dependencies {
implementation "com.github.wordpress-mobile:react-native-prompt-android:${readHashedVersion('../../../react-native-editor/package.json', 'react-native-prompt-android', 'dependencies')}"
implementation "com.github.wordpress-mobile:react-native-webview:${readHashedVersion('../../../react-native-editor/package.json', 'react-native-webview', 'dependencies')}"
runtimeOnly "org.wordpress-mobile:hermes-release-mirror:0.64.0"
-
} else {
api 'com.facebook.react:react-native:+'
api project(':@wordpress_react-native-aztec')
diff --git a/packages/react-native-bridge/android/react-native-bridge/src/main/java/org/wordpress/mobile/WPAndroidGlue/GutenbergProps.kt b/packages/react-native-bridge/android/react-native-bridge/src/main/java/org/wordpress/mobile/WPAndroidGlue/GutenbergProps.kt
index a08225d57d422..5b35db5335f8d 100644
--- a/packages/react-native-bridge/android/react-native-bridge/src/main/java/org/wordpress/mobile/WPAndroidGlue/GutenbergProps.kt
+++ b/packages/react-native-bridge/android/react-native-bridge/src/main/java/org/wordpress/mobile/WPAndroidGlue/GutenbergProps.kt
@@ -41,6 +41,10 @@ data class GutenbergProps @JvmOverloads constructor(
?.let { putSerializable(PROP_STYLES, it) }
theme.getSerializable(PROP_FEATURES)
?.let { putSerializable(PROP_FEATURES, it) }
+ theme.getSerializable(PROP_IS_FSE_THEME)
+ ?.let { putSerializable(PROP_IS_FSE_THEME, it) }
+ theme.getSerializable(PROP_GALLERY_WITH_IMAGE_BLOCKS)
+ ?.let { putSerializable(PROP_GALLERY_WITH_IMAGE_BLOCKS, it) }
}
}
@@ -77,6 +81,8 @@ data class GutenbergProps @JvmOverloads constructor(
private const val PROP_GRADIENTS = "gradients"
private const val PROP_STYLES = "rawStyles"
private const val PROP_FEATURES = "rawFeatures"
+ private const val PROP_IS_FSE_THEME = "isFSETheme"
+ private const val PROP_GALLERY_WITH_IMAGE_BLOCKS = "galleryWithImageBlocks"
const val PROP_CAPABILITIES = "capabilities"
const val PROP_CAPABILITIES_CONTACT_INFO_BLOCK = "contactInfoBlock"
diff --git a/packages/react-native-bridge/android/react-native-bridge/src/main/res/drawable/ic_check_24px.xml b/packages/react-native-bridge/android/react-native-bridge/src/main/res/drawable/ic_check_24px.xml
index 4c1cdcec4b516..a9d291df5f4a4 100644
--- a/packages/react-native-bridge/android/react-native-bridge/src/main/res/drawable/ic_check_24px.xml
+++ b/packages/react-native-bridge/android/react-native-bridge/src/main/res/drawable/ic_check_24px.xml
@@ -4,6 +4,6 @@
android:viewportWidth="24"
android:viewportHeight="24">
diff --git a/packages/react-native-bridge/android/react-native-bridge/src/main/res/drawable/ic_close_24px.xml b/packages/react-native-bridge/android/react-native-bridge/src/main/res/drawable/ic_close_24px.xml
index a922efedc06eb..a20716a20f105 100644
--- a/packages/react-native-bridge/android/react-native-bridge/src/main/res/drawable/ic_close_24px.xml
+++ b/packages/react-native-bridge/android/react-native-bridge/src/main/res/drawable/ic_close_24px.xml
@@ -4,6 +4,6 @@
android:viewportWidth="24"
android:viewportHeight="24">
diff --git a/packages/react-native-bridge/android/react-native-bridge/src/main/res/layout/activity_gutenberg_web_view.xml b/packages/react-native-bridge/android/react-native-bridge/src/main/res/layout/activity_gutenberg_web_view.xml
index 2dcf133412d64..bd8c8503f89d0 100644
--- a/packages/react-native-bridge/android/react-native-bridge/src/main/res/layout/activity_gutenberg_web_view.xml
+++ b/packages/react-native-bridge/android/react-native-bridge/src/main/res/layout/activity_gutenberg_web_view.xml
@@ -17,7 +17,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/status_bar_color"
- app:titleTextColor="@color/white"
+ app:titleTextColor="@android:color/white"
app:contentInsetEnd="@dimen/toolbar_content_offset_end"
app:contentInsetLeft="@dimen/toolbar_content_offset"
app:contentInsetRight="@dimen/toolbar_content_offset_end"
@@ -36,7 +36,7 @@
android:id="@+id/foreground_view"
android:layout_width="match_parent"
android:layout_height="match_parent"
- android:background="@color/white"
+ android:background="@android:color/white"
android:gravity="center"
android:paddingStart="@dimen/foreground_view_padding_large"
android:paddingEnd="@dimen/foreground_view_padding_large"
@@ -49,7 +49,7 @@
android:layout_marginBottom="@dimen/foreground_view_padding_medium"
android:layout_marginTop="@dimen/foreground_view_padding_medium"
android:src="@drawable/ube_failed"
- android:contentDescription="@null"
+ android:contentDescription="@null"
android:visibility="gone" />
[String : Any] {
var settingsUpdates = [String : Any]()
settingsUpdates["isFSETheme"] = editorSettings?.isFSETheme ?? false
+ settingsUpdates["galleryWithImageBlocks"] = editorSettings?.galleryWithImageBlocks ?? false
if let rawStyles = editorSettings?.rawStyles {
settingsUpdates["rawStyles"] = rawStyles
diff --git a/packages/react-native-bridge/ios/GutenbergBridgeDataSource.swift b/packages/react-native-bridge/ios/GutenbergBridgeDataSource.swift
index 166b257fd3319..d2cb398a36bc9 100644
--- a/packages/react-native-bridge/ios/GutenbergBridgeDataSource.swift
+++ b/packages/react-native-bridge/ios/GutenbergBridgeDataSource.swift
@@ -77,6 +77,7 @@ public extension GutenbergBridgeDataSource {
public protocol GutenbergEditorSettings {
var isFSETheme: Bool { get }
+ var galleryWithImageBlocks: Bool { get }
var rawStyles: String? { get }
var rawFeatures: String? { get }
var colors: [[String: String]]? { get }
diff --git a/packages/react-native-editor/CHANGELOG.md b/packages/react-native-editor/CHANGELOG.md
index 663f41c835aed..0d8aec88a78d5 100644
--- a/packages/react-native-editor/CHANGELOG.md
+++ b/packages/react-native-editor/CHANGELOG.md
@@ -10,7 +10,7 @@ For each user feature we should also add a importance categorization label to i
-->
## Unreleased
-
+- [**] Enable embed preview for a list of providers (for now only YouTube and Twitter) [#34446]
## 1.60.1
- [*] RNmobile: Fix the cancel button on Block Variation Picker / Columns Block. [#34249]
- [*] Column block: Fix Android close button alignment. [#34332]
diff --git a/packages/react-native-editor/android/build.gradle b/packages/react-native-editor/android/build.gradle
index 363a59321690c..e05a9dc625f31 100644
--- a/packages/react-native-editor/android/build.gradle
+++ b/packages/react-native-editor/android/build.gradle
@@ -1,6 +1,6 @@
buildscript {
ext {
- gradlePluginVersion = '4.0.2'
+ gradlePluginVersion = '4.2.2'
kotlinVersion = '1.5.20'
buildToolsVersion = "29.0.3"
minSdkVersion = 21
diff --git a/packages/react-native-editor/android/gradle/wrapper/gradle-wrapper.jar b/packages/react-native-editor/android/gradle/wrapper/gradle-wrapper.jar
index 5c2d1cf016b38..f3d88b1c2faf2 100644
Binary files a/packages/react-native-editor/android/gradle/wrapper/gradle-wrapper.jar and b/packages/react-native-editor/android/gradle/wrapper/gradle-wrapper.jar differ
diff --git a/packages/react-native-editor/android/gradle/wrapper/gradle-wrapper.properties b/packages/react-native-editor/android/gradle/wrapper/gradle-wrapper.properties
index 4e1cc9db6b597..af7be50b1015c 100644
--- a/packages/react-native-editor/android/gradle/wrapper/gradle-wrapper.properties
+++ b/packages/react-native-editor/android/gradle/wrapper/gradle-wrapper.properties
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-6.1.1-all.zip
+distributionUrl=https\://services.gradle.org/distributions/gradle-7.1.1-all.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
diff --git a/packages/react-native-editor/android/gradlew.bat b/packages/react-native-editor/android/gradlew.bat
index 9109989e3cbf6..24467a141f791 100644
--- a/packages/react-native-editor/android/gradlew.bat
+++ b/packages/react-native-editor/android/gradlew.bat
@@ -29,9 +29,6 @@ if "%DIRNAME%" == "" set DIRNAME=.
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%
-@rem Resolve any "." and ".." in APP_HOME to make it shorter.
-for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
-
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
diff --git a/packages/react-native-editor/package.json b/packages/react-native-editor/package.json
index d3c62ed83f649..b98ae5b1ac0b4 100644
--- a/packages/react-native-editor/package.json
+++ b/packages/react-native-editor/package.json
@@ -31,8 +31,8 @@
"dependencies": {
"@babel/runtime": "^7.13.10",
"@react-native-community/blur": "3.6.0",
- "@react-native-community/masked-view": "git+https://github.com/wordpress-mobile/react-native-masked-view.git#v0.1.11-wp",
- "@react-native-community/slider": "git+https://github.com/wordpress-mobile/react-native-slider.git#v3.0.2-wp",
+ "@react-native-community/masked-view": "git+https://github.com/wordpress-mobile/react-native-masked-view.git#v0.1.11-wp-1",
+ "@react-native-community/slider": "git+https://github.com/wordpress-mobile/react-native-slider.git#v3.0.2-wp-1",
"@react-navigation/core": "5.12.0",
"@react-navigation/native": "5.7.0",
"@react-navigation/routers": "5.4.9",
@@ -55,23 +55,23 @@
"jsdom-jscore-rn": "git+https://github.com/iamcco/jsdom-jscore-rn.git#a562f3d57c27c13e5bfc8cf82d496e69a3ba2800",
"node-fetch": "^2.6.0",
"react-native": "0.64.0",
- "react-native-gesture-handler": "git+https://github.com/wordpress-mobile/react-native-gesture-handler.git#1.10.1-wp-2",
- "react-native-get-random-values": "git+https://github.com/wordpress-mobile/react-native-get-random-values.git#v1.4.0-wp",
+ "react-native-gesture-handler": "git+https://github.com/wordpress-mobile/react-native-gesture-handler.git#1.10.1-wp-3",
+ "react-native-get-random-values": "git+https://github.com/wordpress-mobile/react-native-get-random-values.git#v1.4.0-wp-1",
"react-native-hr": "git+https://github.com/Riglerr/react-native-hr.git#2d01a5cf77212d100e8b99e0310cce5234f977b3",
- "react-native-hsv-color-picker": "git+https://github.com/wordpress-mobile/react-native-hsv-color-picker#v1.0.1-wp",
+ "react-native-hsv-color-picker": "git+https://github.com/wordpress-mobile/react-native-hsv-color-picker#v1.0.1-wp-1",
"react-native-keyboard-aware-scroll-view": "git+https://github.com/wordpress-mobile/react-native-keyboard-aware-scroll-view.git#v0.8.8-wp",
- "react-native-linear-gradient": "git+https://github.com/wordpress-mobile/react-native-linear-gradient.git#v2.5.6-wp",
+ "react-native-linear-gradient": "git+https://github.com/wordpress-mobile/react-native-linear-gradient.git#v2.5.6-wp-1",
"react-native-modal": "^11.10.0",
- "react-native-prompt-android": "git+https://github.com/wordpress-mobile/react-native-prompt-android.git#v1.0.0-wp",
- "react-native-reanimated": "git+https://github.com/wordpress-mobile/react-native-reanimated.git#1.9.0-wp",
+ "react-native-prompt-android": "git+https://github.com/wordpress-mobile/react-native-prompt-android.git#v1.0.0-wp-1",
+ "react-native-reanimated": "git+https://github.com/wordpress-mobile/react-native-reanimated.git#1.9.0-wp-1",
"react-native-safe-area": "^0.5.0",
- "react-native-safe-area-context": "git+https://github.com/wordpress-mobile/react-native-safe-area-context.git#v3.2.0-wp",
+ "react-native-safe-area-context": "git+https://github.com/wordpress-mobile/react-native-safe-area-context.git#v3.2.0-wp-1",
"react-native-sass-transformer": "^1.1.1",
- "react-native-screens": "git+https://github.com/wordpress-mobile/react-native-screens.git#2.9.0-wp",
- "react-native-svg": "git+https://github.com/wordpress-mobile/react-native-svg.git#v9.13.7-wp",
+ "react-native-screens": "git+https://github.com/wordpress-mobile/react-native-screens.git#2.9.0-wp-1",
+ "react-native-svg": "git+https://github.com/wordpress-mobile/react-native-svg.git#v9.13.7-wp-1",
"react-native-url-polyfill": "^1.1.2",
- "react-native-video": "git+https://github.com/wordpress-mobile/react-native-video.git#5.0.2-wp",
- "react-native-webview": "git+https://github.com/wordpress-mobile/react-native-webview.git#v11.6.5-wp"
+ "react-native-video": "git+https://github.com/wordpress-mobile/react-native-video.git#5.0.2-wp-1",
+ "react-native-webview": "git+https://github.com/wordpress-mobile/react-native-webview.git#v11.6.5-wp-1"
},
"publishConfig": {
"access": "public"
diff --git a/packages/react-native-editor/src/index.js b/packages/react-native-editor/src/index.js
index c8b8fd8b152ab..3fd18a1674648 100644
--- a/packages/react-native-editor/src/index.js
+++ b/packages/react-native-editor/src/index.js
@@ -83,6 +83,7 @@ const setupInitHooks = () => {
gradients,
rawStyles,
rawFeatures,
+ galleryWithImageBlocks,
} = props;
if ( initialData === undefined && __DEV__ ) {
@@ -110,6 +111,7 @@ const setupInitHooks = () => {
gradients,
rawStyles,
rawFeatures,
+ galleryWithImageBlocks,
};
}
);
diff --git a/packages/scripts/CHANGELOG.md b/packages/scripts/CHANGELOG.md
index adaf85dc90af5..3ff2f06c87ae3 100644
--- a/packages/scripts/CHANGELOG.md
+++ b/packages/scripts/CHANGELOG.md
@@ -2,6 +2,10 @@
## Unreleased
+### Bug Fixes
+
+- Bring back support for SVG files in CSS ([#34394](https://github.com/WordPress/gutenberg/pull/34394)). It wasn't correctly migrated when integrating webpack v5.
+
## 18.0.0 (2021-08-23)
### Breaking Changes
diff --git a/packages/scripts/config/webpack.config.js b/packages/scripts/config/webpack.config.js
index 86ed99807d881..5bbc0a43e18b9 100644
--- a/packages/scripts/config/webpack.config.js
+++ b/packages/scripts/config/webpack.config.js
@@ -184,9 +184,15 @@ const config = {
},
{
test: /\.svg$/,
+ issuer: /\.jsx?$/,
use: [ '@svgr/webpack', 'url-loader' ],
type: 'javascript/auto',
},
+ {
+ test: /\.svg$/,
+ issuer: /\.(sc|sa|c)ss$/,
+ type: 'asset/inline',
+ },
{
test: /\.(bmp|png|jpe?g|gif)$/i,
type: 'asset/resource',