ryugi-artifacts 1.44.2 → 1.45.0

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/cli.cjs CHANGED
@@ -16060,7 +16060,7 @@ var updateCommand = {
16060
16060
  },
16061
16061
  run: ({ values }, emit) => update2(
16062
16062
  {
16063
- current: "1.44.2",
16063
+ current: "1.45.0",
16064
16064
  file: __filename,
16065
16065
  env: process.env,
16066
16066
  registry: process.env.npm_config_registry || "https://registry.npmjs.org/",
@@ -16141,7 +16141,7 @@ async function main(argv) {
16141
16141
  const [name, ...rest] = argv;
16142
16142
  const command = COMMANDS.find((candidate) => candidate.name === name);
16143
16143
  const json = argv.includes("--json") || !command?.explicitJson && !process.stdout.isTTY;
16144
- notifyUpdate("1.44.2", json, argv);
16144
+ notifyUpdate("1.45.0", json, argv);
16145
16145
  const emit = (value) => {
16146
16146
  const line = json ? JSON.stringify(value) : text(value);
16147
16147
  if (!json && typeof value.error === "string") console.error(line);
@@ -16160,7 +16160,7 @@ async function main(argv) {
16160
16160
  return await command.run(parse(rest, command.options, command.positionals), emit);
16161
16161
  }
16162
16162
  if (name === "--version" || name === "-v") {
16163
- console.info("1.44.2");
16163
+ console.info("1.45.0");
16164
16164
  return 0;
16165
16165
  }
16166
16166
  if (name === "--help" || name === "-h") {
package/dist/server.cjs CHANGED
@@ -5176,7 +5176,7 @@ var import_node_os2 = __toESM(require("node:os"), 1);
5176
5176
  var import_node_path23 = __toESM(require("node:path"), 1);
5177
5177
 
5178
5178
  // package.json
5179
- var version = "1.44.2";
5179
+ var version = "1.45.0";
5180
5180
 
5181
5181
  // src/server/app.ts
5182
5182
  var import_node_fs24 = __toESM(require("node:fs"), 1);
@@ -6314,10 +6314,14 @@ function installSnapshot(win, serialize) {
6314
6314
  const post = (type, data = {}) => win.parent.postMessage({ type: `ryugi:board:${type}`, ...data }, "*");
6315
6315
  const frame = () => new Promise((resolve) => win.requestAnimationFrame(() => resolve()));
6316
6316
  const settle = async () => {
6317
- try {
6318
- await doc.fonts?.ready;
6319
- } catch {
6320
- }
6317
+ const fonts = doc.fonts?.ready;
6318
+ if (fonts)
6319
+ await Promise.race([
6320
+ fonts.catch(() => void 0),
6321
+ new Promise((resolve) => {
6322
+ win.setTimeout(resolve, 800);
6323
+ })
6324
+ ]);
6321
6325
  for (let round = 0; round < 20; round++) {
6322
6326
  const running = (doc.getAnimations?.() ?? []).filter(
6323
6327
  (animation) => animation.playState === "running" && animation.effect?.getComputedTiming().endTime !== Infinity
@@ -6325,8 +6329,12 @@ function installSnapshot(win, serialize) {
6325
6329
  if (!running.length) break;
6326
6330
  await Promise.all(running.map((animation) => animation.finished.catch(() => void 0)));
6327
6331
  }
6328
- await frame();
6329
- await frame();
6332
+ await Promise.race([
6333
+ Promise.all([frame(), frame()]),
6334
+ new Promise((resolve) => {
6335
+ win.setTimeout(resolve, 100);
6336
+ })
6337
+ ]);
6330
6338
  post("ready");
6331
6339
  };
6332
6340
  if (doc.readyState === "complete") void settle();