@wordpress/block-editor 11.3.2 → 11.3.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (86) hide show
  1. package/README.md +4 -4
  2. package/build/components/block-actions/index.js +2 -7
  3. package/build/components/block-actions/index.js.map +1 -1
  4. package/build/components/block-alignment-control/use-available-alignments.js +5 -3
  5. package/build/components/block-alignment-control/use-available-alignments.js.map +1 -1
  6. package/build/components/block-tools/selected-block-popover.js +2 -2
  7. package/build/components/block-tools/selected-block-popover.js.map +1 -1
  8. package/build/components/off-canvas-editor/block-contents.js +2 -2
  9. package/build/components/off-canvas-editor/block-contents.js.map +1 -1
  10. package/build/components/provider/index.js +2 -2
  11. package/build/components/provider/index.js.map +1 -1
  12. package/build/components/url-popover/index.js +6 -1
  13. package/build/components/url-popover/index.js.map +1 -1
  14. package/build/hooks/dimensions.js +2 -2
  15. package/build/hooks/dimensions.js.map +1 -1
  16. package/build/hooks/metadata.js +6 -0
  17. package/build/hooks/metadata.js.map +1 -1
  18. package/build/hooks/position.js +6 -1
  19. package/build/hooks/position.js.map +1 -1
  20. package/build/index.js +6 -6
  21. package/build/index.js.map +1 -1
  22. package/build/layouts/flow.js +23 -2
  23. package/build/layouts/flow.js.map +1 -1
  24. package/build/lock-unlock.js +19 -0
  25. package/build/lock-unlock.js.map +1 -0
  26. package/build/{experiments.js → private-apis.js} +9 -19
  27. package/build/private-apis.js.map +1 -0
  28. package/build/{experiments.native.js → private-apis.native.js} +9 -19
  29. package/build/private-apis.native.js.map +1 -0
  30. package/build/store/index.js +3 -3
  31. package/build/store/index.js.map +1 -1
  32. package/build-module/components/block-actions/index.js +2 -7
  33. package/build-module/components/block-actions/index.js.map +1 -1
  34. package/build-module/components/block-alignment-control/use-available-alignments.js +5 -3
  35. package/build-module/components/block-alignment-control/use-available-alignments.js.map +1 -1
  36. package/build-module/components/block-tools/selected-block-popover.js +1 -1
  37. package/build-module/components/block-tools/selected-block-popover.js.map +1 -1
  38. package/build-module/components/off-canvas-editor/block-contents.js +1 -1
  39. package/build-module/components/off-canvas-editor/block-contents.js.map +1 -1
  40. package/build-module/components/provider/index.js +1 -1
  41. package/build-module/components/provider/index.js.map +1 -1
  42. package/build-module/components/url-popover/index.js +6 -2
  43. package/build-module/components/url-popover/index.js.map +1 -1
  44. package/build-module/hooks/dimensions.js +1 -1
  45. package/build-module/hooks/dimensions.js.map +1 -1
  46. package/build-module/hooks/metadata.js +6 -0
  47. package/build-module/hooks/metadata.js.map +1 -1
  48. package/build-module/hooks/position.js +5 -1
  49. package/build-module/hooks/position.js.map +1 -1
  50. package/build-module/index.js +1 -1
  51. package/build-module/index.js.map +1 -1
  52. package/build-module/layouts/flow.js +23 -2
  53. package/build-module/layouts/flow.js.map +1 -1
  54. package/build-module/lock-unlock.js +9 -0
  55. package/build-module/lock-unlock.js.map +1 -0
  56. package/build-module/private-apis.js +17 -0
  57. package/build-module/private-apis.js.map +1 -0
  58. package/build-module/private-apis.native.js +15 -0
  59. package/build-module/private-apis.native.js.map +1 -0
  60. package/build-module/store/index.js +1 -1
  61. package/build-module/store/index.js.map +1 -1
  62. package/package.json +13 -13
  63. package/src/components/block-actions/index.js +0 -9
  64. package/src/components/block-alignment-control/use-available-alignments.js +17 -12
  65. package/src/components/block-tools/selected-block-popover.js +1 -1
  66. package/src/components/off-canvas-editor/block-contents.js +1 -1
  67. package/src/components/provider/index.js +1 -1
  68. package/src/components/url-popover/index.js +8 -2
  69. package/src/hooks/dimensions.js +1 -1
  70. package/src/hooks/metadata.js +4 -0
  71. package/src/hooks/position.js +7 -1
  72. package/src/index.js +1 -1
  73. package/src/layouts/flow.js +16 -1
  74. package/src/lock-unlock.js +10 -0
  75. package/src/private-apis.js +17 -0
  76. package/src/private-apis.native.js +15 -0
  77. package/src/store/index.js +1 -1
  78. package/tsconfig.json +20 -1
  79. package/build/experiments.js.map +0 -1
  80. package/build/experiments.native.js.map +0 -1
  81. package/build-module/experiments.js +0 -25
  82. package/build-module/experiments.js.map +0 -1
  83. package/build-module/experiments.native.js +0 -23
  84. package/build-module/experiments.native.js.map +0 -1
  85. package/src/experiments.js +0 -27
  86. package/src/experiments.native.js +0 -25
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/block-editor/src/layouts/flow.js"],"names":["__","getBlockGapCSS","getAlignmentsInfo","getGapCSSValue","shouldSkipSerialization","name","label","inspectorControls","DefaultLayoutInspectorControls","toolBarControls","DefaultLayoutToolbarControls","getLayoutStyle","selector","style","blockName","hasBlockGapSupport","layoutDefinitions","blockGapStyleValue","spacing","blockGap","blockGapValue","top","output","getOrientation","getAlignments","layout","alignmentInfo","alignments","undefined","includes","unshift","map","alignment","info","none"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,EAAT,QAAmB,iBAAnB;AAEA;AACA;AACA;;AACA,SAASC,cAAT,EAAyBC,iBAAzB,QAAkD,SAAlD;AACA,SAASC,cAAT,QAA+B,cAA/B;AACA,SAASC,uBAAT,QAAwC,gBAAxC;AAEA,eAAe;AACdC,EAAAA,IAAI,EAAE,SADQ;AAEdC,EAAAA,KAAK,EAAEN,EAAE,CAAE,MAAF,CAFK;AAGdO,EAAAA,iBAAiB,EAAE,SAASC,8BAAT,GAA0C;AAC5D,WAAO,IAAP;AACA,GALa;AAMdC,EAAAA,eAAe,EAAE,SAASC,4BAAT,GAAwC;AACxD,WAAO,IAAP;AACA,GARa;AASdC,EAAAA,cAAc,EAAE,SAASA,cAAT,OAMZ;AAAA;;AAAA,QANqC;AACxCC,MAAAA,QADwC;AAExCC,MAAAA,KAFwC;AAGxCC,MAAAA,SAHwC;AAIxCC,MAAAA,kBAJwC;AAKxCC,MAAAA;AALwC,KAMrC;AACH,UAAMC,kBAAkB,GAAGd,cAAc,CAAEU,KAAF,aAAEA,KAAF,yCAAEA,KAAK,CAAEK,OAAT,mDAAE,eAAgBC,QAAlB,CAAzC,CADG,CAGH;AACA;;AACA,QAAIC,aAAa,GAAG,EAApB;;AACA,QAAK,CAAEhB,uBAAuB,CAAEU,SAAF,EAAa,SAAb,EAAwB,UAAxB,CAA9B,EAAqE;AACpE;AACA,UAAKG,kBAAL,aAAKA,kBAAL,eAAKA,kBAAkB,CAAEI,GAAzB,EAA+B;AAC9BD,QAAAA,aAAa,GAAGjB,cAAc,CAAEc,kBAAF,aAAEA,kBAAF,uBAAEA,kBAAkB,CAAEI,GAAtB,CAA9B;AACA,OAFD,MAEO,IAAK,OAAOJ,kBAAP,KAA8B,QAAnC,EAA8C;AACpDG,QAAAA,aAAa,GAAGjB,cAAc,CAAEc,kBAAF,CAA9B;AACA;AACD;;AAED,QAAIK,MAAM,GAAG,EAAb,CAfG,CAiBH;;AACA,QAAKP,kBAAkB,IAAIK,aAA3B,EAA2C;AAC1CE,MAAAA,MAAM,IAAIrB,cAAc,CACvBW,QADuB,EAEvBI,iBAFuB,EAGvB,SAHuB,EAIvBI,aAJuB,CAAxB;AAMA;;AACD,WAAOE,MAAP;AACA,GA1Ca;;AA2CdC,EAAAA,cAAc,GAAG;AAChB,WAAO,UAAP;AACA,GA7Ca;;AA8CdC,EAAAA,aAAa,CAAEC,MAAF,EAAW;AACvB,UAAMC,aAAa,GAAGxB,iBAAiB,CAAEuB,MAAF,CAAvC;;AACA,QAAKA,MAAM,CAACE,UAAP,KAAsBC,SAA3B,EAAuC;AACtC,UAAK,CAAEH,MAAM,CAACE,UAAP,CAAkBE,QAAlB,CAA4B,MAA5B,CAAP,EAA8C;AAC7CJ,QAAAA,MAAM,CAACE,UAAP,CAAkBG,OAAlB,CAA2B,MAA3B;AACA;;AACD,aAAOL,MAAM,CAACE,UAAP,CAAkBI,GAAlB,CAAyBC,SAAF,KAAmB;AAChD3B,QAAAA,IAAI,EAAE2B,SAD0C;AAEhDC,QAAAA,IAAI,EAAEP,aAAa,CAAEM,SAAF;AAF6B,OAAnB,CAAvB,CAAP;AAIA;;AAED,UAAML,UAAU,GAAG,CAClB;AAAEtB,MAAAA,IAAI,EAAE;AAAR,KADkB,EAElB;AAAEA,MAAAA,IAAI,EAAE;AAAR,KAFkB,EAGlB;AAAEA,MAAAA,IAAI,EAAE;AAAR,KAHkB,CAAnB;AAMAsB,IAAAA,UAAU,CAACG,OAAX,CAAoB;AAAEzB,MAAAA,IAAI,EAAE,MAAR;AAAgB4B,MAAAA,IAAI,EAAEP,aAAa,CAACQ;AAApC,KAApB;AAEA,WAAOP,UAAP;AACA;;AAnEa,CAAf","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport { getBlockGapCSS, getAlignmentsInfo } from './utils';\nimport { getGapCSSValue } from '../hooks/gap';\nimport { shouldSkipSerialization } from '../hooks/utils';\n\nexport default {\n\tname: 'default',\n\tlabel: __( 'Flow' ),\n\tinspectorControls: function DefaultLayoutInspectorControls() {\n\t\treturn null;\n\t},\n\ttoolBarControls: function DefaultLayoutToolbarControls() {\n\t\treturn null;\n\t},\n\tgetLayoutStyle: function getLayoutStyle( {\n\t\tselector,\n\t\tstyle,\n\t\tblockName,\n\t\thasBlockGapSupport,\n\t\tlayoutDefinitions,\n\t} ) {\n\t\tconst blockGapStyleValue = getGapCSSValue( style?.spacing?.blockGap );\n\n\t\t// If a block's block.json skips serialization for spacing or\n\t\t// spacing.blockGap, don't apply the user-defined value to the styles.\n\t\tlet blockGapValue = '';\n\t\tif ( ! shouldSkipSerialization( blockName, 'spacing', 'blockGap' ) ) {\n\t\t\t// If an object is provided only use the 'top' value for this kind of gap.\n\t\t\tif ( blockGapStyleValue?.top ) {\n\t\t\t\tblockGapValue = getGapCSSValue( blockGapStyleValue?.top );\n\t\t\t} else if ( typeof blockGapStyleValue === 'string' ) {\n\t\t\t\tblockGapValue = getGapCSSValue( blockGapStyleValue );\n\t\t\t}\n\t\t}\n\n\t\tlet output = '';\n\n\t\t// Output blockGap styles based on rules contained in layout definitions in theme.json.\n\t\tif ( hasBlockGapSupport && blockGapValue ) {\n\t\t\toutput += getBlockGapCSS(\n\t\t\t\tselector,\n\t\t\t\tlayoutDefinitions,\n\t\t\t\t'default',\n\t\t\t\tblockGapValue\n\t\t\t);\n\t\t}\n\t\treturn output;\n\t},\n\tgetOrientation() {\n\t\treturn 'vertical';\n\t},\n\tgetAlignments( layout ) {\n\t\tconst alignmentInfo = getAlignmentsInfo( layout );\n\t\tif ( layout.alignments !== undefined ) {\n\t\t\tif ( ! layout.alignments.includes( 'none' ) ) {\n\t\t\t\tlayout.alignments.unshift( 'none' );\n\t\t\t}\n\t\t\treturn layout.alignments.map( ( alignment ) => ( {\n\t\t\t\tname: alignment,\n\t\t\t\tinfo: alignmentInfo[ alignment ],\n\t\t\t} ) );\n\t\t}\n\n\t\tconst alignments = [\n\t\t\t{ name: 'left' },\n\t\t\t{ name: 'center' },\n\t\t\t{ name: 'right' },\n\t\t];\n\n\t\talignments.unshift( { name: 'none', info: alignmentInfo.none } );\n\n\t\treturn alignments;\n\t},\n};\n"]}
1
+ {"version":3,"sources":["@wordpress/block-editor/src/layouts/flow.js"],"names":["__","getBlockGapCSS","getAlignmentsInfo","getGapCSSValue","shouldSkipSerialization","name","label","inspectorControls","DefaultLayoutInspectorControls","toolBarControls","DefaultLayoutToolbarControls","getLayoutStyle","selector","style","blockName","hasBlockGapSupport","layoutDefinitions","blockGapStyleValue","spacing","blockGap","blockGapValue","top","output","getOrientation","getAlignments","layout","isBlockBasedTheme","alignmentInfo","alignments","undefined","includes","unshift","map","alignment","info","contentSize","wideSize","wide","none"],"mappings":"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","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport { getBlockGapCSS, getAlignmentsInfo } from './utils';\nimport { getGapCSSValue } from '../hooks/gap';\nimport { shouldSkipSerialization } from '../hooks/utils';\n\nexport default {\n\tname: 'default',\n\tlabel: __( 'Flow' ),\n\tinspectorControls: function DefaultLayoutInspectorControls() {\n\t\treturn null;\n\t},\n\ttoolBarControls: function DefaultLayoutToolbarControls() {\n\t\treturn null;\n\t},\n\tgetLayoutStyle: function getLayoutStyle( {\n\t\tselector,\n\t\tstyle,\n\t\tblockName,\n\t\thasBlockGapSupport,\n\t\tlayoutDefinitions,\n\t} ) {\n\t\tconst blockGapStyleValue = getGapCSSValue( style?.spacing?.blockGap );\n\n\t\t// If a block's block.json skips serialization for spacing or\n\t\t// spacing.blockGap, don't apply the user-defined value to the styles.\n\t\tlet blockGapValue = '';\n\t\tif ( ! shouldSkipSerialization( blockName, 'spacing', 'blockGap' ) ) {\n\t\t\t// If an object is provided only use the 'top' value for this kind of gap.\n\t\t\tif ( blockGapStyleValue?.top ) {\n\t\t\t\tblockGapValue = getGapCSSValue( blockGapStyleValue?.top );\n\t\t\t} else if ( typeof blockGapStyleValue === 'string' ) {\n\t\t\t\tblockGapValue = getGapCSSValue( blockGapStyleValue );\n\t\t\t}\n\t\t}\n\n\t\tlet output = '';\n\n\t\t// Output blockGap styles based on rules contained in layout definitions in theme.json.\n\t\tif ( hasBlockGapSupport && blockGapValue ) {\n\t\t\toutput += getBlockGapCSS(\n\t\t\t\tselector,\n\t\t\t\tlayoutDefinitions,\n\t\t\t\t'default',\n\t\t\t\tblockGapValue\n\t\t\t);\n\t\t}\n\t\treturn output;\n\t},\n\tgetOrientation() {\n\t\treturn 'vertical';\n\t},\n\tgetAlignments( layout, isBlockBasedTheme ) {\n\t\tconst alignmentInfo = getAlignmentsInfo( layout );\n\t\tif ( layout.alignments !== undefined ) {\n\t\t\tif ( ! layout.alignments.includes( 'none' ) ) {\n\t\t\t\tlayout.alignments.unshift( 'none' );\n\t\t\t}\n\t\t\treturn layout.alignments.map( ( alignment ) => ( {\n\t\t\t\tname: alignment,\n\t\t\t\tinfo: alignmentInfo[ alignment ],\n\t\t\t} ) );\n\t\t}\n\n\t\tconst alignments = [\n\t\t\t{ name: 'left' },\n\t\t\t{ name: 'center' },\n\t\t\t{ name: 'right' },\n\t\t];\n\n\t\t// This is for backwards compatibility with hybrid themes.\n\t\tif ( ! isBlockBasedTheme ) {\n\t\t\tconst { contentSize, wideSize } = layout;\n\t\t\tif ( contentSize ) {\n\t\t\t\talignments.unshift( { name: 'full' } );\n\t\t\t}\n\n\t\t\tif ( wideSize ) {\n\t\t\t\talignments.unshift( {\n\t\t\t\t\tname: 'wide',\n\t\t\t\t\tinfo: alignmentInfo.wide,\n\t\t\t\t} );\n\t\t\t}\n\t\t}\n\n\t\talignments.unshift( { name: 'none', info: alignmentInfo.none } );\n\n\t\treturn alignments;\n\t},\n};\n"]}
@@ -0,0 +1,9 @@
1
+ /**
2
+ * WordPress dependencies
3
+ */
4
+ import { __dangerousOptInToUnstableAPIsOnlyForCoreModules } from '@wordpress/private-apis';
5
+ export const {
6
+ lock,
7
+ unlock
8
+ } = __dangerousOptInToUnstableAPIsOnlyForCoreModules('I know using unstable features means my plugin or theme will inevitably break on the next WordPress release.', '@wordpress/block-editor');
9
+ //# sourceMappingURL=lock-unlock.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["@wordpress/block-editor/src/lock-unlock.js"],"names":["__dangerousOptInToUnstableAPIsOnlyForCoreModules","lock","unlock"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,gDAAT,QAAiE,yBAAjE;AAEA,OAAO,MAAM;AAAEC,EAAAA,IAAF;AAAQC,EAAAA;AAAR,IACZF,gDAAgD,CAC/C,8GAD+C,EAE/C,yBAF+C,CAD1C","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __dangerousOptInToUnstableAPIsOnlyForCoreModules } from '@wordpress/private-apis';\n\nexport const { lock, unlock } =\n\t__dangerousOptInToUnstableAPIsOnlyForCoreModules(\n\t\t'I know using unstable features means my plugin or theme will inevitably break on the next WordPress release.',\n\t\t'@wordpress/block-editor'\n\t);\n"]}
@@ -0,0 +1,17 @@
1
+ /**
2
+ * Internal dependencies
3
+ */
4
+ import * as globalStyles from './components/global-styles';
5
+ import { ExperimentalBlockEditorProvider } from './components/provider';
6
+ import { lock } from './lock-unlock';
7
+ import OffCanvasEditor from './components/off-canvas-editor';
8
+ /**
9
+ * Private @wordpress/block-editor APIs.
10
+ */
11
+
12
+ export const privateApis = {};
13
+ lock(privateApis, { ...globalStyles,
14
+ ExperimentalBlockEditorProvider,
15
+ OffCanvasEditor
16
+ });
17
+ //# sourceMappingURL=private-apis.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["@wordpress/block-editor/src/private-apis.js"],"names":["globalStyles","ExperimentalBlockEditorProvider","lock","OffCanvasEditor","privateApis"],"mappings":"AAAA;AACA;AACA;AACA,OAAO,KAAKA,YAAZ,MAA8B,4BAA9B;AACA,SAASC,+BAAT,QAAgD,uBAAhD;AACA,SAASC,IAAT,QAAqB,eAArB;AACA,OAAOC,eAAP,MAA4B,gCAA5B;AAEA;AACA;AACA;;AACA,OAAO,MAAMC,WAAW,GAAG,EAApB;AACPF,IAAI,CAAEE,WAAF,EAAe,EAClB,GAAGJ,YADe;AAElBC,EAAAA,+BAFkB;AAGlBE,EAAAA;AAHkB,CAAf,CAAJ","sourcesContent":["/**\n * Internal dependencies\n */\nimport * as globalStyles from './components/global-styles';\nimport { ExperimentalBlockEditorProvider } from './components/provider';\nimport { lock } from './lock-unlock';\nimport OffCanvasEditor from './components/off-canvas-editor';\n\n/**\n * Private @wordpress/block-editor APIs.\n */\nexport const privateApis = {};\nlock( privateApis, {\n\t...globalStyles,\n\tExperimentalBlockEditorProvider,\n\tOffCanvasEditor,\n} );\n"]}
@@ -0,0 +1,15 @@
1
+ /**
2
+ * Internal dependencies
3
+ */
4
+ import * as globalStyles from './components/global-styles';
5
+ import { ExperimentalBlockEditorProvider } from './components/provider';
6
+ import { lock } from './lock-unlock';
7
+ /**
8
+ * Private @wordpress/block-editor APIs.
9
+ */
10
+
11
+ export const privateApis = {};
12
+ lock(privateApis, { ...globalStyles,
13
+ ExperimentalBlockEditorProvider
14
+ });
15
+ //# sourceMappingURL=private-apis.native.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["@wordpress/block-editor/src/private-apis.native.js"],"names":["globalStyles","ExperimentalBlockEditorProvider","lock","privateApis"],"mappings":"AAAA;AACA;AACA;AACA,OAAO,KAAKA,YAAZ,MAA8B,4BAA9B;AACA,SAASC,+BAAT,QAAgD,uBAAhD;AACA,SAASC,IAAT,QAAqB,eAArB;AAEA;AACA;AACA;;AACA,OAAO,MAAMC,WAAW,GAAG,EAApB;AACPD,IAAI,CAAEC,WAAF,EAAe,EAClB,GAAGH,YADe;AAElBC,EAAAA;AAFkB,CAAf,CAAJ","sourcesContent":["/**\n * Internal dependencies\n */\nimport * as globalStyles from './components/global-styles';\nimport { ExperimentalBlockEditorProvider } from './components/provider';\nimport { lock } from './lock-unlock';\n\n/**\n * Private @wordpress/block-editor APIs.\n */\nexport const privateApis = {};\nlock( privateApis, {\n\t...globalStyles,\n\tExperimentalBlockEditorProvider,\n} );\n"]}
@@ -12,7 +12,7 @@ import * as privateActions from './private-actions';
12
12
  import * as privateSelectors from './private-selectors';
