This commit is contained in:
2026-07-02 15:54:39 -06:00
commit 9883323161
17470 changed files with 4470592 additions and 0 deletions
@@ -0,0 +1,39 @@
{
"$schema": "https://schemas.wp.org/trunk/block.json",
"apiVersion": 3,
"name": "jetpack/google-docs-embed",
"title": "Google Docs (Beta)",
"description": "Embed a Google Document.",
"keywords": [
"document",
"gsuite",
"doc"
],
"version": "12.5.0",
"textdomain": "jetpack",
"category": "embed",
"icon": "<svg viewBox='0 0 64 88' width='24' height='24' xmlns='http://www.w3.org/2000/svg'><path d='M58,88H6c-3.3,0-6-2.7-6-6V6c0-3.3,2.7-6,6-6h36l22,22v60C64,85.3,61.3,88,58,88z' /><path fill='#FDFFFF' d='M42,0l22,22H42V0z' /><path fill='#FDFFFF' d='M50,39H14v-5h36V39z M50,46H14v5h36V46z M40,58H14v5h26V58z' /></svg>",
"supports": {
"align": [
"left",
"right",
"center",
"wide",
"full"
],
"anchor": true
},
"attributes": {
"url": {
"type": "string",
"default": ""
},
"aspectRatio": {
"type": "string"
},
"variation": {
"type": "string"
}
},
"editorScript": "jetpack-blocks-editor"
}
@@ -0,0 +1 @@
<?php return array('dependencies' => array('wp-dom-ready', 'wp-polyfill'), 'version' => '89dca93e5cb225d15893');
@@ -0,0 +1 @@
.wp-block-jetpack-google-docs-embed{border:1px solid #ccc;flex-basis:50%}.wp-block-jetpack-google-docs-embed.aligncenter{margin-left:auto;margin-right:auto}.wp-block-jetpack-google-docs-embed.alignleft,.wp-block-jetpack-google-docs-embed.alignright{margin-bottom:20px;max-width:600px}@media only screen and (min-width:600px){.wp-block-jetpack-google-docs-embed.alignleft{float:left;margin-right:20px!important}.wp-block-jetpack-google-docs-embed.alignright{float:right;margin-left:20px!important}}.wp-block-jetpack-google-docs-embed.ar-50 .wp-block-jetpack-google-docs-embed__wrapper:before{padding-top:50%}.wp-block-jetpack-google-docs-embed.ar-100 .wp-block-jetpack-google-docs-embed__wrapper:before{padding-top:100%}.wp-block-jetpack-google-docs-embed__wrapper{position:relative}.wp-block-jetpack-google-docs-embed__wrapper:before{content:"";display:block;padding-top:50%}.wp-block-jetpack-google-docs-embed__wrapper--error:before{content:none}.wp-block-jetpack-google-docs-embed__error-msg{background-color:#f8f9fa;color:#333;font-size:16px;margin:0;padding:20px}.wp-block-jetpack-google-docs-embed__error-msg:before{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='none'%3E%3Cpath fill='%231e2935' fill-rule='evenodd' d='M4.125 12A7.875 7.875 0 0 1 12 4.124a7.875 7.875 0 1 1-7.875 7.874ZM12 3a9 9 0 1 0 0 17.999A9 9 0 1 0 12 3m.041 5.28c.31 0 .563.253.563.563v4.5a.562.562 0 0 1-1.125 0v-4.5c0-.31.252-.562.562-.562Zm-.562 7.313c0-.31.252-.563.562-.563h.011a.562.562 0 0 1 0 1.125h-.01a.56.56 0 0 1-.563-.562' clip-rule='evenodd'/%3E%3C/svg%3E");background-position:top;background-repeat:no-repeat;background-size:20px;content:"";display:inline-block;height:20px;margin-inline-end:8px;position:relative;top:4px;width:20px}.wp-block-jetpack-google-docs-embed__error-msg a{color:#333;text-decoration:underline}.wp-block-jetpack-google-docs-embed__error-msg :is(a:focus,a:hover){text-decoration:none}.wp-block-jetpack-google-docs-embed .loader{background-color:#fff;display:none;height:100%;position:absolute;text-align:center;top:0;width:100%;z-index:99}.wp-block-jetpack-google-docs-embed .loader.is-active{display:block}.wp-block-jetpack-google-docs-embed .loader span{position:relative;top:50%;transform:translateY(-50%)}.wp-block-jetpack-google-docs-embed iframe{bottom:0;height:100%;left:0;max-width:100%;position:absolute;right:0;top:0;width:100%}.editor-styles-wrapper .wp-block-jetpack-google-docs-embed figure{margin:0}.editor-styles-wrapper :is([data-align=left],[data-align=right]) .wp-block-jetpack-google-docs-embed{width:auto}.editor-styles-wrapper :is([data-align=left],[data-align=right]) .wp-block-jetpack-google-docs-embed__wrapper:before{content:none}.editor-styles-wrapper :is([data-align=left],[data-align=right]) iframe{position:relative}.editor-styles-wrapper [data-align=left] .wp-block-jetpack-google-docs-embed{margin-right:20px}.editor-styles-wrapper [data-align=right] .wp-block-jetpack-google-docs-embed{margin-left:20px}html[amp] :is(.wp-block-jetpack-google-docs-embed.alignleft,.wp-block-jetpack-google-docs-embed.alignright){float:none}html[amp] .wp-block-jetpack-google-docs-embed__wrapper:before{content:none}html[amp] .wp-block-jetpack-google-docs-embed__error-msg:before{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 16 16'%3E%3Cpath fill='%231e2935' d='M1.5 3.5v11h11V10H14v5a1 1 0 0 1-1 1H1a1 1 0 0 1-1-1V3a1 1 0 0 1 1-1h5v1.5z'/%3E%3Cpath fill='%231e2935' d='m15.922 1.178-8.907 8.907-1.06-1.06L14.86.118l1.06 1.06Z'/%3E%3Cpath fill='%231e2935' d='M7.5 0H16v1.5H7.5z'/%3E%3Cpath fill='%231e2935' d='M16 0v8.5h-1.5V0z'/%3E%3C/svg%3E");background-size:12px;height:12px;top:1px;width:12px}html[amp] .wp-block-jetpack-google-docs-embed .loader{display:none}
@@ -0,0 +1 @@
(()=>{var e={86048(){},79366(e,t,r){"object"==typeof window&&window.Jetpack_Block_Assets_Base_Url&&(r.p=window.Jetpack_Block_Assets_Base_Url)},98490(e){"use strict";e.exports=window.wp.domReady}},t={};function r(o){var s=t[o];if(void 0!==s)return s.exports;var c=t[o]={exports:{}};return e[o](c,c.exports,r),c.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var o in t)r.o(t,o)&&!r.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{var e;globalThis.importScripts&&(e=globalThis.location+"");var t=globalThis.document;if(!e&&t&&(t.currentScript&&"SCRIPT"===t.currentScript.tagName.toUpperCase()&&(e=t.currentScript.src),!e)){var o=t.getElementsByTagName("script");if(o.length)for(var s=o.length-1;s>-1&&(!e||!/^http(s?):/.test(e));)e=o[s--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),r.p=e+"../"})(),(()=>{"use strict";r(79366)})(),(()=>{"use strict";r(86048);var e=r(98490);const t=()=>{const e=document.querySelectorAll(".wp-block-jetpack-google-docs-embed");if(!e)return;const t=window.Jetpack_Google_Docs.error_msg;if(!t)return;const r=`<p class="wp-block-jetpack-google-docs-embed__error-msg">${t}</p>`;e.forEach(e=>{const t=e.querySelector("iframe");if(!t)return;const o=e.querySelector(".loader"),s=t.getAttribute("src").match(/^(http|https):\/\/(docs\.google.com)\/presentation\/d\/([A-Za-z0-9_-]+).*?$/i);if(null===s||void 0===s[1]||void 0===s[2]||void 0===s[3])return o.classList.remove("is-active"),void t.addEventListener("load",function(){setTimeout(()=>{0===Object.keys(this.contentWindow).length&&(e.innerHTML=r)},100)});const c=s[3],i=`https://docs.google.com/presentation/d/${c}/edit`,n=`https://docs.google.com/presentation/d/${c}/embed`;t.setAttribute("src",i),t.addEventListener("load",function(){n!==t.getAttribute("src")&&i===t.getAttribute("src")?0===Object.keys(this.contentWindow).length?e.innerHTML=r:t.setAttribute("src",n):o.classList.remove("is-active")})})};r.n(e)()(()=>{t()})})()})();
@@ -0,0 +1 @@
.wp-block-jetpack-google-docs-embed{border:1px solid #ccc;flex-basis:50%}.wp-block-jetpack-google-docs-embed.aligncenter{margin-left:auto;margin-right:auto}.wp-block-jetpack-google-docs-embed.alignleft,.wp-block-jetpack-google-docs-embed.alignright{margin-bottom:20px;max-width:600px}@media only screen and (min-width:600px){.wp-block-jetpack-google-docs-embed.alignleft{float:right;margin-left:20px!important}.wp-block-jetpack-google-docs-embed.alignright{float:left;margin-right:20px!important}}.wp-block-jetpack-google-docs-embed.ar-50 .wp-block-jetpack-google-docs-embed__wrapper:before{padding-top:50%}.wp-block-jetpack-google-docs-embed.ar-100 .wp-block-jetpack-google-docs-embed__wrapper:before{padding-top:100%}.wp-block-jetpack-google-docs-embed__wrapper{position:relative}.wp-block-jetpack-google-docs-embed__wrapper:before{content:"";display:block;padding-top:50%}.wp-block-jetpack-google-docs-embed__wrapper--error:before{content:none}.wp-block-jetpack-google-docs-embed__error-msg{background-color:#f8f9fa;color:#333;font-size:16px;margin:0;padding:20px}.wp-block-jetpack-google-docs-embed__error-msg:before{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='none'%3E%3Cpath fill='%231e2935' fill-rule='evenodd' d='M4.125 12A7.875 7.875 0 0 1 12 4.124a7.875 7.875 0 1 1-7.875 7.874ZM12 3a9 9 0 1 0 0 17.999A9 9 0 1 0 12 3m.041 5.28c.31 0 .563.253.563.563v4.5a.562.562 0 0 1-1.125 0v-4.5c0-.31.252-.562.562-.562Zm-.562 7.313c0-.31.252-.563.562-.563h.011a.562.562 0 0 1 0 1.125h-.01a.56.56 0 0 1-.563-.562' clip-rule='evenodd'/%3E%3C/svg%3E");background-position:top;background-repeat:no-repeat;background-size:20px;content:"";display:inline-block;height:20px;margin-inline-end:8px;position:relative;top:4px;width:20px}.wp-block-jetpack-google-docs-embed__error-msg a{color:#333;text-decoration:underline}.wp-block-jetpack-google-docs-embed__error-msg :is(a:focus,a:hover){text-decoration:none}.wp-block-jetpack-google-docs-embed .loader{background-color:#fff;display:none;height:100%;position:absolute;text-align:center;top:0;width:100%;z-index:99}.wp-block-jetpack-google-docs-embed .loader.is-active{display:block}.wp-block-jetpack-google-docs-embed .loader span{position:relative;top:50%;transform:translateY(-50%)}.wp-block-jetpack-google-docs-embed iframe{bottom:0;height:100%;left:0;max-width:100%;position:absolute;right:0;top:0;width:100%}.editor-styles-wrapper .wp-block-jetpack-google-docs-embed figure{margin:0}.editor-styles-wrapper :is([data-align=left],[data-align=right]) .wp-block-jetpack-google-docs-embed{width:auto}.editor-styles-wrapper :is([data-align=left],[data-align=right]) .wp-block-jetpack-google-docs-embed__wrapper:before{content:none}.editor-styles-wrapper :is([data-align=left],[data-align=right]) iframe{position:relative}.editor-styles-wrapper [data-align=left] .wp-block-jetpack-google-docs-embed{margin-left:20px}.editor-styles-wrapper [data-align=right] .wp-block-jetpack-google-docs-embed{margin-right:20px}html[amp] :is(.wp-block-jetpack-google-docs-embed.alignleft,.wp-block-jetpack-google-docs-embed.alignright){float:none}html[amp] .wp-block-jetpack-google-docs-embed__wrapper:before{content:none}html[amp] .wp-block-jetpack-google-docs-embed__error-msg:before{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 16 16'%3E%3Cpath fill='%231e2935' d='M1.5 3.5v11h11V10H14v5a1 1 0 0 1-1 1H1a1 1 0 0 1-1-1V3a1 1 0 0 1 1-1h5v1.5z'/%3E%3Cpath fill='%231e2935' d='m15.922 1.178-8.907 8.907-1.06-1.06L14.86.118l1.06 1.06Z'/%3E%3Cpath fill='%231e2935' d='M7.5 0H16v1.5H7.5z'/%3E%3Cpath fill='%231e2935' d='M16 0v8.5h-1.5V0z'/%3E%3C/svg%3E");background-size:12px;height:12px;top:1px;width:12px}html[amp] .wp-block-jetpack-google-docs-embed .loader{display:none}