first commit

This commit is contained in:
2026-03-26 13:48:22 +01:00
commit 6af83e92ed
7795 changed files with 2766332 additions and 0 deletions

View File

@@ -0,0 +1,116 @@
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__ = {};
;// external "@wordpress/interactivity"
var x = (y) => {
var x = {}; __webpack_require__.d(x, y); return x
}
var y = (x) => (() => (x))
const interactivity_namespaceObject = x({ ["getContext"]: () => (__WEBPACK_EXTERNAL_MODULE__wordpress_interactivity_8e89b257__.getContext), ["getElement"]: () => (__WEBPACK_EXTERNAL_MODULE__wordpress_interactivity_8e89b257__.getElement), ["store"]: () => (__WEBPACK_EXTERNAL_MODULE__wordpress_interactivity_8e89b257__.store) });
;// ./node_modules/@wordpress/block-editor/build-module/utils/fit-text-utils.js
function findOptimalFontSize(textElement, applyFontSize) {
const alreadyHasScrollableHeight = textElement.scrollHeight > textElement.clientHeight;
let minSize = 5;
let maxSize = 2400;
let bestSize = minSize;
const computedStyle = window.getComputedStyle(textElement);
let paddingLeft = parseFloat(computedStyle.paddingLeft) || 0;
let paddingRight = parseFloat(computedStyle.paddingRight) || 0;
const range = document.createRange();
range.selectNodeContents(textElement);
let referenceElement = textElement;
const parentElement = textElement.parentElement;
if (parentElement) {
const parentElementComputedStyle = window.getComputedStyle(parentElement);
if (parentElementComputedStyle?.display === "flex") {
referenceElement = parentElement;
paddingLeft += parseFloat(parentElementComputedStyle.paddingLeft) || 0;
paddingRight += parseFloat(parentElementComputedStyle.paddingRight) || 0;
}
}
let maxclientHeight = referenceElement.clientHeight;
while (minSize <= maxSize) {
const midSize = Math.floor((minSize + maxSize) / 2);
applyFontSize(midSize);
const rect = range.getBoundingClientRect();
const textWidth = rect.width;
const fitsWidth = textElement.scrollWidth <= referenceElement.clientWidth && textWidth <= referenceElement.clientWidth - paddingLeft - paddingRight;
const fitsHeight = alreadyHasScrollableHeight || textElement.scrollHeight <= referenceElement.clientHeight || textElement.scrollHeight <= maxclientHeight;
if (referenceElement.clientHeight > maxclientHeight) {
maxclientHeight = referenceElement.clientHeight;
}
if (fitsWidth && fitsHeight) {
bestSize = midSize;
minSize = midSize + 1;
} else {
maxSize = midSize - 1;
}
}
range.detach();
return bestSize;
}
function optimizeFitText(textElement, applyFontSize) {
if (!textElement) {
return;
}
applyFontSize(0);
const optimalSize = findOptimalFontSize(textElement, applyFontSize);
applyFontSize(optimalSize);
return optimalSize;
}
;// ./node_modules/@wordpress/block-editor/build-module/utils/fit-text-frontend.js
(0,interactivity_namespaceObject.store)("core/fit-text", {
callbacks: {
init() {
const context = (0,interactivity_namespaceObject.getContext)();
const { ref } = (0,interactivity_namespaceObject.getElement)();
const applyFontSize = (fontSize) => {
if (fontSize === 0) {
ref.style.fontSize = "";
} else {
ref.style.fontSize = `${fontSize}px`;
}
};
context.fontSize = optimizeFitText(ref, applyFontSize);
if (window.ResizeObserver && ref.parentElement) {
const resizeObserver = new window.ResizeObserver(() => {
context.fontSize = optimizeFitText(ref, applyFontSize);
});
resizeObserver.observe(ref.parentElement);
resizeObserver.observe(ref);
return () => {
if (resizeObserver) {
resizeObserver.disconnect();
}
};
}
}
}
});

View File

@@ -0,0 +1 @@
import*as e from"@wordpress/interactivity";var t={d:(e,n)=>{for(var o in n)t.o(n,o)&&!t.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:n[o]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t)};const n=(e=>{var n={};return t.d(n,e),n})({getContext:()=>e.getContext,getElement:()=>e.getElement,store:()=>e.store});function o(e,t){if(!e)return;t(0);const n=function(e,t){const n=e.scrollHeight>e.clientHeight;let o=5,i=2400,r=o;const l=window.getComputedStyle(e);let c=parseFloat(l.paddingLeft)||0,s=parseFloat(l.paddingRight)||0;const a=document.createRange();a.selectNodeContents(e);let d=e;const g=e.parentElement;if(g){const e=window.getComputedStyle(g);"flex"===e?.display&&(d=g,c+=parseFloat(e.paddingLeft)||0,s+=parseFloat(e.paddingRight)||0)}let p=d.clientHeight;for(;o<=i;){const l=Math.floor((o+i)/2);t(l);const g=a.getBoundingClientRect().width,f=e.scrollWidth<=d.clientWidth&&g<=d.clientWidth-c-s,h=n||e.scrollHeight<=d.clientHeight||e.scrollHeight<=p;d.clientHeight>p&&(p=d.clientHeight),f&&h?(r=l,o=l+1):i=l-1}return a.detach(),r}(e,t);return t(n),n}(0,n.store)("core/fit-text",{callbacks:{init(){const e=(0,n.getContext)(),{ref:t}=(0,n.getElement)(),i=e=>{t.style.fontSize=0===e?"":`${e}px`};if(e.fontSize=o(t,i),window.ResizeObserver&&t.parentElement){const n=new window.ResizeObserver((()=>{e.fontSize=o(t,i)}));return n.observe(t.parentElement),n.observe(t),()=>{n&&n.disconnect()}}}}});