@wordpress/block-editor 17.1.0 → 17.2.1-next.v.202609171837.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 +32 -0
- package/README.md +214 -214
- package/build/autocompleters/block.cjs.map +2 -2
- package/build/components/alignment-control/ui.cjs.map +2 -2
- package/build/components/background-image-control/index.cjs +1 -1
- package/build/components/background-image-control/index.cjs.map +2 -2
- package/build/components/block-alignment-control/ui.cjs +21 -7
- package/build/components/block-alignment-control/ui.cjs.map +3 -3
- package/build/components/block-alignment-control/use-available-alignments.cjs +60 -13
- package/build/components/block-alignment-control/use-available-alignments.cjs.map +2 -2
- package/build/components/block-allowed-blocks/allowed-blocks-control.cjs.map +2 -2
- package/build/components/block-bindings/attribute-control.cjs +30 -30
- package/build/components/block-bindings/attribute-control.cjs.map +3 -3
- package/build/components/block-bindings/source-fields-list.cjs +27 -32
- package/build/components/block-bindings/source-fields-list.cjs.map +3 -3
- package/build/components/block-canvas/index.cjs.map +2 -2
- package/build/components/block-card/index.cjs +1 -2
- package/build/components/block-card/index.cjs.map +3 -3
- package/build/components/block-edit/edit.cjs.map +2 -2
- package/build/components/block-heading-level-dropdown/index.cjs.map +2 -2
- package/build/components/block-icon/index.cjs.map +2 -2
- package/build/components/block-inspector/edit-contents.cjs.map +2 -2
- package/build/components/block-inspector/index.cjs +27 -8
- package/build/components/block-inspector/index.cjs.map +3 -3
- package/build/components/block-keyboard-shortcuts/index.cjs.map +2 -2
- package/build/components/block-list/block-html.cjs +1 -12
- package/build/components/block-list/block-html.cjs.map +3 -3
- package/build/components/block-list/block.cjs +2 -4
- package/build/components/block-list/block.cjs.map +2 -2
- package/build/components/block-list/layout.cjs +1 -1
- package/build/components/block-list/layout.cjs.map +2 -2
- package/build/components/block-list/use-block-props/index.cjs.map +2 -2
- package/build/components/block-lock/modal.cjs +1 -3
- package/build/components/block-lock/modal.cjs.map +2 -2
- package/build/components/block-parent-selector/index.cjs +8 -5
- package/build/components/block-parent-selector/index.cjs.map +2 -2
- package/build/components/block-popover/index.cjs.map +2 -2
- package/build/components/block-rename/modal.cjs.map +2 -2
- package/build/components/block-settings-menu/block-settings-dropdown.cjs.map +2 -2
- package/build/components/block-styles/utils.cjs.map +2 -2
- package/build/components/block-switcher/index.cjs.map +2 -2
- package/build/components/block-toolbar/edit-section-button.cjs.map +2 -2
- package/build/components/block-toolbar/index.cjs +6 -4
- package/build/components/block-toolbar/index.cjs.map +2 -2
- package/build/components/block-toolbar/switch-section-style.cjs.map +2 -2
- package/build/components/block-variation-transforms/index.cjs +28 -18
- package/build/components/block-variation-transforms/index.cjs.map +3 -3
- package/build/components/block-visibility/modal.cjs.map +2 -2
- package/build/components/block-visibility/viewport-visibility-info.cjs.map +2 -2
- package/build/components/border-radius-control/index.cjs.map +2 -2
- package/build/components/color-palette/with-color-context.cjs.map +2 -2
- package/build/components/colors/with-colors.cjs.map +2 -2
- package/build/components/colors-gradients/control.cjs.map +2 -2
- package/build/components/contrast-checker/index.cjs.map +2 -2
- package/build/components/date-format-picker/index.cjs.map +2 -2
- package/build/components/dimensions-tool/aspect-ratio-tool.cjs.map +3 -3
- package/build/components/dimensions-tool/width-height-tool.cjs.map +2 -2
- package/build/components/font-sizes/with-font-sizes.cjs.map +2 -2
- package/build/components/global-styles/background-panel.cjs +1 -1
- package/build/components/global-styles/background-panel.cjs.map +2 -2
- package/build/components/global-styles/border-panel.cjs +1 -1
- package/build/components/global-styles/border-panel.cjs.map +2 -2
- package/build/components/global-styles/color-gradient-dropdown-item.cjs +1 -1
- package/build/components/global-styles/color-gradient-dropdown-item.cjs.map +2 -2
- package/build/components/global-styles/color-panel.cjs +1 -1
- package/build/components/global-styles/color-panel.cjs.map +2 -2
- package/build/components/global-styles/dimensions-panel.cjs +1 -1
- package/build/components/global-styles/dimensions-panel.cjs.map +2 -2
- package/build/components/global-styles/filters-panel.cjs +1 -1
- package/build/components/global-styles/filters-panel.cjs.map +2 -2
- package/build/components/global-styles/hooks.cjs +1 -0
- package/build/components/global-styles/hooks.cjs.map +2 -2
- package/build/components/global-styles/inheritance/index.cjs +3 -3
- package/build/components/global-styles/inheritance/index.cjs.map +2 -2
- package/build/components/global-styles/inherited-value-context.cjs +0 -5
- package/build/components/global-styles/inherited-value-context.cjs.map +2 -2
- package/build/components/global-styles/state-control-badges.cjs +0 -1
- package/build/components/global-styles/state-control-badges.cjs.map +2 -2
- package/build/components/global-styles/state-control.cjs +6 -4
- package/build/components/global-styles/state-control.cjs.map +2 -2
- package/build/components/global-styles/text-shadow-panel.cjs +254 -0
- package/build/components/global-styles/text-shadow-panel.cjs.map +7 -0
- package/build/components/global-styles/typography-panel.cjs +46 -5
- package/build/components/global-styles/typography-panel.cjs.map +2 -2
- package/build/components/global-styles/typography-utils.cjs.map +2 -2
- package/build/components/global-styles/utils.cjs.map +2 -2
- package/build/components/html-element-control/index.cjs.map +3 -3
- package/build/components/iframe/index.cjs.map +2 -2
- package/build/components/iframe/use-scale-canvas.cjs.map +2 -2
- package/build/components/image-size-control/index.cjs.map +3 -3
- package/build/components/inner-blocks/index.cjs +6 -1
- package/build/components/inner-blocks/index.cjs.map +2 -2
- package/build/components/inner-content/index.cjs.map +2 -2
- package/build/components/inserter/block-patterns-tab/use-pattern-categories.cjs +4 -23
- package/build/components/inserter/block-patterns-tab/use-pattern-categories.cjs.map +2 -2
- package/build/components/inserter/block-patterns-tab/utils.cjs +26 -0
- package/build/components/inserter/block-patterns-tab/utils.cjs.map +2 -2
- package/build/components/inserter/hooks/use-block-types-state.cjs.map +2 -2
- package/build/components/inserter/hooks/use-insertion-point.cjs.map +2 -2
- package/build/components/inserter/hooks/use-patterns-state.cjs.map +2 -2
- package/build/components/inserter/media-tab/media-panel.cjs.map +2 -2
- package/build/components/inserter/media-tab/media-preview.cjs.map +2 -2
- package/build/components/inserter-list-item/index.cjs.map +2 -2
- package/build/components/inspector-controls/list-view-content-popover.cjs.map +2 -2
- package/build/components/link-control/search-results.cjs.map +2 -2
- package/build/components/link-control/use-search-handler.cjs +3 -0
- package/build/components/link-control/use-search-handler.cjs.map +2 -2
- package/build/components/list-view/branch.cjs.map +2 -2
- package/build/components/list-view/drop-indicator.cjs.map +2 -2
- package/build/components/list-view/index.cjs.map +2 -2
- package/build/components/list-view/use-list-view-drop-zone.cjs.map +2 -2
- package/build/components/list-view/utils.cjs.map +2 -2
- package/build/components/media-replace-flow/index.cjs +4 -1
- package/build/components/media-replace-flow/index.cjs.map +2 -2
- package/build/components/plain-text/index.cjs +1 -2
- package/build/components/plain-text/index.cjs.map +3 -3
- package/build/components/preset-input-control/index.cjs.map +2 -2
- package/build/components/provider/index.cjs +3 -1
- package/build/components/provider/index.cjs.map +2 -2
- package/build/components/provider/use-block-sync.cjs.map +2 -2
- package/build/components/publish-date-time-picker/index.cjs.map +2 -2
- package/build/components/resizable-box-popover/index.cjs +1 -1
- package/build/components/resizable-box-popover/index.cjs.map +1 -1
- package/build/components/resolution-tool/index.cjs.map +3 -3
- package/build/components/rich-text/event-listeners/enter.cjs +8 -22
- package/build/components/rich-text/event-listeners/enter.cjs.map +2 -2
- package/build/components/rich-text/format-edit.cjs.map +2 -2
- package/build/components/rich-text/index.cjs +20 -0
- package/build/components/rich-text/index.cjs.map +2 -2
- package/build/components/rich-text/multiline.cjs +10 -2
- package/build/components/rich-text/multiline.cjs.map +2 -2
- package/build/components/spacing-sizes-control/hooks/use-spacing-sizes.cjs.map +2 -2
- package/build/components/typewriter/index.cjs.map +2 -2
- package/build/components/use-block-commands/index.cjs.map +2 -2
- package/build/components/writing-flow/index.cjs +3 -0
- package/build/components/writing-flow/index.cjs.map +2 -2
- package/build/components/writing-flow/use-clipboard-handler.cjs.map +2 -2
- package/build/components/writing-flow/use-selection-observer.cjs +5 -3
- package/build/components/writing-flow/use-selection-observer.cjs.map +2 -2
- package/build/hooks/align.cjs +3 -5
- package/build/hooks/align.cjs.map +2 -2
- package/build/hooks/background.cjs.map +2 -2
- package/build/hooks/block-bindings.cjs.map +2 -2
- package/build/hooks/border.cjs.map +2 -2
- package/build/hooks/contrast-checker.cjs.map +2 -2
- package/build/hooks/dimensions.cjs.map +2 -2
- package/build/hooks/duotone.cjs.map +2 -2
- package/build/hooks/elements.cjs.map +2 -2
- package/build/hooks/fit-text.cjs.map +2 -2
- package/build/hooks/gap.cjs +2 -1
- package/build/hooks/gap.cjs.map +3 -3
- package/build/hooks/index.cjs +4 -2
- package/build/hooks/index.cjs.map +3 -3
- package/build/hooks/layout-child.cjs.map +2 -2
- package/build/hooks/layout.cjs +15 -14
- package/build/hooks/layout.cjs.map +3 -3
- package/build/hooks/position.cjs +3 -31
- package/build/hooks/position.cjs.map +2 -2
- package/build/hooks/states.cjs +3 -2
- package/build/hooks/states.cjs.map +2 -2
- package/build/hooks/text-shadow.cjs +100 -0
- package/build/hooks/text-shadow.cjs.map +7 -0
- package/build/hooks/typography.cjs +30 -6
- package/build/hooks/typography.cjs.map +2 -2
- package/build/hooks/utils.cjs +24 -2
- package/build/hooks/utils.cjs.map +2 -2
- package/build/layouts/grid.cjs.map +2 -2
- package/build/layouts/utils.cjs +7 -2
- package/build/layouts/utils.cjs.map +2 -2
- package/build/private-apis.cjs +9 -6
- package/build/private-apis.cjs.map +2 -2
- package/build/store/actions.cjs +26 -4
- package/build/store/actions.cjs.map +3 -3
- package/build/store/private-selectors.cjs.map +2 -2
- package/build/store/reducer.cjs.map +2 -2
- package/build/store/selectors.cjs.map +2 -2
- package/build/utils/get-font-styles-and-weights.cjs.map +2 -2
- package/build/utils/transform-styles/index.cjs.map +1 -1
- package/build-module/autocompleters/block.mjs.map +2 -2
- package/build-module/components/alignment-control/ui.mjs.map +2 -2
- package/build-module/components/background-image-control/index.mjs +2 -2
- package/build-module/components/background-image-control/index.mjs.map +2 -2
- package/build-module/components/block-alignment-control/ui.mjs +21 -7
- package/build-module/components/block-alignment-control/ui.mjs.map +2 -2
- package/build-module/components/block-alignment-control/use-available-alignments.mjs +56 -13
- package/build-module/components/block-alignment-control/use-available-alignments.mjs.map +2 -2
- package/build-module/components/block-allowed-blocks/allowed-blocks-control.mjs.map +2 -2
- package/build-module/components/block-bindings/attribute-control.mjs +31 -32
- package/build-module/components/block-bindings/attribute-control.mjs.map +2 -2
- package/build-module/components/block-bindings/source-fields-list.mjs +25 -30
- package/build-module/components/block-bindings/source-fields-list.mjs.map +2 -2
- package/build-module/components/block-canvas/index.mjs.map +2 -2
- package/build-module/components/block-card/index.mjs +3 -8
- package/build-module/components/block-card/index.mjs.map +2 -2
- package/build-module/components/block-edit/edit.mjs.map +2 -2
- package/build-module/components/block-heading-level-dropdown/index.mjs.map +2 -2
- package/build-module/components/block-icon/index.mjs.map +2 -2
- package/build-module/components/block-inspector/edit-contents.mjs.map +2 -2
- package/build-module/components/block-inspector/index.mjs +29 -10
- package/build-module/components/block-inspector/index.mjs.map +2 -2
- package/build-module/components/block-keyboard-shortcuts/index.mjs.map +2 -2
- package/build-module/components/block-list/block-html.mjs +1 -2
- package/build-module/components/block-list/block-html.mjs.map +2 -2
- package/build-module/components/block-list/block.mjs +2 -4
- package/build-module/components/block-list/block.mjs.map +2 -2
- package/build-module/components/block-list/layout.mjs +1 -1
- package/build-module/components/block-list/layout.mjs.map +2 -2
- package/build-module/components/block-list/use-block-props/index.mjs.map +2 -2
- package/build-module/components/block-lock/modal.mjs +1 -3
- package/build-module/components/block-lock/modal.mjs.map +2 -2
- package/build-module/components/block-parent-selector/index.mjs +8 -5
- package/build-module/components/block-parent-selector/index.mjs.map +2 -2
- package/build-module/components/block-popover/index.mjs.map +2 -2
- package/build-module/components/block-rename/modal.mjs.map +2 -2
- package/build-module/components/block-settings-menu/block-settings-dropdown.mjs.map +2 -2
- package/build-module/components/block-styles/utils.mjs.map +2 -2
- package/build-module/components/block-switcher/index.mjs.map +2 -2
- package/build-module/components/block-toolbar/edit-section-button.mjs.map +2 -2
- package/build-module/components/block-toolbar/index.mjs +6 -4
- package/build-module/components/block-toolbar/index.mjs.map +2 -2
- package/build-module/components/block-toolbar/switch-section-style.mjs.map +2 -2
- package/build-module/components/block-variation-transforms/index.mjs +30 -21
- package/build-module/components/block-variation-transforms/index.mjs.map +2 -2
- package/build-module/components/block-visibility/modal.mjs.map +2 -2
- package/build-module/components/block-visibility/viewport-visibility-info.mjs.map +2 -2
- package/build-module/components/border-radius-control/index.mjs.map +2 -2
- package/build-module/components/color-palette/with-color-context.mjs.map +2 -2
- package/build-module/components/colors/with-colors.mjs.map +2 -2
- package/build-module/components/colors-gradients/control.mjs.map +2 -2
- package/build-module/components/contrast-checker/index.mjs.map +2 -2
- package/build-module/components/date-format-picker/index.mjs.map +2 -2
- package/build-module/components/dimensions-tool/aspect-ratio-tool.mjs +2 -2
- package/build-module/components/dimensions-tool/aspect-ratio-tool.mjs.map +2 -2
- package/build-module/components/dimensions-tool/width-height-tool.mjs.map +2 -2
- package/build-module/components/font-sizes/with-font-sizes.mjs.map +2 -2
- package/build-module/components/global-styles/background-panel.mjs +2 -2
- package/build-module/components/global-styles/background-panel.mjs.map +2 -2
- package/build-module/components/global-styles/border-panel.mjs +2 -2
- package/build-module/components/global-styles/border-panel.mjs.map +2 -2
- package/build-module/components/global-styles/color-gradient-dropdown-item.mjs +2 -2
- package/build-module/components/global-styles/color-gradient-dropdown-item.mjs.map +2 -2
- package/build-module/components/global-styles/color-panel.mjs +2 -2
- package/build-module/components/global-styles/color-panel.mjs.map +2 -2
- package/build-module/components/global-styles/dimensions-panel.mjs +2 -2
- package/build-module/components/global-styles/dimensions-panel.mjs.map +2 -2
- package/build-module/components/global-styles/filters-panel.mjs +2 -2
- package/build-module/components/global-styles/filters-panel.mjs.map +2 -2
- package/build-module/components/global-styles/hooks.mjs +1 -0
- package/build-module/components/global-styles/hooks.mjs.map +2 -2
- package/build-module/components/global-styles/inheritance/index.mjs +2 -2
- package/build-module/components/global-styles/inheritance/index.mjs.map +2 -2
- package/build-module/components/global-styles/inherited-value-context.mjs +0 -5
- package/build-module/components/global-styles/inherited-value-context.mjs.map +2 -2
- package/build-module/components/global-styles/state-control-badges.mjs +0 -1
- package/build-module/components/global-styles/state-control-badges.mjs.map +2 -2
- package/build-module/components/global-styles/state-control.mjs +6 -4
- package/build-module/components/global-styles/state-control.mjs.map +2 -2
- package/build-module/components/global-styles/text-shadow-panel.mjs +224 -0
- package/build-module/components/global-styles/text-shadow-panel.mjs.map +7 -0
- package/build-module/components/global-styles/typography-panel.mjs +47 -6
- package/build-module/components/global-styles/typography-panel.mjs.map +2 -2
- package/build-module/components/global-styles/typography-utils.mjs.map +2 -2
- package/build-module/components/global-styles/utils.mjs.map +2 -2
- package/build-module/components/html-element-control/index.mjs +2 -2
- package/build-module/components/html-element-control/index.mjs.map +2 -2
- package/build-module/components/iframe/index.mjs.map +2 -2
- package/build-module/components/iframe/use-scale-canvas.mjs.map +2 -2
- package/build-module/components/image-size-control/index.mjs +2 -2
- package/build-module/components/image-size-control/index.mjs.map +2 -2
- package/build-module/components/inner-blocks/index.mjs +6 -1
- package/build-module/components/inner-blocks/index.mjs.map +2 -2
- package/build-module/components/inner-content/index.mjs.map +2 -2
- package/build-module/components/inserter/block-patterns-tab/use-pattern-categories.mjs +6 -24
- package/build-module/components/inserter/block-patterns-tab/use-pattern-categories.mjs.map +2 -2
- package/build-module/components/inserter/block-patterns-tab/utils.mjs +25 -0
- package/build-module/components/inserter/block-patterns-tab/utils.mjs.map +2 -2
- package/build-module/components/inserter/hooks/use-block-types-state.mjs.map +2 -2
- package/build-module/components/inserter/hooks/use-insertion-point.mjs.map +2 -2
- package/build-module/components/inserter/hooks/use-patterns-state.mjs.map +2 -2
- package/build-module/components/inserter/media-tab/media-panel.mjs.map +2 -2
- package/build-module/components/inserter/media-tab/media-preview.mjs.map +2 -2
- package/build-module/components/inserter-list-item/index.mjs.map +2 -2
- package/build-module/components/inspector-controls/list-view-content-popover.mjs.map +2 -2
- package/build-module/components/link-control/search-results.mjs.map +2 -2
- package/build-module/components/link-control/use-search-handler.mjs +3 -0
- package/build-module/components/link-control/use-search-handler.mjs.map +2 -2
- package/build-module/components/list-view/branch.mjs.map +2 -2
- package/build-module/components/list-view/drop-indicator.mjs.map +2 -2
- package/build-module/components/list-view/index.mjs.map +2 -2
- package/build-module/components/list-view/use-list-view-drop-zone.mjs.map +2 -2
- package/build-module/components/list-view/utils.mjs.map +2 -2
- package/build-module/components/media-replace-flow/index.mjs +4 -1
- package/build-module/components/media-replace-flow/index.mjs.map +2 -2
- package/build-module/components/plain-text/index.mjs +1 -2
- package/build-module/components/plain-text/index.mjs.map +2 -2
- package/build-module/components/preset-input-control/index.mjs.map +2 -2
- package/build-module/components/provider/index.mjs +3 -1
- package/build-module/components/provider/index.mjs.map +2 -2
- package/build-module/components/provider/use-block-sync.mjs.map +2 -2
- package/build-module/components/publish-date-time-picker/index.mjs.map +2 -2
- package/build-module/components/resizable-box-popover/index.mjs +1 -1
- package/build-module/components/resizable-box-popover/index.mjs.map +1 -1
- package/build-module/components/resolution-tool/index.mjs +2 -2
- package/build-module/components/resolution-tool/index.mjs.map +2 -2
- package/build-module/components/rich-text/event-listeners/enter.mjs +8 -22
- package/build-module/components/rich-text/event-listeners/enter.mjs.map +2 -2
- package/build-module/components/rich-text/format-edit.mjs.map +2 -2
- package/build-module/components/rich-text/index.mjs +21 -0
- package/build-module/components/rich-text/index.mjs.map +2 -2
- package/build-module/components/rich-text/multiline.mjs +11 -3
- package/build-module/components/rich-text/multiline.mjs.map +2 -2
- package/build-module/components/spacing-sizes-control/hooks/use-spacing-sizes.mjs.map +2 -2
- package/build-module/components/typewriter/index.mjs.map +2 -2
- package/build-module/components/use-block-commands/index.mjs.map +2 -2
- package/build-module/components/writing-flow/index.mjs +3 -0
- package/build-module/components/writing-flow/index.mjs.map +2 -2
- package/build-module/components/writing-flow/use-clipboard-handler.mjs.map +2 -2
- package/build-module/components/writing-flow/use-selection-observer.mjs +5 -3
- package/build-module/components/writing-flow/use-selection-observer.mjs.map +2 -2
- package/build-module/hooks/align.mjs +6 -6
- package/build-module/hooks/align.mjs.map +2 -2
- package/build-module/hooks/background.mjs.map +2 -2
- package/build-module/hooks/block-bindings.mjs.map +2 -2
- package/build-module/hooks/border.mjs.map +2 -2
- package/build-module/hooks/contrast-checker.mjs.map +2 -2
- package/build-module/hooks/dimensions.mjs.map +2 -2
- package/build-module/hooks/duotone.mjs.map +2 -2
- package/build-module/hooks/elements.mjs.map +2 -2
- package/build-module/hooks/fit-text.mjs.map +2 -2
- package/build-module/hooks/gap.mjs +2 -1
- package/build-module/hooks/gap.mjs.map +2 -2
- package/build-module/hooks/index.mjs +4 -2
- package/build-module/hooks/index.mjs.map +2 -2
- package/build-module/hooks/layout-child.mjs.map +2 -2
- package/build-module/hooks/layout.mjs +6 -5
- package/build-module/hooks/layout.mjs.map +2 -2
- package/build-module/hooks/position.mjs +5 -33
- package/build-module/hooks/position.mjs.map +2 -2
- package/build-module/hooks/states.mjs +3 -2
- package/build-module/hooks/states.mjs.map +2 -2
- package/build-module/hooks/text-shadow.mjs +65 -0
- package/build-module/hooks/text-shadow.mjs.map +7 -0
- package/build-module/hooks/typography.mjs +30 -6
- package/build-module/hooks/typography.mjs.map +2 -2
- package/build-module/hooks/utils.mjs +24 -2
- package/build-module/hooks/utils.mjs.map +2 -2
- package/build-module/layouts/grid.mjs.map +2 -2
- package/build-module/layouts/utils.mjs +5 -1
- package/build-module/layouts/utils.mjs.map +2 -2
- package/build-module/private-apis.mjs +6 -2
- package/build-module/private-apis.mjs.map +2 -2
- package/build-module/store/actions.mjs +28 -5
- package/build-module/store/actions.mjs.map +3 -3
- package/build-module/store/private-selectors.mjs.map +2 -2
- package/build-module/store/reducer.mjs.map +2 -2
- package/build-module/store/selectors.mjs.map +2 -2
- package/build-module/utils/get-font-styles-and-weights.mjs.map +2 -2
- package/build-module/utils/transform-styles/index.mjs.map +1 -1
- package/build-style/content-rtl.css +7 -2
- package/build-style/content.css +7 -2
- package/build-style/style-rtl.css +90 -25
- package/build-style/style.css +92 -25
- package/package.json +42 -43
- package/src/autocompleters/block.jsx +4 -4
- package/src/components/alignment-control/ui.jsx +1 -1
- package/src/components/background-image-control/index.jsx +3 -3
- package/src/components/block-alignment-control/test/index.jsdom.test.jsx +267 -0
- package/src/components/block-alignment-control/ui.jsx +47 -9
- package/src/components/block-alignment-control/use-available-alignments.js +106 -20
- package/src/components/block-allowed-blocks/allowed-blocks-control.jsx +1 -1
- package/src/components/block-bindings/attribute-control.jsx +27 -29
- package/src/components/block-bindings/source-fields-list.jsx +22 -32
- package/src/components/block-bindings/test/attribute-control.jsdom.test.jsx +115 -0
- package/src/components/block-canvas/index.jsx +1 -1
- package/src/components/block-card/index.jsx +5 -11
- package/src/components/block-card/style.scss +1 -0
- package/src/components/block-edit/edit.jsx +1 -1
- package/src/components/block-heading-level-dropdown/index.jsx +1 -1
- package/src/components/block-icon/index.jsx +1 -1
- package/src/components/block-icon/test/index.browser.test.jsx +74 -0
- package/src/components/block-inspector/edit-contents.jsx +2 -2
- package/src/components/block-inspector/index.jsx +46 -15
- package/src/components/block-inspector/style.scss +16 -0
- package/src/components/block-keyboard-shortcuts/index.jsx +2 -2
- package/src/components/block-list/block-html.jsx +2 -3
- package/src/components/block-list/block.jsx +7 -5
- package/src/components/block-list/content.scss +3 -2
- package/src/components/block-list/layout.jsx +4 -1
- package/src/components/block-list/test/layout.jsdom.test.js +40 -0
- package/src/components/block-list/use-block-props/index.js +1 -1
- package/src/components/block-lock/modal.jsx +2 -3
- package/src/components/block-lock/style.scss +1 -1
- package/src/components/block-mover/style.scss +0 -13
- package/src/components/block-parent-selector/index.jsx +12 -6
- package/src/components/block-patterns-list/style.scss +1 -1
- package/src/components/block-popover/index.jsx +1 -1
- package/src/components/block-rename/modal.jsx +3 -3
- package/src/components/block-settings-menu/block-settings-dropdown.jsx +1 -1
- package/src/components/block-styles/utils.js +1 -1
- package/src/components/block-switcher/index.jsx +3 -3
- package/src/components/block-toolbar/edit-section-button.jsx +2 -2
- package/src/components/block-toolbar/index.jsx +8 -4
- package/src/components/block-toolbar/switch-section-style.jsx +1 -1
- package/src/components/block-variation-transforms/index.jsx +24 -23
- package/src/components/block-variation-transforms/test/index.jsdom.test.jsx +93 -0
- package/src/components/block-visibility/modal.jsx +7 -7
- package/src/components/block-visibility/style.scss +1 -1
- package/src/components/block-visibility/viewport-visibility-info.jsx +5 -7
- package/src/components/border-radius-control/index.jsx +2 -2
- package/src/components/border-radius-control/test/index.jsdom.test.jsx +0 -22
- package/src/components/border-radius-control/test/select.browser.test.js +30 -0
- package/src/components/color-palette/with-color-context.jsx +1 -1
- package/src/components/colors/with-colors.jsx +1 -1
- package/src/components/colors-gradients/control.jsx +2 -2
- package/src/components/colors-gradients/test/{control.jsdom.test.jsx → control.browser.test.jsx} +6 -9
- package/src/components/contrast-checker/index.jsx +2 -2
- package/src/components/date-format-picker/index.jsx +2 -2
- package/src/components/dimensions-tool/aspect-ratio-tool.jsx +4 -4
- package/src/components/dimensions-tool/test/index.jsdom.test.jsx +17 -11
- package/src/components/dimensions-tool/width-height-tool.jsx +2 -2
- package/src/components/font-sizes/with-font-sizes.jsx +2 -3
- package/src/components/global-styles/background-panel.jsx +2 -2
- package/src/components/global-styles/border-panel.jsx +2 -2
- package/src/components/global-styles/color-gradient-dropdown-item.jsx +3 -3
- package/src/components/global-styles/color-panel.jsx +3 -3
- package/src/components/global-styles/dimensions-panel.jsx +6 -6
- package/src/components/global-styles/filters-panel.jsx +2 -2
- package/src/components/global-styles/hooks.js +1 -0
- package/src/components/global-styles/inheritance/index.jsx +9 -6
- package/src/components/global-styles/inheritance/test/{index.jsdom.test.jsx → index.browser.test.jsx} +34 -28
- package/src/components/global-styles/inherited-value-context.js +1 -9
- package/src/components/global-styles/state-control-badges.jsx +0 -1
- package/src/components/global-styles/state-control.jsx +12 -3
- package/src/components/global-styles/style.scss +68 -0
- package/src/components/global-styles/test/{color-panel.jsdom.test.jsx → color-panel.browser.test.jsx} +53 -54
- package/src/components/global-styles/test/inherited-value-context-core.jsdom.test.js +17 -26
- package/src/components/global-styles/test/{typography-panel-core.jsdom.test.jsx → typography-panel-core.browser.test.jsx} +84 -39
- package/src/components/global-styles/test/{typography-panel.jsdom.test.jsx → typography-panel.browser.test.jsx} +80 -122
- package/src/components/global-styles/text-shadow-panel.tsx +257 -0
- package/src/components/global-styles/typography-panel.jsx +52 -13
- package/src/components/global-styles/typography-utils.js +2 -2
- package/src/components/global-styles/utils.js +1 -1
- package/src/components/html-element-control/index.jsx +2 -2
- package/src/components/iframe/index.jsx +1 -1
- package/src/components/iframe/use-scale-canvas.js +1 -1
- package/src/components/image-size-control/index.jsx +2 -2
- package/src/components/inner-blocks/index.jsx +9 -1
- package/src/components/inner-content/index.jsx +1 -1
- package/src/components/inserter/block-patterns-tab/use-pattern-categories.js +7 -33
- package/src/components/inserter/block-patterns-tab/utils.js +44 -0
- package/src/components/inserter/hooks/use-block-types-state.js +2 -2
- package/src/components/inserter/hooks/use-insertion-point.js +1 -1
- package/src/components/inserter/hooks/use-patterns-state.js +1 -1
- package/src/components/inserter/media-tab/media-panel.jsx +9 -9
- package/src/components/inserter/media-tab/media-preview.jsx +1 -1
- package/src/components/inserter-list-item/index.jsx +1 -1
- package/src/components/inserter-list-item/style.scss +2 -2
- package/src/components/inspector-controls/list-view-content-popover.jsx +1 -1
- package/src/components/link-control/search-results.jsx +1 -1
- package/src/components/link-control/style.scss +1 -1
- package/src/components/link-control/test/index.jsdom.test.jsx +38 -110
- package/src/components/link-control/test/keyboard-selection.browser.test.js +110 -0
- package/src/components/link-control/use-search-handler.js +8 -3
- package/src/components/list-view/branch.jsx +1 -1
- package/src/components/list-view/drop-indicator.jsx +3 -3
- package/src/components/list-view/index.jsx +1 -1
- package/src/components/list-view/style.scss +1 -9
- package/src/components/list-view/use-list-view-drop-zone.js +1 -1
- package/src/components/list-view/utils.js +1 -1
- package/src/components/media-replace-flow/index.jsx +4 -1
- package/src/components/navigable-toolbar/test/index.browser.test.js +6 -7
- package/src/components/plain-text/README.md +3 -2
- package/src/components/plain-text/content.scss +0 -1
- package/src/components/plain-text/index.jsx +2 -3
- package/src/components/plain-text/style.scss +4 -0
- package/src/components/preset-input-control/index.jsx +2 -2
- package/src/components/preset-input-control/test/index.jsdom.test.jsx +0 -56
- package/src/components/preset-input-control/test/interaction.browser.test.js +63 -0
- package/src/components/provider/index.jsx +5 -3
- package/src/components/provider/use-block-sync.js +5 -5
- package/src/components/publish-date-time-picker/index.jsx +1 -1
- package/src/components/resizable-box-popover/index.jsx +1 -1
- package/src/components/resolution-tool/index.jsx +2 -2
- package/src/components/responsive-block-control/style.scss +1 -2
- package/src/components/responsive-block-control/test/index.jsdom.test.jsx +2 -2
- package/src/components/rich-text/event-listeners/enter.js +16 -23
- package/src/components/rich-text/format-edit.jsx +1 -1
- package/src/components/rich-text/index.jsx +39 -2
- package/src/components/rich-text/multiline.jsx +11 -3
- package/src/components/spacing-sizes-control/hooks/use-spacing-sizes.js +1 -1
- package/src/components/spacing-sizes-control/test/index.jsdom.test.jsx +0 -21
- package/src/components/spacing-sizes-control/test/select.browser.test.js +58 -0
- package/src/components/typewriter/index.jsx +1 -1
- package/src/components/url-input/test/fixtures/validated-input-control-deprecation.js +1 -1
- package/src/components/use-block-commands/index.js +1 -1
- package/src/components/use-block-drop-zone/test/index.js +2 -2
- package/src/components/writing-flow/index.jsx +8 -0
- package/src/components/writing-flow/use-clipboard-handler.js +1 -1
- package/src/components/writing-flow/use-selection-observer.js +15 -6
- package/src/content.scss +1 -0
- package/src/hooks/align.jsx +22 -6
- package/src/hooks/background.jsx +1 -1
- package/src/hooks/block-bindings.jsx +1 -1
- package/src/hooks/block-hooks.scss +0 -6
- package/src/hooks/border.jsx +2 -2
- package/src/hooks/contrast-checker.js +1 -1
- package/src/hooks/dimensions.jsx +2 -2
- package/src/hooks/duotone.jsx +3 -3
- package/src/hooks/elements.jsx +3 -3
- package/src/hooks/fit-text.jsx +1 -1
- package/src/hooks/gap.js +2 -4
- package/src/hooks/index.js +3 -1
- package/src/hooks/layout-child.jsx +3 -4
- package/src/hooks/layout.jsx +17 -18
- package/src/hooks/position.jsx +5 -36
- package/src/hooks/states.jsx +6 -2
- package/src/hooks/test/layout.jsdom.test.js +44 -1
- package/src/hooks/text-shadow.ts +105 -0
- package/src/hooks/typography.jsx +58 -30
- package/src/hooks/utils.jsx +23 -1
- package/src/layouts/grid.jsx +2 -2
- package/src/layouts/test/flex.jsdom.test.jsx +4 -3
- package/src/layouts/test/utils.js +48 -1
- package/src/layouts/utils.js +19 -0
- package/src/private-apis.js +4 -0
- package/src/store/actions.js +50 -10
- package/src/store/private-selectors.js +5 -5
- package/src/store/reducer.js +6 -6
- package/src/store/selectors.js +3 -3
- package/src/store/test/actions.jsdom.test.js +60 -0
- package/src/style.scss +1 -0
- package/src/utils/get-font-styles-and-weights.ts +1 -1
- package/src/utils/transform-styles/index.ts +1 -1
- package/build/hooks/cross-origin-isolation.cjs +0 -56
- package/build/hooks/cross-origin-isolation.cjs.map +0 -7
- package/build-module/hooks/cross-origin-isolation.mjs +0 -54
- package/build-module/hooks/cross-origin-isolation.mjs.map +0 -7
- package/src/components/block-icon/test/__snapshots__/index.jsdom.test.jsx.snap +0 -27
- package/src/components/block-icon/test/index.jsdom.test.jsx +0 -67
- package/src/hooks/cross-origin-isolation.js +0 -73
- package/src/hooks/test/cross-origin-isolation.jsdom.test.js +0 -173
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/utils/get-font-styles-and-weights.ts"],
|
|
4
|
-
"sourcesContent": ["import { _x, sprintf } from '@wordpress/i18n';\nimport { formatFontStyle } from './format-font-style';\nimport { formatFontWeight } from './format-font-weight';\nimport type {\n\tFontFamilyFace,\n\tFormattedFont,\n\tCombinedStyleAndWeightOption,\n} from './types';\n\nconst FONT_STYLES = [\n\t{\n\t\tname: _x( 'Regular', 'font style' ),\n\t\tvalue: 'normal',\n\t},\n\t{\n\t\tname: _x( 'Italic', 'font style' ),\n\t\tvalue: 'italic',\n\t},\n];\n\nconst FONT_WEIGHTS = [\n\t{\n\t\tname: _x( 'Thin', 'font weight' ),\n\t\tvalue: '100',\n\t},\n\t{\n\t\tname: _x( 'Extra Light', 'font weight' ),\n\t\tvalue: '200',\n\t},\n\t{\n\t\tname: _x( 'Light', 'font weight' ),\n\t\tvalue: '300',\n\t},\n\t{\n\t\tname: _x( 'Regular', 'font weight' ),\n\t\tvalue: '400',\n\t},\n\t{\n\t\tname: _x( 'Medium', 'font weight' ),\n\t\tvalue: '500',\n\t},\n\t{\n\t\tname: _x( 'Semi Bold', 'font weight' ),\n\t\tvalue: '600',\n\t},\n\t{\n\t\tname: _x( 'Bold', 'font weight' ),\n\t\tvalue: '700',\n\t},\n\t{\n\t\tname: _x( 'Extra Bold', 'font weight' ),\n\t\tvalue: '800',\n\t},\n\t{\n\t\tname: _x( 'Black', 'font weight' ),\n\t\tvalue: '900',\n\t},\n\t{\n\t\tname: _x( 'Extra Black', 'font weight' ),\n\t\tvalue: '1000',\n\t},\n];\n\n/**\n * Builds a list of font style and weight options based on font family faces.\n * Defaults to the standard font styles and weights if no font family faces are provided.\n *\n * @param fontFamilyFaces font family faces array\n * @return new object with combined and separated font style and weight properties\n */\nexport function getFontStylesAndWeights(\n\tfontFamilyFaces: FontFamilyFace[] | undefined\n) {\n\tlet fontStyles: FormattedFont[] = [];\n\tlet fontWeights: FormattedFont[] = [];\n\tconst combinedStyleAndWeightOptions: CombinedStyleAndWeightOption[] = [];\n\tconst isSystemFont = ! fontFamilyFaces || fontFamilyFaces?.length === 0;\n\tlet isVariableFont = false;\n\n\tfontFamilyFaces?.forEach( ( face ) => {\n\t\t// Check for variable font by looking for a space in the font weight value. e.g. \"100 900\"\n\t\tif (\n\t\t\t'string' === typeof face.fontWeight &&\n\t\t\t/\\s/.test( face.fontWeight.trim() )\n\t\t) {\n\t\t\tisVariableFont = true;\n\n\t\t\t// Find font weight start and end values.\n\t\t\tconst [ startStr, endStr ] = face.fontWeight.split( ' ' );\n\t\t\tconst startValue = parseInt( startStr.slice( 0, 1 ) );\n\t\t\tconst endValue =\n\t\t\t\tendStr === '1000' ? 10 : parseInt( endStr.slice( 0, 1 ) );\n\n\t\t\t// Create font weight options for available variable weights.\n\t\t\tfor ( let i = startValue; i <= endValue; i++ ) {\n\t\t\t\tconst fontWeightValue = `${ i.toString() }00`;\n\t\t\t\tif (\n\t\t\t\t\t! fontWeights.some(\n\t\t\t\t\t\t( weight ) => weight.value === fontWeightValue\n\t\t\t\t\t)\n\t\t\t\t) {\n\t\t\t\t\tfontWeights.push( formatFontWeight( fontWeightValue ) );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Format font style and weight values.\n\t\tconst fontWeight = formatFontWeight(\n\t\t\t'number' === typeof face.fontWeight\n\t\t\t\t? face.fontWeight.toString()\n\t\t\t\t: face.fontWeight\n\t\t);\n\t\tconst fontStyle = formatFontStyle( face.fontStyle );\n\n\t\t// Create font style and font weight lists without duplicates.\n\t\tif ( fontStyle && Object.keys( fontStyle ).length ) {\n\t\t\tif (\n\t\t\t\t! fontStyles.some(\n\t\t\t\t\t( style ) => style.value === fontStyle.value\n\t\t\t\t)\n\t\t\t) {\n\t\t\t\tfontStyles.push( fontStyle );\n\t\t\t}\n\t\t}\n\n\t\tif ( fontWeight && Object.keys( fontWeight ).length ) {\n\t\t\tif (\n\t\t\t\t! fontWeights.some(\n\t\t\t\t\t( weight ) => weight.value === fontWeight.value\n\t\t\t\t)\n\t\t\t) {\n\t\t\t\tif ( ! isVariableFont ) {\n\t\t\t\t\tfontWeights.push( fontWeight );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t} );\n\n\t// If there is no font weight of 600 or above, then include faux bold as an option.\n\tif ( ! fontWeights.some( ( weight ) => ( weight.value ?? '' ) >= '600' ) ) {\n\t\tfontWeights.push( {\n\t\t\tname: _x( 'Bold', 'font weight' ),\n\t\t\tvalue: '700',\n\t\t} );\n\t}\n\n\t// If there is no italic font style, then include faux italic as an option.\n\tif ( ! fontStyles.some( ( style ) => style.value === 'italic' ) ) {\n\t\tfontStyles.push( {\n\t\t\tname: _x( 'Italic', 'font style' ),\n\t\t\tvalue: 'italic',\n\t\t} );\n\t}\n\n\t// Use default font styles and weights for system fonts.\n\tif ( isSystemFont ) {\n\t\tfontStyles = FONT_STYLES;\n\t\tfontWeights = FONT_WEIGHTS;\n\t}\n\n\t// Use default styles and weights if there are no available styles or weights from the provided font faces.\n\tfontStyles = fontStyles.length === 0 ? FONT_STYLES : fontStyles;\n\tfontWeights = fontWeights.length === 0 ? FONT_WEIGHTS : fontWeights;\n\n\t// Generate combined font style and weight options for available fonts.\n\tfontStyles.forEach( ( { name: styleName, value: styleValue } ) => {\n\t\tfontWeights.forEach( ( { name: weightName, value: weightValue } ) => {\n\t\t\tconst optionName =\n\t\t\t\tstyleValue === 'normal'\n\t\t\t\t\t? weightName\n\t\t\t\t\t: sprintf(\n\t\t\t\t\t\t\t/* translators: 1: Font weight name. 2: Font style name. */\n\t\t\t\t\t\t\t_x( '%1$s %2$s', 'font' ),\n\t\t\t\t\t\t\tweightName ?? '',\n\t\t\t\t\t\t\tstyleName ?? ''\n\t\t\t\t\t
|
|
5
|
-
"mappings": "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
|
|
4
|
+
"sourcesContent": ["import { _x, sprintf } from '@wordpress/i18n';\nimport { formatFontStyle } from './format-font-style';\nimport { formatFontWeight } from './format-font-weight';\nimport type {\n\tFontFamilyFace,\n\tFormattedFont,\n\tCombinedStyleAndWeightOption,\n} from './types';\n\nconst FONT_STYLES = [\n\t{\n\t\tname: _x( 'Regular', 'font style' ),\n\t\tvalue: 'normal',\n\t},\n\t{\n\t\tname: _x( 'Italic', 'font style' ),\n\t\tvalue: 'italic',\n\t},\n];\n\nconst FONT_WEIGHTS = [\n\t{\n\t\tname: _x( 'Thin', 'font weight' ),\n\t\tvalue: '100',\n\t},\n\t{\n\t\tname: _x( 'Extra Light', 'font weight' ),\n\t\tvalue: '200',\n\t},\n\t{\n\t\tname: _x( 'Light', 'font weight' ),\n\t\tvalue: '300',\n\t},\n\t{\n\t\tname: _x( 'Regular', 'font weight' ),\n\t\tvalue: '400',\n\t},\n\t{\n\t\tname: _x( 'Medium', 'font weight' ),\n\t\tvalue: '500',\n\t},\n\t{\n\t\tname: _x( 'Semi Bold', 'font weight' ),\n\t\tvalue: '600',\n\t},\n\t{\n\t\tname: _x( 'Bold', 'font weight' ),\n\t\tvalue: '700',\n\t},\n\t{\n\t\tname: _x( 'Extra Bold', 'font weight' ),\n\t\tvalue: '800',\n\t},\n\t{\n\t\tname: _x( 'Black', 'font weight' ),\n\t\tvalue: '900',\n\t},\n\t{\n\t\tname: _x( 'Extra Black', 'font weight' ),\n\t\tvalue: '1000',\n\t},\n];\n\n/**\n * Builds a list of font style and weight options based on font family faces.\n * Defaults to the standard font styles and weights if no font family faces are provided.\n *\n * @param fontFamilyFaces font family faces array\n * @return new object with combined and separated font style and weight properties\n */\nexport function getFontStylesAndWeights(\n\tfontFamilyFaces: FontFamilyFace[] | undefined\n) {\n\tlet fontStyles: FormattedFont[] = [];\n\tlet fontWeights: FormattedFont[] = [];\n\tconst combinedStyleAndWeightOptions: CombinedStyleAndWeightOption[] = [];\n\tconst isSystemFont = ! fontFamilyFaces || fontFamilyFaces?.length === 0;\n\tlet isVariableFont = false;\n\n\tfontFamilyFaces?.forEach( ( face ) => {\n\t\t// Check for variable font by looking for a space in the font weight value. e.g. \"100 900\"\n\t\tif (\n\t\t\t'string' === typeof face.fontWeight &&\n\t\t\t/\\s/.test( face.fontWeight.trim() )\n\t\t) {\n\t\t\tisVariableFont = true;\n\n\t\t\t// Find font weight start and end values.\n\t\t\tconst [ startStr, endStr ] = face.fontWeight.split( ' ' );\n\t\t\tconst startValue = parseInt( startStr.slice( 0, 1 ) );\n\t\t\tconst endValue =\n\t\t\t\tendStr === '1000' ? 10 : parseInt( endStr.slice( 0, 1 ) );\n\n\t\t\t// Create font weight options for available variable weights.\n\t\t\tfor ( let i = startValue; i <= endValue; i++ ) {\n\t\t\t\tconst fontWeightValue = `${ i.toString() }00`;\n\t\t\t\tif (\n\t\t\t\t\t! fontWeights.some(\n\t\t\t\t\t\t( weight ) => weight.value === fontWeightValue\n\t\t\t\t\t)\n\t\t\t\t) {\n\t\t\t\t\tfontWeights.push( formatFontWeight( fontWeightValue ) );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Format font style and weight values.\n\t\tconst fontWeight = formatFontWeight(\n\t\t\t'number' === typeof face.fontWeight\n\t\t\t\t? face.fontWeight.toString()\n\t\t\t\t: face.fontWeight\n\t\t);\n\t\tconst fontStyle = formatFontStyle( face.fontStyle );\n\n\t\t// Create font style and font weight lists without duplicates.\n\t\tif ( fontStyle && Object.keys( fontStyle ).length ) {\n\t\t\tif (\n\t\t\t\t! fontStyles.some(\n\t\t\t\t\t( style ) => style.value === fontStyle.value\n\t\t\t\t)\n\t\t\t) {\n\t\t\t\tfontStyles.push( fontStyle );\n\t\t\t}\n\t\t}\n\n\t\tif ( fontWeight && Object.keys( fontWeight ).length ) {\n\t\t\tif (\n\t\t\t\t! fontWeights.some(\n\t\t\t\t\t( weight ) => weight.value === fontWeight.value\n\t\t\t\t)\n\t\t\t) {\n\t\t\t\tif ( ! isVariableFont ) {\n\t\t\t\t\tfontWeights.push( fontWeight );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t} );\n\n\t// If there is no font weight of 600 or above, then include faux bold as an option.\n\tif ( ! fontWeights.some( ( weight ) => ( weight.value ?? '' ) >= '600' ) ) {\n\t\tfontWeights.push( {\n\t\t\tname: _x( 'Bold', 'font weight' ),\n\t\t\tvalue: '700',\n\t\t} );\n\t}\n\n\t// If there is no italic font style, then include faux italic as an option.\n\tif ( ! fontStyles.some( ( style ) => style.value === 'italic' ) ) {\n\t\tfontStyles.push( {\n\t\t\tname: _x( 'Italic', 'font style' ),\n\t\t\tvalue: 'italic',\n\t\t} );\n\t}\n\n\t// Use default font styles and weights for system fonts.\n\tif ( isSystemFont ) {\n\t\tfontStyles = FONT_STYLES;\n\t\tfontWeights = FONT_WEIGHTS;\n\t}\n\n\t// Use default styles and weights if there are no available styles or weights from the provided font faces.\n\tfontStyles = fontStyles.length === 0 ? FONT_STYLES : fontStyles;\n\tfontWeights = fontWeights.length === 0 ? FONT_WEIGHTS : fontWeights;\n\n\t// Generate combined font style and weight options for available fonts.\n\tfontStyles.forEach( ( { name: styleName, value: styleValue } ) => {\n\t\tfontWeights.forEach( ( { name: weightName, value: weightValue } ) => {\n\t\t\tconst optionName =\n\t\t\t\tstyleValue === 'normal'\n\t\t\t\t\t? weightName\n\t\t\t\t\t: sprintf(\n\t\t\t\t\t\t\t/* translators: 1: Font weight name. 2: Font style name. */\n\t\t\t\t\t\t\t_x( '%1$s %2$s', 'font' ),\n\t\t\t\t\t\t\tweightName ?? '',\n\t\t\t\t\t\t\tstyleName ?? ''\n\t\t\t\t\t\t);\n\n\t\t\tcombinedStyleAndWeightOptions.push( {\n\t\t\t\tkey: `${ styleValue }-${ weightValue }`,\n\t\t\t\tname: optionName ?? '',\n\t\t\t\tstyle: {\n\t\t\t\t\tfontStyle: styleValue,\n\t\t\t\t\tfontWeight: weightValue,\n\t\t\t\t},\n\t\t\t} );\n\t\t} );\n\t} );\n\n\treturn {\n\t\tfontStyles,\n\t\tfontWeights,\n\t\tcombinedStyleAndWeightOptions,\n\t\tisSystemFont,\n\t\tisVariableFont,\n\t};\n}\n"],
|
|
5
|
+
"mappings": "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",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/utils/transform-styles/index.ts"],
|
|
4
|
-
"sourcesContent": ["/// <reference path=\"./postcss-urlrebase.d.ts\" />\nimport * as parsel from 'parsel-js';\nimport Processor from 'postcss/lib/processor';\nimport CssSyntaxError from 'postcss/lib/css-syntax-error';\nimport prefixSelector from 'postcss-prefix-selector';\nimport rebaseUrl from 'postcss-urlrebase';\nimport type { EditorStyle, TransformOptions } from './types';\n\nconst cacheByWrapperSelector = new Map();\n\nconst ROOT_SELECTOR_TOKENS = [\n\t{ type: 'type', content: 'body' },\n\t{ type: 'type', content: 'html' },\n\t{ type: 'pseudo-class', content: ':root' },\n\t{ type: 'pseudo-class', content: ':where(body)' },\n\t{ type: 'pseudo-class', content: ':where(:root)' },\n\t{ type: 'pseudo-class', content: ':where(html)' },\n];\n\n/**\n * Prefixes root selectors in a way that ensures consistent specificity.\n * This requires special handling, since prefixing a classname before\n * html, body, or :root will generally result in an invalid selector.\n *\n * Some libraries will simply replace the root selector with the prefix\n * instead, but this results in inconsistent specificity.\n *\n * This function instead inserts the prefix after the root tags but before\n * any other part of the selector. This results in consistent specificity:\n * - If a `:where()` selector is used for the prefix, all selectors output\n * by `transformStyles` will have no specificity increase.\n * - If a classname, id, or something else is used as the prefix, all selectors\n * will have the same specificity bump when transformed.\n *\n * @param prefix The prefix.\n * @param selector The selector.\n *\n * @return The prefixed root selector.\n */\nfunction prefixRootSelector( prefix: string, selector: string ) {\n\t// Use a tokenizer, since regular expressions are unreliable.\n\tconst tokenized = parsel.tokenize( selector );\n\n\t// Find the last token that contains a root selector by walking back\n\t// through the tokens.\n\tconst lastRootIndex = tokenized.findLastIndex( ( { content, type } ) => {\n\t\treturn ROOT_SELECTOR_TOKENS.some(\n\t\t\t( rootSelector ) =>\n\t\t\t\tcontent === rootSelector.content && type === rootSelector.type\n\t\t);\n\t} );\n\n\t// Walk forwards to find the combinator after the last root.\n\t// This is where the root ends and the rest of the selector begins,\n\t// and the index to insert before.\n\t// Doing it this way takes into account that a root selector like\n\t// 'body' may have additional id/class/pseudo-class/attribute-selector\n\t// parts chained to it, which is difficult to quantify using a regex.\n\tlet insertionPoint = -1;\n\tfor ( let i = lastRootIndex + 1; i < tokenized.length; i++ ) {\n\t\tif ( tokenized[ i ].type === 'combinator' ) {\n\t\t\tinsertionPoint = i;\n\t\t\tbreak;\n\t\t}\n\t}\n\n\t// Tokenize and insert the prefix with a ' ' combinator before it.\n\tconst tokenizedPrefix = parsel.tokenize( prefix );\n\ttokenized.splice(\n\t\t// Insert at the insertion point, or the end.\n\t\tinsertionPoint === -1 ? tokenized.length : insertionPoint,\n\t\t0,\n\t\t{\n\t\t\ttype: 'combinator',\n\t\t\tcontent: ' ',\n\t\t\tpos: [ 0, 0 ],\n\t\t} as parsel.Token,\n\t\t...tokenizedPrefix\n\t);\n\n\treturn parsel.stringify( tokenized );\n}\n\nfunction transformStyle(\n\t{ css, ignoredSelectors = [], baseURL }: EditorStyle,\n\twrapperSelector = '',\n\ttransformOptions?: TransformOptions\n) {\n\t// When there is no wrapper selector and no base URL, there is no need\n\t// to transform the CSS. This is most cases because in the default\n\t// iframed editor, no wrapping is needed, and not many styles\n\t// provide a base URL.\n\tif ( ! wrapperSelector && ! baseURL ) {\n\t\treturn css;\n\t}\n\n\ttry {\n\t\tconst excludedSelectors = [\n\t\t\t...ignoredSelectors,\n\t\t\t...( transformOptions?.ignoredSelectors ?? [] ),\n\t\t\twrapperSelector,\n\t\t];\n\n\t\treturn new Processor(\n\t\t\t[\n\t\t\t\twrapperSelector &&\n\t\t\t\t\tprefixSelector( {\n\t\t\t\t\t\tprefix: wrapperSelector,\n\t\t\t\t\t\ttransform( prefix, selector, prefixedSelector ) {\n\t\t\t\t\t\t\t// For backwards compatibility, don't use the `exclude` option\n\t\t\t\t\t\t\t// of postcss-prefix-selector, instead handle it here to match\n\t\t\t\t\t\t\t// the behavior of the old library (postcss-prefix-wrap) that\n\t\t\t\t\t\t\t// `transformStyle` previously used.\n\t\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t\texcludedSelectors.some( ( excludedSelector ) =>\n\t\t\t\t\t\t\t\t\texcludedSelector instanceof RegExp\n\t\t\t\t\t\t\t\t\t\t? selector.match( excludedSelector )\n\t\t\t\t\t\t\t\t\t\t: selector.includes( excludedSelector )\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\treturn selector;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tconst hasRootSelector = ROOT_SELECTOR_TOKENS.some(\n\t\t\t\t\t\t\t\t( rootSelector ) =>\n\t\t\t\t\t\t\t\t\tselector.startsWith( rootSelector.content )\n\t\t\t\t\t\t\t);\n\n\t\t\t\t\t\t\t// Reorganize root selectors such that the root part comes before the prefix,\n\t\t\t\t\t\t\t// but the prefix still comes before the remaining part of the selector.\n\t\t\t\t\t\t\tif ( hasRootSelector ) {\n\t\t\t\t\t\t\t\treturn prefixRootSelector( prefix, selector );\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\treturn prefixedSelector;\n\t\t\t\t\t\t},\n\t\t\t\t\t} ),\n\t\t\t\tbaseURL && rebaseUrl( { rootUrl: baseURL } ),\n\t\t\t].filter( Boolean ) as import('postcss').AcceptedPlugin[]\n\t\t).process( css, {} ).css; // use sync PostCSS API\n\t} catch ( error ) {\n\t\tif ( error instanceof CssSyntaxError ) {\n\t\t\t// eslint-disable-next-line no-console\n\t\t\tconsole.warn(\n\t\t\t\t'wp.blockEditor.transformStyles Failed to transform CSS.',\n\t\t\t\terror.message + '\\n' + error.showSourceCode( false )\n\t\t\t);\n\t\t} else {\n\t\t\t// eslint-disable-next-line no-console\n\t\t\tconsole.warn(\n\t\t\t\t'wp.blockEditor.transformStyles Failed to transform CSS.',\n\t\t\t\terror\n\t\t\t);\n\t\t}\n\n\t\treturn null;\n\t}\n}\n\n/**\n * Applies a series of CSS rule transforms to wrap selectors inside a given class and/or rewrite URLs depending on the parameters passed.\n *\n * @param styles CSS rules.\n * @param wrapperSelector Wrapper selector.\n * @param transformOptions Additional options for style transformation.\n * @return converted rules.\n */\nconst transformStyles = (\n\tstyles: EditorStyle[],\n\twrapperSelector = '',\n\ttransformOptions?: TransformOptions\n) => {\n\tlet cache = cacheByWrapperSelector.get( wrapperSelector );\n\tif ( ! cache ) {\n\t\tcache = new WeakMap();\n\t\tcacheByWrapperSelector.set( wrapperSelector, cache );\n\t}\n\treturn styles.map( ( style ) => {\n\t\tlet css = cache.get( style );\n\t\tif ( ! css ) {\n\t\t\tcss = transformStyle( style, wrapperSelector, transformOptions );\n\t\t\tcache.set( style, css );\n\t\t}\n\t\treturn css;\n\t} );\n};\n\nexport default transformStyles;\n"],
|
|
4
|
+
"sourcesContent": ["/// <reference path=\"./postcss-urlrebase.d.ts\" />\nimport * as parsel from 'parsel-js';\nimport Processor from 'postcss/lib/processor';\nimport CssSyntaxError from 'postcss/lib/css-syntax-error';\nimport prefixSelector from 'postcss-prefix-selector';\nimport rebaseUrl from 'postcss-urlrebase';\nimport type { EditorStyle, TransformOptions } from './types';\n\nconst cacheByWrapperSelector = new Map();\n\nconst ROOT_SELECTOR_TOKENS = [\n\t{ type: 'type', content: 'body' },\n\t{ type: 'type', content: 'html' },\n\t{ type: 'pseudo-class', content: ':root' },\n\t{ type: 'pseudo-class', content: ':where(body)' },\n\t{ type: 'pseudo-class', content: ':where(:root)' },\n\t{ type: 'pseudo-class', content: ':where(html)' },\n];\n\n/**\n * Prefixes root selectors in a way that ensures consistent specificity.\n * This requires special handling, since prefixing a classname before\n * html, body, or :root will generally result in an invalid selector.\n *\n * Some libraries will simply replace the root selector with the prefix\n * instead, but this results in inconsistent specificity.\n *\n * This function instead inserts the prefix after the root tags but before\n * any other part of the selector. This results in consistent specificity:\n * - If a `:where()` selector is used for the prefix, all selectors output\n * by `transformStyles` will have no specificity increase.\n * - If a classname, id, or something else is used as the prefix, all selectors\n * will have the same specificity bump when transformed.\n *\n * @param prefix The prefix.\n * @param selector The selector.\n *\n * @return The prefixed root selector.\n */\nfunction prefixRootSelector( prefix: string, selector: string ) {\n\t// Use a tokenizer, since regular expressions are unreliable.\n\tconst tokenized = parsel.tokenize( selector );\n\n\t// Find the last token that contains a root selector by walking back\n\t// through the tokens.\n\tconst lastRootIndex = tokenized.findLastIndex( ( { content, type } ) => {\n\t\treturn ROOT_SELECTOR_TOKENS.some(\n\t\t\t( rootSelector ) =>\n\t\t\t\tcontent === rootSelector.content && type === rootSelector.type\n\t\t);\n\t} );\n\n\t// Walk forwards to find the combinator after the last root.\n\t// This is where the root ends and the rest of the selector begins,\n\t// and the index to insert before.\n\t// Doing it this way takes into account that a root selector like\n\t// 'body' may have additional id/class/pseudo-class/attribute-selector\n\t// parts chained to it, which is difficult to quantify using a regex.\n\tlet insertionPoint = -1;\n\tfor ( let i = lastRootIndex + 1; i < tokenized.length; i++ ) {\n\t\tif ( tokenized[ i ].type === 'combinator' ) {\n\t\t\tinsertionPoint = i;\n\t\t\tbreak;\n\t\t}\n\t}\n\n\t// Tokenize and insert the prefix with a ' ' combinator before it.\n\tconst tokenizedPrefix = parsel.tokenize( prefix );\n\ttokenized.splice(\n\t\t// Insert at the insertion point, or the end.\n\t\tinsertionPoint === -1 ? tokenized.length : insertionPoint,\n\t\t0,\n\t\t{\n\t\t\ttype: 'combinator',\n\t\t\tcontent: ' ',\n\t\t\tpos: [ 0, 0 ],\n\t\t} as parsel.Token,\n\t\t...tokenizedPrefix\n\t);\n\n\treturn parsel.stringify( tokenized );\n}\n\nfunction transformStyle(\n\t{ css, ignoredSelectors = [], baseURL }: EditorStyle,\n\twrapperSelector = '',\n\ttransformOptions?: TransformOptions\n) {\n\t// When there is no wrapper selector and no base URL, there is no need\n\t// to transform the CSS. This is most cases because in the default\n\t// iframed editor, no wrapping is needed, and not many styles\n\t// provide a base URL.\n\tif ( ! wrapperSelector && ! baseURL ) {\n\t\treturn css;\n\t}\n\n\ttry {\n\t\tconst excludedSelectors = [\n\t\t\t...ignoredSelectors,\n\t\t\t...( transformOptions?.ignoredSelectors ?? [] ),\n\t\t\twrapperSelector,\n\t\t];\n\n\t\treturn new Processor(\n\t\t\t[\n\t\t\t\twrapperSelector &&\n\t\t\t\t\tprefixSelector( {\n\t\t\t\t\t\tprefix: wrapperSelector,\n\t\t\t\t\t\ttransform( prefix, selector, prefixedSelector ) {\n\t\t\t\t\t\t\t// For backwards compatibility, don't use the `exclude` option\n\t\t\t\t\t\t\t// of postcss-prefix-selector, instead handle it here to match\n\t\t\t\t\t\t\t// the behavior of the old library (postcss-prefix-wrap) that\n\t\t\t\t\t\t\t// `transformStyle` previously used.\n\t\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t\texcludedSelectors.some( ( excludedSelector ) =>\n\t\t\t\t\t\t\t\t\texcludedSelector instanceof RegExp\n\t\t\t\t\t\t\t\t\t\t? selector.match( excludedSelector )\n\t\t\t\t\t\t\t\t\t\t: selector.includes( excludedSelector )\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\treturn selector;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tconst hasRootSelector = ROOT_SELECTOR_TOKENS.some(\n\t\t\t\t\t\t\t\t( rootSelector ) =>\n\t\t\t\t\t\t\t\t\tselector.startsWith( rootSelector.content )\n\t\t\t\t\t\t\t);\n\n\t\t\t\t\t\t\t// Reorganize root selectors such that the root part comes before the prefix,\n\t\t\t\t\t\t\t// but the prefix still comes before the remaining part of the selector.\n\t\t\t\t\t\t\tif ( hasRootSelector ) {\n\t\t\t\t\t\t\t\treturn prefixRootSelector( prefix, selector );\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\treturn prefixedSelector;\n\t\t\t\t\t\t},\n\t\t\t\t\t} ),\n\t\t\t\tbaseURL && rebaseUrl( { rootUrl: baseURL } ),\n\t\t\t].filter( Boolean ) as import( 'postcss' ).AcceptedPlugin[]\n\t\t).process( css, {} ).css; // use sync PostCSS API\n\t} catch ( error ) {\n\t\tif ( error instanceof CssSyntaxError ) {\n\t\t\t// eslint-disable-next-line no-console\n\t\t\tconsole.warn(\n\t\t\t\t'wp.blockEditor.transformStyles Failed to transform CSS.',\n\t\t\t\terror.message + '\\n' + error.showSourceCode( false )\n\t\t\t);\n\t\t} else {\n\t\t\t// eslint-disable-next-line no-console\n\t\t\tconsole.warn(\n\t\t\t\t'wp.blockEditor.transformStyles Failed to transform CSS.',\n\t\t\t\terror\n\t\t\t);\n\t\t}\n\n\t\treturn null;\n\t}\n}\n\n/**\n * Applies a series of CSS rule transforms to wrap selectors inside a given class and/or rewrite URLs depending on the parameters passed.\n *\n * @param styles CSS rules.\n * @param wrapperSelector Wrapper selector.\n * @param transformOptions Additional options for style transformation.\n * @return converted rules.\n */\nconst transformStyles = (\n\tstyles: EditorStyle[],\n\twrapperSelector = '',\n\ttransformOptions?: TransformOptions\n) => {\n\tlet cache = cacheByWrapperSelector.get( wrapperSelector );\n\tif ( ! cache ) {\n\t\tcache = new WeakMap();\n\t\tcacheByWrapperSelector.set( wrapperSelector, cache );\n\t}\n\treturn styles.map( ( style ) => {\n\t\tlet css = cache.get( style );\n\t\tif ( ! css ) {\n\t\t\tcss = transformStyle( style, wrapperSelector, transformOptions );\n\t\t\tcache.set( style, css );\n\t\t}\n\t\treturn css;\n\t} );\n};\n\nexport default transformStyles;\n"],
|
|
5
5
|
"mappings": ";AACA,YAAY,YAAY;AACxB,OAAO,eAAe;AACtB,OAAO,oBAAoB;AAC3B,OAAO,oBAAoB;AAC3B,OAAO,eAAe;AAGtB,IAAM,yBAAyB,oBAAI,IAAI;AAEvC,IAAM,uBAAuB;AAAA,EAC5B,EAAE,MAAM,QAAQ,SAAS,OAAO;AAAA,EAChC,EAAE,MAAM,QAAQ,SAAS,OAAO;AAAA,EAChC,EAAE,MAAM,gBAAgB,SAAS,QAAQ;AAAA,EACzC,EAAE,MAAM,gBAAgB,SAAS,eAAe;AAAA,EAChD,EAAE,MAAM,gBAAgB,SAAS,gBAAgB;AAAA,EACjD,EAAE,MAAM,gBAAgB,SAAS,eAAe;AACjD;AAsBA,SAAS,mBAAoB,QAAgB,UAAmB;AAE/D,QAAM,YAAmB,gBAAU,QAAS;AAI5C,QAAM,gBAAgB,UAAU,cAAe,CAAE,EAAE,SAAS,KAAK,MAAO;AACvE,WAAO,qBAAqB;AAAA,MAC3B,CAAE,iBACD,YAAY,aAAa,WAAW,SAAS,aAAa;AAAA,IAC5D;AAAA,EACD,CAAE;AAQF,MAAI,iBAAiB;AACrB,WAAU,IAAI,gBAAgB,GAAG,IAAI,UAAU,QAAQ,KAAM;AAC5D,QAAK,UAAW,CAAE,EAAE,SAAS,cAAe;AAC3C,uBAAiB;AACjB;AAAA,IACD;AAAA,EACD;AAGA,QAAM,kBAAyB,gBAAU,MAAO;AAChD,YAAU;AAAA;AAAA,IAET,mBAAmB,KAAK,UAAU,SAAS;AAAA,IAC3C;AAAA,IACA;AAAA,MACC,MAAM;AAAA,MACN,SAAS;AAAA,MACT,KAAK,CAAE,GAAG,CAAE;AAAA,IACb;AAAA,IACA,GAAG;AAAA,EACJ;AAEA,SAAc,iBAAW,SAAU;AACpC;AAEA,SAAS,eACR,EAAE,KAAK,mBAAmB,CAAC,GAAG,QAAQ,GACtC,kBAAkB,IAClB,kBACC;AAKD,MAAK,CAAE,mBAAmB,CAAE,SAAU;AACrC,WAAO;AAAA,EACR;AAEA,MAAI;AACH,UAAM,oBAAoB;AAAA,MACzB,GAAG;AAAA,MACH,GAAK,kBAAkB,oBAAoB,CAAC;AAAA,MAC5C;AAAA,IACD;AAEA,WAAO,IAAI;AAAA,MACV;AAAA,QACC,mBACC,eAAgB;AAAA,UACf,QAAQ;AAAA,UACR,UAAW,QAAQ,UAAU,kBAAmB;AAK/C,gBACC,kBAAkB;AAAA,cAAM,CAAE,qBACzB,4BAA4B,SACzB,SAAS,MAAO,gBAAiB,IACjC,SAAS,SAAU,gBAAiB;AAAA,YACxC,GACC;AACD,qBAAO;AAAA,YACR;AAEA,kBAAM,kBAAkB,qBAAqB;AAAA,cAC5C,CAAE,iBACD,SAAS,WAAY,aAAa,OAAQ;AAAA,YAC5C;AAIA,gBAAK,iBAAkB;AACtB,qBAAO,mBAAoB,QAAQ,QAAS;AAAA,YAC7C;AAEA,mBAAO;AAAA,UACR;AAAA,QACD,CAAE;AAAA,QACH,WAAW,UAAW,EAAE,SAAS,QAAQ,CAAE;AAAA,MAC5C,EAAE,OAAQ,OAAQ;AAAA,IACnB,EAAE,QAAS,KAAK,CAAC,CAAE,EAAE;AAAA,EACtB,SAAU,OAAQ;AACjB,QAAK,iBAAiB,gBAAiB;AAEtC,cAAQ;AAAA,QACP;AAAA,QACA,MAAM,UAAU,OAAO,MAAM,eAAgB,KAAM;AAAA,MACpD;AAAA,IACD,OAAO;AAEN,cAAQ;AAAA,QACP;AAAA,QACA;AAAA,MACD;AAAA,IACD;AAEA,WAAO;AAAA,EACR;AACD;AAUA,IAAM,kBAAkB,CACvB,QACA,kBAAkB,IAClB,qBACI;AACJ,MAAI,QAAQ,uBAAuB,IAAK,eAAgB;AACxD,MAAK,CAAE,OAAQ;AACd,YAAQ,oBAAI,QAAQ;AACpB,2BAAuB,IAAK,iBAAiB,KAAM;AAAA,EACpD;AACA,SAAO,OAAO,IAAK,CAAE,UAAW;AAC/B,QAAI,MAAM,MAAM,IAAK,KAAM;AAC3B,QAAK,CAAE,KAAM;AACZ,YAAM,eAAgB,OAAO,iBAAiB,gBAAiB;AAC/D,YAAM,IAAK,OAAO,GAAI;AAAA,IACvB;AACA,WAAO;AAAA,EACR,CAAE;AACH;AAEA,IAAO,2BAAQ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -421,7 +421,8 @@ _::-webkit-full-page-media, _:future, :root [data-has-multi-selection=true] .blo
|
|
|
421
421
|
box-sizing: border-box;
|
|
422
422
|
box-shadow: inset 0 0 0 1px #1e1e1e;
|
|
423
423
|
resize: none;
|
|
424
|
-
|
|
424
|
+
field-sizing: content;
|
|
425
|
+
overflow: auto;
|
|
425
426
|
font-family: Menlo, Consolas, monaco, monospace;
|
|
426
427
|
font-size: 15px;
|
|
427
428
|
line-height: 1.5;
|
|
@@ -455,7 +456,7 @@ _::-webkit-full-page-media, _:future, :root [data-has-multi-selection=true] .blo
|
|
|
455
456
|
font-size: 13px;
|
|
456
457
|
font-family: -apple-system, system-ui, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
|
|
457
458
|
color: #000;
|
|
458
|
-
font-weight:
|
|
459
|
+
font-weight: 400;
|
|
459
460
|
}
|
|
460
461
|
.is-zoomed-out .block-editor-block-list__zoom-out-separator {
|
|
461
462
|
font-size: calc(13px / var(--wp-block-editor-iframe-zoom-out-scale));
|
|
@@ -855,7 +856,11 @@ _::-webkit-full-page-media, _:future, :root [data-has-multi-selection=true] .blo
|
|
|
855
856
|
border: none;
|
|
856
857
|
padding: 0;
|
|
857
858
|
margin: 0;
|
|
859
|
+
}
|
|
860
|
+
|
|
861
|
+
.block-editor-plain-text {
|
|
858
862
|
width: 100%;
|
|
863
|
+
field-sizing: content;
|
|
859
864
|
}
|
|
860
865
|
|
|
861
866
|
.rich-text [data-rich-text-placeholder] {
|
package/build-style/content.css
CHANGED
|
@@ -421,7 +421,8 @@ _::-webkit-full-page-media, _:future, :root [data-has-multi-selection=true] .blo
|
|
|
421
421
|
box-sizing: border-box;
|
|
422
422
|
box-shadow: inset 0 0 0 1px #1e1e1e;
|
|
423
423
|
resize: none;
|
|
424
|
-
|
|
424
|
+
field-sizing: content;
|
|
425
|
+
overflow: auto;
|
|
425
426
|
font-family: Menlo, Consolas, monaco, monospace;
|
|
426
427
|
font-size: 15px;
|
|
427
428
|
line-height: 1.5;
|
|
@@ -456,7 +457,7 @@ _::-webkit-full-page-media, _:future, :root [data-has-multi-selection=true] .blo
|
|
|
456
457
|
font-size: 13px;
|
|
457
458
|
font-family: -apple-system, system-ui, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
|
|
458
459
|
color: #000;
|
|
459
|
-
font-weight:
|
|
460
|
+
font-weight: 400;
|
|
460
461
|
}
|
|
461
462
|
.is-zoomed-out .block-editor-block-list__zoom-out-separator {
|
|
462
463
|
font-size: calc(13px / var(--wp-block-editor-iframe-zoom-out-scale));
|
|
@@ -856,7 +857,11 @@ _::-webkit-full-page-media, _:future, :root [data-has-multi-selection=true] .blo
|
|
|
856
857
|
border: none;
|
|
857
858
|
padding: 0;
|
|
858
859
|
margin: 0;
|
|
860
|
+
}
|
|
861
|
+
|
|
862
|
+
.block-editor-plain-text {
|
|
859
863
|
width: 100%;
|
|
864
|
+
field-sizing: content;
|
|
860
865
|
}
|
|
861
866
|
|
|
862
867
|
.rich-text [data-rich-text-placeholder] {
|
|
@@ -340,6 +340,19 @@ iframe[name=editor-canvas] {
|
|
|
340
340
|
text-align: center;
|
|
341
341
|
}
|
|
342
342
|
|
|
343
|
+
.block-editor-block-inspector__state-badges {
|
|
344
|
+
display: flex;
|
|
345
|
+
align-items: center;
|
|
346
|
+
flex-wrap: wrap;
|
|
347
|
+
gap: 8px;
|
|
348
|
+
padding: 8px 16px;
|
|
349
|
+
margin-top: -16px;
|
|
350
|
+
}
|
|
351
|
+
|
|
352
|
+
.block-editor-block-inspector__state-badges-text {
|
|
353
|
+
white-space: nowrap;
|
|
354
|
+
}
|
|
355
|
+
|
|
343
356
|
.block-editor-block-inspector__no-block-tools {
|
|
344
357
|
border-top: 1px solid #ddd;
|
|
345
358
|
}
|
|
@@ -636,7 +649,7 @@ iframe[name=editor-canvas] {
|
|
|
636
649
|
.block-editor-block-lock-modal__checklist-item .block-editor-block-lock-modal__lock-icon {
|
|
637
650
|
flex-shrink: 0;
|
|
638
651
|
margin-left: 12px;
|
|
639
|
-
|
|
652
|
+
color: #1e1e1e;
|
|
640
653
|
}
|
|
641
654
|
.block-editor-block-lock-modal__checklist-item:hover {
|
|
642
655
|
background-color: #f0f0f0;
|
|
@@ -746,6 +759,7 @@ iframe[name=editor-canvas] {
|
|
|
746
759
|
align-items: center;
|
|
747
760
|
flex-wrap: wrap;
|
|
748
761
|
gap: 4px 8px;
|
|
762
|
+
overflow-wrap: anywhere;
|
|
749
763
|
}
|
|
750
764
|
.block-editor-block-card__title.block-editor-block-card__title {
|
|
751
765
|
font-size: 13px;
|
|
@@ -1044,14 +1058,6 @@ iframe[name=editor-canvas] {
|
|
|
1044
1058
|
animation-fill-mode: forwards;
|
|
1045
1059
|
}
|
|
1046
1060
|
}
|
|
1047
|
-
.components-button.block-editor-block-mover-button:focus, .components-button.block-editor-block-mover-button:focus:enabled, .components-button.block-editor-block-mover-button:focus::before {
|
|
1048
|
-
box-shadow: none;
|
|
1049
|
-
outline: none;
|
|
1050
|
-
}
|
|
1051
|
-
.components-button.block-editor-block-mover-button:focus-visible::before {
|
|
1052
|
-
box-shadow: inset 0 0 0 1px #fff, 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color);
|
|
1053
|
-
outline: 2px solid transparent;
|
|
1054
|
-
}
|
|
1055
1061
|
|
|
1056
1062
|
.block-editor-block-navigation__container {
|
|
1057
1063
|
min-width: 280px;
|
|
@@ -1126,7 +1132,7 @@ iframe[name=editor-canvas] {
|
|
|
1126
1132
|
height: 24px;
|
|
1127
1133
|
}
|
|
1128
1134
|
.block-editor-block-patterns-list__item .block-editor-patterns__pattern-icon-wrapper .block-editor-patterns__pattern-icon {
|
|
1129
|
-
|
|
1135
|
+
color: var(--wp-block-synced-color);
|
|
1130
1136
|
}
|
|
1131
1137
|
|
|
1132
1138
|
.block-editor-patterns__grid-pagination-wrapper .block-editor-patterns__grid-pagination {
|
|
@@ -1853,6 +1859,70 @@ iframe[name=editor-canvas] {
|
|
|
1853
1859
|
}
|
|
1854
1860
|
}
|
|
1855
1861
|
|
|
1862
|
+
.block-editor-global-styles__text-shadow {
|
|
1863
|
+
width: 260px;
|
|
1864
|
+
padding: 8px;
|
|
1865
|
+
}
|
|
1866
|
+
|
|
1867
|
+
.block-editor-global-styles__text-shadow-preview {
|
|
1868
|
+
display: flex;
|
|
1869
|
+
align-items: center;
|
|
1870
|
+
justify-content: center;
|
|
1871
|
+
height: 80px;
|
|
1872
|
+
border: #ddd 1px solid;
|
|
1873
|
+
border-radius: 2px;
|
|
1874
|
+
font-size: 24px;
|
|
1875
|
+
margin-bottom: 16px;
|
|
1876
|
+
background-image: repeating-linear-gradient(45deg, #e0e0e0 25%, transparent 25%, transparent 75%, #e0e0e0 75%, #e0e0e0), repeating-linear-gradient(45deg, #e0e0e0 25%, transparent 25%, transparent 75%, #e0e0e0 75%, #e0e0e0);
|
|
1877
|
+
background-position: 0 0, 8px 8px;
|
|
1878
|
+
background-size: 16px 16px;
|
|
1879
|
+
}
|
|
1880
|
+
|
|
1881
|
+
.block-editor-global-styles__text-shadow-list-item {
|
|
1882
|
+
justify-content: space-between;
|
|
1883
|
+
gap: 8px;
|
|
1884
|
+
width: 100%;
|
|
1885
|
+
}
|
|
1886
|
+
.block-editor-global-styles__text-shadow-list-item:not(.is-active) svg {
|
|
1887
|
+
opacity: 0;
|
|
1888
|
+
}
|
|
1889
|
+
|
|
1890
|
+
.block-editor-global-styles__text-shadow-dropdown {
|
|
1891
|
+
display: block;
|
|
1892
|
+
padding: 0;
|
|
1893
|
+
position: relative;
|
|
1894
|
+
border: 1px solid #ddd;
|
|
1895
|
+
border-radius: 2px;
|
|
1896
|
+
}
|
|
1897
|
+
|
|
1898
|
+
.block-editor-global-styles__text-shadow-dropdown-toggle {
|
|
1899
|
+
width: 100%;
|
|
1900
|
+
padding: 8px;
|
|
1901
|
+
}
|
|
1902
|
+
.block-editor-global-styles__text-shadow-dropdown-toggle.is-open {
|
|
1903
|
+
background-color: #f0f0f0;
|
|
1904
|
+
}
|
|
1905
|
+
|
|
1906
|
+
.block-editor-global-styles__text-shadow-remove-button {
|
|
1907
|
+
position: absolute;
|
|
1908
|
+
left: 8px;
|
|
1909
|
+
top: 8px;
|
|
1910
|
+
opacity: 0;
|
|
1911
|
+
}
|
|
1912
|
+
@media not (prefers-reduced-motion) {
|
|
1913
|
+
.block-editor-global-styles__text-shadow-remove-button {
|
|
1914
|
+
transition: opacity 0.1s ease-in-out;
|
|
1915
|
+
}
|
|
1916
|
+
}
|
|
1917
|
+
.block-editor-global-styles__text-shadow-dropdown:hover .block-editor-global-styles__text-shadow-remove-button, .block-editor-global-styles__text-shadow-remove-button:focus, .block-editor-global-styles__text-shadow-remove-button:hover {
|
|
1918
|
+
opacity: 1;
|
|
1919
|
+
}
|
|
1920
|
+
@media (hover: none) {
|
|
1921
|
+
.block-editor-global-styles__text-shadow-remove-button {
|
|
1922
|
+
opacity: 1;
|
|
1923
|
+
}
|
|
1924
|
+
}
|
|
1925
|
+
|
|
1856
1926
|
.is-inherited-from-global-styles .components-base-control__label,
|
|
1857
1927
|
.is-inherited-from-global-styles .components-input-control__label {
|
|
1858
1928
|
text-decoration-line: underline;
|
|
@@ -2239,7 +2309,8 @@ iframe[name=editor-canvas] {
|
|
|
2239
2309
|
justify-content: center;
|
|
2240
2310
|
cursor: var(--wpds-cursor-control, pointer);
|
|
2241
2311
|
background: transparent;
|
|
2242
|
-
word-break:
|
|
2312
|
+
word-break: normal;
|
|
2313
|
+
overflow-wrap: break-word;
|
|
2243
2314
|
}
|
|
2244
2315
|
@media not (prefers-reduced-motion) {
|
|
2245
2316
|
.components-button.block-editor-block-types-list__item {
|
|
@@ -2512,7 +2583,7 @@ iframe[name=editor-canvas] {
|
|
|
2512
2583
|
background-color: transparent;
|
|
2513
2584
|
}
|
|
2514
2585
|
.block-editor-link-control__preview .block-editor-link-control__preview-title span {
|
|
2515
|
-
font-weight:
|
|
2586
|
+
font-weight: 400;
|
|
2516
2587
|
}
|
|
2517
2588
|
.block-editor-link-control__preview .block-editor-link-control__preview-title .components-external-link__icon {
|
|
2518
2589
|
position: absolute;
|
|
@@ -3021,12 +3092,6 @@ iframe[name=editor-canvas] {
|
|
|
3021
3092
|
.block-editor-list-view-leaf .block-editor-block-mover-button.is-down-button svg {
|
|
3022
3093
|
top: -4px;
|
|
3023
3094
|
}
|
|
3024
|
-
.block-editor-list-view-leaf .block-editor-block-mover-button::before {
|
|
3025
|
-
height: 16px;
|
|
3026
|
-
min-width: 100%;
|
|
3027
|
-
right: 0;
|
|
3028
|
-
left: 0;
|
|
3029
|
-
}
|
|
3030
3095
|
.block-editor-list-view-leaf .block-editor-inserter__toggle {
|
|
3031
3096
|
background: #1e1e1e;
|
|
3032
3097
|
color: #fff;
|
|
@@ -3333,6 +3398,11 @@ iframe[name=editor-canvas] {
|
|
|
3333
3398
|
height: 24px;
|
|
3334
3399
|
}
|
|
3335
3400
|
|
|
3401
|
+
.block-editor-plain-text {
|
|
3402
|
+
width: 100%;
|
|
3403
|
+
field-sizing: content;
|
|
3404
|
+
}
|
|
3405
|
+
|
|
3336
3406
|
.block-editor-responsive-block-control {
|
|
3337
3407
|
margin-bottom: 28px;
|
|
3338
3408
|
border-bottom: 1px solid #ccc;
|
|
@@ -3372,7 +3442,7 @@ iframe[name=editor-canvas] {
|
|
|
3372
3442
|
padding: 0;
|
|
3373
3443
|
position: absolute;
|
|
3374
3444
|
width: 1px;
|
|
3375
|
-
|
|
3445
|
+
overflow-wrap: normal !important;
|
|
3376
3446
|
word-break: normal !important;
|
|
3377
3447
|
}
|
|
3378
3448
|
|
|
@@ -3692,11 +3762,6 @@ iframe[name=editor-canvas] {
|
|
|
3692
3762
|
margin-bottom: 16px;
|
|
3693
3763
|
}
|
|
3694
3764
|
|
|
3695
|
-
.block-editor-hooks__position-control-item-hint {
|
|
3696
|
-
color: var(--wpds-color-foreground-content-neutral-weak, #707070);
|
|
3697
|
-
margin-block-start: 4px;
|
|
3698
|
-
}
|
|
3699
|
-
|
|
3700
3765
|
div.block-editor-bindings__panel {
|
|
3701
3766
|
grid-template-columns: repeat(auto-fit, minmax(100%, 1fr));
|
|
3702
3767
|
}
|
|
@@ -4742,7 +4807,7 @@ div.block-editor-bindings__panel button:hover .block-editor-bindings__item span
|
|
|
4742
4807
|
font-weight: var(--wpds-typography-font-weight-emphasis, 600);
|
|
4743
4808
|
}
|
|
4744
4809
|
.block-editor-block-visibility-modal__options-icon--checked {
|
|
4745
|
-
|
|
4810
|
+
color: #ddd;
|
|
4746
4811
|
}
|
|
4747
4812
|
.block-editor-block-visibility-modal__sub-options {
|
|
4748
4813
|
width: 100%;
|
package/build-style/style.css
CHANGED
|
@@ -340,6 +340,19 @@ iframe[name=editor-canvas] {
|
|
|
340
340
|
text-align: center;
|
|
341
341
|
}
|
|
342
342
|
|
|
343
|
+
.block-editor-block-inspector__state-badges {
|
|
344
|
+
display: flex;
|
|
345
|
+
align-items: center;
|
|
346
|
+
flex-wrap: wrap;
|
|
347
|
+
gap: 8px;
|
|
348
|
+
padding: 8px 16px;
|
|
349
|
+
margin-top: -16px;
|
|
350
|
+
}
|
|
351
|
+
|
|
352
|
+
.block-editor-block-inspector__state-badges-text {
|
|
353
|
+
white-space: nowrap;
|
|
354
|
+
}
|
|
355
|
+
|
|
343
356
|
.block-editor-block-inspector__no-block-tools {
|
|
344
357
|
border-top: 1px solid #ddd;
|
|
345
358
|
}
|
|
@@ -636,7 +649,7 @@ iframe[name=editor-canvas] {
|
|
|
636
649
|
.block-editor-block-lock-modal__checklist-item .block-editor-block-lock-modal__lock-icon {
|
|
637
650
|
flex-shrink: 0;
|
|
638
651
|
margin-right: 12px;
|
|
639
|
-
|
|
652
|
+
color: #1e1e1e;
|
|
640
653
|
}
|
|
641
654
|
.block-editor-block-lock-modal__checklist-item:hover {
|
|
642
655
|
background-color: #f0f0f0;
|
|
@@ -746,6 +759,7 @@ iframe[name=editor-canvas] {
|
|
|
746
759
|
align-items: center;
|
|
747
760
|
flex-wrap: wrap;
|
|
748
761
|
gap: 4px 8px;
|
|
762
|
+
overflow-wrap: anywhere;
|
|
749
763
|
}
|
|
750
764
|
.block-editor-block-card__title.block-editor-block-card__title {
|
|
751
765
|
font-size: 13px;
|
|
@@ -1044,14 +1058,6 @@ iframe[name=editor-canvas] {
|
|
|
1044
1058
|
animation-fill-mode: forwards;
|
|
1045
1059
|
}
|
|
1046
1060
|
}
|
|
1047
|
-
.components-button.block-editor-block-mover-button:focus, .components-button.block-editor-block-mover-button:focus:enabled, .components-button.block-editor-block-mover-button:focus::before {
|
|
1048
|
-
box-shadow: none;
|
|
1049
|
-
outline: none;
|
|
1050
|
-
}
|
|
1051
|
-
.components-button.block-editor-block-mover-button:focus-visible::before {
|
|
1052
|
-
box-shadow: inset 0 0 0 1px #fff, 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color);
|
|
1053
|
-
outline: 2px solid transparent;
|
|
1054
|
-
}
|
|
1055
1061
|
|
|
1056
1062
|
.block-editor-block-navigation__container {
|
|
1057
1063
|
min-width: 280px;
|
|
@@ -1126,7 +1132,7 @@ iframe[name=editor-canvas] {
|
|
|
1126
1132
|
height: 24px;
|
|
1127
1133
|
}
|
|
1128
1134
|
.block-editor-block-patterns-list__item .block-editor-patterns__pattern-icon-wrapper .block-editor-patterns__pattern-icon {
|
|
1129
|
-
|
|
1135
|
+
color: var(--wp-block-synced-color);
|
|
1130
1136
|
}
|
|
1131
1137
|
|
|
1132
1138
|
.block-editor-patterns__grid-pagination-wrapper .block-editor-patterns__grid-pagination {
|
|
@@ -1854,6 +1860,72 @@ iframe[name=editor-canvas] {
|
|
|
1854
1860
|
}
|
|
1855
1861
|
}
|
|
1856
1862
|
|
|
1863
|
+
.block-editor-global-styles__text-shadow {
|
|
1864
|
+
width: 260px;
|
|
1865
|
+
padding: 8px;
|
|
1866
|
+
}
|
|
1867
|
+
|
|
1868
|
+
.block-editor-global-styles__text-shadow-preview {
|
|
1869
|
+
display: flex;
|
|
1870
|
+
align-items: center;
|
|
1871
|
+
justify-content: center;
|
|
1872
|
+
height: 80px;
|
|
1873
|
+
border: #ddd 1px solid;
|
|
1874
|
+
border-radius: 2px;
|
|
1875
|
+
font-size: 24px;
|
|
1876
|
+
margin-bottom: 16px;
|
|
1877
|
+
/*rtl:begin:ignore*/
|
|
1878
|
+
background-image: repeating-linear-gradient(45deg, #e0e0e0 25%, transparent 25%, transparent 75%, #e0e0e0 75%, #e0e0e0), repeating-linear-gradient(45deg, #e0e0e0 25%, transparent 25%, transparent 75%, #e0e0e0 75%, #e0e0e0);
|
|
1879
|
+
background-position: 0 0, 8px 8px;
|
|
1880
|
+
/*rtl:end:ignore*/
|
|
1881
|
+
background-size: 16px 16px;
|
|
1882
|
+
}
|
|
1883
|
+
|
|
1884
|
+
.block-editor-global-styles__text-shadow-list-item {
|
|
1885
|
+
justify-content: space-between;
|
|
1886
|
+
gap: 8px;
|
|
1887
|
+
width: 100%;
|
|
1888
|
+
}
|
|
1889
|
+
.block-editor-global-styles__text-shadow-list-item:not(.is-active) svg {
|
|
1890
|
+
opacity: 0;
|
|
1891
|
+
}
|
|
1892
|
+
|
|
1893
|
+
.block-editor-global-styles__text-shadow-dropdown {
|
|
1894
|
+
display: block;
|
|
1895
|
+
padding: 0;
|
|
1896
|
+
position: relative;
|
|
1897
|
+
border: 1px solid #ddd;
|
|
1898
|
+
border-radius: 2px;
|
|
1899
|
+
}
|
|
1900
|
+
|
|
1901
|
+
.block-editor-global-styles__text-shadow-dropdown-toggle {
|
|
1902
|
+
width: 100%;
|
|
1903
|
+
padding: 8px;
|
|
1904
|
+
}
|
|
1905
|
+
.block-editor-global-styles__text-shadow-dropdown-toggle.is-open {
|
|
1906
|
+
background-color: #f0f0f0;
|
|
1907
|
+
}
|
|
1908
|
+
|
|
1909
|
+
.block-editor-global-styles__text-shadow-remove-button {
|
|
1910
|
+
position: absolute;
|
|
1911
|
+
right: 8px;
|
|
1912
|
+
top: 8px;
|
|
1913
|
+
opacity: 0;
|
|
1914
|
+
}
|
|
1915
|
+
@media not (prefers-reduced-motion) {
|
|
1916
|
+
.block-editor-global-styles__text-shadow-remove-button {
|
|
1917
|
+
transition: opacity 0.1s ease-in-out;
|
|
1918
|
+
}
|
|
1919
|
+
}
|
|
1920
|
+
.block-editor-global-styles__text-shadow-dropdown:hover .block-editor-global-styles__text-shadow-remove-button, .block-editor-global-styles__text-shadow-remove-button:focus, .block-editor-global-styles__text-shadow-remove-button:hover {
|
|
1921
|
+
opacity: 1;
|
|
1922
|
+
}
|
|
1923
|
+
@media (hover: none) {
|
|
1924
|
+
.block-editor-global-styles__text-shadow-remove-button {
|
|
1925
|
+
opacity: 1;
|
|
1926
|
+
}
|
|
1927
|
+
}
|
|
1928
|
+
|
|
1857
1929
|
.is-inherited-from-global-styles .components-base-control__label,
|
|
1858
1930
|
.is-inherited-from-global-styles .components-input-control__label {
|
|
1859
1931
|
text-decoration-line: underline;
|
|
@@ -2240,7 +2312,8 @@ iframe[name=editor-canvas] {
|
|
|
2240
2312
|
justify-content: center;
|
|
2241
2313
|
cursor: var(--wpds-cursor-control, pointer);
|
|
2242
2314
|
background: transparent;
|
|
2243
|
-
word-break:
|
|
2315
|
+
word-break: normal;
|
|
2316
|
+
overflow-wrap: break-word;
|
|
2244
2317
|
}
|
|
2245
2318
|
@media not (prefers-reduced-motion) {
|
|
2246
2319
|
.components-button.block-editor-block-types-list__item {
|
|
@@ -2513,7 +2586,7 @@ iframe[name=editor-canvas] {
|
|
|
2513
2586
|
background-color: transparent;
|
|
2514
2587
|
}
|
|
2515
2588
|
.block-editor-link-control__preview .block-editor-link-control__preview-title span {
|
|
2516
|
-
font-weight:
|
|
2589
|
+
font-weight: 400;
|
|
2517
2590
|
}
|
|
2518
2591
|
.block-editor-link-control__preview .block-editor-link-control__preview-title .components-external-link__icon {
|
|
2519
2592
|
position: absolute;
|
|
@@ -3022,12 +3095,6 @@ iframe[name=editor-canvas] {
|
|
|
3022
3095
|
.block-editor-list-view-leaf .block-editor-block-mover-button.is-down-button svg {
|
|
3023
3096
|
top: -4px;
|
|
3024
3097
|
}
|
|
3025
|
-
.block-editor-list-view-leaf .block-editor-block-mover-button::before {
|
|
3026
|
-
height: 16px;
|
|
3027
|
-
min-width: 100%;
|
|
3028
|
-
left: 0;
|
|
3029
|
-
right: 0;
|
|
3030
|
-
}
|
|
3031
3098
|
.block-editor-list-view-leaf .block-editor-inserter__toggle {
|
|
3032
3099
|
background: #1e1e1e;
|
|
3033
3100
|
color: #fff;
|
|
@@ -3335,6 +3402,11 @@ iframe[name=editor-canvas] {
|
|
|
3335
3402
|
height: 24px;
|
|
3336
3403
|
}
|
|
3337
3404
|
|
|
3405
|
+
.block-editor-plain-text {
|
|
3406
|
+
width: 100%;
|
|
3407
|
+
field-sizing: content;
|
|
3408
|
+
}
|
|
3409
|
+
|
|
3338
3410
|
.block-editor-responsive-block-control {
|
|
3339
3411
|
margin-bottom: 28px;
|
|
3340
3412
|
border-bottom: 1px solid #ccc;
|
|
@@ -3374,7 +3446,7 @@ iframe[name=editor-canvas] {
|
|
|
3374
3446
|
padding: 0;
|
|
3375
3447
|
position: absolute;
|
|
3376
3448
|
width: 1px;
|
|
3377
|
-
|
|
3449
|
+
overflow-wrap: normal !important;
|
|
3378
3450
|
word-break: normal !important;
|
|
3379
3451
|
}
|
|
3380
3452
|
|
|
@@ -3694,11 +3766,6 @@ iframe[name=editor-canvas] {
|
|
|
3694
3766
|
margin-bottom: 16px;
|
|
3695
3767
|
}
|
|
3696
3768
|
|
|
3697
|
-
.block-editor-hooks__position-control-item-hint {
|
|
3698
|
-
color: var(--wpds-color-foreground-content-neutral-weak, #707070);
|
|
3699
|
-
margin-block-start: 4px;
|
|
3700
|
-
}
|
|
3701
|
-
|
|
3702
3769
|
div.block-editor-bindings__panel {
|
|
3703
3770
|
grid-template-columns: repeat(auto-fit, minmax(100%, 1fr));
|
|
3704
3771
|
}
|
|
@@ -4744,7 +4811,7 @@ div.block-editor-bindings__panel button:hover .block-editor-bindings__item span
|
|
|
4744
4811
|
font-weight: var(--wpds-typography-font-weight-emphasis, 600);
|
|
4745
4812
|
}
|
|
4746
4813
|
.block-editor-block-visibility-modal__options-icon--checked {
|
|
4747
|
-
|
|
4814
|
+
color: #ddd;
|
|
4748
4815
|
}
|
|
4749
4816
|
.block-editor-block-visibility-modal__sub-options {
|
|
4750
4817
|
width: 100%;
|