@wordpress/block-library 7.10.0 → 7.11.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 +2 -0
- package/build/button/edit.js +2 -1
- package/build/button/edit.js.map +1 -1
- package/build/buttons/edit.js +1 -1
- package/build/buttons/edit.js.map +1 -1
- package/build/columns/edit.native.js +1 -1
- package/build/columns/edit.native.js.map +1 -1
- package/build/comments/edit/comments-legacy.js +73 -0
- package/build/comments/edit/comments-legacy.js.map +1 -0
- package/build/comments/{edit.js → edit/index.js} +17 -38
- package/build/comments/edit/index.js.map +1 -0
- package/build/comments/edit/placeholder.js +117 -0
- package/build/comments/edit/placeholder.js.map +1 -0
- package/build/comments/edit/template.js +39 -0
- package/build/comments/edit/template.js.map +1 -0
- package/build/comments/index.js +6 -1
- package/build/comments/index.js.map +1 -1
- package/build/comments/save.js +12 -4
- package/build/comments/save.js.map +1 -1
- package/build/cover/transforms.js +3 -2
- package/build/cover/transforms.js.map +1 -1
- package/build/embed/embed-placeholder.native.js +1 -3
- package/build/embed/embed-placeholder.native.js.map +1 -1
- package/build/gallery/edit.js +2 -2
- package/build/gallery/edit.js.map +1 -1
- package/build/gallery/use-get-media.native.js +59 -0
- package/build/gallery/use-get-media.native.js.map +1 -0
- package/build/group/index.js +1 -0
- package/build/group/index.js.map +1 -1
- package/build/group/variations.js +1 -1
- package/build/group/variations.js.map +1 -1
- package/build/image/deprecated.js +77 -9
- package/build/image/deprecated.js.map +1 -1
- package/build/image/edit.js +3 -1
- package/build/image/edit.js.map +1 -1
- package/build/image/edit.native.js +18 -8
- package/build/image/edit.native.js.map +1 -1
- package/build/image/image.js +27 -20
- package/build/image/image.js.map +1 -1
- package/build/image/index.js +7 -1
- package/build/image/index.js.map +1 -1
- package/build/image/save.js +8 -2
- package/build/image/save.js.map +1 -1
- package/build/index.js +1 -3
- package/build/index.js.map +1 -1
- package/build/index.native.js +3 -13
- package/build/index.native.js.map +1 -1
- package/build/list/transforms.js +4 -63
- package/build/list/transforms.js.map +1 -1
- package/build/list/v2/transforms.js +0 -27
- package/build/list/v2/transforms.js.map +1 -1
- package/build/list-item/edit.js +14 -9
- package/build/list-item/edit.js.map +1 -1
- package/build/list-item/hooks/index.js +8 -8
- package/build/list-item/hooks/index.js.map +1 -1
- package/build/list-item/hooks/use-merge.js +174 -0
- package/build/list-item/hooks/use-merge.js.map +1 -0
- package/build/list-item/hooks/use-outdent-list-item.js +86 -50
- package/build/list-item/hooks/use-outdent-list-item.js.map +1 -1
- package/build/list-item/utils.js +125 -1
- package/build/list-item/utils.js.map +1 -1
- package/build/media-text/deprecated.js +134 -7
- package/build/media-text/deprecated.js.map +1 -1
- package/build/media-text/edit.js +2 -2
- package/build/media-text/edit.js.map +1 -1
- package/build/media-text/save.js +13 -0
- package/build/media-text/save.js.map +1 -1
- package/build/more/save.js +1 -7
- package/build/more/save.js.map +1 -1
- package/build/navigation-link/edit.js +5 -4
- package/build/navigation-link/edit.js.map +1 -1
- package/build/navigation-submenu/edit.js +2 -1
- package/build/navigation-submenu/edit.js.map +1 -1
- package/build/page-list/edit.js +8 -1
- package/build/page-list/edit.js.map +1 -1
- package/build/paragraph/edit.js +7 -11
- package/build/paragraph/edit.js.map +1 -1
- package/build/post-comments-form/edit.js +4 -45
- package/build/post-comments-form/edit.js.map +1 -1
- package/build/post-comments-form/form.js +47 -3
- package/build/post-comments-form/form.js.map +1 -1
- package/build/post-terms/edit.js +3 -2
- package/build/post-terms/edit.js.map +1 -1
- package/build/query-no-results/edit.js +1 -1
- package/build/query-no-results/edit.js.map +1 -1
- package/build/query-pagination-next/edit.js +2 -1
- package/build/query-pagination-next/edit.js.map +1 -1
- package/build/query-pagination-previous/edit.js +2 -1
- package/build/query-pagination-previous/edit.js.map +1 -1
- package/build/quote/deprecated.js +168 -36
- package/build/quote/deprecated.js.map +1 -1
- package/build/quote/edit.js +76 -39
- package/build/quote/edit.js.map +1 -1
- package/build/quote/index.js +9 -45
- package/build/quote/index.js.map +1 -1
- package/build/quote/save.js +1 -5
- package/build/quote/save.js.map +1 -1
- package/build/quote/transforms.js +110 -158
- package/build/quote/transforms.js.map +1 -1
- package/build/social-link/icons/index.js +13 -0
- package/build/social-link/icons/index.js.map +1 -1
- package/build/social-link/icons/whatsapp.js +25 -0
- package/build/social-link/icons/whatsapp.js.map +1 -0
- package/build/social-link/variations.js +7 -0
- package/build/social-link/variations.js.map +1 -1
- package/build/template-part/edit/index.js +17 -8
- package/build/template-part/edit/index.js.map +1 -1
- package/build/template-part/edit/selection-modal.js +33 -13
- package/build/template-part/edit/selection-modal.js.map +1 -1
- package/build/template-part/edit/utils/search.js +94 -0
- package/build/template-part/edit/utils/search.js.map +1 -0
- package/build-module/button/edit.js +2 -1
- package/build-module/button/edit.js.map +1 -1
- package/build-module/buttons/edit.js +2 -2
- package/build-module/buttons/edit.js.map +1 -1
- package/build-module/columns/edit.native.js +2 -2
- package/build-module/columns/edit.native.js.map +1 -1
- package/build-module/comments/edit/comments-legacy.js +59 -0
- package/build-module/comments/edit/comments-legacy.js.map +1 -0
- package/build-module/comments/edit/index.js +37 -0
- package/build-module/comments/edit/index.js.map +1 -0
- package/build-module/comments/edit/placeholder.js +102 -0
- package/build-module/comments/edit/placeholder.js.map +1 -0
- package/build-module/comments/edit/template.js +32 -0
- package/build-module/comments/edit/template.js.map +1 -0
- package/build-module/comments/index.js +6 -1
- package/build-module/comments/index.js.map +1 -1
- package/build-module/comments/save.js +9 -4
- package/build-module/comments/save.js.map +1 -1
- package/build-module/cover/transforms.js +3 -2
- package/build-module/cover/transforms.js.map +1 -1
- package/build-module/embed/embed-placeholder.native.js +1 -2
- package/build-module/embed/embed-placeholder.native.js.map +1 -1
- package/build-module/gallery/edit.js +2 -2
- package/build-module/gallery/edit.js.map +1 -1
- package/build-module/gallery/use-get-media.native.js +50 -0
- package/build-module/gallery/use-get-media.native.js.map +1 -0
- package/build-module/group/index.js +1 -0
- package/build-module/group/index.js.map +1 -1
- package/build-module/group/variations.js +2 -2
- package/build-module/group/variations.js.map +1 -1
- package/build-module/image/deprecated.js +77 -9
- package/build-module/image/deprecated.js.map +1 -1
- package/build-module/image/edit.js +5 -3
- package/build-module/image/edit.js.map +1 -1
- package/build-module/image/edit.native.js +18 -8
- package/build-module/image/edit.native.js.map +1 -1
- package/build-module/image/image.js +29 -22
- package/build-module/image/image.js.map +1 -1
- package/build-module/image/index.js +7 -1
- package/build-module/image/index.js.map +1 -1
- package/build-module/image/save.js +9 -3
- package/build-module/image/save.js.map +1 -1
- package/build-module/index.js +1 -2
- package/build-module/index.js.map +1 -1
- package/build-module/index.native.js +3 -13
- package/build-module/index.native.js.map +1 -1
- package/build-module/list/transforms.js +4 -63
- package/build-module/list/transforms.js.map +1 -1
- package/build-module/list/v2/transforms.js +2 -29
- package/build-module/list/v2/transforms.js.map +1 -1
- package/build-module/list-item/edit.js +14 -10
- package/build-module/list-item/edit.js.map +1 -1
- package/build-module/list-item/hooks/index.js +1 -1
- package/build-module/list-item/hooks/index.js.map +1 -1
- package/build-module/list-item/hooks/use-merge.js +160 -0
- package/build-module/list-item/hooks/use-merge.js.map +1 -0
- package/build-module/list-item/hooks/use-outdent-list-item.js +82 -46
- package/build-module/list-item/hooks/use-outdent-list-item.js.map +1 -1
- package/build-module/list-item/utils.js +123 -2
- package/build-module/list-item/utils.js.map +1 -1
- package/build-module/media-text/deprecated.js +134 -8
- package/build-module/media-text/deprecated.js.map +1 -1
- package/build-module/media-text/edit.js +2 -2
- package/build-module/media-text/edit.js.map +1 -1
- package/build-module/media-text/save.js +13 -0
- package/build-module/media-text/save.js.map +1 -1
- package/build-module/more/save.js +1 -6
- package/build-module/more/save.js.map +1 -1
- package/build-module/navigation-link/edit.js +5 -4
- package/build-module/navigation-link/edit.js.map +1 -1
- package/build-module/navigation-submenu/edit.js +2 -1
- package/build-module/navigation-submenu/edit.js.map +1 -1
- package/build-module/page-list/edit.js +8 -1
- package/build-module/page-list/edit.js.map +1 -1
- package/build-module/paragraph/edit.js +8 -12
- package/build-module/paragraph/edit.js.map +1 -1
- package/build-module/post-comments-form/edit.js +5 -42
- package/build-module/post-comments-form/edit.js.map +1 -1
- package/build-module/post-comments-form/form.js +46 -5
- package/build-module/post-comments-form/form.js.map +1 -1
- package/build-module/post-terms/edit.js +3 -2
- package/build-module/post-terms/edit.js.map +1 -1
- package/build-module/query-no-results/edit.js +2 -2
- package/build-module/query-no-results/edit.js.map +1 -1
- package/build-module/query-pagination-next/edit.js +2 -1
- package/build-module/query-pagination-next/edit.js.map +1 -1
- package/build-module/query-pagination-previous/edit.js +2 -1
- package/build-module/query-pagination-previous/edit.js.map +1 -1
- package/build-module/quote/deprecated.js +162 -36
- package/build-module/quote/deprecated.js.map +1 -1
- package/build-module/quote/edit.js +77 -43
- package/build-module/quote/edit.js.map +1 -1
- package/build-module/quote/index.js +9 -39
- package/build-module/quote/index.js.map +1 -1
- package/build-module/quote/save.js +4 -8
- package/build-module/quote/save.js.map +1 -1
- package/build-module/quote/transforms.js +111 -158
- package/build-module/quote/transforms.js.map +1 -1
- package/build-module/social-link/icons/index.js +1 -0
- package/build-module/social-link/icons/index.js.map +1 -1
- package/build-module/social-link/icons/whatsapp.js +15 -0
- package/build-module/social-link/icons/whatsapp.js.map +1 -0
- package/build-module/social-link/variations.js +8 -1
- package/build-module/social-link/variations.js.map +1 -1
- package/build-module/template-part/edit/index.js +20 -11
- package/build-module/template-part/edit/index.js.map +1 -1
- package/build-module/template-part/edit/selection-modal.js +33 -15
- package/build-module/template-part/edit/selection-modal.js.map +1 -1
- package/build-module/template-part/edit/utils/search.js +84 -0
- package/build-module/template-part/edit/utils/search.js.map +1 -0
- package/build-style/button/style-rtl.css +1 -1
- package/build-style/button/style.css +1 -1
- package/build-style/comments/editor-rtl.css +122 -0
- package/build-style/comments/editor.css +122 -0
- package/build-style/{post-comments → comments}/style-rtl.css +1 -0
- package/build-style/{post-comments → comments}/style.css +1 -0
- package/build-style/common-rtl.css +7 -0
- package/build-style/common.css +7 -0
- package/build-style/cover/style-rtl.css +2 -2
- package/build-style/cover/style.css +2 -2
- package/build-style/{post-comments/editor.css → editor-elements-rtl.css} +8 -2
- package/build-style/{post-comments/editor-rtl.css → editor-elements.css} +8 -2
- package/build-style/editor-rtl.css +151 -10
- package/build-style/editor.css +151 -10
- package/build-style/gallery/style-rtl.css +7 -2
- package/build-style/gallery/style.css +7 -2
- package/build-style/image/editor-rtl.css +4 -3
- package/build-style/image/editor.css +4 -3
- package/build-style/image/style-rtl.css +33 -3
- package/build-style/image/style.css +33 -3
- package/build-style/post-comments-form/style-rtl.css +0 -1
- package/build-style/post-comments-form/style.css +0 -1
- package/build-style/social-link/editor-rtl.css +1 -0
- package/build-style/social-link/editor.css +1 -0
- package/build-style/social-links/style-rtl.css +8 -0
- package/build-style/social-links/style.css +8 -0
- package/build-style/style-rtl.css +170 -127
- package/build-style/style.css +170 -127
- package/build-style/template-part/editor-rtl.css +14 -3
- package/build-style/template-part/editor.css +14 -3
- package/package.json +28 -28
- package/src/button/edit.js +1 -0
- package/src/button/style.scss +3 -1
- package/src/buttons/edit.js +1 -5
- package/src/columns/edit.native.js +2 -2
- package/src/comments/block.json +6 -1
- package/src/comments/edit/comments-legacy.js +71 -0
- package/src/comments/edit/index.js +35 -0
- package/src/comments/edit/placeholder.js +124 -0
- package/src/comments/{edit.js → edit/template.js} +1 -28
- package/src/comments/editor.scss +9 -0
- package/src/comments/index.php +219 -0
- package/src/comments/save.js +8 -7
- package/src/{post-comments → comments}/style.scss +7 -0
- package/src/common.scss +2 -0
- package/src/cover/style.scss +2 -2
- package/src/cover/transforms.js +2 -2
- package/src/editor-elements.scss +10 -0
- package/src/editor.scss +2 -1
- package/src/embed/embed-placeholder.native.js +2 -3
- package/src/gallery/edit.js +4 -2
- package/src/gallery/style.scss +10 -1
- package/src/gallery/use-get-media.native.js +44 -0
- package/src/group/block.json +1 -0
- package/src/group/variations.js +2 -2
- package/src/image/block.json +7 -1
- package/src/image/deprecated.js +86 -0
- package/src/image/edit.js +6 -1
- package/src/image/edit.native.js +18 -7
- package/src/image/editor.scss +9 -4
- package/src/image/image.js +26 -16
- package/src/image/save.js +10 -1
- package/src/image/style.scss +39 -3
- package/src/index.js +0 -2
- package/src/index.native.js +2 -11
- package/src/list/transforms.js +0 -47
- package/src/list/v2/transforms.js +2 -40
- package/src/list-item/edit.js +10 -12
- package/src/list-item/hooks/index.js +1 -1
- package/src/list-item/hooks/use-merge.js +141 -0
- package/src/list-item/hooks/use-outdent-list-item.js +72 -74
- package/src/list-item/utils.js +27 -3
- package/src/media-text/deprecated.js +148 -1
- package/src/media-text/edit.js +2 -1
- package/src/media-text/save.js +18 -0
- package/src/more/save.js +3 -6
- package/src/navigation-link/edit.js +4 -3
- package/src/navigation-submenu/edit.js +1 -0
- package/src/page-list/edit.js +9 -0
- package/src/paragraph/edit.js +8 -14
- package/src/post-comments-form/edit.js +2 -71
- package/src/post-comments-form/form.js +80 -5
- package/src/post-comments-form/index.php +1 -1
- package/src/post-comments-form/style.scss +0 -1
- package/src/post-terms/edit.js +3 -2
- package/src/query-no-results/edit.js +2 -5
- package/src/query-pagination-next/edit.js +1 -0
- package/src/query-pagination-previous/edit.js +1 -0
- package/src/quote/deprecated.js +213 -99
- package/src/quote/edit.js +77 -52
- package/src/quote/index.js +10 -33
- package/src/quote/save.js +5 -5
- package/src/quote/{v2/test → test}/migrate.js +2 -7
- package/src/quote/transforms.js +117 -147
- package/src/social-link/editor.scss +3 -0
- package/src/social-link/icons/index.js +1 -0
- package/src/social-link/icons/whatsapp.js +10 -0
- package/src/social-link/index.php +4 -0
- package/src/social-link/socials-with-bg.scss +5 -0
- package/src/social-link/socials-without-bg.scss +5 -0
- package/src/social-link/variations.js +7 -0
- package/src/style.scss +1 -2
- package/src/template-part/edit/index.js +37 -24
- package/src/template-part/edit/selection-modal.js +68 -40
- package/src/template-part/edit/utils/search.js +76 -0
- package/src/template-part/editor.scss +21 -9
- package/src/template-part/index.php +56 -2
- package/build/comments/edit.js.map +0 -1
- package/build/list-item/hooks/use-backspace.js +0 -59
- package/build/list-item/hooks/use-backspace.js.map +0 -1
- package/build/post-comments/edit.js +0 -184
- package/build/post-comments/edit.js.map +0 -1
- package/build/post-comments/index.js +0 -72
- package/build/post-comments/index.js.map +0 -1
- package/build/quote/v2/deprecated.js +0 -133
- package/build/quote/v2/deprecated.js.map +0 -1
- package/build/quote/v2/edit.js +0 -139
- package/build/quote/v2/edit.js.map +0 -1
- package/build/quote/v2/index.js +0 -49
- package/build/quote/v2/index.js.map +0 -1
- package/build/quote/v2/save.js +0 -43
- package/build/quote/v2/save.js.map +0 -1
- package/build/quote/v2/transforms.js +0 -156
- package/build/quote/v2/transforms.js.map +0 -1
- package/build-module/comments/edit.js +0 -59
- package/build-module/comments/edit.js.map +0 -1
- package/build-module/list-item/hooks/use-backspace.js +0 -44
- package/build-module/list-item/hooks/use-backspace.js.map +0 -1
- package/build-module/post-comments/edit.js +0 -171
- package/build-module/post-comments/edit.js.map +0 -1
- package/build-module/post-comments/index.js +0 -59
- package/build-module/post-comments/index.js.map +0 -1
- package/build-module/quote/v2/deprecated.js +0 -116
- package/build-module/quote/v2/deprecated.js.map +0 -1
- package/build-module/quote/v2/edit.js +0 -122
- package/build-module/quote/v2/edit.js.map +0 -1
- package/build-module/quote/v2/index.js +0 -33
- package/build-module/quote/v2/index.js.map +0 -1
- package/build-module/quote/v2/save.js +0 -30
- package/build-module/quote/v2/save.js.map +0 -1
- package/build-module/quote/v2/transforms.js +0 -147
- package/build-module/quote/v2/transforms.js.map +0 -1
- package/src/list-item/hooks/use-backspace.js +0 -51
- package/src/post-comments/block.json +0 -45
- package/src/post-comments/edit.js +0 -247
- package/src/post-comments/editor.scss +0 -3
- package/src/post-comments/index.js +0 -18
- package/src/post-comments/index.php +0 -87
- package/src/quote/v2/deprecated.js +0 -107
- package/src/quote/v2/edit.js +0 -139
- package/src/quote/v2/index.js +0 -36
- package/src/quote/v2/save.js +0 -26
- package/src/quote/v2/transforms.js +0 -155
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["@wordpress/block-library/src/quote/edit.js"],"names":["
|
|
1
|
+
{"version":3,"sources":["@wordpress/block-library/src/quote/edit.js"],"names":["classNames","__","AlignmentControl","BlockControls","RichText","useBlockProps","useInnerBlocksProps","store","blockEditorStore","BlockQuotation","useDispatch","useSelect","useRegistry","createBlock","getDefaultBlockName","Platform","useEffect","deprecated","migrateToQuoteV2","isWebPlatform","OS","TEMPLATE","useMigrateOnLoad","attributes","clientId","registry","updateBlockAttributes","replaceInnerBlocks","value","newAttributes","newInnerBlocks","since","version","alternative","batch","QuoteEdit","setAttributes","insertBlocksAfter","className","style","align","citation","hasSelection","select","isBlockSelected","hasSelectedInnerBlock","blockProps","innerBlocksProps","template","templateInsertUpdatesSelection","nextAlign","children","isEmpty","undefined","display","nextCitation","textAlign"],"mappings":";;;AAAA;AACA;AACA;AACA,OAAOA,UAAP,MAAuB,YAAvB;AAEA;AACA;AACA;;AACA,SAASC,EAAT,QAAmB,iBAAnB;AACA,SACCC,gBADD,EAECC,aAFD,EAGCC,QAHD,EAICC,aAJD,EAKCC,mBALD,EAMCC,KAAK,IAAIC,gBANV,QAOO,yBAPP;AAQA,SAASC,cAAT,QAA+B,uBAA/B;AACA,SAASC,WAAT,EAAsBC,SAAtB,EAAiCC,WAAjC,QAAoD,iBAApD;AACA,SAASC,WAAT,EAAsBC,mBAAtB,QAAiD,mBAAjD;AACA,SAASC,QAAT,EAAmBC,SAAnB,QAAoC,oBAApC;AACA,OAAOC,UAAP,MAAuB,uBAAvB;AAEA;AACA;AACA;;AACA,SAASC,gBAAT,QAAiC,cAAjC;AAEA,MAAMC,aAAa,GAAGJ,QAAQ,CAACK,EAAT,KAAgB,KAAtC;AAEA,MAAMC,QAAQ,GAAG,CAAE,CAAE,gBAAF,EAAoB,EAApB,CAAF,CAAjB;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA,MAAMC,gBAAgB,GAAG,CA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B;AAYC,IAAA,WAAW,EACV;AACA;AACAA,IAAAA,EAAE,CAAE,cAAF,CAfJ;AAiBC,IAAA,SAAS,EAAC,0BAjBX;AAkBC,IAAA,sBAAsB,EAAG,MACxBoC,iBAAiB,CAChBxB,WAAW,CAAEC,mBAAmB,EAArB,CADK;AAnBnB,KAuBQ,CAAEK,aAAF,GAAkB;AAAEqC,IAAAA,SAAS,EAAEhB;AAAb,GAAlB,GAAyC,EAvBjD,EAHF,CATD,CADD;AA0CA","sourcesContent":["/**\n * External dependencies\n */\nimport classNames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport {\n\tAlignmentControl,\n\tBlockControls,\n\tRichText,\n\tuseBlockProps,\n\tuseInnerBlocksProps,\n\tstore as blockEditorStore,\n} from '@wordpress/block-editor';\nimport { BlockQuotation } from '@wordpress/components';\nimport { useDispatch, useSelect, useRegistry } from '@wordpress/data';\nimport { createBlock, getDefaultBlockName } from '@wordpress/blocks';\nimport { Platform, useEffect } from '@wordpress/element';\nimport deprecated from '@wordpress/deprecated';\n\n/**\n * Internal dependencies\n */\nimport { migrateToQuoteV2 } from './deprecated';\n\nconst isWebPlatform = Platform.OS === 'web';\n\nconst TEMPLATE = [ [ 'core/paragraph', {} ] ];\n\n/**\n * At the moment, deprecations don't handle create blocks from attributes\n * (like when using CPT templates). For this reason, this hook is necessary\n * to avoid breaking templates using the old quote block format.\n *\n * @param {Object} attributes Block attributes.\n * @param {string} clientId Block client ID.\n */\nconst useMigrateOnLoad = ( attributes, clientId ) => {\n\tconst registry = useRegistry();\n\tconst { updateBlockAttributes, replaceInnerBlocks } =\n\t\tuseDispatch( blockEditorStore );\n\tuseEffect( () => {\n\t\t// As soon as the block is loaded, migrate it to the new version.\n\n\t\tif ( ! attributes.value ) {\n\t\t\t// No need to migrate if it doesn't have the value attribute.\n\t\t\treturn;\n\t\t}\n\n\t\tconst [ newAttributes, newInnerBlocks ] =\n\t\t\tmigrateToQuoteV2( attributes );\n\n\t\tdeprecated( 'Value attribute on the quote block', {\n\t\t\tsince: '6.0',\n\t\t\tversion: '6.5',\n\t\t\talternative: 'inner blocks',\n\t\t} );\n\n\t\tregistry.batch( () => {\n\t\t\tupdateBlockAttributes( clientId, newAttributes );\n\t\t\treplaceInnerBlocks( clientId, newInnerBlocks );\n\t\t} );\n\t}, [ attributes.value ] );\n};\n\nexport default function QuoteEdit( {\n\tattributes,\n\tsetAttributes,\n\tinsertBlocksAfter,\n\tclientId,\n\tclassName,\n\tstyle,\n} ) {\n\tconst { align, citation } = attributes;\n\n\tuseMigrateOnLoad( attributes, clientId );\n\n\tconst hasSelection = useSelect( ( select ) => {\n\t\tconst { isBlockSelected, hasSelectedInnerBlock } =\n\t\t\tselect( blockEditorStore );\n\t\treturn hasSelectedInnerBlock( clientId ) || isBlockSelected( clientId );\n\t}, [] );\n\n\tconst blockProps = useBlockProps( {\n\t\tclassName: classNames( className, {\n\t\t\t[ `has-text-align-${ align }` ]: align,\n\t\t} ),\n\t\t...( ! isWebPlatform && { style } ),\n\t} );\n\tconst innerBlocksProps = useInnerBlocksProps( blockProps, {\n\t\ttemplate: TEMPLATE,\n\t\ttemplateInsertUpdatesSelection: true,\n\t} );\n\n\treturn (\n\t\t<>\n\t\t\t<BlockControls group=\"block\">\n\t\t\t\t<AlignmentControl\n\t\t\t\t\tvalue={ align }\n\t\t\t\t\tonChange={ ( nextAlign ) => {\n\t\t\t\t\t\tsetAttributes( { align: nextAlign } );\n\t\t\t\t\t} }\n\t\t\t\t/>\n\t\t\t</BlockControls>\n\t\t\t<BlockQuotation { ...innerBlocksProps }>\n\t\t\t\t{ innerBlocksProps.children }\n\t\t\t\t{ ( ! RichText.isEmpty( citation ) || hasSelection ) && (\n\t\t\t\t\t<RichText\n\t\t\t\t\t\tidentifier=\"citation\"\n\t\t\t\t\t\ttagName={ isWebPlatform ? 'cite' : undefined }\n\t\t\t\t\t\tstyle={ { display: 'block' } }\n\t\t\t\t\t\tvalue={ citation }\n\t\t\t\t\t\tonChange={ ( nextCitation ) => {\n\t\t\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t\t\tcitation: nextCitation,\n\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t} }\n\t\t\t\t\t\t__unstableMobileNoFocusOnMount\n\t\t\t\t\t\taria-label={ __( 'Quote citation' ) }\n\t\t\t\t\t\tplaceholder={\n\t\t\t\t\t\t\t// translators: placeholder text used for the\n\t\t\t\t\t\t\t// citation\n\t\t\t\t\t\t\t__( 'Add citation' )\n\t\t\t\t\t\t}\n\t\t\t\t\t\tclassName=\"wp-block-quote__citation\"\n\t\t\t\t\t\t__unstableOnSplitAtEnd={ () =>\n\t\t\t\t\t\t\tinsertBlocksAfter(\n\t\t\t\t\t\t\t\tcreateBlock( getDefaultBlockName() )\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t}\n\t\t\t\t\t\t{ ...( ! isWebPlatform ? { textAlign: align } : {} ) }\n\t\t\t\t\t/>\n\t\t\t\t) }\n\t\t\t</BlockQuotation>\n\t\t</>\n\t);\n}\n"]}
|
|
@@ -76,56 +76,26 @@ const metadata = {
|
|
|
76
76
|
};
|
|
77
77
|
import save from './save';
|
|
78
78
|
import transforms from './transforms';
|
|
79
|
-
import settingsV2 from './v2';
|
|
80
79
|
const {
|
|
81
80
|
name
|
|
82
81
|
} = metadata;
|
|
83
|
-
export { metadata, name
|
|
84
|
-
export const
|
|
82
|
+
export { metadata, name };
|
|
83
|
+
export const settings = {
|
|
85
84
|
icon,
|
|
86
85
|
example: {
|
|
87
86
|
attributes: {
|
|
88
|
-
value: '<p>' + __('In quoting others, we cite ourselves.') + '</p>',
|
|
89
87
|
citation: 'Julio Cortázar'
|
|
90
|
-
}
|
|
88
|
+
},
|
|
89
|
+
innerBlocks: [{
|
|
90
|
+
name: 'core/paragraph',
|
|
91
|
+
attributes: {
|
|
92
|
+
content: __('In quoting others, we cite ourselves.')
|
|
93
|
+
}
|
|
94
|
+
}]
|
|
91
95
|
},
|
|
92
96
|
transforms,
|
|
93
97
|
edit,
|
|
94
98
|
save,
|
|
95
|
-
|
|
96
|
-
merge(attributes, _ref) {
|
|
97
|
-
let {
|
|
98
|
-
value,
|
|
99
|
-
citation
|
|
100
|
-
} = _ref;
|
|
101
|
-
|
|
102
|
-
// Quote citations cannot be merged. Pick the second one unless it's
|
|
103
|
-
// empty.
|
|
104
|
-
if (!citation) {
|
|
105
|
-
citation = attributes.citation;
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
if (!value || value === '<p></p>') {
|
|
109
|
-
return { ...attributes,
|
|
110
|
-
citation
|
|
111
|
-
};
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
return { ...attributes,
|
|
115
|
-
value: attributes.value + value,
|
|
116
|
-
citation
|
|
117
|
-
};
|
|
118
|
-
},
|
|
119
|
-
|
|
120
99
|
deprecated
|
|
121
100
|
};
|
|
122
|
-
let settings = settingsV1;
|
|
123
|
-
|
|
124
|
-
if (process.env.IS_GUTENBERG_PLUGIN) {
|
|
125
|
-
var _window;
|
|
126
|
-
|
|
127
|
-
settings = (_window = window) !== null && _window !== void 0 && _window.__experimentalEnableQuoteBlockV2 ? settingsV2 : settingsV1;
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
export { settings };
|
|
131
101
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["@wordpress/block-library/src/quote/index.js"],"names":["__","quote","icon","deprecated","edit","save","transforms","
|
|
1
|
+
{"version":3,"sources":["@wordpress/block-library/src/quote/index.js"],"names":["__","quote","icon","deprecated","edit","save","transforms","name","metadata","settings","example","attributes","citation","innerBlocks","content"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,EAAT,QAAmB,iBAAnB;AACA,SAASC,KAAK,IAAIC,IAAlB,QAA8B,kBAA9B;AAEA;AACA;AACA;;AACA,OAAOC,UAAP,MAAuB,cAAvB;AACA,OAAOC,IAAP,MAAiB,QAAjB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,OAAOC,IAAP,MAAiB,QAAjB;AACA,OAAOC,UAAP,MAAuB,cAAvB;AAEA,MAAM;AAAEC,EAAAA;AAAF,IAAWC,QAAjB;AAEA,SAASA,QAAT,EAAmBD,IAAnB;AAEA,OAAO,MAAME,QAAQ,GAAG;AACvBP,EAAAA,IADuB;AAEvBQ,EAAAA,OAAO,EAAE;AACRC,IAAAA,UAAU,EAAE;AACXC,MAAAA,QAAQ,EAAE;AADC,KADJ;AAIRC,IAAAA,WAAW,EAAE,CACZ;AACCN,MAAAA,IAAI,EAAE,gBADP;AAECI,MAAAA,UAAU,EAAE;AACXG,QAAAA,OAAO,EAAEd,EAAE,CAAE,uCAAF;AADA;AAFb,KADY;AAJL,GAFc;AAevBM,EAAAA,UAfuB;AAgBvBF,EAAAA,IAhBuB;AAiBvBC,EAAAA,IAjBuB;AAkBvBF,EAAAA;AAlBuB,CAAjB","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { quote as icon } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport deprecated from './deprecated';\nimport edit from './edit';\nimport metadata from './block.json';\nimport save from './save';\nimport transforms from './transforms';\n\nconst { name } = metadata;\n\nexport { metadata, name };\n\nexport const settings = {\n\ticon,\n\texample: {\n\t\tattributes: {\n\t\t\tcitation: 'Julio Cortázar',\n\t\t},\n\t\tinnerBlocks: [\n\t\t\t{\n\t\t\t\tname: 'core/paragraph',\n\t\t\t\tattributes: {\n\t\t\t\t\tcontent: __( 'In quoting others, we cite ourselves.' ),\n\t\t\t\t},\n\t\t\t},\n\t\t],\n\t},\n\ttransforms,\n\tedit,\n\tsave,\n\tdeprecated,\n};\n"]}
|
|
@@ -3,30 +3,26 @@ import { createElement } from "@wordpress/element";
|
|
|
3
3
|
/**
|
|
4
4
|
* External dependencies
|
|
5
5
|
*/
|
|
6
|
-
import
|
|
6
|
+
import classNames from 'classnames';
|
|
7
7
|
/**
|
|
8
8
|
* WordPress dependencies
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
|
-
import { RichText, useBlockProps } from '@wordpress/block-editor';
|
|
11
|
+
import { InnerBlocks, RichText, useBlockProps } from '@wordpress/block-editor';
|
|
12
12
|
export default function save(_ref) {
|
|
13
13
|
let {
|
|
14
14
|
attributes
|
|
15
15
|
} = _ref;
|
|
16
16
|
const {
|
|
17
17
|
align,
|
|
18
|
-
value,
|
|
19
18
|
citation
|
|
20
19
|
} = attributes;
|
|
21
|
-
const className =
|
|
20
|
+
const className = classNames({
|
|
22
21
|
[`has-text-align-${align}`]: align
|
|
23
22
|
});
|
|
24
23
|
return createElement("blockquote", useBlockProps.save({
|
|
25
24
|
className
|
|
26
|
-
}), createElement(RichText.Content, {
|
|
27
|
-
multiline: true,
|
|
28
|
-
value: value
|
|
29
|
-
}), !RichText.isEmpty(citation) && createElement(RichText.Content, {
|
|
25
|
+
}), createElement(InnerBlocks.Content, null), !RichText.isEmpty(citation) && createElement(RichText.Content, {
|
|
30
26
|
tagName: "cite",
|
|
31
27
|
value: citation
|
|
32
28
|
}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["@wordpress/block-library/src/quote/save.js"],"names":["
|
|
1
|
+
{"version":3,"sources":["@wordpress/block-library/src/quote/save.js"],"names":["classNames","InnerBlocks","RichText","useBlockProps","save","attributes","align","citation","className","isEmpty"],"mappings":";;AAAA;AACA;AACA;AACA,OAAOA,UAAP,MAAuB,YAAvB;AAEA;AACA;AACA;;AACA,SAASC,WAAT,EAAsBC,QAAtB,EAAgCC,aAAhC,QAAqD,yBAArD;AAEA,eAAe,SAASC,IAAT,OAAgC;AAAA,MAAjB;AAAEC,IAAAA;AAAF,GAAiB;AAC9C,QAAM;AAAEC,IAAAA,KAAF;AAASC,IAAAA;AAAT,MAAsBF,UAA5B;AAEA,QAAMG,SAAS,GAAGR,UAAU,CAAE;AAC7B,KAAG,kBAAkBM,KAAO,EAA5B,GAAiCA;AADJ,GAAF,CAA5B;AAIA,SACC,4BAAiBH,aAAa,CAACC,IAAd,CAAoB;AAAEI,IAAAA;AAAF,GAApB,CAAjB,EACC,cAAC,WAAD,CAAa,OAAb,OADD,EAEG,CAAEN,QAAQ,CAACO,OAAT,CAAkBF,QAAlB,CAAF,IACD,cAAC,QAAD,CAAU,OAAV;AAAkB,IAAA,OAAO,EAAC,MAA1B;AAAiC,IAAA,KAAK,EAAGA;AAAzC,IAHF,CADD;AAQA","sourcesContent":["/**\n * External dependencies\n */\nimport classNames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { InnerBlocks, RichText, useBlockProps } from '@wordpress/block-editor';\n\nexport default function save( { attributes } ) {\n\tconst { align, citation } = attributes;\n\n\tconst className = classNames( {\n\t\t[ `has-text-align-${ align }` ]: align,\n\t} );\n\n\treturn (\n\t\t<blockquote { ...useBlockProps.save( { className } ) }>\n\t\t\t<InnerBlocks.Content />\n\t\t\t{ ! RichText.isEmpty( citation ) && (\n\t\t\t\t<RichText.Content tagName=\"cite\" value={ citation } />\n\t\t\t) }\n\t\t</blockquote>\n\t);\n}\n"]}
|
|
@@ -1,198 +1,151 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* WordPress dependencies
|
|
3
3
|
*/
|
|
4
|
-
import { createBlock } from '@wordpress/blocks';
|
|
5
|
-
import { create, join, split, toHTMLString } from '@wordpress/rich-text';
|
|
4
|
+
import { createBlock, parseWithAttributeSchema, rawHandler } from '@wordpress/blocks';
|
|
6
5
|
const transforms = {
|
|
7
6
|
from: [{
|
|
8
7
|
type: 'block',
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
transform: attributes => {
|
|
12
|
-
return createBlock('core/quote', {
|
|
13
|
-
value: toHTMLString({
|
|
14
|
-
value: join(attributes.map(_ref => {
|
|
15
|
-
let {
|
|
16
|
-
content
|
|
17
|
-
} = _ref;
|
|
18
|
-
return create({
|
|
19
|
-
html: content
|
|
20
|
-
});
|
|
21
|
-
}), '\u2028'),
|
|
22
|
-
multilineTag: 'p'
|
|
23
|
-
}),
|
|
24
|
-
anchor: attributes.anchor
|
|
25
|
-
});
|
|
26
|
-
}
|
|
27
|
-
}, {
|
|
28
|
-
type: 'block',
|
|
29
|
-
blocks: ['core/heading'],
|
|
30
|
-
transform: _ref2 => {
|
|
8
|
+
blocks: ['core/pullquote'],
|
|
9
|
+
transform: _ref => {
|
|
31
10
|
let {
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
11
|
+
value,
|
|
12
|
+
citation,
|
|
13
|
+
anchor,
|
|
14
|
+
fontSize,
|
|
15
|
+
style
|
|
16
|
+
} = _ref;
|
|
35
17
|
return createBlock('core/quote', {
|
|
36
|
-
|
|
37
|
-
anchor
|
|
38
|
-
|
|
18
|
+
citation,
|
|
19
|
+
anchor,
|
|
20
|
+
fontSize,
|
|
21
|
+
style
|
|
22
|
+
}, parseWithAttributeSchema(value, {
|
|
23
|
+
type: 'array',
|
|
24
|
+
source: 'query',
|
|
25
|
+
selector: 'p',
|
|
26
|
+
query: {
|
|
27
|
+
content: {
|
|
28
|
+
type: 'string',
|
|
29
|
+
source: 'html'
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}).map(_ref2 => {
|
|
33
|
+
let {
|
|
34
|
+
content
|
|
35
|
+
} = _ref2;
|
|
36
|
+
return createBlock('core/paragraph', {
|
|
37
|
+
content
|
|
38
|
+
});
|
|
39
|
+
}));
|
|
39
40
|
}
|
|
40
41
|
}, {
|
|
41
42
|
type: 'block',
|
|
42
|
-
blocks: ['core/
|
|
43
|
-
transform: _ref3 => {
|
|
43
|
+
blocks: ['core/group'],
|
|
44
|
+
transform: (_ref3, innerBlocks) => {
|
|
44
45
|
let {
|
|
45
|
-
value,
|
|
46
|
-
citation,
|
|
47
46
|
anchor
|
|
48
47
|
} = _ref3;
|
|
49
48
|
return createBlock('core/quote', {
|
|
50
|
-
value,
|
|
51
|
-
citation,
|
|
52
49
|
anchor
|
|
53
|
-
});
|
|
50
|
+
}, innerBlocks);
|
|
54
51
|
}
|
|
55
52
|
}, {
|
|
56
53
|
type: 'prefix',
|
|
57
54
|
prefix: '>',
|
|
58
|
-
transform: content => {
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
});
|
|
62
|
-
}
|
|
55
|
+
transform: content => createBlock('core/quote', {}, [createBlock('core/paragraph', {
|
|
56
|
+
content
|
|
57
|
+
})])
|
|
63
58
|
}, {
|
|
64
59
|
type: 'raw',
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
return child => {
|
|
69
|
-
// Child is a paragraph.
|
|
70
|
-
if (child.nodeName === 'P') {
|
|
71
|
-
return true;
|
|
72
|
-
} // Child is a cite and no other cite child exists before it.
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
if (!hasCitation && child.nodeName === 'CITE') {
|
|
76
|
-
hasCitation = true;
|
|
77
|
-
return true;
|
|
78
|
-
}
|
|
79
|
-
};
|
|
80
|
-
})();
|
|
81
|
-
|
|
82
|
-
return node.nodeName === 'BLOCKQUOTE' && // The quote block can only handle multiline paragraph
|
|
83
|
-
// content with an optional cite child.
|
|
84
|
-
Array.from(node.childNodes).every(isParagraphOrSingleCite);
|
|
85
|
-
},
|
|
86
|
-
schema: _ref4 => {
|
|
87
|
-
let {
|
|
88
|
-
phrasingContentSchema
|
|
89
|
-
} = _ref4;
|
|
90
|
-
return {
|
|
91
|
-
blockquote: {
|
|
92
|
-
children: {
|
|
93
|
-
p: {
|
|
94
|
-
children: phrasingContentSchema
|
|
95
|
-
},
|
|
96
|
-
cite: {
|
|
97
|
-
children: phrasingContentSchema
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
};
|
|
102
|
-
}
|
|
103
|
-
}],
|
|
104
|
-
to: [{
|
|
105
|
-
type: 'block',
|
|
106
|
-
blocks: ['core/paragraph'],
|
|
107
|
-
transform: _ref5 => {
|
|
108
|
-
let {
|
|
109
|
-
value,
|
|
110
|
-
citation
|
|
111
|
-
} = _ref5;
|
|
112
|
-
const paragraphs = [];
|
|
113
|
-
|
|
114
|
-
if (value && value !== '<p></p>') {
|
|
115
|
-
paragraphs.push(...split(create({
|
|
116
|
-
html: value,
|
|
117
|
-
multilineTag: 'p'
|
|
118
|
-
}), '\u2028').map(piece => createBlock('core/paragraph', {
|
|
119
|
-
content: toHTMLString({
|
|
120
|
-
value: piece
|
|
121
|
-
})
|
|
122
|
-
})));
|
|
60
|
+
schema: () => ({
|
|
61
|
+
blockquote: {
|
|
62
|
+
children: '*'
|
|
123
63
|
}
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
return paragraphs;
|
|
64
|
+
}),
|
|
65
|
+
selector: 'blockquote',
|
|
66
|
+
transform: node => {
|
|
67
|
+
return createBlock('core/quote', // Don't try to parse any `cite` out of this content.
|
|
68
|
+
// * There may be more than one cite.
|
|
69
|
+
// * There may be more attribution text than just the cite.
|
|
70
|
+
// * If the cite is nested in the quoted text, it's wrong to
|
|
71
|
+
// remove it.
|
|
72
|
+
{}, rawHandler({
|
|
73
|
+
HTML: node.innerHTML,
|
|
74
|
+
mode: 'BLOCKS'
|
|
75
|
+
}));
|
|
138
76
|
}
|
|
139
77
|
}, {
|
|
140
78
|
type: 'block',
|
|
141
|
-
|
|
142
|
-
|
|
79
|
+
isMultiBlock: true,
|
|
80
|
+
blocks: ['*'],
|
|
81
|
+
isMatch: (_ref4, blocks) => {
|
|
82
|
+
let {} = _ref4;
|
|
83
|
+
return !blocks.some(_ref5 => {
|
|
84
|
+
let {
|
|
85
|
+
name
|
|
86
|
+
} = _ref5;
|
|
87
|
+
return name === 'core/quote';
|
|
88
|
+
});
|
|
89
|
+
},
|
|
90
|
+
__experimentalConvert: blocks => createBlock('core/quote', {}, blocks.map(block => createBlock(block.name, block.attributes, block.innerBlocks)))
|
|
91
|
+
}],
|
|
92
|
+
to: [{
|
|
93
|
+
type: 'block',
|
|
94
|
+
blocks: ['core/pullquote'],
|
|
95
|
+
isMatch: (_ref6, block) => {
|
|
96
|
+
let {} = _ref6;
|
|
97
|
+
return block.innerBlocks.every(_ref7 => {
|
|
98
|
+
let {
|
|
99
|
+
name
|
|
100
|
+
} = _ref7;
|
|
101
|
+
return name === 'core/paragraph';
|
|
102
|
+
});
|
|
103
|
+
},
|
|
104
|
+
transform: (_ref8, innerBlocks) => {
|
|
143
105
|
let {
|
|
144
|
-
value,
|
|
145
106
|
citation,
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
const pieces = split(create({
|
|
159
|
-
html: value,
|
|
160
|
-
multilineTag: 'p'
|
|
161
|
-
}), '\u2028');
|
|
162
|
-
const headingBlock = createBlock('core/heading', {
|
|
163
|
-
content: toHTMLString({
|
|
164
|
-
value: pieces[0]
|
|
165
|
-
})
|
|
166
|
-
});
|
|
167
|
-
|
|
168
|
-
if (!citation && pieces.length === 1) {
|
|
169
|
-
return headingBlock;
|
|
170
|
-
}
|
|
171
|
-
|
|
172
|
-
const quotePieces = pieces.slice(1);
|
|
173
|
-
const quoteBlock = createBlock('core/quote', { ...attrs,
|
|
107
|
+
anchor,
|
|
108
|
+
fontSize,
|
|
109
|
+
style
|
|
110
|
+
} = _ref8;
|
|
111
|
+
const value = innerBlocks.map(_ref9 => {
|
|
112
|
+
let {
|
|
113
|
+
attributes
|
|
114
|
+
} = _ref9;
|
|
115
|
+
return `<p>${attributes.content}</p>`;
|
|
116
|
+
}).join('');
|
|
117
|
+
return createBlock('core/pullquote', {
|
|
118
|
+
value,
|
|
174
119
|
citation,
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
})
|
|
120
|
+
anchor,
|
|
121
|
+
fontSize,
|
|
122
|
+
style
|
|
179
123
|
});
|
|
180
|
-
return [headingBlock, quoteBlock];
|
|
181
124
|
}
|
|
182
125
|
}, {
|
|
183
126
|
type: 'block',
|
|
184
|
-
blocks: ['core/
|
|
185
|
-
transform:
|
|
127
|
+
blocks: ['core/group'],
|
|
128
|
+
transform: (_ref10, innerBlocks) => {
|
|
186
129
|
let {
|
|
187
|
-
value,
|
|
188
130
|
citation,
|
|
189
131
|
anchor
|
|
190
|
-
} =
|
|
191
|
-
return createBlock('core/
|
|
192
|
-
value,
|
|
193
|
-
citation,
|
|
132
|
+
} = _ref10;
|
|
133
|
+
return createBlock('core/group', {
|
|
194
134
|
anchor
|
|
195
|
-
}
|
|
135
|
+
}, citation ? [...innerBlocks, createBlock('core/paragraph', {
|
|
136
|
+
content: citation
|
|
137
|
+
})] : innerBlocks);
|
|
138
|
+
}
|
|
139
|
+
}, {
|
|
140
|
+
type: 'block',
|
|
141
|
+
blocks: ['*'],
|
|
142
|
+
transform: (_ref11, innerBlocks) => {
|
|
143
|
+
let {
|
|
144
|
+
citation
|
|
145
|
+
} = _ref11;
|
|
146
|
+
return citation ? [...innerBlocks, createBlock('core/paragraph', {
|
|
147
|
+
content: citation
|
|
148
|
+
})] : innerBlocks;
|
|
196
149
|
}
|
|
197
150
|
}]
|
|
198
151
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["@wordpress/block-library/src/quote/transforms.js"],"names":["createBlock","create","join","split","toHTMLString","transforms","from","type","isMultiBlock","blocks","transform","attributes","value","map","content","html","multilineTag","anchor","citation","prefix","isMatch","node","isParagraphOrSingleCite","hasCitation","child","nodeName","Array","childNodes","every","schema","phrasingContentSchema","blockquote","children","p","cite","to","paragraphs","push","piece","length","attrs","pieces","headingBlock","quotePieces","slice","quoteBlock"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,WAAT,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C,aAAOjB,WAAW,CAAE,gBAAF,EAAoB;AACrCY,QAAAA,KADqC;AAErCM,QAAAA,QAFqC;AAGrCD,QAAAA;AAHqC,OAApB,CAAlB;AAKA;AATF,GA9EG;AA1Fc,CAAnB;AAsLA,eAAeZ,UAAf","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { createBlock } from '@wordpress/blocks';\nimport { create, join, split, toHTMLString } from '@wordpress/rich-text';\n\nconst transforms = {\n\tfrom: [\n\t\t{\n\t\t\ttype: 'block',\n\t\t\tisMultiBlock: true,\n\t\t\tblocks: [ 'core/paragraph' ],\n\t\t\ttransform: ( attributes ) => {\n\t\t\t\treturn createBlock( 'core/quote', {\n\t\t\t\t\tvalue: toHTMLString( {\n\t\t\t\t\t\tvalue: join(\n\t\t\t\t\t\t\tattributes.map( ( { content } ) =>\n\t\t\t\t\t\t\t\tcreate( { html: content } )\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t'\\u2028'\n\t\t\t\t\t\t),\n\t\t\t\t\t\tmultilineTag: 'p',\n\t\t\t\t\t} ),\n\t\t\t\t\tanchor: attributes.anchor,\n\t\t\t\t} );\n\t\t\t},\n\t\t},\n\t\t{\n\t\t\ttype: 'block',\n\t\t\tblocks: [ 'core/heading' ],\n\t\t\ttransform: ( { content, anchor } ) => {\n\t\t\t\treturn createBlock( 'core/quote', {\n\t\t\t\t\tvalue: `<p>${ content }</p>`,\n\t\t\t\t\tanchor,\n\t\t\t\t} );\n\t\t\t},\n\t\t},\n\t\t{\n\t\t\ttype: 'block',\n\t\t\tblocks: [ 'core/pullquote' ],\n\t\t\ttransform: ( { value, citation, anchor } ) =>\n\t\t\t\tcreateBlock( 'core/quote', {\n\t\t\t\t\tvalue,\n\t\t\t\t\tcitation,\n\t\t\t\t\tanchor,\n\t\t\t\t} ),\n\t\t},\n\t\t{\n\t\t\ttype: 'prefix',\n\t\t\tprefix: '>',\n\t\t\ttransform: ( content ) => {\n\t\t\t\treturn createBlock( 'core/quote', {\n\t\t\t\t\tvalue: `<p>${ content }</p>`,\n\t\t\t\t} );\n\t\t\t},\n\t\t},\n\t\t{\n\t\t\ttype: 'raw',\n\t\t\tisMatch: ( node ) => {\n\t\t\t\tconst isParagraphOrSingleCite = ( () => {\n\t\t\t\t\tlet hasCitation = false;\n\t\t\t\t\treturn ( child ) => {\n\t\t\t\t\t\t// Child is a paragraph.\n\t\t\t\t\t\tif ( child.nodeName === 'P' ) {\n\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// Child is a cite and no other cite child exists before it.\n\t\t\t\t\t\tif ( ! hasCitation && child.nodeName === 'CITE' ) {\n\t\t\t\t\t\t\thasCitation = true;\n\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t}\n\t\t\t\t\t};\n\t\t\t\t} )();\n\t\t\t\treturn (\n\t\t\t\t\tnode.nodeName === 'BLOCKQUOTE' &&\n\t\t\t\t\t// The quote block can only handle multiline paragraph\n\t\t\t\t\t// content with an optional cite child.\n\t\t\t\t\tArray.from( node.childNodes ).every(\n\t\t\t\t\t\tisParagraphOrSingleCite\n\t\t\t\t\t)\n\t\t\t\t);\n\t\t\t},\n\t\t\tschema: ( { phrasingContentSchema } ) => ( {\n\t\t\t\tblockquote: {\n\t\t\t\t\tchildren: {\n\t\t\t\t\t\tp: {\n\t\t\t\t\t\t\tchildren: phrasingContentSchema,\n\t\t\t\t\t\t},\n\t\t\t\t\t\tcite: {\n\t\t\t\t\t\t\tchildren: phrasingContentSchema,\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t} ),\n\t\t},\n\t],\n\tto: [\n\t\t{\n\t\t\ttype: 'block',\n\t\t\tblocks: [ 'core/paragraph' ],\n\t\t\ttransform: ( { value, citation } ) => {\n\t\t\t\tconst paragraphs = [];\n\t\t\t\tif ( value && value !== '<p></p>' ) {\n\t\t\t\t\tparagraphs.push(\n\t\t\t\t\t\t...split(\n\t\t\t\t\t\t\tcreate( { html: value, multilineTag: 'p' } ),\n\t\t\t\t\t\t\t'\\u2028'\n\t\t\t\t\t\t).map( ( piece ) =>\n\t\t\t\t\t\t\tcreateBlock( 'core/paragraph', {\n\t\t\t\t\t\t\t\tcontent: toHTMLString( { value: piece } ),\n\t\t\t\t\t\t\t} )\n\t\t\t\t\t\t)\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\tif ( citation && citation !== '<p></p>' ) {\n\t\t\t\t\tparagraphs.push(\n\t\t\t\t\t\tcreateBlock( 'core/paragraph', {\n\t\t\t\t\t\t\tcontent: citation,\n\t\t\t\t\t\t} )\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\tif ( paragraphs.length === 0 ) {\n\t\t\t\t\treturn createBlock( 'core/paragraph', {\n\t\t\t\t\t\tcontent: '',\n\t\t\t\t\t} );\n\t\t\t\t}\n\t\t\t\treturn paragraphs;\n\t\t\t},\n\t\t},\n\n\t\t{\n\t\t\ttype: 'block',\n\t\t\tblocks: [ 'core/heading' ],\n\t\t\ttransform: ( { value, citation, ...attrs } ) => {\n\t\t\t\t// If there is no quote content, use the citation as the\n\t\t\t\t// content of the resulting heading. A nonexistent citation\n\t\t\t\t// will result in an empty heading.\n\t\t\t\tif ( value === '<p></p>' ) {\n\t\t\t\t\treturn createBlock( 'core/heading', {\n\t\t\t\t\t\tcontent: citation,\n\t\t\t\t\t} );\n\t\t\t\t}\n\n\t\t\t\tconst pieces = split(\n\t\t\t\t\tcreate( { html: value, multilineTag: 'p' } ),\n\t\t\t\t\t'\\u2028'\n\t\t\t\t);\n\n\t\t\t\tconst headingBlock = createBlock( 'core/heading', {\n\t\t\t\t\tcontent: toHTMLString( { value: pieces[ 0 ] } ),\n\t\t\t\t} );\n\n\t\t\t\tif ( ! citation && pieces.length === 1 ) {\n\t\t\t\t\treturn headingBlock;\n\t\t\t\t}\n\n\t\t\t\tconst quotePieces = pieces.slice( 1 );\n\n\t\t\t\tconst quoteBlock = createBlock( 'core/quote', {\n\t\t\t\t\t...attrs,\n\t\t\t\t\tcitation,\n\t\t\t\t\tvalue: toHTMLString( {\n\t\t\t\t\t\tvalue: quotePieces.length\n\t\t\t\t\t\t\t? join( pieces.slice( 1 ), '\\u2028' )\n\t\t\t\t\t\t\t: create(),\n\t\t\t\t\t\tmultilineTag: 'p',\n\t\t\t\t\t} ),\n\t\t\t\t} );\n\n\t\t\t\treturn [ headingBlock, quoteBlock ];\n\t\t\t},\n\t\t},\n\n\t\t{\n\t\t\ttype: 'block',\n\t\t\tblocks: [ 'core/pullquote' ],\n\t\t\ttransform: ( { value, citation, anchor } ) => {\n\t\t\t\treturn createBlock( 'core/pullquote', {\n\t\t\t\t\tvalue,\n\t\t\t\t\tcitation,\n\t\t\t\t\tanchor,\n\t\t\t\t} );\n\t\t\t},\n\t\t},\n\t],\n};\n\nexport default transforms;\n"]}
|
|
1
|
+
{"version":3,"sources":["@wordpress/block-library/src/quote/transforms.js"],"names":["createBlock","parseWithAttributeSchema","rawHandler","transforms","from","type","blocks","transform","value","citation","anchor","fontSize","style","source","selector","query","content","map","innerBlocks","prefix","schema","blockquote","children","node","HTML","innerHTML","mode","isMultiBlock","isMatch","some","name","__experimentalConvert","block","attributes","to","every","join"],"mappings":"AAAA;AACA;AACA;AACA,SACCA,WADD,EAECC,wBAFD,EAGCC,UAHD,QAIO,mBAJP;AAMA,MAAMC,UAAU,GAAG;AAClBC,EAAAA,IAAI,EAAE,CACL;AACCC,IAAAA,IAAI,EAAE,OADP;AAECC,IAAAA,MAAM,EAAE,CAAE,gBAAF,CAFT;AAGCC,IAAAA,SAAS,EAAE,QAAoD;AAAA,UAAlD;AAAEC,QAAAA,KAAF;AAASC,QAAAA,QAAT;AAAmBC,QAAAA,MAAnB;AAA2BC,QAAAA,QAA3B;AAAqCC,QAAAA;AAArC,OAAkD;AAC9D,aAAOZ,WAAW,CACjB,YADiB,EAEjB;AACCS,QAAAA,QADD;AAECC,QAAAA,MAFD;AAGCC,QAAAA,QAHD;AAICC,QAAAA;AAJD,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CACvBD,GADY,CAEZ;AAAA,YAAE;AAAEgB,UAAAA;AAAF,SAAF;AAAA,eAAuB,MAAMA,UAAU,CAACjB,OAAS,MAAjD;AAAA,OAFY,EAIZoB,IAJY,CAIN,EAJM,CAAd;AAKA,aAAOpC,WAAW,CAAE,gBAAF,EAAoB;AACrCQ,QAAAA,KADqC;AAErCC,QAAAA,QAFqC;AAGrCC,QAAAA,MAHqC;AAIrCC,QAAAA,QAJqC;AAKrCC,QAAAA;AALqC,OAApB,CAAlB;AAOA;AAxBF,GADG,EA2BH;AACCP,IAAAA,IAAI,EAAE,OADP;AAECC,IAAAA,MAAM,EAAE,CAAE,YAAF,CAFT;AAGCC,IAAAA,SAAS,EAAE,SAAwBW,WAAxB;AAAA,UAAE;AAAET,QAAAA,QAAF;AAAYC,QAAAA;AAAZ,OAAF;AAAA,aACVV,WAAW,CACV,YADU,EAEV;AAAEU,QAAAA;AAAF,OAFU,EAGVD,QAAQ,GACL,CACA,GAAGS,WADH,EAEAlB,WAAW,CAAE,gBAAF,EAAoB;AAC9BgB,QAAAA,OAAO,EAAEP;AADqB,OAApB,CAFX,CADK,GAOLS,WAVO,CADD;AAAA;AAHZ,GA3BG,EA4CH;AACCb,IAAAA,IAAI,EAAE,OADP;AAECC,IAAAA,MAAM,EAAE,CAAE,GAAF,CAFT;AAGCC,IAAAA,SAAS,EAAE,SAAgBW,WAAhB;AAAA,UAAE;AAAET,QAAAA;AAAF,OAAF;AAAA,aACVA,QAAQ,GACL,CACA,GAAGS,WADH,EAEAlB,WAAW,CAAE,gBAAF,EAAoB;AAC9BgB,QAAAA,OAAO,EAAEP;AADqB,OAApB,CAFX,CADK,GAOLS,WARO;AAAA;AAHZ,GA5CG;AAzFc,CAAnB;AAqJA,eAAef,UAAf","sourcesContent":["/**\n * WordPress dependencies\n */\nimport {\n\tcreateBlock,\n\tparseWithAttributeSchema,\n\trawHandler,\n} from '@wordpress/blocks';\n\nconst transforms = {\n\tfrom: [\n\t\t{\n\t\t\ttype: 'block',\n\t\t\tblocks: [ 'core/pullquote' ],\n\t\t\ttransform: ( { value, citation, anchor, fontSize, style } ) => {\n\t\t\t\treturn createBlock(\n\t\t\t\t\t'core/quote',\n\t\t\t\t\t{\n\t\t\t\t\t\tcitation,\n\t\t\t\t\t\tanchor,\n\t\t\t\t\t\tfontSize,\n\t\t\t\t\t\tstyle,\n\t\t\t\t\t},\n\t\t\t\t\tparseWithAttributeSchema( value, {\n\t\t\t\t\t\ttype: 'array',\n\t\t\t\t\t\tsource: 'query',\n\t\t\t\t\t\tselector: 'p',\n\t\t\t\t\t\tquery: {\n\t\t\t\t\t\t\tcontent: {\n\t\t\t\t\t\t\t\ttype: 'string',\n\t\t\t\t\t\t\t\tsource: 'html',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t} ).map( ( { content } ) =>\n\t\t\t\t\t\tcreateBlock( 'core/paragraph', { content } )\n\t\t\t\t\t)\n\t\t\t\t);\n\t\t\t},\n\t\t},\n\t\t{\n\t\t\ttype: 'block',\n\t\t\tblocks: [ 'core/group' ],\n\t\t\ttransform: ( { anchor }, innerBlocks ) =>\n\t\t\t\tcreateBlock( 'core/quote', { anchor }, innerBlocks ),\n\t\t},\n\t\t{\n\t\t\ttype: 'prefix',\n\t\t\tprefix: '>',\n\t\t\ttransform: ( content ) =>\n\t\t\t\tcreateBlock( 'core/quote', {}, [\n\t\t\t\t\tcreateBlock( 'core/paragraph', { content } ),\n\t\t\t\t] ),\n\t\t},\n\t\t{\n\t\t\ttype: 'raw',\n\t\t\tschema: () => ( {\n\t\t\t\tblockquote: {\n\t\t\t\t\tchildren: '*',\n\t\t\t\t},\n\t\t\t} ),\n\t\t\tselector: 'blockquote',\n\t\t\ttransform: ( node ) => {\n\t\t\t\treturn createBlock(\n\t\t\t\t\t'core/quote',\n\t\t\t\t\t// Don't try to parse any `cite` out of this content.\n\t\t\t\t\t// * There may be more than one cite.\n\t\t\t\t\t// * There may be more attribution text than just the cite.\n\t\t\t\t\t// * If the cite is nested in the quoted text, it's wrong to\n\t\t\t\t\t// remove it.\n\t\t\t\t\t{},\n\t\t\t\t\trawHandler( {\n\t\t\t\t\t\tHTML: node.innerHTML,\n\t\t\t\t\t\tmode: 'BLOCKS',\n\t\t\t\t\t} )\n\t\t\t\t);\n\t\t\t},\n\t\t},\n\t\t{\n\t\t\ttype: 'block',\n\t\t\tisMultiBlock: true,\n\t\t\tblocks: [ '*' ],\n\t\t\tisMatch: ( {}, blocks ) => {\n\t\t\t\treturn ! blocks.some( ( { name } ) => name === 'core/quote' );\n\t\t\t},\n\t\t\t__experimentalConvert: ( blocks ) =>\n\t\t\t\tcreateBlock(\n\t\t\t\t\t'core/quote',\n\t\t\t\t\t{},\n\t\t\t\t\tblocks.map( ( block ) =>\n\t\t\t\t\t\tcreateBlock(\n\t\t\t\t\t\t\tblock.name,\n\t\t\t\t\t\t\tblock.attributes,\n\t\t\t\t\t\t\tblock.innerBlocks\n\t\t\t\t\t\t)\n\t\t\t\t\t)\n\t\t\t\t),\n\t\t},\n\t],\n\tto: [\n\t\t{\n\t\t\ttype: 'block',\n\t\t\tblocks: [ 'core/pullquote' ],\n\t\t\tisMatch: ( {}, block ) => {\n\t\t\t\treturn block.innerBlocks.every(\n\t\t\t\t\t( { name } ) => name === 'core/paragraph'\n\t\t\t\t);\n\t\t\t},\n\t\t\ttransform: (\n\t\t\t\t{ citation, anchor, fontSize, style },\n\t\t\t\tinnerBlocks\n\t\t\t) => {\n\t\t\t\tconst value = innerBlocks\n\t\t\t\t\t.map(\n\t\t\t\t\t\t( { attributes } ) => `<p>${ attributes.content }</p>`\n\t\t\t\t\t)\n\t\t\t\t\t.join( '' );\n\t\t\t\treturn createBlock( 'core/pullquote', {\n\t\t\t\t\tvalue,\n\t\t\t\t\tcitation,\n\t\t\t\t\tanchor,\n\t\t\t\t\tfontSize,\n\t\t\t\t\tstyle,\n\t\t\t\t} );\n\t\t\t},\n\t\t},\n\t\t{\n\t\t\ttype: 'block',\n\t\t\tblocks: [ 'core/group' ],\n\t\t\ttransform: ( { citation, anchor }, innerBlocks ) =>\n\t\t\t\tcreateBlock(\n\t\t\t\t\t'core/group',\n\t\t\t\t\t{ anchor },\n\t\t\t\t\tcitation\n\t\t\t\t\t\t? [\n\t\t\t\t\t\t\t\t...innerBlocks,\n\t\t\t\t\t\t\t\tcreateBlock( 'core/paragraph', {\n\t\t\t\t\t\t\t\t\tcontent: citation,\n\t\t\t\t\t\t\t\t} ),\n\t\t\t\t\t\t ]\n\t\t\t\t\t\t: innerBlocks\n\t\t\t\t),\n\t\t},\n\t\t{\n\t\t\ttype: 'block',\n\t\t\tblocks: [ '*' ],\n\t\t\ttransform: ( { citation }, innerBlocks ) =>\n\t\t\t\tcitation\n\t\t\t\t\t? [\n\t\t\t\t\t\t\t...innerBlocks,\n\t\t\t\t\t\t\tcreateBlock( 'core/paragraph', {\n\t\t\t\t\t\t\t\tcontent: citation,\n\t\t\t\t\t\t\t} ),\n\t\t\t\t\t ]\n\t\t\t\t\t: innerBlocks,\n\t\t},\n\t],\n};\n\nexport default transforms;\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["@wordpress/block-library/src/social-link/icons/index.js"],"names":[],"mappings":"AAAA,cAAc,UAAd;AACA,cAAc,YAAd;AACA,cAAc,WAAd;AACA,cAAc,SAAd;AACA,cAAc,WAAd;AACA,cAAc,cAAd;AACA,cAAc,YAAd;AACA,cAAc,WAAd;AACA,cAAc,QAAd;AACA,cAAc,YAAd;AACA,cAAc,QAAd;AACA,cAAc,iBAAd;AACA,cAAc,UAAd;AACA,cAAc,cAAd;AACA,cAAc,aAAd;AACA,cAAc,UAAd;AACA,cAAc,UAAd;AACA,cAAc,aAAd;AACA,cAAc,UAAd;AACA,cAAc,YAAd;AACA,cAAc,QAAd;AACA,cAAc,YAAd;AACA,cAAc,UAAd;AACA,cAAc,UAAd;AACA,cAAc,WAAd;AACA,cAAc,aAAd;AACA,cAAc,UAAd;AACA,cAAc,UAAd;AACA,cAAc,SAAd;AACA,cAAc,YAAd;AACA,cAAc,cAAd;AACA,cAAc,WAAd;AACA,cAAc,YAAd;AACA,cAAc,UAAd;AACA,cAAc,UAAd;AACA,cAAc,UAAd;AACA,cAAc,WAAd;AACA,cAAc,SAAd;AACA,cAAc,MAAd;AACA,cAAc,aAAd;AACA,cAAc,QAAd;AACA,cAAc,WAAd","sourcesContent":["export * from './amazon';\nexport * from './bandcamp';\nexport * from './behance';\nexport * from './chain';\nexport * from './codepen';\nexport * from './deviantart';\nexport * from './dribbble';\nexport * from './dropbox';\nexport * from './etsy';\nexport * from './facebook';\nexport * from './feed';\nexport * from './fivehundredpx';\nexport * from './flickr';\nexport * from './foursquare';\nexport * from './goodreads';\nexport * from './google';\nexport * from './github';\nexport * from './instagram';\nexport * from './lastfm';\nexport * from './linkedin';\nexport * from './mail';\nexport * from './mastodon';\nexport * from './meetup';\nexport * from './medium';\nexport * from './patreon';\nexport * from './pinterest';\nexport * from './pocket';\nexport * from './reddit';\nexport * from './skype';\nexport * from './snapchat';\nexport * from './soundcloud';\nexport * from './spotify';\nexport * from './telegram';\nexport * from './tiktok';\nexport * from './tumblr';\nexport * from './twitch';\nexport * from './twitter';\nexport * from './vimeo';\nexport * from './vk';\nexport * from './wordpress';\nexport * from './yelp';\nexport * from './youtube';\n"]}
|
|
1
|
+
{"version":3,"sources":["@wordpress/block-library/src/social-link/icons/index.js"],"names":[],"mappings":"AAAA,cAAc,UAAd;AACA,cAAc,YAAd;AACA,cAAc,WAAd;AACA,cAAc,SAAd;AACA,cAAc,WAAd;AACA,cAAc,cAAd;AACA,cAAc,YAAd;AACA,cAAc,WAAd;AACA,cAAc,QAAd;AACA,cAAc,YAAd;AACA,cAAc,QAAd;AACA,cAAc,iBAAd;AACA,cAAc,UAAd;AACA,cAAc,cAAd;AACA,cAAc,aAAd;AACA,cAAc,UAAd;AACA,cAAc,UAAd;AACA,cAAc,aAAd;AACA,cAAc,UAAd;AACA,cAAc,YAAd;AACA,cAAc,QAAd;AACA,cAAc,YAAd;AACA,cAAc,UAAd;AACA,cAAc,UAAd;AACA,cAAc,WAAd;AACA,cAAc,aAAd;AACA,cAAc,UAAd;AACA,cAAc,UAAd;AACA,cAAc,SAAd;AACA,cAAc,YAAd;AACA,cAAc,cAAd;AACA,cAAc,WAAd;AACA,cAAc,YAAd;AACA,cAAc,UAAd;AACA,cAAc,UAAd;AACA,cAAc,UAAd;AACA,cAAc,WAAd;AACA,cAAc,SAAd;AACA,cAAc,MAAd;AACA,cAAc,YAAd;AACA,cAAc,aAAd;AACA,cAAc,QAAd;AACA,cAAc,WAAd","sourcesContent":["export * from './amazon';\nexport * from './bandcamp';\nexport * from './behance';\nexport * from './chain';\nexport * from './codepen';\nexport * from './deviantart';\nexport * from './dribbble';\nexport * from './dropbox';\nexport * from './etsy';\nexport * from './facebook';\nexport * from './feed';\nexport * from './fivehundredpx';\nexport * from './flickr';\nexport * from './foursquare';\nexport * from './goodreads';\nexport * from './google';\nexport * from './github';\nexport * from './instagram';\nexport * from './lastfm';\nexport * from './linkedin';\nexport * from './mail';\nexport * from './mastodon';\nexport * from './meetup';\nexport * from './medium';\nexport * from './patreon';\nexport * from './pinterest';\nexport * from './pocket';\nexport * from './reddit';\nexport * from './skype';\nexport * from './snapchat';\nexport * from './soundcloud';\nexport * from './spotify';\nexport * from './telegram';\nexport * from './tiktok';\nexport * from './tumblr';\nexport * from './twitch';\nexport * from './twitter';\nexport * from './vimeo';\nexport * from './vk';\nexport * from './whatsapp';\nexport * from './wordpress';\nexport * from './yelp';\nexport * from './youtube';\n"]}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { createElement } from "@wordpress/element";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* WordPress dependencies
|
|
5
|
+
*/
|
|
6
|
+
import { Path, SVG } from '@wordpress/primitives';
|
|
7
|
+
export const WhatsAppIcon = () => createElement(SVG, {
|
|
8
|
+
width: "24",
|
|
9
|
+
height: "24",
|
|
10
|
+
viewBox: "0 0 24 24",
|
|
11
|
+
version: "1.1"
|
|
12
|
+
}, createElement(Path, {
|
|
13
|
+
d: "M 12.011719 2 C 6.5057187 2 2.0234844 6.478375 2.0214844 11.984375 C 2.0204844 13.744375 2.4814687 15.462563 3.3554688 16.976562 L 2 22 L 7.2324219 20.763672 C 8.6914219 21.559672 10.333859 21.977516 12.005859 21.978516 L 12.009766 21.978516 C 17.514766 21.978516 21.995047 17.499141 21.998047 11.994141 C 22.000047 9.3251406 20.962172 6.8157344 19.076172 4.9277344 C 17.190172 3.0407344 14.683719 2.001 12.011719 2 z M 12.009766 4 C 14.145766 4.001 16.153109 4.8337969 17.662109 6.3417969 C 19.171109 7.8517969 20.000047 9.8581875 19.998047 11.992188 C 19.996047 16.396187 16.413812 19.978516 12.007812 19.978516 C 10.674812 19.977516 9.3544062 19.642812 8.1914062 19.007812 L 7.5175781 18.640625 L 6.7734375 18.816406 L 4.8046875 19.28125 L 5.2851562 17.496094 L 5.5019531 16.695312 L 5.0878906 15.976562 C 4.3898906 14.768562 4.0204844 13.387375 4.0214844 11.984375 C 4.0234844 7.582375 7.6067656 4 12.009766 4 z M 8.4765625 7.375 C 8.3095625 7.375 8.0395469 7.4375 7.8105469 7.6875 C 7.5815469 7.9365 6.9355469 8.5395781 6.9355469 9.7675781 C 6.9355469 10.995578 7.8300781 12.182609 7.9550781 12.349609 C 8.0790781 12.515609 9.68175 15.115234 12.21875 16.115234 C 14.32675 16.946234 14.754891 16.782234 15.212891 16.740234 C 15.670891 16.699234 16.690438 16.137687 16.898438 15.554688 C 17.106437 14.971687 17.106922 14.470187 17.044922 14.367188 C 16.982922 14.263188 16.816406 14.201172 16.566406 14.076172 C 16.317406 13.951172 15.090328 13.348625 14.861328 13.265625 C 14.632328 13.182625 14.464828 13.140625 14.298828 13.390625 C 14.132828 13.640625 13.655766 14.201187 13.509766 14.367188 C 13.363766 14.534188 13.21875 14.556641 12.96875 14.431641 C 12.71875 14.305641 11.914938 14.041406 10.960938 13.191406 C 10.218937 12.530406 9.7182656 11.714844 9.5722656 11.464844 C 9.4272656 11.215844 9.5585938 11.079078 9.6835938 10.955078 C 9.7955938 10.843078 9.9316406 10.663578 10.056641 10.517578 C 10.180641 10.371578 10.223641 10.267562 10.306641 10.101562 C 10.389641 9.9355625 10.347156 9.7890625 10.285156 9.6640625 C 10.223156 9.5390625 9.737625 8.3065 9.515625 7.8125 C 9.328625 7.3975 9.131125 7.3878594 8.953125 7.3808594 C 8.808125 7.3748594 8.6425625 7.375 8.4765625 7.375 z"
|
|
14
|
+
}));
|
|
15
|
+
//# sourceMappingURL=whatsapp.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["@wordpress/block-library/src/social-link/icons/whatsapp.js"],"names":["Path","SVG","WhatsAppIcon"],"mappings":";;AAAA;AACA;AACA;AACA,SAASA,IAAT,EAAeC,GAAf,QAA0B,uBAA1B;AAEA,OAAO,MAAMC,YAAY,GAAG,MAC3B,cAAC,GAAD;AAAK,EAAA,KAAK,EAAC,IAAX;AAAgB,EAAA,MAAM,EAAC,IAAvB;AAA4B,EAAA,OAAO,EAAC,WAApC;AAAgD,EAAA,OAAO,EAAC;AAAxD,GACC,cAAC,IAAD;AAAM,EAAA,CAAC,EAAC;AAAR,EADD,CADM","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { Path, SVG } from '@wordpress/primitives';\n\nexport const WhatsAppIcon = () => (\n\t<SVG width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" version=\"1.1\">\n\t\t<Path d=\"M 12.011719 2 C 6.5057187 2 2.0234844 6.478375 2.0214844 11.984375 C 2.0204844 13.744375 2.4814687 15.462563 3.3554688 16.976562 L 2 22 L 7.2324219 20.763672 C 8.6914219 21.559672 10.333859 21.977516 12.005859 21.978516 L 12.009766 21.978516 C 17.514766 21.978516 21.995047 17.499141 21.998047 11.994141 C 22.000047 9.3251406 20.962172 6.8157344 19.076172 4.9277344 C 17.190172 3.0407344 14.683719 2.001 12.011719 2 z M 12.009766 4 C 14.145766 4.001 16.153109 4.8337969 17.662109 6.3417969 C 19.171109 7.8517969 20.000047 9.8581875 19.998047 11.992188 C 19.996047 16.396187 16.413812 19.978516 12.007812 19.978516 C 10.674812 19.977516 9.3544062 19.642812 8.1914062 19.007812 L 7.5175781 18.640625 L 6.7734375 18.816406 L 4.8046875 19.28125 L 5.2851562 17.496094 L 5.5019531 16.695312 L 5.0878906 15.976562 C 4.3898906 14.768562 4.0204844 13.387375 4.0214844 11.984375 C 4.0234844 7.582375 7.6067656 4 12.009766 4 z M 8.4765625 7.375 C 8.3095625 7.375 8.0395469 7.4375 7.8105469 7.6875 C 7.5815469 7.9365 6.9355469 8.5395781 6.9355469 9.7675781 C 6.9355469 10.995578 7.8300781 12.182609 7.9550781 12.349609 C 8.0790781 12.515609 9.68175 15.115234 12.21875 16.115234 C 14.32675 16.946234 14.754891 16.782234 15.212891 16.740234 C 15.670891 16.699234 16.690438 16.137687 16.898438 15.554688 C 17.106437 14.971687 17.106922 14.470187 17.044922 14.367188 C 16.982922 14.263188 16.816406 14.201172 16.566406 14.076172 C 16.317406 13.951172 15.090328 13.348625 14.861328 13.265625 C 14.632328 13.182625 14.464828 13.140625 14.298828 13.390625 C 14.132828 13.640625 13.655766 14.201187 13.509766 14.367188 C 13.363766 14.534188 13.21875 14.556641 12.96875 14.431641 C 12.71875 14.305641 11.914938 14.041406 10.960938 13.191406 C 10.218937 12.530406 9.7182656 11.714844 9.5722656 11.464844 C 9.4272656 11.215844 9.5585938 11.079078 9.6835938 10.955078 C 9.7955938 10.843078 9.9316406 10.663578 10.056641 10.517578 C 10.180641 10.371578 10.223641 10.267562 10.306641 10.101562 C 10.389641 9.9355625 10.347156 9.7890625 10.285156 9.6640625 C 10.223156 9.5390625 9.737625 8.3065 9.515625 7.8125 C 9.328625 7.3975 9.131125 7.3878594 8.953125 7.3808594 C 8.808125 7.3748594 8.6425625 7.375 8.4765625 7.375 z\" />\n\t</SVG>\n);\n"]}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Internal dependencies
|
|
3
3
|
*/
|
|
4
|
-
import { AmazonIcon, BandcampIcon, BehanceIcon, ChainIcon, CodepenIcon, DeviantArtIcon, DribbbleIcon, DropboxIcon, EtsyIcon, FacebookIcon, FeedIcon, FivehundredpxIcon, FlickrIcon, FoursquareIcon, GoodreadsIcon, GoogleIcon, GitHubIcon, InstagramIcon, LastfmIcon, LinkedInIcon, MailIcon, MastodonIcon, MeetupIcon, MediumIcon, PatreonIcon, PinterestIcon, PocketIcon, RedditIcon, SkypeIcon, SnapchatIcon, SoundCloudIcon, SpotifyIcon, TelegramIcon, TiktokIcon, TumblrIcon, TwitchIcon, TwitterIcon, VimeoIcon, VkIcon, WordPressIcon, YelpIcon, YouTubeIcon } from './icons';
|
|
4
|
+
import { AmazonIcon, BandcampIcon, BehanceIcon, ChainIcon, CodepenIcon, DeviantArtIcon, DribbbleIcon, DropboxIcon, EtsyIcon, FacebookIcon, FeedIcon, FivehundredpxIcon, FlickrIcon, FoursquareIcon, GoodreadsIcon, GoogleIcon, GitHubIcon, InstagramIcon, LastfmIcon, LinkedInIcon, MailIcon, MastodonIcon, MeetupIcon, MediumIcon, PatreonIcon, PinterestIcon, PocketIcon, RedditIcon, SkypeIcon, SnapchatIcon, SoundCloudIcon, SpotifyIcon, TelegramIcon, TiktokIcon, TumblrIcon, TwitchIcon, TwitterIcon, VimeoIcon, VkIcon, WhatsAppIcon, WordPressIcon, YelpIcon, YouTubeIcon } from './icons';
|
|
5
5
|
const variations = [{
|
|
6
6
|
isDefault: true,
|
|
7
7
|
name: 'wordpress',
|
|
@@ -284,6 +284,13 @@ const variations = [{
|
|
|
284
284
|
},
|
|
285
285
|
title: 'VK',
|
|
286
286
|
icon: VkIcon
|
|
287
|
+
}, {
|
|
288
|
+
name: 'whatsapp',
|
|
289
|
+
attributes: {
|
|
290
|
+
service: 'whatsapp'
|
|
291
|
+
},
|
|
292
|
+
title: 'WhatsApp',
|
|
293
|
+
icon: WhatsAppIcon
|
|
287
294
|
}, {
|
|
288
295
|
name: 'yelp',
|
|
289
296
|
attributes: {
|