13
13
  import * as actions from './actions';
14
14
  import { STORE_NAME } from './constants';
15
- import { unlock } from '../experiments';
15
+ import { unlock } from '../lock-unlock';
16
16
  /**
17
17
  * Block editor data store configuration.
18
18
  *
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/block-editor/src/store/index.js"],"names":["createReduxStore","registerStore","reducer","selectors","privateActions","privateSelectors","actions","STORE_NAME","unlock","storeConfig","store","persist","registeredStore","registerPrivateActions","registerPrivateSelectors"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,gBAAT,EAA2BC,aAA3B,QAAgD,iBAAhD;AAEA;AACA;AACA;;AACA,OAAOC,OAAP,MAAoB,WAApB;AACA,OAAO,KAAKC,SAAZ,MAA2B,aAA3B;AACA,OAAO,KAAKC,cAAZ,MAAgC,mBAAhC;AACA,OAAO,KAAKC,gBAAZ,MAAkC,qBAAlC;AACA,OAAO,KAAKC,OAAZ,MAAyB,WAAzB;AACA,SAASC,UAAT,QAA2B,aAA3B;AACA,SAASC,MAAT,QAAuB,gBAAvB;AAEA;AACA;AACA;AACA;AACA;;AACA,OAAO,MAAMC,WAAW,GAAG;AAC1BP,EAAAA,OAD0B;AAE1BC,EAAAA,SAF0B;AAG1BG,EAAAA;AAH0B,CAApB;AAMP;AACA;AACA;AACA;AACA;;AACA,OAAO,MAAMI,KAAK,GAAGV,gBAAgB,CAAEO,UAAF,EAAc,EAClD,GAAGE,WAD+C;AAElDE,EAAAA,OAAO,EAAE,CAAE,aAAF;AAFyC,CAAd,CAA9B,C,CAKP;AACA;;AACA,MAAMC,eAAe,GAAGX,aAAa,CAAEM,UAAF,EAAc,EAClD,GAAGE,WAD+C;AAElDE,EAAAA,OAAO,EAAE,CAAE,aAAF;AAFyC,CAAd,CAArC;AAIAH,MAAM,CAAEI,eAAF,CAAN,CAA0BC,sBAA1B,CAAkDT,cAAlD;AACAI,MAAM,CAAEI,eAAF,CAAN,CAA0BE,wBAA1B,CAAoDT,gBAApD","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { createReduxStore, registerStore } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport reducer from './reducer';\nimport * as selectors from './selectors';\nimport * as privateActions from './private-actions';\nimport * as privateSelectors from './private-selectors';\nimport * as actions from './actions';\nimport { STORE_NAME } from './constants';\nimport { unlock } from '../experiments';\n\n/**\n * Block editor data store configuration.\n *\n * @see https://github.com/WordPress/gutenberg/blob/HEAD/packages/data/README.md#registerStore\n */\nexport const storeConfig = {\n\treducer,\n\tselectors,\n\tactions,\n};\n\n/**\n * Store definition for the block editor namespace.\n *\n * @see https://github.com/WordPress/gutenberg/blob/HEAD/packages/data/README.md#createReduxStore\n */\nexport const store = createReduxStore( STORE_NAME, {\n\t...storeConfig,\n\tpersist: [ 'preferences' ],\n} );\n\n// We will be able to use the `register` function once we switch\n// the \"preferences\" persistence to use the new preferences package.\nconst registeredStore = registerStore( STORE_NAME, {\n\t...storeConfig,\n\tpersist: [ 'preferences' ],\n} );\nunlock( registeredStore ).registerPrivateActions( privateActions );\nunlock( registeredStore ).registerPrivateSelectors( privateSelectors );\n"]}
1
+ {"version":3,"sources":["@wordpress/block-editor/src/store/index.js"],"names":["createReduxStore","registerStore","reducer","selectors","privateActions","privateSelectors","actions","STORE_NAME","unlock","storeConfig","store","persist","registeredStore","registerPrivateActions","registerPrivateSelectors"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,gBAAT,EAA2BC,aAA3B,QAAgD,iBAAhD;AAEA;AACA;AACA;;AACA,OAAOC,OAAP,MAAoB,WAApB;AACA,OAAO,KAAKC,SAAZ,MAA2B,aAA3B;AACA,OAAO,KAAKC,cAAZ,MAAgC,mBAAhC;AACA,OAAO,KAAKC,gBAAZ,MAAkC,qBAAlC;AACA,OAAO,KAAKC,OAAZ,MAAyB,WAAzB;AACA,SAASC,UAAT,QAA2B,aAA3B;AACA,SAASC,MAAT,QAAuB,gBAAvB;AAEA;AACA;AACA;AACA;AACA;;AACA,OAAO,MAAMC,WAAW,GAAG;AAC1BP,EAAAA,OAD0B;AAE1BC,EAAAA,SAF0B;AAG1BG,EAAAA;AAH0B,CAApB;AAMP;AACA;AACA;AACA;AACA;;AACA,OAAO,MAAMI,KAAK,GAAGV,gBAAgB,CAAEO,UAAF,EAAc,EAClD,GAAGE,WAD+C;AAElDE,EAAAA,OAAO,EAAE,CAAE,aAAF;AAFyC,CAAd,CAA9B,C,CAKP;AACA;;AACA,MAAMC,eAAe,GAAGX,aAAa,CAAEM,UAAF,EAAc,EAClD,GAAGE,WAD+C;AAElDE,EAAAA,OAAO,EAAE,CAAE,aAAF;AAFyC,CAAd,CAArC;AAIAH,MAAM,CAAEI,eAAF,CAAN,CAA0BC,sBAA1B,CAAkDT,cAAlD;AACAI,MAAM,CAAEI,eAAF,CAAN,CAA0BE,wBAA1B,CAAoDT,gBAApD","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { createReduxStore, registerStore } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport reducer from './reducer';\nimport * as selectors from './selectors';\nimport * as privateActions from './private-actions';\nimport * as privateSelectors from './private-selectors';\nimport * as actions from './actions';\nimport { STORE_NAME } from './constants';\nimport { unlock } from '../lock-unlock';\n\n/**\n * Block editor data store configuration.\n *\n * @see https://github.com/WordPress/gutenberg/blob/HEAD/packages/data/README.md#registerStore\n */\nexport const storeConfig = {\n\treducer,\n\tselectors,\n\tactions,\n};\n\n/**\n * Store definition for the block editor namespace.\n *\n * @see https://github.com/WordPress/gutenberg/blob/HEAD/packages/data/README.md#createReduxStore\n */\nexport const store = createReduxStore( STORE_NAME, {\n\t...storeConfig,\n\tpersist: [ 'preferences' ],\n} );\n\n// We will be able to use the `register` function once we switch\n// the \"preferences\" persistence to use the new preferences package.\nconst registeredStore = registerStore( STORE_NAME, {\n\t...storeConfig,\n\tpersist: [ 'preferences' ],\n} );\nunlock( registeredStore ).registerPrivateActions( privateActions );\nunlock( registeredStore ).registerPrivateSelectors( privateSelectors );\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wordpress/block-editor",
3
- "version": "11.3.2",
3
+ "version": "11.3.3",
4
4
  "description": "Generic block editor.",
5
5
  "author": "The WordPress Contributors",
6
6
  "license": "GPL-2.0-or-later",
@@ -36,26 +36,26 @@
36
36
  "@wordpress/a11y": "^3.26.1",
37
37
  "@wordpress/api-fetch": "^6.23.1",
38
38
  "@wordpress/blob": "^3.26.1",
39
- "@wordpress/blocks": "^12.3.1",
40
- "@wordpress/components": "^23.3.1",
41
- "@wordpress/compose": "^6.3.1",
42
- "@wordpress/data": "^8.3.1",
43
- "@wordpress/date": "^4.26.1",
39
+ "@wordpress/blocks": "^12.3.2",
40
+ "@wordpress/components": "^23.3.2",
41
+ "@wordpress/compose": "^6.3.2",
42
+ "@wordpress/data": "^8.3.2",
43
+ "@wordpress/date": "^4.26.2",
44
44
  "@wordpress/deprecated": "^3.26.1",
45
45
  "@wordpress/dom": "^3.26.1",
46
46
  "@wordpress/element": "^5.3.1",
47
47
  "@wordpress/escape-html": "^2.26.1",
48
- "@wordpress/experiments": "^0.8.1",
49
48
  "@wordpress/hooks": "^3.26.1",
50
49
  "@wordpress/html-entities": "^3.26.1",
51
50
  "@wordpress/i18n": "^4.26.1",
52
51
  "@wordpress/icons": "^9.17.1",
53
52
  "@wordpress/is-shallow-equal": "^4.26.1",
54
- "@wordpress/keyboard-shortcuts": "^4.3.1",
55
- "@wordpress/keycodes": "^3.26.1",
56
- "@wordpress/notices": "^3.26.1",
57
- "@wordpress/preferences": "^3.3.1",
58
- "@wordpress/rich-text": "^6.3.1",
53
+ "@wordpress/keyboard-shortcuts": "^4.3.2",
54
+ "@wordpress/keycodes": "^3.26.2",
55
+ "@wordpress/notices": "^3.26.2",
56
+ "@wordpress/preferences": "^3.3.2",
57
+ "@wordpress/private-apis": "^0.8.1",
58
+ "@wordpress/rich-text": "^6.3.2",
59
59
  "@wordpress/shortcode": "^3.26.1",
60
60
  "@wordpress/style-engine": "^1.9.1",
61
61
  "@wordpress/token-list": "^2.26.1",
@@ -83,5 +83,5 @@
83
83
  "publishConfig": {
84
84
  "access": "public"
85
85
  },
86
- "gitHead": "3eb2c536278d5a17f698b9c378fe3db746a89622"
86
+ "gitHead": "1bf01c01a8238ce3a681ad1e517f86033818b78d"
87
87
  }
@@ -58,8 +58,6 @@ export default function BlockActions( {
58
58
  setBlockMovingClientId,
59
59
  setNavigationMode,
60
60
  selectBlock,
61
- clearSelectedBlock,
62
- multiSelect,
63
61
  } = useDispatch( blockEditorStore );
64
62
 
65
63
  const notifyCopy = useNotifyCopy();
@@ -134,13 +132,6 @@ export default function BlockActions( {
134
132
  },
135
133
  async onPasteStyles() {
136
134
  await pasteStyles( blocks );
137
-
138
- // Need to reselect the block(s) in order for optional tool panel control changes to register.
139
- clearSelectedBlock();
140
- multiSelect(
141
- blocks[ 0 ].clientId,
142
- blocks[ blocks.length - 1 ].clientId
143
- );
144
135
  },
145
136
  } );
146
137
  }
