@wordpress/interface 6.9.0 → 8.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +12 -0
- package/build/components/complementary-area/index.js +11 -9
- package/build/components/complementary-area/index.js.map +1 -1
- package/build/components/complementary-area-header/index.js +4 -13
- package/build/components/complementary-area-header/index.js.map +1 -1
- package/build/components/complementary-area-more-menu-item/index.js.map +1 -1
- package/build/components/complementary-area-toggle/index.js +7 -6
- package/build/components/complementary-area-toggle/index.js.map +1 -1
- package/build/components/interface-skeleton/index.js +4 -10
- package/build/components/interface-skeleton/index.js.map +1 -1
- package/build/components/navigable-region/index.js +12 -4
- package/build/components/navigable-region/index.js.map +1 -1
- package/build/components/pinned-items/index.js.map +1 -1
- package/build/store/actions.js.map +1 -1
- package/build/store/deprecated.js.map +1 -1
- package/build/store/selectors.js.map +1 -1
- package/build-module/components/complementary-area/index.js +12 -12
- package/build-module/components/complementary-area/index.js.map +1 -1
- package/build-module/components/complementary-area-header/index.js +5 -16
- package/build-module/components/complementary-area-header/index.js.map +1 -1
- package/build-module/components/complementary-area-more-menu-item/index.js.map +1 -1
- package/build-module/components/complementary-area-toggle/index.js +7 -5
- package/build-module/components/complementary-area-toggle/index.js.map +1 -1
- package/build-module/components/interface-skeleton/index.js +7 -14
- package/build-module/components/interface-skeleton/index.js.map +1 -1
- package/build-module/components/navigable-region/index.js +11 -3
- package/build-module/components/navigable-region/index.js.map +1 -1
- package/build-module/components/pinned-items/index.js.map +1 -1
- package/build-module/store/actions.js.map +1 -1
- package/build-module/store/deprecated.js.map +1 -1
- package/build-module/store/selectors.js.map +1 -1
- package/build-style/style-rtl.css +1 -35
- package/build-style/style.css +1 -35
- package/package.json +15 -15
- package/src/components/complementary-area/README.md +0 -8
- package/src/components/complementary-area/index.js +13 -11
- package/src/components/complementary-area/style.scss +1 -5
- package/src/components/complementary-area-header/index.js +11 -22
- package/src/components/complementary-area-header/style.scss +0 -30
- package/src/components/complementary-area-toggle/index.js +7 -6
- package/src/components/interface-skeleton/index.js +2 -14
- package/src/components/navigable-region/index.js +24 -19
- package/build/components/complementary-area-context/index.js +0 -17
- package/build/components/complementary-area-context/index.js.map +0 -1
- package/build-module/components/complementary-area-context/index.js +0 -11
- package/build-module/components/complementary-area-context/index.js.map +0 -1
- package/complementary-area-context/index.js +0 -12
- package/lock-unlock.js +0 -10
- package/src/components/complementary-area-context/index.js +0 -12
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["deprecated","normalizeComplementaryAreaScope","scope","includes","alternative","hint","version","normalizeComplementaryAreaName","name"],"sources":["@wordpress/interface/src/store/deprecated.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport deprecated from '@wordpress/deprecated';\n\nexport function normalizeComplementaryAreaScope( scope ) {\n\tif ( [ 'core/edit-post', 'core/edit-site' ].includes( scope ) ) {\n\t\tdeprecated( `${ scope } interface scope`, {\n\t\t\talternative: 'core interface scope',\n\t\t\thint: 'core/edit-post and core/edit-site are merging.',\n\t\t\tversion: '6.6',\n\t\t} );\n\t\treturn 'core';\n\t}\n\n\treturn scope;\n}\n\nexport function normalizeComplementaryAreaName( scope, name ) {\n\tif ( scope === 'core' && name === 'edit-site/template' ) {\n\t\tdeprecated( `edit-site/template sidebar`, {\n\t\t\talternative: 'edit-post/document',\n\t\t\tversion: '6.6',\n\t\t} );\n\t\treturn 'edit-post/document';\n\t}\n\n\tif ( scope === 'core' && name === 'edit-site/block-inspector' ) {\n\t\tdeprecated( `edit-site/block-inspector sidebar`, {\n\t\t\talternative: 'edit-post/block',\n\t\t\tversion: '6.6',\n\t\t} );\n\t\treturn 'edit-post/block';\n\t}\n\n\treturn name;\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,OAAOA,UAAU,MAAM,uBAAuB;AAE9C,OAAO,SAASC,+BAA+BA,CAAEC,KAAK,EAAG;EACxD,IAAK,CAAE,gBAAgB,EAAE,gBAAgB,CAAE,CAACC,QAAQ,CAAED,KAAM,CAAC,EAAG;IAC/DF,UAAU,
|
|
1
|
+
{"version":3,"names":["deprecated","normalizeComplementaryAreaScope","scope","includes","alternative","hint","version","normalizeComplementaryAreaName","name"],"sources":["@wordpress/interface/src/store/deprecated.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport deprecated from '@wordpress/deprecated';\n\nexport function normalizeComplementaryAreaScope( scope ) {\n\tif ( [ 'core/edit-post', 'core/edit-site' ].includes( scope ) ) {\n\t\tdeprecated( `${ scope } interface scope`, {\n\t\t\talternative: 'core interface scope',\n\t\t\thint: 'core/edit-post and core/edit-site are merging.',\n\t\t\tversion: '6.6',\n\t\t} );\n\t\treturn 'core';\n\t}\n\n\treturn scope;\n}\n\nexport function normalizeComplementaryAreaName( scope, name ) {\n\tif ( scope === 'core' && name === 'edit-site/template' ) {\n\t\tdeprecated( `edit-site/template sidebar`, {\n\t\t\talternative: 'edit-post/document',\n\t\t\tversion: '6.6',\n\t\t} );\n\t\treturn 'edit-post/document';\n\t}\n\n\tif ( scope === 'core' && name === 'edit-site/block-inspector' ) {\n\t\tdeprecated( `edit-site/block-inspector sidebar`, {\n\t\t\talternative: 'edit-post/block',\n\t\t\tversion: '6.6',\n\t\t} );\n\t\treturn 'edit-post/block';\n\t}\n\n\treturn name;\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,OAAOA,UAAU,MAAM,uBAAuB;AAE9C,OAAO,SAASC,+BAA+BA,CAAEC,KAAK,EAAG;EACxD,IAAK,CAAE,gBAAgB,EAAE,gBAAgB,CAAE,CAACC,QAAQ,CAAED,KAAM,CAAC,EAAG;IAC/DF,UAAU,CAAE,GAAIE,KAAK,kBAAmB,EAAE;MACzCE,WAAW,EAAE,sBAAsB;MACnCC,IAAI,EAAE,gDAAgD;MACtDC,OAAO,EAAE;IACV,CAAE,CAAC;IACH,OAAO,MAAM;EACd;EAEA,OAAOJ,KAAK;AACb;AAEA,OAAO,SAASK,8BAA8BA,CAAEL,KAAK,EAAEM,IAAI,EAAG;EAC7D,IAAKN,KAAK,KAAK,MAAM,IAAIM,IAAI,KAAK,oBAAoB,EAAG;IACxDR,UAAU,CAAE,4BAA4B,EAAE;MACzCI,WAAW,EAAE,oBAAoB;MACjCE,OAAO,EAAE;IACV,CAAE,CAAC;IACH,OAAO,oBAAoB;EAC5B;EAEA,IAAKJ,KAAK,KAAK,MAAM,IAAIM,IAAI,KAAK,2BAA2B,EAAG;IAC/DR,UAAU,CAAE,mCAAmC,EAAE;MAChDI,WAAW,EAAE,iBAAiB;MAC9BE,OAAO,EAAE;IACV,CAAE,CAAC;IACH,OAAO,iBAAiB;EACzB;EAEA,OAAOE,IAAI;AACZ","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["createRegistrySelector","deprecated","store","preferencesStore","normalizeComplementaryAreaScope","normalizeComplementaryAreaName","getActiveComplementaryArea","select","state","scope","isComplementaryAreaVisible","get","undefined","complementaryAreas","isComplementaryAreaLoading","isVisible","identifier","isItemPinned","item","_pinnedItems$item","pinnedItems","isFeatureActive","featureName","since","alternative","isModalActive","modalName","activeModal"],"sources":["@wordpress/interface/src/store/selectors.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { createRegistrySelector } from '@wordpress/data';\nimport deprecated from '@wordpress/deprecated';\nimport { store as preferencesStore } from '@wordpress/preferences';\n\n/**\n * Internal dependencies\n */\nimport {\n\tnormalizeComplementaryAreaScope,\n\tnormalizeComplementaryAreaName,\n} from './deprecated';\n\n/**\n * Returns the complementary area that is active in a given scope.\n *\n * @param {Object} state Global application state.\n * @param {string} scope Item scope.\n *\n * @return {string | null | undefined} The complementary area that is active in the given scope.\n */\nexport const getActiveComplementaryArea = createRegistrySelector(\n\t( select ) => ( state, scope ) => {\n\t\tscope = normalizeComplementaryAreaScope( scope );\n\t\tconst isComplementaryAreaVisible = select( preferencesStore ).get(\n\t\t\tscope,\n\t\t\t'isComplementaryAreaVisible'\n\t\t);\n\n\t\t// Return `undefined` to indicate that the user has never toggled\n\t\t// visibility, this is the vanilla default. Other code relies on this\n\t\t// nuance in the return value.\n\t\tif ( isComplementaryAreaVisible === undefined ) {\n\t\t\treturn undefined;\n\t\t}\n\n\t\t// Return `null` to indicate the user hid the complementary area.\n\t\tif ( isComplementaryAreaVisible === false ) {\n\t\t\treturn null;\n\t\t}\n\n\t\treturn state?.complementaryAreas?.[ scope ];\n\t}\n);\n\nexport const isComplementaryAreaLoading = createRegistrySelector(\n\t( select ) => ( state, scope ) => {\n\t\tscope = normalizeComplementaryAreaScope( scope );\n\t\tconst isVisible = select( preferencesStore ).get(\n\t\t\tscope,\n\t\t\t'isComplementaryAreaVisible'\n\t\t);\n\t\tconst identifier = state?.complementaryAreas?.[ scope ];\n\n\t\treturn isVisible && identifier === undefined;\n\t}\n);\n\n/**\n * Returns a boolean indicating if an item is pinned or not.\n *\n * @param {Object} state Global application state.\n * @param {string} scope Scope.\n * @param {string} item Item to check.\n *\n * @return {boolean} True if the item is pinned and false otherwise.\n */\nexport const isItemPinned = createRegistrySelector(\n\t( select ) => ( state, scope, item ) => {\n\t\tscope = normalizeComplementaryAreaScope( scope );\n\t\titem = normalizeComplementaryAreaName( scope, item );\n\t\tconst pinnedItems = select( preferencesStore ).get(\n\t\t\tscope,\n\t\t\t'pinnedItems'\n\t\t);\n\t\treturn pinnedItems?.[ item ] ?? true;\n\t}\n);\n\n/**\n * Returns a boolean indicating whether a feature is active for a particular\n * scope.\n *\n * @param {Object} state The store state.\n * @param {string} scope The scope of the feature (e.g. core/edit-post).\n * @param {string} featureName The name of the feature.\n *\n * @return {boolean} Is the feature enabled?\n */\nexport const isFeatureActive = createRegistrySelector(\n\t( select ) => ( state, scope, featureName ) => {\n\t\tdeprecated(\n\t\t\t`select( 'core/interface' ).isFeatureActive( scope, featureName )`,\n\t\t\t{\n\t\t\t\tsince: '6.0',\n\t\t\t\talternative: `select( 'core/preferences' ).get( scope, featureName )`,\n\t\t\t}\n\t\t);\n\n\t\treturn !! select( preferencesStore ).get( scope, featureName );\n\t}\n);\n\n/**\n * Returns true if a modal is active, or false otherwise.\n *\n * @param {Object} state Global application state.\n * @param {string} modalName A string that uniquely identifies the modal.\n *\n * @return {boolean} Whether the modal is active.\n */\nexport function isModalActive( state, modalName ) {\n\treturn state.activeModal === modalName;\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,sBAAsB,QAAQ,iBAAiB;AACxD,OAAOC,UAAU,MAAM,uBAAuB;AAC9C,SAASC,KAAK,IAAIC,gBAAgB,QAAQ,wBAAwB;;AAElE;AACA;AACA;AACA,SACCC,+BAA+B,EAC/BC,8BAA8B,QACxB,cAAc;;AAErB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,0BAA0B,GAAGN,sBAAsB,CAC7DO,MAAM,IAAM,CAAEC,KAAK,EAAEC,KAAK,KAAM;EACjCA,KAAK,GAAGL,+BAA+B,CAAEK,KAAM,CAAC;EAChD,MAAMC,0BAA0B,GAAGH,MAAM,CAAEJ,gBAAiB,CAAC,CAACQ,GAAG,CAChEF,KAAK,EACL,4BACD,CAAC;;EAED;EACA;EACA;EACA,IAAKC,0BAA0B,KAAKE,SAAS,EAAG;IAC/C,OAAOA,SAAS;EACjB;;EAEA;EACA,IAAKF,0BAA0B,KAAK,KAAK,EAAG;IAC3C,OAAO,IAAI;EACZ;EAEA,OAAOF,KAAK,EAAEK,kBAAkB,GAAIJ,KAAK,CAAE;AAC5C,CACD,CAAC;AAED,OAAO,MAAMK,0BAA0B,GAAGd,sBAAsB,CAC7DO,MAAM,IAAM,CAAEC,KAAK,EAAEC,KAAK,KAAM;EACjCA,KAAK,GAAGL,+BAA+B,CAAEK,KAAM,CAAC;EAChD,MAAMM,SAAS,GAAGR,MAAM,CAAEJ,gBAAiB,CAAC,CAACQ,GAAG,CAC/CF,KAAK,EACL,4BACD,CAAC;EACD,MAAMO,UAAU,GAAGR,KAAK,EAAEK,kBAAkB,GAAIJ,KAAK,CAAE;EAEvD,OAAOM,SAAS,IAAIC,UAAU,KAAKJ,SAAS;AAC7C,CACD,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMK,YAAY,GAAGjB,sBAAsB,CAC/CO,MAAM,IAAM,CAAEC,KAAK,EAAEC,KAAK,EAAES,IAAI,KAAM;EAAA,IAAAC,iBAAA;EACvCV,KAAK,GAAGL,+BAA+B,CAAEK,KAAM,CAAC;EAChDS,IAAI,GAAGb,8BAA8B,CAAEI,KAAK,EAAES,IAAK,CAAC;EACpD,MAAME,WAAW,GAAGb,MAAM,CAAEJ,gBAAiB,CAAC,CAACQ,GAAG,CACjDF,KAAK,EACL,aACD,CAAC;EACD,QAAAU,iBAAA,GAAOC,WAAW,GAAIF,IAAI,CAAE,cAAAC,iBAAA,cAAAA,iBAAA,GAAI,IAAI;AACrC,CACD,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAME,eAAe,GAAGrB,sBAAsB,CAClDO,MAAM,IAAM,CAAEC,KAAK,EAAEC,KAAK,EAAEa,WAAW,KAAM;EAC9CrB,UAAU,
|
|
1
|
+
{"version":3,"names":["createRegistrySelector","deprecated","store","preferencesStore","normalizeComplementaryAreaScope","normalizeComplementaryAreaName","getActiveComplementaryArea","select","state","scope","isComplementaryAreaVisible","get","undefined","complementaryAreas","isComplementaryAreaLoading","isVisible","identifier","isItemPinned","item","_pinnedItems$item","pinnedItems","isFeatureActive","featureName","since","alternative","isModalActive","modalName","activeModal"],"sources":["@wordpress/interface/src/store/selectors.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { createRegistrySelector } from '@wordpress/data';\nimport deprecated from '@wordpress/deprecated';\nimport { store as preferencesStore } from '@wordpress/preferences';\n\n/**\n * Internal dependencies\n */\nimport {\n\tnormalizeComplementaryAreaScope,\n\tnormalizeComplementaryAreaName,\n} from './deprecated';\n\n/**\n * Returns the complementary area that is active in a given scope.\n *\n * @param {Object} state Global application state.\n * @param {string} scope Item scope.\n *\n * @return {string | null | undefined} The complementary area that is active in the given scope.\n */\nexport const getActiveComplementaryArea = createRegistrySelector(\n\t( select ) => ( state, scope ) => {\n\t\tscope = normalizeComplementaryAreaScope( scope );\n\t\tconst isComplementaryAreaVisible = select( preferencesStore ).get(\n\t\t\tscope,\n\t\t\t'isComplementaryAreaVisible'\n\t\t);\n\n\t\t// Return `undefined` to indicate that the user has never toggled\n\t\t// visibility, this is the vanilla default. Other code relies on this\n\t\t// nuance in the return value.\n\t\tif ( isComplementaryAreaVisible === undefined ) {\n\t\t\treturn undefined;\n\t\t}\n\n\t\t// Return `null` to indicate the user hid the complementary area.\n\t\tif ( isComplementaryAreaVisible === false ) {\n\t\t\treturn null;\n\t\t}\n\n\t\treturn state?.complementaryAreas?.[ scope ];\n\t}\n);\n\nexport const isComplementaryAreaLoading = createRegistrySelector(\n\t( select ) => ( state, scope ) => {\n\t\tscope = normalizeComplementaryAreaScope( scope );\n\t\tconst isVisible = select( preferencesStore ).get(\n\t\t\tscope,\n\t\t\t'isComplementaryAreaVisible'\n\t\t);\n\t\tconst identifier = state?.complementaryAreas?.[ scope ];\n\n\t\treturn isVisible && identifier === undefined;\n\t}\n);\n\n/**\n * Returns a boolean indicating if an item is pinned or not.\n *\n * @param {Object} state Global application state.\n * @param {string} scope Scope.\n * @param {string} item Item to check.\n *\n * @return {boolean} True if the item is pinned and false otherwise.\n */\nexport const isItemPinned = createRegistrySelector(\n\t( select ) => ( state, scope, item ) => {\n\t\tscope = normalizeComplementaryAreaScope( scope );\n\t\titem = normalizeComplementaryAreaName( scope, item );\n\t\tconst pinnedItems = select( preferencesStore ).get(\n\t\t\tscope,\n\t\t\t'pinnedItems'\n\t\t);\n\t\treturn pinnedItems?.[ item ] ?? true;\n\t}\n);\n\n/**\n * Returns a boolean indicating whether a feature is active for a particular\n * scope.\n *\n * @param {Object} state The store state.\n * @param {string} scope The scope of the feature (e.g. core/edit-post).\n * @param {string} featureName The name of the feature.\n *\n * @return {boolean} Is the feature enabled?\n */\nexport const isFeatureActive = createRegistrySelector(\n\t( select ) => ( state, scope, featureName ) => {\n\t\tdeprecated(\n\t\t\t`select( 'core/interface' ).isFeatureActive( scope, featureName )`,\n\t\t\t{\n\t\t\t\tsince: '6.0',\n\t\t\t\talternative: `select( 'core/preferences' ).get( scope, featureName )`,\n\t\t\t}\n\t\t);\n\n\t\treturn !! select( preferencesStore ).get( scope, featureName );\n\t}\n);\n\n/**\n * Returns true if a modal is active, or false otherwise.\n *\n * @param {Object} state Global application state.\n * @param {string} modalName A string that uniquely identifies the modal.\n *\n * @return {boolean} Whether the modal is active.\n */\nexport function isModalActive( state, modalName ) {\n\treturn state.activeModal === modalName;\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,sBAAsB,QAAQ,iBAAiB;AACxD,OAAOC,UAAU,MAAM,uBAAuB;AAC9C,SAASC,KAAK,IAAIC,gBAAgB,QAAQ,wBAAwB;;AAElE;AACA;AACA;AACA,SACCC,+BAA+B,EAC/BC,8BAA8B,QACxB,cAAc;;AAErB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,0BAA0B,GAAGN,sBAAsB,CAC7DO,MAAM,IAAM,CAAEC,KAAK,EAAEC,KAAK,KAAM;EACjCA,KAAK,GAAGL,+BAA+B,CAAEK,KAAM,CAAC;EAChD,MAAMC,0BAA0B,GAAGH,MAAM,CAAEJ,gBAAiB,CAAC,CAACQ,GAAG,CAChEF,KAAK,EACL,4BACD,CAAC;;EAED;EACA;EACA;EACA,IAAKC,0BAA0B,KAAKE,SAAS,EAAG;IAC/C,OAAOA,SAAS;EACjB;;EAEA;EACA,IAAKF,0BAA0B,KAAK,KAAK,EAAG;IAC3C,OAAO,IAAI;EACZ;EAEA,OAAOF,KAAK,EAAEK,kBAAkB,GAAIJ,KAAK,CAAE;AAC5C,CACD,CAAC;AAED,OAAO,MAAMK,0BAA0B,GAAGd,sBAAsB,CAC7DO,MAAM,IAAM,CAAEC,KAAK,EAAEC,KAAK,KAAM;EACjCA,KAAK,GAAGL,+BAA+B,CAAEK,KAAM,CAAC;EAChD,MAAMM,SAAS,GAAGR,MAAM,CAAEJ,gBAAiB,CAAC,CAACQ,GAAG,CAC/CF,KAAK,EACL,4BACD,CAAC;EACD,MAAMO,UAAU,GAAGR,KAAK,EAAEK,kBAAkB,GAAIJ,KAAK,CAAE;EAEvD,OAAOM,SAAS,IAAIC,UAAU,KAAKJ,SAAS;AAC7C,CACD,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMK,YAAY,GAAGjB,sBAAsB,CAC/CO,MAAM,IAAM,CAAEC,KAAK,EAAEC,KAAK,EAAES,IAAI,KAAM;EAAA,IAAAC,iBAAA;EACvCV,KAAK,GAAGL,+BAA+B,CAAEK,KAAM,CAAC;EAChDS,IAAI,GAAGb,8BAA8B,CAAEI,KAAK,EAAES,IAAK,CAAC;EACpD,MAAME,WAAW,GAAGb,MAAM,CAAEJ,gBAAiB,CAAC,CAACQ,GAAG,CACjDF,KAAK,EACL,aACD,CAAC;EACD,QAAAU,iBAAA,GAAOC,WAAW,GAAIF,IAAI,CAAE,cAAAC,iBAAA,cAAAA,iBAAA,GAAI,IAAI;AACrC,CACD,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAME,eAAe,GAAGrB,sBAAsB,CAClDO,MAAM,IAAM,CAAEC,KAAK,EAAEC,KAAK,EAAEa,WAAW,KAAM;EAC9CrB,UAAU,CACT,kEAAkE,EAClE;IACCsB,KAAK,EAAE,KAAK;IACZC,WAAW,EAAE;EACd,CACD,CAAC;EAED,OAAO,CAAC,CAAEjB,MAAM,CAAEJ,gBAAiB,CAAC,CAACQ,GAAG,CAAEF,KAAK,EAAEa,WAAY,CAAC;AAC/D,CACD,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASG,aAAaA,CAAEjB,KAAK,EAAEkB,SAAS,EAAG;EACjD,OAAOlB,KAAK,CAACmB,WAAW,KAAKD,SAAS;AACvC","ignoreList":[]}
|
|
@@ -116,23 +116,6 @@
|
|
|
116
116
|
}
|
|
117
117
|
}
|
|
118
118
|
|
|
119
|
-
.components-panel__header.interface-complementary-area-header__small {
|
|
120
|
-
background: #fff;
|
|
121
|
-
padding-left: 4px;
|
|
122
|
-
}
|
|
123
|
-
.components-panel__header.interface-complementary-area-header__small .interface-complementary-area-header__small-title {
|
|
124
|
-
overflow: hidden;
|
|
125
|
-
text-overflow: ellipsis;
|
|
126
|
-
white-space: nowrap;
|
|
127
|
-
width: 100%;
|
|
128
|
-
margin: 0;
|
|
129
|
-
}
|
|
130
|
-
@media (min-width: 782px) {
|
|
131
|
-
.components-panel__header.interface-complementary-area-header__small {
|
|
132
|
-
display: none;
|
|
133
|
-
}
|
|
134
|
-
}
|
|
135
|
-
|
|
136
119
|
.interface-complementary-area-header {
|
|
137
120
|
background: #fff;
|
|
138
121
|
padding-left: 12px;
|
|
@@ -141,18 +124,6 @@
|
|
|
141
124
|
.interface-complementary-area-header .interface-complementary-area-header__title {
|
|
142
125
|
margin: 0;
|
|
143
126
|
}
|
|
144
|
-
.interface-complementary-area-header .components-button.has-icon {
|
|
145
|
-
display: none;
|
|
146
|
-
margin-right: auto;
|
|
147
|
-
}
|
|
148
|
-
.interface-complementary-area-header .components-button.has-icon ~ .components-button {
|
|
149
|
-
margin-right: 0;
|
|
150
|
-
}
|
|
151
|
-
@media (min-width: 782px) {
|
|
152
|
-
.interface-complementary-area-header .components-button.has-icon {
|
|
153
|
-
display: flex;
|
|
154
|
-
}
|
|
155
|
-
}
|
|
156
127
|
|
|
157
128
|
.interface-complementary-area {
|
|
158
129
|
background: #fff;
|
|
@@ -181,12 +152,7 @@
|
|
|
181
152
|
z-index: 1;
|
|
182
153
|
}
|
|
183
154
|
.interface-complementary-area .components-panel__header.editor-sidebar__panel-tabs {
|
|
184
|
-
top:
|
|
185
|
-
}
|
|
186
|
-
@media (min-width: 782px) {
|
|
187
|
-
.interface-complementary-area .components-panel__header.editor-sidebar__panel-tabs {
|
|
188
|
-
top: 0;
|
|
189
|
-
}
|
|
155
|
+
top: 0;
|
|
190
156
|
}
|
|
191
157
|
.interface-complementary-area p:not(.components-base-control__help, .components-form-token-field__help) {
|
|
192
158
|
margin-top: 0;
|
package/build-style/style.css
CHANGED
|
@@ -116,23 +116,6 @@
|
|
|
116
116
|
}
|
|
117
117
|
}
|
|
118
118
|
|
|
119
|
-
.components-panel__header.interface-complementary-area-header__small {
|
|
120
|
-
background: #fff;
|
|
121
|
-
padding-right: 4px;
|
|
122
|
-
}
|
|
123
|
-
.components-panel__header.interface-complementary-area-header__small .interface-complementary-area-header__small-title {
|
|
124
|
-
overflow: hidden;
|
|
125
|
-
text-overflow: ellipsis;
|
|
126
|
-
white-space: nowrap;
|
|
127
|
-
width: 100%;
|
|
128
|
-
margin: 0;
|
|
129
|
-
}
|
|
130
|
-
@media (min-width: 782px) {
|
|
131
|
-
.components-panel__header.interface-complementary-area-header__small {
|
|
132
|
-
display: none;
|
|
133
|
-
}
|
|
134
|
-
}
|
|
135
|
-
|
|
136
119
|
.interface-complementary-area-header {
|
|
137
120
|
background: #fff;
|
|
138
121
|
padding-right: 12px;
|
|
@@ -141,18 +124,6 @@
|
|
|
141
124
|
.interface-complementary-area-header .interface-complementary-area-header__title {
|
|
142
125
|
margin: 0;
|
|
143
126
|
}
|
|
144
|
-
.interface-complementary-area-header .components-button.has-icon {
|
|
145
|
-
display: none;
|
|
146
|
-
margin-left: auto;
|
|
147
|
-
}
|
|
148
|
-
.interface-complementary-area-header .components-button.has-icon ~ .components-button {
|
|
149
|
-
margin-left: 0;
|
|
150
|
-
}
|
|
151
|
-
@media (min-width: 782px) {
|
|
152
|
-
.interface-complementary-area-header .components-button.has-icon {
|
|
153
|
-
display: flex;
|
|
154
|
-
}
|
|
155
|
-
}
|
|
156
127
|
|
|
157
128
|
.interface-complementary-area {
|
|
158
129
|
background: #fff;
|
|
@@ -181,12 +152,7 @@
|
|
|
181
152
|
z-index: 1;
|
|
182
153
|
}
|
|
183
154
|
.interface-complementary-area .components-panel__header.editor-sidebar__panel-tabs {
|
|
184
|
-
top:
|
|
185
|
-
}
|
|
186
|
-
@media (min-width: 782px) {
|
|
187
|
-
.interface-complementary-area .components-panel__header.editor-sidebar__panel-tabs {
|
|
188
|
-
top: 0;
|
|
189
|
-
}
|
|
155
|
+
top: 0;
|
|
190
156
|
}
|
|
191
157
|
.interface-complementary-area p:not(.components-base-control__help, .components-form-token-field__help) {
|
|
192
158
|
margin-top: 0;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wordpress/interface",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "8.0.0",
|
|
4
4
|
"description": "Interface module for WordPress. The package contains shared functionality across the modern JavaScript-based WordPress screens.",
|
|
5
5
|
"author": "The WordPress Contributors",
|
|
6
6
|
"license": "GPL-2.0-or-later",
|
|
@@ -32,19 +32,18 @@
|
|
|
32
32
|
"{src,build,build-module}/{index.js,store/index.js}"
|
|
33
33
|
],
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@babel/runtime": "
|
|
36
|
-
"@wordpress/a11y": "
|
|
37
|
-
"@wordpress/components": "
|
|
38
|
-
"@wordpress/compose": "
|
|
39
|
-
"@wordpress/data": "
|
|
40
|
-
"@wordpress/deprecated": "
|
|
41
|
-
"@wordpress/element": "
|
|
42
|
-
"@wordpress/i18n": "
|
|
43
|
-
"@wordpress/icons": "
|
|
44
|
-
"@wordpress/plugins": "
|
|
45
|
-
"@wordpress/preferences": "
|
|
46
|
-
"@wordpress/
|
|
47
|
-
"@wordpress/viewport": "^6.9.0",
|
|
35
|
+
"@babel/runtime": "7.25.7",
|
|
36
|
+
"@wordpress/a11y": "*",
|
|
37
|
+
"@wordpress/components": "*",
|
|
38
|
+
"@wordpress/compose": "*",
|
|
39
|
+
"@wordpress/data": "*",
|
|
40
|
+
"@wordpress/deprecated": "*",
|
|
41
|
+
"@wordpress/element": "*",
|
|
42
|
+
"@wordpress/i18n": "*",
|
|
43
|
+
"@wordpress/icons": "*",
|
|
44
|
+
"@wordpress/plugins": "*",
|
|
45
|
+
"@wordpress/preferences": "*",
|
|
46
|
+
"@wordpress/viewport": "*",
|
|
48
47
|
"clsx": "^2.1.1"
|
|
49
48
|
},
|
|
50
49
|
"peerDependencies": {
|
|
@@ -54,5 +53,6 @@
|
|
|
54
53
|
"publishConfig": {
|
|
55
54
|
"access": "public"
|
|
56
55
|
},
|
|
57
|
-
"
|
|
56
|
+
"wpScript": true,
|
|
57
|
+
"gitHead": "dcf4613b33b0eda14e203ac30f700ed0db70347f"
|
|
58
58
|
}
|
|
@@ -84,14 +84,6 @@ The scope of the complementary area e.g: "core", "myplugin/custom-screen-a",
|
|
|
84
84
|
- Type: `String`
|
|
85
85
|
- Required: Yes
|
|
86
86
|
|
|
87
|
-
### smallScreenTitle
|
|
88
|
-
|
|
89
|
-
In small screens, the complementary area may take up the entire screen.
|
|
90
|
-
`smallScreenTitle` allows displaying a title above the complementary area, so the user is more aware of what the area refers to.
|
|
91
|
-
|
|
92
|
-
- Type: `String`
|
|
93
|
-
- Required: No
|
|
94
|
-
|
|
95
87
|
### title
|
|
96
88
|
|
|
97
89
|
Human friendly title of the complementary area.
|
|
@@ -25,6 +25,7 @@ import {
|
|
|
25
25
|
useViewportMatch,
|
|
26
26
|
usePrevious,
|
|
27
27
|
} from '@wordpress/compose';
|
|
28
|
+
import { usePluginContext } from '@wordpress/plugins';
|
|
28
29
|
|
|
29
30
|
/**
|
|
30
31
|
* Internal dependencies
|
|
@@ -32,7 +33,6 @@ import {
|
|
|
32
33
|
import ComplementaryAreaHeader from '../complementary-area-header';
|
|
33
34
|
import ComplementaryAreaMoreMenuItem from '../complementary-area-more-menu-item';
|
|
34
35
|
import ComplementaryAreaToggle from '../complementary-area-toggle';
|
|
35
|
-
import withComplementaryAreaContext from '../complementary-area-context';
|
|
36
36
|
import PinnedItems from '../pinned-items';
|
|
37
37
|
import { store as interfaceStore } from '../../store';
|
|
38
38
|
|
|
@@ -171,19 +171,22 @@ function ComplementaryArea( {
|
|
|
171
171
|
children,
|
|
172
172
|
className,
|
|
173
173
|
closeLabel = __( 'Close plugin' ),
|
|
174
|
-
identifier,
|
|
174
|
+
identifier: identifierProp,
|
|
175
175
|
header,
|
|
176
176
|
headerClassName,
|
|
177
|
-
icon,
|
|
177
|
+
icon: iconProp,
|
|
178
178
|
isPinnable = true,
|
|
179
179
|
panelClassName,
|
|
180
180
|
scope,
|
|
181
181
|
name,
|
|
182
|
-
smallScreenTitle,
|
|
183
182
|
title,
|
|
184
183
|
toggleShortcut,
|
|
185
184
|
isActiveByDefault,
|
|
186
185
|
} ) {
|
|
186
|
+
const context = usePluginContext();
|
|
187
|
+
const icon = iconProp || context.icon;
|
|
188
|
+
const identifier = identifierProp || `${ context.name }/${ name }`;
|
|
189
|
+
|
|
187
190
|
// This state is used to delay the rendering of the Fill
|
|
188
191
|
// until the initial effect runs.
|
|
189
192
|
// This prevents the animation from running on mount if
|
|
@@ -220,6 +223,9 @@ function ComplementaryArea( {
|
|
|
220
223
|
},
|
|
221
224
|
[ identifier, scope ]
|
|
222
225
|
);
|
|
226
|
+
|
|
227
|
+
const isMobileViewport = useViewportMatch( 'medium', '<' );
|
|
228
|
+
|
|
223
229
|
useAdjustComplementaryListener(
|
|
224
230
|
scope,
|
|
225
231
|
identifier,
|
|
@@ -300,7 +306,6 @@ function ComplementaryArea( {
|
|
|
300
306
|
className={ headerClassName }
|
|
301
307
|
closeLabel={ closeLabel }
|
|
302
308
|
onClose={ () => disableComplementaryArea( scope ) }
|
|
303
|
-
smallScreenTitle={ smallScreenTitle }
|
|
304
309
|
toggleButtonProps={ {
|
|
305
310
|
label: closeLabel,
|
|
306
311
|
size: 'small',
|
|
@@ -314,7 +319,7 @@ function ComplementaryArea( {
|
|
|
314
319
|
<h2 className="interface-complementary-area-header__title">
|
|
315
320
|
{ title }
|
|
316
321
|
</h2>
|
|
317
|
-
{ isPinnable && (
|
|
322
|
+
{ isPinnable && ! isMobileViewport && (
|
|
318
323
|
<Button
|
|
319
324
|
className="interface-complementary-area__pin-unpin-item"
|
|
320
325
|
icon={ isPinned ? starFilled : starEmpty }
|
|
@@ -343,9 +348,6 @@ function ComplementaryArea( {
|
|
|
343
348
|
);
|
|
344
349
|
}
|
|
345
350
|
|
|
346
|
-
|
|
347
|
-
withComplementaryAreaContext( ComplementaryArea );
|
|
348
|
-
|
|
349
|
-
ComplementaryAreaWrapped.Slot = ComplementaryAreaSlot;
|
|
351
|
+
ComplementaryArea.Slot = ComplementaryAreaSlot;
|
|
350
352
|
|
|
351
|
-
export default
|
|
353
|
+
export default ComplementaryArea;
|
|
@@ -14,7 +14,6 @@ import { closeSmall } from '@wordpress/icons';
|
|
|
14
14
|
import ComplementaryAreaToggle from '../complementary-area-toggle';
|
|
15
15
|
|
|
16
16
|
const ComplementaryAreaHeader = ( {
|
|
17
|
-
smallScreenTitle,
|
|
18
17
|
children,
|
|
19
18
|
className,
|
|
20
19
|
toggleButtonProps,
|
|
@@ -23,27 +22,17 @@ const ComplementaryAreaHeader = ( {
|
|
|
23
22
|
<ComplementaryAreaToggle icon={ closeSmall } { ...toggleButtonProps } />
|
|
24
23
|
);
|
|
25
24
|
return (
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
'components-panel__header',
|
|
38
|
-
'interface-complementary-area-header',
|
|
39
|
-
className
|
|
40
|
-
) }
|
|
41
|
-
tabIndex={ -1 }
|
|
42
|
-
>
|
|
43
|
-
{ children }
|
|
44
|
-
{ toggleButton }
|
|
45
|
-
</div>
|
|
46
|
-
</>
|
|
25
|
+
<div
|
|
26
|
+
className={ clsx(
|
|
27
|
+
'components-panel__header',
|
|
28
|
+
'interface-complementary-area-header',
|
|
29
|
+
className
|
|
30
|
+
) }
|
|
31
|
+
tabIndex={ -1 }
|
|
32
|
+
>
|
|
33
|
+
{ children }
|
|
34
|
+
{ toggleButton }
|
|
35
|
+
</div>
|
|
47
36
|
);
|
|
48
37
|
};
|
|
49
38
|
|
|
@@ -1,20 +1,3 @@
|
|
|
1
|
-
.components-panel__header.interface-complementary-area-header__small {
|
|
2
|
-
background: $white;
|
|
3
|
-
padding-right: $grid-unit-05;
|
|
4
|
-
|
|
5
|
-
.interface-complementary-area-header__small-title {
|
|
6
|
-
overflow: hidden;
|
|
7
|
-
text-overflow: ellipsis;
|
|
8
|
-
white-space: nowrap;
|
|
9
|
-
width: 100%;
|
|
10
|
-
margin: 0;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
@include break-medium() {
|
|
14
|
-
display: none;
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
|
|
18
1
|
.interface-complementary-area-header {
|
|
19
2
|
background: $white;
|
|
20
3
|
padding-right: $grid-unit-15; // Reduced padding to account for close buttons.
|
|
@@ -23,17 +6,4 @@
|
|
|
23
6
|
.interface-complementary-area-header__title {
|
|
24
7
|
margin: 0;
|
|
25
8
|
}
|
|
26
|
-
|
|
27
|
-
.components-button.has-icon {
|
|
28
|
-
display: none;
|
|
29
|
-
margin-left: auto;
|
|
30
|
-
|
|
31
|
-
~ .components-button {
|
|
32
|
-
margin-left: 0;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
@include break-medium() {
|
|
36
|
-
display: flex;
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
9
|
}
|
|
@@ -3,12 +3,12 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import { Button } from '@wordpress/components';
|
|
5
5
|
import { useDispatch, useSelect } from '@wordpress/data';
|
|
6
|
+
import { usePluginContext } from '@wordpress/plugins';
|
|
6
7
|
|
|
7
8
|
/**
|
|
8
9
|
* Internal dependencies
|
|
9
10
|
*/
|
|
10
11
|
import { store as interfaceStore } from '../../store';
|
|
11
|
-
import complementaryAreaContext from '../complementary-area-context';
|
|
12
12
|
|
|
13
13
|
/**
|
|
14
14
|
* Whether the role supports checked state.
|
|
@@ -29,17 +29,20 @@ function roleSupportsCheckedState( role ) {
|
|
|
29
29
|
].includes( role );
|
|
30
30
|
}
|
|
31
31
|
|
|
32
|
-
function ComplementaryAreaToggle( {
|
|
32
|
+
export default function ComplementaryAreaToggle( {
|
|
33
33
|
as = Button,
|
|
34
34
|
scope,
|
|
35
|
-
identifier,
|
|
36
|
-
icon,
|
|
35
|
+
identifier: identifierProp,
|
|
36
|
+
icon: iconProp,
|
|
37
37
|
selectedIcon,
|
|
38
38
|
name,
|
|
39
39
|
shortcut,
|
|
40
40
|
...props
|
|
41
41
|
} ) {
|
|
42
42
|
const ComponentToUse = as;
|
|
43
|
+
const context = usePluginContext();
|
|
44
|
+
const icon = iconProp || context.icon;
|
|
45
|
+
const identifier = identifierProp || `${ context.name }/${ name }`;
|
|
43
46
|
const isSelected = useSelect(
|
|
44
47
|
( select ) =>
|
|
45
48
|
select( interfaceStore ).getActiveComplementaryArea( scope ) ===
|
|
@@ -70,5 +73,3 @@ function ComplementaryAreaToggle( {
|
|
|
70
73
|
/>
|
|
71
74
|
);
|
|
72
75
|
}
|
|
73
|
-
|
|
74
|
-
export default complementaryAreaContext( ComplementaryAreaToggle );
|
|
@@ -8,13 +8,11 @@ import clsx from 'clsx';
|
|
|
8
8
|
*/
|
|
9
9
|
import { forwardRef, useEffect } from '@wordpress/element';
|
|
10
10
|
import {
|
|
11
|
-
__unstableUseNavigateRegions as useNavigateRegions,
|
|
12
11
|
__unstableMotion as motion,
|
|
13
12
|
__unstableAnimatePresence as AnimatePresence,
|
|
14
13
|
} from '@wordpress/components';
|
|
15
14
|
import { __, _x } from '@wordpress/i18n';
|
|
16
15
|
import {
|
|
17
|
-
useMergeRefs,
|
|
18
16
|
useReducedMotion,
|
|
19
17
|
useViewportMatch,
|
|
20
18
|
useResizeObserver,
|
|
@@ -85,10 +83,6 @@ function InterfaceSkeleton(
|
|
|
85
83
|
actions,
|
|
86
84
|
labels,
|
|
87
85
|
className,
|
|
88
|
-
enableRegionNavigation = true,
|
|
89
|
-
// Todo: does this need to be a prop.
|
|
90
|
-
// Can we use a dependency to keyboard-shortcuts directly?
|
|
91
|
-
shortcuts,
|
|
92
86
|
},
|
|
93
87
|
ref
|
|
94
88
|
) {
|
|
@@ -101,7 +95,6 @@ function InterfaceSkeleton(
|
|
|
101
95
|
duration: disableMotion ? 0 : ANIMATION_DURATION,
|
|
102
96
|
ease: [ 0.6, 0, 0.4, 1 ],
|
|
103
97
|
};
|
|
104
|
-
const navigateRegionsProps = useNavigateRegions( shortcuts );
|
|
105
98
|
useHTMLClass( 'interface-interface-skeleton__html-container' );
|
|
106
99
|
|
|
107
100
|
const defaultLabels = {
|
|
@@ -112,7 +105,7 @@ function InterfaceSkeleton(
|
|
|
112
105
|
/* translators: accessibility text for the secondary sidebar landmark region. */
|
|
113
106
|
secondarySidebar: __( 'Block Library' ),
|
|
114
107
|
/* translators: accessibility text for the settings landmark region. */
|
|
115
|
-
sidebar:
|
|
108
|
+
sidebar: _x( 'Settings', 'settings landmark area' ),
|
|
116
109
|
/* translators: accessibility text for the publish landmark region. */
|
|
117
110
|
actions: __( 'Publish' ),
|
|
118
111
|
/* translators: accessibility text for the footer landmark region. */
|
|
@@ -123,15 +116,10 @@ function InterfaceSkeleton(
|
|
|
123
116
|
|
|
124
117
|
return (
|
|
125
118
|
<div
|
|
126
|
-
{
|
|
127
|
-
ref={ useMergeRefs( [
|
|
128
|
-
ref,
|
|
129
|
-
enableRegionNavigation ? navigateRegionsProps.ref : undefined,
|
|
130
|
-
] ) }
|
|
119
|
+
ref={ ref }
|
|
131
120
|
className={ clsx(
|
|
132
121
|
className,
|
|
133
122
|
'interface-interface-skeleton',
|
|
134
|
-
navigateRegionsProps.className,
|
|
135
123
|
!! footer && 'has-footer'
|
|
136
124
|
) }
|
|
137
125
|
>
|
|
@@ -1,24 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* WordPress dependencies
|
|
3
|
+
*/
|
|
4
|
+
import { forwardRef } from '@wordpress/element';
|
|
5
|
+
|
|
1
6
|
/**
|
|
2
7
|
* External dependencies
|
|
3
8
|
*/
|
|
4
9
|
import clsx from 'clsx';
|
|
5
10
|
|
|
6
|
-
|
|
7
|
-
children,
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
11
|
+
const NavigableRegion = forwardRef(
|
|
12
|
+
( { children, className, ariaLabel, as: Tag = 'div', ...props }, ref ) => {
|
|
13
|
+
return (
|
|
14
|
+
<Tag
|
|
15
|
+
ref={ ref }
|
|
16
|
+
className={ clsx( 'interface-navigable-region', className ) }
|
|
17
|
+
aria-label={ ariaLabel }
|
|
18
|
+
role="region"
|
|
19
|
+
tabIndex="-1"
|
|
20
|
+
{ ...props }
|
|
21
|
+
>
|
|
22
|
+
{ children }
|
|
23
|
+
</Tag>
|
|
24
|
+
);
|
|
25
|
+
}
|
|
26
|
+
);
|
|
27
|
+
|
|
28
|
+
NavigableRegion.displayName = 'NavigableRegion';
|
|
29
|
+
export default NavigableRegion;
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = void 0;
|
|
7
|
-
var _plugins = require("@wordpress/plugins");
|
|
8
|
-
/**
|
|
9
|
-
* WordPress dependencies
|
|
10
|
-
*/
|
|
11
|
-
var _default = exports.default = (0, _plugins.withPluginContext)((context, ownProps) => {
|
|
12
|
-
return {
|
|
13
|
-
icon: ownProps.icon || context.icon,
|
|
14
|
-
identifier: ownProps.identifier || `${context.name}/${ownProps.name}`
|
|
15
|
-
};
|
|
16
|
-
});
|
|
17
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["_plugins","require","_default","exports","default","withPluginContext","context","ownProps","icon","identifier","name"],"sources":["@wordpress/interface/src/components/complementary-area-context/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { withPluginContext } from '@wordpress/plugins';\n\nexport default withPluginContext( ( context, ownProps ) => {\n\treturn {\n\t\ticon: ownProps.icon || context.icon,\n\t\tidentifier:\n\t\t\townProps.identifier || `${ context.name }/${ ownProps.name }`,\n\t};\n} );\n"],"mappings":";;;;;;AAGA,IAAAA,QAAA,GAAAC,OAAA;AAHA;AACA;AACA;AAFA,IAAAC,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAKe,IAAAC,0BAAiB,EAAE,CAAEC,OAAO,EAAEC,QAAQ,KAAM;EAC1D,OAAO;IACNC,IAAI,EAAED,QAAQ,CAACC,IAAI,IAAIF,OAAO,CAACE,IAAI;IACnCC,UAAU,EACTF,QAAQ,CAACE,UAAU,IAAK,GAAGH,OAAO,CAACI,IAAM,IAAIH,QAAQ,CAACG,IAAM;EAC9D,CAAC;AACF,CAAE,CAAC","ignoreList":[]}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* WordPress dependencies
|
|
3
|
-
*/
|
|
4
|
-
import { withPluginContext } from '@wordpress/plugins';
|
|
5
|
-
export default withPluginContext((context, ownProps) => {
|
|
6
|
-
return {
|
|
7
|
-
icon: ownProps.icon || context.icon,
|
|
8
|
-
identifier: ownProps.identifier || `${context.name}/${ownProps.name}`
|
|
9
|
-
};
|
|
10
|
-
});
|
|
11
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["withPluginContext","context","ownProps","icon","identifier","name"],"sources":["@wordpress/interface/src/components/complementary-area-context/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { withPluginContext } from '@wordpress/plugins';\n\nexport default withPluginContext( ( context, ownProps ) => {\n\treturn {\n\t\ticon: ownProps.icon || context.icon,\n\t\tidentifier:\n\t\t\townProps.identifier || `${ context.name }/${ ownProps.name }`,\n\t};\n} );\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,iBAAiB,QAAQ,oBAAoB;AAEtD,eAAeA,iBAAiB,CAAE,CAAEC,OAAO,EAAEC,QAAQ,KAAM;EAC1D,OAAO;IACNC,IAAI,EAAED,QAAQ,CAACC,IAAI,IAAIF,OAAO,CAACE,IAAI;IACnCC,UAAU,EACTF,QAAQ,CAACE,UAAU,IAAK,GAAGH,OAAO,CAACI,IAAM,IAAIH,QAAQ,CAACG,IAAM;EAC9D,CAAC;AACF,CAAE,CAAC","ignoreList":[]}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* WordPress dependencies
|
|
3
|
-
*/
|
|
4
|
-
import { withPluginContext } from '@wordpress/plugins';
|
|
5
|
-
|
|
6
|
-
export default withPluginContext( ( context, ownProps ) => {
|
|
7
|
-
return {
|
|
8
|
-
icon: ownProps.icon || context.icon,
|
|
9
|
-
identifier:
|
|
10
|
-
ownProps.identifier || `${ context.name }/${ ownProps.name }`,
|
|
11
|
-
};
|
|
12
|
-
} );
|
package/lock-unlock.js
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* WordPress dependencies
|
|
3
|
-
*/
|
|
4
|
-
import { __dangerousOptInToUnstableAPIsOnlyForCoreModules } from '@wordpress/private-apis';
|
|
5
|
-
|
|
6
|
-
export const { lock, unlock } =
|
|
7
|
-
__dangerousOptInToUnstableAPIsOnlyForCoreModules(
|
|
8
|
-
'I acknowledge private features are not for use in themes or plugins and doing so will break in the next version of WordPress.',
|
|
9
|
-
'@wordpress/interface'
|
|
10
|
-
);
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* WordPress dependencies
|
|
3
|
-
*/
|
|
4
|
-
import { withPluginContext } from '@wordpress/plugins';
|
|
5
|
-
|
|
6
|
-
export default withPluginContext( ( context, ownProps ) => {
|
|
7
|
-
return {
|
|
8
|
-
icon: ownProps.icon || context.icon,
|
|
9
|
-
identifier:
|
|
10
|
-
ownProps.identifier || `${ context.name }/${ ownProps.name }`,
|
|
11
|
-
};
|
|
12
|
-
} );
|