-
Notifications
You must be signed in to change notification settings - Fork 271
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
deployment_bot
committed
Sep 25, 2024
1 parent
933fe99
commit f35c60c
Showing
20 changed files
with
6,401 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file modified
BIN
+64.4 KB
(100%)
packages/playground/wordpress-builds/public/wp-nightly/wordpress-static.zip
Binary file not shown.
97 changes: 97 additions & 0 deletions
97
...ss-builds/public/wp-nightly/wp-includes/js/dist/script-modules/block-library/file/view.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,97 @@ | ||
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 | ||
}); | ||
|
1 change: 1 addition & 0 deletions
1
...uilds/public/wp-nightly/wp-includes/js/dist/script-modules/block-library/file/view.min.js
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.