@@ -19,20 +19,25 @@ export default function useAvailableAlignments( controls = DEFAULT_CONTROLS ) {
19
19
  if ( ! controls.includes( 'none' ) ) {
20
20
  controls = [ 'none', ...controls ];
21
21
  }
22
- const { wideControlsEnabled = false, themeSupportsLayout } = useSelect(
23
- ( select ) => {
24
- const { getSettings } = select( blockEditorStore );
25
- const settings = getSettings();
26
- return {
27
- wideControlsEnabled: settings.alignWide,
28
- themeSupportsLayout: settings.supportsLayout,
29
- };
30
- },
31
- []
32
- );
22
+ const {
23
+ wideControlsEnabled = false,
24
+ themeSupportsLayout,
25
+ isBlockBasedTheme,
26
+ } = useSelect( ( select ) => {
27
+ const { getSettings } = select( blockEditorStore );
28
+ const settings = getSettings();
29
+ return {
30
+ wideControlsEnabled: settings.alignWide,
31
+ themeSupportsLayout: settings.supportsLayout,
32
+ isBlockBasedTheme: settings.__unstableIsBlockBasedTheme,
33
+ };
34
+ }, [] );
33
35
  const layout = useLayout();
34
36
  const layoutType = getLayoutType( layout?.type );
35
- const layoutAlignments = layoutType.getAlignments( layout );
37
+ const layoutAlignments = layoutType.getAlignments(
38
+ layout,
39
+ isBlockBasedTheme
40
+ );
36
41
 
37
42
  if ( themeSupportsLayout ) {
38
43
  const alignments = layoutAlignments.filter(
@@ -21,7 +21,7 @@ import { store as blockEditorStore } from '../../store';
21
21
  import BlockPopover from '../block-popover';
22
22
  import useBlockToolbarPopoverProps from './use-block-toolbar-popover-props';
23
23
  import Inserter from '../inserter';
24
- import { unlock } from '../../experiments';
24
+ import { unlock } from '../../lock-unlock';
25
25
 
26
26
  function selector( select ) {
27
27
  const {
@@ -12,7 +12,7 @@ import { forwardRef, useEffect, useState } from '@wordpress/element';
12
12
  /**
13
13
  * Internal dependencies
14
14
  */
15
- import { unlock } from '../../experiments';
15
+ import { unlock } from '../../lock-unlock';
16
16
  import ListViewBlockSelectButton from './block-select-button';
17
17
  import BlockDraggable from '../block-draggable';
18
18
  import { store as blockEditorStore } from '../../store';
@@ -11,7 +11,7 @@ import withRegistryProvider from './with-registry-provider';
11
11
  import useBlockSync from './use-block-sync';
12
12
  import { store as blockEditorStore } from '../../store';
13
13
  import { BlockRefsProvider } from './block-refs-provider';
14
- import { unlock } from '../../experiments';
14
+ import { unlock } from '../../lock-unlock';
15
15
 
16
16
  /** @typedef {import('@wordpress/data').WPDataRegistry} WPDataRegistry */
17
17
 
@@ -6,7 +6,7 @@ import { useState } from '@wordpress/element';
6
6
  import {
7
7
  Button,
8
8
  Popover,
9
- __experimentalPopoverPositionToPlacement as positionToPlacement,
9
+ privateApis as componentsPrivateApis,
10
10
  } from '@wordpress/components';
11
11
  import { chevronDown } from '@wordpress/icons';
12
12
  import deprecated from '@wordpress/deprecated';
@@ -16,6 +16,11 @@ import deprecated from '@wordpress/deprecated';
16
16
  */
17
17
  import LinkViewer from './link-viewer';
18
18
  import LinkEditor from './link-editor';
19
+ import { unlock } from '../../lock-unlock';
20
+
21
+ const { __experimentalPopoverLegacyPositionToPlacement } = unlock(
22
+ componentsPrivateApis
23
+ );
19
24
 
20
25
  const DEFAULT_PLACEMENT = 'bottom';
21
26
 
@@ -46,7 +51,8 @@ function URLPopover( {
46
51
  if ( placement !== undefined ) {
47
52
  computedPlacement = placement;
48
53
  } else if ( position !== undefined ) {
49
- computedPlacement = positionToPlacement( position );
54
+ computedPlacement =
55
+ __experimentalPopoverLegacyPositionToPlacement( position );
50
56
  }
51
57
  computedPlacement = computedPlacement || DEFAULT_PLACEMENT;
52
58
 
@@ -59,7 +59,7 @@ import {
59
59
  } from './child-layout';
60
60
  import useSetting from '../components/use-setting';
61
61
  import { store as blockEditorStore } from '../store';
62
- import { unlock } from '../experiments';
62
+ import { unlock } from '../lock-unlock';
63
63
 
64
64
  export const DIMENSIONS_SUPPORT_KEY = 'dimensions';
65
65
  export const SPACING_SUPPORT_KEY = 'spacing';
@@ -7,6 +7,10 @@ import { getBlockSupport } from '@wordpress/blocks';
7
7
  const META_ATTRIBUTE_NAME = 'metadata';
8
8
 
9
9
  export function hasBlockMetadataSupport( blockType, feature = '' ) {
10
+ // Only core blocks are allowed to use __experimentalMetadata until the fetaure is stablised.
11
+ if ( ! blockType.name.startsWith( 'core/' ) ) {
12
+ return false;
13
+ }
10
14
  const support = getBlockSupport( blockType, '__experimentalMetadata' );
11
15
  return !! ( true === support || support?.[ feature ] );
12
16
  }
@@ -8,7 +8,10 @@ import classnames from 'classnames';
8
8
  */
9
9
  import { __, sprintf } from '@wordpress/i18n';
10
10
  import { getBlockSupport, hasBlockSupport } from '@wordpress/blocks';
11
- import { BaseControl, CustomSelectControl } from '@wordpress/components';
11
+ import {
12
+ BaseControl,
13
+ privateApis as componentsPrivateApis,
14
+ } from '@wordpress/components';
12
15
  import { createHigherOrderComponent, useInstanceId } from '@wordpress/compose';
13
16
  import { useSelect } from '@wordpress/data';
14
17
  import {
@@ -26,8 +29,11 @@ import BlockList from '../components/block-list';
26
29
  import useSetting from '../components/use-setting';
27
30
  import InspectorControls from '../components/inspector-controls';
28
31
  import { cleanEmptyObject } from './utils';
32
+ import { unlock } from '../lock-unlock';
29
33
  import { store as blockEditorStore } from '../store';
30
34
 
35
+ const { CustomSelectControl } = unlock( componentsPrivateApis );
36
+
31
37
  const POSITION_SUPPORT_KEY = 'position';
32
38
 
33
39
  const OPTION_CLASSNAME =
package/src/index.js CHANGED
@@ -20,4 +20,4 @@ export * from './elements';
20
20
  export * from './utils';
21
21
  export { storeConfig, store } from './store';
22
22
  export { SETTINGS_DEFAULTS } from './store/defaults';
23
- export { experiments } from './experiments';
23
+ export { privateApis } from './private-apis';
@@ -56,7 +56,7 @@ export default {
56
56
  getOrientation() {
57
57
  return 'vertical';
58
58
  },
59
- getAlignments( layout ) {
59
+ getAlignments( layout, isBlockBasedTheme ) {
60
60
  const alignmentInfo = getAlignmentsInfo( layout );
61
61
  if ( layout.alignments !== undefined ) {
62
62
  if ( ! layout.alignments.includes( 'none' ) ) {
@@ -74,6 +74,21 @@ export default {
74
74
  { name: 'right' },
75
75
  ];
76
76
 
77
+ // This is for backwards compatibility with hybrid themes.
78
+ if ( ! isBlockBasedTheme ) {
79
+ const { contentSize, wideSize } = layout;
80
+ if ( contentSize ) {
81
+ alignments.unshift( { name: 'full' } );
82
+ }
83
+
84
+ if ( wideSize ) {
85
+ alignments.unshift( {
86
+ name: 'wide',
87
+ info: alignmentInfo.wide,
88
+ } );
89
+ }
90
+ }
91
+
77
92
  alignments.unshift( { name: 'none', info: alignmentInfo.none } );
78
93
 
79
94
  return alignments;
@@ -0,0 +1,10 @@
1
+ /**
2
+ * WordPress dependencies
3
+ */
4
+ import { __dangerousOptInToUnstableAPIsOnlyForCoreModules } from '@wordpress/private-apis';
5
+
6
+ export const { lock, unlock } =
7
+ __dangerousOptInToUnstableAPIsOnlyForCoreModules(
8
+ 'I know using unstable features means my plugin or theme will inevitably break on the next WordPress release.',
9
+ '@wordpress/block-editor'
10
+ );
@@ -0,0 +1,17 @@
1
+ /**
2
+ * Internal dependencies
3
+ */
4
+ import * as globalStyles from './components/global-styles';
5
+ import { ExperimentalBlockEditorProvider } from './components/provider';
6
+ import { lock } from './lock-unlock';
7
+ import OffCanvasEditor from './components/off-canvas-editor';
8
+
9
+ /**
10
+ * Private @wordpress/block-editor APIs.
11
+ */
12
+ export const privateApis = {};
13
+ lock( privateApis, {
14
+ ...globalStyles,
15
+ ExperimentalBlockEditorProvider,
16
+ OffCanvasEditor,
17
+ } );
@@ -0,0 +1,15 @@
1
+ /**
2
+ * Internal dependencies
3
+ */
4
+ import * as globalStyles from './components/global-styles';
5
+ import { ExperimentalBlockEditorProvider } from './components/provider';
6
+ import { lock } from './lock-unlock';
7
+
8
+ /**
9
+ * Private @wordpress/block-editor APIs.
10
+ */
11
+ export const privateApis = {};
12
+ lock( privateApis, {
13
+ ...globalStyles,
14
+ ExperimentalBlockEditorProvider,
15
+ } );
@@ -12,7 +12,7 @@ import * as privateActions from './private-actions';
12
12
  import * as privateSelectors from './private-selectors';
13
13
  import * as actions from './actions';
14
14
  import { STORE_NAME } from './constants';
15
- import { unlock } from '../experiments';
15
+ import { unlock } from '../lock-unlock';
16
16
 
17
17
  /**
18
18
  * Block editor data store configuration.
package/tsconfig.json CHANGED
@@ -5,10 +5,29 @@
5
5
  "declarationDir": "build-types"
6
6
  },
7
7
  "references": [
8
+ { "path": "../a11y" },
9
+ { "path": "../api-fetch" },
10
+ { "path": "../blob" },
11
+ { "path": "../components" },
12
+ { "path": "../compose" },
13
+ { "path": "../data" },
14
+ { "path": "../date" },
8
15
  { "path": "../deprecated" },
16
+ { "path": "../dom" },
9
17
  { "path": "../element" },
18
+ { "path": "../escape-html" },
19
+ { "path": "../private-apis" },
10
20
  { "path": "../hooks" },
11
- { "path": "../data" }
21
+ { "path": "../html-entities" },
22
+ { "path": "../i18n" },
23
+ { "path": "../icons" },
24
+ { "path": "../is-shallow-equal" },
25
+ { "path": "../keycodes" },
26
+ { "path": "../style-engine" },
27
+ { "path": "../token-list" },
28
+ { "path": "../url" },
29
+ { "path": "../warning" },
30
+ { "path": "../wordcount" }
12
31
  ],
13
32
  // NOTE: This package is being progressively typed. You are encouraged to
14
33
  // expand this array with files which can be type-checked. At some point in
@@ -1 +0,0 @@
1
- {"version":3,"sources":["@wordpress/block-editor/src/experiments.js"],"names":["lock","unlock","experiments","globalStyles","ExperimentalBlockEditorProvider","OffCanvasEditor"],"mappings":";;;;;;;;;AAGA;;AAKA;;AACA;;AACA;;;;;;AAVA;AACA;AACA;;AAGA;AACA;AACA;AAKO,MAAM;AAAEA,EAAAA,IAAF;AAAQC,EAAAA;AAAR,IACZ,mEACC,8GADD,EAEC,yBAFD,CADM;AAMP;AACA;AACA;;;;AACO,MAAMC,WAAW,GAAG,EAApB;;AACPF,IAAI,CAAEE,WAAF,EAAe,EAClB,GAAGC,YADe;AAElBC,EAAAA,+BAA+B,EAA/BA,yCAFkB;AAGlBC,EAAAA,eAAe,EAAfA;AAHkB,CAAf,CAAJ","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __dangerousOptInToUnstableAPIsOnlyForCoreModules } from '@wordpress/experiments';\n\n/**\n * Internal dependencies\n */\nimport * as globalStyles from './components/global-styles';\nimport { ExperimentalBlockEditorProvider } from './components/provider';\nimport OffCanvasEditor from './components/off-canvas-editor';\n\nexport const { lock, unlock } =\n\t__dangerousOptInToUnstableAPIsOnlyForCoreModules(\n\t\t'I know using unstable features means my plugin or theme will inevitably break on the next WordPress release.',\n\t\t'@wordpress/block-editor'\n\t);\n\n/**\n * Experimental @wordpress/block-editor APIs.\n */\nexport const experiments = {};\nlock( experiments, {\n\t...globalStyles,\n\tExperimentalBlockEditorProvider,\n\tOffCanvasEditor,\n} );\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["@wordpress/block-editor/src/experiments.native.js"],"names":["lock","unlock","experiments","globalStyles","ExperimentalBlockEditorProvider"],"mappings":";;;;;;;AAGA;;AAKA;;AACA;;;;;;AATA;AACA;AACA;;AAGA;AACA;AACA;AAIO,MAAM;AAAEA,EAAAA,IAAF;AAAQC,EAAAA;AAAR,IACZ,mEACC,8GADD,EAEC,yBAFD,CADM;AAMP;AACA;AACA;;;;AACO,MAAMC,WAAW,GAAG,EAApB;;AACPF,IAAI,CAAEE,WAAF,EAAe,EAClB,GAAGC,YADe;AAElBC,EAAAA,+BAA+B,EAA/BA;AAFkB,CAAf,CAAJ","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __dangerousOptInToUnstableAPIsOnlyForCoreModules } from '@wordpress/experiments';\n\n/**\n * Internal dependencies\n */\nimport * as globalStyles from './components/global-styles';\nimport { ExperimentalBlockEditorProvider } from './components/provider';\n\nexport const { lock, unlock } =\n\t__dangerousOptInToUnstableAPIsOnlyForCoreModules(\n\t\t'I know using unstable features means my plugin or theme will inevitably break on the next WordPress release.',\n\t\t'@wordpress/block-editor'\n\t);\n\n/**\n * Experimental @wordpress/block-editor APIs.\n */\nexport const experiments = {};\nlock( experiments, {\n\t...globalStyles,\n\tExperimentalBlockEditorProvider,\n} );\n"]}
@@ -1,25 +0,0 @@
1
- /**
2
- * WordPress dependencies
3
- */
4
- import { __dangerousOptInToUnstableAPIsOnlyForCoreModules } from '@wordpress/experiments';
5
- /**
6
- * Internal dependencies
7
- */
8
-
9
- import * as globalStyles from './components/global-styles';
10
- import { ExperimentalBlockEditorProvider } from './components/provider';
11
- import OffCanvasEditor from './components/off-canvas-editor';
12
- export const {
13
- lock,
14
- unlock
15
- } = __dangerousOptInToUnstableAPIsOnlyForCoreModules('I know using unstable features means my plugin or theme will inevitably break on the next WordPress release.', '@wordpress/block-editor');
16
- /**
17
- * Experimental @wordpress/block-editor APIs.
18
- */
19
-
20
- export const experiments = {};
21
- lock(experiments, { ...globalStyles,
22
- ExperimentalBlockEditorProvider,
23
- OffCanvasEditor
24
- });
25
- //# sourceMappingURL=experiments.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["@wordpress/block-editor/src/experiments.js"],"names":["__dangerousOptInToUnstableAPIsOnlyForCoreModules","globalStyles","ExperimentalBlockEditorProvider","OffCanvasEditor","lock","unlock","experiments"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,gDAAT,QAAiE,wBAAjE;AAEA;AACA;AACA;;AACA,OAAO,KAAKC,YAAZ,MAA8B,4BAA9B;AACA,SAASC,+BAAT,QAAgD,uBAAhD;AACA,OAAOC,eAAP,MAA4B,gCAA5B;AAEA,OAAO,MAAM;AAAEC,EAAAA,IAAF;AAAQC,EAAAA;AAAR,IACZL,gDAAgD,CAC/C,8GAD+C,EAE/C,yBAF+C,CAD1C;AAMP;AACA;AACA;;AACA,OAAO,MAAMM,WAAW,GAAG,EAApB;AACPF,IAAI,CAAEE,WAAF,EAAe,EAClB,GAAGL,YADe;AAElBC,EAAAA,+BAFkB;AAGlBC,EAAAA;AAHkB,CAAf,CAAJ","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __dangerousOptInToUnstableAPIsOnlyForCoreModules } from '@wordpress/experiments';\n\n/**\n * Internal dependencies\n */\nimport * as globalStyles from './components/global-styles';\nimport { ExperimentalBlockEditorProvider } from './components/provider';\nimport OffCanvasEditor from './components/off-canvas-editor';\n\nexport const { lock, unlock } =\n\t__dangerousOptInToUnstableAPIsOnlyForCoreModules(\n\t\t'I know using unstable features means my plugin or theme will inevitably break on the next WordPress release.',\n\t\t'@wordpress/block-editor'\n\t);\n\n/**\n * Experimental @wordpress/block-editor APIs.\n */\nexport const experiments = {};\nlock( experiments, {\n\t...globalStyles,\n\tExperimentalBlockEditorProvider,\n\tOffCanvasEditor,\n} );\n"]}
@@ -1,23 +0,0 @@
1
- /**
2
- * WordPress dependencies
3
- */
4
- import { __dangerousOptInToUnstableAPIsOnlyForCoreModules } from '@wordpress/experiments';
5
- /**
6
- * Internal dependencies
7
- */
8
-
9
- import * as globalStyles from './components/global-styles';
10
- import { ExperimentalBlockEditorProvider } from './components/provider';
11
- export const {
12
- lock,
13
- unlock
14
- } = __dangerousOptInToUnstableAPIsOnlyForCoreModules('I know using unstable features means my plugin or theme will inevitably break on the next WordPress release.', '@wordpress/block-editor');
15
- /**
16
- * Experimental @wordpress/block-editor APIs.
17
- */
18
-
19
- export const experiments = {};
20
- lock(experiments, { ...globalStyles,
21
- ExperimentalBlockEditorProvider
22
- });
23
- //# sourceMappingURL=experiments.native.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["@wordpress/block-editor/src/experiments.native.js"],"names":["__dangerousOptInToUnstableAPIsOnlyForCoreModules","globalStyles","ExperimentalBlockEditorProvider","lock","unlock","experiments"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,gDAAT,QAAiE,wBAAjE;AAEA;AACA;AACA;;AACA,OAAO,KAAKC,YAAZ,MAA8B,4BAA9B;AACA,SAASC,+BAAT,QAAgD,uBAAhD;AAEA,OAAO,MAAM;AAAEC,EAAAA,IAAF;AAAQC,EAAAA;AAAR,IACZJ,gDAAgD,CAC/C,8GAD+C,EAE/C,yBAF+C,CAD1C;AAMP;AACA;AACA;;AACA,OAAO,MAAMK,WAAW,GAAG,EAApB;AACPF,IAAI,CAAEE,WAAF,EAAe,EAClB,GAAGJ,YADe;AAElBC,EAAAA;AAFkB,CAAf,CAAJ","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __dangerousOptInToUnstableAPIsOnlyForCoreModules } from '@wordpress/experiments';\n\n/**\n * Internal dependencies\n */\nimport * as globalStyles from './components/global-styles';\nimport { ExperimentalBlockEditorProvider } from './components/provider';\n\nexport const { lock, unlock } =\n\t__dangerousOptInToUnstableAPIsOnlyForCoreModules(\n\t\t'I know using unstable features means my plugin or theme will inevitably break on the next WordPress release.',\n\t\t'@wordpress/block-editor'\n\t);\n\n/**\n * Experimental @wordpress/block-editor APIs.\n */\nexport const experiments = {};\nlock( experiments, {\n\t...globalStyles,\n\tExperimentalBlockEditorProvider,\n} );\n"]}
@@ -1,27 +0,0 @@
1
- /**
2
- * WordPress dependencies
3
- */
4
- import { __dangerousOptInToUnstableAPIsOnlyForCoreModules } from '@wordpress/experiments';
5
-
6
- /**
7
- * Internal dependencies
8
- */
9
- import * as globalStyles from './components/global-styles';
10
- import { ExperimentalBlockEditorProvider } from './components/provider';
11
- import OffCanvasEditor from './components/off-canvas-editor';
12
-
13
- export const { lock, unlock } =
14
- __dangerousOptInToUnstableAPIsOnlyForCoreModules(
15
- 'I know using unstable features means my plugin or theme will inevitably break on the next WordPress release.',
16
- '@wordpress/block-editor'
17
- );
18
-
19
- /**
20
- * Experimental @wordpress/block-editor APIs.
21
- */
22
- export const experiments = {};
23
- lock( experiments, {
24
- ...globalStyles,
25
- ExperimentalBlockEditorProvider,
26
- OffCanvasEditor,
27
- } );
@@ -1,25 +0,0 @@
1
- /**
2
- * WordPress dependencies
3
- */
4
- import { __dangerousOptInToUnstableAPIsOnlyForCoreModules } from '@wordpress/experiments';
5
-
6
- /**
7
- * Internal dependencies
8
- */
9
- import * as globalStyles from './components/global-styles';
10
- import { ExperimentalBlockEditorProvider } from './components/provider';
11
-
12
- export const { lock, unlock } =
13
- __dangerousOptInToUnstableAPIsOnlyForCoreModules(
14
- 'I know using unstable features means my plugin or theme will inevitably break on the next WordPress release.',
15
- '@wordpress/block-editor'
16
- );
17
-
18
- /**
19
- * Experimental @wordpress/block-editor APIs.
20
- */
21
- export const experiments = {};
22
- lock( experiments, {
23
- ...globalStyles,
24
- ExperimentalBlockEditorProvider,
25
- } );