@vibecook/ghosttea-react 0.13.4 → 0.13.6

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.
@@ -4376,8 +4376,8 @@ async function finishPerformanceMeasurement(requestId, quietMs, timeoutMs) {
4376
4376
  let gpuQueueDrainMs = null;
4377
4377
  while (true) {
4378
4378
  const now = performance.now();
4379
- const hasVisibleDirty = [...dirty].some((id) => !occluded.has(id));
4380
- if (!flushScheduled && !hasVisibleDirty && now - active.lastActivityAt >= quietMs) {
4379
+ const hasDrawableDirty = [...dirty].some(drawable);
4380
+ if (!flushScheduled && !hasDrawableDirty && now - active.lastActivityAt >= quietMs) {
4381
4381
  const beforeDrainActivity = active.lastActivityAt;
4382
4382
  if (renderer?.settle) {
4383
4383
  const drainStarted = performance.now();
@@ -4667,12 +4667,13 @@ function scheduleShaderAnimation() {
4667
4667
  if (typeof self.requestAnimationFrame === "function") self.requestAnimationFrame(run);
4668
4668
  else setTimeout(run, 16);
4669
4669
  }
4670
+ function drawable(id) {
4671
+ const size = mounts.get(id)?.size;
4672
+ return !occluded.has(id) && size !== void 0 && size.width > 0 && size.height > 0;
4673
+ }
4670
4674
  async function flush() {
4671
4675
  const backend = await ensureRenderer();
4672
- const ids = [...dirty].filter((id) => {
4673
- const size = mounts.get(id)?.size;
4674
- return !occluded.has(id) && size !== void 0 && size.width > 0 && size.height > 0;
4675
- });
4676
+ const ids = [...dirty].filter(drawable);
4676
4677
  if (performanceMeasurement && ids.length > 0) {
4677
4678
  performanceMeasurement.scheduling.flushes += 1;
4678
4679
  appendPerformanceSample(performanceMeasurement.scheduling.panesPerFlush, ids.length);
@@ -4731,7 +4732,7 @@ async function flush() {
4731
4732
  console.error(`[terminal-renderer] failed to render ${entries.length} view(s)`, error);
4732
4733
  }
4733
4734
  }
4734
- if ([...dirty].some((id) => !occluded.has(id))) scheduleFlush();
4735
+ if ([...dirty].some(drawable)) scheduleFlush();
4735
4736
  }
4736
4737
  function markDirty(id) {
4737
4738
  if (performanceMeasurement && !performanceMeasurement.dirtySince.has(id)) {