@pixldocs/canvas-renderer 0.5.72 → 0.5.73
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/dist/index.cjs +20 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +20 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -256,7 +256,7 @@ export declare function normalizeFontFamily(fontStack: string): string;
|
|
|
256
256
|
* Package version banner. Bump alongside package.json so we can confirm
|
|
257
257
|
* (via browser:log) that the deployed bundle matches the expected build.
|
|
258
258
|
*/
|
|
259
|
-
export declare const PACKAGE_VERSION = "0.5.
|
|
259
|
+
export declare const PACKAGE_VERSION = "0.5.73";
|
|
260
260
|
|
|
261
261
|
export declare interface PageSettings {
|
|
262
262
|
backgroundColor?: string;
|
package/dist/index.js
CHANGED
|
@@ -12318,6 +12318,25 @@ async function awaitFontsForConfig(config, maxWaitMs) {
|
|
|
12318
12318
|
document.fonts.ready.catch(() => void 0).then(() => void 0),
|
|
12319
12319
|
new Promise((r) => setTimeout(r, Math.min(500, maxWaitMs)))
|
|
12320
12320
|
]);
|
|
12321
|
+
const checkSpecs = [];
|
|
12322
|
+
for (const d of descriptors) {
|
|
12323
|
+
const stylePrefix = d.style === "italic" ? "italic " : "";
|
|
12324
|
+
checkSpecs.push(`${stylePrefix}${d.weight} 16px "${d.family}"`);
|
|
12325
|
+
}
|
|
12326
|
+
const startedAt = Date.now();
|
|
12327
|
+
const pollBudget = Math.min(maxWaitMs, 2500);
|
|
12328
|
+
const allReady = () => {
|
|
12329
|
+
for (const spec of checkSpecs) {
|
|
12330
|
+
try {
|
|
12331
|
+
if (!document.fonts.check(spec)) return false;
|
|
12332
|
+
} catch {
|
|
12333
|
+
}
|
|
12334
|
+
}
|
|
12335
|
+
return true;
|
|
12336
|
+
};
|
|
12337
|
+
while (!allReady() && Date.now() - startedAt < pollBudget) {
|
|
12338
|
+
await new Promise((resolve) => setTimeout(resolve, 50));
|
|
12339
|
+
}
|
|
12321
12340
|
await new Promise(
|
|
12322
12341
|
(resolve) => requestAnimationFrame(() => requestAnimationFrame(() => resolve()))
|
|
12323
12342
|
);
|
|
@@ -12512,7 +12531,7 @@ function PixldocsPreview(props) {
|
|
|
12512
12531
|
!canvasSettled && /* @__PURE__ */ jsx("div", { style: { position: "absolute", inset: 0, display: "flex", alignItems: "center", justifyContent: "center", minHeight: 200 }, children: /* @__PURE__ */ jsx("div", { style: { color: "#888", fontSize: 14 }, children: "Loading preview..." }) })
|
|
12513
12532
|
] });
|
|
12514
12533
|
}
|
|
12515
|
-
const PACKAGE_VERSION = "0.5.
|
|
12534
|
+
const PACKAGE_VERSION = "0.5.73";
|
|
12516
12535
|
let __underlineFixInstalled = false;
|
|
12517
12536
|
function installUnderlineFix(fab) {
|
|
12518
12537
|
var _a;
|