@wordpress/block-editor 8.0.11 → 8.0.12-next.33ec3857e2.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/README.md +4 -0
- package/build/components/block-caption/index.native.js +14 -3
- package/build/components/block-caption/index.native.js.map +1 -1
- package/build/components/block-inspector/index.js +12 -23
- package/build/components/block-inspector/index.js.map +1 -1
- package/build/components/block-list-appender/index.js +3 -11
- package/build/components/block-list-appender/index.js.map +1 -1
- package/build/components/block-preview/auto.js +10 -2
- package/build/components/block-preview/auto.js.map +1 -1
- package/build/components/block-preview/index.js +51 -0
- package/build/components/block-preview/index.js.map +1 -1
- package/build/components/block-settings/container.native.js +2 -1
- package/build/components/block-settings/container.native.js.map +1 -1
- package/build/components/block-styles/index.js +110 -134
- package/build/components/block-styles/index.js.map +1 -1
- package/build/components/block-styles/menu-items.js +63 -0
- package/build/components/block-styles/menu-items.js.map +1 -0
- package/build/components/block-styles/preview-panel.js +45 -0
- package/build/components/block-styles/preview-panel.js.map +1 -0
- package/build/components/block-styles/use-styles-for-block.js +119 -0
- package/build/components/block-styles/use-styles-for-block.js.map +1 -0
- package/build/components/block-styles/utils.js +39 -0
- package/build/components/block-styles/utils.js.map +1 -1
- package/build/components/block-switcher/block-styles-menu.js +3 -23
- package/build/components/block-switcher/block-styles-menu.js.map +1 -1
- package/build/components/block-tools/back-compat.js +2 -1
- package/build/components/block-tools/back-compat.js.map +1 -1
- package/build/components/block-tools/insertion-point.js +11 -1
- package/build/components/block-tools/insertion-point.js.map +1 -1
- package/build/components/button-block-appender/index.js +2 -1
- package/build/components/button-block-appender/index.js.map +1 -1
- package/build/components/colors-gradients/panel-color-gradient-settings.js +51 -10
- package/build/components/colors-gradients/panel-color-gradient-settings.js.map +1 -1
- package/build/components/default-block-appender/index.js +16 -19
- package/build/components/default-block-appender/index.js.map +1 -1
- package/build/components/default-style-picker/index.js +18 -3
- package/build/components/default-style-picker/index.js.map +1 -1
- package/build/components/iframe/index.js +3 -4
- package/build/components/iframe/index.js.map +1 -1
- package/build/components/index.js +17 -10
- package/build/components/index.js.map +1 -1
- package/build/components/inner-blocks/default-block-appender.js +2 -4
- package/build/components/inner-blocks/default-block-appender.js.map +1 -1
- package/build/components/inserter/index.native.js +1 -1
- package/build/components/inserter/index.native.js.map +1 -1
- package/build/components/inserter/tabs.native.js +7 -4
- package/build/components/inserter/tabs.native.js.map +1 -1
- package/build/components/inspector-controls/block-support-slot-container.js +2 -1
- package/build/components/inspector-controls/block-support-slot-container.js.map +1 -1
- package/build/components/inspector-controls/fill.native.js +3 -5
- package/build/components/inspector-controls/fill.native.js.map +1 -1
- package/build/components/inspector-controls/groups.js +2 -0
- package/build/components/inspector-controls/groups.js.map +1 -1
- package/build/components/inspector-controls/slot.js +1 -3
- package/build/components/inspector-controls/slot.js.map +1 -1
- package/build/components/letter-spacing-control/index.js +6 -6
- package/build/components/letter-spacing-control/index.js.map +1 -1
- package/build/components/list-view/block-select-button.js +23 -3
- package/build/components/list-view/block-select-button.js.map +1 -1
- package/build/components/media-placeholder/index.js +2 -0
- package/build/components/media-placeholder/index.js.map +1 -1
- package/build/components/media-replace-flow/index.js +2 -0
- package/build/components/media-replace-flow/index.js.map +1 -1
- package/build/components/rich-text/file-paste-handler.js +1 -1
- package/build/components/rich-text/file-paste-handler.js.map +1 -1
- package/build/components/rich-text/prevent-event-discovery.js +33 -0
- package/build/components/rich-text/prevent-event-discovery.js.map +1 -0
- package/build/components/rich-text/use-input-rules.js +3 -1
- package/build/components/rich-text/use-input-rules.js.map +1 -1
- package/build/components/selection-scroll-into-view/index.js +2 -1
- package/build/components/selection-scroll-into-view/index.js.map +1 -1
- package/build/components/use-display-block-controls/index.native.js +45 -0
- package/build/components/use-display-block-controls/index.native.js.map +1 -0
- package/build/components/use-on-block-drop/index.js +7 -3
- package/build/components/use-on-block-drop/index.js.map +1 -1
- package/build/components/writing-flow/use-multi-selection.js +3 -1
- package/build/components/writing-flow/use-multi-selection.js.map +1 -1
- package/build/hooks/border-color.js +63 -5
- package/build/hooks/border-color.js.map +1 -1
- package/build/hooks/border-radius.js +47 -0
- package/build/hooks/border-radius.js.map +1 -1
- package/build/hooks/border-style.js +41 -0
- package/build/hooks/border-style.js.map +1 -1
- package/build/hooks/border-width.js +70 -31
- package/build/hooks/border-width.js.map +1 -1
- package/build/hooks/border.js +81 -11
- package/build/hooks/border.js.map +1 -1
- package/build/hooks/letter-spacing.js +1 -1
- package/build/hooks/letter-spacing.js.map +1 -1
- package/build/hooks/typography.js +1 -1
- package/build/hooks/typography.js.map +1 -1
- package/build/store/actions.js +1 -2
- package/build/store/actions.js.map +1 -1
- package/build/store/defaults.js +5 -1
- package/build/store/defaults.js.map +1 -1
- package/build/store/selectors.js +25 -7
- package/build/store/selectors.js.map +1 -1
- package/build/utils/get-paste-event-data.js +1 -1
- package/build/utils/get-paste-event-data.js.map +1 -1
- package/build/utils/parse-css-unit-to-px.js +1 -1
- package/build/utils/parse-css-unit-to-px.js.map +1 -1
- package/build-module/components/block-caption/index.native.js +13 -3
- package/build-module/components/block-caption/index.native.js.map +1 -1
- package/build-module/components/block-inspector/index.js +12 -23
- package/build-module/components/block-inspector/index.js.map +1 -1
- package/build-module/components/block-list-appender/index.js +3 -10
- package/build-module/components/block-list-appender/index.js.map +1 -1
- package/build-module/components/block-preview/auto.js +10 -2
- package/build-module/components/block-preview/auto.js.map +1 -1
- package/build-module/components/block-preview/index.js +46 -0
- package/build-module/components/block-preview/index.js.map +1 -1
- package/build-module/components/block-settings/container.native.js +2 -1
- package/build-module/components/block-settings/container.native.js.map +1 -1
- package/build-module/components/block-styles/index.js +112 -133
- package/build-module/components/block-styles/index.js.map +1 -1
- package/build-module/components/block-styles/menu-items.js +50 -0
- package/build-module/components/block-styles/menu-items.js.map +1 -0
- package/build-module/components/block-styles/preview-panel.js +35 -0
- package/build-module/components/block-styles/preview-panel.js.map +1 -0
- package/build-module/components/block-styles/use-styles-for-block.js +107 -0
- package/build-module/components/block-styles/use-styles-for-block.js.map +1 -0
- package/build-module/components/block-styles/utils.js +34 -0
- package/build-module/components/block-styles/utils.js.map +1 -1
- package/build-module/components/block-switcher/block-styles-menu.js +3 -21
- package/build-module/components/block-switcher/block-styles-menu.js.map +1 -1
- package/build-module/components/block-tools/back-compat.js +2 -1
- package/build-module/components/block-tools/back-compat.js.map +1 -1
- package/build-module/components/block-tools/insertion-point.js +11 -1
- package/build-module/components/block-tools/insertion-point.js.map +1 -1
- package/build-module/components/button-block-appender/index.js +2 -1
- package/build-module/components/button-block-appender/index.js.map +1 -1
- package/build-module/components/colors-gradients/panel-color-gradient-settings.js +54 -13
- package/build-module/components/colors-gradients/panel-color-gradient-settings.js.map +1 -1
- package/build-module/components/default-block-appender/index.js +15 -18
- package/build-module/components/default-block-appender/index.js.map +1 -1
- package/build-module/components/default-style-picker/index.js +17 -3
- package/build-module/components/default-style-picker/index.js.map +1 -1
- package/build-module/components/iframe/index.js +3 -4
- package/build-module/components/iframe/index.js.map +1 -1
- package/build-module/components/index.js +2 -2
- package/build-module/components/index.js.map +1 -1
- package/build-module/components/inner-blocks/default-block-appender.js +2 -4
- package/build-module/components/inner-blocks/default-block-appender.js.map +1 -1
- package/build-module/components/inserter/index.native.js +2 -2
- package/build-module/components/inserter/index.native.js.map +1 -1
- package/build-module/components/inserter/tabs.native.js +7 -4
- package/build-module/components/inserter/tabs.native.js.map +1 -1
- package/build-module/components/inspector-controls/block-support-slot-container.js +2 -1
- package/build-module/components/inspector-controls/block-support-slot-container.js.map +1 -1
- package/build-module/components/inspector-controls/fill.native.js +3 -5
- package/build-module/components/inspector-controls/fill.native.js.map +1 -1
- package/build-module/components/inspector-controls/groups.js +2 -0
- package/build-module/components/inspector-controls/groups.js.map +1 -1
- package/build-module/components/inspector-controls/slot.js +1 -3
- package/build-module/components/inspector-controls/slot.js.map +1 -1
- package/build-module/components/letter-spacing-control/index.js +6 -6
- package/build-module/components/letter-spacing-control/index.js.map +1 -1
- package/build-module/components/list-view/block-select-button.js +22 -3
- package/build-module/components/list-view/block-select-button.js.map +1 -1
- package/build-module/components/media-placeholder/index.js +2 -0
- package/build-module/components/media-placeholder/index.js.map +1 -1
- package/build-module/components/media-replace-flow/index.js +2 -0
- package/build-module/components/media-replace-flow/index.js.map +1 -1
- package/build-module/components/rich-text/file-paste-handler.js +1 -1
- package/build-module/components/rich-text/file-paste-handler.js.map +1 -1
- package/build-module/components/rich-text/prevent-event-discovery.js +25 -0
- package/build-module/components/rich-text/prevent-event-discovery.js.map +1 -0
- package/build-module/components/rich-text/use-input-rules.js +2 -1
- package/build-module/components/rich-text/use-input-rules.js.map +1 -1
- package/build-module/components/selection-scroll-into-view/index.js +2 -1
- package/build-module/components/selection-scroll-into-view/index.js.map +1 -1
- package/build-module/components/use-display-block-controls/index.native.js +34 -0
- package/build-module/components/use-display-block-controls/index.native.js.map +1 -0
- package/build-module/components/use-on-block-drop/index.js +7 -3
- package/build-module/components/use-on-block-drop/index.js.map +1 -1
- package/build-module/components/writing-flow/use-multi-selection.js +3 -4
- package/build-module/components/writing-flow/use-multi-selection.js.map +1 -1
- package/build-module/hooks/border-color.js +61 -7
- package/build-module/hooks/border-color.js.map +1 -1
- package/build-module/hooks/border-radius.js +42 -0
- package/build-module/hooks/border-radius.js.map +1 -1
- package/build-module/hooks/border-style.js +36 -0
- package/build-module/hooks/border-style.js.map +1 -1
- package/build-module/hooks/border-width.js +66 -32
- package/build-module/hooks/border-width.js.map +1 -1
- package/build-module/hooks/border.js +80 -12
- package/build-module/hooks/border.js.map +1 -1
- package/build-module/hooks/letter-spacing.js +1 -1
- package/build-module/hooks/letter-spacing.js.map +1 -1
- package/build-module/hooks/typography.js +1 -1
- package/build-module/hooks/typography.js.map +1 -1
- package/build-module/store/actions.js +1 -2
- package/build-module/store/actions.js.map +1 -1
- package/build-module/store/defaults.js +5 -1
- package/build-module/store/defaults.js.map +1 -1
- package/build-module/store/selectors.js +24 -7
- package/build-module/store/selectors.js.map +1 -1
- package/build-module/utils/get-paste-event-data.js +1 -1
- package/build-module/utils/get-paste-event-data.js.map +1 -1
- package/build-module/utils/parse-css-unit-to-px.js +1 -1
- package/build-module/utils/parse-css-unit-to-px.js.map +1 -1
- package/build-style/style-rtl.css +226 -180
- package/build-style/style.css +226 -180
- package/package.json +27 -27
- package/src/components/block-caption/index.native.js +22 -4
- package/src/components/block-inspector/index.js +14 -17
- package/src/components/block-list-appender/index.js +5 -21
- package/src/components/block-preview/auto.js +7 -2
- package/src/components/block-preview/index.js +60 -0
- package/src/components/block-preview/style.scss +23 -0
- package/src/components/block-preview/test/index.js +114 -0
- package/src/components/block-settings/container.native.js +1 -0
- package/src/components/block-styles/index.js +125 -145
- package/src/components/block-styles/menu-items.js +49 -0
- package/src/components/block-styles/preview-panel.js +36 -0
- package/src/components/block-styles/style.scss +59 -51
- package/src/components/block-styles/test/{index.js → utils.js} +60 -1
- package/src/components/block-styles/use-styles-for-block.js +99 -0
- package/src/components/block-styles/utils.js +39 -0
- package/src/components/block-switcher/block-styles-menu.js +3 -38
- package/src/components/block-tools/back-compat.js +1 -0
- package/src/components/block-tools/insertion-point.js +10 -1
- package/src/components/border-style-control/style.scss +0 -1
- package/src/components/button-block-appender/index.js +1 -0
- package/src/components/colors-gradients/panel-color-gradient-settings.js +75 -19
- package/src/components/colors-gradients/style.scss +42 -5
- package/src/components/default-block-appender/index.js +17 -24
- package/src/components/default-block-appender/style.scss +4 -0
- package/src/components/default-block-appender/test/__snapshots__/index.js.snap +12 -24
- package/src/components/default-block-appender/test/index.js +4 -14
- package/src/components/default-style-picker/index.js +18 -6
- package/src/components/iframe/index.js +6 -3
- package/src/components/index.js +5 -2
- package/src/components/inner-blocks/README.md +2 -0
- package/src/components/inner-blocks/default-block-appender.js +2 -7
- package/src/components/inserter/index.native.js +2 -2
- package/src/components/inserter/tabs.native.js +5 -4
- package/src/components/inspector-controls/block-support-slot-container.js +3 -1
- package/src/components/inspector-controls/fill.native.js +4 -3
- package/src/components/inspector-controls/groups.js +2 -0
- package/src/components/inspector-controls/slot.js +2 -7
- package/src/components/letter-spacing-control/index.js +6 -6
- package/src/components/link-control/README.md +1 -1
- package/src/components/link-control/test/index.js +2 -0
- package/src/components/list-view/block-select-button.js +20 -1
- package/src/components/media-placeholder/index.js +2 -0
- package/src/components/media-replace-flow/index.js +2 -0
- package/src/components/rich-text/file-paste-handler.js +3 -1
- package/src/components/rich-text/prevent-event-discovery.js +23 -0
- package/src/components/rich-text/use-input-rules.js +2 -1
- package/src/components/selection-scroll-into-view/index.js +1 -0
- package/src/components/url-input/README.md +5 -0
- package/src/components/use-display-block-controls/index.native.js +38 -0
- package/src/components/use-on-block-drop/index.js +7 -3
- package/src/components/writing-flow/test/use-multi-selection.js +36 -0
- package/src/components/writing-flow/use-multi-selection.js +12 -9
- package/src/hooks/border-color.js +55 -3
- package/src/hooks/border-radius.js +32 -0
- package/src/hooks/border-style.js +26 -0
- package/src/hooks/border-width.js +56 -32
- package/src/hooks/border.js +115 -20
- package/src/hooks/border.scss +3 -17
- package/src/hooks/dimensions.scss +5 -0
- package/src/hooks/letter-spacing.js +1 -1
- package/src/hooks/typography.js +1 -1
- package/src/store/actions.js +1 -2
- package/src/store/defaults.js +2 -0
- package/src/store/selectors.js +37 -7
- package/src/style.scss +4 -3
- package/src/utils/get-paste-event-data.js +1 -1
- package/src/utils/parse-css-unit-to-px.js +1 -1
- package/src/utils/test/parse-css-unit-to-px.js +1 -0
- package/tsconfig.tsbuildinfo +1 -1
- package/build/components/use-canvas-click-redirect/index.js +0 -66
- package/build/components/use-canvas-click-redirect/index.js.map +0 -1
- package/build-module/components/use-canvas-click-redirect/index.js +0 -54
- package/build-module/components/use-canvas-click-redirect/index.js.map +0 -1
- package/src/components/use-canvas-click-redirect/index.js +0 -57
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["@wordpress/block-editor/src/utils/get-paste-event-data.js"],"names":["createBlobURL","getFilesFromDataTransfer","getPasteEventData","clipboardData","plainText","html","getData","error1","error2","files","filter","type","test","length","map","file","join"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,aAAT,QAA8B,iBAA9B;AACA,SAASC,wBAAT,QAAyC,gBAAzC;AAEA,OAAO,SAASC,iBAAT,OAAgD;AAAA,MAApB;AAAEC,IAAAA;AAAF,GAAoB;AACtD,MAAIC,SAAS,GAAG,EAAhB;AACA,MAAIC,IAAI,GAAG,EAAX,CAFsD,CAItD;AACA;AACA;;AACA,MAAI;AACHD,IAAAA,SAAS,GAAGD,aAAa,CAACG,OAAd,CAAuB,YAAvB,CAAZ;AACAD,IAAAA,IAAI,GAAGF,aAAa,CAACG,OAAd,CAAuB,WAAvB,CAAP;AACA,GAHD,CAGE,OAAQC,MAAR,EAAiB;AAClB,QAAI;AACHF,MAAAA,IAAI,GAAGF,aAAa,CAACG,OAAd,CAAuB,MAAvB,CAAP;AACA,KAFD,CAEE,OAAQE,MAAR,EAAiB;AAClB;AACA;AACA;AACA;AACA;AACD;;AAED,QAAMC,KAAK,GAAGR,wBAAwB,CACrCE,aADqC,CAAxB,CAEZO,MAFY,CAEJ;AAAA,QAAE;AAAEC,MAAAA;AAAF,KAAF;AAAA,WAAgB,
|
|
1
|
+
{"version":3,"sources":["@wordpress/block-editor/src/utils/get-paste-event-data.js"],"names":["createBlobURL","getFilesFromDataTransfer","getPasteEventData","clipboardData","plainText","html","getData","error1","error2","files","filter","type","test","length","map","file","join"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,aAAT,QAA8B,iBAA9B;AACA,SAASC,wBAAT,QAAyC,gBAAzC;AAEA,OAAO,SAASC,iBAAT,OAAgD;AAAA,MAApB;AAAEC,IAAAA;AAAF,GAAoB;AACtD,MAAIC,SAAS,GAAG,EAAhB;AACA,MAAIC,IAAI,GAAG,EAAX,CAFsD,CAItD;AACA;AACA;;AACA,MAAI;AACHD,IAAAA,SAAS,GAAGD,aAAa,CAACG,OAAd,CAAuB,YAAvB,CAAZ;AACAD,IAAAA,IAAI,GAAGF,aAAa,CAACG,OAAd,CAAuB,WAAvB,CAAP;AACA,GAHD,CAGE,OAAQC,MAAR,EAAiB;AAClB,QAAI;AACHF,MAAAA,IAAI,GAAGF,aAAa,CAACG,OAAd,CAAuB,MAAvB,CAAP;AACA,KAFD,CAEE,OAAQE,MAAR,EAAiB;AAClB;AACA;AACA;AACA;AACA;AACD;;AAED,QAAMC,KAAK,GAAGR,wBAAwB,CACrCE,aADqC,CAAxB,CAEZO,MAFY,CAEJ;AAAA,QAAE;AAAEC,MAAAA;AAAF,KAAF;AAAA,WAAgB,kCAAkCC,IAAlC,CAAwCD,IAAxC,CAAhB;AAAA,GAFI,CAAd,CArBsD,CAyBtD;AACA;;AACA,MAAKF,KAAK,CAACI,MAAN,IAAgB,CAAER,IAAvB,EAA8B;AAC7BA,IAAAA,IAAI,GAAGI,KAAK,CACVK,GADK,CACEC,IAAF,IAAa,aAAaf,aAAa,CAAEe,IAAF,CAAU,IADjD,EAELC,IAFK,CAEC,EAFD,CAAP;AAGAZ,IAAAA,SAAS,GAAG,EAAZ;AACA;;AAED,SAAO;AAAEC,IAAAA,IAAF;AAAQD,IAAAA;AAAR,GAAP;AACA","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { createBlobURL } from '@wordpress/blob';\nimport { getFilesFromDataTransfer } from '@wordpress/dom';\n\nexport function getPasteEventData( { clipboardData } ) {\n\tlet plainText = '';\n\tlet html = '';\n\n\t// IE11 only supports `Text` as an argument for `getData` and will\n\t// otherwise throw an invalid argument error, so we try the standard\n\t// arguments first, then fallback to `Text` if they fail.\n\ttry {\n\t\tplainText = clipboardData.getData( 'text/plain' );\n\t\thtml = clipboardData.getData( 'text/html' );\n\t} catch ( error1 ) {\n\t\ttry {\n\t\t\thtml = clipboardData.getData( 'Text' );\n\t\t} catch ( error2 ) {\n\t\t\t// Some browsers like UC Browser paste plain text by default and\n\t\t\t// don't support clipboardData at all, so allow default\n\t\t\t// behaviour.\n\t\t\treturn;\n\t\t}\n\t}\n\n\tconst files = getFilesFromDataTransfer(\n\t\tclipboardData\n\t).filter( ( { type } ) => /^image\\/(?:jpe?g|png|gif|webp)$/.test( type ) );\n\n\t// Only process files if no HTML is present.\n\t// A pasted file may have the URL as plain text.\n\tif ( files.length && ! html ) {\n\t\thtml = files\n\t\t\t.map( ( file ) => `<img src=\"${ createBlobURL( file ) }\">` )\n\t\t\t.join( '' );\n\t\tplainText = '';\n\t}\n\n\treturn { html, plainText };\n}\n"]}
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* @return {Object} parsedUnit
|
|
6
6
|
*/
|
|
7
7
|
function parseUnit(cssUnit) {
|
|
8
|
-
const match = cssUnit === null || cssUnit === void 0 ? void 0 : cssUnit.trim().match(/^(0?[-.]?\d+)(r?e[m|x]|v[h|w|min|max]+|p[x|t|c]|[c|m]m|%|in|ch|Q|lh)$/);
|
|
8
|
+
const match = cssUnit === null || cssUnit === void 0 ? void 0 : cssUnit.trim().match(/^(0?[-.]?\d*\.?\d+)(r?e[m|x]|v[h|w|min|max]+|p[x|t|c]|[c|m]m|%|in|ch|Q|lh)$/);
|
|
9
9
|
|
|
10
10
|
if (!isNaN(cssUnit) && !isNaN(parseFloat(cssUnit))) {
|
|
11
11
|
return {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["@wordpress/block-editor/src/utils/parse-css-unit-to-px.js"],"names":["parseUnit","cssUnit","match","trim","isNaN","parseFloat","value","unit","undefined","calculate","expression","Function","getFunctionUnitValue","functionUnitValue","options","functionUnit","split","filter","Boolean","units","slice","map","getPxFromCssUnit","Math","min","max","length","parseUnitFunction","currentCssUnit","regExp","matches","exec","replace","isMathExpression","i","includes","evalMathExpression","errorFound","cssUnitsBits","parsedUnit","toFixed","convertParsedUnitToPx","PIXELS_PER_INCH","ONE_PERCENT","defaultProperties","fontSize","lineHeight","width","height","type","setOptions","Object","assign","relativeUnits","em","rem","vh","vw","vmin","vmax","ch","ex","lh","absoluteUnits","in","cm","mm","pt","pc","px","Q","Number","isFinite","cache","memo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,MAAxB,CAAL,EAAwC;AACvCF,IAAAA,IAAI,GAAG,MAAM7D,OAAO,CAACmC,IAArB;AACA;;AACD,SAAO0B,IAAP;AACA;;AAED,eAAeD,wBAAf","sourcesContent":["/**\n * Converts string to object { value, unit }.\n *\n * @param {string} cssUnit\n * @return {Object} parsedUnit\n */\nfunction parseUnit( cssUnit ) {\n\tconst match = cssUnit\n\t\t?.trim()\n\t\t.match(\n\t\t\t/^(0?[-.]?\\d+)(r?e[m|x]|v[h|w|min|max]+|p[x|t|c]|[c|m]m|%|in|ch|Q|lh)$/\n\t\t);\n\tif ( ! isNaN( cssUnit ) && ! isNaN( parseFloat( cssUnit ) ) ) {\n\t\treturn { value: parseFloat( cssUnit ), unit: 'px' };\n\t}\n\treturn match\n\t\t? { value: parseFloat( match[ 1 ] ) || match[ 1 ], unit: match[ 2 ] }\n\t\t: { value: cssUnit, unit: undefined };\n}\n/**\n * Evaluate a math expression.\n *\n * @param {string} expression\n * @return {number} evaluated expression.\n */\nfunction calculate( expression ) {\n\treturn Function( `'use strict'; return (${ expression })` )();\n}\n\n/**\n * Calculates the css function value for the supported css functions such as max, min, clamp and calc.\n *\n * @param {string} functionUnitValue string should be in a particular format (for example min(12px,12px) ) no nested loops.\n * @param {Object} options\n * @return {string} unit containing the unit in PX.\n */\nfunction getFunctionUnitValue( functionUnitValue, options ) {\n\tconst functionUnit = functionUnitValue.split( /[(),]/g ).filter( Boolean );\n\n\tconst units = functionUnit\n\t\t.slice( 1 )\n\t\t.map( ( unit ) => parseUnit( getPxFromCssUnit( unit, options ) ).value )\n\t\t.filter( Boolean );\n\n\tswitch ( functionUnit[ 0 ] ) {\n\t\tcase 'min':\n\t\t\treturn Math.min( ...units ) + 'px';\n\t\tcase 'max':\n\t\t\treturn Math.max( ...units ) + 'px';\n\t\tcase 'clamp':\n\t\t\tif ( units.length !== 3 ) {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\tif ( units[ 1 ] < units[ 0 ] ) {\n\t\t\t\treturn units[ 0 ] + 'px';\n\t\t\t}\n\t\t\tif ( units[ 1 ] > units[ 2 ] ) {\n\t\t\t\treturn units[ 2 ] + 'px';\n\t\t\t}\n\t\t\treturn units[ 1 ] + 'px';\n\t\tcase 'calc':\n\t\t\treturn units[ 0 ] + 'px';\n\t}\n}\n\n/**\n * Take a css function such as min, max, calc, clamp and returns parsedUnit\n *\n * How this works for the nested function is that it first replaces the inner function call.\n * Then it tackles the outer onces.\n * So for example: min( max(25px, 35px), 40px )\n * in the first pass we would replace max(25px, 35px) with 35px.\n * then we would try to evaluate min( 35px, 40px )\n * and then finally return 35px.\n *\n * @param {string} cssUnit\n * @return {Object} parsedUnit object.\n */\nfunction parseUnitFunction( cssUnit ) {\n\twhile ( true ) {\n\t\tconst currentCssUnit = cssUnit;\n\t\tconst regExp = /(max|min|calc|clamp)\\(([^()]*)\\)/g;\n\t\tconst matches = regExp.exec( cssUnit ) || [];\n\t\tif ( matches[ 0 ] ) {\n\t\t\tconst functionUnitValue = getFunctionUnitValue( matches[ 0 ] );\n\t\t\tcssUnit = cssUnit.replace( matches[ 0 ], functionUnitValue );\n\t\t}\n\n\t\t// if the unit hasn't been modified or we have a single value break free.\n\t\tif ( cssUnit === currentCssUnit || parseFloat( cssUnit ) ) {\n\t\t\tbreak;\n\t\t}\n\t}\n\n\treturn parseUnit( cssUnit );\n}\n/**\n * Return true if we think this is a math expression.\n *\n * @param {string} cssUnit the cssUnit value being evaluted.\n * @return {boolean} Whether the cssUnit is a math expression.\n */\nfunction isMathExpression( cssUnit ) {\n\tfor ( let i = 0; i < cssUnit.length; i++ ) {\n\t\tif ( [ '+', '-', '/', '*' ].includes( cssUnit[ i ] ) ) {\n\t\t\treturn true;\n\t\t}\n\t}\n\treturn false;\n}\n/**\n * Evaluates the math expression and return a px value.\n *\n * @param {string} cssUnit the cssUnit value being evaluted.\n * @return {string} return a converfted value to px.\n */\nfunction evalMathExpression( cssUnit ) {\n\tlet errorFound = false;\n\t// Convert every part of the expression to px values.\n\tconst cssUnitsBits = cssUnit.split( /[+-/*/]/g ).filter( Boolean );\n\tfor ( const unit of cssUnitsBits ) {\n\t\t// Standardize the unit to px and extract the value.\n\t\tconst parsedUnit = parseUnit( getPxFromCssUnit( unit ) );\n\t\tif ( ! parseFloat( parsedUnit.value ) ) {\n\t\t\terrorFound = true;\n\t\t\t// end early since we are dealing with a null value.\n\t\t\tbreak;\n\t\t}\n\t\tcssUnit = cssUnit.replace( unit, parsedUnit.value );\n\t}\n\n\treturn errorFound ? null : calculate( cssUnit ).toFixed( 0 ) + 'px';\n}\n\n/**\n * Convert a parsedUnit object to px value.\n *\n * @param {Object} parsedUnit\n * @param {Object} options\n * @return {string} or {null} returns the converted with in a px value format.\n */\nfunction convertParsedUnitToPx( parsedUnit, options ) {\n\tconst PIXELS_PER_INCH = 96;\n\tconst ONE_PERCENT = 0.01;\n\n\tconst defaultProperties = {\n\t\tfontSize: 16,\n\t\tlineHeight: 16,\n\t\twidth: 375,\n\t\theight: 812,\n\t\ttype: 'font',\n\t};\n\n\tconst setOptions = Object.assign( {}, defaultProperties, options );\n\n\tconst relativeUnits = {\n\t\tem: setOptions.fontSize,\n\t\trem: setOptions.fontSize,\n\t\tvh: setOptions.height * ONE_PERCENT,\n\t\tvw: setOptions.width * ONE_PERCENT,\n\t\tvmin:\n\t\t\t( setOptions.width < setOptions.height\n\t\t\t\t? setOptions.width\n\t\t\t\t: setOptions.height ) * ONE_PERCENT,\n\t\tvmax:\n\t\t\t( setOptions.width > setOptions.height\n\t\t\t\t? setOptions.width\n\t\t\t\t: setOptions.height ) * ONE_PERCENT,\n\t\t'%':\n\t\t\t( setOptions.type === 'font'\n\t\t\t\t? setOptions.fontSize\n\t\t\t\t: setOptions.width ) * ONE_PERCENT,\n\t\tch: 8, // The advance measure (width) of the glyph \"0\" of the element's font. Approximate\n\t\tex: 7.15625, // x-height of the element's font. Approximate\n\t\tlh: setOptions.lineHeight,\n\t};\n\n\tconst absoluteUnits = {\n\t\tin: PIXELS_PER_INCH,\n\t\tcm: PIXELS_PER_INCH / 2.54,\n\t\tmm: PIXELS_PER_INCH / 25.4,\n\t\tpt: PIXELS_PER_INCH / 72,\n\t\tpc: PIXELS_PER_INCH / 6,\n\t\tpx: 1,\n\t\tQ: PIXELS_PER_INCH / 2.54 / 40,\n\t};\n\n\tif ( relativeUnits[ parsedUnit.unit ] ) {\n\t\treturn (\n\t\t\t( relativeUnits[ parsedUnit.unit ] * parsedUnit.value ).toFixed(\n\t\t\t\t0\n\t\t\t) + 'px'\n\t\t);\n\t}\n\n\tif ( absoluteUnits[ parsedUnit.unit ] ) {\n\t\treturn (\n\t\t\t( absoluteUnits[ parsedUnit.unit ] * parsedUnit.value ).toFixed(\n\t\t\t\t0\n\t\t\t) + 'px'\n\t\t);\n\t}\n\n\treturn null;\n}\n\n/**\n * Returns the px value of a cssUnit.\n *\n * @param {string} cssUnit\n * @param {Object} options\n * @return {string} returns the cssUnit value in a simple px format.\n */\nexport function getPxFromCssUnit( cssUnit, options = {} ) {\n\tif ( Number.isFinite( cssUnit ) ) {\n\t\treturn cssUnit.toFixed( 0 ) + 'px';\n\t}\n\tif ( cssUnit === undefined ) {\n\t\treturn null;\n\t}\n\tlet parsedUnit = parseUnit( cssUnit );\n\n\tif ( ! parsedUnit.unit ) {\n\t\tparsedUnit = parseUnitFunction( cssUnit, options );\n\t}\n\n\tif ( isMathExpression( cssUnit ) && ! parsedUnit.unit ) {\n\t\treturn evalMathExpression( cssUnit );\n\t}\n\n\treturn convertParsedUnitToPx( parsedUnit, options );\n}\n\n// Use simple cache.\nconst cache = {};\n/**\n * Returns the px value of a cssUnit. The memoized version of getPxFromCssUnit;\n *\n * @param {string} cssUnit\n * @param {Object} options\n * @return {string} returns the cssUnit value in a simple px format.\n */\nfunction memoizedGetPxFromCssUnit( cssUnit, options = {} ) {\n\tconst hash = cssUnit + hashOptions( options );\n\n\tif ( ! cache[ hash ] ) {\n\t\tcache[ hash ] = getPxFromCssUnit( cssUnit, options );\n\t}\n\treturn cache[ hash ];\n}\n\nfunction hashOptions( options ) {\n\tlet hash = '';\n\tif ( options.hasOwnProperty( 'fontSize' ) ) {\n\t\thash = ':' + options.width;\n\t}\n\tif ( options.hasOwnProperty( 'lineHeight' ) ) {\n\t\thash = ':' + options.lineHeight;\n\t}\n\tif ( options.hasOwnProperty( 'width' ) ) {\n\t\thash = ':' + options.width;\n\t}\n\tif ( options.hasOwnProperty( 'height' ) ) {\n\t\thash = ':' + options.height;\n\t}\n\tif ( options.hasOwnProperty( 'type' ) ) {\n\t\thash = ':' + options.type;\n\t}\n\treturn hash;\n}\n\nexport default memoizedGetPxFromCssUnit;\n"]}
|
|
1
|
+
{"version":3,"sources":["@wordpress/block-editor/src/utils/parse-css-unit-to-px.js"],"names":["parseUnit","cssUnit","match","trim","isNaN","parseFloat","value","unit","undefined","calculate","expression","Function","getFunctionUnitValue","functionUnitValue","options","functionUnit","split","filter","Boolean","units","slice","map","getPxFromCssUnit","Math","min","max","length","parseUnitFunction","currentCssUnit","regExp","matches","exec","replace","isMathExpression","i","includes","evalMathExpression","errorFound","cssUnitsBits","parsedUnit","toFixed","convertParsedUnitToPx","PIXELS_PER_INCH","ONE_PERCENT","defaultProperties","fontSize","lineHeight","width","height","type","setOptions","Object","assign","relativeUnits","em","rem","vh","vw","vmin","vmax","ch","ex","lh","absoluteUnits","in","cm","mm","pt","pc","px","Q","Number","isFinite","cache","memoizedGetPxFromCssUnit","hash","hashOptions","hasOwnProperty"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA,SAASA,SAAT,CAAoBC,OAApB,EAA8B;AAC7B,QAAMC,KAAK,GAAGD,OAAH,aAAGA,OAAH,uBAAGA,OAAO,CAClBE,IADW,GAEZD,KAFY,CAGZ,6EAHY,CAAd;;AAKA,MAAK,CAAEE,KAAK,CAAEH,OAAF,CAAP,IAAsB,CAAEG,KAAK,CAAEC,UAAU,CAAEJ,OAAF,CAAZ,CAAlC,EAA8D;AAC7D,WAAO;AAAEK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AAC1D,QAAM6D,IAAI,GAAG1E,OAAO,GAAG2E,WAAW,CAAE9D,OAAF,CAAlC;;AAEA,MAAK,CAAE2D,KAAK,CAAEE,IAAF,CAAZ,EAAuB;AACtBF,IAAAA,KAAK,CAAEE,IAAF,CAAL,GAAgBrD,gBAAgB,CAAErB,OAAF,EAAWa,OAAX,CAAhC;AACA;;AACD,SAAO2D,KAAK,CAAEE,IAAF,CAAZ;AACA;;AAED,SAASC,WAAT,CAAsB9D,OAAtB,EAAgC;AAC/B,MAAI6D,IAAI,GAAG,EAAX;;AACA,MAAK7D,OAAO,CAAC+D,cAAR,CAAwB,UAAxB,CAAL,EAA4C;AAC3CF,IAAAA,IAAI,GAAG,MAAM7D,OAAO,CAACiC,KAArB;AACA;;AACD,MAAKjC,OAAO,CAAC+D,cAAR,CAAwB,YAAxB,CAAL,EAA8C;AAC7CF,IAAAA,IAAI,GAAG,MAAM7D,OAAO,CAACgC,UAArB;AACA;;AACD,MAAKhC,OAAO,CAAC+D,cAAR,CAAwB,OAAxB,CAAL,EAAyC;AACxCF,IAAAA,IAAI,GAAG,MAAM7D,OAAO,CAACiC,KAArB;AACA;;AACD,MAAKjC,OAAO,CAAC+D,cAAR,CAAwB,QAAxB,CAAL,EAA0C;AACzCF,IAAAA,IAAI,GAAG,MAAM7D,OAAO,CAACkC,MAArB;AACA;;AACD,MAAKlC,OAAO,CAAC+D,cAAR,CAAwB,MAAxB,CAAL,EAAwC;AACvCF,IAAAA,IAAI,GAAG,MAAM7D,OAAO,CAACmC,IAArB;AACA;;AACD,SAAO0B,IAAP;AACA;;AAED,eAAeD,wBAAf","sourcesContent":["/**\n * Converts string to object { value, unit }.\n *\n * @param {string} cssUnit\n * @return {Object} parsedUnit\n */\nfunction parseUnit( cssUnit ) {\n\tconst match = cssUnit\n\t\t?.trim()\n\t\t.match(\n\t\t\t/^(0?[-.]?\\d*\\.?\\d+)(r?e[m|x]|v[h|w|min|max]+|p[x|t|c]|[c|m]m|%|in|ch|Q|lh)$/\n\t\t);\n\tif ( ! isNaN( cssUnit ) && ! isNaN( parseFloat( cssUnit ) ) ) {\n\t\treturn { value: parseFloat( cssUnit ), unit: 'px' };\n\t}\n\treturn match\n\t\t? { value: parseFloat( match[ 1 ] ) || match[ 1 ], unit: match[ 2 ] }\n\t\t: { value: cssUnit, unit: undefined };\n}\n/**\n * Evaluate a math expression.\n *\n * @param {string} expression\n * @return {number} evaluated expression.\n */\nfunction calculate( expression ) {\n\treturn Function( `'use strict'; return (${ expression })` )();\n}\n\n/**\n * Calculates the css function value for the supported css functions such as max, min, clamp and calc.\n *\n * @param {string} functionUnitValue string should be in a particular format (for example min(12px,12px) ) no nested loops.\n * @param {Object} options\n * @return {string} unit containing the unit in PX.\n */\nfunction getFunctionUnitValue( functionUnitValue, options ) {\n\tconst functionUnit = functionUnitValue.split( /[(),]/g ).filter( Boolean );\n\n\tconst units = functionUnit\n\t\t.slice( 1 )\n\t\t.map( ( unit ) => parseUnit( getPxFromCssUnit( unit, options ) ).value )\n\t\t.filter( Boolean );\n\n\tswitch ( functionUnit[ 0 ] ) {\n\t\tcase 'min':\n\t\t\treturn Math.min( ...units ) + 'px';\n\t\tcase 'max':\n\t\t\treturn Math.max( ...units ) + 'px';\n\t\tcase 'clamp':\n\t\t\tif ( units.length !== 3 ) {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\tif ( units[ 1 ] < units[ 0 ] ) {\n\t\t\t\treturn units[ 0 ] + 'px';\n\t\t\t}\n\t\t\tif ( units[ 1 ] > units[ 2 ] ) {\n\t\t\t\treturn units[ 2 ] + 'px';\n\t\t\t}\n\t\t\treturn units[ 1 ] + 'px';\n\t\tcase 'calc':\n\t\t\treturn units[ 0 ] + 'px';\n\t}\n}\n\n/**\n * Take a css function such as min, max, calc, clamp and returns parsedUnit\n *\n * How this works for the nested function is that it first replaces the inner function call.\n * Then it tackles the outer onces.\n * So for example: min( max(25px, 35px), 40px )\n * in the first pass we would replace max(25px, 35px) with 35px.\n * then we would try to evaluate min( 35px, 40px )\n * and then finally return 35px.\n *\n * @param {string} cssUnit\n * @return {Object} parsedUnit object.\n */\nfunction parseUnitFunction( cssUnit ) {\n\twhile ( true ) {\n\t\tconst currentCssUnit = cssUnit;\n\t\tconst regExp = /(max|min|calc|clamp)\\(([^()]*)\\)/g;\n\t\tconst matches = regExp.exec( cssUnit ) || [];\n\t\tif ( matches[ 0 ] ) {\n\t\t\tconst functionUnitValue = getFunctionUnitValue( matches[ 0 ] );\n\t\t\tcssUnit = cssUnit.replace( matches[ 0 ], functionUnitValue );\n\t\t}\n\n\t\t// if the unit hasn't been modified or we have a single value break free.\n\t\tif ( cssUnit === currentCssUnit || parseFloat( cssUnit ) ) {\n\t\t\tbreak;\n\t\t}\n\t}\n\n\treturn parseUnit( cssUnit );\n}\n/**\n * Return true if we think this is a math expression.\n *\n * @param {string} cssUnit the cssUnit value being evaluted.\n * @return {boolean} Whether the cssUnit is a math expression.\n */\nfunction isMathExpression( cssUnit ) {\n\tfor ( let i = 0; i < cssUnit.length; i++ ) {\n\t\tif ( [ '+', '-', '/', '*' ].includes( cssUnit[ i ] ) ) {\n\t\t\treturn true;\n\t\t}\n\t}\n\treturn false;\n}\n/**\n * Evaluates the math expression and return a px value.\n *\n * @param {string} cssUnit the cssUnit value being evaluted.\n * @return {string} return a converfted value to px.\n */\nfunction evalMathExpression( cssUnit ) {\n\tlet errorFound = false;\n\t// Convert every part of the expression to px values.\n\tconst cssUnitsBits = cssUnit.split( /[+-/*/]/g ).filter( Boolean );\n\tfor ( const unit of cssUnitsBits ) {\n\t\t// Standardize the unit to px and extract the value.\n\t\tconst parsedUnit = parseUnit( getPxFromCssUnit( unit ) );\n\t\tif ( ! parseFloat( parsedUnit.value ) ) {\n\t\t\terrorFound = true;\n\t\t\t// end early since we are dealing with a null value.\n\t\t\tbreak;\n\t\t}\n\t\tcssUnit = cssUnit.replace( unit, parsedUnit.value );\n\t}\n\n\treturn errorFound ? null : calculate( cssUnit ).toFixed( 0 ) + 'px';\n}\n\n/**\n * Convert a parsedUnit object to px value.\n *\n * @param {Object} parsedUnit\n * @param {Object} options\n * @return {string} or {null} returns the converted with in a px value format.\n */\nfunction convertParsedUnitToPx( parsedUnit, options ) {\n\tconst PIXELS_PER_INCH = 96;\n\tconst ONE_PERCENT = 0.01;\n\n\tconst defaultProperties = {\n\t\tfontSize: 16,\n\t\tlineHeight: 16,\n\t\twidth: 375,\n\t\theight: 812,\n\t\ttype: 'font',\n\t};\n\n\tconst setOptions = Object.assign( {}, defaultProperties, options );\n\n\tconst relativeUnits = {\n\t\tem: setOptions.fontSize,\n\t\trem: setOptions.fontSize,\n\t\tvh: setOptions.height * ONE_PERCENT,\n\t\tvw: setOptions.width * ONE_PERCENT,\n\t\tvmin:\n\t\t\t( setOptions.width < setOptions.height\n\t\t\t\t? setOptions.width\n\t\t\t\t: setOptions.height ) * ONE_PERCENT,\n\t\tvmax:\n\t\t\t( setOptions.width > setOptions.height\n\t\t\t\t? setOptions.width\n\t\t\t\t: setOptions.height ) * ONE_PERCENT,\n\t\t'%':\n\t\t\t( setOptions.type === 'font'\n\t\t\t\t? setOptions.fontSize\n\t\t\t\t: setOptions.width ) * ONE_PERCENT,\n\t\tch: 8, // The advance measure (width) of the glyph \"0\" of the element's font. Approximate\n\t\tex: 7.15625, // x-height of the element's font. Approximate\n\t\tlh: setOptions.lineHeight,\n\t};\n\n\tconst absoluteUnits = {\n\t\tin: PIXELS_PER_INCH,\n\t\tcm: PIXELS_PER_INCH / 2.54,\n\t\tmm: PIXELS_PER_INCH / 25.4,\n\t\tpt: PIXELS_PER_INCH / 72,\n\t\tpc: PIXELS_PER_INCH / 6,\n\t\tpx: 1,\n\t\tQ: PIXELS_PER_INCH / 2.54 / 40,\n\t};\n\n\tif ( relativeUnits[ parsedUnit.unit ] ) {\n\t\treturn (\n\t\t\t( relativeUnits[ parsedUnit.unit ] * parsedUnit.value ).toFixed(\n\t\t\t\t0\n\t\t\t) + 'px'\n\t\t);\n\t}\n\n\tif ( absoluteUnits[ parsedUnit.unit ] ) {\n\t\treturn (\n\t\t\t( absoluteUnits[ parsedUnit.unit ] * parsedUnit.value ).toFixed(\n\t\t\t\t0\n\t\t\t) + 'px'\n\t\t);\n\t}\n\n\treturn null;\n}\n\n/**\n * Returns the px value of a cssUnit.\n *\n * @param {string} cssUnit\n * @param {Object} options\n * @return {string} returns the cssUnit value in a simple px format.\n */\nexport function getPxFromCssUnit( cssUnit, options = {} ) {\n\tif ( Number.isFinite( cssUnit ) ) {\n\t\treturn cssUnit.toFixed( 0 ) + 'px';\n\t}\n\tif ( cssUnit === undefined ) {\n\t\treturn null;\n\t}\n\tlet parsedUnit = parseUnit( cssUnit );\n\n\tif ( ! parsedUnit.unit ) {\n\t\tparsedUnit = parseUnitFunction( cssUnit, options );\n\t}\n\n\tif ( isMathExpression( cssUnit ) && ! parsedUnit.unit ) {\n\t\treturn evalMathExpression( cssUnit );\n\t}\n\n\treturn convertParsedUnitToPx( parsedUnit, options );\n}\n\n// Use simple cache.\nconst cache = {};\n/**\n * Returns the px value of a cssUnit. The memoized version of getPxFromCssUnit;\n *\n * @param {string} cssUnit\n * @param {Object} options\n * @return {string} returns the cssUnit value in a simple px format.\n */\nfunction memoizedGetPxFromCssUnit( cssUnit, options = {} ) {\n\tconst hash = cssUnit + hashOptions( options );\n\n\tif ( ! cache[ hash ] ) {\n\t\tcache[ hash ] = getPxFromCssUnit( cssUnit, options );\n\t}\n\treturn cache[ hash ];\n}\n\nfunction hashOptions( options ) {\n\tlet hash = '';\n\tif ( options.hasOwnProperty( 'fontSize' ) ) {\n\t\thash = ':' + options.width;\n\t}\n\tif ( options.hasOwnProperty( 'lineHeight' ) ) {\n\t\thash = ':' + options.lineHeight;\n\t}\n\tif ( options.hasOwnProperty( 'width' ) ) {\n\t\thash = ':' + options.width;\n\t}\n\tif ( options.hasOwnProperty( 'height' ) ) {\n\t\thash = ':' + options.height;\n\t}\n\tif ( options.hasOwnProperty( 'type' ) ) {\n\t\thash = ':' + options.type;\n\t}\n\treturn hash;\n}\n\nexport default memoizedGetPxFromCssUnit;\n"]}
|
|
@@ -1188,66 +1188,83 @@
|
|
|
1188
1188
|
display: none;
|
|
1189
1189
|
}
|
|
1190
1190
|
|
|
1191
|
+
.block-editor-block-preview__live-content * {
|
|
1192
|
+
pointer-events: none;
|
|
1193
|
+
}
|
|
1194
|
+
.block-editor-block-preview__live-content .block-list-appender {
|
|
1195
|
+
display: none;
|
|
1196
|
+
}
|
|
1197
|
+
.block-editor-block-preview__live-content .components-button:disabled {
|
|
1198
|
+
opacity: initial;
|
|
1199
|
+
}
|
|
1200
|
+
.block-editor-block-preview__live-content .components-placeholder,
|
|
1201
|
+
.block-editor-block-preview__live-content .block-editor-block-list__block[data-empty=true] {
|
|
1202
|
+
display: none;
|
|
1203
|
+
}
|
|
1204
|
+
|
|
1191
1205
|
.block-editor-block-settings-menu__popover .components-dropdown-menu__menu {
|
|
1192
1206
|
padding: 0;
|
|
1193
1207
|
}
|
|
1194
1208
|
|
|
1195
|
-
.block-editor-block-styles {
|
|
1196
|
-
|
|
1197
|
-
flex-wrap: wrap;
|
|
1198
|
-
justify-content: space-between;
|
|
1209
|
+
.block-editor-block-styles + .default-style-picker__default-switcher {
|
|
1210
|
+
margin-top: 16px;
|
|
1199
1211
|
}
|
|
1200
1212
|
|
|
1201
|
-
.block-editor-block-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
border-radius: 2px;
|
|
1208
|
-
padding: 6px;
|
|
1209
|
-
display: flex;
|
|
1210
|
-
flex-direction: column;
|
|
1211
|
-
}
|
|
1212
|
-
.block-editor-block-styles__item:focus {
|
|
1213
|
-
box-shadow: 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color);
|
|
1214
|
-
outline: 2px solid transparent;
|
|
1213
|
+
.block-editor-block-styles__preview-panel {
|
|
1214
|
+
display: none;
|
|
1215
|
+
position: absolute;
|
|
1216
|
+
left: 16px;
|
|
1217
|
+
right: auto;
|
|
1218
|
+
z-index: 90;
|
|
1215
1219
|
}
|
|
1216
|
-
|
|
1217
|
-
|
|
1220
|
+
@media (min-width: 782px) {
|
|
1221
|
+
.block-editor-block-styles__preview-panel {
|
|
1222
|
+
display: block;
|
|
1223
|
+
}
|
|
1218
1224
|
}
|
|
1219
|
-
.block-editor-block-
|
|
1220
|
-
|
|
1225
|
+
.block-editor-block-styles__preview-panel .block-editor-inserter__preview-container {
|
|
1226
|
+
right: auto;
|
|
1227
|
+
left: auto;
|
|
1228
|
+
top: auto;
|
|
1229
|
+
position: static;
|
|
1221
1230
|
}
|
|
1222
|
-
.block-editor-block-
|
|
1231
|
+
.block-editor-block-styles__preview-panel .block-editor-block-card__title.block-editor-block-card__title {
|
|
1223
1232
|
margin: 0;
|
|
1224
|
-
border: 2px solid #1e1e1e;
|
|
1225
1233
|
}
|
|
1226
|
-
.block-editor-block-
|
|
1227
|
-
|
|
1234
|
+
.block-editor-block-styles__preview-panel .block-editor-block-icon {
|
|
1235
|
+
display: none;
|
|
1228
1236
|
}
|
|
1229
1237
|
|
|
1230
|
-
.block-editor-block-
|
|
1231
|
-
outline: 1px solid transparent;
|
|
1232
|
-
padding: 0;
|
|
1233
|
-
margin: 2px;
|
|
1234
|
-
border-radius: 2px;
|
|
1238
|
+
.block-editor-block-styles__variants {
|
|
1235
1239
|
display: flex;
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
flex-grow: 1;
|
|
1240
|
-
min-height: 80px;
|
|
1241
|
-
max-height: 160px;
|
|
1240
|
+
flex-wrap: wrap;
|
|
1241
|
+
justify-content: space-between;
|
|
1242
|
+
gap: 8px;
|
|
1242
1243
|
}
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
|
|
1244
|
+
.block-editor-block-styles__variants .block-editor-block-styles__item {
|
|
1245
|
+
color: #2f2f2f;
|
|
1246
|
+
box-shadow: inset 0 0 0 1px #ccc;
|
|
1247
|
+
display: inline-block;
|
|
1248
|
+
width: calc(50% - 4px);
|
|
1249
|
+
}
|
|
1250
|
+
.block-editor-block-styles__variants .block-editor-block-styles__item:focus, .block-editor-block-styles__variants .block-editor-block-styles__item:hover {
|
|
1251
|
+
color: var(--wp-admin-theme-color);
|
|
1252
|
+
box-shadow: inset 0 0 0 2px var(--wp-admin-theme-color);
|
|
1253
|
+
}
|
|
1254
|
+
.block-editor-block-styles__variants .block-editor-block-styles__item.is-active, .block-editor-block-styles__variants .block-editor-block-styles__item.is-active:hover {
|
|
1255
|
+
background-color: #2f2f2f;
|
|
1256
|
+
box-shadow: none;
|
|
1257
|
+
}
|
|
1258
|
+
.block-editor-block-styles__variants .block-editor-block-styles__item.is-active .block-editor-block-styles__item-text, .block-editor-block-styles__variants .block-editor-block-styles__item.is-active:hover .block-editor-block-styles__item-text {
|
|
1259
|
+
color: #fff;
|
|
1260
|
+
}
|
|
1261
|
+
.block-editor-block-styles__variants .block-editor-block-styles__item.is-active:focus {
|
|
1262
|
+
box-shadow: inset 0 0 0 1px #fff, 0 0 0 2px var(--wp-admin-theme-color);
|
|
1246
1263
|
}
|
|
1247
1264
|
|
|
1248
|
-
.block-editor-block-
|
|
1249
|
-
|
|
1250
|
-
|
|
1265
|
+
.block-editor-block-styles__block-preview-container,
|
|
1266
|
+
.block-editor-block-styles__block-preview-container * {
|
|
1267
|
+
box-sizing: border-box !important;
|
|
1251
1268
|
}
|
|
1252
1269
|
|
|
1253
1270
|
.block-editor-block-switcher {
|
|
@@ -1704,7 +1721,6 @@
|
|
|
1704
1721
|
}
|
|
1705
1722
|
.components-border-style-control .components-border-style-control__buttons {
|
|
1706
1723
|
display: inline-flex;
|
|
1707
|
-
margin-bottom: 24px;
|
|
1708
1724
|
}
|
|
1709
1725
|
.components-border-style-control .components-border-style-control__buttons .components-button.has-icon {
|
|
1710
1726
|
min-width: 30px;
|
|
@@ -1743,11 +1759,14 @@
|
|
|
1743
1759
|
margin-bottom: 12px;
|
|
1744
1760
|
}
|
|
1745
1761
|
|
|
1746
|
-
.block-editor-panel-color-gradient-settings .
|
|
1747
|
-
|
|
1762
|
+
.block-editor-panel-color-gradient-settings .block-editor-panel-color-gradient-settings__panel-title {
|
|
1763
|
+
display: flex;
|
|
1764
|
+
gap: 12px;
|
|
1748
1765
|
}
|
|
1749
|
-
.block-editor-panel-color-gradient-settings__panel-title .component-color-indicator {
|
|
1750
|
-
|
|
1766
|
+
.block-editor-panel-color-gradient-settings .block-editor-panel-color-gradient-settings__panel-title .component-color-indicator {
|
|
1767
|
+
width: 12px;
|
|
1768
|
+
height: 12px;
|
|
1769
|
+
align-self: center;
|
|
1751
1770
|
}
|
|
1752
1771
|
.block-editor-panel-color-gradient-settings.is-opened .block-editor-panel-color-gradient-settings__panel-title .component-color-indicator {
|
|
1753
1772
|
display: none;
|
|
@@ -1762,6 +1781,35 @@
|
|
|
1762
1781
|
.block-editor-block-inspector .block-editor-panel-color-gradient-settings .components-base-control {
|
|
1763
1782
|
margin-bottom: inherit;
|
|
1764
1783
|
}
|
|
1784
|
+
.block-editor-panel-color-gradient-settings .block-editor-panel-color-gradient-settings__dropdown {
|
|
1785
|
+
display: block;
|
|
1786
|
+
}
|
|
1787
|
+
|
|
1788
|
+
.block-editor-panel-color-gradient-settings__dropdown-content .components-popover__content > div {
|
|
1789
|
+
width: 280px;
|
|
1790
|
+
}
|
|
1791
|
+
|
|
1792
|
+
@media (min-width: 782px) {
|
|
1793
|
+
.block-editor-panel-color-gradient-settings__dropdown-content .components-popover__content {
|
|
1794
|
+
margin-left: 156px !important;
|
|
1795
|
+
margin-top: -60px !important;
|
|
1796
|
+
}
|
|
1797
|
+
}
|
|
1798
|
+
.block-editor-panel-color-gradient-settings__dropdown:last-child > div {
|
|
1799
|
+
border-bottom-width: 0;
|
|
1800
|
+
}
|
|
1801
|
+
|
|
1802
|
+
.block-editor-panel-color-gradient-settings__item {
|
|
1803
|
+
padding-top: 12px !important;
|
|
1804
|
+
padding-bottom: 12px !important;
|
|
1805
|
+
}
|
|
1806
|
+
.block-editor-panel-color-gradient-settings__item .block-editor-panel-color-gradient-settings__color-indicator {
|
|
1807
|
+
background: linear-gradient(45deg, transparent 48%, #ddd 48%, #ddd 52%, transparent 52%);
|
|
1808
|
+
}
|
|
1809
|
+
.block-editor-panel-color-gradient-settings__item.is-open {
|
|
1810
|
+
background: #f0f0f0;
|
|
1811
|
+
color: var(--wp-admin-theme-color);
|
|
1812
|
+
}
|
|
1765
1813
|
|
|
1766
1814
|
.block-editor-contrast-checker > .components-notice {
|
|
1767
1815
|
margin: 0;
|
|
@@ -1859,6 +1907,10 @@
|
|
|
1859
1907
|
display: flex;
|
|
1860
1908
|
}
|
|
1861
1909
|
|
|
1910
|
+
.block-editor-default-block-appender__content {
|
|
1911
|
+
cursor: text;
|
|
1912
|
+
}
|
|
1913
|
+
|
|
1862
1914
|
.block-editor-duotone-control__popover > .components-popover__content > div {
|
|
1863
1915
|
padding: 16px;
|
|
1864
1916
|
width: 280px;
|
|
@@ -1893,6 +1945,119 @@
|
|
|
1893
1945
|
text-transform: capitalize;
|
|
1894
1946
|
}
|
|
1895
1947
|
|
|
1948
|
+
.block-editor-image-size-control {
|
|
1949
|
+
margin-bottom: 1em;
|
|
1950
|
+
}
|
|
1951
|
+
.block-editor-image-size-control .block-editor-image-size-control__row {
|
|
1952
|
+
display: flex;
|
|
1953
|
+
justify-content: space-between;
|
|
1954
|
+
}
|
|
1955
|
+
.block-editor-image-size-control .block-editor-image-size-control__row .block-editor-image-size-control__width,
|
|
1956
|
+
.block-editor-image-size-control .block-editor-image-size-control__row .block-editor-image-size-control__height {
|
|
1957
|
+
margin-bottom: 0.5em;
|
|
1958
|
+
}
|
|
1959
|
+
.block-editor-image-size-control .block-editor-image-size-control__row .block-editor-image-size-control__width input,
|
|
1960
|
+
.block-editor-image-size-control .block-editor-image-size-control__row .block-editor-image-size-control__height input {
|
|
1961
|
+
line-height: 1.25;
|
|
1962
|
+
}
|
|
1963
|
+
.block-editor-image-size-control .block-editor-image-size-control__row .block-editor-image-size-control__width {
|
|
1964
|
+
margin-left: 5px;
|
|
1965
|
+
}
|
|
1966
|
+
.block-editor-image-size-control .block-editor-image-size-control__row .block-editor-image-size-control__height {
|
|
1967
|
+
margin-right: 5px;
|
|
1968
|
+
}
|
|
1969
|
+
|
|
1970
|
+
.block-editor-block-list__layout.has-overlay::after {
|
|
1971
|
+
content: "";
|
|
1972
|
+
position: absolute;
|
|
1973
|
+
top: 0;
|
|
1974
|
+
left: 0;
|
|
1975
|
+
bottom: 0;
|
|
1976
|
+
right: 0;
|
|
1977
|
+
z-index: 60;
|
|
1978
|
+
}
|
|
1979
|
+
|
|
1980
|
+
.block-editor-block-types-list__list-item {
|
|
1981
|
+
display: block;
|
|
1982
|
+
width: 33.33%;
|
|
1983
|
+
padding: 0;
|
|
1984
|
+
margin: 0;
|
|
1985
|
+
}
|
|
1986
|
+
|
|
1987
|
+
.components-button.block-editor-block-types-list__item {
|
|
1988
|
+
display: flex;
|
|
1989
|
+
flex-direction: column;
|
|
1990
|
+
width: 100%;
|
|
1991
|
+
font-size: 13px;
|
|
1992
|
+
color: #1e1e1e;
|
|
1993
|
+
padding: 8px;
|
|
1994
|
+
align-items: stretch;
|
|
1995
|
+
justify-content: center;
|
|
1996
|
+
cursor: pointer;
|
|
1997
|
+
background: transparent;
|
|
1998
|
+
word-break: break-word;
|
|
1999
|
+
border-radius: 2px;
|
|
2000
|
+
transition: all 0.05s ease-in-out;
|
|
2001
|
+
position: relative;
|
|
2002
|
+
height: auto;
|
|
2003
|
+
}
|
|
2004
|
+
@media (prefers-reduced-motion: reduce) {
|
|
2005
|
+
.components-button.block-editor-block-types-list__item {
|
|
2006
|
+
transition-duration: 0s;
|
|
2007
|
+
transition-delay: 0s;
|
|
2008
|
+
}
|
|
2009
|
+
}
|
|
2010
|
+
.components-button.block-editor-block-types-list__item:disabled {
|
|
2011
|
+
opacity: 0.6;
|
|
2012
|
+
cursor: default;
|
|
2013
|
+
}
|
|
2014
|
+
.components-button.block-editor-block-types-list__item:not(:disabled):hover {
|
|
2015
|
+
color: var(--wp-admin-theme-color) !important;
|
|
2016
|
+
}
|
|
2017
|
+
.components-button.block-editor-block-types-list__item:not(:disabled):focus {
|
|
2018
|
+
box-shadow: inset 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color);
|
|
2019
|
+
}
|
|
2020
|
+
.components-button.block-editor-block-types-list__item:not(:disabled).is-active {
|
|
2021
|
+
color: #fff;
|
|
2022
|
+
background: #1e1e1e;
|
|
2023
|
+
outline: 2px solid transparent;
|
|
2024
|
+
outline-offset: -2px;
|
|
2025
|
+
}
|
|
2026
|
+
|
|
2027
|
+
.block-editor-block-types-list__item-icon {
|
|
2028
|
+
padding: 12px 20px;
|
|
2029
|
+
border-radius: 2px;
|
|
2030
|
+
color: #1e1e1e;
|
|
2031
|
+
transition: all 0.05s ease-in-out;
|
|
2032
|
+
}
|
|
2033
|
+
@media (prefers-reduced-motion: reduce) {
|
|
2034
|
+
.block-editor-block-types-list__item-icon {
|
|
2035
|
+
transition-duration: 0s;
|
|
2036
|
+
transition-delay: 0s;
|
|
2037
|
+
}
|
|
2038
|
+
}
|
|
2039
|
+
.block-editor-block-types-list__item-icon .block-editor-block-icon {
|
|
2040
|
+
margin-right: auto;
|
|
2041
|
+
margin-left: auto;
|
|
2042
|
+
}
|
|
2043
|
+
.block-editor-block-types-list__item-icon svg {
|
|
2044
|
+
transition: all 0.15s ease-out;
|
|
2045
|
+
}
|
|
2046
|
+
@media (prefers-reduced-motion: reduce) {
|
|
2047
|
+
.block-editor-block-types-list__item-icon svg {
|
|
2048
|
+
transition-duration: 0s;
|
|
2049
|
+
transition-delay: 0s;
|
|
2050
|
+
}
|
|
2051
|
+
}
|
|
2052
|
+
.block-editor-block-types-list__list-item[draggable=true] .block-editor-block-types-list__item-icon {
|
|
2053
|
+
cursor: grab;
|
|
2054
|
+
}
|
|
2055
|
+
|
|
2056
|
+
.block-editor-block-types-list__item-title {
|
|
2057
|
+
padding: 4px 2px 8px;
|
|
2058
|
+
font-size: 12px;
|
|
2059
|
+
}
|
|
2060
|
+
|
|
1896
2061
|
.items-justified-left {
|
|
1897
2062
|
justify-content: flex-start;
|
|
1898
2063
|
}
|
|
@@ -1909,6 +2074,14 @@
|
|
|
1909
2074
|
justify-content: space-between;
|
|
1910
2075
|
}
|
|
1911
2076
|
|
|
2077
|
+
.block-editor-line-height-control {
|
|
2078
|
+
margin-bottom: 24px;
|
|
2079
|
+
}
|
|
2080
|
+
.block-editor-line-height-control input {
|
|
2081
|
+
display: block;
|
|
2082
|
+
max-width: 60px;
|
|
2083
|
+
}
|
|
2084
|
+
|
|
1912
2085
|
@keyframes loadingpulse {
|
|
1913
2086
|
0% {
|
|
1914
2087
|
opacity: 1;
|
|
@@ -2364,127 +2537,6 @@
|
|
|
2364
2537
|
flex-shrink: 0;
|
|
2365
2538
|
}
|
|
2366
2539
|
|
|
2367
|
-
.block-editor-line-height-control {
|
|
2368
|
-
margin-bottom: 24px;
|
|
2369
|
-
}
|
|
2370
|
-
.block-editor-line-height-control input {
|
|
2371
|
-
display: block;
|
|
2372
|
-
max-width: 60px;
|
|
2373
|
-
}
|
|
2374
|
-
|
|
2375
|
-
.block-editor-image-size-control {
|
|
2376
|
-
margin-bottom: 1em;
|
|
2377
|
-
}
|
|
2378
|
-
.block-editor-image-size-control .block-editor-image-size-control__row {
|
|
2379
|
-
display: flex;
|
|
2380
|
-
justify-content: space-between;
|
|
2381
|
-
}
|
|
2382
|
-
.block-editor-image-size-control .block-editor-image-size-control__row .block-editor-image-size-control__width,
|
|
2383
|
-
.block-editor-image-size-control .block-editor-image-size-control__row .block-editor-image-size-control__height {
|
|
2384
|
-
margin-bottom: 0.5em;
|
|
2385
|
-
}
|
|
2386
|
-
.block-editor-image-size-control .block-editor-image-size-control__row .block-editor-image-size-control__width input,
|
|
2387
|
-
.block-editor-image-size-control .block-editor-image-size-control__row .block-editor-image-size-control__height input {
|
|
2388
|
-
line-height: 1.25;
|
|
2389
|
-
}
|
|
2390
|
-
.block-editor-image-size-control .block-editor-image-size-control__row .block-editor-image-size-control__width {
|
|
2391
|
-
margin-left: 5px;
|
|
2392
|
-
}
|
|
2393
|
-
.block-editor-image-size-control .block-editor-image-size-control__row .block-editor-image-size-control__height {
|
|
2394
|
-
margin-right: 5px;
|
|
2395
|
-
}
|
|
2396
|
-
|
|
2397
|
-
.block-editor-block-list__layout.has-overlay::after {
|
|
2398
|
-
content: "";
|
|
2399
|
-
position: absolute;
|
|
2400
|
-
top: 0;
|
|
2401
|
-
left: 0;
|
|
2402
|
-
bottom: 0;
|
|
2403
|
-
right: 0;
|
|
2404
|
-
z-index: 60;
|
|
2405
|
-
}
|
|
2406
|
-
|
|
2407
|
-
.block-editor-block-types-list__list-item {
|
|
2408
|
-
display: block;
|
|
2409
|
-
width: 33.33%;
|
|
2410
|
-
padding: 0;
|
|
2411
|
-
margin: 0;
|
|
2412
|
-
}
|
|
2413
|
-
|
|
2414
|
-
.components-button.block-editor-block-types-list__item {
|
|
2415
|
-
display: flex;
|
|
2416
|
-
flex-direction: column;
|
|
2417
|
-
width: 100%;
|
|
2418
|
-
font-size: 13px;
|
|
2419
|
-
color: #1e1e1e;
|
|
2420
|
-
padding: 8px;
|
|
2421
|
-
align-items: stretch;
|
|
2422
|
-
justify-content: center;
|
|
2423
|
-
cursor: pointer;
|
|
2424
|
-
background: transparent;
|
|
2425
|
-
word-break: break-word;
|
|
2426
|
-
border-radius: 2px;
|
|
2427
|
-
transition: all 0.05s ease-in-out;
|
|
2428
|
-
position: relative;
|
|
2429
|
-
height: auto;
|
|
2430
|
-
}
|
|
2431
|
-
@media (prefers-reduced-motion: reduce) {
|
|
2432
|
-
.components-button.block-editor-block-types-list__item {
|
|
2433
|
-
transition-duration: 0s;
|
|
2434
|
-
transition-delay: 0s;
|
|
2435
|
-
}
|
|
2436
|
-
}
|
|
2437
|
-
.components-button.block-editor-block-types-list__item:disabled {
|
|
2438
|
-
opacity: 0.6;
|
|
2439
|
-
cursor: default;
|
|
2440
|
-
}
|
|
2441
|
-
.components-button.block-editor-block-types-list__item:not(:disabled):hover {
|
|
2442
|
-
color: var(--wp-admin-theme-color) !important;
|
|
2443
|
-
}
|
|
2444
|
-
.components-button.block-editor-block-types-list__item:not(:disabled):focus {
|
|
2445
|
-
box-shadow: inset 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color);
|
|
2446
|
-
}
|
|
2447
|
-
.components-button.block-editor-block-types-list__item:not(:disabled).is-active {
|
|
2448
|
-
color: #fff;
|
|
2449
|
-
background: #1e1e1e;
|
|
2450
|
-
outline: 2px solid transparent;
|
|
2451
|
-
outline-offset: -2px;
|
|
2452
|
-
}
|
|
2453
|
-
|
|
2454
|
-
.block-editor-block-types-list__item-icon {
|
|
2455
|
-
padding: 12px 20px;
|
|
2456
|
-
border-radius: 2px;
|
|
2457
|
-
color: #1e1e1e;
|
|
2458
|
-
transition: all 0.05s ease-in-out;
|
|
2459
|
-
}
|
|
2460
|
-
@media (prefers-reduced-motion: reduce) {
|
|
2461
|
-
.block-editor-block-types-list__item-icon {
|
|
2462
|
-
transition-duration: 0s;
|
|
2463
|
-
transition-delay: 0s;
|
|
2464
|
-
}
|
|
2465
|
-
}
|
|
2466
|
-
.block-editor-block-types-list__item-icon .block-editor-block-icon {
|
|
2467
|
-
margin-right: auto;
|
|
2468
|
-
margin-left: auto;
|
|
2469
|
-
}
|
|
2470
|
-
.block-editor-block-types-list__item-icon svg {
|
|
2471
|
-
transition: all 0.15s ease-out;
|
|
2472
|
-
}
|
|
2473
|
-
@media (prefers-reduced-motion: reduce) {
|
|
2474
|
-
.block-editor-block-types-list__item-icon svg {
|
|
2475
|
-
transition-duration: 0s;
|
|
2476
|
-
transition-delay: 0s;
|
|
2477
|
-
}
|
|
2478
|
-
}
|
|
2479
|
-
.block-editor-block-types-list__list-item[draggable=true] .block-editor-block-types-list__item-icon {
|
|
2480
|
-
cursor: grab;
|
|
2481
|
-
}
|
|
2482
|
-
|
|
2483
|
-
.block-editor-block-types-list__item-title {
|
|
2484
|
-
padding: 4px 2px 8px;
|
|
2485
|
-
font-size: 12px;
|
|
2486
|
-
}
|
|
2487
|
-
|
|
2488
2540
|
.block-editor-list-view-tree {
|
|
2489
2541
|
width: 100%;
|
|
2490
2542
|
border-collapse: collapse;
|
|
@@ -3514,18 +3566,12 @@ figcaption.block-editor-rich-text__editable [data-rich-text-placeholder]::before
|
|
|
3514
3566
|
margin-bottom: 8px;
|
|
3515
3567
|
}
|
|
3516
3568
|
|
|
3517
|
-
.block-
|
|
3518
|
-
|
|
3519
|
-
justify-content: space-between;
|
|
3520
|
-
}
|
|
3521
|
-
.block-editor-hooks__border-controls .block-editor-hooks__border-controls-row > * {
|
|
3522
|
-
width: calc(50% - 8px);
|
|
3523
|
-
}
|
|
3524
|
-
.block-editor-hooks__border-controls .components-unit-control-wrapper {
|
|
3525
|
-
margin-bottom: 24px;
|
|
3569
|
+
.border-block-support-panel .single-column {
|
|
3570
|
+
grid-column: span 1;
|
|
3526
3571
|
}
|
|
3527
|
-
|
|
3528
|
-
|
|
3572
|
+
|
|
3573
|
+
.dimensions-block-support-panel .single-column {
|
|
3574
|
+
grid-column: span 1;
|
|
3529
3575
|
}
|
|
3530
3576
|
|
|
3531
3577
|
.typography-block-support-panel .components-font-appearance-control,
|