@wordpress/global-styles-ui 1.1.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/LICENSE.md +788 -0
- package/README.md +48 -0
- package/build/background-panel.js +62 -0
- package/build/background-panel.js.map +7 -0
- package/build/block-preview-panel.js +90 -0
- package/build/block-preview-panel.js.map +7 -0
- package/build/color-indicator-wrapper.js +55 -0
- package/build/color-indicator-wrapper.js.map +7 -0
- package/build/color-palette-panel.js +123 -0
- package/build/color-palette-panel.js.map +7 -0
- package/build/color-preview.js +94 -0
- package/build/color-preview.js.map +7 -0
- package/build/color-variations.js +41 -0
- package/build/color-variations.js.map +7 -0
- package/build/confirm-reset-shadow-dialog.js +55 -0
- package/build/confirm-reset-shadow-dialog.js.map +7 -0
- package/build/context.js +37 -0
- package/build/context.js.map +7 -0
- package/build/dimensions-panel.js +89 -0
- package/build/dimensions-panel.js.map +7 -0
- package/build/font-families.js +114 -0
- package/build/font-families.js.map +7 -0
- package/build/font-family-item.js +48 -0
- package/build/font-family-item.js.map +7 -0
- package/build/font-library-modal/collection-font-variant.js +75 -0
- package/build/font-library-modal/collection-font-variant.js.map +7 -0
- package/build/font-library-modal/context.js +386 -0
- package/build/font-library-modal/context.js.map +7 -0
- package/build/font-library-modal/font-card.js +81 -0
- package/build/font-library-modal/font-card.js.map +7 -0
- package/build/font-library-modal/font-collection.js +510 -0
- package/build/font-library-modal/font-collection.js.map +7 -0
- package/build/font-library-modal/font-demo.js +111 -0
- package/build/font-library-modal/font-demo.js.map +7 -0
- package/build/font-library-modal/google-fonts-confirm-dialog.js +58 -0
- package/build/font-library-modal/google-fonts-confirm-dialog.js.map +7 -0
- package/build/font-library-modal/index.js +110 -0
- package/build/font-library-modal/index.js.map +7 -0
- package/build/font-library-modal/installed-fonts.js +453 -0
- package/build/font-library-modal/installed-fonts.js.map +7 -0
- package/build/font-library-modal/lib/inflate.js +2628 -0
- package/build/font-library-modal/lib/inflate.js.map +7 -0
- package/build/font-library-modal/lib/lib-font.browser.d.js +33 -0
- package/build/font-library-modal/lib/lib-font.browser.d.js.map +7 -0
- package/build/font-library-modal/lib/lib-font.browser.js +3788 -0
- package/build/font-library-modal/lib/lib-font.browser.js.map +7 -0
- package/build/font-library-modal/lib/unbrotli.js +3678 -0
- package/build/font-library-modal/lib/unbrotli.js.map +7 -0
- package/build/font-library-modal/library-font-details.js +63 -0
- package/build/font-library-modal/library-font-details.js.map +7 -0
- package/build/font-library-modal/library-font-variant.js +81 -0
- package/build/font-library-modal/library-font-variant.js.map +7 -0
- package/build/font-library-modal/resolvers.js +115 -0
- package/build/font-library-modal/resolvers.js.map +7 -0
- package/build/font-library-modal/types.js +17 -0
- package/build/font-library-modal/types.js.map +7 -0
- package/build/font-library-modal/upload-fonts.js +207 -0
- package/build/font-library-modal/upload-fonts.js.map +7 -0
- package/build/font-library-modal/utils/constants.js +49 -0
- package/build/font-library-modal/utils/constants.js.map +7 -0
- package/build/font-library-modal/utils/filter-fonts.js +39 -0
- package/build/font-library-modal/utils/filter-fonts.js.map +7 -0
- package/build/font-library-modal/utils/fonts-outline.js +51 -0
- package/build/font-library-modal/utils/fonts-outline.js.map +7 -0
- package/build/font-library-modal/utils/index.js +274 -0
- package/build/font-library-modal/utils/index.js.map +7 -0
- package/build/font-library-modal/utils/make-families-from-faces.js +45 -0
- package/build/font-library-modal/utils/make-families-from-faces.js.map +7 -0
- package/build/font-library-modal/utils/preview-styles.js +119 -0
- package/build/font-library-modal/utils/preview-styles.js.map +7 -0
- package/build/font-library-modal/utils/set-immutably.js +40 -0
- package/build/font-library-modal/utils/set-immutably.js.map +7 -0
- package/build/font-library-modal/utils/sort-font-faces.js +59 -0
- package/build/font-library-modal/utils/sort-font-faces.js.map +7 -0
- package/build/font-library-modal/utils/toggleFont.js +67 -0
- package/build/font-library-modal/utils/toggleFont.js.map +7 -0
- package/build/font-sizes/confirm-delete-font-size-dialog.js +60 -0
- package/build/font-sizes/confirm-delete-font-size-dialog.js.map +7 -0
- package/build/font-sizes/confirm-reset-font-sizes-dialog.js +55 -0
- package/build/font-sizes/confirm-reset-font-sizes-dialog.js.map +7 -0
- package/build/font-sizes/font-size-preview.js +50 -0
- package/build/font-sizes/font-size-preview.js.map +7 -0
- package/build/font-sizes/font-size.js +261 -0
- package/build/font-sizes/font-size.js.map +7 -0
- package/build/font-sizes/font-sizes-count.js +40 -0
- package/build/font-sizes/font-sizes-count.js.map +7 -0
- package/build/font-sizes/font-sizes.js +215 -0
- package/build/font-sizes/font-sizes.js.map +7 -0
- package/build/font-sizes/rename-font-size-dialog.js +96 -0
- package/build/font-sizes/rename-font-size-dialog.js.map +7 -0
- package/build/global-styles-ui.js +213 -0
- package/build/global-styles-ui.js.map +7 -0
- package/build/gradients-palette-panel.js +133 -0
- package/build/gradients-palette-panel.js.map +7 -0
- package/build/highlighted-colors.js +57 -0
- package/build/highlighted-colors.js.map +7 -0
- package/build/hooks.js +176 -0
- package/build/hooks.js.map +7 -0
- package/build/icon-with-current-color.js +56 -0
- package/build/icon-with-current-color.js.map +7 -0
- package/build/index.js +51 -0
- package/build/index.js.map +7 -0
- package/build/lock-unlock.js +35 -0
- package/build/lock-unlock.js.map +7 -0
- package/build/navigation-button.js +52 -0
- package/build/navigation-button.js.map +7 -0
- package/build/pagination/index.js +133 -0
- package/build/pagination/index.js.map +7 -0
- package/build/palette.js +93 -0
- package/build/palette.js.map +7 -0
- package/build/preset-colors.js +40 -0
- package/build/preset-colors.js.map +7 -0
- package/build/preview-colors.js +86 -0
- package/build/preview-colors.js.map +7 -0
- package/build/preview-hooks.js +60 -0
- package/build/preview-hooks.js.map +7 -0
- package/build/preview-styles.js +219 -0
- package/build/preview-styles.js.map +7 -0
- package/build/preview-typography.js +72 -0
- package/build/preview-typography.js.map +7 -0
- package/build/preview-wrapper.js +102 -0
- package/build/preview-wrapper.js.map +7 -0
- package/build/provider.js +54 -0
- package/build/provider.js.map +7 -0
- package/build/root-menu.js +72 -0
- package/build/root-menu.js.map +7 -0
- package/build/screen-background.js +58 -0
- package/build/screen-background.js.map +7 -0
- package/build/screen-block-list.js +160 -0
- package/build/screen-block-list.js.map +7 -0
- package/build/screen-block.js +316 -0
- package/build/screen-block.js.map +7 -0
- package/build/screen-color-palette.js +64 -0
- package/build/screen-color-palette.js.map +7 -0
- package/build/screen-colors.js +85 -0
- package/build/screen-colors.js.map +7 -0
- package/build/screen-css.js +68 -0
- package/build/screen-css.js.map +7 -0
- package/build/screen-header.js +61 -0
- package/build/screen-header.js.map +7 -0
- package/build/screen-layout.js +54 -0
- package/build/screen-layout.js.map +7 -0
- package/build/screen-revisions/index.js +147 -0
- package/build/screen-revisions/index.js.map +7 -0
- package/build/screen-revisions/revisions-buttons.js +198 -0
- package/build/screen-revisions/revisions-buttons.js.map +7 -0
- package/build/screen-revisions/types.js +17 -0
- package/build/screen-revisions/types.js.map +7 -0
- package/build/screen-revisions/use-global-styles-revisions.js +163 -0
- package/build/screen-revisions/use-global-styles-revisions.js.map +7 -0
- package/build/screen-root.js +134 -0
- package/build/screen-root.js.map +7 -0
- package/build/screen-shadows.js +49 -0
- package/build/screen-shadows.js.map +7 -0
- package/build/screen-style-variations.js +52 -0
- package/build/screen-style-variations.js.map +7 -0
- package/build/screen-typography-element.js +167 -0
- package/build/screen-typography-element.js.map +7 -0
- package/build/screen-typography.js +65 -0
- package/build/screen-typography.js.map +7 -0
- package/build/shadow-utils.js +125 -0
- package/build/shadow-utils.js.map +7 -0
- package/build/shadows-edit-panel.js +503 -0
- package/build/shadows-edit-panel.js.map +7 -0
- package/build/shadows-panel.js +203 -0
- package/build/shadows-panel.js.map +7 -0
- package/build/size-control/index.js +86 -0
- package/build/size-control/index.js.map +7 -0
- package/build/style-variations-container.js +130 -0
- package/build/style-variations-container.js.map +7 -0
- package/build/style-variations-content.js +52 -0
- package/build/style-variations-content.js.map +7 -0
- package/build/style-variations.js +41 -0
- package/build/style-variations.js.map +7 -0
- package/build/subtitle.js +33 -0
- package/build/subtitle.js.map +7 -0
- package/build/typography-elements.js +117 -0
- package/build/typography-elements.js.map +7 -0
- package/build/typography-example.js +79 -0
- package/build/typography-example.js.map +7 -0
- package/build/typography-panel.js +64 -0
- package/build/typography-panel.js.map +7 -0
- package/build/typography-preview.js +70 -0
- package/build/typography-preview.js.map +7 -0
- package/build/typography-variations.js +41 -0
- package/build/typography-variations.js.map +7 -0
- package/build/utils.js +210 -0
- package/build/utils.js.map +7 -0
- package/build/variations/variation.js +116 -0
- package/build/variations/variation.js.map +7 -0
- package/build/variations/variations-color.js +64 -0
- package/build/variations/variations-color.js.map +7 -0
- package/build/variations/variations-panel.js +69 -0
- package/build/variations/variations-panel.js.map +7 -0
- package/build/variations/variations-typography.js +80 -0
- package/build/variations/variations-typography.js.map +7 -0
- package/build/with-global-styles-provider.js +48 -0
- package/build/with-global-styles-provider.js.map +7 -0
- package/build-module/background-panel.js +38 -0
- package/build-module/background-panel.js.map +7 -0
- package/build-module/block-preview-panel.js +70 -0
- package/build-module/block-preview-panel.js.map +7 -0
- package/build-module/color-indicator-wrapper.js +25 -0
- package/build-module/color-indicator-wrapper.js.map +7 -0
- package/build-module/color-palette-panel.js +97 -0
- package/build-module/color-palette-panel.js.map +7 -0
- package/build-module/color-preview.js +70 -0
- package/build-module/color-preview.js.map +7 -0
- package/build-module/color-variations.js +7 -0
- package/build-module/color-variations.js.map +7 -0
- package/build-module/confirm-reset-shadow-dialog.js +35 -0
- package/build-module/confirm-reset-shadow-dialog.js.map +7 -0
- package/build-module/context.js +13 -0
- package/build-module/context.js.map +7 -0
- package/build-module/dimensions-panel.js +69 -0
- package/build-module/dimensions-panel.js.map +7 -0
- package/build-module/font-families.js +92 -0
- package/build-module/font-families.js.map +7 -0
- package/build-module/font-family-item.js +32 -0
- package/build-module/font-family-item.js.map +7 -0
- package/build-module/font-library-modal/collection-font-variant.js +45 -0
- package/build-module/font-library-modal/collection-font-variant.js.map +7 -0
- package/build-module/font-library-modal/context.js +382 -0
- package/build-module/font-library-modal/context.js.map +7 -0
- package/build-module/font-library-modal/font-card.js +57 -0
- package/build-module/font-library-modal/font-card.js.map +7 -0
- package/build-module/font-library-modal/font-collection.js +510 -0
- package/build-module/font-library-modal/font-collection.js.map +7 -0
- package/build-module/font-library-modal/font-demo.js +94 -0
- package/build-module/font-library-modal/font-demo.js.map +7 -0
- package/build-module/font-library-modal/google-fonts-confirm-dialog.js +45 -0
- package/build-module/font-library-modal/google-fonts-confirm-dialog.js.map +7 -0
- package/build-module/font-library-modal/index.js +83 -0
- package/build-module/font-library-modal/index.js.map +7 -0
- package/build-module/font-library-modal/installed-fonts.js +442 -0
- package/build-module/font-library-modal/installed-fonts.js.map +7 -0
- package/build-module/font-library-modal/lib/inflate.js +2636 -0
- package/build-module/font-library-modal/lib/inflate.js.map +7 -0
- package/build-module/font-library-modal/lib/lib-font.browser.d.js +9 -0
- package/build-module/font-library-modal/lib/lib-font.browser.d.js.map +7 -0
- package/build-module/font-library-modal/lib/lib-font.browser.js +3754 -0
- package/build-module/font-library-modal/lib/lib-font.browser.js.map +7 -0
- package/build-module/font-library-modal/lib/unbrotli.js +3686 -0
- package/build-module/font-library-modal/lib/unbrotli.js.map +7 -0
- package/build-module/font-library-modal/library-font-details.js +36 -0
- package/build-module/font-library-modal/library-font-details.js.map +7 -0
- package/build-module/font-library-modal/library-font-variant.js +51 -0
- package/build-module/font-library-modal/library-font-variant.js.map +7 -0
- package/build-module/font-library-modal/resolvers.js +76 -0
- package/build-module/font-library-modal/resolvers.js.map +7 -0
- package/build-module/font-library-modal/types.js +1 -0
- package/build-module/font-library-modal/types.js.map +7 -0
- package/build-module/font-library-modal/upload-fonts.js +187 -0
- package/build-module/font-library-modal/upload-fonts.js.map +7 -0
- package/build-module/font-library-modal/utils/constants.js +23 -0
- package/build-module/font-library-modal/utils/constants.js.map +7 -0
- package/build-module/font-library-modal/utils/filter-fonts.js +19 -0
- package/build-module/font-library-modal/utils/filter-fonts.js.map +7 -0
- package/build-module/font-library-modal/utils/fonts-outline.js +26 -0
- package/build-module/font-library-modal/utils/fonts-outline.js.map +7 -0
- package/build-module/font-library-modal/utils/index.js +238 -0
- package/build-module/font-library-modal/utils/index.js.map +7 -0
- package/build-module/font-library-modal/utils/make-families-from-faces.js +25 -0
- package/build-module/font-library-modal/utils/make-families-from-faces.js.map +7 -0
- package/build-module/font-library-modal/utils/preview-styles.js +92 -0
- package/build-module/font-library-modal/utils/preview-styles.js.map +7 -0
- package/build-module/font-library-modal/utils/set-immutably.js +16 -0
- package/build-module/font-library-modal/utils/set-immutably.js.map +7 -0
- package/build-module/font-library-modal/utils/sort-font-faces.js +35 -0
- package/build-module/font-library-modal/utils/sort-font-faces.js.map +7 -0
- package/build-module/font-library-modal/utils/toggleFont.js +43 -0
- package/build-module/font-library-modal/utils/toggleFont.js.map +7 -0
- package/build-module/font-sizes/confirm-delete-font-size-dialog.js +40 -0
- package/build-module/font-sizes/confirm-delete-font-size-dialog.js.map +7 -0
- package/build-module/font-sizes/confirm-reset-font-sizes-dialog.js +35 -0
- package/build-module/font-sizes/confirm-reset-font-sizes-dialog.js.map +7 -0
- package/build-module/font-sizes/font-size-preview.js +30 -0
- package/build-module/font-sizes/font-size-preview.js.map +7 -0
- package/build-module/font-sizes/font-size.js +241 -0
- package/build-module/font-sizes/font-size.js.map +7 -0
- package/build-module/font-sizes/font-sizes-count.js +25 -0
- package/build-module/font-sizes/font-sizes-count.js.map +7 -0
- package/build-module/font-sizes/font-sizes.js +200 -0
- package/build-module/font-sizes/font-sizes.js.map +7 -0
- package/build-module/font-sizes/rename-font-size-dialog.js +82 -0
- package/build-module/font-sizes/rename-font-size-dialog.js.map +7 -0
- package/build-module/global-styles-ui.js +182 -0
- package/build-module/global-styles-ui.js.map +7 -0
- package/build-module/gradients-palette-panel.js +118 -0
- package/build-module/gradients-palette-panel.js.map +7 -0
- package/build-module/highlighted-colors.js +37 -0
- package/build-module/highlighted-colors.js.map +7 -0
- package/build-module/hooks.js +144 -0
- package/build-module/hooks.js.map +7 -0
- package/build-module/icon-with-current-color.js +22 -0
- package/build-module/icon-with-current-color.js.map +7 -0
- package/build-module/index.js +13 -0
- package/build-module/index.js.map +7 -0
- package/build-module/lock-unlock.js +10 -0
- package/build-module/lock-unlock.js.map +7 -0
- package/build-module/navigation-button.js +32 -0
- package/build-module/navigation-button.js.map +7 -0
- package/build-module/pagination/index.js +107 -0
- package/build-module/pagination/index.js.map +7 -0
- package/build-module/palette.js +70 -0
- package/build-module/palette.js.map +7 -0
- package/build-module/preset-colors.js +20 -0
- package/build-module/preset-colors.js.map +7 -0
- package/build-module/preview-colors.js +59 -0
- package/build-module/preview-colors.js.map +7 -0
- package/build-module/preview-hooks.js +36 -0
- package/build-module/preview-hooks.js.map +7 -0
- package/build-module/preview-styles.js +193 -0
- package/build-module/preview-styles.js.map +7 -0
- package/build-module/preview-typography.js +42 -0
- package/build-module/preview-typography.js.map +7 -0
- package/build-module/preview-wrapper.js +86 -0
- package/build-module/preview-wrapper.js.map +7 -0
- package/build-module/provider.js +30 -0
- package/build-module/provider.js.map +7 -0
- package/build-module/root-menu.js +58 -0
- package/build-module/root-menu.js.map +7 -0
- package/build-module/screen-background.js +28 -0
- package/build-module/screen-background.js.map +7 -0
- package/build-module/screen-block-list.js +150 -0
- package/build-module/screen-block-list.js.map +7 -0
- package/build-module/screen-block.js +293 -0
- package/build-module/screen-block.js.map +7 -0
- package/build-module/screen-color-palette.js +34 -0
- package/build-module/screen-color-palette.js.map +7 -0
- package/build-module/screen-colors.js +55 -0
- package/build-module/screen-colors.js.map +7 -0
- package/build-module/screen-css.js +48 -0
- package/build-module/screen-css.js.map +7 -0
- package/build-module/screen-header.js +44 -0
- package/build-module/screen-header.js.map +7 -0
- package/build-module/screen-layout.js +24 -0
- package/build-module/screen-layout.js.map +7 -0
- package/build-module/screen-revisions/index.js +121 -0
- package/build-module/screen-revisions/index.js.map +7 -0
- package/build-module/screen-revisions/revisions-buttons.js +178 -0
- package/build-module/screen-revisions/revisions-buttons.js.map +7 -0
- package/build-module/screen-revisions/types.js +1 -0
- package/build-module/screen-revisions/types.js.map +7 -0
- package/build-module/screen-revisions/use-global-styles-revisions.js +145 -0
- package/build-module/screen-revisions/use-global-styles-revisions.js.map +7 -0
- package/build-module/screen-root.js +114 -0
- package/build-module/screen-root.js.map +7 -0
- package/build-module/screen-shadows.js +14 -0
- package/build-module/screen-shadows.js.map +7 -0
- package/build-module/screen-style-variations.js +32 -0
- package/build-module/screen-style-variations.js.map +7 -0
- package/build-module/screen-typography-element.js +141 -0
- package/build-module/screen-typography-element.js.map +7 -0
- package/build-module/screen-typography.js +35 -0
- package/build-module/screen-typography.js.map +7 -0
- package/build-module/shadow-utils.js +98 -0
- package/build-module/shadow-utils.js.map +7 -0
- package/build-module/shadows-edit-panel.js +502 -0
- package/build-module/shadows-edit-panel.js.map +7 -0
- package/build-module/shadows-panel.js +182 -0
- package/build-module/shadows-panel.js.map +7 -0
- package/build-module/size-control/index.js +72 -0
- package/build-module/size-control/index.js.map +7 -0
- package/build-module/style-variations-container.js +100 -0
- package/build-module/style-variations-container.js.map +7 -0
- package/build-module/style-variations-content.js +18 -0
- package/build-module/style-variations-content.js.map +7 -0
- package/build-module/style-variations.js +7 -0
- package/build-module/style-variations.js.map +7 -0
- package/build-module/subtitle.js +9 -0
- package/build-module/subtitle.js.map +7 -0
- package/build-module/typography-elements.js +102 -0
- package/build-module/typography-elements.js.map +7 -0
- package/build-module/typography-example.js +59 -0
- package/build-module/typography-example.js.map +7 -0
- package/build-module/typography-panel.js +44 -0
- package/build-module/typography-panel.js.map +7 -0
- package/build-module/typography-preview.js +50 -0
- package/build-module/typography-preview.js.map +7 -0
- package/build-module/typography-variations.js +7 -0
- package/build-module/typography-variations.js.map +7 -0
- package/build-module/utils.js +179 -0
- package/build-module/utils.js.map +7 -0
- package/build-module/variations/variation.js +86 -0
- package/build-module/variations/variation.js.map +7 -0
- package/build-module/variations/variations-color.js +37 -0
- package/build-module/variations/variations-color.js.map +7 -0
- package/build-module/variations/variations-panel.js +44 -0
- package/build-module/variations/variations-panel.js.map +7 -0
- package/build-module/variations/variations-typography.js +53 -0
- package/build-module/variations/variations-typography.js.map +7 -0
- package/build-module/with-global-styles-provider.js +24 -0
- package/build-module/with-global-styles-provider.js.map +7 -0
- package/build-style/style-rtl.css +717 -0
- package/build-style/style.css +718 -0
- package/build-types/background-panel.d.ts +10 -0
- package/build-types/background-panel.d.ts.map +1 -0
- package/build-types/block-preview-panel.d.ts +7 -0
- package/build-types/block-preview-panel.d.ts.map +1 -0
- package/build-types/color-indicator-wrapper.d.ts +7 -0
- package/build-types/color-indicator-wrapper.d.ts.map +1 -0
- package/build-types/color-palette-panel.d.ts +6 -0
- package/build-types/color-palette-panel.d.ts.map +1 -0
- package/build-types/color-preview.d.ts +2 -0
- package/build-types/color-preview.d.ts.map +1 -0
- package/build-types/color-variations.d.ts +27 -0
- package/build-types/color-variations.d.ts.map +1 -0
- package/build-types/confirm-reset-shadow-dialog.d.ts +10 -0
- package/build-types/confirm-reset-shadow-dialog.d.ts.map +1 -0
- package/build-types/context.d.ts +10 -0
- package/build-types/context.d.ts.map +1 -0
- package/build-types/dimensions-panel.d.ts +2 -0
- package/build-types/dimensions-panel.d.ts.map +1 -0
- package/build-types/font-families.d.ts +4 -0
- package/build-types/font-families.d.ts.map +1 -0
- package/build-types/font-family-item.d.ts +7 -0
- package/build-types/font-family-item.d.ts.map +1 -0
- package/build-types/font-library-modal/collection-font-variant.d.ts +4 -0
- package/build-types/font-library-modal/collection-font-variant.d.ts.map +1 -0
- package/build-types/font-library-modal/context.d.ts +7 -0
- package/build-types/font-library-modal/context.d.ts.map +1 -0
- package/build-types/font-library-modal/font-card.d.ts +9 -0
- package/build-types/font-library-modal/font-card.d.ts.map +1 -0
- package/build-types/font-library-modal/font-collection.d.ts +5 -0
- package/build-types/font-library-modal/font-collection.d.ts.map +1 -0
- package/build-types/font-library-modal/font-demo.d.ts +4 -0
- package/build-types/font-library-modal/font-demo.d.ts.map +1 -0
- package/build-types/font-library-modal/google-fonts-confirm-dialog.d.ts +3 -0
- package/build-types/font-library-modal/google-fonts-confirm-dialog.d.ts.map +1 -0
- package/build-types/font-library-modal/index.d.ts +6 -0
- package/build-types/font-library-modal/index.d.ts.map +1 -0
- package/build-types/font-library-modal/installed-fonts.d.ts +3 -0
- package/build-types/font-library-modal/installed-fonts.d.ts.map +1 -0
- package/build-types/font-library-modal/library-font-details.d.ts +6 -0
- package/build-types/font-library-modal/library-font-details.d.ts.map +1 -0
- package/build-types/font-library-modal/library-font-variant.d.ts +7 -0
- package/build-types/font-library-modal/library-font-variant.d.ts.map +1 -0
- package/build-types/font-library-modal/resolvers.d.ts +43 -0
- package/build-types/font-library-modal/resolvers.d.ts.map +1 -0
- package/build-types/font-library-modal/types.d.ts +133 -0
- package/build-types/font-library-modal/types.d.ts.map +1 -0
- package/build-types/font-library-modal/upload-fonts.d.ts +3 -0
- package/build-types/font-library-modal/upload-fonts.d.ts.map +1 -0
- package/build-types/font-library-modal/utils/constants.d.ts +4 -0
- package/build-types/font-library-modal/utils/constants.d.ts.map +1 -0
- package/build-types/font-library-modal/utils/filter-fonts.d.ts +25 -0
- package/build-types/font-library-modal/utils/filter-fonts.d.ts.map +1 -0
- package/build-types/font-library-modal/utils/fonts-outline.d.ts +7 -0
- package/build-types/font-library-modal/utils/fonts-outline.d.ts.map +1 -0
- package/build-types/font-library-modal/utils/index.d.ts +21 -0
- package/build-types/font-library-modal/utils/index.d.ts.map +1 -0
- package/build-types/font-library-modal/utils/make-families-from-faces.d.ts +6 -0
- package/build-types/font-library-modal/utils/make-families-from-faces.d.ts.map +1 -0
- package/build-types/font-library-modal/utils/preview-styles.d.ts +13 -0
- package/build-types/font-library-modal/utils/preview-styles.d.ts.map +1 -0
- package/build-types/font-library-modal/utils/set-immutably.d.ts +13 -0
- package/build-types/font-library-modal/utils/set-immutably.d.ts.map +1 -0
- package/build-types/font-library-modal/utils/sort-font-faces.d.ts +6 -0
- package/build-types/font-library-modal/utils/sort-font-faces.d.ts.map +1 -0
- package/build-types/font-library-modal/utils/toggleFont.d.ts +38 -0
- package/build-types/font-library-modal/utils/toggleFont.d.ts.map +1 -0
- package/build-types/font-sizes/confirm-delete-font-size-dialog.d.ts +10 -0
- package/build-types/font-sizes/confirm-delete-font-size-dialog.d.ts.map +1 -0
- package/build-types/font-sizes/confirm-reset-font-sizes-dialog.d.ts +10 -0
- package/build-types/font-sizes/confirm-reset-font-sizes-dialog.d.ts.map +1 -0
- package/build-types/font-sizes/font-size-preview.d.ts +7 -0
- package/build-types/font-sizes/font-size-preview.d.ts.map +1 -0
- package/build-types/font-sizes/font-size.d.ts +4 -0
- package/build-types/font-sizes/font-size.d.ts.map +1 -0
- package/build-types/font-sizes/font-sizes-count.d.ts +3 -0
- package/build-types/font-sizes/font-sizes-count.d.ts.map +1 -0
- package/build-types/font-sizes/font-sizes.d.ts +3 -0
- package/build-types/font-sizes/font-sizes.d.ts.map +1 -0
- package/build-types/font-sizes/rename-font-size-dialog.d.ts +9 -0
- package/build-types/font-sizes/rename-font-size-dialog.d.ts.map +1 -0
- package/build-types/global-styles-ui.d.ts +26 -0
- package/build-types/global-styles-ui.d.ts.map +1 -0
- package/build-types/gradients-palette-panel.d.ts +6 -0
- package/build-types/gradients-palette-panel.d.ts.map +1 -0
- package/build-types/highlighted-colors.d.ts +7 -0
- package/build-types/highlighted-colors.d.ts.map +1 -0
- package/build-types/hooks.d.ts +46 -0
- package/build-types/hooks.d.ts.map +1 -0
- package/build-types/icon-with-current-color.d.ts +9 -0
- package/build-types/icon-with-current-color.d.ts.map +1 -0
- package/build-types/index.d.ts +6 -0
- package/build-types/index.d.ts.map +1 -0
- package/build-types/lock-unlock.d.ts +2 -0
- package/build-types/lock-unlock.d.ts.map +1 -0
- package/build-types/navigation-button.d.ts +10 -0
- package/build-types/navigation-button.d.ts.map +1 -0
- package/build-types/pagination/index.d.ts +13 -0
- package/build-types/pagination/index.d.ts.map +1 -0
- package/build-types/palette.d.ts +6 -0
- package/build-types/palette.d.ts.map +1 -0
- package/build-types/preset-colors.d.ts +2 -0
- package/build-types/preset-colors.d.ts.map +1 -0
- package/build-types/preview-colors.d.ts +8 -0
- package/build-types/preview-colors.d.ts.map +1 -0
- package/build-types/preview-hooks.d.ts +9 -0
- package/build-types/preview-hooks.d.ts.map +1 -0
- package/build-types/preview-styles.d.ts +9 -0
- package/build-types/preview-styles.d.ts.map +1 -0
- package/build-types/preview-typography.d.ts +8 -0
- package/build-types/preview-typography.d.ts.map +1 -0
- package/build-types/preview-wrapper.d.ts +15 -0
- package/build-types/preview-wrapper.d.ts.map +1 -0
- package/build-types/provider.d.ts +15 -0
- package/build-types/provider.d.ts.map +1 -0
- package/build-types/root-menu.d.ts +3 -0
- package/build-types/root-menu.d.ts.map +1 -0
- package/build-types/screen-background.d.ts +3 -0
- package/build-types/screen-background.d.ts.map +1 -0
- package/build-types/screen-block-list.d.ts +4 -0
- package/build-types/screen-block-list.d.ts.map +1 -0
- package/build-types/screen-block.d.ts +7 -0
- package/build-types/screen-block.d.ts.map +1 -0
- package/build-types/screen-color-palette.d.ts +5 -0
- package/build-types/screen-color-palette.d.ts.map +1 -0
- package/build-types/screen-colors.d.ts +3 -0
- package/build-types/screen-colors.d.ts.map +1 -0
- package/build-types/screen-css.d.ts +3 -0
- package/build-types/screen-css.d.ts.map +1 -0
- package/build-types/screen-header.d.ts +8 -0
- package/build-types/screen-header.d.ts.map +1 -0
- package/build-types/screen-layout.d.ts +3 -0
- package/build-types/screen-layout.d.ts.map +1 -0
- package/build-types/screen-revisions/index.d.ts +6 -0
- package/build-types/screen-revisions/index.d.ts.map +1 -0
- package/build-types/screen-revisions/revisions-buttons.d.ts +23 -0
- package/build-types/screen-revisions/revisions-buttons.d.ts.map +1 -0
- package/build-types/screen-revisions/types.d.ts +17 -0
- package/build-types/screen-revisions/types.d.ts.map +1 -0
- package/build-types/screen-revisions/use-global-styles-revisions.d.ts +17 -0
- package/build-types/screen-revisions/use-global-styles-revisions.d.ts.map +1 -0
- package/build-types/screen-root.d.ts +3 -0
- package/build-types/screen-root.d.ts.map +1 -0
- package/build-types/screen-shadows.d.ts +3 -0
- package/build-types/screen-shadows.d.ts.map +1 -0
- package/build-types/screen-style-variations.d.ts +3 -0
- package/build-types/screen-style-variations.d.ts.map +1 -0
- package/build-types/screen-typography-element.d.ts +28 -0
- package/build-types/screen-typography-element.d.ts.map +1 -0
- package/build-types/screen-typography.d.ts +3 -0
- package/build-types/screen-typography.d.ts.map +1 -0
- package/build-types/shadow-utils.d.ts +126 -0
- package/build-types/shadow-utils.d.ts.map +1 -0
- package/build-types/shadows-edit-panel.d.ts +2 -0
- package/build-types/shadows-edit-panel.d.ts.map +1 -0
- package/build-types/shadows-panel.d.ts +3 -0
- package/build-types/shadows-panel.d.ts.map +1 -0
- package/build-types/size-control/index.d.ts +11 -0
- package/build-types/size-control/index.d.ts.map +1 -0
- package/build-types/stories/index.story.d.ts +6 -0
- package/build-types/stories/index.story.d.ts.map +1 -0
- package/build-types/style-variations-container.d.ts +6 -0
- package/build-types/style-variations-container.d.ts.map +1 -0
- package/build-types/style-variations-content.d.ts +2 -0
- package/build-types/style-variations-content.d.ts.map +1 -0
- package/build-types/style-variations.d.ts +25 -0
- package/build-types/style-variations.d.ts.map +1 -0
- package/build-types/subtitle.d.ts +7 -0
- package/build-types/subtitle.d.ts.map +1 -0
- package/build-types/test/shadow-utils.spec.d.ts +2 -0
- package/build-types/test/shadow-utils.spec.d.ts.map +1 -0
- package/build-types/test/utils.spec.d.ts +2 -0
- package/build-types/test/utils.spec.d.ts.map +1 -0
- package/build-types/typography-elements.d.ts +3 -0
- package/build-types/typography-elements.d.ts.map +1 -0
- package/build-types/typography-example.d.ts +7 -0
- package/build-types/typography-example.d.ts.map +1 -0
- package/build-types/typography-panel.d.ts +7 -0
- package/build-types/typography-panel.d.ts.map +1 -0
- package/build-types/typography-preview.d.ts +8 -0
- package/build-types/typography-preview.d.ts.map +1 -0
- package/build-types/typography-variations.d.ts +27 -0
- package/build-types/typography-variations.d.ts.map +1 -0
- package/build-types/utils.d.ts +63 -0
- package/build-types/utils.d.ts.map +1 -0
- package/build-types/variations/variation.d.ts +10 -0
- package/build-types/variations/variation.d.ts.map +1 -0
- package/build-types/variations/variations-color.d.ts +7 -0
- package/build-types/variations/variations-color.d.ts.map +1 -0
- package/build-types/variations/variations-panel.d.ts +13 -0
- package/build-types/variations/variations-panel.d.ts.map +1 -0
- package/build-types/variations/variations-typography.d.ts +7 -0
- package/build-types/variations/variations-typography.d.ts.map +1 -0
- package/build-types/with-global-styles-provider.d.ts +20 -0
- package/build-types/with-global-styles-provider.d.ts.map +1 -0
- package/package.json +67 -0
- package/src/README.md +99 -0
- package/src/background-panel.tsx +56 -0
- package/src/block-preview-panel.tsx +91 -0
- package/src/color-indicator-wrapper.tsx +34 -0
- package/src/color-palette-panel.tsx +111 -0
- package/src/color-preview.tsx +78 -0
- package/src/color-variations.tsx +35 -0
- package/src/confirm-reset-shadow-dialog.tsx +45 -0
- package/src/context.ts +21 -0
- package/src/dimensions-panel.tsx +85 -0
- package/src/font-families.tsx +127 -0
- package/src/font-family-item.tsx +52 -0
- package/src/font-library-modal/collection-font-variant.tsx +52 -0
- package/src/font-library-modal/context.tsx +591 -0
- package/src/font-library-modal/font-card.tsx +77 -0
- package/src/font-library-modal/font-collection.tsx +592 -0
- package/src/font-library-modal/font-demo.tsx +123 -0
- package/src/font-library-modal/google-fonts-confirm-dialog.tsx +57 -0
- package/src/font-library-modal/index.tsx +110 -0
- package/src/font-library-modal/installed-fonts.tsx +547 -0
- package/src/font-library-modal/lib/inflate.js +4112 -0
- package/src/font-library-modal/lib/lib-font.browser.d.ts +11 -0
- package/src/font-library-modal/lib/lib-font.browser.js +3861 -0
- package/src/font-library-modal/lib/unbrotli.js +2706 -0
- package/src/font-library-modal/library-font-details.tsx +46 -0
- package/src/font-library-modal/library-font-variant.tsx +67 -0
- package/src/font-library-modal/resolvers.tsx +100 -0
- package/src/font-library-modal/style.scss +222 -0
- package/src/font-library-modal/types.ts +176 -0
- package/src/font-library-modal/upload-fonts.tsx +269 -0
- package/src/font-library-modal/utils/constants.ts +23 -0
- package/src/font-library-modal/utils/filter-fonts.ts +47 -0
- package/src/font-library-modal/utils/fonts-outline.ts +33 -0
- package/src/font-library-modal/utils/index.ts +368 -0
- package/src/font-library-modal/utils/make-families-from-faces.ts +34 -0
- package/src/font-library-modal/utils/preview-styles.ts +167 -0
- package/src/font-library-modal/utils/set-immutably.ts +37 -0
- package/src/font-library-modal/utils/sort-font-faces.ts +46 -0
- package/src/font-library-modal/utils/toggleFont.ts +109 -0
- package/src/font-sizes/confirm-delete-font-size-dialog.tsx +51 -0
- package/src/font-sizes/confirm-reset-font-sizes-dialog.tsx +45 -0
- package/src/font-sizes/font-size-preview.tsx +47 -0
- package/src/font-sizes/font-size.tsx +289 -0
- package/src/font-sizes/font-sizes-count.tsx +37 -0
- package/src/font-sizes/font-sizes.tsx +265 -0
- package/src/font-sizes/rename-font-size-dialog.tsx +83 -0
- package/src/global-styles-ui.tsx +292 -0
- package/src/gradients-palette-panel.tsx +126 -0
- package/src/highlighted-colors.tsx +44 -0
- package/src/hooks.ts +251 -0
- package/src/icon-with-current-color.tsx +31 -0
- package/src/index.ts +7 -0
- package/src/lock-unlock.ts +10 -0
- package/src/navigation-button.tsx +53 -0
- package/src/pagination/index.tsx +107 -0
- package/src/pagination/style.scss +7 -0
- package/src/palette.tsx +101 -0
- package/src/preset-colors.tsx +18 -0
- package/src/preview-colors.tsx +68 -0
- package/src/preview-hooks.tsx +58 -0
- package/src/preview-styles.tsx +196 -0
- package/src/preview-typography.tsx +49 -0
- package/src/preview-wrapper.tsx +137 -0
- package/src/provider.tsx +54 -0
- package/src/root-menu.tsx +87 -0
- package/src/screen-background.tsx +37 -0
- package/src/screen-block-list.tsx +198 -0
- package/src/screen-block.tsx +370 -0
- package/src/screen-color-palette.tsx +47 -0
- package/src/screen-colors.tsx +67 -0
- package/src/screen-css.tsx +56 -0
- package/src/screen-header.tsx +56 -0
- package/src/screen-layout.tsx +34 -0
- package/src/screen-revisions/index.tsx +158 -0
- package/src/screen-revisions/revisions-buttons.tsx +259 -0
- package/src/screen-revisions/style.scss +194 -0
- package/src/screen-revisions/types.ts +18 -0
- package/src/screen-revisions/use-global-styles-revisions.tsx +204 -0
- package/src/screen-root.tsx +146 -0
- package/src/screen-shadows.tsx +13 -0
- package/src/screen-style-variations.tsx +36 -0
- package/src/screen-typography-element.tsx +127 -0
- package/src/screen-typography.tsx +41 -0
- package/src/shadow-utils.ts +167 -0
- package/src/shadows-edit-panel.tsx +559 -0
- package/src/shadows-panel.tsx +207 -0
- package/src/size-control/index.tsx +97 -0
- package/src/size-control/style.scss +7 -0
- package/src/stories/index.story.js +410 -0
- package/src/style-variations-container.tsx +153 -0
- package/src/style-variations-content.tsx +24 -0
- package/src/style-variations.tsx +33 -0
- package/src/style.scss +287 -0
- package/src/subtitle.tsx +17 -0
- package/src/test/shadow-utils.spec.js +251 -0
- package/src/test/utils.spec.js +59 -0
- package/src/typography-elements.tsx +113 -0
- package/src/typography-example.tsx +78 -0
- package/src/typography-panel.tsx +56 -0
- package/src/typography-preview.tsx +61 -0
- package/src/typography-variations.tsx +35 -0
- package/src/utils.ts +301 -0
- package/src/variations/style.scss +43 -0
- package/src/variations/variation.tsx +113 -0
- package/src/variations/variations-color.tsx +54 -0
- package/src/variations/variations-panel.tsx +79 -0
- package/src/variations/variations-typography.tsx +65 -0
- package/src/with-global-styles-provider.tsx +44 -0
- package/tsconfig.json +26 -0
- package/tsconfig.tsbuildinfo +1 -0
package/src/palette.tsx
ADDED
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* WordPress dependencies
|
|
3
|
+
*/
|
|
4
|
+
import {
|
|
5
|
+
__experimentalItemGroup as ItemGroup,
|
|
6
|
+
FlexItem,
|
|
7
|
+
__experimentalHStack as HStack,
|
|
8
|
+
__experimentalZStack as ZStack,
|
|
9
|
+
__experimentalVStack as VStack,
|
|
10
|
+
ColorIndicator,
|
|
11
|
+
} from '@wordpress/components';
|
|
12
|
+
import { isRTL, __ } from '@wordpress/i18n';
|
|
13
|
+
import { Icon, chevronLeft, chevronRight } from '@wordpress/icons';
|
|
14
|
+
import { useMemo } from '@wordpress/element';
|
|
15
|
+
import type { Color } from '@wordpress/global-styles-engine';
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Internal dependencies
|
|
19
|
+
*/
|
|
20
|
+
import { Subtitle } from './subtitle';
|
|
21
|
+
import { NavigationButtonAsItem } from './navigation-button';
|
|
22
|
+
import ColorIndicatorWrapper from './color-indicator-wrapper';
|
|
23
|
+
import { useSetting } from './hooks';
|
|
24
|
+
|
|
25
|
+
const EMPTY_COLORS: Color[] = [];
|
|
26
|
+
|
|
27
|
+
interface PaletteProps {
|
|
28
|
+
name?: string;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
function Palette( { name }: PaletteProps ) {
|
|
32
|
+
const [ customColors ] = useSetting< Color[] >( 'color.palette.custom' );
|
|
33
|
+
const [ themeColors ] = useSetting< Color[] >( 'color.palette.theme' );
|
|
34
|
+
const [ defaultColors ] = useSetting< Color[] >( 'color.palette.default' );
|
|
35
|
+
const [ defaultPaletteEnabled ] = useSetting< boolean >(
|
|
36
|
+
'color.defaultPalette',
|
|
37
|
+
name
|
|
38
|
+
);
|
|
39
|
+
|
|
40
|
+
const safeCustomColors = customColors || EMPTY_COLORS;
|
|
41
|
+
const safeThemeColors = themeColors || EMPTY_COLORS;
|
|
42
|
+
const safeDefaultColors = defaultColors || EMPTY_COLORS;
|
|
43
|
+
const safeDefaultPaletteEnabled = defaultPaletteEnabled ?? true;
|
|
44
|
+
|
|
45
|
+
const colors = useMemo(
|
|
46
|
+
() => [
|
|
47
|
+
...safeCustomColors,
|
|
48
|
+
...safeThemeColors,
|
|
49
|
+
...( safeDefaultColors && safeDefaultPaletteEnabled
|
|
50
|
+
? safeDefaultColors
|
|
51
|
+
: EMPTY_COLORS ),
|
|
52
|
+
],
|
|
53
|
+
[
|
|
54
|
+
safeCustomColors,
|
|
55
|
+
safeThemeColors,
|
|
56
|
+
safeDefaultColors,
|
|
57
|
+
safeDefaultPaletteEnabled,
|
|
58
|
+
]
|
|
59
|
+
);
|
|
60
|
+
|
|
61
|
+
const screenPath = ! name
|
|
62
|
+
? '/colors/palette'
|
|
63
|
+
: '/blocks/' + encodeURIComponent( name ) + '/colors/palette';
|
|
64
|
+
|
|
65
|
+
return (
|
|
66
|
+
<VStack spacing={ 3 }>
|
|
67
|
+
<Subtitle level={ 3 }>{ __( 'Palette' ) }</Subtitle>
|
|
68
|
+
<ItemGroup isBordered isSeparated>
|
|
69
|
+
<NavigationButtonAsItem path={ screenPath }>
|
|
70
|
+
<HStack direction="row">
|
|
71
|
+
{ colors.length > 0 ? (
|
|
72
|
+
<>
|
|
73
|
+
<ZStack isLayered={ false } offset={ -8 }>
|
|
74
|
+
{ colors
|
|
75
|
+
.slice( 0, 5 )
|
|
76
|
+
.map( ( { color }, index ) => (
|
|
77
|
+
<ColorIndicatorWrapper
|
|
78
|
+
key={ `${ color }-${ index }` }
|
|
79
|
+
>
|
|
80
|
+
<ColorIndicator
|
|
81
|
+
colorValue={ color }
|
|
82
|
+
/>
|
|
83
|
+
</ColorIndicatorWrapper>
|
|
84
|
+
) ) }
|
|
85
|
+
</ZStack>
|
|
86
|
+
<FlexItem isBlock>
|
|
87
|
+
{ __( 'Edit palette' ) }
|
|
88
|
+
</FlexItem>
|
|
89
|
+
</>
|
|
90
|
+
) : (
|
|
91
|
+
<FlexItem>{ __( 'Add colors' ) }</FlexItem>
|
|
92
|
+
) }
|
|
93
|
+
<Icon icon={ isRTL() ? chevronLeft : chevronRight } />
|
|
94
|
+
</HStack>
|
|
95
|
+
</NavigationButtonAsItem>
|
|
96
|
+
</ItemGroup>
|
|
97
|
+
</VStack>
|
|
98
|
+
);
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
export default Palette;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Internal dependencies
|
|
3
|
+
*/
|
|
4
|
+
import { useStylesPreviewColors } from './preview-hooks';
|
|
5
|
+
|
|
6
|
+
export default function PresetColors() {
|
|
7
|
+
const { paletteColors } = useStylesPreviewColors();
|
|
8
|
+
return paletteColors.slice( 0, 4 ).map( ( { slug, color }, index ) => (
|
|
9
|
+
<div
|
|
10
|
+
key={ `${ slug }-${ index }` }
|
|
11
|
+
style={ {
|
|
12
|
+
flexGrow: 1,
|
|
13
|
+
height: '100%',
|
|
14
|
+
background: color,
|
|
15
|
+
} }
|
|
16
|
+
/>
|
|
17
|
+
) );
|
|
18
|
+
}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* WordPress dependencies
|
|
3
|
+
*/
|
|
4
|
+
import {
|
|
5
|
+
__experimentalHStack as HStack,
|
|
6
|
+
__unstableMotion as motion,
|
|
7
|
+
} from '@wordpress/components';
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Internal dependencies
|
|
11
|
+
*/
|
|
12
|
+
import PresetColors from './preset-colors';
|
|
13
|
+
import PreviewWrapper from './preview-wrapper';
|
|
14
|
+
|
|
15
|
+
const firstFrameVariants = {
|
|
16
|
+
start: {
|
|
17
|
+
scale: 1,
|
|
18
|
+
opacity: 1,
|
|
19
|
+
},
|
|
20
|
+
hover: {
|
|
21
|
+
scale: 0,
|
|
22
|
+
opacity: 0,
|
|
23
|
+
},
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
interface StylesPreviewColorsProps {
|
|
27
|
+
label?: string;
|
|
28
|
+
isFocused?: boolean;
|
|
29
|
+
withHoverView?: boolean;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
const StylesPreviewColors = ( {
|
|
33
|
+
label,
|
|
34
|
+
isFocused,
|
|
35
|
+
withHoverView,
|
|
36
|
+
}: StylesPreviewColorsProps ) => {
|
|
37
|
+
return (
|
|
38
|
+
<PreviewWrapper
|
|
39
|
+
label={ label }
|
|
40
|
+
isFocused={ isFocused }
|
|
41
|
+
withHoverView={ withHoverView }
|
|
42
|
+
>
|
|
43
|
+
{ ( { key } ) => (
|
|
44
|
+
<motion.div
|
|
45
|
+
key={ key }
|
|
46
|
+
variants={ firstFrameVariants }
|
|
47
|
+
style={ {
|
|
48
|
+
height: '100%',
|
|
49
|
+
overflow: 'hidden',
|
|
50
|
+
} }
|
|
51
|
+
>
|
|
52
|
+
<HStack
|
|
53
|
+
spacing={ 0 }
|
|
54
|
+
justify="center"
|
|
55
|
+
style={ {
|
|
56
|
+
height: '100%',
|
|
57
|
+
overflow: 'hidden',
|
|
58
|
+
} }
|
|
59
|
+
>
|
|
60
|
+
<PresetColors />
|
|
61
|
+
</HStack>
|
|
62
|
+
</motion.div>
|
|
63
|
+
) }
|
|
64
|
+
</PreviewWrapper>
|
|
65
|
+
);
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
export default StylesPreviewColors;
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* WordPress dependencies
|
|
3
|
+
*/
|
|
4
|
+
import type { Color } from '@wordpress/global-styles-engine';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Internal dependencies
|
|
8
|
+
*/
|
|
9
|
+
import { useSetting, useStyle } from './hooks';
|
|
10
|
+
|
|
11
|
+
export function useStylesPreviewColors(): {
|
|
12
|
+
paletteColors: Color[];
|
|
13
|
+
highlightedColors: Color[];
|
|
14
|
+
} {
|
|
15
|
+
const [ textColor = 'black' ] = useStyle< string >( 'color.text' );
|
|
16
|
+
const [ backgroundColor = 'white' ] =
|
|
17
|
+
useStyle< string >( 'color.background' );
|
|
18
|
+
const [ headingColor = textColor ] = useStyle< string >(
|
|
19
|
+
'elements.h1.color.text'
|
|
20
|
+
);
|
|
21
|
+
const [ linkColor = headingColor ] = useStyle< string >(
|
|
22
|
+
'elements.link.color.text'
|
|
23
|
+
);
|
|
24
|
+
const [ buttonBackgroundColor = linkColor ] = useStyle< string >(
|
|
25
|
+
'elements.button.color.background'
|
|
26
|
+
);
|
|
27
|
+
|
|
28
|
+
const [ coreColors ] = useSetting< Color[] >( 'color.palette.core' ) || [];
|
|
29
|
+
const [ themeColors ] =
|
|
30
|
+
useSetting< Color[] >( 'color.palette.theme' ) || [];
|
|
31
|
+
const [ customColors ] =
|
|
32
|
+
useSetting< Color[] >( 'color.palette.custom' ) || [];
|
|
33
|
+
|
|
34
|
+
const paletteColors: Color[] = ( themeColors ?? [] )
|
|
35
|
+
.concat( customColors ?? [] )
|
|
36
|
+
.concat( coreColors ?? [] );
|
|
37
|
+
|
|
38
|
+
const textColorObject = paletteColors.filter(
|
|
39
|
+
( { color } ) => color === textColor
|
|
40
|
+
);
|
|
41
|
+
const buttonBackgroundColorObject = paletteColors.filter(
|
|
42
|
+
( { color } ) => color === buttonBackgroundColor
|
|
43
|
+
);
|
|
44
|
+
|
|
45
|
+
const highlightedColors = textColorObject
|
|
46
|
+
.concat( buttonBackgroundColorObject )
|
|
47
|
+
.concat( paletteColors )
|
|
48
|
+
.filter(
|
|
49
|
+
// we exclude these background color because it is already visible in the preview.
|
|
50
|
+
( { color } ) => color !== backgroundColor
|
|
51
|
+
)
|
|
52
|
+
.slice( 0, 2 );
|
|
53
|
+
|
|
54
|
+
return {
|
|
55
|
+
paletteColors,
|
|
56
|
+
highlightedColors,
|
|
57
|
+
};
|
|
58
|
+
}
|
|
@@ -0,0 +1,196 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* WordPress dependencies
|
|
3
|
+
*/
|
|
4
|
+
import {
|
|
5
|
+
__experimentalHStack as HStack,
|
|
6
|
+
__experimentalVStack as VStack,
|
|
7
|
+
__unstableMotion as motion,
|
|
8
|
+
} from '@wordpress/components';
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Internal dependencies
|
|
12
|
+
*/
|
|
13
|
+
import { useStyle } from './hooks';
|
|
14
|
+
import { useStylesPreviewColors } from './preview-hooks';
|
|
15
|
+
import TypographyExample from './typography-example';
|
|
16
|
+
import HighlightedColors from './highlighted-colors';
|
|
17
|
+
import PreviewWrapper from './preview-wrapper';
|
|
18
|
+
|
|
19
|
+
const firstFrameVariants = {
|
|
20
|
+
start: {
|
|
21
|
+
scale: 1,
|
|
22
|
+
opacity: 1,
|
|
23
|
+
},
|
|
24
|
+
hover: {
|
|
25
|
+
scale: 0,
|
|
26
|
+
opacity: 0,
|
|
27
|
+
},
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
const midFrameVariants = {
|
|
31
|
+
hover: {
|
|
32
|
+
opacity: 1,
|
|
33
|
+
},
|
|
34
|
+
start: {
|
|
35
|
+
opacity: 0.5,
|
|
36
|
+
},
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
const secondFrameVariants = {
|
|
40
|
+
hover: {
|
|
41
|
+
scale: 1,
|
|
42
|
+
opacity: 1,
|
|
43
|
+
},
|
|
44
|
+
start: {
|
|
45
|
+
scale: 0,
|
|
46
|
+
opacity: 0,
|
|
47
|
+
},
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
interface PreviewStylesProps {
|
|
51
|
+
label?: string;
|
|
52
|
+
isFocused?: boolean;
|
|
53
|
+
withHoverView?: boolean;
|
|
54
|
+
variation?: any;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
function PreviewStyles( {
|
|
58
|
+
label,
|
|
59
|
+
isFocused,
|
|
60
|
+
withHoverView,
|
|
61
|
+
variation,
|
|
62
|
+
}: PreviewStylesProps ) {
|
|
63
|
+
const [ fontWeight ] = useStyle< string >( 'typography.fontWeight' );
|
|
64
|
+
const [ fontFamily = 'serif' ] = useStyle< string >(
|
|
65
|
+
'typography.fontFamily'
|
|
66
|
+
);
|
|
67
|
+
const [ headingFontFamily = fontFamily ] = useStyle< string >(
|
|
68
|
+
'elements.h1.typography.fontFamily'
|
|
69
|
+
);
|
|
70
|
+
const [ headingFontWeight = fontWeight ] = useStyle< string >(
|
|
71
|
+
'elements.h1.typography.fontWeight'
|
|
72
|
+
);
|
|
73
|
+
const [ textColor = 'black' ] = useStyle< string >( 'color.text' );
|
|
74
|
+
const [ headingColor = textColor ] = useStyle< string >(
|
|
75
|
+
'elements.h1.color.text'
|
|
76
|
+
);
|
|
77
|
+
|
|
78
|
+
const { paletteColors } = useStylesPreviewColors();
|
|
79
|
+
|
|
80
|
+
return (
|
|
81
|
+
<PreviewWrapper
|
|
82
|
+
label={ label }
|
|
83
|
+
isFocused={ isFocused }
|
|
84
|
+
withHoverView={ withHoverView }
|
|
85
|
+
>
|
|
86
|
+
{ ( { ratio, key } ) => (
|
|
87
|
+
<motion.div
|
|
88
|
+
key={ key }
|
|
89
|
+
variants={ firstFrameVariants }
|
|
90
|
+
style={ {
|
|
91
|
+
height: '100%',
|
|
92
|
+
overflow: 'hidden',
|
|
93
|
+
} }
|
|
94
|
+
>
|
|
95
|
+
<HStack
|
|
96
|
+
spacing={ 10 * ratio }
|
|
97
|
+
justify="center"
|
|
98
|
+
style={ {
|
|
99
|
+
height: '100%',
|
|
100
|
+
overflow: 'hidden',
|
|
101
|
+
} }
|
|
102
|
+
>
|
|
103
|
+
<TypographyExample
|
|
104
|
+
fontSize={ 65 * ratio }
|
|
105
|
+
variation={ variation }
|
|
106
|
+
/>
|
|
107
|
+
<VStack spacing={ 4 * ratio }>
|
|
108
|
+
<HighlightedColors
|
|
109
|
+
normalizedColorSwatchSize={ 32 }
|
|
110
|
+
ratio={ ratio }
|
|
111
|
+
/>
|
|
112
|
+
</VStack>
|
|
113
|
+
</HStack>
|
|
114
|
+
</motion.div>
|
|
115
|
+
) }
|
|
116
|
+
{ ( { key } ) => (
|
|
117
|
+
<motion.div
|
|
118
|
+
key={ key }
|
|
119
|
+
variants={ withHoverView ? midFrameVariants : undefined }
|
|
120
|
+
style={ {
|
|
121
|
+
height: '100%',
|
|
122
|
+
width: '100%',
|
|
123
|
+
position: 'absolute',
|
|
124
|
+
top: 0,
|
|
125
|
+
overflow: 'hidden',
|
|
126
|
+
filter: 'blur(60px)',
|
|
127
|
+
opacity: 0.1,
|
|
128
|
+
} }
|
|
129
|
+
>
|
|
130
|
+
<HStack
|
|
131
|
+
spacing={ 0 }
|
|
132
|
+
justify="flex-start"
|
|
133
|
+
style={ {
|
|
134
|
+
height: '100%',
|
|
135
|
+
overflow: 'hidden',
|
|
136
|
+
} }
|
|
137
|
+
>
|
|
138
|
+
{ paletteColors
|
|
139
|
+
.slice( 0, 4 )
|
|
140
|
+
.map( ( { color }, index ) => (
|
|
141
|
+
<div
|
|
142
|
+
key={ index }
|
|
143
|
+
style={ {
|
|
144
|
+
height: '100%',
|
|
145
|
+
background: color,
|
|
146
|
+
flexGrow: 1,
|
|
147
|
+
} }
|
|
148
|
+
/>
|
|
149
|
+
) ) }
|
|
150
|
+
</HStack>
|
|
151
|
+
</motion.div>
|
|
152
|
+
) }
|
|
153
|
+
{ ( { ratio, key } ) => (
|
|
154
|
+
<motion.div
|
|
155
|
+
key={ key }
|
|
156
|
+
variants={ secondFrameVariants }
|
|
157
|
+
style={ {
|
|
158
|
+
height: '100%',
|
|
159
|
+
width: '100%',
|
|
160
|
+
overflow: 'hidden',
|
|
161
|
+
position: 'absolute',
|
|
162
|
+
top: 0,
|
|
163
|
+
} }
|
|
164
|
+
>
|
|
165
|
+
<VStack
|
|
166
|
+
spacing={ 3 * ratio }
|
|
167
|
+
justify="center"
|
|
168
|
+
style={ {
|
|
169
|
+
height: '100%',
|
|
170
|
+
overflow: 'hidden',
|
|
171
|
+
padding: 10 * ratio,
|
|
172
|
+
boxSizing: 'border-box',
|
|
173
|
+
} }
|
|
174
|
+
>
|
|
175
|
+
{ label && (
|
|
176
|
+
<div
|
|
177
|
+
style={ {
|
|
178
|
+
fontSize: 40 * ratio,
|
|
179
|
+
fontFamily: headingFontFamily,
|
|
180
|
+
color: headingColor,
|
|
181
|
+
fontWeight: headingFontWeight,
|
|
182
|
+
lineHeight: '1em',
|
|
183
|
+
textAlign: 'center',
|
|
184
|
+
} }
|
|
185
|
+
>
|
|
186
|
+
{ label }
|
|
187
|
+
</div>
|
|
188
|
+
) }
|
|
189
|
+
</VStack>
|
|
190
|
+
</motion.div>
|
|
191
|
+
) }
|
|
192
|
+
</PreviewWrapper>
|
|
193
|
+
);
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
export default PreviewStyles;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* WordPress dependencies
|
|
3
|
+
*/
|
|
4
|
+
import { __experimentalHStack as HStack } from '@wordpress/components';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Internal dependencies
|
|
8
|
+
*/
|
|
9
|
+
import TypographyExample from './typography-example';
|
|
10
|
+
import PreviewWrapper from './preview-wrapper';
|
|
11
|
+
|
|
12
|
+
interface StylesPreviewTypographyProps {
|
|
13
|
+
variation: any;
|
|
14
|
+
isFocused?: boolean;
|
|
15
|
+
withHoverView?: boolean;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
const StylesPreviewTypography = ( {
|
|
19
|
+
variation,
|
|
20
|
+
isFocused,
|
|
21
|
+
withHoverView,
|
|
22
|
+
}: StylesPreviewTypographyProps ) => {
|
|
23
|
+
return (
|
|
24
|
+
<PreviewWrapper
|
|
25
|
+
label={ variation.title }
|
|
26
|
+
isFocused={ isFocused }
|
|
27
|
+
withHoverView={ withHoverView }
|
|
28
|
+
>
|
|
29
|
+
{ ( { ratio, key } ) => (
|
|
30
|
+
<HStack
|
|
31
|
+
key={ key }
|
|
32
|
+
spacing={ 10 * ratio }
|
|
33
|
+
justify="center"
|
|
34
|
+
style={ {
|
|
35
|
+
height: '100%',
|
|
36
|
+
overflow: 'hidden',
|
|
37
|
+
} }
|
|
38
|
+
>
|
|
39
|
+
<TypographyExample
|
|
40
|
+
variation={ variation }
|
|
41
|
+
fontSize={ 85 * ratio }
|
|
42
|
+
/>
|
|
43
|
+
</HStack>
|
|
44
|
+
) }
|
|
45
|
+
</PreviewWrapper>
|
|
46
|
+
);
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
export default StylesPreviewTypography;
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* WordPress dependencies
|
|
3
|
+
*/
|
|
4
|
+
import { __unstableMotion as motion } from '@wordpress/components';
|
|
5
|
+
import {
|
|
6
|
+
useThrottle,
|
|
7
|
+
useReducedMotion,
|
|
8
|
+
useResizeObserver,
|
|
9
|
+
} from '@wordpress/compose';
|
|
10
|
+
import { useLayoutEffect, useState } from '@wordpress/element';
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Internal dependencies
|
|
14
|
+
*/
|
|
15
|
+
import { useStyle } from './hooks';
|
|
16
|
+
|
|
17
|
+
const normalizedWidth = 248;
|
|
18
|
+
const normalizedHeight = 152;
|
|
19
|
+
|
|
20
|
+
// Throttle options for useThrottle. Must be defined outside of the component,
|
|
21
|
+
// so that the object reference is the same on each render.
|
|
22
|
+
const THROTTLE_OPTIONS = {
|
|
23
|
+
leading: true,
|
|
24
|
+
trailing: true,
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
interface PreviewWrapperProps {
|
|
28
|
+
children:
|
|
29
|
+
| ( ( args: { ratio: number; key: number } ) => React.ReactNode )
|
|
30
|
+
| ( ( args: { ratio: number; key: number } ) => React.ReactNode )[];
|
|
31
|
+
label?: string;
|
|
32
|
+
isFocused?: boolean;
|
|
33
|
+
withHoverView?: boolean;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
function PreviewWrapper( {
|
|
37
|
+
children,
|
|
38
|
+
label,
|
|
39
|
+
isFocused,
|
|
40
|
+
withHoverView,
|
|
41
|
+
}: PreviewWrapperProps ) {
|
|
42
|
+
const [ backgroundColor = 'white' ] =
|
|
43
|
+
useStyle< string >( 'color.background' );
|
|
44
|
+
const [ gradientValue ] = useStyle< string >( 'color.gradient' );
|
|
45
|
+
const disableMotion = useReducedMotion();
|
|
46
|
+
const [ isHovered, setIsHovered ] = useState( false );
|
|
47
|
+
const [ containerResizeListener, { width } ] = useResizeObserver();
|
|
48
|
+
const [ throttledWidth, setThrottledWidthState ] = useState( width );
|
|
49
|
+
const [ ratioState, setRatioState ] = useState< number | undefined >();
|
|
50
|
+
|
|
51
|
+
const setThrottledWidth = useThrottle(
|
|
52
|
+
setThrottledWidthState,
|
|
53
|
+
250,
|
|
54
|
+
THROTTLE_OPTIONS
|
|
55
|
+
);
|
|
56
|
+
|
|
57
|
+
// Must use useLayoutEffect to avoid a flash of the container at the wrong
|
|
58
|
+
// size before the width is set.
|
|
59
|
+
useLayoutEffect( () => {
|
|
60
|
+
if ( width ) {
|
|
61
|
+
setThrottledWidth( width );
|
|
62
|
+
}
|
|
63
|
+
}, [ width, setThrottledWidth ] );
|
|
64
|
+
|
|
65
|
+
// Must use useLayoutEffect to avoid a flash of the container at the wrong
|
|
66
|
+
// size before the width is set.
|
|
67
|
+
useLayoutEffect( () => {
|
|
68
|
+
const newRatio = throttledWidth ? throttledWidth / normalizedWidth : 1;
|
|
69
|
+
const ratioDiff = newRatio - ( ratioState || 0 );
|
|
70
|
+
|
|
71
|
+
// Only update the ratio state if the difference is big enough
|
|
72
|
+
// or if the ratio state is not yet set. This is to avoid an
|
|
73
|
+
// endless loop of updates at particular viewport heights when the
|
|
74
|
+
// presence of a scrollbar causes the width to change slightly.
|
|
75
|
+
const isRatioDiffBigEnough = Math.abs( ratioDiff ) > 0.1;
|
|
76
|
+
|
|
77
|
+
if ( isRatioDiffBigEnough || ! ratioState ) {
|
|
78
|
+
setRatioState( newRatio );
|
|
79
|
+
}
|
|
80
|
+
}, [ throttledWidth, ratioState ] );
|
|
81
|
+
|
|
82
|
+
// Set a fallbackRatio to use before the throttled ratio has been set.
|
|
83
|
+
const fallbackRatio = width ? width / normalizedWidth : 1;
|
|
84
|
+
/*
|
|
85
|
+
* Use the throttled ratio if it has been calculated, otherwise
|
|
86
|
+
* use the fallback ratio. The throttled ratio is used to avoid
|
|
87
|
+
* an endless loop of updates at particular viewport heights.
|
|
88
|
+
* See: https://github.com/WordPress/gutenberg/issues/55112
|
|
89
|
+
*/
|
|
90
|
+
const ratio = ratioState ? ratioState : fallbackRatio;
|
|
91
|
+
|
|
92
|
+
const isReady = !! width;
|
|
93
|
+
|
|
94
|
+
return (
|
|
95
|
+
<>
|
|
96
|
+
<div style={ { position: 'relative' } }>
|
|
97
|
+
{ containerResizeListener }
|
|
98
|
+
</div>
|
|
99
|
+
{ isReady && (
|
|
100
|
+
<div
|
|
101
|
+
className="global-styles-ui-preview__wrapper"
|
|
102
|
+
style={ {
|
|
103
|
+
height: normalizedHeight * ratio,
|
|
104
|
+
} }
|
|
105
|
+
onMouseEnter={ () => setIsHovered( true ) }
|
|
106
|
+
onMouseLeave={ () => setIsHovered( false ) }
|
|
107
|
+
tabIndex={ -1 }
|
|
108
|
+
>
|
|
109
|
+
<motion.div
|
|
110
|
+
style={ {
|
|
111
|
+
height: normalizedHeight * ratio,
|
|
112
|
+
width: '100%',
|
|
113
|
+
background: gradientValue ?? backgroundColor,
|
|
114
|
+
cursor: withHoverView ? 'pointer' : undefined,
|
|
115
|
+
} }
|
|
116
|
+
initial="start"
|
|
117
|
+
animate={
|
|
118
|
+
( isHovered || isFocused ) &&
|
|
119
|
+
! disableMotion &&
|
|
120
|
+
label
|
|
121
|
+
? 'hover'
|
|
122
|
+
: 'start'
|
|
123
|
+
}
|
|
124
|
+
>
|
|
125
|
+
{ []
|
|
126
|
+
.concat( children as any ) // This makes sure children is always an array.
|
|
127
|
+
.map( ( child: any, key: number ) =>
|
|
128
|
+
child( { ratio, key } )
|
|
129
|
+
) }
|
|
130
|
+
</motion.div>
|
|
131
|
+
</div>
|
|
132
|
+
) }
|
|
133
|
+
</>
|
|
134
|
+
);
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
export default PreviewWrapper;
|
package/src/provider.tsx
ADDED
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* External dependencies
|
|
3
|
+
*/
|
|
4
|
+
import type { ReactNode } from 'react';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* WordPress dependencies
|
|
8
|
+
*/
|
|
9
|
+
import { useMemo } from '@wordpress/element';
|
|
10
|
+
import type { GlobalStylesConfig } from '@wordpress/global-styles-engine';
|
|
11
|
+
import { mergeGlobalStyles } from '@wordpress/global-styles-engine';
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Internal dependencies
|
|
15
|
+
*/
|
|
16
|
+
import { GlobalStylesContext } from './context';
|
|
17
|
+
|
|
18
|
+
interface GlobalStylesProviderProps {
|
|
19
|
+
children: ReactNode;
|
|
20
|
+
value: GlobalStylesConfig;
|
|
21
|
+
baseValue: GlobalStylesConfig;
|
|
22
|
+
onChange: ( newValue: GlobalStylesConfig ) => void;
|
|
23
|
+
fontLibraryEnabled?: boolean;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export function GlobalStylesProvider( {
|
|
27
|
+
children,
|
|
28
|
+
value,
|
|
29
|
+
baseValue,
|
|
30
|
+
onChange,
|
|
31
|
+
fontLibraryEnabled,
|
|
32
|
+
}: GlobalStylesProviderProps ) {
|
|
33
|
+
// Compute merged with memoization since merging can be expensive
|
|
34
|
+
const merged = useMemo( () => {
|
|
35
|
+
return mergeGlobalStyles( baseValue, value );
|
|
36
|
+
}, [ baseValue, value ] );
|
|
37
|
+
|
|
38
|
+
const contextValue = useMemo(
|
|
39
|
+
() => ( {
|
|
40
|
+
user: value,
|
|
41
|
+
base: baseValue,
|
|
42
|
+
merged,
|
|
43
|
+
onChange,
|
|
44
|
+
fontLibraryEnabled,
|
|
45
|
+
} ),
|
|
46
|
+
[ value, baseValue, merged, onChange, fontLibraryEnabled ]
|
|
47
|
+
);
|
|
48
|
+
|
|
49
|
+
return (
|
|
50
|
+
<GlobalStylesContext.Provider value={ contextValue }>
|
|
51
|
+
{ children }
|
|
52
|
+
</GlobalStylesContext.Provider>
|
|
53
|
+
);
|
|
54
|
+
}
|