style.css 0000644 00000001311 14751055527 0006425 0 ustar 00 .wp-block-file{
box-sizing:border-box;
}
.wp-block-file:not(.wp-element-button){
font-size:.8em;
}
.wp-block-file.aligncenter{
text-align:center;
}
.wp-block-file.alignright{
text-align:right;
}
.wp-block-file *+.wp-block-file__button{
margin-left:.75em;
}
:where(.wp-block-file){
margin-bottom:1.5em;
}
.wp-block-file__embed{
margin-bottom:1em;
}
:where(.wp-block-file__button){
border-radius:2em;
display:inline-block;
padding:.5em 1em;
}
:where(.wp-block-file__button):is(a):active,:where(.wp-block-file__button):is(a):focus,:where(.wp-block-file__button):is(a):hover,:where(.wp-block-file__button):is(a):visited{
box-shadow:none;
color:#fff;
opacity:.85;
text-decoration:none;
} block.json 0000644 00000002746 14751055527 0006555 0 ustar 00 {
"$schema": "https://schemas.wp.org/trunk/block.json",
"apiVersion": 3,
"name": "core/file",
"title": "File",
"category": "media",
"description": "Add a link to a downloadable file.",
"keywords": [ "document", "pdf", "download" ],
"textdomain": "default",
"attributes": {
"id": {
"type": "number"
},
"href": {
"type": "string"
},
"fileId": {
"type": "string",
"source": "attribute",
"selector": "a:not([download])",
"attribute": "id"
},
"fileName": {
"type": "rich-text",
"source": "rich-text",
"selector": "a:not([download])"
},
"textLinkHref": {
"type": "string",
"source": "attribute",
"selector": "a:not([download])",
"attribute": "href"
},
"textLinkTarget": {
"type": "string",
"source": "attribute",
"selector": "a:not([download])",
"attribute": "target"
},
"showDownloadButton": {
"type": "boolean",
"default": true
},
"downloadButtonText": {
"type": "rich-text",
"source": "rich-text",
"selector": "a[download]"
},
"displayPreview": {
"type": "boolean"
},
"previewHeight": {
"type": "number",
"default": 600
}
},
"supports": {
"anchor": true,
"align": true,
"spacing": {
"margin": true,
"padding": true
},
"color": {
"gradients": true,
"link": true,
"text": false,
"__experimentalDefaultControls": {
"background": true,
"link": true
}
},
"interactivity": true
},
"editorStyle": "wp-block-file-editor",
"style": "wp-block-file"
}
editor-rtl.css 0000644 00000001527 14751055527 0007363 0 ustar 00 .wp-block-file{
align-items:center;
display:flex;
flex-wrap:wrap;
justify-content:space-between;
margin-bottom:0;
}
.wp-block[data-align=left]>.wp-block-file,.wp-block[data-align=right]>.wp-block-file{
height:auto;
}
.wp-block[data-align=center]>.wp-block-file{
text-align:center;
}
.wp-block-file .components-resizable-box__container{
margin-bottom:1em;
}
.wp-block-file .wp-block-file__preview{
height:100%;
margin-bottom:1em;
width:100%;
}
.wp-block-file .wp-block-file__preview-overlay{
bottom:0;
left:0;
position:absolute;
right:0;
top:0;
}
.wp-block-file .wp-block-file__content-wrapper{
flex-grow:1;
}
.wp-block-file a{
min-width:1em;
}
.wp-block-file a:not(.wp-block-file__button){
display:inline-block;
}
.wp-block-file .wp-block-file__button-richtext-wrapper{
display:inline-block;
margin-right:.75em;
} view.min.asset.php 0000644 00000000124 14751055527 0010137 0 ustar 00 <?php return array('dependencies' => array(), 'version' => '9c04187f1796859989c3');
style-rtl.css 0000644 00000001312 14751055527 0007225 0 ustar 00 .wp-block-file{
box-sizing:border-box;
}
.wp-block-file:not(.wp-element-button){
font-size:.8em;
}
.wp-block-file.aligncenter{
text-align:center;
}
.wp-block-file.alignright{
text-align:right;
}
.wp-block-file *+.wp-block-file__button{
margin-right:.75em;
}
:where(.wp-block-file){
margin-bottom:1.5em;
}
.wp-block-file__embed{
margin-bottom:1em;
}
:where(.wp-block-file__button){
border-radius:2em;
display:inline-block;
padding:.5em 1em;
}
:where(.wp-block-file__button):is(a):active,:where(.wp-block-file__button):is(a):focus,:where(.wp-block-file__button):is(a):hover,:where(.wp-block-file__button):is(a):visited{
box-shadow:none;
color:#fff;
opacity:.85;
text-decoration:none;
} style-rtl.min.css 0000644 00000001203 14751055527 0010006 0 ustar 00 .wp-block-file{box-sizing:border-box}.wp-block-file:not(.wp-element-button){font-size:.8em}.wp-block-file.aligncenter{text-align:center}.wp-block-file.alignright{text-align:right}.wp-block-file *+.wp-block-file__button{margin-right:.75em}:where(.wp-block-file){margin-bottom:1.5em}.wp-block-file__embed{margin-bottom:1em}:where(.wp-block-file__button){border-radius:2em;display:inline-block;padding:.5em 1em}:where(.wp-block-file__button):is(a):active,:where(.wp-block-file__button):is(a):focus,:where(.wp-block-file__button):is(a):hover,:where(.wp-block-file__button):is(a):visited{box-shadow:none;color:#fff;opacity:.85;text-decoration:none} view.js 0000644 00000006145 14751055527 0006075 0 ustar 00 import * as __WEBPACK_EXTERNAL_MODULE__wordpress_interactivity_8e89b257__ from "@wordpress/interactivity";
/******/ // The require scope
/******/ var __webpack_require__ = {};
/******/
/************************************************************************/
/******/ /* webpack/runtime/define property getters */
/******/ (() => {
/******/ // define getter functions for harmony exports
/******/ __webpack_require__.d = (exports, definition) => {
/******/ for(var key in definition) {
/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
/******/ }
/******/ }
/******/ };
/******/ })();
/******/
/******/ /* webpack/runtime/hasOwnProperty shorthand */
/******/ (() => {
/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
/******/ })();
/******/
/************************************************************************/
var __webpack_exports__ = {};
;// CONCATENATED MODULE: external "@wordpress/interactivity"
var x = (y) => {
var x = {}; __webpack_require__.d(x, y); return x
}
var y = (x) => (() => (x))
const interactivity_namespaceObject = x({ ["store"]: () => (__WEBPACK_EXTERNAL_MODULE__wordpress_interactivity_8e89b257__.store) });
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/file/utils/index.js
/**
* Uses a combination of user agent matching and feature detection to determine whether
* the current browser supports rendering PDFs inline.
*
* @return {boolean} Whether or not the browser supports inline PDFs.
*/
const browserSupportsPdfs = () => {
// Most mobile devices include "Mobi" in their UA.
if (window.navigator.userAgent.indexOf('Mobi') > -1) {
return false;
}
// Android tablets are the noteable exception.
if (window.navigator.userAgent.indexOf('Android') > -1) {
return false;
}
// iPad pretends to be a Mac.
if (window.navigator.userAgent.indexOf('Macintosh') > -1 && window.navigator.maxTouchPoints && window.navigator.maxTouchPoints > 2) {
return false;
}
// IE only supports PDFs when there's an ActiveX object available for it.
if (!!(window.ActiveXObject || 'ActiveXObject' in window) && !(createActiveXObject('AcroPDF.PDF') || createActiveXObject('PDF.PdfCtrl'))) {
return false;
}
return true;
};
/**
* Helper function for creating ActiveX objects, catching any errors that are thrown
* when it's generated.
*
* @param {string} type The name of the ActiveX object to create.
* @return {window.ActiveXObject|undefined} The generated ActiveXObject, or null if it failed.
*/
const createActiveXObject = type => {
let ax;
try {
ax = new window.ActiveXObject(type);
} catch (e) {
ax = undefined;
}
return ax;
};
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/file/view.js
/**
* WordPress dependencies
*/
/**
* Internal dependencies
*/
(0,interactivity_namespaceObject.store)('core/file', {
state: {
get hasPdfPreview() {
return browserSupportsPdfs();
}
}
}, {
lock: true
});
view.asset.php 0000644 00000000124 14751055527 0007355 0 ustar 00 <?php return array('dependencies' => array(), 'version' => '498971a8a9512421f3b5');
editor-rtl.min.css 0000644 00000001373 14751055527 0010144 0 ustar 00 .wp-block-file{align-items:center;display:flex;flex-wrap:wrap;justify-content:space-between;margin-bottom:0}.wp-block[data-align=left]>.wp-block-file,.wp-block[data-align=right]>.wp-block-file{height:auto}.wp-block[data-align=center]>.wp-block-file{text-align:center}.wp-block-file .components-resizable-box__container{margin-bottom:1em}.wp-block-file .wp-block-file__preview{height:100%;margin-bottom:1em;width:100%}.wp-block-file .wp-block-file__preview-overlay{bottom:0;left:0;position:absolute;right:0;top:0}.wp-block-file .wp-block-file__content-wrapper{flex-grow:1}.wp-block-file a{min-width:1em}.wp-block-file a:not(.wp-block-file__button){display:inline-block}.wp-block-file .wp-block-file__button-richtext-wrapper{display:inline-block;margin-right:.75em} style.min.css 0000644 00000001202 14751055527 0007206 0 ustar 00 .wp-block-file{box-sizing:border-box}.wp-block-file:not(.wp-element-button){font-size:.8em}.wp-block-file.aligncenter{text-align:center}.wp-block-file.alignright{text-align:right}.wp-block-file *+.wp-block-file__button{margin-left:.75em}:where(.wp-block-file){margin-bottom:1.5em}.wp-block-file__embed{margin-bottom:1em}:where(.wp-block-file__button){border-radius:2em;display:inline-block;padding:.5em 1em}:where(.wp-block-file__button):is(a):active,:where(.wp-block-file__button):is(a):focus,:where(.wp-block-file__button):is(a):hover,:where(.wp-block-file__button):is(a):visited{box-shadow:none;color:#fff;opacity:.85;text-decoration:none} editor.css 0000644 00000001526 14751055527 0006563 0 ustar 00 .wp-block-file{
align-items:center;
display:flex;
flex-wrap:wrap;
justify-content:space-between;
margin-bottom:0;
}
.wp-block[data-align=left]>.wp-block-file,.wp-block[data-align=right]>.wp-block-file{
height:auto;
}
.wp-block[data-align=center]>.wp-block-file{
text-align:center;
}
.wp-block-file .components-resizable-box__container{
margin-bottom:1em;
}
.wp-block-file .wp-block-file__preview{
height:100%;
margin-bottom:1em;
width:100%;
}
.wp-block-file .wp-block-file__preview-overlay{
bottom:0;
left:0;
position:absolute;
right:0;
top:0;
}
.wp-block-file .wp-block-file__content-wrapper{
flex-grow:1;
}
.wp-block-file a{
min-width:1em;
}
.wp-block-file a:not(.wp-block-file__button){
display:inline-block;
}
.wp-block-file .wp-block-file__button-richtext-wrapper{
display:inline-block;
margin-left:.75em;
} editor.min.css 0000644 00000001372 14751055527 0007344 0 ustar 00 .wp-block-file{align-items:center;display:flex;flex-wrap:wrap;justify-content:space-between;margin-bottom:0}.wp-block[data-align=left]>.wp-block-file,.wp-block[data-align=right]>.wp-block-file{height:auto}.wp-block[data-align=center]>.wp-block-file{text-align:center}.wp-block-file .components-resizable-box__container{margin-bottom:1em}.wp-block-file .wp-block-file__preview{height:100%;margin-bottom:1em;width:100%}.wp-block-file .wp-block-file__preview-overlay{bottom:0;left:0;position:absolute;right:0;top:0}.wp-block-file .wp-block-file__content-wrapper{flex-grow:1}.wp-block-file a{min-width:1em}.wp-block-file a:not(.wp-block-file__button){display:inline-block}.wp-block-file .wp-block-file__button-richtext-wrapper{display:inline-block;margin-left:.75em} view.min.js 0000644 00000001315 14751055527 0006651 0 ustar 00 import*as e from"@wordpress/interactivity";var t={d:(e,o)=>{for(var r in o)t.o(o,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:o[r]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t)};const o=(e=>{var o={};return t.d(o,e),o})({store:()=>e.store}),r=e=>{let t;try{t=new window.ActiveXObject(e)}catch(e){t=void 0}return t};(0,o.store)("core/file",{state:{get hasPdfPreview(){return!(window.navigator.userAgent.indexOf("Mobi")>-1||window.navigator.userAgent.indexOf("Android")>-1||window.navigator.userAgent.indexOf("Macintosh")>-1&&window.navigator.maxTouchPoints&&window.navigator.maxTouchPoints>2||(window.ActiveXObject||"ActiveXObject"in window)&&!r("AcroPDF.PDF")&&!r("PDF.PdfCtrl"))}}},{lock:!0});